/*
 * mass-tools v7.60.0
 * https://github.com/cheminfo/mass-tools#readme
 *
 * Licensed under the MIT license.
 */
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);
}

var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};

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 a () {
			var isInstance = false;
      try {
        isInstance = this instanceof a;
      } catch (e) {}
			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;
}

var src$l = {};

var src$k = {};

var Spectrum$2 = {};

// eslint-disable-next-line @typescript-eslint/unbound-method
const toString$2 = Object.prototype.toString;
/**
 * Checks if an object is an instance of an Array (array or typed array, except those that contain bigint values).
 * @param value - Object to check.
 * @returns True if the object is an array or a typed array.
 */
function isAnyArray$2(value) {
  const tag = toString$2.call(value);
  return tag.endsWith('Array]') && !tag.includes('Big');
}

var lib$7 = /*#__PURE__*/Object.freeze({
	__proto__: null,
	isAnyArray: isAnyArray$2
});

var require$$0$8 = /*@__PURE__*/getAugmentedNamespace(lib$7);

/**
 * Calculates reimAbsolute value of a complex spectrum.
 * @param data - complex spectrum.
 * @param options - options.
 * @param options.output - optional output array.
 * @returns absolute value array.
 */
function reimAbsolute(data, options = {}) {
  const length = data.re.length;
  const {
    output = new Float64Array(length)
  } = options;
  const re = data.re;
  const im = data.im;
  for (let i = 0; i < length; i++) {
    output[i] = Math.hypot(re[i], im[i]);
  }
  return output;
}

/**
 * This function
 * @param output - undefined or a new array
 * @param length - length of the output array
 * @returns
 */
function getOutputArray(output, length) {
  if (output !== undefined) {
    if (!isAnyArray$2(output)) {
      throw new TypeError('output option must be an array if specified');
    }
    if (output.length !== length) {
      throw new TypeError('the output array does not have the correct length');
    }
    return output;
  } else {
    return new Float64Array(length);
  }
}

/**
 * This function returns an array with absolute values.
 * @param array - array of data
 * @returns - array with absolute values
 */
function xAbsolute(array) {
  const tmpArray = array.slice();
  for (let i = 0; i < tmpArray.length; i++) {
    if (tmpArray[i] < 0) tmpArray[i] *= -1;
  }
  return tmpArray;
}

/**
 * Calculates the median of an array.
 * @param input - array containing values.
 * @param options - options.
 * @returns median.
 */
function xMedian(input, options = {}) {
  if (!isAnyArray$2(input)) {
    throw new TypeError('input must be an array');
  }
  const {
    exact = false,
    fromIndex = 0,
    toIndex = input.length
  } = options || {};
  const array = input.slice(fromIndex, toIndex);
  if (array.length === 0) {
    throw new TypeError('input must not be empty');
  }
  const middleIndex = calcMiddle(0, array.length - 1);
  const median = quickSelect(array, middleIndex);
  if (array.length % 2 === 1 || !exact) {
    return median;
  }
  const medianNext = quickSelect(array, middleIndex + 1);
  return (median + medianNext) / 2;
}
function quickSelect(array, middleIndex) {
  let low = 0;
  let high = array.length - 1;
  let middle = 0;
  let currentLow = 0;
  let currentHigh = 0;
  while (true) {
    if (high <= low) {
      return array[middleIndex];
    }
    if (high === low + 1) {
      if (array[low] > array[high]) {
        swap$1(array, low, high);
      }
      return array[middleIndex];
    }
    // Find median of low, middle and high items; swap into position low
    middle = calcMiddle(low, high);
    if (array[middle] > array[high]) swap$1(array, middle, high);
    if (array[low] > array[high]) swap$1(array, low, high);
    if (array[middle] > array[low]) swap$1(array, middle, low);
    // Swap low item (now in position middle) into position (low+1)
    swap$1(array, middle, low + 1);
    // Nibble from each end towards middle, swapping items when stuck
    currentLow = low + 1;
    currentHigh = high;
    while (true) {
      do currentLow++; while (array[low] > array[currentLow]);
      do currentHigh--; while (array[currentHigh] > array[low]);
      if (currentHigh < currentLow) {
        break;
      }
      swap$1(array, currentLow, currentHigh);
    }
    // Swap middle item (in position low) back into correct position
    swap$1(array, low, currentHigh);
    // Re-set active partition
    if (currentHigh <= middleIndex) {
      low = currentLow;
    }
    if (currentHigh >= middleIndex) {
      high = currentHigh - 1;
    }
  }
}
function swap$1(array, i, j) {
  const temp = array[j];
  array[j] = array[i];
  array[i] = temp;
}
function calcMiddle(i, j) {
  return Math.floor((i + j) / 2);
}

/**
 * This function calculates the median after taking the xAbsolute values of the points.
 * @param array - the array for which we want to calculate the absolute value
 * @returns - median
 */
function xAbsoluteMedian(array) {
  return xMedian(xAbsolute(array));
}

/**
 * Checks if the input is a non-empty array of numbers.
 * Only checks the first element.
 * @param input - array to check.
 * @param options - additional checks.
 */
function xCheck(input, options = {}) {
  const {
    minLength = 1
  } = options;
  if (!isAnyArray$2(input)) {
    throw new TypeError('input must be an array');
  }
  if (input.length === 0) {
    throw new TypeError('input must not be empty');
  }
  if (typeof input[0] !== 'number') {
    throw new TypeError('input must contain numbers');
  }
  if (input.length < minLength) {
    throw new Error(`input must have a length of at least ${minLength}`);
  }
}

/**
 * Returns the closest index of a `target`
 * @param array - array of numbers.
 * @param target - target value.
 * @param options - options.
 * @returns closest index.
 */
function xFindClosestIndex(array, target, options = {}) {
  const {
    sorted = true
  } = options;
  if (sorted) {
    let low = 0;
    let high = array.length - 1;
    let middle = 0;
    while (high - low > 1) {
      middle = low + (high - low >> 1);
      if (array[middle] < target) {
        low = middle;
      } else if (array[middle] > target) {
        high = middle;
      } else {
        return middle;
      }
    }
    if (low < array.length - 1) {
      if (Math.abs(target - array[low]) < Math.abs(array[low + 1] - target)) {
        return low;
      } else {
        return low + 1;
      }
    } else {
      return low;
    }
  } else {
    let index = 0;
    let diff = Number.POSITIVE_INFINITY;
    for (let i = 0; i < array.length; i++) {
      const currentDiff = Math.abs(array[i] - target);
      if (currentDiff < diff) {
        diff = currentDiff;
        index = i;
      }
    }
    return index;
  }
}

/**
 * Returns an object with {fromIndex, toIndex} for a specific from / to
 * @param x - array of numbers
 * @param options - options.
 */
function xGetFromToIndex(x, options = {}) {
  let {
    fromIndex,
    toIndex
  } = options;
  const {
    from,
    to
  } = options;
  if (fromIndex === undefined) {
    if (from !== undefined) {
      fromIndex = xFindClosestIndex(x, from);
    } else {
      fromIndex = 0;
    }
  }
  if (toIndex === undefined) {
    if (to !== undefined) {
      toIndex = xFindClosestIndex(x, to);
    } else {
      toIndex = x.length - 1;
    }
  }
  if (fromIndex < 0) fromIndex = 0;
  if (toIndex < 0) toIndex = 0;
  if (fromIndex >= x.length) fromIndex = x.length - 1;
  if (toIndex >= x.length) toIndex = x.length - 1;
  if (fromIndex > toIndex) [fromIndex, toIndex] = [toIndex, fromIndex];
  return {
    fromIndex,
    toIndex
  };
}

function xAbsoluteSum(array, options = {}) {
  xCheck(array);
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(array, options);
  let sum = 0;
  for (let i = fromIndex; i <= toIndex; i++) {
    sum += Math.abs(array[i]);
  }
  return sum;
}

/**
 * This function xAdd the first array by the second array or a constant value to each element of the first array
 * @param array1 - the first array
 * @param array2 - the second array or number
 * @returns the result of the addition
 */
function xAdd(array1, array2) {
  let isConstant = false;
  let constant = 0;
  if (isAnyArray$2(array2)) {
    if (array1.length !== array2.length) {
      throw new Error('size of array1 and array2 must be identical');
    }
  } else {
    isConstant = true;
    constant = array2;
  }
  const array3 = new Float64Array(array1.length);
  if (isConstant) {
    for (let i = 0; i < array1.length; i++) {
      array3[i] = array1[i] + constant;
    }
  } else {
    for (let i = 0; i < array1.length; i++) {
      array3[i] = array1[i] + array2[i];
    }
  }
  return array3;
}

/**
 * Will apply a function on each element of the array described as a string
 * By default we will use as variable 'x'
 * In front of sequence of lowercase we will add 'Math.'. This allows to write
 * `sin(x) + cos(x)` and it will be replace internally by (x) => (Math.sin(x) + Math.cos(x))
 * @param array
 * @param options
 * @returns
 */
function xApplyFunctionStr(array, options = {}) {
  const {
    variableLabel = 'x',
    fctString = variableLabel
  } = options;
  const fct = new Function(variableLabel, `return Number(${fctString.replaceAll(/(?<before>^|\W)(?<after>[\da-z]{2,}\()/g, '$<before>Math.$<after>').replaceAll('Math.Math', 'Math')})`);
  const toReturn = new Float64Array(array.length);
  for (let i = 0; i < array.length; i++) {
    toReturn[i] = fct(array[i]);
    if (Number.isNaN(toReturn[i])) {
      throw new Error(`The callback ${fctString} does not return a number: ${array[i]}`);
    }
  }
  return toReturn;
}

/**
 * Check that two arrays have the same length.
 * @param array1 - first array.
 * @param array2 - second array.
 */
function xCheckLengths(array1, array2) {
  if (array1.length !== array2.length) {
    throw new TypeError('length of array1 and array2 must be identical');
  }
}

/**
 * Dot product between two arrays.
 * @param A - first array.
 * @param B - second array.
 */
function xDotProduct(A, B) {
  xCheckLengths(A, B);
  let result = 0;
  for (let i = 0; i < A.length; i++) {
    result += A[i] * B[i];
  }
  return result;
}

/**
 * Calculates the cross-correlation between 2 arrays
 * @param A - fixed array
 * @param B - sweeping array
 * @param options - options.
 */
function xCrossCorrelation(A, B, options = {}) {
  const {
    tau = 1,
    lag = A.length - 1
  } = options;
  const result = new Float64Array(1 + 2 * lag / tau);
  if (A.length === B.length) {
    const n = B.length;
    const g = new Float64Array(2 * n);
    const q = new Float64Array(2 * n);
    for (let i = 0; i < n; i++) {
      q[n + i] = B[i];
    }
    for (let i = n * 2 - (tau - 1); i > 0; i -= tau) {
      let k = 0;
      for (let j = i; j < n * 2; j++) {
        g[k] = q[j];
        k++;
      }
      const w = [];
      for (let l = 0; l < n; l++) {
        w[l] = g[l];
      }
      result[(k - (n - lag)) / tau] = xDotProduct(A, w);
    }
  }
  return result;
}

/**
 * Calculates the auto-correlation of an array
 * @param A - the array for which to calculate the auto-correlation
 * @param options - options.
 */
function xAutoCorrelation(A, options = {}) {
  return xCrossCorrelation(A, A, options);
}

/**
 * Downsample an array by averaging consecutive non-overlapping points (binning).
 * Either specify a fixed `binSize` or a target `numberOfPoints`.
 * @param array - input array.
 * @param options - options.
 * @returns downsampled array.
 */
function xBinning(array, options = {}) {
  xCheck(array);
  const {
    binSize,
    numberOfPoints,
    keepFirstAndLast = true
  } = options;
  const {
    length
  } = array;
  if (numberOfPoints !== undefined) {
    if (binSize !== undefined) {
      throw new RangeError('binSize and numberOfPoints are mutually exclusive');
    }
    if (!Number.isInteger(numberOfPoints) || numberOfPoints <= 0) {
      throw new RangeError('numberOfPoints must be a positive integer');
    }
    if (numberOfPoints > length) {
      throw new RangeError('numberOfPoints must be <= array.length');
    }
    return binByNumberOfPoints(array, numberOfPoints, keepFirstAndLast);
  }
  const effectiveBinSize = binSize ?? 10;
  if (!Number.isInteger(effectiveBinSize) || effectiveBinSize <= 0) {
    throw new RangeError('binSize must be a positive integer');
  }
  if (effectiveBinSize === 1) {
    return Float64Array.from(array);
  }
  if (keepFirstAndLast) {
    if (length <= 2) {
      return Float64Array.from(array);
    }
    const innerLength = length - 2;
    const innerBinCount = Math.ceil(innerLength / effectiveBinSize);
    const output = new Float64Array(innerBinCount + 2);
    output[0] = array[0];
    output[output.length - 1] = array[length - 1];
    for (let i = 0, j = 1; i < innerLength; i += effectiveBinSize, j++) {
      const start = i + 1;
      const end = Math.min(start + effectiveBinSize, length - 1);
      let sum = 0;
      for (let k = start; k < end; k++) {
        sum += array[k];
      }
      output[j] = sum / (end - start);
    }
    return output;
  }
  const outputLength = Math.ceil(length / effectiveBinSize);
  const output = new Float64Array(outputLength);
  for (let i = 0, j = 0; i < length; i += effectiveBinSize, j++) {
    const end = Math.min(i + effectiveBinSize, length);
    let sum = 0;
    for (let k = i; k < end; k++) {
      sum += array[k];
    }
    output[j] = sum / (end - i);
  }
  return output;
}
function binByNumberOfPoints(array, numberOfPoints, keepFirstAndLast) {
  const {
    length
  } = array;
  const output = new Float64Array(numberOfPoints);
  if (keepFirstAndLast) {
    if (numberOfPoints < 2) {
      throw new RangeError('numberOfPoints must be >= 2 when keepFirstAndLast is true');
    }
    output[0] = array[0];
    output[numberOfPoints - 1] = array[length - 1];
    if (numberOfPoints === 2) {
      return output;
    }
    const innerLength = length - 2;
    const innerBins = numberOfPoints - 2;
    for (let j = 0; j < innerBins; j++) {
      const start = 1 + Math.floor(j * innerLength / innerBins);
      const end = 1 + Math.floor((j + 1) * innerLength / innerBins);
      let sum = 0;
      for (let k = start; k < end; k++) {
        sum += array[k];
      }
      output[j + 1] = sum / (end - start);
    }
    return output;
  }
  for (let j = 0; j < numberOfPoints; j++) {
    const start = Math.floor(j * length / numberOfPoints);
    const end = Math.floor((j + 1) * length / numberOfPoints);
    let sum = 0;
    for (let k = start; k < end; k++) {
      sum += array[k];
    }
    output[j] = sum / (end - start);
  }
  return output;
}

// Internal helper: not re-exported from `x/index.ts`, so it stays out of the public API.
/**
 * Copy the data into an ascending-sorted `Float64Array`.
 * The library does not accept NaN: it corrupts ranks, quartiles and moments, so a NaN
 * in the input throws. Sorting groups every NaN at the end, so a single look at the
 * last element detects them.
 * @param array - data.
 * @returns ascending-sorted values.
 */
function getSortedFloat64(array) {
  const sorted = Float64Array.from(array);
  sorted.sort();
  // NaN sorts to the end, so the last element tells us whether any NaN is present.
  if (Number.isNaN(sorted.at(-1))) {
    throw new Error('input must not contain NaN values');
  }
  return sorted;
}

/**
 * Calculating the box plot of the array
 * This function will interpolate the values and use the inclusive algorithm
 * @param array - data.
 * @returns q1, median, q3, min, max.
 */
function xBoxPlot(array) {
  xCheck(array);
  // duplicate the array to avoid modifying the original one
  // and sort typed array that is much faster than sorting a normal array
  const sorted = getSortedFloat64(array);
  return boxPlotFromSorted(sorted);
}
/**
 * Calculating the box plot of an already-sorted array, without copying or re-sorting.
 * Internal helper: not re-exported from `x/index.ts`, so it stays out of the public API.
 * @param array - sorted data.
 * @returns q1, median, q3, min, max.
 */
function boxPlotFromSorted(array) {
  const min = array[0];
  const max = array.at(-1);
  // need to deal with very close points otherwise it yields to incorrect results
  if (max - min <= Number.EPSILON) {
    // if one of the 2 numbers is an integer let's take this one
    const shortTestNumber = String(min).length < String(max).length ? min : max;
    return {
      min,
      q1: shortTestNumber,
      median: shortTestNumber,
      q3: shortTestNumber,
      max
    };
  }
  const posQ1 = (array.length - 1) / 4;
  const posQ3 = (array.length - 1) * (3 / 4);
  const medianPos = (array.length - 1) / 2;
  const q1MinProportion = posQ1 % 1;
  const q3MinProportion = posQ3 % 1;
  const medianMinProportion = medianPos % 1;
  return {
    min,
    q1: q1MinProportion === 0 ? array[posQ1] : array[posQ1 >> 0] * (1 - q1MinProportion) + array[(posQ1 >> 0) + 1] * q1MinProportion,
    median: medianMinProportion === 0 ? array[medianPos] : array[medianPos >> 0] * (1 - medianMinProportion) + array[(medianPos >> 0) + 1] * medianMinProportion,
    q3: q3MinProportion === 0 ? array[posQ3] : array[posQ3 >> 0] * (1 - q3MinProportion) + array[(posQ3 >> 0) + 1] * q3MinProportion,
    max
  };
}

/**
 * Calculating the box plot of the array with outliers
 * Values are outliers if they are below Q1 - 1.5 * IQR or above Q3 + 1.5 * IQR
 * @param array - data
 * @returns - q1, median, q3, min, max, outliers
 */
function xBoxPlotWithOutliers(array) {
  xCheck(array);
  const sorted = getSortedFloat64(array);
  return boxPlotWithOutliersFromSorted(sorted);
}
/**
 * Calculating the box plot with outliers of an already-sorted array, without copying
 * or re-sorting. Because the array is sorted, the outliers are the low prefix and the
 * high suffix, so they are reported in ascending order.
 * Internal helper: not re-exported from `x/index.ts`, so it stays out of the public API.
 * @param sorted - sorted data.
 * @returns - q1, median, q3, min, max, outliers
 */
function boxPlotWithOutliersFromSorted(sorted) {
  return boxPlotWithOutliersAndBounds(sorted).boxPlot;
}
/**
 * Same computation as {@link boxPlotWithOutliersFromSorted}, but also returns the
 * non-outlier index range so callers that need the filtered values (mean, sd, …) can
 * reuse the bounds instead of scanning the array a second time.
 * Internal helper: not re-exported from `x/index.ts`, so it stays out of the public API.
 * @param sorted - sorted data.
 * @returns - the box plot and the non-outlier index range.
 */
function boxPlotWithOutliersAndBounds(sorted) {
  const boxPlot = boxPlotFromSorted(sorted);
  if (boxPlot.max - boxPlot.min <= Number.EPSILON) {
    return {
      boxPlot: {
        ...boxPlot,
        lowerWhisker: boxPlot.min,
        upperWhisker: boxPlot.max,
        minWhisker: boxPlot.min,
        maxWhisker: boxPlot.max,
        iqr: 0,
        outliers: []
      },
      bounds: {
        lowIndex: 0,
        highIndex: sorted.length
      }
    };
  }
  const iqr = boxPlot.q3 - boxPlot.q1;
  const lowerWhisker = boxPlot.q1 - 1.5 * iqr;
  const upperWhisker = boxPlot.q3 + 1.5 * iqr;
  const bounds = getWhiskerBounds(sorted, lowerWhisker, upperWhisker);
  const {
    lowIndex,
    highIndex
  } = bounds;
  const outliers = [];
  for (let i = 0; i < lowIndex; i++) {
    outliers.push(sorted[i]);
  }
  for (let i = highIndex; i < sorted.length; i++) {
    outliers.push(sorted[i]);
  }
  return {
    boxPlot: {
      ...boxPlot,
      lowerWhisker,
      upperWhisker,
      minWhisker: sorted[lowIndex],
      maxWhisker: sorted[highIndex - 1],
      iqr,
      outliers
    },
    bounds
  };
}
/**
 * Locate the contiguous range `[lowIndex, highIndex)` of non-outliers in a sorted array.
 * Because the array is sorted, outliers are exactly the prefix below `lowerWhisker` and
 * the suffix above `upperWhisker`, so the scan only touches the outliers themselves.
 * Internal helper: not re-exported from `x/index.ts`, so it stays out of the public API.
 * @param sorted - sorted data.
 * @param lowerWhisker - values strictly below are low outliers.
 * @param upperWhisker - values strictly above are high outliers.
 * @returns the non-outlier index range.
 */
function getWhiskerBounds(sorted, lowerWhisker, upperWhisker) {
  let lowIndex = 0;
  while (lowIndex < sorted.length && sorted[lowIndex] < lowerWhisker) {
    lowIndex++;
  }
  let highIndex = sorted.length;
  while (highIndex > lowIndex && sorted[highIndex - 1] > upperWhisker) {
    highIndex--;
  }
  return {
    lowIndex,
    highIndex
  };
}

/**
 * Calculates the correlation between 2 vectors
 * https://en.wikipedia.org/wiki/Correlation_and_dependence
 * @param A - first array
 * @param B - sencond array
 */
function xCorrelation(A, B) {
  const n = A.length;
  let sumA = 0;
  let sumA2 = 0;
  let sumB = 0;
  let sumB2 = 0;
  let sumAB = 0;
  for (let i = 0; i < n; i++) {
    const a = A[i];
    const b = B[i];
    sumA += a;
    sumA2 += a ** 2;
    sumB += b;
    sumB2 += b ** 2;
    sumAB += a * b;
  }
  return (n * sumAB - sumA * sumB) / (Math.sqrt(n * sumA2 - sumA ** 2) * Math.sqrt(n * sumB2 - sumB ** 2));
}

var matrix$1 = {};

Object.defineProperty(matrix$1, '__esModule', {
  value: true
});

// eslint-disable-next-line @typescript-eslint/unbound-method
const toString$1 = Object.prototype.toString;
/**
 * Checks if an object is an instance of an Array (array or typed array, except those that contain bigint values).
 * @param value - Object to check.
 * @returns True if the object is an array or a typed array.
 */
function isAnyArray$1(value) {
  const tag = toString$1.call(value);
  return tag.endsWith('Array]') && !tag.includes('Big');
}

/**
 * Computes the maximum of the given values.
 *
 * @param input
 * @param options
 */
function max(input, options = {}) {
  if (!isAnyArray$1(input)) {
    throw new TypeError('input must be an array');
  }
  if (input.length === 0) {
    throw new TypeError('input must not be empty');
  }
  const {
    fromIndex = 0,
    toIndex = input.length
  } = options;
  if (fromIndex < 0 || fromIndex >= input.length || !Number.isInteger(fromIndex)) {
    throw new Error('fromIndex must be a positive integer smaller than length');
  }
  if (toIndex <= fromIndex || toIndex > input.length || !Number.isInteger(toIndex)) {
    throw new Error('toIndex must be an integer greater than fromIndex and at most equal to length');
  }
  let maxValue = input[fromIndex];
  for (let i = fromIndex + 1; i < toIndex; i++) {
    if (input[i] > maxValue) maxValue = input[i];
  }
  return maxValue;
}

/**
 * Computes the minimum of the given values.
 */
function min(input, options = {}) {
  if (!isAnyArray$1(input)) {
    throw new TypeError('input must be an array');
  }
  if (input.length === 0) {
    throw new TypeError('input must not be empty');
  }
  const {
    fromIndex = 0,
    toIndex = input.length
  } = options;
  if (fromIndex < 0 || fromIndex >= input.length || !Number.isInteger(fromIndex)) {
    throw new Error('fromIndex must be a positive integer smaller than length');
  }
  if (toIndex <= fromIndex || toIndex > input.length || !Number.isInteger(toIndex)) {
    throw new Error('toIndex must be an integer greater than fromIndex and at most equal to length');
  }
  let minValue = input[fromIndex];
  for (let i = fromIndex + 1; i < toIndex; i++) {
    if (input[i] < minValue) minValue = input[i];
  }
  return minValue;
}

/**
 * Rescale an array into a range.
 */
function rescale(input, options = {}) {
  if (!isAnyArray$1(input)) {
    throw new TypeError('input must be an array');
  } else if (input.length === 0) {
    throw new TypeError('input must not be empty');
  }
  let output;
  if (options.output !== undefined) {
    if (!isAnyArray$1(options.output)) {
      throw new TypeError('output option must be an array if specified');
    }
    output = options.output;
  } else {
    output = new Array(input.length);
  }
  const currentMin = min(input);
  const currentMax = max(input);
  if (currentMin === currentMax) {
    throw new RangeError('minimum and maximum input values are equal. Cannot rescale a constant array');
  }
  const {
    min: minValue = options.autoMinMax ? currentMin : 0,
    max: maxValue = options.autoMinMax ? currentMax : 1
  } = options;
  if (minValue >= maxValue) {
    throw new RangeError('min option must be smaller than max option');
  }
  const factor = (maxValue - minValue) / (currentMax - currentMin);
  for (let i = 0; i < input.length; i++) {
    output[i] = (input[i] - currentMin) * factor + minValue;
  }
  return output;
}
const indent = ' '.repeat(2);
const indentData = ' '.repeat(4);

/**
 * @this {Matrix}
 * @returns {string}
 */
function inspectMatrix() {
  return inspectMatrixWithOptions(this);
}
function inspectMatrixWithOptions(matrix, options = {}) {
  const {
    maxRows = 15,
    maxColumns = 10,
    maxNumSize = 8,
    padMinus = 'auto'
  } = options;
  return `${matrix.constructor.name} {
${indent}[
${indentData}${inspectData(matrix, maxRows, maxColumns, maxNumSize, padMinus)}
${indent}]
${indent}rows: ${matrix.rows}
${indent}columns: ${matrix.columns}
}`;
}
function inspectData(matrix, maxRows, maxColumns, maxNumSize, padMinus) {
  const {
    rows,
    columns
  } = matrix;
  const maxI = Math.min(rows, maxRows);
  const maxJ = Math.min(columns, maxColumns);
  const result = [];
  if (padMinus === 'auto') {
    padMinus = false;
    loop: for (let i = 0; i < maxI; i++) {
      for (let j = 0; j < maxJ; j++) {
        if (matrix.get(i, j) < 0) {
          padMinus = true;
          break loop;
        }
      }
    }
  }
  for (let i = 0; i < maxI; i++) {
    let line = [];
    for (let j = 0; j < maxJ; j++) {
      line.push(formatNumber(matrix.get(i, j), maxNumSize, padMinus));
    }
    result.push(`${line.join(' ')}`);
  }
  if (maxJ !== columns) {
    result[result.length - 1] += ` ... ${columns - maxColumns} more columns`;
  }
  if (maxI !== rows) {
    result.push(`... ${rows - maxRows} more rows`);
  }
  return result.join(`\n${indentData}`);
}
function formatNumber(num, maxNumSize, padMinus) {
  return (num >= 0 && padMinus ? ` ${formatNumber2(num, maxNumSize - 1)}` : formatNumber2(num, maxNumSize)).padEnd(maxNumSize);
}
function formatNumber2(num, len) {
  // small.length numbers should be as is
  let str = num.toString();
  if (str.length <= len) return str;

  // (7)'0.00123' is better then (7)'1.23e-2'
  // (8)'0.000123' is worse then (7)'1.23e-3',
  let fix = num.toFixed(len);
  if (fix.length > len) {
    fix = num.toFixed(Math.max(0, len - (fix.length - len)));
  }
  if (fix.length <= len && !fix.startsWith('0.000') && !fix.startsWith('-0.000')) {
    return fix;
  }

  // well, if it's still too long the user should've used longer numbers
  let exp = num.toExponential(len);
  if (exp.length > len) {
    exp = num.toExponential(Math.max(0, len - (exp.length - len)));
  }
  return exp.slice(0);
}
function installMathOperations(AbstractMatrix, Matrix) {
  AbstractMatrix.prototype.add = function add(value) {
    if (typeof value === 'number') return this.addS(value);
    return this.addM(value);
  };
  AbstractMatrix.prototype.addS = function addS(value) {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) + value);
      }
    }
    return this;
  };
  AbstractMatrix.prototype.addM = function addM(matrix) {
    matrix = Matrix.checkMatrix(matrix);
    if (this.rows !== matrix.rows || this.columns !== matrix.columns) {
      throw new RangeError('Matrices dimensions must be equal');
    }
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) + matrix.get(i, j));
      }
    }
    return this;
  };
  AbstractMatrix.add = function add(matrix, value) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.add(value);
  };
  AbstractMatrix.prototype.sub = function sub(value) {
    if (typeof value === 'number') return this.subS(value);
    return this.subM(value);
  };
  AbstractMatrix.prototype.subS = function subS(value) {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) - value);
      }
    }
    return this;
  };
  AbstractMatrix.prototype.subM = function subM(matrix) {
    matrix = Matrix.checkMatrix(matrix);
    if (this.rows !== matrix.rows || this.columns !== matrix.columns) {
      throw new RangeError('Matrices dimensions must be equal');
    }
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) - matrix.get(i, j));
      }
    }
    return this;
  };
  AbstractMatrix.sub = function sub(matrix, value) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.sub(value);
  };
  AbstractMatrix.prototype.subtract = AbstractMatrix.prototype.sub;
  AbstractMatrix.prototype.subtractS = AbstractMatrix.prototype.subS;
  AbstractMatrix.prototype.subtractM = AbstractMatrix.prototype.subM;
  AbstractMatrix.subtract = AbstractMatrix.sub;
  AbstractMatrix.prototype.mul = function mul(value) {
    if (typeof value === 'number') return this.mulS(value);
    return this.mulM(value);
  };
  AbstractMatrix.prototype.mulS = function mulS(value) {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) * value);
      }
    }
    return this;
  };
  AbstractMatrix.prototype.mulM = function mulM(matrix) {
    matrix = Matrix.checkMatrix(matrix);
    if (this.rows !== matrix.rows || this.columns !== matrix.columns) {
      throw new RangeError('Matrices dimensions must be equal');
    }
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) * matrix.get(i, j));
      }
    }
    return this;
  };
  AbstractMatrix.mul = function mul(matrix, value) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.mul(value);
  };
  AbstractMatrix.prototype.multiply = AbstractMatrix.prototype.mul;
  AbstractMatrix.prototype.multiplyS = AbstractMatrix.prototype.mulS;
  AbstractMatrix.prototype.multiplyM = AbstractMatrix.prototype.mulM;
  AbstractMatrix.multiply = AbstractMatrix.mul;
  AbstractMatrix.prototype.div = function div(value) {
    if (typeof value === 'number') return this.divS(value);
    return this.divM(value);
  };
  AbstractMatrix.prototype.divS = function divS(value) {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) / value);
      }
    }
    return this;
  };
  AbstractMatrix.prototype.divM = function divM(matrix) {
    matrix = Matrix.checkMatrix(matrix);
    if (this.rows !== matrix.rows || this.columns !== matrix.columns) {
      throw new RangeError('Matrices dimensions must be equal');
    }
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) / matrix.get(i, j));
      }
    }
    return this;
  };
  AbstractMatrix.div = function div(matrix, value) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.div(value);
  };
  AbstractMatrix.prototype.divide = AbstractMatrix.prototype.div;
  AbstractMatrix.prototype.divideS = AbstractMatrix.prototype.divS;
  AbstractMatrix.prototype.divideM = AbstractMatrix.prototype.divM;
  AbstractMatrix.divide = AbstractMatrix.div;
  AbstractMatrix.prototype.mod = function mod(value) {
    if (typeof value === 'number') return this.modS(value);
    return this.modM(value);
  };
  AbstractMatrix.prototype.modS = function modS(value) {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) % value);
      }
    }
    return this;
  };
  AbstractMatrix.prototype.modM = function modM(matrix) {
    matrix = Matrix.checkMatrix(matrix);
    if (this.rows !== matrix.rows || this.columns !== matrix.columns) {
      throw new RangeError('Matrices dimensions must be equal');
    }
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) % matrix.get(i, j));
      }
    }
    return this;
  };
  AbstractMatrix.mod = function mod(matrix, value) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.mod(value);
  };
  AbstractMatrix.prototype.modulus = AbstractMatrix.prototype.mod;
  AbstractMatrix.prototype.modulusS = AbstractMatrix.prototype.modS;
  AbstractMatrix.prototype.modulusM = AbstractMatrix.prototype.modM;
  AbstractMatrix.modulus = AbstractMatrix.mod;
  AbstractMatrix.prototype.and = function and(value) {
    if (typeof value === 'number') return this.andS(value);
    return this.andM(value);
  };
  AbstractMatrix.prototype.andS = function andS(value) {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) & value);
      }
    }
    return this;
  };
  AbstractMatrix.prototype.andM = function andM(matrix) {
    matrix = Matrix.checkMatrix(matrix);
    if (this.rows !== matrix.rows || this.columns !== matrix.columns) {
      throw new RangeError('Matrices dimensions must be equal');
    }
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) & matrix.get(i, j));
      }
    }
    return this;
  };
  AbstractMatrix.and = function and(matrix, value) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.and(value);
  };
  AbstractMatrix.prototype.or = function or(value) {
    if (typeof value === 'number') return this.orS(value);
    return this.orM(value);
  };
  AbstractMatrix.prototype.orS = function orS(value) {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) | value);
      }
    }
    return this;
  };
  AbstractMatrix.prototype.orM = function orM(matrix) {
    matrix = Matrix.checkMatrix(matrix);
    if (this.rows !== matrix.rows || this.columns !== matrix.columns) {
      throw new RangeError('Matrices dimensions must be equal');
    }
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) | matrix.get(i, j));
      }
    }
    return this;
  };
  AbstractMatrix.or = function or(matrix, value) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.or(value);
  };
  AbstractMatrix.prototype.xor = function xor(value) {
    if (typeof value === 'number') return this.xorS(value);
    return this.xorM(value);
  };
  AbstractMatrix.prototype.xorS = function xorS(value) {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) ^ value);
      }
    }
    return this;
  };
  AbstractMatrix.prototype.xorM = function xorM(matrix) {
    matrix = Matrix.checkMatrix(matrix);
    if (this.rows !== matrix.rows || this.columns !== matrix.columns) {
      throw new RangeError('Matrices dimensions must be equal');
    }
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) ^ matrix.get(i, j));
      }
    }
    return this;
  };
  AbstractMatrix.xor = function xor(matrix, value) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.xor(value);
  };
  AbstractMatrix.prototype.leftShift = function leftShift(value) {
    if (typeof value === 'number') return this.leftShiftS(value);
    return this.leftShiftM(value);
  };
  AbstractMatrix.prototype.leftShiftS = function leftShiftS(value) {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) << value);
      }
    }
    return this;
  };
  AbstractMatrix.prototype.leftShiftM = function leftShiftM(matrix) {
    matrix = Matrix.checkMatrix(matrix);
    if (this.rows !== matrix.rows || this.columns !== matrix.columns) {
      throw new RangeError('Matrices dimensions must be equal');
    }
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) << matrix.get(i, j));
      }
    }
    return this;
  };
  AbstractMatrix.leftShift = function leftShift(matrix, value) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.leftShift(value);
  };
  AbstractMatrix.prototype.signPropagatingRightShift = function signPropagatingRightShift(value) {
    if (typeof value === 'number') return this.signPropagatingRightShiftS(value);
    return this.signPropagatingRightShiftM(value);
  };
  AbstractMatrix.prototype.signPropagatingRightShiftS = function signPropagatingRightShiftS(value) {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) >> value);
      }
    }
    return this;
  };
  AbstractMatrix.prototype.signPropagatingRightShiftM = function signPropagatingRightShiftM(matrix) {
    matrix = Matrix.checkMatrix(matrix);
    if (this.rows !== matrix.rows || this.columns !== matrix.columns) {
      throw new RangeError('Matrices dimensions must be equal');
    }
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) >> matrix.get(i, j));
      }
    }
    return this;
  };
  AbstractMatrix.signPropagatingRightShift = function signPropagatingRightShift(matrix, value) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.signPropagatingRightShift(value);
  };
  AbstractMatrix.prototype.rightShift = function rightShift(value) {
    if (typeof value === 'number') return this.rightShiftS(value);
    return this.rightShiftM(value);
  };
  AbstractMatrix.prototype.rightShiftS = function rightShiftS(value) {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) >>> value);
      }
    }
    return this;
  };
  AbstractMatrix.prototype.rightShiftM = function rightShiftM(matrix) {
    matrix = Matrix.checkMatrix(matrix);
    if (this.rows !== matrix.rows || this.columns !== matrix.columns) {
      throw new RangeError('Matrices dimensions must be equal');
    }
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) >>> matrix.get(i, j));
      }
    }
    return this;
  };
  AbstractMatrix.rightShift = function rightShift(matrix, value) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.rightShift(value);
  };
  AbstractMatrix.prototype.zeroFillRightShift = AbstractMatrix.prototype.rightShift;
  AbstractMatrix.prototype.zeroFillRightShiftS = AbstractMatrix.prototype.rightShiftS;
  AbstractMatrix.prototype.zeroFillRightShiftM = AbstractMatrix.prototype.rightShiftM;
  AbstractMatrix.zeroFillRightShift = AbstractMatrix.rightShift;
  AbstractMatrix.prototype.not = function not() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, ~this.get(i, j));
      }
    }
    return this;
  };
  AbstractMatrix.not = function not(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.not();
  };
  AbstractMatrix.prototype.abs = function abs() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.abs(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.abs = function abs(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.abs();
  };
  AbstractMatrix.prototype.acos = function acos() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.acos(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.acos = function acos(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.acos();
  };
  AbstractMatrix.prototype.acosh = function acosh() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.acosh(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.acosh = function acosh(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.acosh();
  };
  AbstractMatrix.prototype.asin = function asin() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.asin(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.asin = function asin(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.asin();
  };
  AbstractMatrix.prototype.asinh = function asinh() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.asinh(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.asinh = function asinh(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.asinh();
  };
  AbstractMatrix.prototype.atan = function atan() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.atan(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.atan = function atan(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.atan();
  };
  AbstractMatrix.prototype.atanh = function atanh() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.atanh(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.atanh = function atanh(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.atanh();
  };
  AbstractMatrix.prototype.cbrt = function cbrt() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.cbrt(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.cbrt = function cbrt(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.cbrt();
  };
  AbstractMatrix.prototype.ceil = function ceil() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.ceil(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.ceil = function ceil(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.ceil();
  };
  AbstractMatrix.prototype.clz32 = function clz32() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.clz32(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.clz32 = function clz32(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.clz32();
  };
  AbstractMatrix.prototype.cos = function cos() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.cos(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.cos = function cos(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.cos();
  };
  AbstractMatrix.prototype.cosh = function cosh() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.cosh(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.cosh = function cosh(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.cosh();
  };
  AbstractMatrix.prototype.exp = function exp() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.exp(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.exp = function exp(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.exp();
  };
  AbstractMatrix.prototype.expm1 = function expm1() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.expm1(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.expm1 = function expm1(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.expm1();
  };
  AbstractMatrix.prototype.floor = function floor() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.floor(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.floor = function floor(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.floor();
  };
  AbstractMatrix.prototype.fround = function fround() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.fround(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.fround = function fround(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.fround();
  };
  AbstractMatrix.prototype.log = function log() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.log(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.log = function log(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.log();
  };
  AbstractMatrix.prototype.log1p = function log1p() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.log1p(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.log1p = function log1p(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.log1p();
  };
  AbstractMatrix.prototype.log10 = function log10() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.log10(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.log10 = function log10(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.log10();
  };
  AbstractMatrix.prototype.log2 = function log2() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.log2(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.log2 = function log2(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.log2();
  };
  AbstractMatrix.prototype.round = function round() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.round(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.round = function round(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.round();
  };
  AbstractMatrix.prototype.sign = function sign() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.sign(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.sign = function sign(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.sign();
  };
  AbstractMatrix.prototype.sin = function sin() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.sin(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.sin = function sin(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.sin();
  };
  AbstractMatrix.prototype.sinh = function sinh() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.sinh(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.sinh = function sinh(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.sinh();
  };
  AbstractMatrix.prototype.sqrt = function sqrt() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.sqrt(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.sqrt = function sqrt(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.sqrt();
  };
  AbstractMatrix.prototype.tan = function tan() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.tan(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.tan = function tan(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.tan();
  };
  AbstractMatrix.prototype.tanh = function tanh() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.tanh(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.tanh = function tanh(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.tanh();
  };
  AbstractMatrix.prototype.trunc = function trunc() {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, Math.trunc(this.get(i, j)));
      }
    }
    return this;
  };
  AbstractMatrix.trunc = function trunc(matrix) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.trunc();
  };
  AbstractMatrix.pow = function pow(matrix, arg0) {
    const newMatrix = new Matrix(matrix);
    return newMatrix.pow(arg0);
  };
  AbstractMatrix.prototype.pow = function pow(value) {
    if (typeof value === 'number') return this.powS(value);
    return this.powM(value);
  };
  AbstractMatrix.prototype.powS = function powS(value) {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) ** value);
      }
    }
    return this;
  };
  AbstractMatrix.prototype.powM = function powM(matrix) {
    matrix = Matrix.checkMatrix(matrix);
    if (this.rows !== matrix.rows || this.columns !== matrix.columns) {
      throw new RangeError('Matrices dimensions must be equal');
    }
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) ** matrix.get(i, j));
      }
    }
    return this;
  };
}

/**
 * @private
 * Check that a row index is not out of bounds
 * @param {Matrix} matrix
 * @param {number} index
 * @param {boolean} [outer]
 */
function checkRowIndex(matrix, index, outer) {
  let max = outer ? matrix.rows : matrix.rows - 1;
  if (index < 0 || index > max) {
    throw new RangeError('Row index out of range');
  }
}

/**
 * @private
 * Check that a column index is not out of bounds
 * @param {Matrix} matrix
 * @param {number} index
 * @param {boolean} [outer]
 */
function checkColumnIndex(matrix, index, outer) {
  let max = outer ? matrix.columns : matrix.columns - 1;
  if (index < 0 || index > max) {
    throw new RangeError('Column index out of range');
  }
}

/**
 * @private
 * Check that the provided vector is an array with the right length
 * @param {Matrix} matrix
 * @param {Array|Matrix} vector
 * @return {Array}
 * @throws {RangeError}
 */
function checkRowVector(matrix, vector) {
  if (vector.to1DArray) {
    vector = vector.to1DArray();
  }
  if (vector.length !== matrix.columns) {
    throw new RangeError('vector size must be the same as the number of columns');
  }
  return vector;
}

/**
 * @private
 * Check that the provided vector is an array with the right length
 * @param {Matrix} matrix
 * @param {Array|Matrix} vector
 * @return {Array}
 * @throws {RangeError}
 */
function checkColumnVector(matrix, vector) {
  if (vector.to1DArray) {
    vector = vector.to1DArray();
  }
  if (vector.length !== matrix.rows) {
    throw new RangeError('vector size must be the same as the number of rows');
  }
  return vector;
}
function checkRowIndices(matrix, rowIndices) {
  if (!isAnyArray$1(rowIndices)) {
    throw new TypeError('row indices must be an array');
  }
  for (let i = 0; i < rowIndices.length; i++) {
    if (rowIndices[i] < 0 || rowIndices[i] >= matrix.rows) {
      throw new RangeError('row indices are out of range');
    }
  }
}
function checkColumnIndices(matrix, columnIndices) {
  if (!isAnyArray$1(columnIndices)) {
    throw new TypeError('column indices must be an array');
  }
  for (let i = 0; i < columnIndices.length; i++) {
    if (columnIndices[i] < 0 || columnIndices[i] >= matrix.columns) {
      throw new RangeError('column indices are out of range');
    }
  }
}
function checkRange$1(matrix, startRow, endRow, startColumn, endColumn) {
  if (arguments.length !== 5) {
    throw new RangeError('expected 4 arguments');
  }
  checkNumber('startRow', startRow);
  checkNumber('endRow', endRow);
  checkNumber('startColumn', startColumn);
  checkNumber('endColumn', endColumn);
  if (startRow > endRow || startColumn > endColumn || startRow < 0 || startRow >= matrix.rows || endRow < 0 || endRow >= matrix.rows || startColumn < 0 || startColumn >= matrix.columns || endColumn < 0 || endColumn >= matrix.columns) {
    throw new RangeError('Submatrix indices are out of range');
  }
}
function newArray(length, value = 0) {
  let array = [];
  for (let i = 0; i < length; i++) {
    array.push(value);
  }
  return array;
}
function checkNumber(name, value) {
  if (typeof value !== 'number') {
    throw new TypeError(`${name} must be a number`);
  }
}
function checkNonEmpty(matrix) {
  if (matrix.isEmpty()) {
    throw new Error('Empty matrix has no elements to index');
  }
}
function sumByRow(matrix) {
  let sum = newArray(matrix.rows);
  for (let i = 0; i < matrix.rows; ++i) {
    for (let j = 0; j < matrix.columns; ++j) {
      sum[i] += matrix.get(i, j);
    }
  }
  return sum;
}
function sumByColumn(matrix) {
  let sum = newArray(matrix.columns);
  for (let i = 0; i < matrix.rows; ++i) {
    for (let j = 0; j < matrix.columns; ++j) {
      sum[j] += matrix.get(i, j);
    }
  }
  return sum;
}
function sumAll(matrix) {
  let v = 0;
  for (let i = 0; i < matrix.rows; i++) {
    for (let j = 0; j < matrix.columns; j++) {
      v += matrix.get(i, j);
    }
  }
  return v;
}
function productByRow(matrix) {
  let sum = newArray(matrix.rows, 1);
  for (let i = 0; i < matrix.rows; ++i) {
    for (let j = 0; j < matrix.columns; ++j) {
      sum[i] *= matrix.get(i, j);
    }
  }
  return sum;
}
function productByColumn(matrix) {
  let sum = newArray(matrix.columns, 1);
  for (let i = 0; i < matrix.rows; ++i) {
    for (let j = 0; j < matrix.columns; ++j) {
      sum[j] *= matrix.get(i, j);
    }
  }
  return sum;
}
function productAll(matrix) {
  let v = 1;
  for (let i = 0; i < matrix.rows; i++) {
    for (let j = 0; j < matrix.columns; j++) {
      v *= matrix.get(i, j);
    }
  }
  return v;
}
function varianceByRow(matrix, unbiased, mean) {
  const rows = matrix.rows;
  const cols = matrix.columns;
  const variance = [];
  for (let i = 0; i < rows; i++) {
    let sum1 = 0;
    let sum2 = 0;
    let x = 0;
    for (let j = 0; j < cols; j++) {
      x = matrix.get(i, j) - mean[i];
      sum1 += x;
      sum2 += x * x;
    }
    if (unbiased) {
      variance.push((sum2 - sum1 * sum1 / cols) / (cols - 1));
    } else {
      variance.push((sum2 - sum1 * sum1 / cols) / cols);
    }
  }
  return variance;
}
function varianceByColumn(matrix, unbiased, mean) {
  const rows = matrix.rows;
  const cols = matrix.columns;
  const variance = [];
  for (let j = 0; j < cols; j++) {
    let sum1 = 0;
    let sum2 = 0;
    let x = 0;
    for (let i = 0; i < rows; i++) {
      x = matrix.get(i, j) - mean[j];
      sum1 += x;
      sum2 += x * x;
    }
    if (unbiased) {
      variance.push((sum2 - sum1 * sum1 / rows) / (rows - 1));
    } else {
      variance.push((sum2 - sum1 * sum1 / rows) / rows);
    }
  }
  return variance;
}
function varianceAll(matrix, unbiased, mean) {
  const rows = matrix.rows;
  const cols = matrix.columns;
  const size = rows * cols;
  let sum1 = 0;
  let sum2 = 0;
  let x = 0;
  for (let i = 0; i < rows; i++) {
    for (let j = 0; j < cols; j++) {
      x = matrix.get(i, j) - mean;
      sum1 += x;
      sum2 += x * x;
    }
  }
  if (unbiased) {
    return (sum2 - sum1 * sum1 / size) / (size - 1);
  } else {
    return (sum2 - sum1 * sum1 / size) / size;
  }
}
function centerByRow(matrix, mean) {
  for (let i = 0; i < matrix.rows; i++) {
    for (let j = 0; j < matrix.columns; j++) {
      matrix.set(i, j, matrix.get(i, j) - mean[i]);
    }
  }
}
function centerByColumn(matrix, mean) {
  for (let i = 0; i < matrix.rows; i++) {
    for (let j = 0; j < matrix.columns; j++) {
      matrix.set(i, j, matrix.get(i, j) - mean[j]);
    }
  }
}
function centerAll(matrix, mean) {
  for (let i = 0; i < matrix.rows; i++) {
    for (let j = 0; j < matrix.columns; j++) {
      matrix.set(i, j, matrix.get(i, j) - mean);
    }
  }
}
function getScaleByRow(matrix) {
  const scale = [];
  for (let i = 0; i < matrix.rows; i++) {
    let sum = 0;
    for (let j = 0; j < matrix.columns; j++) {
      sum += matrix.get(i, j) ** 2 / (matrix.columns - 1);
    }
    scale.push(Math.sqrt(sum));
  }
  return scale;
}
function scaleByRow(matrix, scale) {
  for (let i = 0; i < matrix.rows; i++) {
    for (let j = 0; j < matrix.columns; j++) {
      matrix.set(i, j, matrix.get(i, j) / scale[i]);
    }
  }
}
function getScaleByColumn(matrix) {
  const scale = [];
  for (let j = 0; j < matrix.columns; j++) {
    let sum = 0;
    for (let i = 0; i < matrix.rows; i++) {
      sum += matrix.get(i, j) ** 2 / (matrix.rows - 1);
    }
    scale.push(Math.sqrt(sum));
  }
  return scale;
}
function scaleByColumn(matrix, scale) {
  for (let i = 0; i < matrix.rows; i++) {
    for (let j = 0; j < matrix.columns; j++) {
      matrix.set(i, j, matrix.get(i, j) / scale[j]);
    }
  }
}
function getScaleAll(matrix) {
  const divider = matrix.size - 1;
  let sum = 0;
  for (let j = 0; j < matrix.columns; j++) {
    for (let i = 0; i < matrix.rows; i++) {
      sum += matrix.get(i, j) ** 2 / divider;
    }
  }
  return Math.sqrt(sum);
}
function scaleAll(matrix, scale) {
  for (let i = 0; i < matrix.rows; i++) {
    for (let j = 0; j < matrix.columns; j++) {
      matrix.set(i, j, matrix.get(i, j) / scale);
    }
  }
}
class AbstractMatrix {
  static from1DArray(newRows, newColumns, newData) {
    let length = newRows * newColumns;
    if (length !== newData.length) {
      throw new RangeError('data length does not match given dimensions');
    }
    let newMatrix = new Matrix$2(newRows, newColumns);
    for (let row = 0; row < newRows; row++) {
      for (let column = 0; column < newColumns; column++) {
        newMatrix.set(row, column, newData[row * newColumns + column]);
      }
    }
    return newMatrix;
  }
  static rowVector(newData) {
    let vector = new Matrix$2(1, newData.length);
    for (let i = 0; i < newData.length; i++) {
      vector.set(0, i, newData[i]);
    }
    return vector;
  }
  static columnVector(newData) {
    let vector = new Matrix$2(newData.length, 1);
    for (let i = 0; i < newData.length; i++) {
      vector.set(i, 0, newData[i]);
    }
    return vector;
  }
  static zeros(rows, columns) {
    return new Matrix$2(rows, columns);
  }
  static ones(rows, columns) {
    return new Matrix$2(rows, columns).fill(1);
  }
  static rand(rows, columns, options = {}) {
    if (typeof options !== 'object') {
      throw new TypeError('options must be an object');
    }
    const {
      random = Math.random
    } = options;
    let matrix = new Matrix$2(rows, columns);
    for (let i = 0; i < rows; i++) {
      for (let j = 0; j < columns; j++) {
        matrix.set(i, j, random());
      }
    }
    return matrix;
  }
  static randInt(rows, columns, options = {}) {
    if (typeof options !== 'object') {
      throw new TypeError('options must be an object');
    }
    const {
      min = 0,
      max = 1000,
      random = Math.random
    } = options;
    if (!Number.isInteger(min)) throw new TypeError('min must be an integer');
    if (!Number.isInteger(max)) throw new TypeError('max must be an integer');
    if (min >= max) throw new RangeError('min must be smaller than max');
    let interval = max - min;
    let matrix = new Matrix$2(rows, columns);
    for (let i = 0; i < rows; i++) {
      for (let j = 0; j < columns; j++) {
        let value = min + Math.round(random() * interval);
        matrix.set(i, j, value);
      }
    }
    return matrix;
  }
  static eye(rows, columns, value) {
    if (columns === undefined) columns = rows;
    if (value === undefined) value = 1;
    let min = Math.min(rows, columns);
    let matrix = this.zeros(rows, columns);
    for (let i = 0; i < min; i++) {
      matrix.set(i, i, value);
    }
    return matrix;
  }
  static diag(data, rows, columns) {
    let l = data.length;
    if (rows === undefined) rows = l;
    if (columns === undefined) columns = rows;
    let min = Math.min(l, rows, columns);
    let matrix = this.zeros(rows, columns);
    for (let i = 0; i < min; i++) {
      matrix.set(i, i, data[i]);
    }
    return matrix;
  }
  static min(matrix1, matrix2) {
    matrix1 = this.checkMatrix(matrix1);
    matrix2 = this.checkMatrix(matrix2);
    let rows = matrix1.rows;
    let columns = matrix1.columns;
    let result = new Matrix$2(rows, columns);
    for (let i = 0; i < rows; i++) {
      for (let j = 0; j < columns; j++) {
        result.set(i, j, Math.min(matrix1.get(i, j), matrix2.get(i, j)));
      }
    }
    return result;
  }
  static max(matrix1, matrix2) {
    matrix1 = this.checkMatrix(matrix1);
    matrix2 = this.checkMatrix(matrix2);
    let rows = matrix1.rows;
    let columns = matrix1.columns;
    let result = new this(rows, columns);
    for (let i = 0; i < rows; i++) {
      for (let j = 0; j < columns; j++) {
        result.set(i, j, Math.max(matrix1.get(i, j), matrix2.get(i, j)));
      }
    }
    return result;
  }
  static checkMatrix(value) {
    return AbstractMatrix.isMatrix(value) ? value : new Matrix$2(value);
  }
  static isMatrix(value) {
    return value != null && value.klass === 'Matrix';
  }
  get size() {
    return this.rows * this.columns;
  }
  apply(callback) {
    if (typeof callback !== 'function') {
      throw new TypeError('callback must be a function');
    }
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        callback.call(this, i, j);
      }
    }
    return this;
  }
  to1DArray() {
    let array = [];
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        array.push(this.get(i, j));
      }
    }
    return array;
  }
  to2DArray() {
    let copy = [];
    for (let i = 0; i < this.rows; i++) {
      copy.push([]);
      for (let j = 0; j < this.columns; j++) {
        copy[i].push(this.get(i, j));
      }
    }
    return copy;
  }
  toJSON() {
    return this.to2DArray();
  }
  isRowVector() {
    return this.rows === 1;
  }
  isColumnVector() {
    return this.columns === 1;
  }
  isVector() {
    return this.rows === 1 || this.columns === 1;
  }
  isSquare() {
    return this.rows === this.columns;
  }
  isEmpty() {
    return this.rows === 0 || this.columns === 0;
  }
  isSymmetric() {
    if (this.isSquare()) {
      for (let i = 0; i < this.rows; i++) {
        for (let j = 0; j <= i; j++) {
          if (this.get(i, j) !== this.get(j, i)) {
            return false;
          }
        }
      }
      return true;
    }
    return false;
  }
  isDistance() {
    if (!this.isSymmetric()) return false;
    for (let i = 0; i < this.rows; i++) {
      if (this.get(i, i) !== 0) return false;
    }
    return true;
  }
  isEchelonForm() {
    let i = 0;
    let j = 0;
    let previousColumn = -1;
    let isEchelonForm = true;
    let checked = false;
    while (i < this.rows && isEchelonForm) {
      j = 0;
      checked = false;
      while (j < this.columns && checked === false) {
        if (this.get(i, j) === 0) {
          j++;
        } else if (this.get(i, j) === 1 && j > previousColumn) {
          checked = true;
          previousColumn = j;
        } else {
          isEchelonForm = false;
          checked = true;
        }
      }
      i++;
    }
    return isEchelonForm;
  }
  isReducedEchelonForm() {
    let i = 0;
    let j = 0;
    let previousColumn = -1;
    let isReducedEchelonForm = true;
    let checked = false;
    while (i < this.rows && isReducedEchelonForm) {
      j = 0;
      checked = false;
      while (j < this.columns && checked === false) {
        if (this.get(i, j) === 0) {
          j++;
        } else if (this.get(i, j) === 1 && j > previousColumn) {
          checked = true;
          previousColumn = j;
        } else {
          isReducedEchelonForm = false;
          checked = true;
        }
      }
      for (let k = j + 1; k < this.rows; k++) {
        if (this.get(i, k) !== 0) {
          isReducedEchelonForm = false;
        }
      }
      i++;
    }
    return isReducedEchelonForm;
  }
  echelonForm() {
    let result = this.clone();
    let h = 0;
    let k = 0;
    while (h < result.rows && k < result.columns) {
      let iMax = h;
      for (let i = h; i < result.rows; i++) {
        if (result.get(i, k) > result.get(iMax, k)) {
          iMax = i;
        }
      }
      if (result.get(iMax, k) === 0) {
        k++;
      } else {
        result.swapRows(h, iMax);
        let tmp = result.get(h, k);
        for (let j = k; j < result.columns; j++) {
          result.set(h, j, result.get(h, j) / tmp);
        }
        for (let i = h + 1; i < result.rows; i++) {
          let factor = result.get(i, k) / result.get(h, k);
          result.set(i, k, 0);
          for (let j = k + 1; j < result.columns; j++) {
            result.set(i, j, result.get(i, j) - result.get(h, j) * factor);
          }
        }
        h++;
        k++;
      }
    }
    return result;
  }
  reducedEchelonForm() {
    let result = this.echelonForm();
    let m = result.columns;
    let n = result.rows;
    let h = n - 1;
    while (h >= 0) {
      if (result.maxRow(h) === 0) {
        h--;
      } else {
        let p = 0;
        let pivot = false;
        while (p < n && pivot === false) {
          if (result.get(h, p) === 1) {
            pivot = true;
          } else {
            p++;
          }
        }
        for (let i = 0; i < h; i++) {
          let factor = result.get(i, p);
          for (let j = p; j < m; j++) {
            let tmp = result.get(i, j) - factor * result.get(h, j);
            result.set(i, j, tmp);
          }
        }
        h--;
      }
    }
    return result;
  }
  set() {
    throw new Error('set method is unimplemented');
  }
  get() {
    throw new Error('get method is unimplemented');
  }
  repeat(options = {}) {
    if (typeof options !== 'object') {
      throw new TypeError('options must be an object');
    }
    const {
      rows = 1,
      columns = 1
    } = options;
    if (!Number.isInteger(rows) || rows <= 0) {
      throw new TypeError('rows must be a positive integer');
    }
    if (!Number.isInteger(columns) || columns <= 0) {
      throw new TypeError('columns must be a positive integer');
    }
    let matrix = new Matrix$2(this.rows * rows, this.columns * columns);
    for (let i = 0; i < rows; i++) {
      for (let j = 0; j < columns; j++) {
        matrix.setSubMatrix(this, this.rows * i, this.columns * j);
      }
    }
    return matrix;
  }
  fill(value) {
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, value);
      }
    }
    return this;
  }
  neg() {
    return this.mulS(-1);
  }
  getRow(index) {
    checkRowIndex(this, index);
    let row = [];
    for (let i = 0; i < this.columns; i++) {
      row.push(this.get(index, i));
    }
    return row;
  }
  getRowVector(index) {
    return Matrix$2.rowVector(this.getRow(index));
  }
  setRow(index, array) {
    checkRowIndex(this, index);
    array = checkRowVector(this, array);
    for (let i = 0; i < this.columns; i++) {
      this.set(index, i, array[i]);
    }
    return this;
  }
  swapRows(row1, row2) {
    checkRowIndex(this, row1);
    checkRowIndex(this, row2);
    for (let i = 0; i < this.columns; i++) {
      let temp = this.get(row1, i);
      this.set(row1, i, this.get(row2, i));
      this.set(row2, i, temp);
    }
    return this;
  }
  getColumn(index) {
    checkColumnIndex(this, index);
    let column = [];
    for (let i = 0; i < this.rows; i++) {
      column.push(this.get(i, index));
    }
    return column;
  }
  getColumnVector(index) {
    return Matrix$2.columnVector(this.getColumn(index));
  }
  setColumn(index, array) {
    checkColumnIndex(this, index);
    array = checkColumnVector(this, array);
    for (let i = 0; i < this.rows; i++) {
      this.set(i, index, array[i]);
    }
    return this;
  }
  swapColumns(column1, column2) {
    checkColumnIndex(this, column1);
    checkColumnIndex(this, column2);
    for (let i = 0; i < this.rows; i++) {
      let temp = this.get(i, column1);
      this.set(i, column1, this.get(i, column2));
      this.set(i, column2, temp);
    }
    return this;
  }
  addRowVector(vector) {
    vector = checkRowVector(this, vector);
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) + vector[j]);
      }
    }
    return this;
  }
  subRowVector(vector) {
    vector = checkRowVector(this, vector);
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) - vector[j]);
      }
    }
    return this;
  }
  mulRowVector(vector) {
    vector = checkRowVector(this, vector);
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) * vector[j]);
      }
    }
    return this;
  }
  divRowVector(vector) {
    vector = checkRowVector(this, vector);
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) / vector[j]);
      }
    }
    return this;
  }
  addColumnVector(vector) {
    vector = checkColumnVector(this, vector);
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) + vector[i]);
      }
    }
    return this;
  }
  subColumnVector(vector) {
    vector = checkColumnVector(this, vector);
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) - vector[i]);
      }
    }
    return this;
  }
  mulColumnVector(vector) {
    vector = checkColumnVector(this, vector);
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) * vector[i]);
      }
    }
    return this;
  }
  divColumnVector(vector) {
    vector = checkColumnVector(this, vector);
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        this.set(i, j, this.get(i, j) / vector[i]);
      }
    }
    return this;
  }
  mulRow(index, value) {
    checkRowIndex(this, index);
    for (let i = 0; i < this.columns; i++) {
      this.set(index, i, this.get(index, i) * value);
    }
    return this;
  }
  mulColumn(index, value) {
    checkColumnIndex(this, index);
    for (let i = 0; i < this.rows; i++) {
      this.set(i, index, this.get(i, index) * value);
    }
    return this;
  }
  max(by) {
    if (this.isEmpty()) {
      return NaN;
    }
    switch (by) {
      case 'row':
        {
          const max = new Array(this.rows).fill(Number.NEGATIVE_INFINITY);
          for (let row = 0; row < this.rows; row++) {
            for (let column = 0; column < this.columns; column++) {
              if (this.get(row, column) > max[row]) {
                max[row] = this.get(row, column);
              }
            }
          }
          return max;
        }
      case 'column':
        {
          const max = new Array(this.columns).fill(Number.NEGATIVE_INFINITY);
          for (let row = 0; row < this.rows; row++) {
            for (let column = 0; column < this.columns; column++) {
              if (this.get(row, column) > max[column]) {
                max[column] = this.get(row, column);
              }
            }
          }
          return max;
        }
      case undefined:
        {
          let max = this.get(0, 0);
          for (let row = 0; row < this.rows; row++) {
            for (let column = 0; column < this.columns; column++) {
              if (this.get(row, column) > max) {
                max = this.get(row, column);
              }
            }
          }
          return max;
        }
      default:
        throw new Error(`invalid option: ${by}`);
    }
  }
  maxIndex() {
    checkNonEmpty(this);
    let v = this.get(0, 0);
    let idx = [0, 0];
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        if (this.get(i, j) > v) {
          v = this.get(i, j);
          idx[0] = i;
          idx[1] = j;
        }
      }
    }
    return idx;
  }
  min(by) {
    if (this.isEmpty()) {
      return NaN;
    }
    switch (by) {
      case 'row':
        {
          const min = new Array(this.rows).fill(Number.POSITIVE_INFINITY);
          for (let row = 0; row < this.rows; row++) {
            for (let column = 0; column < this.columns; column++) {
              if (this.get(row, column) < min[row]) {
                min[row] = this.get(row, column);
              }
            }
          }
          return min;
        }
      case 'column':
        {
          const min = new Array(this.columns).fill(Number.POSITIVE_INFINITY);
          for (let row = 0; row < this.rows; row++) {
            for (let column = 0; column < this.columns; column++) {
              if (this.get(row, column) < min[column]) {
                min[column] = this.get(row, column);
              }
            }
          }
          return min;
        }
      case undefined:
        {
          let min = this.get(0, 0);
          for (let row = 0; row < this.rows; row++) {
            for (let column = 0; column < this.columns; column++) {
              if (this.get(row, column) < min) {
                min = this.get(row, column);
              }
            }
          }
          return min;
        }
      default:
        throw new Error(`invalid option: ${by}`);
    }
  }
  minIndex() {
    checkNonEmpty(this);
    let v = this.get(0, 0);
    let idx = [0, 0];
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        if (this.get(i, j) < v) {
          v = this.get(i, j);
          idx[0] = i;
          idx[1] = j;
        }
      }
    }
    return idx;
  }
  maxRow(row) {
    checkRowIndex(this, row);
    if (this.isEmpty()) {
      return NaN;
    }
    let v = this.get(row, 0);
    for (let i = 1; i < this.columns; i++) {
      if (this.get(row, i) > v) {
        v = this.get(row, i);
      }
    }
    return v;
  }
  maxRowIndex(row) {
    checkRowIndex(this, row);
    checkNonEmpty(this);
    let v = this.get(row, 0);
    let idx = [row, 0];
    for (let i = 1; i < this.columns; i++) {
      if (this.get(row, i) > v) {
        v = this.get(row, i);
        idx[1] = i;
      }
    }
    return idx;
  }
  minRow(row) {
    checkRowIndex(this, row);
    if (this.isEmpty()) {
      return NaN;
    }
    let v = this.get(row, 0);
    for (let i = 1; i < this.columns; i++) {
      if (this.get(row, i) < v) {
        v = this.get(row, i);
      }
    }
    return v;
  }
  minRowIndex(row) {
    checkRowIndex(this, row);
    checkNonEmpty(this);
    let v = this.get(row, 0);
    let idx = [row, 0];
    for (let i = 1; i < this.columns; i++) {
      if (this.get(row, i) < v) {
        v = this.get(row, i);
        idx[1] = i;
      }
    }
    return idx;
  }
  maxColumn(column) {
    checkColumnIndex(this, column);
    if (this.isEmpty()) {
      return NaN;
    }
    let v = this.get(0, column);
    for (let i = 1; i < this.rows; i++) {
      if (this.get(i, column) > v) {
        v = this.get(i, column);
      }
    }
    return v;
  }
  maxColumnIndex(column) {
    checkColumnIndex(this, column);
    checkNonEmpty(this);
    let v = this.get(0, column);
    let idx = [0, column];
    for (let i = 1; i < this.rows; i++) {
      if (this.get(i, column) > v) {
        v = this.get(i, column);
        idx[0] = i;
      }
    }
    return idx;
  }
  minColumn(column) {
    checkColumnIndex(this, column);
    if (this.isEmpty()) {
      return NaN;
    }
    let v = this.get(0, column);
    for (let i = 1; i < this.rows; i++) {
      if (this.get(i, column) < v) {
        v = this.get(i, column);
      }
    }
    return v;
  }
  minColumnIndex(column) {
    checkColumnIndex(this, column);
    checkNonEmpty(this);
    let v = this.get(0, column);
    let idx = [0, column];
    for (let i = 1; i < this.rows; i++) {
      if (this.get(i, column) < v) {
        v = this.get(i, column);
        idx[0] = i;
      }
    }
    return idx;
  }
  diag() {
    let min = Math.min(this.rows, this.columns);
    let diag = [];
    for (let i = 0; i < min; i++) {
      diag.push(this.get(i, i));
    }
    return diag;
  }
  norm(type = 'frobenius') {
    switch (type) {
      case 'max':
        return this.max();
      case 'frobenius':
        return Math.sqrt(this.dot(this));
      default:
        throw new RangeError(`unknown norm type: ${type}`);
    }
  }
  cumulativeSum() {
    let sum = 0;
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        sum += this.get(i, j);
        this.set(i, j, sum);
      }
    }
    return this;
  }
  dot(vector2) {
    if (AbstractMatrix.isMatrix(vector2)) vector2 = vector2.to1DArray();
    let vector1 = this.to1DArray();
    if (vector1.length !== vector2.length) {
      throw new RangeError('vectors do not have the same size');
    }
    let dot = 0;
    for (let i = 0; i < vector1.length; i++) {
      dot += vector1[i] * vector2[i];
    }
    return dot;
  }
  mmul(other) {
    other = Matrix$2.checkMatrix(other);
    let m = this.rows;
    let n = this.columns;
    let p = other.columns;
    let result = new Matrix$2(m, p);
    let Bcolj = new Float64Array(n);
    for (let j = 0; j < p; j++) {
      for (let k = 0; k < n; k++) {
        Bcolj[k] = other.get(k, j);
      }
      for (let i = 0; i < m; i++) {
        let s = 0;
        for (let k = 0; k < n; k++) {
          s += this.get(i, k) * Bcolj[k];
        }
        result.set(i, j, s);
      }
    }
    return result;
  }
  gram() {
    const rows = this.rows;
    const n = this.columns;

    // The Gram matrix `thisᵀ · this` is symmetric, so only its upper triangle is
    // accumulated (then mirrored) and the transpose is never materialized.
    // Row-streaming rank-1 updates read each row of `this` contiguously and skip
    // zero entries, so the cost scales with the number of non-zeros: it is as
    // fast as the dense version on dense matrices (the skip never fires) and far
    // faster on sparse ones.
    const gramData = new Float64Array(n * n);
    for (let r = 0; r < rows; r++) {
      for (let i = 0; i < n; i++) {
        const value = this.get(r, i);
        if (value === 0) continue;
        const offset = i * n;
        for (let j = i; j < n; j++) {
          gramData[offset + j] += value * this.get(r, j);
        }
      }
    }
    const result = new Matrix$2(n, n);
    for (let i = 0; i < n; i++) {
      const offset = i * n;
      for (let j = i; j < n; j++) {
        const value = gramData[offset + j];
        result.set(i, j, value);
        result.set(j, i, value);
      }
    }
    return result;
  }
  transposeMultiply(other) {
    other = Matrix$2.checkMatrix(other);
    if (this.rows !== other.rows) {
      throw new RangeError('the number of rows of the two matrices must be equal');
    }
    const n = this.columns;
    const p = other.columns;
    const result = new Matrix$2(n, p);
    const otherRow = new Float64Array(p);
    for (let r = 0; r < this.rows; r++) {
      for (let j = 0; j < p; j++) {
        otherRow[j] = other.get(r, j);
      }
      for (let i = 0; i < n; i++) {
        const value = this.get(r, i);
        if (value === 0) continue;
        const resultRow = result.data[i];
        for (let j = 0; j < p; j++) {
          resultRow[j] += value * otherRow[j];
        }
      }
    }
    return result;
  }
  mmulByTranspose(scale) {
    let m = this.rows;
    let n = this.columns;
    if (scale !== undefined && scale.length !== n) {
      throw new RangeError('scale must have one value per column');
    }
    let result = new Matrix$2(m, m);

    // result = this · diag(scale) · thisᵀ is symmetric, so only the upper
    // triangle is computed and mirrored, and the transpose is never
    // materialized. `scale` (one factor per column) is folded into one operand.
    let rowj = new Float64Array(n);
    for (let j = 0; j < m; j++) {
      if (scale === undefined) {
        for (let k = 0; k < n; k++) {
          rowj[k] = this.get(j, k);
        }
      } else {
        for (let k = 0; k < n; k++) {
          rowj[k] = scale[k] * this.get(j, k);
        }
      }
      for (let i = j; i < m; i++) {
        let s = 0;
        for (let k = 0; k < n; k++) {
          s += this.get(i, k) * rowj[k];
        }
        result.set(i, j, s);
        result.set(j, i, s);
      }
    }
    return result;
  }
  mpow(scalar) {
    if (!this.isSquare()) {
      throw new RangeError('Matrix must be square');
    }
    if (!Number.isInteger(scalar) || scalar < 0) {
      throw new RangeError('Exponent must be a non-negative integer');
    }
    // Russian Peasant exponentiation, i.e. exponentiation by squaring
    let result = Matrix$2.eye(this.rows);
    let bb = this;
    // Note: Don't bit shift. In JS, that would truncate at 32 bits
    for (let e = scalar; e >= 1; e /= 2) {
      if ((e & 1) !== 0) {
        result = result.mmul(bb);
      }
      bb = bb.mmul(bb);
    }
    return result;
  }
  strassen2x2(other) {
    other = Matrix$2.checkMatrix(other);
    let result = new Matrix$2(2, 2);
    const a11 = this.get(0, 0);
    const b11 = other.get(0, 0);
    const a12 = this.get(0, 1);
    const b12 = other.get(0, 1);
    const a21 = this.get(1, 0);
    const b21 = other.get(1, 0);
    const a22 = this.get(1, 1);
    const b22 = other.get(1, 1);

    // Compute intermediate values.
    const m1 = (a11 + a22) * (b11 + b22);
    const m2 = (a21 + a22) * b11;
    const m3 = a11 * (b12 - b22);
    const m4 = a22 * (b21 - b11);
    const m5 = (a11 + a12) * b22;
    const m6 = (a21 - a11) * (b11 + b12);
    const m7 = (a12 - a22) * (b21 + b22);

    // Combine intermediate values into the output.
    const c00 = m1 + m4 - m5 + m7;
    const c01 = m3 + m5;
    const c10 = m2 + m4;
    const c11 = m1 - m2 + m3 + m6;
    result.set(0, 0, c00);
    result.set(0, 1, c01);
    result.set(1, 0, c10);
    result.set(1, 1, c11);
    return result;
  }
  strassen3x3(other) {
    other = Matrix$2.checkMatrix(other);
    let result = new Matrix$2(3, 3);
    const a00 = this.get(0, 0);
    const a01 = this.get(0, 1);
    const a02 = this.get(0, 2);
    const a10 = this.get(1, 0);
    const a11 = this.get(1, 1);
    const a12 = this.get(1, 2);
    const a20 = this.get(2, 0);
    const a21 = this.get(2, 1);
    const a22 = this.get(2, 2);
    const b00 = other.get(0, 0);
    const b01 = other.get(0, 1);
    const b02 = other.get(0, 2);
    const b10 = other.get(1, 0);
    const b11 = other.get(1, 1);
    const b12 = other.get(1, 2);
    const b20 = other.get(2, 0);
    const b21 = other.get(2, 1);
    const b22 = other.get(2, 2);
    const m1 = (a00 + a01 + a02 - a10 - a11 - a21 - a22) * b11;
    const m2 = (a00 - a10) * (-b01 + b11);
    const m3 = a11 * (-b00 + b01 + b10 - b11 - b12 - b20 + b22);
    const m4 = (-a00 + a10 + a11) * (b00 - b01 + b11);
    const m5 = (a10 + a11) * (-b00 + b01);
    const m6 = a00 * b00;
    const m7 = (-a00 + a20 + a21) * (b00 - b02 + b12);
    const m8 = (-a00 + a20) * (b02 - b12);
    const m9 = (a20 + a21) * (-b00 + b02);
    const m10 = (a00 + a01 + a02 - a11 - a12 - a20 - a21) * b12;
    const m11 = a21 * (-b00 + b02 + b10 - b11 - b12 - b20 + b21);
    const m12 = (-a02 + a21 + a22) * (b11 + b20 - b21);
    const m13 = (a02 - a22) * (b11 - b21);
    const m14 = a02 * b20;
    const m15 = (a21 + a22) * (-b20 + b21);
    const m16 = (-a02 + a11 + a12) * (b12 + b20 - b22);
    const m17 = (a02 - a12) * (b12 - b22);
    const m18 = (a11 + a12) * (-b20 + b22);
    const m19 = a01 * b10;
    const m20 = a12 * b21;
    const m21 = a10 * b02;
    const m22 = a20 * b01;
    const m23 = a22 * b22;
    const c00 = m6 + m14 + m19;
    const c01 = m1 + m4 + m5 + m6 + m12 + m14 + m15;
    const c02 = m6 + m7 + m9 + m10 + m14 + m16 + m18;
    const c10 = m2 + m3 + m4 + m6 + m14 + m16 + m17;
    const c11 = m2 + m4 + m5 + m6 + m20;
    const c12 = m14 + m16 + m17 + m18 + m21;
    const c20 = m6 + m7 + m8 + m11 + m12 + m13 + m14;
    const c21 = m12 + m13 + m14 + m15 + m22;
    const c22 = m6 + m7 + m8 + m9 + m23;
    result.set(0, 0, c00);
    result.set(0, 1, c01);
    result.set(0, 2, c02);
    result.set(1, 0, c10);
    result.set(1, 1, c11);
    result.set(1, 2, c12);
    result.set(2, 0, c20);
    result.set(2, 1, c21);
    result.set(2, 2, c22);
    return result;
  }
  mmulStrassen(y) {
    y = Matrix$2.checkMatrix(y);
    let x = this.clone();
    let r1 = x.rows;
    let c1 = x.columns;
    let r2 = y.rows;
    let c2 = y.columns;
    if (c1 !== r2) {
      // eslint-disable-next-line no-console
      console.warn(`Multiplying ${r1} x ${c1} and ${r2} x ${c2} matrix: dimensions do not match.`);
    }

    // Put a matrix into the top left of a matrix of zeros.
    // `rows` and `cols` are the dimensions of the output matrix.
    function embed(mat, rows, cols) {
      let r = mat.rows;
      let c = mat.columns;
      if (r === rows && c === cols) {
        return mat;
      } else {
        let resultat = AbstractMatrix.zeros(rows, cols);
        resultat = resultat.setSubMatrix(mat, 0, 0);
        return resultat;
      }
    }

    // Make sure both matrices are the same size.
    // This is exclusively for simplicity:
    // this algorithm can be implemented with matrices of different sizes.

    let r = Math.max(r1, r2);
    let c = Math.max(c1, c2);
    x = embed(x, r, c);
    y = embed(y, r, c);

    // Our recursive multiplication function.
    function blockMult(a, b, rows, cols) {
      // For small matrices, resort to naive multiplication.
      if (rows <= 512 || cols <= 512) {
        return a.mmul(b); // a is equivalent to this
      }

      // Apply dynamic padding.
      if (rows % 2 === 1 && cols % 2 === 1) {
        a = embed(a, rows + 1, cols + 1);
        b = embed(b, rows + 1, cols + 1);
      } else if (rows % 2 === 1) {
        a = embed(a, rows + 1, cols);
        b = embed(b, rows + 1, cols);
      } else if (cols % 2 === 1) {
        a = embed(a, rows, cols + 1);
        b = embed(b, rows, cols + 1);
      }
      let halfRows = parseInt(a.rows / 2, 10);
      let halfCols = parseInt(a.columns / 2, 10);
      // Subdivide input matrices.
      let a11 = a.subMatrix(0, halfRows - 1, 0, halfCols - 1);
      let b11 = b.subMatrix(0, halfRows - 1, 0, halfCols - 1);
      let a12 = a.subMatrix(0, halfRows - 1, halfCols, a.columns - 1);
      let b12 = b.subMatrix(0, halfRows - 1, halfCols, b.columns - 1);
      let a21 = a.subMatrix(halfRows, a.rows - 1, 0, halfCols - 1);
      let b21 = b.subMatrix(halfRows, b.rows - 1, 0, halfCols - 1);
      let a22 = a.subMatrix(halfRows, a.rows - 1, halfCols, a.columns - 1);
      let b22 = b.subMatrix(halfRows, b.rows - 1, halfCols, b.columns - 1);

      // Compute intermediate values.
      let m1 = blockMult(AbstractMatrix.add(a11, a22), AbstractMatrix.add(b11, b22), halfRows, halfCols);
      let m2 = blockMult(AbstractMatrix.add(a21, a22), b11, halfRows, halfCols);
      let m3 = blockMult(a11, AbstractMatrix.sub(b12, b22), halfRows, halfCols);
      let m4 = blockMult(a22, AbstractMatrix.sub(b21, b11), halfRows, halfCols);
      let m5 = blockMult(AbstractMatrix.add(a11, a12), b22, halfRows, halfCols);
      let m6 = blockMult(AbstractMatrix.sub(a21, a11), AbstractMatrix.add(b11, b12), halfRows, halfCols);
      let m7 = blockMult(AbstractMatrix.sub(a12, a22), AbstractMatrix.add(b21, b22), halfRows, halfCols);

      // Combine intermediate values into the output.
      let c11 = AbstractMatrix.add(m1, m4);
      c11.sub(m5);
      c11.add(m7);
      let c12 = AbstractMatrix.add(m3, m5);
      let c21 = AbstractMatrix.add(m2, m4);
      let c22 = AbstractMatrix.sub(m1, m2);
      c22.add(m3);
      c22.add(m6);

      // Crop output to the desired size (undo dynamic padding).
      let result = AbstractMatrix.zeros(2 * c11.rows, 2 * c11.columns);
      result = result.setSubMatrix(c11, 0, 0);
      result = result.setSubMatrix(c12, c11.rows, 0);
      result = result.setSubMatrix(c21, 0, c11.columns);
      result = result.setSubMatrix(c22, c11.rows, c11.columns);
      return result.subMatrix(0, rows - 1, 0, cols - 1);
    }
    return blockMult(x, y, r, c);
  }
  scaleRows(options = {}) {
    if (typeof options !== 'object') {
      throw new TypeError('options must be an object');
    }
    const {
      min = 0,
      max = 1
    } = options;
    if (!Number.isFinite(min)) throw new TypeError('min must be a number');
    if (!Number.isFinite(max)) throw new TypeError('max must be a number');
    if (min >= max) throw new RangeError('min must be smaller than max');
    let newMatrix = new Matrix$2(this.rows, this.columns);
    for (let i = 0; i < this.rows; i++) {
      const row = this.getRow(i);
      if (row.length > 0) {
        rescale(row, {
          min,
          max,
          output: row
        });
      }
      newMatrix.setRow(i, row);
    }
    return newMatrix;
  }
  scaleColumns(options = {}) {
    if (typeof options !== 'object') {
      throw new TypeError('options must be an object');
    }
    const {
      min = 0,
      max = 1
    } = options;
    if (!Number.isFinite(min)) throw new TypeError('min must be a number');
    if (!Number.isFinite(max)) throw new TypeError('max must be a number');
    if (min >= max) throw new RangeError('min must be smaller than max');
    let newMatrix = new Matrix$2(this.rows, this.columns);
    for (let i = 0; i < this.columns; i++) {
      const column = this.getColumn(i);
      if (column.length) {
        rescale(column, {
          min,
          max,
          output: column
        });
      }
      newMatrix.setColumn(i, column);
    }
    return newMatrix;
  }
  flipRows() {
    const middle = Math.ceil(this.columns / 2);
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < middle; j++) {
        let first = this.get(i, j);
        let last = this.get(i, this.columns - 1 - j);
        this.set(i, j, last);
        this.set(i, this.columns - 1 - j, first);
      }
    }
    return this;
  }
  flipColumns() {
    const middle = Math.ceil(this.rows / 2);
    for (let j = 0; j < this.columns; j++) {
      for (let i = 0; i < middle; i++) {
        let first = this.get(i, j);
        let last = this.get(this.rows - 1 - i, j);
        this.set(i, j, last);
        this.set(this.rows - 1 - i, j, first);
      }
    }
    return this;
  }
  kroneckerProduct(other) {
    other = Matrix$2.checkMatrix(other);
    let m = this.rows;
    let n = this.columns;
    let p = other.rows;
    let q = other.columns;
    let result = new Matrix$2(m * p, n * q);
    for (let i = 0; i < m; i++) {
      for (let j = 0; j < n; j++) {
        for (let k = 0; k < p; k++) {
          for (let l = 0; l < q; l++) {
            result.set(p * i + k, q * j + l, this.get(i, j) * other.get(k, l));
          }
        }
      }
    }
    return result;
  }
  kroneckerSum(other) {
    other = Matrix$2.checkMatrix(other);
    if (!this.isSquare() || !other.isSquare()) {
      throw new Error('Kronecker Sum needs two Square Matrices');
    }
    let m = this.rows;
    let n = other.rows;
    let AxI = this.kroneckerProduct(Matrix$2.eye(n, n));
    let IxB = Matrix$2.eye(m, m).kroneckerProduct(other);
    return AxI.add(IxB);
  }
  transpose() {
    let result = new Matrix$2(this.columns, this.rows);
    for (let i = 0; i < this.rows; i++) {
      for (let j = 0; j < this.columns; j++) {
        result.set(j, i, this.get(i, j));
      }
    }
    return result;
  }
  sortRows(compareFunction = compareNumbers) {
    for (let i = 0; i < this.rows; i++) {
      this.setRow(i, this.getRow(i).sort(compareFunction));
    }
    return this;
  }
  sortColumns(compareFunction = compareNumbers) {
    for (let i = 0; i < this.columns; i++) {
      this.setColumn(i, this.getColumn(i).sort(compareFunction));
    }
    return this;
  }
  subMatrix(startRow, endRow, startColumn, endColumn) {
    checkRange$1(this, startRow, endRow, startColumn, endColumn);
    let newMatrix = new Matrix$2(endRow - startRow + 1, endColumn - startColumn + 1);
    for (let i = startRow; i <= endRow; i++) {
      for (let j = startColumn; j <= endColumn; j++) {
        newMatrix.set(i - startRow, j - startColumn, this.get(i, j));
      }
    }
    return newMatrix;
  }
  subMatrixRow(indices, startColumn, endColumn) {
    if (startColumn === undefined) startColumn = 0;
    if (endColumn === undefined) endColumn = this.columns - 1;
    if (startColumn > endColumn || startColumn < 0 || startColumn >= this.columns || endColumn < 0 || endColumn >= this.columns) {
      throw new RangeError('Argument out of range');
    }
    let newMatrix = new Matrix$2(indices.length, endColumn - startColumn + 1);
    for (let i = 0; i < indices.length; i++) {
      for (let j = startColumn; j <= endColumn; j++) {
        if (indices[i] < 0 || indices[i] >= this.rows) {
          throw new RangeError(`Row index out of range: ${indices[i]}`);
        }
        newMatrix.set(i, j - startColumn, this.get(indices[i], j));
      }
    }
    return newMatrix;
  }
  subMatrixColumn(indices, startRow, endRow) {
    if (startRow === undefined) startRow = 0;
    if (endRow === undefined) endRow = this.rows - 1;
    if (startRow > endRow || startRow < 0 || startRow >= this.rows || endRow < 0 || endRow >= this.rows) {
      throw new RangeError('Argument out of range');
    }
    let newMatrix = new Matrix$2(endRow - startRow + 1, indices.length);
    for (let i = 0; i < indices.length; i++) {
      for (let j = startRow; j <= endRow; j++) {
        if (indices[i] < 0 || indices[i] >= this.columns) {
          throw new RangeError(`Column index out of range: ${indices[i]}`);
        }
        newMatrix.set(j - startRow, i, this.get(j, indices[i]));
      }
    }
    return newMatrix;
  }
  setSubMatrix(matrix, startRow, startColumn) {
    matrix = Matrix$2.checkMatrix(matrix);
    if (matrix.isEmpty()) {
      return this;
    }
    let endRow = startRow + matrix.rows - 1;
    let endColumn = startColumn + matrix.columns - 1;
    checkRange$1(this, startRow, endRow, startColumn, endColumn);
    for (let i = 0; i < matrix.rows; i++) {
      for (let j = 0; j < matrix.columns; j++) {
        this.set(startRow + i, startColumn + j, matrix.get(i, j));
      }
    }
    return this;
  }
  selection(rowIndices, columnIndices) {
    checkRowIndices(this, rowIndices);
    checkColumnIndices(this, columnIndices);
    let newMatrix = new Matrix$2(rowIndices.length, columnIndices.length);
    for (let i = 0; i < rowIndices.length; i++) {
      let rowIndex = rowIndices[i];
      for (let j = 0; j < columnIndices.length; j++) {
        let columnIndex = columnIndices[j];
        newMatrix.set(i, j, this.get(rowIndex, columnIndex));
      }
    }
    return newMatrix;
  }
  trace() {
    let min = Math.min(this.rows, this.columns);
    let trace = 0;
    for (let i = 0; i < min; i++) {
      trace += this.get(i, i);
    }
    return trace;
  }
  clone() {
    return this.constructor.copy(this, new Matrix$2(this.rows, this.columns));
  }

  /**
   * @template {AbstractMatrix} M
   * @param {AbstractMatrix} from
   * @param {M} to
   * @return {M}
   */
  static copy(from, to) {
    for (const [row, column, value] of from.entries()) {
      to.set(row, column, value);
    }
    return to;
  }
  sum(by) {
    switch (by) {
      case 'row':
        return sumByRow(this);
      case 'column':
        return sumByColumn(this);
      case undefined:
        return sumAll(this);
      default:
        throw new Error(`invalid option: ${by}`);
    }
  }
  product(by) {
    switch (by) {
      case 'row':
        return productByRow(this);
      case 'column':
        return productByColumn(this);
      case undefined:
        return productAll(this);
      default:
        throw new Error(`invalid option: ${by}`);
    }
  }
  mean(by) {
    const sum = this.sum(by);
    switch (by) {
      case 'row':
        {
          for (let i = 0; i < this.rows; i++) {
            sum[i] /= this.columns;
          }
          return sum;
        }
      case 'column':
        {
          for (let i = 0; i < this.columns; i++) {
            sum[i] /= this.rows;
          }
          return sum;
        }
      case undefined:
        return sum / this.size;
      default:
        throw new Error(`invalid option: ${by}`);
    }
  }
  variance(by, options = {}) {
    if (typeof by === 'object') {
      options = by;
      by = undefined;
    }
    if (typeof options !== 'object') {
      throw new TypeError('options must be an object');
    }
    const {
      unbiased = true,
      mean = this.mean(by)
    } = options;
    if (typeof unbiased !== 'boolean') {
      throw new TypeError('unbiased must be a boolean');
    }
    switch (by) {
      case 'row':
        {
          if (!isAnyArray$1(mean)) {
            throw new TypeError('mean must be an array');
          }
          return varianceByRow(this, unbiased, mean);
        }
      case 'column':
        {
          if (!isAnyArray$1(mean)) {
            throw new TypeError('mean must be an array');
          }
          return varianceByColumn(this, unbiased, mean);
        }
      case undefined:
        {
          if (typeof mean !== 'number') {
            throw new TypeError('mean must be a number');
          }
          return varianceAll(this, unbiased, mean);
        }
      default:
        throw new Error(`invalid option: ${by}`);
    }
  }
  standardDeviation(by, options) {
    if (typeof by === 'object') {
      options = by;
      by = undefined;
    }
    const variance = this.variance(by, options);
    if (by === undefined) {
      return Math.sqrt(variance);
    } else {
      for (let i = 0; i < variance.length; i++) {
        variance[i] = Math.sqrt(variance[i]);
      }
      return variance;
    }
  }
  center(by, options = {}) {
    if (typeof by === 'object') {
      options = by;
      by = undefined;
    }
    if (typeof options !== 'object') {
      throw new TypeError('options must be an object');
    }
    const {
      center = this.mean(by)
    } = options;
    switch (by) {
      case 'row':
        {
          if (!isAnyArray$1(center)) {
            throw new TypeError('center must be an array');
          }
          centerByRow(this, center);
          return this;
        }
      case 'column':
        {
          if (!isAnyArray$1(center)) {
            throw new TypeError('center must be an array');
          }
          centerByColumn(this, center);
          return this;
        }
      case undefined:
        {
          if (typeof center !== 'number') {
            throw new TypeError('center must be a number');
          }
          centerAll(this, center);
          return this;
        }
      default:
        throw new Error(`invalid option: ${by}`);
    }
  }
  scale(by, options = {}) {
    if (typeof by === 'object') {
      options = by;
      by = undefined;
    }
    if (typeof options !== 'object') {
      throw new TypeError('options must be an object');
    }
    let scale = options.scale;
    switch (by) {
      case 'row':
        {
          if (scale === undefined) {
            scale = getScaleByRow(this);
          } else if (!isAnyArray$1(scale)) {
            throw new TypeError('scale must be an array');
          }
          scaleByRow(this, scale);
          return this;
        }
      case 'column':
        {
          if (scale === undefined) {
            scale = getScaleByColumn(this);
          } else if (!isAnyArray$1(scale)) {
            throw new TypeError('scale must be an array');
          }
          scaleByColumn(this, scale);
          return this;
        }
      case undefined:
        {
          if (scale === undefined) {
            scale = getScaleAll(this);
          } else if (typeof scale !== 'number') {
            throw new TypeError('scale must be a number');
          }
          scaleAll(this, scale);
          return this;
        }
      default:
        throw new Error(`invalid option: ${by}`);
    }
  }
  toString(options) {
    return inspectMatrixWithOptions(this, options);
  }
  [Symbol.iterator]() {
    return this.entries();
  }

  /**
   * iterator from left to right, from top to bottom
   * yield [row, column, value]
   * @returns {Generator<[number, number, number], void, void>}
   */
  *entries() {
    for (let row = 0; row < this.rows; row++) {
      for (let col = 0; col < this.columns; col++) {
        yield [row, col, this.get(row, col)];
      }
    }
  }

  /**
   * iterator from left to right, from top to bottom
   * yield value
   * @returns {Generator<number, void, void>}
   */
  *values() {
    for (let row = 0; row < this.rows; row++) {
      for (let col = 0; col < this.columns; col++) {
        yield this.get(row, col);
      }
    }
  }
}
AbstractMatrix.prototype.klass = 'Matrix';
if (typeof Symbol !== 'undefined') {
  AbstractMatrix.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspectMatrix;
}
function compareNumbers(a, b) {
  return a - b;
}
function isArrayOfNumbers(array) {
  return array.every(element => {
    return typeof element === 'number';
  });
}

// Synonyms
AbstractMatrix.random = AbstractMatrix.rand;
AbstractMatrix.randomInt = AbstractMatrix.randInt;
AbstractMatrix.diagonal = AbstractMatrix.diag;
AbstractMatrix.prototype.diagonal = AbstractMatrix.prototype.diag;
AbstractMatrix.identity = AbstractMatrix.eye;
AbstractMatrix.prototype.negate = AbstractMatrix.prototype.neg;
AbstractMatrix.prototype.tensorProduct = AbstractMatrix.prototype.kroneckerProduct;
let Matrix$2 = class Matrix extends AbstractMatrix {
  /**
   * @type {Float64Array[]}
   */
  data;

  /**
   * Init an empty matrix
   * @param {number} nRows
   * @param {number} nColumns
   */
  #initData(nRows, nColumns) {
    this.data = [];
    if (Number.isInteger(nColumns) && nColumns >= 0) {
      for (let i = 0; i < nRows; i++) {
        this.data.push(new Float64Array(nColumns));
      }
    } else {
      throw new TypeError('nColumns must be a positive integer');
    }
    this.rows = nRows;
    this.columns = nColumns;
  }
  constructor(nRows, nColumns) {
    super();
    if (Matrix.isMatrix(nRows)) {
      this.#initData(nRows.rows, nRows.columns);
      Matrix.copy(nRows, this);
    } else if (Number.isInteger(nRows) && nRows >= 0) {
      this.#initData(nRows, nColumns);
    } else if (isAnyArray$1(nRows)) {
      // Copy the values from the 2D array
      const arrayData = nRows;
      nRows = arrayData.length;
      nColumns = nRows ? arrayData[0].length : 0;
      if (typeof nColumns !== 'number') {
        throw new TypeError('Data must be a 2D array with at least one element');
      }
      this.data = [];
      for (let i = 0; i < nRows; i++) {
        if (arrayData[i].length !== nColumns) {
          throw new RangeError('Inconsistent array dimensions');
        }
        if (!isArrayOfNumbers(arrayData[i])) {
          throw new TypeError('Input data contains non-numeric values');
        }
        this.data.push(Float64Array.from(arrayData[i]));
      }
      this.rows = nRows;
      this.columns = nColumns;
    } else {
      throw new TypeError('First argument must be a positive number or an array');
    }
  }
  set(rowIndex, columnIndex, value) {
    this.data[rowIndex][columnIndex] = value;
    return this;
  }
  get(rowIndex, columnIndex) {
    return this.data[rowIndex][columnIndex];
  }
  removeRow(index) {
    checkRowIndex(this, index);
    this.data.splice(index, 1);
    this.rows -= 1;
    return this;
  }
  addRow(index, array) {
    if (array === undefined) {
      array = index;
      index = this.rows;
    }
    checkRowIndex(this, index, true);
    array = Float64Array.from(checkRowVector(this, array));
    this.data.splice(index, 0, array);
    this.rows += 1;
    return this;
  }
  removeColumn(index) {
    checkColumnIndex(this, index);
    for (let i = 0; i < this.rows; i++) {
      const newRow = new Float64Array(this.columns - 1);
      for (let j = 0; j < index; j++) {
        newRow[j] = this.data[i][j];
      }
      for (let j = index + 1; j < this.columns; j++) {
        newRow[j - 1] = this.data[i][j];
      }
      this.data[i] = newRow;
    }
    this.columns -= 1;
    return this;
  }
  addColumn(index, array) {
    if (typeof array === 'undefined') {
      array = index;
      index = this.columns;
    }
    checkColumnIndex(this, index, true);
    array = checkColumnVector(this, array);
    for (let i = 0; i < this.rows; i++) {
      const newRow = new Float64Array(this.columns + 1);
      let j = 0;
      for (; j < index; j++) {
        newRow[j] = this.data[i][j];
      }
      newRow[j++] = array[i];
      for (; j < this.columns + 1; j++) {
        newRow[j] = this.data[i][j - 1];
      }
      this.data[i] = newRow;
    }
    this.columns += 1;
    return this;
  }
};
installMathOperations(AbstractMatrix, Matrix$2);

/**
 * @typedef {0 | 1 | number | boolean} Mask
 */

class SymmetricMatrix extends AbstractMatrix {
  /** @type {Matrix} */
  #matrix;
  get size() {
    return this.#matrix.size;
  }
  get rows() {
    return this.#matrix.rows;
  }
  get columns() {
    return this.#matrix.columns;
  }
  get diagonalSize() {
    return this.rows;
  }

  /**
   * not the same as matrix.isSymmetric()
   * Here is to check if it's instanceof SymmetricMatrix without bundling issues
   *
   * @param value
   * @returns {boolean}
   */
  static isSymmetricMatrix(value) {
    return Matrix$2.isMatrix(value) && value.klassType === 'SymmetricMatrix';
  }

  /**
   * @param diagonalSize
   * @return {SymmetricMatrix}
   */
  static zeros(diagonalSize) {
    return new this(diagonalSize);
  }

  /**
   * @param diagonalSize
   * @return {SymmetricMatrix}
   */
  static ones(diagonalSize) {
    return new this(diagonalSize).fill(1);
  }

  /**
   * @param {number | AbstractMatrix | ArrayLike<ArrayLike<number>>} diagonalSize
   * @return {this}
   */
  constructor(diagonalSize) {
    super();
    if (Matrix$2.isMatrix(diagonalSize)) {
      if (!diagonalSize.isSymmetric()) {
        throw new TypeError('not symmetric data');
      }
      this.#matrix = Matrix$2.copy(diagonalSize, new Matrix$2(diagonalSize.rows, diagonalSize.rows));
    } else if (Number.isInteger(diagonalSize) && diagonalSize >= 0) {
      this.#matrix = new Matrix$2(diagonalSize, diagonalSize);
    } else {
      this.#matrix = new Matrix$2(diagonalSize);
      if (!this.isSymmetric()) {
        throw new TypeError('not symmetric data');
      }
    }
  }
  clone() {
    const matrix = new SymmetricMatrix(this.diagonalSize);
    for (const [row, col, value] of this.upperRightEntries()) {
      matrix.set(row, col, value);
    }
    return matrix;
  }
  toMatrix() {
    return new Matrix$2(this);
  }
  get(rowIndex, columnIndex) {
    return this.#matrix.get(rowIndex, columnIndex);
  }
  set(rowIndex, columnIndex, value) {
    // symmetric set
    this.#matrix.set(rowIndex, columnIndex, value);
    this.#matrix.set(columnIndex, rowIndex, value);
    return this;
  }
  removeCross(index) {
    // symmetric remove side
    this.#matrix.removeRow(index);
    this.#matrix.removeColumn(index);
    return this;
  }
  addCross(index, array) {
    if (array === undefined) {
      array = index;
      index = this.diagonalSize;
    }
    const row = array.slice();
    row.splice(index, 1);
    this.#matrix.addRow(index, row);
    this.#matrix.addColumn(index, array);
    return this;
  }

  /**
   * @param {Mask[]} mask
   */
  applyMask(mask) {
    if (mask.length !== this.diagonalSize) {
      throw new RangeError('Mask size do not match with matrix size');
    }

    // prepare sides to remove from matrix from mask
    /** @type {number[]} */
    const sidesToRemove = [];
    for (const [index, passthroughs] of mask.entries()) {
      if (passthroughs) continue;
      sidesToRemove.push(index);
    }
    // to remove from highest to lowest for no mutation shifting
    sidesToRemove.reverse();

    // remove sides
    for (const sideIndex of sidesToRemove) {
      this.removeCross(sideIndex);
    }
    return this;
  }

  /**
   * Compact format upper-right corner of matrix
   * iterate from left to right, from top to bottom.
   *
   * ```
   *   A B C D
   * A 1 2 3 4
   * B 2 5 6 7
   * C 3 6 8 9
   * D 4 7 9 10
   * ```
   *
   * will return compact 1D array `[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]`
   *
   * length is S(i=0, n=sideSize) => 10 for a 4 sideSized matrix
   *
   * @returns {number[]}
   */
  toCompact() {
    const {
      diagonalSize
    } = this;

    /** @type {number[]} */
    const compact = new Array(diagonalSize * (diagonalSize + 1) / 2);
    for (let col = 0, row = 0, index = 0; index < compact.length; index++) {
      compact[index] = this.get(row, col);
      if (++col >= diagonalSize) col = ++row;
    }
    return compact;
  }

  /**
   * @param {number[]} compact
   * @return {SymmetricMatrix}
   */
  static fromCompact(compact) {
    const compactSize = compact.length;
    // compactSize = (sideSize * (sideSize + 1)) / 2
    // https://mathsolver.microsoft.com/fr/solve-problem/y%20%3D%20%20x%20%60cdot%20%20%20%60frac%7B%20%20%60left(%20x%2B1%20%20%60right)%20%20%20%20%7D%7B%202%20%20%7D
    // sideSize = (Sqrt(8 × compactSize + 1) - 1) / 2
    const diagonalSize = (Math.sqrt(8 * compactSize + 1) - 1) / 2;
    if (!Number.isInteger(diagonalSize)) {
      throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(compact)}`);
    }
    const matrix = new SymmetricMatrix(diagonalSize);
    for (let col = 0, row = 0, index = 0; index < compactSize; index++) {
      matrix.set(col, row, compact[index]);
      if (++col >= diagonalSize) col = ++row;
    }
    return matrix;
  }

  /**
   * half iterator upper-right-corner from left to right, from top to bottom
   * yield [row, column, value]
   *
   * @returns {Generator<[number, number, number], void, void>}
   */
  *upperRightEntries() {
    for (let row = 0, col = 0; row < this.diagonalSize; void 0) {
      const value = this.get(row, col);
      yield [row, col, value];

      // at the end of row, move cursor to next row at diagonal position
      if (++col >= this.diagonalSize) col = ++row;
    }
  }

  /**
   * half iterator upper-right-corner from left to right, from top to bottom
   * yield value
   *
   * @returns {Generator<[number, number, number], void, void>}
   */
  *upperRightValues() {
    for (let row = 0, col = 0; row < this.diagonalSize; void 0) {
      const value = this.get(row, col);
      yield value;

      // at the end of row, move cursor to next row at diagonal position
      if (++col >= this.diagonalSize) col = ++row;
    }
  }
}
SymmetricMatrix.prototype.klassType = 'SymmetricMatrix';
class DistanceMatrix extends SymmetricMatrix {
  /**
   * not the same as matrix.isSymmetric()
   * Here is to check if it's instanceof SymmetricMatrix without bundling issues
   *
   * @param value
   * @returns {boolean}
   */
  static isDistanceMatrix(value) {
    return SymmetricMatrix.isSymmetricMatrix(value) && value.klassSubType === 'DistanceMatrix';
  }
  constructor(sideSize) {
    super(sideSize);
    if (!this.isDistance()) {
      throw new TypeError('Provided arguments do no produce a distance matrix');
    }
  }
  set(rowIndex, columnIndex, value) {
    // distance matrix diagonal is 0
    if (rowIndex === columnIndex) value = 0;
    return super.set(rowIndex, columnIndex, value);
  }
  addCross(index, array) {
    if (array === undefined) {
      array = index;
      index = this.diagonalSize;
    }

    // ensure distance
    array = array.slice();
    array[index] = 0;
    return super.addCross(index, array);
  }
  toSymmetricMatrix() {
    return new SymmetricMatrix(this);
  }
  clone() {
    const matrix = new DistanceMatrix(this.diagonalSize);
    for (const [row, col, value] of this.upperRightEntries()) {
      if (row === col) continue;
      matrix.set(row, col, value);
    }
    return matrix;
  }

  /**
   * Compact format upper-right corner of matrix
   * no diagonal (only zeros)
   * iterable from left to right, from top to bottom.
   *
   * ```
   *   A B C D
   * A 0 1 2 3
   * B 1 0 4 5
   * C 2 4 0 6
   * D 3 5 6 0
   * ```
   *
   * will return compact 1D array `[1, 2, 3, 4, 5, 6]`
   *
   * length is S(i=0, n=sideSize-1) => 6 for a 4 side sized matrix
   *
   * @returns {number[]}
   */
  toCompact() {
    const {
      diagonalSize
    } = this;
    const compactLength = (diagonalSize - 1) * diagonalSize / 2;

    /** @type {number[]} */
    const compact = new Array(compactLength);
    for (let col = 1, row = 0, index = 0; index < compact.length; index++) {
      compact[index] = this.get(row, col);
      if (++col >= diagonalSize) col = ++row + 1;
    }
    return compact;
  }

  /**
   * @param {number[]} compact
   */
  static fromCompact(compact) {
    const compactSize = compact.length;
    if (compactSize === 0) {
      return new this(0);
    }

    // compactSize in Natural integer range ]0;∞]
    // compactSize = (sideSize * (sideSize - 1)) / 2
    // sideSize = (Sqrt(8 × compactSize + 1) + 1) / 2
    const diagonalSize = (Math.sqrt(8 * compactSize + 1) + 1) / 2;
    if (!Number.isInteger(diagonalSize)) {
      throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(compact)}`);
    }
    const matrix = new this(diagonalSize);
    for (let col = 1, row = 0, index = 0; index < compactSize; index++) {
      matrix.set(col, row, compact[index]);
      if (++col >= diagonalSize) col = ++row + 1;
    }
    return matrix;
  }
}
DistanceMatrix.prototype.klassSubType = 'DistanceMatrix';
class BaseView extends AbstractMatrix {
  constructor(matrix, rows, columns) {
    super();
    this.matrix = matrix;
    this.rows = rows;
    this.columns = columns;
  }
}
class MatrixColumnView extends BaseView {
  constructor(matrix, column) {
    checkColumnIndex(matrix, column);
    super(matrix, matrix.rows, 1);
    this.column = column;
  }
  set(rowIndex, columnIndex, value) {
    this.matrix.set(rowIndex, this.column, value);
    return this;
  }
  get(rowIndex) {
    return this.matrix.get(rowIndex, this.column);
  }
}
class MatrixColumnSelectionView extends BaseView {
  constructor(matrix, columnIndices) {
    checkColumnIndices(matrix, columnIndices);
    super(matrix, matrix.rows, columnIndices.length);
    this.columnIndices = columnIndices;
  }
  set(rowIndex, columnIndex, value) {
    this.matrix.set(rowIndex, this.columnIndices[columnIndex], value);
    return this;
  }
  get(rowIndex, columnIndex) {
    return this.matrix.get(rowIndex, this.columnIndices[columnIndex]);
  }
}
class MatrixFlipColumnView extends BaseView {
  constructor(matrix) {
    super(matrix, matrix.rows, matrix.columns);
  }
  set(rowIndex, columnIndex, value) {
    this.matrix.set(rowIndex, this.columns - columnIndex - 1, value);
    return this;
  }
  get(rowIndex, columnIndex) {
    return this.matrix.get(rowIndex, this.columns - columnIndex - 1);
  }
}
class MatrixFlipRowView extends BaseView {
  constructor(matrix) {
    super(matrix, matrix.rows, matrix.columns);
  }
  set(rowIndex, columnIndex, value) {
    this.matrix.set(this.rows - rowIndex - 1, columnIndex, value);
    return this;
  }
  get(rowIndex, columnIndex) {
    return this.matrix.get(this.rows - rowIndex - 1, columnIndex);
  }
}
class MatrixRowView extends BaseView {
  constructor(matrix, row) {
    checkRowIndex(matrix, row);
    super(matrix, 1, matrix.columns);
    this.row = row;
  }
  set(rowIndex, columnIndex, value) {
    this.matrix.set(this.row, columnIndex, value);
    return this;
  }
  get(rowIndex, columnIndex) {
    return this.matrix.get(this.row, columnIndex);
  }
}
class MatrixRowSelectionView extends BaseView {
  constructor(matrix, rowIndices) {
    checkRowIndices(matrix, rowIndices);
    super(matrix, rowIndices.length, matrix.columns);
    this.rowIndices = rowIndices;
  }
  set(rowIndex, columnIndex, value) {
    this.matrix.set(this.rowIndices[rowIndex], columnIndex, value);
    return this;
  }
  get(rowIndex, columnIndex) {
    return this.matrix.get(this.rowIndices[rowIndex], columnIndex);
  }
}
class MatrixSelectionView extends BaseView {
  constructor(matrix, rowIndices, columnIndices) {
    checkRowIndices(matrix, rowIndices);
    checkColumnIndices(matrix, columnIndices);
    super(matrix, rowIndices.length, columnIndices.length);
    this.rowIndices = rowIndices;
    this.columnIndices = columnIndices;
  }
  set(rowIndex, columnIndex, value) {
    this.matrix.set(this.rowIndices[rowIndex], this.columnIndices[columnIndex], value);
    return this;
  }
  get(rowIndex, columnIndex) {
    return this.matrix.get(this.rowIndices[rowIndex], this.columnIndices[columnIndex]);
  }
}
class MatrixSubView extends BaseView {
  constructor(matrix, startRow, endRow, startColumn, endColumn) {
    checkRange$1(matrix, startRow, endRow, startColumn, endColumn);
    super(matrix, endRow - startRow + 1, endColumn - startColumn + 1);
    this.startRow = startRow;
    this.startColumn = startColumn;
  }
  set(rowIndex, columnIndex, value) {
    this.matrix.set(this.startRow + rowIndex, this.startColumn + columnIndex, value);
    return this;
  }
  get(rowIndex, columnIndex) {
    return this.matrix.get(this.startRow + rowIndex, this.startColumn + columnIndex);
  }
}
class MatrixTransposeView extends BaseView {
  constructor(matrix) {
    super(matrix, matrix.columns, matrix.rows);
  }
  set(rowIndex, columnIndex, value) {
    this.matrix.set(columnIndex, rowIndex, value);
    return this;
  }
  get(rowIndex, columnIndex) {
    return this.matrix.get(columnIndex, rowIndex);
  }
}
class WrapperMatrix1D extends AbstractMatrix {
  constructor(data, options = {}) {
    const {
      rows = 1
    } = options;
    if (data.length % rows !== 0) {
      throw new Error('the data length is not divisible by the number of rows');
    }
    super();
    this.rows = rows;
    this.columns = data.length / rows;
    this.data = data;
  }
  set(rowIndex, columnIndex, value) {
    let index = this._calculateIndex(rowIndex, columnIndex);
    this.data[index] = value;
    return this;
  }
  get(rowIndex, columnIndex) {
    let index = this._calculateIndex(rowIndex, columnIndex);
    return this.data[index];
  }
  _calculateIndex(row, column) {
    return row * this.columns + column;
  }
}
class WrapperMatrix2D extends AbstractMatrix {
  constructor(data) {
    super();
    this.data = data;
    this.rows = data.length;
    this.columns = data[0].length;
  }
  set(rowIndex, columnIndex, value) {
    this.data[rowIndex][columnIndex] = value;
    return this;
  }
  get(rowIndex, columnIndex) {
    return this.data[rowIndex][columnIndex];
  }
}
function wrap(array, options) {
  if (isAnyArray$1(array)) {
    if (array[0] && isAnyArray$1(array[0])) {
      return new WrapperMatrix2D(array);
    } else {
      return new WrapperMatrix1D(array, options);
    }
  } else {
    throw new Error('the argument is not an array');
  }
}
let LuDecomposition$1 = class LuDecomposition {
  constructor(matrix) {
    matrix = WrapperMatrix2D.checkMatrix(matrix);
    let lu = matrix.clone();
    let rows = lu.rows;
    let columns = lu.columns;
    let pivotVector = new Float64Array(rows);
    let pivotSign = 1;
    let i, j, k, p, s, t, v;
    let LUcolj, kmax;
    for (i = 0; i < rows; i++) {
      pivotVector[i] = i;
    }
    LUcolj = new Float64Array(rows);
    for (j = 0; j < columns; j++) {
      for (i = 0; i < rows; i++) {
        LUcolj[i] = lu.get(i, j);
      }
      for (i = 0; i < rows; i++) {
        kmax = Math.min(i, j);
        s = 0;
        for (k = 0; k < kmax; k++) {
          s += lu.get(i, k) * LUcolj[k];
        }
        LUcolj[i] -= s;
        lu.set(i, j, LUcolj[i]);
      }
      p = j;
      for (i = j + 1; i < rows; i++) {
        if (Math.abs(LUcolj[i]) > Math.abs(LUcolj[p])) {
          p = i;
        }
      }
      if (p !== j) {
        for (k = 0; k < columns; k++) {
          t = lu.get(p, k);
          lu.set(p, k, lu.get(j, k));
          lu.set(j, k, t);
        }
        v = pivotVector[p];
        pivotVector[p] = pivotVector[j];
        pivotVector[j] = v;
        pivotSign = -pivotSign;
      }
      if (j < rows && lu.get(j, j) !== 0) {
        for (i = j + 1; i < rows; i++) {
          lu.set(i, j, lu.get(i, j) / lu.get(j, j));
        }
      }
    }
    this.LU = lu;
    this.pivotVector = pivotVector;
    this.pivotSign = pivotSign;
  }
  isSingular() {
    let data = this.LU;
    let col = data.columns;
    for (let j = 0; j < col; j++) {
      if (data.get(j, j) === 0) {
        return true;
      }
    }
    return false;
  }
  solve(value) {
    value = Matrix$2.checkMatrix(value);
    let lu = this.LU;
    let rows = lu.rows;
    if (rows !== value.rows) {
      throw new Error('Invalid matrix dimensions');
    }
    if (this.isSingular()) {
      throw new Error('LU matrix is singular');
    }
    let count = value.columns;
    let X = value.subMatrixRow(this.pivotVector, 0, count - 1);
    let columns = lu.columns;
    let i, j, k;
    for (k = 0; k < columns; k++) {
      for (i = k + 1; i < columns; i++) {
        for (j = 0; j < count; j++) {
          X.set(i, j, X.get(i, j) - X.get(k, j) * lu.get(i, k));
        }
      }
    }
    for (k = columns - 1; k >= 0; k--) {
      for (j = 0; j < count; j++) {
        X.set(k, j, X.get(k, j) / lu.get(k, k));
      }
      for (i = 0; i < k; i++) {
        for (j = 0; j < count; j++) {
          X.set(i, j, X.get(i, j) - X.get(k, j) * lu.get(i, k));
        }
      }
    }
    return X;
  }
  get determinant() {
    let data = this.LU;
    if (!data.isSquare()) {
      throw new Error('Matrix must be square');
    }
    let determinant = this.pivotSign;
    let col = data.columns;
    for (let j = 0; j < col; j++) {
      determinant *= data.get(j, j);
    }
    return determinant;
  }
  get lowerTriangularMatrix() {
    let data = this.LU;
    let rows = data.rows;
    let columns = data.columns;
    let X = new Matrix$2(rows, columns);
    for (let i = 0; i < rows; i++) {
      for (let j = 0; j < columns; j++) {
        if (i > j) {
          X.set(i, j, data.get(i, j));
        } else if (i === j) {
          X.set(i, j, 1);
        } else {
          X.set(i, j, 0);
        }
      }
    }
    return X;
  }
  get upperTriangularMatrix() {
    let data = this.LU;
    let rows = data.rows;
    let columns = data.columns;
    let X = new Matrix$2(rows, columns);
    for (let i = 0; i < rows; i++) {
      for (let j = 0; j < columns; j++) {
        if (i <= j) {
          X.set(i, j, data.get(i, j));
        } else {
          X.set(i, j, 0);
        }
      }
    }
    return X;
  }
  get pivotPermutationVector() {
    return Array.from(this.pivotVector);
  }
};

/**
 * Transpose a square matrix in place, without allocating a copy.
 * Used to restore the logical layout of decomposition outputs that were
 * accumulated in transposed storage for cache-sequential inner loops.
 * @param {import('../matrix').default} matrix - square matrix, mutated in place
 * @returns {import('../matrix').default} the same matrix
 */
function transposeSquareInPlace(matrix) {
  const data = matrix.data;
  const n = matrix.rows;
  for (let i = 0; i < n; i++) {
    const rowI = data[i];
    for (let j = i + 1; j < n; j++) {
      const tmp = rowI[j];
      rowI[j] = data[j][i];
      data[j][i] = tmp;
    }
  }
  return matrix;
}
function hypotenuse(a, b) {
  let r = 0;
  if (Math.abs(a) > Math.abs(b)) {
    r = b / a;
    return Math.abs(a) * Math.sqrt(1 + r * r);
  }
  if (b !== 0) {
    r = a / b;
    return Math.abs(b) * Math.sqrt(1 + r * r);
  }
  return 0;
}
class QrDecomposition {
  constructor(value) {
    value = WrapperMatrix2D.checkMatrix(value);
    let qr = value.clone();
    let m = value.rows;
    let n = value.columns;
    let rdiag = new Float64Array(n);
    let i, j, k, s;
    for (k = 0; k < n; k++) {
      let nrm = 0;
      for (i = k; i < m; i++) {
        nrm = hypotenuse(nrm, qr.get(i, k));
      }
      if (nrm !== 0) {
        if (qr.get(k, k) < 0) {
          nrm = -nrm;
        }
        for (i = k; i < m; i++) {
          qr.set(i, k, qr.get(i, k) / nrm);
        }
        qr.set(k, k, qr.get(k, k) + 1);
        for (j = k + 1; j < n; j++) {
          s = 0;
          for (i = k; i < m; i++) {
            s += qr.get(i, k) * qr.get(i, j);
          }
          s = -s / qr.get(k, k);
          for (i = k; i < m; i++) {
            qr.set(i, j, qr.get(i, j) + s * qr.get(i, k));
          }
        }
      }
      rdiag[k] = -nrm;
    }
    this.QR = qr;
    this.Rdiag = rdiag;
  }
  solve(value) {
    value = Matrix$2.checkMatrix(value);
    let qr = this.QR;
    let m = qr.rows;
    if (value.rows !== m) {
      throw new Error('Matrix row dimensions must agree');
    }
    if (!this.isFullRank()) {
      throw new Error('Matrix is rank deficient');
    }
    let count = value.columns;
    let X = value.clone();
    let n = qr.columns;
    let i, j, k, s;
    for (k = 0; k < n; k++) {
      for (j = 0; j < count; j++) {
        s = 0;
        for (i = k; i < m; i++) {
          s += qr.get(i, k) * X.get(i, j);
        }
        s = -s / qr.get(k, k);
        for (i = k; i < m; i++) {
          X.set(i, j, X.get(i, j) + s * qr.get(i, k));
        }
      }
    }
    for (k = n - 1; k >= 0; k--) {
      for (j = 0; j < count; j++) {
        X.set(k, j, X.get(k, j) / this.Rdiag[k]);
      }
      for (i = 0; i < k; i++) {
        for (j = 0; j < count; j++) {
          X.set(i, j, X.get(i, j) - X.get(k, j) * qr.get(i, k));
        }
      }
    }
    return X.subMatrix(0, n - 1, 0, count - 1);
  }
  isFullRank() {
    let columns = this.QR.columns;
    for (let i = 0; i < columns; i++) {
      if (this.Rdiag[i] === 0) {
        return false;
      }
    }
    return true;
  }
  get upperTriangularMatrix() {
    let qr = this.QR;
    let n = qr.columns;
    let X = new Matrix$2(n, n);
    let i, j;
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++) {
        if (i < j) {
          X.set(i, j, qr.get(i, j));
        } else if (i === j) {
          X.set(i, j, this.Rdiag[i]);
        } else {
          X.set(i, j, 0);
        }
      }
    }
    return X;
  }
  get orthogonalMatrix() {
    let qr = this.QR;
    let rows = qr.rows;
    let columns = qr.columns;
    let X = new Matrix$2(rows, columns);
    let i, j, k, s;
    for (k = columns - 1; k >= 0; k--) {
      for (i = 0; i < rows; i++) {
        X.set(i, k, 0);
      }
      X.set(k, k, 1);
      for (j = k; j < columns; j++) {
        if (qr.get(k, k) !== 0) {
          s = 0;
          for (i = k; i < rows; i++) {
            s += qr.get(i, k) * X.get(i, j);
          }
          s = -s / qr.get(k, k);
          for (i = k; i < rows; i++) {
            X.set(i, j, X.get(i, j) + s * qr.get(i, k));
          }
        }
      }
    }
    return X;
  }
}
class SingularValueDecomposition {
  constructor(value, options = {}) {
    value = WrapperMatrix2D.checkMatrix(value);
    if (value.isEmpty()) {
      throw new Error('Matrix must be non-empty');
    }
    let m = value.rows;
    let n = value.columns;
    const {
      computeLeftSingularVectors = true,
      computeRightSingularVectors = true,
      autoTranspose = false
    } = options;
    let wantu = Boolean(computeLeftSingularVectors);
    let wantv = Boolean(computeRightSingularVectors);

    // Work on the transpose of the input so the hot inner loops (which iterate
    // over rows for a fixed column) scan memory sequentially in the row-major
    // backing store. `at` holds the transpose: at.get(j, i) === a.get(i, j)
    // where `a` is the logical m x n working matrix.
    let swapped = false;
    let at;
    if (m < n) {
      if (!autoTranspose) {
        // eslint-disable-next-line no-console
        console.warn('Computing SVD on a matrix with more columns than rows. Consider enabling autoTranspose');
        at = value.transpose();
      } else {
        at = value.clone();
        m = value.columns;
        n = value.rows;
        swapped = true;
        let aux = wantu;
        wantu = wantv;
        wantv = aux;
      }
    } else {
      at = value.transpose();
    }
    let nu = Math.min(m, n);
    let ni = Math.min(m + 1, n);
    let s = new Float64Array(ni);
    // U and V are stored transposed during the computation so the inner loops
    // (which always vary the row index) scan memory sequentially. They are
    // transposed back to their logical layout before being returned.
    // Ut.get(j, i) === U.get(i, j) and Vt.get(j, i) === V.get(i, j).
    let U = new Matrix$2(nu, m);
    let V = new Matrix$2(n, n);
    let e = new Float64Array(n);
    let work = new Float64Array(m);
    let si = new Float64Array(ni);
    for (let i = 0; i < ni; i++) si[i] = i;
    let nct = Math.min(m - 1, n);
    let nrt = Math.max(0, Math.min(n - 2, m));
    let mrc = Math.max(nct, nrt);
    for (let k = 0; k < mrc; k++) {
      if (k < nct) {
        s[k] = 0;
        for (let i = k; i < m; i++) {
          s[k] = hypotenuse(s[k], at.get(k, i));
        }
        if (s[k] !== 0) {
          if (at.get(k, k) < 0) {
            s[k] = -s[k];
          }
          for (let i = k; i < m; i++) {
            at.set(k, i, at.get(k, i) / s[k]);
          }
          at.set(k, k, at.get(k, k) + 1);
        }
        s[k] = -s[k];
      }
      for (let j = k + 1; j < n; j++) {
        if (k < nct && s[k] !== 0) {
          let t = 0;
          for (let i = k; i < m; i++) {
            t += at.get(k, i) * at.get(j, i);
          }
          t = -t / at.get(k, k);
          for (let i = k; i < m; i++) {
            at.set(j, i, at.get(j, i) + t * at.get(k, i));
          }
        }
        e[j] = at.get(j, k);
      }
      if (wantu && k < nct) {
        for (let i = k; i < m; i++) {
          U.set(k, i, at.get(k, i));
        }
      }
      if (k < nrt) {
        e[k] = 0;
        for (let i = k + 1; i < n; i++) {
          e[k] = hypotenuse(e[k], e[i]);
        }
        if (e[k] !== 0) {
          if (e[k + 1] < 0) {
            e[k] = 0 - e[k];
          }
          for (let i = k + 1; i < n; i++) {
            e[i] /= e[k];
          }
          e[k + 1] += 1;
        }
        e[k] = -e[k];
        if (k + 1 < m && e[k] !== 0) {
          for (let i = k + 1; i < m; i++) {
            work[i] = 0;
          }
          for (let i = k + 1; i < m; i++) {
            for (let j = k + 1; j < n; j++) {
              work[i] += e[j] * at.get(j, i);
            }
          }
          for (let j = k + 1; j < n; j++) {
            let t = -e[j] / e[k + 1];
            for (let i = k + 1; i < m; i++) {
              at.set(j, i, at.get(j, i) + t * work[i]);
            }
          }
        }
        if (wantv) {
          for (let i = k + 1; i < n; i++) {
            V.set(k, i, e[i]);
          }
        }
      }
    }
    let p = Math.min(n, m + 1);
    if (nct < n) {
      s[nct] = at.get(nct, nct);
    }
    if (m < p) {
      s[p - 1] = 0;
    }
    if (nrt + 1 < p) {
      e[nrt] = at.get(p - 1, nrt);
    }
    e[p - 1] = 0;
    if (wantu) {
      for (let j = nct; j < nu; j++) {
        for (let i = 0; i < m; i++) {
          U.set(j, i, 0);
        }
        U.set(j, j, 1);
      }
      for (let k = nct - 1; k >= 0; k--) {
        if (s[k] !== 0) {
          for (let j = k + 1; j < nu; j++) {
            let t = 0;
            for (let i = k; i < m; i++) {
              t += U.get(k, i) * U.get(j, i);
            }
            t = -t / U.get(k, k);
            for (let i = k; i < m; i++) {
              U.set(j, i, U.get(j, i) + t * U.get(k, i));
            }
          }
          for (let i = k; i < m; i++) {
            U.set(k, i, -U.get(k, i));
          }
          U.set(k, k, 1 + U.get(k, k));
          for (let i = 0; i < k - 1; i++) {
            U.set(k, i, 0);
          }
        } else {
          for (let i = 0; i < m; i++) {
            U.set(k, i, 0);
          }
          U.set(k, k, 1);
        }
      }
    }
    if (wantv) {
      for (let k = n - 1; k >= 0; k--) {
        if (k < nrt && e[k] !== 0) {
          for (let j = k + 1; j < n; j++) {
            let t = 0;
            for (let i = k + 1; i < n; i++) {
              t += V.get(k, i) * V.get(j, i);
            }
            t = -t / V.get(k, k + 1);
            for (let i = k + 1; i < n; i++) {
              V.set(j, i, V.get(j, i) + t * V.get(k, i));
            }
          }
        }
        for (let i = 0; i < n; i++) {
          V.set(k, i, 0);
        }
        V.set(k, k, 1);
      }
    }
    let pp = p - 1;
    let eps = Number.EPSILON;
    while (p > 0) {
      let k, kase;
      for (k = p - 2; k >= -1; k--) {
        if (k === -1) {
          break;
        }
        const alpha = Number.MIN_VALUE + eps * Math.abs(s[k] + Math.abs(s[k + 1]));
        if (Math.abs(e[k]) <= alpha || Number.isNaN(e[k])) {
          e[k] = 0;
          break;
        }
      }
      if (k === p - 2) {
        kase = 4;
      } else {
        let ks;
        for (ks = p - 1; ks >= k; ks--) {
          if (ks === k) {
            break;
          }
          let t = (ks !== p ? Math.abs(e[ks]) : 0) + (ks !== k + 1 ? Math.abs(e[ks - 1]) : 0);
          if (Math.abs(s[ks]) <= eps * t) {
            s[ks] = 0;
            break;
          }
        }
        if (ks === k) {
          kase = 3;
        } else if (ks === p - 1) {
          kase = 1;
        } else {
          kase = 2;
          k = ks;
        }
      }
      k++;
      switch (kase) {
        case 1:
          {
            let f = e[p - 2];
            e[p - 2] = 0;
            for (let j = p - 2; j >= k; j--) {
              let t = hypotenuse(s[j], f);
              let cs = s[j] / t;
              let sn = f / t;
              s[j] = t;
              if (j !== k) {
                f = -sn * e[j - 1];
                e[j - 1] = cs * e[j - 1];
              }
              if (wantv) {
                for (let i = 0; i < n; i++) {
                  t = cs * V.get(j, i) + sn * V.get(p - 1, i);
                  V.set(p - 1, i, -sn * V.get(j, i) + cs * V.get(p - 1, i));
                  V.set(j, i, t);
                }
              }
            }
            break;
          }
        case 2:
          {
            let f = e[k - 1];
            e[k - 1] = 0;
            for (let j = k; j < p; j++) {
              let t = hypotenuse(s[j], f);
              let cs = s[j] / t;
              let sn = f / t;
              s[j] = t;
              f = -sn * e[j];
              e[j] = cs * e[j];
              if (wantu) {
                for (let i = 0; i < m; i++) {
                  t = cs * U.get(j, i) + sn * U.get(k - 1, i);
                  U.set(k - 1, i, -sn * U.get(j, i) + cs * U.get(k - 1, i));
                  U.set(j, i, t);
                }
              }
            }
            break;
          }
        case 3:
          {
            const scale = Math.max(Math.abs(s[p - 1]), Math.abs(s[p - 2]), Math.abs(e[p - 2]), Math.abs(s[k]), Math.abs(e[k]));
            const sp = s[p - 1] / scale;
            const spm1 = s[p - 2] / scale;
            const epm1 = e[p - 2] / scale;
            const sk = s[k] / scale;
            const ek = e[k] / scale;
            const b = ((spm1 + sp) * (spm1 - sp) + epm1 * epm1) / 2;
            const c = sp * epm1 * (sp * epm1);
            let shift = 0;
            if (b !== 0 || c !== 0) {
              if (b < 0) {
                shift = 0 - Math.sqrt(b * b + c);
              } else {
                shift = Math.sqrt(b * b + c);
              }
              shift = c / (b + shift);
            }
            let f = (sk + sp) * (sk - sp) + shift;
            let g = sk * ek;
            for (let j = k; j < p - 1; j++) {
              let t = hypotenuse(f, g);
              if (t === 0) t = Number.MIN_VALUE;
              let cs = f / t;
              let sn = g / t;
              if (j !== k) {
                e[j - 1] = t;
              }
              f = cs * s[j] + sn * e[j];
              e[j] = cs * e[j] - sn * s[j];
              g = sn * s[j + 1];
              s[j + 1] = cs * s[j + 1];
              if (wantv) {
                for (let i = 0; i < n; i++) {
                  t = cs * V.get(j, i) + sn * V.get(j + 1, i);
                  V.set(j + 1, i, -sn * V.get(j, i) + cs * V.get(j + 1, i));
                  V.set(j, i, t);
                }
              }
              t = hypotenuse(f, g);
              if (t === 0) t = Number.MIN_VALUE;
              cs = f / t;
              sn = g / t;
              s[j] = t;
              f = cs * e[j] + sn * s[j + 1];
              s[j + 1] = -sn * e[j] + cs * s[j + 1];
              g = sn * e[j + 1];
              e[j + 1] = cs * e[j + 1];
              if (wantu && j < m - 1) {
                for (let i = 0; i < m; i++) {
                  t = cs * U.get(j, i) + sn * U.get(j + 1, i);
                  U.set(j + 1, i, -sn * U.get(j, i) + cs * U.get(j + 1, i));
                  U.set(j, i, t);
                }
              }
            }
            e[p - 2] = f;
            break;
          }
        case 4:
          {
            if (s[k] <= 0) {
              s[k] = s[k] < 0 ? -s[k] : 0;
              if (wantv) {
                for (let i = 0; i <= pp; i++) {
                  V.set(k, i, -V.get(k, i));
                }
              }
            }
            while (k < pp) {
              if (s[k] >= s[k + 1]) {
                break;
              }
              let t = s[k];
              s[k] = s[k + 1];
              s[k + 1] = t;
              if (wantv && k < n - 1) {
                for (let i = 0; i < n; i++) {
                  t = V.get(k + 1, i);
                  V.set(k + 1, i, V.get(k, i));
                  V.set(k, i, t);
                }
              }
              if (wantu && k < m - 1) {
                for (let i = 0; i < m; i++) {
                  t = U.get(k + 1, i);
                  U.set(k + 1, i, U.get(k, i));
                  U.set(k, i, t);
                }
              }
              k++;
            }
            p--;
            break;
          }
        // no default
      }
    }

    // Restore the logical (row-major) layout of the singular vectors, which were
    // accumulated in transposed storage for cache-sequential inner loops. V is
    // always square and U is square whenever the input is, so this is done in
    // place (no allocation) in the common case.
    U = U.isSquare() ? transposeSquareInPlace(U) : U.transpose();
    V = transposeSquareInPlace(V);
    if (swapped) {
      let tmp = V;
      V = U;
      U = tmp;
    }
    this.m = m;
    this.n = n;
    this.s = s;
    this.U = U;
    this.V = V;
  }
  solve(value) {
    let Y = value;
    let e = this.threshold;
    let scols = this.s.length;
    let Ls = Matrix$2.zeros(scols, scols);
    for (let i = 0; i < scols; i++) {
      if (Math.abs(this.s[i]) <= e) {
        Ls.set(i, i, 0);
      } else {
        Ls.set(i, i, 1 / this.s[i]);
      }
    }
    let U = this.U;
    let V = this.rightSingularVectors;
    let VL = V.mmul(Ls);
    let vrows = V.rows;
    let urows = U.rows;
    let VLU = Matrix$2.zeros(vrows, urows);
    for (let i = 0; i < vrows; i++) {
      for (let j = 0; j < urows; j++) {
        let sum = 0;
        for (let k = 0; k < scols; k++) {
          sum += VL.get(i, k) * U.get(j, k);
        }
        VLU.set(i, j, sum);
      }
    }
    return VLU.mmul(Y);
  }
  solveForDiagonal(value) {
    return this.solve(Matrix$2.diag(value));
  }
  inverse() {
    let V = this.V;
    let e = this.threshold;
    let vrows = V.rows;
    let vcols = V.columns;
    let X = new Matrix$2(vrows, this.s.length);
    for (let i = 0; i < vrows; i++) {
      for (let j = 0; j < vcols; j++) {
        if (Math.abs(this.s[j]) > e) {
          X.set(i, j, V.get(i, j) / this.s[j]);
        }
      }
    }
    let U = this.U;
    let urows = U.rows;
    let ucols = U.columns;
    let Y = new Matrix$2(vrows, urows);
    for (let i = 0; i < vrows; i++) {
      for (let j = 0; j < urows; j++) {
        let sum = 0;
        for (let k = 0; k < ucols; k++) {
          sum += X.get(i, k) * U.get(j, k);
        }
        Y.set(i, j, sum);
      }
    }
    return Y;
  }
  get condition() {
    return this.s[0] / this.s[Math.min(this.m, this.n) - 1];
  }
  get norm2() {
    return this.s[0];
  }
  get rank() {
    let tol = Math.max(this.m, this.n) * this.s[0] * Number.EPSILON;
    let r = 0;
    let s = this.s;
    for (let i = 0, ii = s.length; i < ii; i++) {
      if (s[i] > tol) {
        r++;
      }
    }
    return r;
  }
  get diagonal() {
    return Array.from(this.s);
  }
  get threshold() {
    return Number.EPSILON / 2 * Math.max(this.m, this.n) * this.s[0];
  }
  get leftSingularVectors() {
    return this.U;
  }
  get rightSingularVectors() {
    return this.V;
  }
  get diagonalMatrix() {
    return Matrix$2.diag(this.s);
  }
}
function inverse$1(matrix, useSVD = false) {
  matrix = WrapperMatrix2D.checkMatrix(matrix);
  if (useSVD) {
    return new SingularValueDecomposition(matrix).inverse();
  } else {
    return solve$1(matrix, Matrix$2.eye(matrix.rows));
  }
}
function solve$1(leftHandSide, rightHandSide, useSVD = false) {
  leftHandSide = WrapperMatrix2D.checkMatrix(leftHandSide);
  rightHandSide = WrapperMatrix2D.checkMatrix(rightHandSide);
  if (useSVD) {
    return new SingularValueDecomposition(leftHandSide).solve(rightHandSide);
  } else {
    return leftHandSide.isSquare() ? new LuDecomposition$1(leftHandSide).solve(rightHandSide) : new QrDecomposition(leftHandSide).solve(rightHandSide);
  }
}
function determinant(matrix) {
  matrix = Matrix$2.checkMatrix(matrix);
  if (matrix.isSquare()) {
    if (matrix.columns === 0) {
      return 1;
    }
    let a, b, c, d;
    if (matrix.columns === 2) {
      // 2 x 2 matrix
      a = matrix.get(0, 0);
      b = matrix.get(0, 1);
      c = matrix.get(1, 0);
      d = matrix.get(1, 1);
      return a * d - b * c;
    } else if (matrix.columns === 3) {
      // 3 x 3 matrix
      let subMatrix0, subMatrix1, subMatrix2;
      subMatrix0 = new MatrixSelectionView(matrix, [1, 2], [1, 2]);
      subMatrix1 = new MatrixSelectionView(matrix, [1, 2], [0, 2]);
      subMatrix2 = new MatrixSelectionView(matrix, [1, 2], [0, 1]);
      a = matrix.get(0, 0);
      b = matrix.get(0, 1);
      c = matrix.get(0, 2);
      return a * determinant(subMatrix0) - b * determinant(subMatrix1) + c * determinant(subMatrix2);
    } else {
      // general purpose determinant using the LU decomposition
      return new LuDecomposition$1(matrix).determinant;
    }
  } else {
    throw Error('determinant can only be calculated for a square matrix');
  }
}
function xrange(n, exception) {
  let range = [];
  for (let i = 0; i < n; i++) {
    if (i !== exception) {
      range.push(i);
    }
  }
  return range;
}
function dependenciesOneRow(error, matrix, index, thresholdValue = 10e-10, thresholdError = 10e-10) {
  if (error > thresholdError) {
    return new Array(matrix.rows + 1).fill(0);
  } else {
    let returnArray = matrix.addRow(index, [0]);
    for (let i = 0; i < returnArray.rows; i++) {
      if (Math.abs(returnArray.get(i, 0)) < thresholdValue) {
        returnArray.set(i, 0, 0);
      }
    }
    return returnArray.to1DArray();
  }
}
function linearDependencies(matrix, options = {}) {
  const {
    thresholdValue = 10e-10,
    thresholdError = 10e-10
  } = options;
  matrix = Matrix$2.checkMatrix(matrix);
  let n = matrix.rows;
  let results = new Matrix$2(n, n);
  for (let i = 0; i < n; i++) {
    let b = Matrix$2.columnVector(matrix.getRow(i));
    let Abis = matrix.subMatrixRow(xrange(n, i)).transpose();
    let svd = new SingularValueDecomposition(Abis);
    let x = svd.solve(b);
    let error = Matrix$2.sub(b, Abis.mmul(x)).abs().max();
    results.setRow(i, dependenciesOneRow(error, x, i, thresholdValue, thresholdError));
  }
  return results;
}
function pseudoInverse(matrix, threshold = Number.EPSILON) {
  matrix = Matrix$2.checkMatrix(matrix);
  if (matrix.isEmpty()) {
    // with a zero dimension, the pseudo-inverse is the transpose, since all 0xn and nx0 matrices are singular
    // (0xn)*(nx0)*(0xn) = 0xn
    // (nx0)*(0xn)*(nx0) = nx0
    return matrix.transpose();
  }
  let svdSolution = new SingularValueDecomposition(matrix, {
    autoTranspose: true
  });
  let U = svdSolution.leftSingularVectors;
  let V = svdSolution.rightSingularVectors;
  let s = svdSolution.diagonal;
  for (let i = 0; i < s.length; i++) {
    if (Math.abs(s[i]) > threshold) {
      s[i] = 1.0 / s[i];
    } else {
      s[i] = 0.0;
    }
  }
  return V.mmul(Matrix$2.diag(s).mmul(U.transpose()));
}
function covariance(xMatrix, yMatrix = xMatrix, options = {}) {
  xMatrix = new Matrix$2(xMatrix);
  let yIsSame = false;
  if (typeof yMatrix === 'object' && !Matrix$2.isMatrix(yMatrix) && !isAnyArray$1(yMatrix)) {
    options = yMatrix;
    yMatrix = xMatrix;
    yIsSame = true;
  } else {
    yMatrix = new Matrix$2(yMatrix);
  }
  if (xMatrix.rows !== yMatrix.rows) {
    throw new TypeError('Both matrices must have the same number of rows');
  }
  const {
    center = true
  } = options;
  if (center) {
    xMatrix = xMatrix.center('column');
    if (!yIsSame) {
      yMatrix = yMatrix.center('column');
    }
  }
  const cov = xMatrix.transposeMultiply(yMatrix);
  for (let i = 0; i < cov.rows; i++) {
    for (let j = 0; j < cov.columns; j++) {
      cov.set(i, j, cov.get(i, j) * (1 / (xMatrix.rows - 1)));
    }
  }
  return cov;
}
function correlation(xMatrix, yMatrix = xMatrix, options = {}) {
  xMatrix = new Matrix$2(xMatrix);
  let yIsSame = false;
  if (typeof yMatrix === 'object' && !Matrix$2.isMatrix(yMatrix) && !isAnyArray$1(yMatrix)) {
    options = yMatrix;
    yMatrix = xMatrix;
    yIsSame = true;
  } else {
    yMatrix = new Matrix$2(yMatrix);
  }
  if (xMatrix.rows !== yMatrix.rows) {
    throw new TypeError('Both matrices must have the same number of rows');
  }
  const {
    center = true,
    scale = true
  } = options;
  if (center) {
    xMatrix.center('column');
    if (!yIsSame) {
      yMatrix.center('column');
    }
  }
  if (scale) {
    xMatrix.scale('column');
    if (!yIsSame) {
      yMatrix.scale('column');
    }
  }
  const sdx = xMatrix.standardDeviation('column', {
    unbiased: true
  });
  const sdy = yIsSame ? sdx : yMatrix.standardDeviation('column', {
    unbiased: true
  });
  const corr = xMatrix.transposeMultiply(yMatrix);
  for (let i = 0; i < corr.rows; i++) {
    for (let j = 0; j < corr.columns; j++) {
      corr.set(i, j, corr.get(i, j) * (1 / (sdx[i] * sdy[j])) * (1 / (xMatrix.rows - 1)));
    }
  }
  return corr;
}
class EigenvalueDecomposition {
  constructor(matrix, options = {}) {
    const {
      assumeSymmetric = false
    } = options;
    matrix = WrapperMatrix2D.checkMatrix(matrix);
    if (!matrix.isSquare()) {
      throw new Error('Matrix is not a square matrix');
    }
    if (matrix.isEmpty()) {
      throw new Error('Matrix must be non-empty');
    }
    let n = matrix.columns;
    let V = new Matrix$2(n, n);
    let d = new Float64Array(n);
    let e = new Float64Array(n);
    let value = matrix;
    let i, j;
    let isSymmetric = false;
    if (assumeSymmetric) {
      isSymmetric = true;
    } else {
      isSymmetric = matrix.isSymmetric();
    }
    if (isSymmetric) {
      // tred2/tql2 access V almost exclusively down columns (the row index
      // varies in the hot loops). Storing V transposed turns those into
      // sequential row scans of the row-major backing store; we transpose it
      // back to the logical layout before returning. V.get(j, i) holds the
      // logical V(i, j).
      for (i = 0; i < n; i++) {
        for (j = 0; j < n; j++) {
          V.set(j, i, value.get(i, j));
        }
      }
      tred2(n, e, d, V);
      tql2(n, e, d, V);
      // V is square; restore the logical layout in place (no allocation).
      transposeSquareInPlace(V);
    } else {
      // The non-symmetric path (orthes/hqr2) has two O(n^3) phases with opposite
      // memory-layout preferences (the QR sweep favours column-major eigenvectors
      // while the back-transform favours row-major), so a single transposed
      // storage cannot help both. It is left in the original row-major layout.
      let H = new Matrix$2(n, n);
      let ort = new Float64Array(n);
      for (j = 0; j < n; j++) {
        for (i = 0; i < n; i++) {
          H.set(i, j, value.get(i, j));
        }
      }
      orthes(n, H, ort, V);
      hqr2(n, e, d, V, H);
    }
    this.n = n;
    this.e = e;
    this.d = d;
    this.V = V;
  }
  get realEigenvalues() {
    return Array.from(this.d);
  }
  get imaginaryEigenvalues() {
    return Array.from(this.e);
  }
  get eigenvectorMatrix() {
    return this.V;
  }
  get diagonalMatrix() {
    let n = this.n;
    let e = this.e;
    let d = this.d;
    let X = new Matrix$2(n, n);
    let i, j;
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++) {
        X.set(i, j, 0);
      }
      X.set(i, i, d[i]);
      if (e[i] > 0) {
        X.set(i, i + 1, e[i]);
      } else if (e[i] < 0) {
        X.set(i, i - 1, e[i]);
      }
    }
    return X;
  }
}
function tred2(n, e, d, V) {
  let f, g, h, i, j, k, hh, scale;
  for (j = 0; j < n; j++) {
    d[j] = V.get(j, n - 1);
  }
  for (i = n - 1; i > 0; i--) {
    scale = 0;
    h = 0;
    for (k = 0; k < i; k++) {
      scale = scale + Math.abs(d[k]);
    }
    if (scale === 0) {
      e[i] = d[i - 1];
      for (j = 0; j < i; j++) {
        d[j] = V.get(j, i - 1);
        V.set(j, i, 0);
        V.set(i, j, 0);
      }
    } else {
      for (k = 0; k < i; k++) {
        d[k] /= scale;
        h += d[k] * d[k];
      }
      f = d[i - 1];
      g = Math.sqrt(h);
      if (f > 0) {
        g = -g;
      }
      e[i] = scale * g;
      h = h - f * g;
      d[i - 1] = f - g;
      for (j = 0; j < i; j++) {
        e[j] = 0;
      }
      for (j = 0; j < i; j++) {
        f = d[j];
        V.set(i, j, f);
        g = e[j] + V.get(j, j) * f;
        for (k = j + 1; k <= i - 1; k++) {
          g += V.get(j, k) * d[k];
          e[k] += V.get(j, k) * f;
        }
        e[j] = g;
      }
      f = 0;
      for (j = 0; j < i; j++) {
        e[j] /= h;
        f += e[j] * d[j];
      }
      hh = f / (h + h);
      for (j = 0; j < i; j++) {
        e[j] -= hh * d[j];
      }
      for (j = 0; j < i; j++) {
        f = d[j];
        g = e[j];
        for (k = j; k <= i - 1; k++) {
          V.set(j, k, V.get(j, k) - (f * e[k] + g * d[k]));
        }
        d[j] = V.get(j, i - 1);
        V.set(j, i, 0);
      }
    }
    d[i] = h;
  }
  for (i = 0; i < n - 1; i++) {
    V.set(i, n - 1, V.get(i, i));
    V.set(i, i, 1);
    h = d[i + 1];
    if (h !== 0) {
      for (k = 0; k <= i; k++) {
        d[k] = V.get(i + 1, k) / h;
      }
      for (j = 0; j <= i; j++) {
        g = 0;
        for (k = 0; k <= i; k++) {
          g += V.get(i + 1, k) * V.get(j, k);
        }
        for (k = 0; k <= i; k++) {
          V.set(j, k, V.get(j, k) - g * d[k]);
        }
      }
    }
    for (k = 0; k <= i; k++) {
      V.set(i + 1, k, 0);
    }
  }
  for (j = 0; j < n; j++) {
    d[j] = V.get(j, n - 1);
    V.set(j, n - 1, 0);
  }
  V.set(n - 1, n - 1, 1);
  e[0] = 0;
}
function tql2(n, e, d, V) {
  let g, h, i, j, k, l, m, p, r, dl1, c, c2, c3, el1, s, s2;
  for (i = 1; i < n; i++) {
    e[i - 1] = e[i];
  }
  e[n - 1] = 0;
  let f = 0;
  let tst1 = 0;
  let eps = Number.EPSILON;
  for (l = 0; l < n; l++) {
    tst1 = Math.max(tst1, Math.abs(d[l]) + Math.abs(e[l]));
    m = l;
    while (m < n) {
      if (Math.abs(e[m]) <= eps * tst1) {
        break;
      }
      m++;
    }
    if (m > l) {
      do {
        g = d[l];
        p = (d[l + 1] - g) / (2 * e[l]);
        r = hypotenuse(p, 1);
        if (p < 0) {
          r = -r;
        }
        d[l] = e[l] / (p + r);
        d[l + 1] = e[l] * (p + r);
        dl1 = d[l + 1];
        h = g - d[l];
        for (i = l + 2; i < n; i++) {
          d[i] -= h;
        }
        f = f + h;
        p = d[m];
        c = 1;
        c2 = c;
        c3 = c;
        el1 = e[l + 1];
        s = 0;
        s2 = 0;
        for (i = m - 1; i >= l; i--) {
          c3 = c2;
          c2 = c;
          s2 = s;
          g = c * e[i];
          h = c * p;
          r = hypotenuse(p, e[i]);
          e[i + 1] = s * r;
          s = e[i] / r;
          c = p / r;
          p = c * d[i] - s * g;
          d[i + 1] = h + s * (c * g + s * d[i]);
          for (k = 0; k < n; k++) {
            h = V.get(i + 1, k);
            V.set(i + 1, k, s * V.get(i, k) + c * h);
            V.set(i, k, c * V.get(i, k) - s * h);
          }
        }
        p = -s * s2 * c3 * el1 * e[l] / dl1;
        e[l] = s * p;
        d[l] = c * p;
      } while (Math.abs(e[l]) > eps * tst1);
    }
    d[l] = d[l] + f;
    e[l] = 0;
  }
  for (i = 0; i < n - 1; i++) {
    k = i;
    p = d[i];
    for (j = i + 1; j < n; j++) {
      if (d[j] < p) {
        k = j;
        p = d[j];
      }
    }
    if (k !== i) {
      d[k] = d[i];
      d[i] = p;
      for (j = 0; j < n; j++) {
        p = V.get(i, j);
        V.set(i, j, V.get(k, j));
        V.set(k, j, p);
      }
    }
  }
}
function orthes(n, H, ort, V) {
  let low = 0;
  let high = n - 1;
  let f, g, h, i, j, m;
  let scale;
  for (m = low + 1; m <= high - 1; m++) {
    scale = 0;
    for (i = m; i <= high; i++) {
      scale = scale + Math.abs(H.get(i, m - 1));
    }
    if (scale !== 0) {
      h = 0;
      for (i = high; i >= m; i--) {
        ort[i] = H.get(i, m - 1) / scale;
        h += ort[i] * ort[i];
      }
      g = Math.sqrt(h);
      if (ort[m] > 0) {
        g = -g;
      }
      h = h - ort[m] * g;
      ort[m] = ort[m] - g;
      for (j = m; j < n; j++) {
        f = 0;
        for (i = high; i >= m; i--) {
          f += ort[i] * H.get(i, j);
        }
        f = f / h;
        for (i = m; i <= high; i++) {
          H.set(i, j, H.get(i, j) - f * ort[i]);
        }
      }
      for (i = 0; i <= high; i++) {
        f = 0;
        for (j = high; j >= m; j--) {
          f += ort[j] * H.get(i, j);
        }
        f = f / h;
        for (j = m; j <= high; j++) {
          H.set(i, j, H.get(i, j) - f * ort[j]);
        }
      }
      ort[m] = scale * ort[m];
      H.set(m, m - 1, scale * g);
    }
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      V.set(i, j, i === j ? 1 : 0);
    }
  }
  for (m = high - 1; m >= low + 1; m--) {
    if (H.get(m, m - 1) !== 0) {
      for (i = m + 1; i <= high; i++) {
        ort[i] = H.get(i, m - 1);
      }
      for (j = m; j <= high; j++) {
        g = 0;
        for (i = m; i <= high; i++) {
          g += ort[i] * V.get(i, j);
        }
        g = g / ort[m] / H.get(m, m - 1);
        for (i = m; i <= high; i++) {
          V.set(i, j, V.get(i, j) + g * ort[i]);
        }
      }
    }
  }
}
function hqr2(nn, e, d, V, H) {
  let n = nn - 1;
  let low = 0;
  let high = nn - 1;
  let eps = Number.EPSILON;
  let exshift = 0;
  let norm = 0;
  let p = 0;
  let q = 0;
  let r = 0;
  let s = 0;
  let z = 0;
  let iter = 0;
  let i, j, k, l, m, t, w, x, y;
  let ra, sa, vr, vi;
  let notlast, cdivres;
  for (i = 0; i < nn; i++) {
    if (i < low || i > high) {
      d[i] = H.get(i, i);
      e[i] = 0;
    }
    for (j = Math.max(i - 1, 0); j < nn; j++) {
      norm = norm + Math.abs(H.get(i, j));
    }
  }
  while (n >= low) {
    l = n;
    while (l > low) {
      s = Math.abs(H.get(l - 1, l - 1)) + Math.abs(H.get(l, l));
      if (s === 0) {
        s = norm;
      }
      if (Math.abs(H.get(l, l - 1)) < eps * s) {
        break;
      }
      l--;
    }
    if (l === n) {
      H.set(n, n, H.get(n, n) + exshift);
      d[n] = H.get(n, n);
      e[n] = 0;
      n--;
      iter = 0;
    } else if (l === n - 1) {
      w = H.get(n, n - 1) * H.get(n - 1, n);
      p = (H.get(n - 1, n - 1) - H.get(n, n)) / 2;
      q = p * p + w;
      z = Math.sqrt(Math.abs(q));
      H.set(n, n, H.get(n, n) + exshift);
      H.set(n - 1, n - 1, H.get(n - 1, n - 1) + exshift);
      x = H.get(n, n);
      if (q >= 0) {
        z = p >= 0 ? p + z : p - z;
        d[n - 1] = x + z;
        d[n] = d[n - 1];
        if (z !== 0) {
          d[n] = x - w / z;
        }
        e[n - 1] = 0;
        e[n] = 0;
        x = H.get(n, n - 1);
        s = Math.abs(x) + Math.abs(z);
        p = x / s;
        q = z / s;
        r = Math.sqrt(p * p + q * q);
        p = p / r;
        q = q / r;
        for (j = n - 1; j < nn; j++) {
          z = H.get(n - 1, j);
          H.set(n - 1, j, q * z + p * H.get(n, j));
          H.set(n, j, q * H.get(n, j) - p * z);
        }
        for (i = 0; i <= n; i++) {
          z = H.get(i, n - 1);
          H.set(i, n - 1, q * z + p * H.get(i, n));
          H.set(i, n, q * H.get(i, n) - p * z);
        }
        for (i = low; i <= high; i++) {
          z = V.get(i, n - 1);
          V.set(i, n - 1, q * z + p * V.get(i, n));
          V.set(i, n, q * V.get(i, n) - p * z);
        }
      } else {
        d[n - 1] = x + p;
        d[n] = x + p;
        e[n - 1] = z;
        e[n] = -z;
      }
      n = n - 2;
      iter = 0;
    } else {
      x = H.get(n, n);
      y = 0;
      w = 0;
      if (l < n) {
        y = H.get(n - 1, n - 1);
        w = H.get(n, n - 1) * H.get(n - 1, n);
      }
      if (iter === 10) {
        exshift += x;
        for (i = low; i <= n; i++) {
          H.set(i, i, H.get(i, i) - x);
        }
        s = Math.abs(H.get(n, n - 1)) + Math.abs(H.get(n - 1, n - 2));
        // eslint-disable-next-line no-multi-assign
        x = y = 0.75 * s;
        w = -0.4375 * s * s;
      }
      if (iter === 30) {
        s = (y - x) / 2;
        s = s * s + w;
        if (s > 0) {
          s = Math.sqrt(s);
          if (y < x) {
            s = -s;
          }
          s = x - w / ((y - x) / 2 + s);
          for (i = low; i <= n; i++) {
            H.set(i, i, H.get(i, i) - s);
          }
          exshift += s;
          // eslint-disable-next-line no-multi-assign
          x = y = w = 0.964;
        }
      }
      iter = iter + 1;
      m = n - 2;
      while (m >= l) {
        z = H.get(m, m);
        r = x - z;
        s = y - z;
        p = (r * s - w) / H.get(m + 1, m) + H.get(m, m + 1);
        q = H.get(m + 1, m + 1) - z - r - s;
        r = H.get(m + 2, m + 1);
        s = Math.abs(p) + Math.abs(q) + Math.abs(r);
        p = p / s;
        q = q / s;
        r = r / s;
        if (m === l) {
          break;
        }
        if (Math.abs(H.get(m, m - 1)) * (Math.abs(q) + Math.abs(r)) < eps * (Math.abs(p) * (Math.abs(H.get(m - 1, m - 1)) + Math.abs(z) + Math.abs(H.get(m + 1, m + 1))))) {
          break;
        }
        m--;
      }
      for (i = m + 2; i <= n; i++) {
        H.set(i, i - 2, 0);
        if (i > m + 2) {
          H.set(i, i - 3, 0);
        }
      }
      for (k = m; k <= n - 1; k++) {
        notlast = k !== n - 1;
        if (k !== m) {
          p = H.get(k, k - 1);
          q = H.get(k + 1, k - 1);
          r = notlast ? H.get(k + 2, k - 1) : 0;
          x = Math.abs(p) + Math.abs(q) + Math.abs(r);
          if (x !== 0) {
            p = p / x;
            q = q / x;
            r = r / x;
          }
        }
        if (x === 0) {
          break;
        }
        s = Math.sqrt(p * p + q * q + r * r);
        if (p < 0) {
          s = -s;
        }
        if (s !== 0) {
          if (k !== m) {
            H.set(k, k - 1, -s * x);
          } else if (l !== m) {
            H.set(k, k - 1, -H.get(k, k - 1));
          }
          p = p + s;
          x = p / s;
          y = q / s;
          z = r / s;
          q = q / p;
          r = r / p;
          for (j = k; j < nn; j++) {
            p = H.get(k, j) + q * H.get(k + 1, j);
            if (notlast) {
              p = p + r * H.get(k + 2, j);
              H.set(k + 2, j, H.get(k + 2, j) - p * z);
            }
            H.set(k, j, H.get(k, j) - p * x);
            H.set(k + 1, j, H.get(k + 1, j) - p * y);
          }
          for (i = 0; i <= Math.min(n, k + 3); i++) {
            p = x * H.get(i, k) + y * H.get(i, k + 1);
            if (notlast) {
              p = p + z * H.get(i, k + 2);
              H.set(i, k + 2, H.get(i, k + 2) - p * r);
            }
            H.set(i, k, H.get(i, k) - p);
            H.set(i, k + 1, H.get(i, k + 1) - p * q);
          }
          for (i = low; i <= high; i++) {
            p = x * V.get(i, k) + y * V.get(i, k + 1);
            if (notlast) {
              p = p + z * V.get(i, k + 2);
              V.set(i, k + 2, V.get(i, k + 2) - p * r);
            }
            V.set(i, k, V.get(i, k) - p);
            V.set(i, k + 1, V.get(i, k + 1) - p * q);
          }
        }
      }
    }
  }
  if (norm === 0) {
    return;
  }
  for (n = nn - 1; n >= 0; n--) {
    p = d[n];
    q = e[n];
    if (q === 0) {
      l = n;
      H.set(n, n, 1);
      for (i = n - 1; i >= 0; i--) {
        w = H.get(i, i) - p;
        r = 0;
        for (j = l; j <= n; j++) {
          r = r + H.get(i, j) * H.get(j, n);
        }
        if (e[i] < 0) {
          z = w;
          s = r;
        } else {
          l = i;
          if (e[i] === 0) {
            H.set(i, n, w !== 0 ? -r / w : -r / (eps * norm));
          } else {
            x = H.get(i, i + 1);
            y = H.get(i + 1, i);
            q = (d[i] - p) * (d[i] - p) + e[i] * e[i];
            t = (x * s - z * r) / q;
            H.set(i, n, t);
            H.set(i + 1, n, Math.abs(x) > Math.abs(z) ? (-r - w * t) / x : (-s - y * t) / z);
          }
          t = Math.abs(H.get(i, n));
          if (eps * t * t > 1) {
            for (j = i; j <= n; j++) {
              H.set(j, n, H.get(j, n) / t);
            }
          }
        }
      }
    } else if (q < 0) {
      l = n - 1;
      if (Math.abs(H.get(n, n - 1)) > Math.abs(H.get(n - 1, n))) {
        H.set(n - 1, n - 1, q / H.get(n, n - 1));
        H.set(n - 1, n, -(H.get(n, n) - p) / H.get(n, n - 1));
      } else {
        cdivres = cdiv(0, -H.get(n - 1, n), H.get(n - 1, n - 1) - p, q);
        H.set(n - 1, n - 1, cdivres[0]);
        H.set(n - 1, n, cdivres[1]);
      }
      H.set(n, n - 1, 0);
      H.set(n, n, 1);
      for (i = n - 2; i >= 0; i--) {
        ra = 0;
        sa = 0;
        for (j = l; j <= n; j++) {
          ra = ra + H.get(i, j) * H.get(j, n - 1);
          sa = sa + H.get(i, j) * H.get(j, n);
        }
        w = H.get(i, i) - p;
        if (e[i] < 0) {
          z = w;
          r = ra;
          s = sa;
        } else {
          l = i;
          if (e[i] === 0) {
            cdivres = cdiv(-ra, -sa, w, q);
            H.set(i, n - 1, cdivres[0]);
            H.set(i, n, cdivres[1]);
          } else {
            x = H.get(i, i + 1);
            y = H.get(i + 1, i);
            vr = (d[i] - p) * (d[i] - p) + e[i] * e[i] - q * q;
            vi = (d[i] - p) * 2 * q;
            if (vr === 0 && vi === 0) {
              vr = eps * norm * (Math.abs(w) + Math.abs(q) + Math.abs(x) + Math.abs(y) + Math.abs(z));
            }
            cdivres = cdiv(x * r - z * ra + q * sa, x * s - z * sa - q * ra, vr, vi);
            H.set(i, n - 1, cdivres[0]);
            H.set(i, n, cdivres[1]);
            if (Math.abs(x) > Math.abs(z) + Math.abs(q)) {
              H.set(i + 1, n - 1, (-ra - w * H.get(i, n - 1) + q * H.get(i, n)) / x);
              H.set(i + 1, n, (-sa - w * H.get(i, n) - q * H.get(i, n - 1)) / x);
            } else {
              cdivres = cdiv(-r - y * H.get(i, n - 1), -s - y * H.get(i, n), z, q);
              H.set(i + 1, n - 1, cdivres[0]);
              H.set(i + 1, n, cdivres[1]);
            }
          }
          t = Math.max(Math.abs(H.get(i, n - 1)), Math.abs(H.get(i, n)));
          if (eps * t * t > 1) {
            for (j = i; j <= n; j++) {
              H.set(j, n - 1, H.get(j, n - 1) / t);
              H.set(j, n, H.get(j, n) / t);
            }
          }
        }
      }
    }
  }
  for (i = 0; i < nn; i++) {
    if (i < low || i > high) {
      for (j = i; j < nn; j++) {
        V.set(i, j, H.get(i, j));
      }
    }
  }
  for (j = nn - 1; j >= low; j--) {
    for (i = low; i <= high; i++) {
      z = 0;
      for (k = low; k <= Math.min(j, high); k++) {
        z = z + V.get(i, k) * H.get(k, j);
      }
      V.set(i, j, z);
    }
  }
}
function cdiv(xr, xi, yr, yi) {
  let r, d;
  if (Math.abs(yr) > Math.abs(yi)) {
    r = yi / yr;
    d = yr + r * yi;
    return [(xr + r * xi) / d, (xi - r * xr) / d];
  } else {
    r = yr / yi;
    d = yi + r * yr;
    return [(r * xr + xi) / d, (r * xi - xr) / d];
  }
}
let CholeskyDecomposition$1 = class CholeskyDecomposition {
  constructor(value) {
    value = WrapperMatrix2D.checkMatrix(value);
    if (!value.isSymmetric()) {
      throw new Error('Matrix is not symmetric');
    }
    let a = value;
    let dimension = a.rows;
    let l = new Matrix$2(dimension, dimension);
    let positiveDefinite = true;
    let i, j, k;
    for (j = 0; j < dimension; j++) {
      let d = 0;
      for (k = 0; k < j; k++) {
        let s = 0;
        for (i = 0; i < k; i++) {
          s += l.get(k, i) * l.get(j, i);
        }
        s = (a.get(j, k) - s) / l.get(k, k);
        l.set(j, k, s);
        d = d + s * s;
      }
      d = a.get(j, j) - d;
      positiveDefinite &&= d > 0;
      l.set(j, j, Math.sqrt(Math.max(d, 0)));
      for (k = j + 1; k < dimension; k++) {
        l.set(j, k, 0);
      }
    }
    this.L = l;
    this.positiveDefinite = positiveDefinite;
  }
  isPositiveDefinite() {
    return this.positiveDefinite;
  }
  solve(value) {
    value = WrapperMatrix2D.checkMatrix(value);
    let l = this.L;
    let dimension = l.rows;
    if (value.rows !== dimension) {
      throw new Error('Matrix dimensions do not match');
    }
    if (this.isPositiveDefinite() === false) {
      throw new Error('Matrix is not positive definite');
    }
    let count = value.columns;
    let B = value.clone();
    let i, j, k;
    for (k = 0; k < dimension; k++) {
      for (j = 0; j < count; j++) {
        for (i = 0; i < k; i++) {
          B.set(k, j, B.get(k, j) - B.get(i, j) * l.get(k, i));
        }
        B.set(k, j, B.get(k, j) / l.get(k, k));
      }
    }
    for (k = dimension - 1; k >= 0; k--) {
      for (j = 0; j < count; j++) {
        for (i = k + 1; i < dimension; i++) {
          B.set(k, j, B.get(k, j) - B.get(i, j) * l.get(i, k));
        }
        B.set(k, j, B.get(k, j) / l.get(k, k));
      }
    }
    return B;
  }
  get lowerTriangularMatrix() {
    return this.L;
  }
};
class nipals {
  constructor(X, options = {}) {
    X = WrapperMatrix2D.checkMatrix(X);
    let {
      Y
    } = options;
    const {
      scaleScores = false,
      maxIterations = 1000,
      terminationCriteria = 1e-10
    } = options;
    let u;
    if (Y) {
      if (isAnyArray$1(Y) && typeof Y[0] === 'number') {
        Y = Matrix$2.columnVector(Y);
      } else {
        Y = WrapperMatrix2D.checkMatrix(Y);
      }
      if (Y.rows !== X.rows) {
        throw new Error('Y should have the same number of rows as X');
      }
      u = Y.getColumnVector(0);
    } else {
      u = X.getColumnVector(0);
    }
    let diff = 1;
    let t, q, w, tOld;
    for (let counter = 0; counter < maxIterations && diff > terminationCriteria; counter++) {
      w = X.transpose().mmul(u).div(u.transpose().mmul(u).get(0, 0));
      w = w.div(w.norm());
      t = X.mmul(w).div(w.transpose().mmul(w).get(0, 0));
      if (counter > 0) {
        diff = t.clone().sub(tOld).pow(2).sum();
      }
      tOld = t.clone();
      if (Y) {
        q = Y.transpose().mmul(t).div(t.transpose().mmul(t).get(0, 0));
        q = q.div(q.norm());
        u = Y.mmul(q).div(q.transpose().mmul(q).get(0, 0));
      } else {
        u = t;
      }
    }
    if (Y) {
      let p = X.transpose().mmul(t).div(t.transpose().mmul(t).get(0, 0));
      p = p.div(p.norm());
      let xResidual = X.clone().sub(t.clone().mmul(p.transpose()));
      let residual = u.transpose().mmul(t).div(t.transpose().mmul(t).get(0, 0));
      let yResidual = Y.clone().sub(t.clone().mulS(residual.get(0, 0)).mmul(q.transpose()));
      this.t = t;
      this.p = p.transpose();
      this.w = w.transpose();
      this.q = q;
      this.u = u;
      this.s = t.transpose().mmul(t);
      this.xResidual = xResidual;
      this.yResidual = yResidual;
      this.betas = residual;
    } else {
      this.w = w.transpose();
      this.s = t.transpose().mmul(t).sqrt();
      if (scaleScores) {
        this.t = t.clone().div(this.s.get(0, 0));
      } else {
        this.t = t;
      }
      this.xResidual = X.sub(t.mmul(w.transpose()));
    }
  }
}
matrix$1.AbstractMatrix = AbstractMatrix;
matrix$1.CHO = CholeskyDecomposition$1;
var CholeskyDecomposition_1 = matrix$1.CholeskyDecomposition = CholeskyDecomposition$1;
matrix$1.DistanceMatrix = DistanceMatrix;
matrix$1.EVD = EigenvalueDecomposition;
matrix$1.EigenvalueDecomposition = EigenvalueDecomposition;
matrix$1.LU = LuDecomposition$1;
var LuDecomposition_1 = matrix$1.LuDecomposition = LuDecomposition$1;
var Matrix_1 = matrix$1.Matrix = Matrix$2;
matrix$1.MatrixColumnSelectionView = MatrixColumnSelectionView;
matrix$1.MatrixColumnView = MatrixColumnView;
matrix$1.MatrixFlipColumnView = MatrixFlipColumnView;
matrix$1.MatrixFlipRowView = MatrixFlipRowView;
matrix$1.MatrixRowSelectionView = MatrixRowSelectionView;
matrix$1.MatrixRowView = MatrixRowView;
matrix$1.MatrixSelectionView = MatrixSelectionView;
matrix$1.MatrixSubView = MatrixSubView;
matrix$1.MatrixTransposeView = MatrixTransposeView;
matrix$1.NIPALS = nipals;
matrix$1.Nipals = nipals;
matrix$1.QR = QrDecomposition;
matrix$1.QrDecomposition = QrDecomposition;
matrix$1.SVD = SingularValueDecomposition;
matrix$1.SingularValueDecomposition = SingularValueDecomposition;
matrix$1.SymmetricMatrix = SymmetricMatrix;
matrix$1.WrapperMatrix1D = WrapperMatrix1D;
matrix$1.WrapperMatrix2D = WrapperMatrix2D;
matrix$1.correlation = correlation;
matrix$1.covariance = covariance;
var _default = matrix$1.default = Matrix$2;
matrix$1.determinant = determinant;
var inverse_1 = matrix$1.inverse = inverse$1;
matrix$1.linearDependencies = linearDependencies;
matrix$1.pseudoInverse = pseudoInverse;
var solve_1 = matrix$1.solve = solve$1;
matrix$1.wrap = wrap;

const CholeskyDecomposition = CholeskyDecomposition_1;
const LuDecomposition = LuDecomposition_1;
const Matrix$1 = Matrix_1;
_default.Matrix ? _default.Matrix : Matrix_1;
const inverse = inverse_1;
const solve = solve_1;

const absDiff = (a, b) => Math.abs(a - b);
/**
 * Generate a cost matrix from two set of values using the function passed. by default it
 * generate the cost matrix of absolute value of differences.
 * @param rowsArray - array of values that will represent the rows of the cost matrix.
 * @param columnsArray - array of values that will represent the columns of the cost matrix.
 * @param options - options.
 * @returns a matrix instance with dimensions rowsArray.length x columnsArray.length.
 */
function xCostMatrix(rowsArray, columnsArray, options = {}) {
  const {
    fct = absDiff
  } = options;
  const nbRows = rowsArray.length;
  const nbColumns = columnsArray.length;
  const result = new Matrix$1(nbRows, nbColumns);
  for (let r = 0; r < nbRows; r++) {
    for (let c = 0; c < nbColumns; c++) {
      result.set(r, c, fct(rowsArray[r], columnsArray[c]));
    }
  }
  return result;
}

/**
 * Calculate an array of the same size that is the cumulative values
 * @param array - initial array
 */
function xCumulative(array) {
  if (!isAnyArray$2(array)) {
    throw new TypeError('input must be an array');
  }
  const newArray = new Float64Array(array.length);
  if (array.length === 0) return newArray;
  newArray[0] = array[0];
  for (let i = 1; i < array.length; i++) {
    newArray[i] = newArray[i - 1] + array[i];
  }
  return newArray;
}

/**
 * Computes the mean value of an array of values.
 * @param array - array of numbers
 * @param options - options
 */
function xMean(array, options = {}) {
  xCheck(array);
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(array, options);
  let sumValue = array[fromIndex];
  for (let i = fromIndex + 1; i <= toIndex; i++) {
    sumValue += array[i];
  }
  return sumValue / (toIndex - fromIndex + 1);
}

/**
 * Finds the variance of the data
 * @param values - the values of the array
 * @param options - options
 * @returns variance
 */
function xVariance(values, options = {}) {
  if (!isAnyArray$2(values)) {
    throw new TypeError('input must be an array');
  }
  const {
    unbiased = true,
    mean = xMean(values)
  } = options;
  let sqrError = 0;
  for (const value of values) {
    const x = value - mean;
    sqrError += x * x;
  }
  if (unbiased) {
    return sqrError / (values.length - 1);
  } else {
    return sqrError / values.length;
  }
}

/**
 * Finds the standard deviation for the data at hand
 * @param values - values in the data
 * @param options - options
 * @returns standard deviation
 */
function xStandardDeviation(values, options = {}) {
  return Math.sqrt(xVariance(values, options));
}

/**
 * Calculate distribution statistics of an array without providing options
 * This ensure that the statistics are calculated in the same way in all the packages
 * If the array is empty it will throw an error
 * If the array has a length of 1, sd will be NaN (unbiased calculation of sd)
 * @param array - data.
 * @returns q1, median, q3, min, max.
 */
function xDistributionStats(array) {
  const mean = xMean(array);
  return {
    ...xBoxPlotWithOutliers(array),
    mean,
    sd: xStandardDeviation(array, {
      mean
    }),
    nb: array.length
  };
}

/**
 * This function divide the first array by the second array or a constant value to each element of the first array
 * @param array1 - first array
 * @param array2 - second array or number
 * @param options - options
 */
function xDivide(array1, array2, options = {}) {
  let isConstant = false;
  let constant = 0;
  if (isAnyArray$2(array2)) {
    if (array1.length !== array2.length) {
      throw new RangeError('size of array1 and array2 must be identical');
    }
  } else {
    isConstant = true;
    constant = array2;
  }
  const array3 = getOutputArray(options.output, array1.length);
  if (isConstant) {
    for (let i = 0; i < array1.length; i++) {
      array3[i] = array1[i] / constant;
    }
  } else {
    for (let i = 0; i < array1.length; i++) {
      array3[i] = array1[i] / array2[i];
    }
  }
  return array3;
}

/**
 * Returns a copy of the data as a Float64Array.
 * @param array - array of numbers
 */
function xEnsureFloat64(array) {
  xCheck(array);
  if (array instanceof Float64Array) {
    return array.slice(0);
  }
  return Float64Array.from(array);
}

/**
 * Check the similarity between array created by xyEqualIntegrationVector
 * @param array1 - first equal integration vector.
 * @param array2 - second equal integration vector.
 * @param options - options.
 * @returns similarity score between 0 and 1.
 */
function xEqualIntegrationVectorSimilarity(array1, array2, options = {}) {
  const {
    recenter = true,
    similarityFct = (a, b) => Math.abs(a - b) <= 1e-9 * Math.max(1, Math.abs(a), Math.abs(b)) ? 1 : 0
  } = options;
  const depth1 = getDepth(array1);
  const depth2 = getDepth(array2);
  const depth = Math.min(depth1, depth2);
  // need to copy the array because we shift the data in place if recenter is true
  if (recenter) {
    array1 = array1.slice();
  }
  let similarity = 0;
  // we will compare level by level
  // and recenter the array at each level
  for (let level = 0; level < depth; level++) {
    const maxSimilarity = 1 / depth / (1 << level);
    for (let slot = 0; slot < 1 << level; slot++) {
      const index = (1 << level) - 1 + slot;
      const value1 = array1[index];
      const value2 = array2[index];
      similarity += similarityFct(value1, value2) * maxSimilarity;
      if (recenter) {
        shiftSubtree(array1, depth, level, slot, value2 - value1);
      }
    }
  }
  return similarity;
}
function shiftSubtree(array, depth, level, slot, shift) {
  for (let currentLevel = level; currentLevel < depth; currentLevel++) {
    const levelSlotShift = slot * (1 << currentLevel - level);
    const levelShift = (1 << currentLevel) - 1;
    const levelSlotSize = 1 << currentLevel - level;
    for (let slotIndex = levelSlotShift; slotIndex < levelSlotShift + levelSlotSize; slotIndex++) {
      const index = levelShift + slotIndex;
      array[index] += shift;
    }
  }
}
function getDepth(array) {
  const depth = Math.log2(array.length + 1);
  if (depth % 1 !== 0) {
    throw new Error('the array length is not a power of 2 minus 1');
  }
  return depth;
}

/**
 *  Returns the targetIndex
 * @param x - array of numbers
 * @param options - options
 */
function xGetTargetIndex(x, options = {}) {
  const {
    target,
    targetIndex
  } = options;
  if (targetIndex === undefined) {
    if (target !== undefined) {
      return xFindClosestIndex(x, target);
    } else {
      return 0;
    }
  }
  return targetIndex;
}

function FFT$1(size) {
  this.size = size | 0;
  if (this.size <= 1 || (this.size & this.size - 1) !== 0) throw new Error('FFT size must be a power of two and bigger than 1');
  this._csize = size << 1;

  // NOTE: Use of `var` is intentional for old V8 versions
  var table = new Array(this.size * 2);
  for (var i = 0; i < table.length; i += 2) {
    const angle = Math.PI * i / this.size;
    table[i] = Math.cos(angle);
    table[i + 1] = -Math.sin(angle);
  }
  this.table = table;

  // Find size's power of two
  var power = 0;
  for (var t = 1; this.size > t; t <<= 1) power++;

  // Calculate initial step's width:
  //   * If we are full radix-4 - it is 2x smaller to give inital len=8
  //   * Otherwise it is the same as `power` to give len=4
  this._width = power % 2 === 0 ? power - 1 : power;

  // Pre-compute bit-reversal patterns
  this._bitrev = new Array(1 << this._width);
  for (var j = 0; j < this._bitrev.length; j++) {
    this._bitrev[j] = 0;
    for (var shift = 0; shift < this._width; shift += 2) {
      var revShift = this._width - shift - 2;
      this._bitrev[j] |= (j >>> shift & 3) << revShift;
    }
  }
  this._out = null;
  this._data = null;
  this._inv = 0;
}
var fft = FFT$1;
FFT$1.prototype.fromComplexArray = function fromComplexArray(complex, storage) {
  var res = storage || new Array(complex.length >>> 1);
  for (var i = 0; i < complex.length; i += 2) res[i >>> 1] = complex[i];
  return res;
};
FFT$1.prototype.createComplexArray = function createComplexArray() {
  const res = new Array(this._csize);
  for (var i = 0; i < res.length; i++) res[i] = 0;
  return res;
};
FFT$1.prototype.toComplexArray = function toComplexArray(input, storage) {
  var res = storage || this.createComplexArray();
  for (var i = 0; i < res.length; i += 2) {
    res[i] = input[i >>> 1];
    res[i + 1] = 0;
  }
  return res;
};
FFT$1.prototype.completeSpectrum = function completeSpectrum(spectrum) {
  var size = this._csize;
  var half = size >>> 1;
  for (var i = 2; i < half; i += 2) {
    spectrum[size - i] = spectrum[i];
    spectrum[size - i + 1] = -spectrum[i + 1];
  }
};
FFT$1.prototype.transform = function transform(out, data) {
  if (out === data) throw new Error('Input and output buffers must be different');
  this._out = out;
  this._data = data;
  this._inv = 0;
  this._transform4();
  this._out = null;
  this._data = null;
};
FFT$1.prototype.realTransform = function realTransform(out, data) {
  if (out === data) throw new Error('Input and output buffers must be different');
  this._out = out;
  this._data = data;
  this._inv = 0;
  this._realTransform4();
  this._out = null;
  this._data = null;
};
FFT$1.prototype.inverseTransform = function inverseTransform(out, data) {
  if (out === data) throw new Error('Input and output buffers must be different');
  this._out = out;
  this._data = data;
  this._inv = 1;
  this._transform4();
  for (var i = 0; i < out.length; i++) out[i] /= this.size;
  this._out = null;
  this._data = null;
};

// radix-4 implementation
//
// NOTE: Uses of `var` are intentional for older V8 version that do not
// support both `let compound assignments` and `const phi`
FFT$1.prototype._transform4 = function _transform4() {
  var out = this._out;
  var size = this._csize;

  // Initial step (permute and transform)
  var width = this._width;
  var step = 1 << width;
  var len = size / step << 1;
  var outOff;
  var t;
  var bitrev = this._bitrev;
  if (len === 4) {
    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {
      const off = bitrev[t];
      this._singleTransform2(outOff, off, step);
    }
  } else {
    // len === 8
    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {
      const off = bitrev[t];
      this._singleTransform4(outOff, off, step);
    }
  }

  // Loop through steps in decreasing order
  var inv = this._inv ? -1 : 1;
  var table = this.table;
  for (step >>= 2; step >= 2; step >>= 2) {
    len = size / step << 1;
    var quarterLen = len >>> 2;

    // Loop through offsets in the data
    for (outOff = 0; outOff < size; outOff += len) {
      // Full case
      var limit = outOff + quarterLen;
      for (var i = outOff, k = 0; i < limit; i += 2, k += step) {
        const A = i;
        const B = A + quarterLen;
        const C = B + quarterLen;
        const D = C + quarterLen;

        // Original values
        const Ar = out[A];
        const Ai = out[A + 1];
        const Br = out[B];
        const Bi = out[B + 1];
        const Cr = out[C];
        const Ci = out[C + 1];
        const Dr = out[D];
        const Di = out[D + 1];

        // Middle values
        const MAr = Ar;
        const MAi = Ai;
        const tableBr = table[k];
        const tableBi = inv * table[k + 1];
        const MBr = Br * tableBr - Bi * tableBi;
        const MBi = Br * tableBi + Bi * tableBr;
        const tableCr = table[2 * k];
        const tableCi = inv * table[2 * k + 1];
        const MCr = Cr * tableCr - Ci * tableCi;
        const MCi = Cr * tableCi + Ci * tableCr;
        const tableDr = table[3 * k];
        const tableDi = inv * table[3 * k + 1];
        const MDr = Dr * tableDr - Di * tableDi;
        const MDi = Dr * tableDi + Di * tableDr;

        // Pre-Final values
        const T0r = MAr + MCr;
        const T0i = MAi + MCi;
        const T1r = MAr - MCr;
        const T1i = MAi - MCi;
        const T2r = MBr + MDr;
        const T2i = MBi + MDi;
        const T3r = inv * (MBr - MDr);
        const T3i = inv * (MBi - MDi);

        // Final values
        const FAr = T0r + T2r;
        const FAi = T0i + T2i;
        const FCr = T0r - T2r;
        const FCi = T0i - T2i;
        const FBr = T1r + T3i;
        const FBi = T1i - T3r;
        const FDr = T1r - T3i;
        const FDi = T1i + T3r;
        out[A] = FAr;
        out[A + 1] = FAi;
        out[B] = FBr;
        out[B + 1] = FBi;
        out[C] = FCr;
        out[C + 1] = FCi;
        out[D] = FDr;
        out[D + 1] = FDi;
      }
    }
  }
};

// radix-2 implementation
//
// NOTE: Only called for len=4
FFT$1.prototype._singleTransform2 = function _singleTransform2(outOff, off, step) {
  const out = this._out;
  const data = this._data;
  const evenR = data[off];
  const evenI = data[off + 1];
  const oddR = data[off + step];
  const oddI = data[off + step + 1];
  const leftR = evenR + oddR;
  const leftI = evenI + oddI;
  const rightR = evenR - oddR;
  const rightI = evenI - oddI;
  out[outOff] = leftR;
  out[outOff + 1] = leftI;
  out[outOff + 2] = rightR;
  out[outOff + 3] = rightI;
};

// radix-4
//
// NOTE: Only called for len=8
FFT$1.prototype._singleTransform4 = function _singleTransform4(outOff, off, step) {
  const out = this._out;
  const data = this._data;
  const inv = this._inv ? -1 : 1;
  const step2 = step * 2;
  const step3 = step * 3;

  // Original values
  const Ar = data[off];
  const Ai = data[off + 1];
  const Br = data[off + step];
  const Bi = data[off + step + 1];
  const Cr = data[off + step2];
  const Ci = data[off + step2 + 1];
  const Dr = data[off + step3];
  const Di = data[off + step3 + 1];

  // Pre-Final values
  const T0r = Ar + Cr;
  const T0i = Ai + Ci;
  const T1r = Ar - Cr;
  const T1i = Ai - Ci;
  const T2r = Br + Dr;
  const T2i = Bi + Di;
  const T3r = inv * (Br - Dr);
  const T3i = inv * (Bi - Di);

  // Final values
  const FAr = T0r + T2r;
  const FAi = T0i + T2i;
  const FBr = T1r + T3i;
  const FBi = T1i - T3r;
  const FCr = T0r - T2r;
  const FCi = T0i - T2i;
  const FDr = T1r - T3i;
  const FDi = T1i + T3r;
  out[outOff] = FAr;
  out[outOff + 1] = FAi;
  out[outOff + 2] = FBr;
  out[outOff + 3] = FBi;
  out[outOff + 4] = FCr;
  out[outOff + 5] = FCi;
  out[outOff + 6] = FDr;
  out[outOff + 7] = FDi;
};

// Real input radix-4 implementation
FFT$1.prototype._realTransform4 = function _realTransform4() {
  var out = this._out;
  var size = this._csize;

  // Initial step (permute and transform)
  var width = this._width;
  var step = 1 << width;
  var len = size / step << 1;
  var outOff;
  var t;
  var bitrev = this._bitrev;
  if (len === 4) {
    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {
      const off = bitrev[t];
      this._singleRealTransform2(outOff, off >>> 1, step >>> 1);
    }
  } else {
    // len === 8
    for (outOff = 0, t = 0; outOff < size; outOff += len, t++) {
      const off = bitrev[t];
      this._singleRealTransform4(outOff, off >>> 1, step >>> 1);
    }
  }

  // Loop through steps in decreasing order
  var inv = this._inv ? -1 : 1;
  var table = this.table;
  for (step >>= 2; step >= 2; step >>= 2) {
    len = size / step << 1;
    var halfLen = len >>> 1;
    var quarterLen = halfLen >>> 1;
    var hquarterLen = quarterLen >>> 1;

    // Loop through offsets in the data
    for (outOff = 0; outOff < size; outOff += len) {
      for (var i = 0, k = 0; i <= hquarterLen; i += 2, k += step) {
        var A = outOff + i;
        var B = A + quarterLen;
        var C = B + quarterLen;
        var D = C + quarterLen;

        // Original values
        var Ar = out[A];
        var Ai = out[A + 1];
        var Br = out[B];
        var Bi = out[B + 1];
        var Cr = out[C];
        var Ci = out[C + 1];
        var Dr = out[D];
        var Di = out[D + 1];

        // Middle values
        var MAr = Ar;
        var MAi = Ai;
        var tableBr = table[k];
        var tableBi = inv * table[k + 1];
        var MBr = Br * tableBr - Bi * tableBi;
        var MBi = Br * tableBi + Bi * tableBr;
        var tableCr = table[2 * k];
        var tableCi = inv * table[2 * k + 1];
        var MCr = Cr * tableCr - Ci * tableCi;
        var MCi = Cr * tableCi + Ci * tableCr;
        var tableDr = table[3 * k];
        var tableDi = inv * table[3 * k + 1];
        var MDr = Dr * tableDr - Di * tableDi;
        var MDi = Dr * tableDi + Di * tableDr;

        // Pre-Final values
        var T0r = MAr + MCr;
        var T0i = MAi + MCi;
        var T1r = MAr - MCr;
        var T1i = MAi - MCi;
        var T2r = MBr + MDr;
        var T2i = MBi + MDi;
        var T3r = inv * (MBr - MDr);
        var T3i = inv * (MBi - MDi);

        // Final values
        var FAr = T0r + T2r;
        var FAi = T0i + T2i;
        var FBr = T1r + T3i;
        var FBi = T1i - T3r;
        out[A] = FAr;
        out[A + 1] = FAi;
        out[B] = FBr;
        out[B + 1] = FBi;

        // Output final middle point
        if (i === 0) {
          var FCr = T0r - T2r;
          var FCi = T0i - T2i;
          out[C] = FCr;
          out[C + 1] = FCi;
          continue;
        }

        // Do not overwrite ourselves
        if (i === hquarterLen) continue;

        // In the flipped case:
        // MAi = -MAi
        // MBr=-MBi, MBi=-MBr
        // MCr=-MCr
        // MDr=MDi, MDi=MDr
        var ST0r = T1r;
        var ST0i = -T1i;
        var ST1r = T0r;
        var ST1i = -T0i;
        var ST2r = -inv * T3i;
        var ST2i = -inv * T3r;
        var ST3r = -inv * T2i;
        var ST3i = -inv * T2r;
        var SFAr = ST0r + ST2r;
        var SFAi = ST0i + ST2i;
        var SFBr = ST1r + ST3i;
        var SFBi = ST1i - ST3r;
        var SA = outOff + quarterLen - i;
        var SB = outOff + halfLen - i;
        out[SA] = SFAr;
        out[SA + 1] = SFAi;
        out[SB] = SFBr;
        out[SB + 1] = SFBi;
      }
    }
  }
};

// radix-2 implementation
//
// NOTE: Only called for len=4
FFT$1.prototype._singleRealTransform2 = function _singleRealTransform2(outOff, off, step) {
  const out = this._out;
  const data = this._data;
  const evenR = data[off];
  const oddR = data[off + step];
  const leftR = evenR + oddR;
  const rightR = evenR - oddR;
  out[outOff] = leftR;
  out[outOff + 1] = 0;
  out[outOff + 2] = rightR;
  out[outOff + 3] = 0;
};

// radix-4
//
// NOTE: Only called for len=8
FFT$1.prototype._singleRealTransform4 = function _singleRealTransform4(outOff, off, step) {
  const out = this._out;
  const data = this._data;
  const inv = this._inv ? -1 : 1;
  const step2 = step * 2;
  const step3 = step * 3;

  // Original values
  const Ar = data[off];
  const Br = data[off + step];
  const Cr = data[off + step2];
  const Dr = data[off + step3];

  // Pre-Final values
  const T0r = Ar + Cr;
  const T1r = Ar - Cr;
  const T2r = Br + Dr;
  const T3r = inv * (Br - Dr);

  // Final values
  const FAr = T0r + T2r;
  const FBr = T1r;
  const FBi = -T3r;
  const FCr = T0r - T2r;
  const FDr = T1r;
  const FDi = T3r;
  out[outOff] = FAr;
  out[outOff + 1] = 0;
  out[outOff + 2] = FBr;
  out[outOff + 3] = FBi;
  out[outOff + 4] = FCr;
  out[outOff + 5] = 0;
  out[outOff + 6] = FDr;
  out[outOff + 7] = FDi;
};
var FFT = /*@__PURE__*/getDefaultExportFromCjs(fft);

// An FFT instance precomputes size-dependent twiddle factors and a bit-reversal
// table; for a 64k transform that setup dominates the cost. A single shared
// cache keeps one instance per size so every FFT-based function in the library
// (spectra, matrices, Hilbert transforms…) reuses it instead of rebuilding the
// tables on each call.
class FFTCache {
  #maxSize;
  #instances = new Map();
  constructor(maxSize = 1) {
    this.#maxSize = maxSize;
  }
  get maxSize() {
    return this.#maxSize;
  }
  set maxSize(value) {
    if (!Number.isInteger(value) || value < 1) {
      throw new RangeError(`FFT cache size must be a positive integer, got ${value}.`);
    }
    this.#maxSize = value;
    // Honour the new bound right away: if already over it, drop everything,
    // matching the clear-when-full strategy used in get().
    if (this.#instances.size > value) this.#instances.clear();
  }
  get(size) {
    let fft = this.#instances.get(size);
    if (fft === undefined) {
      // Bound the cache so transforming many different sizes cannot grow it
      // without limit. Rather than track insertion order to evict a single
      // entry, drop everything once full: distinct sizes are rare, so the
      // common workload never hits this and stays at full speed.
      if (this.#instances.size >= this.#maxSize) this.#instances.clear();
      fft = new FFT(size);
      this.#instances.set(size, fft);
    }
    return fft;
  }
  clear() {
    this.#instances.clear();
  }
}
// Process-wide singleton: a single shared cache, like a static global, but kept
// as an instance so its state stays fully encapsulated.
const fftCache = new FFTCache();
/**
 * Returns a cached `fft.js` instance for the given transform size, building it
 * on first use. Shared by every FFT-based function in the library so the
 * size-dependent lookup tables are computed once and reused across calls.
 * @param size - number of points of the transform.
 * @returns a reusable FFT instance for that size.
 */
function getFFT(size) {
  return fftCache.get(size);
}
/**
 * Releases every cached FFT instance. The library keeps one FFT instance per
 * transform size to avoid rebuilding its lookup tables on each call; each
 * instance holds tables proportional to its size (≈1 MB for a 64k transform).
 * Call this to free that memory once you are done transforming — for example
 * after processing a batch of large spectra. Subsequent transforms simply
 * rebuild whatever sizes they need.
 */
function clearFFTCache() {
  fftCache.clear();
}
/**
 * Sets the maximum number of distinct transform sizes kept in the shared FFT
 * cache (default 1). When the cache is full and a new size is requested, the
 * whole cache is dropped and rebuilt on demand. Lowering the limit below the
 * current number of cached sizes clears the cache immediately.
 * @param maxSize - maximum number of cached sizes; must be a positive integer.
 */
function setFFTCacheMaxSize(maxSize) {
  fftCache.maxSize = maxSize;
}

function createNumberArray(ArrayConstructor, length) {
  if (ArrayConstructor === Array) {
    return new ArrayConstructor(length).fill(0);
  } else {
    return new ArrayConstructor(length);
  }
}
function createDoubleArray(ArrayConstructor, length) {
  if (ArrayConstructor === Array) {
    return new ArrayConstructor(length).fill(0);
  } else {
    return new ArrayConstructor(length);
  }
}

/**
 * Create an array with numbers between "from" and "to" of length "length"
 * @param options - options.
 * @returns array of distributed numbers between "from" and "to".
 */
function createFromToArray(options = {}) {
  const {
    from = 0,
    to = 1,
    length = 1000,
    includeFrom = true,
    includeTo = true,
    distribution = 'uniform'
  } = options;
  const array = new Float64Array(length);
  let div = length;
  if (includeFrom && includeTo) {
    div = length - 1;
  } else if (!includeFrom && includeTo || includeFrom && !includeTo) {
    div = length;
  } else if (!includeFrom && !includeTo) {
    div = length + 1;
  }
  const delta = (to - from) / div;
  if (distribution === 'uniform') {
    if (includeFrom) {
      let index = 0;
      while (index < length) {
        array[index] = from + delta * index;
        index++;
      }
    } else {
      let index = 0;
      while (index < length) {
        array[index] = from + delta * (index + 1);
        index++;
      }
    }
  } else if (distribution === 'log') {
    const base = (to / from) ** (1 / div);
    const firstExponent = Math.log(from) / Math.log(base);
    if (includeFrom) {
      let index = 0;
      while (index < length) {
        array[index] = base ** (firstExponent + index);
        index++;
      }
    } else {
      let index = 0;
      while (index < length) {
        array[index] = base ** (firstExponent + index + 1);
        index++;
      }
    }
  } else {
    throw new Error('distribution must be uniform or log');
  }
  return array;
}

const LOOP = 8;
const FLOAT_MUL = 1 / 16777216;
const sh1 = 15;
const sh2 = 18;
const sh3 = 11;
function multiplyUint32(n, m) {
  n >>>= 0;
  m >>>= 0;
  const nlo = n & 0xffff;
  const nhi = n - nlo;
  return (nhi * m >>> 0) + nlo * m >>> 0;
}
class XSadd {
  random;
  state;
  /**
   * create an instance of XSadd with the specified seed
   * @param [seed=Date.now()]
   */
  constructor(seed = Date.now()) {
    this.state = new Uint32Array(4);
    this.init(seed);
    this.random = this.getFloat.bind(this);
  }
  /**
   * Returns a 32-bit integer r (0 <= r < 2^32)
   */
  getUint32() {
    this.nextState();
    return this.state[3] + this.state[2] >>> 0;
  }
  /**
   * Returns a floating point number r (0.0 <= r < 1.0)
   */
  getFloat() {
    return (this.getUint32() >>> 8) * FLOAT_MUL;
  }
  init(seed) {
    if (!Number.isInteger(seed)) {
      throw new TypeError("seed must be an integer");
    }
    this.state[0] = seed;
    this.state[1] = 0;
    this.state[2] = 0;
    this.state[3] = 0;
    for (let i = 1; i < LOOP; i++) {
      this.state[i & 3] ^= i + multiplyUint32(1812433253, this.state[i - 1 & 3] ^ this.state[i - 1 & 3] >>> 30 >>> 0) >>> 0;
    }
    this.periodCertification();
    for (let i = 0; i < LOOP; i++) {
      this.nextState();
    }
  }
  periodCertification() {
    if (this.state[0] === 0 && this.state[1] === 0 && this.state[2] === 0 && this.state[3] === 0) {
      this.state[0] = 88; // X
      this.state[1] = 83; // S
      this.state[2] = 65; // A
      this.state[3] = 68; // D
    }
  }
  nextState() {
    let t = this.state[0];
    t ^= t << sh1;
    t ^= t >>> sh2;
    t ^= this.state[3] << sh3;
    this.state[0] = this.state[1];
    this.state[1] = this.state[2];
    this.state[2] = this.state[3];
    this.state[3] = t;
  }
}

/**
 * Create a random array of numbers of a specific length.
 * @param options - options.
 * @returns array of random floats normally distributed.
 */
function createRandomArray(options = {}) {
  const {
    mean = 0,
    standardDeviation = 1,
    length = 1000,
    range = 1,
    seed,
    distribution = 'normal'
  } = options;
  const generator = new XSadd(seed);
  const returnArray = new Float64Array(length);
  switch (distribution) {
    case 'normal':
      {
        const gaussianGenerator = new GaussianGenerator(mean, standardDeviation, generator);
        for (let i = 0; i < length; i++) {
          returnArray[i] = gaussianGenerator.generateGaussian();
        }
        break;
      }
    case 'uniform':
      {
        for (let i = 0; i < length; i++) {
          returnArray[i] = (generator.random() - 0.5) * range + mean;
        }
        break;
      }
    default:
      {
        throw new Error(`unknown distribution: ${String(distribution)}`);
      }
  }
  return returnArray;
}
class GaussianGenerator {
  #spare = 0;
  #hasSpare = false;
  #mean;
  #standardDeviation;
  #generator;
  constructor(mean, standardDeviation, generator) {
    this.#mean = mean;
    this.#standardDeviation = standardDeviation;
    this.#generator = generator;
  }
  generateGaussian() {
    let val, u, v, s;
    if (this.#hasSpare) {
      this.#hasSpare = false;
      val = this.#spare * this.#standardDeviation + this.#mean;
    } else {
      do {
        u = this.#generator.random() * 2 - 1;
        v = this.#generator.random() * 2 - 1;
        s = u * u + v * v;
      } while (s >= 1 || s === 0);
      s = Math.sqrt(-2 * Math.log(s) / s);
      this.#spare = v * s;
      this.#hasSpare = true;
      val = this.#mean + this.#standardDeviation * u * s;
    }
    return val;
  }
}

/**
 * Create an array with numbers starting from "from" with step "step" of length "length".
 * @param options - options.
 * @returns array of distributed numbers with step "step" from "from".
 */
function createStepArray(options = {}) {
  const {
    from = 0,
    step = 1,
    length = 1000
  } = options;
  const array = new Float64Array(length);
  let index = 0;
  while (index < length) {
    array[index] = from + step * index;
    index++;
  }
  return array;
}

/**
 * Generate all combinations of choosing k items from n items.
 * @param n - total number of items.
 * @param k - number of items to choose.
 * @returns array of combinations, where each combination is an array of indices.
 */
function getCombinations(n, k) {
  if (k === 0) return [[]];
  if (k > n) return [];
  const results = [];
  const current = [];
  function backtrack(start) {
    if (current.length === k) {
      results.push([...current]);
      return;
    }
    for (let i = start; i < n; i++) {
      current.push(i);
      backtrack(i + 1);
      current.pop();
    }
  }
  backtrack(0);
  return results;
}

/**
 * Generate all combinations of choosing k items from n items as an iterator.
 * Useful for large combination sets to avoid storing all combinations in memory.
 * @param n - total number of items.
 * @param k - number of items to choose.
 * @yields Each combination as an array of indices.
 */
function* getCombinationsIterator(n, k) {
  if (k === 0) {
    yield [];
    return;
  }
  if (k > n) return;
  const current = [];
  function* backtrack(start) {
    if (current.length === k) {
      yield [...current];
      return;
    }
    for (let i = start; i < n; i++) {
      current.push(i);
      yield* backtrack(i + 1);
      current.pop();
    }
  }
  yield* backtrack(0);
}

function getRescaler(options = {}) {
  const {
    targetMin = 0,
    targetMax = 1,
    clamp = true,
    algorithmOptions = {},
    algorithm = 'linear'
  } = options;
  let {
    originalMin = 0,
    originalMax = 1
  } = options;
  const convert = getDataConverter(algorithm, algorithmOptions);
  originalMin = convert(originalMin);
  originalMax = convert(originalMax);
  const originalRange = originalMax - originalMin;
  const targetRange = targetMax - targetMin;
  return function rescaler(value) {
    value = convert(value);
    value = checkRange(value, originalMin, originalMax, clamp);
    const valueScaled = (value - originalMin) / originalRange;
    return targetMin + valueScaled * targetRange;
  };
}
function getDataConverter(kind = 'linear', options = {}) {
  return value => {
    switch (kind) {
      case 'linear':
        return value;
      case 'logarithmic':
        return Math.log10(value);
      case 'power':
        return value ** (options.power || 2);
      default:
        throw new Error(`Unknown kind ${String(kind)}`);
    }
  };
}
function checkRange(value, min, max, clamp = true) {
  if (value < min) {
    if (clamp) return min;
    throw new RangeError(`Value ${value} is out of range [${min}, ${max}]`);
  }
  if (value > max) {
    if (clamp) return max;
    throw new RangeError(`Value ${value} is out of range [${min}, ${max}]`);
  }
  return value;
}

/**
 * Check if a number is a power of two.
 * @param n - input number.
 */
function isPowerOfTwo(n) {
  return n !== 0 && (n & n - 1) === 0;
}

/**
 * Get the size of the next power of two.
 * @param n - input number.
 */
function nextPowerOfTwo(n) {
  if (n === 0) return 1;
  n--;
  n |= n >> 1;
  n |= n >> 2;
  n |= n >> 4;
  n |= n >> 8;
  n |= n >> 16;
  return n + 1;
}

/**
 * Resolves all promises in an object recursively. The promise with be replaced by the resolved value.
 * The changes are therefore done in-place !
 * @param object - object to resolve.
 * @returns the resolved object.
 */
async function recursiveResolve(object) {
  if (typeof object !== 'object') return object;
  const promises = [];
  await appendPromises(object, promises);
  await Promise.all(promises);
  return object;
}
function appendPromises(object, promises) {
  if (typeof object !== 'object') return object;
  for (const key in object) {
    if (typeof object[key].then === 'function') {
      promises.push(object[key].then(value => object[key] = value));
    } else if (typeof object[key] === 'object') {
      appendPromises(object[key], promises);
    }
  }
  return object;
}

/**
 * Recursively change the typed arrays to normal arrays
 * The changes are done in-place !
 * @param object - object to transform.
 * @returns the transformed object.
 */
function recursiveUntypeArrays(object) {
  if (typeof object !== 'object') return object;
  object = modifier(object);
  return object;
}
function modifier(object) {
  if (typeof object !== 'object') return object;
  if (ArrayBuffer.isView(object)) {
    return Array.from(object);
  }
  for (const key in object) {
    if (ArrayBuffer.isView(object[key])) {
      object[key] = Array.from(object[key]);
    } else if (typeof object[key] === 'object') {
      modifier(object[key]);
    }
  }
  return object;
}

/* eslint-disable @typescript-eslint/no-explicit-any */
/**
 * Stringify an object and convert all typed arrays to arrays
 * @param object - object to stringify.
 * @param replacer - optional replacer function.
 * @param space - optional indentation.
 * @returns JSON string.
 */
function stringify(object, replacer, space) {
  const internalReplacer = (key, value) => {
    if (ArrayBuffer.isView(value)) {
      value = Array.from(value);
    }
    if (replacer) {
      return replacer(key, value);
    }
    return value;
  };
  return JSON.stringify(object, internalReplacer, space);
}

/**
 * This function xSubtract the first array by the second array or a constant value from each element of the first array
 * @param array1 - the array that will be rotated
 * @param array2 - second array or number
 * @returns array after subtraction
 */
function xSubtract(array1, array2) {
  let isConstant = false;
  let constant = 0;
  if (isAnyArray$2(array2)) {
    if (array1.length !== array2.length) {
      throw new Error('size of array1 and array2 must be identical');
    }
  } else {
    isConstant = true;
    constant = array2;
  }
  const array3 = new Float64Array(array1.length);
  if (isConstant) {
    for (let i = 0; i < array1.length; i++) {
      array3[i] = array1[i] - constant;
    }
  } else {
    for (let i = 0; i < array1.length; i++) {
      array3[i] = array1[i] - array2[i];
    }
  }
  return array3;
}

/**
 * Calculate the weights based on the control points and the MAD between the original data and the new baseline.
 * MAD (Median Absolute Deviation) is more robust to outliers and
 * the factor (1.4826) makes MAD scaled to be equivalent to the standard deviation for
 * normal distributions. {@link https://en.m.wikipedia.org/wiki/Median_absolute_deviation}.
 * @param yData - the original data.
 * @param baseline - the new baseline calculated.
 * @param weights - the current weights to be updated.
 * @param options - options for updating weights.
 * @returns new array of weights.
 */
function calculateAdaptiveWeights(yData, baseline, weights, options) {
  const {
    controlPoints,
    factorStd = 3,
    learningRate = 0.5
  } = options;
  if (learningRate === 0) {
    return weights;
  }
  const absResiduals = xAbsolute(xSubtract(yData, baseline));
  const medAbsRes = xMedian(absResiduals);
  const mad = 1.4826 * medAbsRes;
  const threshold = mad > 0 ? factorStd * mad : 1;
  const rawWeights = new Float64Array(absResiduals.length);
  for (let i = 0; i < absResiduals.length; i++) {
    rawWeights[i] = Math.exp(-((absResiduals[i] / threshold) ** 2));
  }
  const oneMinusLearningRate = 1 - learningRate;
  for (let i = 0; i < weights.length; i++) {
    let weight = weights[i];
    weight = (oneMinusLearningRate * weight + learningRate * rawWeights[i]) / 4;
    if (controlPoints && controlPoints[i] > 0) {
      weight *= 4;
    }
    weights[i] = weight;
  }
  weights[0] = 1;
  weights[weights.length - 1] = 1;
  return weights;
}

/*
 * This file is based on the code from "deep-cleaner" by darksinge
 * https://github.com/darksinge/deep-cleaner
 *
 * The following license applies:
 *
 * MIT License
 *
 * Copyright (c) 2021 darksinge
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
/**
 * Recursively removes empty values from an object. This will also remove empty object or empty array.
 * @param object - the object being cleaned
 * @param options - optional object with options for cleaning.
 * @returns the cleaned object.
 */
function recursiveRemoveEmptyAndNull(object, options = {}) {
  const {
    propertiesToRemove = [],
    ...otherOptions
  } = options;
  if (propertiesToRemove.length > 0) {
    for (const removeProperty of propertiesToRemove) {
      cleanCyclicObject(object, removeProperty, otherOptions);
    }
  } else {
    cleanCyclicObject(object, '', otherOptions);
  }
  return object;
}
/**
 * cleanCyclicObject Removes any undefined, null, or empty strings, arrays, or objects from `object`.
 *    Uses a `WeakMap` to keep track of objects that have been visited while recursively cleaning
 *    an object to prevent infinite recursive calls.
 * @param object - the object to be cleaned
 * @param propertiesToRemove - optional key to remove from `object`. If not specified, the default
 *    behavior is to remove "empty" values from `object`. A value is considered to be empty if it
 *    is one of the following:
 *      - empty strings
 *      - empty arrays
 *      - empty objects
 *      - values that are null
 *      - values that are undefined
 * @param removeProperty - key to remove from the object.
 * @param options - options.
 */
function cleanCyclicObject(object, removeProperty, options = {}) {
  const visitedObjects = new WeakMap();
  function recursiveClean(object, parent, parentKey) {
    if (isObject$1(object)) {
      if (visitedObjects.has(object)) return;
      visitedObjects.set(object, null);
      for (const key of Reflect.ownKeys(object)) {
        if (removeProperty && key === removeProperty || !removeProperty && isEmpty(object[key])) {
          Reflect.deleteProperty(object, key);
        } else {
          recursiveClean(object[key], object, key);
        }
      }
      if (!removeProperty && isEmpty(object) && parent) {
        Reflect.deleteProperty(parent, parentKey);
      }
    } else if (isArray(object)) {
      if (visitedObjects.has(object)) return;
      visitedObjects.set(object, null);
      for (let i = 0; i < object.length; i++) {
        recursiveClean(object[i], object, i);
      }
      for (let i = object.length - 1; i >= 0; i--) {
        const arrayElement = object[i];
        if (isEmpty(arrayElement) && !(isArray(arrayElement) && arrayElement.length === 0 && options?.removeEmptyArrayAndObject === false)) {
          object.splice(i, 1);
        }
      }
      for (const key of Reflect.ownKeys(object)) {
        const isIndex = typeof key === 'string' && /^\d+$/.test(key);
        if (!isIndex) {
          const value = object[key];
          if (removeProperty && key === removeProperty || !removeProperty && isEmpty(value)) {
            Reflect.deleteProperty(object, key);
          } else {
            recursiveClean(value, object, key);
          }
        }
      }
      if (!removeProperty && object.length === 0 && parent && options?.removeEmptyArrayAndObject) {
        Reflect.deleteProperty(parent, parentKey);
      }
    }
  }
  recursiveClean(object);
}
/**
 * repr gets the string representation of `arg`
 * @param {} arg - unknown function argument
 * @returns a string representation of `arg`
 */
function repr(arg) {
  return Object.prototype.toString.call(arg);
}
/**
 * Check if the argument is an array
 * @param {} arg - unknown function argument
 * @returns returns true if `arg` is an Array, false otherwise
 */
function isArray(arg) {
  return Array.isArray ? Array.isArray(arg) : repr(arg) === '[object Array]';
}
/**
 * Check if the argument is an object
 * @param {} arg - unknown function argument
 * @returns returns true if `arg` is an object.
 */
function isObject$1(arg) {
  return repr(arg) === '[object Object]';
}
/**
 * Check if the argument is a string
 * @param {} arg - unknown function argument
 * @returns returns true if `arg` is a String, false otherwise
 */
function isString(arg) {
  return repr(arg) === '[object String]';
}
/**
 * Check if the argument is null.
 * @param {} arg - unknown function argument
 * @returns returns true if `arg` is of type Null, false otherwise
 */
function isNull(arg) {
  return repr(arg) === '[object Null]';
}
/**
 * Check if the argument is undefined.
 * @param {} arg - unknown function argument
 * @returns returns true if `arg` is of type Undefined, false otherwise.
 */
function isUndefined(arg) {
  return arg === undefined;
}
/**
 * Check if the argument is null, undefined, an empty string, array, or object.
 * @param {} arg - unknown function argument
 * @returns returns true if `arg` is an empty string,
 *  array, or object. Also returns true is `arg` is null or
 *  undefined. Returns false otherwise.
 */
function isEmpty(arg) {
  return isUndefined(arg) || isNull(arg) || isString(arg) && arg.length === 0 || isArray(arg) && arg.length === 0 || isObject$1(arg) && Object.keys(arg).length === 0;
}

/**
 * Performs the Hilbert transform
 * @link https://en.wikipedia.org/wiki/Hilbert_transform
 * @param array - array containing values.
 * @param options - options.
 * @returns a new vector with 90 degree shift regarding the phase of the original function.
 */
function xHilbertTransform(array, options = {}) {
  xCheck(array);
  const {
    forceFFT = false
  } = options;
  const length = array.length;
  if (isPowerOfTwo(length)) {
    return hilbertTransformWithFFT(array);
  } else if (forceFFT) {
    return resampling(hilbertTransformWithFFT(resampling(array, nextPowerOfTwo(length))), length);
  } else {
    return hilbertTransform(array);
  }
}
/**
 * Performs the discrete Hilbert transform using fast Fourier transform
 * @param array - array containing values.
 * @returns a new vector with 90 degree shift regarding the phase of the original function.
 * @see DOI: 10.1109/TAU.1970.1162139 "Discrete Hilbert transform"
 */
function hilbertTransformWithFFT(array) {
  const length = array.length;
  const fft = getFFT(length);
  // Single reusable buffer for FFT spectrum
  const spectrum = new Float64Array(length * 2);
  // Forward FFT
  fft.realTransform(spectrum, array);
  fft.completeSpectrum(spectrum);
  const half = length >> 1;
  // Zero Nyquist
  const j = half << 1;
  spectrum[j] = 0;
  spectrum[j + 1] = 0;
  // Negate negative frequencies
  for (let j = half + 1 << 1; j < spectrum.length; j += 2) {
    spectrum[j] = -spectrum[j];
    spectrum[j + 1] = -spectrum[j + 1];
  }
  const hilbertSignal = new Float64Array(length * 2);
  fft.inverseTransform(hilbertSignal, spectrum);
  // Extract imaginary part directly into output
  const result = new Float64Array(length);
  for (let i = 0; i < length; i++) {
    result[i] = hilbertSignal[i * 2 + 1];
  }
  return result;
}
/**
 * Performs the discrete Hilbert transform
 * @param array - array containing values.
 * @param options - options.
 * @param options.inClockwise - whether to apply clockwise rotation.
 * @returns a new vector with 90 degree shift regarding the phase of the original function.
 */
function hilbertTransform(array, options = {}) {
  const {
    inClockwise = true
  } = options;
  const input = [0, ...array, 0];
  const result = new Float64Array(array.length);
  for (let k = 1; k < input.length - 1; k++) {
    let aSum = 0;
    for (let i = 0; i < k - 1; i++) {
      const log = Math.log((k - i) / (k - i - 1));
      aSum += input[i] * log + (input[i + 1] - input[i]) * (-1 + (k - i) * log);
    }
    const b = input[k - 1] - input[k + 1];
    let cSum = 0;
    for (let i = k + 1; i < input.length - 1; i++) {
      const log = Math.log((i - k) / (i - k + 1));
      cSum += input[i] * log + (input[i - 1] - input[i]) * (1 + (i - k) * log);
    }
    result[k - 1] = (inClockwise ? 1 : -1) * (aSum + b + cSum) / Math.PI;
  }
  return result;
}
/**
 * Performs resampling of an input array to the desired length employing linear interpolation.
 * @param array - array containing values.
 * @param length - the length of the resulting array.
 * @returns a new array of the desired length.
 * @link https://en.wikipedia.org/wiki/Sample-rate_conversion
 */
function resampling(array, length) {
  xCheck(array);
  const oldLength = array.length;
  const ratio = (oldLength - 1) / (length - 1);
  const result = new Float64Array(length);
  let currentIndex = 0;
  let floor = Math.floor(currentIndex);
  let ceil = Math.min(Math.ceil(currentIndex), oldLength - 1);
  let diff = currentIndex - floor;
  for (let i = 0; i < length; i++) {
    result[i] = array[floor] * (1 - diff) + array[ceil] * diff;
    currentIndex += ratio;
    floor = Math.floor(currentIndex);
    ceil = Math.min(Math.ceil(currentIndex), oldLength - 1);
    diff = currentIndex - floor;
  }
  return result;
}

/**
 * Computes the maximal value of an array of values
 * @param array - array of numbers
 * @param options - options
 */
function xMaxValue(array, options = {}) {
  xCheck(array);
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(array, options);
  let maxValue = array[fromIndex];
  for (let i = fromIndex + 1; i <= toIndex; i++) {
    if (array[i] > maxValue) {
      maxValue = array[i];
    }
  }
  return maxValue;
}

/**
 * Computes the minimal value of an array of values.
 * @param array - array of numbers
 * @param options - options
 */
function xMinValue(array, options = {}) {
  xCheck(array);
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(array, options);
  let minValue = array[fromIndex];
  for (let i = fromIndex + 1; i <= toIndex; i++) {
    if (array[i] < minValue) {
      minValue = array[i];
    }
  }
  return minValue;
}

/**
 * Calculates a histogram of defined number of slots
 * @param array - array containing values.
 * @param options - options.
 * @returns result of the histogram.
 */
function xHistogram(array, options = {}) {
  xCheck(array);
  const histogram = options.histogram;
  const {
    centerX = true,
    nbSlots = histogram === undefined ? 256 : histogram.x.length,
    logBaseX,
    logBaseY,
    absolute = false
  } = options;
  if (absolute) {
    array = xAbsolute(array);
  }
  if (logBaseX) {
    array = array.slice();
    const logOfBase = Math.log10(logBaseX);
    for (let i = 0; i < array.length; i++) {
      array[i] = Math.log10(array[i]) / logOfBase;
    }
  }
  const {
    min = xMinValue(array),
    max = xMaxValue(array)
  } = options;
  const slotSize = (max - min) / (nbSlots + Number.EPSILON);
  const y = histogram === undefined ? new Float64Array(nbSlots) : histogram.y;
  const x = histogram === undefined ? Array.from(createFromToArray({
    from: min + (centerX ? slotSize / 2 : 0),
    to: max - (centerX ? slotSize / 2 : 0),
    length: nbSlots
  })) : histogram.x;
  for (const element of array) {
    const index = Math.max(Math.min(Math.floor((element - min - Number.EPSILON) / slotSize), nbSlots - 1), 0);
    y[index]++;
  }
  if (logBaseY) {
    const logOfBase = Math.log10(logBaseY);
    for (let i = 0; i < y.length; i++) {
      y[i] = Math.log10(y[i] + 1) / logOfBase;
    }
  }
  return {
    x,
    y
  };
}

/**
 * Checks if the input is a non-empty array of numbers.
 * Only checks the first element.
 * @param input - array to check.
 * @param options - additional checks.
 * @returns Whether the value is a valid array of numbers.
 */
function xIsArray(input, options = {}) {
  const {
    minLength = 1
  } = options;
  return isAnyArray$2(input) && input.length > 0 && typeof input[0] === 'number' && input.length >= minLength;
}

/**
 * Check if the values are separated always by the same difference
 * @param array - monotone growing array of number.
 * @param options - options.
 */
function xIsEquallySpaced(array, options = {}) {
  if (array.length < 3) return true;
  const {
    tolerance = 0.05
  } = options;
  let maxDx = 0;
  let minDx = Number.MAX_SAFE_INTEGER;
  for (let i = 0; i < array.length - 1; ++i) {
    const absoluteDifference = array[i + 1] - array[i];
    if (absoluteDifference < minDx) {
      minDx = absoluteDifference;
    }
    if (absoluteDifference > maxDx) {
      maxDx = absoluteDifference;
    }
  }
  return (maxDx - minDx) / maxDx < tolerance;
}

/**
 * Returns true if x is monotonic.
 * @param array - array of numbers.
 * @returns 1 if monotonic increasing, -1 if monotonic decreasing, 0 if not monotonic.
 */
function xIsMonotonic(array) {
  if (array.length <= 2) {
    return 1;
  }
  if (array[0] === array[1]) {
    // maybe a constant series
    for (let i = 1; i < array.length - 1; i++) {
      if (array[i] !== array[i + 1]) return 0;
    }
    return 1;
  }
  if (array[0] < array.at(-1)) {
    for (let i = 0; i < array.length - 1; i++) {
      if (array[i] >= array[i + 1]) return 0;
    }
    return 1;
  } else {
    for (let i = 0; i < array.length - 1; i++) {
      if (array[i] <= array[i + 1]) return 0;
    }
    return -1;
  }
}

/**
 * Check the similarity between array created by xyMassCenterVector
 * @deprecated The center of mass trees it compares are misleading, see `xyMassCenterVector`.
 * Use `xEqualIntegrationVectorSimilarity` together with `xyEqualIntegrationVector`.
 * @param array1 - first mass center vector.
 * @param array2 - second mass center vector.
 * @param options - options.
 * @returns similarity score between 0 and 1.
 */
function xMassCenterVectorSimilarity(array1, array2, options = {}) {
  const {
    recenter = true,
    similarityFct = (a, b) => a === b ? 1 : 0
  } = options;
  return xEqualIntegrationVectorSimilarity(array1, array2, {
    recenter,
    similarityFct
  });
}

/**
 * Computes the maximal value of an array of values
 * @param array - array of numbers
 * @param options - options
 */
function xMaxAbsoluteValue(array, options = {}) {
  xCheck(array);
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(array, options);
  let maxValue = Math.abs(array[fromIndex]);
  for (let i = fromIndex + 1; i <= toIndex; i++) {
    if (array[i] >= 0) {
      if (array[i] > maxValue) {
        maxValue = array[i];
      }
    } else if (-array[i] > maxValue) {
      maxValue = -array[i];
    }
  }
  return maxValue;
}

/**
 * Computes the index of the maximum of the given values
 * @param array - array of numbers
 * @param  options - options
 * @returns - index
 */
function xMaxIndex(array, options = {}) {
  xCheck(array);
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(array, options);
  let maxIndex = fromIndex;
  for (let i = fromIndex + 1; i <= toIndex; i++) {
    if (array[i] > array[maxIndex]) {
      maxIndex = i;
    }
  }
  return maxIndex;
}

/**
 * This function calculates the mean absolute error.
 * @param array1 - first array
 * @param array2 - second array
 */
function xMeanAbsoluteError(array1, array2) {
  xCheckLengths(array1, array2);
  let sum = 0;
  for (let i = 0; i < array1.length; i++) {
    sum += Math.abs(array1[i] - array2[i]);
  }
  return sum / array1.length;
}

/**
 * This function calculates the mean squared error.
 * @param array1 -first array
 * @param array2 - second array
 */
function xMeanSquaredError(array1, array2) {
  xCheckLengths(array1, array2);
  let sum = 0;
  for (let i = 0; i < array1.length; i++) {
    sum += (array1[i] - array2[i]) ** 2;
  }
  return sum / array1.length;
}

/**
 * Computes the weighted mean value of an array of values.
 * @deprecated please use xyMassCenter
 * @param array - array of numbers
 * @param weights - array of weights
 * @param options - options
 */
function xMeanWeighted(array, weights, options = {}) {
  xCheck(array, {
    minLength: 1
  });
  xCheck(weights);
  if (array.length !== weights.length) {
    throw new Error('array and weights must have the same length');
  }
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(array, options);
  // normalize weights
  let sumWeights = 0;
  let sumValue = array[fromIndex] * weights[fromIndex];
  sumWeights += weights[fromIndex];
  for (let i = fromIndex + 1; i <= toIndex; i++) {
    sumValue += array[i] * weights[i];
    sumWeights += weights[i];
  }
  if (sumWeights === 0) {
    // We throw because the case is not well defined
    throw new Error('sum of weights must be > 0');
  }
  return sumValue / sumWeights;
}

/**
 * This function calculates the median absolute deviation (MAD).
 * https://en.wikipedia.org/wiki/Median_absolute_deviation
 * @param array - array of numbers.
 */
function xMedianAbsoluteDeviation(array) {
  const median = xMedian(array);
  const averageDeviations = new Float64Array(array.length);
  for (let i = 0; i < array.length; i++) {
    averageDeviations[i] = Math.abs(array[i] - median);
  }
  return {
    median,
    mad: xMedian(averageDeviations)
  };
}

/**
 * Computes the index of the minimum of the given values.
 * @param array - array of numbers
 * @param options - options
 * @returns - index
 */
function xMinIndex(array, options = {}) {
  xCheck(array);
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(array, options);
  let minIndex = fromIndex;
  for (let i = fromIndex + 1; i <= toIndex; i++) {
    if (array[i] < array[minIndex]) {
      minIndex = i;
    }
  }
  return minIndex;
}

/**
 * Return min and max values of an array.
 * @param array - array of number
 * @returns object with 2 properties, min and max.
 */
function xMinMaxDelta(array) {
  xCheck(array, {
    minLength: 2
  });
  let minDelta = array[1] - array[0];
  let maxDelta = minDelta;
  for (let i = 0; i < array.length - 1; i++) {
    const delta = array[i + 1] - array[i];
    if (delta < minDelta) minDelta = delta;
    if (delta > maxDelta) maxDelta = delta;
  }
  return {
    min: minDelta,
    max: maxDelta
  };
}

/**
 * Return min and max values of an array.
 * @param array - array of number
 * @returns object with 2 properties, min and max.
 */
function xMinMaxValues(array) {
  xCheck(array);
  let min = array[0];
  let max = array[0];
  for (const value of array) {
    if (value < min) min = value;
    if (value > max) max = value;
  }
  return {
    min,
    max
  };
}

/**
 * Calculates the mode of an array
 * @param input - array containing values.
 * @returns mode.
 */
function xMode(input) {
  if (input.length === 0) {
    throw new TypeError('input must not be empty');
  }
  let maxValue = 0;
  let maxCount = 0;
  let count = 0;
  const counts = {};
  for (const element of input) {
    count = counts[element];
    if (count) {
      counts[element]++;
      count++;
    } else {
      counts[element] = 1;
      count = 1;
    }
    if (count > maxCount) {
      maxCount = count;
      maxValue = element;
    }
  }
  return maxValue;
}

/**
 * This function xMultiply the first array by the second array or a constant value to each element of the first array
 * @param array1 - first array
 * @param array2 - second array
 * @param options - options
 */
function xMultiply(array1, array2, options = {}) {
  let isConstant = false;
  let constant = 0;
  if (isAnyArray$2(array2)) {
    if (array1.length !== array2.length) {
      throw new Error('size of array1 and array2 must be identical');
    }
  } else {
    isConstant = true;
    constant = array2;
  }
  const array3 = getOutputArray(options.output, array1.length);
  if (isConstant) {
    for (let i = 0; i < array1.length; i++) {
      array3[i] = array1[i] * constant;
    }
  } else {
    for (let i = 0; i < array1.length; i++) {
      array3[i] = array1[i] * array2[i];
    }
  }
  return array3;
}

/**
 * Applies the Rayleigh inverse cumulative distribution for a single value.
 * @param input - cumulative probability value.
 * @returns the inverse value for the Rayleigh distribution.
 */
function simpleNormInvMagnitude(input) {
  return -Math.sqrt(-2 * Math.log(1 - input));
}

/*
Adapted from: https://github.com/compute-io/erfcinv/blob/aa116e23883839359e310ad41a7c42f72815fc1e/lib/number.js

The MIT License (MIT)

Copyright (c) 2014-2015 The Compute.io Authors. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following:

The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* eslint-disable no-loss-of-precision */
// Coefficients for erfcinv on [0, 0.5]:
const Y1 = 8.91314744949340820313e-2;
const P1 = [-0.005387729650712429, 8.22687874676915743155e-3, 2.19878681111168899165e-2, -0.03656379714117627, -0.012692614766297404, 3.34806625409744615033e-2, -0.008368748197417368, -5087819496582806e-19];
const Q1 = [8.86216390456424707504e-4, -0.0023339375937419, 7.95283687341571680018e-2, -0.05273963823400997, -0.7122890234154284, 6.62328840472002992063e-1, 1.56221558398423026363, -1.5657455823417585, -0.9700050433032906, 1];
// Coefficients for erfcinv for 0.5 > 1-x >= 0:
const Y2 = 2.249481201171875;
const P2 = [-3.6719225470772936, 2.11294655448340526258e1, 1.7445385985570866523e1, -44.6382324441787, -18.851064805871424, 1.76447298408374015486e1, 8.37050328343119927838, 1.05264680699391713268e-1, -0.20243350835593876];
const Q2 = [1.72114765761200282724, -22.643693341313973, 1.08268667355460159008e1, 4.85609213108739935468e1, -20.14326346804852, -28.66081804998, 3.9713437953343869095, 6.24264124854247537712, 1];
// Coefficients for erfcinv for sqrt( -log(1-x)):
const Y3 = 8.07220458984375e-1;
const P3 = [-681149956853777e-24, 2.85225331782217055858e-8, -6.794655751811263e-7, 2.14558995388805277169e-3, 2.90157910005329060432e-2, 1.42869534408157156766e-1, 3.37785538912035898924e-1, 3.87079738972604337464e-1, 1.17030156341995252019e-1, -0.16379404719331705, -0.1311027816799519];
const Q3 = [1.105924229346489121e-2, 1.52264338295331783612e-1, 8.48854343457902036425e-1, 2.59301921623620271374, 4.77846592945843778382, 5.38168345707006855425, 3.46625407242567245975, 1];
const Y4 = 9.3995571136474609375e-1;
const P4 = [2.66339227425782031962e-12, -2304047769118826e-25, 4.60469890584317994083e-6, 1.57544617424960554631e-4, 1.87123492819559223345e-3, 9.50804701325919603619e-3, 1.85573306514231072324e-2, -0.0022242652921344794, -0.0350353787183178];
const Q4 = [7.64675292302794483503e-5, 2.63861676657015992959e-3, 3.41589143670947727934e-2, 2.20091105764131249824e-1, 7.62059164553623404043e-1, 1.3653349817554063097, 1];
const Y5 = 9.8362827301025390625e-1;
const P5 = [9.9055709973310326855e-17, -2811287356288318e-29, 4.62596163522878599135e-9, 4.49696789927706453732e-7, 1.49624783758342370182e-5, 2.09386317487588078668e-4, 1.05628862152492910091e-3, -0.0011295143874558028, -0.016743100507663373];
const Q5 = [2.82243172016108031869e-7, 2.75335474764726041141e-5, 9.64011807005165528527e-4, 1.60746087093676504695e-2, 1.38151865749083321638e-1, 5.91429344886417493481e-1, 1];
/**
 * Evaluates a polynomial at x using Horner's method.
 * @param c - array of polynomial coefficients.
 * @param x - evaluation point.
 * @returns polynomial value.
 */
function polyval(c, x) {
  let p = 0;
  for (const coef of c) {
    p = p * x + coef;
  }
  return p;
}
/**
 * Calculates a rational approximation.
 * @private
 * @param x - input value.
 * @param v - shift value.
 * @param P - array of numerator polynomial coefficients.
 * @param Q - array of denominator polynomial coefficients.
 * @param Y - scale factor.
 * @returns rational approximation.
 */
function calc(x, v, P, Q, Y) {
  const s = x - v;
  const r = polyval(P, s) / polyval(Q, s);
  return Y * x + r * x;
}
/**
 * Evaluates the complementary inverse error function for an input value.
 * @private
 * @param x - input value.
 * @returns evaluated complementary inverse error function.
 */
function erfcinv(x) {
  let sign = false;
  let val;
  let q;
  let g;
  let r;
  // [1] Special cases...
  // NaN:
  if (Number.isNaN(x)) {
    return Number.NaN;
  }
  // x not on the interval: [0,2]
  if (x < 0 || x > 2) {
    throw new RangeError(`erfcinv()::invalid input argument. Value must be on the interval [0,2]. Value: \`${x}\`.`);
  }
  if (x === 0) {
    return Number.POSITIVE_INFINITY;
  }
  if (x === 2) {
    return Number.NEGATIVE_INFINITY;
  }
  if (x === 1) {
    return 0;
  }
  // [2] Get the sign and make use of `erfc` reflection formula: `erfc(-z)=2 - erfc(z)`...
  if (x > 1) {
    q = 2 - x;
    x = 1 - q;
    sign = true;
  } else {
    q = x;
    x = 1 - x;
  }
  // [3] |x| <= 0.5
  if (x <= 0.5) {
    g = x * (x + 10);
    r = polyval(P1, x) / polyval(Q1, x);
    val = g * Y1 + g * r;
    return sign ? -val : val;
  }
  // [4] 1-|x| >= 0.25
  if (q >= 0.25) {
    g = Math.sqrt(-2 * Math.log(q));
    q = q - 0.25;
    r = polyval(P2, q) / polyval(Q2, q);
    val = g / (Y2 + r);
    return sign ? -val : val;
  }
  q = Math.sqrt(-Math.log(q));
  // [5] q < 3
  if (q < 3) {
    return calc(q, 1.125, P3, Q3, Y3);
  }
  // [6] q < 6
  if (q < 6) {
    return calc(q, 3, P4, Q4, Y4);
  }
  // Note that the smallest number in JavaScript is 5e-324. Math.sqrt( -Math.log( 5e-324 ) ) ~27.2844
  return calc(q, 6, P5, Q5, Y5);
  // Note that in the boost library, they are able to go to much smaller values, as 128 bit long doubles support ~1e-5000; something which JavaScript does not natively support.
}

/**
 * Applies the inverse of the normal cumulative distribution for a single value.
 * @param input - cumulative probability value.
 * @returns the inverse value for the normal distribution.
 */
function simpleNormInvRaw(input) {
  return -1 * Math.SQRT2 * erfcinv(2 * input);
}

/**
 * Determine noise level by san plot methodology (https://doi.org/10.1002/mrc.4882)
 * @param array - real or magnitude spectra data.
 * @param options - options
 * @returns noise level
 */
function xNoiseSanPlot(array, options = {}) {
  const {
    mask,
    cutOffFromPositive = true,
    refine = true,
    magnitudeMode = false,
    scaleFactor = 1,
    factorStd = 5,
    fixOffset = true
  } = options;
  const input = prepareData(array, {
    scaleFactor,
    mask
  });
  if (fixOffset && !magnitudeMode) {
    const medianIndex = Math.floor(input.length / 2);
    const median = input.length % 2 === 0 ? 0.5 * (input[medianIndex - 1] + input[medianIndex]) : input[medianIndex];
    for (let i = 0; i < input.length; i++) {
      input[i] -= median;
    }
  }
  const firstNegativeValueIndex = input.at(-1) >= 0 ? input.length : input.findIndex(e => e < 0);
  let lastPositiveValueIndex = firstNegativeValueIndex - 1;
  for (let i = lastPositiveValueIndex; i >= 0; i--) {
    if (input[i] > 0) {
      lastPositiveValueIndex = i;
      break;
    }
  }
  const signPositive = input.slice(0, lastPositiveValueIndex + 1);
  const signNegative = createNegativeSign(input, firstNegativeValueIndex);
  const skyPoint = signPositive[0];
  const cutOff = options.cutOff ?? (cutOffFromPositive ? determineCutOff(signPositive, {
    magnitudeMode
  }) : null);
  const noiseLevelPositive = calculateNoiseLevel(signPositive, {
    factorStd,
    refine,
    magnitudeMode,
    cutOff
  });
  const noiseLevelNegative = calculateNoiseLevel(signNegative, {
    factorStd,
    refine,
    magnitudeMode,
    cutOff
  });
  return {
    positive: noiseLevelPositive,
    negative: noiseLevelNegative,
    snr: skyPoint / noiseLevelPositive,
    sanplot: generateSanPlot(input, {
      fromTo: {
        positive: {
          from: 0,
          to: lastPositiveValueIndex
        },
        negative: {
          from: firstNegativeValueIndex,
          to: input.length
        }
      }
    })
  };
}
function calculateNoiseLevel(sign, options) {
  const {
    factorStd,
    refine,
    magnitudeMode,
    cutOff
  } = options;
  if (sign.length === 0) return 0;
  const simpleNormInvValue = magnitudeMode ? simpleNormInvMagnitude : simpleNormInvRaw;
  const cutOffDist = cutOff || determineCutOff(sign, {
    magnitudeMode
  });
  let noiseLevel = sign[Math.floor(sign.length * cutOffDist)];
  let cloneSign = sign.slice();
  let cutOffSignalsIndex = -1;
  if (refine) {
    const cutOffSignals = noiseLevel * factorStd;
    cutOffSignalsIndex = sign.findIndex(e => e < cutOffSignals);
    if (cutOffSignalsIndex > -1) {
      cloneSign = sign.slice(cutOffSignalsIndex);
      noiseLevel = cloneSign[Math.floor(cloneSign.length * cutOffDist)];
    }
  }
  if (refine && cutOffSignalsIndex > -1) {
    const effectiveCutOffDist = (cutOffDist * cloneSign.length + cutOffSignalsIndex) / (cloneSign.length + cutOffSignalsIndex);
    const refinedCorrectionFactor = -1 * simpleNormInvValue(effectiveCutOffDist / 2);
    noiseLevel /= refinedCorrectionFactor;
  } else {
    const correctionFactor = -simpleNormInvValue(cutOffDist / 2);
    noiseLevel /= correctionFactor;
  }
  return noiseLevel;
}
/**
 * Estimates where the "noise region" begins in a SAN-plot-style sorted
 * intensity series (Sheberstov et al., Magn. Reson. Chem. 2020, 58, 466-472,
 * https://doi.org/10.1002/mrc.4882).
 *
 * `signPositive` is expected to already be sorted by decreasing absolute
 * magnitude (the paper's S+ or S- series). For each quantile fraction `i`
 * (fraction of points at or beyond that position, counting from the tail),
 * we invert the Gaussian (or Rayleigh, in magnitude mode) order-statistics
 * relationship to get a local estimate of the noise standard deviation
 * (sigma). This estimate is only expected to be stable/flat once we are
 * fully inside the true noise region; in the signal and artifact regions
 * it will be biased and noisy. We therefore scan candidate quantile windows
 * and pick the one where the sigma estimates are most self-consistent
 * (lowest variance) - a proxy for "where the noise region reliably starts".
 * <<<<<<< Updated upstream
 *
 * =======
 * >>>>>>> Stashed changes
 * @param signPositive - an array of positive numbers.
 * @param options - optional parameters to configure the cut-off determination.
 * @param options.magnitudeMode - if true, uses magnitude mode for normalization. Default is false.
 * @param options.considerList - an object specifying the range and step for consideration.
 * @param options.considerList.from - the starting point of the range. Default is 0.5.
 * @param options.considerList.step - the step size for the range. Default is 0.1.
 * @param options.considerList.to - the ending point of the range. Default is 0.9.
 * @returns the optimal cut-off point as a number.
 */
function determineCutOff(signPositive, options = {}) {
  const {
    magnitudeMode = false,
    considerList = {
      from: 0.5,
      step: 0.1,
      to: 0.9
    }
  } = options;
  const inverseQuantileFn = magnitudeMode ? simpleNormInvMagnitude : simpleNormInvRaw;
  const indexMax = signPositive.length - 1;
  // For each quantile fraction, compute a local sigma estimate by inverting
  // the theoretical relationship between order statistics and the assumed
  // noise distribution (Gaussian or Rayleigh).
  const sigmaEstimates = [];
  for (let quantileFraction = 0.01; quantileFraction <= 0.99; quantileFraction += 0.01) {
    const index = Math.round(indexMax * quantileFraction);
    const sigma = -signPositive[index] / inverseQuantileFn(quantileFraction / 2);
    sigmaEstimates.push([quantileFraction, Math.abs(sigma)]);
  }
  const {
    from,
    to,
    step
  } = considerList;
  const halfWindow = step / 2;
  let bestVariance = Number.MAX_SAFE_INTEGER;
  let bestQuantileFraction = 0.5;
  for (let windowCenter = from; windowCenter <= to; windowCenter += step) {
    const windowFloor = windowCenter - halfWindow;
    const windowTop = windowCenter + halfWindow;
    let count = 0;
    let sum = 0;
    // First pass: compute mean
    for (const [q, absSigma] of sigmaEstimates) {
      if (q > windowFloor && q < windowTop) {
        sum += absSigma;
        count++;
      }
    }
    // Guard against empty windows.
    if (count === 0) continue;
    const meanSigma = sum / count;
    // Second pass: compute variance
    let variance = 0;
    for (const [q, absSigma] of sigmaEstimates) {
      if (q > windowFloor && q < windowTop) {
        variance += (absSigma - meanSigma) ** 2;
      }
    }
    if (variance < bestVariance) {
      bestVariance = variance;
      bestQuantileFraction = windowCenter;
    }
  }
  return bestQuantileFraction;
}
/**
 * Generates a SAN plot from the given array based on the specified options.
 * @param array - the input array of numbers to be processed.
 * @param options - an optional object containing configuration options.
 * @param options.logBaseY - the logarithmic base for the Y-axis. Defaults to 2.
 * @param options.fromTo - an object specifying the range for each key. Each key maps to an object with `from` and `to` properties.
 * @returns an object where each key maps to a DataXY object containing the processed data.
 */
function generateSanPlot(array, options = {}) {
  const {
    fromTo,
    logBaseY = 2
  } = options;
  const sanplot = {};
  for (const key in fromTo) {
    const {
      from,
      to
    } = fromTo[key];
    sanplot[key] = from !== to ? scale(array.slice(from, to), {
      logBaseY
    }) : {
      x: [],
      y: []
    };
    if (key === 'negative') {
      sanplot[key].y.reverse();
    }
  }
  return sanplot;
}
/**
 * Scales the input array based on the provided options.
 * @param array - the input array to be scaled.
 * @param options - an optional object containing scaling options.
 * @param options.logBaseY - if provided, the array values will be scaled using the logarithm of this base.
 * @returns an object containing the scaled x and y arrays.
 */
function scale(array, options = {}) {
  const {
    log10,
    abs
  } = Math;
  const {
    logBaseY
  } = options;
  if (logBaseY) {
    array = array.slice(0);
    const logOfBase = log10(logBaseY);
    for (let i = 0; i < array.length; i++) {
      array[i] = log10(abs(array[i])) / logOfBase;
    }
  }
  const xAxis = createFromToArray({
    from: 0,
    to: array.length - 1,
    length: array.length
  });
  return {
    x: xAxis,
    y: array
  };
}
/**
 * Prepares and processes the input data array based on the provided options.
 * @param array - the input array of numbers to be processed.
 * @param options - an object containing the following properties:
 *   - scaleFactor: A number by which to scale each element of the array.
 *   - mask: An optional array of the same length as the input array, where
 *           elements corresponding to `true` values will be excluded from processing.
 * @param options.scaleFactor
 * @param options.mask
 * @param from
 * @returns A new Float64Array containing the processed data, scaled by the
 *          scaleFactor and sorted in descending order.
 */
function createNegativeSign(array, from) {
  const length = array.length - from;
  const result = new Float64Array(length);
  for (let i = 0; i < length; i++) {
    result[i] = -array[array.length - 1 - i];
  }
  return result;
}
function prepareData(array, options) {
  const {
    scaleFactor,
    mask
  } = options;
  const input = xEnsureFloat64(isAnyArray$2(mask) && mask.length === array.length ? array.filter((_e, i) => !mask[i]) : array);
  if (scaleFactor > 1) {
    for (let i = 0; i < input.length; i++) {
      input[i] *= scaleFactor;
    }
  }
  input.sort();
  input.reverse();
  return input;
}

/**
 * Determine noise level using MAD https://en.wikipedia.org/wiki/Median_absolute_deviation
 * Constant to convert mad to sd calculated using https://www.wolframalpha.com/input?i=sqrt%282%29+inverse+erf%280.5%29
 * This assumes a gaussian distribution of the noise
 * @param array - array of numbers.
 * @returns noise level corresponding to one standard deviation.
 */
function xNoiseStandardDeviation(array) {
  const {
    mad,
    median
  } = xMedianAbsoluteDeviation(array);
  return {
    sd: mad / 0.6744897501960817,
    mad,
    median
  };
}

/**
 * This function calculate the norm of a vector.
 * @example xNorm([3, 4]) -> 5
 * @param array - array
 * @returns - calculated norm
 */
function xNorm(array) {
  let result = 0;
  for (const element of array) {
    result += element ** 2;
  }
  return Math.sqrt(result);
}

/**
 * Calculate the sum of the values
 * @param array - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns sum value on the specified range.
 */
function xSum(array, options = {}) {
  xCheck(array);
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(array, options);
  let sumValue = array[fromIndex];
  for (let i = fromIndex + 1; i <= toIndex; i++) {
    sumValue += array[i];
  }
  return sumValue;
}

/**
 * Divides the data with either the sum, the absolute sum or the maximum of the data
 * @param input - array containing values.
 * @param options - options.
 * @returns normalized data.
 */
function xNormed(input, options = {}) {
  const {
    algorithm = 'absolute',
    value = 1
  } = options;
  xCheck(input);
  const output = getOutputArray(options.output, input.length);
  if (input.length === 0) {
    throw new Error('input must not be empty');
  }
  switch (algorithm) {
    case 'absolute':
      {
        const absoluteSumValue = absoluteSum(input) / value;
        if (absoluteSumValue === 0) {
          throw new Error('trying to divide by 0');
        }
        for (let i = 0; i < input.length; i++) {
          output[i] = input[i] / absoluteSumValue;
        }
        return output;
      }
    case 'max':
      {
        const currentMaxValue = xMaxValue(input);
        if (currentMaxValue === 0) {
          throw new Error('trying to divide by 0');
        }
        const factor = value / currentMaxValue;
        for (let i = 0; i < input.length; i++) {
          output[i] = input[i] * factor;
        }
        return output;
      }
    case 'sum':
      {
        const sumFactor = xSum(input) / value;
        if (sumFactor === 0) {
          throw new Error('trying to divide by 0');
        }
        for (let i = 0; i < input.length; i++) {
          output[i] = input[i] / sumFactor;
        }
        return output;
      }
    default:
      throw new Error(`unknown algorithm: ${String(algorithm)}`);
  }
}
function absoluteSum(input) {
  let sumValue = 0;
  for (const value of input) {
    sumValue += Math.abs(value);
  }
  return sumValue;
}

/**
 * Pads an array symmetrically on both sides.
 * @param array - the array that will be padded
 * @param options - options
 * @returns padded Float64Array
 */
function xPadding(array, options = {}) {
  const {
    size = 0,
    value = 0,
    algorithm
  } = options;
  xCheck(array);
  if (!algorithm) {
    return xEnsureFloat64(array);
  }
  const result = new Float64Array(array.length + size * 2);
  for (let i = 0; i < array.length; i++) {
    result[i + size] = array[i];
  }
  const fromEnd = size + array.length;
  const toEnd = 2 * size + array.length;
  switch (algorithm) {
    case 'value':
      for (let i = 0; i < size; i++) {
        result[i] = value;
      }
      for (let i = fromEnd; i < toEnd; i++) {
        result[i] = value;
      }
      break;
    case 'duplicate':
      for (let i = 0; i < size; i++) {
        result[i] = array[0];
      }
      for (let i = fromEnd; i < toEnd; i++) {
        result[i] = array.at(-1);
      }
      break;
    case 'circular':
      for (let i = 0; i < size; i++) {
        result[i] = array[(array.length - size % array.length + i) % array.length];
      }
      for (let i = 0; i < size; i++) {
        result[i + fromEnd] = array[i % array.length];
      }
      break;
    default:
      throw new Error(`unknown algorithm ${String(algorithm)}`);
  }
  return result;
}

/**
 * Pareto scaling, which uses the square root of standard deviation as the scaling factor, circumvents the amplification of noise by retaining a small portion of magnitude information.
 * Noda, I. (2008). Scaling techniques to enhance two-dimensional correlation spectra. Journal of Molecular Structure, 883, 216-227.
 * DOI: 10.1016/j.molstruc.2007.12.026
 * @param array - array of number
 */
function xParetoNormalization(array) {
  xCheck(array);
  const result = new Float64Array(array.length);
  const sqrtSD = Math.sqrt(xStandardDeviation(array));
  for (let i = 0; i < array.length; i++) {
    result[i] = array[i] / sqrtSD;
  }
  return result;
}

/**
 * Calculate distribution statistics of an array without providing options. Statistics
 * like sd and mean are calculated after removing outliers.
 * This ensure that the statistics are calculated in the same way in all the packages
 * If the array is empty it will throw an error
 * If the array has a length of 1, sd will be NaN (unbiased calculation of sd)
 * @param array - data.
 * @returns q1, median, q3, min, max.
 */
function xRobustDistributionStats(array) {
  xCheck(array);
  const sorted = getSortedFloat64(array);
  const {
    boxPlot,
    bounds
  } = boxPlotWithOutliersAndBounds(sorted);
  if (boxPlot.max - boxPlot.min <= Number.EPSILON) {
    return {
      ...boxPlot,
      mean: boxPlot.median,
      sd: sorted.length === 1 ? Number.NaN : 0,
      nb: sorted.length
    };
  }
  // non-outliers form a contiguous range in the sorted array, so we slice it
  // as a zero-copy view instead of allocating and filling a filtered array.
  const filteredArray = sorted.subarray(bounds.lowIndex, bounds.highIndex);
  const mean = xMean(filteredArray);
  return {
    ...boxPlot,
    mean,
    sd: xStandardDeviation(filteredArray, {
      mean
    }),
    nb: filteredArray.length
  };
}

/**
 * Remove the outliers from the array
 * Based on 1.5 IQR
 * @param array - data
 * @returns - trimmed data
 */
function xRemoveOutliersIQR(array) {
  if (!isAnyArray$2(array)) {
    throw new TypeError('input must be an array');
  }
  if (array.length === 0) {
    return array;
  }
  const boxPlot = xBoxPlot(array);
  const iqr = boxPlot.q3 - boxPlot.q1;
  const lowerWhisker = boxPlot.q1 - 1.5 * iqr;
  const higherWhisker = boxPlot.q3 + 1.5 * iqr;
  if (boxPlot.min >= lowerWhisker && boxPlot.max <= higherWhisker) {
    return array;
  }
  const filteredArray = [];
  for (const element of array) {
    if (element >= lowerWhisker && element <= higherWhisker) {
      filteredArray.push(element);
    }
  }
  return filteredArray;
}

/**
 * Function used to rescale data
 * @param input - input for the rescale
 * @param options - options
 * @returns rescaled data
 */
function xRescale(input, options = {}) {
  xCheck(input);
  const output = getOutputArray(options.output, input.length);
  const currentMin = xMinValue(input);
  const currentMax = xMaxValue(input);
  if (currentMin === currentMax) {
    throw new RangeError('minimum and maximum input values are equal. Cannot rescale a constant array');
  }
  const {
    min = 0,
    max = 1
  } = options;
  if (min >= max) {
    throw new RangeError('min option must be smaller than max option');
  }
  const factor = (max - min) / (currentMax - currentMin);
  for (let i = 0; i < input.length; i++) {
    output[i] = (input[i] - currentMin) * factor + min;
  }
  return output;
}

/**
 * This function calculates a rolling average
 * @param array - array
 * @param fct - callback function that from an array returns a value
 * @param options - options
 */
function xRolling(array, fct, options = {}) {
  xCheck(array);
  if (typeof fct !== 'function') {
    throw new TypeError('fct must be a function');
  }
  const {
    window = 5,
    padding = {}
  } = options;
  const {
    size = window - 1,
    algorithm,
    value
  } = padding;
  const padded = xPadding(array, {
    size,
    algorithm,
    value
  }); // ensure we get a copy and it is float64
  const newArray = [];
  for (let i = 0; i < padded.length - window + 1; i++) {
    // we will send a view to the original buffer
    newArray.push(fct(padded.subarray(i, i + window)));
  }
  return newArray;
}

/**
 * This function calculates a rolling average
 * @param array - array
 * @param options - option
 */
function xRollingAverage(array, options = {}) {
  return xRolling(array, xMean, options);
}

/**
 * This function calculates a maximum within a rolling window
 * @param array - array
 * @param options - options
 */
function xRollingMax(array, options = {}) {
  return xRolling(array, xMaxValue, options);
}

/**
 * This function calculates a rolling average
 * @param array - array
 * @param options - options
 */
function xRollingMedian(array, options = {}) {
  return xRolling(array, xMedian, options);
}

/**
 * This function calculates a minimum within a rolling window
 * @param array - array
 * @param options - options
 */
function xRollingMin(array, options = {}) {
  return xRolling(array, xMinValue, options);
}

/**
 * This function performs a circular shift to an array.
 * Positive values of shifts will shift to the right and negative values will do to the left.
 * @example xRotate([1,2,3,4],1) -> [4,1,2,3]
 * @example xRotate([1,2,3,4],-1) -> [2,3,4,1]
 * @param array - array
 * @param shift - shift
 * @returns - rotated array
 */
function xRotate(array, shift) {
  shift = shift % array.length;
  if (shift < 0) shift += array.length;
  const result = new Float64Array(array.length);
  result.set(array.slice(array.length - shift));
  result.set(array.slice(0, array.length - shift), shift);
  return result;
}

/**
 * Sample within the array
 * @param array - array from which to sample.
 * @param options - options.
 * @returns array with evenly spaced elements.
 * @link https://en.wikipedia.org/wiki/Sampling_(signal_processing)
 */
function xSampling(array, options = {}) {
  const {
    length = 10
  } = options;
  xCheck(array);
  if (length === array.length) {
    return Float64Array.from(array);
  } else if (length > array.length) {
    throw new RangeError('length must be smaller than the array length');
  } else {
    return downSampling(array, length);
  }
}
/**
 * Downsample within the array
 * @param array - array from which to sample.
 * @param length - target number of elements.
 * @returns array with evenly spaced elements.
 * @link https://en.wikipedia.org/wiki/Downsampling_(signal_processing)
 */
function downSampling(array, length) {
  const returnArray = new Float64Array(length);
  const delta = length === 1 ? 0 : (array.length - 1) / (length - 1);
  for (let i = 0; i < length; i++) {
    returnArray[i] = array[Math.round(i * delta)];
  }
  return returnArray;
}

function xSequentialFillFromStep(parameters, options = {}) {
  const {
    from,
    step,
    size
  } = parameters;
  const {
    ArrayConstructor = Float64Array
  } = options;
  const result = createNumberArray(ArrayConstructor, size);
  for (let i = 0; i < size; i++) {
    result[i] = from + i * step;
  }
  return result;
}

function xSequentialFillFromTo(parameters, options = {}) {
  const {
    from,
    to,
    size
  } = parameters;
  const step = size <= 1 ? 0 : (to - from) / (size - 1);
  return xSequentialFillFromStep({
    from,
    step,
    size
  }, options);
}

/**
 * Function that sorts arrays or Float64Arrays in ascending order in place !
 * This method is optimized for typed arrays.
 * @param array - array to sort
 * @returns sorted array
 */
function xSortAscending(array) {
  if (ArrayBuffer.isView(array)) {
    array.sort();
    return array;
  } else if (Array.isArray(array)) {
    array.sort((a, b) => a - b);
    return array;
  }
  throw new Error('trying to sort non array');
}

/**
 * Function that sorts arrays or Float64Arrays in descending order
 * @param array - array to sort
 * @returns sorted array
 */
function xSortDescending(array) {
  if (ArrayBuffer.isView(array)) {
    array.sort();
    array.reverse();
    return array;
  } else if (Array.isArray(array)) {
    array.sort((a, b) => b - a);
    return array;
  }
  throw new Error('trying to sort non array');
}

/**
 * XUniqueSorted.
 * @param array - array of numbers
 * @returns - sorted array
 */
function xUniqueSorted(array) {
  const unique = Float64Array.from(new Set(array));
  unique.sort();
  return unique;
}

/**
 * Returns the median of the absolute matrix.
 * @param matrix - input matrix.
 */
function matrixAbsoluteMedian(matrix) {
  const nbColumns = matrix[0].length;
  const flatten = new Float64Array(matrix.length * nbColumns);
  for (let row = 0; row < matrix.length; row++) {
    const currentRow = row * nbColumns;
    for (let column = 0; column < nbColumns; column++) {
      const value = matrix[row][column];
      flatten[currentRow + column] = Math.abs(value);
    }
  }
  return xMedian(flatten);
}

/**
 * Clone a matrix.
 * @param matrix - input matrix.
 */
function matrixClone(matrix) {
  return matrix.map(row => row.slice(0));
}

/**
 * Numerically encodes the strings in the matrix with an encoding dictionary.
 * @param matrixInitial - original matrix before encoding.
 * @param dictionary - dictionary against which to do the encoding.
 * @returns encoded matrix.
 */
function matrixApplyNumericalEncoding(matrixInitial, dictionary) {
  const matrix = matrixClone(matrixInitial);
  const arrayOfValues = [];
  for (const key in dictionary) {
    arrayOfValues.push(dictionary[key]);
  }
  let k = xMaxValue(arrayOfValues);
  for (const row of matrix) {
    for (let j = 0; j < row.length; j++) {
      const value = row[j];
      if (typeof value === 'string') {
        if (value in dictionary) {
          row[j] = dictionary[value];
        } else {
          k++;
          dictionary[value] = k;
          row[j] = k;
        }
      }
    }
  }
  return matrix;
}

/**
 * Correlates every column of a matrix against a single reference column.
 * @param matrix - 2D matrix with at least 2 rows
 * @param index - column index used as the reference signal. Defaults to `0`.
 * @returns array of Pearson correlations, one value per column
 */
function matrixAutoCorrelation(matrix, index = 0) {
  const nbRows = matrix.length;
  const nbColumns = matrix[0].length;
  if (nbRows < 2) {
    throw new Error('can not calculate info if matrix contains less than 2 rows');
  }
  const targetArray = new Float64Array(nbRows);
  const sourceArray = new Float64Array(nbRows);
  const result = new Float64Array(nbColumns);
  for (let j = 0; j < nbRows; j++) {
    targetArray[j] = matrix[j][index];
  }
  for (let i = 0; i < nbColumns; i++) {
    for (let j = 0; j < nbRows; j++) {
      sourceArray[j] = matrix[j][i];
    }
    result[i] = xCorrelation(targetArray, sourceArray);
  }
  return result;
}

/**
 * Computes per-column box-plot statistics (min, Q1, median, Q3, max) for a matrix.
 * The matrix rows must be sorted in ascending order — results will be wrong otherwise.
 * Requires at least 5 rows.
 * @param matrix - 2D matrix whose rows are sorted in ascending order
 * @returns per-column box-plot statistics
 */
function matrixBoxPlot(matrix) {
  const nbRows = matrix.length;
  const nbColumns = matrix[0].length;
  if (nbRows < 5) {
    throw new Error('can not calculate info if matrix contains less than 5 rows');
  }
  const info = {
    q1: new Float64Array(nbColumns),
    median: new Float64Array(nbColumns),
    q3: new Float64Array(nbColumns),
    min: Float64Array.from(matrix[0]),
    max: Float64Array.from(matrix.at(-1))
  };
  const columnArray = new Float64Array(matrix.length);
  for (let column = 0; column < nbColumns; column++) {
    for (let row = 0; row < nbRows; row++) {
      columnArray[row] = matrix[row][column];
    }
    let q1max = 0;
    let q3min = 0;
    if (nbRows % 2 === 1) {
      // odd
      const middle = (nbRows - 1) / 2;
      info.median[column] = columnArray[middle];
      q1max = middle - 1;
      q3min = middle + 1;
    } else {
      // even
      q3min = nbRows / 2;
      q1max = q3min - 1;
      info.median[column] = (columnArray[q1max] + columnArray[q3min]) / 2;
    }
    if (q1max % 2 === 0) {
      info.q1[column] = columnArray[q1max / 2];
      info.q3[column] = columnArray[(nbRows + q3min - 1) / 2];
    } else {
      info.q1[column] = (columnArray[(q1max + 1) / 2] + columnArray[(q1max - 1) / 2]) / 2;
      const middleOver = (columnArray.length + q3min) / 2;
      info.q3[column] = (columnArray[middleOver] + columnArray[middleOver - 1]) / 2;
    }
  }
  return info;
}

/**
 * Create a new matrix based on the size of the current one or by using specific dimensions.
 * @param options - options.
 */
function matrixCreateEmpty(options) {
  const {
    matrix,
    nbRows = matrix?.length || 1,
    nbColumns = matrix?.[0].length || 1,
    ArrayConstructor = Float64Array
  } = options;
  const newMatrix = [];
  for (let row = 0; row < nbRows; row++) {
    newMatrix.push(createNumberArray(ArrayConstructor, nbColumns));
  }
  return newMatrix;
}

/**
 * Center mean of matrix columns.
 * @param matrix - matrix [rows][cols]
 */
function matrixCenterZMean(matrix) {
  const nbColumns = matrix[0].length;
  const nbRows = matrix.length;
  const newMatrix = matrixCreateEmpty({
    nbColumns,
    nbRows
  });
  for (let column = 0; column < nbColumns; column++) {
    let mean = 0;
    for (let row = 0; row < nbRows; row++) {
      mean += matrix[row][column];
    }
    mean /= nbRows;
    for (let row = 0; row < nbRows; row++) {
      newMatrix[row][column] = matrix[row][column] - mean;
    }
  }
  return newMatrix;
}

function matrixCheck(data) {
  if (data.length === 0 || data[0].length === 0) {
    throw new RangeError('matrix must contain data');
  }
  const firstLength = data[0].length;
  for (let i = 1; i < data.length; i++) {
    if (data[i].length !== firstLength) {
      throw new RangeError('all rows must has the same length');
    }
  }
}

/*
The MIT License (MIT)

Copyright (c) 2013 Eric Arnebäck

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/**
 * Solves a system of linear equations using the Cholesky decomposition method.
 * It is a direct conversion to TS from {@link https://github.com/scijs/cholesky-solve}
 * @param nonZerosArray - the matrix in triplet form (array of arrays), where each sub-array contains three elements: row index, column index, and value.
 * @param dimension - the order of the matrix (number of rows/columns).
 * @param permutationEncoded - optional permutation array. If provided, it will be used to permute the matrix.
 * @returns a function that takes a right-hand side vector `b` and returns the solution vector `x`, or `null` if the decomposition fails.
 */
function matrixCholeskySolver(nonZerosArray, dimension, permutationEncoded) {
  if (permutationEncoded) {
    const pinv = new Int32Array(dimension);
    for (let k = 0; k < dimension; k++) {
      pinv[permutationEncoded[k]] = k;
    }
    // Build a permuted copy (kept as plain arrays for compatibility)
    const mt = new Array(nonZerosArray.length);
    for (let a = 0; a < nonZerosArray.length; ++a) {
      const [r, c, value] = nonZerosArray[a];
      const ar = pinv[r];
      const ac = pinv[c];
      mt[a] = ac < ar ? [ac, ar, value] : [ar, ac, value];
    }
    nonZerosArray = mt;
  } else {
    // use a typed identity permutation
    const p = new Int32Array(dimension);
    for (let i = 0; i < dimension; ++i) {
      p[i] = i;
    }
    permutationEncoded = p;
  }
  const nnz = nonZerosArray.length;
  const ap = new Int32Array(dimension + 1);
  const ai = new Int32Array(nnz);
  const ax = new Float64Array(nnz);
  const lnz = new Int32Array(dimension);
  for (let idx = 0; idx < nnz; idx++) {
    const col = nonZerosArray[idx][1];
    lnz[col]++;
  }
  ap[0] = 0;
  for (let i = 0; i < dimension; ++i) {
    ap[i + 1] = ap[i] + lnz[i];
  }
  const colOffset = new Int32Array(dimension);
  for (let idx = 0; idx < nnz; idx++) {
    const e = nonZerosArray[idx];
    const col = e[1];
    const adr = ap[col] + colOffset[col];
    ai[adr] = e[0];
    ax[adr] = e[2];
    colOffset[col]++;
  }
  const d = new Float64Array(dimension);
  const y = new Float64Array(dimension);
  const lp = new Int32Array(dimension + 1);
  const parent = new Int32Array(dimension);
  const lnzArray = new Int32Array(dimension);
  const flag = new Int32Array(dimension);
  const pattern = new Int32Array(dimension);
  const bp1 = new Float64Array(dimension);
  const x = new Float64Array(dimension);
  ldlSymbolic(dimension, ap, ai, lp, parent, lnzArray, flag);
  const nz = lp[dimension];
  const lx = new Float64Array(nz);
  const li = new Int32Array(nz);
  const result = ldlNumeric(dimension, ap, ai, ax, lp, parent, lnzArray, li, lx, d, y, pattern, flag);
  if (result === dimension) {
    return b => {
      ldlPerm(dimension, bp1, b, permutationEncoded);
      ldlLsolve(dimension, bp1, lp, li, lx);
      ldlDsolve(dimension, bp1, d);
      ldlLTsolve(dimension, bp1, lp, li, lx);
      ldlPermt(dimension, x, bp1, permutationEncoded);
      return x;
    };
  } else {
    return null;
  }
}
function ldlSymbolic(dimension, ap, ai, lp, parent, lnz, flag) {
  const apLoc = ap;
  const aiLoc = ai;
  const parentLoc = parent;
  const lnzLoc = lnz;
  const flagLoc = flag;
  for (let k = 0; k < dimension; k++) {
    parentLoc[k] = -1;
    flagLoc[k] = k;
    lnzLoc[k] = 0;
    const kk = k;
    const p2 = apLoc[kk + 1];
    for (let p = apLoc[kk]; p < p2; p++) {
      let i = aiLoc[p];
      if (i < k) {
        for (; flagLoc[i] !== k; i = parentLoc[i]) {
          if (parentLoc[i] === -1) parentLoc[i] = k;
          lnzLoc[i]++;
          flagLoc[i] = k;
        }
      }
    }
  }
  lp[0] = 0;
  for (let k = 0; k < dimension; k++) {
    lp[k + 1] = lp[k] + lnz[k];
  }
}
function ldlNumeric(dimension, ap, ai, ax, lp, parent, lnz, li, lx, d, y, pattern, flag) {
  const apLoc = ap;
  const aiLoc = ai;
  const axLoc = ax;
  const lpLoc = lp;
  const parentLoc = parent;
  const lnzLoc = lnz;
  const liLoc = li;
  const lxLoc = lx;
  const dLoc = d;
  const yLoc = y;
  const patternLoc = pattern;
  const flagLoc = flag;
  let yi, lKi;
  for (let k = 0; k < dimension; k++) {
    yLoc[k] = 0;
    let top = dimension;
    flagLoc[k] = k;
    lnzLoc[k] = 0;
    const kk = k;
    const p2col = apLoc[kk + 1];
    for (let p = apLoc[kk]; p < p2col; p++) {
      let i = aiLoc[p];
      if (i <= k) {
        yLoc[i] += axLoc[p];
        let len = 0;
        for (; flagLoc[i] !== k; i = parentLoc[i]) {
          patternLoc[len++] = i;
          flagLoc[i] = k;
        }
        while (len > 0) patternLoc[--top] = patternLoc[--len];
      }
    }
    dLoc[k] = yLoc[k];
    yLoc[k] = 0;
    for (; top < dimension; top++) {
      const i = patternLoc[top];
      yi = yLoc[i];
      yLoc[i] = 0;
      const p2 = lpLoc[i] + lnzLoc[i];
      let p;
      for (p = lpLoc[i]; p < p2; p++) {
        yLoc[liLoc[p]] -= lxLoc[p] * yi;
      }
      lKi = yi / dLoc[i];
      dLoc[k] -= lKi * yi;
      liLoc[p] = k;
      lxLoc[p] = lKi;
      lnzLoc[i]++;
    }
    if (dLoc[k] === 0) return k;
  }
  return dimension;
}
function ldlLsolve(dimension, x, lp, li, lx) {
  const lpLoc = lp;
  const liLoc = li;
  const lxLoc = lx;
  const xLoc = x;
  for (let j = 0; j < dimension; j++) {
    const p2 = lpLoc[j + 1];
    for (let p = lpLoc[j]; p < p2; p++) {
      xLoc[liLoc[p]] -= lxLoc[p] * xLoc[j];
    }
  }
}
function ldlDsolve(dimension, x, d) {
  const xLoc = x;
  const dLoc = d;
  for (let j = 0; j < dimension; j++) {
    xLoc[j] /= dLoc[j];
  }
}
function ldlLTsolve(dimension, x, lp, li, lx) {
  const lpLoc = lp;
  const liLoc = li;
  const lxLoc = lx;
  const xLoc = x;
  for (let j = dimension - 1; j >= 0; j--) {
    const p2 = lpLoc[j + 1];
    for (let p = lpLoc[j]; p < p2; p++) {
      xLoc[j] -= lxLoc[p] * xLoc[liLoc[p]];
    }
  }
}
function ldlPerm(dimension, x, b, permutationEncoded) {
  const perm = permutationEncoded;
  const xLoc = x;
  const bLoc = b;
  for (let j = 0; j < dimension; j++) {
    xLoc[j] = bLoc[perm[j]];
  }
}
function ldlPermt(dimension, x, b, permutationEncoded) {
  const perm = permutationEncoded;
  const xLoc = x;
  const bLoc = b;
  for (let j = 0; j < dimension; j++) {
    xLoc[perm[j]] = bLoc[j];
  }
}

/**
 * Calculates a correlation matrix based on the columns of the initial matrix.
 * @param A - matrix [rows][cols]
 */
function matrixColumnsCorrelation(A) {
  const B = new Matrix$1(A).transpose();
  const result = [];
  for (let i = 0; i < B.rows; i++) {
    result.push(new Float64Array(B.rows));
  }
  for (let i = 0; i < B.rows; i++) {
    for (let j = i; j < B.rows; j++) {
      const correlation = xCorrelation(B.getRow(i), B.getRow(j));
      result[i][j] = correlation;
      result[j][i] = correlation;
    }
  }
  return result;
}

/**
 * The MIT License (MIT)
 *
 * Copyright (c) 2013 Mikola Lysenko
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
/**
 * The reverse Cuthill-Mckee method is a fast and effective preconditioner for reducing the bandwidth of sparse linear systems.
 * When solving a positive semidefinite linear system using Cholesky factorization, it greatly reduces fill-in.
 * It is a direct conversion to TS from {@link github.com/mikolalysenko/cuthill-mckee}
 * @param list - lower triangular non zeros from a symmetric sparse matrix.
 * @param dimension - matrix dimension
 * @returns A Float64Array where the value at each index represents the new position of the node
 *          in the bandwidth-reduced ordering.
 */
function matrixCuthillMckee(list, dimension) {
  const adj = new Array(dimension);
  const visited = new Array(dimension).fill(false);
  for (let i = 0; i < dimension; ++i) {
    adj[i] = [];
  }
  for (const l of list) {
    adj[l[0]].push(l[1]);
  }
  const toVisit = new Float64Array(dimension);
  let eol = 0;
  let ptr = 0;
  for (let i = 0; i < dimension; ++i) {
    if (visited[i]) {
      continue;
    }
    toVisit[eol++] = i;
    visited[i] = true;
    while (ptr < eol) {
      const v = toVisit[ptr++];
      const nbhd = Float64Array.from(adj[v]);
      nbhd.sort();
      for (const u of nbhd) {
        if (visited[u]) {
          continue;
        }
        visited[u] = true;
        toVisit[eol++] = u;
      }
    }
  }
  const result = new Float64Array(dimension);
  for (let i = 0; i < dimension; ++i) {
    result[toVisit[i]] = i;
  }
  return result;
}

/**
 * Checks if the specified submatrix boundaries are within the valid range of the given matrix.
 * @param matrix - the matrix to check the boundaries against.
 * @param boundaries - the boundaries of the submatrix.
 * @throws {RangeError} If any of the specified boundaries are out of the matrix's range.
 */
function matrixCheckRanges(matrix, boundaries) {
  const {
    startRow,
    endRow,
    startColumn,
    endColumn
  } = boundaries;
  if (startRow > endRow || startColumn > endColumn || startRow < 0 || startRow >= matrix.length || endRow < 0 || endRow >= matrix.length || startColumn < 0 || startColumn >= matrix[0].length || endColumn < 0 || endColumn >= matrix[0].length) {
    throw new RangeError('submatrix indices are out of range');
  }
}

/**
 * Get a subMatrix from matrix, the function checks if the subMatrix
 * lies within the dimensions of the matrix.
 * @param matrix - the original matrix from which the subMatrix will be extracted.
 * @param options - options to define the subMatrix boundaries and duplication behavior.
 * @returns the subMatrix extracted from the original matrix.
 */
function matrixGetSubMatrix(matrix, options) {
  const {
    startRow,
    endRow,
    startColumn,
    endColumn,
    duplicate = true
  } = options;
  matrixCheckRanges(matrix, {
    startColumn,
    startRow,
    endColumn,
    endRow
  });
  const nbRows = endRow - startRow + 1;
  const subMatrix = [];
  if (duplicate) {
    for (let i = 0; i < nbRows; i++) {
      subMatrix.push(matrix[startRow + i].slice(startColumn, endColumn + 1));
    }
  } else {
    for (let i = 0; i < nbRows; i++) {
      subMatrix.push(matrix[startRow + i].subarray(startColumn, endColumn + 1));
    }
  }
  return subMatrix;
}

/**
 * Apply the Hilbert transform to each row of a real-valued matrix, reusing a
 * single FFT instance for all rows to avoid repeated instantiation overhead.
 * All rows must have the same length, which must be a power of two.
 * @param rows - array of real-valued Float64Array rows
 * @param options - options
 * @returns array of Hilbert-transformed Float64Array rows
 * @see DOI: 10.1109/TAU.1970.1162139 "Discrete Hilbert transform"
 */
function matrixHilbertTransform(rows, options = {}) {
  if (rows.length === 0) return [];
  const size = rows[0].length;
  if (!isPowerOfTwo(size)) {
    throw new RangeError(`Row length must be a power of two. Got ${size}.`);
  }
  for (let j = 1; j < rows.length; j++) {
    if (rows[j].length !== size) {
      throw new RangeError(`All rows must have the same length. Expected ${size} but row ${j} has length ${rows[j].length}.`);
    }
  }
  // Single FFT instance reused across all rows
  const fft = getFFT(size);
  // Multiplier computed once — identical for every row of the same length
  const half = size >> 1;
  // Shared working buffers reused across all rows
  const fftResult = new Float64Array(size * 2);
  const hilbertSignal = new Float64Array(size * 2);
  const {
    output = matrixCreateEmpty({
      nbRows: rows.length,
      nbColumns: size
    })
  } = options;
  for (let j = 0; j < rows.length; j++) {
    const row = rows[j];
    fft.realTransform(fftResult, row);
    fft.completeSpectrum(fftResult);
    const idx = half << 1;
    fftResult[idx] = 0;
    fftResult[idx + 1] = 0;
    // Negate negative frequencies
    for (let c = half + 1 << 1; c < fftResult.length; c += 2) {
      fftResult[c] = -fftResult[c];
      fftResult[c + 1] = -fftResult[c + 1];
    }
    fft.inverseTransform(hilbertSignal, fftResult);
    const result = output[j];
    for (let i = 0; i < size; i++) {
      result[i] = hilbertSignal[i * 2 + 1];
    }
  }
  return output;
}

/**
 * Get min and max of the absolute values of Z.
 * @param matrix - matrix [rows][cols].
 */
function matrixMinMaxAbsoluteZ(matrix) {
  if (matrix.length === 0 || matrix[0].length === 0) {
    throw new Error('matrixMinMaxAbsoluteZ requires at least 1 row and 1 column');
  }
  const nbRows = matrix.length;
  const nbColumns = matrix[0].length;
  let min = Number.POSITIVE_INFINITY;
  let max = Number.NEGATIVE_INFINITY;
  for (let column = 0; column < nbColumns; column++) {
    for (let row = 0; row < nbRows; row++) {
      let value = matrix[row][column];
      if (value < 0) value *= -1;
      if (value < min) min = value;
      if (value > max) max = value;
    }
  }
  return {
    min,
    max
  };
}

/**
 * Get min and max Z.
 * @param matrix - matrix [rows][cols].
 */
function matrixMinMaxZ(matrix) {
  matrixCheck(matrix);
  const nbRows = matrix.length;
  const nbColumns = matrix[0].length;
  let min = matrix[0][0];
  let max = matrix[0][0];
  for (let column = 0; column < nbColumns; column++) {
    for (let row = 0; row < nbRows; row++) {
      if (matrix[row][column] < min) min = matrix[row][column];
      if (matrix[row][column] > max) max = matrix[row][column];
    }
  }
  return {
    min,
    max
  };
}

/**
 * Calculates a histogram of defined number of slots.
 * @param matrix - matrix [rows][cols].
 * @param options - options
 * @returns result of the histogram.
 */
function matrixHistogram(matrix, options = {}) {
  let {
    min,
    max
  } = options;
  const {
    absolute,
    logBaseX,
    logBaseY,
    histogram,
    nbSlots,
    centerX
  } = options;
  if (matrix.length === 0 || matrix[0].length === 0) {
    throw new Error('matrix must have at least one column and one row');
  }
  if (min === undefined || max === undefined) {
    const minMax = absolute ? matrixMinMaxAbsoluteZ(matrix) : matrixMinMaxZ(matrix);
    if (min === undefined) {
      min = logBaseX && minMax.min ? Math.log(minMax.min) / Math.log(logBaseX) : minMax.min;
    }
    if (max === undefined) {
      max = logBaseX && minMax.max ? Math.log(minMax.max) / Math.log(logBaseX) : minMax.max;
    }
  }
  const xHistogramOptions = {
    histogram,
    nbSlots,
    centerX,
    absolute,
    logBaseX,
    // Skip logBaseY as it's handled below.
    min,
    max
  };
  const finalHistogram = xHistogram(matrix[0], xHistogramOptions);
  xHistogramOptions.histogram = finalHistogram;
  const nbRows = matrix.length;
  for (let row = 1; row < nbRows; row++) {
    xHistogram(matrix[row], xHistogramOptions);
  }
  const y = finalHistogram.y;
  if (logBaseY) {
    const logOfBase = Math.log10(logBaseY);
    for (let i = 0; i < y.length; i++) {
      y[i] = Math.log10(y[i] + 1) / logOfBase;
    }
  }
  return finalHistogram;
}

/**
 * Returns the max absolute values of Z.
 * @param matrix - matrix [rows][cols].
 */
function matrixMaxAbsoluteZ(matrix) {
  if (matrix.length === 0 || matrix[0].length === 0) {
    throw new Error('matrix must have at least 1 row and 1 column');
  }
  const nbRows = matrix.length;
  const nbColumns = matrix[0].length;
  let max = Number.NEGATIVE_INFINITY;
  for (let column = 0; column < nbColumns; column++) {
    for (let row = 0; row < nbRows; row++) {
      const value = Math.abs(matrix[row][column]);
      if (value > max) max = value;
    }
  }
  return max;
}

/**
 * Convert a matrix to a flat Float64Array.
 * @param matrix - input matrix.
 */
function matrixToArray(matrix) {
  matrixCheck(matrix);
  const nbColumns = matrix[0].length;
  const flatten = new Float64Array(matrix.length * nbColumns);
  for (let row = 0; row < matrix.length; row++) {
    const currentRow = row * nbColumns;
    for (let column = 0; column < nbColumns; column++) {
      flatten[currentRow + column] = matrix[row][column];
    }
  }
  return flatten;
}

/**
 * Returns the median of the matrix.
 * @param matrix - input matrix.
 */
function matrixMedian(matrix) {
  return xMedian(matrixToArray(matrix));
}

/**
 * Determine noise level using MAD https://en.wikipedia.org/wiki/Median_absolute_deviation
 * Constant to convert mad to sd calculated using https://www.wolframalpha.com/input?i=sqrt%282%29+inverse+erf%280.5%29
 * This assumes a gaussian distribution of the noise.
 * @param matrix - input matrix.
 * @returns noise level corresponding to one standard deviation.
 */
function matrixNoiseStandardDeviation(matrix) {
  return xNoiseStandardDeviation(matrixToArray(matrix));
}

/**
 * Numerically decodes the matrix using the dictionary.
 * @param matrixInitial - original matrix to decode.
 * @param dictionary - dictionary against which to do the encoding.
 * @returns decoded matrix.
 */
function matrixNumericalDecoding(matrixInitial, dictionary) {
  const matrix = matrixClone(matrixInitial);
  const invertedDictionary = swap(dictionary);
  for (const row of matrix) {
    for (let j = 0; j < matrix[0].length; j++) {
      const value = row[j];
      if (typeof value === 'number' && value in invertedDictionary) {
        row[j] = invertedDictionary[value];
      }
    }
  }
  return matrix;
}
function swap(dictionary) {
  const ret = {};
  for (const key in dictionary) {
    ret[dictionary[key]] = key;
  }
  return ret;
}

/**
 * Numerically encodes the strings in the matrix and returns an encoding dictionary which can be used to encode other matrices
 * @param matrixInitial - original matrix before encoding
 * @returns - dictionary from string to number
 */
function matrixNumericalEncoding(matrixInitial) {
  const matrix = matrixClone(matrixInitial);
  const nRows = matrix.length;
  const nColumns = matrix[0].length;
  let k = 0;
  for (let i = 0; i < nRows; i++) {
    for (let j = 0; j < nColumns; j++) {
      const value = matrix[i][j];
      if (typeof value === 'number' && value > k) {
        k = value;
      }
    }
  }
  const dictCategoricalToNumerical = {};
  for (let i = 0; i < nRows; i++) {
    for (let j = 0; j < nColumns; j++) {
      const value = matrix[i][j];
      if (typeof value === 'string') {
        if (value in dictCategoricalToNumerical) {
          matrix[i][j] = dictCategoricalToNumerical[value];
        } else {
          k++;
          dictCategoricalToNumerical[value] = k;
          matrix[i][j] = k;
        }
      }
    }
  }
  return {
    matrix: matrix,
    dictCategoricalToNumerical
  };
}

/**
 * Performs a Probabilistic quotient normalization (PQN) over the dataset to account dilution based in median spectrum.
 * Dieterle, F., Ross, A., Schlotterbeck, G., & Senn, H. (2006). Probabilistic quotient normalization as robust method to account for dilution of complex biological mixtures. Application in 1H NMR metabonomics. Analytical chemistry, 78(13), 4281-4290.
 * DOI: 10.1021/ac051632c
 * @param matrix - matrix [rows][cols].
 * @param options - options
 * @returns - {data: Normalized dataset, medianOfQuotients: The median of quotients of each variables}
 */
function matrixPQN(matrix, options = {}) {
  const {
    max = 100
  } = options;
  const matrixB = new Matrix$1(matrix);
  for (let i = 0; i < matrixB.rows; i++) {
    const normalizationFactor = matrixB.getRowVector(i).norm('frobenius') / max;
    const row = matrixB.getRowVector(i).div(normalizationFactor);
    matrixB.setRow(i, row);
  }
  const referenceSpectrum = [];
  for (let i = 0; i < matrixB.columns; i++) {
    const currentVariable = matrixB.getColumn(i);
    referenceSpectrum.push(xMedian(currentVariable));
  }
  const medianOfQuotients = [];
  for (let i = 0; i < matrixB.columns; i++) {
    const quotients = matrixB.getColumnVector(i).div(referenceSpectrum[i]);
    medianOfQuotients.push(xMedian(quotients.getColumn(0)));
  }
  for (let i = 0; i < matrixB.rows; i++) {
    matrixB.mulRow(i, 1 / medianOfQuotients[i]);
  }
  return {
    data: matrixB.to2DArray(),
    medianOfQuotients
  };
}

/**
 * Set in-place a subMatrix to matrix, the function check if the subMatrix
 * lies into the dimensions of matrix.
 * @param matrix - matrix that will receive the new element values.
 * @param subMatrix - matrix with equal or less size than matrix.
 * @param startRow - row index in matrix for the first row in subMatrix.
 * @param startColumn - column index in matrix for the first column in subMatrix.
 * @returns the modified `matrix`.
 */
function matrixSetSubMatrix(matrix, subMatrix, startRow, startColumn) {
  const endRow = startRow + subMatrix.length - 1;
  const endColumn = startColumn + subMatrix[0].length - 1;
  matrixCheckRanges(matrix, {
    startRow,
    endRow,
    startColumn,
    endColumn
  });
  for (let i = 0; i < subMatrix.length; i++) {
    for (let j = 0; j < subMatrix[0].length; j++) {
      matrix[startRow + i][startColumn + j] = subMatrix[i][j];
    }
  }
  return matrix;
}

/**
 * Rescale a matrix around 0 taking into account the absolute max value.
 * @param matrix - matrix [rows][cols].
 * @param options - options.
 */
function matrixZPivotRescale(matrix, options = {}) {
  const {
    max = 1,
    ArrayConstructor
  } = options;
  const nbColumns = matrix[0].length;
  const nbRows = matrix.length;
  const newMatrix = matrixCreateEmpty({
    nbColumns,
    nbRows,
    ArrayConstructor
  });
  const currentMax = matrixMaxAbsoluteZ(matrix);
  const factor = max / currentMax;
  for (let column = 0; column < nbColumns; column++) {
    for (let row = 0; row < nbRows; row++) {
      newMatrix[row][column] = matrix[row][column] * factor;
    }
  }
  return newMatrix;
}

/**
 * Rescale a matrix between min and max values.
 * @param matrix - matrix [rows][cols].
 * @param options - options.
 */
function matrixZRescale(matrix, options = {}) {
  const {
    min = 0,
    max = 1,
    ArrayConstructor
  } = options;
  const nbColumns = matrix[0].length;
  const nbRows = matrix.length;
  const newMatrix = matrixCreateEmpty({
    nbColumns,
    nbRows,
    ArrayConstructor
  });
  const {
    min: currentMin,
    max: currentMax
  } = matrixMinMaxZ(matrix);
  const factor = (max - min) / (currentMax - currentMin);
  for (let column = 0; column < nbColumns; column++) {
    for (let row = 0; row < nbRows; row++) {
      newMatrix[row][column] = (matrix[row][column] - currentMin) * factor + min;
    }
  }
  return newMatrix;
}

/**
 * Rescale the matrix per column for which we get the min and max values.
 * @param matrix - matrix [rows][cols].
 * @param options - options.
 */
function matrixZRescalePerColumn(matrix, options = {}) {
  const {
    min = 0,
    max = 1
  } = options;
  const nbColumns = matrix[0].length;
  const nbRows = matrix.length;
  const newMatrix = matrixCreateEmpty({
    nbColumns,
    nbRows
  });
  for (let column = 0; column < nbColumns; column++) {
    let currentMin = matrix[0][column];
    let currentMax = matrix[0][column];
    for (let row = 1; row < nbRows; row++) {
      if (matrix[row][column] < currentMin) currentMin = matrix[row][column];
      if (matrix[row][column] > currentMax) currentMax = matrix[row][column];
    }
    const factor = (max - min) / (currentMax - currentMin);
    for (let row = 0; row < nbRows; row++) {
      newMatrix[row][column] = (matrix[row][column] - currentMin) * factor + min;
    }
  }
  return newMatrix;
}

function matrixTranspose(matrix, options = {}) {
  matrixCheck(matrix);
  const {
    ArrayConstructor
  } = options;
  const nbRows = matrix.length;
  const nbColumns = matrix[0].length;
  // Create new matrix with swapped dimensions
  const result = matrixCreateEmpty({
    nbColumns: nbRows,
    nbRows: nbColumns,
    ArrayConstructor
  });
  for (let i = 0; i < nbRows; i++) {
    for (let j = 0; j < nbColumns; j++) {
      result[j][i] = matrix[i][j];
    }
  }
  return result;
}

/**
 * add the provided weights to a particular given system matrix (lD'D) in the triplet form and y data. This function is not general
 * it assumes that diagonal coefficients are in the even indexes, it is the case of the matrix generated by createSystemMatrix function.
 * It simulates the matrix operation W + lD'D and Wy.
 * @param leftHandSide - the original system matrix to be updated, a lower triangular non-zeros of the system matrix (lambda D'D).
 * @param rightHandSide - the original vector to be updated.
 * @param weights - the weights to apply to the system matrix and vector.
 * @returns an object that contains the new left and right hand-side of the system.
 */
function addWeights(leftHandSide, rightHandSide, weights) {
  const nbPoints = rightHandSide.length;
  const l = nbPoints - 1;
  const newLeftHandSide = new Array(leftHandSide.length);
  const newRightHandSide = new Float64Array(nbPoints);
  for (let i = 0; i < l; i++) {
    const w = weights[i];
    const diag = i * 2;
    const next = diag + 1;
    newLeftHandSide[diag] = leftHandSide[diag].slice();
    newLeftHandSide[next] = leftHandSide[next].slice();
    newRightHandSide[i] = rightHandSide[i] * w;
    newLeftHandSide[diag][2] += w;
  }
  newRightHandSide[l] = rightHandSide[l] * weights[l];
  newLeftHandSide[l * 2] = leftHandSide[l * 2].slice();
  newLeftHandSide[l * 2][2] += weights[l];
  return {
    leftHandSide: newLeftHandSide,
    rightHandSide: newRightHandSide
  };
}

/**
 * Generates a lower triangular non-zeros of the first order smoother matrix (lambda D'D) where D is the derivate of the identity matrix
 * this function in combination with addWeights function can obtain (Q = W + lambda D'D) a penalized least square of Whittaker smoother,
 * it also generates a permutation encoded array.
 * @param dimension - the number of points in the matrix.
 * @param lambda - the factor of smoothness.
 * @returns an object containing the lower triangular non-zero elements of the matrix
 * and the permutation encoded array.
 * @property lowerTriangularNonZeros - The lower triangular non-zero elements of the matrix in triplet form.
 * @property permutationEncodedArray - The permutation encoded array generated using the Cuthill-McKee algorithm.
 */
function createSystemMatrix(dimension, lambda) {
  const upperTriangularNonZeros = [];
  const last = dimension - 1;
  for (let i = 0; i < last; i++) {
    upperTriangularNonZeros.push([i, i, lambda * 2], [i, i + 1, -1 * lambda]);
  }
  upperTriangularNonZeros[0][2] = lambda;
  upperTriangularNonZeros.push([last, last, lambda]);
  const permutationEncodedArray = matrixCuthillMckee(upperTriangularNonZeros, dimension);
  return {
    upperTriangularNonZeros,
    permutationEncodedArray
  };
}

function xWhittakerSmoother(yData, options = {}) {
  const {
    algorithm = 'thomas',
    ...restOptions
  } = options;
  if (algorithm === 'thomas') {
    return whittakerByThomas(yData, restOptions);
  }
  return whittakerByCholesky(yData, restOptions);
}
/**
 * @deprecated Use xWhittakerSmoother instead.
 * TODO: Remove in next major version.
 */
const xWhitakerSmoother = xWhittakerSmoother;
/**
 * Computes the baseline points for the given data using an iterative smoothing algorithm.
 * @param yData - the input data array.
 * @param options - the options for baseline computation.
 * @returns the computed baseline points.
 */
function whittakerByCholesky(yData, options = {}) {
  const {
    lambda = 100,
    maxIterations = 100,
    tolerance = 1e-6,
    factorStd = 3,
    learningRate = 0.5
  } = options;
  const size = yData.length;
  const {
    controlPoints,
    weights
  } = getWeightsAndControlPoints(yData, options);
  const prevBaseline = new Float64Array(size);
  let iteration = 0;
  let delta = Infinity;
  let baseline = xEnsureFloat64(yData);
  const {
    upperTriangularNonZeros,
    permutationEncodedArray
  } = createSystemMatrix(size, lambda);
  while (iteration < maxIterations && delta > tolerance) {
    const {
      leftHandSide,
      rightHandSide
    } = addWeights(upperTriangularNonZeros, yData, weights);
    const cho = matrixCholeskySolver(leftHandSide, size, permutationEncodedArray);
    if (!cho) {
      return baseline;
    }
    const newBaseline = cho(rightHandSide);
    //weights is updated inplace
    calculateAdaptiveWeights(yData, newBaseline, weights, {
      controlPoints,
      learningRate,
      factorStd
    });
    delta = calculateDelta(newBaseline, prevBaseline, size);
    prevBaseline.set(newBaseline);
    baseline = xEnsureFloat64(newBaseline);
    iteration++;
  }
  return baseline;
}
/**
 * Calculates the delta between the current and previous baseline.
 * @param baseline - the current baseline array.
 * @param prevBaseline - the previous baseline array.
 * @param n - the length of the arrays.
 * @returns the calculated delta value.
 */
function calculateDelta(baseline, prevBaseline, n) {
  let sum = 0;
  for (let i = 0; i < n; i++) {
    sum += (baseline[i] - prevBaseline[i]) ** 2;
  }
  return Math.sqrt(sum / n);
}
/**
 * Retrieves the control points and weights for the given data, the weights are modified multiplication of controlPoints if it exists.
 * @param y - the input data array.
 * @param options - the options for control points and weights.
 * @returns the control points and modified weights.
 */
function getWeightsAndControlPoints(y, options = {}) {
  const {
    controlPoints
  } = options;
  const {
    weights = Float64Array.from({
      length: y.length
    }).fill(1)
  } = options;
  if (controlPoints && controlPoints.length !== y.length) {
    throw new RangeError('controlPoints should match the length with X');
  } else if (weights.length !== y.length) {
    throw new RangeError('weights should match the length with X');
  }
  return {
    weights: controlPoints ? xMultiply(weights, controlPoints) : weights,
    controlPoints
  };
}
function whittakerByThomas(yData, options = {}) {
  const {
    lambda = 100,
    maxIterations = 100,
    tolerance = 1e-6,
    factorStd = 3,
    learningRate = 0.5
  } = options;
  const n = yData.length;
  const y = xEnsureFloat64(yData);
  const {
    controlPoints,
    weights
  } = getWeightsAndControlPoints(yData, options);
  const prevBaseline = new Float64Array(n);
  let baseline = xEnsureFloat64(yData);
  // Precompute base diagonal and constant off-diagonals (−lambda)
  const baseDiag = new Float64Array(n);
  if (n === 1) {
    baseDiag[0] = lambda;
  } else {
    baseDiag[0] = lambda;
    for (let i = 1; i < n - 1; i++) baseDiag[i] = 2 * lambda;
    baseDiag[n - 1] = lambda;
  }
  const lower = new Float64Array(Math.max(0, n - 1));
  const upper = new Float64Array(Math.max(0, n - 1));
  for (let i = 0; i < lower.length; i++) {
    lower[i] = -lambda;
    upper[i] = -lambda;
  }
  const main = new Float64Array(n);
  const rhs = new Float64Array(n);
  const solution = new Float64Array(n);
  const workC = new Float64Array(Math.max(0, n - 1));
  const workD = new Float64Array(n);
  let iteration = 0;
  let delta = Infinity;
  /**
   * Iterative Whittaker smoothing implementation using the Thomas algorithm
   * (tridiagonal solver). The method constructs the system
   * [W + lambda * D'D] z = W * y where D is the second-difference operator
   * and W are adaptive weights. At each iteration the tridiagonal system is
   * solved with the Thomas algorithm and the weights are updated using
   * `calculateAdaptiveWeights` until convergence.
   *
   * Use this algorithm by passing `algorithm: 'thomas'` to `xWhittakerSmoother`.
   * It is more memory-efficient for large inputs because it avoids forming
   * the full banded matrix, but both implementations aim to produce the same
   * baseline result.
   * @param yData - input signal/spectrum
   * @param options - smoothing options (supports `lambda`, `maxIterations`,
   *                  `tolerance`, `factorStd`, `learningRate`, and optional
   *                  `controlPoints` / `weights` inherited from
   *                  `CalculateAdaptiveWeightsOptions`).
   * @returns baseline as a `Float64Array`.
   */
  while (iteration < maxIterations && delta > tolerance) {
    // Build main diagonal = baseDiag + weights, and RHS = weights * y
    for (let i = 0; i < n; i++) {
      main[i] = baseDiag[i] + weights[i];
      rhs[i] = weights[i] * y[i];
    }
    // Solve tridiagonal system in-place into `solution`
    solveTridiagonalFloat64(lower, main, upper, rhs, solution, workC, workD);
    calculateAdaptiveWeights(y, solution, weights, {
      controlPoints,
      learningRate,
      factorStd
    });
    delta = calculateDelta(solution, prevBaseline, n);
    prevBaseline.set(solution);
    baseline = xEnsureFloat64(solution);
    iteration++;
  }
  return baseline;
}
function solveTridiagonalFloat64(lower, diag, upper, rhs, out, cp, dp) {
  const n = diag.length;
  const x = out ?? new Float64Array(n);
  if (n === 0) return x;
  if (n === 1) {
    x[0] = rhs[0] / diag[0];
    return x;
  }
  const cprime = cp ?? new Float64Array(n - 1);
  const dprime = dp ?? new Float64Array(n);
  let denom = diag[0];
  cprime[0] = upper[0] / denom;
  dprime[0] = rhs[0] / denom;
  for (let i = 1; i < n - 1; i++) {
    denom = diag[i] - lower[i - 1] * cprime[i - 1];
    cprime[i] = upper[i] / denom;
    dprime[i] = (rhs[i] - lower[i - 1] * dprime[i - 1]) / denom;
  }
  denom = diag[n - 1] - lower[n - 2] * cprime[n - 2];
  dprime[n - 1] = (rhs[n - 1] - lower[n - 2] * dprime[n - 2]) / denom;
  x[n - 1] = dprime[n - 1];
  for (let i = n - 2; i >= 0; i--) {
    x[i] = dprime[i] - cprime[i] * x[i + 1];
  }
  return x;
}

/**
 * Phase correction filter.
 * @param data - complex spectrum
 * @param phi0 - angle in radians for zero order phase correction.
 * @param phi1 - angle in radians for first order phase correction.
 * @param options - options.
 * @returns a new object {re:[], im:[]} unless inPlace=true.
 */
function reimPhaseCorrection(data, phi0 = 0, phi1 = 0, options = {}) {
  const {
    reverse = false,
    inPlace = false
  } = options;
  phi0 = Number.isFinite(phi0) ? phi0 : 0;
  phi1 = Number.isFinite(phi1) ? phi1 : 0;
  const length = data.re.length;
  // Decide target arrays
  const re = data.re;
  const im = data.im;
  const outRe = inPlace ? re : new Float64Array(length);
  const outIm = inPlace ? im : new Float64Array(length);
  let firstAngle = phi0;
  let delta = phi1 / length;
  if (reverse) {
    delta *= -1;
    firstAngle += phi1;
  }
  const alpha = 2 * Math.sin(delta / 2) ** 2;
  const beta = Math.sin(delta);
  let cosTheta = Math.cos(firstAngle);
  let sinTheta = Math.sin(firstAngle);
  for (let i = 0; i < length; i++) {
    const r = re[i];
    const ii = im[i];
    outRe[i] = r * cosTheta - ii * sinTheta;
    outIm[i] = ii * cosTheta + r * sinTheta;
    // Recursive angle update (stable incremental rotation)
    const newCosTheta = cosTheta - (alpha * cosTheta + beta * sinTheta);
    const newSinTheta = sinTheta - (alpha * sinTheta - beta * cosTheta);
    cosTheta = newCosTheta;
    sinTheta = newSinTheta;
  }
  return {
    re: outRe,
    im: outIm
  };
}

/**
 * Implementation of the algorithm for automatic phase correction: A robust, general automatic phase
 * correction algorithm for high-resolution NMR data. 10.1002/mrc.4586
 * @param data - complex spectrum
 * @param options - options
 * @returns phased spectrum together with the zero- and first-order correction angles (ph0, ph1) in degrees
 */
function reimAutoPhaseCorrection(data, options = {}) {
  const {
    magnitudeMode = true,
    minRegSize = 30,
    factorNoise = 3,
    maxDistanceToJoin = 256,
    reverse = false,
    inPlace = false
  } = options;
  const finalPeaks = detectBaselineRegions(data, {
    maxDistanceToJoin,
    magnitudeMode,
    factorNoise
  });
  const {
    re,
    im
  } = data;
  const length = re.length;
  const indexMask = reverse ? i => length - 1 - i : i => i;
  let x0 = 0;
  let counter = -1;
  const res = [];
  while (counter < length) {
    const reTmp = [];
    const imTmp = [];
    while (!finalPeaks[indexMask(++counter)] && counter < length) {
      // Add some extra points(0.1 ppm) at rigth and left sides of the region.
      x0 = counter;
    }
    for (; finalPeaks[indexMask(counter)] && counter < length; counter += 2) {
      reTmp.push(re[indexMask(counter)]);
      imTmp.push(im[indexMask(counter)]);
    }
    if (reTmp.length > minRegSize) {
      res.push(autoPhaseRegion(reTmp, imTmp, x0));
    }
  }
  const {
    ph1,
    ph0
  } = determiningGlobalValues(res.map(r => r.x0 / length), res.map(r => r.ph0), res.map(r => r.area / 1e11));
  const phased = reimPhaseCorrection({
    re,
    im
  }, toRadians(ph0), toRadians(ph1), {
    reverse,
    inPlace
  });
  return {
    data: phased,
    ph0,
    ph1
  };
}
function determiningGlobalValues(x, ph0Values, weights) {
  if (x.length === 0) {
    return {
      ph0: 0,
      ph1: 0
    };
  } else if (x.length === 1) {
    return {
      ph0: ph0Values[0],
      ph1: 0
    };
  }
  const [ph1, ph0] = weightedLinearRegression(x, ph0Values, weights);
  let indexMax = -1;
  let maxDiff = Number.MIN_SAFE_INTEGER;
  for (let i = 0; i < x.length; i++) {
    const predictedPh0 = x[i] * ph1 + ph0;
    const diff = Math.abs(ph0Values[i] - predictedPh0);
    if (diff > 34 && maxDiff < diff) {
      indexMax = i;
      maxDiff = diff;
    }
  }
  if (indexMax > -1) {
    x.splice(indexMax, 1);
    ph0Values.splice(indexMax, 1);
    weights.splice(indexMax, 1);
    return determiningGlobalValues(x, ph0Values, weights);
  }
  return {
    ph0,
    ph1
  };
}
function detectBaselineRegions(data, options) {
  const magnitudeData = options.magnitudeMode ? reimAbsolute(data) : data.re;
  const ds = holoborodko(magnitudeData);
  const peaksDs = robustBaseLineRegionsDetection(ds, options);
  const peaksSp = robustBaseLineRegionsDetection(magnitudeData, options);
  return peaksSp.map((sp, i) => sp && peaksDs[i]);
}
/**
 * Finds the best phase angle for a region by minimizing the negative area.
 * @param re - array of number.
 * @param im - array of number.
 * @param x0 - number.
 * @returns region.
 */
function autoPhaseRegion(re, im, x0) {
  let start = -180;
  let stop = 180;
  const nSteps = 6;
  let maxSteps = 10;
  let bestAng = 0;
  let minArea = Number.MAX_SAFE_INTEGER;
  while (maxSteps > 0) {
    const dAng = (stop - start) / (nSteps + 1);
    for (let i = start; i <= stop; i += dAng) {
      const tmpPhased = reimPhaseCorrection({
        re,
        im
      }, toRadians(i), 0);
      const negArea = getNegArea(tmpPhased.re);
      if (negArea < minArea) {
        [minArea, bestAng] = [negArea, i];
      }
    }
    start = bestAng - dAng;
    stop = bestAng + dAng;
    maxSteps--;
  }
  // Calculate the area for the best angle
  const phased = reimPhaseCorrection({
    re,
    im
  }, toRadians(bestAng), 0);
  let area = 0;
  let sumX = 0;
  for (let j = 0; j < re.length; j++) {
    area += phased.re[j];
    sumX += phased.re[j] * (j + x0);
  }
  return {
    ph0: bestAng,
    area,
    x0: sumX / area
  };
}
/**
 * Applies the Holoborodko smoothing derivative filter.
 * @param s - array of float.
 * @returns array of float.
 */
function holoborodko(s) {
  const dk = new Float64Array(s.length);
  for (let i = 5; i < s.length - 5; i++) {
    dk[i] = (42 * (s[i + 1] - s[i - 1]) + 48 * (s[i + 2] - s[i - 2]) + 27 * (s[i + 3] + s[i - 3]) + 8 * (s[i + 4] - s[i - 4]) + s[i + 5] - s[i - 5]) / 512;
  }
  //Fill the borders
  for (let i = 0; i < 5; i++) {
    dk[i] = dk[5];
    dk[s.length - i - 1] = dk[s.length - 6];
  }
  return dk;
}
/**
 * Detects baseline regions using robust iterative noise estimation.
 * @param s - input signal array.
 * @param options - detection options.
 * @param options.magnitudeMode - whether to use magnitude mode.
 * @param options.maxDistanceToJoin - max distance to join nearby regions.
 * @param options.factorNoise - noise factor for cutoff.
 */
function robustBaseLineRegionsDetection(s, options) {
  const {
    maxDistanceToJoin,
    magnitudeMode,
    factorNoise
  } = options;
  const mask = new Uint8Array(s.length);
  for (let i = 0; i < s.length; i++) {
    mask[i] = 0;
  }
  let change = true;
  while (change) {
    const noiseLevel = xNoiseSanPlot(s, {
      magnitudeMode
    });
    const cutOff = factorNoise * noiseLevel.positive;
    change = false;
    for (let i = 0; i < s.length; i++) {
      if (Math.abs(s[i]) > cutOff && !mask[i]) {
        change = true;
        mask[i] = 1;
      }
    }
  }
  // Clean up mask by merging peaks blocks, separated by just a few points(4??).
  let count = 0;
  let prev = 0;
  for (let i = 0; i < s.length; i++) {
    if (!mask[i]) {
      count++;
    } else {
      if (count < maxDistanceToJoin) {
        for (let j = 0; j <= count; j++) {
          mask[prev + j] = 1;
        }
      }
      while (mask[++i] && i < s.length);
      prev = i;
      count = 0;
    }
  }
  return mask;
}
/**
 * Computes a weighted linear regression and returns [slope, intercept].
 * @param x - x values.
 * @param y - y values.
 * @param w - weights.
 */
function weightedLinearRegression(x, y, w) {
  let sxtw = 0;
  let swx = 0;
  let sw = 0;
  let sxtwy = 0;
  let swy = 0;
  for (let i = 0; i < x.length; i++) {
    sxtw += x[i] * x[i] * w[i];
    swx += x[i] * w[i];
    sw += w[i];
    sxtwy += x[i] * w[i] * y[i];
    swy += w[i] * y[i];
  }
  /* Just to know what is the matrix system that we solve
   let Mx=[[sxtw, swx], [swx, sw]];
   let My=[[sxtwy], [swy]];
  */
  //Mx inverse
  const detMx = sxtw * sw - swx * swx;
  const inMx = [[sw / detMx, -swx / detMx], [-swx / detMx, sxtw / detMx]];
  return [inMx[0][0] * sxtwy + inMx[0][1] * swy, inMx[1][0] * sxtwy + inMx[1][1] * swy];
}
function toRadians(degree) {
  return degree * Math.PI / 180;
}
function getNegArea(data) {
  let area = 0;
  for (const element of data) {
    if (element < 0) area -= element;
  }
  return area;
}

/**
 * Circular shift that moves the zero-frequency component to the center of the array (FFT shift).
 * For the inverse, the shift is reversed to restore the original layout.
 * @param data - input array
 * @param inverse - if true, shifts by ceil(n/2) instead of floor(n/2) to undo a previous zeroShift
 * @returns shifted array
 */
function zeroShift(data, inverse) {
  const middle = inverse ? Math.ceil(data.length / 2) : Math.floor(data.length / 2);
  return xRotate(data, middle);
}

/**
 * Computes the FFT of a complex spectrum.
 * @param data - complex spectrum.
 * @param options - options.
 * @returns FFT of complex spectrum.
 */
function reimFFT(data, options = {}) {
  const {
    inverse = false,
    applyZeroShift = false,
    inPlace = false
  } = options;
  const {
    re,
    im
  } = data;
  const size = re.length;
  const csize = size << 1;
  let complexArray = new Float64Array(csize);
  for (let i = 0; i < csize; i += 2) {
    complexArray[i] = re[i >>> 1];
    complexArray[i + 1] = im[i >>> 1];
  }
  const fft = getFFT(size);
  let output = new Float64Array(csize);
  if (inverse) {
    if (applyZeroShift) complexArray = zeroShift(complexArray, true);
    fft.inverseTransform(output, complexArray);
  } else {
    fft.transform(output, complexArray);
    if (applyZeroShift) output = zeroShift(output);
  }
  if (inPlace) {
    for (let i = 0; i < csize; i += 2) {
      re[i >>> 1] = output[i];
      im[i >>> 1] = output[i + 1];
    }
    return data;
  }
  const newRe = new Float64Array(size);
  const newIm = new Float64Array(size);
  for (let i = 0; i < csize; i += 2) {
    newRe[i >>> 1] = output[i];
    newIm[i >>> 1] = output[i + 1];
  }
  return {
    re: newRe,
    im: newIm
  };
}

/**
 * This function make a zero filling to re and im part.
 * @param data - object of kind {re:[], im:[]}
 * @param totalLength - final number of points
 * @returns new DataReIm object with zero-filled,
 * truncated arrays if totalLength is smaller current length or
 * the same input if totalLength is equal that current length
 */
function reimZeroFilling(data, totalLength) {
  if (!Number.isInteger(totalLength) || totalLength < 0) {
    throw new RangeError('totalLength must be a non-negative integer');
  }
  const {
    re,
    im
  } = data;
  const length = re.length;
  if (totalLength === 0 || length === totalLength) return data;
  if (length > totalLength) {
    return {
      re: re.slice(0, totalLength),
      im: im.slice(0, totalLength)
    };
  }
  const newRE = createDoubleArray(re.constructor, totalLength);
  const newIM = createDoubleArray(im.constructor, totalLength);
  for (let i = 0; i < re.length; i++) {
    newRE[i] = re[i];
    newIM[i] = im[i];
  }
  return {
    re: newRE,
    im: newIM
  };
}

/**
 * Apply FFT to an array of complex spectra, reusing a single FFT instance for
 * all elements to avoid repeated instantiation overhead.
 * All elements must have the same length.
 * @param data - array of complex spectra
 * @param options - options
 * @returns array of transformed complex spectra
 */
function reimArrayFFT(data, options = {}) {
  if (data.length === 0) return [];
  const {
    inverse = false,
    applyZeroShift = false,
    inPlace = false
  } = options;
  const size = data[0].re.length;
  const csize = size << 1;
  for (let j = 1; j < data.length; j++) {
    if (data[j].re.length !== size || data[j].im.length !== size) {
      throw new RangeError(`All elements must have the same length. Expected ${size} but element ${j} has length ${data[j].re.length}.`);
    }
  }
  // Single FFT instance and working buffers reused across all spectra
  const fft = getFFT(size);
  const complexArray = new Float64Array(csize);
  const output = new Float64Array(csize);
  const results = new Array(data.length);
  for (let j = 0; j < data.length; j++) {
    const {
      re,
      im
    } = data[j];
    for (let i = 0; i < csize; i += 2) {
      complexArray[i] = re[i >>> 1];
      complexArray[i + 1] = im[i >>> 1];
    }
    const outRe = inPlace ? re : new Float64Array(size);
    const outIm = inPlace ? im : new Float64Array(size);
    if (inverse) {
      const input = applyZeroShift ? zeroShift(complexArray, true) : complexArray;
      fft.inverseTransform(output, input);
      for (let i = 0; i < csize; i += 2) {
        outRe[i >>> 1] = output[i];
        outIm[i >>> 1] = output[i + 1];
      }
    } else {
      fft.transform(output, complexArray);
      const source = applyZeroShift ? zeroShift(output) : output;
      for (let i = 0; i < csize; i += 2) {
        outRe[i >>> 1] = source[i];
        outIm[i >>> 1] = source[i + 1];
      }
    }
    results[j] = {
      re: outRe,
      im: outIm
    };
  }
  return results;
}

/**
 * Apply FFT to each row of a complex matrix, reusing a single FFT instance for
 * all rows to avoid repeated instantiation overhead.
 * All rows must have the same length.
 * @param data - complex matrix with re and im arrays of Float64Array rows
 * @param options - options
 * @returns complex matrix with transformed rows
 */
function reimMatrixFFT(data, options = {}) {
  const {
    re,
    im
  } = data;
  const numRows = re.length;
  if (numRows === 0) return {
    re: [],
    im: []
  };
  const {
    inverse = false,
    applyZeroShift = false,
    inPlace = false
  } = options;
  const size = re[0].length;
  const csize = size << 1;
  for (let j = 0; j < numRows; j++) {
    if (re[j].length !== size || im[j].length !== size) {
      throw new RangeError(`All rows must have the same length. Expected ${size} but row ${j} has length ${re[j].length}.`);
    }
  }
  // Single FFT instance and working buffers reused across all rows
  const fft = getFFT(size);
  const complexArray = new Float64Array(csize);
  const output = new Float64Array(csize);
  const resultRe = new Array(numRows);
  const resultIm = new Array(numRows);
  for (let j = 0; j < numRows; j++) {
    const reRow = re[j];
    const imRow = im[j];
    for (let i = 0; i < csize; i += 2) {
      complexArray[i] = reRow[i >>> 1];
      complexArray[i + 1] = imRow[i >>> 1];
    }
    const outRe = inPlace ? reRow : new Float64Array(size);
    const outIm = inPlace ? imRow : new Float64Array(size);
    if (inverse) {
      const input = applyZeroShift ? zeroShift(complexArray, true) : complexArray;
      fft.inverseTransform(output, input);
      for (let i = 0; i < csize; i += 2) {
        outRe[i >>> 1] = output[i];
        outIm[i >>> 1] = output[i + 1];
      }
    } else {
      fft.transform(output, complexArray);
      const source = applyZeroShift ? zeroShift(output) : output;
      for (let i = 0; i < csize; i += 2) {
        outRe[i >>> 1] = source[i];
        outIm[i >>> 1] = source[i + 1];
      }
    }
    resultRe[j] = outRe;
    resultIm[j] = outIm;
  }
  return {
    re: resultRe,
    im: resultIm
  };
}

/**
 * Apply FFT to each column of a complex matrix, reusing a single FFT instance for
 * all columns to avoid repeated instantiation overhead.
 * All columns must have the same length (all rows must have the same number of columns).
 * @param data - complex matrix with re and im arrays of Float64Array rows
 * @param options - options
 * @returns complex matrix with transformed columns
 */
function reimMatrixFFTByColumns(data, options = {}) {
  const {
    re,
    im
  } = data;
  const numRows = re.length;
  if (numRows === 0) return {
    re: [],
    im: []
  };
  const {
    inverse = false,
    applyZeroShift = false,
    inPlace = false
  } = options;
  const numColumns = re[0].length;
  const csize = numRows << 1;
  // Validate all rows have the same number of columns
  for (let j = 0; j < numRows; j++) {
    if (re[j].length !== numColumns || im[j].length !== numColumns) {
      throw new RangeError(`All rows must have the same length. Expected ${numColumns} but row ${j} has length ${re[j].length}.`);
    }
  }
  if (numColumns === 0) {
    return {
      re: new Array(numRows),
      im: new Array(numRows)
    };
  }
  // Single FFT instance and working buffers reused across all columns
  const fft = getFFT(numRows);
  const complexArray = new Float64Array(csize);
  const output = new Float64Array(csize);
  const resultRe = new Array(numRows);
  const resultIm = new Array(numRows);
  // Initialize result arrays
  for (let i = 0; i < numRows; i++) {
    resultRe[i] = inPlace ? re[i] : new Float64Array(numColumns);
    resultIm[i] = inPlace ? im[i] : new Float64Array(numColumns);
  }
  // Process each column
  for (let col = 0; col < numColumns; col++) {
    // Extract column data into complex array
    for (let row = 0; row < numRows; row++) {
      complexArray[row << 1] = re[row][col];
      complexArray[(row << 1) + 1] = im[row][col];
    }
    const colRe = new Float64Array(numRows);
    const colIm = new Float64Array(numRows);
    if (inverse) {
      const input = applyZeroShift ? zeroShift(complexArray, true) : complexArray;
      fft.inverseTransform(output, input);
      for (let i = 0; i < csize; i += 2) {
        colRe[i >>> 1] = output[i];
        colIm[i >>> 1] = output[i + 1];
      }
    } else {
      fft.transform(output, complexArray);
      const source = applyZeroShift ? zeroShift(output) : output;
      for (let i = 0; i < csize; i += 2) {
        colRe[i >>> 1] = source[i];
        colIm[i >>> 1] = source[i + 1];
      }
    }
    // Store transformed column back into result matrix
    for (let row = 0; row < numRows; row++) {
      resultRe[row][col] = colRe[row];
      resultIm[row][col] = colIm[row];
    }
  }
  return {
    re: resultRe,
    im: resultIm
  };
}

/**
 * Apply phase correction to a complex matrix along rows or columns.
 * All rows must have the same length.
 * @param data - complex matrix with re and im arrays of Float64Array rows
 * @param phi0 - angle in radians for zero order phase correction.
 * @param phi1 - angle in radians for first order phase correction.
 * @param options - options including direction ('rows' or 'columns', default 'rows').
 * @returns complex matrix with corrected rows or columns.
 */
function reimMatrixPhaseCorrection(data, phi0 = 0, phi1 = 0, options = {}) {
  const {
    reverse = false,
    inPlace = false,
    direction = 'rows'
  } = options;
  phi0 = Number.isFinite(phi0) ? phi0 : 0;
  phi1 = Number.isFinite(phi1) ? phi1 : 0;
  const {
    re,
    im
  } = data;
  const numRows = re.length;
  if (numRows === 0) return {
    re: [],
    im: []
  };
  const numColumns = re[0].length;
  for (let j = 0; j < numRows; j++) {
    if (re[j].length !== numColumns || im[j].length !== numColumns) {
      throw new RangeError(`All rows must have the same length. Expected ${numColumns} but row ${j} has length ${re[j].length}.`);
    }
  }
  const resultRe = new Array(numRows);
  const resultIm = new Array(numRows);
  // Initialize result arrays
  for (let i = 0; i < numRows; i++) {
    resultRe[i] = inPlace ? re[i] : new Float64Array(numColumns);
    resultIm[i] = inPlace ? im[i] : new Float64Array(numColumns);
  }
  const size = direction === 'rows' ? numColumns : numRows;
  let delta = phi1 / (size - 1);
  if (reverse) {
    delta = -delta;
  }
  const alpha = 2 * Math.sin(delta / 2) ** 2;
  const beta = Math.sin(delta);
  if (direction === 'rows') {
    for (let j = 0; j < numRows; j++) {
      let firstAngle = phi0;
      if (reverse) {
        firstAngle += phi1;
      }
      let cosTheta = Math.cos(firstAngle);
      let sinTheta = Math.sin(firstAngle);
      for (let i = 0; i < numColumns; i++) {
        const r = re[j][i];
        const ii = im[j][i];
        resultRe[j][i] = r * cosTheta - ii * sinTheta;
        resultIm[j][i] = ii * cosTheta + r * sinTheta;
        const newCosTheta = cosTheta - (alpha * cosTheta + beta * sinTheta);
        const newSinTheta = sinTheta - (alpha * sinTheta - beta * cosTheta);
        cosTheta = newCosTheta;
        sinTheta = newSinTheta;
      }
    }
  } else {
    for (let col = 0; col < numColumns; col++) {
      let firstAngle = phi0;
      if (reverse) {
        firstAngle += phi1;
      }
      let cosTheta = Math.cos(firstAngle);
      let sinTheta = Math.sin(firstAngle);
      for (let row = 0; row < numRows; row++) {
        const r = re[row][col];
        const ii = im[row][col];
        resultRe[row][col] = r * cosTheta - ii * sinTheta;
        resultIm[row][col] = ii * cosTheta + r * sinTheta;
        const newCosTheta = cosTheta - (alpha * cosTheta + beta * sinTheta);
        const newSinTheta = sinTheta - (alpha * sinTheta - beta * cosTheta);
        cosTheta = newCosTheta;
        sinTheta = newSinTheta;
      }
    }
  }
  return {
    re: resultRe,
    im: resultIm
  };
}

/**
 * Align data of two spectra by verifying wether x values are in a certain range (`delta`).
 * The two spectra should not have two consecutive x values which difference is
 * smaller than `delta` to achieve good results!
 * @param data1 - first spectrum data.
 * @param data2 - second spectrum data.
 * @param options - options.
 * @returns aligned x, y1, y2 arrays.
 */
function xyAlign(data1, data2, options = {}) {
  const {
    delta = 1,
    common = true,
    x = 'x1'
  } = options;
  const result = {
    x: [],
    y1: [],
    y2: []
  };
  let i = 0;
  let j = 0;
  const length1 = data1.x.length;
  const length2 = data2.x.length;
  while (i < length1 && j < length2) {
    let maxDiff = 0;
    if (typeof delta === 'function') {
      const mean = (data1.x[i] + data2.x[j]) / 2; // is this a good thing to do?
      maxDiff = delta(mean);
    } else {
      maxDiff = delta;
    }
    const difference = data1.x[i] - data2.x[j];
    if (Math.abs(difference) > maxDiff) {
      if (difference > 0) {
        if (!common) {
          result.x.push(data2.x[j]);
          result.y1.push(0);
          result.y2.push(data2.y[j]);
          if (j === length2 - 1) {
            while (i < length1) {
              result.x.push(data1.x[i]);
              result.y1.push(data1.y[i]);
              result.y2.push(0);
              i++;
            }
          }
        }
        j++;
      } else {
        if (!common) {
          result.x.push(data1.x[i]);
          result.y1.push(data1.y[i]);
          result.y2.push(0);
          if (i === length1 - 1) {
            while (j < length2) {
              result.x.push(data2.x[j]);
              result.y1.push(0);
              result.y2.push(data2.y[j]);
              j++;
            }
          }
        }
        i++;
      }
    } else {
      switch (x) {
        case 'x1':
          result.x.push(data1.x[i]);
          break;
        case 'x2':
          result.x.push(data2.x[j]);
          break;
        case 'weighted':
          result.x.push((data1.x[i] * data1.y[i] + data2.x[j] * data2.y[j]) / (data1.y[i] + data2.y[j]));
          break;
        default:
          throw new Error(`unknown x option value: ${String(x)}`);
      }
      result.y1.push(data1.y[i]);
      result.y2.push(data2.y[j]);
      i++;
      j++;
    }
  }
  return result;
}

/**
 * Verify that `data` is an object of x,y arrays.
 * Throws an error if it's not.
 * @param data - data to check.
 * @param options - options.
 * @param options.minLength - minimum required length.
 */
function xyCheck(data, options = {}) {
  const {
    minLength
  } = options;
  if (data === null || typeof data !== 'object' ||
  // @ts-expect-error Typechecking
  !isAnyArray$2(data.x) ||
  // @ts-expect-error Typechecking
  !isAnyArray$2(data.y)) {
    throw new Error('data must be an object of x and y arrays');
  }
  // @ts-expect-error Typechecking
  if (data.x.length !== data.y.length) {
    throw new Error('the x and y arrays must have the same length');
  }
  // @ts-expect-error Typechecking
  if (minLength && data.x.length < minLength) {
    throw new Error(`data.x must have a length of at least ${minLength}`);
  }
}

/**
 * Finds the covariance of the points.
 * @param data - data with x and y arrays.
 * @param options - options.
 * @returns the covariance.
 */
function xyCovariance(data, options = {}) {
  const {
    x,
    y
  } = data;
  const {
    unbiased = true
  } = options;
  const meanX = xMean(x);
  const meanY = xMean(y);
  let error = 0;
  for (let i = 0; i < x.length; i++) {
    error += (x[i] - meanX) * (y[i] - meanY);
  }
  if (unbiased) {
    return error / (x.length - 1);
  } else {
    return error / x.length;
  }
}

/**
 * Finds the max y value in a range and return a {x,y} point
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns point with the highest y value in the range.
 */
function xyMaxYPoint(data, options = {}) {
  xyCheck(data, {
    minLength: 1
  });
  const {
    x,
    y
  } = data;
  if (x.length === 1) {
    return {
      x: x[0],
      y: y[0],
      index: 0
    };
  }
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(x, options);
  let current = {
    x: x[fromIndex],
    y: y[fromIndex],
    index: fromIndex
  };
  for (let i = fromIndex + 1; i <= toIndex; i++) {
    if (y[i] > current.y) current = {
      x: x[i],
      y: y[i],
      index: i
    };
  }
  return current;
}

const STEPS = [0.25, 0.5, 0.75];
/**
 * Cumulative Distribution Statistics
 * @param data - array of points {x,y}
 * @returns x0, x25, x50, x75, x100, xMode, xMean (x for maxY)
 */
function xyCumulativeDistributionStatistics(data) {
  xyCheck(data, {
    minLength: 1
  });
  const {
    x,
    y
  } = data;
  const cumulativeSum = xCumulative(y);
  const maxY = xMaxValue(cumulativeSum);
  for (let i = 0; i < cumulativeSum.length; i++) {
    cumulativeSum[i] /= maxY;
  }
  const result = {
    x0: x[0],
    x25: 0,
    x50: 0,
    x75: 0,
    x100: x.at(-1),
    xMode: 0,
    xMean: 0
  };
  // need to find the x values closest to STEPS/100
  let currentStep = 0;
  breakPoint: for (let i = 1; i < cumulativeSum.length; i++) {
    while (STEPS[currentStep] < cumulativeSum[i]) {
      // Key is computed dynamically with a multiplication. This cannot be type-safe, hence the "as" assertion.
      const key = `x${STEPS[currentStep] * 100}`;
      result[key] = x[i - 1] + (x[i] - x[i - 1]) * ((STEPS[currentStep] - cumulativeSum[i - 1]) / (cumulativeSum[i] - cumulativeSum[i - 1]));
      currentStep++;
      if (currentStep === STEPS.length) break breakPoint;
    }
  }
  result.xMode = xyMaxYPoint(data).x;
  let sumXY = 0;
  let sumY = 0;
  for (let i = 0; i < x.length; i++) {
    sumXY += x[i] * y[i];
    sumY += y[i];
  }
  result.xMean = sumXY / sumY;
  return result;
}

/**
 * Converts both x and y arrays to Float64Array if they are not already.
 * @param data - object containing x and y arrays.
 * @returns data with x and y as Float64Array.
 */
function xyEnsureFloat64(data) {
  return {
    x: xEnsureFloat64(data.x),
    y: xEnsureFloat64(data.y)
  };
}

/**
 * Filters x,y values to allow strictly growing values in x-axis.
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @returns filtered data with strictly increasing x values.
 */
function xyEnsureGrowingX(data) {
  xyCheck(data);
  if (xIsMonotonic(data.x) === 1) return data;
  const x = Array.from(data.x);
  const y = Array.from(data.y);
  let prevX = Number.NEGATIVE_INFINITY;
  let currentIndex = 0;
  for (let index = 0; index < x.length; index++) {
    if (prevX < x[index]) {
      if (currentIndex < index) {
        x[currentIndex] = x[index];
        y[currentIndex] = y[index];
      }
      currentIndex++;
      prevX = x[index];
    }
  }
  x.length = currentIndex;
  y.length = currentIndex;
  return {
    x,
    y
  };
}

/**
 * The data seen as a piecewise linear density, with the integration precomputed on every point.
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns the cumulated integration over the selected window.
 */
function getCumulativeDensity(data, options = {}) {
  const {
    x,
    y
  } = data;
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(x, options);
  if (toIndex - fromIndex < 1) {
    throw new Error('the selected range must contain at least 2 points');
  }
  const {
    beginX,
    endX
  } = getBoundaries(x, options, fromIndex, toIndex);
  const length = toIndex - fromIndex + 1;
  const integral = new Float64Array(length);
  for (let i = 1; i < length; i++) {
    const previousIndex = fromIndex + i - 1;
    const currentIndex = fromIndex + i;
    integral[i] = integral[i - 1] + (y[previousIndex] + y[currentIndex]) / 2 * (x[currentIndex] - x[previousIndex]);
  }
  return {
    x,
    y,
    fromIndex,
    toIndex,
    integral,
    beginX,
    endX
  };
}
/**
 * Integration from the beginning of the range up to a specific x value, interpolating inside
 * the interval that contains it.
 * @param cumulative - cumulated integration of the density.
 * @param target - x value.
 * @returns the integration.
 */
function evaluateCumulative(cumulative, target) {
  const {
    x,
    y,
    fromIndex,
    toIndex,
    integral
  } = cumulative;
  if (target <= x[fromIndex]) return 0;
  const lastIndex = toIndex - fromIndex;
  if (target >= x[toIndex]) return integral[lastIndex];
  let low = 0;
  let high = lastIndex;
  while (high - low > 1) {
    const middle = low + (high - low >> 1);
    if (x[fromIndex + middle] <= target) {
      low = middle;
    } else {
      high = middle;
    }
  }
  const startX = x[fromIndex + low];
  const startY = y[fromIndex + low];
  const width = target - startX;
  const targetY = startY + (y[fromIndex + low + 1] - startY) * width / (x[fromIndex + low + 1] - startX);
  return integral[low] + (startY + targetY) / 2 * width;
}
/**
 * Boundaries of the window, that may be wider than the data itself.
 * @param x - array of x values.
 * @param options - options.
 * @param fromIndex - first index of the selected range.
 * @param toIndex - last index of the selected range.
 * @returns the x values delimiting the window.
 */
function getBoundaries(x, options, fromIndex, toIndex) {
  const {
    from,
    to
  } = options;
  const firstX = x[fromIndex];
  const lastX = x[toIndex];
  let beginX = options.fromIndex === undefined && from !== undefined ? from : firstX;
  let endX = options.toIndex === undefined && to !== undefined ? to : lastX;
  if (beginX > endX) [beginX, endX] = [endX, beginX];
  return {
    beginX: Math.min(beginX, firstX),
    endX: Math.max(endX, lastX)
  };
}

/**
 * Split a spectrum in parts that all have the same integration and return the x values of the splits.
 * The first entry splits the spectrum in two halves of equal integration, the two next ones split each half
 * again, etc. This is the same as looking for the 1/2, then 1/4 and 3/4, then 1/8, 3/8, 5/8 and 7/8 fractions
 * of the total integration, which is how it is computed.
 * This describes a spectrum by a small vector and should provide an efficient way to store and search
 * similar spectra, comparing the vectors with `xEqualIntegrationVectorSimilarity`.
 * A split never lands between the peaks: it follows the integration, so it points at the signal itself. The
 * noise of a long baseline does not drag it either, because a point is never weighted by its own x value.
 * The data is considered as a piecewise linear density, so the result varies continuously with the y values
 * and hardly depends on the sampling density.
 * The window may extend beyond the data, the missing points being considered to have a y value of zero.
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns array of x values splitting the spectrum in parts of equal integration.
 */
function xyEqualIntegrationVector(data, options = {}) {
  xyCheck(data, {
    minLength: 2
  });
  const {
    depth = 5
  } = options;
  const cumulative = getCumulativeDensity(data, options);
  const {
    beginX,
    endX
  } = cumulative;
  const total = evaluateCumulative(cumulative, endX);
  const results = new Float64Array((1 << depth) - 1);
  let index = 0;
  for (let level = 0; level < depth; level++) {
    const nbSlots = 1 << level;
    for (let slot = 0; slot < nbSlots; slot++) {
      const fraction = (2 * slot + 1) / (2 * nbSlots);
      results[index++] = findFraction(cumulative, beginX, endX, total * fraction);
    }
  }
  return results;
}
/**
 * Dichotomic search of the x value for which the integration reaches a target.
 * @param cumulative - cumulated integration of the density.
 * @param beginX - beginning of the window.
 * @param endX - end of the window.
 * @param target - integration to reach.
 * @returns the x value.
 */
function findFraction(cumulative, beginX, endX, target) {
  let low = beginX;
  let high = endX;
  // the interval is halved 60 times, far below the precision of a float64
  for (let i = 0; i < 60; i++) {
    const middle = (low + high) / 2;
    if (evaluateCumulative(cumulative, middle) < target) {
      low = middle;
    } else {
      high = middle;
    }
  }
  return (low + high) / 2;
}

/**
 * Normalize an array of zones:
 * - ensure than from < to
 * - merge overlapping zones
 * - deal with exclusions zones
 * - if no zones is specified add one between -Infinity and +Infinity
 * @param zones - array of zones
 * @param options - options
 * @returns array of zones
 */
function zonesNormalize(zones = [], options = {}) {
  const {
    exclusions = []
  } = options;
  let {
    from = Number.NEGATIVE_INFINITY,
    to = Number.POSITIVE_INFINITY
  } = options;
  if (from > to) [from, to] = [to, from];
  zones = zones.map(zone => zone.from > zone.to ? {
    from: zone.to,
    to: zone.from
  } : {
    ...zone
  });
  zones.sort((a, b) => {
    if (a.from !== b.from) return a.from - b.from;
    return a.to - b.to;
  });
  if (zones.length === 0) {
    zones.push({
      from,
      to
    });
  }
  for (const zone of zones) {
    if (from > zone.from) zone.from = from;
    if (to < zone.to) zone.to = to;
  }
  zones = zones.filter(zone => zone.from <= zone.to);
  if (zones.length === 0) return [];
  let currentZone = zones[0];
  const beforeExclusionsZones = [currentZone];
  for (let i = 1; i < zones.length; i++) {
    const zone = zones[i];
    if (zone.from <= currentZone.to) {
      if (currentZone.to < zone.to) {
        currentZone.to = zone.to;
      }
    } else {
      currentZone = zone;
      beforeExclusionsZones.push(currentZone);
    }
  }
  if (exclusions.length === 0) return beforeExclusionsZones;
  const normalizedExclusions = zonesNormalize(exclusions);
  let currentExclusionIndex = 0;
  const results = [];
  for (let zoneIndex = 0; zoneIndex < beforeExclusionsZones.length; zoneIndex++) {
    const zone = beforeExclusionsZones[zoneIndex];
    if (currentExclusionIndex === normalizedExclusions.length) {
      // we analysed all the exclusion zones
      results.push(zone);
      continue;
    }
    while (currentExclusionIndex < normalizedExclusions.length && normalizedExclusions[currentExclusionIndex].to <= zone.from) {
      currentExclusionIndex++;
    }
    if (currentExclusionIndex === normalizedExclusions.length) {
      // we analysed all the exclusion zones
      results.push(zone);
      continue;
    }
    if (zone.to < normalizedExclusions[currentExclusionIndex].from) {
      // no problems, not yet in exclusion
      results.push(zone);
      continue;
    }
    if (normalizedExclusions[currentExclusionIndex].to >= zone.to) {
      // could be totally excluded
      if (normalizedExclusions[currentExclusionIndex].from <= zone.from) {
        continue;
      }
      results.push({
        from: normalizedExclusions[currentExclusionIndex].to,
        to: zone.to
      });
    }
    // we cut in the middle, we need to create more zones, annoying !
    if (normalizedExclusions[currentExclusionIndex].from > zone.from) {
      results.push({
        from: zone.from,
        to: normalizedExclusions[currentExclusionIndex].from
      });
    }
    zone.from = normalizedExclusions[currentExclusionIndex].to;
    zoneIndex--;
  }
  return results;
}

/**
 * Add the number of points per zone to reach a specified total
 * @param zones - array of zones
 * @param numberOfPoints - total number of points to distribute between zones
 * @param options - options
 * @returns array of zones with points
 */
function zonesWithPoints(zones = [],
/**
 * total number of points to distribute between zones
 * @default 10
 */
numberOfPoints = 10, options = {}) {
  if (zones.length === 0) return [];
  const normalizedZones = zonesNormalize(zones, options);
  const zonesWithNumberOfPoints = [];
  const totalSize = normalizedZones.reduce((previous, current) => {
    return previous + (current.to - current.from);
  }, 0);
  const unitsPerPoint = totalSize / numberOfPoints;
  let currentTotal = 0;
  for (let i = 0; i < normalizedZones.length - 1; i++) {
    const tempZone = normalizedZones[i];
    const tempZoneNumberOfPoints = Math.min(Math.round((tempZone.to - tempZone.from) / unitsPerPoint), numberOfPoints - currentTotal);
    zonesWithNumberOfPoints.push({
      ...tempZone,
      numberOfPoints: tempZoneNumberOfPoints
    });
    currentTotal += tempZoneNumberOfPoints;
  }
  zonesWithNumberOfPoints.push({
    ...normalizedZones.at(-1),
    numberOfPoints: numberOfPoints - currentTotal
  });
  return zonesWithNumberOfPoints;
}

/**
 * Function that returns a Number array of equally spaced numberOfPoints x values
 * distributed across the specified zones.
 * @param zones - array of from/to zones where x values should be distributed
 * @param numberOfPoints - total number of points to distribute across all zones
 * @param options - options
 * @returns array of equally spaced x values distributed across zones
 */
function zonesToXEquallySpaced(zones, numberOfPoints, options = {}) {
  if (!zones || zones.length === 0) {
    throw new RangeError('zones array must not be empty');
  }
  if (numberOfPoints < 1) {
    throw new RangeError("'numberOfPoints' must be greater than 0");
  }
  const from = options.from ?? zones[0].from;
  //@ts-expect-error zones is tested before
  const to = options.to ?? zones.at(-1).to;
  if (from > to) {
    throw new RangeError('from should be less than or equal to to');
  }
  const normalizedZones = zonesNormalize(zones, {
    from,
    to,
    exclusions: []
  });
  const zonesWithPointsRes = zonesWithPoints(normalizedZones, numberOfPoints, {
    from,
    to
  }).filter(zone => zone.numberOfPoints);
  let xResult = [];
  for (const zone of zonesWithPointsRes) {
    if (!zone.numberOfPoints) {
      zone.numberOfPoints = 0;
    }
    const zoneXValues = Array.from(createFromToArray({
      from: zone.from,
      to: zone.to,
      length: zone.numberOfPoints,
      includeFrom: false,
      includeTo: false
    }));
    xResult = xResult.concat(zoneXValues);
  }
  return new Float64Array(xResult);
}

/**
 * Function that retrieves the getEquallySpacedData with the variant "slot".
 * @param x - x coordinates.
 * @param y - y coordinates.
 * @param from - start of the output x range.
 * @param to - end of the output x range.
 * @param numberOfPoints - number of output points.
 * @returns array of y values equally spaced with the variant "slot".
 */
function equallySpacedSlot(/** x coordinates */
x, /** y coordinates */
y, /** from value */
from, /** to value */
to, /** number of points */
numberOfPoints) {
  const xLength = x.length;
  if (xLength < 2) {
    return Float64Array.from(x);
  }
  const step = (to - from) / (numberOfPoints > 1 ? numberOfPoints - 1 : 1);
  const halfStep = step / 2;
  const lastStep = x.at(-1) - x.at(-2);
  const start = from - halfStep;
  // Changed Array to Float64Array
  const output = new Float64Array(numberOfPoints);
  // Init main variables
  let min = start;
  let max = start + step;
  let previousX = -Number.MAX_VALUE;
  let previousY = 0;
  let nextX = x[0];
  let nextY = y[0];
  let frontOutsideSpectra = 0;
  let backOutsideSpectra = true;
  let currentValue = 0;
  // for slot algorithm
  let currentPoints = 0;
  let i = 1; // index of input
  let j = 0; // index of output
  main: while (true) {
    if (previousX >= nextX) throw new Error('x must be a growing series');
    while (previousX - max > 0) {
      // no overlap with original point, just consume current value
      if (backOutsideSpectra) {
        currentPoints++;
        backOutsideSpectra = false;
      }
      output[j] = currentPoints <= 0 ? 0 : currentValue / currentPoints;
      j++;
      if (j === numberOfPoints) {
        break main;
      }
      min = max;
      max += step;
      currentValue = 0;
      currentPoints = 0;
    }
    if (previousX > min) {
      currentValue += previousY;
      currentPoints++;
    }
    if (previousX === -Number.MAX_VALUE || frontOutsideSpectra > 1) {
      currentPoints--;
    }
    previousX = nextX;
    previousY = nextY;
    if (i < xLength) {
      nextX = x[i];
      nextY = y[i];
      i++;
    } else {
      nextX += lastStep;
      nextY = 0;
      frontOutsideSpectra++;
    }
  }
  return output;
}

/**
 * Function that calculates the integral of the line between two
 * x-coordinates, given the slope and intercept of the line.
 * @param x0 - first x coordinate.
 * @param x1 - second x coordinate.
 * @param slope - slope of the line.
 * @param intercept - y-intercept of the line.
 * @returns integral value.
 */
function integral(/** first coordinate of point */
x0, /** second coordinate of point */
x1, /** slope of the line */
slope, /** intercept of the line on the y axis */
intercept) {
  return 0.5 * slope * x1 * x1 + intercept * x1 - (0.5 * slope * x0 * x0 + intercept * x0);
}

/**
 * Function that retrieves the getEquallySpacedData with the variant "smooth".
 * @param x - x coordinates.
 * @param y - y coordinates.
 * @param from - start of the output x range.
 * @param to - end of the output x range.
 * @param numberOfPoints - number of output points.
 * @returns array of y values equally spaced with the variant "smooth".
 */
function equallySpacedSmooth(/** x coordinates */
x, /** y coordinates */
y, /** from value */
from, /** to value */
to, /** number of points */
numberOfPoints) {
  const xLength = x.length;
  const step = (to - from) / (numberOfPoints > 1 ? numberOfPoints - 1 : 1);
  const halfStep = step / 2;
  // Changed Array to Float64Array
  const output = new Float64Array(numberOfPoints);
  const initialOriginalStep = x[1] - x[0];
  const lastOriginalStep = x[xLength - 1] - x[xLength - 2];
  // Init main variables
  let min = from - halfStep;
  let max = from + halfStep;
  let previousX = Number.MIN_SAFE_INTEGER;
  let previousY = 0;
  let nextX = x[0] - initialOriginalStep;
  let nextY = 0;
  let currentValue = 0;
  let slope = 0;
  let intercept = 0;
  let sumAtMin = 0;
  let sumAtMax = 0;
  let i = 0; // index of input
  let j = 0; // index of output
  let add = 0;
  main: while (true) {
    if (previousX >= nextX) throw new Error('x must be a growing series');
    if (previousX <= min && min <= nextX) {
      add = integral(0, min - previousX, slope, previousY);
      sumAtMin = currentValue + add;
    }
    while (nextX - max >= 0) {
      // no overlap with original point, just consume current value
      add = integral(0, max - previousX, slope, previousY);
      sumAtMax = currentValue + add;
      output[j++] = (sumAtMax - sumAtMin) / step;
      if (j === numberOfPoints) {
        break main;
      }
      min = max;
      max += step;
      sumAtMin = sumAtMax;
    }
    currentValue += integral(previousX, nextX, slope, intercept);
    previousX = nextX;
    previousY = nextY;
    if (i < xLength) {
      nextX = x[i];
      nextY = y[i];
      i++;
    } else if (i === xLength) {
      nextX += lastOriginalStep;
      nextY = 0;
    }
    slope = getSlope(previousX, previousY, nextX, nextY);
    intercept = -slope * previousX + previousY;
  }
  return output;
}
function getSlope(x0, y0, x1, y1) {
  return (y1 - y0) / (x1 - x0);
}

/**
 * Resample a spectrum to equally spaced x points.
 * When `exclusions` are provided they take precedence and `zones` is ignored.
 * @param data - object containing x and y arrays
 * @param options - options
 * @returns resampled spectrum with equally spaced x values
 */
function xyEquallySpaced(data, options = {}) {
  const {
    x,
    y
  } = data;
  const xLength = x.length;
  const {
    from = x[0],
    to = x[xLength - 1],
    variant = 'smooth',
    numberOfPoints = 100,
    exclusions = [],
    zones = [{
      from,
      to
    }]
  } = options;
  if (from > to) {
    throw new RangeError('from should be larger than to');
  }
  xyCheck(data);
  if (numberOfPoints < 2) {
    throw new RangeError("'numberOfPoints' option must be greater than 1");
  }
  const normalizedZones = zonesNormalize(zones, {
    from,
    to,
    exclusions
  });
  const zonesWithPointsRes = zonesWithPoints(normalizedZones, numberOfPoints, {
    from,
    to
  }).filter(zone => zone.numberOfPoints);
  let xResult = [];
  let yResult = [];
  for (const zone of zonesWithPointsRes) {
    if (!zone.numberOfPoints) {
      zone.numberOfPoints = 0;
    }
    const zoneResult = processZone(Array.from(x), Array.from(y), zone.from, zone.to, zone.numberOfPoints, variant);
    xResult = xResult.concat(zoneResult.x);
    yResult = yResult.concat(zoneResult.y);
  }
  return {
    x: xResult,
    y: yResult
  };
}
function processZone(x, y, from, to, numberOfPoints, variant) {
  if (numberOfPoints < 1) {
    throw new RangeError('the number of points must be at least 1');
  }
  const output = variant === 'slot' ? Array.from(equallySpacedSlot(x, y, from, to, numberOfPoints)) : Array.from(equallySpacedSmooth(x, y, from, to, numberOfPoints));
  return {
    x: Array.from(createFromToArray({
      from,
      to,
      length: numberOfPoints
    })),
    y: output
  };
}

/**
 * Extract zones from a XY data.
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns extracted DataXY containing only the points within the specified zones.
 */
function xyExtract(data, options = {}) {
  xyCheck(data);
  const {
    x,
    y
  } = data;
  let {
    zones
  } = options;
  zones = zonesNormalize(zones);
  if (x === undefined || y === undefined || !Array.isArray(zones) || zones.length === 0) {
    return data;
  }
  const newX = [];
  const newY = [];
  let currentZone = zones[0];
  let position = 0;
  loop: for (let i = 0; i < x.length; i++) {
    while (currentZone.to < x[i]) {
      position++;
      currentZone = zones[position];
      if (!currentZone) {
        i = x.length;
        break loop;
      }
    }
    if (x[i] >= currentZone.from) {
      newX.push(x[i]);
      newY.push(y[i]);
    }
  }
  return {
    x: newX,
    y: newY
  };
}

/**
 * Filter an array x/y based on various criteria x points are expected to be sorted
 * @param data - object containing 2 properties x and y
 * @param options - options
 * @returns filtered array
 */
function xyFilter(data, options = {}) {
  const {
    x,
    y
  } = data;
  const {
    filter
  } = options;
  const newX = [];
  const newY = [];
  for (let i = 0; i < x.length; i++) {
    if (!filter || filter(x[i], y[i])) {
      newX.push(x[i]);
      newY.push(y[i]);
    }
  }
  return {
    x: newX,
    y: newY
  };
}

/**
 * Convert a flat interleaved array [x, y, x, y, ...] to a DataXY object.
 * @param data - flat array alternating x and y values.
 * @returns DataXY object with separate x and y arrays.
 */
function xyFromInterleaved(data) {
  if (data.length % 2 !== 0) {
    throw new RangeError(`xyFromInterleaved: data length must be even, got ${data.length}`);
  }
  const length = data.length / 2;
  const x = new Float64Array(length);
  const y = new Float64Array(length);
  for (let i = 0; i < length; i++) {
    x[i] = data[2 * i];
    y[i] = data[2 * i + 1];
  }
  return {
    x,
    y
  };
}

/**
 * Filter an array x/y based on various criteria x points are expected to be sorted
 * @param data - object containing 2 properties x and y
 * @param minRelativeYValue - the minimum relative value compare to the Y max value
 * @returns filtered data
 */
function xyFilterMinYValue(data, minRelativeYValue) {
  if (minRelativeYValue === undefined) return data;
  const {
    x,
    y
  } = data;
  const {
    min,
    max
  } = xMinMaxValues(y);
  const threshold = max * minRelativeYValue;
  if (min >= threshold) return data;
  const newX = [];
  const newY = [];
  for (let i = 0; i < x.length; i++) {
    if (y[i] >= threshold) {
      newX.push(x[i]);
      newY.push(y[i]);
    }
  }
  return {
    x: newX,
    y: newY
  };
}

/**
 * Filter an array x/y based on various criteria x points are expected to be sorted
 * @param data - object containing 2 properties x and y.
 * @param nbPeaks - number of top peaks to keep.
 * @returns filtered data.
 */
function xyFilterTopYValues(data, nbPeaks) {
  if (nbPeaks === undefined) return data;
  if (nbPeaks > data.x.length) return data;
  const {
    x,
    y
  } = data;
  const newX = [];
  const newY = [];
  const descending = xSortDescending(y.slice());
  const threshold = descending[nbPeaks - 1];
  let nbThreshold = 0;
  for (let i = 0; i < nbPeaks; i++) {
    if (descending[i] === threshold) {
      nbThreshold++;
    }
  }
  for (let i = 0; i < x.length; i++) {
    if (y[i] > threshold) {
      newX.push(x[i]);
      newY.push(y[i]);
    } else if (y[i] === threshold) {
      nbThreshold--;
      if (nbThreshold >= 0) {
        newX.push(x[i]);
        newY.push(y[i]);
      }
    }
  }
  return {
    x: newX,
    y: newY
  };
}

/**
 * Filter an array x/y based on various criteria x points are expected to be sorted
 * @param data - object containing 2 properties x and y
 * @param options - options
 * @returns filtered array
 */
function xyFilterX(data, options = {}) {
  const {
    x,
    y
  } = data;
  if (x.length === 0) {
    return {
      x: Array.from(x),
      y: Array.from(y)
    };
  }
  const {
    from = x[0],
    to = x.at(-1),
    zones = [{
      from,
      to
    }],
    exclusions = []
  } = options;
  // @ts-expect-error -- x.at(-1) returns number | undefined but array is guaranteed non-empty here
  const normalizedZones = zonesNormalize(zones, {
    from,
    to,
    exclusions
  });
  let currentZoneIndex = 0;
  const newX = [];
  const newY = [];
  let position = 0;
  while (position < x.length) {
    if (x[position] <= normalizedZones[currentZoneIndex].to && x[position] >= normalizedZones[currentZoneIndex].from) {
      newX.push(x[position]);
      newY.push(y[position]);
    } else if (x[position] > normalizedZones[currentZoneIndex].to) {
      currentZoneIndex++;
      if (!normalizedZones[currentZoneIndex]) break;
    }
    position++;
  }
  return {
    x: newX,
    y: newY
  };
}

/**
 * Filter out all the points for which x <= 0. Useful to display log scale data
 * @param data - data
 * @returns an object with the filtered data.
 */
function xyFilterXPositive(data) {
  xyCheck(data);
  const {
    x,
    y
  } = data;
  const newX = [];
  const newY = [];
  if (x === undefined || y === undefined) {
    return {
      x: newX,
      y: newY
    };
  }
  for (let i = 0; i < x.length; i++) {
    if (x[i] > 0) {
      newX.push(x[i]);
      newY.push(y[i]);
    }
  }
  return {
    x: newX,
    y: newY
  };
}

/**
 * Finds the closest point
 * @param data - x array should be sorted and ascending
 * @param target - target to search
 * @returns - closest point
 */
function xyFindClosestPoint(/** points */
data, target) {
  const {
    x,
    y
  } = data;
  const index = xFindClosestIndex(x, target);
  return {
    x: x[index],
    y: y[index]
  };
}

/**
 * Returns the numberMaxPoints points with the bigger y.
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param numberMaxPoints - number of points to keep.
 * @returns the points filtered to keep the `numberMaxPoints` most intense points of the input.
 */
function xyGetNMaxY(data, numberMaxPoints) {
  xyCheck(data);
  if (data.x.length <= numberMaxPoints) {
    return data;
  } else {
    const newX = new Float64Array(numberMaxPoints);
    const newY = new Float64Array(numberMaxPoints);
    const floatY = Float64Array.from(data.y);
    floatY.sort();
    floatY.reverse();
    const threshold = floatY[numberMaxPoints - 1];
    let index = 0;
    for (let i = 0; i < data.x.length; i++) {
      if (data.y[i] >= threshold) {
        newX[index] = data.x[i];
        newY[index] = data.y[i];
        index++;
      }
      if (index === numberMaxPoints) {
        return {
          x: newX,
          y: newY
        };
      }
    }
    return data;
  }
}

/**
 * Order object of array, x has to be monotone. Ensure x is growing
 * @param data - object of kind {x:[], y:[]}.
 * @returns data with x in ascending order (reversed in-place if descending).
 */
function xyGrowingX(data) {
  const {
    x,
    y
  } = data;
  if (x.length !== y.length) {
    throw new TypeError('length of x and y must be identical');
  }
  if (x.length < 2 || x[0] < x.at(-1)) return data;
  return {
    x: x.toReversed(),
    y: y.toReversed()
  };
}

/**
 * Generate a X / Y of the xyIntegral
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns an object with the cumulative integral values.
 */
function xyIntegral(data, options = {}) {
  const {
    reverse = false
  } = options;
  xyCheck(data, {
    minLength: 1
  });
  const {
    x,
    y
  } = data;
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(x, options);
  let xyIntegration = 0;
  const currentxyIntegral = {
    x: new Float64Array(toIndex - fromIndex + 1),
    y: new Float64Array(toIndex - fromIndex + 1)
  };
  let index = 0;
  if (reverse) {
    currentxyIntegral.y[index] = 0;
    currentxyIntegral.x[index++] = x[toIndex];
    for (let i = toIndex; i > fromIndex; i--) {
      xyIntegration += (x[i] - x[i - 1]) * (y[i - 1] + y[i]) / 2;
      currentxyIntegral.x[index] = x[i - 1];
      currentxyIntegral.y[index++] = xyIntegration;
    }
    currentxyIntegral.x.reverse();
    currentxyIntegral.y.reverse();
  } else {
    currentxyIntegral.y[index] = 0;
    currentxyIntegral.x[index++] = x[fromIndex];
    for (let i = fromIndex; i < toIndex; i++) {
      xyIntegration += (x[i + 1] - x[i]) * (y[i + 1] + y[i]) / 2;
      currentxyIntegral.x[index] = x[i + 1];
      currentxyIntegral.y[index++] = xyIntegration;
    }
  }
  return currentxyIntegral;
}

/**
 * Calculate integration
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns integration value on the specified range.
 */
function xyIntegration(data, options = {}) {
  xyCheck(data, {
    minLength: 1
  });
  const {
    x,
    y
  } = data;
  if (x.length === 1) return 0;
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(x, options);
  let currentxyIntegration = 0;
  for (let i = fromIndex; i < toIndex; i++) {
    currentxyIntegration += (x[i + 1] - x[i]) * (y[i + 1] + y[i]) / 2;
  }
  return currentxyIntegration;
}

/**
 * Interpolate y values at target x positions using linear interpolation.
 * This is useful for upsampling or resampling data to specific x positions.
 * Both the input data and target x values must be sorted in ascending order.
 * Uses a two-pointer approach with O(n + m) complexity.
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param xTarget - target x positions where y values should be interpolated.
 * @returns interpolated y values at target x positions.
 */
function xyInterpolateLinear(data, xTarget) {
  xyCheck(data);
  const {
    x,
    y
  } = data;
  if (x.length === 0) {
    return new Float64Array(0);
  }
  const result = new Float64Array(xTarget.length);
  let sparseIndex = 0;
  for (let i = 0; i < xTarget.length; i++) {
    const targetX = xTarget[i];
    // Move sparse index forward while we can
    while (sparseIndex < x.length - 1 && x[sparseIndex + 1] < targetX) {
      sparseIndex++;
    }
    // Handle edge cases
    if (sparseIndex === 0 && targetX <= x[0]) {
      // Before first point
      if (x.length === 1) {
        result[i] = y[0];
      } else {
        // Extrapolate using first two points
        const t = (targetX - x[0]) / (x[1] - x[0]);
        result[i] = y[0] * (1 - t) + y[1] * t;
      }
    } else if (sparseIndex >= x.length - 1) {
      // After last point
      result[i] = y[x.length - 1];
    } else {
      // Normal interpolation between two points
      const leftIdx = sparseIndex;
      const rightIdx = sparseIndex + 1;
      const t = (targetX - x[leftIdx]) / (x[rightIdx] - x[leftIdx]);
      result[i] = y[leftIdx] * (1 - t) + y[rightIdx] * t;
    }
  }
  return result;
}

/**
 * Join x / y values when difference in X is closer than delta.
 * When joining, y values are summed and x values are weighted average
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns an object with joined x and summed y values.
 */
function xyJoinX(data, options = {}) {
  xyCheck(data);
  const {
    delta = 1
  } = options;
  const deltaIsFunction = typeof delta === 'function';
  const x = Array.from(data.x);
  const y = Array.from(data.y);
  if (x.length < 2) {
    return {
      x,
      y
    };
  }
  let position = 0;
  for (let i = 1; i < x.length; i++) {
    const difference = x[i] - x[i - 1];
    const currentDelta = deltaIsFunction ? delta((x[i] + x[i - 1]) / 2) : delta;
    if (difference <= currentDelta) {
      // we join
      if (y[position] !== 0 || y[i] !== 0) {
        x[position] = (x[position] * y[position] + x[i] * y[i]) / (y[position] + y[i]);
        y[position] += y[i];
      }
    } else {
      position++;
      x[position] = x[i];
      y[position] = y[i];
    }
  }
  x.length = position + 1;
  y.length = position + 1;
  return {
    x,
    y
  };
}

/**
 * Computes the weighted mean value of an array of values.
 * @param data - array of DataXY.
 * @param options - options.
 * @returns weighted mean x value (center of mass).
 */
function xyMassCenter(data, options = {}) {
  xyCheck(data, {
    minLength: 1
  });
  const {
    x,
    y
  } = data;
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(x, options);
  let sumYs = 0;
  let sumProducts = 0;
  for (let i = fromIndex; i <= toIndex; i++) {
    sumProducts += x[i] * y[i];
    sumYs += y[i];
  }
  if (sumYs === 0) {
    throw new Error('Sum of Ys can not be zero.');
  }
  return sumProducts / sumYs;
}

/**
 * We will calculate a vector containing center of mass of DataXY as well as center of mass of both parts, etc.
 * This approach allows to efficiently represent spectra like XPS, NMR, etc. It should provide an extremely efficient
 * way to store and search similar spectra.
 * @deprecated A center of mass averages positions, so a split lands between the peaks instead of on them, and
 * every point is weighted by its own x value, which lets the noise of a long baseline drag the result.
 * Use `xyEqualIntegrationVector`, that splits the spectrum in parts of equal integration.
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns array of centers of mass.
 */
function xyMassCenterVector(data, options = {}) {
  xyCheck(data, {
    minLength: 2
  });
  const {
    depth = 5
  } = options;
  const {
    weightedIntegral,
    integral
  } = getWeightedIntegral(data);
  const results = new Float64Array((1 << depth) - 1);
  const endIndexes = new Int32Array((1 << depth) - 1);
  endIndexes[0] = data.x.length - 1;
  const beginIndexes = new Int32Array((1 << depth) - 1);
  beginIndexes[0] = -1;
  let index = 0;
  for (let i = 0; i < depth; i++) {
    for (let j = 0; j < 1 << i; j++) {
      const currentBeginIndex = beginIndexes[index];
      const currentEndIndex = endIndexes[index];
      const currentIntegration = currentBeginIndex === -1 ? integral[currentEndIndex] : integral[currentEndIndex] - integral[currentBeginIndex];
      // we need to solve the issue of null integration (rather in simulated spectra).
      let x = 0;
      if (currentIntegration !== 0) {
        x = currentBeginIndex === -1 ? weightedIntegral[currentEndIndex] / currentIntegration : (weightedIntegral[currentEndIndex] - weightedIntegral[currentBeginIndex]) / currentIntegration;
      } else {
        x = (data.x[currentEndIndex] + data.x[currentBeginIndex]) / 2;
      }
      results[index++] = x;
      // we can now prepare the next level
      if (i < depth - 1) {
        const nextIndex = (1 << i + 1) + j * 2 - 1;
        let middleIndex = xFindClosestIndex(data.x, x);
        if (middleIndex === currentBeginIndex) {
          middleIndex++;
        }
        beginIndexes[nextIndex] = currentBeginIndex;
        endIndexes[nextIndex] = middleIndex;
        if (middleIndex === currentEndIndex) {
          middleIndex--;
        }
        beginIndexes[nextIndex + 1] = middleIndex;
        endIndexes[nextIndex + 1] = currentEndIndex;
      }
    }
  }
  return results;
}
function getWeightedIntegral(data) {
  const {
    x,
    y
  } = data;
  const weightedIntegral = new Float64Array(x.length);
  const integral = new Float64Array(x.length);
  // the first point, no points before
  const firstIntegration = (x[1] - x[0]) * y[0];
  let totalIntegration = firstIntegration;
  integral[0] = totalIntegration;
  let totalWeightedIntegral = firstIntegration * x[0];
  weightedIntegral[0] = totalWeightedIntegral;
  for (let i = 1; i < x.length - 1; i++) {
    const currentIntegration = (x[i + 1] - x[i - 1]) * y[i] / 2;
    const currentX = x[i];
    totalIntegration += currentIntegration;
    integral[i] = totalIntegration;
    totalWeightedIntegral += currentIntegration * currentX;
    weightedIntegral[i] = totalWeightedIntegral;
  }
  // the last point, no points after
  const lastIntegration = (x.at(-1) - x.at(-2)) * y.at(-1);
  totalIntegration += lastIntegration;
  integral[x.length - 1] = totalIntegration;
  totalWeightedIntegral += lastIntegration * x.at(-1);
  weightedIntegral[x.length - 1] = totalWeightedIntegral;
  return {
    integral,
    weightedIntegral
  };
}

/**
 * Find the closest maximum going up hill
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns an object with the x/y value.
 */
function xyMaxClosestYPoint(data, options = {}) {
  xyCheck(data);
  const {
    x,
    y
  } = data;
  const {
    target
  } = options;
  let {
    targetIndex
  } = options;
  if (targetIndex === undefined) {
    if (target !== undefined) {
      targetIndex = xFindClosestIndex(x, target);
    } else {
      targetIndex = 0;
    }
  }
  let previousIndex = Number.MIN_SAFE_INTEGER;
  let currentIndex = targetIndex;
  let xyMaxY = y[targetIndex];
  while (currentIndex !== previousIndex) {
    previousIndex = currentIndex;
    if (currentIndex > 0 && y[currentIndex - 1] > xyMaxY) {
      currentIndex--;
    } else if (currentIndex < x.length - 1 && y[currentIndex + 1] > xyMaxY) {
      currentIndex++;
    }
    xyMaxY = y[currentIndex];
  }
  return {
    x: x[currentIndex],
    y: y[currentIndex],
    index: currentIndex
  };
}

/**
 * Finds all the max values
 * If the values are equal the middle
 * of the equal part will be the position of the signal!
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options with from and to properties.
 * @returns array of points.
 */
function xyMaximaY(data, options = {}) {
  xyCheck(data, {
    minLength: 2
  });
  const {
    x,
    y
  } = data;
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(x, options);
  const maxima = [];
  let startEqualIndex = -1;
  for (let i = fromIndex + 1; i < toIndex; i++) {
    if (y[i - 1] < y[i] && y[i + 1] < y[i]) {
      maxima.push({
        x: x[i],
        y: y[i],
        index: i
      });
    } else if (y[i - 1] < y[i] && y[i + 1] === y[i]) {
      startEqualIndex = i;
    } else if (y[i - 1] === y[i] && y[i + 1] < y[i]) {
      const index = Math.floor((i + startEqualIndex) / 2);
      maxima.push({
        x: x[index],
        y: y[index],
        index
      });
    }
  }
  return maxima;
}

/**
 * Merge abscissas values on similar ordinates and weight the group of abscissas
 * @param data - object containing 2 properties x and y
 * @param options - options
 * @returns array of merged and weighted points
 */
function xyMaxMerge(data, options = {}) {
  const {
    x,
    y
  } = data;
  const {
    groupWidth = 0.001
  } = options;
  const merged = {
    x: [],
    y: []
  };
  const maxAbscissa = {
    x: [],
    y: []
  };
  let size = 0;
  let index = 0;
  while (index < x.length) {
    if (size === 0 || x[index] - merged.x[size - 1] > groupWidth) {
      maxAbscissa.x.push(x[index]);
      maxAbscissa.y.push(y[index]);
      merged.x.push(x[index]);
      merged.y.push(y[index]);
      index++;
      size++;
    } else {
      if (y[index] > maxAbscissa.y[size - 1]) {
        maxAbscissa.x[size - 1] = x[index];
        maxAbscissa.y[size - 1] = y[index];
      }
      merged.x[size - 1] = x[index];
      merged.y[size - 1] += y[index];
      index++;
    }
  }
  merged.x = maxAbscissa.x.slice();
  return merged;
}

/**
 * Finds the max value in a zone
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns max y on the specified range.
 */
function xyMaxY(data, options = {}) {
  xyCheck(data);
  const {
    x,
    y
  } = data;
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(x, options);
  let currentxyMaxY = y[fromIndex];
  for (let i = fromIndex + 1; i <= toIndex; i++) {
    if (y[i] > currentxyMaxY) currentxyMaxY = y[i];
  }
  return currentxyMaxY;
}

/**
 * Computes the weighted median of the x values, using the y values as weights.
 * This is the x value that splits the total weight (sum of y) into two equal halves.
 * If the cumulative weight lands exactly at 50%, the result is the average of the two surrounding x values.
 * @param data - x should be sorted in increasing order, y values are used as weights and should be non-negative.
 * @returns The weighted median x value, or NaN if the data is empty.
 */
function xyMedian(data) {
  const {
    x,
    y
  } = data;
  let sumY = 0;
  let cumSumY = 0;
  let i;
  if (x.length === 0) {
    return Number.NaN;
  }
  if (x.length === 1) {
    return x[0];
  }
  for (i = 0; i < y.length; i++) {
    sumY += y[i];
  }
  for (i = 0; i < y.length; i++) {
    cumSumY += y[i];
    if (cumSumY > sumY / 2) {
      return x[i];
    } else if (cumSumY === sumY / 2) {
      if (i === x.length - 1) return x[i];
      return 0.5 * (x[i] + x[i + 1]);
    }
  }
  return Number.NaN;
}

/**
 * Computes the median of Y values in a sliding window around each point.
 * @param data - object with x and y arrays of the same length.
 * @param options - options for the median computation.
 * @returns A new DataXY with the same x values and smoothed y values.
 */
function xyMedianY(data, options = {}) {
  const {
    windowSize = 5
  } = options;
  const {
    x,
    y
  } = data;
  const halfWindow = Math.floor(windowSize / 2);
  const result = new Float64Array(y.length);
  for (let i = 0; i < y.length; i++) {
    const fromIndex = Math.max(0, i - halfWindow);
    const toIndex = Math.min(y.length, i + halfWindow + 1);
    result[i] = xMedian(y, {
      exact: false,
      fromIndex,
      toIndex
    });
  }
  return {
    x,
    y: result
  };
}

/**
 * Computes the median of Y values in a sliding window around each target x position.
 * For each value in xValues, the closest index in data.x is found and the median
 * of the surrounding y values (within the window) is returned.
 * @param data - object with x (sorted in increasing order) and y arrays of the same length.
 * @param xValues - array of x positions at which to compute the median.
 * @param options - options for the median computation.
 * @returns A new DataXY with x = xValues and y = computed medians.
 */
function xyMedianYAtXs(data, xValues, options = {}) {
  const {
    windowSize = 5
  } = options;
  const {
    x,
    y
  } = data;
  const halfWindow = Math.floor(windowSize / 2);
  const result = new Float64Array(xValues.length);
  for (let i = 0; i < xValues.length; i++) {
    const centerIndex = xFindClosestIndex(x, xValues[i]);
    const fromIndex = Math.max(0, centerIndex - halfWindow);
    const toIndex = Math.min(y.length, centerIndex + halfWindow + 1);
    result[i] = xMedian(y, {
      exact: false,
      fromIndex,
      toIndex
    });
  }
  return {
    x: xValues,
    y: result
  };
}

/**
 * Merge abscissa values if the ordinate value is in a list of centroids
 * @param data - object containing 2 properties x and y
 * @param centroids - centroids
 * @param options - options
 * @returns merged points
 */
function xyMergeByCentroids(data, centroids, options = {}) {
  const {
    window = 0.01
  } = options;
  const mergedPoints = {
    x: Float64Array.from(centroids),
    y: new Float64Array(centroids.length).fill(0)
  };
  let originalIndex = 0;
  let mergedIndex = 0;
  while (originalIndex < data.x.length && mergedIndex < centroids.length) {
    const diff = data.x[originalIndex] - centroids[mergedIndex];
    if (Math.abs(diff) < window) {
      mergedPoints.y[mergedIndex] += data.y[originalIndex++];
    } else if (diff < 0) {
      originalIndex++;
    } else {
      mergedIndex++;
    }
  }
  return mergedPoints;
}

/**
 * Find the closest minimum going down hill
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns an object with the x/y value.
 */
function xyMinClosestYPoint(data, options = {}) {
  xyCheck(data);
  const {
    x,
    y
  } = data;
  const {
    target
  } = options;
  let {
    targetIndex
  } = options;
  if (targetIndex === undefined) {
    if (target !== undefined) {
      targetIndex = xFindClosestIndex(x, target);
    } else {
      targetIndex = 0;
    }
  }
  let previousIndex = Number.MIN_SAFE_INTEGER;
  let currentIndex = targetIndex;
  let minY = y[targetIndex];
  while (currentIndex !== previousIndex) {
    previousIndex = currentIndex;
    if (currentIndex > 0 && y[currentIndex - 1] < minY) {
      currentIndex--;
    } else if (currentIndex < x.length - 1 && y[currentIndex + 1] < minY) {
      currentIndex++;
    }
    minY = y[currentIndex];
  }
  return {
    x: x[currentIndex],
    y: y[currentIndex],
    index: currentIndex
  };
}

/**
 * Finds all the min values
 * If the values are equal the middle
 * of the equal part will be the position of the signal!
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options with from and to properties.
 * @returns array of points.
 */
function xyMinimaY(data, options = {}) {
  xyCheck(data, {
    minLength: 2
  });
  const {
    x,
    y
  } = data;
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(x, options);
  const maxima = [];
  let startEqualIndex = -1;
  for (let i = fromIndex + 1; i < toIndex; i++) {
    if (y[i - 1] > y[i] && y[i + 1] > y[i]) {
      maxima.push({
        x: x[i],
        y: y[i],
        index: i
      });
    } else if (y[i - 1] > y[i] && y[i + 1] === y[i]) {
      startEqualIndex = i;
    } else if (y[i - 1] === y[i] && y[i + 1] > y[i]) {
      const index = Math.floor((i + startEqualIndex) / 2);
      maxima.push({
        x: x[index],
        y: y[index],
        index
      });
    }
  }
  return maxima;
}

/**
 * Finds the min y value in a range and return a {x,y} point
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 */
function xyMinYPoint(data, options = {}) {
  xyCheck(data, {
    minLength: 1
  });
  const {
    x,
    y
  } = data;
  if (x.length === 1) return {
    x: x[0],
    y: y[0],
    index: 0
  };
  const {
    fromIndex,
    toIndex
  } = xGetFromToIndex(x, options);
  let current = {
    x: x[fromIndex],
    y: y[fromIndex],
    index: fromIndex
  };
  for (let i = fromIndex + 1; i <= toIndex; i++) {
    if (y[i] < current.y) current = {
      x: x[i],
      y: y[i],
      index: i
    };
  }
  return current;
}

/**
 * Returns an information about a signal.
 *
 *
 * We expect ordered data and equidistant X axis
 * You can use the method helper if required:
 * ML.ArrayPoints.uniqueX
 * ML.ArrayPoints.sortX
 * ML.ArrayPoints.equallySpaced
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns information about signal.
 */
function xyPeakInfo(data, options = {}) {
  xyCheck(data);
  const {
    x,
    y
  } = data;
  if (x === undefined || y === undefined || x.length < 3) {
    return;
  }
  const {
    target
  } = options;
  let {
    targetIndex
  } = options;
  if (targetIndex === undefined && target !== undefined) {
    targetIndex = xFindClosestIndex(x, target);
  }
  if (targetIndex === undefined) {
    throw new Error('must specify target or targetIndex');
  }
  let i = targetIndex;
  let currentDiff = y[i] - y[i + 1];
  const multiplier = currentDiff < 0 ? -1 : 1;
  currentDiff *= multiplier;
  while (i < x.length - 1) {
    i++;
    const newDiff = (y[i] - y[i + 1]) * multiplier;
    if (newDiff < currentDiff) break;
    currentDiff = newDiff;
  }
  const after = {
    x: x[i],
    y: y[i]
  };
  i = targetIndex;
  currentDiff = (y[i] - y[i - 1]) * multiplier;
  while (i > 1) {
    i--;
    const newDiff = (y[i] - y[i - 1]) * multiplier;
    if (newDiff < currentDiff) break;
    currentDiff = newDiff;
  }
  const before = {
    x: x[i],
    y: y[i]
  };
  return {
    inflectionBefore: before,
    inflectionAfter: after,
    extrema: {
      x: x[targetIndex],
      y: y[targetIndex]
    },
    inflectionMiddle: {
      x: (before.x + after.x) / 2,
      y: (before.y + after.y) / 2
    },
    width: Math.abs(before.x - after.x)
  };
}

/**
 * Find the closest minimum going down hill
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns an object with the x/y value.
 */
function xyRealMaxYPoint(data, options = {}) {
  xyCheck(data);
  const {
    x,
    y
  } = data;
  const targetIndex = xGetTargetIndex(x, options);
  // interpolation to a sin() function
  if (y[targetIndex - 1] > 0 && y[targetIndex + 1] > 0 && y[targetIndex] >= y[targetIndex - 1] && y[targetIndex] >= y[targetIndex + 1]) {
    const alpha = 20 * Math.log10(y[targetIndex - 1]);
    const beta = 20 * Math.log10(y[targetIndex]);
    const gamma = 20 * Math.log10(y[targetIndex + 1]);
    const p = 0.5 * (alpha - gamma) / (alpha - 2 * beta + gamma);
    return {
      x: x[targetIndex] + (x[targetIndex] - x[targetIndex - 1]) * p,
      y: y[targetIndex] - 0.25 * (y[targetIndex - 1] - y[targetIndex + 1]) * p,
      index: targetIndex
    };
  } else {
    return {
      x: x[targetIndex],
      y: y[targetIndex],
      index: targetIndex
    };
  }
}

/**
 * Finds the real minimum y point using parabolic interpolation when possible.
 * @param data - data.
 * @param options - options.
 */
function xyRealMinYPoint(data, options = {}) {
  xyCheck(data);
  const {
    x,
    y
  } = data;
  const targetIndex = xGetTargetIndex(x, options);
  // interpolation to a sin() function
  if (y[targetIndex - 1] < 0 && y[targetIndex + 1] < 0 && y[targetIndex] <= y[targetIndex - 1] && y[targetIndex] <= y[targetIndex + 1]) {
    const alpha = 20 * Math.log10(-y[targetIndex - 1]);
    const beta = 20 * Math.log10(-y[targetIndex]);
    const gamma = 20 * Math.log10(-y[targetIndex + 1]);
    const p = 0.5 * (alpha - gamma) / (alpha - 2 * beta + gamma);
    return {
      x: x[targetIndex] + (x[targetIndex] - x[targetIndex - 1]) * p,
      y: y[targetIndex] - 0.25 * (y[targetIndex - 1] - y[targetIndex + 1]) * p,
      index: targetIndex
    };
  } else {
    return {
      x: x[targetIndex],
      y: y[targetIndex],
      index: targetIndex
    };
  }
}

/**
 * Reduce the number of points while keeping visually the same noise. Practical to
 * display many spectra as SVG. If you want a similar looking spectrum you should still however
 * generate at least 4x the nbPoints that is being displayed.
 *
 * SHOULD NOT BE USED FOR DATA PROCESSING !!!
 * You should rather use ml-xy-equally-spaced to make further processing
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns object with x and y arrays.
 */
function xyReduce(data, options = {}) {
  xyCheck(data);
  // todo we should check that the single point is really in the range and the zones
  if (data.x.length < 2) {
    return {
      x: Float64Array.from(data.x),
      y: Float64Array.from(data.y)
    };
  }
  const {
    x,
    y
  } = data;
  const {
    from = x[0],
    to = x.at(-1),
    nbPoints = 4001,
    optimize = false
  } = options;
  let {
    zones = []
  } = options;
  zones = zonesNormalize(zones, {
    from,
    to
  });
  // @ts-expect-error -- x.at(-1) returns number | undefined but array is guaranteed non-empty here
  if (zones.length === 0) zones = [{
    from,
    to
  }]; // we take everything
  const {
    internalZones,
    totalPoints
  } = getInternalZones(zones, x);
  // we calculate the number of points per zone that we should keep
  if (totalPoints <= nbPoints) {
    return notEnoughPoints(x, y, internalZones, totalPoints);
  }
  // need to xyReduce number of points
  const ratio = nbPoints / totalPoints;
  let currentTotal = 0;
  for (let i = 0; i < internalZones.length - 1; i++) {
    const zone = internalZones[i];
    zone.nbPoints = Math.round(zone.nbPoints * ratio);
    currentTotal += zone.nbPoints;
  }
  internalZones.at(-1).nbPoints = nbPoints - currentTotal;
  const newX = [];
  const newY = [];
  for (const zone of internalZones) {
    if (!zone.nbPoints) continue;
    appendFromTo(zone.fromIndex, zone.toIndex, zone.nbPoints);
  }
  return {
    x: newX,
    y: newY
  };
  /**
   * Appends reduced x/y values for a zone to the output arrays.
   * @param fromIndex - start index in the input arrays.
   * @param  toIndex - end index in the input arrays.
   * @param zoneNbPoints - target number of points to keep in this zone.
   */
  function appendFromTo(fromIndex, toIndex, zoneNbPoints) {
    if (zoneNbPoints === 1) {
      newX.push(x[Math.round((toIndex - fromIndex) / 2)]);
      newY.push(y[Math.round((toIndex - fromIndex) / 2)]);
      return;
    }
    if (zoneNbPoints === 2) {
      newX.push(x[fromIndex], x[toIndex]);
      newY.push(y[fromIndex], y[toIndex]);
      return;
    }
    newX.push(x[fromIndex]);
    newY.push(y[fromIndex]);
    if (zoneNbPoints % 2 === 0) {
      zoneNbPoints = zoneNbPoints / 2 + 1;
    } else {
      zoneNbPoints = (zoneNbPoints - 1) / 2 + 1;
    }
    // we will need to make some kind of min / max because there are too many points
    // we will always keep the first point and the last point
    const slot = (x[toIndex] - x[fromIndex]) / (zoneNbPoints - 1);
    let currentX = x[fromIndex] + slot;
    let first = true;
    let minY = Number.POSITIVE_INFINITY;
    let xyMaxY = Number.NEGATIVE_INFINITY;
    for (let i = fromIndex + 1; i <= toIndex; i++) {
      if (first) {
        minY = y[i];
        xyMaxY = y[i];
        first = false;
      } else {
        if (y[i] < minY) minY = y[i];
        if (y[i] > xyMaxY) xyMaxY = y[i];
      }
      if (x[i] >= currentX || i === toIndex) {
        if (optimize) {
          if (minY > newY[newX.length - 1]) ; else if (xyMaxY < newY[newX.length - 1]) {
            // we can skip the intermediate value
            xyMaxY = minY;
          } else {
            newX.push(currentX - slot / 2);
            newY.push(minY);
          }
        } else {
          newX.push(currentX - slot / 2);
          newY.push(minY);
        }
        newX.push(currentX);
        newY.push(xyMaxY);
        currentX += slot;
        first = true;
      }
    }
  }
}
function notEnoughPoints(x, y, internalZones, totalPoints) {
  const newX = new Float64Array(totalPoints);
  const newY = new Float64Array(totalPoints);
  let index = 0;
  for (const zone of internalZones) {
    for (let i = zone.fromIndex; i < zone.toIndex + 1; i++) {
      newX[index] = x[i];
      newY[index] = y[i];
      index++;
    }
  }
  return {
    x: newX,
    y: newY
  };
}
function getInternalZones(zones, x) {
  // for each zone we should know the first index, the last index and the number of points
  const internalZones = [];
  let totalPoints = 0;
  for (const zone of zones) {
    let fromIndex = xFindClosestIndex(x, zone.from);
    let toIndex = xFindClosestIndex(x, zone.to);
    if (fromIndex > 0 && x[fromIndex] > zone.from) {
      fromIndex--;
    }
    if (toIndex < x.length - 1 && x[toIndex] < zone.to) {
      toIndex++;
    }
    const nbPoints = toIndex - fromIndex + 1;
    internalZones.push({
      from: zone.from,
      to: zone.to,
      fromIndex,
      toIndex,
      nbPoints
    });
    totalPoints += nbPoints;
  }
  return {
    internalZones,
    totalPoints
  };
}

/**
 * Reduce the number of points while keeping visually the same noise. Practical to
 * display many spectra as SVG. This algorithm is designed for non-continuous data.
 * We are expecting peaks to be only positive and the x values to be ordered.
 * SHOULD NOT BE USED FOR DATA PROCESSING !!!
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns object with x and y arrays.
 */
function xyReduceNonContinuous(data, options = {}) {
  xyCheck(data);
  if (data.x.length < 2) {
    // todo we should check that the single point is really in the range and the zones
    return {
      x: Float64Array.from(data.x),
      y: Float64Array.from(data.y)
    };
  }
  const {
    x,
    y
  } = data;
  const {
    from = x[0],
    to = x.at(-1),
    maxApproximateNbPoints = 4001
  } = options;
  let {
    zones = []
  } = options;
  zones = zonesNormalize(zones, {
    from,
    to
  });
  // @ts-expect-error -- x.at(-1) returns number | undefined but array is guaranteed non-empty here
  if (zones.length === 0) zones = [{
    from,
    to
  }]; // we take everything
  const {
    internalZones,
    totalPoints
  } = getInternalZones(zones, x);
  // we calculate the number of points per zone that we should keep
  if (totalPoints <= maxApproximateNbPoints) {
    return notEnoughPoints(x, y, internalZones, totalPoints);
  }
  // @ts-expect-error -- x.at(-1) returns number | undefined but array is guaranteed non-empty here
  const deltaX = (to - from) / (maxApproximateNbPoints - 1);
  const newX = [];
  const newY = [];
  for (const internalZone of internalZones) {
    const maxNbPoints = Math.ceil((internalZone.to - internalZone.from) / deltaX) + 1;
    const fromIndex = internalZone.fromIndex;
    const toIndex = internalZone.toIndex;
    if (toIndex - fromIndex + 1 <= maxNbPoints) {
      // we keep all the points
      for (let i = fromIndex; i <= toIndex; i++) {
        newX.push(x[i]);
        newY.push(y[i]);
      }
    } else {
      // we need to reduce the number of points
      let currentX = x[fromIndex];
      let currentY = y[fromIndex];
      let lastX = currentX + deltaX;
      newX.push(currentX);
      newY.push(currentY);
      for (let i = fromIndex; i <= toIndex; i++) {
        if (x[i] > lastX) {
          // next slot
          currentX = x[i];
          currentY = y[i];
          newX.push(currentX);
          newY.push(currentY);
          lastX += deltaX;
        }
        if (y[i] > currentY) {
          currentY = y[i];
          newY[newY.length - 1] = currentY;
        }
      }
    }
  }
  return {
    x: newX,
    y: newY
  };
}

/**
 * This function calculates a rolling average.
 * This methods will recalculate the x values by using xRollingAverage
 * @param data - array of points {x,y}
 * @param fct - callback function that from an array returns a value.
 * @param options - options
 */
function xyRolling(data, fct, options = {}) {
  let {
    x,
    y
  } = data;
  y = xRolling(y, fct, options);
  if (x.length !== y.length) {
    x = xRollingAverage(x, options);
  }
  return {
    x,
    y
  };
}

/**
 *
 * Dong, Jian, et al. "An algorithm of filtering noises in multi-beam data based on rolling circle transform." 2019 2nd International Conference on Sustainable Energy, Environment and Information Engineering (SEEIE 2019). Atlantis Press, 2019.
 * DONG Jian, PENG Rencan, ZHANG Lihua, WANG Zhijun. An Algorithm of Filtering Noises in Multi-beam Data Based on Rolling Circle Transform[J]. Geomatics and Information Science of Wuhan University, 2016, 41(1): 86-92. DOI: 10.13203/j.whugis20130757
 * @param data - data with x and y arrays.
 * @param options - options.
 */
function xyRollingCircleTransform(data, options = {}) {
  const {
    x
  } = data;
  let {
    y
  } = data;
  const {
    radius = 1,
    position = 'top',
    shifted = true
  } = options;
  if (position !== 'top' && position !== 'bottom') {
    throw new Error(`Invalid position: ${String(position)}`);
  }
  if (position === 'bottom') {
    y = y.slice();
    for (let i = 0; i < y.length; i++) {
      y[i] = -y[i];
    }
  }
  if (x.length === 0 || y.length === 0) {
    return new Float64Array();
  }
  const yCenters = new Float64Array(x.length);
  for (let i = 0; i < x.length; i++) {
    const x0 = x[i]; // x center of the current circle
    const fromX = xFindClosestIndex(x, x0 - radius);
    const toX = xFindClosestIndex(x, x0 + radius);
    // for the circle radius we need to evaluate the minimal vertical shift
    const y0 = y[i] + radius; // y center of the circle on top of peak
    let yShift = y0; // this is the minimal possible shift
    for (let j = fromX; j <= toX; j++) {
      const currentX = x[j];
      if (currentX < x0 - radius || currentX > x0 + radius) {
        continue;
      }
      const currentMinYShift = y[j] + Math.sqrt(radius ** 2 - (currentX - x0) ** 2);
      if (currentMinYShift > yShift) {
        yShift = currentMinYShift;
      }
    }
    yCenters[i] = yShift;
  }
  if (!shifted) {
    for (let i = 0; i < yCenters.length; i++) {
      yCenters[i] -= radius;
    }
  }
  if (position === 'bottom') {
    for (let i = 0; i < yCenters.length; i++) {
      yCenters[i] = -yCenters[i];
    }
  }
  return yCenters;
}

/**
 * Set a value (default 0) to specific zones.
 * @param data - object that contains property x (an ordered increasing array) and y (an array).
 * @param options - options.
 * @returns data with y values set to the given value in the specified zones.
 */
function xySetYValue(data, options = {}) {
  xyCheck(data);
  const {
    x,
    y
  } = data;
  const {
    value = 0
  } = options;
  let {
    zones
  } = options;
  if (!Array.isArray(zones) || zones.length === 0) {
    return data;
  }
  zones = zonesNormalize(zones);
  const newX = x.slice();
  const newY = y.slice();
  let currentZone = zones[0];
  let position = 0;
  loop: for (let i = 0; i < x.length; i++) {
    while (currentZone.to < x[i]) {
      position++;
      currentZone = zones[position];
      if (!currentZone) {
        i = x.length;
        break loop;
      }
    }
    if (x[i] >= currentZone.from) {
      newY[i] = value;
    }
  }
  return {
    x: newX,
    y: newY
  };
}

/**
 * This function performs a quick sort of the x array while transforming the y array to preserve the coordinates.
 * @param data - object that contains property x (Array) and y (Array).
 */
function xySortX(data) {
  const {
    x,
    y
  } = data;
  if (xIsMonotonic(x) && x.length > 1) {
    const floatX = Float64Array.from(x);
    const floatY = Float64Array.from(y);
    if (floatX.at(-1) < floatX[0]) {
      floatX.reverse();
      floatY.reverse();
    }
    return {
      x: floatX,
      y: floatY
    };
  }
  const xyObject = Array.from(x, (val, index) => ({
    x: val,
    y: y[index]
  }));
  xyObject.sort((a, b) => a.x - b.x);
  const response = {
    x: new Float64Array(x.length),
    y: new Float64Array(y.length)
  };
  for (let i = 0; i < x.length; i++) {
    response.x[i] = xyObject[i].x;
    response.y[i] = xyObject[i].y;
  }
  return response;
}

/**
 * Convert a DataXY object to a flat interleaved array [x, y, x, y, ...].
 * @param data - DataXY object with x and y arrays.
 * @returns flat array alternating x and y values.
 */
function xyToInterleaved(data) {
  xyCheck(data);
  const {
    x,
    y
  } = data;
  const result = new Float64Array(x.length * 2);
  for (let i = 0; i < x.length; i++) {
    result[2 * i] = x[i];
    result[2 * i + 1] = y[i];
  }
  return result;
}

/**
 * Convert a DataXY to an array of array containing x,y.
 * @param data - array of points {x,y}
 */
function xyToXYArray(data) {
  xyCheck(data);
  const {
    x,
    y
  } = data;
  const objectArray = [];
  for (let i = 0; i < x.length; i++) {
    objectArray.push([x[i], y[i]]);
  }
  return objectArray;
}

/**
 * Converts a DataXY object to an array of {x,y} point objects.
 * @param data - array of points {x,y}.
 */
function xyToXYObject(data) {
  xyCheck(data);
  const {
    x,
    y
  } = data;
  const objectArray = [];
  for (let i = 0; i < x.length; i++) {
    objectArray.push({
      x: x[i],
      y: y[i]
    });
  }
  return objectArray;
}

/**
 * Ensure x values are unique
 * @param data - object that contains property x (Array) and y (Array).
 * @param options - object containing a property algorithm (can be 'sum' or 'average', the latter being the default value), and a property isSorted (boolean indicating if the x-array is sorted).
 */
function xyUniqueX(data, options = {}) {
  xyCheck(data);
  if (data.x.length === 0) {
    return {
      x: [],
      y: []
    };
  }
  const {
    algorithm = 'average',
    isSorted = true
  } = options;
  if (!isSorted) {
    data = xySortX(data);
  }
  switch (algorithm) {
    case 'average':
      return average(data);
    case 'sum':
      return sum$1(data);
    default:
      throw new Error(`unknown algorithm: ${String(algorithm)}`);
  }
}
/**
 * Averages duplicate x values by averaging their y values.
 * @param data - input.
 * @returns result.
 */
function average(data) {
  const x = [];
  const y = [];
  let cumulativeY = data.y[0];
  let divider = 1;
  for (let i = 1; i < data.x.length; i++) {
    if (!(data.x[i] === data.x[i - 1])) {
      x.push(data.x[i - 1]);
      y.push(cumulativeY / divider);
      cumulativeY = 0;
      divider = 0;
    }
    cumulativeY += data.y[i];
    divider++;
  }
  x.push(data.x.at(-1));
  y.push(cumulativeY / divider);
  return {
    x,
    y
  };
}
/**
 * Merges duplicate x values by summing their y values.
 * @param data - input.
 * @returns result.
 */
function sum$1(data) {
  const x = [];
  const y = [];
  let cumulativeY = data.y[0];
  for (let i = 1; i < data.x.length; i++) {
    if (!(data.x[i] === data.x[i - 1])) {
      x.push(data.x[i - 1]);
      y.push(cumulativeY);
      cumulativeY = 0;
    }
    cumulativeY += data.y[i];
  }
  x.push(data.x.at(-1));
  y.push(cumulativeY);
  return {
    x,
    y
  };
}

/**
 * Merge abscissas values on similar ordinates and weight the group of abscissas
 * @param data - object containing 2 properties x and y
 * @param options - options
 * @returns array of merged and weighted points
 */
function xyWeightedMerge(data, options = {}) {
  const {
    x,
    y
  } = data;
  const {
    groupWidth = 0.001
  } = options;
  const merged = {
    x: [],
    y: []
  };
  const weightedAbscissa = {
    x: [],
    y: []
  };
  let size = 0;
  let index = 0;
  while (index < x.length) {
    if (size === 0 || x[index] - merged.x[size - 1] > groupWidth) {
      weightedAbscissa.x.push(x[index] * y[index]);
      weightedAbscissa.y.push(y[index]);
      merged.x.push(x[index]);
      merged.y.push(y[index]);
      index++;
      size++;
    } else {
      weightedAbscissa.x[size - 1] += x[index] * y[index];
      weightedAbscissa.y[size - 1] += y[index];
      merged.x[size - 1] = x[index];
      merged.y[size - 1] += y[index];
      index++;
    }
  }
  for (let i = 0; i < merged.x.length; i++) {
    merged.x[i] = weightedAbscissa.x[i] / weightedAbscissa.y[i];
  }
  return merged;
}

/**
 * Convert an array of XY arrays to a DataXY object containing x,y arrays
 * @param data - array of arrays [[x,y],[x,y],...]
 */
function xy2ToXY(data) {
  const xy2 = {
    x: [],
    y: []
  };
  for (const xyValue of data) {
    xy2.x.push(xyValue[0]);
    xy2.y.push(xyValue[1]);
  }
  return xy2;
}

/**
 * Sort object of arrays, x has to be monotone.
 * @param data - object of kind {x:[], re:[], im:[]}
 * @returns sorted DataXReIm object.
 */
function xreimSortX(data) {
  const {
    x,
    re,
    im
  } = data;
  if (x.length !== re.length || x.length !== im.length) {
    throw new TypeError('length of x, re and im must be identical');
  }
  if (x.length < 2 || x[0] < x[1]) return data;
  return {
    x: x.toReversed(),
    re: re.toReversed(),
    im: im.toReversed()
  };
}

/**
 * This function makes a zero filling to re and im part.
 * @param data - object of kind {x:[], re:[], im:[]}
 * @param totalLength - final number of points
 * @returns zero-filled DataXReIm object.
 */
function xreimZeroFilling(data, totalLength) {
  const {
    x,
    re,
    im
  } = data;
  const length = x.length;
  if (totalLength === 0 || length === totalLength) return data;
  if (length > totalLength) {
    return {
      x: x.slice(0, totalLength),
      re: re.slice(0, totalLength),
      im: im.slice(0, totalLength)
    };
  }
  const newX = new Float64Array(totalLength);
  newX.set(x);
  const deltaX = (x.at(-1) - x[0]) / (length - 1);
  for (let i = length; i < totalLength; i++) {
    newX[i] = newX[i - 1] + deltaX;
  }
  return {
    x: newX,
    ...reimZeroFilling({
      re,
      im
    }, totalLength)
  };
}

/**
 * Computes common x slots from multiple DataXY spectra by grouping nearby x values.
 * @param data - data.
 * @param options - options.
 */
function getSlots(data, options = {}) {
  const {
    delta = 1
  } = options;
  const deltaIsFunction = typeof delta === 'function';
  const possibleXs = Float64Array.from(data.flatMap(spectrum => spectrum.x));
  possibleXs.sort();
  if (possibleXs.length === 0) {
    throw new Error('can not process empty arrays');
  }
  let currentSlot = {
    from: possibleXs[0],
    to: possibleXs[0],
    average: possibleXs[0],
    sum: possibleXs[0],
    number: 1
  };
  const slots = [currentSlot];
  for (let i = 1; i < possibleXs.length; i++) {
    const currentDelta = deltaIsFunction ? delta(possibleXs[i]) : delta;
    if (possibleXs[i] - currentSlot.to <= currentDelta) {
      currentSlot.to = possibleXs[i];
      currentSlot.number++;
      currentSlot.sum += possibleXs[i];
      currentSlot.average = currentSlot.sum / currentSlot.number;
    } else {
      currentSlot = {
        from: possibleXs[i],
        to: possibleXs[i],
        average: possibleXs[i],
        sum: possibleXs[i],
        number: 1
      };
      slots.push(currentSlot);
    }
  }
  return slots;
}

/**
 * Aligns data, can be used for spectra
 * @param data - data
 * @param options - options.
 */
function xyArrayAlign(data, options = {}) {
  const {
    delta = 1,
    requiredY = false
  } = options;
  data = data.map(spectrum => xyJoinX(spectrum, {
    delta
  }));
  const slots = getSlots(data, {
    delta
  });
  const x = Float64Array.from(slots.map(slot => slot.average));
  const ys = Array.from(data, () => new Float64Array(x.length));
  const positions = new Uint32Array(data.length);
  for (let i = 0; i < slots.length; i++) {
    const slot = slots[i];
    for (let j = 0; j < data.length; j++) {
      const spectrum = data[j];
      while (positions[j] < spectrum.x.length && spectrum.x[positions[j]] <= slot.to) {
        ys[j][i] += spectrum.y[positions[j]];
        positions[j]++;
      }
    }
  }
  if (requiredY) return filterRequiredY(x, ys);
  return {
    x,
    ys
  };
}
function filterRequiredY(x, ys) {
  const newX = [];
  const newYs = Array.from(ys, () => []);
  for (let i = 0; i < x.length; i++) {
    if (ys.every(y => y[i] !== 0)) {
      newX.push(x[i]);
      for (let j = 0; j < ys.length; j++) {
        newYs[j].push(ys[j][i]);
      }
    }
  }
  return {
    x: newX,
    ys: newYs
  };
}

/**
 * Merge DataXY
 * We have an array of DataXY and the goal is to merge all the values for which the deltaX is small or equal to delta.
 * X values are weighted average
 * @param data - data
 * @param options - options.
 */
function xyArrayWeightedMerge(data, options = {}) {
  let {
    delta = 1
  } = options;
  if (typeof delta === 'number') {
    const deltaNumber = delta;
    delta = () => deltaNumber;
  }
  data = data.filter(spectrum => spectrum.x.length > 0);
  if (data.length === 0) return {
    x: [],
    y: []
  };
  const x = [];
  const y = [];
  const positions = new Array(data.length).fill(0);
  const point = {
    x: 0,
    y: 0
  };
  nextValue(data, positions, point);
  const slot = {
    maxX: point.x + delta(point.x),
    sumY: point.y,
    sumXY: point.y * point.x
  };
  while (data.length > 0) {
    nextValue(data, positions, point);
    const sameSlot = point.x <= slot.maxX;
    if (!sameSlot) {
      if (slot.sumY > 0) {
        x.push(slot.sumXY / slot.sumY);
        y.push(slot.sumY);
      }
      slot.sumY = 0;
      slot.sumXY = 0;
    }
    slot.sumY += point.y;
    slot.sumXY += point.x * point.y;
    slot.maxX = point.x + delta(point.x);
    if (data.length === 0 && slot.sumY > 0) {
      x.push(slot.sumXY / slot.sumY);
      y.push(slot.sumY);
    }
  }
  return {
    x,
    y
  };
}
/**
 * Finds the next minimum x value across all spectra and advances the corresponding position pointer.
 * @param data - data.
 * @param positions - positions array.
 * @param point - point.
 */
function nextValue(data, positions, point) {
  let minIndex = 0;
  let minX = data[0].x[positions[0]];
  for (let i = 1; i < data.length; i++) {
    const currentX = data[i].x[positions[i]];
    if (currentX < minX) {
      minX = currentX;
      minIndex = i;
    }
  }
  point.x = minX;
  point.y = data[minIndex].y[positions[minIndex]];
  positions[minIndex]++;
  if (positions[minIndex] === data[minIndex].x.length) {
    positions.splice(minIndex, 1);
    data.splice(minIndex, 1);
  }
}

/**
 * Computes slots aligned to the first spectrum's x values, adding slots for any x values not covered.
 * @param data - data.
 * @param options - options.
 * @returns the slots, sorted by x value, with non-overlapping `[from, to)` ranges.
 */
function getSlotsToFirst(data, options = {}) {
  const {
    delta = 1
  } = options;
  const deltaIsFunction = typeof delta === 'function';
  const firstXs = data[0].x;
  const slots = [];
  // we first create the slots based on the first spectrum
  for (const element of firstXs) {
    const currentDelta = deltaIsFunction ? delta(element) : delta;
    slots.push({
      from: element - currentDelta,
      to: element + currentDelta,
      value: element
    });
  }
  const otherXs = xyArrayWeightedMerge(data.slice(1), options).x;
  let currentPosition = 0;
  // Only the first-spectrum slots drive this pass; slots created for uncovered
  // x values are appended and merged in by the sort below, so we freeze the
  // count instead of iterating an array we are mutating.
  const firstSlotCount = slots.length;
  for (let i = 0; i < firstSlotCount; i++) {
    const slot = slots[i];
    while (currentPosition < otherXs.length && otherXs[currentPosition] < slot.to) {
      if (otherXs[currentPosition] < slot.from) {
        const currentDelta = deltaIsFunction ? delta(otherXs[currentPosition]) : delta;
        slots.push({
          from: otherXs[currentPosition] - currentDelta,
          to: otherXs[currentPosition] + currentDelta,
          value: otherXs[currentPosition]
        });
      }
      currentPosition++;
    }
  }
  for (let i = currentPosition; i < otherXs.length; i++) {
    const currentDelta = deltaIsFunction ? delta(otherXs[i]) : delta;
    slots.push({
      from: otherXs[i] - currentDelta,
      to: otherXs[i] + currentDelta,
      value: otherXs[i]
    });
  }
  slots.sort((a, b) => a.value - b.value);
  // we prevent slots overlap in the first spectrum
  for (let i = 0; i < slots.length - 1; i++) {
    if (slots[i].to > slots[i + 1].from) {
      const middle = (slots[i].value + slots[i + 1].value) / 2;
      slots[i].to = middle;
      slots[i + 1].from = middle;
    }
  }
  return slots;
}

/**
 * We align all the data/spectra to the first array of X.
 * The alignment is based on the X values of the first spectrum and the `delta` error allowed.
 * If some x values are missing in the first spectrum we will add them
 * @param data - data
 * @param options - options
 * @returns the common `x` axis and one aligned `y` array per input spectrum.
 */
function xyArrayAlignToFirst(data, options = {}) {
  const {
    delta = 1
  } = options;
  const slots = getSlotsToFirst(data, {
    delta
  });
  const x = new Float64Array(slots.length);
  for (let i = 0; i < slots.length; i++) {
    x[i] = slots[i].value;
  }
  const ys = Array.from(data, () => new Float64Array(x.length));
  const positions = new Uint32Array(data.length);
  for (let i = 0; i < slots.length; i++) {
    const slot = slots[i];
    for (let j = 0; j < data.length; j++) {
      const spectrum = data[j];
      while (positions[j] < spectrum.x.length && spectrum.x[positions[j]] < slot.to) {
        ys[j][i] += spectrum.y[positions[j]];
        positions[j]++;
      }
    }
  }
  return {
    x,
    ys
  };
}

/**
 * Merge DataXY
 * We have an array of DataXY and the goal is to merge all the values that are the closest possible
 * @param data - data
 * @param options - options.
 */
function xyArrayMerge(data, options = {}) {
  const {
    delta = 1
  } = options;
  // We start by checking that the data/spectra don't have peaks too close and we simplify them.
  data = data.map(spectrum => xyJoinX(spectrum, {
    delta
  }));
  // At first, we will calculate the X values (simple mean).
  const slots = getSlots(data, {
    delta
  });
  const x = Float64Array.from(slots.map(slot => slot.average));
  const y = new Float64Array(x.length);
  const positions = new Uint32Array(data.length);
  for (let i = 0; i < slots.length; i++) {
    const slot = slots[i];
    for (let j = 0; j < data.length; j++) {
      const spectrum = data[j];
      while (positions[j] < spectrum.x.length && spectrum.x[positions[j]] <= slot.to) {
        y[i] += spectrum.y[positions[j]];
        positions[j]++;
      }
    }
  }
  return {
    x,
    y
  };
}

/**
 * Throws an error if it's not an array of x,y objects.
 * Only checks the first element.
 * @param points - list of points.
 * @param options - additional checks.
 */
function xyObjectCheck(points, options = {}) {
  const {
    minLength = 0
  } = options;
  if (!Array.isArray(points)) {
    throw new Error('points must be an array of {x,y} objects');
  }
  if (points.length > 0 && (typeof points[0].x !== 'number' || typeof points[0].y !== 'number')) {
    throw new Error('points must be an array of {x,y} objects');
  }
  if (minLength && points.length < minLength) {
    throw new Error(`points must have a length of at least ${minLength}`);
  }
}

/**
 * Finds the max x value and return a {x,y,index} point
 * @param points - object that contains property x (an ordered increasing array) and y (an array).
 */
function xyObjectMaxXPoint(points = []) {
  xyObjectCheck(points);
  if (points.length === 0) return {
    x: 0,
    y: 0
  };
  let current = {
    x: points[0].x,
    y: points[0].y,
    index: 0
  };
  for (let i = 1; i < points.length; i++) {
    if (points[i].x > current.x) {
      current = {
        x: points[i].x,
        y: points[i].y,
        index: i
      };
    }
  }
  return current;
}

/**
 * Finds the min x value and return a {x,y,index} point
 * @param points - object that contains property x (an ordered increasing array) and y (an array).
 */
function xyObjectMinXPoint(points = []) {
  xyObjectCheck(points);
  if (points.length === 0) return {
    x: 0,
    y: 0
  };
  let current = {
    x: points[0].x,
    y: points[0].y,
    index: 0
  };
  for (let i = 1; i < points.length; i++) {
    if (points[i].x < current.x) {
      current = {
        x: points[i].x,
        y: points[i].y,
        index: i
      };
    }
  }
  return current;
}

/**
 * Filter the array by taking the higher points (max y value) and only.
 * Keep one per slot. There are 2 different slots, the smallest one will have the
 * new property `close` to true
 * @param points - array of all the points
 * @param options - options.
 * @returns copy of points with 'close' property.
 */
function xyObjectBestPoints(points, options = {}) {
  const {
    from = xyObjectMinXPoint(points).x,
    to = xyObjectMaxXPoint(points).x,
    limit = 20,
    threshold = 0.01,
    numberCloseSlots = 50,
    numberSlots = 10
  } = options;
  const slot = (to - from) / numberSlots;
  const closeSlot = (to - from) / numberCloseSlots;
  const selected = points.filter(point => point.x >= from && point.x <= to).map(point => {
    return {
      point
    };
  });
  selected.sort((a, b) => {
    return b.point.y - a.point.y;
  });
  const toReturn = [];
  if (selected.length === 0) return [];
  const minY = selected[0].point.y * threshold;
  peakLoop: for (const item of selected) {
    if (item.point.y < minY) {
      break;
    }
    let close = false;
    for (const existing of toReturn) {
      if (Math.abs(existing.x - item.point.x) < closeSlot) {
        continue peakLoop;
      }
      if (Math.abs(existing.x - item.point.x) < slot) {
        close = true;
      }
    }
    const newPeak = {
      ...item.point,
      close
    };
    toReturn.push(newPeak);
    if (toReturn.length === limit) break;
  }
  toReturn.sort((a, b) => a.x - b.x);
  return toReturn;
}

/**
 * Joins points whose x values are within xError of each other using weighted averaging.
 * @param points - array of growing points {x,y}.
 * @param options - options.
 */
function xyObjectJoinX(points, options = {}) {
  const {
    xError = Number.EPSILON
  } = options;
  // when we join we will use the center of mass
  const result = [];
  let current = {
    x: Number.MIN_SAFE_INTEGER,
    y: 0
  };
  for (const point of points) {
    if (point.x - current.x <= xError) {
      // weighted sum
      if (current.y !== 0 || point.y !== 0) {
        current.x = point.y / (current.y + point.y) * (point.x - current.x) + current.x;
        current.y += point.y;
      }
    } else {
      current = {
        x: point.x,
        y: point.y
      };
      result.push(current);
    }
  }
  return result;
}

/**
 * Finds the max y value and return a {x,y,index} point
 * @param points - object that contains property x (an ordered increasing array) and y (an array).
 * @returns max point.
 */
function xyObjectMaxYPoint(points = []) {
  xyObjectCheck(points);
  if (points.length === 0) return {
    x: 0,
    y: 0
  };
  let current = {
    x: points[0].x,
    y: points[0].y,
    index: 0
  };
  for (let i = 1; i < points.length; i++) {
    if (points[i].y > current.y) {
      current = {
        x: points[i].x,
        y: points[i].y,
        index: i
      };
    }
  }
  return current;
}

/**
 * Returns all min and max values of an array of points.
 * @param points - array of points {x,y}.
 * @returns object with the 4 extrema.
 */
function xyObjectMinMaxValues(points) {
  xyObjectCheck(points, {
    minLength: 1
  });
  let minX = points[0].x;
  let maxX = minX;
  let minY = points[0].y;
  let maxY = minY;
  for (const point of points) {
    if (point.x < minX) minX = point.x;
    if (point.x > maxX) maxX = point.x;
    if (point.y < minY) minY = point.y;
    if (point.y > maxY) maxY = point.y;
  }
  return {
    minX,
    maxX,
    minY,
    maxY
  };
}

/**
 * Finds the min y value and return a {x,y,index} point
 * @param points - object that contains property x (an ordered increasing array) and y (an array).
 */
function xyObjectMinYPoint(points = []) {
  xyObjectCheck(points);
  if (points.length === 0) return {
    x: 0,
    y: 0
  };
  let current = {
    x: points[0].x,
    y: points[0].y,
    index: 0
  };
  for (let i = 1; i < points.length; i++) {
    if (points[i].y < current.y) {
      current = {
        x: points[i].x,
        y: points[i].y,
        index: i
      };
    }
  }
  return current;
}

/**
 * Resize the Y values of the points to be normalized.
 * @param points - array of points {x,y}.
 * @param options - options.
 * @returns array of points {x,y} with normalized Y values.
 */
function xyObjectNormedY(points, options) {
  points = structuredClone(points);
  const ys = points.map(point => point.y);
  const normalizedYs = xNormed(ys, options);
  for (let i = 0; i < points.length; i++) {
    points[i].y = normalizedYs[i];
  }
  return points;
}

/**
 * Slots growing points into fixed-width buckets and sums their y values.
 * @param points - array of growing points {x,y}.
 * @param options - options.
 */
function xyObjectSlotX(points, options = {}) {
  const {
    slotWidth = 1
  } = options;
  const halfSlot = slotWidth / 2;
  // when we join we will use the center of mass
  const result = [];
  let current = {
    x: Number.NEGATIVE_INFINITY,
    y: 0
  };
  for (const point of points) {
    const slot = point.x - (point.x + halfSlot) % slotWidth + halfSlot;
    if (Math.abs(current.x - slot) > Number.EPSILON) {
      current = {
        x: slot,
        y: 0
      };
      result.push(current);
    }
    current.y += point.y;
  }
  return result;
}

/**
 * Sorts an array of points in-place.
 * @param points - array of points {x,y}.
 * @returns sorted array of points {x,y}.
 */
function xyObjectSortX(points) {
  points.sort((a, b) => a.x - b.x);
  return points;
}

/**
 * Calculate the sum of Y values.
 * @param points - object that contains property x and y (an array).
 */
function xyObjectSumY(points = []) {
  xyObjectCheck(points);
  let sum = 0;
  for (const point of points) {
    sum += point.y;
  }
  return sum;
}

/**
 * Converts an array of {x,y} point objects to a DataXY object.
 * @param points - array of {x,y} point objects.
 */
function xyObjectToXY(points) {
  return {
    x: points.map(entry => entry.x),
    y: points.map(entry => entry.y)
  };
}

var lib$6 = /*#__PURE__*/Object.freeze({
	__proto__: null,
	calculateAdaptiveWeights: calculateAdaptiveWeights,
	clearFFTCache: clearFFTCache,
	createDoubleArray: createDoubleArray,
	createFromToArray: createFromToArray,
	createNumberArray: createNumberArray,
	createRandomArray: createRandomArray,
	createStepArray: createStepArray,
	getCombinations: getCombinations,
	getCombinationsIterator: getCombinationsIterator,
	getOutputArray: getOutputArray,
	getRescaler: getRescaler,
	isPowerOfTwo: isPowerOfTwo,
	matrixAbsoluteMedian: matrixAbsoluteMedian,
	matrixApplyNumericalEncoding: matrixApplyNumericalEncoding,
	matrixAutoCorrelation: matrixAutoCorrelation,
	matrixBoxPlot: matrixBoxPlot,
	matrixCenterZMean: matrixCenterZMean,
	matrixCheck: matrixCheck,
	matrixCholeskySolver: matrixCholeskySolver,
	matrixClone: matrixClone,
	matrixColumnsCorrelation: matrixColumnsCorrelation,
	matrixCreateEmpty: matrixCreateEmpty,
	matrixCuthillMckee: matrixCuthillMckee,
	matrixGetSubMatrix: matrixGetSubMatrix,
	matrixHilbertTransform: matrixHilbertTransform,
	matrixHistogram: matrixHistogram,
	matrixMaxAbsoluteZ: matrixMaxAbsoluteZ,
	matrixMedian: matrixMedian,
	matrixMinMaxAbsoluteZ: matrixMinMaxAbsoluteZ,
	matrixMinMaxZ: matrixMinMaxZ,
	matrixNoiseStandardDeviation: matrixNoiseStandardDeviation,
	matrixNumericalDecoding: matrixNumericalDecoding,
	matrixNumericalEncoding: matrixNumericalEncoding,
	matrixPQN: matrixPQN,
	matrixSetSubMatrix: matrixSetSubMatrix,
	matrixToArray: matrixToArray,
	matrixTranspose: matrixTranspose,
	matrixZPivotRescale: matrixZPivotRescale,
	matrixZRescale: matrixZRescale,
	matrixZRescalePerColumn: matrixZRescalePerColumn,
	nextPowerOfTwo: nextPowerOfTwo,
	recursiveRemoveEmptyAndNull: recursiveRemoveEmptyAndNull,
	recursiveResolve: recursiveResolve,
	recursiveUntypeArrays: recursiveUntypeArrays,
	reimAbsolute: reimAbsolute,
	reimArrayFFT: reimArrayFFT,
	reimAutoPhaseCorrection: reimAutoPhaseCorrection,
	reimFFT: reimFFT,
	reimMatrixFFT: reimMatrixFFT,
	reimMatrixFFTByColumns: reimMatrixFFTByColumns,
	reimMatrixPhaseCorrection: reimMatrixPhaseCorrection,
	reimPhaseCorrection: reimPhaseCorrection,
	reimZeroFilling: reimZeroFilling,
	setFFTCacheMaxSize: setFFTCacheMaxSize,
	stringify: stringify,
	xAbsolute: xAbsolute,
	xAbsoluteMedian: xAbsoluteMedian,
	xAbsoluteSum: xAbsoluteSum,
	xAdd: xAdd,
	xApplyFunctionStr: xApplyFunctionStr,
	xAutoCorrelation: xAutoCorrelation,
	xBinning: xBinning,
	xBoxPlot: xBoxPlot,
	xBoxPlotWithOutliers: xBoxPlotWithOutliers,
	xCheck: xCheck,
	xCheckLengths: xCheckLengths,
	xCorrelation: xCorrelation,
	xCostMatrix: xCostMatrix,
	xCrossCorrelation: xCrossCorrelation,
	xCumulative: xCumulative,
	xDistributionStats: xDistributionStats,
	xDivide: xDivide,
	xDotProduct: xDotProduct,
	xEnsureFloat64: xEnsureFloat64,
	xEqualIntegrationVectorSimilarity: xEqualIntegrationVectorSimilarity,
	xFindClosestIndex: xFindClosestIndex,
	xGetFromToIndex: xGetFromToIndex,
	xGetTargetIndex: xGetTargetIndex,
	xHilbertTransform: xHilbertTransform,
	xHistogram: xHistogram,
	xIsArray: xIsArray,
	xIsEquallySpaced: xIsEquallySpaced,
	xIsMonotonic: xIsMonotonic,
	xMassCenterVectorSimilarity: xMassCenterVectorSimilarity,
	xMaxAbsoluteValue: xMaxAbsoluteValue,
	xMaxIndex: xMaxIndex,
	xMaxValue: xMaxValue,
	xMean: xMean,
	xMeanAbsoluteError: xMeanAbsoluteError,
	xMeanSquaredError: xMeanSquaredError,
	xMeanWeighted: xMeanWeighted,
	xMedian: xMedian,
	xMedianAbsoluteDeviation: xMedianAbsoluteDeviation,
	xMinIndex: xMinIndex,
	xMinMaxDelta: xMinMaxDelta,
	xMinMaxValues: xMinMaxValues,
	xMinValue: xMinValue,
	xMode: xMode,
	xMultiply: xMultiply,
	xNoiseSanPlot: xNoiseSanPlot,
	xNoiseStandardDeviation: xNoiseStandardDeviation,
	xNorm: xNorm,
	xNormed: xNormed,
	xPadding: xPadding,
	xParetoNormalization: xParetoNormalization,
	xRemoveOutliersIQR: xRemoveOutliersIQR,
	xRescale: xRescale,
	xRobustDistributionStats: xRobustDistributionStats,
	xRolling: xRolling,
	xRollingAverage: xRollingAverage,
	xRollingMax: xRollingMax,
	xRollingMedian: xRollingMedian,
	xRollingMin: xRollingMin,
	xRotate: xRotate,
	xSampling: xSampling,
	xSequentialFillFromStep: xSequentialFillFromStep,
	xSequentialFillFromTo: xSequentialFillFromTo,
	xSortAscending: xSortAscending,
	xSortDescending: xSortDescending,
	xStandardDeviation: xStandardDeviation,
	xSubtract: xSubtract,
	xSum: xSum,
	xUniqueSorted: xUniqueSorted,
	xVariance: xVariance,
	xWhitakerSmoother: xWhitakerSmoother,
	xWhittakerSmoother: xWhittakerSmoother,
	xreimSortX: xreimSortX,
	xreimZeroFilling: xreimZeroFilling,
	xy2ToXY: xy2ToXY,
	xyAlign: xyAlign,
	xyArrayAlign: xyArrayAlign,
	xyArrayAlignToFirst: xyArrayAlignToFirst,
	xyArrayMerge: xyArrayMerge,
	xyArrayWeightedMerge: xyArrayWeightedMerge,
	xyCheck: xyCheck,
	xyCovariance: xyCovariance,
	xyCumulativeDistributionStatistics: xyCumulativeDistributionStatistics,
	xyEnsureFloat64: xyEnsureFloat64,
	xyEnsureGrowingX: xyEnsureGrowingX,
	xyEqualIntegrationVector: xyEqualIntegrationVector,
	xyEquallySpaced: xyEquallySpaced,
	xyExtract: xyExtract,
	xyFilter: xyFilter,
	xyFilterMinYValue: xyFilterMinYValue,
	xyFilterTopYValues: xyFilterTopYValues,
	xyFilterX: xyFilterX,
	xyFilterXPositive: xyFilterXPositive,
	xyFindClosestPoint: xyFindClosestPoint,
	xyFromInterleaved: xyFromInterleaved,
	xyGetNMaxY: xyGetNMaxY,
	xyGrowingX: xyGrowingX,
	xyIntegral: xyIntegral,
	xyIntegration: xyIntegration,
	xyInterpolateLinear: xyInterpolateLinear,
	xyJoinX: xyJoinX,
	xyMassCenter: xyMassCenter,
	xyMassCenterVector: xyMassCenterVector,
	xyMaxClosestYPoint: xyMaxClosestYPoint,
	xyMaxMerge: xyMaxMerge,
	xyMaxY: xyMaxY,
	xyMaxYPoint: xyMaxYPoint,
	xyMaximaY: xyMaximaY,
	xyMedian: xyMedian,
	xyMedianY: xyMedianY,
	xyMedianYAtXs: xyMedianYAtXs,
	xyMergeByCentroids: xyMergeByCentroids,
	xyMinClosestYPoint: xyMinClosestYPoint,
	xyMinYPoint: xyMinYPoint,
	xyMinimaY: xyMinimaY,
	xyObjectBestPoints: xyObjectBestPoints,
	xyObjectCheck: xyObjectCheck,
	xyObjectJoinX: xyObjectJoinX,
	xyObjectMaxXPoint: xyObjectMaxXPoint,
	xyObjectMaxYPoint: xyObjectMaxYPoint,
	xyObjectMinMaxValues: xyObjectMinMaxValues,
	xyObjectMinXPoint: xyObjectMinXPoint,
	xyObjectMinYPoint: xyObjectMinYPoint,
	xyObjectNormedY: xyObjectNormedY,
	xyObjectSlotX: xyObjectSlotX,
	xyObjectSortX: xyObjectSortX,
	xyObjectSumY: xyObjectSumY,
	xyObjectToXY: xyObjectToXY,
	xyPeakInfo: xyPeakInfo,
	xyRealMaxYPoint: xyRealMaxYPoint,
	xyRealMinYPoint: xyRealMinYPoint,
	xyReduce: xyReduce,
	xyReduceNonContinuous: xyReduceNonContinuous,
	xyRolling: xyRolling,
	xyRollingCircleTransform: xyRollingCircleTransform,
	xySetYValue: xySetYValue,
	xySortX: xySortX,
	xyToInterleaved: xyToInterleaved,
	xyToXYArray: xyToXYArray,
	xyToXYObject: xyToXYObject,
	xyUniqueX: xyUniqueX,
	xyWeightedMerge: xyWeightedMerge,
	zonesNormalize: zonesNormalize,
	zonesToXEquallySpaced: zonesToXEquallySpaced,
	zonesWithPoints: zonesWithPoints
});

var require$$0$7 = /*@__PURE__*/getAugmentedNamespace(lib$6);

/**
 * Ensure that the data is string. If it is an ArrayBuffer it will be converted to string using TextDecoder.
 * @param blob
 * @param options
 * @returns
 */
function ensureString(blob, options = {}) {
  if (typeof blob === 'string') {
    return blob;
  }
  if (ArrayBuffer.isView(blob) || blob instanceof ArrayBuffer) {
    if (options.encoding) {
      return new TextDecoder(options.encoding).decode(blob);
    } else {
      return decodeText(blob);
    }
  }
  throw new TypeError(`blob must be a string, ArrayBuffer or ArrayBufferView`);
}
function decodeText(blob) {
  const uint8 = ArrayBuffer.isView(blob) ? new Uint8Array(blob.buffer, blob.byteOffset, blob.byteLength) : new Uint8Array(blob);
  if (uint8.length >= 2) {
    if (uint8[0] === 0xfe && uint8[1] === 0xff) {
      return new TextDecoder('utf-16be').decode(uint8);
    }
    if (uint8[0] === 0xff && uint8[1] === 0xfe) {
      return new TextDecoder('utf-16le').decode(uint8);
    }
  }
  try {
    return new TextDecoder('utf-8', {
      fatal: true
    }).decode(uint8);
  } catch {
    return new TextDecoder('latin1').decode(uint8);
  }
}

/**
 * General internal parsing function
 * @param text - Csv or tsv strings.
 * @param options - Parsing options
 * @returns parsed text file with column information
 */
function parse$4(text, options = {}) {
  const {
    rescale = false,
    uniqueX = false,
    bestGuess = false,
    //@ts-expect-error old library used this property and we want to throw an error so that people are forced to migrate
    keepInfo
  } = options;
  let {
    xColumn = 0,
    yColumn = 1,
    numberColumns = Number.MAX_SAFE_INTEGER,
    maxNumberColumns = Number.MAX_SAFE_INTEGER,
    minNumberColumns = 2
  } = options;
  if (keepInfo !== undefined) {
    throw new Error('keepInfo has been deprecated, please use the new method parseXYAndKeepInfo');
  }
  text = ensureString(text);
  maxNumberColumns = Math.max(maxNumberColumns, xColumn + 1, yColumn + 1);
  minNumberColumns = Math.max(xColumn + 1, yColumn + 1, minNumberColumns);
  const lines = text.split(/[\n\r]+/);
  let matrix = [];
  const info = [];
  let position = 0;
  for (let line of lines) {
    line = line.trim();
    // we will consider only lines that contains only numbers
    if (/\d+/.test(line) && /^[\d\t +,.;Ee-]+$/.test(line)) {
      let fields = line.split(/,[\t ;]+|[\t ;]+/);
      if (fields.length === 1) {
        fields = line.split(/[\t ,;]+/);
      }
      if (fields && fields.length >= minNumberColumns &&
      // we filter lines that have not enough or too many columns
      fields.length <= maxNumberColumns) {
        matrix.push(fields.map(value => Number.parseFloat(value.replace(',', '.'))));
        position++;
      }
    } else if (line) {
      info.push({
        position,
        value: line
      });
    }
  }
  if (bestGuess) {
    if (matrix[0]?.length === 3 && options.xColumn === undefined && options.yColumn === undefined) {
      // is the first column a sequential number?
      let skipFirstColumn = true;
      for (let i = 0; i < matrix.length - 1; i++) {
        const currentFirst = matrix[i][0];
        const nextFirst = matrix[i + 1][0];
        if (Math.abs(currentFirst - nextFirst) !== 1) {
          skipFirstColumn = false;
        }
      }
      if (skipFirstColumn) {
        xColumn = 1;
        yColumn = 2;
      }
    }
    if (matrix[0] && matrix[0].length > 3) {
      const xs = [];
      for (const row of matrix) {
        for (let i = xColumn; i < row.length; i += 2) {
          xs.push(row[i]);
        }
      }
      if (xIsMonotonic(xs)) {
        numberColumns = 2;
      }
    }
  }
  if (numberColumns) {
    const newMatrix = [];
    for (const row of matrix) {
      for (let i = 0; i < row.length; i += numberColumns) {
        newMatrix.push(row.slice(i, i + numberColumns));
      }
    }
    matrix = newMatrix;
  }
  let result = {
    x: matrix.map(row => row[xColumn]),
    y: matrix.map(row => row[yColumn])
  };
  if (uniqueX) {
    result = xyUniqueX(result, {
      algorithm: 'sum'
    });
  }
  if (rescale) {
    const maxY = xMaxValue(result.y);
    const yValues = result.y;
    for (let i = 0; i < yValues.length; i++) {
      yValues[i] = yValues[i] / maxY;
    }
  }
  return {
    info,
    data: result
  };
}

/**
 * Parse a text-file and convert it to an object {x:[], y:[]}
 * @param text - Csv or tsv strings.
 * @param options - Parsing options
 * @returns - The parsed data
 */
function parseXY(text, options = {}) {
  return parse$4(text, options).data;
}
/**
 * Parse a text-file and returns the parsed data and information about the columns
 * @param text - Csv or tsv strings.
 * @param options - Parsing options
 * @returns - The parsed data with information about the columns
 */
function parseXYAndKeepInfo(text, options = {}) {
  return parse$4(text, options);
}

var lib$5 = /*#__PURE__*/Object.freeze({
	__proto__: null,
	parseXY: parseXY,
	parseXYAndKeepInfo: parseXYAndKeepInfo
});

var require$$2$1 = /*@__PURE__*/getAugmentedNamespace(lib$5);

var getBestPeaks$2 = {};

Object.defineProperty(getBestPeaks$2, "__esModule", {
  value: true
});
getBestPeaks$2.getBestPeaks = getBestPeaks$1;
const ml_spectra_processing_1$h = require$$0$7;
/**
 * Filter the array by taking the higher peaks and only
 * keep one per slot.
 * There are 2 different slots, the smallest one will have the
 * extra annotation `close` to true
 * @param {array} peaks - array of all the peaks
 * @param {object} [options={}]
 * @param {number} [options.from] - min X value of the window to consider
 * @param {number} [options.to] - max X value of the window to consider
 * @param {number} [options.minValue=Number.NEGATIVE_INFINITY] - min Y value of the window to consider
 * @param {number} [options.maxValue=Number.POSITIVE_INFINITY] - max Y value of the window to consider
 * @param {number} [options.searchMonoisotopicRatio=0] - search previous peaks with at least ratio height
 * @param {number} [options.limit=20] - max number of peaks
 * @param {number} [options.threshold=0.01] - minimal intensity compare to base peak
 * @param {number} [options.numberSlots=10] - define the number of slots and indirectly the slot width
 * @param {number} [options.numberCloseSlots=50]
 * @returns {array} - copy of peaks with 'close' annotation
 */
function getBestPeaks$1(peaks, options = {}) {
  const {
    searchMonoisotopicRatio = 0,
    from = (0, ml_spectra_processing_1$h.xyObjectMinXPoint)(peaks).x,
    to = (0, ml_spectra_processing_1$h.xyObjectMaxXPoint)(peaks).x,
    limit = 20,
    threshold = 0.01,
    numberCloseSlots = 50,
    numberSlots = 10,
    minValue = Number.NEGATIVE_INFINITY,
    maxValue = Number.POSITIVE_INFINITY
  } = options;
  let slot = (to - from) / numberSlots;
  let closeSlot = (to - from) / numberCloseSlots;
  let selected = peaks.filter(peak => peak.x >= from && peak.x <= to).filter(peak => peak.y >= minValue && peak.y <= maxValue).map(peak => {
    return {
      peak,
      monoisotopic: false
    };
  });
  if (searchMonoisotopicRatio) {
    selected = selected.toSorted((a, b) => b.peak.x - a.peak.x);
    for (let i = 0; i < selected.length; i++) {
      let item = selected[i];
      for (let j = i + 1; j < selected.length; j++) {
        let nextItem = selected[j];
        if (item.peak.x - nextItem.peak.x < 0.09) continue;
        if (item.peak.x - nextItem.peak.x > 1.1) break;
        if (nextItem.peak.y > item.peak.y * searchMonoisotopicRatio) {
          item.monoisotopic = false;
          nextItem.monoisotopic = true;
          break;
        }
      }
    }
  }
  selected = selected.toSorted((a, b) => {
    if (a.monoisotopic && !b.monoisotopic) return -1;
    if (b.monoisotopic && !a.monoisotopic) return 1;
    return b.peak.y - a.peak.y;
  });
  let toReturn = [];
  if (selected.length === 0) return [];
  let minY = selected[0].peak.y * threshold;
  peakLoop: for (let item of selected) {
    if (item.peak.y < minY) {
      if (item.monoisotopic) {
        continue;
      } else {
        break;
      }
    }
    let close = false;
    for (let existing of toReturn) {
      if (Math.abs(existing.x - item.peak.x) < closeSlot) {
        continue peakLoop;
      }
      if (Math.abs(existing.x - item.peak.x) < slot) {
        close = true;
      }
    }
    let newPeak = structuredClone(item.peak);
    newPeak.close = close;
    toReturn.push(newPeak);
    if (toReturn.length === limit) break;
  }
  return toReturn.toSorted((a, b) => a.x - b.x);
}

var getChargeClusters$1 = {};

Object.defineProperty(getChargeClusters$1, "__esModule", {
  value: true
});
getChargeClusters$1.getChargeClusters = getChargeClusters;
getChargeClusters$1.getPeaksWithClusterCharge = getPeaksWithClusterCharge;
const ml_spectra_processing_1$g = require$$0$7;
const NEUTRON_MASS = 1;
/**
 * Group the peaks into isotopologue clusters and give a charge to each cluster.
 *
 * The charge of a single peak can not be evaluated: an isotopologue in the
 * middle of an envelope looks the same whatever the charge, and the last one of
 * an envelope has nothing after it. What carries the charge is the series: a
 * run of peaks separated by NEUTRON_MASS / charge. So the series are searched
 * first, and the charge of a series is given to all the peaks it holds.
 *
 * A series of charge 1 is always a subseries of a series of charge 2, which is
 * one of a series of charge 4: the clusters are therefore assigned from the one
 * explaining the most intensity to the one explaining the least, and a peak
 * only takes the charge of the first cluster that claims it.
 * @param {Array<{x: number, y: number}>} peaks - sorted by mass
 * @param {object} [options={}]
 * @param {number} [options.minCharge=1]
 * @param {number} [options.maxCharge=10]
 * @param {number} [options.precision=20] - tolerance on the position of an
 * isotopologue, in ppm. It is never allowed to reach half of the distance
 * between two isotopologues, otherwise a series could jump from one to another.
 * @param {number} [options.minLength=3] - two peaks that happen to be at the
 * right distance are common, three in a row much less
 * @returns {Array<{charge: number, peaks: Array}>} the clusters, from the one
 * holding the most intensity to the one holding the least
 */
function getChargeClusters(peaks, options = {}) {
  const clusters = buildClusters(peaks, options);
  const result = [];
  for (const cluster of clusters) {
    const clusterPeaks = [];
    for (let i = 0; i < cluster.indexes.length; i++) {
      clusterPeaks.push(peaks[cluster.indexes[i]]);
    }
    result.push({
      charge: cluster.charge,
      peaks: clusterPeaks
    });
  }
  return result;
}
/**
 * The clusters as the two functions above need them: the position of the peaks
 * rather than the peaks, and the intensity they hold to be able to sort them.
 * @param {Array<{x: number, y: number}>} peaks
 * @param {object} [options={}]
 * @returns {Array<{charge: number, indexes: number[], intensity: number}>}
 */
function buildClusters(peaks, options = {}) {
  const {
    minCharge = 1,
    maxCharge = 10,
    precision = 20,
    minLength = 3
  } = options;
  const nbPeaks = peaks.length;
  if (nbPeaks < minLength) return [];
  const masses = new Float64Array(nbPeaks);
  for (let i = 0; i < nbPeaks; i++) masses[i] = peaks[i].x;
  // the charge is evaluated on its magnitude: a negative range describes the
  // same isotopologue distances as the positive one
  const first = Math.abs(Math.round(minCharge));
  const last = Math.abs(Math.round(maxCharge));
  const from = Math.max(1, Math.min(first, last));
  const to = Math.max(1, Math.max(first, last));
  // a series is grown from the most intense peak first: an envelope must claim
  // its own isotopologues before a weak neighbour builds a series out of them
  const byIntensity = [];
  for (let i = 0; i < nbPeaks; i++) byIntensity.push(i);
  const sorted = byIntensity.toSorted((a, b) => peaks[b].y - peaks[a].y);
  const clusters = [];
  const claimed = new Uint8Array(nbPeaks);
  for (let charge = from; charge <= to; charge++) {
    const spacing = NEUTRON_MASS / charge;
    claimed.fill(0);
    for (const start of sorted) {
      if (claimed[start]) continue;
      // the most intense peak of an envelope is rarely its first isotopologue,
      // so the series grows on both sides of it
      const before = [];
      let expected = masses[start] - spacing;
      let previousIndex = start;
      let next = (0, ml_spectra_processing_1$g.xFindClosestIndex)(masses, expected);
      while (next < previousIndex) {
        // that peak already belongs to another series of the same charge
        if (claimed[next]) break;
        if (!isOnPosition(masses, next, expected, spacing, charge, precision)) {
          break;
        }
        before.push(next);
        claimed[next] = 1;
        previousIndex = next;
        expected = masses[next] - spacing;
        next = (0, ml_spectra_processing_1$g.xFindClosestIndex)(masses, expected);
      }
      before.reverse();
      const series = before;
      series.push(start);
      claimed[start] = 1;
      expected = masses[start] + spacing;
      previousIndex = start;
      next = (0, ml_spectra_processing_1$g.xFindClosestIndex)(masses, expected);
      while (next > previousIndex) {
        if (claimed[next]) break;
        if (!isOnPosition(masses, next, expected, spacing, charge, precision)) {
          break;
        }
        series.push(next);
        claimed[next] = 1;
        previousIndex = next;
        expected = masses[next] + spacing;
        next = (0, ml_spectra_processing_1$g.xFindClosestIndex)(masses, expected);
      }
      if (series.length >= minLength) {
        let intensity = 0;
        for (let i = 0; i < series.length; i++) intensity += peaks[series[i]].y;
        clusters.push({
          charge,
          indexes: series,
          intensity
        });
      }
    }
  }
  clusters.sort((a, b) => b.intensity - a.intensity);
  return clusters;
}
/**
 * Give to each peak the charge of the cluster that explains it.
 * @param {Array<{x: number, y: number}>} peaks - sorted by mass
 * @param {object} [options={}] - same as `getChargeClusters`
 * @returns {Array} copy of the peaks, with a `charge` when one was found
 */
function getPeaksWithClusterCharge(peaks, options = {}) {
  const clusters = buildClusters(peaks, options);
  const charges = new Int8Array(peaks.length);
  for (const cluster of clusters) {
    const {
      indexes,
      charge
    } = cluster;
    // a cluster whose peaks are already explained by a more intense one brings
    // nothing: it is the same series read with a lower charge
    let free = 0;
    for (let i = 0; i < indexes.length; i++) {
      if (charges[indexes[i]] === 0) free++;
    }
    if (free < indexes.length) continue;
    for (let i = 0; i < indexes.length; i++) {
      charges[indexes[i]] = charge;
    }
  }
  const result = [];
  for (let i = 0; i < peaks.length; i++) {
    result.push(charges[i] === 0 ? {
      ...peaks[i]
    } : {
      ...peaks[i],
      charge: charges[i]
    });
  }
  return result;
}
/**
 * Is the peak at `index` where the next isotopologue is expected?
 *
 * The isotopologues of the charges `z` and `z + 1` are only `spacing / (z + 1)`
 * apart, and that distance shrinks fast: 0.5 Da between the charges 1 and 2,
 * but 0.024 Da between 6 and 7. A tolerance that reaches it would let the same
 * peaks be read with either charge, so it is capped well under.
 * @param {Float64Array} masses
 * @param {number} index
 * @param {number} expected
 * @param {number} spacing
 * @param {number} charge
 * @param {number} precision - in ppm
 * @returns {boolean}
 */
function isOnPosition(masses, index, expected, spacing, charge, precision) {
  const tolerance = Math.min(precision * 1e-6 * masses[index], 0.4 * spacing / (charge + 1));
  return Math.abs(masses[index] - expected) <= tolerance;
}

var getChargeLadders$1 = {};

var src$j = {};

var constants = {};

Object.defineProperty(constants, "__esModule", {
  value: true
});
constants.ELECTRON_MASS = void 0;
constants.ELECTRON_MASS = 5.4857990907e-4;

var elements$2 = {};

var elementsAndIsotopes = {};

Object.defineProperty(elementsAndIsotopes, "__esModule", {
  value: true
});
elementsAndIsotopes.elementsAndIsotopes = void 0;
elementsAndIsotopes.elementsAndIsotopes = [{
  number: 1,
  isotopes: [{
    nominal: 1,
    mass: 1.00782503223,
    abundance: 0.999885
  }, {
    nominal: 2,
    mass: 2.01410177812,
    abundance: 0.000115
  }, {
    nominal: 3,
    mass: 3.0160492779
  }, {
    nominal: 4,
    mass: 4.02643
  }, {
    nominal: 5,
    mass: 5.035311
  }, {
    nominal: 6,
    mass: 6.04496
  }, {
    nominal: 7,
    mass: 7.0527
  }],
  symbol: 'H',
  mass: 1.0079407540557772,
  name: 'Hydrogen',
  monoisotopicMass: 1.00782503223
}, {
  number: 2,
  isotopes: [{
    nominal: 3,
    mass: 3.0160293201,
    abundance: 0.00000134
  }, {
    nominal: 4,
    mass: 4.00260325413,
    abundance: 0.99999866
  }, {
    nominal: 5,
    mass: 5.012057
  }, {
    nominal: 6,
    mass: 6.018885891
  }, {
    nominal: 7,
    mass: 7.0279907
  }, {
    nominal: 8,
    mass: 8.03393439
  }, {
    nominal: 9,
    mass: 9.043946
  }, {
    nominal: 10,
    mass: 10.05279
  }],
  symbol: 'He',
  mass: 4.002601932120929,
  name: 'Helium',
  monoisotopicMass: 4.00260325413
}, {
  number: 3,
  isotopes: [{
    nominal: 3,
    mass: 3.0308
  }, {
    nominal: 4,
    mass: 4.02719
  }, {
    nominal: 5,
    mass: 5.012538
  }, {
    nominal: 6,
    mass: 6.0151228874,
    abundance: 0.0759
  }, {
    nominal: 7,
    mass: 7.0160034366,
    abundance: 0.9241
  }, {
    nominal: 8,
    mass: 8.022486246
  }, {
    nominal: 9,
    mass: 9.02679019
  }, {
    nominal: 10,
    mass: 10.035483
  }, {
    nominal: 11,
    mass: 11.04372358
  }, {
    nominal: 12,
    mass: 12.052517
  }, {
    nominal: 13,
    mass: 13.06263
  }],
  symbol: 'Li',
  mass: 6.94003660291572,
  name: 'Lithium',
  monoisotopicMass: 7.0160034366
}, {
  number: 4,
  isotopes: [{
    nominal: 5,
    mass: 5.0399
  }, {
    nominal: 6,
    mass: 6.0197264
  }, {
    nominal: 7,
    mass: 7.016928717
  }, {
    nominal: 8,
    mass: 8.005305102
  }, {
    nominal: 9,
    mass: 9.012183065,
    abundance: 1
  }, {
    nominal: 10,
    mass: 10.013534695
  }, {
    nominal: 11,
    mass: 11.02166108
  }, {
    nominal: 12,
    mass: 12.0269221
  }, {
    nominal: 13,
    mass: 13.036135
  }, {
    nominal: 14,
    mass: 14.04289
  }, {
    nominal: 15,
    mass: 15.05342
  }, {
    nominal: 16,
    mass: 16.06167
  }],
  symbol: 'Be',
  mass: 9.012183065,
  name: 'Beryllium',
  monoisotopicMass: 9.012183065
}, {
  number: 5,
  isotopes: [{
    nominal: 6,
    mass: 6.0508
  }, {
    nominal: 7,
    mass: 7.029712
  }, {
    nominal: 8,
    mass: 8.0246073
  }, {
    nominal: 9,
    mass: 9.01332965
  }, {
    nominal: 10,
    mass: 10.01293695,
    abundance: 0.199
  }, {
    nominal: 11,
    mass: 11.00930536,
    abundance: 0.801
  }, {
    nominal: 12,
    mass: 12.0143527
  }, {
    nominal: 13,
    mass: 13.0177802
  }, {
    nominal: 14,
    mass: 14.025404
  }, {
    nominal: 15,
    mass: 15.031088
  }, {
    nominal: 16,
    mass: 16.039842
  }, {
    nominal: 17,
    mass: 17.04699
  }, {
    nominal: 18,
    mass: 18.05566
  }, {
    nominal: 19,
    mass: 19.0631
  }, {
    nominal: 20,
    mass: 20.07207
  }, {
    nominal: 21,
    mass: 21.08129
  }],
  symbol: 'B',
  mass: 10.811028046410001,
  name: 'Boron',
  monoisotopicMass: 11.00930536
}, {
  number: 6,
  isotopes: [{
    nominal: 8,
    mass: 8.037643
  }, {
    nominal: 9,
    mass: 9.0310372
  }, {
    nominal: 10,
    mass: 10.01685331
  }, {
    nominal: 11,
    mass: 11.0114336
  }, {
    nominal: 12,
    mass: 12,
    abundance: 0.9893
  }, {
    nominal: 13,
    mass: 13.00335483507,
    abundance: 0.0107
  }, {
    nominal: 14,
    mass: 14.0032419884
  }, {
    nominal: 15,
    mass: 15.01059926
  }, {
    nominal: 16,
    mass: 16.0147013
  }, {
    nominal: 17,
    mass: 17.022577
  }, {
    nominal: 18,
    mass: 18.026751
  }, {
    nominal: 19,
    mass: 19.0348
  }, {
    nominal: 20,
    mass: 20.04032
  }, {
    nominal: 21,
    mass: 21.049
  }, {
    nominal: 22,
    mass: 22.05753
  }, {
    nominal: 23,
    mass: 23.0689
  }],
  symbol: 'C',
  mass: 12.010735896735248,
  name: 'Carbon',
  monoisotopicMass: 12
}, {
  number: 7,
  isotopes: [{
    nominal: 10,
    mass: 10.04165
  }, {
    nominal: 11,
    mass: 11.026091
  }, {
    nominal: 12,
    mass: 12.0186132
  }, {
    nominal: 13,
    mass: 13.00573861
  }, {
    nominal: 14,
    mass: 14.00307400443,
    abundance: 0.99636
  }, {
    nominal: 15,
    mass: 15.00010889888,
    abundance: 0.00364
  }, {
    nominal: 16,
    mass: 16.0061019
  }, {
    nominal: 17,
    mass: 17.008449
  }, {
    nominal: 18,
    mass: 18.014078
  }, {
    nominal: 19,
    mass: 19.017022
  }, {
    nominal: 20,
    mass: 20.023366
  }, {
    nominal: 21,
    mass: 21.02711
  }, {
    nominal: 22,
    mass: 22.03439
  }, {
    nominal: 23,
    mass: 23.04114
  }, {
    nominal: 24,
    mass: 24.05039
  }, {
    nominal: 25,
    mass: 25.0601
  }],
  symbol: 'N',
  mass: 14.006703211445798,
  name: 'Nitrogen',
  monoisotopicMass: 14.00307400443
}, {
  number: 8,
  isotopes: [{
    nominal: 12,
    mass: 12.034262
  }, {
    nominal: 13,
    mass: 13.024815
  }, {
    nominal: 14,
    mass: 14.00859636
  }, {
    nominal: 15,
    mass: 15.00306562
  }, {
    nominal: 16,
    mass: 15.99491461957,
    abundance: 0.99757
  }, {
    nominal: 17,
    mass: 16.9991317565,
    abundance: 0.00038
  }, {
    nominal: 18,
    mass: 17.99915961286,
    abundance: 0.00205
  }, {
    nominal: 19,
    mass: 19.003578
  }, {
    nominal: 20,
    mass: 20.00407535
  }, {
    nominal: 21,
    mass: 21.008655
  }, {
    nominal: 22,
    mass: 22.009966
  }, {
    nominal: 23,
    mass: 23.015696
  }, {
    nominal: 24,
    mass: 24.01986
  }, {
    nominal: 25,
    mass: 25.02936
  }, {
    nominal: 26,
    mass: 26.03729
  }, {
    nominal: 27,
    mass: 27.04772
  }, {
    nominal: 28,
    mass: 28.05591
  }],
  symbol: 'O',
  mass: 15.999404924318277,
  name: 'Oxygen',
  monoisotopicMass: 15.99491461957
}, {
  number: 9,
  isotopes: [{
    nominal: 14,
    mass: 14.034315
  }, {
    nominal: 15,
    mass: 15.018043
  }, {
    nominal: 16,
    mass: 16.0114657
  }, {
    nominal: 17,
    mass: 17.00209524
  }, {
    nominal: 18,
    mass: 18.00093733
  }, {
    nominal: 19,
    mass: 18.99840316273,
    abundance: 1
  }, {
    nominal: 20,
    mass: 19.999981252
  }, {
    nominal: 21,
    mass: 20.9999489
  }, {
    nominal: 22,
    mass: 22.002999
  }, {
    nominal: 23,
    mass: 23.003557
  }, {
    nominal: 24,
    mass: 24.008115
  }, {
    nominal: 25,
    mass: 25.012199
  }, {
    nominal: 26,
    mass: 26.020038
  }, {
    nominal: 27,
    mass: 27.02644
  }, {
    nominal: 28,
    mass: 28.03534
  }, {
    nominal: 29,
    mass: 29.04254
  }, {
    nominal: 30,
    mass: 30.05165
  }, {
    nominal: 31,
    mass: 31.05971
  }],
  symbol: 'F',
  mass: 18.99840316273,
  name: 'Fluorine',
  monoisotopicMass: 18.99840316273
}, {
  number: 10,
  isotopes: [{
    nominal: 16,
    mass: 16.02575
  }, {
    nominal: 17,
    mass: 17.01771396
  }, {
    nominal: 18,
    mass: 18.0057087
  }, {
    nominal: 19,
    mass: 19.00188091
  }, {
    nominal: 20,
    mass: 19.9924401762,
    abundance: 0.9048
  }, {
    nominal: 21,
    mass: 20.993846685,
    abundance: 0.0027
  }, {
    nominal: 22,
    mass: 21.991385114,
    abundance: 0.0925
  }, {
    nominal: 23,
    mass: 22.99446691
  }, {
    nominal: 24,
    mass: 23.99361065
  }, {
    nominal: 25,
    mass: 24.997789
  }, {
    nominal: 26,
    mass: 26.000515
  }, {
    nominal: 27,
    mass: 27.007553
  }, {
    nominal: 28,
    mass: 28.01212
  }, {
    nominal: 29,
    mass: 29.01975
  }, {
    nominal: 30,
    mass: 30.02473
  }, {
    nominal: 31,
    mass: 31.0331
  }, {
    nominal: 32,
    mass: 32.03972
  }, {
    nominal: 33,
    mass: 33.04938
  }, {
    nominal: 34,
    mass: 34.05673
  }],
  symbol: 'Ne',
  mass: 20.18004638052026,
  name: 'Neon',
  monoisotopicMass: 19.9924401762
}, {
  number: 11,
  isotopes: [{
    nominal: 18,
    mass: 18.02688
  }, {
    nominal: 19,
    mass: 19.01388
  }, {
    nominal: 20,
    mass: 20.0073544
  }, {
    nominal: 21,
    mass: 20.99765469
  }, {
    nominal: 22,
    mass: 21.99443741
  }, {
    nominal: 23,
    mass: 22.989769282,
    abundance: 1
  }, {
    nominal: 24,
    mass: 23.99096295
  }, {
    nominal: 25,
    mass: 24.989954
  }, {
    nominal: 26,
    mass: 25.9926346
  }, {
    nominal: 27,
    mass: 26.9940765
  }, {
    nominal: 28,
    mass: 27.998939
  }, {
    nominal: 29,
    mass: 29.0028771
  }, {
    nominal: 30,
    mass: 30.0090979
  }, {
    nominal: 31,
    mass: 31.013163
  }, {
    nominal: 32,
    mass: 32.02019
  }, {
    nominal: 33,
    mass: 33.02573
  }, {
    nominal: 34,
    mass: 34.03359
  }, {
    nominal: 35,
    mass: 35.04062
  }, {
    nominal: 36,
    mass: 36.04929
  }, {
    nominal: 37,
    mass: 37.05705
  }],
  symbol: 'Na',
  mass: 22.989769282,
  name: 'Sodium',
  monoisotopicMass: 22.989769282
}, {
  number: 12,
  isotopes: [{
    nominal: 19,
    mass: 19.034169
  }, {
    nominal: 20,
    mass: 20.01885
  }, {
    nominal: 21,
    mass: 21.011716
  }, {
    nominal: 22,
    mass: 21.99957065
  }, {
    nominal: 23,
    mass: 22.99412421
  }, {
    nominal: 24,
    mass: 23.985041697,
    abundance: 0.7899
  }, {
    nominal: 25,
    mass: 24.985836976,
    abundance: 0.1
  }, {
    nominal: 26,
    mass: 25.982592968,
    abundance: 0.1101
  }, {
    nominal: 27,
    mass: 26.984340624
  }, {
    nominal: 28,
    mass: 27.9838767
  }, {
    nominal: 29,
    mass: 28.988617
  }, {
    nominal: 30,
    mass: 29.9904629
  }, {
    nominal: 31,
    mass: 30.996648
  }, {
    nominal: 32,
    mass: 31.9991102
  }, {
    nominal: 33,
    mass: 33.0053271
  }, {
    nominal: 34,
    mass: 34.008935
  }, {
    nominal: 35,
    mass: 35.01679
  }, {
    nominal: 36,
    mass: 36.02188
  }, {
    nominal: 37,
    mass: 37.03037
  }, {
    nominal: 38,
    mass: 38.03658
  }, {
    nominal: 39,
    mass: 39.04538
  }, {
    nominal: 40,
    mass: 40.05218
  }],
  symbol: 'Mg',
  mass: 24.3050516198371,
  name: 'Magnesium',
  monoisotopicMass: 23.985041697
}, {
  number: 13,
  isotopes: [{
    nominal: 21,
    mass: 21.02897
  }, {
    nominal: 22,
    mass: 22.01954
  }, {
    nominal: 23,
    mass: 23.00724435
  }, {
    nominal: 24,
    mass: 23.9999489
  }, {
    nominal: 25,
    mass: 24.9904281
  }, {
    nominal: 26,
    mass: 25.986891904
  }, {
    nominal: 27,
    mass: 26.98153853,
    abundance: 1
  }, {
    nominal: 28,
    mass: 27.98191021
  }, {
    nominal: 29,
    mass: 28.9804565
  }, {
    nominal: 30,
    mass: 29.98296
  }, {
    nominal: 31,
    mass: 30.983945
  }, {
    nominal: 32,
    mass: 31.988085
  }, {
    nominal: 33,
    mass: 32.990909
  }, {
    nominal: 34,
    mass: 33.996705
  }, {
    nominal: 35,
    mass: 34.999764
  }, {
    nominal: 36,
    mass: 36.00639
  }, {
    nominal: 37,
    mass: 37.01053
  }, {
    nominal: 38,
    mass: 38.0174
  }, {
    nominal: 39,
    mass: 39.02254
  }, {
    nominal: 40,
    mass: 40.03003
  }, {
    nominal: 41,
    mass: 41.03638
  }, {
    nominal: 42,
    mass: 42.04384
  }, {
    nominal: 43,
    mass: 43.05147
  }],
  symbol: 'Al',
  mass: 26.98153853,
  name: 'Aluminium',
  monoisotopicMass: 26.98153853
}, {
  number: 14,
  isotopes: [{
    nominal: 22,
    mass: 22.03579
  }, {
    nominal: 23,
    mass: 23.02544
  }, {
    nominal: 24,
    mass: 24.011535
  }, {
    nominal: 25,
    mass: 25.004109
  }, {
    nominal: 26,
    mass: 25.99233384
  }, {
    nominal: 27,
    mass: 26.98670481
  }, {
    nominal: 28,
    mass: 27.97692653465,
    abundance: 0.92223
  }, {
    nominal: 29,
    mass: 28.9764946649,
    abundance: 0.04685
  }, {
    nominal: 30,
    mass: 29.973770136,
    abundance: 0.03092
  }, {
    nominal: 31,
    mass: 30.975363194
  }, {
    nominal: 32,
    mass: 31.97415154
  }, {
    nominal: 33,
    mass: 32.97797696
  }, {
    nominal: 34,
    mass: 33.978576
  }, {
    nominal: 35,
    mass: 34.984583
  }, {
    nominal: 36,
    mass: 35.986695
  }, {
    nominal: 37,
    mass: 36.992921
  }, {
    nominal: 38,
    mass: 37.995523
  }, {
    nominal: 39,
    mass: 39.002491
  }, {
    nominal: 40,
    mass: 40.00583
  }, {
    nominal: 41,
    mass: 41.01301
  }, {
    nominal: 42,
    mass: 42.01778
  }, {
    nominal: 43,
    mass: 43.0248
  }, {
    nominal: 44,
    mass: 44.03061
  }, {
    nominal: 45,
    mass: 45.03995
  }],
  symbol: 'Si',
  mass: 28.085498705705955,
  name: 'Silicon',
  monoisotopicMass: 27.97692653465
}, {
  number: 15,
  isotopes: [{
    nominal: 24,
    mass: 24.03577
  }, {
    nominal: 25,
    mass: 25.02119
  }, {
    nominal: 26,
    mass: 26.01178
  }, {
    nominal: 27,
    mass: 26.999224
  }, {
    nominal: 28,
    mass: 27.9923266
  }, {
    nominal: 29,
    mass: 28.98180079
  }, {
    nominal: 30,
    mass: 29.97831375
  }, {
    nominal: 31,
    mass: 30.97376199842,
    abundance: 1
  }, {
    nominal: 32,
    mass: 31.973907643
  }, {
    nominal: 33,
    mass: 32.9717257
  }, {
    nominal: 34,
    mass: 33.97364589
  }, {
    nominal: 35,
    mass: 34.9733141
  }, {
    nominal: 36,
    mass: 35.97826
  }, {
    nominal: 37,
    mass: 36.979607
  }, {
    nominal: 38,
    mass: 37.984252
  }, {
    nominal: 39,
    mass: 38.986227
  }, {
    nominal: 40,
    mass: 39.99133
  }, {
    nominal: 41,
    mass: 40.994654
  }, {
    nominal: 42,
    mass: 42.00108
  }, {
    nominal: 43,
    mass: 43.00502
  }, {
    nominal: 44,
    mass: 44.01121
  }, {
    nominal: 45,
    mass: 45.01645
  }, {
    nominal: 46,
    mass: 46.02446
  }, {
    nominal: 47,
    mass: 47.03139
  }],
  symbol: 'P',
  mass: 30.97376199842,
  name: 'Phosphorus',
  monoisotopicMass: 30.97376199842
}, {
  number: 16,
  isotopes: [{
    nominal: 26,
    mass: 26.02907
  }, {
    nominal: 27,
    mass: 27.01828
  }, {
    nominal: 28,
    mass: 28.00437
  }, {
    nominal: 29,
    mass: 28.996611
  }, {
    nominal: 30,
    mass: 29.98490703
  }, {
    nominal: 31,
    mass: 30.97955701
  }, {
    nominal: 32,
    mass: 31.9720711744,
    abundance: 0.9499
  }, {
    nominal: 33,
    mass: 32.9714589098,
    abundance: 0.0075
  }, {
    nominal: 34,
    mass: 33.967867004,
    abundance: 0.0425
  }, {
    nominal: 35,
    mass: 34.96903231
  }, {
    nominal: 36,
    mass: 35.96708071,
    abundance: 0.0001
  }, {
    nominal: 37,
    mass: 36.97112551
  }, {
    nominal: 38,
    mass: 37.9711633
  }, {
    nominal: 39,
    mass: 38.975134
  }, {
    nominal: 40,
    mass: 39.9754826
  }, {
    nominal: 41,
    mass: 40.9795935
  }, {
    nominal: 42,
    mass: 41.9810651
  }, {
    nominal: 43,
    mass: 42.9869076
  }, {
    nominal: 44,
    mass: 43.9901188
  }, {
    nominal: 45,
    mass: 44.99572
  }, {
    nominal: 46,
    mass: 46.00004
  }, {
    nominal: 47,
    mass: 47.00795
  }, {
    nominal: 48,
    mass: 48.0137
  }, {
    nominal: 49,
    mass: 49.02276
  }],
  symbol: 'S',
  mass: 32.06478740612706,
  name: 'Sulfur',
  monoisotopicMass: 31.9720711744
}, {
  number: 17,
  isotopes: [{
    nominal: 28,
    mass: 28.02954
  }, {
    nominal: 29,
    mass: 29.01478
  }, {
    nominal: 30,
    mass: 30.00477
  }, {
    nominal: 31,
    mass: 30.992414
  }, {
    nominal: 32,
    mass: 31.98568464
  }, {
    nominal: 33,
    mass: 32.97745199
  }, {
    nominal: 34,
    mass: 33.973762485
  }, {
    nominal: 35,
    mass: 34.968852682,
    abundance: 0.7576
  }, {
    nominal: 36,
    mass: 35.968306809
  }, {
    nominal: 37,
    mass: 36.965902602,
    abundance: 0.2424
  }, {
    nominal: 38,
    mass: 37.96801044
  }, {
    nominal: 39,
    mass: 38.9680082
  }, {
    nominal: 40,
    mass: 39.970415
  }, {
    nominal: 41,
    mass: 40.970685
  }, {
    nominal: 42,
    mass: 41.97325
  }, {
    nominal: 43,
    mass: 42.97389
  }, {
    nominal: 44,
    mass: 43.97787
  }, {
    nominal: 45,
    mass: 44.98029
  }, {
    nominal: 46,
    mass: 45.98517
  }, {
    nominal: 47,
    mass: 46.98916
  }, {
    nominal: 48,
    mass: 47.99564
  }, {
    nominal: 49,
    mass: 49.00123
  }, {
    nominal: 50,
    mass: 50.00905
  }, {
    nominal: 51,
    mass: 51.01554
  }],
  symbol: 'Cl',
  mass: 35.452937582608,
  name: 'Chlorine',
  monoisotopicMass: 34.968852682
}, {
  number: 18,
  isotopes: [{
    nominal: 30,
    mass: 30.02307
  }, {
    nominal: 31,
    mass: 31.01212
  }, {
    nominal: 32,
    mass: 31.9976378
  }, {
    nominal: 33,
    mass: 32.98992555
  }, {
    nominal: 34,
    mass: 33.98027009
  }, {
    nominal: 35,
    mass: 34.97525759
  }, {
    nominal: 36,
    mass: 35.967545105,
    abundance: 0.003336
  }, {
    nominal: 37,
    mass: 36.96677633
  }, {
    nominal: 38,
    mass: 37.96273211,
    abundance: 0.000629
  }, {
    nominal: 39,
    mass: 38.964313
  }, {
    nominal: 40,
    mass: 39.9623831237,
    abundance: 0.996035
  }, {
    nominal: 41,
    mass: 40.96450057
  }, {
    nominal: 42,
    mass: 41.9630457
  }, {
    nominal: 43,
    mass: 42.9656361
  }, {
    nominal: 44,
    mass: 43.9649238
  }, {
    nominal: 45,
    mass: 44.96803973
  }, {
    nominal: 46,
    mass: 45.968083
  }, {
    nominal: 47,
    mass: 46.972935
  }, {
    nominal: 48,
    mass: 47.97591
  }, {
    nominal: 49,
    mass: 48.9819
  }, {
    nominal: 50,
    mass: 49.98613
  }, {
    nominal: 51,
    mass: 50.9937
  }, {
    nominal: 52,
    mass: 51.99896
  }, {
    nominal: 53,
    mass: 53.00729
  }],
  symbol: 'Ar',
  mass: 39.947798563582005,
  name: 'Argon',
  monoisotopicMass: 39.9623831237
}, {
  number: 19,
  isotopes: [{
    nominal: 32,
    mass: 32.02265
  }, {
    nominal: 33,
    mass: 33.00756
  }, {
    nominal: 34,
    mass: 33.99869
  }, {
    nominal: 35,
    mass: 34.98800541
  }, {
    nominal: 36,
    mass: 35.98130201
  }, {
    nominal: 37,
    mass: 36.97337589
  }, {
    nominal: 38,
    mass: 37.96908112
  }, {
    nominal: 39,
    mass: 38.9637064864,
    abundance: 0.932581
  }, {
    nominal: 40,
    mass: 39.963998166,
    abundance: 0.000117
  }, {
    nominal: 41,
    mass: 40.9618252579,
    abundance: 0.067302
  }, {
    nominal: 42,
    mass: 41.96240231
  }, {
    nominal: 43,
    mass: 42.9607347
  }, {
    nominal: 44,
    mass: 43.96158699
  }, {
    nominal: 45,
    mass: 44.96069149
  }, {
    nominal: 46,
    mass: 45.96198159
  }, {
    nominal: 47,
    mass: 46.9616616
  }, {
    nominal: 48,
    mass: 47.96534119
  }, {
    nominal: 49,
    mass: 48.96821075
  }, {
    nominal: 50,
    mass: 49.97238
  }, {
    nominal: 51,
    mass: 50.975828
  }, {
    nominal: 52,
    mass: 51.98224
  }, {
    nominal: 53,
    mass: 52.98746
  }, {
    nominal: 54,
    mass: 53.99463
  }, {
    nominal: 55,
    mass: 55.00076
  }, {
    nominal: 56,
    mass: 56.00851
  }],
  symbol: 'K',
  mass: 39.098300910086,
  name: 'Potassium',
  monoisotopicMass: 38.9637064864
}, {
  number: 20,
  isotopes: [{
    nominal: 34,
    mass: 34.01487
  }, {
    nominal: 35,
    mass: 35.00514
  }, {
    nominal: 36,
    mass: 35.993074
  }, {
    nominal: 37,
    mass: 36.98589785
  }, {
    nominal: 38,
    mass: 37.97631922
  }, {
    nominal: 39,
    mass: 38.97071081
  }, {
    nominal: 40,
    mass: 39.962590863,
    abundance: 0.96941
  }, {
    nominal: 41,
    mass: 40.96227792
  }, {
    nominal: 42,
    mass: 41.95861783,
    abundance: 0.00647
  }, {
    nominal: 43,
    mass: 42.95876644,
    abundance: 0.00135
  }, {
    nominal: 44,
    mass: 43.95548156,
    abundance: 0.02086
  }, {
    nominal: 45,
    mass: 44.95618635
  }, {
    nominal: 46,
    mass: 45.953689,
    abundance: 0.00004
  }, {
    nominal: 47,
    mass: 46.9545424
  }, {
    nominal: 48,
    mass: 47.95252276,
    abundance: 0.00187
  }, {
    nominal: 49,
    mass: 48.95566274
  }, {
    nominal: 50,
    mass: 49.9574992
  }, {
    nominal: 51,
    mass: 50.960989
  }, {
    nominal: 52,
    mass: 51.963217
  }, {
    nominal: 53,
    mass: 52.96945
  }, {
    nominal: 54,
    mass: 53.9734
  }, {
    nominal: 55,
    mass: 54.9803
  }, {
    nominal: 56,
    mass: 55.98508
  }, {
    nominal: 57,
    mass: 56.99262
  }, {
    nominal: 58,
    mass: 57.99794
  }],
  symbol: 'Ca',
  mass: 40.078022511017735,
  name: 'Calcium',
  monoisotopicMass: 39.962590863
}, {
  number: 21,
  isotopes: [{
    nominal: 36,
    mass: 36.01648
  }, {
    nominal: 37,
    mass: 37.00374
  }, {
    nominal: 38,
    mass: 37.99512
  }, {
    nominal: 39,
    mass: 38.984785
  }, {
    nominal: 40,
    mass: 39.9779673
  }, {
    nominal: 41,
    mass: 40.969251105
  }, {
    nominal: 42,
    mass: 41.96551653
  }, {
    nominal: 43,
    mass: 42.9611505
  }, {
    nominal: 44,
    mass: 43.9594029
  }, {
    nominal: 45,
    mass: 44.95590828,
    abundance: 1
  }, {
    nominal: 46,
    mass: 45.95516826
  }, {
    nominal: 47,
    mass: 46.9524037
  }, {
    nominal: 48,
    mass: 47.9522236
  }, {
    nominal: 49,
    mass: 48.9500146
  }, {
    nominal: 50,
    mass: 49.952176
  }, {
    nominal: 51,
    mass: 50.953592
  }, {
    nominal: 52,
    mass: 51.95688
  }, {
    nominal: 53,
    mass: 52.95909
  }, {
    nominal: 54,
    mass: 53.96393
  }, {
    nominal: 55,
    mass: 54.96782
  }, {
    nominal: 56,
    mass: 55.97345
  }, {
    nominal: 57,
    mass: 56.97777
  }, {
    nominal: 58,
    mass: 57.98403
  }, {
    nominal: 59,
    mass: 58.98894
  }, {
    nominal: 60,
    mass: 59.99565
  }, {
    nominal: 61,
    mass: 61.001
  }],
  symbol: 'Sc',
  mass: 44.95590828,
  name: 'Scandium',
  monoisotopicMass: 44.95590828
}, {
  number: 22,
  isotopes: [{
    nominal: 38,
    mass: 38.01145
  }, {
    nominal: 39,
    mass: 39.00236
  }, {
    nominal: 40,
    mass: 39.9905
  }, {
    nominal: 41,
    mass: 40.983148
  }, {
    nominal: 42,
    mass: 41.97304903
  }, {
    nominal: 43,
    mass: 42.9685225
  }, {
    nominal: 44,
    mass: 43.95968995
  }, {
    nominal: 45,
    mass: 44.95812198
  }, {
    nominal: 46,
    mass: 45.95262772,
    abundance: 0.0825
  }, {
    nominal: 47,
    mass: 46.95175879,
    abundance: 0.0744
  }, {
    nominal: 48,
    mass: 47.94794198,
    abundance: 0.7372
  }, {
    nominal: 49,
    mass: 48.94786568,
    abundance: 0.0541
  }, {
    nominal: 50,
    mass: 49.94478689,
    abundance: 0.0518
  }, {
    nominal: 51,
    mass: 50.94661065
  }, {
    nominal: 52,
    mass: 51.946893
  }, {
    nominal: 53,
    mass: 52.94973
  }, {
    nominal: 54,
    mass: 53.95105
  }, {
    nominal: 55,
    mass: 54.95527
  }, {
    nominal: 56,
    mass: 55.95791
  }, {
    nominal: 57,
    mass: 56.96364
  }, {
    nominal: 58,
    mass: 57.9666
  }, {
    nominal: 59,
    mass: 58.97247
  }, {
    nominal: 60,
    mass: 59.97603
  }, {
    nominal: 61,
    mass: 60.98245
  }, {
    nominal: 62,
    mass: 61.98651
  }, {
    nominal: 63,
    mass: 62.99375
  }],
  symbol: 'Ti',
  mass: 47.866744962721995,
  name: 'Titanium',
  monoisotopicMass: 47.94794198
}, {
  number: 23,
  isotopes: [{
    nominal: 40,
    mass: 40.01276
  }, {
    nominal: 41,
    mass: 41.00021
  }, {
    nominal: 42,
    mass: 41.99182
  }, {
    nominal: 43,
    mass: 42.980766
  }, {
    nominal: 44,
    mass: 43.97411
  }, {
    nominal: 45,
    mass: 44.9657748
  }, {
    nominal: 46,
    mass: 45.96019878
  }, {
    nominal: 47,
    mass: 46.95490491
  }, {
    nominal: 48,
    mass: 47.9522522
  }, {
    nominal: 49,
    mass: 48.9485118
  }, {
    nominal: 50,
    mass: 49.94715601,
    abundance: 0.0025
  }, {
    nominal: 51,
    mass: 50.94395704,
    abundance: 0.9975
  }, {
    nominal: 52,
    mass: 51.94477301
  }, {
    nominal: 53,
    mass: 52.9443367
  }, {
    nominal: 54,
    mass: 53.946439
  }, {
    nominal: 55,
    mass: 54.94724
  }, {
    nominal: 56,
    mass: 55.95048
  }, {
    nominal: 57,
    mass: 56.95252
  }, {
    nominal: 58,
    mass: 57.95672
  }, {
    nominal: 59,
    mass: 58.95939
  }, {
    nominal: 60,
    mass: 59.96431
  }, {
    nominal: 61,
    mass: 60.96725
  }, {
    nominal: 62,
    mass: 61.97265
  }, {
    nominal: 63,
    mass: 62.97639
  }, {
    nominal: 64,
    mass: 63.98264
  }, {
    nominal: 65,
    mass: 64.9875
  }, {
    nominal: 66,
    mass: 65.99398
  }],
  symbol: 'V',
  mass: 50.941465037425004,
  name: 'Vanadium',
  monoisotopicMass: 50.94395704
}, {
  number: 24,
  isotopes: [{
    nominal: 42,
    mass: 42.0067
  }, {
    nominal: 43,
    mass: 42.99753
  }, {
    nominal: 44,
    mass: 43.98536
  }, {
    nominal: 45,
    mass: 44.97905
  }, {
    nominal: 46,
    mass: 45.968359
  }, {
    nominal: 47,
    mass: 46.9628974
  }, {
    nominal: 48,
    mass: 47.9540291
  }, {
    nominal: 49,
    mass: 48.9513333
  }, {
    nominal: 50,
    mass: 49.94604183,
    abundance: 0.04345
  }, {
    nominal: 51,
    mass: 50.94476502
  }, {
    nominal: 52,
    mass: 51.94050623,
    abundance: 0.83789
  }, {
    nominal: 53,
    mass: 52.94064815,
    abundance: 0.09501
  }, {
    nominal: 54,
    mass: 53.93887916,
    abundance: 0.02365
  }, {
    nominal: 55,
    mass: 54.94083843
  }, {
    nominal: 56,
    mass: 55.9406531
  }, {
    nominal: 57,
    mass: 56.943613
  }, {
    nominal: 58,
    mass: 57.94435
  }, {
    nominal: 59,
    mass: 58.94859
  }, {
    nominal: 60,
    mass: 59.95008
  }, {
    nominal: 61,
    mass: 60.95442
  }, {
    nominal: 62,
    mass: 61.9561
  }, {
    nominal: 63,
    mass: 62.96165
  }, {
    nominal: 64,
    mass: 63.96408
  }, {
    nominal: 65,
    mass: 64.96996
  }, {
    nominal: 66,
    mass: 65.97366
  }, {
    nominal: 67,
    mass: 66.98016
  }, {
    nominal: 68,
    mass: 67.98403
  }],
  symbol: 'Cr',
  mass: 51.9961317554337,
  name: 'Chromium',
  monoisotopicMass: 51.94050623
}, {
  number: 25,
  isotopes: [{
    nominal: 44,
    mass: 44.00715
  }, {
    nominal: 45,
    mass: 44.99449
  }, {
    nominal: 46,
    mass: 45.98609
  }, {
    nominal: 47,
    mass: 46.975775
  }, {
    nominal: 48,
    mass: 47.96852
  }, {
    nominal: 49,
    mass: 48.959595
  }, {
    nominal: 50,
    mass: 49.95423778
  }, {
    nominal: 51,
    mass: 50.94820847
  }, {
    nominal: 52,
    mass: 51.9455639
  }, {
    nominal: 53,
    mass: 52.94128889
  }, {
    nominal: 54,
    mass: 53.9403576
  }, {
    nominal: 55,
    mass: 54.93804391,
    abundance: 1
  }, {
    nominal: 56,
    mass: 55.93890369
  }, {
    nominal: 57,
    mass: 56.9382861
  }, {
    nominal: 58,
    mass: 57.9400666
  }, {
    nominal: 59,
    mass: 58.9403911
  }, {
    nominal: 60,
    mass: 59.9431366
  }, {
    nominal: 61,
    mass: 60.9444525
  }, {
    nominal: 62,
    mass: 61.94795
  }, {
    nominal: 63,
    mass: 62.9496647
  }, {
    nominal: 64,
    mass: 63.9538494
  }, {
    nominal: 65,
    mass: 64.9560198
  }, {
    nominal: 66,
    mass: 65.960547
  }, {
    nominal: 67,
    mass: 66.96424
  }, {
    nominal: 68,
    mass: 67.96962
  }, {
    nominal: 69,
    mass: 68.97366
  }, {
    nominal: 70,
    mass: 69.97937
  }, {
    nominal: 71,
    mass: 70.98368
  }],
  symbol: 'Mn',
  mass: 54.93804391,
  name: 'Manganese',
  monoisotopicMass: 54.93804391
}, {
  number: 26,
  isotopes: [{
    nominal: 45,
    mass: 45.01442
  }, {
    nominal: 46,
    mass: 46.00063
  }, {
    nominal: 47,
    mass: 46.99185
  }, {
    nominal: 48,
    mass: 47.98023
  }, {
    nominal: 49,
    mass: 48.973429
  }, {
    nominal: 50,
    mass: 49.962975
  }, {
    nominal: 51,
    mass: 50.956841
  }, {
    nominal: 52,
    mass: 51.9481131
  }, {
    nominal: 53,
    mass: 52.9453064
  }, {
    nominal: 54,
    mass: 53.93960899,
    abundance: 0.05845
  }, {
    nominal: 55,
    mass: 54.93829199
  }, {
    nominal: 56,
    mass: 55.93493633,
    abundance: 0.91754
  }, {
    nominal: 57,
    mass: 56.93539284,
    abundance: 0.02119
  }, {
    nominal: 58,
    mass: 57.93327443,
    abundance: 0.00282
  }, {
    nominal: 59,
    mass: 58.93487434
  }, {
    nominal: 60,
    mass: 59.9340711
  }, {
    nominal: 61,
    mass: 60.9367462
  }, {
    nominal: 62,
    mass: 61.9367918
  }, {
    nominal: 63,
    mass: 62.9402727
  }, {
    nominal: 64,
    mass: 63.9409878
  }, {
    nominal: 65,
    mass: 64.9450115
  }, {
    nominal: 66,
    mass: 65.94625
  }, {
    nominal: 67,
    mass: 66.95054
  }, {
    nominal: 68,
    mass: 67.95295
  }, {
    nominal: 69,
    mass: 68.95807
  }, {
    nominal: 70,
    mass: 69.96102
  }, {
    nominal: 71,
    mass: 70.96672
  }, {
    nominal: 72,
    mass: 71.96983
  }, {
    nominal: 73,
    mass: 72.97572
  }, {
    nominal: 74,
    mass: 73.97935
  }],
  symbol: 'Fe',
  mass: 55.845144433865904,
  name: 'Iron',
  monoisotopicMass: 55.93493633
}, {
  number: 27,
  isotopes: [{
    nominal: 47,
    mass: 47.01057
  }, {
    nominal: 48,
    mass: 48.00093
  }, {
    nominal: 49,
    mass: 48.98891
  }, {
    nominal: 50,
    mass: 49.98091
  }, {
    nominal: 51,
    mass: 50.970647
  }, {
    nominal: 52,
    mass: 51.96351
  }, {
    nominal: 53,
    mass: 52.9542041
  }, {
    nominal: 54,
    mass: 53.94845987
  }, {
    nominal: 55,
    mass: 54.9419972
  }, {
    nominal: 56,
    mass: 55.9398388
  }, {
    nominal: 57,
    mass: 56.93629057
  }, {
    nominal: 58,
    mass: 57.9357521
  }, {
    nominal: 59,
    mass: 58.93319429,
    abundance: 1
  }, {
    nominal: 60,
    mass: 59.9338163
  }, {
    nominal: 61,
    mass: 60.93247662
  }, {
    nominal: 62,
    mass: 61.934059
  }, {
    nominal: 63,
    mass: 62.9336
  }, {
    nominal: 64,
    mass: 63.935811
  }, {
    nominal: 65,
    mass: 64.9364621
  }, {
    nominal: 66,
    mass: 65.939443
  }, {
    nominal: 67,
    mass: 66.9406096
  }, {
    nominal: 68,
    mass: 67.94426
  }, {
    nominal: 69,
    mass: 68.94614
  }, {
    nominal: 70,
    mass: 69.94963
  }, {
    nominal: 71,
    mass: 70.95237
  }, {
    nominal: 72,
    mass: 71.95729
  }, {
    nominal: 73,
    mass: 72.96039
  }, {
    nominal: 74,
    mass: 73.96515
  }, {
    nominal: 75,
    mass: 74.96876
  }, {
    nominal: 76,
    mass: 75.97413
  }],
  symbol: 'Co',
  mass: 58.93319429,
  name: 'Cobalt',
  monoisotopicMass: 58.93319429
}, {
  number: 28,
  isotopes: [{
    nominal: 48,
    mass: 48.01769
  }, {
    nominal: 49,
    mass: 49.0077
  }, {
    nominal: 50,
    mass: 49.99474
  }, {
    nominal: 51,
    mass: 50.98611
  }, {
    nominal: 52,
    mass: 51.9748
  }, {
    nominal: 53,
    mass: 52.96819
  }, {
    nominal: 54,
    mass: 53.957892
  }, {
    nominal: 55,
    mass: 54.95133063
  }, {
    nominal: 56,
    mass: 55.94212855
  }, {
    nominal: 57,
    mass: 56.93979218
  }, {
    nominal: 58,
    mass: 57.93534241,
    abundance: 0.68077
  }, {
    nominal: 59,
    mass: 58.9343462
  }, {
    nominal: 60,
    mass: 59.93078588,
    abundance: 0.26223
  }, {
    nominal: 61,
    mass: 60.93105557,
    abundance: 0.011399
  }, {
    nominal: 62,
    mass: 61.92834537,
    abundance: 0.036346
  }, {
    nominal: 63,
    mass: 62.92966963
  }, {
    nominal: 64,
    mass: 63.92796682,
    abundance: 0.009255
  }, {
    nominal: 65,
    mass: 64.93008517
  }, {
    nominal: 66,
    mass: 65.9291393
  }, {
    nominal: 67,
    mass: 66.9315694
  }, {
    nominal: 68,
    mass: 67.9318688
  }, {
    nominal: 69,
    mass: 68.9356103
  }, {
    nominal: 70,
    mass: 69.9364313
  }, {
    nominal: 71,
    mass: 70.940519
  }, {
    nominal: 72,
    mass: 71.9417859
  }, {
    nominal: 73,
    mass: 72.9462067
  }, {
    nominal: 74,
    mass: 73.94798
  }, {
    nominal: 75,
    mass: 74.9525
  }, {
    nominal: 76,
    mass: 75.95533
  }, {
    nominal: 77,
    mass: 76.96055
  }, {
    nominal: 78,
    mass: 77.96336
  }, {
    nominal: 79,
    mass: 78.97025
  }],
  symbol: 'Ni',
  mass: 58.69334710994765,
  name: 'Nickel',
  monoisotopicMass: 57.93534241
}, {
  number: 29,
  isotopes: [{
    nominal: 52,
    mass: 51.99671
  }, {
    nominal: 53,
    mass: 52.98459
  }, {
    nominal: 54,
    mass: 53.97666
  }, {
    nominal: 55,
    mass: 54.96604
  }, {
    nominal: 56,
    mass: 55.95895
  }, {
    nominal: 57,
    mass: 56.9492125
  }, {
    nominal: 58,
    mass: 57.94453305
  }, {
    nominal: 59,
    mass: 58.93949748
  }, {
    nominal: 60,
    mass: 59.9373645
  }, {
    nominal: 61,
    mass: 60.9334576
  }, {
    nominal: 62,
    mass: 61.93259541
  }, {
    nominal: 63,
    mass: 62.92959772,
    abundance: 0.6915
  }, {
    nominal: 64,
    mass: 63.92976434
  }, {
    nominal: 65,
    mass: 64.9277897,
    abundance: 0.3085
  }, {
    nominal: 66,
    mass: 65.92886903
  }, {
    nominal: 67,
    mass: 66.9277303
  }, {
    nominal: 68,
    mass: 67.9296109
  }, {
    nominal: 69,
    mass: 68.9294293
  }, {
    nominal: 70,
    mass: 69.9323921
  }, {
    nominal: 71,
    mass: 70.9326768
  }, {
    nominal: 72,
    mass: 71.9358203
  }, {
    nominal: 73,
    mass: 72.9366744
  }, {
    nominal: 74,
    mass: 73.9398749
  }, {
    nominal: 75,
    mass: 74.9415226
  }, {
    nominal: 76,
    mass: 75.945275
  }, {
    nominal: 77,
    mass: 76.94792
  }, {
    nominal: 78,
    mass: 77.95223
  }, {
    nominal: 79,
    mass: 78.95502
  }, {
    nominal: 80,
    mass: 79.96089
  }, {
    nominal: 81,
    mass: 80.96587
  }, {
    nominal: 82,
    mass: 81.97244
  }],
  symbol: 'Cu',
  mass: 63.54603994583,
  name: 'Copper',
  monoisotopicMass: 62.92959772
}, {
  number: 30,
  isotopes: [{
    nominal: 54,
    mass: 53.99204
  }, {
    nominal: 55,
    mass: 54.98398
  }, {
    nominal: 56,
    mass: 55.97254
  }, {
    nominal: 57,
    mass: 56.96506
  }, {
    nominal: 58,
    mass: 57.954591
  }, {
    nominal: 59,
    mass: 58.94931266
  }, {
    nominal: 60,
    mass: 59.9418421
  }, {
    nominal: 61,
    mass: 60.939507
  }, {
    nominal: 62,
    mass: 61.93433397
  }, {
    nominal: 63,
    mass: 62.9332115
  }, {
    nominal: 64,
    mass: 63.92914201,
    abundance: 0.4917
  }, {
    nominal: 65,
    mass: 64.92924077
  }, {
    nominal: 66,
    mass: 65.92603381,
    abundance: 0.2773
  }, {
    nominal: 67,
    mass: 66.92712775,
    abundance: 0.0404
  }, {
    nominal: 68,
    mass: 67.92484455,
    abundance: 0.1845
  }, {
    nominal: 69,
    mass: 68.9265507
  }, {
    nominal: 70,
    mass: 69.9253192,
    abundance: 0.0061
  }, {
    nominal: 71,
    mass: 70.9277196
  }, {
    nominal: 72,
    mass: 71.9268428
  }, {
    nominal: 73,
    mass: 72.9295826
  }, {
    nominal: 74,
    mass: 73.9294073
  }, {
    nominal: 75,
    mass: 74.9328402
  }, {
    nominal: 76,
    mass: 75.933115
  }, {
    nominal: 77,
    mass: 76.9368872
  }, {
    nominal: 78,
    mass: 77.9382892
  }, {
    nominal: 79,
    mass: 78.9426381
  }, {
    nominal: 80,
    mass: 79.9445529
  }, {
    nominal: 81,
    mass: 80.9504026
  }, {
    nominal: 82,
    mass: 81.95426
  }, {
    nominal: 83,
    mass: 82.96056
  }, {
    nominal: 84,
    mass: 83.96521
  }, {
    nominal: 85,
    mass: 84.97226
  }],
  symbol: 'Zn',
  mass: 65.37778252952499,
  name: 'Zinc',
  monoisotopicMass: 63.92914201
}, {
  number: 31,
  isotopes: [{
    nominal: 56,
    mass: 55.99536
  }, {
    nominal: 57,
    mass: 56.9832
  }, {
    nominal: 58,
    mass: 57.97478
  }, {
    nominal: 59,
    mass: 58.96353
  }, {
    nominal: 60,
    mass: 59.95729
  }, {
    nominal: 61,
    mass: 60.949399
  }, {
    nominal: 62,
    mass: 61.94419025
  }, {
    nominal: 63,
    mass: 62.9392942
  }, {
    nominal: 64,
    mass: 63.9368404
  }, {
    nominal: 65,
    mass: 64.93273459
  }, {
    nominal: 66,
    mass: 65.9315894
  }, {
    nominal: 67,
    mass: 66.9282025
  }, {
    nominal: 68,
    mass: 67.9279805
  }, {
    nominal: 69,
    mass: 68.9255735,
    abundance: 0.60108
  }, {
    nominal: 70,
    mass: 69.9260219
  }, {
    nominal: 71,
    mass: 70.92470258,
    abundance: 0.39892
  }, {
    nominal: 72,
    mass: 71.92636747
  }, {
    nominal: 73,
    mass: 72.9251747
  }, {
    nominal: 74,
    mass: 73.9269457
  }, {
    nominal: 75,
    mass: 74.9265002
  }, {
    nominal: 76,
    mass: 75.9288276
  }, {
    nominal: 77,
    mass: 76.9291543
  }, {
    nominal: 78,
    mass: 77.9316088
  }, {
    nominal: 79,
    mass: 78.9328523
  }, {
    nominal: 80,
    mass: 79.9364208
  }, {
    nominal: 81,
    mass: 80.9381338
  }, {
    nominal: 82,
    mass: 81.9431765
  }, {
    nominal: 83,
    mass: 82.9471203
  }, {
    nominal: 84,
    mass: 83.95246
  }, {
    nominal: 85,
    mass: 84.95699
  }, {
    nominal: 86,
    mass: 85.96301
  }, {
    nominal: 87,
    mass: 86.96824
  }],
  symbol: 'Ga',
  mass: 69.7230660725936,
  name: 'Gallium',
  monoisotopicMass: 68.9255735
}, {
  number: 32,
  isotopes: [{
    nominal: 58,
    mass: 57.99172
  }, {
    nominal: 59,
    mass: 58.98249
  }, {
    nominal: 60,
    mass: 59.97036
  }, {
    nominal: 61,
    mass: 60.96379
  }, {
    nominal: 62,
    mass: 61.95502
  }, {
    nominal: 63,
    mass: 62.949628
  }, {
    nominal: 64,
    mass: 63.9416899
  }, {
    nominal: 65,
    mass: 64.9393681
  }, {
    nominal: 66,
    mass: 65.9338621
  }, {
    nominal: 67,
    mass: 66.9327339
  }, {
    nominal: 68,
    mass: 67.9280953
  }, {
    nominal: 69,
    mass: 68.9279645
  }, {
    nominal: 70,
    mass: 69.92424875,
    abundance: 0.2057
  }, {
    nominal: 71,
    mass: 70.92495233
  }, {
    nominal: 72,
    mass: 71.922075826,
    abundance: 0.2745
  }, {
    nominal: 73,
    mass: 72.923458956,
    abundance: 0.0775
  }, {
    nominal: 74,
    mass: 73.921177761,
    abundance: 0.365
  }, {
    nominal: 75,
    mass: 74.92285837
  }, {
    nominal: 76,
    mass: 75.921402726,
    abundance: 0.0773
  }, {
    nominal: 77,
    mass: 76.923549843
  }, {
    nominal: 78,
    mass: 77.9228529
  }, {
    nominal: 79,
    mass: 78.92536
  }, {
    nominal: 80,
    mass: 79.9253508
  }, {
    nominal: 81,
    mass: 80.9288329
  }, {
    nominal: 82,
    mass: 81.929774
  }, {
    nominal: 83,
    mass: 82.9345391
  }, {
    nominal: 84,
    mass: 83.9375751
  }, {
    nominal: 85,
    mass: 84.9429697
  }, {
    nominal: 86,
    mass: 85.94658
  }, {
    nominal: 87,
    mass: 86.95268
  }, {
    nominal: 88,
    mass: 87.95691
  }, {
    nominal: 89,
    mass: 88.96379
  }, {
    nominal: 90,
    mass: 89.96863
  }],
  symbol: 'Ge',
  mass: 72.6275501646868,
  name: 'Germanium',
  monoisotopicMass: 73.921177761
}, {
  number: 33,
  isotopes: [{
    nominal: 60,
    mass: 59.99388
  }, {
    nominal: 61,
    mass: 60.98112
  }, {
    nominal: 62,
    mass: 61.97361
  }, {
    nominal: 63,
    mass: 62.9639
  }, {
    nominal: 64,
    mass: 63.95743
  }, {
    nominal: 65,
    mass: 64.949611
  }, {
    nominal: 66,
    mass: 65.9441488
  }, {
    nominal: 67,
    mass: 66.93925111
  }, {
    nominal: 68,
    mass: 67.9367741
  }, {
    nominal: 69,
    mass: 68.932246
  }, {
    nominal: 70,
    mass: 69.930926
  }, {
    nominal: 71,
    mass: 70.9271138
  }, {
    nominal: 72,
    mass: 71.9267523
  }, {
    nominal: 73,
    mass: 72.9238291
  }, {
    nominal: 74,
    mass: 73.9239286
  }, {
    nominal: 75,
    mass: 74.92159457,
    abundance: 1
  }, {
    nominal: 76,
    mass: 75.92239202
  }, {
    nominal: 77,
    mass: 76.9206476
  }, {
    nominal: 78,
    mass: 77.921828
  }, {
    nominal: 79,
    mass: 78.9209484
  }, {
    nominal: 80,
    mass: 79.9224746
  }, {
    nominal: 81,
    mass: 80.9221323
  }, {
    nominal: 82,
    mass: 81.9247412
  }, {
    nominal: 83,
    mass: 82.9252069
  }, {
    nominal: 84,
    mass: 83.9293033
  }, {
    nominal: 85,
    mass: 84.9321637
  }, {
    nominal: 86,
    mass: 85.9367015
  }, {
    nominal: 87,
    mass: 86.9402917
  }, {
    nominal: 88,
    mass: 87.94555
  }, {
    nominal: 89,
    mass: 88.94976
  }, {
    nominal: 90,
    mass: 89.95563
  }, {
    nominal: 91,
    mass: 90.96039
  }, {
    nominal: 92,
    mass: 91.96674
  }],
  symbol: 'As',
  mass: 74.92159457,
  name: 'Arsenic',
  monoisotopicMass: 74.92159457
}, {
  number: 34,
  isotopes: [{
    nominal: 64,
    mass: 63.97109
  }, {
    nominal: 65,
    mass: 64.9644
  }, {
    nominal: 66,
    mass: 65.95559
  }, {
    nominal: 67,
    mass: 66.949994
  }, {
    nominal: 68,
    mass: 67.94182524
  }, {
    nominal: 69,
    mass: 68.9394148
  }, {
    nominal: 70,
    mass: 69.9335155
  }, {
    nominal: 71,
    mass: 70.9322094
  }, {
    nominal: 72,
    mass: 71.9271405
  }, {
    nominal: 73,
    mass: 72.9267549
  }, {
    nominal: 74,
    mass: 73.922475934,
    abundance: 0.0089
  }, {
    nominal: 75,
    mass: 74.92252287
  }, {
    nominal: 76,
    mass: 75.919213704,
    abundance: 0.0937
  }, {
    nominal: 77,
    mass: 76.919914154,
    abundance: 0.0763
  }, {
    nominal: 78,
    mass: 77.91730928,
    abundance: 0.2377
  }, {
    nominal: 79,
    mass: 78.91849929
  }, {
    nominal: 80,
    mass: 79.9165218,
    abundance: 0.4961
  }, {
    nominal: 81,
    mass: 80.917993
  }, {
    nominal: 82,
    mass: 81.9166995,
    abundance: 0.0873
  }, {
    nominal: 83,
    mass: 82.9191186
  }, {
    nominal: 84,
    mass: 83.9184668
  }, {
    nominal: 85,
    mass: 84.9222608
  }, {
    nominal: 86,
    mass: 85.9243117
  }, {
    nominal: 87,
    mass: 86.9286886
  }, {
    nominal: 88,
    mass: 87.9314175
  }, {
    nominal: 89,
    mass: 88.9366691
  }, {
    nominal: 90,
    mass: 89.9401
  }, {
    nominal: 91,
    mass: 90.94596
  }, {
    nominal: 92,
    mass: 91.94984
  }, {
    nominal: 93,
    mass: 92.95629
  }, {
    nominal: 94,
    mass: 93.96049
  }, {
    nominal: 95,
    mass: 94.9673
  }],
  symbol: 'Se',
  mass: 78.95938855701361,
  name: 'Selenium',
  monoisotopicMass: 79.9165218
}, {
  number: 35,
  isotopes: [{
    nominal: 67,
    mass: 66.96465
  }, {
    nominal: 68,
    mass: 67.95873
  }, {
    nominal: 69,
    mass: 68.950497
  }, {
    nominal: 70,
    mass: 69.944792
  }, {
    nominal: 71,
    mass: 70.9393422
  }, {
    nominal: 72,
    mass: 71.9365886
  }, {
    nominal: 73,
    mass: 72.9316715
  }, {
    nominal: 74,
    mass: 73.9299102
  }, {
    nominal: 75,
    mass: 74.9258105
  }, {
    nominal: 76,
    mass: 75.924542
  }, {
    nominal: 77,
    mass: 76.9213792
  }, {
    nominal: 78,
    mass: 77.9211459
  }, {
    nominal: 79,
    mass: 78.9183376,
    abundance: 0.5069
  }, {
    nominal: 80,
    mass: 79.9185298
  }, {
    nominal: 81,
    mass: 80.9162897,
    abundance: 0.4931
  }, {
    nominal: 82,
    mass: 81.9168032
  }, {
    nominal: 83,
    mass: 82.9151756
  }, {
    nominal: 84,
    mass: 83.916496
  }, {
    nominal: 85,
    mass: 84.9156458
  }, {
    nominal: 86,
    mass: 85.9188054
  }, {
    nominal: 87,
    mass: 86.920674
  }, {
    nominal: 88,
    mass: 87.9240833
  }, {
    nominal: 89,
    mass: 88.9267046
  }, {
    nominal: 90,
    mass: 89.9312928
  }, {
    nominal: 91,
    mass: 90.9343986
  }, {
    nominal: 92,
    mass: 91.9396316
  }, {
    nominal: 93,
    mass: 92.94313
  }, {
    nominal: 94,
    mass: 93.9489
  }, {
    nominal: 95,
    mass: 94.95301
  }, {
    nominal: 96,
    mass: 95.95903
  }, {
    nominal: 97,
    mass: 96.96344
  }, {
    nominal: 98,
    mass: 97.96946
  }],
  symbol: 'Br',
  mass: 79.90352778050999,
  name: 'Bromine',
  monoisotopicMass: 78.9183376
}, {
  number: 36,
  isotopes: [{
    nominal: 69,
    mass: 68.96518
  }, {
    nominal: 70,
    mass: 69.95604
  }, {
    nominal: 71,
    mass: 70.95027
  }, {
    nominal: 72,
    mass: 71.9420924
  }, {
    nominal: 73,
    mass: 72.9392892
  }, {
    nominal: 74,
    mass: 73.933084
  }, {
    nominal: 75,
    mass: 74.9309457
  }, {
    nominal: 76,
    mass: 75.9259103
  }, {
    nominal: 77,
    mass: 76.92467
  }, {
    nominal: 78,
    mass: 77.92036494,
    abundance: 0.00355
  }, {
    nominal: 79,
    mass: 78.9200829
  }, {
    nominal: 80,
    mass: 79.91637808,
    abundance: 0.02286
  }, {
    nominal: 81,
    mass: 80.9165912
  }, {
    nominal: 82,
    mass: 81.91348273,
    abundance: 0.11593
  }, {
    nominal: 83,
    mass: 82.91412716,
    abundance: 0.115
  }, {
    nominal: 84,
    mass: 83.9114977282,
    abundance: 0.56987
  }, {
    nominal: 85,
    mass: 84.9125273
  }, {
    nominal: 86,
    mass: 85.9106106269,
    abundance: 0.17279
  }, {
    nominal: 87,
    mass: 86.91335476
  }, {
    nominal: 88,
    mass: 87.9144479
  }, {
    nominal: 89,
    mass: 88.9178355
  }, {
    nominal: 90,
    mass: 89.9195279
  }, {
    nominal: 91,
    mass: 90.9238063
  }, {
    nominal: 92,
    mass: 91.9261731
  }, {
    nominal: 93,
    mass: 92.9311472
  }, {
    nominal: 94,
    mass: 93.93414
  }, {
    nominal: 95,
    mass: 94.939711
  }, {
    nominal: 96,
    mass: 95.943017
  }, {
    nominal: 97,
    mass: 96.94909
  }, {
    nominal: 98,
    mass: 97.95243
  }, {
    nominal: 99,
    mass: 98.95839
  }, {
    nominal: 100,
    mass: 99.96237
  }, {
    nominal: 101,
    mass: 100.96873
  }],
  symbol: 'Kr',
  mass: 83.7979999953261,
  name: 'Krypton',
  monoisotopicMass: 83.9114977282
}, {
  number: 37,
  isotopes: [{
    nominal: 71,
    mass: 70.96532
  }, {
    nominal: 72,
    mass: 71.95908
  }, {
    nominal: 73,
    mass: 72.95053
  }, {
    nominal: 74,
    mass: 73.9442659
  }, {
    nominal: 75,
    mass: 74.9385732
  }, {
    nominal: 76,
    mass: 75.935073
  }, {
    nominal: 77,
    mass: 76.9304016
  }, {
    nominal: 78,
    mass: 77.9281419
  }, {
    nominal: 79,
    mass: 78.9239899
  }, {
    nominal: 80,
    mass: 79.9225164
  }, {
    nominal: 81,
    mass: 80.9189939
  }, {
    nominal: 82,
    mass: 81.918209
  }, {
    nominal: 83,
    mass: 82.9151142
  }, {
    nominal: 84,
    mass: 83.9143752
  }, {
    nominal: 85,
    mass: 84.9117897379,
    abundance: 0.7217
  }, {
    nominal: 86,
    mass: 85.91116743
  }, {
    nominal: 87,
    mass: 86.909180531,
    abundance: 0.2783
  }, {
    nominal: 88,
    mass: 87.91131559
  }, {
    nominal: 89,
    mass: 88.9122783
  }, {
    nominal: 90,
    mass: 89.9147985
  }, {
    nominal: 91,
    mass: 90.9165372
  }, {
    nominal: 92,
    mass: 91.9197284
  }, {
    nominal: 93,
    mass: 92.9220393
  }, {
    nominal: 94,
    mass: 93.9263948
  }, {
    nominal: 95,
    mass: 94.92926
  }, {
    nominal: 96,
    mass: 95.9341334
  }, {
    nominal: 97,
    mass: 96.9371771
  }, {
    nominal: 98,
    mass: 97.9416869
  }, {
    nominal: 99,
    mass: 98.94503
  }, {
    nominal: 100,
    mass: 99.95003
  }, {
    nominal: 101,
    mass: 100.95404
  }, {
    nominal: 102,
    mass: 101.95952
  }, {
    nominal: 103,
    mass: 102.96392
  }],
  symbol: 'Rb',
  mass: 85.46766359561973,
  name: 'Rubidium',
  monoisotopicMass: 84.9117897379
}, {
  number: 38,
  isotopes: [{
    nominal: 73,
    mass: 72.9657
  }, {
    nominal: 74,
    mass: 73.95617
  }, {
    nominal: 75,
    mass: 74.94995
  }, {
    nominal: 76,
    mass: 75.941763
  }, {
    nominal: 77,
    mass: 76.9379455
  }, {
    nominal: 78,
    mass: 77.93218
  }, {
    nominal: 79,
    mass: 78.9297077
  }, {
    nominal: 80,
    mass: 79.9245175
  }, {
    nominal: 81,
    mass: 80.9232114
  }, {
    nominal: 82,
    mass: 81.9183999
  }, {
    nominal: 83,
    mass: 82.9175544
  }, {
    nominal: 84,
    mass: 83.9134191,
    abundance: 0.0056
  }, {
    nominal: 85,
    mass: 84.912932
  }, {
    nominal: 86,
    mass: 85.9092606,
    abundance: 0.0986
  }, {
    nominal: 87,
    mass: 86.9088775,
    abundance: 0.07
  }, {
    nominal: 88,
    mass: 87.9056125,
    abundance: 0.8258
  }, {
    nominal: 89,
    mass: 88.9074511
  }, {
    nominal: 90,
    mass: 89.90773
  }, {
    nominal: 91,
    mass: 90.9101954
  }, {
    nominal: 92,
    mass: 91.9110382
  }, {
    nominal: 93,
    mass: 92.9140242
  }, {
    nominal: 94,
    mass: 93.9153556
  }, {
    nominal: 95,
    mass: 94.9193529
  }, {
    nominal: 96,
    mass: 95.9217066
  }, {
    nominal: 97,
    mass: 96.926374
  }, {
    nominal: 98,
    mass: 97.9286888
  }, {
    nominal: 99,
    mass: 98.9328907
  }, {
    nominal: 100,
    mass: 99.93577
  }, {
    nominal: 101,
    mass: 100.940352
  }, {
    nominal: 102,
    mass: 101.943791
  }, {
    nominal: 103,
    mass: 102.94909
  }, {
    nominal: 104,
    mass: 103.95265
  }, {
    nominal: 105,
    mass: 104.95855
  }, {
    nominal: 106,
    mass: 105.96265
  }, {
    nominal: 107,
    mass: 106.96897
  }],
  symbol: 'Sr',
  mass: 87.61664446962,
  name: 'Strontium',
  monoisotopicMass: 87.9056125
}, {
  number: 39,
  isotopes: [{
    nominal: 76,
    mass: 75.95856
  }, {
    nominal: 77,
    mass: 76.949781
  }, {
    nominal: 78,
    mass: 77.94361
  }, {
    nominal: 79,
    mass: 78.93735
  }, {
    nominal: 80,
    mass: 79.9343561
  }, {
    nominal: 81,
    mass: 80.9294556
  }, {
    nominal: 82,
    mass: 81.9269314
  }, {
    nominal: 83,
    mass: 82.922485
  }, {
    nominal: 84,
    mass: 83.9206721
  }, {
    nominal: 85,
    mass: 84.916433
  }, {
    nominal: 86,
    mass: 85.914886
  }, {
    nominal: 87,
    mass: 86.9108761
  }, {
    nominal: 88,
    mass: 87.9095016
  }, {
    nominal: 89,
    mass: 88.9058403,
    abundance: 1
  }, {
    nominal: 90,
    mass: 89.9071439
  }, {
    nominal: 91,
    mass: 90.9072974
  }, {
    nominal: 92,
    mass: 91.9089451
  }, {
    nominal: 93,
    mass: 92.909578
  }, {
    nominal: 94,
    mass: 93.9115906
  }, {
    nominal: 95,
    mass: 94.9128161
  }, {
    nominal: 96,
    mass: 95.9158968
  }, {
    nominal: 97,
    mass: 96.9182741
  }, {
    nominal: 98,
    mass: 97.9223821
  }, {
    nominal: 99,
    mass: 98.924148
  }, {
    nominal: 100,
    mass: 99.927715
  }, {
    nominal: 101,
    mass: 100.9301477
  }, {
    nominal: 102,
    mass: 101.9343277
  }, {
    nominal: 103,
    mass: 102.937243
  }, {
    nominal: 104,
    mass: 103.94196
  }, {
    nominal: 105,
    mass: 104.94544
  }, {
    nominal: 106,
    mass: 105.95056
  }, {
    nominal: 107,
    mass: 106.95452
  }, {
    nominal: 108,
    mass: 107.95996
  }, {
    nominal: 109,
    mass: 108.96436
  }],
  symbol: 'Y',
  mass: 88.9058403,
  name: 'Yttrium',
  monoisotopicMass: 88.9058403
}, {
  number: 40,
  isotopes: [{
    nominal: 78,
    mass: 77.95566
  }, {
    nominal: 79,
    mass: 78.94948
  }, {
    nominal: 80,
    mass: 79.9404
  }, {
    nominal: 81,
    mass: 80.93731
  }, {
    nominal: 82,
    mass: 81.93135
  }, {
    nominal: 83,
    mass: 82.9292421
  }, {
    nominal: 84,
    mass: 83.9233269
  }, {
    nominal: 85,
    mass: 84.9214444
  }, {
    nominal: 86,
    mass: 85.9162972
  }, {
    nominal: 87,
    mass: 86.914818
  }, {
    nominal: 88,
    mass: 87.9102213
  }, {
    nominal: 89,
    mass: 88.9088814
  }, {
    nominal: 90,
    mass: 89.9046977,
    abundance: 0.5145
  }, {
    nominal: 91,
    mass: 90.9056396,
    abundance: 0.1122
  }, {
    nominal: 92,
    mass: 91.9050347,
    abundance: 0.1715
  }, {
    nominal: 93,
    mass: 92.9064699
  }, {
    nominal: 94,
    mass: 93.9063108,
    abundance: 0.1738
  }, {
    nominal: 95,
    mass: 94.9080385
  }, {
    nominal: 96,
    mass: 95.9082714,
    abundance: 0.028
  }, {
    nominal: 97,
    mass: 96.9109512
  }, {
    nominal: 98,
    mass: 97.9127289
  }, {
    nominal: 99,
    mass: 98.916667
  }, {
    nominal: 100,
    mass: 99.9180006
  }, {
    nominal: 101,
    mass: 100.921448
  }, {
    nominal: 102,
    mass: 101.9231409
  }, {
    nominal: 103,
    mass: 102.927191
  }, {
    nominal: 104,
    mass: 103.929436
  }, {
    nominal: 105,
    mass: 104.934008
  }, {
    nominal: 106,
    mass: 105.93676
  }, {
    nominal: 107,
    mass: 106.94174
  }, {
    nominal: 108,
    mass: 107.94487
  }, {
    nominal: 109,
    mass: 108.95041
  }, {
    nominal: 110,
    mass: 109.95396
  }, {
    nominal: 111,
    mass: 110.95968
  }, {
    nominal: 112,
    mass: 111.9637
  }],
  symbol: 'Zr',
  mass: 91.22364159706,
  name: 'Zirconium',
  monoisotopicMass: 89.9046977
}, {
  number: 41,
  isotopes: [{
    nominal: 81,
    mass: 80.9496
  }, {
    nominal: 82,
    mass: 81.94396
  }, {
    nominal: 83,
    mass: 82.93729
  }, {
    nominal: 84,
    mass: 83.93449
  }, {
    nominal: 85,
    mass: 84.9288458
  }, {
    nominal: 86,
    mass: 85.9257828
  }, {
    nominal: 87,
    mass: 86.9206937
  }, {
    nominal: 88,
    mass: 87.918222
  }, {
    nominal: 89,
    mass: 88.913445
  }, {
    nominal: 90,
    mass: 89.9112584
  }, {
    nominal: 91,
    mass: 90.9069897
  }, {
    nominal: 92,
    mass: 91.9071881
  }, {
    nominal: 93,
    mass: 92.906373,
    abundance: 1
  }, {
    nominal: 94,
    mass: 93.9072788
  }, {
    nominal: 95,
    mass: 94.9068324
  }, {
    nominal: 96,
    mass: 95.9080973
  }, {
    nominal: 97,
    mass: 96.9080959
  }, {
    nominal: 98,
    mass: 97.9103265
  }, {
    nominal: 99,
    mass: 98.911613
  }, {
    nominal: 100,
    mass: 99.9143276
  }, {
    nominal: 101,
    mass: 100.9153103
  }, {
    nominal: 102,
    mass: 101.9180772
  }, {
    nominal: 103,
    mass: 102.9194572
  }, {
    nominal: 104,
    mass: 103.9228925
  }, {
    nominal: 105,
    mass: 104.9249465
  }, {
    nominal: 106,
    mass: 105.9289317
  }, {
    nominal: 107,
    mass: 106.9315937
  }, {
    nominal: 108,
    mass: 107.9360748
  }, {
    nominal: 109,
    mass: 108.93922
  }, {
    nominal: 110,
    mass: 109.94403
  }, {
    nominal: 111,
    mass: 110.94753
  }, {
    nominal: 112,
    mass: 111.95247
  }, {
    nominal: 113,
    mass: 112.95651
  }, {
    nominal: 114,
    mass: 113.96201
  }, {
    nominal: 115,
    mass: 114.96634
  }],
  symbol: 'Nb',
  mass: 92.906373,
  name: 'Niobium',
  monoisotopicMass: 92.906373
}, {
  number: 42,
  isotopes: [{
    nominal: 83,
    mass: 82.94988
  }, {
    nominal: 84,
    mass: 83.94149
  }, {
    nominal: 85,
    mass: 84.938261
  }, {
    nominal: 86,
    mass: 85.9311748
  }, {
    nominal: 87,
    mass: 86.9281962
  }, {
    nominal: 88,
    mass: 87.9219678
  }, {
    nominal: 89,
    mass: 88.9194682
  }, {
    nominal: 90,
    mass: 89.9139309
  }, {
    nominal: 91,
    mass: 90.9117453
  }, {
    nominal: 92,
    mass: 91.90680796,
    abundance: 0.1453
  }, {
    nominal: 93,
    mass: 92.90680958
  }, {
    nominal: 94,
    mass: 93.9050849,
    abundance: 0.0915
  }, {
    nominal: 95,
    mass: 94.90583877,
    abundance: 0.1584
  }, {
    nominal: 96,
    mass: 95.90467612,
    abundance: 0.1667
  }, {
    nominal: 97,
    mass: 96.90601812,
    abundance: 0.096
  }, {
    nominal: 98,
    mass: 97.90540482,
    abundance: 0.2439
  }, {
    nominal: 99,
    mass: 98.90770851
  }, {
    nominal: 100,
    mass: 99.9074718,
    abundance: 0.0982
  }, {
    nominal: 101,
    mass: 100.9103414
  }, {
    nominal: 102,
    mass: 101.9102834
  }, {
    nominal: 103,
    mass: 102.913079
  }, {
    nominal: 104,
    mass: 103.9137344
  }, {
    nominal: 105,
    mass: 104.916969
  }, {
    nominal: 106,
    mass: 105.918259
  }, {
    nominal: 107,
    mass: 106.922106
  }, {
    nominal: 108,
    mass: 107.924033
  }, {
    nominal: 109,
    mass: 108.928424
  }, {
    nominal: 110,
    mass: 109.930704
  }, {
    nominal: 111,
    mass: 110.935654
  }, {
    nominal: 112,
    mass: 111.93831
  }, {
    nominal: 113,
    mass: 112.94335
  }, {
    nominal: 114,
    mass: 113.94653
  }, {
    nominal: 115,
    mass: 114.95196
  }, {
    nominal: 116,
    mass: 115.95545
  }, {
    nominal: 117,
    mass: 116.96117
  }],
  symbol: 'Mo',
  mass: 95.959788541188,
  name: 'Molybdenum',
  monoisotopicMass: 97.90540482
}, {
  number: 43,
  isotopes: [{
    nominal: 85,
    mass: 84.95058
  }, {
    nominal: 86,
    mass: 85.94493
  }, {
    nominal: 87,
    mass: 86.9380672
  }, {
    nominal: 88,
    mass: 87.93378
  }, {
    nominal: 89,
    mass: 88.9276487
  }, {
    nominal: 90,
    mass: 89.9240739
  }, {
    nominal: 91,
    mass: 90.9184254
  }, {
    nominal: 92,
    mass: 91.9152698
  }, {
    nominal: 93,
    mass: 92.910246
  }, {
    nominal: 94,
    mass: 93.9096536
  }, {
    nominal: 95,
    mass: 94.9076536
  }, {
    nominal: 96,
    mass: 95.907868
  }, {
    nominal: 97,
    mass: 96.9063667
  }, {
    nominal: 98,
    mass: 97.9072124
  }, {
    nominal: 99,
    mass: 98.9062508
  }, {
    nominal: 100,
    mass: 99.9076539
  }, {
    nominal: 101,
    mass: 100.907309
  }, {
    nominal: 102,
    mass: 101.9092097
  }, {
    nominal: 103,
    mass: 102.909176
  }, {
    nominal: 104,
    mass: 103.911425
  }, {
    nominal: 105,
    mass: 104.911655
  }, {
    nominal: 106,
    mass: 105.914358
  }, {
    nominal: 107,
    mass: 106.9154606
  }, {
    nominal: 108,
    mass: 107.9184957
  }, {
    nominal: 109,
    mass: 108.920256
  }, {
    nominal: 110,
    mass: 109.923744
  }, {
    nominal: 111,
    mass: 110.925901
  }, {
    nominal: 112,
    mass: 111.9299458
  }, {
    nominal: 113,
    mass: 112.932569
  }, {
    nominal: 114,
    mass: 113.93691
  }, {
    nominal: 115,
    mass: 114.93998
  }, {
    nominal: 116,
    mass: 115.94476
  }, {
    nominal: 117,
    mass: 116.94806
  }, {
    nominal: 118,
    mass: 117.95299
  }, {
    nominal: 119,
    mass: 118.95666
  }, {
    nominal: 120,
    mass: 119.96187
  }],
  symbol: 'Tc',
  mass: null,
  name: 'Technetium'
}, {
  number: 44,
  isotopes: [{
    nominal: 87,
    mass: 86.95069
  }, {
    nominal: 88,
    mass: 87.9416
  }, {
    nominal: 89,
    mass: 88.93762
  }, {
    nominal: 90,
    mass: 89.9303444
  }, {
    nominal: 91,
    mass: 90.9267419
  }, {
    nominal: 92,
    mass: 91.9202344
  }, {
    nominal: 93,
    mass: 92.9171044
  }, {
    nominal: 94,
    mass: 93.9113429
  }, {
    nominal: 95,
    mass: 94.910406
  }, {
    nominal: 96,
    mass: 95.90759025,
    abundance: 0.0554
  }, {
    nominal: 97,
    mass: 96.9075471
  }, {
    nominal: 98,
    mass: 97.9052868,
    abundance: 0.0187
  }, {
    nominal: 99,
    mass: 98.9059341,
    abundance: 0.1276
  }, {
    nominal: 100,
    mass: 99.9042143,
    abundance: 0.126
  }, {
    nominal: 101,
    mass: 100.9055769,
    abundance: 0.1706
  }, {
    nominal: 102,
    mass: 101.9043441,
    abundance: 0.3155
  }, {
    nominal: 103,
    mass: 102.9063186
  }, {
    nominal: 104,
    mass: 103.9054275,
    abundance: 0.1862
  }, {
    nominal: 105,
    mass: 104.9077476
  }, {
    nominal: 106,
    mass: 105.9073291
  }, {
    nominal: 107,
    mass: 106.909972
  }, {
    nominal: 108,
    mass: 107.910188
  }, {
    nominal: 109,
    mass: 108.913326
  }, {
    nominal: 110,
    mass: 109.9140407
  }, {
    nominal: 111,
    mass: 110.91757
  }, {
    nominal: 112,
    mass: 111.918809
  }, {
    nominal: 113,
    mass: 112.922844
  }, {
    nominal: 114,
    mass: 113.9246136
  }, {
    nominal: 115,
    mass: 114.92882
  }, {
    nominal: 116,
    mass: 115.9312192
  }, {
    nominal: 117,
    mass: 116.9361
  }, {
    nominal: 118,
    mass: 117.93853
  }, {
    nominal: 119,
    mass: 118.94357
  }, {
    nominal: 120,
    mass: 119.94631
  }, {
    nominal: 121,
    mass: 120.95164
  }, {
    nominal: 122,
    mass: 121.95447
  }, {
    nominal: 123,
    mass: 122.95989
  }, {
    nominal: 124,
    mass: 123.96305
  }],
  symbol: 'Ru',
  mass: 101.06494013916,
  name: 'Ruthenium',
  monoisotopicMass: 101.9043441
}, {
  number: 45,
  isotopes: [{
    nominal: 89,
    mass: 88.95058
  }, {
    nominal: 90,
    mass: 89.94422
  }, {
    nominal: 91,
    mass: 90.93688
  }, {
    nominal: 92,
    mass: 91.9323677
  }, {
    nominal: 93,
    mass: 92.9259128
  }, {
    nominal: 94,
    mass: 93.9217305
  }, {
    nominal: 95,
    mass: 94.9158979
  }, {
    nominal: 96,
    mass: 95.914453
  }, {
    nominal: 97,
    mass: 96.911329
  }, {
    nominal: 98,
    mass: 97.910708
  }, {
    nominal: 99,
    mass: 98.9081282
  }, {
    nominal: 100,
    mass: 99.908117
  }, {
    nominal: 101,
    mass: 100.9061606
  }, {
    nominal: 102,
    mass: 101.9068374
  }, {
    nominal: 103,
    mass: 102.905498,
    abundance: 1
  }, {
    nominal: 104,
    mass: 103.9066492
  }, {
    nominal: 105,
    mass: 104.9056885
  }, {
    nominal: 106,
    mass: 105.9072868
  }, {
    nominal: 107,
    mass: 106.906748
  }, {
    nominal: 108,
    mass: 107.908714
  }, {
    nominal: 109,
    mass: 108.9087488
  }, {
    nominal: 110,
    mass: 109.911079
  }, {
    nominal: 111,
    mass: 110.9116423
  }, {
    nominal: 112,
    mass: 111.914403
  }, {
    nominal: 113,
    mass: 112.9154393
  }, {
    nominal: 114,
    mass: 113.918718
  }, {
    nominal: 115,
    mass: 114.9203116
  }, {
    nominal: 116,
    mass: 115.924059
  }, {
    nominal: 117,
    mass: 116.9260354
  }, {
    nominal: 118,
    mass: 117.93034
  }, {
    nominal: 119,
    mass: 118.932557
  }, {
    nominal: 120,
    mass: 119.93686
  }, {
    nominal: 121,
    mass: 120.93942
  }, {
    nominal: 122,
    mass: 121.94399
  }, {
    nominal: 123,
    mass: 122.94685
  }, {
    nominal: 124,
    mass: 123.95151
  }, {
    nominal: 125,
    mass: 124.95469
  }, {
    nominal: 126,
    mass: 125.95946
  }],
  symbol: 'Rh',
  mass: 102.905498,
  name: 'Rhodium',
  monoisotopicMass: 102.905498
}, {
  number: 46,
  isotopes: [{
    nominal: 91,
    mass: 90.95032
  }, {
    nominal: 92,
    mass: 91.94088
  }, {
    nominal: 93,
    mass: 92.93651
  }, {
    nominal: 94,
    mass: 93.9290376
  }, {
    nominal: 95,
    mass: 94.9248898
  }, {
    nominal: 96,
    mass: 95.9182151
  }, {
    nominal: 97,
    mass: 96.916472
  }, {
    nominal: 98,
    mass: 97.9126983
  }, {
    nominal: 99,
    mass: 98.9117748
  }, {
    nominal: 100,
    mass: 99.908505
  }, {
    nominal: 101,
    mass: 100.9082864
  }, {
    nominal: 102,
    mass: 101.9056022,
    abundance: 0.0102
  }, {
    nominal: 103,
    mass: 102.9060809
  }, {
    nominal: 104,
    mass: 103.9040305,
    abundance: 0.1114
  }, {
    nominal: 105,
    mass: 104.9050796,
    abundance: 0.2233
  }, {
    nominal: 106,
    mass: 105.9034804,
    abundance: 0.2733
  }, {
    nominal: 107,
    mass: 106.9051282
  }, {
    nominal: 108,
    mass: 107.9038916,
    abundance: 0.2646
  }, {
    nominal: 109,
    mass: 108.9059504
  }, {
    nominal: 110,
    mass: 109.9051722,
    abundance: 0.1172
  }, {
    nominal: 111,
    mass: 110.90768968
  }, {
    nominal: 112,
    mass: 111.9073297
  }, {
    nominal: 113,
    mass: 112.910261
  }, {
    nominal: 114,
    mass: 113.9103686
  }, {
    nominal: 115,
    mass: 114.913659
  }, {
    nominal: 116,
    mass: 115.914297
  }, {
    nominal: 117,
    mass: 116.9179547
  }, {
    nominal: 118,
    mass: 117.9190667
  }, {
    nominal: 119,
    mass: 118.9233402
  }, {
    nominal: 120,
    mass: 119.9245511
  }, {
    nominal: 121,
    mass: 120.9289503
  }, {
    nominal: 122,
    mass: 121.930632
  }, {
    nominal: 123,
    mass: 122.93514
  }, {
    nominal: 124,
    mass: 123.93714
  }, {
    nominal: 125,
    mass: 124.94179
  }, {
    nominal: 126,
    mass: 125.94416
  }, {
    nominal: 127,
    mass: 126.94907
  }, {
    nominal: 128,
    mass: 127.95183
  }],
  symbol: 'Pd',
  mass: 106.41532750734,
  name: 'Palladium',
  monoisotopicMass: 105.9034804
}, {
  number: 47,
  isotopes: [{
    nominal: 93,
    mass: 92.95033
  }, {
    nominal: 94,
    mass: 93.94373
  }, {
    nominal: 95,
    mass: 94.93602
  }, {
    nominal: 96,
    mass: 95.930744
  }, {
    nominal: 97,
    mass: 96.92397
  }, {
    nominal: 98,
    mass: 97.92156
  }, {
    nominal: 99,
    mass: 98.9176458
  }, {
    nominal: 100,
    mass: 99.9161154
  }, {
    nominal: 101,
    mass: 100.912684
  }, {
    nominal: 102,
    mass: 101.9117047
  }, {
    nominal: 103,
    mass: 102.9089631
  }, {
    nominal: 104,
    mass: 103.9086239
  }, {
    nominal: 105,
    mass: 104.9065256
  }, {
    nominal: 106,
    mass: 105.9066636
  }, {
    nominal: 107,
    mass: 106.9050916,
    abundance: 0.51839
  }, {
    nominal: 108,
    mass: 107.9059503
  }, {
    nominal: 109,
    mass: 108.9047553,
    abundance: 0.48161
  }, {
    nominal: 110,
    mass: 109.9061102
  }, {
    nominal: 111,
    mass: 110.9052959
  }, {
    nominal: 112,
    mass: 111.9070486
  }, {
    nominal: 113,
    mass: 112.906573
  }, {
    nominal: 114,
    mass: 113.908823
  }, {
    nominal: 115,
    mass: 114.908767
  }, {
    nominal: 116,
    mass: 115.9113868
  }, {
    nominal: 117,
    mass: 116.911774
  }, {
    nominal: 118,
    mass: 117.9145955
  }, {
    nominal: 119,
    mass: 118.91557
  }, {
    nominal: 120,
    mass: 119.9187848
  }, {
    nominal: 121,
    mass: 120.920125
  }, {
    nominal: 122,
    mass: 121.923664
  }, {
    nominal: 123,
    mass: 122.925337
  }, {
    nominal: 124,
    mass: 123.92893
  }, {
    nominal: 125,
    mass: 124.93105
  }, {
    nominal: 126,
    mass: 125.93475
  }, {
    nominal: 127,
    mass: 126.93711
  }, {
    nominal: 128,
    mass: 127.94106
  }, {
    nominal: 129,
    mass: 128.94395
  }, {
    nominal: 130,
    mass: 129.9507
  }],
  symbol: 'Ag',
  mass: 107.868149634557,
  name: 'Silver',
  monoisotopicMass: 106.9050916
}, {
  number: 48,
  isotopes: [{
    nominal: 95,
    mass: 94.94994
  }, {
    nominal: 96,
    mass: 95.94034
  }, {
    nominal: 97,
    mass: 96.9351
  }, {
    nominal: 98,
    mass: 97.927389
  }, {
    nominal: 99,
    mass: 98.9249258
  }, {
    nominal: 100,
    mass: 99.9203488
  }, {
    nominal: 101,
    mass: 100.9185862
  }, {
    nominal: 102,
    mass: 101.914482
  }, {
    nominal: 103,
    mass: 102.9134165
  }, {
    nominal: 104,
    mass: 103.9098564
  }, {
    nominal: 105,
    mass: 104.9094639
  }, {
    nominal: 106,
    mass: 105.9064599,
    abundance: 0.0125
  }, {
    nominal: 107,
    mass: 106.9066121
  }, {
    nominal: 108,
    mass: 107.9041834,
    abundance: 0.0089
  }, {
    nominal: 109,
    mass: 108.9049867
  }, {
    nominal: 110,
    mass: 109.90300661,
    abundance: 0.1249
  }, {
    nominal: 111,
    mass: 110.90418287,
    abundance: 0.128
  }, {
    nominal: 112,
    mass: 111.90276287,
    abundance: 0.2413
  }, {
    nominal: 113,
    mass: 112.90440813,
    abundance: 0.1222
  }, {
    nominal: 114,
    mass: 113.90336509,
    abundance: 0.2873
  }, {
    nominal: 115,
    mass: 114.90543751
  }, {
    nominal: 116,
    mass: 115.90476315,
    abundance: 0.0749
  }, {
    nominal: 117,
    mass: 116.907226
  }, {
    nominal: 118,
    mass: 117.906922
  }, {
    nominal: 119,
    mass: 118.909847
  }, {
    nominal: 120,
    mass: 119.9098681
  }, {
    nominal: 121,
    mass: 120.9129637
  }, {
    nominal: 122,
    mass: 121.9134591
  }, {
    nominal: 123,
    mass: 122.9168925
  }, {
    nominal: 124,
    mass: 123.9176574
  }, {
    nominal: 125,
    mass: 124.9212576
  }, {
    nominal: 126,
    mass: 125.9224291
  }, {
    nominal: 127,
    mass: 126.926472
  }, {
    nominal: 128,
    mass: 127.9278129
  }, {
    nominal: 129,
    mass: 128.93182
  }, {
    nominal: 130,
    mass: 129.93394
  }, {
    nominal: 131,
    mass: 130.9406
  }, {
    nominal: 132,
    mass: 131.94604
  }, {
    nominal: 133,
    mass: 132.95285
  }],
  symbol: 'Cd',
  mass: 112.411557818268,
  name: 'Cadmium',
  monoisotopicMass: 113.90336509
}, {
  number: 49,
  isotopes: [{
    nominal: 97,
    mass: 96.94934
  }, {
    nominal: 98,
    mass: 97.94214
  }, {
    nominal: 99,
    mass: 98.93411
  }, {
    nominal: 100,
    mass: 99.93096
  }, {
    nominal: 101,
    mass: 100.92634
  }, {
    nominal: 102,
    mass: 101.9241071
  }, {
    nominal: 103,
    mass: 102.9198819
  }, {
    nominal: 104,
    mass: 103.9182145
  }, {
    nominal: 105,
    mass: 104.914502
  }, {
    nominal: 106,
    mass: 105.913464
  }, {
    nominal: 107,
    mass: 106.91029
  }, {
    nominal: 108,
    mass: 107.9096935
  }, {
    nominal: 109,
    mass: 108.9071514
  }, {
    nominal: 110,
    mass: 109.90717
  }, {
    nominal: 111,
    mass: 110.9051085
  }, {
    nominal: 112,
    mass: 111.9055377
  }, {
    nominal: 113,
    mass: 112.90406184,
    abundance: 0.0429
  }, {
    nominal: 114,
    mass: 113.90491791
  }, {
    nominal: 115,
    mass: 114.903878776,
    abundance: 0.9571
  }, {
    nominal: 116,
    mass: 115.90525999
  }, {
    nominal: 117,
    mass: 116.9045157
  }, {
    nominal: 118,
    mass: 117.9063566
  }, {
    nominal: 119,
    mass: 118.9058507
  }, {
    nominal: 120,
    mass: 119.907967
  }, {
    nominal: 121,
    mass: 120.907851
  }, {
    nominal: 122,
    mass: 121.910281
  }, {
    nominal: 123,
    mass: 122.910434
  }, {
    nominal: 124,
    mass: 123.913182
  }, {
    nominal: 125,
    mass: 124.913605
  }, {
    nominal: 126,
    mass: 125.916507
  }, {
    nominal: 127,
    mass: 126.917446
  }, {
    nominal: 128,
    mass: 127.9204
  }, {
    nominal: 129,
    mass: 128.9218053
  }, {
    nominal: 130,
    mass: 129.924977
  }, {
    nominal: 131,
    mass: 130.9269715
  }, {
    nominal: 132,
    mass: 131.933001
  }, {
    nominal: 133,
    mass: 132.93831
  }, {
    nominal: 134,
    mass: 133.94454
  }, {
    nominal: 135,
    mass: 134.95005
  }],
  symbol: 'In',
  mass: 114.81808662944559,
  name: 'Indium',
  monoisotopicMass: 114.903878776
}, {
  number: 50,
  isotopes: [{
    nominal: 99,
    mass: 98.94853
  }, {
    nominal: 100,
    mass: 99.9385
  }, {
    nominal: 101,
    mass: 100.93526
  }, {
    nominal: 102,
    mass: 101.93029
  }, {
    nominal: 103,
    mass: 102.928105
  }, {
    nominal: 104,
    mass: 103.9231052
  }, {
    nominal: 105,
    mass: 104.9212684
  }, {
    nominal: 106,
    mass: 105.9169574
  }, {
    nominal: 107,
    mass: 106.9157137
  }, {
    nominal: 108,
    mass: 107.9118943
  }, {
    nominal: 109,
    mass: 108.9112921
  }, {
    nominal: 110,
    mass: 109.907845
  }, {
    nominal: 111,
    mass: 110.9077401
  }, {
    nominal: 112,
    mass: 111.90482387,
    abundance: 0.0097
  }, {
    nominal: 113,
    mass: 112.9051757
  }, {
    nominal: 114,
    mass: 113.9027827,
    abundance: 0.0066
  }, {
    nominal: 115,
    mass: 114.903344699,
    abundance: 0.0034
  }, {
    nominal: 116,
    mass: 115.9017428,
    abundance: 0.1454
  }, {
    nominal: 117,
    mass: 116.90295398,
    abundance: 0.0768
  }, {
    nominal: 118,
    mass: 117.90160657,
    abundance: 0.2422
  }, {
    nominal: 119,
    mass: 118.90331117,
    abundance: 0.0859
  }, {
    nominal: 120,
    mass: 119.90220163,
    abundance: 0.3258
  }, {
    nominal: 121,
    mass: 120.9042426
  }, {
    nominal: 122,
    mass: 121.9034438,
    abundance: 0.0463
  }, {
    nominal: 123,
    mass: 122.9057252
  }, {
    nominal: 124,
    mass: 123.9052766,
    abundance: 0.0579
  }, {
    nominal: 125,
    mass: 124.9077864
  }, {
    nominal: 126,
    mass: 125.907659
  }, {
    nominal: 127,
    mass: 126.91039
  }, {
    nominal: 128,
    mass: 127.910507
  }, {
    nominal: 129,
    mass: 128.913465
  }, {
    nominal: 130,
    mass: 129.9139738
  }, {
    nominal: 131,
    mass: 130.917045
  }, {
    nominal: 132,
    mass: 131.9178267
  }, {
    nominal: 133,
    mass: 132.9239134
  }, {
    nominal: 134,
    mass: 133.9286821
  }, {
    nominal: 135,
    mass: 134.9349086
  }, {
    nominal: 136,
    mass: 135.93999
  }, {
    nominal: 137,
    mass: 136.94655
  }, {
    nominal: 138,
    mass: 137.95184
  }],
  symbol: 'Sn',
  mass: 118.71011259301059,
  name: 'Tin',
  monoisotopicMass: 119.90220163
}, {
  number: 51,
  isotopes: [{
    nominal: 103,
    mass: 102.93969
  }, {
    nominal: 104,
    mass: 103.93648
  }, {
    nominal: 105,
    mass: 104.931276
  }, {
    nominal: 106,
    mass: 105.928638
  }, {
    nominal: 107,
    mass: 106.9241506
  }, {
    nominal: 108,
    mass: 107.9222267
  }, {
    nominal: 109,
    mass: 108.9181411
  }, {
    nominal: 110,
    mass: 109.9168543
  }, {
    nominal: 111,
    mass: 110.9132182
  }, {
    nominal: 112,
    mass: 111.9124
  }, {
    nominal: 113,
    mass: 112.909375
  }, {
    nominal: 114,
    mass: 113.90929
  }, {
    nominal: 115,
    mass: 114.906598
  }, {
    nominal: 116,
    mass: 115.9067931
  }, {
    nominal: 117,
    mass: 116.9048415
  }, {
    nominal: 118,
    mass: 117.9055321
  }, {
    nominal: 119,
    mass: 118.9039455
  }, {
    nominal: 120,
    mass: 119.9050794
  }, {
    nominal: 121,
    mass: 120.903812,
    abundance: 0.5721
  }, {
    nominal: 122,
    mass: 121.9051699
  }, {
    nominal: 123,
    mass: 122.9042132,
    abundance: 0.4279
  }, {
    nominal: 124,
    mass: 123.905935
  }, {
    nominal: 125,
    mass: 124.905253
  }, {
    nominal: 126,
    mass: 125.907253
  }, {
    nominal: 127,
    mass: 126.9069243
  }, {
    nominal: 128,
    mass: 127.909146
  }, {
    nominal: 129,
    mass: 128.909147
  }, {
    nominal: 130,
    mass: 129.911662
  }, {
    nominal: 131,
    mass: 130.9119888
  }, {
    nominal: 132,
    mass: 131.9145077
  }, {
    nominal: 133,
    mass: 132.9152732
  }, {
    nominal: 134,
    mass: 133.9205357
  }, {
    nominal: 135,
    mass: 134.9251851
  }, {
    nominal: 136,
    mass: 135.9307459
  }, {
    nominal: 137,
    mass: 136.93555
  }, {
    nominal: 138,
    mass: 137.94145
  }, {
    nominal: 139,
    mass: 138.94655
  }, {
    nominal: 140,
    mass: 139.95283
  }],
  symbol: 'Sb',
  mass: 121.75978367348,
  name: 'Antimony',
  monoisotopicMass: 120.903812
}, {
  number: 52,
  isotopes: [{
    nominal: 105,
    mass: 104.9433
  }, {
    nominal: 106,
    mass: 105.9375
  }, {
    nominal: 107,
    mass: 106.935012
  }, {
    nominal: 108,
    mass: 107.9293805
  }, {
    nominal: 109,
    mass: 108.9273045
  }, {
    nominal: 110,
    mass: 109.9224581
  }, {
    nominal: 111,
    mass: 110.9210006
  }, {
    nominal: 112,
    mass: 111.9167279
  }, {
    nominal: 113,
    mass: 112.915891
  }, {
    nominal: 114,
    mass: 113.912089
  }, {
    nominal: 115,
    mass: 114.911902
  }, {
    nominal: 116,
    mass: 115.90846
  }, {
    nominal: 117,
    mass: 116.908646
  }, {
    nominal: 118,
    mass: 117.905854
  }, {
    nominal: 119,
    mass: 118.9064071
  }, {
    nominal: 120,
    mass: 119.9040593,
    abundance: 0.0009
  }, {
    nominal: 121,
    mass: 120.904944
  }, {
    nominal: 122,
    mass: 121.9030435,
    abundance: 0.0255
  }, {
    nominal: 123,
    mass: 122.9042698,
    abundance: 0.0089
  }, {
    nominal: 124,
    mass: 123.9028171,
    abundance: 0.0474
  }, {
    nominal: 125,
    mass: 124.9044299,
    abundance: 0.0707
  }, {
    nominal: 126,
    mass: 125.9033109,
    abundance: 0.1884
  }, {
    nominal: 127,
    mass: 126.9052257
  }, {
    nominal: 128,
    mass: 127.90446128,
    abundance: 0.3174
  }, {
    nominal: 129,
    mass: 128.90659646
  }, {
    nominal: 130,
    mass: 129.906222748,
    abundance: 0.3408
  }, {
    nominal: 131,
    mass: 130.908522213
  }, {
    nominal: 132,
    mass: 131.9085467
  }, {
    nominal: 133,
    mass: 132.9109688
  }, {
    nominal: 134,
    mass: 133.911394
  }, {
    nominal: 135,
    mass: 134.9165557
  }, {
    nominal: 136,
    mass: 135.9201006
  }, {
    nominal: 137,
    mass: 136.9255989
  }, {
    nominal: 138,
    mass: 137.9294722
  }, {
    nominal: 139,
    mass: 138.9353672
  }, {
    nominal: 140,
    mass: 139.939499
  }, {
    nominal: 141,
    mass: 140.9458
  }, {
    nominal: 142,
    mass: 141.95022
  }, {
    nominal: 143,
    mass: 142.95676
  }],
  symbol: 'Te',
  mass: 127.6031264846604,
  name: 'Tellurium',
  monoisotopicMass: 129.906222748
}, {
  number: 53,
  isotopes: [{
    nominal: 107,
    mass: 106.94678
  }, {
    nominal: 108,
    mass: 107.94348
  }, {
    nominal: 109,
    mass: 108.9380853
  }, {
    nominal: 110,
    mass: 109.935089
  }, {
    nominal: 111,
    mass: 110.9302692
  }, {
    nominal: 112,
    mass: 111.928005
  }, {
    nominal: 113,
    mass: 112.9236501
  }, {
    nominal: 114,
    mass: 113.92185
  }, {
    nominal: 115,
    mass: 114.918048
  }, {
    nominal: 116,
    mass: 115.91681
  }, {
    nominal: 117,
    mass: 116.913648
  }, {
    nominal: 118,
    mass: 117.913074
  }, {
    nominal: 119,
    mass: 118.910074
  }, {
    nominal: 120,
    mass: 119.910087
  }, {
    nominal: 121,
    mass: 120.9074051
  }, {
    nominal: 122,
    mass: 121.9075888
  }, {
    nominal: 123,
    mass: 122.9055885
  }, {
    nominal: 124,
    mass: 123.906209
  }, {
    nominal: 125,
    mass: 124.9046294
  }, {
    nominal: 126,
    mass: 125.9056233
  }, {
    nominal: 127,
    mass: 126.9044719,
    abundance: 1
  }, {
    nominal: 128,
    mass: 127.9058086
  }, {
    nominal: 129,
    mass: 128.9049837
  }, {
    nominal: 130,
    mass: 129.9066702
  }, {
    nominal: 131,
    mass: 130.9061263
  }, {
    nominal: 132,
    mass: 131.9079935
  }, {
    nominal: 133,
    mass: 132.907797
  }, {
    nominal: 134,
    mass: 133.9097588
  }, {
    nominal: 135,
    mass: 134.9100488
  }, {
    nominal: 136,
    mass: 135.914604
  }, {
    nominal: 137,
    mass: 136.9180282
  }, {
    nominal: 138,
    mass: 137.9227264
  }, {
    nominal: 139,
    mass: 138.926506
  }, {
    nominal: 140,
    mass: 139.93173
  }, {
    nominal: 141,
    mass: 140.93569
  }, {
    nominal: 142,
    mass: 141.9412
  }, {
    nominal: 143,
    mass: 142.94565
  }, {
    nominal: 144,
    mass: 143.95139
  }, {
    nominal: 145,
    mass: 144.95605
  }],
  symbol: 'I',
  mass: 126.9044719,
  name: 'Iodine',
  monoisotopicMass: 126.9044719
}, {
  number: 54,
  isotopes: [{
    nominal: 109,
    mass: 108.95043
  }, {
    nominal: 110,
    mass: 109.94426
  }, {
    nominal: 111,
    mass: 110.941607
  }, {
    nominal: 112,
    mass: 111.935559
  }, {
    nominal: 113,
    mass: 112.9332217
  }, {
    nominal: 114,
    mass: 113.92798
  }, {
    nominal: 115,
    mass: 114.926294
  }, {
    nominal: 116,
    mass: 115.921581
  }, {
    nominal: 117,
    mass: 116.920359
  }, {
    nominal: 118,
    mass: 117.916179
  }, {
    nominal: 119,
    mass: 118.915411
  }, {
    nominal: 120,
    mass: 119.911784
  }, {
    nominal: 121,
    mass: 120.911453
  }, {
    nominal: 122,
    mass: 121.908368
  }, {
    nominal: 123,
    mass: 122.908482
  }, {
    nominal: 124,
    mass: 123.905892,
    abundance: 0.000952
  }, {
    nominal: 125,
    mass: 124.9063944
  }, {
    nominal: 126,
    mass: 125.9042983,
    abundance: 0.00089
  }, {
    nominal: 127,
    mass: 126.9051829
  }, {
    nominal: 128,
    mass: 127.903531,
    abundance: 0.019102
  }, {
    nominal: 129,
    mass: 128.9047808611,
    abundance: 0.264006
  }, {
    nominal: 130,
    mass: 129.903509349,
    abundance: 0.04071
  }, {
    nominal: 131,
    mass: 130.90508406,
    abundance: 0.212324
  }, {
    nominal: 132,
    mass: 131.9041550856,
    abundance: 0.269086
  }, {
    nominal: 133,
    mass: 132.9059108
  }, {
    nominal: 134,
    mass: 133.90539466,
    abundance: 0.104357
  }, {
    nominal: 135,
    mass: 134.9072278
  }, {
    nominal: 136,
    mass: 135.907214484,
    abundance: 0.088573
  }, {
    nominal: 137,
    mass: 136.91155778
  }, {
    nominal: 138,
    mass: 137.9141463
  }, {
    nominal: 139,
    mass: 138.9187922
  }, {
    nominal: 140,
    mass: 139.9216458
  }, {
    nominal: 141,
    mass: 140.9267872
  }, {
    nominal: 142,
    mass: 141.9299731
  }, {
    nominal: 143,
    mass: 142.9353696
  }, {
    nominal: 144,
    mass: 143.9389451
  }, {
    nominal: 145,
    mass: 144.94472
  }, {
    nominal: 146,
    mass: 145.948518
  }, {
    nominal: 147,
    mass: 146.95426
  }, {
    nominal: 148,
    mass: 147.95813
  }],
  symbol: 'Xe',
  mass: 131.29276144779053,
  name: 'Xenon',
  monoisotopicMass: 131.9041550856
}, {
  number: 55,
  isotopes: [{
    nominal: 112,
    mass: 111.950309
  }, {
    nominal: 113,
    mass: 112.9444291
  }, {
    nominal: 114,
    mass: 113.941296
  }, {
    nominal: 115,
    mass: 114.93591
  }, {
    nominal: 116,
    mass: 115.93337
  }, {
    nominal: 117,
    mass: 116.928617
  }, {
    nominal: 118,
    mass: 117.92656
  }, {
    nominal: 119,
    mass: 118.922377
  }, {
    nominal: 120,
    mass: 119.920677
  }, {
    nominal: 121,
    mass: 120.917227
  }, {
    nominal: 122,
    mass: 121.916108
  }, {
    nominal: 123,
    mass: 122.912996
  }, {
    nominal: 124,
    mass: 123.9122578
  }, {
    nominal: 125,
    mass: 124.909728
  }, {
    nominal: 126,
    mass: 125.909446
  }, {
    nominal: 127,
    mass: 126.9074174
  }, {
    nominal: 128,
    mass: 127.9077487
  }, {
    nominal: 129,
    mass: 128.9060657
  }, {
    nominal: 130,
    mass: 129.9067093
  }, {
    nominal: 131,
    mass: 130.9054649
  }, {
    nominal: 132,
    mass: 131.9064339
  }, {
    nominal: 133,
    mass: 132.905451961,
    abundance: 1
  }, {
    nominal: 134,
    mass: 133.906718503
  }, {
    nominal: 135,
    mass: 134.905977
  }, {
    nominal: 136,
    mass: 135.9073114
  }, {
    nominal: 137,
    mass: 136.90708923
  }, {
    nominal: 138,
    mass: 137.9110171
  }, {
    nominal: 139,
    mass: 138.9133638
  }, {
    nominal: 140,
    mass: 139.9172831
  }, {
    nominal: 141,
    mass: 140.9200455
  }, {
    nominal: 142,
    mass: 141.924296
  }, {
    nominal: 143,
    mass: 142.927349
  }, {
    nominal: 144,
    mass: 143.932076
  }, {
    nominal: 145,
    mass: 144.935527
  }, {
    nominal: 146,
    mass: 145.940344
  }, {
    nominal: 147,
    mass: 146.944156
  }, {
    nominal: 148,
    mass: 147.94923
  }, {
    nominal: 149,
    mass: 148.95302
  }, {
    nominal: 150,
    mass: 149.95833
  }, {
    nominal: 151,
    mass: 150.96258
  }],
  symbol: 'Cs',
  mass: 132.905451961,
  name: 'Caesium',
  monoisotopicMass: 132.905451961
}, {
  number: 56,
  isotopes: [{
    nominal: 114,
    mass: 113.95066
  }, {
    nominal: 115,
    mass: 114.94737
  }, {
    nominal: 116,
    mass: 115.94128
  }, {
    nominal: 117,
    mass: 116.93814
  }, {
    nominal: 118,
    mass: 117.93306
  }, {
    nominal: 119,
    mass: 118.93066
  }, {
    nominal: 120,
    mass: 119.92605
  }, {
    nominal: 121,
    mass: 120.92405
  }, {
    nominal: 122,
    mass: 121.919904
  }, {
    nominal: 123,
    mass: 122.918781
  }, {
    nominal: 124,
    mass: 123.915094
  }, {
    nominal: 125,
    mass: 124.914472
  }, {
    nominal: 126,
    mass: 125.91125
  }, {
    nominal: 127,
    mass: 126.911091
  }, {
    nominal: 128,
    mass: 127.908342
  }, {
    nominal: 129,
    mass: 128.908681
  }, {
    nominal: 130,
    mass: 129.9063207,
    abundance: 0.00106
  }, {
    nominal: 131,
    mass: 130.906941
  }, {
    nominal: 132,
    mass: 131.9050611,
    abundance: 0.00101
  }, {
    nominal: 133,
    mass: 132.9060074
  }, {
    nominal: 134,
    mass: 133.90450818,
    abundance: 0.02417
  }, {
    nominal: 135,
    mass: 134.90568838,
    abundance: 0.06592
  }, {
    nominal: 136,
    mass: 135.90457573,
    abundance: 0.07854
  }, {
    nominal: 137,
    mass: 136.90582714,
    abundance: 0.11232
  }, {
    nominal: 138,
    mass: 137.905247,
    abundance: 0.71698
  }, {
    nominal: 139,
    mass: 138.9088411
  }, {
    nominal: 140,
    mass: 139.9106057
  }, {
    nominal: 141,
    mass: 140.9144033
  }, {
    nominal: 142,
    mass: 141.9164324
  }, {
    nominal: 143,
    mass: 142.9206253
  }, {
    nominal: 144,
    mass: 143.9229549
  }, {
    nominal: 145,
    mass: 144.9275184
  }, {
    nominal: 146,
    mass: 145.930284
  }, {
    nominal: 147,
    mass: 146.935304
  }, {
    nominal: 148,
    mass: 147.938171
  }, {
    nominal: 149,
    mass: 148.94308
  }, {
    nominal: 150,
    mass: 149.94605
  }, {
    nominal: 151,
    mass: 150.95127
  }, {
    nominal: 152,
    mass: 151.95481
  }, {
    nominal: 153,
    mass: 152.96036
  }],
  symbol: 'Ba',
  mass: 137.3268916286322,
  name: 'Barium',
  monoisotopicMass: 137.905247
}, {
  number: 57,
  isotopes: [{
    nominal: 116,
    mass: 115.9563
  }, {
    nominal: 117,
    mass: 116.94999
  }, {
    nominal: 118,
    mass: 117.94673
  }, {
    nominal: 119,
    mass: 118.94099
  }, {
    nominal: 120,
    mass: 119.93807
  }, {
    nominal: 121,
    mass: 120.93315
  }, {
    nominal: 122,
    mass: 121.93071
  }, {
    nominal: 123,
    mass: 122.9263
  }, {
    nominal: 124,
    mass: 123.924574
  }, {
    nominal: 125,
    mass: 124.920816
  }, {
    nominal: 126,
    mass: 125.919513
  }, {
    nominal: 127,
    mass: 126.916375
  }, {
    nominal: 128,
    mass: 127.915592
  }, {
    nominal: 129,
    mass: 128.912694
  }, {
    nominal: 130,
    mass: 129.912369
  }, {
    nominal: 131,
    mass: 130.91007
  }, {
    nominal: 132,
    mass: 131.910119
  }, {
    nominal: 133,
    mass: 132.908218
  }, {
    nominal: 134,
    mass: 133.908514
  }, {
    nominal: 135,
    mass: 134.906984
  }, {
    nominal: 136,
    mass: 135.907635
  }, {
    nominal: 137,
    mass: 136.9064504
  }, {
    nominal: 138,
    mass: 137.9071149,
    abundance: 0.0008881
  }, {
    nominal: 139,
    mass: 138.9063563,
    abundance: 0.9991119
  }, {
    nominal: 140,
    mass: 139.9094806
  }, {
    nominal: 141,
    mass: 140.910966
  }, {
    nominal: 142,
    mass: 141.9140909
  }, {
    nominal: 143,
    mass: 142.9160795
  }, {
    nominal: 144,
    mass: 143.919646
  }, {
    nominal: 145,
    mass: 144.921808
  }, {
    nominal: 146,
    mass: 145.925875
  }, {
    nominal: 147,
    mass: 146.928418
  }, {
    nominal: 148,
    mass: 147.932679
  }, {
    nominal: 149,
    mass: 148.93535
  }, {
    nominal: 150,
    mass: 149.93947
  }, {
    nominal: 151,
    mass: 150.94232
  }, {
    nominal: 152,
    mass: 151.94682
  }, {
    nominal: 153,
    mass: 152.95036
  }, {
    nominal: 154,
    mass: 153.95517
  }, {
    nominal: 155,
    mass: 154.95901
  }],
  symbol: 'La',
  mass: 138.90546887371266,
  name: 'Lanthanum',
  monoisotopicMass: 138.9063563
}, {
  number: 58,
  isotopes: [{
    nominal: 119,
    mass: 118.95271
  }, {
    nominal: 120,
    mass: 119.94654
  }, {
    nominal: 121,
    mass: 120.94335
  }, {
    nominal: 122,
    mass: 121.93787
  }, {
    nominal: 123,
    mass: 122.93528
  }, {
    nominal: 124,
    mass: 123.93031
  }, {
    nominal: 125,
    mass: 124.92844
  }, {
    nominal: 126,
    mass: 125.923971
  }, {
    nominal: 127,
    mass: 126.922727
  }, {
    nominal: 128,
    mass: 127.918911
  }, {
    nominal: 129,
    mass: 128.918102
  }, {
    nominal: 130,
    mass: 129.914736
  }, {
    nominal: 131,
    mass: 130.914429
  }, {
    nominal: 132,
    mass: 131.911464
  }, {
    nominal: 133,
    mass: 132.91152
  }, {
    nominal: 134,
    mass: 133.908928
  }, {
    nominal: 135,
    mass: 134.909161
  }, {
    nominal: 136,
    mass: 135.90712921,
    abundance: 0.00185
  }, {
    nominal: 137,
    mass: 136.90776236
  }, {
    nominal: 138,
    mass: 137.905991,
    abundance: 0.00251
  }, {
    nominal: 139,
    mass: 138.9066551
  }, {
    nominal: 140,
    mass: 139.9054431,
    abundance: 0.8845
  }, {
    nominal: 141,
    mass: 140.9082807
  }, {
    nominal: 142,
    mass: 141.9092504,
    abundance: 0.11114
  }, {
    nominal: 143,
    mass: 142.9123921
  }, {
    nominal: 144,
    mass: 143.9136529
  }, {
    nominal: 145,
    mass: 144.917265
  }, {
    nominal: 146,
    mass: 145.918802
  }, {
    nominal: 147,
    mass: 146.9226899
  }, {
    nominal: 148,
    mass: 147.924424
  }, {
    nominal: 149,
    mass: 148.928427
  }, {
    nominal: 150,
    mass: 149.930384
  }, {
    nominal: 151,
    mass: 150.934272
  }, {
    nominal: 152,
    mass: 151.9366
  }, {
    nominal: 153,
    mass: 152.94093
  }, {
    nominal: 154,
    mass: 153.9438
  }, {
    nominal: 155,
    mass: 154.94855
  }, {
    nominal: 156,
    mass: 155.95183
  }, {
    nominal: 157,
    mass: 156.95705
  }],
  symbol: 'Ce',
  mass: 140.1157307378545,
  name: 'Cerium',
  monoisotopicMass: 139.9054431
}, {
  number: 59,
  isotopes: [{
    nominal: 121,
    mass: 120.95532
  }, {
    nominal: 122,
    mass: 121.95175
  }, {
    nominal: 123,
    mass: 122.94596
  }, {
    nominal: 124,
    mass: 123.94294
  }, {
    nominal: 125,
    mass: 124.9377
  }, {
    nominal: 126,
    mass: 125.93524
  }, {
    nominal: 127,
    mass: 126.93071
  }, {
    nominal: 128,
    mass: 127.928791
  }, {
    nominal: 129,
    mass: 128.925095
  }, {
    nominal: 130,
    mass: 129.92359
  }, {
    nominal: 131,
    mass: 130.920235
  }, {
    nominal: 132,
    mass: 131.919255
  }, {
    nominal: 133,
    mass: 132.916331
  }, {
    nominal: 134,
    mass: 133.915697
  }, {
    nominal: 135,
    mass: 134.913112
  }, {
    nominal: 136,
    mass: 135.912677
  }, {
    nominal: 137,
    mass: 136.9106792
  }, {
    nominal: 138,
    mass: 137.910754
  }, {
    nominal: 139,
    mass: 138.9089408
  }, {
    nominal: 140,
    mass: 139.9090803
  }, {
    nominal: 141,
    mass: 140.9076576,
    abundance: 1
  }, {
    nominal: 142,
    mass: 141.9100496
  }, {
    nominal: 143,
    mass: 142.9108228
  }, {
    nominal: 144,
    mass: 143.9133109
  }, {
    nominal: 145,
    mass: 144.9145182
  }, {
    nominal: 146,
    mass: 145.91768
  }, {
    nominal: 147,
    mass: 146.919008
  }, {
    nominal: 148,
    mass: 147.92213
  }, {
    nominal: 149,
    mass: 148.923736
  }, {
    nominal: 150,
    mass: 149.9266765
  }, {
    nominal: 151,
    mass: 150.928309
  }, {
    nominal: 152,
    mass: 151.931553
  }, {
    nominal: 153,
    mass: 152.933904
  }, {
    nominal: 154,
    mass: 153.93753
  }, {
    nominal: 155,
    mass: 154.940509
  }, {
    nominal: 156,
    mass: 155.94464
  }, {
    nominal: 157,
    mass: 156.94789
  }, {
    nominal: 158,
    mass: 157.95241
  }, {
    nominal: 159,
    mass: 158.95589
  }],
  symbol: 'Pr',
  mass: 140.9076576,
  name: 'Praseodymium',
  monoisotopicMass: 140.9076576
}, {
  number: 60,
  isotopes: [{
    nominal: 124,
    mass: 123.9522
  }, {
    nominal: 125,
    mass: 124.9489
  }, {
    nominal: 126,
    mass: 125.94311
  }, {
    nominal: 127,
    mass: 126.94038
  }, {
    nominal: 128,
    mass: 127.93525
  }, {
    nominal: 129,
    mass: 128.9331
  }, {
    nominal: 130,
    mass: 129.928506
  }, {
    nominal: 131,
    mass: 130.927248
  }, {
    nominal: 132,
    mass: 131.923321
  }, {
    nominal: 133,
    mass: 132.922348
  }, {
    nominal: 134,
    mass: 133.91879
  }, {
    nominal: 135,
    mass: 134.918181
  }, {
    nominal: 136,
    mass: 135.914976
  }, {
    nominal: 137,
    mass: 136.914562
  }, {
    nominal: 138,
    mass: 137.91195
  }, {
    nominal: 139,
    mass: 138.911954
  }, {
    nominal: 140,
    mass: 139.90955
  }, {
    nominal: 141,
    mass: 140.9096147
  }, {
    nominal: 142,
    mass: 141.907729,
    abundance: 0.27152
  }, {
    nominal: 143,
    mass: 142.90982,
    abundance: 0.12174
  }, {
    nominal: 144,
    mass: 143.910093,
    abundance: 0.23798
  }, {
    nominal: 145,
    mass: 144.9125793,
    abundance: 0.08293
  }, {
    nominal: 146,
    mass: 145.9131226,
    abundance: 0.17189
  }, {
    nominal: 147,
    mass: 146.9161061
  }, {
    nominal: 148,
    mass: 147.9168993,
    abundance: 0.05756
  }, {
    nominal: 149,
    mass: 148.9201548
  }, {
    nominal: 150,
    mass: 149.9209022,
    abundance: 0.05638
  }, {
    nominal: 151,
    mass: 150.9238403
  }, {
    nominal: 152,
    mass: 151.924692
  }, {
    nominal: 153,
    mass: 152.927718
  }, {
    nominal: 154,
    mass: 153.92948
  }, {
    nominal: 155,
    mass: 154.9331357
  }, {
    nominal: 156,
    mass: 155.93508
  }, {
    nominal: 157,
    mass: 156.939386
  }, {
    nominal: 158,
    mass: 157.94197
  }, {
    nominal: 159,
    mass: 158.94653
  }, {
    nominal: 160,
    mass: 159.9494
  }, {
    nominal: 161,
    mass: 160.95428
  }],
  symbol: 'Nd',
  mass: 144.241596031827,
  name: 'Neodymium',
  monoisotopicMass: 141.907729
}, {
  number: 61,
  isotopes: [{
    nominal: 126,
    mass: 125.95792
  }, {
    nominal: 127,
    mass: 126.95192
  }, {
    nominal: 128,
    mass: 127.9487
  }, {
    nominal: 129,
    mass: 128.94323
  }, {
    nominal: 130,
    mass: 129.94053
  }, {
    nominal: 131,
    mass: 130.93567
  }, {
    nominal: 132,
    mass: 131.93384
  }, {
    nominal: 133,
    mass: 132.929782
  }, {
    nominal: 134,
    mass: 133.928353
  }, {
    nominal: 135,
    mass: 134.924823
  }, {
    nominal: 136,
    mass: 135.923585
  }, {
    nominal: 137,
    mass: 136.92048
  }, {
    nominal: 138,
    mass: 137.919548
  }, {
    nominal: 139,
    mass: 138.9168
  }, {
    nominal: 140,
    mass: 139.91604
  }, {
    nominal: 141,
    mass: 140.913555
  }, {
    nominal: 142,
    mass: 141.91289
  }, {
    nominal: 143,
    mass: 142.9109383
  }, {
    nominal: 144,
    mass: 143.9125964
  }, {
    nominal: 145,
    mass: 144.9127559
  }, {
    nominal: 146,
    mass: 145.9147024
  }, {
    nominal: 147,
    mass: 146.915145
  }, {
    nominal: 148,
    mass: 147.9174819
  }, {
    nominal: 149,
    mass: 148.9183423
  }, {
    nominal: 150,
    mass: 149.920991
  }, {
    nominal: 151,
    mass: 150.9212175
  }, {
    nominal: 152,
    mass: 151.923506
  }, {
    nominal: 153,
    mass: 152.9241567
  }, {
    nominal: 154,
    mass: 153.926472
  }, {
    nominal: 155,
    mass: 154.928137
  }, {
    nominal: 156,
    mass: 155.9311175
  }, {
    nominal: 157,
    mass: 156.9331214
  }, {
    nominal: 158,
    mass: 157.936565
  }, {
    nominal: 159,
    mass: 158.939287
  }, {
    nominal: 160,
    mass: 159.9431
  }, {
    nominal: 161,
    mass: 160.94607
  }, {
    nominal: 162,
    mass: 161.95022
  }, {
    nominal: 163,
    mass: 162.95357
  }],
  symbol: 'Pm',
  mass: null,
  name: 'Promethium'
}, {
  number: 62,
  isotopes: [{
    nominal: 128,
    mass: 127.95842
  }, {
    nominal: 129,
    mass: 128.95476
  }, {
    nominal: 130,
    mass: 129.949
  }, {
    nominal: 131,
    mass: 130.94618
  }, {
    nominal: 132,
    mass: 131.94087
  }, {
    nominal: 133,
    mass: 132.93856
  }, {
    nominal: 134,
    mass: 133.93411
  }, {
    nominal: 135,
    mass: 134.93252
  }, {
    nominal: 136,
    mass: 135.928276
  }, {
    nominal: 137,
    mass: 136.926971
  }, {
    nominal: 138,
    mass: 137.923244
  }, {
    nominal: 139,
    mass: 138.922297
  }, {
    nominal: 140,
    mass: 139.918995
  }, {
    nominal: 141,
    mass: 140.9184816
  }, {
    nominal: 142,
    mass: 141.9152044
  }, {
    nominal: 143,
    mass: 142.9146353
  }, {
    nominal: 144,
    mass: 143.9120065,
    abundance: 0.0307
  }, {
    nominal: 145,
    mass: 144.9134173
  }, {
    nominal: 146,
    mass: 145.913047
  }, {
    nominal: 147,
    mass: 146.9149044,
    abundance: 0.1499
  }, {
    nominal: 148,
    mass: 147.9148292,
    abundance: 0.1124
  }, {
    nominal: 149,
    mass: 148.9171921,
    abundance: 0.1382
  }, {
    nominal: 150,
    mass: 149.9172829,
    abundance: 0.0738
  }, {
    nominal: 151,
    mass: 150.9199398
  }, {
    nominal: 152,
    mass: 151.9197397,
    abundance: 0.2675
  }, {
    nominal: 153,
    mass: 152.9221047
  }, {
    nominal: 154,
    mass: 153.9222169,
    abundance: 0.2275
  }, {
    nominal: 155,
    mass: 154.9246477
  }, {
    nominal: 156,
    mass: 155.925536
  }, {
    nominal: 157,
    mass: 156.9284187
  }, {
    nominal: 158,
    mass: 157.929951
  }, {
    nominal: 159,
    mass: 158.9332172
  }, {
    nominal: 160,
    mass: 159.9353353
  }, {
    nominal: 161,
    mass: 160.9391602
  }, {
    nominal: 162,
    mass: 161.94146
  }, {
    nominal: 163,
    mass: 162.94555
  }, {
    nominal: 164,
    mass: 163.94836
  }, {
    nominal: 165,
    mass: 164.95297
  }],
  symbol: 'Sm',
  mass: 150.36635571193,
  name: 'Samarium',
  monoisotopicMass: 151.9197397
}, {
  number: 63,
  isotopes: [{
    nominal: 130,
    mass: 129.96369
  }, {
    nominal: 131,
    mass: 130.95784
  }, {
    nominal: 132,
    mass: 131.95467
  }, {
    nominal: 133,
    mass: 132.94929
  }, {
    nominal: 134,
    mass: 133.9464
  }, {
    nominal: 135,
    mass: 134.94187
  }, {
    nominal: 136,
    mass: 135.93962
  }, {
    nominal: 137,
    mass: 136.93546
  }, {
    nominal: 138,
    mass: 137.933709
  }, {
    nominal: 139,
    mass: 138.929792
  }, {
    nominal: 140,
    mass: 139.928088
  }, {
    nominal: 141,
    mass: 140.924932
  }, {
    nominal: 142,
    mass: 141.923442
  }, {
    nominal: 143,
    mass: 142.920299
  }, {
    nominal: 144,
    mass: 143.91882
  }, {
    nominal: 145,
    mass: 144.9162726
  }, {
    nominal: 146,
    mass: 145.917211
  }, {
    nominal: 147,
    mass: 146.9167527
  }, {
    nominal: 148,
    mass: 147.918089
  }, {
    nominal: 149,
    mass: 148.9179378
  }, {
    nominal: 150,
    mass: 149.9197077
  }, {
    nominal: 151,
    mass: 150.9198578,
    abundance: 0.4781
  }, {
    nominal: 152,
    mass: 151.9217522
  }, {
    nominal: 153,
    mass: 152.921238,
    abundance: 0.5219
  }, {
    nominal: 154,
    mass: 153.922987
  }, {
    nominal: 155,
    mass: 154.9229011
  }, {
    nominal: 156,
    mass: 155.9247605
  }, {
    nominal: 157,
    mass: 156.9254334
  }, {
    nominal: 158,
    mass: 157.927799
  }, {
    nominal: 159,
    mass: 158.9291001
  }, {
    nominal: 160,
    mass: 159.931851
  }, {
    nominal: 161,
    mass: 160.933664
  }, {
    nominal: 162,
    mass: 161.936989
  }, {
    nominal: 163,
    mass: 162.939196
  }, {
    nominal: 164,
    mass: 163.94274
  }, {
    nominal: 165,
    mass: 164.94559
  }, {
    nominal: 166,
    mass: 165.94962
  }, {
    nominal: 167,
    mass: 166.95289
  }],
  symbol: 'Eu',
  mass: 151.96437812637998,
  name: 'Europium',
  monoisotopicMass: 152.921238
}, {
  number: 64,
  isotopes: [{
    nominal: 133,
    mass: 132.96133
  }, {
    nominal: 134,
    mass: 133.95566
  }, {
    nominal: 135,
    mass: 134.95245
  }, {
    nominal: 136,
    mass: 135.9473
  }, {
    nominal: 137,
    mass: 136.94502
  }, {
    nominal: 138,
    mass: 137.94025
  }, {
    nominal: 139,
    mass: 138.93813
  }, {
    nominal: 140,
    mass: 139.933674
  }, {
    nominal: 141,
    mass: 140.932126
  }, {
    nominal: 142,
    mass: 141.928116
  }, {
    nominal: 143,
    mass: 142.92675
  }, {
    nominal: 144,
    mass: 143.922963
  }, {
    nominal: 145,
    mass: 144.921713
  }, {
    nominal: 146,
    mass: 145.9183188
  }, {
    nominal: 147,
    mass: 146.9191014
  }, {
    nominal: 148,
    mass: 147.9181215
  }, {
    nominal: 149,
    mass: 148.9193481
  }, {
    nominal: 150,
    mass: 149.9186644
  }, {
    nominal: 151,
    mass: 150.920356
  }, {
    nominal: 152,
    mass: 151.9197995,
    abundance: 0.002
  }, {
    nominal: 153,
    mass: 152.921758
  }, {
    nominal: 154,
    mass: 153.9208741,
    abundance: 0.0218
  }, {
    nominal: 155,
    mass: 154.9226305,
    abundance: 0.148
  }, {
    nominal: 156,
    mass: 155.9221312,
    abundance: 0.2047
  }, {
    nominal: 157,
    mass: 156.9239686,
    abundance: 0.1565
  }, {
    nominal: 158,
    mass: 157.9241123,
    abundance: 0.2484
  }, {
    nominal: 159,
    mass: 158.926397
  }, {
    nominal: 160,
    mass: 159.9270624,
    abundance: 0.2186
  }, {
    nominal: 161,
    mass: 160.9296775
  }, {
    nominal: 162,
    mass: 161.930993
  }, {
    nominal: 163,
    mass: 162.9341769
  }, {
    nominal: 164,
    mass: 163.93583
  }, {
    nominal: 165,
    mass: 164.93936
  }, {
    nominal: 166,
    mass: 165.94146
  }, {
    nominal: 167,
    mass: 166.94545
  }, {
    nominal: 168,
    mass: 167.94808
  }, {
    nominal: 169,
    mass: 168.9526
  }],
  symbol: 'Gd',
  mass: 157.25213064687998,
  name: 'Gadolinium',
  monoisotopicMass: 157.9241123
}, {
  number: 65,
  isotopes: [{
    nominal: 135,
    mass: 134.96476
  }, {
    nominal: 136,
    mass: 135.96129
  }, {
    nominal: 137,
    mass: 136.95602
  }, {
    nominal: 138,
    mass: 137.95312
  }, {
    nominal: 139,
    mass: 138.94833
  }, {
    nominal: 140,
    mass: 139.94581
  }, {
    nominal: 141,
    mass: 140.94145
  }, {
    nominal: 142,
    mass: 141.93928
  }, {
    nominal: 143,
    mass: 142.935137
  }, {
    nominal: 144,
    mass: 143.933045
  }, {
    nominal: 145,
    mass: 144.92882
  }, {
    nominal: 146,
    mass: 145.927253
  }, {
    nominal: 147,
    mass: 146.9240548
  }, {
    nominal: 148,
    mass: 147.924282
  }, {
    nominal: 149,
    mass: 148.9232535
  }, {
    nominal: 150,
    mass: 149.9236649
  }, {
    nominal: 151,
    mass: 150.9231096
  }, {
    nominal: 152,
    mass: 151.924083
  }, {
    nominal: 153,
    mass: 152.9234424
  }, {
    nominal: 154,
    mass: 153.924685
  }, {
    nominal: 155,
    mass: 154.923511
  }, {
    nominal: 156,
    mass: 155.9247552
  }, {
    nominal: 157,
    mass: 156.924033
  }, {
    nominal: 158,
    mass: 157.9254209
  }, {
    nominal: 159,
    mass: 158.9253547,
    abundance: 1
  }, {
    nominal: 160,
    mass: 159.9271756
  }, {
    nominal: 161,
    mass: 160.9275778
  }, {
    nominal: 162,
    mass: 161.929495
  }, {
    nominal: 163,
    mass: 162.9306547
  }, {
    nominal: 164,
    mass: 163.93336
  }, {
    nominal: 165,
    mass: 164.93498
  }, {
    nominal: 166,
    mass: 165.93786
  }, {
    nominal: 167,
    mass: 166.93996
  }, {
    nominal: 168,
    mass: 167.9434
  }, {
    nominal: 169,
    mass: 168.94597
  }, {
    nominal: 170,
    mass: 169.94984
  }, {
    nominal: 171,
    mass: 170.95273
  }],
  symbol: 'Tb',
  mass: 158.9253547,
  name: 'Terbium',
  monoisotopicMass: 158.9253547
}, {
  number: 66,
  isotopes: [{
    nominal: 138,
    mass: 137.9625
  }, {
    nominal: 139,
    mass: 138.95959
  }, {
    nominal: 140,
    mass: 139.95402
  }, {
    nominal: 141,
    mass: 140.95128
  }, {
    nominal: 142,
    mass: 141.94619
  }, {
    nominal: 143,
    mass: 142.943994
  }, {
    nominal: 144,
    mass: 143.9392695
  }, {
    nominal: 145,
    mass: 144.937474
  }, {
    nominal: 146,
    mass: 145.9328445
  }, {
    nominal: 147,
    mass: 146.9310827
  }, {
    nominal: 148,
    mass: 147.927157
  }, {
    nominal: 149,
    mass: 148.927322
  }, {
    nominal: 150,
    mass: 149.9255933
  }, {
    nominal: 151,
    mass: 150.9261916
  }, {
    nominal: 152,
    mass: 151.9247253
  }, {
    nominal: 153,
    mass: 152.9257724
  }, {
    nominal: 154,
    mass: 153.9244293
  }, {
    nominal: 155,
    mass: 154.925759
  }, {
    nominal: 156,
    mass: 155.9242847,
    abundance: 0.00056
  }, {
    nominal: 157,
    mass: 156.9254707
  }, {
    nominal: 158,
    mass: 157.9244159,
    abundance: 0.00095
  }, {
    nominal: 159,
    mass: 158.925747
  }, {
    nominal: 160,
    mass: 159.9252046,
    abundance: 0.02329
  }, {
    nominal: 161,
    mass: 160.9269405,
    abundance: 0.18889
  }, {
    nominal: 162,
    mass: 161.9268056,
    abundance: 0.25475
  }, {
    nominal: 163,
    mass: 162.9287383,
    abundance: 0.24896
  }, {
    nominal: 164,
    mass: 163.9291819,
    abundance: 0.2826
  }, {
    nominal: 165,
    mass: 164.9317105
  }, {
    nominal: 166,
    mass: 165.9328139
  }, {
    nominal: 167,
    mass: 166.935661
  }, {
    nominal: 168,
    mass: 167.93713
  }, {
    nominal: 169,
    mass: 168.94031
  }, {
    nominal: 170,
    mass: 169.94239
  }, {
    nominal: 171,
    mass: 170.94612
  }, {
    nominal: 172,
    mass: 171.94846
  }, {
    nominal: 173,
    mass: 172.95283
  }],
  symbol: 'Dy',
  mass: 162.499472819424,
  name: 'Dysprosium',
  monoisotopicMass: 163.9291819
}, {
  number: 67,
  isotopes: [{
    nominal: 140,
    mass: 139.96859
  }, {
    nominal: 141,
    mass: 140.96311
  }, {
    nominal: 142,
    mass: 141.96001
  }, {
    nominal: 143,
    mass: 142.95486
  }, {
    nominal: 144,
    mass: 143.9521097
  }, {
    nominal: 145,
    mass: 144.9472674
  }, {
    nominal: 146,
    mass: 145.9449935
  }, {
    nominal: 147,
    mass: 146.9401423
  }, {
    nominal: 148,
    mass: 147.937744
  }, {
    nominal: 149,
    mass: 148.933803
  }, {
    nominal: 150,
    mass: 149.933498
  }, {
    nominal: 151,
    mass: 150.9316983
  }, {
    nominal: 152,
    mass: 151.931724
  }, {
    nominal: 153,
    mass: 152.9302064
  }, {
    nominal: 154,
    mass: 153.9306068
  }, {
    nominal: 155,
    mass: 154.929104
  }, {
    nominal: 156,
    mass: 155.929706
  }, {
    nominal: 157,
    mass: 156.928254
  }, {
    nominal: 158,
    mass: 157.928946
  }, {
    nominal: 159,
    mass: 158.9277197
  }, {
    nominal: 160,
    mass: 159.928737
  }, {
    nominal: 161,
    mass: 160.9278615
  }, {
    nominal: 162,
    mass: 161.9291023
  }, {
    nominal: 163,
    mass: 162.928741
  }, {
    nominal: 164,
    mass: 163.9302403
  }, {
    nominal: 165,
    mass: 164.9303288,
    abundance: 1
  }, {
    nominal: 166,
    mass: 165.9322909
  }, {
    nominal: 167,
    mass: 166.9331385
  }, {
    nominal: 168,
    mass: 167.935522
  }, {
    nominal: 169,
    mass: 168.936878
  }, {
    nominal: 170,
    mass: 169.939625
  }, {
    nominal: 171,
    mass: 170.94147
  }, {
    nominal: 172,
    mass: 171.94473
  }, {
    nominal: 173,
    mass: 172.94702
  }, {
    nominal: 174,
    mass: 173.95095
  }, {
    nominal: 175,
    mass: 174.95362
  }],
  symbol: 'Ho',
  mass: 164.9303288,
  name: 'Holmium',
  monoisotopicMass: 164.9303288
}, {
  number: 68,
  isotopes: [{
    nominal: 142,
    mass: 141.9701
  }, {
    nominal: 143,
    mass: 142.96662
  }, {
    nominal: 144,
    mass: 143.9607
  }, {
    nominal: 145,
    mass: 144.95805
  }, {
    nominal: 146,
    mass: 145.9524184
  }, {
    nominal: 147,
    mass: 146.949964
  }, {
    nominal: 148,
    mass: 147.944735
  }, {
    nominal: 149,
    mass: 148.942306
  }, {
    nominal: 150,
    mass: 149.937916
  }, {
    nominal: 151,
    mass: 150.937449
  }, {
    nominal: 152,
    mass: 151.935057
  }, {
    nominal: 153,
    mass: 152.93508
  }, {
    nominal: 154,
    mass: 153.9327908
  }, {
    nominal: 155,
    mass: 154.9332159
  }, {
    nominal: 156,
    mass: 155.931067
  }, {
    nominal: 157,
    mass: 156.931949
  }, {
    nominal: 158,
    mass: 157.929893
  }, {
    nominal: 159,
    mass: 158.9306918
  }, {
    nominal: 160,
    mass: 159.929077
  }, {
    nominal: 161,
    mass: 160.9300046
  }, {
    nominal: 162,
    mass: 161.9287884,
    abundance: 0.00139
  }, {
    nominal: 163,
    mass: 162.9300408
  }, {
    nominal: 164,
    mass: 163.9292088,
    abundance: 0.01601
  }, {
    nominal: 165,
    mass: 164.9307345
  }, {
    nominal: 166,
    mass: 165.9302995,
    abundance: 0.33503
  }, {
    nominal: 167,
    mass: 166.9320546,
    abundance: 0.22869
  }, {
    nominal: 168,
    mass: 167.9323767,
    abundance: 0.26978
  }, {
    nominal: 169,
    mass: 168.9345968
  }, {
    nominal: 170,
    mass: 169.9354702,
    abundance: 0.1491
  }, {
    nominal: 171,
    mass: 170.9380357
  }, {
    nominal: 172,
    mass: 171.9393619
  }, {
    nominal: 173,
    mass: 172.9424
  }, {
    nominal: 174,
    mass: 173.94423
  }, {
    nominal: 175,
    mass: 174.94777
  }, {
    nominal: 176,
    mass: 175.94994
  }, {
    nominal: 177,
    mass: 176.95399
  }],
  symbol: 'Er',
  mass: 167.259082649669,
  name: 'Erbium',
  monoisotopicMass: 165.9302995
}, {
  number: 69,
  isotopes: [{
    nominal: 144,
    mass: 143.97628
  }, {
    nominal: 145,
    mass: 144.97039
  }, {
    nominal: 146,
    mass: 145.96684
  }, {
    nominal: 147,
    mass: 146.9613799
  }, {
    nominal: 148,
    mass: 147.958384
  }, {
    nominal: 149,
    mass: 148.95289
  }, {
    nominal: 150,
    mass: 149.95009
  }, {
    nominal: 151,
    mass: 150.945488
  }, {
    nominal: 152,
    mass: 151.944422
  }, {
    nominal: 153,
    mass: 152.94204
  }, {
    nominal: 154,
    mass: 153.94157
  }, {
    nominal: 155,
    mass: 154.93921
  }, {
    nominal: 156,
    mass: 155.938992
  }, {
    nominal: 157,
    mass: 156.936944
  }, {
    nominal: 158,
    mass: 157.93698
  }, {
    nominal: 159,
    mass: 158.934975
  }, {
    nominal: 160,
    mass: 159.935263
  }, {
    nominal: 161,
    mass: 160.933549
  }, {
    nominal: 162,
    mass: 161.934002
  }, {
    nominal: 163,
    mass: 162.9326592
  }, {
    nominal: 164,
    mass: 163.933544
  }, {
    nominal: 165,
    mass: 164.9324431
  }, {
    nominal: 166,
    mass: 165.933561
  }, {
    nominal: 167,
    mass: 166.9328562
  }, {
    nominal: 168,
    mass: 167.9341774
  }, {
    nominal: 169,
    mass: 168.9342179,
    abundance: 1
  }, {
    nominal: 170,
    mass: 169.935806
  }, {
    nominal: 171,
    mass: 170.9364339
  }, {
    nominal: 172,
    mass: 171.9384055
  }, {
    nominal: 173,
    mass: 172.9396084
  }, {
    nominal: 174,
    mass: 173.942173
  }, {
    nominal: 175,
    mass: 174.943841
  }, {
    nominal: 176,
    mass: 175.947
  }, {
    nominal: 177,
    mass: 176.94904
  }, {
    nominal: 178,
    mass: 177.95264
  }, {
    nominal: 179,
    mass: 178.95534
  }],
  symbol: 'Tm',
  mass: 168.9342179,
  name: 'Thulium',
  monoisotopicMass: 168.9342179
}, {
  number: 70,
  isotopes: [{
    nominal: 148,
    mass: 147.96758
  }, {
    nominal: 149,
    mass: 148.96436
  }, {
    nominal: 150,
    mass: 149.95852
  }, {
    nominal: 151,
    mass: 150.9554
  }, {
    nominal: 152,
    mass: 151.95027
  }, {
    nominal: 153,
    mass: 152.94932
  }, {
    nominal: 154,
    mass: 153.946396
  }, {
    nominal: 155,
    mass: 154.945783
  }, {
    nominal: 156,
    mass: 155.942825
  }, {
    nominal: 157,
    mass: 156.942645
  }, {
    nominal: 158,
    mass: 157.9398705
  }, {
    nominal: 159,
    mass: 158.940055
  }, {
    nominal: 160,
    mass: 159.937557
  }, {
    nominal: 161,
    mass: 160.937907
  }, {
    nominal: 162,
    mass: 161.935774
  }, {
    nominal: 163,
    mass: 162.93634
  }, {
    nominal: 164,
    mass: 163.934495
  }, {
    nominal: 165,
    mass: 164.93527
  }, {
    nominal: 166,
    mass: 165.9338747
  }, {
    nominal: 167,
    mass: 166.934953
  }, {
    nominal: 168,
    mass: 167.9338896,
    abundance: 0.00123
  }, {
    nominal: 169,
    mass: 168.9351825
  }, {
    nominal: 170,
    mass: 169.9347664,
    abundance: 0.02982
  }, {
    nominal: 171,
    mass: 170.9363302,
    abundance: 0.1409
  }, {
    nominal: 172,
    mass: 171.9363859,
    abundance: 0.2168
  }, {
    nominal: 173,
    mass: 172.9382151,
    abundance: 0.16103
  }, {
    nominal: 174,
    mass: 173.9388664,
    abundance: 0.32026
  }, {
    nominal: 175,
    mass: 174.9412808
  }, {
    nominal: 176,
    mass: 175.9425764,
    abundance: 0.12996
  }, {
    nominal: 177,
    mass: 176.9452656
  }, {
    nominal: 178,
    mass: 177.946651
  }, {
    nominal: 179,
    mass: 178.95004
  }, {
    nominal: 180,
    mass: 179.95212
  }, {
    nominal: 181,
    mass: 180.95589
  }],
  symbol: 'Yb',
  mass: 173.05415016631702,
  name: 'Ytterbium',
  monoisotopicMass: 173.9388664
}, {
  number: 71,
  isotopes: [{
    nominal: 150,
    mass: 149.97355
  }, {
    nominal: 151,
    mass: 150.96768
  }, {
    nominal: 152,
    mass: 151.96412
  }, {
    nominal: 153,
    mass: 152.95875
  }, {
    nominal: 154,
    mass: 153.95736
  }, {
    nominal: 155,
    mass: 154.954321
  }, {
    nominal: 156,
    mass: 155.953033
  }, {
    nominal: 157,
    mass: 156.950127
  }, {
    nominal: 158,
    mass: 157.949316
  }, {
    nominal: 159,
    mass: 158.946636
  }, {
    nominal: 160,
    mass: 159.946033
  }, {
    nominal: 161,
    mass: 160.943572
  }, {
    nominal: 162,
    mass: 161.943283
  }, {
    nominal: 163,
    mass: 162.941179
  }, {
    nominal: 164,
    mass: 163.941339
  }, {
    nominal: 165,
    mass: 164.939407
  }, {
    nominal: 166,
    mass: 165.939859
  }, {
    nominal: 167,
    mass: 166.93827
  }, {
    nominal: 168,
    mass: 167.938736
  }, {
    nominal: 169,
    mass: 168.9376441
  }, {
    nominal: 170,
    mass: 169.938478
  }, {
    nominal: 171,
    mass: 170.937917
  }, {
    nominal: 172,
    mass: 171.9390891
  }, {
    nominal: 173,
    mass: 172.938934
  }, {
    nominal: 174,
    mass: 173.9403409
  }, {
    nominal: 175,
    mass: 174.9407752,
    abundance: 0.97401
  }, {
    nominal: 176,
    mass: 175.9426897,
    abundance: 0.02599
  }, {
    nominal: 177,
    mass: 176.9437615
  }, {
    nominal: 178,
    mass: 177.945958
  }, {
    nominal: 179,
    mass: 178.9473309
  }, {
    nominal: 180,
    mass: 179.949888
  }, {
    nominal: 181,
    mass: 180.95191
  }, {
    nominal: 182,
    mass: 181.95504
  }, {
    nominal: 183,
    mass: 182.957363
  }, {
    nominal: 184,
    mass: 183.96091
  }, {
    nominal: 185,
    mass: 184.96362
  }],
  symbol: 'Lu',
  mass: 174.96681495785498,
  name: 'Lutetium',
  monoisotopicMass: 174.9407752
}, {
  number: 72,
  isotopes: [{
    nominal: 153,
    mass: 152.97069
  }, {
    nominal: 154,
    mass: 153.96486
  }, {
    nominal: 155,
    mass: 154.96311
  }, {
    nominal: 156,
    mass: 155.95935
  }, {
    nominal: 157,
    mass: 156.95824
  }, {
    nominal: 158,
    mass: 157.954801
  }, {
    nominal: 159,
    mass: 158.953996
  }, {
    nominal: 160,
    mass: 159.950691
  }, {
    nominal: 161,
    mass: 160.950278
  }, {
    nominal: 162,
    mass: 161.9472148
  }, {
    nominal: 163,
    mass: 162.947113
  }, {
    nominal: 164,
    mass: 163.944371
  }, {
    nominal: 165,
    mass: 164.944567
  }, {
    nominal: 166,
    mass: 165.94218
  }, {
    nominal: 167,
    mass: 166.9426
  }, {
    nominal: 168,
    mass: 167.940568
  }, {
    nominal: 169,
    mass: 168.941259
  }, {
    nominal: 170,
    mass: 169.939609
  }, {
    nominal: 171,
    mass: 170.940492
  }, {
    nominal: 172,
    mass: 171.93945
  }, {
    nominal: 173,
    mass: 172.940513
  }, {
    nominal: 174,
    mass: 173.9400461,
    abundance: 0.0016
  }, {
    nominal: 175,
    mass: 174.9415092
  }, {
    nominal: 176,
    mass: 175.9414076,
    abundance: 0.0526
  }, {
    nominal: 177,
    mass: 176.9432277,
    abundance: 0.186
  }, {
    nominal: 178,
    mass: 177.9437058,
    abundance: 0.2728
  }, {
    nominal: 179,
    mass: 178.9458232,
    abundance: 0.1362
  }, {
    nominal: 180,
    mass: 179.946557,
    abundance: 0.3508
  }, {
    nominal: 181,
    mass: 180.9491083
  }, {
    nominal: 182,
    mass: 181.9505612
  }, {
    nominal: 183,
    mass: 182.95353
  }, {
    nominal: 184,
    mass: 183.955446
  }, {
    nominal: 185,
    mass: 184.958862
  }, {
    nominal: 186,
    mass: 185.960897
  }, {
    nominal: 187,
    mass: 186.96477
  }, {
    nominal: 188,
    mass: 187.96685
  }, {
    nominal: 189,
    mass: 188.97084
  }],
  symbol: 'Hf',
  mass: 178.4849787234,
  name: 'Hafnium',
  monoisotopicMass: 179.946557
}, {
  number: 73,
  isotopes: [{
    nominal: 155,
    mass: 154.97424
  }, {
    nominal: 156,
    mass: 155.97203
  }, {
    nominal: 157,
    mass: 156.96818
  }, {
    nominal: 158,
    mass: 157.96654
  }, {
    nominal: 159,
    mass: 158.963023
  }, {
    nominal: 160,
    mass: 159.961488
  }, {
    nominal: 161,
    mass: 160.958452
  }, {
    nominal: 162,
    mass: 161.957294
  }, {
    nominal: 163,
    mass: 162.954337
  }, {
    nominal: 164,
    mass: 163.953534
  }, {
    nominal: 165,
    mass: 164.950781
  }, {
    nominal: 166,
    mass: 165.950512
  }, {
    nominal: 167,
    mass: 166.948093
  }, {
    nominal: 168,
    mass: 167.948047
  }, {
    nominal: 169,
    mass: 168.946011
  }, {
    nominal: 170,
    mass: 169.946175
  }, {
    nominal: 171,
    mass: 170.944476
  }, {
    nominal: 172,
    mass: 171.944895
  }, {
    nominal: 173,
    mass: 172.94375
  }, {
    nominal: 174,
    mass: 173.944454
  }, {
    nominal: 175,
    mass: 174.943737
  }, {
    nominal: 176,
    mass: 175.944857
  }, {
    nominal: 177,
    mass: 176.9444795
  }, {
    nominal: 178,
    mass: 177.945678
  }, {
    nominal: 179,
    mass: 178.9459366
  }, {
    nominal: 180,
    mass: 179.9474648,
    abundance: 0.0001201
  }, {
    nominal: 181,
    mass: 180.9479958,
    abundance: 0.9998799
  }, {
    nominal: 182,
    mass: 181.9501519
  }, {
    nominal: 183,
    mass: 182.9513726
  }, {
    nominal: 184,
    mass: 183.954008
  }, {
    nominal: 185,
    mass: 184.955559
  }, {
    nominal: 186,
    mass: 185.958551
  }, {
    nominal: 187,
    mass: 186.960386
  }, {
    nominal: 188,
    mass: 187.963916
  }, {
    nominal: 189,
    mass: 188.96583
  }, {
    nominal: 190,
    mass: 189.96939
  }, {
    nominal: 191,
    mass: 190.97156
  }, {
    nominal: 192,
    mass: 191.97514
  }],
  symbol: 'Ta',
  mass: 180.9478756362269,
  name: 'Tantalum',
  monoisotopicMass: 180.9479958
}, {
  number: 74,
  isotopes: [{
    nominal: 157,
    mass: 156.97884
  }, {
    nominal: 158,
    mass: 157.97456
  }, {
    nominal: 159,
    mass: 158.97264
  }, {
    nominal: 160,
    mass: 159.96846
  }, {
    nominal: 161,
    mass: 160.9672
  }, {
    nominal: 162,
    mass: 161.963499
  }, {
    nominal: 163,
    mass: 162.962524
  }, {
    nominal: 164,
    mass: 163.958961
  }, {
    nominal: 165,
    mass: 164.958281
  }, {
    nominal: 166,
    mass: 165.955031
  }, {
    nominal: 167,
    mass: 166.954805
  }, {
    nominal: 168,
    mass: 167.951806
  }, {
    nominal: 169,
    mass: 168.951779
  }, {
    nominal: 170,
    mass: 169.949232
  }, {
    nominal: 171,
    mass: 170.949451
  }, {
    nominal: 172,
    mass: 171.947292
  }, {
    nominal: 173,
    mass: 172.947689
  }, {
    nominal: 174,
    mass: 173.946079
  }, {
    nominal: 175,
    mass: 174.946717
  }, {
    nominal: 176,
    mass: 175.945634
  }, {
    nominal: 177,
    mass: 176.946643
  }, {
    nominal: 178,
    mass: 177.945883
  }, {
    nominal: 179,
    mass: 178.947077
  }, {
    nominal: 180,
    mass: 179.9467108,
    abundance: 0.0012
  }, {
    nominal: 181,
    mass: 180.9481978
  }, {
    nominal: 182,
    mass: 181.94820394,
    abundance: 0.265
  }, {
    nominal: 183,
    mass: 182.95022275,
    abundance: 0.1431
  }, {
    nominal: 184,
    mass: 183.95093092,
    abundance: 0.3064
  }, {
    nominal: 185,
    mass: 184.95341897
  }, {
    nominal: 186,
    mass: 185.9543628,
    abundance: 0.2843
  }, {
    nominal: 187,
    mass: 186.9571588
  }, {
    nominal: 188,
    mass: 187.9584862
  }, {
    nominal: 189,
    mass: 188.961763
  }, {
    nominal: 190,
    mass: 189.963091
  }, {
    nominal: 191,
    mass: 190.966531
  }, {
    nominal: 192,
    mass: 191.96817
  }, {
    nominal: 193,
    mass: 192.97178
  }, {
    nominal: 194,
    mass: 193.97367
  }],
  symbol: 'W',
  mass: 183.841777550513,
  name: 'Tungsten',
  monoisotopicMass: 183.95093092
}, {
  number: 75,
  isotopes: [{
    nominal: 159,
    mass: 158.98418
  }, {
    nominal: 160,
    mass: 159.98182
  }, {
    nominal: 161,
    mass: 160.97757
  }, {
    nominal: 162,
    mass: 161.97584
  }, {
    nominal: 163,
    mass: 162.97208
  }, {
    nominal: 164,
    mass: 163.970453
  }, {
    nominal: 165,
    mass: 164.967103
  }, {
    nominal: 166,
    mass: 165.965761
  }, {
    nominal: 167,
    mass: 166.962595
  }, {
    nominal: 168,
    mass: 167.961573
  }, {
    nominal: 169,
    mass: 168.958766
  }, {
    nominal: 170,
    mass: 169.95822
  }, {
    nominal: 171,
    mass: 170.955716
  }, {
    nominal: 172,
    mass: 171.95542
  }, {
    nominal: 173,
    mass: 172.953243
  }, {
    nominal: 174,
    mass: 173.953115
  }, {
    nominal: 175,
    mass: 174.951381
  }, {
    nominal: 176,
    mass: 175.951623
  }, {
    nominal: 177,
    mass: 176.950328
  }, {
    nominal: 178,
    mass: 177.950989
  }, {
    nominal: 179,
    mass: 178.949989
  }, {
    nominal: 180,
    mass: 179.950792
  }, {
    nominal: 181,
    mass: 180.950058
  }, {
    nominal: 182,
    mass: 181.95121
  }, {
    nominal: 183,
    mass: 182.9508196
  }, {
    nominal: 184,
    mass: 183.9525228
  }, {
    nominal: 185,
    mass: 184.9529545,
    abundance: 0.374
  }, {
    nominal: 186,
    mass: 185.9549856
  }, {
    nominal: 187,
    mass: 186.9557501,
    abundance: 0.626
  }, {
    nominal: 188,
    mass: 187.9581115
  }, {
    nominal: 189,
    mass: 188.959226
  }, {
    nominal: 190,
    mass: 189.961744
  }, {
    nominal: 191,
    mass: 190.963122
  }, {
    nominal: 192,
    mass: 191.966088
  }, {
    nominal: 193,
    mass: 192.967541
  }, {
    nominal: 194,
    mass: 193.97076
  }, {
    nominal: 195,
    mass: 194.97254
  }, {
    nominal: 196,
    mass: 195.9758
  }, {
    nominal: 197,
    mass: 196.97799
  }, {
    nominal: 198,
    mass: 197.9816
  }],
  symbol: 'Re',
  mass: 186.20670454560002,
  name: 'Rhenium',
  monoisotopicMass: 186.9557501
}, {
  number: 76,
  isotopes: [{
    nominal: 161,
    mass: 160.98903
  }, {
    nominal: 162,
    mass: 161.98443
  }, {
    nominal: 163,
    mass: 162.98241
  }, {
    nominal: 164,
    mass: 163.97802
  }, {
    nominal: 165,
    mass: 164.9766
  }, {
    nominal: 166,
    mass: 165.972692
  }, {
    nominal: 167,
    mass: 166.971549
  }, {
    nominal: 168,
    mass: 167.967808
  }, {
    nominal: 169,
    mass: 168.967018
  }, {
    nominal: 170,
    mass: 169.963578
  }, {
    nominal: 171,
    mass: 170.963174
  }, {
    nominal: 172,
    mass: 171.960017
  }, {
    nominal: 173,
    mass: 172.959808
  }, {
    nominal: 174,
    mass: 173.957064
  }, {
    nominal: 175,
    mass: 174.956945
  }, {
    nominal: 176,
    mass: 175.954806
  }, {
    nominal: 177,
    mass: 176.954966
  }, {
    nominal: 178,
    mass: 177.953254
  }, {
    nominal: 179,
    mass: 178.953817
  }, {
    nominal: 180,
    mass: 179.952375
  }, {
    nominal: 181,
    mass: 180.953247
  }, {
    nominal: 182,
    mass: 181.95211
  }, {
    nominal: 183,
    mass: 182.953125
  }, {
    nominal: 184,
    mass: 183.9524885,
    abundance: 0.0002
  }, {
    nominal: 185,
    mass: 184.9540417
  }, {
    nominal: 186,
    mass: 185.953835,
    abundance: 0.0159
  }, {
    nominal: 187,
    mass: 186.9557474,
    abundance: 0.0196
  }, {
    nominal: 188,
    mass: 187.9558352,
    abundance: 0.1324
  }, {
    nominal: 189,
    mass: 188.9581442,
    abundance: 0.1615
  }, {
    nominal: 190,
    mass: 189.9584437,
    abundance: 0.2626
  }, {
    nominal: 191,
    mass: 190.9609264
  }, {
    nominal: 192,
    mass: 191.961477,
    abundance: 0.4078
  }, {
    nominal: 193,
    mass: 192.9641479
  }, {
    nominal: 194,
    mass: 193.9651772
  }, {
    nominal: 195,
    mass: 194.968318
  }, {
    nominal: 196,
    mass: 195.969641
  }, {
    nominal: 197,
    mass: 196.97283
  }, {
    nominal: 198,
    mass: 197.97441
  }, {
    nominal: 199,
    mass: 198.97801
  }, {
    nominal: 200,
    mass: 199.97984
  }, {
    nominal: 201,
    mass: 200.98364
  }, {
    nominal: 202,
    mass: 201.98595
  }],
  symbol: 'Os',
  mass: 190.22485962823998,
  name: 'Osmium',
  monoisotopicMass: 191.961477
}, {
  number: 77,
  isotopes: [{
    nominal: 164,
    mass: 163.99191
  }, {
    nominal: 165,
    mass: 164.9875
  }, {
    nominal: 166,
    mass: 165.98566
  }, {
    nominal: 167,
    mass: 166.981666
  }, {
    nominal: 168,
    mass: 167.979907
  }, {
    nominal: 169,
    mass: 168.976298
  }, {
    nominal: 170,
    mass: 169.974922
  }, {
    nominal: 171,
    mass: 170.97164
  }, {
    nominal: 172,
    mass: 171.970607
  }, {
    nominal: 173,
    mass: 172.967506
  }, {
    nominal: 174,
    mass: 173.966861
  }, {
    nominal: 175,
    mass: 174.96415
  }, {
    nominal: 176,
    mass: 175.96365
  }, {
    nominal: 177,
    mass: 176.961301
  }, {
    nominal: 178,
    mass: 177.961082
  }, {
    nominal: 179,
    mass: 178.95912
  }, {
    nominal: 180,
    mass: 179.959229
  }, {
    nominal: 181,
    mass: 180.957625
  }, {
    nominal: 182,
    mass: 181.958076
  }, {
    nominal: 183,
    mass: 182.95684
  }, {
    nominal: 184,
    mass: 183.957476
  }, {
    nominal: 185,
    mass: 184.956698
  }, {
    nominal: 186,
    mass: 185.957944
  }, {
    nominal: 187,
    mass: 186.957542
  }, {
    nominal: 188,
    mass: 187.958828
  }, {
    nominal: 189,
    mass: 188.958715
  }, {
    nominal: 190,
    mass: 189.9605412
  }, {
    nominal: 191,
    mass: 190.9605893,
    abundance: 0.373
  }, {
    nominal: 192,
    mass: 191.9626002
  }, {
    nominal: 193,
    mass: 192.9629216,
    abundance: 0.627
  }, {
    nominal: 194,
    mass: 193.9650735
  }, {
    nominal: 195,
    mass: 194.9659747
  }, {
    nominal: 196,
    mass: 195.968397
  }, {
    nominal: 197,
    mass: 196.969655
  }, {
    nominal: 198,
    mass: 197.97228
  }, {
    nominal: 199,
    mass: 198.973805
  }, {
    nominal: 200,
    mass: 199.9768
  }, {
    nominal: 201,
    mass: 200.97864
  }, {
    nominal: 202,
    mass: 201.98199
  }, {
    nominal: 203,
    mass: 202.98423
  }, {
    nominal: 204,
    mass: 203.9896
  }],
  symbol: 'Ir',
  mass: 192.2160516521,
  name: 'Iridium',
  monoisotopicMass: 192.9629216
}, {
  number: 78,
  isotopes: [{
    nominal: 166,
    mass: 165.99486
  }, {
    nominal: 167,
    mass: 166.99269
  }, {
    nominal: 168,
    mass: 167.98813
  }, {
    nominal: 169,
    mass: 168.98657
  }, {
    nominal: 170,
    mass: 169.982496
  }, {
    nominal: 171,
    mass: 170.981245
  }, {
    nominal: 172,
    mass: 171.977351
  }, {
    nominal: 173,
    mass: 172.976443
  }, {
    nominal: 174,
    mass: 173.97282
  }, {
    nominal: 175,
    mass: 174.97241
  }, {
    nominal: 176,
    mass: 175.968938
  }, {
    nominal: 177,
    mass: 176.96847
  }, {
    nominal: 178,
    mass: 177.96565
  }, {
    nominal: 179,
    mass: 178.965359
  }, {
    nominal: 180,
    mass: 179.963032
  }, {
    nominal: 181,
    mass: 180.963098
  }, {
    nominal: 182,
    mass: 181.961172
  }, {
    nominal: 183,
    mass: 182.961597
  }, {
    nominal: 184,
    mass: 183.959915
  }, {
    nominal: 185,
    mass: 184.960614
  }, {
    nominal: 186,
    mass: 185.959351
  }, {
    nominal: 187,
    mass: 186.960617
  }, {
    nominal: 188,
    mass: 187.9593889
  }, {
    nominal: 189,
    mass: 188.960831
  }, {
    nominal: 190,
    mass: 189.9599297,
    abundance: 0.00012
  }, {
    nominal: 191,
    mass: 190.9616729
  }, {
    nominal: 192,
    mass: 191.9610387,
    abundance: 0.00782
  }, {
    nominal: 193,
    mass: 192.9629824
  }, {
    nominal: 194,
    mass: 193.9626809,
    abundance: 0.3286
  }, {
    nominal: 195,
    mass: 194.9647917,
    abundance: 0.3378
  }, {
    nominal: 196,
    mass: 195.96495209,
    abundance: 0.2521
  }, {
    nominal: 197,
    mass: 196.96734069
  }, {
    nominal: 198,
    mass: 197.9678949,
    abundance: 0.07356
  }, {
    nominal: 199,
    mass: 198.9705952
  }, {
    nominal: 200,
    mass: 199.971443
  }, {
    nominal: 201,
    mass: 200.974513
  }, {
    nominal: 202,
    mass: 201.975639
  }, {
    nominal: 203,
    mass: 202.97893
  }, {
    nominal: 204,
    mass: 203.98076
  }, {
    nominal: 205,
    mass: 204.98608
  }, {
    nominal: 206,
    mass: 205.98966
  }],
  symbol: 'Pt',
  mass: 195.084456864931,
  name: 'Platinum',
  monoisotopicMass: 194.9647917
}, {
  number: 79,
  isotopes: [{
    nominal: 169,
    mass: 168.99808
  }, {
    nominal: 170,
    mass: 169.99597
  }, {
    nominal: 171,
    mass: 170.991876
  }, {
    nominal: 172,
    mass: 171.989942
  }, {
    nominal: 173,
    mass: 172.986241
  }, {
    nominal: 174,
    mass: 173.984717
  }, {
    nominal: 175,
    mass: 174.981304
  }, {
    nominal: 176,
    mass: 175.98025
  }, {
    nominal: 177,
    mass: 176.97687
  }, {
    nominal: 178,
    mass: 177.976032
  }, {
    nominal: 179,
    mass: 178.973174
  }, {
    nominal: 180,
    mass: 179.972523
  }, {
    nominal: 181,
    mass: 180.970079
  }, {
    nominal: 182,
    mass: 181.969618
  }, {
    nominal: 183,
    mass: 182.967591
  }, {
    nominal: 184,
    mass: 183.967452
  }, {
    nominal: 185,
    mass: 184.96579
  }, {
    nominal: 186,
    mass: 185.965953
  }, {
    nominal: 187,
    mass: 186.964543
  }, {
    nominal: 188,
    mass: 187.965349
  }, {
    nominal: 189,
    mass: 188.963948
  }, {
    nominal: 190,
    mass: 189.964698
  }, {
    nominal: 191,
    mass: 190.963702
  }, {
    nominal: 192,
    mass: 191.964814
  }, {
    nominal: 193,
    mass: 192.9641373
  }, {
    nominal: 194,
    mass: 193.9654178
  }, {
    nominal: 195,
    mass: 194.9650352
  }, {
    nominal: 196,
    mass: 195.9665699
  }, {
    nominal: 197,
    mass: 196.96656879,
    abundance: 1
  }, {
    nominal: 198,
    mass: 197.96824242
  }, {
    nominal: 199,
    mass: 198.96876528
  }, {
    nominal: 200,
    mass: 199.970756
  }, {
    nominal: 201,
    mass: 200.9716575
  }, {
    nominal: 202,
    mass: 201.973856
  }, {
    nominal: 203,
    mass: 202.9751544
  }, {
    nominal: 204,
    mass: 203.97783
  }, {
    nominal: 205,
    mass: 204.97985
  }, {
    nominal: 206,
    mass: 205.98474
  }, {
    nominal: 207,
    mass: 206.9884
  }, {
    nominal: 208,
    mass: 207.99345
  }, {
    nominal: 209,
    mass: 208.99735
  }, {
    nominal: 210,
    mass: 210.0025
  }],
  symbol: 'Au',
  mass: 196.96656879,
  name: 'Gold',
  monoisotopicMass: 196.96656879
}, {
  number: 80,
  isotopes: [{
    nominal: 171,
    mass: 171.00353
  }, {
    nominal: 172,
    mass: 171.99881
  }, {
    nominal: 173,
    mass: 172.99709
  }, {
    nominal: 174,
    mass: 173.992865
  }, {
    nominal: 175,
    mass: 174.991441
  }, {
    nominal: 176,
    mass: 175.987361
  }, {
    nominal: 177,
    mass: 176.986277
  }, {
    nominal: 178,
    mass: 177.982484
  }, {
    nominal: 179,
    mass: 178.981831
  }, {
    nominal: 180,
    mass: 179.97826
  }, {
    nominal: 181,
    mass: 180.977819
  }, {
    nominal: 182,
    mass: 181.974689
  }, {
    nominal: 183,
    mass: 182.9744448
  }, {
    nominal: 184,
    mass: 183.971714
  }, {
    nominal: 185,
    mass: 184.971899
  }, {
    nominal: 186,
    mass: 185.969362
  }, {
    nominal: 187,
    mass: 186.969814
  }, {
    nominal: 188,
    mass: 187.967567
  }, {
    nominal: 189,
    mass: 188.968195
  }, {
    nominal: 190,
    mass: 189.966323
  }, {
    nominal: 191,
    mass: 190.967157
  }, {
    nominal: 192,
    mass: 191.965635
  }, {
    nominal: 193,
    mass: 192.966653
  }, {
    nominal: 194,
    mass: 193.9654491
  }, {
    nominal: 195,
    mass: 194.966721
  }, {
    nominal: 196,
    mass: 195.9658326,
    abundance: 0.0015
  }, {
    nominal: 197,
    mass: 196.9672128
  }, {
    nominal: 198,
    mass: 197.9667686,
    abundance: 0.0997
  }, {
    nominal: 199,
    mass: 198.96828064,
    abundance: 0.1687
  }, {
    nominal: 200,
    mass: 199.96832659,
    abundance: 0.231
  }, {
    nominal: 201,
    mass: 200.97030284,
    abundance: 0.1318
  }, {
    nominal: 202,
    mass: 201.9706434,
    abundance: 0.2986
  }, {
    nominal: 203,
    mass: 202.9728728
  }, {
    nominal: 204,
    mass: 203.97349398,
    abundance: 0.0687
  }, {
    nominal: 205,
    mass: 204.9760734
  }, {
    nominal: 206,
    mass: 205.977514
  }, {
    nominal: 207,
    mass: 206.9823
  }, {
    nominal: 208,
    mass: 207.985759
  }, {
    nominal: 209,
    mass: 208.99072
  }, {
    nominal: 210,
    mass: 209.99424
  }, {
    nominal: 211,
    mass: 210.99933
  }, {
    nominal: 212,
    mass: 212.00296
  }, {
    nominal: 213,
    mass: 213.00823
  }, {
    nominal: 214,
    mass: 214.012
  }, {
    nominal: 215,
    mass: 215.0174
  }, {
    nominal: 216,
    mass: 216.02132
  }],
  symbol: 'Hg',
  mass: 200.59916703455602,
  name: 'Mercury',
  monoisotopicMass: 201.9706434
}, {
  number: 81,
  isotopes: [{
    nominal: 176,
    mass: 176.000624
  }, {
    nominal: 177,
    mass: 176.996431
  }, {
    nominal: 178,
    mass: 177.99485
  }, {
    nominal: 179,
    mass: 178.991111
  }, {
    nominal: 180,
    mass: 179.990057
  }, {
    nominal: 181,
    mass: 180.98626
  }, {
    nominal: 182,
    mass: 181.985713
  }, {
    nominal: 183,
    mass: 182.982193
  }, {
    nominal: 184,
    mass: 183.981886
  }, {
    nominal: 185,
    mass: 184.978789
  }, {
    nominal: 186,
    mass: 185.978651
  }, {
    nominal: 187,
    mass: 186.9759063
  }, {
    nominal: 188,
    mass: 187.976021
  }, {
    nominal: 189,
    mass: 188.973588
  }, {
    nominal: 190,
    mass: 189.973828
  }, {
    nominal: 191,
    mass: 190.9717842
  }, {
    nominal: 192,
    mass: 191.972225
  }, {
    nominal: 193,
    mass: 192.970502
  }, {
    nominal: 194,
    mass: 193.971081
  }, {
    nominal: 195,
    mass: 194.969774
  }, {
    nominal: 196,
    mass: 195.970481
  }, {
    nominal: 197,
    mass: 196.969576
  }, {
    nominal: 198,
    mass: 197.970483
  }, {
    nominal: 199,
    mass: 198.969877
  }, {
    nominal: 200,
    mass: 199.9709633
  }, {
    nominal: 201,
    mass: 200.970822
  }, {
    nominal: 202,
    mass: 201.972102
  }, {
    nominal: 203,
    mass: 202.9723446,
    abundance: 0.2952
  }, {
    nominal: 204,
    mass: 203.9738639
  }, {
    nominal: 205,
    mass: 204.9744278,
    abundance: 0.7048
  }, {
    nominal: 206,
    mass: 205.9761106
  }, {
    nominal: 207,
    mass: 206.9774197
  }, {
    nominal: 208,
    mass: 207.982019
  }, {
    nominal: 209,
    mass: 208.9853594
  }, {
    nominal: 210,
    mass: 209.990074
  }, {
    nominal: 211,
    mass: 210.993475
  }, {
    nominal: 212,
    mass: 211.99834
  }, {
    nominal: 213,
    mass: 213.001915
  }, {
    nominal: 214,
    mass: 214.00694
  }, {
    nominal: 215,
    mass: 215.01064
  }, {
    nominal: 216,
    mass: 216.0158
  }, {
    nominal: 217,
    mass: 217.01966
  }, {
    nominal: 218,
    mass: 218.02479
  }],
  symbol: 'Tl',
  mass: 204.38341283936,
  name: 'Thallium',
  monoisotopicMass: 204.9744278
}, {
  number: 82,
  isotopes: [{
    nominal: 178,
    mass: 178.003831
  }, {
    nominal: 179,
    mass: 179.002201
  }, {
    nominal: 180,
    mass: 179.997928
  }, {
    nominal: 181,
    mass: 180.996653
  }, {
    nominal: 182,
    mass: 181.992672
  }, {
    nominal: 183,
    mass: 182.991872
  }, {
    nominal: 184,
    mass: 183.988136
  }, {
    nominal: 185,
    mass: 184.98761
  }, {
    nominal: 186,
    mass: 185.984238
  }, {
    nominal: 187,
    mass: 186.9839109
  }, {
    nominal: 188,
    mass: 187.980875
  }, {
    nominal: 189,
    mass: 188.980807
  }, {
    nominal: 190,
    mass: 189.978082
  }, {
    nominal: 191,
    mass: 190.978276
  }, {
    nominal: 192,
    mass: 191.975775
  }, {
    nominal: 193,
    mass: 192.976173
  }, {
    nominal: 194,
    mass: 193.974012
  }, {
    nominal: 195,
    mass: 194.974543
  }, {
    nominal: 196,
    mass: 195.972774
  }, {
    nominal: 197,
    mass: 196.9734312
  }, {
    nominal: 198,
    mass: 197.972034
  }, {
    nominal: 199,
    mass: 198.972913
  }, {
    nominal: 200,
    mass: 199.971819
  }, {
    nominal: 201,
    mass: 200.972883
  }, {
    nominal: 202,
    mass: 201.972152
  }, {
    nominal: 203,
    mass: 202.9733911
  }, {
    nominal: 204,
    mass: 203.973044,
    abundance: 0.014
  }, {
    nominal: 205,
    mass: 204.9744822
  }, {
    nominal: 206,
    mass: 205.9744657,
    abundance: 0.241
  }, {
    nominal: 207,
    mass: 206.9758973,
    abundance: 0.221
  }, {
    nominal: 208,
    mass: 207.9766525,
    abundance: 0.524
  }, {
    nominal: 209,
    mass: 208.9810905
  }, {
    nominal: 210,
    mass: 209.9841889
  }, {
    nominal: 211,
    mass: 210.9887371
  }, {
    nominal: 212,
    mass: 211.9918977
  }, {
    nominal: 213,
    mass: 212.9965629
  }, {
    nominal: 214,
    mass: 213.9998059
  }, {
    nominal: 215,
    mass: 215.00474
  }, {
    nominal: 216,
    mass: 216.00803
  }, {
    nominal: 217,
    mass: 217.01314
  }, {
    nominal: 218,
    mass: 218.01659
  }, {
    nominal: 219,
    mass: 219.02177
  }, {
    nominal: 220,
    mass: 220.02541
  }],
  symbol: 'Pb',
  mass: 207.216908063,
  name: 'Lead',
  monoisotopicMass: 207.9766525
}, {
  number: 83,
  isotopes: [{
    nominal: 184,
    mass: 184.001275
  }, {
    nominal: 185,
    mass: 184.9976
  }, {
    nominal: 186,
    mass: 185.996644
  }, {
    nominal: 187,
    mass: 186.993147
  }, {
    nominal: 188,
    mass: 187.992287
  }, {
    nominal: 189,
    mass: 188.989195
  }, {
    nominal: 190,
    mass: 189.988622
  }, {
    nominal: 191,
    mass: 190.9857866
  }, {
    nominal: 192,
    mass: 191.985469
  }, {
    nominal: 193,
    mass: 192.98296
  }, {
    nominal: 194,
    mass: 193.982785
  }, {
    nominal: 195,
    mass: 194.9806488
  }, {
    nominal: 196,
    mass: 195.980667
  }, {
    nominal: 197,
    mass: 196.9788651
  }, {
    nominal: 198,
    mass: 197.979206
  }, {
    nominal: 199,
    mass: 198.977673
  }, {
    nominal: 200,
    mass: 199.978131
  }, {
    nominal: 201,
    mass: 200.97701
  }, {
    nominal: 202,
    mass: 201.977734
  }, {
    nominal: 203,
    mass: 202.976893
  }, {
    nominal: 204,
    mass: 203.9778361
  }, {
    nominal: 205,
    mass: 204.9773867
  }, {
    nominal: 206,
    mass: 205.9784993
  }, {
    nominal: 207,
    mass: 206.978471
  }, {
    nominal: 208,
    mass: 207.9797425
  }, {
    nominal: 209,
    mass: 208.9803991,
    abundance: 1
  }, {
    nominal: 210,
    mass: 209.9841207
  }, {
    nominal: 211,
    mass: 210.9872697
  }, {
    nominal: 212,
    mass: 211.991286
  }, {
    nominal: 213,
    mass: 212.9943851
  }, {
    nominal: 214,
    mass: 213.998712
  }, {
    nominal: 215,
    mass: 215.00177
  }, {
    nominal: 216,
    mass: 216.006306
  }, {
    nominal: 217,
    mass: 217.009372
  }, {
    nominal: 218,
    mass: 218.014188
  }, {
    nominal: 219,
    mass: 219.01748
  }, {
    nominal: 220,
    mass: 220.02235
  }, {
    nominal: 221,
    mass: 221.02587
  }, {
    nominal: 222,
    mass: 222.03078
  }, {
    nominal: 223,
    mass: 223.0345
  }, {
    nominal: 224,
    mass: 224.03947
  }],
  symbol: 'Bi',
  mass: 208.9803991,
  name: 'Bismuth',
  monoisotopicMass: 208.9803991
}, {
  number: 84,
  isotopes: [{
    nominal: 186,
    mass: 186.004393
  }, {
    nominal: 187,
    mass: 187.003041
  }, {
    nominal: 188,
    mass: 187.999416
  }, {
    nominal: 189,
    mass: 188.998473
  }, {
    nominal: 190,
    mass: 189.995101
  }, {
    nominal: 191,
    mass: 190.9945585
  }, {
    nominal: 192,
    mass: 191.991336
  }, {
    nominal: 193,
    mass: 192.991026
  }, {
    nominal: 194,
    mass: 193.988186
  }, {
    nominal: 195,
    mass: 194.988126
  }, {
    nominal: 196,
    mass: 195.985526
  }, {
    nominal: 197,
    mass: 196.98566
  }, {
    nominal: 198,
    mass: 197.983389
  }, {
    nominal: 199,
    mass: 198.983667
  }, {
    nominal: 200,
    mass: 199.981799
  }, {
    nominal: 201,
    mass: 200.9822598
  }, {
    nominal: 202,
    mass: 201.980758
  }, {
    nominal: 203,
    mass: 202.9814161
  }, {
    nominal: 204,
    mass: 203.98031
  }, {
    nominal: 205,
    mass: 204.981203
  }, {
    nominal: 206,
    mass: 205.980474
  }, {
    nominal: 207,
    mass: 206.9815938
  }, {
    nominal: 208,
    mass: 207.9812461
  }, {
    nominal: 209,
    mass: 208.9824308
  }, {
    nominal: 210,
    mass: 209.9828741
  }, {
    nominal: 211,
    mass: 210.9866536
  }, {
    nominal: 212,
    mass: 211.9888684
  }, {
    nominal: 213,
    mass: 212.9928576
  }, {
    nominal: 214,
    mass: 213.9952017
  }, {
    nominal: 215,
    mass: 214.9994201
  }, {
    nominal: 216,
    mass: 216.0019152
  }, {
    nominal: 217,
    mass: 217.0063182
  }, {
    nominal: 218,
    mass: 218.0089735
  }, {
    nominal: 219,
    mass: 219.013614
  }, {
    nominal: 220,
    mass: 220.016386
  }, {
    nominal: 221,
    mass: 221.021228
  }, {
    nominal: 222,
    mass: 222.02414
  }, {
    nominal: 223,
    mass: 223.02907
  }, {
    nominal: 224,
    mass: 224.03211
  }, {
    nominal: 225,
    mass: 225.03707
  }, {
    nominal: 226,
    mass: 226.04031
  }, {
    nominal: 227,
    mass: 227.04539
  }],
  symbol: 'Po',
  mass: null,
  name: 'Polonium'
}, {
  number: 85,
  isotopes: [{
    nominal: 191,
    mass: 191.004148
  }, {
    nominal: 192,
    mass: 192.003152
  }, {
    nominal: 193,
    mass: 192.999927
  }, {
    nominal: 194,
    mass: 193.999236
  }, {
    nominal: 195,
    mass: 194.9962685
  }, {
    nominal: 196,
    mass: 195.9958
  }, {
    nominal: 197,
    mass: 196.993189
  }, {
    nominal: 198,
    mass: 197.992784
  }, {
    nominal: 199,
    mass: 198.9905277
  }, {
    nominal: 200,
    mass: 199.990351
  }, {
    nominal: 201,
    mass: 200.9884171
  }, {
    nominal: 202,
    mass: 201.98863
  }, {
    nominal: 203,
    mass: 202.986943
  }, {
    nominal: 204,
    mass: 203.987251
  }, {
    nominal: 205,
    mass: 204.986076
  }, {
    nominal: 206,
    mass: 205.986657
  }, {
    nominal: 207,
    mass: 206.9858
  }, {
    nominal: 208,
    mass: 207.9866133
  }, {
    nominal: 209,
    mass: 208.9861702
  }, {
    nominal: 210,
    mass: 209.9871479
  }, {
    nominal: 211,
    mass: 210.9874966
  }, {
    nominal: 212,
    mass: 211.9907377
  }, {
    nominal: 213,
    mass: 212.992937
  }, {
    nominal: 214,
    mass: 213.9963721
  }, {
    nominal: 215,
    mass: 214.9986528
  }, {
    nominal: 216,
    mass: 216.0024236
  }, {
    nominal: 217,
    mass: 217.0047192
  }, {
    nominal: 218,
    mass: 218.008695
  }, {
    nominal: 219,
    mass: 219.0111618
  }, {
    nominal: 220,
    mass: 220.015433
  }, {
    nominal: 221,
    mass: 221.018017
  }, {
    nominal: 222,
    mass: 222.022494
  }, {
    nominal: 223,
    mass: 223.025151
  }, {
    nominal: 224,
    mass: 224.029749
  }, {
    nominal: 225,
    mass: 225.03263
  }, {
    nominal: 226,
    mass: 226.03716
  }, {
    nominal: 227,
    mass: 227.04024
  }, {
    nominal: 228,
    mass: 228.04475
  }, {
    nominal: 229,
    mass: 229.04812
  }],
  symbol: 'At',
  mass: null,
  name: 'Astatine'
}, {
  number: 86,
  isotopes: [{
    nominal: 193,
    mass: 193.009708
  }, {
    nominal: 194,
    mass: 194.006144
  }, {
    nominal: 195,
    mass: 195.005422
  }, {
    nominal: 196,
    mass: 196.002116
  }, {
    nominal: 197,
    mass: 197.001585
  }, {
    nominal: 198,
    mass: 197.998679
  }, {
    nominal: 199,
    mass: 198.99839
  }, {
    nominal: 200,
    mass: 199.99569
  }, {
    nominal: 201,
    mass: 200.995628
  }, {
    nominal: 202,
    mass: 201.993264
  }, {
    nominal: 203,
    mass: 202.993388
  }, {
    nominal: 204,
    mass: 203.99143
  }, {
    nominal: 205,
    mass: 204.991719
  }, {
    nominal: 206,
    mass: 205.990214
  }, {
    nominal: 207,
    mass: 206.9907303
  }, {
    nominal: 208,
    mass: 207.989635
  }, {
    nominal: 209,
    mass: 208.990415
  }, {
    nominal: 210,
    mass: 209.9896891
  }, {
    nominal: 211,
    mass: 210.9906011
  }, {
    nominal: 212,
    mass: 211.9907039
  }, {
    nominal: 213,
    mass: 212.9938831
  }, {
    nominal: 214,
    mass: 213.995363
  }, {
    nominal: 215,
    mass: 214.9987459
  }, {
    nominal: 216,
    mass: 216.0002719
  }, {
    nominal: 217,
    mass: 217.003928
  }, {
    nominal: 218,
    mass: 218.0056016
  }, {
    nominal: 219,
    mass: 219.0094804
  }, {
    nominal: 220,
    mass: 220.0113941
  }, {
    nominal: 221,
    mass: 221.0155371
  }, {
    nominal: 222,
    mass: 222.0175782
  }, {
    nominal: 223,
    mass: 223.0218893
  }, {
    nominal: 224,
    mass: 224.024096
  }, {
    nominal: 225,
    mass: 225.028486
  }, {
    nominal: 226,
    mass: 226.030861
  }, {
    nominal: 227,
    mass: 227.035304
  }, {
    nominal: 228,
    mass: 228.037835
  }, {
    nominal: 229,
    mass: 229.042257
  }, {
    nominal: 230,
    mass: 230.04514
  }, {
    nominal: 231,
    mass: 231.04987
  }],
  symbol: 'Rn',
  mass: null,
  name: 'Radon'
}, {
  number: 87,
  isotopes: [{
    nominal: 199,
    mass: 199.007259
  }, {
    nominal: 200,
    mass: 200.006586
  }, {
    nominal: 201,
    mass: 201.003867
  }, {
    nominal: 202,
    mass: 202.00332
  }, {
    nominal: 203,
    mass: 203.0009407
  }, {
    nominal: 204,
    mass: 204.000652
  }, {
    nominal: 205,
    mass: 204.9985939
  }, {
    nominal: 206,
    mass: 205.998666
  }, {
    nominal: 207,
    mass: 206.996946
  }, {
    nominal: 208,
    mass: 207.997138
  }, {
    nominal: 209,
    mass: 208.995955
  }, {
    nominal: 210,
    mass: 209.996422
  }, {
    nominal: 211,
    mass: 210.995556
  }, {
    nominal: 212,
    mass: 211.9962257
  }, {
    nominal: 213,
    mass: 212.996186
  }, {
    nominal: 214,
    mass: 213.9989713
  }, {
    nominal: 215,
    mass: 215.0003418
  }, {
    nominal: 216,
    mass: 216.0031899
  }, {
    nominal: 217,
    mass: 217.0046323
  }, {
    nominal: 218,
    mass: 218.0075787
  }, {
    nominal: 219,
    mass: 219.0092524
  }, {
    nominal: 220,
    mass: 220.0123277
  }, {
    nominal: 221,
    mass: 221.0142552
  }, {
    nominal: 222,
    mass: 222.017552
  }, {
    nominal: 223,
    mass: 223.019736
  }, {
    nominal: 224,
    mass: 224.023398
  }, {
    nominal: 225,
    mass: 225.025573
  }, {
    nominal: 226,
    mass: 226.029566
  }, {
    nominal: 227,
    mass: 227.031869
  }, {
    nominal: 228,
    mass: 228.035823
  }, {
    nominal: 229,
    mass: 229.038298
  }, {
    nominal: 230,
    mass: 230.042416
  }, {
    nominal: 231,
    mass: 231.045158
  }, {
    nominal: 232,
    mass: 232.04937
  }, {
    nominal: 233,
    mass: 233.05264
  }],
  symbol: 'Fr',
  mass: null,
  name: 'Francium'
}, {
  number: 88,
  isotopes: [{
    nominal: 201,
    mass: 201.01271
  }, {
    nominal: 202,
    mass: 202.00976
  }, {
    nominal: 203,
    mass: 203.009304
  }, {
    nominal: 204,
    mass: 204.006492
  }, {
    nominal: 205,
    mass: 205.006268
  }, {
    nominal: 206,
    mass: 206.003828
  }, {
    nominal: 207,
    mass: 207.003799
  }, {
    nominal: 208,
    mass: 208.001841
  }, {
    nominal: 209,
    mass: 209.00199
  }, {
    nominal: 210,
    mass: 210.000494
  }, {
    nominal: 211,
    mass: 211.0008932
  }, {
    nominal: 212,
    mass: 211.999787
  }, {
    nominal: 213,
    mass: 213.000384
  }, {
    nominal: 214,
    mass: 214.0000997
  }, {
    nominal: 215,
    mass: 215.0027204
  }, {
    nominal: 216,
    mass: 216.0035334
  }, {
    nominal: 217,
    mass: 217.0063207
  }, {
    nominal: 218,
    mass: 218.007141
  }, {
    nominal: 219,
    mass: 219.0100855
  }, {
    nominal: 220,
    mass: 220.0110259
  }, {
    nominal: 221,
    mass: 221.0139177
  }, {
    nominal: 222,
    mass: 222.0153748
  }, {
    nominal: 223,
    mass: 223.0185023
  }, {
    nominal: 224,
    mass: 224.020212
  }, {
    nominal: 225,
    mass: 225.0236119
  }, {
    nominal: 226,
    mass: 226.0254103
  }, {
    nominal: 227,
    mass: 227.0291783
  }, {
    nominal: 228,
    mass: 228.0310707
  }, {
    nominal: 229,
    mass: 229.034942
  }, {
    nominal: 230,
    mass: 230.037055
  }, {
    nominal: 231,
    mass: 231.041027
  }, {
    nominal: 232,
    mass: 232.0434753
  }, {
    nominal: 233,
    mass: 233.047582
  }, {
    nominal: 234,
    mass: 234.050342
  }, {
    nominal: 235,
    mass: 235.05497
  }],
  symbol: 'Ra',
  mass: null,
  name: 'Radium'
}, {
  number: 89,
  isotopes: [{
    nominal: 206,
    mass: 206.014452
  }, {
    nominal: 207,
    mass: 207.011966
  }, {
    nominal: 208,
    mass: 208.01155
  }, {
    nominal: 209,
    mass: 209.009495
  }, {
    nominal: 210,
    mass: 210.009436
  }, {
    nominal: 211,
    mass: 211.007732
  }, {
    nominal: 212,
    mass: 212.007813
  }, {
    nominal: 213,
    mass: 213.006609
  }, {
    nominal: 214,
    mass: 214.006918
  }, {
    nominal: 215,
    mass: 215.006475
  }, {
    nominal: 216,
    mass: 216.008743
  }, {
    nominal: 217,
    mass: 217.009344
  }, {
    nominal: 218,
    mass: 218.011642
  }, {
    nominal: 219,
    mass: 219.012421
  }, {
    nominal: 220,
    mass: 220.0147549
  }, {
    nominal: 221,
    mass: 221.015592
  }, {
    nominal: 222,
    mass: 222.0178442
  }, {
    nominal: 223,
    mass: 223.0191377
  }, {
    nominal: 224,
    mass: 224.0217232
  }, {
    nominal: 225,
    mass: 225.02323
  }, {
    nominal: 226,
    mass: 226.0260984
  }, {
    nominal: 227,
    mass: 227.0277523
  }, {
    nominal: 228,
    mass: 228.0310215
  }, {
    nominal: 229,
    mass: 229.032956
  }, {
    nominal: 230,
    mass: 230.036327
  }, {
    nominal: 231,
    mass: 231.038393
  }, {
    nominal: 232,
    mass: 232.042034
  }, {
    nominal: 233,
    mass: 233.044346
  }, {
    nominal: 234,
    mass: 234.048139
  }, {
    nominal: 235,
    mass: 235.05084
  }, {
    nominal: 236,
    mass: 236.054988
  }, {
    nominal: 237,
    mass: 237.05827
  }],
  symbol: 'Ac',
  mass: null,
  name: 'Actinium'
}, {
  number: 90,
  isotopes: [{
    nominal: 208,
    mass: 208.0179
  }, {
    nominal: 209,
    mass: 209.017753
  }, {
    nominal: 210,
    mass: 210.015094
  }, {
    nominal: 211,
    mass: 211.014929
  }, {
    nominal: 212,
    mass: 212.012988
  }, {
    nominal: 213,
    mass: 213.013009
  }, {
    nominal: 214,
    mass: 214.0115
  }, {
    nominal: 215,
    mass: 215.0117248
  }, {
    nominal: 216,
    mass: 216.011056
  }, {
    nominal: 217,
    mass: 217.013117
  }, {
    nominal: 218,
    mass: 218.013276
  }, {
    nominal: 219,
    mass: 219.015537
  }, {
    nominal: 220,
    mass: 220.015748
  }, {
    nominal: 221,
    mass: 221.018184
  }, {
    nominal: 222,
    mass: 222.018469
  }, {
    nominal: 223,
    mass: 223.0208119
  }, {
    nominal: 224,
    mass: 224.021464
  }, {
    nominal: 225,
    mass: 225.0239514
  }, {
    nominal: 226,
    mass: 226.0249034
  }, {
    nominal: 227,
    mass: 227.0277042
  }, {
    nominal: 228,
    mass: 228.0287413
  }, {
    nominal: 229,
    mass: 229.0317627
  }, {
    nominal: 230,
    mass: 230.0331341
  }, {
    nominal: 231,
    mass: 231.0363046
  }, {
    nominal: 232,
    mass: 232.0380558,
    abundance: 1
  }, {
    nominal: 233,
    mass: 233.0415823
  }, {
    nominal: 234,
    mass: 234.0436014
  }, {
    nominal: 235,
    mass: 235.047255
  }, {
    nominal: 236,
    mass: 236.049657
  }, {
    nominal: 237,
    mass: 237.053629
  }, {
    nominal: 238,
    mass: 238.0565
  }, {
    nominal: 239,
    mass: 239.06077
  }],
  symbol: 'Th',
  mass: 232.0380558,
  name: 'Thorium',
  monoisotopicMass: 232.0380558
}, {
  number: 91,
  isotopes: [{
    nominal: 212,
    mass: 212.023203
  }, {
    nominal: 213,
    mass: 213.021109
  }, {
    nominal: 214,
    mass: 214.020918
  }, {
    nominal: 215,
    mass: 215.019183
  }, {
    nominal: 216,
    mass: 216.019109
  }, {
    nominal: 217,
    mass: 217.018325
  }, {
    nominal: 218,
    mass: 218.020059
  }, {
    nominal: 219,
    mass: 219.019904
  }, {
    nominal: 220,
    mass: 220.021705
  }, {
    nominal: 221,
    mass: 221.021875
  }, {
    nominal: 222,
    mass: 222.023784
  }, {
    nominal: 223,
    mass: 223.023963
  }, {
    nominal: 224,
    mass: 224.0256176
  }, {
    nominal: 225,
    mass: 225.026131
  }, {
    nominal: 226,
    mass: 226.027948
  }, {
    nominal: 227,
    mass: 227.0288054
  }, {
    nominal: 228,
    mass: 228.0310517
  }, {
    nominal: 229,
    mass: 229.0320972
  }, {
    nominal: 230,
    mass: 230.034541
  }, {
    nominal: 231,
    mass: 231.0358842,
    abundance: 1
  }, {
    nominal: 232,
    mass: 232.0385917
  }, {
    nominal: 233,
    mass: 233.0402472
  }, {
    nominal: 234,
    mass: 234.0433072
  }, {
    nominal: 235,
    mass: 235.045399
  }, {
    nominal: 236,
    mass: 236.048668
  }, {
    nominal: 237,
    mass: 237.051023
  }, {
    nominal: 238,
    mass: 238.054637
  }, {
    nominal: 239,
    mass: 239.05726
  }, {
    nominal: 240,
    mass: 240.06098
  }, {
    nominal: 241,
    mass: 241.06408
  }],
  symbol: 'Pa',
  mass: 231.0358842,
  name: 'Protactinium',
  monoisotopicMass: 231.0358842
}, {
  number: 92,
  isotopes: [{
    nominal: 217,
    mass: 217.02466
  }, {
    nominal: 218,
    mass: 218.023523
  }, {
    nominal: 219,
    mass: 219.024999
  }, {
    nominal: 220,
    mass: 220.02462
  }, {
    nominal: 221,
    mass: 221.02628
  }, {
    nominal: 222,
    mass: 222.026
  }, {
    nominal: 223,
    mass: 223.027739
  }, {
    nominal: 224,
    mass: 224.027605
  }, {
    nominal: 225,
    mass: 225.029391
  }, {
    nominal: 226,
    mass: 226.029339
  }, {
    nominal: 227,
    mass: 227.031157
  }, {
    nominal: 228,
    mass: 228.031371
  }, {
    nominal: 229,
    mass: 229.0335063
  }, {
    nominal: 230,
    mass: 230.0339401
  }, {
    nominal: 231,
    mass: 231.0362939
  }, {
    nominal: 232,
    mass: 232.0371563
  }, {
    nominal: 233,
    mass: 233.0396355
  }, {
    nominal: 234,
    mass: 234.0409523,
    abundance: 0.000054
  }, {
    nominal: 235,
    mass: 235.0439301,
    abundance: 0.007204
  }, {
    nominal: 236,
    mass: 236.0455682
  }, {
    nominal: 237,
    mass: 237.0487304
  }, {
    nominal: 238,
    mass: 238.0507884,
    abundance: 0.992742
  }, {
    nominal: 239,
    mass: 239.0542935
  }, {
    nominal: 240,
    mass: 240.0565934
  }, {
    nominal: 241,
    mass: 241.06033
  }, {
    nominal: 242,
    mass: 242.06293
  }, {
    nominal: 243,
    mass: 243.06699
  }],
  symbol: 'U',
  mass: 238.0289104616574,
  name: 'Uranium',
  monoisotopicMass: 238.0507884
}, {
  number: 93,
  isotopes: [{
    nominal: 219,
    mass: 219.03143
  }, {
    nominal: 220,
    mass: 220.03254
  }, {
    nominal: 221,
    mass: 221.03204
  }, {
    nominal: 222,
    mass: 222.0333
  }, {
    nominal: 223,
    mass: 223.03285
  }, {
    nominal: 224,
    mass: 224.03422
  }, {
    nominal: 225,
    mass: 225.033911
  }, {
    nominal: 226,
    mass: 226.035188
  }, {
    nominal: 227,
    mass: 227.034957
  }, {
    nominal: 228,
    mass: 228.036067
  }, {
    nominal: 229,
    mass: 229.036264
  }, {
    nominal: 230,
    mass: 230.037828
  }, {
    nominal: 231,
    mass: 231.038245
  }, {
    nominal: 232,
    mass: 232.04011
  }, {
    nominal: 233,
    mass: 233.040741
  }, {
    nominal: 234,
    mass: 234.0428953
  }, {
    nominal: 235,
    mass: 235.0440635
  }, {
    nominal: 236,
    mass: 236.04657
  }, {
    nominal: 237,
    mass: 237.0481736
  }, {
    nominal: 238,
    mass: 238.0509466
  }, {
    nominal: 239,
    mass: 239.0529392
  }, {
    nominal: 240,
    mass: 240.056165
  }, {
    nominal: 241,
    mass: 241.058253
  }, {
    nominal: 242,
    mass: 242.06164
  }, {
    nominal: 243,
    mass: 243.06428
  }, {
    nominal: 244,
    mass: 244.06785
  }, {
    nominal: 245,
    mass: 245.0708
  }],
  symbol: 'Np',
  mass: null,
  name: 'Neptunium'
}, {
  number: 94,
  isotopes: [{
    nominal: 228,
    mass: 228.038732
  }, {
    nominal: 229,
    mass: 229.040144
  }, {
    nominal: 230,
    mass: 230.03965
  }, {
    nominal: 231,
    mass: 231.041102
  }, {
    nominal: 232,
    mass: 232.041185
  }, {
    nominal: 233,
    mass: 233.042998
  }, {
    nominal: 234,
    mass: 234.0433174
  }, {
    nominal: 235,
    mass: 235.045286
  }, {
    nominal: 236,
    mass: 236.0460581
  }, {
    nominal: 237,
    mass: 237.0484098
  }, {
    nominal: 238,
    mass: 238.0495601
  }, {
    nominal: 239,
    mass: 239.0521636
  }, {
    nominal: 240,
    mass: 240.0538138
  }, {
    nominal: 241,
    mass: 241.0568517
  }, {
    nominal: 242,
    mass: 242.0587428
  }, {
    nominal: 243,
    mass: 243.0620036
  }, {
    nominal: 244,
    mass: 244.0642053
  }, {
    nominal: 245,
    mass: 245.067826
  }, {
    nominal: 246,
    mass: 246.070205
  }, {
    nominal: 247,
    mass: 247.07419
  }],
  symbol: 'Pu',
  mass: null,
  name: 'Plutonium'
}, {
  number: 95,
  isotopes: [{
    nominal: 230,
    mass: 230.04609
  }, {
    nominal: 231,
    mass: 231.04556
  }, {
    nominal: 232,
    mass: 232.04645
  }, {
    nominal: 233,
    mass: 233.04644
  }, {
    nominal: 234,
    mass: 234.04773
  }, {
    nominal: 235,
    mass: 235.047908
  }, {
    nominal: 236,
    mass: 236.04943
  }, {
    nominal: 237,
    mass: 237.049996
  }, {
    nominal: 238,
    mass: 238.051985
  }, {
    nominal: 239,
    mass: 239.0530247
  }, {
    nominal: 240,
    mass: 240.0553
  }, {
    nominal: 241,
    mass: 241.0568293
  }, {
    nominal: 242,
    mass: 242.0595494
  }, {
    nominal: 243,
    mass: 243.0613813
  }, {
    nominal: 244,
    mass: 244.0642851
  }, {
    nominal: 245,
    mass: 245.0664548
  }, {
    nominal: 246,
    mass: 246.069775
  }, {
    nominal: 247,
    mass: 247.07209
  }, {
    nominal: 248,
    mass: 248.07575
  }, {
    nominal: 249,
    mass: 249.07848
  }],
  symbol: 'Am',
  name: 'Americium',
  mass: null
}, {
  number: 96,
  isotopes: [{
    nominal: 232,
    mass: 232.04982
  }, {
    nominal: 233,
    mass: 233.05077
  }, {
    nominal: 234,
    mass: 234.05016
  }, {
    nominal: 235,
    mass: 235.05154
  }, {
    nominal: 236,
    mass: 236.051374
  }, {
    nominal: 237,
    mass: 237.052869
  }, {
    nominal: 238,
    mass: 238.053081
  }, {
    nominal: 239,
    mass: 239.05491
  }, {
    nominal: 240,
    mass: 240.0555297
  }, {
    nominal: 241,
    mass: 241.0576532
  }, {
    nominal: 242,
    mass: 242.058836
  }, {
    nominal: 243,
    mass: 243.0613893
  }, {
    nominal: 244,
    mass: 244.0627528
  }, {
    nominal: 245,
    mass: 245.0654915
  }, {
    nominal: 246,
    mass: 246.0672238
  }, {
    nominal: 247,
    mass: 247.0703541
  }, {
    nominal: 248,
    mass: 248.0723499
  }, {
    nominal: 249,
    mass: 249.0759548
  }, {
    nominal: 250,
    mass: 250.078358
  }, {
    nominal: 251,
    mass: 251.082286
  }, {
    nominal: 252,
    mass: 252.08487
  }],
  symbol: 'Cm',
  name: 'Curium',
  mass: null
}, {
  number: 97,
  isotopes: [{
    nominal: 234,
    mass: 234.05727
  }, {
    nominal: 235,
    mass: 235.05658
  }, {
    nominal: 236,
    mass: 236.05748
  }, {
    nominal: 237,
    mass: 237.0571
  }, {
    nominal: 238,
    mass: 238.0582
  }, {
    nominal: 239,
    mass: 239.05824
  }, {
    nominal: 240,
    mass: 240.05976
  }, {
    nominal: 241,
    mass: 241.06016
  }, {
    nominal: 242,
    mass: 242.06198
  }, {
    nominal: 243,
    mass: 243.0630078
  }, {
    nominal: 244,
    mass: 244.065181
  }, {
    nominal: 245,
    mass: 245.0663618
  }, {
    nominal: 246,
    mass: 246.068673
  }, {
    nominal: 247,
    mass: 247.0703073
  }, {
    nominal: 248,
    mass: 248.073088
  }, {
    nominal: 249,
    mass: 249.0749877
  }, {
    nominal: 250,
    mass: 250.0783167
  }, {
    nominal: 251,
    mass: 251.080762
  }, {
    nominal: 252,
    mass: 252.08431
  }, {
    nominal: 253,
    mass: 253.08688
  }, {
    nominal: 254,
    mass: 254.0906
  }],
  symbol: 'Bk',
  name: 'Berkelium',
  mass: null
}, {
  number: 98,
  isotopes: [{
    nominal: 237,
    mass: 237.062198
  }, {
    nominal: 238,
    mass: 238.06149
  }, {
    nominal: 239,
    mass: 239.06253
  }, {
    nominal: 240,
    mass: 240.062256
  }, {
    nominal: 241,
    mass: 241.06369
  }, {
    nominal: 242,
    mass: 242.063754
  }, {
    nominal: 243,
    mass: 243.06548
  }, {
    nominal: 244,
    mass: 244.0660008
  }, {
    nominal: 245,
    mass: 245.0680487
  }, {
    nominal: 246,
    mass: 246.0688055
  }, {
    nominal: 247,
    mass: 247.070965
  }, {
    nominal: 248,
    mass: 248.0721851
  }, {
    nominal: 249,
    mass: 249.0748539
  }, {
    nominal: 250,
    mass: 250.0764062
  }, {
    nominal: 251,
    mass: 251.0795886
  }, {
    nominal: 252,
    mass: 252.0816272
  }, {
    nominal: 253,
    mass: 253.0851345
  }, {
    nominal: 254,
    mass: 254.087324
  }, {
    nominal: 255,
    mass: 255.09105
  }, {
    nominal: 256,
    mass: 256.09344
  }],
  symbol: 'Cf',
  name: 'Californium',
  mass: null
}, {
  number: 99,
  isotopes: [{
    nominal: 239,
    mass: 239.06823
  }, {
    nominal: 240,
    mass: 240.06892
  }, {
    nominal: 241,
    mass: 241.06856
  }, {
    nominal: 242,
    mass: 242.06957
  }, {
    nominal: 243,
    mass: 243.06951
  }, {
    nominal: 244,
    mass: 244.07088
  }, {
    nominal: 245,
    mass: 245.07125
  }, {
    nominal: 246,
    mass: 246.0729
  }, {
    nominal: 247,
    mass: 247.073622
  }, {
    nominal: 248,
    mass: 248.075471
  }, {
    nominal: 249,
    mass: 249.076411
  }, {
    nominal: 250,
    mass: 250.07861
  }, {
    nominal: 251,
    mass: 251.0799936
  }, {
    nominal: 252,
    mass: 252.08298
  }, {
    nominal: 253,
    mass: 253.0848257
  }, {
    nominal: 254,
    mass: 254.0880222
  }, {
    nominal: 255,
    mass: 255.090275
  }, {
    nominal: 256,
    mass: 256.0936
  }, {
    nominal: 257,
    mass: 257.09598
  }, {
    nominal: 258,
    mass: 258.09952
  }],
  symbol: 'Es',
  name: 'Einsteinium',
  mass: null
}, {
  number: 100,
  isotopes: [{
    nominal: 241,
    mass: 241.07421
  }, {
    nominal: 242,
    mass: 242.07343
  }, {
    nominal: 243,
    mass: 243.07446
  }, {
    nominal: 244,
    mass: 244.07404
  }, {
    nominal: 245,
    mass: 245.07535
  }, {
    nominal: 246,
    mass: 246.07535
  }, {
    nominal: 247,
    mass: 247.07694
  }, {
    nominal: 248,
    mass: 248.0771865
  }, {
    nominal: 249,
    mass: 249.0789275
  }, {
    nominal: 250,
    mass: 250.079521
  }, {
    nominal: 251,
    mass: 251.08154
  }, {
    nominal: 252,
    mass: 252.0824671
  }, {
    nominal: 253,
    mass: 253.0851846
  }, {
    nominal: 254,
    mass: 254.0868544
  }, {
    nominal: 255,
    mass: 255.089964
  }, {
    nominal: 256,
    mass: 256.0917745
  }, {
    nominal: 257,
    mass: 257.0951061
  }, {
    nominal: 258,
    mass: 258.09708
  }, {
    nominal: 259,
    mass: 259.1006
  }, {
    nominal: 260,
    mass: 260.10281
  }],
  symbol: 'Fm',
  name: 'Fermium',
  mass: null
}, {
  number: 101,
  isotopes: [{
    nominal: 245,
    mass: 245.08081
  }, {
    nominal: 246,
    mass: 246.08171
  }, {
    nominal: 247,
    mass: 247.08152
  }, {
    nominal: 248,
    mass: 248.08282
  }, {
    nominal: 249,
    mass: 249.08291
  }, {
    nominal: 250,
    mass: 250.08441
  }, {
    nominal: 251,
    mass: 251.084774
  }, {
    nominal: 252,
    mass: 252.08643
  }, {
    nominal: 253,
    mass: 253.087144
  }, {
    nominal: 254,
    mass: 254.08959
  }, {
    nominal: 255,
    mass: 255.0910841
  }, {
    nominal: 256,
    mass: 256.09389
  }, {
    nominal: 257,
    mass: 257.0955424
  }, {
    nominal: 258,
    mass: 258.0984315
  }, {
    nominal: 259,
    mass: 259.10051
  }, {
    nominal: 260,
    mass: 260.10365
  }, {
    nominal: 261,
    mass: 261.10583
  }, {
    nominal: 262,
    mass: 262.1091
  }],
  symbol: 'Md',
  name: 'Mendelevium',
  mass: null
}, {
  number: 102,
  isotopes: [{
    nominal: 248,
    mass: 248.08655
  }, {
    nominal: 249,
    mass: 249.0878
  }, {
    nominal: 250,
    mass: 250.08756
  }, {
    nominal: 251,
    mass: 251.08894
  }, {
    nominal: 252,
    mass: 252.088967
  }, {
    nominal: 253,
    mass: 253.0905641
  }, {
    nominal: 254,
    mass: 254.090956
  }, {
    nominal: 255,
    mass: 255.093191
  }, {
    nominal: 256,
    mass: 256.0942829
  }, {
    nominal: 257,
    mass: 257.0968878
  }, {
    nominal: 258,
    mass: 258.09821
  }, {
    nominal: 259,
    mass: 259.10103
  }, {
    nominal: 260,
    mass: 260.10264
  }, {
    nominal: 261,
    mass: 261.1057
  }, {
    nominal: 262,
    mass: 262.10746
  }, {
    nominal: 263,
    mass: 263.11071
  }, {
    nominal: 264,
    mass: 264.11273
  }],
  symbol: 'No',
  name: 'Nobelium',
  mass: null
}, {
  number: 103,
  isotopes: [{
    nominal: 251,
    mass: 251.09418
  }, {
    nominal: 252,
    mass: 252.09526
  }, {
    nominal: 253,
    mass: 253.09509
  }, {
    nominal: 254,
    mass: 254.09648
  }, {
    nominal: 255,
    mass: 255.096562
  }, {
    nominal: 256,
    mass: 256.098494
  }, {
    nominal: 257,
    mass: 257.099418
  }, {
    nominal: 258,
    mass: 258.10176
  }, {
    nominal: 259,
    mass: 259.102902
  }, {
    nominal: 260,
    mass: 260.1055
  }, {
    nominal: 261,
    mass: 261.10688
  }, {
    nominal: 262,
    mass: 262.10961
  }, {
    nominal: 263,
    mass: 263.11136
  }, {
    nominal: 264,
    mass: 264.1142
  }, {
    nominal: 265,
    mass: 265.11619
  }, {
    nominal: 266,
    mass: 266.11983
  }],
  symbol: 'Lr',
  name: 'Lawrencium',
  mass: null
}, {
  number: 104,
  isotopes: [{
    nominal: 253,
    mass: 253.10044
  }, {
    nominal: 254,
    mass: 254.10005
  }, {
    nominal: 255,
    mass: 255.10127
  }, {
    nominal: 256,
    mass: 256.101152
  }, {
    nominal: 257,
    mass: 257.102918
  }, {
    nominal: 258,
    mass: 258.103428
  }, {
    nominal: 259,
    mass: 259.105596
  }, {
    nominal: 260,
    mass: 260.10644
  }, {
    nominal: 261,
    mass: 261.108773
  }, {
    nominal: 262,
    mass: 262.10992
  }, {
    nominal: 263,
    mass: 263.11249
  }, {
    nominal: 264,
    mass: 264.11388
  }, {
    nominal: 265,
    mass: 265.11668
  }, {
    nominal: 266,
    mass: 266.11817
  }, {
    nominal: 267,
    mass: 267.12179
  }, {
    nominal: 268,
    mass: 268.12397
  }],
  symbol: 'Rf',
  name: 'Rutherfordium',
  mass: null
}, {
  number: 105,
  isotopes: [{
    nominal: 255,
    mass: 255.10707
  }, {
    nominal: 256,
    mass: 256.10789
  }, {
    nominal: 257,
    mass: 257.10758
  }, {
    nominal: 258,
    mass: 258.10928
  }, {
    nominal: 259,
    mass: 259.109492
  }, {
    nominal: 260,
    mass: 260.1113
  }, {
    nominal: 261,
    mass: 261.11192
  }, {
    nominal: 262,
    mass: 262.11407
  }, {
    nominal: 263,
    mass: 263.11499
  }, {
    nominal: 264,
    mass: 264.11741
  }, {
    nominal: 265,
    mass: 265.11861
  }, {
    nominal: 266,
    mass: 266.12103
  }, {
    nominal: 267,
    mass: 267.12247
  }, {
    nominal: 268,
    mass: 268.12567
  }, {
    nominal: 269,
    mass: 269.12791
  }, {
    nominal: 270,
    mass: 270.13136
  }],
  symbol: 'Db',
  name: 'Dubnium',
  mass: null
}, {
  number: 106,
  isotopes: [{
    nominal: 258,
    mass: 258.11298
  }, {
    nominal: 259,
    mass: 259.1144
  }, {
    nominal: 260,
    mass: 260.114384
  }, {
    nominal: 261,
    mass: 261.115949
  }, {
    nominal: 262,
    mass: 262.116337
  }, {
    nominal: 263,
    mass: 263.11829
  }, {
    nominal: 264,
    mass: 264.11893
  }, {
    nominal: 265,
    mass: 265.12109
  }, {
    nominal: 266,
    mass: 266.12198
  }, {
    nominal: 267,
    mass: 267.12436
  }, {
    nominal: 268,
    mass: 268.12539
  }, {
    nominal: 269,
    mass: 269.12863
  }, {
    nominal: 270,
    mass: 270.13043
  }, {
    nominal: 271,
    mass: 271.13393
  }, {
    nominal: 272,
    mass: 272.13589
  }, {
    nominal: 273,
    mass: 273.13958
  }],
  symbol: 'Sg',
  name: 'Seaborgium',
  mass: null
}, {
  number: 107,
  isotopes: [{
    nominal: 260,
    mass: 260.12166
  }, {
    nominal: 261,
    mass: 261.12145
  }, {
    nominal: 262,
    mass: 262.12297
  }, {
    nominal: 263,
    mass: 263.12292
  }, {
    nominal: 264,
    mass: 264.12459
  }, {
    nominal: 265,
    mass: 265.12491
  }, {
    nominal: 266,
    mass: 266.12679
  }, {
    nominal: 267,
    mass: 267.1275
  }, {
    nominal: 268,
    mass: 268.12969
  }, {
    nominal: 269,
    mass: 269.13042
  }, {
    nominal: 270,
    mass: 270.13336
  }, {
    nominal: 271,
    mass: 271.13526
  }, {
    nominal: 272,
    mass: 272.13826
  }, {
    nominal: 273,
    mass: 273.14024
  }, {
    nominal: 274,
    mass: 274.14355
  }, {
    nominal: 275,
    mass: 275.14567
  }],
  symbol: 'Bh',
  name: 'Bohrium',
  mass: null
}, {
  number: 108,
  isotopes: [{
    nominal: 263,
    mass: 263.12852
  }, {
    nominal: 264,
    mass: 264.128357
  }, {
    nominal: 265,
    mass: 265.129793
  }, {
    nominal: 266,
    mass: 266.130046
  }, {
    nominal: 267,
    mass: 267.13167
  }, {
    nominal: 268,
    mass: 268.13186
  }, {
    nominal: 269,
    mass: 269.13375
  }, {
    nominal: 270,
    mass: 270.13429
  }, {
    nominal: 271,
    mass: 271.13717
  }, {
    nominal: 272,
    mass: 272.1385
  }, {
    nominal: 273,
    mass: 273.14168
  }, {
    nominal: 274,
    mass: 274.1433
  }, {
    nominal: 275,
    mass: 275.14667
  }, {
    nominal: 276,
    mass: 276.14846
  }, {
    nominal: 277,
    mass: 277.1519
  }],
  symbol: 'Hs',
  name: 'Hassium',
  mass: null
}, {
  number: 109,
  isotopes: [{
    nominal: 265,
    mass: 265.136
  }, {
    nominal: 266,
    mass: 266.13737
  }, {
    nominal: 267,
    mass: 267.13719
  }, {
    nominal: 268,
    mass: 268.13865
  }, {
    nominal: 269,
    mass: 269.13882
  }, {
    nominal: 270,
    mass: 270.14033
  }, {
    nominal: 271,
    mass: 271.14074
  }, {
    nominal: 272,
    mass: 272.14341
  }, {
    nominal: 273,
    mass: 273.1444
  }, {
    nominal: 274,
    mass: 274.14724
  }, {
    nominal: 275,
    mass: 275.14882
  }, {
    nominal: 276,
    mass: 276.15159
  }, {
    nominal: 277,
    mass: 277.15327
  }, {
    nominal: 278,
    mass: 278.15631
  }, {
    nominal: 279,
    mass: 279.15808
  }],
  symbol: 'Mt',
  name: 'Meitnerium',
  mass: null
}, {
  number: 110,
  isotopes: [{
    nominal: 267,
    mass: 267.14377
  }, {
    nominal: 268,
    mass: 268.14348
  }, {
    nominal: 269,
    mass: 269.144752
  }, {
    nominal: 270,
    mass: 270.144584
  }, {
    nominal: 271,
    mass: 271.14595
  }, {
    nominal: 272,
    mass: 272.14602
  }, {
    nominal: 273,
    mass: 273.14856
  }, {
    nominal: 274,
    mass: 274.14941
  }, {
    nominal: 275,
    mass: 275.15203
  }, {
    nominal: 276,
    mass: 276.15303
  }, {
    nominal: 277,
    mass: 277.15591
  }, {
    nominal: 278,
    mass: 278.15704
  }, {
    nominal: 279,
    mass: 279.1601
  }, {
    nominal: 280,
    mass: 280.16131
  }, {
    nominal: 281,
    mass: 281.16451
  }],
  symbol: 'Ds',
  name: 'Darmstadtium',
  mass: null
}, {
  number: 111,
  isotopes: [{
    nominal: 272,
    mass: 272.15327
  }, {
    nominal: 273,
    mass: 273.15313
  }, {
    nominal: 274,
    mass: 274.15525
  }, {
    nominal: 275,
    mass: 275.15594
  }, {
    nominal: 276,
    mass: 276.15833
  }, {
    nominal: 277,
    mass: 277.15907
  }, {
    nominal: 278,
    mass: 278.16149
  }, {
    nominal: 279,
    mass: 279.16272
  }, {
    nominal: 280,
    mass: 280.16514
  }, {
    nominal: 281,
    mass: 281.16636
  }, {
    nominal: 282,
    mass: 282.16912
  }, {
    nominal: 283,
    mass: 283.17054
  }],
  symbol: 'Rg',
  name: 'Roentgenium',
  mass: null
}, {
  number: 112,
  isotopes: [{
    nominal: 276,
    mass: 276.16141
  }, {
    nominal: 277,
    mass: 277.16364
  }, {
    nominal: 278,
    mass: 278.16416
  }, {
    nominal: 279,
    mass: 279.16654
  }, {
    nominal: 280,
    mass: 280.16715
  }, {
    nominal: 281,
    mass: 281.16975
  }, {
    nominal: 282,
    mass: 282.1705
  }, {
    nominal: 283,
    mass: 283.17327
  }, {
    nominal: 284,
    mass: 284.17416
  }, {
    nominal: 285,
    mass: 285.17712
  }],
  symbol: 'Cn',
  name: 'Copernicium',
  mass: null
}, {
  number: 113,
  isotopes: [{
    nominal: 278,
    mass: 278.17058
  }, {
    nominal: 279,
    mass: 279.17095
  }, {
    nominal: 280,
    mass: 280.17293
  }, {
    nominal: 281,
    mass: 281.17348
  }, {
    nominal: 282,
    mass: 282.17567
  }, {
    nominal: 283,
    mass: 283.17657
  }, {
    nominal: 284,
    mass: 284.17873
  }, {
    nominal: 285,
    mass: 285.17973
  }, {
    nominal: 286,
    mass: 286.18221
  }, {
    nominal: 287,
    mass: 287.18339
  }],
  symbol: 'Nh',
  name: 'Nihonium',
  mass: null
}, {
  number: 114,
  isotopes: [{
    nominal: 285,
    mass: 285.18364
  }, {
    nominal: 286,
    mass: 286.18423
  }, {
    nominal: 287,
    mass: 287.18678
  }, {
    nominal: 288,
    mass: 288.18757
  }, {
    nominal: 289,
    mass: 289.19042
  }],
  symbol: 'Fl',
  name: 'Flerovium',
  mass: null
}, {
  number: 115,
  isotopes: [{
    nominal: 287,
    mass: 287.1907
  }, {
    nominal: 288,
    mass: 288.19274
  }, {
    nominal: 289,
    mass: 289.19363
  }, {
    nominal: 290,
    mass: 290.19598
  }, {
    nominal: 291,
    mass: 291.19707
  }],
  symbol: 'Mc',
  name: 'Moscovium',
  mass: null
}, {
  number: 116,
  isotopes: [{
    nominal: 289,
    mass: 289.19816
  }, {
    nominal: 290,
    mass: 290.19864
  }, {
    nominal: 291,
    mass: 291.20108
  }, {
    nominal: 292,
    mass: 292.20174
  }, {
    nominal: 293,
    mass: 293.20449
  }],
  symbol: 'Lv',
  name: 'Livermorium',
  mass: null
}, {
  number: 117,
  isotopes: [{
    nominal: 291,
    mass: 291.20553
  }, {
    nominal: 292,
    mass: 292.20746
  }, {
    nominal: 293,
    mass: 293.20824
  }, {
    nominal: 294,
    mass: 294.21046
  }],
  symbol: 'Ts',
  name: 'Teennessine',
  mass: null
}, {
  number: 118,
  isotopes: [{
    nominal: 293,
    mass: 293.21356
  }, {
    nominal: 294,
    mass: 294.21392
  }, {
    nominal: 295,
    mass: 295.21624
  }],
  symbol: 'Og',
  name: 'Oganesson',
  mass: null
}];

Object.defineProperty(elements$2, "__esModule", {
  value: true
});
elements$2.elements = void 0;
const elementsAndIsotopes_js_1 = elementsAndIsotopes;
elements$2.elements = elementsAndIsotopes_js_1.elementsAndIsotopes.map(element => ({
  number: element.number,
  symbol: element.symbol,
  mass: element.mass,
  name: element.name,
  monoisotopicMass: element.monoisotopicMass
}));

var elementsAndIsotopesObject = {};

(function (exports) {

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.elementsAndIsotopesObject = void 0;
  const elementsAndIsotopes_js_1 = elementsAndIsotopes;
  exports.elementsAndIsotopesObject = {};
  for (const element of elementsAndIsotopes_js_1.elementsAndIsotopes) {
    exports.elementsAndIsotopesObject[element.symbol] = element;
  }
})(elementsAndIsotopesObject);

var elementsAndStableIsotopes = {};

(function (exports) {

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.elementsAndStableIsotopes = void 0;
  const elementsAndIsotopes_js_1 = elementsAndIsotopes;
  exports.elementsAndStableIsotopes = structuredClone(elementsAndIsotopes_js_1.elementsAndIsotopes);
  for (const element of exports.elementsAndStableIsotopes) {
    element.isotopes = element.isotopes.filter(i => {
      return typeof i.abundance === 'number' && i.abundance > 0;
    });
  }
})(elementsAndStableIsotopes);

var elementsAndStableIsotopesObject = {};

(function (exports) {

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.elementsAndStableIsotopesObject = void 0;
  const elementsAndStableIsotopes_js_1 = elementsAndStableIsotopes;
  exports.elementsAndStableIsotopesObject = {};
  for (const element of elementsAndStableIsotopes_js_1.elementsAndStableIsotopes) {
    exports.elementsAndStableIsotopesObject[element.symbol] = element;
  }
})(elementsAndStableIsotopesObject);

var elementsObject = {};

(function (exports) {

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.elementsObject = void 0;
  const elements_js_1 = elements$2;
  exports.elementsObject = {};
  for (const element of elements_js_1.elements) {
    exports.elementsObject[element.symbol] = element;
  }
})(elementsObject);

var isotopesObject = {};

(function (exports) {

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.isotopesObject = void 0;
  const elementsAndIsotopesObject_js_1 = elementsAndIsotopesObject;
  exports.isotopesObject = {};
  for (const [symbol, element] of Object.entries(elementsAndIsotopesObject_js_1.elementsAndIsotopesObject)) {
    if (!element) continue;
    for (const isotope of element.isotopes) {
      exports.isotopesObject[`${isotope.nominal}${symbol}`] = {
        abundance: isotope.abundance,
        mass: isotope.mass
      };
    }
  }
})(isotopesObject);

var stableIsotopesObject = {};

(function (exports) {

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.stableIsotopesObject = void 0;
  const elementsAndIsotopes_js_1 = elementsAndIsotopes;
  exports.stableIsotopesObject = {};
  for (const element of elementsAndIsotopes_js_1.elementsAndIsotopes) {
    let abundance = 0;
    let mostAbundant = 0;
    for (const isotope of element.isotopes) {
      if (typeof isotope.abundance === 'number' && isotope.abundance > abundance) {
        abundance = isotope.abundance;
        mostAbundant = isotope.nominal;
      }
    }
    for (const isotope of element.isotopes) {
      if (isotope.abundance === 0) continue;
      const entry = {
        name: element.name,
        mass: isotope.mass,
        symbol: element.symbol,
        mostAbundant: false,
        deltaNeutrons: isotope.nominal - mostAbundant
      };
      if (isotope.nominal === mostAbundant) {
        entry.mostAbundant = true;
      }
      exports.stableIsotopesObject[`${isotope.nominal}${element.symbol}`] = entry;
    }
  }
})(stableIsotopesObject);

var types = {};

Object.defineProperty(types, "__esModule", {
  value: true
});

var unsaturationsObject$1 = {};

Object.defineProperty(unsaturationsObject$1, "__esModule", {
  value: true
});
unsaturationsObject$1.unsaturationsObject = void 0;
unsaturationsObject$1.unsaturationsObject = {
  O: 0,
  N: 1,
  H: -1,
  Na: -1,
  K: -1,
  Li: -1,
  Ca: -2,
  C: 2,
  F: -1,
  Si: 2,
  Cl: -1,
  Br: -1,
  I: -1,
  S: 0,
  P: 1
};

(function (exports) {

  var __createBinding = src$j && src$j.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$j && src$j.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(constants, exports);
  __exportStar(elements$2, exports);
  __exportStar(elementsAndIsotopes, exports);
  __exportStar(elementsAndIsotopesObject, exports);
  __exportStar(elementsAndStableIsotopes, exports);
  __exportStar(elementsAndStableIsotopesObject, exports);
  __exportStar(elementsObject, exports);
  __exportStar(isotopesObject, exports);
  __exportStar(stableIsotopesObject, exports);
  __exportStar(types, exports);
  __exportStar(unsaturationsObject$1, exports);
})(src$j);

var src$i = {};

var ensureUppercaseSequence$1 = {};

/**
 * Ensure that the sequence is in uppercase taking into account possible modifications
 */
Object.defineProperty(ensureUppercaseSequence$1, "__esModule", {
  value: true
});
ensureUppercaseSequence$1.ensureUppercaseSequence = ensureUppercaseSequence;
function ensureUppercaseSequence(sequence) {
  let parenthesisCounter = 0;
  let parts = [];
  let part = '';
  for (let i = 0; i < sequence.length; i++) {
    let currentSymbol = sequence[i];
    if (currentSymbol === '(' && parenthesisCounter === 0 && part) {
      parts.push(part);
      part = currentSymbol;
    } else if (currentSymbol === ')' && parenthesisCounter === 0) {
      part += currentSymbol;
      parts.push(part);
      part = '';
    } else {
      part += currentSymbol;
    }
  }
  if (part) parts.push(part);
  for (let i = 0; i < parts.length; i++) {
    if (!parts[i].startsWith('(') && parts[i].match(/^[a-z]+$/)) {
      parts[i] = parts[i].toUpperCase();
    }
  }
  return parts.join('');
}

var getEutrophicationPotential$1 = {};

var src$h = {};

var parse$3 = {};

var src$g = {};

Object.defineProperty(src$g, "__esModule", {
  value: true
});
var atomSorter_1 = src$g.atomSorter = atomSorter;
/**
 * Implementation of the Hill system for sorting atoms
 * https://en.wikipedia.org/wiki/Chemical_formula#Hill_system
 * @param a - first atom to compare
 * @param b - second atom to compare
 * @returns A value suitable for use in Array.prototype.sort.
 */
function atomSorter(a, b) {
  if (a === b) return 0;
  if (a === 'C') return -1;
  if (b === 'C') return 1;
  if (a === 'H') return -1;
  if (b === 'H') return 1;
  if (a < b) return -1;
  return 1;
}

var src$f = {};

var groups = {};

Object.defineProperty(groups, "__esModule", {
  value: true
});
groups.groups = void 0;
groups.groups = [{
  "symbol": "Abu",
  "name": "2-Aminobutyric acid diradical",
  "mf": "C4H7NO",
  "ocl": {
    "value": "dazHPBPOEgEInVZjcH@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}bGt"
  },
  "mass": 85.10463700109551,
  "monoisotopicMass": 85.05276384961,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Acet",
  "name": "Acetyl",
  "mf": "C2H3O",
  "ocl": {
    "value": "gCaHDEeIi`@",
    "coordinates": "!BbOq~@Ha}"
  },
  "mass": 43.04469897995611,
  "monoisotopicMass": 43.01838971626,
  "unsaturation": 1,
  "elements": [{
    "symbol": "C",
    "number": 2
  }, {
    "symbol": "H",
    "number": 3
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Acm",
  "name": "Acetamidomethyl",
  "mf": "C3H6NO",
  "ocl": {
    "value": "gGYHDPliJuS@@",
    "coordinates": "!BbOrH_Xc|_`BH_P"
  },
  "mass": 72.08596035030448,
  "monoisotopicMass": 72.04493881738,
  "unsaturation": 1,
  "elements": [{
    "symbol": "C",
    "number": 3
  }, {
    "symbol": "H",
    "number": 6
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Adao",
  "name": "Adamantyloxy",
  "mf": "C10H15O",
  "ocl": {
    "value": "dc\\H`HAYRVeV^dUGZjjjj@@",
    "coordinates": "!B]BOXN`EP}CdB\\tbZ@Ijh~hRELdOBBp"
  },
  "mass": 151.2258752025074,
  "monoisotopicMass": 151.11229010302,
  "unsaturation": 5,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Aib",
  "name": "alpha-Aminoisobutyric acid diradical",
  "mf": "C4H7NO",
  "ocl": {
    "value": "dazHPBPOGgEInfZj@@",
    "coordinates": "!Bb@I~@Ha}b@K|uwwWbGt"
  },
  "mass": 85.10463700109551,
  "monoisotopicMass": 85.05276384961,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Ala",
  "name": "Alanine diradical",
  "mf": "C3H5NO",
  "kind": "aa",
  "oneLetter": "A",
  "alternativeOneLetter": "α",
  "ocl": {
    "value": "gNyDBaxmqR[fZjZ@",
    "coordinates": "!BbOr~@H`}bOr~Wxb}"
  },
  "mass": 71.07801959624871,
  "monoisotopicMass": 71.03711378515,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 3
  }, {
    "symbol": "H",
    "number": 5
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Arg",
  "name": "Arginine diradical",
  "mf": "C6H12N4O",
  "kind": "aa",
  "oneLetter": "R",
  "alternativeOneLetter": "ρ",
  "ocl": {
    "value": "dkLhPBgSPOEgEInWUijjihr@@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}bGvHHa}b@I~@Ha}"
  },
  "mass": 156.18592219918227,
  "monoisotopicMass": 156.10111102405,
  "unsaturation": 4,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 4
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Argp",
  "name": "Arginine triradical",
  "mf": "C6H11N4O",
  "ocl": {
    "value": "dglhpHpil@gWDEI[UYZfjji`T@",
    "coordinates": "!BbGvHGx@bGvH@ha}bOrH_Wxb@KW_Wx@bGt"
  },
  "mass": 155.1779814451265,
  "monoisotopicMass": 155.09328599182,
  "unsaturation": 5,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 4
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Asn",
  "name": "Asparagine diradical",
  "mf": "C4H6N2O2",
  "kind": "aa",
  "oneLetter": "N",
  "alternativeOneLetter": "η",
  "ocl": {
    "value": "deeDPBeACqYqR[ezZjZL`@",
    "coordinates": "!BbGu~Ox`B_`BH_X`Bb@I~@Ha}"
  },
  "mass": 114.10280438280381,
  "monoisotopicMass": 114.04292744137999,
  "unsaturation": 4,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 6
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Asnp",
  "name": "Asparagine triradical",
  "mf": "C4H5N2O2",
  "ocl": {
    "value": "dmUDpH[E@IEqgqRVvVijjXi@@",
    "coordinates": "!Bb@JH_Wxb@JH_Wxb@KW_Wx@bGt"
  },
  "mass": 113.09486362874803,
  "monoisotopicMass": 113.03510240915,
  "unsaturation": 5,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 5
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Asp",
  "name": "Aspartic acid diradical",
  "mf": "C4H5NO3",
  "kind": "aa",
  "oneLetter": "D",
  "alternativeOneLetter": "δ",
  "ocl": {
    "value": "defLPBPYCqYqR[ezZjZL`@",
    "coordinates": "!BbGu~Ox`B_`BH_X`Bb@I~@Ha}"
  },
  "mass": 115.08756534162052,
  "monoisotopicMass": 115.02694302429,
  "unsaturation": 4,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 5
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 3
  }]
}, {
  "symbol": "Aspp",
  "name": "Aspartic acid triradical",
  "mf": "C4H4NO3",
  "ocl": {
    "value": "dmVLpFcE@IEqgqRVvVijjXi@@",
    "coordinates": "!Bb@JH_Wxb@JH_Wxb@KW_Wx@bGt"
  },
  "mass": 114.07962458756472,
  "monoisotopicMass": 114.01911799206,
  "unsaturation": 5,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 4
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 3
  }]
}, {
  "symbol": "Asu",
  "name": "alpha-Aminosuberic acid diradical",
  "mf": "C8H13NO3",
  "ocl": {
    "value": "dgnLPBP{CqYqR[euVfjjihr@@",
    "coordinates": "!BbGu~Ox`B_`BH_Xc|bOrH_X`BbGvHGx@bGt"
  },
  "mass": 171.19403496100773,
  "monoisotopicMass": 171.08954328213002,
  "unsaturation": 4,
  "elements": [{
    "symbol": "C",
    "number": 8
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 3
  }]
}, {
  "symbol": "Asup",
  "name": "alpha-Aminosuberic acid triradical",
  "mf": "C8H12NO3",
  "ocl": {
    "value": "do^LpEcG@IMqoqRVuUejZjjibT@",
    "coordinates": "!BbOrH_Wxb@JH_Xc|bGvHHa}_c~H@m]}_`BH_P"
  },
  "mass": 170.18609420695194,
  "monoisotopicMass": 170.0817182499,
  "unsaturation": 5,
  "elements": [{
    "symbol": "C",
    "number": 8
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 3
  }]
}, {
  "symbol": "Boc",
  "name": "t-Butoxycarbonyl",
  "mf": "C5H9O2",
  "ocl": {
    "value": "daxD`DpEeImjZj@@",
    "coordinates": "!B|Ou~_A||Ow}mC}_O@"
  },
  "mass": 101.12395611881479,
  "monoisotopicMass": 101.06025452921,
  "unsaturation": 1,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Bom",
  "name": "Benzyloxymethyl",
  "mf": "C8H9O",
  "ocl": {
    "value": "deTH`DAYRUYTYj`@@@",
    "coordinates": "!B|Gsp__A||Owp_Gy|Gwp_Wy"
  },
  "mass": 121.15675888470227,
  "monoisotopicMass": 121.06533990964,
  "unsaturation": 7,
  "elements": [{
    "symbol": "C",
    "number": 8
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Brz",
  "name": "2-Bromobenzyloxycarbonyl",
  "mf": "C8H6BrO2",
  "ocl": {
    "value": "dcLDPDpEd\\QImYgWYjB@@@",
    "coordinates": "!Bb@I~@Hb}b@JH_X`B_c}~@Hb}bGu~Op"
  },
  "mass": 214.03586932736317,
  "monoisotopicMass": 212.95511703252,
  "unsaturation": 9,
  "elements": [{
    "symbol": "C",
    "number": 8
  }, {
    "symbol": "H",
    "number": 6
  }, {
    "symbol": "Br",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Bu",
  "name": "Butyl",
  "mf": "C4H9",
  "ocl": {
    "value": "gJPH@liJuP@",
    "coordinates": "!B@Fp@XpAl@FL"
  },
  "mass": 57.114410373442986,
  "monoisotopicMass": 57.07042529007,
  "unsaturation": -1,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 9
  }]
}, {
  "symbol": "Bum",
  "name": "t-Butoxymethyl",
  "mf": "C5H11O",
  "ocl": {
    "value": "gNqHDEeIVjj`@",
    "coordinates": "!B@FL@[@AcXs|@Xvp@"
  },
  "mass": 87.14043270260808,
  "monoisotopicMass": 87.08098997409999,
  "unsaturation": -1,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Bz",
  "name": "Benzoyl",
  "mf": "C7H5O",
  "ocl": {
    "value": "didH`DAYR[e^FX@@@@",
    "coordinates": "!BbOq~@Ha}b@I~Oxa}bGu~Op"
  },
  "mass": 105.1142599717439,
  "monoisotopicMass": 105.03403978072,
  "unsaturation": 9,
  "elements": [{
    "symbol": "C",
    "number": 7
  }, {
    "symbol": "H",
    "number": 5
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Bzl",
  "name": "Benzyl",
  "mf": "C7H7",
  "ocl": {
    "value": "daD@`@VTeeVz`@@@",
    "coordinates": "!B|Gsp_A|_gp_A}_g|"
  },
  "mass": 91.13073655553718,
  "monoisotopicMass": 91.05477522561,
  "unsaturation": 7,
  "elements": [{
    "symbol": "C",
    "number": 7
  }, {
    "symbol": "H",
    "number": 7
  }]
}, {
  "symbol": "Bn",
  "name": "Benzyl",
  "mf": "C7H7",
  "ocl": {
    "value": "daD@`@VTeeVz`@@@",
    "coordinates": "!B|Gsp_A|_gp_A}_g|"
  },
  "mass": 91.13073655553718,
  "monoisotopicMass": 91.05477522561,
  "unsaturation": 7,
  "elements": [{
    "symbol": "C",
    "number": 7
  }, {
    "symbol": "H",
    "number": 7
  }]
}, {
  "symbol": "Bzlo",
  "name": "Benzyloxy",
  "mf": "C7H7O",
  "ocl": {
    "value": "didH`HAYRUe^Fh@@@@",
    "coordinates": "!B|Gwp_OC}|Gq~_A}|Gu~_p"
  },
  "mass": 107.13014147985547,
  "monoisotopicMass": 107.04968984518,
  "unsaturation": 7,
  "elements": [{
    "symbol": "C",
    "number": 7
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Cha",
  "name": "beta-Cyclohexylalanine diradical",
  "mf": "C9H15NO",
  "ocl": {
    "value": "dknHPBPOEgEInWe]NZjjjcH@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}bGvH@gxbGvH_Wx"
  },
  "mass": 153.22184251721796,
  "monoisotopicMass": 153.11536410745,
  "unsaturation": 4,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Chxo",
  "name": "Cyclohexyloxy",
  "mf": "C6H11O",
  "ocl": {
    "value": "daDH`HAYRVU[jjj@@",
    "coordinates": "!B|Gsp_A|_gp_A}_g|"
  },
  "mass": 99.15116859934332,
  "monoisotopicMass": 99.08098997409999,
  "unsaturation": 1,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Cit",
  "name": "Citrulline diradical",
  "mf": "C6H11N3O2",
  "ocl": {
    "value": "dkODPBdttOEgEInWUijjihr@@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}bGvHHa}b@I~@Ha}"
  },
  "mass": 157.170683157999,
  "monoisotopicMass": 157.08512660696,
  "unsaturation": 4,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Citp",
  "name": "Citrulline triradical",
  "mf": "C6H10N3O2",
  "ocl": {
    "value": "dgoDpHJ\\l@gWDEI[UYZfjji`T@",
    "coordinates": "!BbGvHGx@bGvH@ha}bOrH_Wxb@KW_Wx@bGt"
  },
  "mass": 156.16274240394318,
  "monoisotopicMass": 156.07730157473,
  "unsaturation": 5,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 10
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Clz",
  "name": "2-Chlorobenzyloxycarbonyl",
  "mf": "C8H6ClO2",
  "ocl": {
    "value": "dcLDPDpEdXaImYgWYjB@@@",
    "coordinates": "!Bb@I~@Hb}b@JH_X`B_c}~@Hb}bGu~Op"
  },
  "mass": 169.58527912946118,
  "monoisotopicMass": 169.00563211451998,
  "unsaturation": 9,
  "elements": [{
    "symbol": "C",
    "number": 8
  }, {
    "symbol": "H",
    "number": 6
  }, {
    "symbol": "Cl",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Cp",
  "name": "Cyclopentadienyl",
  "mf": "C5H5",
  "ocl": {
    "value": "gFpH@liLimRp@",
    "coordinates": "!B\\OtPThyEGl@fP"
  },
  "mass": 65.09338325395512,
  "monoisotopicMass": 65.03912516115,
  "unsaturation": 5,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 5
  }]
}, {
  "symbol": "Cys",
  "name": "Cysteine diradical",
  "mf": "C3H5NOS",
  "kind": "aa",
  "oneLetter": "C",
  "alternativeOneLetter": "ς",
  "ocl": {
    "value": "dazHpBPOEgG`aInVZjcH@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}bGt"
  },
  "mass": 103.14280700237578,
  "monoisotopicMass": 103.00918495955,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 3
  }, {
    "symbol": "H",
    "number": 5
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Cysp",
  "name": "Cysteine triradical",
  "mf": "C3H4NOS",
  "ocl": {
    "value": "diFHHBD@f@agGoEIVVjjfLP@",
    "coordinates": "!BbGvHHa}_c~HM]}_`BH_P"
  },
  "mass": 102.13486624831998,
  "monoisotopicMass": 102.00135992732,
  "unsaturation": 3,
  "elements": [{
    "symbol": "C",
    "number": 3
  }, {
    "symbol": "H",
    "number": 4
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "D",
  "name": "Deuterium",
  "mf": "[2H]",
  "ocl": {
    "value": "eFAAYhBLCEH@",
    "coordinates": "!B@BL"
  },
  "mass": 2.01410177812,
  "monoisotopicMass": 2.01410177812,
  "unsaturation": -1,
  "elements": [{
    "symbol": "H",
    "number": 1,
    "isotope": 2
  }]
}, {
  "symbol": "Dde",
  "name": "Dde",
  "mf": "C10H13O2",
  "ocl": {
    "value": "dklD`FDEgHhihicIVZfZj@@",
    "coordinates": "!Bb@I~@Ha}upJH@m]}_`BH_Wx@b@I}bOrH"
  },
  "mass": 165.20939861871415,
  "monoisotopicMass": 165.09155465812998,
  "unsaturation": 7,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Dnp",
  "name": "2,4-Dinitrophenyl",
  "mf": "C6H3N2O4",
  "ocl": {
    "value": "dkmB`bWatpVRd^VS{HhheEUFfBAbX@@",
    "coordinates": "!B_c~H_]]}b@I~Owx_`BH_]]}_c~H_]]}"
  },
  "mass": 167.09926376274353,
  "monoisotopicMass": 167.00928158383,
  "unsaturation": 11,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 3
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 4
  }]
}, {
  "symbol": "Et",
  "name": "Ethyl",
  "mf": "C2H5",
  "ocl": {
    "value": "eMBAYRZ@",
    "coordinates": "!B@Fp@Xp"
  },
  "mass": 29.061175563749384,
  "monoisotopicMass": 29.03912516115,
  "unsaturation": -1,
  "elements": [{
    "symbol": "C",
    "number": 2
  }, {
    "symbol": "H",
    "number": 5
  }]
}, {
  "symbol": "Fmoc",
  "name": "Fluorenylmethoxycarbonyl",
  "mf": "C15H11O2",
  "ocl": {
    "value": "fde@b@DX@liMkLrjxeVCzLuT@@@P@@@",
    "coordinates": "!BbOq~@Ha}bOrH_]ARcm}Tv~i`pAeKv|@fpB[j[~iozfAKvp"
  },
  "mass": 223.24719659427882,
  "monoisotopicMass": 223.07590459367,
  "unsaturation": 19,
  "elements": [{
    "symbol": "C",
    "number": 15
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "For",
  "name": "Formyl",
  "mf": "CHO",
  "ocl": {
    "value": "eMJDVTfP@",
    "coordinates": "!B@Fp@Xp"
  },
  "mass": 29.018081575109303,
  "monoisotopicMass": 29.0027396518,
  "unsaturation": 1,
  "elements": [{
    "symbol": "C",
    "number": 1
  }, {
    "symbol": "H",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Gln",
  "name": "Glutamine diradical",
  "mf": "C5H8N2O2",
  "kind": "aa",
  "oneLetter": "Q",
  "alternativeOneLetter": "ξ",
  "ocl": {
    "value": "dmUDPBUICqYqR[evfjihr@@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}bGvHGx@bGt"
  },
  "mass": 128.12942178765059,
  "monoisotopicMass": 128.05857750584,
  "unsaturation": 4,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 8
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Glnp",
  "name": "Glutamine triradical",
  "mf": "C5H7N2O2",
  "ocl": {
    "value": "dcuDpH{MAYeqWqRVuejZjiad@",
    "coordinates": "!BbGvHGx@bGvH@ha}_c~HM]}_`BH_P"
  },
  "mass": 127.12148103359483,
  "monoisotopicMass": 127.05075247361,
  "unsaturation": 5,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Glp",
  "name": "Pyroglutamine",
  "mf": "C5H5NO2",
  "ocl": {
    "value": "deVDPBRP|V\\TfygxYjjZL`@",
    "coordinates": "!Bb@I~@Ha}tEJNwr[@UMo@FXBN"
  },
  "mass": 111.09889631403748,
  "monoisotopicMass": 111.03202840472,
  "unsaturation": 6,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 5
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Glu",
  "name": "Glutamic acid diradical",
  "mf": "C5H7NO3",
  "kind": "aa",
  "oneLetter": "E",
  "alternativeOneLetter": "ε",
  "ocl": {
    "value": "dmVLPBRUCqYqR[evfjihr@@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}bGvHGx@bGt"
  },
  "mass": 129.11418274646732,
  "monoisotopicMass": 129.04259308875,
  "unsaturation": 4,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 3
  }]
}, {
  "symbol": "Glup",
  "name": "Glutamic acid triradical",
  "mf": "C5H6NO3",
  "ocl": {
    "value": "dcvLpNcM@IeqWqRVuejZjiad@",
    "coordinates": "!BbGvHGx@bGvH@ha}_c~HM]}_`BH_P"
  },
  "mass": 128.10624199241153,
  "monoisotopicMass": 128.03476805652002,
  "unsaturation": 5,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 6
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 3
  }]
}, {
  "symbol": "Gly",
  "name": "Glycine diradical",
  "mf": "C2H3NO",
  "kind": "aa",
  "oneLetter": "G",
  "alternativeOneLetter": "γ",
  "ocl": {
    "value": "gGYDBaxuqR[Yj@@",
    "coordinates": "!BbOq~@Ha}bOrH_P"
  },
  "mass": 57.051402191401905,
  "monoisotopicMass": 57.021463720689994,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 2
  }, {
    "symbol": "H",
    "number": 3
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Hci",
  "name": "Homocitrulline diradical",
  "mf": "C7H13N3O2",
  "ocl": {
    "value": "dgoDPBVtLOEgEInWUZZjjfcH@",
    "coordinates": "!BbGu~Ox`B_`BH_Xc|bOrH_X`BbGvHGx@bGt"
  },
  "mass": 171.19730056284578,
  "monoisotopicMass": 171.10077667142,
  "unsaturation": 4,
  "elements": [{
    "symbol": "C",
    "number": 7
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Hcip",
  "name": "Homocitrulline triradical",
  "mf": "C7H12N3O2",
  "ocl": {
    "value": "do_DpHI\\\\EdwFEI[UVVijjjfIP@",
    "coordinates": "!BbOrH_Wxb@JH_Xc|bGvHHa}_c~H@m]}_`BH_P"
  },
  "mass": 170.18935980879002,
  "monoisotopicMass": 170.09295163918998,
  "unsaturation": 5,
  "elements": [{
    "symbol": "C",
    "number": 7
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "His",
  "name": "Histidine diradical",
  "mf": "C6H7N3O",
  "kind": "aa",
  "oneLetter": "H",
  "alternativeOneLetter": "ζ",
  "ocl": {
    "value": "dcOHPBGTCqYqR[eyUvZjejL`@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}bGwPTh{_UMo@FP"
  },
  "mass": 137.13951521745759,
  "monoisotopicMass": 137.05891185847,
  "unsaturation": 8,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Hisp",
  "name": "Histidine triradical",
  "mf": "C6H6N3O",
  "ocl": {
    "value": "dkoHpHHSAYUqwqRY]YXjjVjihy@@",
    "coordinates": "!BTmA}bL@fUHRN`H`BbGu~Ox`Buwu~@Ha}"
  },
  "mass": 136.13157446340182,
  "monoisotopicMass": 136.05108682624,
  "unsaturation": 9,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 6
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Hser",
  "name": "Homoserine diradical",
  "mf": "C4H7NO2",
  "ocl": {
    "value": "diFDPBPP|V\\Tfy^Zjhr@@",
    "coordinates": "!BbGu~Ox`B_`BH_X`Bb@JH_P"
  },
  "mass": 101.10404192541378,
  "monoisotopicMass": 101.04767846918,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Hserp",
  "name": "Homoserine triradical",
  "mf": "C4H6NO2",
  "ocl": {
    "value": "defDpJbPV^\\Q|TeVVjji`d@",
    "coordinates": "!Bb@JH_X`BbGu~Oxc|uwu~@Ha}"
  },
  "mass": 100.09610117135801,
  "monoisotopicMass": 100.03985343695001,
  "unsaturation": 3,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 6
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Hyp",
  "name": "Hydroxyproline diradical",
  "mf": "C5H7NO2",
  "ocl": {
    "value": "deVDPBRP|V\\\\bfbbOCMUUIdE@@",
    "coordinates": "!Bb@I~@Ha}tEJNwr[@UMo@FUJO"
  },
  "mass": 113.11477782214904,
  "monoisotopicMass": 113.04767846918,
  "unsaturation": 4,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Hypp",
  "name": "Hydroxyproline triradical",
  "mf": "C5H6NO2",
  "ocl": {
    "value": "dmvDpJaPB^\\Y|TeeWjZjjidRL`@",
    "coordinates": "!BBOpH_UARcc}TNtBY@HyRSpCQDr\\"
  },
  "mass": 112.10683706809326,
  "monoisotopicMass": 112.03985343695001,
  "unsaturation": 5,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 6
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Ile",
  "name": "Isoleucine diradical",
  "mf": "C6H11NO",
  "kind": "aa",
  "oneLetter": "I",
  "alternativeOneLetter": "ι",
  "ocl": {
    "value": "defHPBPOEgEInVyjjdrT`@",
    "coordinates": "!BbGu~Oxc|_`BH_Xc|b@I~Oxa}"
  },
  "mass": 113.15787181078912,
  "monoisotopicMass": 113.08406397853,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Ivdde",
  "name": "1-[4,4-dimethyl-2,6-dioxocyclohexylidene)-3-methylbutyl",
  "mf": "C13H19O2",
  "ocl": {
    "value": "f`a@b@NR@lyEEDhhigEVfjYjj`@@",
    "coordinates": "!BbOq~@Ha}urHGxuwu~@Ha}_`CW_Xa}bOq}b@JH"
  },
  "mass": 207.28925083325453,
  "monoisotopicMass": 207.13850485151,
  "unsaturation": 7,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 19
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Leu",
  "name": "Leucine diradical",
  "mf": "C6H11NO",
  "kind": "aa",
  "oneLetter": "L",
  "alternativeOneLetter": "λ",
  "ocl": {
    "value": "defHPBPOEgEInWijjhr@@",
    "coordinates": "!BbGu~Ox`B_`BH_X`Bb@I~@Ha}"
  },
  "mass": 113.15787181078912,
  "monoisotopicMass": 113.08406397853,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Lys",
  "name": "Lysine diradical",
  "mf": "C6H12N2O",
  "kind": "aa",
  "oneLetter": "K",
  "alternativeOneLetter": "κ",
  "ocl": {
    "value": "dmUHPBU@|V\\Tfy]YjjjL`@",
    "coordinates": "!BbGu~Ox`B_`BHoX`Bb@JH_X`BbKt"
  },
  "mass": 128.17251577629068,
  "monoisotopicMass": 128.09496301519,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Lysp",
  "name": "Lysine triradical",
  "mf": "C6H11N2O",
  "ocl": {
    "value": "dcuHpH{PVY\\U|TeUYZjjjXY@@",
    "coordinates": "!Bb@JH_X`BbGvH@ha}_c~H@m]}_`BH_P"
  },
  "mass": 127.16457502223491,
  "monoisotopicMass": 127.08713798295999,
  "unsaturation": 3,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Mbh",
  "name": "4,4'-Dimethoxybenzhydryl",
  "mf": "C15H15O2",
  "ocl": {
    "value": "fdy@b@G^@liLsJkzlcZmT@@@UP@@@",
    "coordinates": "!BbGvHGx_`BH_Xa}uwvHHc|_c}~Oxa}uwvHGxbGwW_P"
  },
  "mass": 227.27895961050194,
  "monoisotopicMass": 227.10720472258998,
  "unsaturation": 15,
  "elements": [{
    "symbol": "C",
    "number": 15
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Me",
  "name": "Methyl",
  "mf": "CH3",
  "ocl": {
    "value": "eFBAYc@@",
    "coordinates": "!B@FL"
  },
  "mass": 15.03455815890258,
  "monoisotopicMass": 15.02347509669,
  "unsaturation": -1,
  "elements": [{
    "symbol": "C",
    "number": 1
  }, {
    "symbol": "H",
    "number": 3
  }]
}, {
  "symbol": "Mebzl",
  "name": "4-Methylbenzyl",
  "mf": "C8H9",
  "ocl": {
    "value": "did@`@VTee]nh@H@@",
    "coordinates": "!B|Gsp__A|_gp_C}_gp_P"
  },
  "mass": 105.15735396038399,
  "monoisotopicMass": 105.07042529007,
  "unsaturation": 7,
  "elements": [{
    "symbol": "C",
    "number": 8
  }, {
    "symbol": "H",
    "number": 9
  }]
}, {
  "symbol": "Meobzl",
  "name": "4-Methoxybenzyl",
  "mf": "C8H9O",
  "ocl": {
    "value": "deTH`AAYRVUunh@J@@",
    "coordinates": "!B|Gsp__A|_gp_A}_gp_Wy"
  },
  "mass": 121.15675888470227,
  "monoisotopicMass": 121.06533990964,
  "unsaturation": 7,
  "elements": [{
    "symbol": "C",
    "number": 8
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Met",
  "name": "Methionine diradical",
  "mf": "C5H9NOS",
  "kind": "aa",
  "oneLetter": "M",
  "alternativeOneLetter": "μ",
  "ocl": {
    "value": "defHpBPOEgDPaInWYjjhr@@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}bGvHHa}"
  },
  "mass": 131.19604181206938,
  "monoisotopicMass": 131.04048508847,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Mmt",
  "name": "4-Methoxytrityl",
  "mf": "C20H17O",
  "ocl": {
    "value": "ffcAB@B`V\\bdTTTRRRVvIhnRGMT@@@@AP@@@",
    "coordinates": "!BbKvHM^}_c}~@Hb}dXWHb}j|nHHc|AqOWoWxJV^Ho]\\BuwvHHb}"
  },
  "mass": 273.3491156779715,
  "monoisotopicMass": 273.12794016748,
  "unsaturation": 23,
  "elements": [{
    "symbol": "C",
    "number": 20
  }, {
    "symbol": "H",
    "number": 17
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Mtc",
  "name": "2,2,5,7,8-pentamethylchroman-6-sulphonyl",
  "mf": "C14H19O3S",
  "ocl": {
    "value": "fleAa@DX\\AY`DYEHXhhilmiKW`rpDQUUD@@",
    "coordinates": "!BbGtBbGwWbGvHGxbGu~@Ha}uwu~Ox`B_c~H_Xa}b@H@_osW"
  },
  "mass": 267.36417906043516,
  "monoisotopicMass": 267.10549064548,
  "unsaturation": 9,
  "elements": [{
    "symbol": "C",
    "number": 14
  }, {
    "symbol": "H",
    "number": 19
  }, {
    "symbol": "O",
    "number": 3
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Mtr",
  "name": "4-Methoxy-2,3,6-trimethylbenzenesulphonyl",
  "mf": "C10H13O3S",
  "ocl": {
    "value": "do|LPDrpVXBLbdLTTTngYXBHj@@",
    "coordinates": "!BbOq}b@KWb@I~@Ha}bOsWHc|_c~H_Wx@b@JH_P"
  },
  "mass": 213.27359094915948,
  "monoisotopicMass": 213.05854045209998,
  "unsaturation": 7,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "O",
    "number": 3
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Mts",
  "name": "Mesitylene-2-sulphonyl",
  "mf": "C9H11O2S",
  "ocl": {
    "value": "d@"
  },
  "mass": 183.24756861999438,
  "monoisotopicMass": 183.04797576807,
  "unsaturation": 7,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "O",
    "number": 2
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Mtt",
  "name": "4-Methyltrityl",
  "mf": "C20H17",
  "ocl": {
    "value": "d@"
  },
  "mass": 257.3497107536532,
  "monoisotopicMass": 257.13302554791,
  "unsaturation": 23,
  "elements": [{
    "symbol": "C",
    "number": 20
  }, {
    "symbol": "H",
    "number": 17
  }]
}, {
  "symbol": "Nle",
  "name": "Norleucine diradical",
  "mf": "C6H11NO",
  "ocl": {
    "value": "defHPBPOEgEInWYjjhr@@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}bGvHHa}"
  },
  "mass": 113.15787181078912,
  "monoisotopicMass": 113.08406397853,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Npys",
  "name": "3-Nitro-2-pyridinesulphenyl",
  "mf": "C5H3N2O2S",
  "ocl": {
    "value": "d@",
    "coordinates": ""
  },
  "mass": 155.1545054234988,
  "monoisotopicMass": 154.99152351908998,
  "unsaturation": 9,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 3
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 2
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Nva",
  "name": "Norvaline diradical",
  "mf": "C5H9NO",
  "ocl": {
    "value": "diFHPBPOEgEInWfjjL`@",
    "coordinates": "!BbGu~Ox`B_`BH_X`Bb@JH_P"
  },
  "mass": 99.13125440594231,
  "monoisotopicMass": 99.06841391407,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Odmab",
  "name": "Odmab",
  "mf": "C20H26NO3",
  "ocl": {
    "value": "d@"
  },
  "mass": 328.4260955245558,
  "monoisotopicMass": 328.19126870111995,
  "unsaturation": 15,
  "elements": [{
    "symbol": "C",
    "number": 20
  }, {
    "symbol": "H",
    "number": 26
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 3
  }]
}, {
  "symbol": "Orn",
  "name": "Ornithine diradical",
  "mf": "C5H10N2O",
  "ocl": {
    "value": "deeHPBe@|V\\Tfy]fjjcH@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}bGvHHa}"
  },
  "mass": 114.14589837144388,
  "monoisotopicMass": 114.07931295072999,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 10
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Ornp",
  "name": "Ornithine triradical",
  "mf": "C5H9N2O",
  "ocl": {
    "value": "dmUHpHYPBQ\\Y|TeUejjjfJP@",
    "coordinates": "!BbGvHHa}b@JH_Wxb@KW_Wx@bGt"
  },
  "mass": 113.13795761738811,
  "monoisotopicMass": 113.0714879185,
  "unsaturation": 3,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Pbf",
  "name": "2,2,4,6,7-pentamethyldihydrobenzofurane-5-sulfonyl",
  "mf": "C13H17O3S",
  "ocl": {
    "value": "d@",
    "coordinates": ""
  },
  "mass": 253.33756165558833,
  "monoisotopicMass": 253.08984058101998,
  "unsaturation": 9,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 17
  }, {
    "symbol": "O",
    "number": 3
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Pen",
  "name": "Penicillamine diradical",
  "mf": "C5H9NOS",
  "ocl": {
    "value": "d@",
    "coordinates": ""
  },
  "mass": 131.19604181206938,
  "monoisotopicMass": 131.04048508847,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Penp",
  "name": "Penicillamine triradical",
  "mf": "C5H8NOS",
  "ocl": {
    "value": "d@",
    "coordinates": ""
  },
  "mass": 130.1881010580136,
  "monoisotopicMass": 130.03266005624,
  "unsaturation": 3,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 8
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Ph",
  "name": "Phenyl",
  "mf": "C6H5",
  "ocl": {
    "value": "gOpH@liLkW@@@@",
    "coordinates": "!B|Owp_Gy|OwpWy"
  },
  "mass": 77.10411915069038,
  "monoisotopicMass": 77.03912516115,
  "unsaturation": 7,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 5
  }]
}, {
  "symbol": "Phe",
  "name": "Phenylalanine diradical",
  "mf": "C9H9NO",
  "kind": "aa",
  "oneLetter": "F",
  "alternativeOneLetter": "φ",
  "ocl": {
    "value": "dknHPBPOEgEInWe]NZj@@cH@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}bGvH@gxbGvH_Wx"
  },
  "mass": 147.1741979928833,
  "monoisotopicMass": 147.06841391407002,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Phepcl",
  "name": "4-Chlorophenylalanine diradical",
  "mf": "C9H8ClNO",
  "ocl": {
    "value": "dg^HpBPOEgFxaInWe_Sfj`@bL`@",
    "coordinates": "!BbOq~@Ha}_c~H@m]}bGvH@gxbGvH_WxbGt"
  },
  "mass": 181.6191948214355,
  "monoisotopicMass": 181.02944156384,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 8
  }, {
    "symbol": "Cl",
    "number": 1
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Pmc",
  "name": "2,2,5,7,8-Pentamethylchroman-6-sulphonyl",
  "mf": "C14H19O3S",
  "ocl": {
    "value": "d@",
    "coordinates": ""
  },
  "mass": 267.36417906043516,
  "monoisotopicMass": 267.10549064548,
  "unsaturation": 9,
  "elements": [{
    "symbol": "C",
    "number": 14
  }, {
    "symbol": "H",
    "number": 19
  }, {
    "symbol": "O",
    "number": 3
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Pro",
  "name": "Proline diradical",
  "mf": "C5H7NO",
  "kind": "aa",
  "oneLetter": "P",
  "alternativeOneLetter": "π",
  "ocl": {
    "value": "difHPBPOEgEInYxYjjhr@@",
    "coordinates": "!Bb@I~@Ha}tEJNwr[@UMo@FP"
  },
  "mass": 97.11537289783075,
  "monoisotopicMass": 97.05276384961,
  "unsaturation": 4,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Pyr",
  "name": "Pyroglutamine",
  "mf": "C5H5NO2",
  "ocl": {
    "value": "deVDPBRP|V\\TfygxYjjZL`@",
    "coordinates": "!Bb@I~@Ha}tEJNwr[@UMo@FXBN"
  },
  "mass": 111.09889631403748,
  "monoisotopicMass": 111.03202840472,
  "unsaturation": 6,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 5
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Sar",
  "name": "Sarcosine diradical",
  "mf": "C3H5NO",
  "ocl": {
    "value": "d@",
    "coordinates": ""
  },
  "mass": 71.07801959624871,
  "monoisotopicMass": 71.03711378515,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 3
  }, {
    "symbol": "H",
    "number": 5
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Ser",
  "name": "Serine diradical",
  "mf": "C3H5NO2",
  "kind": "aa",
  "oneLetter": "S",
  "alternativeOneLetter": "σ",
  "ocl": {
    "value": "dazDPBS`|V\\TfyYjjL`@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}bGt"
  },
  "mass": 87.07742452056698,
  "monoisotopicMass": 87.03202840472,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 3
  }, {
    "symbol": "H",
    "number": 5
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Serp",
  "name": "Serine triradical",
  "mf": "C3H4NO2",
  "ocl": {
    "value": "diFDpB`PBV\\^|TeYZjjXq@@",
    "coordinates": "!BbGvHHa}_c~HM]}_`BH_P"
  },
  "mass": 86.06948376651121,
  "monoisotopicMass": 86.02420337249,
  "unsaturation": 3,
  "elements": [{
    "symbol": "C",
    "number": 3
  }, {
    "symbol": "H",
    "number": 4
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Sta",
  "name": "Statine diradical",
  "mf": "C8H15NO2",
  "ocl": {
    "value": "d@"
  },
  "mass": 157.210511544801,
  "monoisotopicMass": 157.11027872702002,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 8
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Stap",
  "name": "Statine triradical",
  "mf": "C8H14NO2",
  "ocl": {
    "value": "d@"
  },
  "mass": 156.2025707907452,
  "monoisotopicMass": 156.10245369479,
  "unsaturation": 3,
  "elements": [{
    "symbol": "C",
    "number": 8
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Tacm",
  "name": "Trimethylacetamidomethyl",
  "mf": "C6H12NO",
  "ocl": {
    "value": "d@"
  },
  "mass": 114.16581256484488,
  "monoisotopicMass": 114.09188901076,
  "unsaturation": 1,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Tbdms",
  "name": "t-Butyldimethylsilyl",
  "mf": "C6H15Si",
  "ocl": {
    "value": "d@"
  },
  "mass": 115.2690253969541,
  "monoisotopicMass": 115.09430201810001,
  "unsaturation": -1,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "Si",
    "number": 1
  }]
}, {
  "symbol": "Tbu",
  "name": "t-Butyl",
  "mf": "C4H9",
  "ocl": {
    "value": "d@"
  },
  "mass": 57.114410373442986,
  "monoisotopicMass": 57.07042529007,
  "unsaturation": -1,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 9
  }]
}, {
  "symbol": "Tbuo",
  "name": "t-Butoxy",
  "mf": "C4H9O",
  "ocl": {
    "value": "d@"
  },
  "mass": 73.11381529776126,
  "monoisotopicMass": 73.06533990964,
  "unsaturation": -1,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Tbuthio",
  "name": "t-Butylthio",
  "mf": "C4H9S",
  "ocl": {
    "value": "d@"
  },
  "mass": 89.17919777957005,
  "monoisotopicMass": 89.04249646446999,
  "unsaturation": -1,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Tfa",
  "name": "Trifluoroacetyl",
  "mf": "C2F3O",
  "ocl": {
    "value": "d@"
  },
  "mass": 97.01608620597878,
  "monoisotopicMass": 96.99012410776,
  "unsaturation": 1,
  "elements": [{
    "symbol": "C",
    "number": 2
  }, {
    "symbol": "F",
    "number": 3
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Thr",
  "name": "Threonine diradical",
  "mf": "C4H7NO2",
  "kind": "aa",
  "oneLetter": "T",
  "alternativeOneLetter": "τ",
  "ocl": {
    "value": "d@"
  },
  "mass": 101.10404192541378,
  "monoisotopicMass": 101.04767846918,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Thrp",
  "name": "Threonine triradical",
  "mf": "C4H6NO2",
  "ocl": {
    "value": "d@"
  },
  "mass": 100.09610117135801,
  "monoisotopicMass": 100.03985343695001,
  "unsaturation": 3,
  "elements": [{
    "symbol": "C",
    "number": 4
  }, {
    "symbol": "H",
    "number": 6
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Tfsi",
  "name": "(Bis)(trifluoromethanesulfonyl)imide",
  "mf": "C2F6NO4S2",
  "ocl": {
    "value": "d@"
  },
  "mass": 280.1457884908235,
  "monoisotopicMass": 279.91729380789,
  "unsaturation": -1,
  "elements": [{
    "symbol": "C",
    "number": 2
  }, {
    "symbol": "F",
    "number": 6
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 4
  }, {
    "symbol": "S",
    "number": 2
  }]
}, {
  "symbol": "Tips",
  "name": "Triisopropylsilyl",
  "mf": "C9H21Si",
  "ocl": {
    "value": "dmT@P@VX\\DffYjjjh@@",
    "coordinates": "!B_a@gHb\\]FBIuWxP^zi~KwxPFAt"
  },
  "mass": 157.34887761149452,
  "monoisotopicMass": 157.14125221148,
  "unsaturation": -1,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 21
  }, {
    "symbol": "Si",
    "number": 1
  }]
}, {
  "symbol": "Tms",
  "name": "Trimethylsilyl",
  "mf": "C3H9Si",
  "ocl": {
    "value": "gJPD@lqpRZj`@",
    "coordinates": "!BbOq~@GxbGt"
  },
  "mass": 73.1891731824137,
  "monoisotopicMass": 73.04735182472,
  "unsaturation": -1,
  "elements": [{
    "symbol": "C",
    "number": 3
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "Si",
    "number": 1
  }]
}, {
  "symbol": "Tos",
  "name": "Tosyl",
  "mf": "C7H7O2S",
  "ocl": {
    "value": "dmtDPDpEf@cHiCDeafV@B@@",
    "coordinates": "!B|Ou||Ovw|Gwp_Gy|GwpWy|Gt"
  },
  "mass": 155.1943338103008,
  "monoisotopicMass": 155.01667563914998,
  "unsaturation": 7,
  "elements": [{
    "symbol": "C",
    "number": 7
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "O",
    "number": 2
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Trp",
  "name": "Tryptophan diradical",
  "mf": "C11H10N2O",
  "kind": "aa",
  "oneLetter": "W",
  "alternativeOneLetter": "ω",
  "ocl": {
    "value": "f`qQA@BFPCqXxiMr|rnhsoSUTa@QCD@@",
    "coordinates": "!BbOq~@Ha}_c~H@m]}bGwPTh{_UMojXL@YpB[@Ini`"
  },
  "mass": 186.21031375185538,
  "monoisotopicMass": 186.07931295073,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 10
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Trpp",
  "name": "Tryptophan triradical",
  "mf": "C11H9N2O",
  "ocl": {
    "value": "fhiQC@HFB@I\\x~|TfYU_ebLDjhDHjibFd@",
    "coordinates": "!BTmA}bL@fUHR_Ihz@iVBeXHc|grZH_WxbOsW_Wx@bGt"
  },
  "mass": 185.20237299779959,
  "monoisotopicMass": 185.07148791850003,
  "unsaturation": 15,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Trt",
  "name": "Trityl",
  "mf": "C19H15",
  "ocl": {
    "value": "fbm@B@@KJSSLrjkyhnRGMT@@@@@@@@",
    "coordinates": "!BrHI~PGy_rMvW@l`BQCvWw\\bBAg}~PGy@]i}~W|c]cNwH`i_]_e|"
  },
  "mass": 243.32309334880637,
  "monoisotopicMass": 243.11737548345,
  "unsaturation": 23,
  "elements": [{
    "symbol": "C",
    "number": 19
  }, {
    "symbol": "H",
    "number": 15
  }]
}, {
  "symbol": "Tyr",
  "name": "Tyrosine diradical",
  "mf": "C9H9NO2",
  "kind": "aa",
  "oneLetter": "Y",
  "alternativeOneLetter": "ψ",
  "ocl": {
    "value": "dg^DPBRp|V\\Tfy^U}NZj@BHr@@",
    "coordinates": "!BbOq~@Ha}_c~H@m]}bGvH@gxbGvH_WxbGt"
  },
  "mass": 163.1736029172016,
  "monoisotopicMass": 163.06332853364,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Tyrp",
  "name": "Tyrosine triradical",
  "mf": "C9H8NO2",
  "ocl": {
    "value": "do~DpEapBS\\[|Tee]YYnh@JjdbT@",
    "coordinates": "!B_`BHGx@bGvH@h`BbKvH@ha}_c~H@m]}_`BHoP"
  },
  "mass": 162.16566216314578,
  "monoisotopicMass": 162.05550350141,
  "unsaturation": 11,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 8
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Val",
  "name": "Valine",
  "mf": "C5H9NO",
  "kind": "aa",
  "oneLetter": "V",
  "alternativeOneLetter": "ν",
  "ocl": {
    "value": "diFHPBPOEgEInVfjjL`@",
    "coordinates": "!Bb@I~@Ha}_c~H@m]}_`BH_P"
  },
  "mass": 99.13125440594231,
  "monoisotopicMass": 99.06841391407,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Valoh",
  "name": "beta-Hydroxyvaline diradical",
  "mf": "C5H9NO2",
  "ocl": {
    "value": "defDPBS`|V\\TfyZfjjcH@",
    "coordinates": "!Bb@I~@Ha}b@I~Oxa}Owy~OpA~"
  },
  "mass": 115.13065933026058,
  "monoisotopicMass": 115.06332853364,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Valohp",
  "name": "beta-Hydroxyvaline triradical",
  "mf": "C5H8NO2",
  "ocl": {
    "value": "dmVDpFaPBQ\\Y|\\bTbaTjjjXq@@",
    "coordinates": "!BbGvHHa}_Xc|bGxb@KW_Wx@bGt"
  },
  "mass": 114.1227185762048,
  "monoisotopicMass": 114.05550350141002,
  "unsaturation": 3,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 8
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Xan",
  "name": "Xanthyl",
  "mf": "C13H9O",
  "ocl": {
    "value": "d@",
    "coordinates": ""
  },
  "mass": 181.21043836837848,
  "monoisotopicMass": 181.06533990964002,
  "unsaturation": 17,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Xle",
  "name": "Leucine or Isoleucine diradical",
  "mf": "C6H11NO",
  "kind": "aa",
  "oneLetter": "J",
  "mass": 113.15787181078912,
  "monoisotopicMass": 113.08406397853,
  "unsaturation": 2,
  "elements": [{
    "symbol": "C",
    "number": 6
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Z",
  "name": "Benzyloxycarbonyl",
  "mf": "C8H7O2",
  "ocl": {
    "value": "dmtD`DpEeImYVUfh@@@@",
    "coordinates": "!Bb@I~@Ha}b@JH_Xc|_c~H_Xa}_c|"
  },
  "mass": 135.14028230090898,
  "monoisotopicMass": 135.04460446475,
  "unsaturation": 9,
  "elements": [{
    "symbol": "C",
    "number": 8
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Damp",
  "name": "Desoxyadenosine monophosphate diradical",
  "mf": "C10H12N5O5P",
  "kind": "DNAp",
  "oneLetter": "A",
  "alternativeOneLetter": "α",
  "ocl": {
    "value": "fnsiS@IASUlJB]xGbkplxyDhhldhiEEUeSdTekUUUULBATXPlKd@@",
    "coordinates": "!Bqc}{JxyO|XoSWC}W]poGQ\\Ou}]rmx\\Ou}]{qpza|qb}MJwlk^sFO|X"
  },
  "mass": 313.2069506932622,
  "monoisotopicMass": 313.05760550518,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 5
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dcmp",
  "name": "Desoxycytidine monophosphate diradical",
  "mf": "C9H12N3O6P",
  "kind": "DNAp",
  "oneLetter": "C",
  "alternativeOneLetter": "ς",
  "ocl": {
    "value": "fjmps@IQKB`g^BCqUxV\\\\bTTVRTTbb^iqNZjjjifVkBEa\\`@",
    "coordinates": "!Bqc}{JxyO|XoSWA}_W]poGQ\\GuMKuMh\\Gu}]{qpSF]tWQTvatP"
  },
  "mass": 289.18221329795364,
  "monoisotopicMass": 289.04637211589,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dgmp",
  "name": "Desoxyguanosine monophosphate diradical",
  "mf": "C10H12N5O6P",
  "kind": "DNAp",
  "oneLetter": "G",
  "alternativeOneLetter": "γ",
  "ocl": {
    "value": "fakhs@IASUlJB]{hOEWaYqrIQQYIQRJJkQTyEIZuUUUSRtsUaBpnP@",
    "coordinates": "!Bqc}{JxyO|XoSWA}W]poGQ\\Gu}]rmx\\Ou}]{qpza|qb}MJwlk^sFza|q`"
  },
  "mass": 329.20635561758047,
  "monoisotopicMass": 329.05252012475,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dtmp",
  "name": "Desoxythymidine monophosphate diradical",
  "mf": "C10H13N2O7P",
  "kind": "DNAp",
  "oneLetter": "T",
  "alternativeOneLetter": "τ",
  "ocl": {
    "value": "ff}Qs@IQaPSoAjCqUxV\\\\bTTVRTTbbZUNIsUUUULsSVDKBy@@",
    "coordinates": "!Bqc}{JxyO|XoSWC}_W]poGQ\\GuMKuMh\\Gu}]{qpSF]tWQTvaSZGQ"
  },
  "mass": 304.1935916616171,
  "monoisotopicMass": 304.04603776326,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dump",
  "name": "Desoxyuridine monophosphate diradical",
  "mf": "C9H11N2O7P",
  "kind": "DNAp",
  "oneLetter": "U",
  "alternativeOneLetter": "υ",
  "ocl": {
    "value": "fjmQs@IQaPSoAJCqUxV\\\\bTTVRTTbb^iqNZjjjifYkBEa\\`@",
    "coordinates": "!Bqc}{JxyO|XoSWA}_W]poGQ\\GuMKuMh\\Gu}]{qpSF]tWQTvatP"
  },
  "mass": 290.1669742567703,
  "monoisotopicMass": 290.0303876988,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Drmp",
  "name": "Desoxyribose monophosphate diradical",
  "mf": "C5H7O5P",
  "kind": "DNAp",
  "ocl": {
    "value": "d@",
    "coordinates": ""
  },
  "mass": 178.08005138207807,
  "monoisotopicMass": 178.00311032188,
  "unsaturation": 4,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "O",
    "number": 5
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dadp",
  "name": "Desoxyadenosine diphosphate diradical",
  "mf": "C10H13N5O8P2",
  "kind": "DNApp",
  "oneLetter": "A",
  "ocl": {
    "value": "fmwhH`IASM\\JBl{wQ`|U^F_AkbdlsjsSOoRtyEMYuUUUM@pSEQaBpnP@",
    "coordinates": "!BIi[Rx{_grZOSXa}_]^H@mQbGu}utnDM^HGwWzf~_Ih}M_`AKvto[_`@_`A~grZ_I`"
  },
  "mass": 393.1868682186928,
  "monoisotopicMass": 393.02393639454,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Dcdp",
  "name": "Desoxycytidine diphosphate diradical",
  "mf": "C9H13N3O9P2",
  "kind": "DNApp",
  "oneLetter": "C",
  "ocl": {
    "value": "fikqH`IQGB`kN|EoP^JoCOaUqrIQQYIQRJKGRJgDejjjjZYfZkBEa\\`@",
    "coordinates": "!BIi[Rx{_grZOSXa}_]^H@mQbGuMcqLX@m^H@gwWKB__t]Q_`@SFGx@Owx@_mQ"
  },
  "mass": 369.16213082338425,
  "monoisotopicMass": 369.01270300525005,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Dgdp",
  "name": "Desoxyguanosine diphosphate diradical",
  "mf": "C10H13N5O9P2",
  "kind": "DNApp",
  "oneLetter": "G",
  "ocl": {
    "value": "fcoiH`IASM\\JBl{wQ{Axj|L~CWEIYgUff_^fZ\\bflzjjjfiZifZlHVEr@@",
    "coordinates": "!BIi[Rx{_grZOSXa}_]^H@mQbGu}utnD@m^H@gwWzf~_Ih}M_`AKvto[_`@_`A~gr[j[y|f"
  },
  "mass": 409.186273143011,
  "monoisotopicMass": 409.01885101411,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Dtdp",
  "name": "Desoxythymidine diphosphate diradical",
  "mf": "C10H14N2O10P2",
  "kind": "DNApp",
  "oneLetter": "T",
  "ocl": {
    "value": "fe{Ph`IQaPUg^Ct\\p^JoCO`uqrIQQYIQRJKEJQTxdmUUUSSMTsVDKBy@@",
    "coordinates": "!BIi[Rx{_grZOSXa}_]^HMQbGuMcqLX@m^H@gwWKB__t]Q_`@SFALX_`@_`A~w}D"
  },
  "mass": 384.1735091870477,
  "monoisotopicMass": 384.01236865262,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Dudp",
  "name": "Desoxyuridine diphosphate diradical",
  "mf": "C9H12N2O10P2",
  "kind": "DNApp",
  "oneLetter": "U",
  "ocl": {
    "value": "fikPh`IQaPUg^Bwhp^JoCOaUqrIQQYIQRJKGRJgDejjjjZYjYkBEa\\`@",
    "coordinates": "!BIi[Rx{_grZOSXa}_]^H@mQbGuMcqLX@m^H@gwWKB__t]Q_`@SFGx@Owx@_mQ"
  },
  "mass": 370.1468917822009,
  "monoisotopicMass": 369.99671858816,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Datp",
  "name": "Desoxyadenosine triphosphate diradical",
  "mf": "C10H14N5O11P3",
  "kind": "DNAppp",
  "oneLetter": "A",
  "ocl": {
    "value": "eohZMJ@I@diehJAKGOFnakg`OESpr|Mo@yqrIQQYIQRJKYZQKVRcbIJjZjjjihFAhjZcAAXKb@@",
    "coordinates": "!BIi[Rx{_grZOSXa}_]^H@mQbGu}utnDM^H@gwWzf~_Ih}M_`AKvto[@hcW@`A~grZ_Igx@_`@@_c}~"
  },
  "mass": 473.16678574412344,
  "monoisotopicMass": 472.9902672839,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 3
  }]
}, {
  "symbol": "Dctp",
  "name": "Desoxycytidine triphosphate diradical",
  "mf": "C9H14N3O12P3",
  "kind": "DNAppp",
  "oneLetter": "C",
  "ocl": {
    "value": "fkopZ`IQGB`kN|Fk^{NCqUxY|I~BwGHeEEdeEHhl]HlYJ\\RVjjjiifVjfkBEa\\`@",
    "coordinates": "!BIi[Rx{_grZOSXa}_]^H@mQbGuMcqLX@m^H@gwWKB__t]Q_`@SFOrHupH@_mQ_`A~@@A~Owx"
  },
  "mass": 449.14204834881485,
  "monoisotopicMass": 448.97903389461004,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 12
  }, {
    "symbol": "P",
    "number": 3
  }]
}, {
  "symbol": "Dgtp",
  "name": "Desoxyguanosine triphosphate diradical",
  "mf": "C10H14N5O12P3",
  "kind": "DNAppp",
  "oneLetter": "G",
  "ocl": {
    "value": "e`TZCJ@I@diehJAKGOFnamgo`OESpr|CoByqrIQQYIQRJKYZQQYrT\\QIUSUUUUMRuMLtuVBBpWD@@",
    "coordinates": "!BIi[Rx{_grZOSXa}_]^H@mQbGu}utnD@m^H@gwWzf~_Ih}M_`AKvto[@hcW@`A~gr[j[y|f_`A~@@A~Owx"
  },
  "mass": 489.16619066844174,
  "monoisotopicMass": 488.98518190347005,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 12
  }, {
    "symbol": "P",
    "number": 3
  }]
}, {
  "symbol": "Dttp",
  "name": "Desoxythymidine triphosphate diradical",
  "mf": "C10H15N2O13P3",
  "kind": "DNAppp",
  "oneLetter": "T",
  "ocl": {
    "value": "fgQZ`IQaPUg^BwhygnCqUxY|E~FwGHeEEdeEHhlTiDSISbRuUUUMLuMMMVDKBy@@",
    "coordinates": "!BIi[Rx{_grZOSXa}_]^H@mQbGuMcqLX@m^H@gwWKB__t]Q_`@SFALXHcW@`A~w}E~@Gx@@Gx_`"
  },
  "mass": 464.15342671247834,
  "monoisotopicMass": 463.97869954198,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 13
  }, {
    "symbol": "P",
    "number": 3
  }]
}, {
  "symbol": "Dutp",
  "name": "Desoxyuridine triphosphate diradical",
  "mf": "C9H13N2O13P3",
  "kind": "DNAppp",
  "oneLetter": "U",
  "ocl": {
    "value": "fkoQZ`IQaPUg^CUoQ{NCqUxY|I~BwGHeEEdeEHhl]HlYJ\\RVjjjiiffffkBEa\\`@",
    "coordinates": "!BIi[Rx{_grZOSXa}_]^H@mQbGuMcqLX@m^H@gwWKB__t]Q_`@SFOrHupH@_mQ_`A~@@A~Owx"
  },
  "mass": 450.1268093076315,
  "monoisotopicMass": 449.96304947752,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 13
  }, {
    "symbol": "P",
    "number": 3
  }]
}, {
  "symbol": "Dade",
  "name": "Desoxyadenosine diradical",
  "mf": "C10H11N5O2",
  "kind": "DNA",
  "oneLetter": "A",
  "ocl": {
    "value": "fluha@IF]ELJ@|QNJRsN|rntyYpXuUUTBATXPlKd@@",
    "coordinates": "!B\\KqpQARcg|T^|X@@Id`zeHo@Ie}]vaLcg|T^qAMDDvN_xy"
  },
  "mass": 233.22703316783156,
  "monoisotopicMass": 233.09127461582,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Dcyt",
  "name": "Desoxycytidine diradical",
  "mf": "C9H11N3O3",
  "kind": "DNA",
  "oneLetter": "C",
  "ocl": {
    "value": "fhiqa@IVCBa`^HgEIYg^Y~gG^jjjiejpaXWH@",
    "coordinates": "!BBOpH_UARcc}TN|Y@PIe`zeIO@MDSIrpXTd}RSqLgTd|"
  },
  "mass": 209.202295772523,
  "monoisotopicMass": 209.08004122653,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 3
  }]
}, {
  "symbol": "Dgua",
  "name": "Desoxyguanosine diradical",
  "mf": "C10H11N5O3",
  "kind": "DNA",
  "oneLetter": "G",
  "ocl": {
    "value": "fbmia@IF]ELJYAxb\\Tef]ye^Z\\lxLZjjjeZfkBEa\\`@",
    "coordinates": "!B\\KqpQARcg|T^|X@@Id`zeHo@Ie}]vaLcg|T^qAMDDvN_vaLcg|"
  },
  "mass": 249.22643809214986,
  "monoisotopicMass": 249.08618923539,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 3
  }]
}, {
  "symbol": "Dthy",
  "name": "Desoxythymidine diradical",
  "mf": "C10H12N2O4",
  "kind": "DNA",
  "oneLetter": "T",
  "ocl": {
    "value": "fdyPQ@IVaPtP^HgEIYg^YuiqwjjjjYikBEa\\`@",
    "coordinates": "!BBOpH_UARcc}TN|Y@PIe`zeIO@MDSIrpXTd}RSqLgDr]RSp"
  },
  "mass": 224.2136741361865,
  "monoisotopicMass": 224.07970687390002,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 4
  }]
}, {
  "symbol": "Dura",
  "name": "Desoxyuridine diradical",
  "mf": "C9H10N2O4",
  "kind": "DNA",
  "oneLetter": "U",
  "ocl": {
    "value": "fhiPQ@IVaPpP^HgEIYg^Y~gG^jjjifZpaXWH@",
    "coordinates": "!BBOpH_UARcc}TN|Y@PIe`zeIO@MDSIrpXTd}RSqLgTd|"
  },
  "mass": 210.1870567313397,
  "monoisotopicMass": 210.06405680944,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 10
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 4
  }]
}, {
  "symbol": "Amp",
  "name": "Adenosine monophosphate diradical",
  "mf": "C10H12N5O6P",
  "kind": "RNAp",
  "oneLetter": "A",
  "alternativeOneLetter": "α",
  "ocl": {
    "value": "fakhs@INBwlJ\\TgHOFwaEqrIQQSYQJIRIMLyxMVuUUUPLpEPQDqBId@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RtPCQ@@"
  },
  "mass": 329.20635561758047,
  "monoisotopicMass": 329.05252012475,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Cmp",
  "name": "Cytidine monophosphate diradical",
  "mf": "C9H12N3O7P",
  "kind": "RNAp",
  "oneLetter": "C",
  "alternativeOneLetter": "ς",
  "ocl": {
    "value": "ff}qs@I^kBgENSdGc[pbxyDhhilheDiLv\\BVjjjjYfZbHfHQL`@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFDuP"
  },
  "mass": 305.1816182222719,
  "monoisotopicMass": 305.04128673546,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Gmp",
  "name": "Guanosine monophosphate diradical",
  "mf": "C10H12N5O7P",
  "kind": "RNAp",
  "oneLetter": "G",
  "alternativeOneLetter": "γ",
  "ocl": {
    "value": "fi{is@INBwlJ\\TgHp^MoBKcdRbbfrbTRdR\\SN^CUmUUUUKMSMQDSDHfP@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RtP@gD}D@"
  },
  "mass": 345.20576054189877,
  "monoisotopicMass": 345.04743474432,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Tmp",
  "name": "Thymidine monophosphate diradical",
  "mf": "C10H13N2O8P",
  "kind": "RNAp",
  "oneLetter": "T",
  "alternativeOneLetter": "τ",
  "ocl": {
    "value": "fncPK@I^aSbgIrtGc[pbxyDhhilheDiLjs`RuUUUSLuMDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@"
  },
  "mass": 320.1929965859354,
  "monoisotopicMass": 320.04095238282997,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Ump",
  "name": "Uridine monophosphate diradical",
  "mf": "C9H11N2O8P",
  "kind": "RNAp",
  "oneLetter": "U",
  "alternativeOneLetter": "υ",
  "ocl": {
    "value": "ff}PK@I^aSbgIsTGc[pbxyDhhilheDiLv\\BVjjjjYffbHfHQL`@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFDuP"
  },
  "mass": 306.1663791810886,
  "monoisotopicMass": 306.02530231837,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Rmp",
  "name": "Ribose monophosphate diradical",
  "mf": "C5H7O6P",
  "kind": "RNAp",
  "ocl": {
    "value": "d@",
    "coordinates": ""
  },
  "mass": 194.07945630639637,
  "monoisotopicMass": 193.99802494145,
  "unsaturation": 4,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Adp",
  "name": "Adenosine diphosphate diradical",
  "mf": "C10H13N5O9P2",
  "kind": "RNApp",
  "oneLetter": "A",
  "ocl": {
    "value": "fcoiH`INCt\\J\\UENU{Axv|F~DwGHeEEMeDheHd\\eHsg`u{UUUU@mAEMPQDqBId@@",
    "coordinates": "!BvuPfpDnDtEK_t_rHtXBH_TwPbOr_IorHbGtgD}F@RxPBuxc|_]^OTh}R_`CQ`MF@_`@_`A~"
  },
  "mass": 409.186273143011,
  "monoisotopicMass": 409.01885101411,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Cdp",
  "name": "Cytidine diphosphate diradical",
  "mf": "C9H13N3O10P2",
  "kind": "RNApp",
  "oneLetter": "C",
  "ocl": {
    "value": "fe{ph`I^[BgENbgHy`|[^E_CkcdRbbfrbTRdqrdYpIZjjjieijZbHfHQL`@",
    "coordinates": "!BvuPfpDnDtEK_t_rHtXBH_TwPb@K_cbpXbKtSItwPS]@Bux`Bo]\\lFGx@S]A~@C}~@Gx"
  },
  "mass": 385.1615357477025,
  "monoisotopicMass": 385.00761762482,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Gdp",
  "name": "Guanosine diphosphate diradical",
  "mf": "C10H13N5O10P2",
  "kind": "RNApp",
  "oneLetter": "G",
  "ocl": {
    "value": "fkhh`INCt\\J\\UENY{NCqmxM|EnNQJJJ[JIQJQHzIRLyxM^uUUUTkUSLuQDSDHfP@",
    "coordinates": "!BvuPfpDnDtEK_tPJHtXBH_TwPb@J_I`JHbGtgD}F@RxPBux`B_]^OTh}R_`CQ`B\\StXA~@C}~@Gx"
  },
  "mass": 425.1856780673293,
  "monoisotopicMass": 425.01376563368,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Tdp",
  "name": "Thymidine diphosphate diradical",
  "mf": "C10H14N2O11P2",
  "kind": "RNApp",
  "oneLetter": "T",
  "ocl": {
    "value": "fmgQh`I^aSbgQSglu`|[^C_@[bdls^rruo}LxDmUUUTruTsTQDqBId@@",
    "coordinates": "!BvuPfpDnDtEK_tPJHtXBH_TwPbOs_cbpXbGtSItwPS]@Bux`B_]\\lFBpX_`AMtGx@Owx@_`"
  },
  "mass": 400.172914111366,
  "monoisotopicMass": 400.00728327219,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Udp",
  "name": "Uridine diphosphate diradical",
  "mf": "C9H12N2O11P2",
  "kind": "RNApp",
  "oneLetter": "U",
  "ocl": {
    "value": "fe{Qh`I^aSbgQSehy`|[^E_CkcdRbbfrbTRdqrdYpIZjjjiejfZbHfHQL`@",
    "coordinates": "!BvuPfpDnDtEK_t_rHtXBH_TwPb@K_cbpXbKtSItwPS]@Bux`Bo]\\lFGx@S]A~@C}~@Gx"
  },
  "mass": 386.14629670651925,
  "monoisotopicMass": 385.99163320773005,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Atp",
  "name": "Adenosine triphosphate diradical",
  "mf": "C10H14N5O12P3",
  "kind": "RNAppp",
  "oneLetter": "A",
  "ocl": {
    "value": "e`TZCJ@IG@nahJNEHdliemgo`OFspZ|CoByqrIQQSYQJIRIGIRWRL\\^AU]UUUUPKPQMTuABDpaBX`@",
    "coordinates": "!BvuPfpDnDtEK_t_rHtXBH_TwPbOr_IorHbGtgD}F@RxS|uxc|_]^OTh}R_`CQ`MF@@hcW@A~_`A~@@A~Owx"
  },
  "mass": 489.16619066844174,
  "monoisotopicMass": 488.98518190347005,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 12
  }, {
    "symbol": "P",
    "number": 3
  }]
}, {
  "symbol": "Ctp",
  "name": "Cytidine triphosphate diradical",
  "mf": "C9H14N3O13P3",
  "kind": "RNAppp",
  "oneLetter": "C",
  "ocl": {
    "value": "fgqZ`I^[BgENbgOQsO\\Gc[pkxK|MnNQJJJ[JIQJSGJPzQg@ejjjjfVffjZbHfHQL`@",
    "coordinates": "!BvuPfpDnDtEK_tPJHtXBH_TwPb@K_cbpXbGtSItwPS]C|ux`B_]\\lFGx@S]@BbM\\B@Gy~@Gx@@Gx_`"
  },
  "mass": 465.1414532731331,
  "monoisotopicMass": 464.97394851418,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 13
  }, {
    "symbol": "P",
    "number": 3
  }]
}, {
  "symbol": "Gtp",
  "name": "Guanosine triphosphate diradical",
  "mf": "C10H14N5O13P3",
  "kind": "RNAppp",
  "oneLetter": "G",
  "ocl": {
    "value": "eh\\ZKJ@IG@nahJNEHdliemco`POFspZ|KoAyqrIQQSYQJIRIGQJQzQccpJkjjjjjeZjYZijbDIaBDq@@",
    "coordinates": "!BvuPfpDnDtEK_tPJHtXBH_TwPb@J_I`JHbGtgD}F@RxPBux`B_]^OTh}R_`CQ`B\\StX@BbM_|@Gy~@Gx@@Gx_`"
  },
  "mass": 505.16559559276,
  "monoisotopicMass": 504.98009652304,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 13
  }, {
    "symbol": "P",
    "number": 3
  }]
}, {
  "symbol": "Ttp",
  "name": "Thymidine triphosphate diradical",
  "mf": "C10H15N2O14P3",
  "kind": "RNAppp",
  "oneLetter": "T",
  "ocl": {
    "value": "eo`TGJ@IOHJNEGHdlnaiekg`OFspZ|Mo@yqrIQQSYQJIRY[ZPzQc`HjjjjjYZjVjZbDIaBDq@@",
    "coordinates": "!BvuPfpDnDtEK_tPJHtXBH_TwPb@K_cbpXbGtSItwPS]@Bux`B_]\\lFBpX_`AMt@JHupH@_gx@_`@@_c}~"
  },
  "mass": 480.15283163679663,
  "monoisotopicMass": 479.97361416155,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 14
  }, {
    "symbol": "P",
    "number": 3
  }]
}, {
  "symbol": "Utp",
  "name": "Uridine triphosphate diradical",
  "mf": "C9H13N2O14P3",
  "kind": "RNAppp",
  "oneLetter": "U",
  "ocl": {
    "value": "fgPz`I^aSbgQSeoQsO\\Gc[pkxK|MnNQJJJ[JIQJSGJPzQg@ejjjjfVjVjZbHfHQL`@",
    "coordinates": "!BvuPfpDnDtEK_tPJHtXBH_TwPb@K_cbpXbGtSItwPS]C|ux`B_]\\lFGx@S]@BbM\\B@Gy~@Gx@@Gx_`"
  },
  "mass": 466.12621423194986,
  "monoisotopicMass": 465.95796409709004,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 14
  }, {
    "symbol": "P",
    "number": 3
  }]
}, {
  "symbol": "Ade",
  "name": "Adenosine diradical",
  "mf": "C10H11N5O3",
  "kind": "RNA",
  "oneLetter": "A",
  "ocl": {
    "value": "fbmia@IV|gLJ\\Axj\\Tef[vyWV\\]zJZjjj`PJ`bIbDSH@",
    "coordinates": "!BBOpH_UARccFPEP{PId{RpBN[~i|BEP{iVA@fUARU@QTADBYPId"
  },
  "mass": 249.22643809214986,
  "monoisotopicMass": 249.08618923539,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 3
  }]
}, {
  "symbol": "Cyt",
  "name": "Cytidine diradical",
  "mf": "C9H11N3O4",
  "kind": "RNA",
  "oneLetter": "C",
  "ocl": {
    "value": "fdypQ@INcBgK@|UNJRsM{\\~sg`uUUULmQDSDHfP@",
    "coordinates": "!BBOpH_UARccFPEP{PId{RpBN[~iRTBpgDq`@c`BNKB\\@c`"
  },
  "mass": 225.20170069684127,
  "monoisotopicMass": 225.0749558461,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 4
  }]
}, {
  "symbol": "Gua",
  "name": "Guanosine diradical",
  "mf": "C10H11N5O4",
  "kind": "RNA",
  "oneLetter": "G",
  "ocl": {
    "value": "fj}hQ@IV|gLJ\\JCqTxiKLwmroKNN}EMUUUTkTuDQLPbY@@",
    "coordinates": "!BBOpH_UARccFPEP{PId{RpBN[~k|BEP{iVA@fUARU@QTADBYiVA@fP"
  },
  "mass": 265.22584301646816,
  "monoisotopicMass": 265.08110385496,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 4
  }]
}, {
  "symbol": "Thy",
  "name": "Thymidine diradical",
  "mf": "C10H12N2O5",
  "kind": "RNA",
  "oneLetter": "T",
  "ocl": {
    "value": "fleQQ@INaSed`|UNJRsM{\\zlyxMUUUSMMDQLPbY@@",
    "coordinates": "!BBOpH_UARccFPEP{PId{RpBN[~iRTBpgDq`@c`BNKB\\lIpBN"
  },
  "mass": 240.21307906050478,
  "monoisotopicMass": 240.07462149347,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 5
  }]
}, {
  "symbol": "Ura",
  "name": "Uridine diradical",
  "mf": "C9H10N2O5",
  "kind": "RNA",
  "oneLetter": "U",
  "ocl": {
    "value": "fdyQQ@INaSeh`|UNJRsM{\\~sg`uUUULsQDSDHfP@",
    "coordinates": "!BBOpH_UARccFPEP{PId{RpBN[~iRTBpgDq`@c`BNKB\\@c`"
  },
  "mass": 226.18646165565798,
  "monoisotopicMass": 226.05897142901,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 10
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 5
  }]
}, {
  "symbol": "Dam",
  "name": "1,2′-O-dimethyladenosine monophosphate diradical 01A",
  "mf": "C12H16N5O6P",
  "kind": "NucleotideP",
  "oneLetter": "œ",
  "ocl": {
    "value": "feghs@E^ct\\J\\udhOEw`eqrIQQQKZIQJQIiLxFK^uUUUUKLtuQDSDHfP@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HEF@`H_R\\StPAKA@a}_S_|BD}RSuKQ@MD@SuH"
  },
  "mass": 357.2595904272741,
  "monoisotopicMass": 357.08382025367,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dgm",
  "name": "1,2′-O-dimethylguanosine monophosphate diradical 01G",
  "mf": "C12H16N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "ε",
  "ocl": {
    "value": "fmwis@E^ct\\J\\udlp^KoAKcdRbbbVtRbTbSbSNAbwmUUUURsMSUDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HEF@`H_R\\StPAKA@a}_S_|BD}RSuKQ@B\\StPAOT`"
  },
  "mass": 373.2589953515923,
  "monoisotopicMass": 373.07873487324,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dim",
  "name": "1,2′-O-dimethylinosine monophosphate diradical 019A",
  "mf": "C12O7N4H15P",
  "kind": "NucleotideP",
  "oneLetter": "ξ",
  "ocl": {
    "value": "fegIs@E^cvENZrTXOEw`eqrIQQQKZIQJQIiLxFK^uUUUUKLtuQDSDHfP@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HEF@`H_R\\StPAKA@a}_S_|BD}RSuKQ@MD@SuH"
  },
  "mass": 358.2443513860907,
  "monoisotopicMass": 358.06783583658,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 4
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Tia",
  "name": "2- methylthiomethylenethio-N6-isopentenyl-adenosine monophosphate diradical",
  "mf": "C17H24N5O6PS2",
  "kind": "NucleotideP",
  "oneLetter": "£",
  "ocl": {
    "value": "eh\\ZFJ@IG@nahJNEDl`OFspb\\V`cXHrIQQSYQJIRINIYIKQccpJkjjjjjAfBJjfjBDIaBDq@@",
    "coordinates": "!BpBYTvxBNFY|bEJObGvOS\\@Yt]~DUEJOctu~@Ha}`HzOSTwPTh~H@hc|_`BH_Xa}b@JH@gx@bGvH@h`B_`BH_P"
  },
  "mass": 489.50637075565066,
  "monoisotopicMass": 489.09056286031,
  "unsaturation": 16,
  "elements": [{
    "symbol": "C",
    "number": 17
  }, {
    "symbol": "H",
    "number": 24
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 2
  }]
}, {
  "symbol": "Mhc",
  "name": "2′‐O‐Methyl-5-hydroxymethylcytidine monophosphate diradical",
  "mf": "C11H16N3O8P",
  "kind": "NucleotideP",
  "oneLetter": "¡",
  "ocl": {
    "value": "fikpK@EA{BgM^rTXOEw`eqrIQQQKZIQJSJigHujjjjifYjkBHQL`@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@HoTuOSU@HC~NKA`HoQLgSUAMT@a}oS_|BBpXKAaMT@CQ"
  },
  "mass": 349.2342579562838,
  "monoisotopicMass": 349.06750148395,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Odg",
  "name": "N2,2′-O-dimethylguanosine monophosphate diradical 02G",
  "mf": "C12H16N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "γ",
  "ocl": {
    "value": "fmwis@E^ct\\J\\udlp^KoAKcdRbbbVtRbTbSbsNAbwmUUUURsMSUDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HEF@`H_R\\StPAKA@a}_S_|BD}RSuKQ@B\\StPAOT`"
  },
  "mass": 373.2589953515923,
  "monoisotopicMass": 373.07873487324,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Ntg",
  "name": "N2,N2,2′-O-trimethylguanosine monophosphate diradical 022G",
  "mf": "C13H18N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "|",
  "ocl": {
    "value": "fcois@E^ct\\J\\udlp^KoAKcdRbbbVtRbTbSbTYpLVcjjjjjVYjZjHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HEF@`H_R\\StPAKA@a}_S_|BD}RSuHgD}D@tPBNOt}R"
  },
  "mass": 387.2856127564392,
  "monoisotopicMass": 387.0943849377,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 18
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Otg",
  "name": "N2,7,2′-O-trimethylguanosine monophosphate diradical 027G",
  "mf": "C13H20N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "æ",
  "ocl": {
    "value": "fcoisBE^bN\\J\\udjp^KoAKcFU}dRbbbVtRbTbRlQYpLVcjjjjjVYjjjHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HEF@`H_R\\StPAKA@a}_S_|BD}RSuKFPMD@IqOQ@D}R"
  },
  "mass": 389.30149426455074,
  "monoisotopicMass": 389.11003500216,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 20
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Rya",
  "name": "2′-O-ribosyladenosine monophosphate diradical 00A",
  "mf": "C15H20N5O9P",
  "kind": "NucleotideP",
  "oneLetter": "^",
  "ocl": {
    "value": "e`\\ZIL@DaegobFAIO@hlm`OGSp\\\\\\bbbfrRbdTT\\rbRQUCDQTrusuUUUUMUU@pET@@@",
    "coordinates": "!BIlAKaMARw}DBbMF@bGuMtHc|KAbH_ZU`@GzH_WwW@h`XKFjKB_jXB\\SiVA`zmG_Irp_hQKctvOSR\\lIrp"
  },
  "mass": 445.3217759066577,
  "monoisotopicMass": 445.09986424130005,
  "unsaturation": 16,
  "elements": [{
    "symbol": "C",
    "number": 15
  }, {
    "symbol": "H",
    "number": 20
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Ryg",
  "name": "2′-O-ribosylguanosine monophosphate diradical 00G",
  "mf": "C15H20N5O10P",
  "kind": "NucleotideP",
  "oneLetter": "ℑ",
  "ocl": {
    "value": "ehRZEL@DaegobFAIO@hlm`POGSp\\\\\\bbbfrRbdTT\\rbRQbhXbJfVn^jjjjijjjVZfj@@@",
    "coordinates": "!BIlAKaMARw}DBbMF@bGuMtH`BKAbH_ZU`@GzH_WwW@h`XKFjKB_jXB\\SiVA`zmG_Irp_hQKctvOSR\\lt]|gK@"
  },
  "mass": 461.321180830976,
  "monoisotopicMass": 461.09477886087,
  "unsaturation": 16,
  "elements": [{
    "symbol": "C",
    "number": 15
  }, {
    "symbol": "H",
    "number": 20
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Tmu",
  "name": "2-thio-2′-O-methyluridine monophosphate diradical 02U",
  "mf": "C10H13N2O7PS",
  "kind": "NucleotideP",
  "oneLetter": "∏",
  "ocl": {
    "value": "fncQp`EAaSfleZCq]x^BDnNQJJJI[QJIRYlyFmUUUULsSQDSDHfP@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HC~NKA`H_QLgSUAMT@a}_S_|BBpXSU@"
  },
  "mass": 336.25837906774416,
  "monoisotopicMass": 336.01810893766003,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Dmut",
  "name": "3,2′-O-dimethyluridine monophosphate diradical 03U",
  "mf": "C11H15N2O8P",
  "kind": "NucleotideP",
  "oneLetter": "σ",
  "ocl": {
    "value": "fasPK@EAaSfoYKtGb{pRxyDhhhemDheIhv\\cVjjjjfYjZHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HC~NKA`H_QLgSUAMT@a}_S_|BBpXOxyMT@"
  },
  "mass": 334.2196139907822,
  "monoisotopicMass": 334.05660244729,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Amc",
  "name": "N4-acetyl-2′-O-methylcytidine monophosphate diradical 042C",
  "mf": "C12H16N3O8P",
  "kind": "NucleotideP",
  "oneLetter": "ℵ",
  "ocl": {
    "value": "fe{pK@EA[BgM^rTXOEw`eqrIQQQKZIQJSMJLyFmUUUULsMMQDSDHfP@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HC~NKA`H_QLgSUAMT@a}_S_|BBpXSU@caLgSU@"
  },
  "mass": 361.244993853019,
  "monoisotopicMass": 361.06750148395,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Tmc",
  "name": "N4,N4,2′-O-trimethylcytidine monophosphate diradical 044C",
  "mf": "C12H18N3O7P",
  "kind": "NucleotideP",
  "oneLetter": "β",
  "ocl": {
    "value": "fikqs@EA[BgM^rTGb{pRxyDhhhemDheIfhsdZuUUUTsLuTQDqBId@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HC~NKA`H_QLgSUAMT@a}_S_|BBpXSU@cbpX"
  },
  "mass": 347.2614704368123,
  "monoisotopicMass": 347.08823692884005,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 18
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dcy",
  "name": "N4,2′-O-dimethylcytidine monophosphate diradical 04C",
  "mf": "C11H16N3O7P",
  "kind": "NucleotideP",
  "oneLetter": "λ",
  "ocl": {
    "value": "fasqs@EA[BgM^rTGb{pRxyDhhhemDheIff\\cVjjjjfYfjHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HC~NKA`H_QLgSUAMT@a}_S_|BBpXSU@lF@"
  },
  "mass": 333.23485303196554,
  "monoisotopicMass": 333.07258686438,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Muo",
  "name": "2′-O-methyluridine 5-oxyacetic acid methyl ester monophosphate diradical 0503U",
  "mf": "C13H17N2O11P",
  "kind": "NucleotideP",
  "oneLetter": "Ͽ",
  "ocl": {
    "value": "fkoQk@EAaSfoYJwj}`|W^BWGHeEEDmheDiLjlif\\cVjjjjfYjZZhbIbDSH@",
    "coordinates": "!BKAb@tURD@m\\YpMAMpBYMcvjbOplIwx@bGuMc}\\Bb@JH@dvOcuKPSXa}bGvHH`BbGu~Oxc|bGt"
  },
  "mass": 408.25518206531905,
  "monoisotopicMass": 408.05699637046,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 17
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Xmu",
  "name": "5-carboxymethylaminomethyl-2′-O-methyluridine monophosphate diradical 051U",
  "mf": "C13H18N3O10P",
  "kind": "NucleotideP",
  "oneLetter": ")",
  "ocl": {
    "value": "fkopk@EAGBgM^rWns`|W^BWGHeEEDmheDiLjleF\\cVjjjjfYjZfhbIbDSH@",
    "coordinates": "!BKAb@tURD@m\\YpMAMpBYMcvjb@HlIwx@bGuMc}\\Bb@JH@dvOcuKPSXa}bGvH@h`BbGvH@gx@bKt"
  },
  "mass": 407.2704211065024,
  "monoisotopicMass": 407.07298078755,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 18
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mmu",
  "name": "5-methoxycarbonylmethyl-2′-O-methyluridine monophosphate diradical 0521U",
  "mf": "C13H17N2O10P",
  "kind": "NucleotideP",
  "oneLetter": "∩",
  "ocl": {
    "value": "fcwPk@EAaSfoYKvZp^KoAKcdRbbbVtRbTfUVfYrMZjjjjYfifjHbXaDr@@",
    "coordinates": "!BS]@lFJU`@Gyoza`lzf@lI}mK_`B@cm\\Bb@HlI}]}_`A~@BpgIqLXKH`Bb@I~@Ha}_c~HHa}"
  },
  "mass": 392.2557771410008,
  "monoisotopicMass": 392.06208175089,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 17
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Cue",
  "name": "5-(carboxyhydroxymethyl)-2′-O-methyluridine methyl ester monophosphate diradical 0522U",
  "mf": "C13H17N2O11P",
  "kind": "NucleotideP",
  "oneLetter": "∩",
  "ocl": {
    "value": "fkoQk@EAaSfoYKtZ}`|W^BWGHeEEDmheDiLjhYf\\cVjjjjfYjZZhbIbDSH@",
    "coordinates": "!BS]@lFJU`@Gyoza`lzf@lI}mK_`B@cm\\Bb@HlI}]}_`A~@BpgIqLXKH`Bb@I~@Gx@bGu~Oxc|bGt"
  },
  "mass": 408.25518206531905,
  "monoisotopicMass": 408.05699637046,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 17
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Cyu",
  "name": "5-carbamoylmethyl-2′-O-methyluridine monophosphate diradical 053U",
  "mf": "C12H16N3O9P",
  "kind": "NucleotideP",
  "oneLetter": "~",
  "ocl": {
    "value": "fmgqK@EAWBgM^rWlp^KoAKcdRbbbVtRbTfUVcNQkUUUUSLuLuDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HC~NKA`H_QLgSUAMT@a}_S_|BBpXKAaMTDuPOxxlF@"
  },
  "mass": 377.24439877733727,
  "monoisotopicMass": 377.06241610352,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Ipu",
  "name": "5-(isopentenylaminomethyl)-2′-O-methyluridine monophosphate diradical 0583U",
  "mf": "C16H24N3O8P",
  "kind": "NucleotideP",
  "oneLetter": "¼",
  "ocl": {
    "value": "fgpK@EAGBgM^rWhOEw`eqrIQQQKZIQJSJkIJLyFmUUUULsTuMTQDqBId@@",
    "coordinates": "!BS]@lFJU`@Gyoza`lzf@lI}mK_`B@cm\\Bb@HlI}]}_`A~@BpgIqLXKH`Bb@I~@Ha}b@JH_Xc|_`BH_P"
  },
  "mass": 417.35146347240624,
  "monoisotopicMass": 417.13010174179004,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 16
  }, {
    "symbol": "H",
    "number": 24
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mcy",
  "name": "5,2′-O-dimethylcytidine monophosphate diradical monophosphate diradical 05C",
  "mf": "C11H16N3O7P",
  "kind": "NucleotideP",
  "oneLetter": "τ",
  "ocl": {
    "value": "fasqs@EA{BgM^rTGb{pRxyDhhhemDheIeV\\cVjjjjfYfjHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HC~NKA`H_QLgSUAMT@a}_S_|BBpXKAaMT@"
  },
  "mass": 333.23485303196554,
  "monoisotopicMass": 333.07258686438,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dmuf",
  "name": "5,2′-O-dimethyluridine monophosphate diradical 05U",
  "mf": "C11H15N2O8P",
  "kind": "NucleotideP",
  "oneLetter": "\\",
  "ocl": {
    "value": "fasPK@EAaSfoYKtGb{pRxyDhhhemDheIeV\\cVjjjjfYjZHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HC~NKA`H_QLgSUAMT@a}_S_|BBpXKAaMT@"
  },
  "mass": 334.2196139907822,
  "monoisotopicMass": 334.05660244729,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Tma",
  "name": "N6,N6,2′-O-trimethyladenosine monophosphate diradical 066A",
  "mf": "C13H18N5O6P",
  "kind": "NucleotideP",
  "oneLetter": "η",
  "ocl": {
    "value": "fmwhs@E^ct\\J\\udhOEw`eqrIQQQKZIQJQIkQg@q[vjjjj`Y`JjBHfHQL`@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HEF@`H_R\\StPAKA@a}_S_|BD}RSuKQ@MD@SuHXK@"
  },
  "mass": 371.2862078321209,
  "monoisotopicMass": 371.09947031813005,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 18
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Nda",
  "name": "N6,2′-O-dimethyladenosine monophosphate diradical 06A",
  "mf": "C12H16N5O6P",
  "kind": "NucleotideP",
  "oneLetter": "χ",
  "ocl": {
    "value": "feghs@E^ct\\J\\udhOEw`eqrIQQQKZIQJQIkLxFK^uUUUTCLAUADSDHfP@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HEF@`H_R\\StPAKA@a}_S_|BD}RSuKQ@MD@FBp"
  },
  "mass": 357.2595904272741,
  "monoisotopicMass": 357.08382025367,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Fmc",
  "name": "5-formyl-2′-O-methylcytidine monophosphate diradical 071C",
  "mf": "C10H12N3O8P",
  "kind": "NucleotideP",
  "oneLetter": "°",
  "ocl": {
    "value": "faspK@I^[BgENSghOFwaEqrIQQSYQJIRYULxDmUUUTsLttQDqBId@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@@tP"
  },
  "mass": 333.1917590433254,
  "monoisotopicMass": 333.03620135502996,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Omi",
  "name": "2′-O-methylinosine monophosphate diradical 09A",
  "mf": "C11H13N4O7P",
  "kind": "NucleotideP",
  "oneLetter": "≤",
  "ocl": {
    "value": "fi{Is@E^cvENZrTXOEw`eqrIQQQKZIQJQIig@q[vjjjjiYffhbIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HEF@`H_R\\StPAKA@a}_S_|BD}RSuKQ@MD@"
  },
  "mass": 344.21773398124395,
  "monoisotopicMass": 344.05218577211997,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 4
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Opu",
  "name": "2′-O-methylpseudouridine monophosphate diradical 09U",
  "mf": "C10H13N2O8P",
  "kind": "NucleotideP",
  "oneLetter": "Z",
  "ocl": {
    "value": "fncPK@@qaSfoYJtGb{pRxyDhhhemDheIfsdZuUUULuMMDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HC~NKA`H_QLgSUAMT@a}_S_|BBpXSU@"
  },
  "mass": 320.1929965859354,
  "monoisotopicMass": 320.04095238282997,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Oma",
  "name": "2′-O-methyladenosine monophosphate diradical 0A",
  "mf": "C11H14N5O6P",
  "kind": "NucleotideP",
  "oneLetter": ":",
  "ocl": {
    "value": "fi{hs@E^ct\\J\\udhOEw`eqrIQQQKZIQJQIig@q[vjjjj`Y`J`bIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HEF@`H_R\\StPAKA@a}_S_|BD}RSuKQ@MD@"
  },
  "mass": 343.2329730224273,
  "monoisotopicMass": 343.06817018921,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Omc",
  "name": "2′-O-methylcytidine monophosphate diradical 0C",
  "mf": "C10H14N3O7P",
  "kind": "NucleotideP",
  "oneLetter": "B",
  "ocl": {
    "value": "fncqs@EA[BgM^rTGb{pRxyDhhhemDheIfsdZuUUUTsLuDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HC~NKA`H_QLgSUAMT@a}_S_|BBpXSU@"
  },
  "mass": 319.2082356271187,
  "monoisotopicMass": 319.05693679992004,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Omg",
  "name": "2′-O-methylguanosine monophosphate diradical 0G",
  "mf": "C11H14N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "#",
  "ocl": {
    "value": "fegis@E^ct\\J\\udlp^KoAKcdRbbbVtRbTbSbYpLV}jjjjjVYjZbHfHQL`@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@HoTuOSU@HEF@`H_R\\StPAKA@a}_S_|BD}RSuKQ@B\\StP@"
  },
  "mass": 359.23237794674554,
  "monoisotopicMass": 359.06308480878,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Omu",
  "name": "2′-O-methyluridinemonophosphate diradical 0U",
  "mf": "C10H13N2O8P",
  "kind": "NucleotideP",
  "oneLetter": "J",
  "ocl": {
    "value": "fncPK@EAaSfoYJtGb{pRxyDhhhemDheIfsdZuUUUTsMMDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuOSU@HC~NKA`H_QLgSUAMT@a}_S_|BBpXSU@"
  },
  "mass": 320.1929965859354,
  "monoisotopicMass": 320.04095238282997,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Cdg",
  "name": "7-cyano-7-deazaguanosine monophosphate diradical 100G",
  "mf": "C12H12N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "φ",
  "ocl": {
    "value": "fmwis@INzM\\J\\TgLp^MoBKcdRbbfrbTRdRUbSN^CWmUUUUKLuSuDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RqdCQ@B\\StPCFP@"
  },
  "mass": 369.22723233536925,
  "monoisotopicMass": 369.04743474432,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Azg",
  "name": "7-aminomethyl-7-deazaguanosine monophosphate diradical 101G",
  "mf": "C12H16N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "∉",
  "ocl": {
    "value": "fmwis@INzM\\J\\TgLp^MoBKcdRbbfrbTRdRUbSN^CWmUUUUKLuSUDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RqdCQ@B\\StPA`z`"
  },
  "mass": 373.2589953515923,
  "monoisotopicMass": 373.07873487324,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Eqo",
  "name": "epoxyqueuosine monophosphate diradical 102G",
  "mf": "C17H22N5O10P",
  "kind": "NucleotideP",
  "oneLetter": "ς",
  "ocl": {
    "value": "el^ZEL@IGNaehJNEDlig`TPOFspb\\\\bTTTvTRbTbRlRjbbfXx|Bjz~aAajjjjiYfjZjjjjHPfDHSD@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RqdCQ@B\\StP@{ULY@TEIKA@a}tPA}BOpHAEP"
  },
  "mass": 487.3585341325581,
  "monoisotopicMass": 487.11042892533,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 17
  }, {
    "symbol": "H",
    "number": 22
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Aes",
  "name": "archaeosine monophosphate diradical 103G",
  "mf": "C12H15N6O7P",
  "kind": "NucleotideP",
  "oneLetter": "(",
  "ocl": {
    "value": "fcoYs@INzM^xTxiNY`|[^DWGHeEEMeDheHdkDhsg`u{UUUURsMTmTQDqBId@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RqdCQ@B\\StP@{UFCj"
  },
  "mass": 386.2577578089824,
  "monoisotopicMass": 386.07398384544,
  "unsaturation": 16,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Goq",
  "name": "galactosyl-queuosine monophosphate diradical 104G",
  "mf": "C23H32N5O14P",
  "kind": "NucleotideP",
  "oneLetter": "9",
  "ocl": {
    "value": "ekXzGL@IGNaehJNEDliod\\VU]SPOFspb\\\\bTTTvTRbTbRlRjbTrTrbfRXx|Bjz^AyEjjjjiYfjZijjjjjjbDIaBDq@@",
    "coordinates": "!BvuPfpDnDtEK_tPJHtXBH_TwPb@J_IorHbGtgD}F@RxRH_WwW@hbOTh}RIlCQ`B\\StXC[UB[@RxSPT`JHbGwQ`H`BaEQ~@Ha}bOq~Ox`BbGu~@Ha}bOrH@`"
  },
  "mass": 633.4999767508004,
  "monoisotopicMass": 633.16833772591,
  "unsaturation": 20,
  "elements": [{
    "symbol": "C",
    "number": 23
  }, {
    "symbol": "H",
    "number": 32
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 14
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Gaq",
  "name": "glutamyl-queuosine monophosphate diradical105G",
  "mf": "C22H29N6O12P",
  "kind": "NucleotideP",
  "oneLetter": "⊄",
  "ocl": {
    "value": "emWVCL@IGNaejXJNEDlioh\\YUPOFspb\\\\bTTTvTRbTbRlRjbTJTtrTXx|Bjz^AjjjjiYfjZijfjfjbDIaBDq@@",
    "coordinates": "!BTmB@c`JHUMmMtL@YtEHYgxQTaDoQ`L@YFY|gKMARH`Ygy|fpAfN`Hz@`H{PTb\\ltEIRtHBNHaTv|@YFYPTha}b@I~@Ha}_c~H@ha}bOq~@Ha}"
  },
  "mass": 600.473311954707,
  "monoisotopicMass": 600.15810739451,
  "unsaturation": 22,
  "elements": [{
    "symbol": "C",
    "number": 22
  }, {
    "symbol": "H",
    "number": 29
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 12
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Moq",
  "name": "mannosyl-queuosine monophosphate diradical 106G",
  "mf": "C23H32N5O14P",
  "kind": "NucleotideP",
  "oneLetter": "8",
  "ocl": {
    "value": "ekXzGL@IGNaehJNEDliod\\VU]SPOFspb\\\\bTTTvTRbTbRlRjbTrTrbfRXx|Bjz^AyEjjjjiYfjZijjjjjjbDIaBDq@@",
    "coordinates": "!BvuPfpDnDtEK_tPJHtXBH_TwPb@J_IorHbGtgD}F@RxRH_WwW@hbOTh}RIlCQ`B\\StXC[UB[@RxSPT`JHbGwQ`H`BaEQ~@Ha}bOq~Ox`BbGu~@Ha}bOrH@`"
  },
  "mass": 633.4999767508004,
  "monoisotopicMass": 633.16833772591,
  "unsaturation": 20,
  "elements": [{
    "symbol": "C",
    "number": 23
  }, {
    "symbol": "H",
    "number": 32
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 14
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Qus",
  "name": "queuosine monophosphate diradical 10G",
  "mf": "C17H22N5O9P",
  "kind": "NucleotideP",
  "oneLetter": "Q",
  "ocl": {
    "value": "edZZIL@IGNaehJNEDliohPOFspb\\\\bTTTvTRbTbRlRjbTKGG`UWSpMUUUUKLuSUMUTPaLHPfH@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPHoWtw@aOTd}RqdCQ@B\\StP@{ULY@RpQPTopHBGwQ@@QT"
  },
  "mass": 471.35912920823984,
  "monoisotopicMass": 471.11551430576,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 17
  }, {
    "symbol": "H",
    "number": 22
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Cpo",
  "name": "1-methyl-3-(3-amino-3-carboxypropyl)pseudouridine monophosphate diradical 1309U",
  "mf": "C14H20N3O10P",
  "kind": "NucleotideP",
  "oneLetter": "α",
  "ocl": {
    "value": "fgpk@OAWBgENSgi{`|[^DWGHeEEMeDheIhjbihs`RuUUTsTuSUMQDSDHfP@",
    "coordinates": "!BTh|SI~ioOwy`iR\\SiV|SFGxw}FH_]]}DqbH@gx_c|SFA`lIqOW_Xa}uwu~Ox`BbGu~Ox`B_`BH_P"
  },
  "mass": 421.2970385113492,
  "monoisotopicMass": 421.08863085201,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 14
  }, {
    "symbol": "H",
    "number": 20
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mls",
  "name": "1-methylinosine monophosphate diradical 19A",
  "mf": "C11H13N4O7P",
  "kind": "NucleotideP",
  "oneLetter": "O",
  "ocl": {
    "value": "fi{Is@INBvENJSghOFwaEqrIQQSYQJIRIMIgOAjvjjjjefZZhbIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RtPCQ@D}R"
  },
  "mass": 344.21773398124395,
  "monoisotopicMass": 344.05218577211997,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 4
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mpu",
  "name": "1-methylpseudouridine monophosphate diradical 19U",
  "mf": "C10H13N2O8P",
  "kind": "NucleotideP",
  "oneLetter": "]",
  "ocl": {
    "value": "fncPK@OAaSbgIrtGc[pbxyDhhilheDiLjs`RuUUTsTuMDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@"
  },
  "mass": 320.1929965859354,
  "monoisotopicMass": 320.04095238282997,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mad",
  "name": "1-methyladenosine monophosphate diradical 1A",
  "mf": "C11H14N5O6P",
  "kind": "NucleotideP",
  "oneLetter": "\"",
  "ocl": {
    "value": "fi{hs@INBwlJ\\TgHOFwaEqrIQQSYQJIRIMIgOAjvjjjjefZZhbIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RtPCQ@D}R"
  },
  "mass": 343.2329730224273,
  "monoisotopicMass": 343.06817018921,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mgs",
  "name": "1-methylguanosine monophosphate diradical 1G",
  "mf": "C11H14N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "K",
  "ocl": {
    "value": "fegis@INBwlJ\\TgHp^MoBKcdRbbfrbTRdR\\RYspZmjjjjiYfijbHfHQL`@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RtP@gD}D@SuH"
  },
  "mass": 359.23237794674554,
  "monoisotopicMass": 359.06308480878,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Msu",
  "name": "5-aminomethyl-2-selenouridine monophosphate diradical 20510U",
  "mf": "C10H14N3O7PSe",
  "kind": "NucleotideP",
  "oneLetter": "π",
  "ocl": {
    "value": "fasqp`I^{BgEIrtGc[p\\bQ\\\\bTTTvTRbTfUSNAKUUUULsTuDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@@tP"
  },
  "mass": 398.1676241841323,
  "monoisotopicMass": 398.97345859992004,
  "unsaturation": null,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "Se",
    "number": 1
  }]
}, {
  "symbol": "Mse",
  "name": "5-methylaminomethyl-2-selenouridine monophosphate diradical 20511U",
  "mf": "C11H16N3O7PSe",
  "kind": "NucleotideP",
  "oneLetter": "≅",
  "ocl": {
    "value": "fikqp`I^{BgEIrtGc[p\\bQ\\\\bTTTvTRbTfUVYpIZjjjifZfjHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSUAMTBpX"
  },
  "mass": 412.19424158897914,
  "monoisotopicMass": 412.98910866438,
  "unsaturation": null,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "Se",
    "number": 1
  }]
}, {
  "symbol": "Cse",
  "name": "5-carboxymethylaminomethyl-2-selenouridine monophosphate diradical 2051U",
  "mf": "C12H16N3O9PSe",
  "kind": "NucleotideP",
  "oneLetter": "⊥",
  "ocl": {
    "value": "fcwqH`I^{BgEIru^p^MoArIEqrIQQSYQJIRYUYJLxDmUUUTsMSTuDQLPbY@@",
    "coordinates": "!BKAb@tURDM\\YpMAMpBYMcx`BKB]~@Ha}SXW@h`Bb@IMcx}RtDvH_Xa}b@JH@ha}b@I~@Ha}"
  },
  "mass": 456.20378733435086,
  "monoisotopicMass": 456.97893790352,
  "unsaturation": null,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "Se",
    "number": 1
  }]
}, {
  "symbol": "Agm",
  "name": "agmatidine monophosphate diradical 20C",
  "mf": "C14H26N7O6P",
  "kind": "NucleotideP",
  "oneLetter": "¿",
  "ocl": {
    "value": "fgxs@I^BuY{piqR\\`|[^DWGHeEEMeDeEHmUddhsgbuUUUSTuUUMIDSDHfP@",
    "coordinates": "!BDqc_tTnD_]\\fpH}MgrYRc}_|Dr_W_Wx@ThWM_|bOqRc}ARctu~@Gx@urH@gx@b@I~@H`BbGu~@@"
  },
  "mass": 419.373876184194,
  "monoisotopicMass": 419.16821858483,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 14
  }, {
    "symbol": "H",
    "number": 26
  }, {
    "symbol": "N",
    "number": 7
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Sou",
  "name": "2-selenouridine monophosphate diradical 20U",
  "mf": "C9H11N2O7PSe",
  "kind": "NucleotideP",
  "oneLetter": "ω",
  "ocl": {
    "value": "ff}Qp`I^aSbdyjCqmxNQHnNQJJJ[JIQJSMg@ejjjjfYihbIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFDuP"
  },
  "mass": 369.1263628137839,
  "monoisotopicMass": 369.9469094988,
  "unsaturation": null,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "Se",
    "number": 1
  }]
}, {
  "symbol": "Agu",
  "name": "5-aminomethyl-2-geranylthiouridine monophosphate diradical 21510U",
  "mf": "C20H30N3O7PS",
  "kind": "NucleotideP",
  "oneLetter": "Δ",
  "ocl": {
    "value": "ed\\\\NB@IOIhJNEDla`OFsp\\BHgGHeEEMeDheHdjdcEdhqpEUUUUURsUSMTuQBDpaBXdDt@",
    "coordinates": "!BDr__cdo[_X`fgx}RgqeRtM]}Dqa~O}\\BTmBH_]]}uwuRtMAMcuI~O}\\BupJH_]]}_`A~Oxa}uwu~Oxa}_cW_Xa}"
  },
  "mass": 487.5074340654907,
  "monoisotopicMass": 487.15420849000003,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 20
  }, {
    "symbol": "H",
    "number": 30
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Mgu",
  "name": "5-methylaminomethyl-2-geranylthiouridine monophosphate diradical 21511U",
  "mf": "C21H32N3O7PS",
  "kind": "NucleotideP",
  "oneLetter": "h",
  "ocl": {
    "value": "elR\\NB@IOIhJNEDla`OFsp\\BHgGHeEEMeDheHdjdlileFN@jjjjjjVZjYjijbDIaBDqHIh",
    "coordinates": "!BTv^cbn{__@fw|}RwqeRdK]}Tva~_{_|TiCp_[]}mwuRdIAMsuI~_{]|mwsp_[]}mwu~_{_||Gvw_Wy|Gu~_{]}|Gt"
  },
  "mass": 501.5340514703375,
  "monoisotopicMass": 501.16985855446006,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 21
  }, {
    "symbol": "H",
    "number": 32
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Cgu",
  "name": "5-carboxymethylaminomethyl-2-geranylthiouridine monophosphate diradical 2151U",
  "mf": "C22H32N3O9PS",
  "kind": "NucleotideP",
  "oneLetter": "f",
  "ocl": {
    "value": "ef^\\IB@IOIhJNEDla`XPOFsp\\BHgGHeEEMeDheHdjdlhehbhqpEUUUUURsUSMUMMTPaLHPfIAM@",
    "coordinates": "!BTv^cbn{_@fw|}RwqeRdK]}Tva~_{]|TiCp[_}muRdIAMsuI~_{]|mwsp_[]}mwu~_{]||Gvw_[_}_g}~_{]||Ou~_{]}|Gt"
  },
  "mass": 545.5435972157093,
  "monoisotopicMass": 545.1596877935999,
  "unsaturation": 16,
  "elements": [{
    "symbol": "C",
    "number": 22
  }, {
    "symbol": "H",
    "number": 32
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Mha",
  "name": "2-methylthio-N6-(cis-hydroxyisopentenyl) adenosine monophosphate diradical 2160A",
  "mf": "C16H22N5O7PS",
  "kind": "NucleotideP",
  "oneLetter": "≠",
  "ocl": {
    "value": "e`TZNB@IG@nahJNEDlo`OFspb\\V`cHeEEMeDheHdxeleDqqxEUuUUUU@sAETuTDHSBDIbP[P",
    "coordinates": "!BzfC@IeKPaDn}bHCQb@KQwuRDFALYpHCQt]WHc|TmCQw}~N`ME~@Gx@upJH@h`B_`BH_X`BbGvHGxbGt"
  },
  "mass": 459.41437086899504,
  "monoisotopicMass": 459.09775624102,
  "unsaturation": 16,
  "elements": [{
    "symbol": "C",
    "number": 16
  }, {
    "symbol": "H",
    "number": 22
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Mpa",
  "name": "2-methylthio-N6-isopentenyladenosine monophosphate diradical 2161A",
  "mf": "C16H22N5O6PS",
  "kind": "NucleotideP",
  "oneLetter": "*",
  "ocl": {
    "value": "eohZFB@IG@nahJNEDl`OFspb\\V`cHeEEMeDheHdxeleFNO@jnjjjjhFXHjfjBDIaBDq@@",
    "coordinates": "!BpBYTvxBNFY|bEJObGvOS\\@Yt]~DUEJOctu~@Ha}`HzOSTwPTh~H@h`B_`BH_Xa}bOrH@ha}b@I~@Ha}"
  },
  "mass": 443.4149659446768,
  "monoisotopicMass": 443.10284162145,
  "unsaturation": 16,
  "elements": [{
    "symbol": "C",
    "number": 16
  }, {
    "symbol": "H",
    "number": 22
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Mca",
  "name": "2-methylthio-N6-threonylcarbamoyladenosine monophosphate diradical 2162A",
  "mf": "C16H21N6O10PS",
  "kind": "NucleotideP",
  "oneLetter": "[",
  "ocl": {
    "value": "ebVVEB@IG@nachJNEDlm`XTPOFspb\\V`cHeEEMeDheHdxemLhhhqqxEUuUUUU@sAESUMUABDpaBX`@",
    "coordinates": "!BzfC@IeKPaDn}bHCQb@KQwuRDFALYpHCQt]W@h`BTmCQw}~N`ME~@Gx@upJH@h`B_`BH_Wxb@JH_WxbOrHo]^}_`BH_P"
  },
  "mass": 520.4113480993399,
  "monoisotopicMass": 520.07774907193,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 16
  }, {
    "symbol": "H",
    "number": 21
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Mva",
  "name": "2-methylthio-N6-hydroxynorvalylcarbamoyladenosine monophosphate diradical 2163A",
  "mf": "C17H23N6O10PS",
  "kind": "NucleotideP",
  "oneLetter": "≈",
  "ocl": {
    "value": "ej^VEB@IG@nachJNEDlm`XTPOFspb\\V`cHeEEMeDheHdxemLhhiVNO@jnjjjjhFXHjZijjBDIaBDq@@",
    "coordinates": "!BpBYTvxBNFY|BbEJObGvOS\\@Yt]~DUEJOctu~@Ha}`HzOSTwPTh~H@h`B_`BH_Xa}bOrH@gx@bGvHGx@bGwW@h`B_c~H@ha}"
  },
  "mass": 534.4379655041866,
  "monoisotopicMass": 534.09339913639,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 17
  }, {
    "symbol": "H",
    "number": 23
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Mya",
  "name": "2-methylthio cyclic N6-threonylcarbamoyladenosine monophosphate diradical 2164A",
  "mf": "C17H20N5O9PS",
  "kind": "NucleotideP",
  "oneLetter": "ÿ",
  "ocl": {
    "value": "elVZIB@IG@nkhJNEDlcghPOFspb\\V`cHeEEMeDheHdxeihiUFNO@jnkojjjjhFXHjfZjbHPfDHSD@@",
    "coordinates": "!BvuPfpDnDtEK_tPJHtXBH_TwPb@J_IorHbGtgD}F@RxRH_WwW@hbOTh}RIqOQ`MF@cuKW@hQTcttfpL@YS]@BbGvH@Gx"
  },
  "mass": 501.4080351062552,
  "monoisotopicMass": 501.07193541570007,
  "unsaturation": 20,
  "elements": [{
    "symbol": "C",
    "number": 17
  }, {
    "symbol": "H",
    "number": 20
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Hta",
  "name": "hydroxy-N6-threonylcarbamoyladenosine monophosphate diradical 2165A",
  "mf": "C15H19N6O11P",
  "kind": "NucleotideP",
  "oneLetter": "«",
  "ocl": {
    "value": "elZVML@IG@fnehJNEDligo`TPOFspb\\\\bTTTvTRbTbSVTrbbeXx|BjZjjjj`Y`JZijjBDIaBDq@@",
    "coordinates": "!BpBYTvxBNFY|bEJObGvOS\\@Yt]~DUEJOctu~@Ha}`HzOSTwPTh~HH`BbGvH_Xc|_`BH_Xc|_`BH_]_|bOq~Oxc|bGt"
  },
  "mass": 490.31934821268436,
  "monoisotopicMass": 490.08494245264,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 15
  }, {
    "symbol": "H",
    "number": 19
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Lyd",
  "name": "2-lysidine monophosphate diradical 21C",
  "mf": "C15H24N5O8P",
  "kind": "NucleotideP",
  "oneLetter": "}",
  "ocl": {
    "value": "eo`ZAL@IGOFmhJNEDlkg`OFspb\\\\bTTTvTRbTbSVRTtXxBJjjjjfYjZjfhaBXPaLP@",
    "coordinates": "!BTh|SI~ioOwy`iR\\SiV|SFGxw}FH_]]}Dqa~Oxc|_c|SFA`lIqOW_Xa}_c~HHa}bOrH_WxbOq~@Ha}"
  },
  "mass": 433.3541339985626,
  "monoisotopicMass": 433.13624975064994,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 15
  }, {
    "symbol": "H",
    "number": 24
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Gtu",
  "name": "2-geranylthiouridine monophosphate diradical 21U",
  "mf": "C19H27N2O7PS",
  "kind": "NucleotideP",
  "oneLetter": "Γ",
  "ocl": {
    "value": "e`XTNB@IOHJNEDln`OFsp\\BHgGHeEEMeDheHdtmEdhqpEUUUUURsUKUMTPaLHPfIAu@",
    "coordinates": "!BTv^cbn{__@fw|}RwqeRdK]}Tva~_{_|TiCp_[]}mwuRdIAMsuI~_{]||Gvw_Wy|Gvw_Wy|Gu~_{]}|Gt"
  },
  "mass": 458.46617269514235,
  "monoisotopicMass": 458.12765938888003,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 19
  }, {
    "symbol": "H",
    "number": 27
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Tyg",
  "name": "N2,N2,7-trimethylguanosine cap monophosphate diradical (cap TMG) 2279553N",
  "mf": "C13H20N5O10P2",
  "kind": "NucleotideP",
  "oneLetter": "¶",
  "ocl": {
    "value": "e`TZEBHIG@aihJNEHdleck`OFspz|MgDJTef[vVVe_gifNO@jijjjjjUijifjhaBXPaLP@",
    "coordinates": "!BvuPfpDnDtEK_t_rHtXBH_TwPbOr_I`JHbGtgD}F@RxS|uxc|_]^OTh}RIlA~@B\\StXCQ`Gx@Owx@_h{_cuH"
  },
  "mass": 468.2734710359255,
  "monoisotopicMass": 468.06854085929,
  "unsaturation": 13,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 20
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Tmg",
  "name": "N2,N2,7-trimethylguanosine monophosphate diradical 227G",
  "mf": "C13H20N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "∠",
  "ocl": {
    "value": "fcoisBINCt\\J\\TgLp^MoBKbFY}dRbbfrbTRdRUbtYspZcjjjjiYfjjjHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}Rqd@gD}D@tPBNOt}R"
  },
  "mass": 389.30149426455074,
  "monoisotopicMass": 389.11003500216,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 20
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dgu",
  "name": "N2,N2-dimethylguanosine monophosphate diradical 22G",
  "mf": "C12H16N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "R",
  "ocl": {
    "value": "fmwis@INBwlJ\\TgHp^MoBKcdRbbfrbTRdR\\RcN^CWmUUUUKLuMUDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RIqOQ@MD@cc}OT`"
  },
  "mass": 373.2589953515923,
  "monoisotopicMass": 373.07873487324,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Atu",
  "name": "5-aminomethyl-2-thiouridine monophosphate diradical 2510U",
  "mf": "C10H14N3O7PS",
  "kind": "NucleotideP",
  "oneLetter": "∫",
  "ocl": {
    "value": "fasqp`I^{BgEIrtGc[p\\DQ\\\\bTTTvTRbTfUSNAKUUUULsTuDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@@tP"
  },
  "mass": 351.27302303324575,
  "monoisotopicMass": 351.02900797432005,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Mou",
  "name": "5-methylaminomethyl-2-thiouridine monophosphate diradical 2511U",
  "mf": "C11H16N3O7PS",
  "kind": "NucleotideP",
  "oneLetter": "S",
  "ocl": {
    "value": "fikqp`I^{BgEIrtGc[p\\DQ\\\\bTTTvTRbTfUVYpIZjjjifZfjHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSUAMTBpX"
  },
  "mass": 365.2996404380926,
  "monoisotopicMass": 365.04465803878,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Ctu",
  "name": "5-carboxymethylaminomethyl-2-thiouridine monophosphate diradical 251U",
  "mf": "C12H16N3O9PS",
  "kind": "NucleotideP",
  "oneLetter": "$",
  "ocl": {
    "value": "fcwqH`I^{BgEIru^p^MoApQEqrIQQSYQJIRYUYJLxDmUUUTsMSTuDQLPbY@@",
    "coordinates": "!BKAb@tURDM\\YpMAMpBYMcx`BKB]~@Ha}SXW@h`Bb@IMcx}RtDvH_Xa}b@JH@ha}b@I~@Ha}"
  },
  "mass": 409.3091861834643,
  "monoisotopicMass": 409.03448727792,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Myu",
  "name": "5-methoxycarbonylmethyl-2-thiouridine monophosphate diradical 2521U",
  "mf": "C12H15N2O9PS",
  "kind": "NucleotideP",
  "oneLetter": "3",
  "ocl": {
    "value": "fmgQH`I^aSbdyZNXOFw`xHbxyDhhilheDiLjmLs`RuUUUSLuLuQDSDHfP@",
    "coordinates": "!BS]@lFJU`@Gyoza`lzf@lIwx@`H{WHc|KB_W_Wx@_`@lIr\\SFBrH@h`B_`BH_WxbOrH_P"
  },
  "mass": 394.2945422179627,
  "monoisotopicMass": 394.02358824126003,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Cou",
  "name": "5-carbamoylmethyl-2-thiouridine monophosphate diradical 253U",
  "mf": "C11H14N3O8PS",
  "kind": "NucleotideP",
  "oneLetter": "l",
  "ocl": {
    "value": "fe{pH`I^gBgEIrtXOFw`xHbxyDhhilheDiLjmF\\BVjjjjYfifhbIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSUAMTC~NKA`"
  },
  "mass": 379.2831638542993,
  "monoisotopicMass": 379.02392259389,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Cau",
  "name": "5-carboxymethyl-2-thiouridine monophosphate diradical 2540U",
  "mf": "C11H13N2O9PS",
  "kind": "NucleotideP",
  "oneLetter": "℘",
  "ocl": {
    "value": "fe{QH`I^aSbdyZNXOFw`xHbxyDhhilheDiLjmF\\BVjjjjYfifhbIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSUAMTC~NKA`"
  },
  "mass": 380.26792481311594,
  "monoisotopicMass": 380.00793817680005,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Tau",
  "name": "5-taurinomethyl-2-thiouridine monophosphate diradical 254U",
  "mf": "C12H18N3O10PS2",
  "kind": "NucleotideP",
  "oneLetter": "∃",
  "ocl": {
    "value": "fgpj`I^{BgEIrwY{`|[^C`bKblHrIQQSYQJIRYUYIRLxDmUUUTsMSUKTQDqBId@@",
    "coordinates": "!BKAb@tURD@m\\YpMAMpBYMcx`BKB]~@Ha}SXW@h`Bb@IMcx}RtDvH_Xa}b@JH@ha}b@JH__rH_]^H_P"
  },
  "mass": 459.3892600220213,
  "monoisotopicMass": 459.01712313635005,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 18
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 2
  }]
}, {
  "symbol": "Itu",
  "name": "5-(isopentenylaminomethyl)-2-thiouridine monophosphate diradical 2583U",
  "mf": "C15H22N3O7PS",
  "kind": "NucleotideP",
  "oneLetter": "½",
  "ocl": {
    "value": "fkoqp`I^{BgEIrtGc[p\\DQ\\\\bTTTvTRbTfUVRTYpIZjjjifZfijbHfHQL`@",
    "coordinates": "!BS]@lFJU`@Gyoza`lzf@lIwx@`H{W@h`BKB_W_Wx@_`@lIr\\SFBrH@h`B_`BH_Xc|bGvH@gx@bGt"
  },
  "mass": 419.3902285493682,
  "monoisotopicMass": 419.09160823216,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 15
  }, {
    "symbol": "H",
    "number": 22
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Mth",
  "name": "5-methyl-2-thiouridine monophosphate diradical 25U",
  "mf": "C10H13N2O7PS",
  "kind": "NucleotideP",
  "oneLetter": "F",
  "ocl": {
    "value": "fncQp`I^aSbdyZCqmxNBHnNQJJJ[JIQJSJlxDmUUUTsMSQDSDHfP@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@"
  },
  "mass": 336.25837906774416,
  "monoisotopicMass": 336.01810893766003,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Dmg",
  "name": "N2,7-dimethylguanosine monophosphate diradical 27G",
  "mf": "C12H18N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "∨",
  "ocl": {
    "value": "fmwisBINCt\\J\\TgLp^MoBKbFY}dRbbfrbTRdRUbKN^CWmUUUUKLuUUDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RqdCQ@B\\StPAOT`"
  },
  "mass": 375.27487685970397,
  "monoisotopicMass": 375.0943849377,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 18
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dma",
  "name": "2,8-dimethyladenosine monophosphate diradical 28A",
  "mf": "C12H16N5O6P",
  "kind": "NucleotideP",
  "oneLetter": "±",
  "ocl": {
    "value": "feghs@INCv\\J\\UdhOFw`eqrIQQSYQJJJQKqLyxK^uUUUPMLAUADSDHfP@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpP@c`a}_S_|BD}RSuKQ@B\\StP@"
  },
  "mass": 357.2595904272741,
  "monoisotopicMass": 357.08382025367,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mas",
  "name": "2-methyladenosine monophosphate diradical 2A",
  "mf": "C11H14N5O6P",
  "kind": "NucleotideP",
  "oneLetter": "/",
  "ocl": {
    "value": "fi{hs@INBt\\J\\TgHOFwaEqrIQQSYQJIRINIgOAjvjjjjAf@j`bIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RtP@gD}D@"
  },
  "mass": 343.2329730224273,
  "monoisotopicMass": 343.06817018921,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Tcy",
  "name": "2-thiocytidine monophosphate diradical 2C",
  "mf": "C9H12N3O6PS",
  "kind": "NucleotideP",
  "oneLetter": "%",
  "ocl": {
    "value": "ff}pp`I^kBgEIrCqmxNBHnNQJJJ[JIQJSMg@ejjjjfYfhbIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFDuP"
  },
  "mass": 321.2470007040807,
  "monoisotopicMass": 321.01844329029,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Nmg",
  "name": "N2-methylguanosine monophosphate diradical 2G",
  "mf": "C11H14N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "L",
  "ocl": {
    "value": "fegis@INBwlJ\\TgHp^MoBKcdRbbfrbTRdR\\VYspZmjjjjiYfijbHfHQL`@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RtP@gD}D@SuH"
  },
  "mass": 359.23237794674554,
  "monoisotopicMass": 359.06308480878,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Thu",
  "name": "2-thiouridine monophosphate diradical 2U",
  "mf": "C9H11N2O7PS",
  "kind": "NucleotideP",
  "oneLetter": "2",
  "ocl": {
    "value": "ff}Qp`I^aSbdyjCqmxNBHnNQJJJ[JIQJSMg@ejjjjfYihbIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFDuP"
  },
  "mass": 322.2317616628973,
  "monoisotopicMass": 322.0024588732,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Ahu",
  "name": "3-(3-amino-3-carboxypropyl)-5,6-dihydrouridine monophosphate diradical 308U",
  "mf": "C13H20N3O10P",
  "kind": "NucleotideP",
  "oneLetter": "Ð",
  "ocl": {
    "value": "fkopk@I^gBgENSens`|[^DWGHeEEMeDheIhueMF\\BVjjjjZfijfhbIbDSH@",
    "coordinates": "!BTh|SI~ioOwy`iR\\SiV|SFGxw}FH_]]}DqbH@gx_c|SFA`lIqOW_Xa}_c~HHa}_c~H@gx@bGt"
  },
  "mass": 409.28630261461393,
  "monoisotopicMass": 409.08863085201,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 20
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "App",
  "name": "3-(3-amino-3-carboxypropyl)pseudouridine monophosphate diradical 309U",
  "mf": "C13H18N3O10P",
  "kind": "NucleotideP",
  "oneLetter": "Þ",
  "ocl": {
    "value": "fkopk@OAgBgENSens`|[^DWGHeEEMeDheIhueMF\\BVjjjfZfijfhbIbDSH@",
    "coordinates": "!BTh|SI~ioOwy`iR\\SiV|SFGxw}FH_]]}DqbH@gx_c|SFA`lIqOW_Xa}_c~HHa}_c~H@gx@bGt"
  },
  "mass": 407.2704211065024,
  "monoisotopicMass": 407.07298078755,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 18
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Apu",
  "name": "3-(3-amino-3-carboxypropyl)uridine monophosphate diradical 30U",
  "mf": "C13H18N3O10P",
  "kind": "NucleotideP",
  "oneLetter": "X",
  "ocl": {
    "value": "fkopk@I^gBgENSens`|[^DWGHeEEMeDheIhueMF\\BVjjjjYfijfhbIbDSH@",
    "coordinates": "!BTh|SI~ioOwy`iR\\SiV|SFGxw}FH_]]}DqbH@gx_c|SFA`lIqOW_Xa}_c~HHa}_c~H@gx@bGt"
  },
  "mass": 407.2704211065024,
  "monoisotopicMass": 407.07298078755,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 18
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mws",
  "name": "methylwyosine monophosphate diradical 342G",
  "mf": "C15H18N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "∑",
  "ocl": {
    "value": "eghZNL@IG@nahJNEDli`OFspb\\\\bTTTvTRbTbb\\rVSGG`SPrvuUUUUKMTsUUIBDpaBX`@",
    "coordinates": "!B_`CW@mF@ctvDUI|fRxPYgtwP[zV_IorHFY|gD}F@RxPYg|@YgrZOTh{_cuJOS]F@tXAKaI|fw}EMt@"
  },
  "mass": 411.3070845499097,
  "monoisotopicMass": 411.0943849377,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 15
  }, {
    "symbol": "H",
    "number": 18
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Uhw",
  "name": "undermodified hydroxywybutosine monophosphate diradical 3470G",
  "mf": "C18H23N6O10P",
  "kind": "NucleotideP",
  "oneLetter": "š",
  "ocl": {
    "value": "ejQVEL@IG@nahXJNEDliolRPOFspb\\\\bTTTvTRbTbb\\rVVTttXx|BZFVvjjjjiYjfZjjfjRDIaBDq@@",
    "coordinates": "!BKB^@ceS[H`Yg}ARpAeMtHa}KAcPTh{_S]CjXES[pAeMtH}MtEK@IdnDpBXBbES[UMo@F]ARaERH_X`B_`BH_WxbOq~@Ha}"
  },
  "mass": 514.3839139947949,
  "monoisotopicMass": 514.12132796199,
  "unsaturation": 20,
  "elements": [{
    "symbol": "C",
    "number": 18
  }, {
    "symbol": "H",
    "number": 23
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Acw",
  "name": "7-aminocarboxypropylwyosine monophosphate diradical 347G",
  "mf": "C18H23N6O9P",
  "kind": "NucleotideP",
  "oneLetter": "Ω",
  "ocl": {
    "value": "eb^VIL@IG@na`XJNEDlid\\POFspb\\\\bTTTvTRbTbb\\rVRrfcGG`SPrvuUUUUKMTsUUSUIBDpaBX`@",
    "coordinates": "!BDr]RcwwWpAg_tUS[cm~DUAf_XJUTvx}MaEP@_gwWcm~DUDnDUMo|urH@m_@FWwW_]^NwuS[bGtYgx`BbGu~Ox`B_`BH_P"
  },
  "mass": 498.38450907047655,
  "monoisotopicMass": 498.12641334242,
  "unsaturation": 20,
  "elements": [{
    "symbol": "C",
    "number": 18
  }, {
    "symbol": "H",
    "number": 23
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Hwy",
  "name": "methylated undermodified hydroxywybutosine monophosphate diradical 3480G",
  "mf": "C19H25N6O10P",
  "kind": "NucleotideP",
  "oneLetter": "y",
  "ocl": {
    "value": "efYVEL@IG@nahXJNEDliolRPOFspb\\\\bTTTvTRbTbb\\rVVTttsGG`SPrvuUUUUKMTsUUTuTdHSBDIb@@",
    "coordinates": "!B`HyRtL@f_XbDRxz@UHS_chc|S]BN`MAMwxyKaL@fUHS_cmG_chCjXI|YzfA}bL@fpBYTaHz@F\\BH@gx@upJH@ha}_`CWHc|_`@"
  },
  "mass": 528.4105313996416,
  "monoisotopicMass": 528.1369780264499,
  "unsaturation": 20,
  "elements": [{
    "symbol": "C",
    "number": 19
  }, {
    "symbol": "H",
    "number": 25
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Hwb",
  "name": "hydroxywybutosine monophosphate diradical 34830G",
  "mf": "C21H27N6O12P",
  "kind": "NucleotideP",
  "oneLetter": "⊆",
  "ocl": {
    "value": "ee[VCL@IG@nahXJNEDliobZV^POFspb\\\\bTTTvTRbTbb\\rVVTtRbfsGG`SPrvuUUUUKMTsUUULuUIBDpaBX`@",
    "coordinates": "!BKB^@ceS[@h`Yg}ARpAeMtHa}KAcPTh{_S]CjXES[pAeMtH}MtEK@IdnDpBXBbES[UMo@F]ARaERH_X`B_`BH_X`B_c~H_]]}bGu~Ox`B_c~H_P"
  },
  "mass": 586.4466945498602,
  "monoisotopicMass": 586.14245733005,
  "unsaturation": 22,
  "elements": [{
    "symbol": "C",
    "number": 21
  }, {
    "symbol": "H",
    "number": 27
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 12
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Pwb",
  "name": "peroxywybutosine monophosphate diradical 34832G",
  "mf": "C21H27N6O13P",
  "kind": "NucleotideP",
  "oneLetter": "W",
  "ocl": {
    "value": "emWVKL@IG@nadXJNEDliohZV^QPOFspb\\\\bTTTvTRbTbb\\rVVTRfTTvXx|BZFVvjjjjiYjfZjjjYjjRDIaBDq@@",
    "coordinates": "!BKB^@ceS[@h`Yg}ARpAeMtHa}KAcPTh{_S]CjXES[pAeMtH}MtEK@IdnDpB[|bES[UMo@F]ARaERH_X`B_`BH_X`Bb@I~Oxa}uwvH_Wxb@I~Oxa}"
  },
  "mass": 602.4460994741785,
  "monoisotopicMass": 602.1373719496199,
  "unsaturation": 22,
  "elements": [{
    "symbol": "C",
    "number": 21
  }, {
    "symbol": "H",
    "number": 27
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 13
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Wyb",
  "name": "wybutosine monophosphate diradical 3483G",
  "mf": "C21H27N6O11P",
  "kind": "NucleotideP",
  "oneLetter": "Y",
  "ocl": {
    "value": "eiSVML@IG@na`XJNEDlilRZVPOFspb\\\\bTTTvTRbTbb\\rVVRbTTvXx|BZFVvjjjjiYjfZjjfZjdaBXPaLP@",
    "coordinates": "!BsJ\\@ciP{@`YWuARPAeMT@a}sNaPThxSUCjhIP{PAeMTD}MTEI@IllDPB[|BIP{eCm@FUARAIPH_Pc|BGtHGzBGtw_Pa}_k|HGzBGt"
  },
  "mass": 570.4472896255419,
  "monoisotopicMass": 570.14754271048,
  "unsaturation": 22,
  "elements": [{
    "symbol": "C",
    "number": 21
  }, {
    "symbol": "H",
    "number": 27
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Awo",
  "name": "7-aminocarboxypropylwyosine methyl ester monophosphate diradical 348G",
  "mf": "C19H25N6O9P",
  "kind": "NucleotideP",
  "oneLetter": "⇑",
  "ocl": {
    "value": "ejQVIL@IG@na`XJNEDlid\\POFspb\\\\bTTTvTRbTbb\\rVVRffXx|BZFVvjjjjiYjfZjjZjRDIaBDq@@",
    "coordinates": "!B`HyRtL@f_XbDRxz@UHS_ch`BS]BN`MAMwxyKaL@fUHS_cmG_chCjXI|YzfA}bL@fpBYTaHz@F\\BHHa}bOq~@Ha}_c~H@ha}"
  },
  "mass": 512.4111264753234,
  "monoisotopicMass": 512.14206340688,
  "unsaturation": 20,
  "elements": [{
    "symbol": "C",
    "number": 19
  }, {
    "symbol": "H",
    "number": 25
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Wyo",
  "name": "wyosine monophosphate diradical 34G",
  "mf": "C14H16N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "€",
  "ocl": {
    "value": "ek`ZNL@IG@nahJNEDli`OFspb\\\\bTTTvTRbTbb\\rVXx|BZFVvjjjjiYjfZjdaBXPaLP@",
    "coordinates": "!B_`CWMF@ctvDUI|fRxPYgtwP[zV_IorHFY|gD}F@RxPYg|@YgrZOTh{_cuJOS]F@tXAKaI|fw}D"
  },
  "mass": 397.2804671450629,
  "monoisotopicMass": 397.07873487324,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 14
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Pdu",
  "name": "3-methylpseudouridine monophosphate diradical 39U",
  "mf": "C10H13N2O8P",
  "kind": "NucleotideP",
  "oneLetter": "κ",
  "ocl": {
    "value": "fncPK@OAaSbgIrtGc[pbxyDhhilheDiMFs`RuUUTsTuMDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@HoWtw@`lFC~NSU@"
  },
  "mass": 320.1929965859354,
  "monoisotopicMass": 320.04095238282997,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mri",
  "name": "3-methyluridine monophosphate diradical 3U",
  "mf": "C10H13N2O8P",
  "kind": "NucleotideP",
  "oneLetter": "δ",
  "ocl": {
    "value": "fncPK@I^aSbgIrtGc[pbxyDhhilheDiMFs`RuUUUSLuMDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@HoWtw@`lFC~NSU@"
  },
  "mass": 320.1929965859354,
  "monoisotopicMass": 320.04095238282997,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Acc",
  "name": "N4-acetylcytidine monophosphate diradical 42C",
  "mf": "C11H14N3O8P",
  "kind": "NucleotideP",
  "oneLetter": "M",
  "ocl": {
    "value": "fikpK@I^kBgENSghOFwaEqrIQQSYQJIRYiQg@ejjjjfYffhbIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFDuPOxxSItuP"
  },
  "mass": 347.21837644817225,
  "monoisotopicMass": 347.05185141949,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Iws",
  "name": "isowyosine monophosphate diradical 42G",
  "mf": "C14H16N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "⊇",
  "ocl": {
    "value": "ek`ZNL@IG@fnhJNEDla`OFspb\\\\bTTTvTRbTbSbRrXx|BjzfVjjjjiYjYjjdaBXPaLP@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RStwQ@MD@RpQ_qcQSU@"
  },
  "mass": 397.2804671450629,
  "monoisotopicMass": 397.07873487324,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 14
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dmc",
  "name": "N4,N4-dimethylcytidine monophosphate diradical 44C",
  "mf": "C11H16N3O7P",
  "kind": "NucleotideP",
  "oneLetter": "μ",
  "ocl": {
    "value": "fasqs@I^kBgENSdGc[pbxyDhhilheDiLuF\\BVjjjjYfZjHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBGpcbpXBGtSItuPSU@H_Wtw@`lFDuPOxxlF@"
  },
  "mass": 333.23485303196554,
  "monoisotopicMass": 333.07258686438,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Adw",
  "name": "7-aminocarboxypropyl-demethylwyosine monophosphate diradical 47G",
  "mf": "C17H21N6O9P",
  "kind": "NucleotideP",
  "oneLetter": "¥",
  "ocl": {
    "value": "elVVIL@IG@fnohJNEDlahTPOFspb\\\\bTTTvTRbTbSbRrrTtXx|BjzfVjjjjiYjYjjijdaBXPaLP@",
    "coordinates": "!B`MERc|@Y_]^DUH{_UMo_tXa}SXPTh{_w}GjXES[pAg_t]F@cm@Il@f@haTvuS[pAgPThQTbGvH@ha}_c~HGx@bGt"
  },
  "mass": 484.3578916656298,
  "monoisotopicMass": 484.1107632779601,
  "unsaturation": 20,
  "elements": [{
    "symbol": "C",
    "number": 17
  }, {
    "symbol": "H",
    "number": 21
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Ncd",
  "name": "N4-methylcytidine monophosphate diradical 4C",
  "mf": "C10H14N3O7P",
  "kind": "NucleotideP",
  "oneLetter": "ν",
  "ocl": {
    "value": "fncqs@I^kBgENSdGc[pbxyDhhilheDiLts`RuUUUSLsUDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFDuPKA`"
  },
  "mass": 319.2082356271187,
  "monoisotopicMass": 319.05693679992004,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dmw",
  "name": "4-demethylwyosine monophosphate diradical 4G",
  "mf": "C13H14N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "†",
  "ocl": {
    "value": "fcis@INBwlJ\\TgHp^MoBKcdRbbfrbTRdR\\RVYspZ}fnjjjjefifjiHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RStwQ@MD@RpQ_qcQ"
  },
  "mass": 383.253849740216,
  "monoisotopicMass": 383.06308480878,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mtu",
  "name": "5-methoxyuridine monophosphate diradical 501U",
  "mf": "C10H13N2O9P",
  "kind": "NucleotideP",
  "oneLetter": "5",
  "ocl": {
    "value": "fasQK@I^aSbgIsUhOFwaEqrIQQSYQJIRYULxDmUUUTsMSTQDqBId@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@@tP"
  },
  "mass": 336.19240151025366,
  "monoisotopicMass": 336.03586700240004,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Uoa",
  "name": "uridine 5-oxyacetic acid monophosphate diradical 502U",
  "mf": "C11H13N2O11P",
  "kind": "NucleotideP",
  "oneLetter": "V",
  "ocl": {
    "value": "fmgQk@I^aSbgIsUlu`|[^DWGHeEEMeDheIeUeF\\BVjjjjYfiijHbXaDr@@",
    "coordinates": "!BS]@lFJU`@Gyoza`lzf@lIwx@`H{WHc|KB_W_Wx@_`@lIr\\SFBrHHc|_`BH_Xc|_`BH_P"
  },
  "mass": 380.2019472556255,
  "monoisotopicMass": 380.02569624154,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Ume",
  "name": "uridine 5-oxyacetic acid methyl ester monophosphate diradical 503U",
  "mf": "C12H15N2O11P",
  "kind": "NucleotideP",
  "oneLetter": "υ",
  "ocl": {
    "value": "fcwQk@I^aSbgIsUlu`|[^DWGHeEEMeDheIeUeLs`RuUUUSLuMMTQDqBId@@",
    "coordinates": "!BKAb@tURDM\\YpMAMpBYMcxc|KB]~@Ha}SXWHc|bOqMcx}RtDvH_Xa}bOrH@ha}_c~HHa}"
  },
  "mass": 394.2285646604723,
  "monoisotopicMass": 394.041346306,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Hxc",
  "name": "5-hydroxycytidine monophosphate diradical 50C",
  "mf": "C9H12N3O8P",
  "kind": "NucleotideP",
  "oneLetter": "Ç",
  "ocl": {
    "value": "fncpK@I^[BgENSfhOFwaEqrIQQSYQJIRYUg@ejjjjfYfjHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@"
  },
  "mass": 321.1810231465902,
  "monoisotopicMass": 321.03620135502996,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Hxu",
  "name": "5-hydroxyuridine monophosphate diradical 50U",
  "mf": "C9H11N2O9P",
  "kind": "NucleotideP",
  "oneLetter": "∝",
  "ocl": {
    "value": "fncQK@I^aSbgIsUhOFwaEqrIQQSYQJIRYUg@ejjjjfYjZHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@"
  },
  "mass": 322.1657841054069,
  "monoisotopicMass": 322.02021693794,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Amu",
  "name": "5-aminomethyluridine monophosphate diradical 510U",
  "mf": "C10H14N3O8P",
  "kind": "NucleotideP",
  "oneLetter": "∪",
  "ocl": {
    "value": "faspK@I^{BgENSehOFwaEqrIQQSYQJIRYULxDmUUUTsMSTQDqBId@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@@tP"
  },
  "mass": 335.207640551437,
  "monoisotopicMass": 335.05185141949,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mau",
  "name": "5-methylaminomethyluridine monophosphate diradical 511U",
  "mf": "C11H16N3O8P",
  "kind": "NucleotideP",
  "oneLetter": "{",
  "ocl": {
    "value": "fikpK@I^{BgENSehOFwaEqrIQQSYQJIRYUYg@ejjjjfYjZhbIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSUAMTBpX"
  },
  "mass": 349.2342579562838,
  "monoisotopicMass": 349.06750148395,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Hmc",
  "name": "5-hydroxymethylcytidine monophosphate diradical 51C",
  "mf": "C10H14N3O8P",
  "kind": "NucleotideP",
  "oneLetter": "∅",
  "ocl": {
    "value": "faspK@I^[BgENSghOFwaEqrIQQSYQJIRYULxDmUUUTsLuTQDqBId@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@@tP"
  },
  "mass": 335.207640551437,
  "monoisotopicMass": 335.05185141949,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Cur",
  "name": "5-carboxymethylaminomethyluridine monophosphate diradical 51U",
  "mf": "C12H16N3O10P",
  "kind": "NucleotideP",
  "oneLetter": "!",
  "ocl": {
    "value": "fcwpk@I^{BgENSej}`|[^DWGHeEEMeDheIeUdhs`RuUUUSLuMSTQDqBId@@",
    "coordinates": "!BKAb@tURDM\\YpMAMpBYMcx`BKB]~@Ha}SXW@h`Bb@IMcx}RtDvH_Xa}b@JH@ha}b@I~@Ha}"
  },
  "mass": 393.24380370165557,
  "monoisotopicMass": 393.05733072309,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Chr",
  "name": "5-carboxyhydroxymethyluridine monophosphate diradical 520U",
  "mf": "C11H13N2O11P",
  "kind": "NucleotideP",
  "oneLetter": "≥",
  "ocl": {
    "value": "fmgQk@I^aSbgIrwlu`|[^DWGHeEEMeDheIeUCF\\BVjjjjYfiijHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@@tTuPOxxlF@"
  },
  "mass": 380.2019472556255,
  "monoisotopicMass": 380.02569624154,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mcu",
  "name": "5-methoxycarbonylmethyluridine monophosphate diradical 521U",
  "mf": "C12H15N2O10P",
  "kind": "NucleotideP",
  "oneLetter": "1",
  "ocl": {
    "value": "fmgPk@I^aSbgIrt\\p^MoBKcdRbbfrbTRdrjtsNAKUUUULsTsUDQLPbY@@",
    "coordinates": "!BS]@lFJU`@Gyoza`lzf@lIwx@`H{WHc|KB_W_Wx@_`@lIr\\SFBrH@h`B_`BH_WxbOrH_P"
  },
  "mass": 378.229159736154,
  "monoisotopicMass": 378.04643168643,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Hme",
  "name": "5-(carboxyhydroxymethyl)uridine methyl ester monophosphate diradical 522U",
  "mf": "C12H15N2O11P",
  "kind": "NucleotideP",
  "oneLetter": ",",
  "ocl": {
    "value": "fcwQk@I^aSbgIrwlu`|[^DWGHeEEMeDheIeUCLs`RuUUUSLuMMTQDqBId@@",
    "coordinates": "!BS]@lFJU`@Gyoza`lzf@lIwx@`H{WHc|KB_W_Wx@_`@lIr\\SFBrHHc|_`A~@Ha}_c~H@ha}"
  },
  "mass": 394.2285646604723,
  "monoisotopicMass": 394.041346306,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Cxu",
  "name": "5-carboxymethyluridine monophosphate diradical 52U",
  "mf": "C11H13N2O10P",
  "kind": "NucleotideP",
  "oneLetter": "◊",
  "ocl": {
    "value": "fe{Pk@I^aSbgIrt\\p^MoBKcdRbbfrbTRdrjtYpIZjjjifZfZbHfHQL`@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSUAMTC~NKA`"
  },
  "mass": 364.2025423313072,
  "monoisotopicMass": 364.03078162197,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Hmu",
  "name": "5-carbamoylhydroxymethyluridine monophosphate diradical 531U",
  "mf": "C11H14N3O10P",
  "kind": "NucleotideP",
  "oneLetter": "r",
  "ocl": {
    "value": "fmgpk@I^WBgENSeoY`|[^DWGHeEEMeDheIeUCF\\BVjjjjYfiijHbXaDr@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@@tTuPOxxlF@"
  },
  "mass": 379.21718629680873,
  "monoisotopicMass": 379.04168065863,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Ymu",
  "name": "5-carbamoylmethyluridine monophosphate diradical 53U",
  "mf": "C11H14N3O9P",
  "kind": "NucleotideP",
  "oneLetter": "&",
  "ocl": {
    "value": "fe{qK@I^gBgENSehp^MoBKcdRbbfrbTRdrjtYpIZjjjifZfZbHfHQL`@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSUAMTC~NKA`"
  },
  "mass": 363.2177813724905,
  "monoisotopicMass": 363.04676603906006,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Ttu",
  "name": "5-taurinomethyluridine monophosphate diradical 54U",
  "mf": "C12H18N3O11PS",
  "kind": "NucleotideP",
  "oneLetter": "Ê",
  "ocl": {
    "value": "fgqh`I^{BgENSenswAxv|HnJpcHeEEMeDheIeUdeHs`RuUUUSLuMTmQDSDHfP@",
    "coordinates": "!BKAb@tURD@m\\YpMAMpBYMcx`BKB]~@Ha}SXW@h`Bb@IMcx}RtDvH_Xa}b@JH@ha}b@JH__rH_]^H_P"
  },
  "mass": 443.32387754021244,
  "monoisotopicMass": 443.03996658152005,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 18
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Cmu",
  "name": "5-cyanomethyluridine monophosphate diradical 55U",
  "mf": "C11H12N3O8P",
  "kind": "NucleotideP",
  "oneLetter": "Ѷ",
  "ocl": {
    "value": "fikpK@I^GBgENSehOFwaEqrIQQSYQJIRYUYg@ejjjjfYj[hbIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@@tPCQ"
  },
  "mass": 345.20249494006066,
  "monoisotopicMass": 345.03620135502996,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Pyu",
  "name": "5-(isopentenylaminomethyl)uridine monophosphate diradical 583U",
  "mf": "C15H22N3O8P",
  "kind": "NucleotideP",
  "oneLetter": "¾",
  "ocl": {
    "value": "fkopK@I^{BgENSehOFwaEqrIQQSYQJIRYUYIQg@ejjjjfYjZfjHbXaDr@@",
    "coordinates": "!BS]@lFJU`@Gyoza`lzf@lIwx@`H{W@h`BKB_W_Wx@_`@lIr\\SFBrH@h`B_`BH_Xc|bGvH@gx@bGt"
  },
  "mass": 403.32484606755946,
  "monoisotopicMass": 403.11445167733,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 15
  }, {
    "symbol": "H",
    "number": 22
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mdu",
  "name": "5-methyldihydrouridine monophosphate diradical 58U",
  "mf": "C10H15N2O8P",
  "kind": "NucleotideP",
  "oneLetter": "ρ",
  "ocl": {
    "value": "fncPK@I^aSbgIrtGc[pbxyDhhilheDiLjs`RuUUUSTuMDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@"
  },
  "mass": 322.20887809404695,
  "monoisotopicMass": 322.05660244729,
  "unsaturation": 8,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mcd",
  "name": "5-methylcytidine monophosphate diradical 5C",
  "mf": "C10H14N3O7P",
  "kind": "NucleotideP",
  "oneLetter": "?",
  "ocl": {
    "value": "fncqs@I^[BgENSdGc[pbxyDhhilheDiLjs`RuUUUSLsUDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@"
  },
  "mass": 319.2082356271187,
  "monoisotopicMass": 319.05693679992004,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Hia",
  "name": "N6-(cis-hydroxyisopentenyl)adenosine monophosphate diradical 60A",
  "mf": "C15H20N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "`",
  "ocl": {
    "value": "eg`ZNL@IG@fnhJNEDlk`OFspb\\\\bTTTvTRbTbSVRTSGG`USUUUUTCLATuTDHSBDIbPSH",
    "coordinates": "!BzfC@IeKPaDn}bHCQb@KQwuRDFALYpHCQt]W@h`BTmCQw}~N`ME~@Gx@b@JH@ha}bOrH_Wxb@JH_P"
  },
  "mass": 413.3229660580212,
  "monoisotopicMass": 413.11003500216003,
  "unsaturation": 16,
  "elements": [{
    "symbol": "C",
    "number": 15
  }, {
    "symbol": "H",
    "number": 20
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mta",
  "name": "2-methylthio-N6-methyladenosine monophosphate diradical 621A",
  "mf": "C12H16N5O6PS",
  "kind": "NucleotideP",
  "oneLetter": "∞",
  "ocl": {
    "value": "fmwhp`CQstZLDxipEfGa[qZDYEIlheDdhXdmDmKR\\u{MUUUU@aEUAFPTdmH@",
    "coordinates": "!BBGw|B@a}_S\\H@a}TEJNOuP{Ntm@fPBN[~iRSpHUCneXDBYTEITAEPDiVA@fTBYU@Sj[p"
  },
  "mass": 389.3243778334011,
  "monoisotopicMass": 389.05589142807,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Tca",
  "name": "N6-threonylcarbamoyladenosine monophosphate diradical 62A",
  "mf": "C15H19N6O10P",
  "kind": "NucleotideP",
  "oneLetter": "6",
  "ocl": {
    "value": "edRVEL@IG@fnehJNEDligo`POFspb\\\\bTTTvTRbTbSVTrbbcGG`USUUUUTCLASUMUABDpaBX`@",
    "coordinates": "!BzfC@IeKPaDn}bHCQbOsQwuRDFALYpHCQt]W@h`BTmCQw}~N`ME~@Gx@b@JH@ha}_c~H@ha}_c~H@ha}uwu~@Ha}"
  },
  "mass": 474.31994328836606,
  "monoisotopicMass": 474.09002783307,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 15
  }, {
    "symbol": "H",
    "number": 19
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Hva",
  "name": "N6-hydroxynorvalylcarbamoyladenosine monophosphate diradical 63A",
  "mf": "C16H21N6O10P",
  "kind": "NucleotideP",
  "oneLetter": "√",
  "ocl": {
    "value": "elZVIB@IG@fnehJNDligo`POEQql|HgGHeEEMeDheHdueLhhiVNO@jfjjjjhFXBfjZj`aBXPaLP@",
    "coordinates": "!BpBYTvxBNFY|bEJObGvOS\\@Yt]~DUEJOctu~@Ha}`HzOSTwPTh~HH`BbGvH_Xc|_`BH_Xc|_`BH_]_|bOq~Oxc|bGt"
  },
  "mass": 488.34656069321284,
  "monoisotopicMass": 488.10567789753003,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 16
  }, {
    "symbol": "H",
    "number": 21
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Aya",
  "name": "N6-acetyladenosine monophosphate diradical 64A",
  "mf": "C12H14N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "⇓",
  "ocl": {
    "value": "fmwis@INBwlJ\\TgLp^MoBKcdRbbfrbTRdRZrcN^CUmUUUTCLASTDQLPbY@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RtPCQ@D}RIqOQ@@"
  },
  "mass": 371.2431138434808,
  "monoisotopicMass": 371.06308480878,
  "unsaturation": 16,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Gca",
  "name": "N6-glycinylcarbamoyladenosine monophosphate diradical 65A",
  "mf": "C13H15N6O9P",
  "kind": "NucleotideP",
  "oneLetter": "≡",
  "ocl": {
    "value": "eohVIL@IG@fnehJNEDlikg`OFspb\\\\bTTTvTRbTbSVTrTXx|BjZjjjj`Y`JZfhHPfDHSD@@",
    "coordinates": "!BzfC@IeKPaDn}bHCQb@KQwuRDFALYpHCQt]W@h`BTmCQw}~N`ME~@Gx@bOrHHa}_c~H@ha}bOq~@Ha}"
  },
  "mass": 430.2673035543541,
  "monoisotopicMass": 430.06381308458,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 13
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Tya",
  "name": "N6-methyl-N6-threonylcarbamoyladenosinemonophosphate diradical 662A",
  "mf": "C16H21N6O10P",
  "kind": "NucleotideP",
  "oneLetter": "E",
  "ocl": {
    "value": "elZVEL@IG@fnmhJNEDleo`XPOFspb\\\\bTTTvTRbTbSVbaTTTXx|BjZjjjj`Y`JfjZjBDIaBDq@@",
    "coordinates": "!BzfC@IeKPaDn}bHCQb@KQwuRDFALYpHCQt]W@h`BTmCQw}~N`ME~@Gx@bOrHHa}_`A~Ox`BbGu~Ox`BbGwW_Wx@bGt"
  },
  "mass": 488.34656069321284,
  "monoisotopicMass": 488.10567789753003,
  "unsaturation": 18,
  "elements": [{
    "symbol": "C",
    "number": 16
  }, {
    "symbol": "H",
    "number": 21
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Nna",
  "name": "N6,N6-dimethyladenosine monophosphate diradical 66A",
  "mf": "C12H16N5O6P",
  "kind": "NucleotideP",
  "oneLetter": "ζ",
  "ocl": {
    "value": "feghs@INBwlJ\\TgHOFwaEqrIQQSYQJIRIMZLyxMVuUUUPLpEUADSDHfP@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RtPCQ@D}RFBp"
  },
  "mass": 357.2595904272741,
  "monoisotopicMass": 357.08382025367,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Fya",
  "name": "N6-formyladenosine monophosphate diradical 67A",
  "mf": "C11H12N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "Ϩ",
  "ocl": {
    "value": "fegis@INBwlJ\\TgLp^MoBKcdRbbfrbTRdRZrYspZmjjjj`Y`JZBHfHQL`@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RtPCQ@D}RtP@"
  },
  "mass": 357.216496438634,
  "monoisotopicMass": 357.04743474432,
  "unsaturation": 16,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Hma",
  "name": "N6-hydroxymethyladenosine monophosphate diradical 68A",
  "mf": "C11H14N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "Ϫ",
  "ocl": {
    "value": "fegis@INBwlJ\\TgLp^MoBKcdRbbfrbTRdRZrYspZmjjjj`Y`JjBHfHQL`@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RtPCQ@D}RtP@"
  },
  "mass": 359.23237794674554,
  "monoisotopicMass": 359.06308480878,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Cca",
  "name": "cyclic N6-threonylcarbamoyladenosine monophosphate diradical 69A",
  "mf": "C15H17N6O9P",
  "kind": "NucleotideP",
  "oneLetter": "e",
  "ocl": {
    "value": "ehRVIL@IG@fnehJNEDliko`OFspb\\\\bTTTvTRbTbSVTRRtXx|BjZvNjjjj`Y`IjfjbHPfDHSD`z`",
    "coordinates": "!BvuPfpDnDtEK_tPJHtXBH_TwPb@J_IorHbGtgD}F@RxRH_WwW@hbOTh}RtXCQ`A`l_`A`iVCjKAcjX@A~@h`Bup"
  },
  "mass": 456.30465685593623,
  "monoisotopicMass": 456.07946314904,
  "unsaturation": 20,
  "elements": [{
    "symbol": "C",
    "number": 15
  }, {
    "symbol": "H",
    "number": 17
  }, {
    "symbol": "N",
    "number": 6
  }, {
    "symbol": "O",
    "number": 9
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Fcy",
  "name": "5-formylcytidine monophosphate diradical71C",
  "mf": "C10H12N3O8P",
  "kind": "NucleotideP",
  "oneLetter": ">",
  "ocl": {
    "value": "faspK@I^[BgENSghOFwaEqrIQQSYQJIRYULxDmUUUTsLttQDqBId@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFBpXSU@@tP"
  },
  "mass": 333.1917590433254,
  "monoisotopicMass": 333.03620135502996,
  "unsaturation": 12,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 12
  }, {
    "symbol": "N",
    "number": 3
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Tur",
  "name": "4-thiouridine monophosphate diradical 74U",
  "mf": "C9H11N2O7PS",
  "kind": "NucleotideP",
  "oneLetter": "4",
  "ocl": {
    "value": "ff}Qp`I^aSbgIrCqmxQ\\ZaFQJJJ[JIQJSMg@ejjjjfYihbIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFDuP"
  },
  "mass": 322.2317616628973,
  "monoisotopicMass": 322.0024588732,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Meg",
  "name": "7-methylguanosine monophosphate diradical 7G",
  "mf": "C11H15N5O7P",
  "kind": "NucleotideP",
  "oneLetter": "7",
  "ocl": {
    "value": "fegisDINCt\\J\\TgLp^MoBKbF\\bTTTvTRbTbRlSN^CWmUUUUKLuSTQDqBId@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RqdCQ@B\\StP@"
  },
  "mass": 360.2403187008013,
  "monoisotopicMass": 360.07090984101,
  "unsaturation": 13,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mea",
  "name": "8-methyladenosine monophosphate diradical 8A",
  "mf": "C11H14N5O6P",
  "kind": "NucleotideP",
  "oneLetter": "â",
  "ocl": {
    "value": "fi{hs@INCt\\J\\UdhOFw`eqrIQQSYQJJJQKigOA[vjjjjAi`J`bIbDSH@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpP@c`a}_S_|BD}RSuKQ@MD@"
  },
  "mass": 343.2329730224273,
  "monoisotopicMass": 343.06817018921,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 14
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 6
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Dhu",
  "name": "dihydrouridine monophosphate diradical 8U",
  "mf": "C9H13N2O8P",
  "kind": "NucleotideP",
  "oneLetter": "D",
  "ocl": {
    "value": "ff}PK@I^aSbgIsTGc[pbxyDhhilheDiLv\\BVjjjjZffbHfHQL`@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFDuP"
  },
  "mass": 308.1822606892002,
  "monoisotopicMass": 308.04095238282997,
  "unsaturation": 8,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Ins",
  "name": "inosine monophosphate diradical 9A",
  "mf": "C10H11N4O7P",
  "kind": "NucleotideP",
  "oneLetter": "I",
  "ocl": {
    "value": "fakIs@INBvENJSghOFwaEqrIQQSYQJIRIMLyxMVuUUUTlsSTQDqBId@@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOq_qopHBGtgD}D@RpPH_Wtw@aOTd}RtPCQ@@"
  },
  "mass": 330.1911165763972,
  "monoisotopicMass": 330.03653570766,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 4
  }, {
    "symbol": "O",
    "number": 7
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Pis",
  "name": "pseudouridine monophosphate diradical 9U",
  "mf": "C9H11N2O8P",
  "kind": "NucleotideP",
  "oneLetter": "P",
  "ocl": {
    "value": "ff}PK@OAaSbgIsTGc[pbxyDhhilheDiLv\\BVjjjfZffbHfHQL`@",
    "coordinates": "!BNuSFPDlDTEHt_pHtP@H_TuPBOpcbpXBGtSItuPSU@H_Wtw@`lFDuP"
  },
  "mass": 306.1663791810886,
  "monoisotopicMass": 306.02530231837,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 9
  }, {
    "symbol": "H",
    "number": 11
  }, {
    "symbol": "N",
    "number": 2
  }, {
    "symbol": "O",
    "number": 8
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Pqb",
  "name": "preQ0base 100G diradical (base)",
  "mf": "C7H5N5O",
  "kind": "Nucleotide",
  "oneLetter": "ψ",
  "ocl": {
    "value": "dk^h@DxYLLbbTTRekiujYj^`@",
    "coordinates": "!B|Gwp_Gy|Gwp_[lk_gp_Ag_wrYRs}|f"
  },
  "mass": 175.1477760289729,
  "monoisotopicMass": 175.04940980287,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 7
  }, {
    "symbol": "H",
    "number": 5
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Pqg",
  "name": "preQ1base 101G diradical (base)",
  "mf": "C7H9N5O",
  "kind": "Nucleotide",
  "oneLetter": "∇",
  "ocl": {
    "value": "dk^h@DxYLLbbTTRckiUjYij`@",
    "coordinates": "!BWyfe[tlDWye_fXx@RpRe[wtHSuHH@a}"
  },
  "mass": 179.179539045196,
  "monoisotopicMass": 179.08070993179,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 7
  }, {
    "symbol": "H",
    "number": 9
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Qba",
  "name": "Qbase 10G diradical (base)",
  "mf": "C12H15N5O3",
  "kind": "Nucleotide",
  "oneLetter": "∴",
  "ocl": {
    "value": "fbmi`@D\\EHpHyrJIQQJMJIPtyIPTmSMMUMUP@@",
    "coordinates": "!BRpQ_f^i`RpQKAEARzfA_f_pHtP@H_Pc|BGuPThxUCl{RtBYTd|"
  },
  "mass": 277.27967290184347,
  "monoisotopicMass": 277.11748936431,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 15
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 3
  }]
}, {
  "symbol": "Dgc",
  "name": "N2,7-dimethylguanosine cap (cap DMG) diradical 279553N",
  "mf": "C12H18N5O11P2",
  "kind": "Nucleotide",
  "oneLetter": "®",
  "ocl": {
    "value": "e`TZMBHIG@aihJNEHdlemck`OFspz|OgDJ\\bTTTvTRbTbRvbtfKGG`UPuUUUUJtuTmUTPaLHPfH@@",
    "coordinates": "!BvuPfpDnDtEK_t_rHtXBH_TwPbOr_IorHbGtgD}F@RxS|uxc|_]^OTh}RIlBH_]F@IqOQ`@A~_c|bH}RbGt"
  },
  "mass": 470.24625855539705,
  "monoisotopicMass": 470.04780541440005,
  "unsaturation": 13,
  "elements": [{
    "symbol": "C",
    "number": 12
  }, {
    "symbol": "H",
    "number": 18
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Dpa",
  "name": "5′-(3′-dephosphoacetyl-CoA) diradical 4155N",
  "mf": "C23H35N7O16P3S",
  "kind": "Nucleotide",
  "oneLetter": "♣",
  "ocl": {
    "value": "elz~@jDCHlemnSTLBAEKBjfckgbV]XpEfCpB|IoCtHZy{lbdvbbfrbTRdRNRdnTbefRTrRTdTRrFVfjjjj`V`bZjjfjZjZ`bbLSaRP@",
    "coordinates": "!BvtmKaMmKUMlfgto[tDw_cosWt]~H@dvObGv_F_sWbOpgKMG_R}m}bHa}HbOSX}M_cQw}G_OwzH_[wW_c~H_Wx@G{|bM]}bGvHGxbGu~Oxa}bOq~Oxa}_c~H_WxuwvH_P"
  },
  "mass": 790.5483266874629,
  "monoisotopicMass": 790.1073852418399,
  "unsaturation": 21,
  "elements": [{
    "symbol": "C",
    "number": 23
  }, {
    "symbol": "H",
    "number": 35
  }, {
    "symbol": "N",
    "number": 7
  }, {
    "symbol": "O",
    "number": 16
  }, {
    "symbol": "P",
    "number": 3
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Dpm",
  "name": "5′-(3′-dephosphomalonyl-CoA) diradical 4255N",
  "mf": "C24H35N7O18P3S",
  "kind": "Nucleotide",
  "oneLetter": "♥",
  "ocl": {
    "value": "efq~DjDCHlemnSTLBAEKBjfckgbV]XrzpEfCpB|IoCtHZy{lbdvbbfrbTRdRNRdnTbefRTrRTrdbbVPrtuUUUTBtDSUUTuSUSSTDTQb\\JR@@",
    "coordinates": "!BIlB_Ib[@pAe`zni`FALSF@A~FBq~OrpXbGveX@A~_c~OTa`lzf@_ha}_]_Q`MF@bOpXKA`loXbH__rHb@JHoX`B@m]}uwx@bGu~Ox`BbKvH@ha}_c~H@hb}b@JH_Xc|_`BH_X`B_`BHoP"
  },
  "mass": 834.5578724328346,
  "monoisotopicMass": 834.0972144809799,
  "unsaturation": 23,
  "elements": [{
    "symbol": "C",
    "number": 24
  }, {
    "symbol": "H",
    "number": 35
  }, {
    "symbol": "N",
    "number": 7
  }, {
    "symbol": "O",
    "number": 18
  }, {
    "symbol": "P",
    "number": 3
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Dsc",
  "name": "5′-(3′-dephosphosuccinyl-CoA) radical 4355N",
  "mf": "C25H37N7O18P3S",
  "kind": "Nucleotide",
  "oneLetter": "♦",
  "ocl": {
    "value": "eny~DjDCHlemnSTLBAEKBjfckgbV]XzvpOFCpB|IoCtHZy{lbdvbbfrbTRdRNRdnTbefRTrRTrTdTRrFVfjjjj`V`bZjjfjZjZfhHhcDxTd@@",
    "coordinates": "!B[~kjXFjiV[Ry|fcm}MtGwWctvH_]Q_c}KaGwWbGvN`H}MgrX@_gx@h`gKB\\lbGvOSX}M@m^H@gwWbGvH@ha}_Xc|bGxb@I~@Ha}b@JH_X`B_`BH_X`BbGvH@ha}_c~H@ha}b@I~@Ha}"
  },
  "mass": 848.5844898376815,
  "monoisotopicMass": 848.11286454544,
  "unsaturation": 23,
  "elements": [{
    "symbol": "C",
    "number": 25
  }, {
    "symbol": "H",
    "number": 37
  }, {
    "symbol": "N",
    "number": 7
  }, {
    "symbol": "O",
    "number": 18
  }, {
    "symbol": "P",
    "number": 3
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Dpc",
  "name": "5′-(3′-dephospho-CoA) radical 455N",
  "mf": "C21H32N7O13P2S",
  "kind": "Nucleotide",
  "oneLetter": "♠",
  "ocl": {
    "value": "ek_^KBDIG@nabYXJNEHdliemh\\QPEfspZ|CPcKmnrIQQSYQJIRIGIRWJQRsIJYIccpJkjjjjjAZBIjjjZijjBDIaBDq@@",
    "coordinates": "!B[zW[UI|YchAMc{vHcuJH@m~NbGuKvwvHb@JNwx}Rgqe}bHa}@h`gDr\\Sb@JOTh}R@m]~@@A~b@I~@H`B_X`_hb}_`CW@h`B_`BH@gx@upJH@gx@b@I~@@"
  },
  "mass": 684.5310558604504,
  "monoisotopicMass": 684.1254042880199,
  "unsaturation": 19,
  "elements": [{
    "symbol": "C",
    "number": 21
  }, {
    "symbol": "H",
    "number": 32
  }, {
    "symbol": "N",
    "number": 7
  }, {
    "symbol": "O",
    "number": 13
  }, {
    "symbol": "P",
    "number": 2
  }, {
    "symbol": "S",
    "number": 1
  }]
}, {
  "symbol": "Dpe",
  "name": "5′-diphosphate end 552N",
  "mf": "O3P",
  "kind": "Nucleotide",
  "oneLetter": "ϒ",
  "ocl": {
    "value": "gJQdebGF^Dx|duK@@",
    "coordinates": "!BbOq~@GxbGt"
  },
  "mass": 78.97197677137483,
  "monoisotopicMass": 78.95850585713,
  "unsaturation": 1,
  "elements": [{
    "symbol": "O",
    "number": 3
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Mgc",
  "name": "7-methylguanosine cap (cap 0) diradical 79553N",
  "mf": "C11H16N5O11P2",
  "kind": "Nucleotide",
  "oneLetter": "©",
  "ocl": {
    "value": "eohZMBHIG@aihJNEHdlemck`OFspz|GgDJ\\bTTTvTRbTbRvbtcXx|BjFjjjjiVfjejjHPfDHSD@@",
    "coordinates": "!BvuPfpDnDtEK_tPJHtXBH_TwPb@J_I`JHbGtgD}F@RxPBux`B_]^OTh}RIlBH_]F@IqOQ`@A~_c|BbHa}"
  },
  "mass": 456.2196411505502,
  "monoisotopicMass": 456.03215534994,
  "unsaturation": 13,
  "elements": [{
    "symbol": "C",
    "number": 11
  }, {
    "symbol": "H",
    "number": 16
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 11
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Gyy",
  "name": "guanylylated 5′ end (cap G) diradical 9553N",
  "mf": "C10H13N5O10P2",
  "kind": "Nucleotide",
  "oneLetter": "ϑ",
  "ocl": {
    "value": "fkhh`INCt\\J\\UENY{NCqmxM|EnNQJJJ[JIQJQHzIRLyxM^uUUUTkSULuQDSDHfP@",
    "coordinates": "!BvuPfpDnDtEK_tPJHtXBH_TwPb@J_I`JHbGtgD}F@RxPBux`B_]^OTh}R_`CQ`B\\StXA~@C}~@Gx"
  },
  "mass": 425.1856780673293,
  "monoisotopicMass": 425.01376563368,
  "unsaturation": 14,
  "elements": [{
    "symbol": "C",
    "number": 10
  }, {
    "symbol": "H",
    "number": 13
  }, {
    "symbol": "N",
    "number": 5
  }, {
    "symbol": "O",
    "number": 10
  }, {
    "symbol": "P",
    "number": 2
  }]
}, {
  "symbol": "Furp",
  "name": "furan phosphate radical",
  "mf": "C5H6O4P",
  "kind": "RNAp",
  "oneLetter": "⬠",
  "ocl": {
    "value": "dmtBPDpnAYcpRZ}eeYjii@@",
    "coordinates": "!BNvw|Vso|kUl{[So|PPAGuU\\z`pP"
  },
  "mass": 161.072705703704,
  "monoisotopicMass": 161.00037067008,
  "unsaturation": 5,
  "elements": [{
    "symbol": "C",
    "number": 5
  }, {
    "symbol": "H",
    "number": 6
  }, {
    "symbol": "O",
    "number": 4
  }, {
    "symbol": "P",
    "number": 1
  }]
}, {
  "symbol": "Phg",
  "ocl": {
    "value": "dcNHPBPOEgEInVuWYj`@@@"
  },
  "name": "Phenyl glycine diradical",
  "mf": "C8H7NO",
  "kind": "aa",
  "mass": 133.1475805880365,
  "monoisotopicMass": 133.05276384961002,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 8
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 1
  }]
}, {
  "symbol": "Hpg",
  "ocl": {
    "value": "dknDPBPp|V\\Tfy[WWYj`@`@@",
    "coordinates": "!BbOq~@Ha}bOq~Oxa}bGwW_Wx?_c?W_Wx?"
  },
  "name": "4-hydroxyphenylglycine diradical",
  "mf": "C8H7NO2",
  "kind": "aa",
  "mass": 149.14698551235477,
  "monoisotopicMass": 149.04767846918,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 8
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 2
  }]
}, {
  "symbol": "Dpg",
  "ocl": {
    "value": "dg^LPBS[CqYqR[emYTyj`BH@@",
    "coordinates": "!BbOr~@Hb}bOr~Wxb}bKvWo[y_oe}HoY^}Uwt"
  },
  "name": "3,5-dihydroxyphenylglycine diradical",
  "mf": "C8H7NO3",
  "kind": "aa",
  "mass": 165.14639043667304,
  "monoisotopicMass": 165.04259308875,
  "unsaturation": 10,
  "elements": [{
    "symbol": "C",
    "number": 8
  }, {
    "symbol": "H",
    "number": 7
  }, {
    "symbol": "N",
    "number": 1
  }, {
    "symbol": "O",
    "number": 3
  }]
}, {
  "symbol": "T",
  "name": "Tritium",
  "mf": "[3H]",
  "ocl": {
    "value": "eFAAYhBLCEX@",
    "coordinates": "!B@@L"
  },
  "mass": 3.0160492779,
  "monoisotopicMass": 3.0160492779,
  "unsaturation": -1,
  "elements": [{
    "symbol": "H",
    "number": 1,
    "isotope": 3
  }]
}];

var groupsObject = {};

(function (exports) {

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.groupsObject = void 0;
  const groups_1 = groups;
  exports.groupsObject = {};
  groups_1.groups.forEach(e => {
    if (exports.groupsObject[e.symbol]) {
      // eslint-disable-next-line no-console
      console.log(`The symbol ${e.symbol} is used more than once`);
    }
    exports.groupsObject[e.symbol] = e;
  });
})(groupsObject);

var groupsToSequence$1 = {};

Object.defineProperty(groupsToSequence$1, "__esModule", {
  value: true
});
groupsToSequence$1.groupsToSequence = groupsToSequence;
const groupsObject_js_1 = groupsObject;
/**
 * Recreate a one letter sequence
 * @param {object} mf
 */
function groupsToSequence(mf) {
  mf = mf.replaceAll(/\([^(]*\)/g, '');
  let parts = mf.split(/(?=[ A-Z])/);
  let usefulParts = [];
  for (let part of parts) {
    if (part === ' ') {
      usefulParts.push(' ');
      continue;
    }
    if (!part.match(/^[A-Z][a-z]{2,6}/)) continue;
    if (groupsObject_js_1.groupsObject[part] && groupsObject_js_1.groupsObject[part].oneLetter) {
      usefulParts.push(groupsObject_js_1.groupsObject[part].oneLetter);
    } else {
      usefulParts.push('?');
    }
  }
  return usefulParts.join('').replaceAll(/ +/g, ' ').trim();
}

(function (exports) {

  var __createBinding = src$f && src$f.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$f && src$f.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(groups, exports);
  __exportStar(groupsObject, exports);
  __exportStar(groupsToSequence$1, exports);
})(src$f);

var Kind = {};

/**
 * Define static variable corresponding to the various Kinds of a molecular formula part.
 */
Object.defineProperty(Kind, "__esModule", {
  value: true
});
Kind.Kind = void 0;
Kind.Kind = {
  BEGIN: 'begin',
  ATOM: 'atom',
  MULTIPLIER_RANGE: 'multiplierRange',
  ISOTOPE: 'isotope',
  ISOTOPE_RATIO: 'isotopeRatio',
  CHARGE: 'charge',
  SALT: 'salt',
  OPENING_PARENTHESIS: 'openingParenthesis',
  CLOSING_PARENTHESIS: 'closingParenthesis',
  PRE_MULTIPLIER: 'preMultiplier',
  MULTIPLIER: 'multiplier',
  TEXT: 'text',
  ANCHOR: 'anchor',
  COMMENT: 'comment'
};

var parseCharge$1 = {};

/**
 * Parse a string to extract the charge.
 * The charge may be in the form --, +++, +3, -2, 4+, 2-
 * @param {*} charge
 */
Object.defineProperty(parseCharge$1, "__esModule", {
  value: true
});
parseCharge$1.parseCharge = parseCharge;
function parseCharge(charge) {
  charge = charge.replaceAll(/[()]/g, '');
  let chargeNumber = 0;
  if (charge.match(/^[+-]+$/)) {
    for (let i = 0; i < charge.length; i++) {
      if (charge.charAt(i) === '+') chargeNumber++;else chargeNumber--;
    }
  } else if (charge.match(/^\d+[+-]$/)) {
    chargeNumber = Number(
    // eslint-disable-next-line unicorn/prefer-at
    charge.charAt(charge.length - 1) + charge.slice(0, -1));
  } else {
    chargeNumber = Number(charge);
  }
  return chargeNumber;
}

/* eslint-disable unicorn/prefer-code-point */
Object.defineProperty(parse$3, "__esModule", {
  value: true
});
parse$3.parse = parse$2;
const atom_sorter_1$3 = src$g;
const chemical_elements_1$f = src$j;
const chemical_groups_1$8 = src$f;
const Kind_1$9 = Kind;
const parseCharge_1 = parseCharge$1;
// module level: the parsing loop would otherwise allocate it for each token
const PREMULTIPLIER_KINDS = new Set([Kind_1$9.Kind.SALT, Kind_1$9.Kind.BEGIN, Kind_1$9.Kind.OPENING_PARENTHESIS]);
/**
 * Parse a mf to an array of kind / value
 * @param {String} mf
 * @param {Object} [options={}]
 * @param {Boolean} [options.expandGroups=false] - if true, expand groups
 * @param {Boolean} [options.simplify=false] - if true, remove all the parenthesis and join identical atoms / groups
 */
function parse$2(mf, options = {}) {
  return new MFParser().parse(mf, options);
}
class MFParser {
  parse(mf = '', options = {}) {
    this.expandGroups = options?.expandGroups ?? false;
    this.simplify = options?.simplify ?? false;
    this.mf = mf;
    this.i = 0;
    this.result = [];
    let lastKind = Kind_1$9.Kind.BEGIN;
    while (this.i < mf.length) {
      if (this.result.length > 0 && this.result.at(-1).kind !== Kind_1$9.Kind.TEXT) {
        lastKind = this.result.at(-1).kind;
      }
      let char = mf.charAt(this.i);
      let ascii = mf.charCodeAt(this.i);
      let nextAscii = 0;
      if (this.i + 1 < mf.length) nextAscii = mf.charCodeAt(this.i + 1);
      if (ascii > 47 && ascii < 58 || char === '-' && nextAscii > 47 && nextAscii < 58) {
        // a number
        let value = this.getNumber(ascii);
        if (PREMULTIPLIER_KINDS.has(lastKind)) {
          if (value.to) {
            throw new MFError(this.mf, this.i, 'Premultiplier may not contain a -');
          }
          this.result.push({
            kind: Kind_1$9.Kind.PRE_MULTIPLIER,
            value: value.from
          });
        } else if (lastKind === Kind_1$9.Kind.ANCHOR) {
          if (value.to) {
            throw new MFError(this.mf, this.i, 'Anchor ID may not contain -');
          }
          this.result.at(-1).value = value.from;
        } else if (value.to) {
          this.result.push({
            kind: Kind_1$9.Kind.MULTIPLIER_RANGE,
            value: {
              from: Math.min(value.from, value.to),
              to: Math.max(value.from, value.to)
            }
          });
        } else {
          this.result.push({
            kind: Kind_1$9.Kind.MULTIPLIER,
            value: value.from
          });
        }
        continue;
      } else if (char === '.') {
        // a point
        this.result.push({
          kind: Kind_1$9.Kind.SALT,
          value: char
        });
        // it is not in a number otherwise it would have been taken before
        // it must be in a salt
      } else if (char === '#') {
        // an anchor
        this.result.push({
          kind: Kind_1$9.Kind.ANCHOR,
          value: 0
        });
        // it is not in a number otherwise it would have been taken before
        // it must be in a salt
      } else if (ascii > 64 && ascii < 91) {
        // an uppercase = new atom
        this.result.push(...this.getAtom(ascii));
        continue;
      } else if (ascii > 96 && ascii < 123) {
        // a lowercase
        throw new MFError(this.mf, this.i, 'found a lowercase not following an uppercase');
      } else if (char === '(') {
        let charge = this.getParenthesisCharge(ascii);
        if (charge) {
          this.result.push({
            kind: Kind_1$9.Kind.CHARGE,
            value: charge
          });
        } else {
          this.result.push({
            kind: Kind_1$9.Kind.OPENING_PARENTHESIS,
            value: '('
          });
        }
      } else if (char === ')') {
        this.result.push({
          kind: Kind_1$9.Kind.CLOSING_PARENTHESIS,
          value: ')'
        });
      } else if (char === '[') {
        // defines an isotope
        let isotope = this.getIsotope(ascii);
        this.result.push({
          kind: Kind_1$9.Kind.ISOTOPE,
          value: isotope
        });
      } else if (char === ']') {
        throw new MFError(this.mf, this.i, 'should never meet an closing bracket not in isotopes');
      } else if (char === '{') {
        // can define an exotic isotopic ratio or mixtures of groups
        let isotopeRatio = this.getCurlyBracketIsotopeRatio(ascii);
        if (lastKind === Kind_1$9.Kind.ATOM) {
          let lastResult = this.result.at(-1);
          lastResult.kind = Kind_1$9.Kind.ISOTOPE_RATIO;
          lastResult.value = {
            atom: lastResult.value,
            ratio: isotopeRatio
          };
        } else {
          throw new MFError(this.mf, this.i, 'isotopic composition has to follow an atom');
        }
      } else if (char === '}') {
        throw new MFError(this.mf, this.i, 'found a unexpected closing curly bracket');
      } else if (char === '+') {
        // charge not in parenthesis
        let charge = this.getNonParenthesisCharge(ascii);
        this.result.push({
          kind: Kind_1$9.Kind.CHARGE,
          value: charge
        });
      } else if (char === '-') {
        // charge not in parenthesis
        let charge = this.getNonParenthesisCharge(ascii);
        this.result.push({
          kind: Kind_1$9.Kind.CHARGE,
          value: charge
        });
      } else if (char === '$') {
        // it is a comment after
        this.result.push({
          kind: Kind_1$9.Kind.COMMENT,
          value: this.mf.slice(this.i + 1)
        });
        break;
      } else {
        this.result.push({
          kind: Kind_1$9.Kind.TEXT,
          value: char
        });
      }
      this.i++;
    }
    this.checkParenthesis();
    if (this.simplify) {
      this.result = simplify(this.result);
    }
    return this.result;
  }
  checkParenthesis() {
    let counter = 0;
    for (let line of this.result) {
      if (line.kind === Kind_1$9.Kind.OPENING_PARENTHESIS) counter++;
      if (line.kind === Kind_1$9.Kind.CLOSING_PARENTHESIS) counter--;
    }
    if (counter !== 0) {
      throw new MFError(this.mf, this.i, 'number of opening and closing parenthesis not equal');
    }
  }
  getNumber(ascii) {
    let number = '';
    let previous;
    do {
      previous = ascii;
      number += String.fromCharCode(ascii);
      this.i++;
      ascii = this.mf.charCodeAt(this.i);
    } while (ascii > 47 && ascii < 58 || ascii === 46 || ascii === 45 || ascii === 47); // number . - /
    // we need to deal with the case there is a from / to
    if (previous === 46) this.i--;
    let indexOfDash = number.indexOf('-', 1);
    if (indexOfDash > -1) {
      return {
        from: parseNumberWithDivision(number.slice(0, indexOfDash)),
        to: parseNumberWithDivision(number.slice(indexOfDash + 1))
      };
    }
    return {
      from: parseNumberWithDivision(number)
    };
  }
  getAtom(ascii) {
    let atom = '';
    do {
      atom += String.fromCharCode(ascii);
      this.i++;
      ascii = this.mf.charCodeAt(this.i);
    } while (ascii > 96 && ascii < 123);
    if (chemical_elements_1$f.elementsObject[atom] || !this.expandGroups) {
      return [{
        kind: Kind_1$9.Kind.ATOM,
        value: atom
      }];
    }
    if (chemical_groups_1$8.groupsObject[atom]) {
      const group = chemical_groups_1$8.groupsObject[atom].mf;
      const expandedGroups = parse$2(group, {
        expandGroups: this.expandGroups
      });
      // need to surround with parenthesis
      return [{
        kind: Kind_1$9.Kind.OPENING_PARENTHESIS,
        value: '('
      }, ...expandedGroups, {
        kind: Kind_1$9.Kind.CLOSING_PARENTHESIS,
        value: ')'
      }];
    }
    throw new MFError(`Not able to expand group: ${this.mf}`);
  }
  getIsotope(ascii) {
    // [13C]
    let substring = '';
    do {
      substring += String.fromCharCode(ascii);
      this.i++;
      ascii = this.mf.charCodeAt(this.i);
    } while (ascii !== 93 && this.i <= this.mf.length);
    let atom = substring.replaceAll(/[^A-Za-z]/g, '');
    let isotope = Number(substring.replaceAll(/\D/g, ''));
    return {
      atom,
      isotope
    };
  }
  getCurlyBracketIsotopeRatio(ascii) {
    let substring = '';
    let first = true;
    do {
      if (!first) {
        substring += String.fromCharCode(ascii);
      } else {
        first = false;
      }
      this.i++;
      ascii = this.mf.charCodeAt(this.i);
    } while (ascii !== 125 && this.i <= this.mf.length); // closing curly bracket
    if (substring.match(/^[0-9.,]+$/)) {
      return substring.split(',').map(Number);
    }
    throw new MFError(this.mf, this.i, 'Curly brackets should contain only number, dot and comma');
  }
  getParenthesisCharge(ascii) {
    let substring = '';
    let begin = this.i;
    do {
      substring += String.fromCharCode(ascii);
      this.i++;
      ascii = this.mf.charCodeAt(this.i);
    } while (ascii !== 41 && this.i <= this.mf.length); // closing parenthesis
    if (substring.match(/^\([\d+-]+$/)) {
      return (0, parseCharge_1.parseCharge)(substring.slice(1));
    } else {
      this.i = begin;
      return undefined;
    }
  }
  getNonParenthesisCharge(ascii) {
    let substring = '';
    do {
      substring += String.fromCharCode(ascii);
      this.i++;
      ascii = this.mf.charCodeAt(this.i);
    } while (ascii === 43 || ascii === 45 || ascii > 47 && ascii < 58);
    this.i--;
    return (0, parseCharge_1.parseCharge)(substring);
  }
}
class MFError extends SyntaxError {
  constructor(mf, i, message) {
    let text = `${message}\n\n${mf}\n${' '.repeat(i)}^`;
    super(text);
  }
}
function parseNumberWithDivision(string) {
  if (string.includes('/')) {
    let parts = string.split('/');
    if (parts.length !== 2) {
      throw new TypeError('Can not parse MF with number like: ', string);
    }
    return Number(parts[0]) / Number(parts[1]);
  } else {
    return Number(string);
  }
}
/**
 * Remove all the parenthesis and multipliers
 * Merge atoms and groups if present many times
 * We will also sort the atoms and groups
 * @param {*} parsed
 * @returns
 */
function simplify(parsed) {
  if (!parsed || parsed.length === 0) return [];
  const multipliers = [];
  let currentMultiplier = {
    from: 1,
    to: 1
  };
  let newParsed = [];
  for (let i = parsed.length - 1; i >= 0; i--) {
    const item = parsed[i];
    switch (item.kind) {
      case 'atom':
      case 'isotope':
        {
          let realMultiplier = currentMultiplier;
          for (const multiplier of multipliers) {
            realMultiplier = {
              from: multiplier.from * realMultiplier.from,
              to: multiplier.to * realMultiplier.to
            };
          }
          newParsed.push({
            kind: item.kind,
            value: item.value
          }, {
            kind: 'multiplierRange',
            value: realMultiplier
          });
          currentMultiplier = {
            from: 1,
            to: 1
          };
          break;
        }
      case 'multiplier':
        currentMultiplier = {
          from: item.value,
          to: item.value
        };
        break;
      case 'multiplierRange':
        currentMultiplier = item.value;
        break;
      case 'openingParenthesis':
        multipliers.pop();
        break;
      case 'closingParenthesis':
        multipliers.push(currentMultiplier);
        currentMultiplier = {
          from: 1,
          to: 1
        };
        break;
      case 'text':
        break;
      default:
        throw new Error(`Unexpected kind --${item.kind}-- in removeParenthesis`);
    }
  }
  // if we have many times the same atom / group, we can merge them
  const distinctParsedObject = {};
  for (let i = 0; i < newParsed.length; i = i + 2) {
    const item = newParsed[i];
    const multiplier = newParsed[i + 1];
    const key = JSON.stringify(item.value);
    if (!distinctParsedObject[key]) {
      distinctParsedObject[key] = {
        ...item,
        multiplier: multiplier.value
      };
    } else {
      distinctParsedObject[key].multiplier.from += multiplier.value.from;
      distinctParsedObject[key].multiplier.to += multiplier.value.to;
    }
  }
  const sorted = Object.values(distinctParsedObject).toSorted((a, b) => {
    const atomA = a.kind === 'atom' ? a.value : a.value.atom;
    const atomB = b.kind === 'atom' ? b.value : b.value.atom;
    if (atomA === atomB) {
      if (a.kind === 'isotope' && b.kind === 'isotope') {
        return a.value.isotope - b.value.isotope;
      }
      if (a.kind === 'isotope' && b.kind !== 'isotope') {
        return -1; // isotope comes before non-isotope
      }
      if (a.kind !== 'isotope' && b.kind === 'isotope') {
        return 1; // non-isotope comes after isotope
      }
      return 0;
    }
    return (0, atom_sorter_1$3.atomSorter)(atomA, atomB);
  });
  const distinctParsed = [];
  for (const item of sorted) {
    if (item.multiplier.from === 0 && item.multiplier.to === 0) {
      continue;
    }
    distinctParsed.push({
      kind: item.kind,
      value: item.value
    });
    if (item.multiplier.from === 1 && item.multiplier.to === 1) {
      continue; // no need to add a multiplier
    }
    if (item.multiplier.from === item.multiplier.to) {
      distinctParsed.push({
        kind: 'multiplier',
        value: item.multiplier.from
      });
    } else {
      distinctParsed.push({
        kind: 'multiplierRange',
        value: {
          from: item.multiplier.from,
          to: item.multiplier.to
        }
      });
    }
  }
  return distinctParsed;
}

var subSuperscript = {};

Object.defineProperty(subSuperscript, "__esModule", {
  value: true
});
subSuperscript.subscript = subSuperscript.superscript = void 0;
subSuperscript.superscript = {
  0: '⁰',
  1: '¹',
  2: '²',
  3: '³',
  4: '⁴',
  5: '⁵',
  6: '⁶',
  7: '⁷',
  8: '⁸',
  9: '⁹',
  '+': '⁺',
  '-': '⁻',
  '(': '⁽',
  ')': '⁾',
  '{': '⁽',
  '}': '⁾',
  '.': '˙',
  ',': '˒'
};
subSuperscript.subscript = {
  0: '₀',
  1: '₁',
  2: '₂',
  3: '₃',
  4: '₄',
  5: '₅',
  6: '₆',
  7: '₇',
  8: '₈',
  9: '₉',
  '(': '₍',
  ')': '₎',
  '{': '₍',
  '}': '₎',
  '.': ' ',
  ',': ' '
};

var toDisplay$1 = {};

var Format = {};

/**
 * Defines static variables corresponding to the various formatting possibilities
 */
Object.defineProperty(Format, "__esModule", {
  value: true
});
Format.Format = void 0;
Format.Format = {
  SUBSCRIPT: 'subscript',
  SUPERSCRIPT: 'superscript',
  SUPERIMPOSE: 'superimpose',
  TEXT: 'text'
};

var formatCharge$1 = {};

Object.defineProperty(formatCharge$1, "__esModule", {
  value: true
});
formatCharge$1.formatCharge = formatCharge;
function formatCharge(charge) {
  if (charge === 1) return '+';
  if (charge > 1) return `+${charge}`;
  if (charge < 0) return String(charge);
  return '';
}

var improveLinesForDisplay$1 = {};

Object.defineProperty(improveLinesForDisplay$1, "__esModule", {
  value: true
});
improveLinesForDisplay$1.improveLinesForDisplay = improveLinesForDisplay;
const Kind_js_1$1 = Kind;
/**
 * We try to remove useless lines that are not needed for the display and could be confusing
 * for the user
 * @param {object[]} lines
 */
function improveLinesForDisplay(lines) {
  lines = lines.slice(0);
  // multipliers by one seems completely useless
  lines = lines.filter(line => !(line.kind === Kind_js_1$1.Kind.MULTIPLIER && line.value === 1));
  // global surrouding useless parenthesis
  // (C) -> C, (CH2) -> CH2, ((CH2)) -> CH2, ((CH2)2) -> (CH2)2, (C(CH2)2) -> C(CH2)2
  // need to count the number of opening parenthesis
  // and check the minimum number of parenthesis we find
  let beginCounter = 0;
  let endCounter = 0;
  let minCounter = Number.MAX_SAFE_INTEGER;
  let counter = 0;
  let begin = true;
  for (let line of lines) {
    switch (line.kind) {
      case Kind_js_1$1.Kind.OPENING_PARENTHESIS:
        if (begin) {
          beginCounter++;
        }
        counter++;
        break;
      case Kind_js_1$1.Kind.CLOSING_PARENTHESIS:
        endCounter++;
        counter--;
        break;
      case Kind_js_1$1.Kind.CHARGE:
        // seems to me we can still remove parenthesis even if we have some charges
        break;
      default:
        if (counter < minCounter) minCounter = counter;
        endCounter = 0;
        begin = false;
    }
  }
  let nbParenthesisToSuppress = Math.min(minCounter, beginCounter, endCounter);
  if (nbParenthesisToSuppress > 0) {
    // need to remove from the beginning and from the end the number of parenthesis
    // knowing some of the lines could be charges
    let toSuppress = nbParenthesisToSuppress;
    let i = 0;
    while (toSuppress > 0) {
      if (lines[0].kind === Kind_js_1$1.Kind.OPENING_PARENTHESIS) {
        lines.splice(i, 1);
        toSuppress--;
      } else {
        i++;
      }
    }
    toSuppress = nbParenthesisToSuppress;
    i = lines.length - 1;
    while (toSuppress > 0) {
      if (lines[i].kind === Kind_js_1$1.Kind.CLOSING_PARENTHESIS) {
        toSuppress--;
        lines.splice(i, 1);
      }
      i--;
    }
  }
  return lines;
}

Object.defineProperty(toDisplay$1, "__esModule", {
  value: true
});
toDisplay$1.toDisplay = toDisplay;
const Format_1$2 = Format;
const Kind_1$8 = Kind;
const formatCharge_js_1 = formatCharge$1;
const improveLinesForDisplay_js_1 = improveLinesForDisplay$1;
/**
 * Converts an array of mf elements to an array of formatting information
 * @param {object[]} lines of the parse method
 * @returns {{kind: string, value: string}[]}
 */
function toDisplay(lines) {
  lines = (0, improveLinesForDisplay_js_1.improveLinesForDisplay)(lines);
  const special = specialCases(lines);
  if (special) return special;
  let results = [];
  let result = {};
  for (let line of lines) {
    switch (line.kind) {
      case Kind_1$8.Kind.MULTIPLIER:
        if (line.value !== 1) {
          result = {
            kind: Format_1$2.Format.SUBSCRIPT,
            value: String(line.value)
          };
          results.push(result);
        }
        break;
      case Kind_1$8.Kind.MULTIPLIER_RANGE:
        result = {
          kind: Format_1$2.Format.SUBSCRIPT,
          value: `${String(line.value.from)}-${line.value.to}`
        };
        results.push(result);
        break;
      case Kind_1$8.Kind.CHARGE:
        if (result.kind === Format_1$2.Format.SUBSCRIPT) {
          result.kind = Format_1$2.Format.SUPERIMPOSE;
          result.over = (0, formatCharge_js_1.formatCharge)(line.value);
          result.under = result.value;
          result.value = undefined;
        } else {
          result = {
            kind: Format_1$2.Format.SUPERSCRIPT,
            value: (0, formatCharge_js_1.formatCharge)(line.value)
          };
          results.push(result);
        }
        break;
      case Kind_1$8.Kind.ISOTOPE:
        result = {
          kind: Format_1$2.Format.SUPERSCRIPT,
          value: line.value.isotope
        };
        results.push(result);
        result = {
          kind: Format_1$2.Format.TEXT,
          value: line.value.atom
        };
        results.push(result);
        break;
      case Kind_1$8.Kind.ISOTOPE_RATIO:
        if (result.kind === Format_1$2.Format.TEXT) {
          result.value += line.value.atom;
        } else {
          result = {
            kind: Format_1$2.Format.TEXT,
            value: line.value.atom
          };
          results.push(result);
        }
        result = {
          kind: Format_1$2.Format.SUPERSCRIPT,
          value: `{${line.value.ratio.join(',')}}`
        };
        results.push(result);
        break;
      case Kind_1$8.Kind.SALT:
        if (result.kind === Format_1$2.Format.TEXT) {
          result.value += ' • ';
        } else {
          result = {
            kind: Format_1$2.Format.TEXT,
            value: ' • '
          };
          results.push(result);
        }
        break;
      default:
        if (result.kind === Format_1$2.Format.TEXT) {
          result.value += line.value;
        } else {
          result = {
            kind: Format_1$2.Format.TEXT,
            value: line.value
          };
          results.push(result);
        }
    }
  }
  return results;
}
/**
 * Some special changes for specific cases
 * @param {} lines
 */
function specialCases(lines) {
  // (-)
  if (lines.length === 1 && lines[0].kind === Kind_1$8.Kind.CHARGE) {
    const charge = lines[0].value;
    if (charge === 0) return [];
    if (charge === 1) {
      return [{
        kind: Format_1$2.Format.TEXT,
        value: '-e'
      }, {
        kind: Format_1$2.Format.SUPERSCRIPT,
        value: '-'
      }];
    }
    if (charge === -1) {
      return [{
        kind: Format_1$2.Format.TEXT,
        value: '+e'
      }, {
        kind: Format_1$2.Format.SUPERSCRIPT,
        value: '-'
      }];
    }
    if (charge > 1) {
      return [{
        kind: Format_1$2.Format.TEXT,
        value: `-${charge}e`
      }, {
        kind: Format_1$2.Format.SUPERSCRIPT,
        value: '-'
      }];
    }
    if (charge < -1) {
      return [{
        kind: Format_1$2.Format.TEXT,
        value: `+${-charge}e`
      }, {
        kind: Format_1$2.Format.SUPERSCRIPT,
        value: '-'
      }];
    }
  }
  // (-)2, (-)-1, (+)2, (+)-1, (2+)2, (2+)-1, (2-)+1, (2-)-1
  if (lines.length === 2 && lines[0].kind === Kind_1$8.Kind.CHARGE && lines[1].kind === Kind_1$8.Kind.MULTIPLIER) {
    const charge = lines[0].value;
    const nbElectrons = -lines[1].value * charge;
    const results = [];
    if (nbElectrons === 0) return [];
    if (nbElectrons === 1) {
      results.push({
        kind: Format_1$2.Format.TEXT,
        value: '+e'
      });
    }
    if (nbElectrons === -1) {
      results.push({
        kind: Format_1$2.Format.TEXT,
        value: '-e'
      });
    }
    if (nbElectrons > 1) {
      results.push({
        kind: Format_1$2.Format.TEXT,
        value: `+${nbElectrons}e`
      });
    }
    if (nbElectrons < -1) {
      results.push({
        kind: Format_1$2.Format.TEXT,
        value: `${nbElectrons}e`
      });
    }
    results.push({
      kind: Format_1$2.Format.SUPERSCRIPT,
      value: '-'
    });
    return results;
  }
  return undefined;
}

var isMF$1 = {};

Object.defineProperty(isMF$1, "__esModule", {
  value: true
});
isMF$1.isMF = isMF;
const chemical_elements_1$e = src$j;
const chemical_groups_1$7 = src$f;
function isMF(mf) {
  let tmpMF = mf.replaceAll(/[^A-Za-z]/g, '');
  let parts = tmpMF.replaceAll(/([A-Za-z])(?=[A-Z])/g, '$1 ').split(' ');
  for (let i = 0; i < parts.length; i++) {
    if (!chemical_elements_1$e.elementsObject[parts[i]] && !chemical_groups_1$7.groupsObject[parts[i]]) {
      return false;
    }
  }
  return true;
}

var toHtml$1 = {};

var Style$1 = {};

Object.defineProperty(Style$1, "__esModule", {
  value: true
});
Style$1.Style = void 0;
Style$1.Style = {
  SUPERIMPOSE: 'flex-direction: column;display: inline-flex;justify-content: center;text-align: left;vertical-align: middle;',
  SUPERIMPOSE_SUP_SUB: 'line-height: 1; font-size: 70%'
};

Object.defineProperty(toHtml$1, "__esModule", {
  value: true
});
toHtml$1.toHtml = toHtml;
const Format_1$1 = Format;
const Style_1 = Style$1;
function toHtml(lines) {
  let html = [];
  for (let line of lines) {
    switch (line.kind) {
      case Format_1$1.Format.SUBSCRIPT:
        html.push(`<sub>${line.value}</sub>`);
        break;
      case Format_1$1.Format.SUPERSCRIPT:
        html.push(`<sup>${line.value}</sup>`);
        break;
      case Format_1$1.Format.SUPERIMPOSE:
        html.push(`<span style="${Style_1.Style.SUPERIMPOSE}">`, `<sup style="${Style_1.Style.SUPERIMPOSE_SUP_SUB}">${line.over}</sup>`, `<sub style="${Style_1.Style.SUPERIMPOSE_SUP_SUB}">${line.under}</sub>`, '</span>');
        break;
      default:
        html.push(line.value);
    }
  }
  return html.join('');
}

var ensureCase$1 = {};

Object.defineProperty(ensureCase$1, "__esModule", {
  value: true
});
ensureCase$1.ensureCase = ensureCase;
const chemical_elements_1$d = src$j;
const elements$1 = new Set(Object.keys(chemical_elements_1$d.elementsObject).toSorted((a, b) => b.length - a.length));
/**
 * Ensure that the mf has been entered with capital letters and not only lowercase
 * If there is only lowercase we try to capitalize the mf
 * @param {string} mf
 */
function ensureCase(mf) {
  for (let i = 0; i < mf.length; i++) {
    // eslint-disable-next-line unicorn/prefer-code-point
    if (mf.charCodeAt(i) > 64 && mf.charCodeAt(i) < 91) {
      return mf;
    }
  }
  let parts = mf.replaceAll(/([a-z]*)([^a-z]*)/g, '$1 $2 ').split(/ +/);
  for (let i = 0; i < parts.length; i++) {
    if (parts[i].match(/^[a-z]$/)) {
      parts[i] = parts[i].toUpperCase();
    } else if (parts[i].match(/^[a-z]+$/)) {
      let newPart = '';
      for (let j = 0; j < parts[i].length; j++) {
        let two = parts[i].slice(j, j + 2);
        let one = parts[i].charAt(j).toUpperCase();
        if (['c', 'h', 'o', 'n'].includes(two.charAt(0)) && ['h', 'o', 'n'].includes(two.charAt(1))) {
          newPart += two.toUpperCase();
          j++;
        } else {
          two = two.charAt(0).toUpperCase() + two.charAt(1);
          if (elements$1.has(two)) {
            newPart += two;
            j++;
          } else if (elements$1.has(one)) {
            newPart += one;
          } else {
            return mf;
          }
        }
      }
      parts[i] = newPart;
    }
  }
  return parts.join('');
}

var MF$1 = {};

var MFInternal$1 = {};

var flatten$1 = {};

Object.defineProperty(flatten$1, "__esModule", {
  value: true
});
flatten$1.flatten = flatten;
/**
 * This method will generate all possible molecular formulas
 * from ranges.
 * It should rather be called expand because it expands all the ranges
 * @param parsed
 * @param options
 * @return {string[]}
 */
function flatten(parsed, options = {}) {
  const {
    groupIdentical = false,
    limit = 100000
  } = options;
  if (parsed.length === 0) return [''];
  let parts = [];
  let parenthesisLevel = 0;
  let currentPart;
  let comments = [];
  for (const entry of parsed) {
    if ((entry.kind === 'atom' || entry.kind === 'charge' || entry.kind === 'isotope' || entry.kind === 'openingParenthesis' || !currentPart) && parenthesisLevel === 0) {
      currentPart = {
        mf: '',
        min: 1,
        max: 1
      };
      parts.push(currentPart);
    }
    switch (entry.kind) {
      case 'atom':
        currentPart.mf += entry.value;
        break;
      case 'isotope':
        currentPart.mf += `[${entry.value.isotope}${entry.value.atom}]`;
        break;
      case 'multiplier':
        currentPart.mf += entry.value;
        break;
      case 'multiplierRange':
        if (parenthesisLevel !== 0) {
          throw new Error('Range definition inside parenthesis is not allowed.');
        }
        currentPart.min = entry.value.from;
        currentPart.max = entry.value.to;
        break;
      case 'openingParenthesis':
        parenthesisLevel++;
        currentPart.mf += entry.value;
        break;
      case 'charge':
        if (entry.value === 1) {
          currentPart.mf += '+';
        } else if (entry.value > 1) {
          currentPart.mf += `(+${entry.value})`;
        } else if (entry.value < 0) {
          currentPart.mf += `(${entry.value})`;
        }
        break;
      case 'closingParenthesis':
        parenthesisLevel--;
        currentPart.mf += entry.value;
        break;
      case 'comment':
        comments.push(entry.value);
        break;
      case 'text':
        break;
      default:
        throw new Error(`Could not flatten the parsed MF. Unknown kind: ${entry.kind}`);
    }
  }
  if (groupIdentical) {
    parts = optimizeRanges(parts);
  }
  const mfs = createMFs(parts, comments.join(' '), limit);
  return mfs;
}
/**
 * If we have many times the same mf we can combine them
 * This should only be applied if there are acutaly some ranges
 */
function optimizeRanges(parts) {
  let newParts = [];
  let mfsObject = {};
  let hasRange = false;
  for (const mf of parts) {
    if (mf.min !== mf.max) {
      hasRange = true;
      break;
    }
  }
  if (!hasRange) return parts;
  for (const mf of parts) {
    if (!mfsObject[mf.mf]) {
      mfsObject[mf.mf] = {
        mf: mf.mf,
        min: mf.min,
        max: mf.max
      };
      newParts.push(mfsObject[mf.mf]);
    } else {
      mfsObject[mf.mf].min = mfsObject[mf.mf].min + mf.min;
      mfsObject[mf.mf].max = mfsObject[mf.mf].max + mf.max;
    }
  }
  return newParts;
}
function createMFs(parts, comment, limit) {
  const currents = new Array(parts.length);
  for (let i = 0; i < currents.length; i++) {
    currents[i] = parts[i].min;
  }
  /** @type {string[]} */
  const mfs = [];
  let position = 0;
  while (position < currents.length) {
    if (currents[position] < parts[position].max) {
      mfs.push(getMF$1(parts, currents, comment));
      currents[position]++;
      for (let i = 0; i < position; i++) {
        currents[i] = parts[i].min;
      }
      position = 0;
    } else {
      position++;
    }
    if (mfs.length >= limit) {
      throw new Error(`MF.flatten generates too many fragments (over ${limit})`);
    }
  }
  mfs.push(getMF$1(parts, currents, comment));
  return mfs;
}
function getMF$1(parts, currents, comment) {
  let mf = '';
  for (let i = 0; i < parts.length; i++) {
    if (currents[i] === 0) {
      continue;
    }
    mf += parts[i].mf;
    if (currents[i] !== 1) {
      mf += currents[i];
    }
  }
  if (comment) mf += `$${comment}`;
  return mf;
}

var getEA$1 = {};

var getIsotopeRatioInfo$1 = {};

Object.defineProperty(getIsotopeRatioInfo$1, "__esModule", {
  value: true
});
getIsotopeRatioInfo$1.getIsotopeRatioInfo = getIsotopeRatioInfo;
const chemical_elements_1$c = src$j;
function getIsotopeRatioInfo(value) {
  let result = {
    mass: 0,
    monoisotopicMass: 0
  };
  let element = chemical_elements_1$c.elementsAndStableIsotopesObject[value.atom];
  if (!element) throw new Error(`Element not found: ${value.atom}`);
  let isotopesArray = element.isotopes;
  let ratios = normalize$2(value.ratio);
  let max = Math.max(...ratios);
  if (ratios.length > isotopesArray.length) {
    throw new Error(`the number of specified ratios is bigger that the number of stable isotopes: ${value.atom}`);
  }
  for (let i = 0; i < ratios.length; i++) {
    result.mass += ratios[i] * isotopesArray[i].mass;
    if (max === ratios[i] && result.monoisotopicMass === 0) {
      result.monoisotopicMass = isotopesArray[i].mass;
    }
  }
  return result;
}
function normalize$2(array) {
  let sum = array.reduce((prev, current) => prev + current, 0);
  return array.map(a => a / sum);
}

Object.defineProperty(getEA$1, "__esModule", {
  value: true
});
getEA$1.getEA = getEA;
const chemical_elements_1$b = src$j;
const chemical_groups_1$6 = src$f;
const Kind_1$7 = Kind;
const getIsotopeRatioInfo_1$1 = getIsotopeRatioInfo$1;
/**
 * @param {*} parts
 */
function getEA(parts) {
  let results = {};
  for (let part of parts) {
    for (let line of part) {
      switch (line.kind) {
        case Kind_1$7.Kind.ISOTOPE:
          {
            let isotope = chemical_elements_1$b.isotopesObject[line.value.isotope + line.value.atom];
            if (!isotope) {
              throw new Error(`Unknown isotope: ${line.value.isotope}${line.value.atom}`);
            }
            addMass(results, line.value.atom, isotope.mass * line.multiplier);
            break;
          }
        case Kind_1$7.Kind.ISOTOPE_RATIO:
          {
            let isotopeRatioInfo = (0, getIsotopeRatioInfo_1$1.getIsotopeRatioInfo)(line.value);
            addMass(results, line.value.atom, isotopeRatioInfo.mass * line.multiplier);
            break;
          }
        case Kind_1$7.Kind.ATOM:
          {
            let element = chemical_elements_1$b.elementsObject[line.value];
            if (!element) {
              element = chemical_groups_1$6.groupsObject[line.value];
              if (!element) throw new Error(`Unknown element: ${line.value}`);
              // need to explode group ????
            }
            addMass(results, line.value, element.mass * line.multiplier);
            break;
          }
        case Kind_1$7.Kind.CHARGE:
          break;
        default:
          throw new Error('partToMF unhandled Kind: ', line.kind);
      }
    }
  }
  let eas = [];
  let sum = 0;
  for (let key in results) {
    sum += results[key];
    eas.push({
      element: key,
      mass: results[key]
    });
  }
  for (const ea of eas) {
    ea.ratio = ea.mass / sum;
  }
  return eas;
}
function addMass(results, atom, mass) {
  if (!results[atom]) results[atom] = 0;
  results[atom] += mass;
}

var getElements$1 = {};

Object.defineProperty(getElements$1, "__esModule", {
  value: true
});
getElements$1.getElements = getElements;
const chemical_elements_1$a = src$j;
const Kind_1$6 = Kind;
/**
 * @param {*} parts
 */
function getElements(parts) {
  const elements = [];
  for (const part of parts) {
    for (const line of part) {
      let number = line.multiplier;
      switch (line.kind) {
        case Kind_1$6.Kind.ATOM:
          {
            let symbol = line.value;
            let element = chemical_elements_1$a.elementsObject[symbol];
            if (!element) {
              throw new Error(`element unknown: ${symbol} - ${line}`);
            }
            addElement(elements, {
              symbol,
              number
            });
            break;
          }
        case Kind_1$6.Kind.ISOTOPE:
          {
            let element = chemical_elements_1$a.elementsAndIsotopesObject[line.value.atom];
            if (!element) {
              throw new Error(`element unknown: ${part.value.atom} - ${line}`);
            }
            let isotope = element.isotopes.find(a => a.nominal === line.value.isotope);
            if (!isotope) {
              throw new Error(`isotope unknown: ${line.value.isotope} - ${line}`);
            }
            addElement(elements, {
              symbol: line.value.atom,
              number,
              isotope: line.value.isotope
            });
            break;
          }
        default:
          throw new Error(`unknown type: ${line.kind}`);
      }
    }
  }
  return elements;
}
function addElement(elements, newElement) {
  for (let element of elements) {
    if (element.symbol === newElement.symbol && element.isotope === newElement.isotope) {
      element.number += newElement.number;
      return;
    }
  }
  elements.push(newElement);
}

var getInfo$1 = {};

var getInfoInternal$1 = {};

var getNumberOfIsotopologues$1 = {};

Object.defineProperty(getNumberOfIsotopologues$1, "__esModule", {
  value: true
});
getNumberOfIsotopologues$1.getNumberOfIsotopologues = getNumberOfIsotopologues;
const chemical_elements_1$9 = src$j;
/**
 * Returns the theoretical number of isotopologues for a given MF based on stable isotopes for each element.
 * This method will not take into account possible non natural isotopic composition (e.g. 13C enrichment)
 * If one element does not have any stable isotope, the result will be 0.
 * @param atoms
 * @returns
 */
function getNumberOfIsotopologues(atoms) {
  if (Object.keys(atoms).length === 0) {
    return 0;
  }
  let result = 1;
  for (const atom in atoms) {
    const nbIsotopes = chemical_elements_1$9.elementsAndStableIsotopesObject[atom]?.isotopes.length;
    if (!nbIsotopes) {
      return 0;
    }
    const nbAtoms = atoms[atom];
    result *= getNbCombinationsPerAtom(nbAtoms, nbIsotopes);
  }
  return result;
}
/**
 * Returns the number of isotopologues for one specific atom
 *
 * @param nbAtoms
 * @param nbIsotopes
 * @returns
 */
function getNbCombinationsPerAtom(nbAtoms, nbIsotopes) {
  let result = 1;
  for (let i = nbAtoms + 1; i < nbAtoms + nbIsotopes; i++) {
    result *= i;
  }
  for (let i = 2; i < nbIsotopes; i++) {
    result /= i;
  }
  return result;
}

var partToAtoms$1 = {};

Object.defineProperty(partToAtoms$1, "__esModule", {
  value: true
});
partToAtoms$1.partToAtoms = partToAtoms;
const Kind_js_1 = Kind;
/** @typedef {import('./partToAtoms.types').AtomsMap} AtomsMap */
/**
 * Convert a MF part to a map of atoms
 * This procedure will suppress the isotopes !
 * This is mainly used to make queries
 * @returns {AtomsMap}
 */
function partToAtoms(part) {
  /** @type {AtomsMap} */
  const atoms = {};
  for (let line of part) {
    switch (line.kind) {
      case Kind_js_1.Kind.ISOTOPE:
        if (!atoms[line.value.atom]) atoms[line.value.atom] = 0;
        atoms[line.value.atom] += line.multiplier;
        break;
      case Kind_js_1.Kind.ISOTOPE_RATIO:
        if (!atoms[line.value.atom]) atoms[line.value.atom] = 0;
        atoms[line.value.atom] += line.multiplier;
        break;
      case Kind_js_1.Kind.ATOM:
        if (!atoms[line.value]) atoms[line.value] = 0;
        atoms[line.value] += line.multiplier;
        break;
      case Kind_js_1.Kind.CHARGE:
        break;
      case Kind_js_1.Kind.ANCHOR:
        break;
      default:
        throw new Error('partToMF unhandled Kind: ', line.kind);
    }
  }
  return atoms;
}

var partToMF$1 = {};

Object.defineProperty(partToMF$1, "__esModule", {
  value: true
});
partToMF$1.partToMF = partToMF;
const Kind_1$5 = Kind;
function partToMF(part, options = {}) {
  let mf = [];
  for (let line of part) {
    switch (line.kind) {
      case Kind_1$5.Kind.ISOTOPE:
        if (line.multiplier !== 0) {
          mf.push(`[${line.value.isotope}${line.value.atom}]${line.multiplier !== 1 ? line.multiplier : ''}`);
        }
        break;
      case Kind_1$5.Kind.ISOTOPE_RATIO:
        if (line.multiplier !== 0) {
          mf.push(`${line.value.atom}{${line.value.ratio.join(',')}}${line.multiplier !== 1 ? line.multiplier : ''}`);
        }
        break;
      case Kind_1$5.Kind.ATOM:
        if (line.multiplier !== 0) {
          mf.push(line.value + (line.multiplier !== 1 ? line.multiplier : ''));
        }
        break;
      case Kind_1$5.Kind.CHARGE:
        if (line.value === 0 || options.neutral) break;
        mf.push(`(${line.value > 0 ? `+${line.value}` : line.value})`);
        break;
    }
  }
  return mf.join('');
}

Object.defineProperty(getInfoInternal$1, "__esModule", {
  value: true
});
getInfoInternal$1.getInfoInternal = getInfoInternal;
const chemical_elements_1$8 = src$j;
const chemical_groups_1$5 = src$f;
const Kind_1$4 = Kind;
const getIsotopeRatioInfo_1 = getIsotopeRatioInfo$1;
const getNumberOfIsotopologues_1 = getNumberOfIsotopologues$1;
const partToAtoms_1 = partToAtoms$1;
const partToMF_1$1 = partToMF$1;
/** @typedef {import('./getInfo.types').MFInfo} MFInfo */
/** @typedef {import('./getInfo.types').MFInfoWithParts} MFInfoWithParts */
/**
 *
 * @param {*} parts
 * @param {*} [options={}]
 * @returns {object|MFInfo|MFInfoWithParts}
 */
function getInfoInternal(parts, options = {}) {
  let {
    customUnsaturations = {},
    emFieldName = 'monoisotopicMass',
    msemFieldName = 'observedMonoisotopicMass'
  } = options;
  if (parts.length === 0) return {};
  if (parts.length === 1) {
    let oneResult = getProcessedPart$1(parts[0], {
      customUnsaturations,
      emFieldName,
      msemFieldName
    });
    oneResult.nbIsotopologues = (0, getNumberOfIsotopologues_1.getNumberOfIsotopologues)(oneResult.atoms);
    return oneResult;
  }
  let result = {
    parts: []
  };
  for (let part of parts) {
    result.parts.push(getProcessedPart$1(part, {
      customUnsaturations,
      emFieldName,
      msemFieldName
    }));
  }
  result[emFieldName] = 0;
  result.mass = 0;
  result.charge = 0;
  result.unsaturation = 0;
  result.atoms = {};
  result.mf = result.parts.map(a => a.mf).join('.');
  for (const part of result.parts) {
    result.mass += part.mass;
    result[emFieldName] += part[emFieldName];
    result.charge += part.charge;
    result.unsaturation += part.unsaturation;
    for (const atom in part.atoms) {
      if (!result.atoms[atom]) {
        result.atoms[atom] = 0;
      }
      result.atoms[atom] += part.atoms[atom];
    }
  }
  result.nbIsotopologues = (0, getNumberOfIsotopologues_1.getNumberOfIsotopologues)(result.atoms);
  return result;
}
function getProcessedPart$1(part, options) {
  let {
    customUnsaturations,
    emFieldName,
    msemFieldName
  } = options;
  /** @type {MFInfo} */
  let currentPart = {
    mass: 0,
    charge: 0,
    mf: '',
    atoms: (0, partToAtoms_1.partToAtoms)(part),
    [emFieldName]: 0
  };
  let unsaturation = 0;
  let validUnsaturation = true;
  currentPart.mf = (0, partToMF_1$1.partToMF)(part);
  for (let line of part) {
    let currentElement = '';
    switch (line.kind) {
      case Kind_1$4.Kind.ATOM:
        {
          currentElement = line.value;
          let element = chemical_elements_1$8.elementsAndIsotopesObject[line.value];
          // todo should we have a kind GROUP ?
          if (!element) {
            element = chemical_groups_1$5.groupsObject[line.value];
            if (!element) throw new Error(`Unknown element: ${line.value}`);
            if (!customUnsaturations[line.value]) {
              customUnsaturations[line.value] = element.unsaturation;
            }
          }
          if (!element) throw new Error(`Unknown element: ${line.value}`);
          currentPart[emFieldName] += element.monoisotopicMass * line.multiplier;
          currentPart.mass += element.mass * line.multiplier;
          break;
        }
      case Kind_1$4.Kind.ISOTOPE:
        {
          currentElement = line.value.atom;
          let isotope = chemical_elements_1$8.isotopesObject[line.value.isotope + line.value.atom];
          if (!isotope) {
            throw new Error(`Unknown isotope: ${line.value.isotope}${line.value.atom}`);
          }
          currentPart[emFieldName] += isotope.mass * line.multiplier;
          currentPart.mass += isotope.mass * line.multiplier;
          break;
        }
      case Kind_1$4.Kind.ISOTOPE_RATIO:
        {
          currentElement = line.value.atom;
          let isotopeRatioInfo = (0, getIsotopeRatioInfo_1.getIsotopeRatioInfo)(line.value);
          currentPart[emFieldName] += isotopeRatioInfo[emFieldName] * line.multiplier;
          currentPart.mass += isotopeRatioInfo.mass * line.multiplier;
          break;
        }
      case Kind_1$4.Kind.CHARGE:
        currentPart.charge = line.value;
        if (validUnsaturation) {
          unsaturation -= line.value;
        }
        break;
      default:
        throw new Error('Unimplemented Kind in getInfo', line.kind);
    }
    if (currentElement) {
      if (customUnsaturations[currentElement] !== undefined) {
        unsaturation += customUnsaturations[currentElement] * line.multiplier;
      } else if (chemical_elements_1$8.unsaturationsObject[currentElement] !== undefined) {
        unsaturation += chemical_elements_1$8.unsaturationsObject[currentElement] * line.multiplier;
      } else {
        validUnsaturation = false;
      }
    }
  }
  // need to calculate the observedMonoisotopicMass
  if (currentPart.charge) {
    currentPart[msemFieldName] = (currentPart[emFieldName] - currentPart.charge * chemical_elements_1$8.ELECTRON_MASS) / Math.abs(currentPart.charge);
  }
  if (validUnsaturation) {
    currentPart.unsaturation = unsaturation / 2 + 1;
  }
  return currentPart;
}

Object.defineProperty(getInfo$1, "__esModule", {
  value: true
});
getInfo$1.getInfo = getInfo;
const getInfoInternal_1 = getInfoInternal$1;
function getInfo(parts, options) {
  return (0, getInfoInternal_1.getInfoInternal)(parts, options);
}

var getIsotopesInfo$1 = {};

Object.defineProperty(getIsotopesInfo$1, "__esModule", {
  value: true
});
getIsotopesInfo$1.getIsotopesInfo = getIsotopesInfo;
const chemical_elements_1$7 = src$j;
const Kind_1$3 = Kind;
/** @typedef {import('./getIsotopesInfo.types').IsotopesInfo} IsotopesInfo

/**
 *
 * @param {*} parts
 * @returns {[]|IsotopesInfo}
 */
function getIsotopesInfo(parts) {
  if (parts.length === 0) return [];
  if (parts.length > 1) {
    throw new Error('getIsotopesInfo can not be applied on multipart MF');
  }
  return getProcessedPart(parts[0]);
}
/**
 * @returns {IsotopesInfo}
 */
function getProcessedPart(part) {
  /** @type {IsotopesInfo} */
  let result = {
    charge: 0,
    isotopes: []
  };
  for (let line of part) {
    switch (line.kind) {
      case Kind_1$3.Kind.ISOTOPE:
        {
          let isotopeKey = line.value.isotope + line.value.atom;
          let isotope = chemical_elements_1$7.isotopesObject[isotopeKey];
          if (!isotope) {
            throw new Error('unknown isotope:', line.value.atom, line.value.isotope);
          }
          result.isotopes.push({
            atom: line.value.atom,
            number: line.multiplier,
            distribution: [{
              x: isotope.mass,
              y: 1
            }],
            naturalDeltaNeutrons: chemical_elements_1$7.stableIsotopesObject[isotopeKey]?.deltaNeutrons ?? 0
          });
          break;
        }
      case Kind_1$3.Kind.ISOTOPE_RATIO:
        {
          let element = chemical_elements_1$7.elementsAndStableIsotopesObject[line.value.atom];
          if (!element) throw new Error('unknown element:', line.value);
          let distribution = getDistribution(element.isotopes, line.value.ratio);
          let maxIndex = 0;
          for (let i = 1; i < distribution.length; i++) {
            if (distribution[i].y > distribution[maxIndex].y) {
              maxIndex = i;
            }
          }
          let mostAbundantKey = Math.round(distribution[maxIndex].x) + line.value.atom;
          result.isotopes.push({
            atom: line.value.atom,
            number: line.multiplier,
            distribution,
            naturalDeltaNeutrons: chemical_elements_1$7.stableIsotopesObject[mostAbundantKey]?.deltaNeutrons ?? 0
          });
          break;
        }
      case Kind_1$3.Kind.ATOM:
        {
          let element = chemical_elements_1$7.elementsAndStableIsotopesObject[line.value];
          if (!element) throw new Error('unknown element:', line.value);
          result.isotopes.push({
            atom: line.value,
            number: line.multiplier,
            distribution: element.isotopes.map(e => ({
              x: e.mass,
              y: e.abundance
            })),
            naturalDeltaNeutrons: 0
          });
          break;
        }
      case Kind_1$3.Kind.CHARGE:
        result.charge += line.value;
        break;
      default:
        throw new Error('partToMF unhandled Kind: ', line.kind);
    }
  }
  return result;
}
function getDistribution(isotopesArray, ratio) {
  let ratios = normalize$1(ratio);
  let result = [];
  if (ratios.length > isotopesArray.length) {
    throw new Error(`the number of specified ratios is bigger that the number of stable isotopes: ${chemical_elements_1$7.isotopesObject}`);
  }
  for (let i = 0; i < ratios.length; i++) {
    result.push({
      x: isotopesArray[i].mass,
      y: ratios[i]
    });
  }
  return result;
}
function normalize$1(array) {
  let sum = array.reduce((prev, current) => prev + current, 0);
  return array.map(a => a / sum);
}

var partsToDisplay$1 = {};

Object.defineProperty(partsToDisplay$1, "__esModule", {
  value: true
});
partsToDisplay$1.partsToDisplay = partsToDisplay;
const Kind_1$2 = Kind;
const toDisplay_js_1$1 = toDisplay$1;
/**
 * Converts an array of mf elements to an array of formatting information
 * @param {Array<Object>} result of the parse method
 */
function partsToDisplay(parts) {
  let lines = [];
  for (let part of parts) {
    if (lines.length > 0) lines.push({
      kind: Kind_1$2.Kind.SALT,
      value: '•'
    });
    for (let partLine of part) {
      lines.push(partLine);
      if (partLine.multiplier) {
        lines.push({
          kind: Kind_1$2.Kind.MULTIPLIER,
          value: partLine.multiplier
        });
      }
    }
  }
  return (0, toDisplay_js_1$1.toDisplay)(lines);
}

var partsToMF$1 = {};

Object.defineProperty(partsToMF$1, "__esModule", {
  value: true
});
partsToMF$1.partsToMF = partsToMF;
const partToMF_1 = partToMF$1;
function partsToMF(parts, options) {
  let mf = [];
  for (let part of parts) {
    mf.push((0, partToMF_1.partToMF)(part, options));
  }
  return mf.join(' . ');
}

var toParts$1 = {};

Object.defineProperty(toParts$1, "__esModule", {
  value: true
});
toParts$1.toParts = toParts;
const atom_sorter_1$2 = src$g;
const chemical_groups_1$4 = src$f;
const Kind_1$1 = Kind;
/**
 *
 * @param {*} lines
 * @param {object} [options={}]
 * @param {boolean} [options.expand=true] - Should we expand the groupsObject
 */
function toParts(lines, options = {}) {
  const {
    expand: shouldExpandGroupsObject = true
  } = options;
  let parts = [];
  let currentPart = createNewPart();
  let previousKind = Kind_1$1.Kind.BEGIN;
  parts.push(currentPart);
  for (let line of lines) {
    switch (line.kind) {
      case Kind_1$1.Kind.ATOM:
      case Kind_1$1.Kind.ISOTOPE_RATIO:
      case Kind_1$1.Kind.ISOTOPE:
      case Kind_1$1.Kind.CHARGE:
        currentPart.lines.push({
          ...line,
          multiplier: 1
        });
        break;
      case Kind_1$1.Kind.OPENING_PARENTHESIS:
        openingParenthesis(currentPart);
        break;
      case Kind_1$1.Kind.CLOSING_PARENTHESIS:
        closingParenthesis(currentPart);
        break;
      case Kind_1$1.Kind.PRE_MULTIPLIER:
        preMultiplier(currentPart, line);
        break;
      case Kind_1$1.Kind.MULTIPLIER:
        postMultiplier(currentPart, line.value, previousKind);
        break;
      case Kind_1$1.Kind.SALT:
        globalPartMultiplier(currentPart);
        currentPart = createNewPart();
        parts.push(currentPart);
        break;
      case Kind_1$1.Kind.ANCHOR:
        // we ignore anchors to create the parts and canonized MF
        break;
      case Kind_1$1.Kind.COMMENT:
        // we ignore comments to create the parts and canonized MF
        break;
      case Kind_1$1.Kind.TEXT:
        break;
      default:
        throw new Error(`Can not process mf having: ${line.kind}`);
    }
    previousKind = line.kind;
  }
  globalPartMultiplier(currentPart);
  if (shouldExpandGroupsObject) expandGroupsObject(parts);
  return combineAtomsIsotopesCharges(parts);
}
function createNewPart() {
  let currentMultiplier = {
    value: 1,
    fromIndex: 0
  };
  return {
    lines: [],
    multipliers: [currentMultiplier],
    currentMultiplier
  };
}
function openingParenthesis(currentPart) {
  currentPart.currentMultiplier = {
    value: 1,
    fromIndex: currentPart.lines.length
  };
  currentPart.multipliers.push(currentPart.currentMultiplier);
}
function closingParenthesis(currentPart) {
  currentPart.currentMultiplier = currentPart.multipliers.pop();
  if (currentPart.currentMultiplier !== 1) {
    for (let i = currentPart.currentMultiplier.fromIndex; i < currentPart.lines.length; i++) {
      currentPart.lines[i].multiplier *= currentPart.currentMultiplier.value;
    }
  }
}
function preMultiplier(currentPart, line) {
  currentPart.currentMultiplier.value *= line.value;
}
function globalPartMultiplier(currentPart) {
  for (let i = currentPart.multipliers[0].fromIndex; i < currentPart.lines.length; i++) {
    currentPart.lines[i].multiplier *= currentPart.multipliers[0].value;
  }
}
function postMultiplier(currentPart, value, previousKind) {
  if (previousKind === Kind_1$1.Kind.CLOSING_PARENTHESIS) {
    // need to apply to everything till the previous parenthesis
    for (let i = currentPart.currentMultiplier.fromIndex; i < currentPart.lines.length; i++) {
      currentPart.lines[i].multiplier *= value;
    }
  } else {
    // just applies to the previous element
    currentPart.lines.at(-1).multiplier *= value;
  }
}
function expandGroupsObject(parts) {
  for (let part of parts) {
    let expanded = false;
    for (let i = 0; i < part.lines.length; i++) {
      let line = part.lines[i];
      if (line.kind === Kind_1$1.Kind.ATOM) {
        let group = chemical_groups_1$4.groupsObject[line.value];
        if (group) {
          expanded = true;
          for (let element of group.elements) {
            if (element.isotope) {
              part.lines.push({
                kind: 'isotope',
                value: {
                  atom: element.symbol,
                  isotope: element.isotope
                },
                multiplier: line.multiplier * element.number
              });
            } else {
              part.lines.push({
                kind: 'atom',
                value: element.symbol,
                multiplier: line.multiplier * element.number
              });
            }
          }
          part.lines[i] = undefined;
        }
      }
    }
    if (expanded) part.lines = part.lines.filter(Boolean);
  }
}
function combineAtomsIsotopesCharges(parts) {
  let results = [];
  for (let part of parts) {
    let result = [];
    results.push(result);
    calculateAndSortKeys(part);
    let currentKey = '';
    for (let key of part.keys) {
      if (key.key === Kind_1$1.Kind.CHARGE) {
        if (currentKey !== key.key) {
          result.push({
            kind: Kind_1$1.Kind.CHARGE,
            value: key.value.value * key.value.multiplier
          });
        } else {
          result.at(-1).value += key.value.value * key.value.multiplier;
        }
      } else if (currentKey !== key.key) {
        result.push(key.value);
      } else {
        result.at(-1).multiplier += key.value.multiplier;
      }
      currentKey = key.key;
    }
    result.sort((a, b) => {
      if (a.kind === Kind_1$1.Kind.CHARGE) return 1;
      if (b.kind === Kind_1$1.Kind.CHARGE) return -1;
      let atomA = a.kind === Kind_1$1.Kind.ATOM ? a.value : a.value.atom;
      let atomB = b.kind === Kind_1$1.Kind.ATOM ? b.value : b.value.atom;
      if (atomA !== atomB) return (0, atom_sorter_1$2.atomSorter)(atomA, atomB);
      // same atome but some isotopes ...
      if (a.kind === Kind_1$1.Kind.ATOM) return -1;
      if (b.kind === Kind_1$1.Kind.ATOM) return 1;
      if (a.kind === Kind_1$1.Kind.ISOTOPE) return -1;
      if (b.kind === Kind_1$1.Kind.ISOTOPE) return 1;
      if (a.kind === Kind_1$1.Kind.ISOTOPE_RATIO) return -1;
      if (b.kind === Kind_1$1.Kind.ISOTOPE_RATIO) return 1;
      return 0;
    });
  }
  return results;
}
function calculateAndSortKeys(part) {
  part.keys = [];
  for (let line of part.lines) {
    part.keys.push({
      key: getKey(line),
      value: line
    });
  }
  part.keys.sort((a, b) => stringComparator(a.key, b.key));
}
function getKey(line) {
  let key = [line.kind];
  switch (line.kind) {
    case Kind_1$1.Kind.CHARGE:
      break;
    default:
      if (typeof line.value === 'string') {
        key.push(line.value);
      } else {
        for (let prop of Object.keys(line.value).toSorted()) {
          key.push(line.value[prop]);
        }
      }
  }
  return key.join('-');
}
function stringComparator(a, b) {
  if (a < b) return -1;
  if (a > b) return 1;
  return 0;
}

var toText$1 = {};

Object.defineProperty(toText$1, "__esModule", {
  value: true
});
toText$1.toText = toText;
const Format_1 = Format;
const subSuperscript_1 = subSuperscript;
function toText(lines) {
  let text = [];
  for (let line of lines) {
    switch (line.kind) {
      case Format_1.Format.SUBSCRIPT:
        {
          const value = String(line.value);
          for (let i = 0; i < value.length; i++) {
            const char = value[i];
            if (subSuperscript_1.subscript[char]) {
              text.push(subSuperscript_1.subscript[char]);
            } else {
              throw new Error(`Subscript problem with: ${char}`);
            }
          }
          break;
        }
      case Format_1.Format.SUPERSCRIPT:
        {
          const value = String(line.value);
          for (let i = 0; i < value.length; i++) {
            const char = value[i];
            if (subSuperscript_1.superscript[char]) {
              text.push(subSuperscript_1.superscript[char]);
            } else {
              throw new Error(`Superscript problem with: ${char}`);
            }
          }
          break;
        }
      case Format_1.Format.SUPERIMPOSE:
        {
          const under = String(line.under);
          for (let i = 0; i < under.length; i++) {
            const char = under[i];
            if (subSuperscript_1.subscript[char]) {
              text.push(subSuperscript_1.subscript[char]);
            } else {
              throw new Error(`Subscript problem with: ${char}`);
            }
          }
          const over = String(line.over);
          for (let i = 0; i < over.length; i++) {
            const char = over[i];
            if (subSuperscript_1.superscript[char]) {
              text.push(subSuperscript_1.superscript[char]);
            } else {
              throw new Error(`Superscript problem with: ${char}`);
            }
          }
          break;
        }
      default:
        text.push(line.value);
    }
  }
  return text.join('');
}

Object.defineProperty(MFInternal$1, "__esModule", {
  value: true
});
MFInternal$1.MFInternal = void 0;
const Kind_1 = Kind;
const ensureCase_1 = ensureCase$1;
const parse_1 = parse$3;
const flatten_1 = flatten$1;
const getEA_1 = getEA$1;
const getElements_1 = getElements$1;
const getInfo_1 = getInfo$1;
const getIsotopesInfo_1 = getIsotopesInfo$1;
const partsToDisplay_1 = partsToDisplay$1;
const partsToMF_1 = partsToMF$1;
const toDisplay_1 = toDisplay$1;
const toHtml_1 = toHtml$1;
const toParts_1 = toParts$1;
const toText_1 = toText$1;
/** @typedef {import('./util/getIsotopesInfo.types').IsotopesInfo} IsotopesInfo */
/** @typedef {import('./util/getInfo.types').MFInfo} MFInfo */
/** @typedef {import('./util/getInfo.types').MFInfoWithParts} MFInfoWithParts */
/**
 * Class allowing to deal with molecular formula and derived information
 */
class MFInternal {
  constructor(mf, options = {}) {
    const {
      flattenLimit = 0
    } = options;
    if (options.ensureCase) {
      mf = (0, ensureCase_1.ensureCase)(mf);
    }
    this.parsed = (0, parse_1.parse)(mf);
    // This is definitely not the fastest way to do it but it allows to flatten the formula if needed and then parse it again to have a clean structure without multiplier ranges. We can consider doing it in one pass in the future if performance is an issue.
    if (flattenLimit > 0 && this.parsed.some(entry => entry.kind === Kind_1.Kind.MULTIPLIER_RANGE)) {
      try {
        const flattened = (0, flatten_1.flatten)(this.parsed, {
          limit: flattenLimit
        });
        this.parsed = (0, parse_1.parse)(flattened.join('.'));
      } catch (error) {
        // eslint-disable-next-line no-console
        console.error(error.toString());
      }
    }
    this.cache = {};
  }
  /**
   * Returns an array of objects with kind and value that can be used to easily
   * display the molecular formula.
   * @returns {{kind: string, value: string}[]}
   */
  toDisplay() {
    if (!this.cache.displayed) this.cache.displayed = (0, toDisplay_1.toDisplay)(this.parsed);
    return this.cache.displayed;
  }
  /**
   * Returns a string that represents the molecular formula adding subscript and superscript in HTML.
   * @returns {string}
   */
  toHtml() {
    if (!this.cache.html) {
      this.toDisplay();
      this.cache.html = (0, toHtml_1.toHtml)(this.cache.displayed);
    }
    return this.cache.html;
  }
  /**
   * Returns a string that represents the molecular formula adding subscript and superscript
   * using Unicode characters. This can not be parsed anymore so kind of dead end ...
   * @returns {string}
   */
  toText() {
    if (!this.cache.text) {
      this.toDisplay();
      this.cache.text = (0, toText_1.toText)(this.cache.displayed);
    }
    return this.cache.text;
  }
  /**
   * Similar to toText but returns a canonic string in which the atoms are sorted using the Hill system
   * @returns {string}
   */
  toCanonicText() {
    if (!this.cache.canonicText) {
      this.cache.canonicText = new MFInternal(this.toMF()).toText();
    }
    return this.cache.canonicText;
  }
  toParts(options) {
    if (options) {
      return (0, toParts_1.toParts)(this.parsed, options);
    }
    // we don't want to cache the parts if we are using options
    if (!this.cache.parts) {
      this.cache.parts = (0, toParts_1.toParts)(this.parsed, options);
    }
    return this.cache.parts;
  }
  /**
   * Returns an object with the global MF, global charge, monoisotopic mass and mass
   * as well as the same information for all the parts
   * @param {object} [options={}] options
   * @param {object} [options.customUnsaturations={}] custom unsaturations
   * @param {string} [options.emFieldName='monoisotopicMass'] name of the monoisotopic mass field
   * @param {string} [options.msemFieldName='observedMonoisotopicMass'] name of the observed monoisotopic mass field
   * @returns {MFInfo|MFInfoWithParts}
   */
  getInfo(options = {}) {
    if (!this.cache.info) {
      this.toParts();
      this.cache.info = (0, getInfo_1.getInfo)(this.cache.parts, options);
    }
    return this.cache.info;
  }
  /**
   * Returns an object with the elemental analysis
   * @returns {*[]}
   */
  getEA() {
    if (!this.cache.ea) {
      this.toParts();
      this.cache.ea = (0, getEA_1.getEA)(this.cache.parts);
    }
    return this.cache.ea;
  }
  /**
   * Get the different elements for each part
   * @returns {*[]}
   */
  getElements() {
    if (!this.cache.elements) {
      this.toParts();
      this.cache.elements = (0, getElements_1.getElements)(this.cache.parts);
    }
    return this.cache.elements;
  }
  /**
   * Returns an array with each atom and isotopic composition
   * @returns {IsotopesInfo}
   */
  getIsotopesInfo(options = {}) {
    if (!this.cache.isotopesInfo) {
      this.toParts();
      this.cache.isotopesInfo = (0, getIsotopesInfo_1.getIsotopesInfo)(this.cache.parts, options);
    }
    return this.cache.isotopesInfo;
  }
  /**
   * Get a canonized MF
   * @returns {string}
   */
  toMF() {
    if (!this.cache.mf) {
      this.toParts();
      this.cache.mf = (0, partsToMF_1.partsToMF)(this.cache.parts);
    }
    return this.cache.mf;
  }
  /**
   * Get a canonized MF
   * @returns {string}
   */
  toNeutralMF() {
    if (!this.cache.neutralMF) {
      this.toParts();
      this.cache.neutralMF = (0, partsToMF_1.partsToMF)(this.cache.parts, {
        neutral: true
      });
    }
    return this.cache.neutralMF;
  }
  canonize() {
    this.toParts();
    this.cache.displayed = (0, partsToDisplay_1.partsToDisplay)(this.cache.parts);
    this.cache.html = undefined;
  }
  flatten(options) {
    return (0, flatten_1.flatten)(this.parsed, options);
  }
}
MFInternal$1.MFInternal = MFInternal;

Object.defineProperty(MF$1, "__esModule", {
  value: true
});
MF$1.MF = void 0;
const MFInternal_1 = MFInternal$1;
class MF {
  internal;
  constructor(mf, options = {}) {
    this.internal = new MFInternal_1.MFInternal(mf, options);
  }
  /**
   * Returns an array of objects with kind and value that can be used to easily
   * display the molecular formula.
   */
  toDisplay() {
    return this.internal.toDisplay();
  }
  /**
   * Returns a string that represents the molecular formula adding subscript and superscript in HTML.
   */
  toHtml() {
    return this.internal.toHtml();
  }
  /**
   * Returns a string that represents the molecular formula adding subscript and superscript
   * using Unicode characters. This can not be parsed anymore so kind of dead end ...
   */
  toText() {
    return this.internal.toText();
  }
  /**
   * Similar to toText but returns a canonic string in which the atoms are sorted using the Hill system
   */
  toCanonicText() {
    return this.internal.toCanonicText();
  }
  toParts(options) {
    return this.internal.toParts(options);
  }
  /**
   * Returns an object with the global MF, global charge, monoisotopic mass and mass
   * as well as the same information for all the parts
   */
  getInfo(options) {
    return this.internal.getInfo(options);
  }
  /**
   * Returns an object with the elemental analysis
   */
  getEA() {
    return this.internal.getEA();
  }
  /**
   * Get the different elements for each part
   */
  getElements() {
    return this.internal.getElements();
  }
  /**
   * Returns an array with each atom and isotopic composition
   */
  getIsotopesInfo(options = {}) {
    return this.internal.getIsotopesInfo(options);
  }
  /**
   * Get a canonized parsable Molecule Formula
   */
  toMF() {
    return this.internal.toMF();
  }
  /**
   * Get a canonized MF
   */
  toNeutralMF() {
    return this.internal.toNeutralMF();
  }
  canonize() {
    return this.internal.canonize();
  }
  flatten(options) {
    return this.internal.flatten(options);
  }
}
MF$1.MF = MF;

var parseToHtml$1 = {};

Object.defineProperty(parseToHtml$1, "__esModule", {
  value: true
});
parseToHtml$1.parseToHtml = parseToHtml;
const parse_js_1 = parse$3;
const toDisplay_js_1 = toDisplay$1;
const toHtml_js_1 = toHtml$1;
/**
 * Parse a molecular formula and converts it to an HTML code
 * @param {String} mf String containing the molecular formula
 */
function parseToHtml(mf) {
  let parsed = (0, parse_js_1.parse)(mf);
  let display = (0, toDisplay_js_1.toDisplay)(parsed);
  return (0, toHtml_js_1.toHtml)(display);
}

(function (exports) {

  var __createBinding = src$h && src$h.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$h && src$h.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(parse$3, exports);
  __exportStar(subSuperscript, exports);
  __exportStar(toDisplay$1, exports);
  __exportStar(isMF$1, exports);
  __exportStar(toHtml$1, exports);
  __exportStar(Kind, exports);
  __exportStar(Format, exports);
  __exportStar(Style$1, exports);
  __exportStar(ensureCase$1, exports);
  __exportStar(MF$1, exports);
  __exportStar(parseToHtml$1, exports);
})(src$h);

Object.defineProperty(getEutrophicationPotential$1, "__esModule", {
  value: true
});
getEutrophicationPotential$1.getEutrophicationPotential = getEutrophicationPotential;
const mf_parser_1$j = src$h;
function getEutrophicationPotential(mfString) {
  let parsed = new mf_parser_1$j.MF(mfString);
  let info = parsed.getInfo();
  let mf = info.mf;
  let mw = info.mass;
  let nC = info.atoms.C || 0;
  let nO = info.atoms.O || 0;
  let nN = info.atoms.N || 0;
  let nP = info.atoms.P || 0;
  let nH = info.atoms.H || 0;
  let atoms = Object.keys(info.atoms);
  for (let atom of atoms) {
    if (!['C', 'H', 'N', 'O', 'P'].includes(atom)) {
      return {
        log: `EP can not be calculated because the MF contains the element: ${atom}`
      };
    }
  }
  let vRef = 1;
  let mwRef = 94.97;
  let thOD = nC + (nH - 3 * nN) / 4 - nO / 2;
  let v = nP + nN / 16 + thOD / 138;
  let ep = v / mw / (vRef / mwRef);
  return {
    v,
    thOD,
    ep,
    mf,
    mw,
    log: 'Successful calculation'
  };
}

var getMsInfo$1 = {};

var getMsem$1 = {};

Object.defineProperty(getMsem$1, "__esModule", {
  value: true
});
getMsem$1.getMsem = getMsem;
const chemical_elements_1$6 = src$j;
function getMsem(em, charge) {
  if (charge > 0) {
    return em / charge - chemical_elements_1$6.ELECTRON_MASS;
  } else if (charge < 0) {
    return em / (charge * -1) + chemical_elements_1$6.ELECTRON_MASS;
  } else {
    return 0;
  }
}

Object.defineProperty(getMsInfo$1, "__esModule", {
  value: true
});
getMsInfo$1.getMsInfo = getMsInfo;
const getMsem_1 = getMsem$1;
/**
 * Returns an object containing:
 * {ms: {em, charge, ionization}, ionization: {}}
 * We return the ionization in order to know which one has been selected
 */
function getMsInfo(entry, options = {}) {
  const {
    allowNeutralMolecules,
    ionization = {
      mf: '',
      em: 0,
      charge: 0
    },
    forceIonization = false,
    targetMass
  } = options;
  let realIonization = ionization;
  if (!forceIonization && entry.ionization && entry.ionization.mf !== '') {
    realIonization = entry.ionization;
  }
  let ms = {
    ionization: realIonization.mf,
    em: 0,
    charge: entry.charge + realIonization.charge
  };
  if (ms.charge !== 0) {
    ms.em = (0, getMsem_1.getMsem)(entry.em + realIonization.em, ms.charge);
  } else if (allowNeutralMolecules) {
    ms.em = entry.em + realIonization.em;
  }
  if (targetMass) {
    ms.delta = targetMass - ms.em;
    ms.ppm = (targetMass - ms.em) / ms.em * 1e6;
  }
  return {
    ms,
    ionization: realIonization
  };
}

var getRangesForFragment$1 = {};

Object.defineProperty(getRangesForFragment$1, "__esModule", {
  value: true
});
getRangesForFragment$1.getRangesForFragment = getRangesForFragment;
const mf_parser_1$i = src$h;
function getRangesForFragment(ranges) {
  ranges = structuredClone(ranges);
  if (typeof ranges === 'string') {
    // need to convert to ranges
    let parsed = (0, mf_parser_1$i.parse)(ranges.replaceAll(/[\t\n\r ]/g, ''));
    let newRanges = [];
    // example ClBr2(CH2)0-2NO
    // the idea is that as long as we don't have a range we don't really care
    // there is a limitation is that the range has to be first level of parenthesis
    let parenthesisLevel = 0;
    let currentMF = ''; // start at an atom first level or a parenthesis
    for (let item of parsed) {
      switch (item.kind) {
        case mf_parser_1$i.Kind.ATOM:
          if (parenthesisLevel === 0 && currentMF) {
            newRanges.push({
              mf: currentMF
            });
            currentMF = '';
          }
          currentMF += item.value;
          break;
        case mf_parser_1$i.Kind.ISOTOPE:
          if (parenthesisLevel === 0 && currentMF) {
            newRanges.push({
              mf: currentMF
            });
            currentMF = '';
          }
          currentMF += `[${item.value.isotope}${item.value.atom}]`;
          break;
        case mf_parser_1$i.Kind.MULTIPLIER:
          if (parenthesisLevel === 0 && currentMF) {
            newRanges.push({
              mf: currentMF,
              max: item.value
            });
            currentMF = '';
          } else {
            currentMF += item.value;
          }
          break;
        case mf_parser_1$i.Kind.MULTIPLIER_RANGE:
          if (parenthesisLevel !== 0) {
            throw new Error('Range multiplier can only be at the first level');
          }
          newRanges.push({
            mf: currentMF,
            min: item.value.from,
            max: item.value.to
          });
          currentMF = '';
          break;
        case mf_parser_1$i.Kind.OPENING_PARENTHESIS:
          if (parenthesisLevel === 0 && currentMF) {
            newRanges.push({
              mf: currentMF
            });
            currentMF = '';
          }
          parenthesisLevel++;
          currentMF += '(';
          break;
        case mf_parser_1$i.Kind.CLOSING_PARENTHESIS:
          parenthesisLevel--;
          currentMF += ')';
          break;
        default:
          throw new Error(`can not preprocess ${ranges}`);
      }
    }
    if (currentMF) {
      newRanges.push({
        mf: currentMF
      });
    }
    ranges = newRanges;
  }
  let possibilities = [];
  for (const range of ranges) {
    if (range.max === 0) continue;
    let max = range.max === undefined ? 1 : range.max;
    possibilities.push(`${range.mf}0-${max}`);
  }
  return possibilities.join(' ');
}

var MFRange$1 = {};

Object.defineProperty(MFRange$1, "__esModule", {
  value: true
});
MFRange$1.MFRange = void 0;
const mf_parser_1$h = src$h;
class MFRange {
  constructor(mf) {
    this.range = getRange(mf);
  }
  isInRange(mf) {
    const target = getRange(mf);
    let rangeIndex = 0;
    let targetIndex = 0;
    while (rangeIndex < this.range.length && targetIndex < target.length) {
      const rangeElement = this.range[rangeIndex];
      const targetElement = target[targetIndex];
      if (rangeElement.element === targetElement.element) {
        // Check if the target's range is within the range's range
        if (targetElement.range.from >= rangeElement.range.from && targetElement.range.to <= rangeElement.range.to) {
          targetIndex++;
          rangeIndex++;
        } else {
          return false; // Target element is out of range
        }
      } else if (rangeElement.element < targetElement.element) {
        if (rangeElement.range.from > 0) {
          return false; // Remaining range elements must have a minimum of 1
        }
        rangeIndex++;
      } else {
        return false; // Target element is not in the range
      }
    }
    if (rangeIndex < this.range.length) {
      if (this.range[rangeIndex].range.from > 0) {
        return false; // Remaining range elements must have a minimum of 1
      }
      rangeIndex++;
    }
    if (targetIndex < target.length) {
      return false; // Not all target elements were matched
    }
    return true; // All target elements are within the range
  }
}
MFRange$1.MFRange = MFRange;
function getRange(mf) {
  const parsed = (0, mf_parser_1$h.parse)(mf, {
    expandGroups: true,
    simplify: true
  });
  const ranges = [];
  let currentRange;
  for (const item of parsed) {
    switch (item.kind) {
      case 'atom':
        currentRange = {
          element: item.value,
          range: {
            from: 1,
            to: 1
          }
        };
        ranges.push(currentRange);
        break;
      case 'isotope':
        currentRange = {
          element: item.value.isotope + item.value.atom,
          range: {
            from: 1,
            to: 1
          }
        };
        break;
      case 'multiplier':
        if (currentRange) {
          currentRange.range.from = item.value;
          currentRange.range.to = item.value;
        } else {
          throw new Error(`MFRange: Multiplier without preceding element in MF: ${mf}`);
        }
        break;
      case 'multiplierRange':
        if (currentRange) {
          currentRange.range.from = item.value.from;
          currentRange.range.to = item.value.to;
        } else {
          throw new Error(`MFRange: Multiplier range without preceding element in MF: ${mf}`);
        }
        break;
      default:
        throw new Error(`MFRange: Unknown kind: ${item.kind} in MF: ${mf}`);
    }
  }
  return ranges.toSorted((a, b) => {
    if (a.element < b.element) return -1;
    if (a.element > b.element) return 1;
    return 0;
  });
}

var mfDiff$1 = {};

Object.defineProperty(mfDiff$1, "__esModule", {
  value: true
});
mfDiff$1.mfDiff = mfDiff;
const mf_parser_1$g = src$h;
function mfDiff(mfString1, mfString2) {
  let mf1 = new mf_parser_1$g.MF(mfString1).getInfo().atoms;
  let mf2 = new mf_parser_1$g.MF(mfString2).getInfo().atoms;
  let atoms = Object.keys(mf1);
  for (const atom of Object.keys(mf2)) {
    if (!atoms.includes(atom)) atoms.push(atom);
  }
  let mf = '';
  for (let atom of atoms) {
    let diff = (mf1[atom] || 0) - (mf2[atom] || 0);
    if (diff) mf += atom + diff;
  }
  return new mf_parser_1$g.MF(mf).toMF();
}

var preprocessIonizations$1 = {};

Object.defineProperty(preprocessIonizations$1, "__esModule", {
  value: true
});
preprocessIonizations$1.preprocessIonizations = preprocessIonizations;
const mf_parser_1$f = src$h;
function preprocessIonizations(ionizationsString = '') {
  if (Array.isArray(ionizationsString)) return ionizationsString;
  const ionizations = ionizationsString.split(/ *[\t\n\r,.;]+ */);
  // it is allowed to have ranges in Ionizations. We need to explode them.
  const results = [];
  for (const ionization of ionizations) {
    const parts = new mf_parser_1$f.MF(ionization).flatten();
    for (const part of parts) {
      const info = new mf_parser_1$f.MF(part).getInfo();
      results.push({
        mf: part,
        em: info.monoisotopicMass,
        charge: info.charge,
        atoms: info.atoms
      });
    }
  }
  return results;
}

var preprocessRanges$1 = {};

Object.defineProperty(preprocessRanges$1, "__esModule", {
  value: true
});
preprocessRanges$1.preprocessRanges = preprocessRanges;
const mf_parser_1$e = src$h;
function preprocessRanges(ranges) {
  ranges = structuredClone(ranges);
  if (typeof ranges === 'string') {
    // need to convert to ranges
    let parsed = (0, mf_parser_1$e.parse)(ranges.replaceAll(/[\t\n\r ]/g, ''));
    let newRanges = [];
    let current = {
      mf: '',
      min: 1,
      max: 1
    };
    // example ClBr2(CH2)0-2NO
    // the idea is that has long as we don't have a range we don't really care
    // but the range should only applied on the previous atom, group or parenthesis
    // there is a limitation is that the range has to be first level of parenthesis
    let parenthesisLevel = 0;
    let currentMF = ''; // start at an atom first level or a parenthesis
    for (let item of parsed) {
      switch (item.kind) {
        case mf_parser_1$e.Kind.ATOM:
          if (parenthesisLevel === 0 && currentMF) {
            current.mf += currentMF;
            currentMF = '';
          }
          currentMF += item.value;
          break;
        case mf_parser_1$e.Kind.ISOTOPE:
          if (parenthesisLevel === 0 && currentMF) {
            current.mf += currentMF;
            currentMF = '';
          }
          currentMF += `[${item.value.isotope}${item.value.atom}]`;
          break;
        case mf_parser_1$e.Kind.MULTIPLIER:
          if (parenthesisLevel === 0 && currentMF) {
            current.mf += currentMF + item.value;
            currentMF = '';
          } else {
            currentMF += item.value;
          }
          break;
        case mf_parser_1$e.Kind.MULTIPLIER_RANGE:
          if (parenthesisLevel !== 0) {
            throw new Error('Range multiplier can only be at the first level');
          }
          newRanges.push({
            mf: currentMF,
            min: item.value.from,
            max: item.value.to
          });
          currentMF = '';
          break;
        case mf_parser_1$e.Kind.OPENING_PARENTHESIS:
          if (parenthesisLevel === 0 && currentMF) {
            current.mf += currentMF;
            currentMF = '';
          }
          parenthesisLevel++;
          currentMF += '(';
          break;
        case mf_parser_1$e.Kind.CLOSING_PARENTHESIS:
          parenthesisLevel--;
          currentMF += ')';
          break;
        default:
          throw new Error(`can not preprocess ${ranges}`);
      }
    }
    if (currentMF) {
      current.mf += currentMF;
    }
    if (current.mf) {
      newRanges.push(current);
    }
    ranges = newRanges;
  }
  let possibilities = [];
  for (let i = 0; i < ranges.length; i++) {
    let range = ranges[i];
    let min = range.min === undefined ? 0 : range.min;
    let max = range.max === undefined ? 1 : range.max;
    let possibility = {
      mf: range.mf,
      originalMinCount: min,
      // value defined by the user
      originalMaxCount: max,
      // value defined by the user
      currentMinCount: min,
      currentMaxCount: max,
      currentCount: min,
      currentMonoisotopicMass: 0,
      currentCharge: 0,
      currentUnsaturation: 0,
      initialOrder: i,
      minInnerMass: 0,
      maxInnerMass: 0,
      minInnerCharge: 0,
      maxInnerCharge: 0,
      minCharge: 0,
      maxCharge: 0,
      minMass: 0,
      maxMass: 0,
      innerCharge: false
    };
    possibilities.push(possibility);
    let info = new mf_parser_1$e.MF(range.mf).getInfo();
    possibility.em = range.em || info.monoisotopicMass;
    possibility.charge = range.charge || info.charge;
    possibility.unsaturation = range.unsaturation === undefined ? (info.unsaturation - 1) * 2 : range.unsaturation;
    possibility.atoms = info.atoms;
    if (possibility.mf !== info.mf) {
      possibility.isGroup = true;
    }
  }
  possibilities = possibilities.filter(r => r.originalMinCount !== 0 || r.originalMaxCount !== 0);
  // we will sort the way we analyse the data
  // 1. The one possibility parameter
  // 2. The charged part
  // 3. Decreasing em
  possibilities.sort((a, b) => {
    if (a.originalMinCount === a.originalMaxCount) return -1; // should be in front, they are 'static'
    if (b.originalMinCount === b.originalMaxCount) return 1;
    if (a.charge && b.charge) {
      if (Math.abs(a.charge) > Math.abs(b.charge)) return -1;
      if (Math.abs(a.charge) < Math.abs(b.charge)) return 1;
      return b.em - a.em;
    }
    if (a.charge) return -1;
    if (b.charge) return 1;
    return b.em - a.em;
  });
  // we calculate couple of fixed values
  for (let i = 0; i < possibilities.length; i++) {
    for (let j = i; j < possibilities.length; j++) {
      let possibility = possibilities[j];
      if (possibility.em > 0) {
        possibilities[i].minMass += possibility.em * possibility.originalMinCount;
        possibilities[i].maxMass += possibility.em * possibility.originalMaxCount;
      } else {
        possibilities[i].minMass += possibility.em * possibility.originalMaxCount;
        possibilities[i].maxMass += possibility.em * possibility.originalMinCount;
      }
      if (possibility.charge > 0) {
        possibilities[i].minCharge += possibility.charge * possibility.originalMinCount;
        possibilities[i].maxCharge += possibility.charge * possibility.originalMaxCount;
      } else {
        possibilities[i].minCharge += possibility.charge * possibility.originalMaxCount;
        possibilities[i].maxCharge += possibility.charge * possibility.originalMinCount;
      }
    }
  }
  for (let i = 0; i < possibilities.length; i++) {
    if (i < possibilities.length - 1) {
      let possibility = possibilities[i];
      let innerPossibility = possibilities[i + 1];
      possibility.minInnerMass = innerPossibility.minMass;
      possibility.maxInnerMass = innerPossibility.maxMass;
      possibility.minInnerCharge = innerPossibility.minCharge;
      possibility.maxInnerCharge = innerPossibility.maxCharge;
      if (possibility.minInnerCharge || possibility.maxInnerCharge) {
        possibility.innerCharge = true;
      }
    }
  }
  return possibilities;
}

(function (exports) {

  var __createBinding = src$i && src$i.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$i && src$i.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(ensureUppercaseSequence$1, exports);
  __exportStar(getEutrophicationPotential$1, exports);
  __exportStar(getMsInfo$1, exports);
  __exportStar(getMsem$1, exports);
  __exportStar(getRangesForFragment$1, exports);
  __exportStar(MFRange$1, exports);
  __exportStar(mfDiff$1, exports);
  __exportStar(preprocessIonizations$1, exports);
  __exportStar(preprocessRanges$1, exports);
})(src$i);

Object.defineProperty(getChargeLadders$1, "__esModule", {
  value: true
});
getChargeLadders$1.getChargeLadders = getChargeLadders;
getChargeLadders$1.assignLadderCharge = assignLadderCharge;
const chemical_elements_1$5 = src$j;
const mf_utilities_1$b = src$i;
const ml_spectra_processing_1$f = require$$0$7;
/**
 * Group the peaks of a multiply charged species into charge-state ladders.
 *
 * An electrospray of a protein does not show its isotopologues but a ladder of
 * charge states: the same molecule of neutral mass `M` ionized a growing number
 * of times by a charge carrier (a proton, a sodium, ...). A peak of charge `z`
 * sits at `m/z = M / z + delta`, where `delta` is the m/z shift of one charge
 * carrier, so a whole series shares one `M` while each of its peaks has its own
 * charge. The charge of a single peak can therefore not be read on its own:
 * what shows it is the ladder it belongs to.
 *
 * A ladder is grown from its most intense peak by predicting, one charge state
 * at a time, where the next one must lie, and it is kept only when it spans at
 * least `minLength` consecutive charge states. Ladders are assigned from the one
 * holding the most intensity to the one holding the least, and a peak only takes
 * the charge of the first ladder that claims it, so a harmonic (every other
 * state of a real ladder) can not steal the peaks of the series it mimics.
 * @param {Array<{x: number, y: number}>} peaks - the peaks of the spectrum
 * @param {object} [options={}]
 * @param {string|Array} [options.ionizations='H+'] - the charge carriers to try,
 * as a comma separated list (`'H+,Na+,K+'`) or an array of preprocessed
 * ionizations. Each envelope is assigned the carrier that explains it best.
 * @param {number} [options.maxCharge=100] - highest charge state to consider;
 * the ladder is grown over the states `1` to `maxCharge` (its magnitude is used,
 * so a negative-mode range such as `-100` behaves like `100`)
 * @param {number} [options.tolerance=500] - tolerance on the position of the
 * next charge state, in ppm. Larger than for isotopologues because the charge
 * states of a protein are broad and rarely mass resolved.
 * @param {number} [options.minLength=5] - shortest ladder that shows a charge
 * @param {number} [options.minRelativeIntensity=0.05] - peaks under this
 * fraction of the most intense one are satellites, adducts or noise and take no
 * part in the ladders
 * @returns {Array<{mass: number, ionization: string, peaks: Array}>} the
 * ladders, from the one holding the most intensity to the one holding the
 * least. `mass` is the neutral mass they reconstruct, `ionization` the carrier
 * that explains them and each peak carries its `charge`.
 */
function getChargeLadders(peaks, options = {}) {
  const ladders = buildLadders(peaks, options);
  const results = [];
  for (const ladder of ladders) {
    const ladderPeaks = [];
    for (const {
      claim,
      ...peak
    } of ladder.peaks) {
      ladderPeaks.push(peak);
    }
    ladderPeaks.sort((a, b) => a.x - b.x);
    results.push({
      mass: ladder.mass,
      ionization: ladder.ionization,
      peaks: ladderPeaks
    });
  }
  return results;
}
/**
 * Give to each of `selectedPeaks` the charge of the ladder peak at its mass.
 *
 * A peak that matches no ladder peak gets no `charge`. Used by
 * `getPeaksWithCharge` to complete the charge the isotopologue clusters can not
 * give to a multiply charged species.
 * @param {Array} selectedPeaks - peaks to evaluate
 * @param {Array<{peaks: Array}>} ladders - as returned by `getChargeLadders`
 * @param {number} [tolerance=20] - tolerance, in ppm, to match a selected peak
 * to a ladder peak
 * @returns {Array} copy of `selectedPeaks`, carrying a `charge` when matched
 */
function assignLadderCharge(selectedPeaks, ladders, tolerance = 20) {
  const members = [];
  for (const ladder of ladders) {
    for (const peak of ladder.peaks) members.push(peak);
  }
  members.sort((a, b) => a.x - b.x);
  if (members.length === 0) {
    return selectedPeaks.map(peak => ({
      ...peak
    }));
  }
  const masses = new Float64Array(members.length);
  for (let i = 0; i < members.length; i++) masses[i] = members[i].x;
  const relativeTolerance = tolerance * 1e-6;
  const results = [];
  for (const peak of selectedPeaks) {
    const index = (0, ml_spectra_processing_1$f.xFindClosestIndex)(masses, peak.x);
    const absoluteTolerance = relativeTolerance * peak.x;
    if (Math.abs(members[index].x - peak.x) <= absoluteTolerance) {
      results.push({
        ...peak,
        charge: members[index].charge
      });
    } else {
      results.push({
        ...peak
      });
    }
  }
  return results;
}
/**
 * The ladders the exported functions need, each with its reconstructed neutral
 * mass, its carrier and its peaks (carrying their charge), sorted from the one
 * holding the most intensity to the one holding the least.
 * @param {Array<{x: number, y: number}>} peaks
 * @param {object} [options={}]
 * @returns {Array<{mass: number, ionization: string, intensity: number, peaks: Array}>}
 */
function buildLadders(peaks, options = {}) {
  const {
    ionizations = 'H+',
    maxCharge = 100,
    tolerance = 500,
    minLength = 5,
    minRelativeIntensity = 0.05
  } = options;
  // delta: the m/z shift of one charge carrier, the `delta` of `m/z = M / z + delta`
  const preprocessedIonizations = (0, mf_utilities_1$b.preprocessIonizations)(ionizations).map(ionization => ({
    mf: ionization.mf,
    delta: (ionization.em - ionization.charge * chemical_elements_1$5.ELECTRON_MASS) / Math.abs(ionization.charge)
  }));
  const sorted = peaks.toSorted((a, b) => a.x - b.x);
  const floor = minRelativeIntensity * (0, ml_spectra_processing_1$f.xyObjectMaxYPoint)(sorted).y;
  // a copy carrying `claim`, the flag a ladder sets on the peaks it takes so a
  // later, weaker ladder can not reuse them
  const significantPeaks = sorted.filter(peak => peak.y >= floor).map(peak => ({
    ...peak,
    claim: false
  }));
  if (significantPeaks.length < minLength) return [];
  const masses = new Float64Array(significantPeaks.length);
  for (let i = 0; i < significantPeaks.length; i++) {
    masses[i] = significantPeaks[i].x;
  }
  // the ladder spans charge 1 to maxCharge; its magnitude is used so a
  // negative-mode range (maxCharge = -100) behaves like the positive one
  const from = 1;
  const to = Math.max(1, Math.abs(Math.round(maxCharge)));
  // ppm turned into a plain factor once, so growth only scales it by the mass
  const relativeTolerance = tolerance * 1e-6;
  const ladders = [];
  for (const anchor of significantPeaks.toSorted((a, b) => b.y - a.y)) {
    if (anchor.claim) continue;
    // neither the carrier nor the charge of the anchor is known, so every
    // hypothesis is grown and the one spanning the most consecutive states is
    // kept; a tie goes to the lowest charge, the fundamental rather than one of
    // its harmonics
    let best = null;
    for (const ionization of preprocessedIonizations) {
      if (anchor.x - ionization.delta <= 0) continue;
      for (let charge = from; charge <= to; charge++) {
        const members = growLadder(significantPeaks, masses, anchor, charge, {
          from,
          to,
          relativeTolerance,
          delta: ionization.delta
        });
        if (best === null || members.length > best.members.length || members.length === best.members.length && charge < best.charge) {
          best = {
            members,
            charge,
            ionization
          };
        }
      }
    }
    if (best === null || best.members.length < minLength) continue;
    const {
      delta,
      mf
    } = best.ionization;
    const ladderPeaks = [];
    let massSum = 0;
    let weightSum = 0;
    let intensity = 0;
    for (const {
      peak,
      charge
    } of best.members) {
      peak.claim = true;
      peak.charge = charge;
      massSum += peak.y * charge * (peak.x - delta);
      weightSum += peak.y;
      intensity += peak.y;
      ladderPeaks.push(peak);
    }
    ladders.push({
      mass: massSum / weightSum,
      ionization: mf,
      intensity,
      peaks: ladderPeaks
    });
  }
  ladders.sort((a, b) => b.intensity - a.intensity);
  return ladders;
}
/**
 * Grow a ladder around an anchor peak assumed to carry `charge`.
 *
 * The next charge state is predicted from the last matched peak rather than from
 * the anchor, so the error of a broad, unresolved peak never accumulates over
 * the whole ladder. Growth stops at the first state that is missing or already
 * claimed by a more intense ladder.
 * @param {Array<{x: number, claim: boolean}>} significant - the significant peaks, sorted by mass
 * @param {Float64Array} masses - their masses, for the closest-peak search
 * @param {{x: number}} anchor - the peak to grow from
 * @param {number} charge - hypothesised charge of the anchor
 * @param {object} bounds
 * @param {number} bounds.from - lowest charge state
 * @param {number} bounds.to - highest charge state
 * @param {number} bounds.relativeTolerance - tolerance as a plain factor (ppm * 1e-6)
 * @param {number} bounds.delta - m/z shift of one charge carrier
 * @returns {Array<{peak: object, charge: number}>}
 */
function growLadder(significant, masses, anchor, charge, bounds) {
  const {
    from,
    to,
    relativeTolerance,
    delta
  } = bounds;
  const members = [{
    peak: anchor,
    charge
  }];
  const used = new Set([anchor]);
  let localMass = anchor.x;
  for (let state = charge - 1; state >= from; state--) {
    const predicted = (state + 1) * (localMass - delta) / state + delta;
    const peak = significant[(0, ml_spectra_processing_1$f.xFindClosestIndex)(masses, predicted)];
    if (peak.claim || used.has(peak)) break;
    if (Math.abs(peak.x - predicted) > relativeTolerance * predicted) break;
    members.push({
      peak,
      charge: state
    });
    used.add(peak);
    localMass = peak.x;
  }
  localMass = anchor.x;
  for (let state = charge + 1; state <= to; state++) {
    const predicted = (state - 1) * (localMass - delta) / state + delta;
    const peak = significant[(0, ml_spectra_processing_1$f.xFindClosestIndex)(masses, predicted)];
    if (peak.claim || used.has(peak)) break;
    if (Math.abs(peak.x - predicted) > relativeTolerance * predicted) break;
    members.push({
      peak,
      charge: state
    });
    used.add(peak);
    localMass = peak.x;
  }
  return members;
}

var getFragmentPeaks$1 = {};

var fromMonoisotopicMass$1 = {};

var src$e = {};

var findMFs$1 = {};

var findMFsSync$1 = {};

var src$d = {};

var generalMatcher$1 = {};

var unsaturationMatcher$1 = {};

/**
 * @param {object}   [entry={}]
 * @param {object}   [options={}]
 * @param {number}   [options.min=-Infinity] - Minimal unsaturation
 * @param {number}   [options.max=+Infinity] - Maximal unsaturation
 * @param {boolean}   [options.onlyInteger=false] - Integer unsaturation
 * @param {boolean}   [options.onlyNonInteger=false] - Non integer unsaturation
 * @return {boolean}
 */
Object.defineProperty(unsaturationMatcher$1, "__esModule", {
  value: true
});
unsaturationMatcher$1.unsaturationMatcher = unsaturationMatcher;
function unsaturationMatcher(entry, options = {}) {
  const {
    min = Number.MIN_SAFE_INTEGER,
    max = Number.MAX_SAFE_INTEGER,
    onlyInteger,
    onlyNonInteger
  } = options;
  if (entry.unsaturation !== undefined) {
    if (entry.unsaturation < min || entry.unsaturation > max) return false;
    if (onlyInteger && !Number.isInteger(entry.unsaturation)) return false;
    if (onlyNonInteger && Number.isInteger(entry.unsaturation)) return false;
  }
  return true;
}

Object.defineProperty(generalMatcher$1, "__esModule", {
  value: true
});
generalMatcher$1.generalMatcher = generalMatcher;
const unsaturationMatcher_js_1$1 = unsaturationMatcher$1;
/**
 * Returns true if the entry containing MF information match
 * @param {object}   [entry={}] - object containing mw, ...
 * @param {object}   [options={}]
 * @param {number}   [options.minMW=0] - Minimal molecular weight
 * @param {number}   [options.maxMW=+Infinity] - Maximal molecular weight
 * @param {number}   [options.minEM=0] - Minimal monoisotopic mass
 * @param {number}   [options.maxEM=+Infinity] - Maximal monoisotopic mass
 * @param {number}   [options.minCharge=-Infinity] - Minimal charge
 * @param {number}   [options.maxCharge=+Infinity] - Maximal charge
 * @param {boolean}  [options.absoluteCharge=false] - If true, the charge is absolute (so between 0 and +Infinity by default)
 * @param {object}   [options.unsaturation={}]
 * @param {number}   [options.unsaturation.min=-Infinity] - Minimal unsaturation
 * @param {number}   [options.unsaturation.max=+Infinity] - Maximal unsaturation
 * @param {boolean}   [options.unsaturation.onlyInteger=false] - Integer unsaturation
 * @param {boolean}   [options.unsaturation.onlyNonInteger=false] - Non integer unsaturation
 * @param {object}   [options.atoms] - object of atom:{min, max}
 * @return {boolean}
 */
function generalMatcher(entry, options = {}) {
  const {
    minMW = 0,
    maxMW = +Infinity,
    minEM = 0,
    maxEM = +Infinity,
    minCharge = Number.MIN_SAFE_INTEGER,
    maxCharge = Number.MAX_SAFE_INTEGER,
    absoluteCharge = false,
    unsaturation = {},
    atoms
  } = options;
  if (entry.mw !== undefined && (entry.mw < minMW || entry.mw > maxMW)) {
    return false;
  }
  if (entry.em !== undefined && (entry.em < minEM || entry.em > maxEM)) {
    return false;
  }
  if (entry.charge !== undefined) {
    let charge = absoluteCharge ? Math.abs(entry.charge) : entry.charge;
    if (charge < minCharge || charge > maxCharge) return false;
  }
  if (unsaturation !== undefined && entry.unsaturation !== undefined && !(0, unsaturationMatcher_js_1$1.unsaturationMatcher)(entry, unsaturation)) {
    return false;
  }
  if (entry.atoms !== undefined && atoms) {
    // all the atoms of the entry must fit in the range
    for (let atom in entry.atoms) {
      if (!atoms[atom]) return false;
      if (entry.atoms[atom] < atoms[atom].min) return false;
      if (entry.atoms[atom] > atoms[atom].max) return false;
    }
  }
  return true;
}

var msemMatcher$1 = {};

Object.defineProperty(msemMatcher$1, "__esModule", {
  value: true
});
msemMatcher$1.msemMatcher = msemMatcher;
const mf_utilities_1$a = src$i;
const ml_spectra_processing_1$e = require$$0$7;
const unsaturationMatcher_js_1 = unsaturationMatcher$1;
/**
 * @typedef {object} MSEMFilterOptions
 * @property {object}         [ionization={ mf: '', em: 0, charge: 0 }] - ionization method
 * @property {boolean}        [forceIonization=false] - If true ignore existing ionizations
 * @property {number}         [precision=1000] - The precision on the experimental mass
 * @property {number}         [targetMass] - Target mass, allows to calculate error and filter results
 * @property {number[]}       [targetMasses] - Target masses: SORTED array of numbers
 * @property {number[]}       [targetIntensities] - Target intensities: SORTED array of numbers
 * @property {number}         [minMW=-Infinity] - Minimal monoisotopic mass
 * @property {number}         [maxMW=+Infinity] - Maximal monoisotopic mass
 * @property {number}         [minEM=-Infinity] - Minimal monoisotopic mass
 * @property {number}         [maxEM=+Infinity] - Maximal monoisotopic mass
 * @property {number}         [minMSEM=-Infinity] - Minimal monoisotopic mass observed by mass
 * @property {number}         [maxMSEM=+Infinity] - Maximal monoisotopic mass observed by mass
 * @property {number}         [minCharge=-Infinity] - Minimal charge
 * @property {number}         [maxCharge=+Infinity] - Maximal charge
 * @property {boolean}        [absoluteCharge=false] - If true, the charge is absolute (so between 0 and +Infinity by default)
 * @property {boolean}        [allowNegativeAtoms=false] - Allow to have negative number of atoms
 * @property {object}         [unsaturation={}]
 * @property {number}         [unsaturation.min=-Infinity] - Minimal unsaturation
 * @property {number}         [unsaturation.max=+Infinity] - Maximal unsaturation
 * @property {boolean}        [unsaturation.onlyInteger=false] - Integer unsaturation
 * @property {boolean}        [unsaturation.onlyNonInteger=false] - Non integer unsaturation
 * @property {boolean}        [atoms] - object of atom:{min, max}
 * @property {Function}       [callback] - a function that contains information about the current MF
 */
/**
 * @param {object}             [entry={}]
 * @param {MSEMFilterOptions}  [options={}]
 * @return {boolean}
 */
/**
 * We always recalculate msem
 */
function msemMatcher(entry, options = {}) {
  const {
    ionization = {
      mf: '',
      em: 0,
      charge: 0,
      atoms: {}
    },
    forceIonization = false,
    precision = 1000,
    minCharge = Number.MIN_SAFE_INTEGER,
    maxCharge = Number.MAX_SAFE_INTEGER,
    absoluteCharge = false,
    unsaturation = {},
    targetMass,
    // if present we will calculate the errors
    targetMasses,
    // if present we will calculate the smallest error
    targetIntensities,
    // if present it will be added in the report
    minEM = -Infinity,
    maxEM = +Infinity,
    minMSEM = -Infinity,
    maxMSEM = +Infinity,
    minMW = -Infinity,
    maxMW = +Infinity,
    allowNegativeAtoms = false,
    atoms,
    callback
  } = options;
  if (entry.mw !== undefined && (entry.mw < minMW || entry.mw > maxMW)) {
    return false;
  }
  let msInfo = (0, mf_utilities_1$a.getMsInfo)(entry, {
    ionization,
    forceIonization,
    targetMass
  });
  let ms = msInfo.ms;
  if (entry.em !== undefined && (entry.em < minEM || entry.em > maxEM)) {
    return false;
  }
  if (ms.em !== undefined && (ms.em < minMSEM || ms.em > maxMSEM)) {
    return false;
  }
  if (targetMass && Math.abs(ms.ppm) > precision) {
    return false;
  }
  if (ms.charge !== undefined) {
    let charge = absoluteCharge ? Math.abs(ms.charge) : ms.charge;
    if (charge < minCharge || charge > maxCharge) return false;
  }
  if (unsaturation !== undefined && entry.unsaturation !== undefined && !(0, unsaturationMatcher_js_1.unsaturationMatcher)(entry, unsaturation)) {
    return false;
  }
  if (entry.atoms !== undefined && atoms) {
    // all the atoms of the entry must fit in the range
    for (let atom in entry.atoms) {
      if (!atoms[atom]) return false;
      if (entry.atoms[atom] < atoms[atom].min) return false;
      if (entry.atoms[atom] > atoms[atom].max) return false;
    }
  }
  if (entry.atoms !== undefined && !allowNegativeAtoms) {
    const ionizationAtoms = msInfo.ionization && msInfo.ionization.atoms || {};
    const atomKeys = new Set(Object.keys(ionizationAtoms).concat(Object.keys(entry.atoms)));
    for (let atom of atomKeys) {
      if ((entry.atoms[atom] || 0) + (ionizationAtoms[atom] || 0) < 0) {
        return false;
      }
    }
  }
  if (targetMasses && targetMasses.length > 0) {
    let index = (0, ml_spectra_processing_1$e.xFindClosestIndex)(targetMasses, ms.em);
    let closestMass = targetMasses[index];
    msInfo = (0, mf_utilities_1$a.getMsInfo)(entry, {
      ionization,
      forceIonization,
      targetMass: closestMass
    });
    msInfo.ms.target = {
      mass: closestMass
    };
    if (targetIntensities) {
      msInfo.ms.target.intensity = targetIntensities[index];
    }
    // need to find the closest targetMasses
    if (Math.abs(msInfo.ms.ppm) > precision) return false;
  }
  if (callback && !callback(entry)) return false;
  return msInfo;
}

(function (exports) {

  var __createBinding = src$d && src$d.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$d && src$d.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(generalMatcher$1, exports);
  __exportStar(msemMatcher$1, exports);
})(src$d);

var TargetMassCache$1 = {};

Object.defineProperty(TargetMassCache$1, "__esModule", {
  value: true
});
TargetMassCache$1.TargetMassCache = void 0;
const chemical_elements_1$4 = src$j;
/**
 * returns all the possible neutral mass for a defined experimental (targetMass) mass
 */
class TargetMassCache {
  /**
   * @param {number} targetMass
   * @param {Array} possibilities
   * @param {object} [options={}]
   * @param {boolean} [options.allowNeutral=false]
   * @param {number} [options.charge=0]
   * @param {number} [options.precision=100]
   * @param {object} [options.filter={}]
   * @param {number} [options.filter.minCharge=Number.MIN_SAFE_INTEGER]
   * @param {number} [options.filter.maxCharge=Number.MAX_SAFE_INTEGER]
   * @returns
   */
  constructor(targetMass, possibilities, options = {}) {
    const {
      allowNeutral = false,
      // msem because em in this case !
      filter = {},
      charge = 0,
      precision = 100
    } = options;
    const {
      minCharge = Number.MIN_SAFE_INTEGER,
      maxCharge = Number.MAX_SAFE_INTEGER
    } = filter;
    if (!possibilities || possibilities.length === 0) return;
    let firstPossibility = possibilities[0];
    let currentMinCharge = Math.max(minCharge, firstPossibility.minCharge + charge);
    let currentMaxCharge = Math.min(maxCharge, firstPossibility.maxCharge + charge);
    this.minCharge = currentMinCharge;
    this.maxCharge = currentMaxCharge;
    let size = this.maxCharge - this.minCharge + 1;
    this.data = [];
    let minMass = 0;
    let maxMass = 0;
    let range = targetMass * precision / 1e6;
    for (let i = 0; i < size; i++) {
      let currentCharge = i + this.minCharge;
      if (currentCharge === 0) {
        if (allowNeutral) {
          minMass = targetMass - range;
          maxMass = targetMass + range;
        } else {
          minMass = Number.MAX_SAFE_INTEGER;
          maxMass = Number.MIN_SAFE_INTEGER;
        }
      } else {
        minMass = (targetMass - range) * Math.abs(currentCharge) + chemical_elements_1$4.ELECTRON_MASS * currentCharge;
        maxMass = (targetMass + range) * Math.abs(currentCharge) + chemical_elements_1$4.ELECTRON_MASS * currentCharge;
      }
      this.data.push({
        charge: currentCharge,
        minMass,
        maxMass
      });
    }
  }
  getMinMass(charge) {
    return this.data[charge - this.minCharge] ? this.data[charge - this.minCharge].minMass : Number.MAX_SAFE_INTEGER;
  }
  getMaxMass(charge) {
    return this.data[charge - this.minCharge] ? this.data[charge - this.minCharge].maxMass : Number.MIN_SAFE_INTEGER;
  }
}
TargetMassCache$1.TargetMassCache = TargetMassCache;

Object.defineProperty(findMFsSync$1, "__esModule", {
  value: true
});
findMFsSync$1.findMFsSync = findMFsSync;
const atom_sorter_1$1 = src$g;
const mf_matcher_1$4 = src$d;
const mf_utilities_1$9 = src$i;
const TargetMassCache_1 = TargetMassCache$1;
/**
 * @param {number}        targetMass - Monoisotopic mass
 * @param {object}        [options={}]
 * @param {number}        [options.maxIterations=10000000] - Maximum number of iterations
 * @param {boolean}       [options.allowNeutral=true]
 * @param {boolean}       [options.uniqueMFs=true]
 * @param {number}        [options.limit=1000] - Maximum number of results
 * @param {string}        [options.ionizations=''] - string containing a comma separated list of modifications
 * @param {string|{mf:string,min:number,max:number}[]}        [options.ranges='C0-100 H0-100 O0-100 N0-100'] - range of mfs to search
 * @param {number}        [options.precision=100] - Allowed mass range based on precision
 * @param {import('mf-matcher').MSEMFilterOptions}        [options.filter={}]
 * @returns {object}
 */
function findMFsSync(targetMass, options = {}) {
  const {
    filter = {},
    maxIterations = 1e8,
    limit = 1000,
    allowNeutral = true,
    // if there is no msem we use em !
    uniqueMFs = false,
    // if there is no msem we use em !
    ranges = [{
      mf: 'C',
      min: 0,
      max: 100
    }, {
      mf: 'H',
      min: 0,
      max: 100
    }, {
      mf: 'O',
      min: 0,
      max: 100
    }, {
      mf: 'N',
      min: 0,
      max: 100
    }]
  } = options;
  let targetMassCache;
  const {
    minCharge = Number.MIN_SAFE_INTEGER,
    maxCharge = Number.MAX_SAFE_INTEGER,
    unsaturation = {},
    atoms,
    callback
  } = filter;
  let filterUnsaturation = !!unsaturation;
  // we calculate not the real unsaturation but the one before dividing by 2 + 1
  let fakeMinUnsaturation = unsaturation.min === undefined ? Number.MIN_SAFE_INTEGER : (unsaturation.min - 1) * 2;
  let fakeMaxUnsaturation = unsaturation.max === undefined ? Number.MAX_SAFE_INTEGER : (unsaturation.max - 1) * 2;
  let filterCharge = minCharge !== Number.MIN_SAFE_INTEGER || maxCharge !== Number.MAX_SAFE_INTEGER;
  let advancedFilter;
  if (atoms || callback) {
    advancedFilter = {
      atoms,
      callback
    };
  }
  let result = {
    mfs: [],
    info: {
      numberMFEvaluated: 0,
      numberResults: 0
    }
  };
  let orderMapping = []; // used to sort the atoms
  // we need to make the processing for all the ionizations
  let ionizations = (0, mf_utilities_1$9.preprocessIonizations)(options.ionizations);
  for (let ionization of ionizations) {
    let currentIonization = {
      currentMonoisotopicMass: ionization.em || 0,
      currentCharge: ionization.charge,
      currentUnsaturation: 0 // we don't take into account the unsaturation of the ionization agent
    };
    // if (DEBUG) console.log('new ionization', ionization.mf, ionization.em, ionization.charge);
    // ionization em and charge will be used to set the first atom value
    let possibilities = (0, mf_utilities_1$9.preprocessRanges)(ranges);
    orderMapping = getOrderMapping$1(possibilities);
    if (possibilities.length === 0) return {
      mfs: []
    };
    targetMassCache = new TargetMassCache_1.TargetMassCache(targetMass, possibilities, {
      ...options,
      charge: ionization.charge
    });
    let theEnd = false;
    let maxPosition = possibilities.length;
    let lastPosition = possibilities.length - 1;
    let currentPosition = 0;
    let currentAtom;
    let previousAtom;
    let lastPossibility = possibilities[lastPosition];
    initializePossibilities(possibilities, currentIonization, targetMassCache);
    //  if (DEBUG) console.log('possibilities', possibilities.map((a) => `${a.mf + a.originalMinCount}-${a.originalMaxCount}`));
    let isValid = false; // designed so that the first time it is not a valid solution
    while (!theEnd) {
      if (result.info.numberMFEvaluated++ > maxIterations) {
        throw new Error(`Iteration number is over the current maximum of: ${maxIterations}`);
      }
      if (filterUnsaturation) {
        let unsaturationValue = lastPossibility.currentUnsaturation;
        let isOdd = Math.abs(unsaturationValue % 2);
        if (unsaturation.onlyInteger && isOdd === 1 || unsaturation.onlyNonInteger && isOdd === 0 || fakeMinUnsaturation > unsaturationValue || fakeMaxUnsaturation < unsaturationValue) {
          isValid = false;
        }
      }
      if (filterCharge && (lastPossibility.currentCharge < minCharge || lastPossibility.currentCharge > maxCharge)) {
        isValid = false;
      }
      if (isValid) {
        let minMass = targetMassCache.getMinMass(lastPossibility.currentCharge);
        let maxMass = targetMassCache.getMaxMass(lastPossibility.currentCharge);
        if (lastPossibility.currentMonoisotopicMass < minMass || lastPossibility.currentMonoisotopicMass > maxMass) {
          isValid = false;
        }
      }
      if (isValid) {
        result.info.numberResults++;
        let newResult = getResult$1(possibilities, targetMass, allowNeutral, ionization, orderMapping);
        if (advancedFilter) {
          isValid = (0, mf_matcher_1$4.msemMatcher)(newResult, advancedFilter) !== false;
        }
        if (isValid) {
          result.mfs.push(newResult);
          if (result.mfs.length > 2 * limit) {
            if (uniqueMFs) ensureUniqueMF(result);
            result.mfs.sort((a, b) => Math.abs(a.ms.ppm) - Math.abs(b.ms.ppm));
            result.mfs.length = limit;
          }
        }
      }
      isValid = true;
      // we need to set up all the arrays if possible
      while (currentPosition < maxPosition && currentPosition >= 0) {
        currentAtom = possibilities[currentPosition];
        previousAtom = currentPosition === 0 ? currentIonization : possibilities[currentPosition - 1];
        if (currentAtom.currentCount < currentAtom.currentMaxCount) {
          currentAtom.currentCount++;
          updateCurrentAtom(currentAtom, previousAtom);
          if (currentPosition < lastPosition) {
            currentPosition++;
            setCurrentMinMax(possibilities[currentPosition], possibilities[currentPosition - 1], targetMassCache);
          } else {
            break;
          }
        } else {
          currentPosition--;
        }
      }
      if (currentPosition < 0) {
        theEnd = true;
      }
    }
  }
  if (uniqueMFs) ensureUniqueMF(result);
  result.mfs.sort((a, b) => Math.abs(a.ms.ppm) - Math.abs(b.ms.ppm));
  if (result.mfs.length > limit) {
    result.mfs.length = limit;
  }
  for (const mf of result.mfs) {
    delete mf.currentCounts;
  }
  return result;
}
/**
 * Ensure that we have only once the same MF
 * In order to improve the speed we just consider the em
 * @param {object} result
 */
function ensureUniqueMF(result) {
  result.mfs.sort((a, b) => a.em - b.em);
  let previousEM = 0;
  let bestCounts = [];
  const mfs = [];
  next: for (let current of result.mfs) {
    if (current.em - previousEM > 1e-8) {
      previousEM = current.em;
      bestCounts = current.currentCounts;
      mfs.push(current);
    } else {
      for (let i = 0; i < current.currentCounts.length; i++) {
        // better priority ???
        if (current.currentCounts[i] > bestCounts[i]) {
          mfs.pop();
          mfs.push(current);
          bestCounts = current.currentCounts;
        } else if (current.currentCounts[i] < bestCounts[i]) {
          continue next;
        }
      }
    }
  }
  result.mfs = mfs;
}
function updateCurrentAtom(currentAtom, previousAtom) {
  currentAtom.currentMonoisotopicMass = previousAtom.currentMonoisotopicMass + currentAtom.em * currentAtom.currentCount;
  currentAtom.currentCharge = previousAtom.currentCharge + currentAtom.charge * currentAtom.currentCount;
  currentAtom.currentUnsaturation = previousAtom.currentUnsaturation + currentAtom.unsaturation * currentAtom.currentCount;
}
function getResult$1(possibilities, targetMass, allowNeutralMolecules, ionization, orderMapping) {
  let lastPossibility = possibilities.at(-1);
  let result = {
    em: lastPossibility.currentMonoisotopicMass - ionization.em,
    unsaturation: lastPossibility.currentUnsaturation,
    mf: '',
    charge: lastPossibility.currentCharge - ionization.charge,
    ionization,
    atoms: {},
    groups: {},
    currentCounts: possibilities.map(possibility => possibility.currentCount)
  };
  // we check that the first time we meet the ionization group it does not end
  // in the final result
  for (let i = 0; i < possibilities.length; i++) {
    let possibility = possibilities[orderMapping[i]];
    if (possibility.currentCount !== 0) {
      if (possibility.isGroup) {
        if (possibility.currentCount === 1) {
          result.mf += `${possibility.mf}`;
        } else if (possibility.mf.match(/^\([^()]*\)$/)) {
          result.mf += `${possibility.mf}${possibility.currentCount}`;
        } else {
          result.mf += `(${possibility.mf})${possibility.currentCount}`;
        }
        if (result.groups[possibility.mf]) {
          result.groups[possibility.mf] += possibility.currentCount;
        } else {
          result.groups[possibility.mf] = possibility.currentCount;
        }
      } else {
        result.mf += possibility.mf;
        if (possibility.currentCount !== 1) {
          result.mf += possibility.currentCount;
        }
      }
      for (let atom in possibility.atoms) {
        if (result.atoms[atom]) {
          result.atoms[atom] += possibility.atoms[atom] * possibility.currentCount;
        } else {
          result.atoms[atom] = possibility.atoms[atom] * possibility.currentCount;
        }
      }
    }
  }
  result.unsaturation = (result.unsaturation + Math.abs(result.charge)) / 2 + 1;
  result.ms = (0, mf_utilities_1$9.getMsInfo)(result, {
    targetMass,
    allowNeutralMolecules
  }).ms;
  return result;
}
function setCurrentMinMax(currentAtom, previousAtom, targetMassCache) {
  // the current min max can only be optimize if the charge will not change anymore
  // and the currentAtom.em >= 0
  if (currentAtom.innerCharge === true || currentAtom.charge !== 0 || currentAtom.em < 0) {
    currentAtom.currentMinCount = currentAtom.originalMinCount;
    currentAtom.currentMaxCount = currentAtom.originalMaxCount;
    currentAtom.currentCount = currentAtom.currentMinCount - 1;
  } else {
    // no more change of charge, we can optimize
    let currentMass = previousAtom !== undefined ? previousAtom.currentMonoisotopicMass : 0;
    let currentCharge = previousAtom !== undefined ? previousAtom.currentCharge : 0;
    currentAtom.currentMinCount = Math.max(Math.floor((targetMassCache.getMinMass(currentCharge) - currentMass - currentAtom.maxInnerMass) / currentAtom.em), currentAtom.originalMinCount);
    currentAtom.currentMaxCount = Math.min(Math.floor((targetMassCache.getMaxMass(currentCharge) - currentMass - currentAtom.minInnerMass) / currentAtom.em), currentAtom.originalMaxCount);
    currentAtom.currentCount = currentAtom.currentMinCount - 1;
  }
}
function initializePossibilities(possibilities, currentIonization, targetMassCache) {
  for (let i = 0; i < possibilities.length; i++) {
    if (i === 0) {
      updateCurrentAtom(possibilities[i], currentIonization);
      setCurrentMinMax(possibilities[i], currentIonization, targetMassCache);
    } else {
      updateCurrentAtom(possibilities[i], possibilities[i - 1]);
    }
  }
}
function getOrderMapping$1(possibilities) {
  let mapping = possibilities.map((p, i) => ({
    atom: p.mf,
    index: i
  }));
  mapping.sort((a, b) => {
    return (0, atom_sorter_1$1.atomSorter)(a.atom, b.atom);
  });
  return mapping.map(a => a.index);
}

Object.defineProperty(findMFs$1, "__esModule", {
  value: true
});
findMFs$1.findMFs = findMFs;
const findMFsSync_1 = findMFsSync$1;
/** @typedef {import('./types').MFResult} MFResult */
/** @typedef {import('./types').MFFinderOptions} MFFinderOptions */
/**
 * @param {number} targetMass - Monoisotopic mass
 * @param {MFFinderOptions} [options={}]
 * @returns {Promise<MFResult[]>}
 */
async function findMFs(targetMass, options = {}) {
  return (0, findMFsSync_1.findMFsSync)(targetMass, options);
}

var mfIncluded$1 = {};

Object.defineProperty(mfIncluded$1, "__esModule", {
  value: true
});
mfIncluded$1.mfIncluded = mfIncluded;
const mf_parser_1$d = src$h;
const findMFsSync_js_1 = findMFsSync$1;
/**
 * @param {string}        mf - the molecular formula to check
 * @param {string}        range - the range of MF to explore
 * @param {object}        [options={}]
 * @param {number}        [options.maxIterations=10000000] - Maximum number of iterations
 * @param {boolean}       [options.allowNeutral=true]
 * @param {string}        [options.ionizations=''] - string containing a comma separated list of modifications
 * @param {object}        [options.filter={}]
 * @param {number}        [options.filter.minCharge=-Infinity] - Minimal charge
 * @param {number}        [options.filter.maxCharge=+Infinity] - Maximal charge
 * @param {boolean}       [options.filter.absoluteCharge=false] - If true, the charge is absolute (so between 0 and +Infinity by default)
 * @param {object}        [options.filter.unsaturation={}]
 * @param {number}        [options.filter.unsaturation.min=-Infinity] - Minimal unsaturation
 * @param {number}        [options.filter.unsaturation.max=+Infinity] - Maximal unsaturation
 * @param {boolean}       [options.filter.unsaturation.onlyInteger=false] - Integer unsaturation
 * @param {boolean}       [options.filter.unsaturation.onlyNonInteger=false] - Non integer unsaturation
 * @param {object}        [options.filter.atoms] - object of atom:{min, max}
 * @param {function}      [options.filter.callback] - a function to filter the MF
 * @returns {boolean}
 */
function mfIncluded(mf, range, options = {}) {
  let targetEM = new mf_parser_1$d.MF(mf).getInfo().monoisotopicMass;
  let results = (0, findMFsSync_js_1.findMFsSync)(targetEM, {
    allowNeutral: true,
    ...options,
    ranges: range,
    precision: 0.0000001,
    limit: 1
  });
  return results.mfs.length > 0;
}

(function (exports) {

  var __createBinding = src$e && src$e.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$e && src$e.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(findMFs$1, exports);
  __exportStar(mfIncluded$1, exports);
})(src$e);

Object.defineProperty(fromMonoisotopicMass$1, "__esModule", {
  value: true
});
fromMonoisotopicMass$1.fromMonoisotopicMass = fromMonoisotopicMass;
const mf_finder_1$2 = src$e;
/**
 * Generates a database 'monoisotopic' from a monoisotopic mass and various options
 * @param {number|string|array}    masses - Monoisotopic mass
 * @param {object}    [options={}]
 * @param {number}    [options.maxIterations=10000000] - Maximum number of iterations
 * @param {function}  [options.onStep] - Callback to do after each step
 * @param {boolean}   [options.allowNeutral=true]
 * @param {boolean}   [options.uniqueMFs=true]
 * @param {number}    [options.limit=1000] - Maximum number of results
 * @param {string}    [options.ionizations=''] - string containing a comma separated list of modifications
 * @param {string}    [options.ranges='C0-100 H0-100 O0-100 N0-100'] - range of mfs to search
 * @param {number}    [options.precision=100] - Allowed mass range based on precision
 * @param {object}    [options.filter={}]
 * @param {number}    [options.filter.minCharge=-Infinity] - Minimal charge
 * @param {number}    [options.filter.maxCharge=+Infinity] - Maximal charge
 * @param {boolean}   [options.filter.absoluteCharge=false] - If true, the charge is absolute (so between 0 and +Infinity by default)
 * @param {object}    [options.filter.unsaturation={}]
 * @param {number}    [options.filter.unsaturation.min=-Infinity] - Minimal unsaturation
 * @param {number}    [options.filter.unsaturation.max=+Infinity] - Maximal unsaturation
 * @param {boolean}    [options.filter.unsaturation.onlyInteger=false] - Integer unsaturation
 * @param {boolean}    [options.filter.unsaturation.onlyNonInteger=false] - Non integer unsaturation
 * @param {object}    [options.filter.atoms] - object of atom:{min, max}
 * @param {function}  [options.filter.callback] - a function to filter the MF
 * @returns {Promise}
 */
async function fromMonoisotopicMass(masses, options = {}) {
  if (typeof masses === 'string') {
    masses = masses.split(/[\t\n\r ,;]/).map(Number);
  }
  if (typeof masses === 'number') {
    masses = [masses];
  }
  let results = [];
  for (let mass of masses) {
    results.push(await (0, mf_finder_1$2.findMFs)(mass, options));
  }
  return {
    mfs: results.flatMap(entry => entry.mfs),
    info: {
      numberMFEvaluated: results.reduce((sum, current) => sum + current.info.numberMFEvaluated, 0),
      numberResults: results.reduce((sum, current) => sum + current.info.numberResults, 0)
    }
  };
}

var getPeaks$1 = {};

Object.defineProperty(getPeaks$1, "__esModule", {
  value: true
});
getPeaks$1.getPeaks = getPeaks;
const ml_spectra_processing_1$d = require$$0$7;
/**
 * Filter the array of peaks
 * @param {array} peaks - array of all the peaks
 * @param {object} [options={}]
 * @param {number} [options.from] - min X value of the window to consider
 * @param {number} [options.to] - max X value of the window to consider
 * @param {number} [options.threshold=0.01] - minimal intensity compare to base peak
 * @param {number} [options.limit=undefined] - maximal number of peaks (based on intensity)
 * @param {number} [options.sumValue] // if sumValue is defined, maxValue is ignored
 * @returns {array} - copy of peaks with 'close' annotation
 */
function getPeaks(peaks, options = {}) {
  const {
    from = (0, ml_spectra_processing_1$d.xyObjectMinXPoint)(peaks).x,
    to = (0, ml_spectra_processing_1$d.xyObjectMaxXPoint)(peaks).x,
    threshold = 0.01,
    limit,
    sumValue
  } = options;
  let maxY = Number.MIN_SAFE_INTEGER;
  for (let peak of peaks) {
    if (peak.y > maxY) maxY = peak.y;
  }
  let minY = maxY * threshold;
  peaks = peaks.filter(peak => peak.x >= from && peak.x <= to && peak.y >= minY);
  if (limit && peaks.length > limit) {
    peaks.sort((a, b) => b.y - a.y);
    peaks = peaks.slice(0, limit);
  }
  if (sumValue) {
    peaks = structuredClone(peaks);
    const currentSum = (0, ml_spectra_processing_1$d.xyObjectSumY)(peaks);
    const ratio = sumValue / currentSum;
    for (const peak of peaks) {
      peak.y *= ratio;
    }
  }
  return peaks.toSorted((a, b) => a.x - b.x);
}

Object.defineProperty(getFragmentPeaks$1, "__esModule", {
  value: true
});
getFragmentPeaks$1.getFragmentPeaks = getFragmentPeaks;
const mf_parser_1$c = src$h;
const fromMonoisotopicMass_1$1 = fromMonoisotopicMass$1;
const getPeaks_js_1$1 = getPeaks$1;
/**
 * Filter the array of peaks
 * @param {array} peaks - array of all the peaks
 * @param {string} mf - Molecular formula of the parent molecule
 * @param {object} [options={}]
 * @param {number} [options.from] - min X value of the window to consider
 * @param {number} [options.to] - max X value of the window to consider
 * @param {number} [options.threshold=0.01] - minimal intensity compare to base peak
 * @param {number} [options.limit=undefined] - maximal number of peaks (based on intensity)
 * @param {string} [options.ionizations]
 * @param {number} [options.precision]
 * @returns {array} - copy of peaks with 'close' annotation
 */
async function getFragmentPeaks(peaks, mf, options = {}) {
  const {
    ionizations = '',
    precision
  } = options;
  const mfInfo = new mf_parser_1$c.MF(mf).getInfo();
  const ranges = Object.keys(mfInfo.atoms).map(key => `${key}0-${mfInfo.atoms[key]}`).join(' ');
  peaks = (0, getPeaks_js_1$1.getPeaks)(peaks, options);
  for (let peak of peaks) {
    const {
      mfs
    } = await (0, fromMonoisotopicMass_1$1.fromMonoisotopicMass)(peak.x, {
      precision,
      ranges,
      ionizations
    });
    peak.mfs = mfs;
  }
  peaks = peaks.filter(peak => peak.mfs.length > 0);
  return peaks;
}

var getMassRemainder$1 = {};

Object.defineProperty(getMassRemainder$1, "__esModule", {
  value: true
});
getMassRemainder$1.getMassRemainder = getMassRemainder;
const ml_spectra_processing_1$c = require$$0$7;
/**
 * Remove an integer number of time the specifiedd monoisotopic mass.
 * Mass remainder analysis (MARA): https://doi.org/10.1021/acs.analchem.7b04730
 * @param {object} spectrum
 * @param {number} mass
 * @param {object} [options={}]
 * @param {number} [options.delta=0.001]
 */
function getMassRemainder(spectrum, mass, options = {}) {
  const {
    delta = 0.001
  } = options;
  const x = spectrum.x.slice();
  const y = spectrum.y;
  for (let i = 0; i < x.length; i++) {
    const factor = Math.floor(x[i] / mass);
    x[i] = x[i] - factor * mass;
  }
  // we sort and join
  return (0, ml_spectra_processing_1$c.xyJoinX)((0, ml_spectra_processing_1$c.xySortX)({
    x,
    y
  }), {
    delta
  });
}

var getPeakChargeBySimilarity$1 = {};

var getPeaksWithCharge$1 = {};

Object.defineProperty(getPeaksWithCharge$1, "__esModule", {
  value: true
});
getPeaksWithCharge$1.getPeaksWithCharge = getPeaksWithCharge;
getPeaksWithCharge$1.getChargeAtMass = getChargeAtMass;
const ml_spectra_processing_1$b = require$$0$7;
const getChargeClusters_js_1$1 = getChargeClusters$1;
const getChargeLadders_js_1$1 = getChargeLadders$1;
/**
 * Evaluate the charge of every peak.
 *
 * The charge comes from the isotopologue clusters: a peak takes the charge of
 * the series it belongs to. Evaluating a peak on its own can not work, because
 * an isotopologue in the middle of an envelope looks the same whatever the
 * charge and the last one of an envelope has nothing after it.
 *
 * A multiply charged species (a protein electrospray, ...) shows no resolved
 * isotopologues but a ladder of charge states. When such ladders are present
 * (an unresolved spectrum, see `maxClusteredFraction`) they take precedence: an
 * unresolved envelope peak often forms a spurious charge-1 cluster from its
 * neighbours, and the ladder gives the real, much higher charge. A peak that
 * belongs to neither gets no `charge` at all.
 * @param {Array} peaks - all the peaks of the spectrum, sorted by mass
 * @param {object} [options={}]
 * @param {number} [options.min=1] - lowest charge the isotopologue clusters
 * consider
 * @param {number} [options.max=100] - highest charge to consider; shared by the
 * isotopologue clusters and the charge-state ladder (which spans `1` to `max`)
 * @param {number} [options.precision=20] - tolerance on the position of an
 * isotopologue, in ppm (isotopologue clusters)
 * @param {number} [options.minLength=3] - shortest isotopologue series that
 * shows a charge. This is the cluster length, not the ladder's: a ladder has its
 * own `minLength` (default 5) inside `options.ladder`
 * @param {number} [options.minIntensity=0] - peaks under it are noise and take
 * no part in the series
 * @param {string|Array} [options.ionizations='H+'] - the charge carriers a
 * charge-state ladder may show, see `getChargeLadders`
 * @param {number} [options.maxClusteredFraction=0.2] - the charge-state ladders
 * are ignored when the isotopologue clusters already explain more than this
 * fraction of the significant peaks: a resolved spectrum (where the ladders
 * would only be coincidences) is read from its isotopologues alone
 * @param {object} [options.ladder={}] - options forwarded to `getChargeLadders`,
 * kept apart because a ladder is broader than an isotopologue and needs its own
 * tolerances. The `min`/`precision`/`minLength` above are the isotopologue
 * cluster parameters and do not reach the ladder; `max` is shared and caps both,
 * so the ladder has no `maxCharge` of its own
 * @param {number} [options.ladder.tolerance=500] - tolerance on the position of
 * the next charge state, in ppm. Larger than for isotopologues because the charge
 * states of a protein are broad and rarely mass resolved
 * @param {number} [options.ladder.minLength=5] - shortest ladder that shows a
 * charge
 * @param {number} [options.ladder.minRelativeIntensity=0.05] - peaks under this
 * fraction of the most intense one are satellites, adducts or noise and take no
 * part in the ladders

 * @returns {Array} copy of `peaks`, with a `charge` when one was found
 */
function getPeaksWithCharge(peaks, options = {}) {
  const {
    precision = 20,
    min: minCharge = 1,
    max: maxCharge = 100,
    minLength = 3,
    minIntensity = 0,
    ionizations = 'H+',
    ladder = {},
    maxClusteredFraction = 0.2
  } = options;
  const significant = [];
  for (const peak of peaks) {
    if (peak.y >= minIntensity) significant.push(peak);
  }
  const clustered = (0, getChargeClusters_js_1$1.getPeaksWithClusterCharge)(significant, {
    minCharge,
    maxCharge,
    precision,
    minLength
  });
  const masses = new Float64Array(clustered.length);
  for (let i = 0; i < clustered.length; i++) masses[i] = clustered[i].x;
  // calculate the percentage of peaks that were clustered with a charge:
  // when it is too high, the spectrum is resolved and the ladders are only coincidences
  let clusteredWithCharge = 0;
  for (const peak of clustered) {
    if (peak.charge !== undefined) clusteredWithCharge++;
  }
  const clusteredFraction = clustered.length > 0 ? clusteredWithCharge / clustered.length : 0;
  let withLadderCharge = null;
  if (clusteredFraction <= maxClusteredFraction) {
    const ladders = (0, getChargeLadders_js_1$1.getChargeLadders)(peaks, {
      ionizations,
      ...ladder,
      maxCharge
    });
    withLadderCharge = (0, getChargeLadders_js_1$1.assignLadderCharge)(peaks, ladders, precision);
  }
  const peaksWithCharge = [];
  for (let i = 0; i < peaks.length; i++) {
    const peak = peaks[i];
    // when a ladder explains the peak it wins over the isotopologue clusters,
    // which on an unresolved envelope only see a spurious low charge
    let charge = withLadderCharge === null ? undefined : withLadderCharge[i].charge;
    if (charge === undefined) {
      charge = getChargeAtMass(clustered, masses, peak.x, precision);
    }
    peaksWithCharge.push(charge === undefined ? {
      ...peak
    } : {
      ...peak,
      charge
    });
  }
  return peaksWithCharge;
}
/**
 * Charge of the clustered peak lying at a mass, if there is one there.
 * @param {Array} clustered - peaks carrying their charge, sorted by mass
 * @param {import('cheminfo-types').NumberArray} masses - their masses
 * @param {number} targetMass
 * @param {number} precision - in ppm
 * @returns {number|undefined}
 */
function getChargeAtMass(clustered, masses, targetMass, precision) {
  if (masses.length === 0) return undefined;
  const index = (0, ml_spectra_processing_1$b.xFindClosestIndex)(masses, targetMass);
  const peak = clustered[index];
  const tolerance = precision * 1e-6 * targetMass;
  if (Math.abs(peak.x - targetMass) > tolerance) return undefined;
  return peak.charge;
}

Object.defineProperty(getPeakChargeBySimilarity$1, "__esModule", {
  value: true
});
getPeakChargeBySimilarity$1.getPeakChargeBySimilarity = getPeakChargeBySimilarity;
getPeakChargeBySimilarity$1.getMinIntensity = getMinIntensity;
const ml_spectra_processing_1$a = require$$0$7;
const getPeaksWithCharge_js_1$1 = getPeaksWithCharge$1;
/**
 * Evaluate the charge of the peak observed at a mass.
 *
 * The charge is the one of the isotopologue cluster the peak belongs to, see
 * `getChargeClusters`. A peak on its own shows no charge: what shows it is the
 * series of peaks around it, separated by one dalton over the charge.
 * @param {import('./Spectrum.js').Spectrum} spectrum
 * @param {number} targetMass
 * @param {object}   [options={}]
 * @param {number}   [options.minCharge=1]
 * @param {number}   [options.maxCharge=10]
 * @param {number}   [options.precision=20] - tolerance on the position of an
 * isotopologue, in ppm
 * @param {number}   [options.minLength=3] - shortest series that shows a charge
 * @param {number}   [options.minSignalToNoise=10] - a peak under `median` plus
 * `minSignalToNoise` times the standard deviation of the noise takes no part in
 * the series: the position of a maximum of the noise is random and would give a
 * charge to what is only noise. Only for a continuous spectrum, a list of
 * centroids does not describe its noise anymore.
 * @returns {number|undefined} the charge, or undefined when no series of peaks
 * shows one at that mass
 */
function getPeakChargeBySimilarity(spectrum, targetMass, options = {}) {
  if (!spectrum || spectrum.data.x.length === 0) {
    throw new Error('You need to add an experimental spectrum first using setMassSpectrum');
  }
  const {
    minCharge = 1,
    maxCharge = 10,
    precision = 20
  } = options;
  const peaks = (0, getPeaksWithCharge_js_1$1.getPeaksWithCharge)(spectrum.getPeaks({
    threshold: 0
  }), {
    ...options,
    min: minCharge,
    max: maxCharge,
    minIntensity: getMinIntensity(spectrum, options)
  });
  const masses = new Float64Array(peaks.length);
  for (let i = 0; i < peaks.length; i++) masses[i] = peaks[i].x;
  return (0, getPeaksWithCharge_js_1$1.getChargeAtMass)(peaks, masses, targetMass, precision);
}
/**
 * Intensity under which a peak is too close to the noise to say anything about
 * a charge. The peak picking already removes what is under `median + 3 sd`, but
 * a gaussian noise still leaves some of its maxima over it.
 * @param {import('./Spectrum.js').Spectrum} spectrum
 * @param {object} [options={}]
 * @param {number} [options.minSignalToNoise=10]
 * @returns {number}
 */
function getMinIntensity(spectrum, options = {}) {
  const {
    minSignalToNoise = 10
  } = options;
  // the intensities of a list of centroids are signal, not noise: their median
  // and deviation describe the peaks themselves and would remove all of them
  if (!minSignalToNoise || !spectrum.isContinuous()) return 0;
  if (spectrum.cache.noise === undefined) {
    spectrum.cache.noise = (0, ml_spectra_processing_1$a.xNoiseStandardDeviation)(spectrum.data.y);
  }
  const {
    median,
    sd
  } = spectrum.cache.noise;
  return median + minSignalToNoise * sd;
}

var isContinuous$1 = {};

Object.defineProperty(isContinuous$1, "__esModule", {
  value: true
});
isContinuous$1.isContinuous = isContinuous;
isContinuous$1.defaultMaxDeltaX = defaultMaxDeltaX;
const ml_spectra_processing_1$9 = require$$0$7;
/**
 * When a spectrum is continous ?
 * - has more than 100 points
 * - deltaX change can not be more than a factor 2
 * - deltaX may not be larger than what `maxDeltaX` allows at that mass
 * - if y is zero it does not count
 * @param {object} spectrum
 * @param {object} [options={}]
 * @param {number} [options.minLength=100]
 * @param {number} [options.relativeHeightThreshold=0.001] // Under this value the
 * @param {number} [options.maxDeltaRatio=3]
 * @param {function} [options.maxDeltaX] - function called with the mass that
 * returns the largest step a profile spectrum may have there. Defaults to
 * `defaultMaxDeltaX`.
 */
function isContinuous(spectrum, options = {}) {
  const {
    minLength = 100,
    maxDeltaRatio = 3,
    relativeHeightThreshold = 0.001,
    maxDeltaX = defaultMaxDeltaX
  } = options;
  const minHeight = (0, ml_spectra_processing_1$9.xMaxValue)(spectrum.data.y) * relativeHeightThreshold;
  const minRadio = 1 / maxDeltaRatio;
  const maxRatio = 1 * maxDeltaRatio;
  if (spectrum.continuous === undefined) {
    let xs = spectrum.data.x;
    let ys = spectrum.data.y;
    if (xs.length < minLength) {
      spectrum.continuous = false;
    } else {
      let previousDelta = xs[1] - xs[0];
      spectrum.continuous = true;
      let success = 0;
      let failed = 0;
      for (let i = 0; i < xs.length - 1; i++) {
        if (ys[i] < minHeight || ys[i + 1] < minHeight) {
          previousDelta = 0;
          continue;
        }
        let delta = xs[i + 1] - xs[i];
        if (previousDelta) {
          let ratio = delta / previousDelta;
          const deltaLimit = maxDeltaX(xs[i]);
          if ((Math.abs(delta) > deltaLimit || ratio < minRadio || ratio > maxRatio) && ys[i] !== 0 && ys[i + 1] !== 0) {
            failed++;
          } else {
            success++;
          }
        }
        previousDelta = delta;
      }
      if (success / failed < 10) {
        spectrum.continuous = false;
      }
    }
  }
  return spectrum.continuous;
}
/**
 * Largest step a profile spectrum may have around a mass.
 *
 * A time of flight is sampled evenly in time and an orbitrap evenly in
 * frequency, so in both the m/z step grows with the m/z: a MALDI-TOF is sampled
 * every 0.19 Da around m/z 1000 and every 0.47 Da around m/z 6000, and is still
 * a profile spectrum. The step is therefore allowed to grow with the mass,
 * between two bounds:
 * - never under `0.1` Da, so that a spectrum of small molecules keeps the step
 *   it always had
 * - never over `0.6` Da, because the isotopologues of a singly charged ion are
 *   one dalton apart: over that a profile could not describe them, and a list
 *   of centroids would pass for one whatever its mass
 * @param {number} mass
 * @returns {number}
 */
function defaultMaxDeltaX(mass) {
  return Math.min(0.6, Math.max(0.1, mass * 0.0003));
}

var peakPicking$1 = {};

/**
 * Apply Savitzky Golay algorithm.
 * @param ys - Array of y values.
 * @param xs - Array of X or deltaX.
 * @param options - Options controlling window size, derivative and polynomial order.
 * @returns Array containing the new ys (same length).
 */
function sgg(ys, xs, options = {}) {
  const {
    windowSize = 9,
    derivative = 0,
    polynomial = 3
  } = options;
  if (windowSize % 2 === 0 || windowSize < 5 || !Number.isInteger(windowSize)) {
    throw new RangeError('Invalid window size (should be odd and at least 5 integer number)');
  }
  if (!isAnyArray$2(ys)) {
    throw new TypeError('Y values must be an array');
  }
  if (xs === undefined) {
    throw new TypeError('X must be defined');
  }
  if (windowSize > ys.length) {
    throw new RangeError(`Window size is higher than the data length ${windowSize}>${ys.length}`);
  }
  if (derivative < 0 || !Number.isInteger(derivative)) {
    throw new RangeError('Derivative should be a positive integer');
  }
  if (polynomial < 1 || !Number.isInteger(polynomial)) {
    throw new RangeError('Polynomial should be a positive integer');
  }
  if (polynomial >= 6) {
    // eslint-disable-next-line no-console
    console.warn('You should not use polynomial grade higher than 5 if you are' + ' not sure that your data arises from such a model. Possible polynomial oscillation problems');
  }
  const half = Math.floor(windowSize / 2);
  const np = ys.length;
  const ans = new Float64Array(np);
  const weights = fullWeights(windowSize, polynomial, derivative);
  let hs = 0;
  let constantH = true;
  if (isAnyArray$2(xs)) {
    constantH = false;
  } else {
    hs = xs ** derivative;
  }
  //For the borders
  for (let i = 0; i < half; i++) {
    const wg1 = weights[half - i - 1];
    const wg2 = weights[half + i + 1];
    let d1 = 0;
    let d2 = 0;
    for (let l = 0; l < windowSize; l++) {
      d1 += wg1[l] * ys[l];
      d2 += wg2[l] * ys[np - windowSize + l];
    }
    if (constantH) {
      ans[half - i - 1] = d1 / hs;
      ans[np - half + i] = d2 / hs;
    } else {
      hs = getHs(xs, half - i - 1, half, derivative);
      ans[half - i - 1] = d1 / hs;
      hs = getHs(xs, np - half + i, half, derivative);
      ans[np - half + i] = d2 / hs;
    }
  }
  //For the internal points
  const wg = weights[half];
  for (let i = windowSize; i <= np; i++) {
    let d = 0;
    for (let l = 0; l < windowSize; l++) d += wg[l] * ys[l + i - windowSize];
    if (!constantH) {
      hs = getHs(xs, i - half - 1, half, derivative);
    }
    ans[i - half - 1] = d / hs;
  }
  return ans;
}
function getHs(h, center, half, derivative) {
  let hs = 0;
  let count = 0;
  for (let i = center - half; i < center + half; i++) {
    if (i >= 0 && i < h.length - 1) {
      hs += h[i + 1] - h[i];
      count++;
    }
  }
  return (hs / count) ** derivative;
}
function gramPoly(i, m, k, s) {
  let Grampoly = 0;
  if (k > 0) {
    Grampoly = (4 * k - 2) / (k * (2 * m - k + 1)) * (i * gramPoly(i, m, k - 1, s) + s * gramPoly(i, m, k - 1, s - 1)) - (k - 1) * (2 * m + k) / (k * (2 * m - k + 1)) * gramPoly(i, m, k - 2, s);
  } else if (k === 0 && s === 0) {
    Grampoly = 1;
  } else {
    Grampoly = 0;
  }
  return Grampoly;
}
function genFact(a, b) {
  let gf = 1;
  if (a >= b) {
    for (let j = a - b + 1; j <= a; j++) {
      gf *= j;
    }
  }
  return gf;
}
function weight(i, t, m, n, s) {
  let sum = 0;
  for (let k = 0; k <= n; k++) {
    sum += (2 * k + 1) * (genFact(2 * m, k) / genFact(2 * m + k + 1, k + 1)) * gramPoly(i, m, k, 0) * gramPoly(t, m, k, s);
  }
  return sum;
}
/**
 * Compute the full weights matrix for every position inside the window.
 * @param m - Number of points.
 * @param n - Polynomial grade.
 * @param s - Derivative.
 * @returns Array of Float64Array weight vectors, one per position in the window.
 */
function fullWeights(m, n, s) {
  const weights = new Array(m);
  const np = Math.floor(m / 2);
  for (let t = -np; t <= np; t++) {
    weights[t + np] = new Float64Array(m);
    for (let j = -np; j <= np; j++) {
      weights[t + np][j + np] = weight(j, t, np, n, s);
    }
  }
  return weights;
}

/**
 * Compute the `[left, right]` intervals around each peak by locating
 * consecutive extrema (minima / maxima) of the first derivative.
 * @param y - Spectrum y values.
 * @param x - Spectrum x values.
 * @param dY - First derivative of `y`.
 * @param dX - Sign of the x step (positive for increasing x, negative otherwise).
 * @returns `intervalL` / `intervalR` arrays defining each peak's inflection-point bounds.
 */
function getMinMaxIntervalsDy(y, x, dY, dX) {
  let lastMax = null;
  let lastMin = null;
  const intervalL = [];
  const intervalR = [];
  for (let i = 1; i < y.length - 1; ++i) {
    if (dY[i] < dY[i - 1] && dY[i] <= dY[i + 1] || dY[i] <= dY[i - 1] && dY[i] < dY[i + 1]) {
      lastMin = {
        x: x[i],
        index: i
      };
      if (dX > 0 && lastMax !== null) {
        intervalL.push(lastMax);
        intervalR.push(lastMin);
      }
    }
    // Maximum in first derivative
    if (dY[i] >= dY[i - 1] && dY[i] > dY[i + 1] || dY[i] > dY[i - 1] && dY[i] >= dY[i + 1]) {
      lastMax = {
        x: x[i],
        index: i
      };
      if (dX < 0 && lastMin !== null) {
        intervalL.push(lastMax);
        intervalR.push(lastMin);
      }
    }
  }
  return {
    intervalL,
    intervalR
  };
}

/**
 * Find the `minData` index closest to the center of one interval,
 * above the intensity threshold and bounded by the half-width.
 * @param options - Interval, candidate indices and spectrum data.
 * @returns The picked candidate (`possible`) and the last visited index (`lastIndex`).
 */
function tryMatchOneIntervalWithMinData(options) {
  const {
    x,
    lastK,
    minData,
    yThreshold,
    intervalWidth,
    intervalCenter,
    yData
  } = options;
  let minDistance = Number.POSITIVE_INFINITY;
  let possible = -1;
  let newLastIndex = lastK;
  for (let k = newLastIndex + 1; k < minData.length; k++) {
    const centerIndex = minData[k];
    if (yData[centerIndex] <= yThreshold) {
      continue;
    }
    const deltaX = x[centerIndex];
    const currentDistance = Math.abs(deltaX - intervalCenter);
    if (currentDistance < intervalWidth) {
      if (currentDistance < minDistance) {
        possible = k;
      }
      newLastIndex = k;
    }
    if (currentDistance >= minDistance) break;
    minDistance = currentDistance;
  }
  return {
    lastIndex: newLastIndex,
    possible
  };
}

/**
 * Peak detection that combines first-derivative zero-crossings and
 * second-derivative local minima to find peaks inside each interval.
 * @param input - Spectrum values together with its first and second derivatives.
 * @returns The detected peaks.
 */
function autoAlgorithm(input) {
  const {
    x,
    y,
    yData,
    dY,
    ddY,
    dX,
    yThreshold
  } = input;
  const minddY = [];
  const crossDy = [];
  const {
    intervalL,
    intervalR
  } = getMinMaxIntervalsDy(y, x, dY, dX);
  for (let i = 1; i < y.length - 1; ++i) {
    if (dY[i] < 0 && dY[i + 1] > 0 || dY[i] > 0 && dY[i + 1] < 0) {
      // push the index of the element closer to zero
      crossDy.push(Math.abs(dY[i]) < Math.abs(dY[i + 1]) ? i : i + 1);
    }
    // Handle exact zero
    if (dY[i] === 0 && dY[i] < Math.abs(dY[i + 1]) && dY[i] < Math.abs(dY[i - 1])) {
      crossDy.push(i);
    }
    // Minimum in second derivative
    if (ddY[i] < ddY[i - 1] && ddY[i] < ddY[i + 1]) {
      minddY.push(i);
    }
  }
  const peaks = [];
  let lastK = -1;
  let lastJ = -1;
  for (let i = 0; i < intervalL.length; i++) {
    const intervalWidth = (intervalR[i].x - intervalL[i].x) / 2;
    const intervalCenter = (intervalR[i].x + intervalL[i].x) / 2;
    let yIndex = -1;
    let match = tryMatchOneIntervalWithMinData({
      x,
      yData,
      lastK,
      yThreshold,
      intervalWidth,
      intervalCenter,
      minData: crossDy
    });
    lastK = match.lastIndex;
    if (match.possible !== -1) {
      yIndex = crossDy[match.possible];
    } else {
      match = tryMatchOneIntervalWithMinData({
        x,
        yData,
        yThreshold,
        lastK: lastJ,
        intervalWidth,
        intervalCenter,
        minData: minddY
      });
      if (match.possible !== -1) {
        yIndex = minddY[match.possible];
      }
      lastJ = match.lastIndex;
    }
    if (yIndex !== -1) {
      const width = Math.abs(intervalR[i].x - intervalL[i].x);
      peaks.push({
        id: crypto.randomUUID(),
        x: x[yIndex],
        y: y[yIndex],
        width,
        index: yIndex,
        ddY: ddY[yIndex],
        inflectionPoints: {
          from: intervalL[i],
          to: intervalR[i]
        }
      });
    }
  }
  return peaks;
}

/**
 * Build the list of detected peaks by matching each `[left, right]` interval
 * with the best candidate index from `minData`.
 * @param options - Intervals, candidate indices and spectrum data.
 * @returns The detected peaks.
 */
function getPeakFromIntervals(options) {
  let lastK = -1;
  const peaks = [];
  const {
    x,
    ddY,
    yData,
    yThreshold,
    intervalR,
    intervalL,
    minData
  } = options;
  for (let i = 0; i < intervalL.length; i++) {
    const intervalWidth = (intervalR[i].x - intervalL[i].x) / 2;
    const intervalCenter = (intervalR[i].x + intervalL[i].x) / 2;
    const {
      possible,
      lastIndex
    } = tryMatchOneIntervalWithMinData({
      x,
      lastK,
      minData,
      yThreshold,
      intervalWidth,
      intervalCenter,
      yData
    });
    if (possible !== -1) {
      const centerIndex = minData[possible];
      const width = Math.abs(intervalR[i].x - intervalL[i].x);
      peaks.push({
        id: crypto.randomUUID(),
        x: x[centerIndex],
        y: yData[centerIndex],
        width,
        index: centerIndex,
        ddY: ddY[centerIndex],
        inflectionPoints: {
          from: intervalL[i],
          to: intervalR[i]
        }
      });
    }
    lastK = lastIndex;
  }
  return peaks;
}

/**
 * Finds the indices where the first derivative crosses zero (sign change),
 * which are potential peak positions. This function does not detect zero-crossings
 * in regions with consecutive zero values in the derivative (flat regions).
 * @param input - Object containing the y values and their first derivative (dY).
 * @returns Array of indices where the first derivative crosses zero (excluding consecutive zeros).
 */
function xGetCrossZeroPoints(input) {
  const {
    y,
    dY
  } = input;
  const crossDy = [];
  for (let i = 1; i < y.length - 1; ++i) {
    if (isLessAndGreaterThanZero(dY[i], dY[i + 1])) {
      // push the index of the element closer to zero
      crossDy.push(Math.abs(dY[i]) < Math.abs(dY[i + 1]) ? i : i + 1);
    } else if (
    // Handle exact zero
    dY[i] === 0 && isLessAndGreaterThanZero(dY[i - 1], dY[i + 1])) {
      crossDy.push(i);
    }
  }
  return crossDy;
}
function isLessAndGreaterThanZero(back, next) {
  return back < 0 && next > 0 || back > 0 && next < 0;
}

/**
 * Detect peaks using zero-crossings of the first derivative.
 * @param input - Spectrum values and its first/second derivatives.
 * @returns The detected peaks.
 */
function firstDerivative(input) {
  const {
    y,
    x,
    dY,
    dX,
    yData,
    yThreshold,
    ddY
  } = input;
  const crossDy = xGetCrossZeroPoints(input);
  const {
    intervalL,
    intervalR
  } = getMinMaxIntervalsDy(y, x, dY, dX);
  return getPeakFromIntervals({
    minData: crossDy,
    intervalL,
    intervalR,
    x,
    yData,
    yThreshold,
    ddY
  });
}

/**
 * Detect peaks using local minima of the second derivative (inflection points).
 * @param input - Spectrum values and its first/second derivatives.
 * @returns The detected peaks.
 */
function secondDerivative(input) {
  const {
    x,
    y,
    yData,
    dY,
    ddY,
    dX,
    yThreshold
  } = input;
  const minddY = [];
  const {
    intervalL,
    intervalR
  } = getMinMaxIntervalsDy(y, x, dY, dX);
  // By the intermediate value theorem We cannot find 2 consecutive maximum or minimum
  for (let i = 1; i < y.length - 1; ++i) {
    // Minimum in second derivative
    if (ddY[i] < ddY[i - 1] && ddY[i] < ddY[i + 1]) {
      minddY.push(i);
    }
  }
  return getPeakFromIntervals({
    minData: minddY,
    intervalL,
    intervalR,
    x,
    yData,
    yThreshold,
    ddY
  });
}

/**
 * Refine the `x` and `y` coordinates of each peak by running a quadratic
 * interpolation over the peak and its 3 closest neighbors.
 * The correction is performed in place.
 * @param data - Object with `x` and `y` arrays.
 * @param peaks - Peaks to refine (mutated in place).
 */
function optimizeTop(data, peaks) {
  const {
    x,
    y
  } = data;
  for (const peak of peaks) {
    let currentIndex = peak.index;
    // The detected peak could be moved 1 or 2 units to left or right.
    if (y[currentIndex - 1] >= y[currentIndex - 2] && y[currentIndex - 1] >= y[currentIndex]) {
      currentIndex--;
    } else if (y[currentIndex + 1] >= y[currentIndex] && y[currentIndex + 1] >= y[currentIndex + 2]) {
      currentIndex++;
    } else if (y[currentIndex - 2] >= y[currentIndex - 3] && y[currentIndex - 2] >= y[currentIndex - 1]) {
      currentIndex -= 2;
    } else if (y[currentIndex + 2] >= y[currentIndex + 1] && y[currentIndex + 2] >= y[currentIndex + 3]) {
      currentIndex += 2;
    }
    // Quadratic interpolation on log-intensities to refine the peak top.
    if (y[currentIndex - 1] > 0 && y[currentIndex + 1] > 0 && y[currentIndex] >= y[currentIndex - 1] && y[currentIndex] >= y[currentIndex + 1] && (y[currentIndex] !== y[currentIndex - 1] || y[currentIndex] !== y[currentIndex + 1])) {
      const alpha = Math.log10(y[currentIndex - 1]);
      const beta = Math.log10(y[currentIndex]);
      const gamma = Math.log10(y[currentIndex + 1]);
      const p = 0.5 * (alpha - gamma) / (alpha - 2 * beta + gamma);
      const xCurrent = x[currentIndex];
      const xPrevious = x[currentIndex - 1];
      peak.x = xCurrent + (xCurrent - xPrevious) * p;
      peak.y = y[currentIndex] - 0.25 * (y[currentIndex - 1] - y[currentIndex + 1]) * p;
    }
  }
}

/**
 * Global spectra deconvolution.
 * @param data - Object with `x` and `y` arrays. `x` must be monotone increasing.
 * @param options - Peak detection options.
 * @returns The detected peaks, sorted by ascending `x`.
 */
function gsd(data, options = {}) {
  let {
    noiseLevel
  } = options;
  const {
    sgOptions = {
      windowSize: 9,
      polynomial: 3
    },
    smoothY = false,
    maxCriteria = true,
    maxAbsoluteRatio = 0,
    minMaxRatio = 0.00025,
    realTopDetection = false,
    peakDetectionAlgorithm = 'second'
  } = options;
  if (maxAbsoluteRatio < 0 || maxAbsoluteRatio > 1) {
    throw new Error('maxAbsoluteRatio must be between 0 and 1');
  }
  const {
    x
  } = data;
  let {
    y
  } = data;
  if (xIsMonotonic(x) !== 1) {
    throw new Error('GSD only accepts monotone increasing x values');
  }
  // Copy so the `maxCriteria` / clipping loops below don't mutate the caller's array.
  y = y.slice();
  // If the max difference between delta x is less than 5%, then,
  // we can assume it to be equally spaced variable
  const isEquallySpaced = xIsEquallySpaced(x);
  if (noiseLevel === undefined) {
    if (isEquallySpaced) {
      const noiseInfo = xNoiseStandardDeviation(y);
      if (maxCriteria) {
        noiseLevel = noiseInfo.median + 1.5 * noiseInfo.sd;
      } else {
        noiseLevel = -noiseInfo.median + 1.5 * noiseInfo.sd;
      }
    } else {
      noiseLevel = 0;
    }
  } else if (!maxCriteria) {
    noiseLevel *= -1;
  }
  if (!maxCriteria) {
    for (let i = 0; i < y.length; i++) {
      y[i] = -y[i];
    }
  }
  const maxAbsoluteValue = maxAbsoluteRatio > 0 ? maxAbsoluteRatio * xMaxAbsoluteValue(y) : noiseLevel;
  if (noiseLevel !== undefined) {
    for (let i = 0; i < y.length; i++) {
      if (y[i] < noiseLevel) {
        y[i] = noiseLevel;
      }
    }
  }
  const xValue = isEquallySpaced ? x[1] - x[0] : x;
  const yData = smoothY ? sgg(y, xValue, {
    ...sgOptions,
    derivative: 0
  }) : y;
  const {
    min: minY,
    max: maxY
  } = xMinMaxValues(yData);
  if (minY > maxY || minY === maxY) return [];
  const dY = sgg(y, xValue, {
    ...sgOptions,
    derivative: 1
  });
  const ddY = sgg(y, xValue, {
    ...sgOptions,
    derivative: 2
  });
  const yThreshold = xMaxValue([noiseLevel, minY + (maxY - minY) * minMaxRatio, maxAbsoluteValue]);
  const dX = x[1] - x[0];
  const peakData = {
    x,
    y,
    yData,
    dY,
    ddY,
    dX,
    yThreshold
  };
  let peaks = [];
  if (peakDetectionAlgorithm === 'first') {
    peaks = firstDerivative(peakData);
  } else if (peakDetectionAlgorithm === 'second') {
    peaks = secondDerivative(peakData);
  } else {
    peaks = autoAlgorithm(peakData);
  }
  if (realTopDetection) {
    optimizeTop({
      x,
      y: yData
    }, peaks);
  }
  for (const peak of peaks) {
    if (!maxCriteria) {
      peak.y *= -1;
      peak.ddY = peak.ddY * -1;
    }
  }
  peaks.sort((a, b) => {
    return a.x - b.x;
  });
  return peaks;
}

const GAUSSIAN_EXP_FACTOR = -4 * Math.LN2;
const ROOT_PI_OVER_LN2 = Math.sqrt(Math.PI / Math.LN2);
const ROOT_THREE = Math.sqrt(3);
const ROOT_2LN2 = Math.sqrt(2 * Math.LN2);
const ROOT_2LN2_MINUS_ONE = Math.sqrt(2 * Math.LN2) - 1;

// https://en.wikipedia.org/wiki/Error_function#Inverse_functions
// This code yields to a good approximation
// If needed a better implementation using polynomial can be found on https://en.wikipedia.org/wiki/Error_function#Inverse_functions
/**
 * Approximate inverse error function.
 * @param x - value in the range (-1, 1).
 * @returns erfinv(x).
 * @see https://en.wikipedia.org/wiki/Error_function#Inverse_functions
 */
function erfinv(x) {
  const a = 0.147;
  if (x === 0) return 0;
  const ln1MinusXSqrd = Math.log(1 - x * x);
  const lnEtcBy2Plus2 = ln1MinusXSqrd / 2 + 2 / (Math.PI * a);
  const firstSqrt = Math.sqrt(lnEtcBy2Plus2 ** 2 - ln1MinusXSqrd / a);
  const secondSqrt = Math.sqrt(firstSqrt - lnEtcBy2Plus2);
  return secondSqrt * (x > 0 ? 1 : -1);
}

class Gaussian {
  /**
   * Full width at half maximum.
   * @default 500
   */
  fwhm;
  constructor(options = {}) {
    const {
      fwhm = 500,
      sd
    } = options;
    this.fwhm = sd ? gaussianWidthToFWHM(2 * sd) : fwhm;
  }
  fwhmToWidth(fwhm = this.fwhm) {
    return gaussianFwhmToWidth(fwhm);
  }
  widthToFWHM(width) {
    return gaussianWidthToFWHM(width);
  }
  fct(x) {
    return gaussianFct(x, this.fwhm);
  }
  getArea(height = calculateGaussianHeight({
    fwhm: this.fwhm
  })) {
    return getGaussianArea({
      fwhm: this.fwhm,
      height
    });
  }
  getFactor(area) {
    return getGaussianFactor(area);
  }
  getData(options = {}) {
    return getGaussianData(this, options);
  }
  calculateHeight(area = 1) {
    return calculateGaussianHeight({
      fwhm: this.fwhm,
      area
    });
  }
  getParameters() {
    return ['fwhm'];
  }
  derivative(x) {
    const {
      fct,
      dx,
      dFwhm
    } = gaussianDerivative(x, this.fwhm);
    return {
      fct,
      dx,
      parameters: [dFwhm]
    };
  }
}
/**
 * Calculate the peak height for a given area and fwhm.
 * @param options - fwhm, area, and optional sd.
 * @returns the peak height.
 */
function calculateGaussianHeight(options) {
  const {
    area = 1,
    sd
  } = options;
  let {
    fwhm = 500
  } = options;
  if (sd) fwhm = gaussianWidthToFWHM(2 * sd);
  return 2 * area / ROOT_PI_OVER_LN2 / fwhm;
}
/**
 * Evaluate the gaussian function centered at x=0.
 * @param x - position at which to evaluate.
 * @param fwhm - full width at half maximum.
 * @returns the intensity at x.
 */
function gaussianFct(x, fwhm) {
  return Math.exp(GAUSSIAN_EXP_FACTOR * (x / fwhm) ** 2);
}
/**
 * Analytical value and partial derivatives of the gaussian function centered at x=0.
 * @param x - position at which to evaluate.
 * @param fwhm - full width at half maximum.
 * @returns the value `fct` and its partial derivatives with respect to `x` (`dx`) and `fwhm` (`dFwhm`).
 */
function gaussianDerivative(x, fwhm) {
  const fct = gaussianFct(x, fwhm);
  const dx = 2 * GAUSSIAN_EXP_FACTOR * x / (fwhm * fwhm) * fct;
  const dFwhm = -2 * GAUSSIAN_EXP_FACTOR * x * x / (fwhm * fwhm * fwhm) * fct;
  return {
    fct,
    dx,
    dFwhm
  };
}
/**
 * Convert inflection-point width to full width at half maximum.
 * @param width - width between inflection points.
 * @returns full width at half maximum.
 */
function gaussianWidthToFWHM(width) {
  return width * ROOT_2LN2;
}
/**
 * Convert full width at half maximum to inflection-point width.
 * @param fwhm - full width at half maximum.
 * @returns width between inflection points.
 */
function gaussianFwhmToWidth(fwhm) {
  return fwhm / ROOT_2LN2;
}
/**
 * Calculate the area under a gaussian peak.
 * @param options - fwhm, height, and optional sd.
 * @returns the area.
 */
function getGaussianArea(options) {
  const {
    sd,
    height = 1
  } = options;
  let {
    fwhm = 500
  } = options;
  if (sd) fwhm = gaussianWidthToFWHM(2 * sd);
  return height * ROOT_PI_OVER_LN2 * fwhm / 2;
}
/**
 * Calculate the half-width factor corresponding to a given area coverage fraction.
 * @param area - target area fraction (0–1). Defaults to `0.9999`.
 * @returns the factor by which to multiply fwhm to cover the given area.
 */
function getGaussianFactor(area = 0.9999) {
  return Math.sqrt(2) * erfinv(area);
}
/**
 * Generate an intensity array for a gaussian shape.
 * @param shape - gaussian shape parameters (fwhm, sd).
 * @param options - sampling options (length, factor, height).
 * @returns Float64Array of intensity values.
 */
function getGaussianData(shape = {}, options = {}) {
  const {
    sd
  } = shape;
  let {
    fwhm = 500
  } = shape;
  if (sd) fwhm = gaussianWidthToFWHM(2 * sd);
  const {
    factor = getGaussianFactor(),
    height = calculateGaussianHeight({
      fwhm
    })
  } = options;
  let {
    length
  } = options;
  if (!length) {
    length = Math.min(Math.ceil(fwhm * factor), 2 ** 25 - 1);
    if (length % 2 === 0) length++;
  }
  const center = (length - 1) / 2;
  const data = new Float64Array(length);
  for (let i = 0; i <= center; i++) {
    const value = gaussianFct(i - center, fwhm) * height;
    data[i] = value;
    data[length - 1 - i] = value;
  }
  return data;
}

class Lorentzian {
  /**
   * Full width at half maximum.
   * @default 500
   */
  fwhm;
  constructor(options = {}) {
    const {
      fwhm = 500
    } = options;
    this.fwhm = fwhm;
  }
  fwhmToWidth(fwhm = this.fwhm) {
    return lorentzianFwhmToWidth(fwhm);
  }
  widthToFWHM(width) {
    return lorentzianWidthToFWHM(width);
  }
  fct(x) {
    return lorentzianFct(x, this.fwhm);
  }
  getArea(height = 1) {
    return getLorentzianArea({
      fwhm: this.fwhm,
      height
    });
  }
  getFactor(area) {
    return getLorentzianFactor(area);
  }
  getData(options = {}) {
    return getLorentzianData(this, options);
  }
  calculateHeight(area = 1) {
    return calculateLorentzianHeight({
      fwhm: this.fwhm,
      area
    });
  }
  getParameters() {
    return ['fwhm'];
  }
  derivative(x) {
    const {
      fct,
      dx,
      dFwhm
    } = lorentzianDerivative(x, this.fwhm);
    return {
      fct,
      dx,
      parameters: [dFwhm]
    };
  }
}
const calculateLorentzianHeight = ({
  fwhm = 1,
  area = 1
}) => {
  return 2 * area / Math.PI / fwhm;
};
const getLorentzianArea = options => {
  const {
    fwhm = 500,
    height = 1
  } = options;
  return height * Math.PI * fwhm / 2;
};
const lorentzianFct = (x, fwhm) => {
  return fwhm ** 2 / (4 * x ** 2 + fwhm ** 2);
};
/**
 * Analytical value and partial derivatives of the lorentzian function centered at x=0.
 * @param x - position at which to evaluate.
 * @param fwhm - full width at half maximum.
 * @returns the value `fct` and its partial derivatives with respect to `x` (`dx`) and `fwhm` (`dFwhm`).
 */
function lorentzianDerivative(x, fwhm) {
  const denominator = 4 * x * x + fwhm * fwhm;
  const fct = fwhm * fwhm / denominator;
  const dx = -8 * x * fwhm * fwhm / (denominator * denominator);
  const dFwhm = 8 * fwhm * x * x / (denominator * denominator);
  return {
    fct,
    dx,
    dFwhm
  };
}
const lorentzianWidthToFWHM = width => {
  return width * ROOT_THREE;
};
const lorentzianFwhmToWidth = fwhm => {
  return fwhm / ROOT_THREE;
};
const lorentzianQuantile = p => Math.tan(Math.PI * (p - 0.5));
const getLorentzianFactor = (area = 0.9999) => {
  if (area >= 1) {
    throw new Error('area should be (0 - 1)');
  }
  const halfResidual = (1 - area) * 0.5;
  return (lorentzianQuantile(1 - halfResidual) - lorentzianQuantile(halfResidual)) / 2;
};
const getLorentzianData = (shape = {}, options = {}) => {
  const {
    fwhm = 500
  } = shape;
  const {
    factor = getLorentzianFactor(),
    height = calculateLorentzianHeight({
      fwhm,
      area: 1
    })
  } = options;
  let {
    length
  } = options;
  if (!length) {
    length = Math.min(Math.ceil(fwhm * factor), 2 ** 25 - 1);
    if (length % 2 === 0) length++;
  }
  const center = (length - 1) / 2;
  const data = new Float64Array(length);
  for (let i = 0; i <= center; i++) {
    const value = lorentzianFct(i - center, fwhm) * height;
    data[i] = value;
    data[length - 1 - i] = value;
  }
  return data;
};

class LorentzianDispersive {
  /**
   * Full width at half maximum.
   * @default 500
   */
  fwhm;
  constructor(options = {}) {
    const {
      fwhm = 500
    } = options;
    this.fwhm = fwhm;
  }
  fwhmToWidth(fwhm = this.fwhm) {
    return lorentzianFwhmToWidth(fwhm);
  }
  widthToFWHM(width) {
    return lorentzianWidthToFWHM(width);
  }
  fct(x) {
    return lorentzianDispersiveFct(x, this.fwhm);
  }
  getArea() {
    return 0;
  }
  getFactor(area) {
    return getLorentzianFactor(area);
  }
  getData(options = {}) {
    return getLorentzianDispersiveData(this, options);
  }
  calculateHeight(area = 1) {
    return calculateLorentzianHeight({
      fwhm: this.fwhm,
      area
    });
  }
  getParameters() {
    return ['fwhm'];
  }
  derivative(x) {
    const {
      fct,
      dx,
      dFwhm
    } = lorentzianDispersiveDerivative(x, this.fwhm);
    return {
      fct,
      dx,
      parameters: [dFwhm]
    };
  }
}
const lorentzianDispersiveFct = (x, fwhm) => {
  return 2 * fwhm * x / (4 * x ** 2 + fwhm ** 2);
};
/**
 * Analytical value and partial derivatives of the dispersive lorentzian function centered at x=0.
 * @param x - position at which to evaluate.
 * @param fwhm - full width at half maximum.
 * @returns the value `fct` and its partial derivatives with respect to `x` (`dx`) and `fwhm` (`dFwhm`).
 */
function lorentzianDispersiveDerivative(x, fwhm) {
  const denominator = 4 * x * x + fwhm * fwhm;
  const fct = 2 * fwhm * x / denominator;
  const dx = 2 * fwhm * (fwhm * fwhm - 4 * x * x) / (denominator * denominator);
  const dFwhm = 2 * x * (4 * x * x - fwhm * fwhm) / (denominator * denominator);
  return {
    fct,
    dx,
    dFwhm
  };
}
const getLorentzianDispersiveData = (shape = {}, options = {}) => {
  const {
    fwhm = 500
  } = shape;
  const {
    factor = getLorentzianFactor(),
    height = calculateLorentzianHeight({
      fwhm,
      area: 1
    })
  } = options;
  let {
    length
  } = options;
  if (!length) {
    length = Math.min(Math.ceil(fwhm * factor), 2 ** 25 - 1);
    if (length % 2 === 0) length++;
  }
  const center = (length - 1) / 2;
  const data = new Float64Array(length);
  for (let i = 0; i <= center; i++) {
    const value = lorentzianDispersiveFct(i - center, fwhm) * height;
    data[i] = value;
    data[length - 1 - i] = -value;
  }
  return data;
};

/**
 * Find the k factor for a pseudo-Voigt distribution such that the
 * cumulative probability pPseudoVoigt(k, mu) equals `pTarget`.
 *
 * Uses a simple bisection search (with exponential bracketing) to
 * invert the pseudo-Voigt cumulative function. Special cases:
 * - mu === 1 -> reduces to the gaussian case
 * - mu === 0 -> reduces to the lorentzian case
 * @param pTarget - Target cumulative probability in (0,1)
 * @param mu - Gaussian fraction in [0,1]
 * @param tol - Convergence tolerance
 * @param maxIter - Maximum number of bisection iterations
 * @returns the factor k such that pPseudoVoigt(k, mu) ~= pTarget
 */
function pseudoVoigtFindFactor(pTarget, mu, tol = 1e-9, maxIter = 200) {
  if (pTarget <= 0 || pTarget >= 1) {
    throw new RangeError('pTarget must be in (0,1)');
  }
  if (mu === 1) {
    return getGaussianFactor(pTarget);
  } else if (mu === 0) {
    return getLorentzianFactor(pTarget);
  }
  // bisection
  let lo = 0;
  let hi = 10;
  let it = 0;
  while (pPseudoVoigt(hi, mu) < pTarget && it++ < 200) hi *= 2;
  for (let i = 0; i < maxIter; i++) {
    const mid = 0.5 * (lo + hi);
    const val = pPseudoVoigt(mid, mu);
    if (Math.abs(val - pTarget) < tol) return mid;
    if (val < pTarget) {
      lo = mid;
    } else {
      hi = mid;
    }
  }
  return 0.5 * (lo + hi);
}
function erf(x) {
  const sign = x < 0 ? -1 : 1;
  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 = 1 - ((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t * Math.exp(-x * x);
  return sign * y;
}
const sqrtLn2 = Math.sqrt(Math.log(2));
function pGaussian(k) {
  return erf(k * sqrtLn2);
}
function pLorentz(k) {
  return 2 / Math.PI * Math.atan(k);
}
function pPseudoVoigt(k, mu) {
  return (1 - mu) * pLorentz(k) + mu * pGaussian(k);
}

class PseudoVoigt {
  fwhm;
  /**
   * Ratio of gaussian contribution in the shape
   * @default 0.5
   */
  mu;
  constructor(options = {}) {
    const {
      fwhm = 500,
      mu = 0.5
    } = options;
    this.mu = mu;
    this.fwhm = fwhm;
  }
  fwhmToWidth(fwhm = this.fwhm, mu = this.mu) {
    return pseudoVoigtFwhmToWidth(fwhm, mu);
  }
  widthToFWHM(width, mu = this.mu) {
    return pseudoVoigtWidthToFWHM(width, mu);
  }
  fct(x) {
    return pseudoVoigtFct(x, this.fwhm, this.mu);
  }
  getArea(height = 1) {
    return getPseudoVoigtArea({
      fwhm: this.fwhm,
      height,
      mu: this.mu
    });
  }
  getFactor(area) {
    return getPseudoVoigtFactor(area, this.mu);
  }
  getData(options = {}) {
    const {
      length,
      factor,
      height = calculatePseudoVoigtHeight({
        fwhm: this.fwhm,
        mu: this.mu,
        area: 1
      })
    } = options;
    return getPseudoVoigtData(this, {
      factor,
      length,
      height
    });
  }
  calculateHeight(area = 1) {
    return calculatePseudoVoigtHeight({
      fwhm: this.fwhm,
      mu: this.mu,
      area
    });
  }
  getParameters() {
    return ['fwhm', 'mu'];
  }
  derivative(x) {
    const {
      fct,
      dx,
      dFwhm,
      dMu
    } = pseudoVoigtDerivative(x, this.fwhm, this.mu);
    return {
      fct,
      dx,
      parameters: [dFwhm, dMu]
    };
  }
}
const calculatePseudoVoigtHeight = (options = {}) => {
  const {
    fwhm = 1,
    mu = 0.5,
    area = 1
  } = options;
  return 2 * area / (fwhm * (mu * ROOT_PI_OVER_LN2 + (1 - mu) * Math.PI));
};
const pseudoVoigtFct = (x, fwhm, mu) => {
  return (1 - mu) * lorentzianFct(x, fwhm) + mu * gaussianFct(x, fwhm);
};
/**
 * Analytical value and partial derivatives of the pseudo-Voigt function centered at x=0.
 * @param x - position at which to evaluate.
 * @param fwhm - full width at half maximum.
 * @param mu - ratio of gaussian contribution in the shape.
 * @returns the value `fct` and its partial derivatives with respect to `x` (`dx`), `fwhm` (`dFwhm`) and `mu` (`dMu`).
 */
function pseudoVoigtDerivative(x, fwhm, mu) {
  // gaussian and lorentzian derivative math is inlined (rather than calling
  // gaussianDerivative / lorentzianDerivative) to allocate a single object on
  // this hot path; the sub-calls would allocate three.
  const e = Math.exp(GAUSSIAN_EXP_FACTOR * (x / fwhm) ** 2);
  const denominator = 4 * x * x + fwhm * fwhm;
  const lorentz = fwhm * fwhm / denominator;
  const dEdt = 2 * GAUSSIAN_EXP_FACTOR * x / (fwhm * fwhm) * e;
  const dLdt = -8 * x * fwhm * fwhm / (denominator * denominator);
  const dEdfwhm = -2 * GAUSSIAN_EXP_FACTOR * x * x / (fwhm * fwhm * fwhm) * e;
  const dLdfwhm = 8 * fwhm * x * x / (denominator * denominator);
  return {
    fct: (1 - mu) * lorentz + mu * e,
    dx: (1 - mu) * dLdt + mu * dEdt,
    dFwhm: (1 - mu) * dLdfwhm + mu * dEdfwhm,
    dMu: e - lorentz
  };
}
const pseudoVoigtWidthToFWHM = (width, mu = 0.5) => {
  return width * (mu * ROOT_2LN2_MINUS_ONE + 1);
};
const pseudoVoigtFwhmToWidth = (fwhm, mu = 0.5) => {
  return fwhm / (mu * ROOT_2LN2_MINUS_ONE + 1);
};
const getPseudoVoigtArea = options => {
  const {
    fwhm = 500,
    height = 1,
    mu = 0.5
  } = options;
  return fwhm * height * (mu * ROOT_PI_OVER_LN2 + (1 - mu) * Math.PI) / 2;
};
const getPseudoVoigtFactor = (area = 0.9999, mu = 0.5) => {
  return pseudoVoigtFindFactor(area, mu);
};
const getPseudoVoigtData = (shape = {}, options = {}) => {
  const {
    fwhm = 500,
    mu = 0.5
  } = shape;
  const {
    factor = getPseudoVoigtFactor(0.999, mu)
  } = options;
  let {
    length,
    height = calculatePseudoVoigtHeight({
      fwhm,
      mu,
      area: 1
    })
  } = options;
  if (!height) {
    height = 1 / (mu / Math.sqrt(-GAUSSIAN_EXP_FACTOR / Math.PI) * fwhm + (1 - mu) * fwhm * Math.PI / 2);
  }
  if (!length) {
    length = Math.min(Math.ceil(fwhm * factor), 2 ** 25 - 1);
    if (length % 2 === 0) length++;
  }
  const center = (length - 1) / 2;
  const data = new Float64Array(length);
  for (let i = 0; i <= center; i++) {
    const value = pseudoVoigtFct(i - center, fwhm, mu) * height;
    data[i] = value;
    data[length - 1 - i] = value;
  }
  return data;
};

/**
 * TCH-style pseudo-Voigt where gaussian and lorentzian widths are independent.
 * The effective fwhm and mixing parameter mu are derived from fwhmG and fwhmL
 * via the Thompson–Cox–Hastings approximation.
 */
class PseudoVoigtTCH {
  _fwhmG;
  _fwhmL;
  _fwhm;
  _mu;
  _lorentzianWidthFraction;
  constructor(options = {}) {
    const {
      fwhmG,
      fwhmL,
      fwhm,
      mu = 0.5
    } = options;
    this._mu = mu;
    this._fwhm = 0;
    this._fwhmG = 0;
    this._fwhmL = 0;
    this._lorentzianWidthFraction = lorentzianWidthFraction(1 - mu);
    if (fwhmG && fwhmL) {
      this._fwhmG = fwhmG;
      this.fwhmL = fwhmL;
    } else if (fwhm) {
      this.fwhm = fwhm;
    }
  }
  set fwhmG(value) {
    const effectiveFwhm = computeEffectiveWidth(value, this._fwhmL);
    const lorentzianFraction = this._fwhmL / effectiveFwhm;
    this._fwhm = effectiveFwhm;
    this._mu = 1 - (1.36603 * lorentzianFraction - 0.47719 * lorentzianFraction * lorentzianFraction + 0.11116 * lorentzianFraction * lorentzianFraction * lorentzianFraction);
    this._fwhmG = value;
    this._lorentzianWidthFraction = lorentzianFraction;
  }
  get fwhmG() {
    return this._fwhmG;
  }
  set fwhmL(value) {
    const effectiveFwhm = computeEffectiveWidth(this._fwhmG, value);
    const lorentzianFraction = value / effectiveFwhm;
    this._fwhm = effectiveFwhm;
    this._mu = 1 - (1.36603 * lorentzianFraction - 0.47719 * lorentzianFraction * lorentzianFraction + 0.11116 * lorentzianFraction * lorentzianFraction * lorentzianFraction);
    this._fwhmL = value;
    this._lorentzianWidthFraction = lorentzianFraction;
  }
  get fwhmL() {
    return this._fwhmL;
  }
  set mu(value) {
    const lorentzianFraction = lorentzianWidthFraction(1 - value);
    this._lorentzianWidthFraction = lorentzianFraction;
    this._fwhmL = this._fwhm * lorentzianFraction;
    this._fwhmG = this._fwhm * (1 - lorentzianFraction);
    this._mu = value;
  }
  get mu() {
    return this._mu;
  }
  set fwhm(value) {
    const lorentzianFraction = this._lorentzianWidthFraction || lorentzianWidthFraction(1 - this._mu);
    this._fwhmL = value * lorentzianFraction;
    this._fwhmG = value * (1 - lorentzianFraction);
    this._fwhm = value;
  }
  get fwhm() {
    return this._fwhm;
  }
  fwhmToWidth(fwhm = this._fwhm, mu = this._mu) {
    return pseudoVoigtFwhmToWidth(fwhm, mu);
  }
  widthToFWHM(width, mu = this._mu) {
    return pseudoVoigtWidthToFWHM(width, mu);
  }
  fct(x) {
    return pseudoVoigtFct(x, this._fwhm, this._mu);
  }
  getArea(height = 1) {
    return getPseudoVoigtArea({
      fwhm: this._fwhm,
      height,
      mu: this._mu
    });
  }
  getFactor(area) {
    return getPseudoVoigtFactor(area, this._mu);
  }
  getData(options = {}) {
    const {
      length,
      factor,
      height = calculatePseudoVoigtHeight({
        fwhm: this._fwhm,
        mu: this._mu,
        area: 1
      })
    } = options;
    return getPseudoVoigtData(this, {
      factor,
      length,
      height
    });
  }
  calculateHeight(area = 1) {
    return calculatePseudoVoigtHeight({
      fwhm: this._fwhm,
      mu: this._mu,
      area
    });
  }
  getParameters() {
    return ['fwhmG', 'fwhmL'];
  }
  derivative(x) {
    const {
      fct,
      dx,
      dFwhmG,
      dFwhmL
    } = pseudoVoigtTCHDerivative(x, this._fwhmG, this._fwhmL);
    return {
      fct,
      dx,
      parameters: [dFwhmG, dFwhmL]
    };
  }
}
/**
 * Analytical value and partial derivatives of the TCH pseudo-Voigt function centered at x=0.
 * The effective fwhm `F` and mixing `mu` are functions of `fwhmG` and `fwhmL`, so the
 * derivatives chain `∂fct/∂F` and `∂fct/∂mu` through `∂F/∂·` and `∂mu/∂·`.
 * @param x - position at which to evaluate.
 * @param fwhmG - full width at half maximum of the gaussian component.
 * @param fwhmL - full width at half maximum of the lorentzian component.
 * @returns the value `fct` and its partial derivatives with respect to `x` (`dx`), `fwhmG` (`dFwhmG`) and `fwhmL` (`dFwhmL`).
 */
function pseudoVoigtTCHDerivative(x, fwhmG, fwhmL) {
  const effectiveFwhm = computeEffectiveWidth(fwhmG, fwhmL);
  const w = effectiveFwhm ** 5; // the polynomial under the 1/5 power
  // ∂w/∂fwhmG and ∂w/∂fwhmL (derivatives of the TCH width polynomial).
  const dwDfwhmG = 5 * fwhmG ** 4 + 10.77076 * fwhmG ** 3 * fwhmL + 7.28529 * fwhmG ** 2 * fwhmL ** 2 + 8.94326 * fwhmG * fwhmL ** 3 + 0.07842 * fwhmL ** 4;
  const dwDfwhmL = 2.69269 * fwhmG ** 4 + 4.85686 * fwhmG ** 3 * fwhmL + 13.41489 * fwhmG ** 2 * fwhmL ** 2 + 0.31368 * fwhmG * fwhmL ** 3 + 5 * fwhmL ** 4;
  // F = w^0.2  =>  ∂F/∂· = 0.2 * F / w * ∂w/∂·
  const dFwhmDfwhmG = 0.2 * effectiveFwhm * dwDfwhmG / w;
  const dFwhmDfwhmL = 0.2 * effectiveFwhm * dwDfwhmL / w;
  // lorentzian width fraction L = fwhmL / F
  const lorentzianFraction = fwhmL / effectiveFwhm;
  const dLorentzianFractionDfwhmG = -fwhmL / (effectiveFwhm * effectiveFwhm) * dFwhmDfwhmG;
  const dLorentzianFractionDfwhmL = 1 / effectiveFwhm - fwhmL / (effectiveFwhm * effectiveFwhm) * dFwhmDfwhmL;
  // mu = 1 - (1.36603 L - 0.47719 L^2 + 0.11116 L^3)
  const dPolyDfraction = 1.36603 - 0.95438 * lorentzianFraction + 0.33348 * lorentzianFraction * lorentzianFraction;
  const dMuDfwhmG = -dPolyDfraction * dLorentzianFractionDfwhmG;
  const dMuDfwhmL = -dPolyDfraction * dLorentzianFractionDfwhmL;
  const mu = 1 - (1.36603 * lorentzianFraction - 0.47719 * lorentzianFraction * lorentzianFraction + 0.11116 * lorentzianFraction * lorentzianFraction * lorentzianFraction);
  // pseudoVoigt value and its ∂/∂x, ∂/∂F (dFwhm), ∂/∂mu (dMu) at the effective
  // fwhm, inlined to allocate a single object on this hot path.
  const e = Math.exp(GAUSSIAN_EXP_FACTOR * (x / effectiveFwhm) ** 2);
  const denominator2 = 4 * x * x + effectiveFwhm * effectiveFwhm;
  const lorentz = effectiveFwhm * effectiveFwhm / denominator2;
  const dEdt = 2 * GAUSSIAN_EXP_FACTOR * x / (effectiveFwhm * effectiveFwhm) * e;
  const dLdt = -8 * x * effectiveFwhm * effectiveFwhm / (denominator2 * denominator2);
  const dEdfwhm = -2 * GAUSSIAN_EXP_FACTOR * x * x / (effectiveFwhm * effectiveFwhm * effectiveFwhm) * e;
  const dLdfwhm = 8 * effectiveFwhm * x * x / (denominator2 * denominator2);
  const dFwhm = (1 - mu) * dLdfwhm + mu * dEdfwhm;
  const dMu = e - lorentz;
  return {
    fct: (1 - mu) * lorentz + mu * e,
    dx: (1 - mu) * dLdt + mu * dEdt,
    dFwhmG: dFwhm * dFwhmDfwhmG + dMu * dMuDfwhmG,
    dFwhmL: dFwhm * dFwhmDfwhmL + dMu * dMuDfwhmL
  };
}
/**
 * Compute the effective FWHM from gaussian and lorentzian component widths
 * using the Thompson–Cox–Hastings approximation.
 * @param fwhmG - gaussian component FWHM.
 * @param fwhmL - lorentzian component FWHM.
 * @returns effective combined FWHM.
 */
function computeEffectiveWidth(fwhmG, fwhmL) {
  return (fwhmG ** 5 + 2.69269 * fwhmG ** 4 * fwhmL + 2.42843 * fwhmG ** 3 * fwhmL ** 2 + 4.47163 * fwhmG ** 2 * fwhmL ** 3 + 0.07842 * fwhmG * fwhmL ** 4 + fwhmL ** 5) ** 0.2;
}
/**
 * Solve for the lorentzian width fraction fwhmL/fwhm given lorentzianFraction = 1 - mu,
 * using Newton's method on: 1.36603·x - 0.47719·x² + 0.11116·x³ = lorentzianFraction.
 * @param lorentzianFraction - TCH lorentzian mixing parameter (= 1 - mu).
 * @returns the lorentzian width fraction fwhmL/fwhm.
 */
function lorentzianWidthFraction(lorentzianFraction) {
  let fraction = lorentzianFraction;
  for (let i = 0; i < 6; i++) {
    const f = 1.36603 * fraction - 0.47719 * fraction * fraction + 0.11116 * fraction * fraction * fraction - lorentzianFraction;
    const df = 1.36603 - 2 * 0.47719 * fraction + 3 * 0.11116 * fraction * fraction;
    fraction -= f / df;
  }
  return fraction;
}

/**
 * This shape is a linear combination of rational function (n|n+2), for n = 0 (lorentzian function) and n = 2
 * the parameter that combines those two functions is `gamma` and it is called the kurtosis parameter, it is an
 * implementation of generalized lorentzian shape published by Stanislav Sykora in the SMASH 2010. DOI:10.3247/SL3nmr10.006
 * {@link https://www.ebyte.it/stan/Talk_ML_UserMeeting_SMASH_2010_GeneralizedLorentzian.html}
 */
class GeneralizedLorentzian {
  /**
   * Full width at half maximum.
   * @default 500
   */
  fwhm;
  /**
   * kurtosis parameter of the shape, between -1 to 2
   * @default 1
   */
  gamma;
  constructor(options = {}) {
    const {
      fwhm = 500,
      gamma = 0.5
    } = options;
    this.fwhm = fwhm;
    this.gamma = gamma;
  }
  fwhmToWidth(fwhm = this.fwhm) {
    return generalizedLorentzianFwhmToWidth(fwhm);
  }
  widthToFWHM(width) {
    return generalizedLorentzianWidthToFWHM(width);
  }
  fct(x) {
    return generalizedLorentzianFct(x, this.fwhm, this.gamma);
  }
  getArea(height = 1) {
    return getGeneralizedLorentzianArea({
      fwhm: this.fwhm,
      height,
      gamma: this.gamma
    });
  }
  getFactor(area) {
    return getGeneralizedLorentzianFactor(area);
  }
  getData(options = {}) {
    return getGeneralizedLorentzianData(this, options);
  }
  calculateHeight(area = 1) {
    const {
      gamma,
      fwhm
    } = this;
    return calculateGeneralizedLorentzianHeight({
      fwhm,
      area,
      gamma
    });
  }
  getParameters() {
    return ['fwhm', 'gamma'];
  }
  derivative(x) {
    const {
      fct,
      dx,
      dFwhm,
      dGamma
    } = generalizedLorentzianDerivative(x, this.fwhm, this.gamma);
    return {
      fct,
      dx,
      parameters: [dFwhm, dGamma]
    };
  }
}
const calculateGeneralizedLorentzianHeight = ({
  fwhm = 1,
  gamma = 1,
  area = 1
}) => {
  return area / fwhm / (3.14159 - 0.420894 * gamma) * 2;
};
/**
 * Calculate the area under a generalized Lorentzian peak (integral from Mathematica).
 * @param options - shape parameters including fwhm, height, and gamma.
 * @returns the area under the peak.
 */
const getGeneralizedLorentzianArea = options => {
  const {
    fwhm = 500,
    height = 1,
    gamma = 1
  } = options;
  return height * fwhm * (3.14159 - 0.420894 * gamma) / 2;
};
const generalizedLorentzianFct = (x, fwhm, gamma) => {
  const u = (2 * x / fwhm) ** 2;
  return (1 - gamma) / (1 + u) + gamma * (1 + u / 2) / (1 + u + u ** 2);
};
/**
 * Analytical value and partial derivatives of the generalized lorentzian function centered at x=0.
 * @param x - position at which to evaluate.
 * @param fwhm - full width at half maximum.
 * @param gamma - kurtosis parameter of the shape.
 * @returns the value `fct` and its partial derivatives with respect to `x` (`dx`), `fwhm` (`dFwhm`) and `gamma` (`dGamma`).
 */
function generalizedLorentzianDerivative(x, fwhm, gamma) {
  const u = (2 * x / fwhm) ** 2;
  const lorentzian = 1 / (1 + u); // A
  const rational = (1 + u / 2) / (1 + u + u * u); // B
  const fct = (1 - gamma) * lorentzian + gamma * rational;
  // dA/du and dB/du
  const dLorentzianDu = -1 / ((1 + u) * (1 + u));
  const denominator = 1 + u + u * u;
  const dRationalDu = -(0.5 + 2 * u + 0.5 * u * u) / (denominator * denominator);
  const dFctDu = (1 - gamma) * dLorentzianDu + gamma * dRationalDu;
  const duDx = 8 * x / (fwhm * fwhm);
  const duDfwhm = -8 * x * x / (fwhm * fwhm * fwhm);
  const dx = dFctDu * duDx;
  const dFwhm = dFctDu * duDfwhm;
  const dGamma = rational - lorentzian; // B - A
  return {
    fct,
    dx,
    dFwhm,
    dGamma
  };
}
const generalizedLorentzianWidthToFWHM = width => {
  return width * ROOT_THREE;
};
const generalizedLorentzianFwhmToWidth = fwhm => {
  return fwhm / ROOT_THREE;
};
const generalizedLorentzianQuantile = p => Math.tan(Math.PI * (p - 0.5));
const getGeneralizedLorentzianFactor = (area = 0.9999) => {
  if (area >= 1) {
    throw new Error('area should be (0 - 1)');
  }
  const halfResidual = (1 - area) * 0.5;
  return (generalizedLorentzianQuantile(1 - halfResidual) - generalizedLorentzianQuantile(halfResidual)) / 2;
};
const getGeneralizedLorentzianData = (shape = {}, options = {}) => {
  const {
    fwhm = 500,
    gamma = 1
  } = shape;
  const {
    factor = getGeneralizedLorentzianFactor(),
    height = calculateGeneralizedLorentzianHeight({
      fwhm,
      area: 1,
      gamma
    })
  } = options;
  let {
    length
  } = options;
  if (!length) {
    length = Math.min(Math.ceil(fwhm * factor), 2 ** 25 - 1);
    if (length % 2 === 0) length++;
  }
  const center = (length - 1) / 2;
  const data = new Float64Array(length);
  for (let i = 0; i <= center; i++) {
    const value = generalizedLorentzianFct(i - center, fwhm, gamma) * height;
    data[i] = value;
    data[length - 1 - i] = value;
  }
  return data;
};

class Gaussian2D {
  fwhmX;
  fwhmY;
  constructor(options = {}) {
    const {
      sd
    } = options;
    let {
      fwhm = 20
    } = options;
    fwhm = ensureFWHM2D(fwhm, sd);
    this.fwhmX = fwhm.x;
    this.fwhmY = fwhm.y;
  }
  fct(x, y) {
    return gaussian2DFct(x, y, this.fwhmX, this.fwhmY);
  }
  getData(options = {}) {
    return getGaussian2DData({
      fwhm: {
        x: this.fwhmX,
        y: this.fwhmY
      }
    }, options);
  }
  getFactor(volume = 1) {
    return getGaussianFactor(volume);
  }
  getVolume(height = calculateGaussian2DHeight({
    fwhm: {
      x: this.fwhmX,
      y: this.fwhmY
    },
    volume: 1
  })) {
    return getGaussian2DVolume({
      fwhm: {
        x: this.fwhmX,
        y: this.fwhmY
      },
      height
    });
  }
  widthToFWHM(width) {
    return gaussianWidthToFWHM(width);
  }
  fwhmToWidth(fwhm) {
    return gaussianFwhmToWidth(fwhm);
  }
  calculateHeight(volume = 1) {
    return calculateGaussian2DHeight({
      volume,
      fwhm: {
        x: this.fwhmX,
        y: this.fwhmY
      }
    });
  }
  set fwhm(fwhm) {
    fwhm = ensureXYNumber$1(fwhm);
    this.fwhmX = fwhm.x;
    this.fwhmY = fwhm.y;
  }
}
const gaussian2DFct = (x, y, xFWHM, yFWHM) => {
  return Math.exp(GAUSSIAN_EXP_FACTOR * ((x / xFWHM) ** 2 + (y / yFWHM) ** 2));
};
const getGaussian2DData = (shape, options = {}) => {
  const {
    sd
  } = shape;
  let {
    fwhm = 50
  } = shape;
  fwhm = ensureFWHM2D(fwhm, sd);
  const {
    height = calculateGaussian2DHeight({
      fwhm,
      volume: 1
    })
  } = options;
  let {
    factor = getGaussianFactor(),
    length = {
      x: 0,
      y: 0
    }
  } = options;
  factor = ensureXYNumber$1(factor);
  length = ensureXYNumber$1(length);
  for (const axis of ['x', 'y']) {
    if (!length[axis]) {
      length[axis] = Math.min(Math.ceil(fwhm[axis] * factor[axis]), 2 ** 25 - 1);
      if (length[axis] % 2 === 0) length[axis]++;
    }
  }
  const xCenter = (length.x - 1) / 2;
  const yCenter = (length.y - 1) / 2;
  const data = new Array(length.x);
  for (let i = 0; i < length.x; i++) {
    data[i] = new Float64Array(length.y);
  }
  for (let i = 0; i < length.x; i++) {
    for (let j = 0; j < length.y; j++) {
      data[i][j] = gaussian2DFct(i - xCenter, j - yCenter, fwhm.x, fwhm.y) * height;
    }
  }
  return data;
};
const calculateGaussian2DHeight = (options = {}) => {
  const {
    sd,
    volume = 1
  } = options;
  let {
    fwhm = 50
  } = options;
  fwhm = ensureFWHM2D(fwhm, sd);
  return volume * Math.LN2 * 4 / (Math.PI * fwhm.y * fwhm.x);
};
const getGaussian2DVolume = (options = {}) => {
  const {
    sd,
    height = 1
  } = options;
  let {
    fwhm = 50
  } = options;
  fwhm = ensureFWHM2D(fwhm, sd);
  return height * Math.PI * fwhm.y * fwhm.x / Math.LN2 / 4;
};
function ensureXYNumber$1(input) {
  return typeof input !== 'object' ? {
    x: input,
    y: input
  } : {
    ...input
  };
}
function ensureFWHM2D(fwhm, sd) {
  if (sd !== undefined) {
    const sdObject = ensureXYNumber$1(sd);
    return {
      x: gaussianWidthToFWHM(2 * sdObject.x),
      y: gaussianWidthToFWHM(2 * sdObject.y)
    };
  } else if (fwhm !== undefined) {
    return ensureXYNumber$1(fwhm);
  } else {
    throw new Error('ensureFWHM2D must have either fwhm or sd defined');
  }
}

function getShape1D(shape) {
  const {
    kind
  } = shape;
  switch (kind) {
    case 'gaussian':
      return new Gaussian(shape);
    case 'lorentzian':
      return new Lorentzian(shape);
    case 'pseudoVoigt':
      return new PseudoVoigt(shape);
    case 'pseudoVoigtTCH':
      return new PseudoVoigtTCH(shape);
    case 'lorentzianDispersive':
      return new LorentzianDispersive(shape);
    case 'generalizedLorentzian':
      return new GeneralizedLorentzian(shape);
    default:
      throw new Error(`Unknown distribution ${kind}`);
  }
}

function getShape2D(shape) {
  const {
    kind
  } = shape;
  switch (kind) {
    case 'gaussian':
      return new Gaussian2D(shape);
    default:
      throw new Error(`Unknown distribution ${kind}`);
  }
}

/**
 * This function returns the sumOfShapes function
 * This function gives sumOfShapes access to the peak list and the associated data
 * @param internalPeaks
 */
function getSumOfShapes(internalPeaks) {
  return function sumOfShapes(parameters) {
    for (const peak of internalPeaks) {
      for (let i = 2; i < peak.parameters.length; i++) {
        const shapeFctKey = peak.parameters[i];
        peak.shapeFct[shapeFctKey] = parameters[peak.fromIndex + i];
      }
    }
    return x => {
      let totalY = 0;
      for (const peak of internalPeaks) {
        const peakX = parameters[peak.fromIndex];
        const y = parameters[peak.fromIndex + 1];
        totalY += y * peak.shapeFct.fct(x - peakX);
      }
      return totalY;
    };
  };
}

/**
 * Asserts that value is truthy.
 * @param value - Value to check.
 * @param message - Optional error message to throw.
 */
function assert(value, message) {
  if (!value) {
    throw new Error(message || 'unreachable');
  }
}

/**
 * Build an optimization layout mapping actual per-peak parameter slots
 * to optimizer variables. The layout describes slots, grouped/shared
 * variables, variable bounds/initials, and provides a helper to
 * materialize actual peak parameter values from a variable vector.
 * @param internalPeaks - normalized internal peaks with parameter indices
 * @param peaks - original peak objects (for per-peak optimize flags)
 * @param options - user `OptimizeOptions`, may contain `linkedParameters`
 * @param yScale - y normalization factor (used when converting offsets)
 * @returns an `OptimizationLayout` describing variables and slots
 */
function buildOptimizationLayout(internalPeaks, peaks, options, yScale = 1) {
  const slots = buildParameterSlots(internalPeaks, peaks, options);
  const variables = buildOptimizationVariables(slots, options.linkedParameters, yScale);
  const variableMin = new Float64Array(variables.length);
  const variableMax = new Float64Array(variables.length);
  const variableInit = new Float64Array(variables.length);
  const variableGrad = new Float64Array(variables.length);
  const freeIndices = [];
  for (let i = 0; i < variables.length; i++) {
    const variable = variables[i];
    variableMin[i] = variable.min;
    variableMax[i] = variable.max;
    variableInit[i] = variable.init;
    variableGrad[i] = variable.gradientDifference;
    if (variable.optimize) {
      freeIndices.push(i);
    }
  }
  return {
    slots,
    variables,
    freeIndices,
    variableMin,
    variableMax,
    variableInit,
    variableGrad,
    variableToPeakValues(variableValues) {
      const actualValues = new Array(slots.length);
      for (let i = 0; i < variables.length; i++) {
        const variableValue = variableValues[i];
        const members = variables[i].members;
        for (const member of members) {
          actualValues[member.actualIndex] = variableValue * member.factor + member.offset;
        }
      }
      return actualValues;
    }
  };
}
/**
 * Builds concrete parameter slots for each peak parameter.
 * @param internalPeaks - normalized peaks containing parameter metadata
 * @param peaks - original peaks used to resolve optimize flags
 * @param options - optimization options with parameter settings
 * @returns flattened parameter slots across all peaks
 */
function buildParameterSlots(internalPeaks, peaks, options) {
  const slots = [];
  for (let peakIndex = 0; peakIndex < internalPeaks.length; peakIndex++) {
    const internalPeak = internalPeaks[peakIndex];
    for (let i = 0; i < internalPeak.parameters.length; i++) {
      const parameter = internalPeak.parameters[i];
      slots.push({
        actualIndex: internalPeak.fromIndex + i,
        peakIndex,
        peakId: internalPeak.id,
        parameter,
        init: internalPeak.propertiesValues.init[i],
        min: internalPeak.propertiesValues.min[i],
        max: internalPeak.propertiesValues.max[i],
        gradientDifference: internalPeak.propertiesValues.gradientDifference[i],
        optimize: getOptimizeFlag(peaks[peakIndex], parameter, options)
      });
    }
  }
  return slots;
}
/**
 * Builds optimization variables from concrete parameter slots.
 * @param slots - flattened per-peak parameter slots
 * @param linkedParameters - optional linked parameter groups
 * @param yScale - y normalization factor for y-offset conversion
 * @returns sorted optimization variables ready for the optimizer
 */
function buildOptimizationVariables(slots, linkedParameters, yScale) {
  const groupedActualIndices = new Set();
  const variables = [];
  const slotLookup = new Map();
  const idToIndices = new Map();
  for (const slot of slots) {
    slotLookup.set(getSlotKey(slot.peakIndex, slot.parameter), slot);
    if (slot.peakId) {
      const indices = idToIndices.get(slot.peakId) ?? [];
      if (!indices.includes(slot.peakIndex)) {
        indices.push(slot.peakIndex);
      }
      idToIndices.set(slot.peakId, indices);
    }
  }
  for (const linkedParameter of linkedParameters ?? []) {
    variables.push(buildLinkedVariable(linkedParameter, slotLookup, groupedActualIndices, idToIndices, yScale));
  }
  for (const slot of slots) {
    if (groupedActualIndices.has(slot.actualIndex)) {
      continue;
    }
    variables.push({
      sortKey: slot.actualIndex,
      parameter: slot.parameter,
      init: slot.init,
      min: slot.min,
      max: slot.max,
      gradientDifference: slot.gradientDifference,
      optimize: slot.optimize,
      members: [{
        actualIndex: slot.actualIndex,
        peakIndex: slot.peakIndex,
        parameter: slot.parameter,
        factor: 1,
        offset: 0
      }]
    });
  }
  variables.sort((a, b) => a.sortKey - b.sortKey);
  return variables.map(({
    sortKey: _sortKey,
    ...variable
  }) => variable);
}
function buildLinkedVariable(linkedParameter, slotLookup, groupedActualIndices, idToIndices, yScale) {
  if (linkedParameter.peaks.length === 0) {
    throw new Error(`Linked parameter for ${linkedParameter.parameter} must contain at least one peak`);
  }
  const resolvedMembers = linkedParameter.peaks.map(peak => {
    const slot = resolveLinkedSlot(peak, linkedParameter.parameter, slotLookup, idToIndices);
    if (groupedActualIndices.has(slot.actualIndex)) {
      throw new Error(`Peak ${String(peak.id)} parameter ${linkedParameter.parameter} is already linked`);
    }
    return {
      slot,
      factor: getFactor(peak, linkedParameter.parameter),
      offset: getOffset(peak, linkedParameter.parameter, yScale)
    };
  });
  const memberActualIndices = new Set();
  for (const member of resolvedMembers) {
    if (memberActualIndices.has(member.slot.actualIndex)) {
      throw new Error(`Linked parameter for ${linkedParameter.parameter} contains the same peak more than once`);
    }
    memberActualIndices.add(member.slot.actualIndex);
  }
  const firstMember = resolvedMembers[0];
  let sharedMin = Number.NEGATIVE_INFINITY;
  let sharedMax = Number.POSITIVE_INFINITY;
  const optimize = firstMember.slot.optimize;
  const sharedInitCandidates = [];
  for (const member of resolvedMembers) {
    if (member.slot.optimize !== optimize) {
      throw new Error(`Linked parameter ${linkedParameter.parameter} must use a consistent optimize flag across all members`);
    }
    if (member.slot.min > member.slot.max) {
      throw new Error(`Linked parameter ${linkedParameter.parameter} has incompatible bounds across its members`);
    }
    const variableBounds = getMemberVariableBounds(member);
    sharedMin = Math.max(sharedMin, variableBounds.min);
    sharedMax = Math.min(sharedMax, variableBounds.max);
    sharedInitCandidates.push((member.slot.init - member.offset) / member.factor);
  }
  if (sharedMin > sharedMax) {
    throw new Error(`Linked parameter ${linkedParameter.parameter} has incompatible bounds across its members`);
  }
  for (const member of resolvedMembers) {
    groupedActualIndices.add(member.slot.actualIndex);
  }
  return {
    sortKey: Math.min(...resolvedMembers.map(member => member.slot.actualIndex)),
    parameter: linkedParameter.parameter,
    init: xMean(sharedInitCandidates),
    min: sharedMin,
    max: sharedMax,
    gradientDifference: Math.min(...resolvedMembers.map(m => Math.abs(m.slot.gradientDifference))),
    optimize,
    members: resolvedMembers.map(member => ({
      actualIndex: member.slot.actualIndex,
      peakIndex: member.slot.peakIndex,
      parameter: member.slot.parameter,
      factor: member.factor,
      offset: member.offset
    }))
  };
}
function resolveLinkedSlot(peak, parameter, slotLookup, idToIndices) {
  const peakIndex = typeof peak.id === 'number' ? peak.id : resolvePeakIndexById(peak.id, idToIndices);
  if (!Number.isInteger(peakIndex) || peakIndex < 0) {
    throw new Error(`Invalid peak reference ${String(peak.id)}`);
  }
  const slot = slotLookup.get(getSlotKey(peakIndex, parameter));
  if (!slot) {
    throw new Error(`Unknown parameter ${parameter} for peak ${String(peak.id)}`);
  }
  return slot;
}
function resolvePeakIndexById(peakId, idToIndices) {
  const indices = idToIndices.get(peakId);
  if (!indices || indices.length === 0) {
    throw new Error(`Unknown peak id ${peakId}`);
  }
  if (new Set(indices).size > 1) {
    throw new Error(`Peak id ${peakId} is ambiguous because it is used by multiple peaks`);
  }
  return indices[0];
}
function getFactor(peak, parameter) {
  const factor = peak.factor ?? 1;
  if (!Number.isFinite(factor) || factor === 0) {
    throw new Error(`Linked parameter ${parameter} must use a non-zero finite factor`);
  }
  return factor;
}
function getOffset(peak, parameter, yScale) {
  const offset = peak.offset ?? 0;
  if (!Number.isFinite(offset)) {
    throw new Error(`Linked parameter ${parameter} must use a finite offset`);
  }
  if (parameter === 'y') {
    return offset / yScale;
  }
  return offset;
}
function getMemberVariableBounds(member) {
  const transformedMin = (member.slot.min - member.offset) / member.factor;
  const transformedMax = (member.slot.max - member.offset) / member.factor;
  return {
    min: Math.min(transformedMin, transformedMax),
    max: Math.max(transformedMin, transformedMax)
  };
}
function getOptimizeFlag(peak, parameter, options) {
  assert(peak);
  let optimizeFlag = true;
  const perPeakParam = peak.parameters?.[parameter];
  const globalParam = options.parameters?.[parameter];
  if (perPeakParam?.optimize !== undefined) {
    if (typeof perPeakParam.optimize === 'function') {
      optimizeFlag = perPeakParam.optimize(peak);
    } else {
      const {
        optimize = true
      } = perPeakParam;
      optimizeFlag = optimize;
    }
  } else if (globalParam?.optimize !== undefined) {
    if (typeof globalParam.optimize === 'function') {
      optimizeFlag = globalParam.optimize(peak);
    } else {
      const {
        optimize = true
      } = globalParam;
      optimizeFlag = optimize;
    }
  }
  return optimizeFlag;
}
function getSlotKey(peakIndex, parameter) {
  return `${peakIndex}:${parameter}`;
}

/**
 * Reconstruct user-facing peak objects from internal peaks and a full
 * actual-parameter vector.
 * @template T - original Peak type
 * @param internalPeaks - internal peaks produced by `getInternalPeaks`
 * @param actualValues - flattened actual parameter values (not normalized for Y)
 * @param yScale - normalization factor previously applied to Y values
 * @returns array of optimized peaks with reconstructed shapes and ids
 */
function reconstructPeaks(internalPeaks, actualValues, yScale) {
  const newPeaks = [];
  for (const peak of internalPeaks) {
    const {
      id,
      shape,
      parameters,
      fromIndex
    } = peak;
    let newPeak = {
      x: 0,
      y: 0,
      shape
    };
    if (id) {
      newPeak = {
        ...newPeak,
        id
      };
    }
    newPeak.x = actualValues[fromIndex];
    newPeak.y = actualValues[fromIndex + 1] * yScale;
    for (let i = 2; i < parameters.length; i++) {
      //@ts-expect-error should be fixed once
      newPeak.shape[parameters[i]] = actualValues[fromIndex + i];
    }
    newPeaks.push(newPeak);
  }
  return newPeaks;
}

/**
 * Build result when no parameters are free to optimize.
 * Computes the fit error using the provided `globalInit` parameter vector
 * and reconstructs the output peak objects from `internalPeaks`.
 * @template T - input Peak type
 * @param internalPeaks - internal representation of peaks (with parameter indices)
 * @param normalizedY - observed Y values normalized by the global scale
 * @param x - X axis values
 * @param globalInit - full parameter vector (actual-space) used to evaluate the model
 * @param baseSumOfShapes - function that returns the spectrum function given parameters
 * @param yScale - the scale factor used to normalize Y (used to reconstruct peak amplitudes)
 * @returns an object containing `error`, `iterations` (0) and the reconstructed `peaks`
 */
function getFixedParametersResult(internalPeaks, normalizedY, x, globalInit, baseSumOfShapes, yScale) {
  const fct = baseSumOfShapes(globalInit);
  let error = 0;
  for (let i = 0; i < normalizedY.length; i++) {
    error += (normalizedY[i] - fct(x[i])) ** 2;
  }
  return {
    error,
    iterations: 0,
    peaks: reconstructPeaks(internalPeaks, globalInit, yScale)
  };
}

const DefaultParameters = {
  x: {
    init: peak => peak.x,
    min: (peak, peakShape) => peak.x - peakShape.fwhm * 2,
    max: (peak, peakShape) => peak.x + peakShape.fwhm * 2,
    gradientDifference: (peak, peakShape) => peakShape.fwhm * 2e-3
  },
  y: {
    init: peak => peak.y,
    min: peak => peak.y < 0 ? -1.1 : 0,
    max: peak => peak.y < 0 ? 0 : 1.1,
    gradientDifference: () => 1e-3
  },
  fwhm: {
    init: (peak, peakShape) => peakShape.fwhm,
    min: (peak, peakShape) => peakShape.fwhm * 0.25,
    max: (peak, peakShape) => peakShape.fwhm * 4,
    gradientDifference: (peak, peakShape) => peakShape.fwhm * 2e-3
  },
  fwhmG: {
    init: (peak, peakShape) => peakShape.fwhm * 0.6,
    min: (peak, peakShape) => peakShape.fwhm * 0.6 * 0.25,
    max: (peak, peakShape) => peakShape.fwhm * 0.6 * 4,
    gradientDifference: (peak, peakShape) => peakShape.fwhm * 0.6 * 2e-3
  },
  fwhmL: {
    init: (peak, peakShape) => peakShape.fwhm * 0.4,
    min: (peak, peakShape) => peakShape.fwhm * 0.4 * 0.25,
    max: (peak, peakShape) => peakShape.fwhm * 0.4 * 4,
    gradientDifference: (peak, peakShape) => peakShape.fwhm * 0.4 * 2e-3
  },
  mu: {
    init: (peak, peakShape) => peakShape.mu,
    min: () => 0,
    max: () => 1,
    gradientDifference: () => 0.01
  },
  gamma: {
    init: (peak, peakShape) => peakShape.gamma || 0.5,
    min: () => -1,
    max: () => 2,
    gradientDifference: () => 0.01
  }
};

const properties = ['init', 'min', 'max', 'gradientDifference'];
/**
 * Return an array of internalPeaks that contains the exact init, min, max values based on the options
 * @param peaks
 * @param minMaxY
 * @param yScale
 * @param options
 * @returns
 */
function getInternalPeaks(peaks, yScale, options = {}) {
  let index = 0;
  const internalPeaks = [];
  for (const originalPeak of peaks) {
    const normalizedPeak = {
      ...originalPeak,
      y: originalPeak.y / yScale
    };
    const peak = normalizedPeak;
    const {
      id,
      shape = options.shape || {
        kind: 'gaussian'
      }
    } = peak;
    const shapeFct = getShape1D(shape);
    const parameters = ['x', 'y', ...shapeFct.getParameters()];
    const propertiesValuesInternal = {
      min: [],
      max: [],
      init: [],
      gradientDifference: []
    };
    for (const parameter of parameters) {
      for (const property of properties) {
        // check if the property is specified in the peak
        let propertyValue = peak?.parameters?.[parameter]?.[property];
        if (propertyValue !== undefined) {
          propertyValue = getNormalizedValue(propertyValue, parameter, property, yScale);
          propertiesValuesInternal[property].push(propertyValue);
          continue;
        }
        // check if there are some global option, it could be a number or a callback
        let generalParameterValue = options?.parameters?.[parameter]?.[property];
        if (generalParameterValue !== undefined) {
          if (typeof generalParameterValue === 'number') {
            generalParameterValue = getNormalizedValue(generalParameterValue, parameter, property, yScale);
            propertiesValuesInternal[property].push(generalParameterValue);
            continue;
          } else {
            // callbacks receive user-provided peak values (not Y-normalized)
            let value = generalParameterValue(originalPeak);
            value = getNormalizedValue(value, parameter, property, yScale);
            propertiesValuesInternal[property].push(value);
            continue;
          }
        }
        // we just need to take the default parameters
        assert(DefaultParameters[parameter], `No default parameter for ${parameter}`);
        const defaultParameterValues = DefaultParameters[parameter][property];
        propertiesValuesInternal[property].push(
        //@ts-expect-error parameters and shape instance are guaranteed to be present in the defaultParameterValues function
        defaultParameterValues(peak, shapeFct));
      }
    }
    const fromIndex = index;
    const toIndex = fromIndex + parameters.length - 1;
    index += toIndex - fromIndex + 1;
    const propertiesValues = {
      min: propertiesValuesInternal.min,
      max: propertiesValuesInternal.max,
      init: propertiesValuesInternal.init,
      gradientDifference: propertiesValuesInternal.gradientDifference
    };
    internalPeaks.push({
      id,
      shape,
      shapeFct,
      parameters,
      propertiesValues,
      fromIndex,
      toIndex
    });
  }
  return internalPeaks;
}
function getNormalizedValue(value, parameter, property, yScale) {
  if (parameter === 'y') {
    if (property === 'gradientDifference') {
      return value;
    } else {
      return value / yScale;
    }
  }
  return value;
}

function checkOptions(data, options) {
  const {
    timeout,
    initialValues,
    weights = 1,
    damping = 1e-2,
    dampingStepUp = 11,
    dampingStepDown = 9,
    maxIterations = 100,
    errorTolerance = 1e-7,
    centralDifference = false,
    gradientDifference = 10e-2,
    improvementThreshold = 1e-3
  } = options;
  let {
    minValues,
    maxValues
  } = options;
  if (damping <= 0) {
    throw new Error('The damping option must be a positive number');
  } else if (!data.x || !data.y) {
    throw new Error('The data parameter must have x and y elements');
  } else if (!isAnyArray$2(data.x) || data.x.length < 2 || !isAnyArray$2(data.y) || data.y.length < 2) {
    throw new Error('The data parameter elements must be an array with more than 2 points');
  } else if (data.x.length !== data.y.length) {
    throw new Error('The data parameter elements must have the same size');
  }
  if (!(initialValues && initialValues.length > 0)) {
    throw new Error('The initialValues option is mandatory and must be an array');
  }
  const parameters = Array.from(initialValues);
  const parLen = parameters.length;
  maxValues = maxValues || new Array(parLen).fill(Number.MAX_SAFE_INTEGER);
  minValues = minValues || new Array(parLen).fill(Number.MIN_SAFE_INTEGER);
  if (maxValues.length !== minValues.length) {
    throw new Error('minValues and maxValues must be the same size');
  }
  const gradientDifferenceArray = getGradientDifferenceArray(gradientDifference, parameters);
  const filler = getFiller(weights, data.x.length);
  const checkTimeout = getCheckTimeout(timeout);
  const weightSquare = Array.from({
    length: data.x.length
  }, (_, i) => filler(i));
  return {
    checkTimeout,
    minValues,
    maxValues,
    parameters,
    weightSquare,
    damping,
    dampingStepUp,
    dampingStepDown,
    maxIterations,
    errorTolerance,
    centralDifference,
    gradientDifference: gradientDifferenceArray,
    improvementThreshold
  };
}
function getGradientDifferenceArray(gradientDifference, parameters) {
  if (typeof gradientDifference === 'number') {
    return new Array(parameters.length).fill(gradientDifference);
  } else if (isAnyArray$2(gradientDifference)) {
    const parLen = parameters.length;
    if (gradientDifference.length !== parLen) {
      return new Array(parLen).fill(gradientDifference[0]);
    }
    return Array.from(gradientDifference);
  }
  throw new Error('gradientDifference should be a number or array with length equal to the number of parameters');
}
function getFiller(weights, dataLength) {
  if (typeof weights === 'number') {
    const value = 1 / weights ** 2;
    return () => value;
  } else if (isAnyArray$2(weights)) {
    if (weights.length < dataLength) {
      const value = 1 / weights[0] ** 2;
      return () => value;
    }
    return i => 1 / weights[i] ** 2;
  }
  throw new Error('weights should be a number or array with length equal to the number of data points');
}
function getCheckTimeout(timeout) {
  if (timeout !== undefined) {
    if (typeof timeout !== 'number') {
      throw new Error('timeout should be a number');
    }
    const endTime = Date.now() + timeout * 1000;
    return () => Date.now() > endTime;
  } else {
    return () => false;
  }
}

/**
 * the sum of the weighted squares of the errors (or weighted residuals) between the data.y
 * and the curve-fit function.
 *
 * @param data - Array of points to fit in the format [x1, x2, ... ], [y1, y2, ... ]
 * @param parameters - Array of current parameter values
 * @param parameterizedFunction - The parameters and returns a function with the independent variable as a parameter
 * @param weightSquare - Square of weights (must be same length as data.x)
 */
function errorCalculation(data, parameters, parameterizedFunction, weightSquare) {
  let error = 0;
  const func = parameterizedFunction(parameters);
  for (let i = 0; i < data.x.length; i++) {
    error += (data.y[i] - func(data.x[i])) ** 2 / weightSquare[i];
  }
  return error;
}

/**
 * Difference of the matrix function over the parameters
 * @param data Array of points to fit in the format [x1, x2, ... ], [y1, y2, ... ]
 * @param evaluatedData - Array of previous evaluated function values
 * @param params - Array of previous parameter values
 * @param gradientDifference - The step size to approximate the jacobian matrix
 * @param centralDifference - If true the jacobian matrix is approximated by central differences otherwise by forward differences
 * @param paramFunction - The parameters and returns a function with the independent variable as a parameter
 */
function gradientFunction(data, evaluatedData, params, gradientDifference, paramFunction, centralDifference) {
  const nbParams = params.length;
  const nbPoints = data.x.length;
  const ans = Matrix$1.zeros(nbParams, nbPoints);
  let rowIndex = 0;
  for (let param = 0; param < nbParams; param++) {
    if (gradientDifference[param] === 0) continue;
    let delta = gradientDifference[param];
    let auxParams = params.slice();
    auxParams[param] += delta;
    const funcParam = paramFunction(auxParams);
    if (!centralDifference) {
      for (let point = 0; point < nbPoints; point++) {
        ans.set(rowIndex, point, (evaluatedData[point] - funcParam(data.x[point])) / delta);
      }
    } else {
      auxParams = params.slice();
      auxParams[param] -= delta;
      delta *= 2;
      const funcParam2 = paramFunction(auxParams);
      for (let point = 0; point < nbPoints; point++) {
        ans.set(rowIndex, point, (funcParam2(data.x[point]) - funcParam(data.x[point])) / delta);
      }
    }
    rowIndex++;
  }
  return ans;
}

/**
 * Matrix function over the samples
 *
 * @param data - Array of points to fit in the format [x1, x2, ... ], [y1, y2, ... ]
 * @param evaluatedData - Array of previous evaluated function values
 */
function matrixFunction(data, evaluatedData) {
  const m = data.x.length;
  const ans = new Matrix$1(m, 1);
  for (let point = 0; point < m; point++) {
    ans.set(point, 0, data.y[point] - evaluatedData[point]);
  }
  return ans;
}
/**
 * Iteration for Levenberg-Marquardt
 *
 * @param data - Array of points to fit in the format [x1, x2, ... ], [y1, y2, ... ]
 * @param params - Array of previous parameter values
 * @param damping - Levenberg-Marquardt parameter
 * @param gradientDifference - The step size to approximate the jacobian matrix
 * @param centralDifference - If true the jacobian matrix is approximated by central differences otherwise by forward differences
 * @param parameterizedFunction - The parameters and returns a function with the independent variable as a parameter
 * @param weights - scale the gradient and residual error by weights
 */
function step(data, params, damping, gradientDifference, parameterizedFunction, centralDifference, weights) {
  const identity = Matrix$1.eye(params.length, params.length, damping);
  const func = parameterizedFunction(params);
  const evaluatedData = new Float64Array(data.x.length);
  for (let i = 0; i < data.x.length; i++) {
    evaluatedData[i] = func(data.x[i]);
  }
  const gradientFunc = gradientFunction(data, evaluatedData, params, gradientDifference, parameterizedFunction, centralDifference);
  const residualError = matrixFunction(data, evaluatedData);
  const inverseMatrix = inverse(identity.add(gradientFunc.mmul(gradientFunc.transpose().scale('row', {
    scale: weights
  }))));
  const jacobianWeightResidualError = gradientFunc.mmul(residualError.scale('row', {
    scale: weights
  }));
  const perturbations = inverseMatrix.mmul(jacobianWeightResidualError);
  return {
    perturbations,
    jacobianWeightResidualError
  };
}

/**
 * Curve fitting algorithm
 * @param data - Array of points to fit in the format [x1, x2, ... ], [y1, y2, ... ]
 * @param parameterizedFunction - Takes an array of parameters and returns a function with the independent variable as its sole argument
 * @param options - Options object
 */
function levenbergMarquardt(data, parameterizedFunction, options) {
  const checkedOptions = checkOptions(data, options);
  const {
    checkTimeout,
    minValues,
    maxValues,
    parameters,
    weightSquare,
    dampingStepUp,
    dampingStepDown,
    maxIterations,
    errorTolerance,
    centralDifference,
    gradientDifference,
    improvementThreshold
  } = checkedOptions;
  let damping = checkedOptions.damping;
  let error = errorCalculation(data, parameters, parameterizedFunction, weightSquare);
  let optimalError = error;
  let optimalParameters = parameters.slice();
  let converged = error <= errorTolerance;
  let iteration = 0;
  for (; iteration < maxIterations && !converged; iteration++) {
    const previousError = error;
    const {
      perturbations,
      jacobianWeightResidualError
    } = step(data, parameters, damping, gradientDifference, parameterizedFunction, centralDifference, weightSquare);
    for (let k = 0; k < parameters.length; k++) {
      parameters[k] = Math.min(Math.max(minValues[k], parameters[k] - perturbations.get(k, 0)), maxValues[k]);
    }
    error = errorCalculation(data, parameters, parameterizedFunction, weightSquare);
    if (isNaN(error)) break;
    if (error < optimalError - errorTolerance) {
      optimalError = error;
      optimalParameters = parameters.slice();
    }
    const improvementMetric = (previousError - error) / perturbations.transpose().mmul(perturbations.mul(damping).add(jacobianWeightResidualError)).get(0, 0);
    if (improvementMetric > improvementThreshold) {
      damping = Math.max(damping / dampingStepDown, 1e-7);
    } else {
      damping = Math.min(damping * dampingStepUp, 1e7);
    }
    if (checkTimeout()) {
      throw new Error(`The execution time is over to ${options.timeout} seconds`);
    }
    converged = error <= errorTolerance;
  }
  return {
    parameterValues: optimalParameters,
    parameterError: optimalError,
    iterations: iteration
  };
}

/**
 * Preparata, F. P., & Shamos, M. I. (2012). Computational geometry: an introduction. Springer Science & Business Media.
 * @param {Array} x - The array with x coordinates of the points.
 * @param {Array} y - The array with y coordinates of the points.
 * @return {Array} The indices of the points of anticlockwise lower convex hull
 * @private
 */
function antiLowerConvexHull(x, y) {
  if (x.length !== y.length) {
    throw new RangeError('X and Y vectors has different dimensions');
  }
  const nbPoints = x.length - 1;
  if (nbPoints === 0) return [0];
  if (nbPoints === 1) return [0, 1];
  let currentPoint = 0;
  let result = new Array(x.length).fill(true);
  while (true) {
    const a = currentPoint;
    const b = moveOn(currentPoint, nbPoints, result);
    const c = moveOn(moveOn(currentPoint, nbPoints, result), nbPoints, result);
    const det = x[c] * (y[a] - y[b]) + x[a] * (y[b] - y[c]) + x[b] * (y[c] - y[a]);
    const leftTurn = det >= 0;
    if (leftTurn) {
      currentPoint = b;
    } else {
      result[b] = false;
      currentPoint = moveBack(currentPoint, nbPoints, result);
    }
    if (c === nbPoints) break;
  }
  return result.map((item, index) => item === false ? false : index).filter(item => item !== false);
}

/**
 * @param {number} currentPoint - The index of the current point to make the move
 * @param {number} nbPoints - The total number of points in the array
 * @param {Array} vector - The array with the points
 * @return {number} the index of the point after the move
 * @private
 */

function moveBack(currentPoint, nbPoints, vector) {
  let counter = currentPoint - 1;
  while (vector[counter] === false) counter--;
  return currentPoint === 0 ? nbPoints : counter;
}
function moveOn(currentPoint, nbPoints, vector) {
  let counter = currentPoint + 1;
  while (vector[counter] === false) counter++;
  return currentPoint === nbPoints ? 0 : counter;
}

/**
 * Performs a global optimization of required parameters
 * It will return an object containing:
 * - `minFunctionValue`: The minimum value found for the objetive function
 * - `optima`: Array of Array of values for all the variables where the function reach its minimum value
 * - `iterations`: Number of iterations performed in the process
 * - `finalState`: Internal state allowing to continue optimization (initialState)
 * @param {function} objectiveFunction Function to evaluate. It should accept an array of variables
 * @param {Array} lowerBoundaries Array containing for each variable the lower boundary
 * @param {Array} upperBoundaries Array containing for each variable the higher boundary
 * @param {Object} [options={}]
 * @param {number} [options.iterations] - Number of iterations.
 * @param {number} [options.epsilon] - Tolerance to choose best current value.
 * @param {number} [options.tolerance] - Minimum tollerance of the function.
 * @param {number} [options.tolerance2] - Minimum tollerance of the function.
 * @param {Object} [options.initialState={}}] - finalState of previous optimization.
 * @return {Object} {finalState, iterations, minFunctionValue}
 * */

function direct(objectiveFunction, lowerBoundaries, upperBoundaries, options = {}) {
  const {
    iterations = 50,
    epsilon = 1e-4,
    tolerance = 1e-16,
    tolerance2 = 1e-12,
    initialState = {}
  } = options;
  if (objectiveFunction === undefined || lowerBoundaries === undefined || upperBoundaries === undefined) {
    throw new RangeError('There is something undefined');
  }
  lowerBoundaries = new Float64Array(lowerBoundaries);
  upperBoundaries = new Float64Array(upperBoundaries);
  if (lowerBoundaries.length !== upperBoundaries.length) {
    throw new Error('Lower bounds and Upper bounds for x are not of the same length');
  }

  //-------------------------------------------------------------------------
  //                        STEP 1. Initialization
  //-------------------------------------------------------------------------
  let n = lowerBoundaries.length;
  let diffBorders = upperBoundaries.map((x, i) => x - lowerBoundaries[i]);
  let {
    numberOfRectangles = 0,
    totalIterations = 0,
    unitaryCoordinates = [new Float64Array(n).fill(0.5)],
    middlePoint = new Float64Array(n).map((value, index) => {
      return lowerBoundaries[index] + unitaryCoordinates[0][index] * diffBorders[index];
    }),
    bestCurrentValue = objectiveFunction(middlePoint),
    fCalls = 1,
    smallerDistance = 0,
    edgeSizes = [new Float64Array(n).fill(0.5)],
    diagonalDistances = [Math.sqrt(n * 0.5 ** 2)],
    functionValues = [bestCurrentValue],
    differentDistances = diagonalDistances,
    smallerValuesByDistance = [bestCurrentValue],
    choiceLimit = undefined
  } = initialState;
  if (initialState.originalCoordinates && initialState.originalCoordinates.length > 0) {
    bestCurrentValue = xMinValue(functionValues);
    choiceLimit = epsilon * Math.abs(bestCurrentValue) > 1e-8 ? epsilon * Math.abs(bestCurrentValue) : 1e-8;
    smallerDistance = getMinIndex(functionValues, diagonalDistances, choiceLimit, bestCurrentValue);
    unitaryCoordinates = initialState.originalCoordinates.slice();
    for (let j = 0; j < unitaryCoordinates.length; j++) {
      for (let i = 0; i < lowerBoundaries.length; i++) {
        unitaryCoordinates[j][i] = (unitaryCoordinates[j][i] - lowerBoundaries[i]) / diffBorders[i];
      }
    }
  }
  let iteration = 0;
  //-------------------------------------------------------------------------
  //                          Iteration loop
  //-------------------------------------------------------------------------

  while (iteration < iterations) {
    //----------------------------------------------------------------------
    //  STEP 2. Identify the set S of all potentially optimal rectangles
    //----------------------------------------------------------------------

    let S1 = [];
    let idx = differentDistances.findIndex(
    // eslint-disable-next-line no-loop-func
    e => e === diagonalDistances[smallerDistance]);
    let counter = 0;
    for (let i = idx; i < differentDistances.length; i++) {
      for (let f = 0; f < functionValues.length; f++) {
        if (functionValues[f] === smallerValuesByDistance[i] & diagonalDistances[f] === differentDistances[i]) {
          S1[counter++] = f;
        }
      }
    }
    let optimumValuesIndex, S3;
    if (differentDistances.length - idx > 1) {
      let a1 = diagonalDistances[smallerDistance];
      let b1 = functionValues[smallerDistance];
      let a2 = differentDistances[differentDistances.length - 1];
      let b2 = smallerValuesByDistance[differentDistances.length - 1];
      let slope = (b2 - b1) / (a2 - a1);
      let constant = b1 - slope * a1;
      let S2 = new Uint32Array(counter);
      counter = 0;
      for (let i = 0; i < S2.length; i++) {
        let j = S1[i];
        if (functionValues[j] <= slope * diagonalDistances[j] + constant + tolerance2) {
          S2[counter++] = j;
        }
      }
      let xHull = [];
      let yHull = [];
      for (let i = 0; i < counter; i++) {
        xHull.push(diagonalDistances[S2[i]]);
        yHull.push(functionValues[S2[i]]);
      }
      let lowerIndexHull = antiLowerConvexHull(xHull, yHull);
      S3 = [];
      for (let i = 0; i < lowerIndexHull.length; i++) {
        S3.push(S2[lowerIndexHull[i]]);
      }
    } else {
      S3 = S1.slice(0, counter);
    }
    optimumValuesIndex = S3;
    //--------------------------------------------------------------
    // STEPS 3,5: Select any rectangle j in S
    //--------------------------------------------------------------
    for (let k = 0; k < optimumValuesIndex.length; k++) {
      let j = optimumValuesIndex[k];
      let largerSide = xMaxValue(edgeSizes[j]);
      let largeSidesIndex = new Uint32Array(edgeSizes[j].length);
      counter = 0;
      for (let i = 0; i < edgeSizes[j].length; i++) {
        if (Math.abs(edgeSizes[j][i] - largerSide) < tolerance) {
          largeSidesIndex[counter++] = i;
        }
      }
      let delta = 2 * largerSide / 3;
      let bestFunctionValues = [];
      for (let r = 0; r < counter; r++) {
        let i = largeSidesIndex[r];
        let firstMiddleCenter = unitaryCoordinates[j].slice();
        let secondMiddleCenter = unitaryCoordinates[j].slice();
        firstMiddleCenter[i] += delta;
        secondMiddleCenter[i] -= delta;
        let firstMiddleValue = new Float64Array(firstMiddleCenter.length);
        let secondMiddleValue = new Float64Array(secondMiddleCenter.length);
        for (let i = 0; i < firstMiddleCenter.length; i++) {
          firstMiddleValue[i] = lowerBoundaries[i] + firstMiddleCenter[i] * diffBorders[i];
          secondMiddleValue[i] = lowerBoundaries[i] + secondMiddleCenter[i] * diffBorders[i];
        }
        let firstMinValue = objectiveFunction(firstMiddleValue);
        let secondMinValue = objectiveFunction(secondMiddleValue);
        fCalls += 2;
        bestFunctionValues.push({
          minValue: Math.min(firstMinValue, secondMinValue),
          index: r
        });
        // [Math.min(firstMinValue, secondMinValue), r];
        unitaryCoordinates.push(firstMiddleCenter, secondMiddleCenter);
        functionValues.push(firstMinValue, secondMinValue);
      }
      let b = bestFunctionValues.sort((a, b) => a.minValue - b.minValue);
      for (let r = 0; r < counter; r++) {
        let u = largeSidesIndex[b[r].index];
        let ix1 = numberOfRectangles + 2 * (b[r].index + 1) - 1;
        let ix2 = numberOfRectangles + 2 * (b[r].index + 1);
        edgeSizes[j][u] = delta / 2;
        edgeSizes[ix1] = edgeSizes[j].slice();
        edgeSizes[ix2] = edgeSizes[j].slice();
        diagonalDistances[j] = xNorm(edgeSizes[j]);
        diagonalDistances[ix1] = diagonalDistances[j];
        diagonalDistances[ix2] = diagonalDistances[j];
      }
      numberOfRectangles += 2 * counter;
    }

    //--------------------------------------------------------------
    //                  Update
    //--------------------------------------------------------------

    bestCurrentValue = xMinValue(functionValues);
    choiceLimit = epsilon * Math.abs(bestCurrentValue) > 1e-8 ? epsilon * Math.abs(bestCurrentValue) : 1e-8;
    smallerDistance = getMinIndex(functionValues, diagonalDistances, choiceLimit, bestCurrentValue);
    differentDistances = Array.from(new Set(diagonalDistances));
    differentDistances = differentDistances.sort((a, b) => a - b);
    smallerValuesByDistance = [];
    for (let i = 0; i < differentDistances.length; i++) {
      let minIndex;
      let minValue = Number.POSITIVE_INFINITY;
      for (let k = 0; k < diagonalDistances.length; k++) {
        if (diagonalDistances[k] === differentDistances[i]) {
          if (functionValues[k] < minValue) {
            minValue = functionValues[k];
            minIndex = k;
          }
        }
      }
      smallerValuesByDistance.push(functionValues[minIndex]);
    }
    for (let j = 0; j < functionValues.length; j++) {
      if (functionValues[j] === bestCurrentValue) {
        let temp = [];
        for (let i = 0; i < lowerBoundaries.length; i++) {
          temp.push(lowerBoundaries[i] + unitaryCoordinates[j][i] * diffBorders[i]);
        }
      }
    }
    iteration += 1;
  }
  //--------------------------------------------------------------
  //                  Saving results
  //--------------------------------------------------------------

  let result = {};
  result.minFunctionValue = bestCurrentValue;
  result.iterations = iteration;
  let originalCoordinates = [];
  for (let j = 0; j < numberOfRectangles + 1; j++) {
    let pair = [];
    for (let i = 0; i < lowerBoundaries.length; i++) {
      pair.push(lowerBoundaries[i] + unitaryCoordinates[j][i] * diffBorders[i]);
    }
    originalCoordinates.push(pair);
  }
  result.finalState = {
    numberOfRectangles,
    totalIterations: totalIterations += iterations,
    originalCoordinates,
    middlePoint,
    fCalls,
    smallerDistance,
    edgeSizes,
    diagonalDistances,
    functionValues,
    differentDistances,
    smallerValuesByDistance,
    choiceLimit
  };
  let minimizer = [];
  for (let i = 0; i < functionValues.length; i++) {
    if (functionValues[i] === bestCurrentValue) {
      minimizer.push(originalCoordinates[i]);
    }
  }
  result.optima = minimizer;
  return result;
}
function getMinIndex(functionValues, diagonalDistances, choiceLimit, bestCurrentValue) {
  let item = [];
  for (let i = 0; i < functionValues.length; i++) {
    item[i] = Math.abs(functionValues[i] - (bestCurrentValue + choiceLimit)) / diagonalDistances[i];
  }
  const min = xMinValue(item);
  let result = item.findIndex(x => x === min);
  return result;
}

/**
 * Run a direct optimization on the provided data using a sum-of-shapes model.
 * @param data - The observed x/y data to fit.
 * @param sumOfShapes - A function returning the model prediction for a given parameter vector.
 * @param options - Optimization bounds and solver options.
 * @returns The optimized parameter values, the final objective error, and the number of iterations.
 */
function directOptimization(data, sumOfShapes, options) {
  const {
    minValues,
    maxValues,
    maxIterations,
    epsilon,
    tolerance,
    tolerance2,
    initialState
  } = options;
  const objectiveFunction = getObjectiveFunction(data, sumOfShapes);
  const result = direct(objectiveFunction,
  // direct internally converts ArrayLike to Float64Array,
  // so we can safely cast minValues and maxValues to number[]
  minValues, maxValues, {
    iterations: maxIterations,
    epsilon,
    tolerance,
    tolerance2,
    initialState
  });
  const {
    optima,
    minFunctionValue,
    iterations
  } = result;
  return {
    parameterError: minFunctionValue,
    iterations,
    parameterValues: optima[0]
  };
}
function getObjectiveFunction(data, sumOfShapes) {
  const {
    x,
    y
  } = data;
  const nbPoints = x.length;
  return parameters => {
    const fct = sumOfShapes(parameters);
    let error = 0;
    for (let i = 0; i < nbPoints; i++) {
      error += (y[i] - fct(x[i])) ** 2;
    }
    return error;
  };
}

/**
 * Algorithm to select the method.
 * @param optimizationOptions - Optimization options
 * @returns - The algorithm and optimization options
 */
function selectMethod(optimizationOptions = {}) {
  const {
    kind = 'lm',
    options
  } = optimizationOptions;
  switch (kind) {
    case 'lm':
    case 'levenbergMarquardt':
      return {
        algorithm: levenbergMarquardt,
        optimizationOptions: {
          damping: 1.5,
          maxIterations: 100,
          errorTolerance: 1e-8,
          ...options
        }
      };
    case 'direct':
      {
        return {
          algorithm: directOptimization,
          optimizationOptions: {
            maxIterations: 20,
            epsilon: 1e-4,
            tolerance: 1e-16,
            tolerance2: 1e-12,
            initialState: {},
            ...options
          }
        };
      }
    default:
      throw new Error(`Unknown fitting algorithm`);
  }
}

/**
 * Fits a set of points to the sum of a set of bell functions.
 * @param data - An object containing the x and y data to be fitted.
 * @param peaks - A list of initial parameters to be optimized. e.g. coming from a peak picking [{x, y, width}].
 * @param options - Options for optimize
 * @returns - An object with fitting error and the list of optimized parameters { parameters: [ {x, y, width} ], error } if the kind of shape is pseudoVoigt mu parameter is optimized.
 */
function optimize(data, peaks, options = {}) {
  // rescale data so the maximum Y value becomes 1
  const max = xMaxAbsoluteValue(data.y);
  const yScale = max === 0 ? 1 : max;
  const internalPeaks = getInternalPeaks(peaks, yScale, options);
  // need to rescale what is related to Y
  const normalizedY = new Float64Array(data.y.length);
  for (let i = 0; i < data.y.length; i++) {
    normalizedY[i] = data.y[i] / yScale;
  }
  const optimizationLayout = buildOptimizationLayout(internalPeaks, peaks, options, yScale);
  const {
    freeIndices,
    variableMin,
    variableMax,
    variableInit,
    variableGrad,
    variables
  } = optimizationLayout;
  const {
    algorithm,
    optimizationOptions
  } = selectMethod(options.optimization);
  const baseSumOfShapes = getSumOfShapes(internalPeaks);
  const sumOfShapesForVariables = variableValues => {
    return baseSumOfShapes(optimizationLayout.variableToPeakValues(variableValues));
  };
  if (freeIndices.length === 0) {
    return getFixedParametersResult(internalPeaks, normalizedY, data.x, optimizationLayout.variableToPeakValues(variableInit), baseSumOfShapes, yScale);
  }
  // prepare arrays to pass to the algorithm (reduced if needed)
  let minValues;
  let maxValues;
  let initialValues;
  let gradientDifferences;
  let sumOfShapesToUse = sumOfShapesForVariables;
  if (freeIndices.length === variables.length) {
    // nothing to reduce
    minValues = variableMin;
    maxValues = variableMax;
    initialValues = variableInit;
    gradientDifferences = variableGrad;
  } else {
    // wrapper that maps reduced (free) parameters into the full parameter vector
    const sumOfShapesForReduced = reducedParameters => {
      const full = new Float64Array(variables.length);
      full.set(variableInit);
      for (let k = 0; k < freeIndices.length; k++) {
        full[freeIndices[k]] = reducedParameters[k];
      }
      return sumOfShapesForVariables(full);
    };
    minValues = new Float64Array(freeIndices.length);
    maxValues = new Float64Array(freeIndices.length);
    initialValues = new Float64Array(freeIndices.length);
    gradientDifferences = new Float64Array(freeIndices.length);
    for (let j = 0; j < freeIndices.length; j++) {
      const i = freeIndices[j];
      minValues[j] = variableMin[i];
      maxValues[j] = variableMax[i];
      initialValues[j] = variableInit[i];
      gradientDifferences[j] = variableGrad[i];
    }
    sumOfShapesToUse = sumOfShapesForReduced;
  }
  const fitted = algorithm({
    x: data.x,
    y: normalizedY
  }, sumOfShapesToUse, {
    minValues,
    maxValues,
    initialValues,
    gradientDifference: gradientDifferences,
    ...optimizationOptions
  });
  let fittedVariableValues;
  if (freeIndices.length === variables.length) {
    fittedVariableValues = fitted.parameterValues;
  } else {
    const full = variableInit.slice();
    for (let k = 0; k < freeIndices.length; k++) {
      full[freeIndices[k]] = fitted.parameterValues[k];
    }
    fittedVariableValues = full;
  }
  const fittedValues = optimizationLayout.variableToPeakValues(fittedVariableValues);
  return {
    error: fitted.parameterError,
    iterations: fitted.iterations,
    peaks: reconstructPeaks(internalPeaks, fittedValues, yScale)
  };
}

/**
 * Add a `shape` property to peaks that do not have one.
 * If a peak already has a `shape` but no `fwhm`, the FWHM is computed from `peak.width`.
 * @param peaks - Peaks with a `width` property.
 * @param options - Shape options.
 * @returns A peak list where every peak has a `shape` property.
 */
function addMissingShape(peaks, options = {}) {
  const {
    shape = {
      kind: 'gaussian'
    },
    output = structuredClone(peaks)
  } = options;
  const defaultShapeInstance = getShape1D(shape);
  return output.map(peak => {
    if (hasShape(peak)) {
      if (!('fwhm' in peak.shape)) {
        peak.shape.fwhm = getShape1D(peak.shape).widthToFWHM(peak.width);
      }
      return peak;
    }
    return {
      ...peak,
      shape: {
        fwhm: defaultShapeInstance.widthToFWHM(peak.width),
        ...shape
      }
    };
  });
}
function hasShape(peak) {
  return 'shape' in peak;
}

/**
 * Splits a group of peaks into smaller subgroups whose size is approximately
 * limited by `maxNumberOfPeaks`.
 *
 * If the group contains more peaks than allowed, the function identifies the
 * largest normalized gaps between adjacent peaks and uses them as split points.
 *
 * The gap score is computed as:
 *
 * `score = distanceBetweenCenters / averagePeakWidth`
 *
 * where:
 * - `distanceBetweenCenters = peak[i + 1].x - peak[i].x`
 * - `averagePeakWidth = (peak[i].width + peak[i + 1].width) / 2`
 *
 * Larger scores indicate that two neighboring peaks are well separated
 * relative to their widths, making them good candidates for dividing the
 * fitting problem into independent subgroups.
 *
 * The algorithm:
 * 1. Computes the number of cuts required.
 * 2. Scores every boundary between adjacent peaks.
 * 3. Selects the boundaries with the largest scores.
 * 4. Splits the original group at those boundaries.
 * @param group - Ordered collection of peaks. Peaks should be sorted by
 * increasing `x` position before calling this function.
 * @param maxNumberOfPeaks - Desired maximum number of peaks per subgroup.
 * If the group size is less than or equal to this value, no splitting occurs.
 * @returns An array of peak subgroups. The returned groups preserve the
 * original peak ordering.
 */
function splitGroup(group, maxNumberOfPeaks) {
  const groups = [group];
  while (true) {
    const index = groups.findIndex(g => g.length > maxNumberOfPeaks);
    if (index === -1) break;
    const current = groups[index];
    const cut = findBestCut(current);
    groups.splice(index, 1, current.slice(0, cut), current.slice(cut));
  }
  return groups;
}
function findBestCut(group) {
  let bestScore = -Infinity;
  const candidates = [];
  for (let i = 1; i < group.length; i++) {
    const score = (group[i].x - group[i - 1].x) / ((group[i].width + group[i - 1].width) / 2);
    if (score > bestScore) {
      bestScore = score;
      candidates.length = 0;
    }
    if (score === bestScore) {
      candidates.push({
        index: i,
        balance: Math.abs(i - (group.length - i))
      });
    }
  }
  let bestScored = candidates[0];
  for (const candidate of candidates) {
    if (candidate.balance < bestScored.balance) {
      bestScored = candidate;
    }
  }
  return bestScored.index;
}

/**
 * Group peaks based on a width-aware factor.
 * Only `x` and `width` are used, so the current implementation does not take
 * peak asymmetry into account.
 * @param peaks - Peaks with `x` and `width` properties.
 * @param options - Grouping options.
 * @returns Groups of peaks sorted by ascending `x`.
 */
function groupPeaks(peaks, options = {}) {
  if (peaks.length === 0) return [];
  const {
    groupingFactor = 1,
    maxNumberOfPeaks = 15
  } = options;
  const sortedPeaks = peaks.toSorted((a, b) => a.x - b.x);
  let previousPeak = sortedPeaks[0];
  let currentGroup = [previousPeak];
  const groups = [currentGroup];
  for (let i = 1; i < sortedPeaks.length; i++) {
    const peak = sortedPeaks[i];
    if ((peak.x - previousPeak.x) / ((peak.width + previousPeak.width) / 2) <= groupingFactor) {
      currentGroup.push(peak);
    } else {
      currentGroup = [peak];
      groups.push(currentGroup);
    }
    previousPeak = peak;
  }
  if (maxNumberOfPeaks !== undefined) {
    return groups.flatMap(group => group.length > maxNumberOfPeaks ? splitGroup(group, maxNumberOfPeaks) : [group]);
  }
  return groups;
}

/**
 * Optimize the position (x), max intensity (y), full width at half maximum (fwhm)
 * and the ratio of gaussian contribution (mu) if it's required.
 * It currently supports three kind of shapes: gaussian, lorentzian and pseudovoigt.
 * Returns both the optimized peaks and per-group diagnostic logs.
 * @param data - An object containing the x and y data to be fitted.
 * @param peakList - A list of initial parameters to be optimized. e.g. coming from a peak picking [{x, y, width}].
 * @param options - Optimization options.
 * @returns An object with the optimized peaks and the per-group logs.
 */
function optimizePeaksWithLogs(data, peakList, options = {}) {
  const {
    fromTo = {},
    shape = {
      kind: 'gaussian'
    },
    maxNumberOfPeaks,
    groupingFactor,
    factorLimits = 2,
    parameters,
    optimization = {
      kind: 'lm',
      options: {
        timeout: 10
      }
    }
  } = options;
  // Optimize peaks in groups: fitting everything at once would be too slow and
  // have too many free parameters.
  const groups = groupPeaks(peakList, {
    groupingFactor,
    maxNumberOfPeaks
  });
  const logs = [];
  const results = [];
  for (const peakGroup of groups) {
    const start = Date.now();
    const peaks = addMissingShape(peakGroup, {
      shape
    });
    const firstPeak = peaks[0];
    const lastPeak = peaks.at(-1);
    const {
      from = firstPeak.x - firstPeak.width * factorLimits,
      to = lastPeak.x + lastPeak.width * factorLimits
    } = fromTo;
    const {
      fromIndex,
      toIndex
    } = xGetFromToIndex(data.x, {
      from,
      to
    });
    const x = data.x instanceof Float64Array ? data.x.subarray(fromIndex, toIndex) : data.x.slice(fromIndex, toIndex);
    const y = data.y instanceof Float64Array ? data.y.subarray(fromIndex, toIndex) : data.y.slice(fromIndex, toIndex);
    const log = {
      range: {
        from,
        to
      },
      parameters: {
        optimization,
        parameters
      },
      groupSize: peakGroup.length,
      time: Date.now() - start
    };
    if (x.length > 5) {
      const {
        iterations,
        error,
        peaks: optimizedPeaks
      } = optimize({
        x,
        y
      }, peaks, {
        shape,
        parameters,
        optimization
      });
      for (let i = 0; i < peaks.length; i++) {
        results.push({
          ...optimizedPeaks[i],
          width: getShape1D(peaks[i].shape).fwhmToWidth(optimizedPeaks[i].shape.fwhm)
        });
      }
      logs.push({
        ...log,
        iterations,
        error,
        message: 'optimization successful'
      });
    } else {
      results.push(...peaks);
      logs.push({
        ...log,
        iterations: 0,
        message: 'x length too small for optimization'
      });
    }
  }
  return {
    logs,
    optimizedPeaks: results
  };
}

/**
 * Optimize the position (x), max intensity (y), full width at half maximum (fwhm)
 * and the ratio of gaussian contribution (mu) if it's required.
 * @param data - An object containing the x and y data to be fitted.
 * @param peakList - A list of initial parameters to be optimized. e.g. coming from a peak picking [{x, y, width}].
 * @param options - Optimization options.
 * @returns The optimized peaks.
 */
function optimizePeaks(data, peakList, options = {}) {
  return optimizePeaksWithLogs(data, peakList, options).optimizedPeaks;
}

/**
 * Assign a random UUID to every peak that does not already have an `id`.
 * @param peaks - Peaks possibly missing an `id`.
 * @param options - Options.
 * @param options.output - Destination array. Defaults to a deep clone of `peaks`.
 * @returns A peak list where every peak has an `id`.
 */
function addMissingIDs(peaks, options = {}) {
  const {
    output = structuredClone(peaks)
  } = options;
  for (const peak of output) {
    if (!('id' in peak)) {
      peak.id = crypto.randomUUID();
    }
  }
  return output;
}

/**
 * Join peaks that seem to belong to a broad signal into a single broad peak.
 * @param peakList - Detected peaks, possibly containing fragments of a broad signal.
 * @param options - Join options.
 * @returns The peak list with broad fragments fitted as a single peak.
 */
function joinBroadPeaks(peakList, options = {}) {
  const {
    shape = {
      kind: 'gaussian'
    },
    optimization = {
      kind: 'lm',
      options: {
        timeout: 10
      }
    },
    broadWidth = 0.25,
    broadRatio = 0.0025
  } = options;
  let max = 0;
  let maxI = 0;
  let count = 1;
  const broadLines = [];
  if (peakList.length < 2) {
    return addMissingIDs(addMissingShape(peakList.map(getGSDPeakOptimizedStructure), {
      shape
    }));
  }
  let maxDdy = Math.abs(peakList[0].ddY);
  for (let i = 1; i < peakList.length; i++) {
    const absDdy = Math.abs(peakList[i].ddY);
    if (absDdy > maxDdy) maxDdy = absDdy;
  }
  const newPeaks = [];
  for (const peak of peakList) {
    if (Math.abs(peak.ddY) <= broadRatio * maxDdy) {
      broadLines.push(peak);
    } else {
      newPeaks.push(getGSDPeakOptimizedStructure(peak));
    }
  }
  // Sentinel: forces the final group to be flushed by the `else` branch below.
  //@ts-expect-error Sentinel peak, x=+Infinity guarantees the distance check fails.
  broadLines.push({
    x: Number.MAX_VALUE,
    y: 0
  });
  let candidates = {
    x: [broadLines[0].x],
    y: [broadLines[0].y]
  };
  let indexes = [0];
  for (let i = 1; i < broadLines.length; i++) {
    if (Math.abs(broadLines[i - 1].x - broadLines[i].x) < broadWidth) {
      candidates.x.push(broadLines[i].x);
      candidates.y.push(broadLines[i].y);
      if (broadLines[i].y > max) {
        max = broadLines[i].y;
        maxI = i;
      }
      indexes.push(i);
      count++;
    } else {
      if (count > 2) {
        const initialWidth = Math.abs(candidates.x.at(-1) - candidates.x[0]);
        const {
          logs,
          optimizedPeaks
        } = optimizePeaksWithLogs(candidates, [{
          id: crypto.randomUUID(),
          x: broadLines[maxI].x,
          y: max,
          width: initialWidth,
          parameters: {
            width: {
              max: initialWidth * 4,
              min: initialWidth * 0.8
            }
          }
        }], {
          shape: {
            kind: 'pseudoVoigt'
          },
          optimization
        });
        max = 0;
        maxI = 0;
        const log = logs.find(l => l.message === 'optimization successful');
        if (log?.error !== undefined && log.error < 0.2) {
          newPeaks.push(optimizedPeaks[0]);
        } else {
          pushBackPeaks(broadLines, indexes, newPeaks);
        }
      } else {
        pushBackPeaks(broadLines, indexes, newPeaks);
      }
      candidates = {
        x: [broadLines[i].x],
        y: [broadLines[i].y]
      };
      indexes = [i];
      max = broadLines[i].y;
      maxI = i;
      count = 1;
    }
  }
  newPeaks.sort((a, b) => a.x - b.x);
  return addMissingIDs(newPeaks, {
    output: newPeaks
  });
}
function pushBackPeaks(broadLines, indexes, peaks) {
  for (const index of indexes) {
    peaks.push(getGSDPeakOptimizedStructure(broadLines[index]));
  }
}
function getGSDPeakOptimizedStructure(peak) {
  const {
    id,
    shape,
    x,
    y,
    width
  } = peak;
  const newPeak = {
    x,
    y,
    width,
    shape
  };
  if (id) newPeak.id = id;
  return newPeak;
}

/**
 * Enlarge peaks while preventing overlap between them.
 * A typical application is chromatography peak picking.
 * We should not make the hypothesis that `x` is equidistant, because peaks
 * may not be symmetric once we add the `from` and `to` properties.
 * @param peakList - Peaks to broaden.
 * @param options - Broadening options.
 * @returns The broadened peaks.
 */
function broadenPeaks(peakList, options = {}) {
  const {
    factor = 2,
    overlap = false
  } = options;
  const peaks = mapPeaks(peakList, factor);
  if (!overlap) {
    for (let i = 0; i < peaks.length - 1; i++) {
      const peak = peaks[i];
      const nextPeak = peaks[i + 1];
      if (peak.to.x > nextPeak.from.x) {
        // we do it proportional to the width of the peaks
        peak.to.x = peak.width / (nextPeak.width + peak.width) * (nextPeak.x - peak.x) + peak.x;
        nextPeak.from.x = peak.to.x;
      }
    }
  }
  for (const peak of peaks) {
    peak.width = peak.to.x - peak.from.x;
    if (peak.shape) {
      const {
        shape,
        width
      } = peak;
      if (shape.fwhm !== undefined) {
        const shapeFct = getShape1D(shape);
        shape.fwhm = shapeFct.widthToFWHM(width);
      }
    }
  }
  return peaks;
}
function mapPeaks(peaks, factor) {
  return peaks.map(peak => {
    const {
      id,
      shape,
      x,
      y,
      index,
      inflectionPoints
    } = peak;
    const xFrom = x - (x - inflectionPoints.from.x) * factor;
    const xTo = x + (inflectionPoints.to.x - x) * factor;
    let result = {
      x,
      y,
      index,
      width: xTo - xFrom,
      from: {
        x: xFrom
      },
      to: {
        x: xTo
      }
    };
    if (id) {
      result = {
        ...result,
        id
      };
    }
    if (shape) {
      result = {
        ...result,
        shape
      };
    }
    return result;
  });
}

/**
 * Append a `shape` property (including `fwhm`) to every peak.
 * @param peaks - Peaks with a `width` property.
 * @param options - Shape options.
 * @returns A peak list where every peak has a `shape` property.
 */
function setShape(peaks, options = {}) {
  const {
    shape = {
      kind: 'gaussian'
    },
    output = structuredClone(peaks)
  } = options;
  const shapeInstance = getShape1D(shape);
  return output.map(peak => ({
    ...peak,
    shape: {
      ...shape,
      fwhm: shapeInstance.widthToFWHM(peak.width)
    }
  }));
}

var lib$4 = /*#__PURE__*/Object.freeze({
	__proto__: null,
	addMissingShape: addMissingShape,
	broadenPeaks: broadenPeaks,
	gsd: gsd,
	joinBroadPeaks: joinBroadPeaks,
	optimizePeaks: optimizePeaks,
	optimizePeaksWithLogs: optimizePeaksWithLogs,
	setShape: setShape
});

var require$$0$6 = /*@__PURE__*/getAugmentedNamespace(lib$4);

Object.defineProperty(peakPicking$1, "__esModule", {
  value: true
});
peakPicking$1.peakPicking = peakPicking;
const ml_gsd_1 = require$$0$6;
const ml_spectra_processing_1$8 = require$$0$7;
/**
 * Filter the array of peaks
 * @param {import('./Spectrum')} spectrum - array of all the peaks
 * @returns {array}
 */
function peakPicking(spectrum) {
  if (!spectrum.peaks || spectrum.peaks.length === 0) {
    spectrum.peaks = [];
    const keys = Object.keys(spectrum.data).filter(key => key !== 'x' && key !== 'y');
    if (spectrum.isContinuous()) {
      // some experimental data are really problematic and we need to add this line
      const data = (0, ml_spectra_processing_1$8.xyEnsureGrowingX)(spectrum.data);
      const gsdPeaks = (0, ml_gsd_1.gsd)(data, {
        minMaxRatio: spectrum.options.threshold || 0.00025,
        // Threshold to determine if a given peak should be considered as a noise
        noiseLevel: getNoiseLevel(data.y, spectrum.options.noiseFactor),
        realTopDetection: true,
        smoothY: false,
        sgOptions: {
          windowSize: 7,
          polynomial: 3
        }
      });
      for (let gsdPeak of gsdPeaks) {
        const peak = {
          x: gsdPeak.x,
          y: gsdPeak.y,
          width: gsdPeak.width
        };
        for (let key of keys) {
          peak[key] = spectrum.data[key][gsdPeak.index];
        }
        spectrum.peaks.push(peak);
      }
    } else {
      spectrum.peaks = [];
      let data = spectrum.data;
      for (let i = 0; i < data.x.length; i++) {
        const peak = {
          x: data.x[i],
          y: data.y[i],
          width: 0
        };
        for (let key of keys) {
          peak[key] = spectrum.data[key][i];
        }
        spectrum.peaks.push(peak);
      }
    }
  }
  return spectrum.peaks;
}
/**
 * Intensity under which a maximum is considered to be noise.
 *
 * We have to compute it ourselves: left alone, gsd only estimates a noise level
 * when the x values are equally spaced within 5%, and falls back to 0 otherwise.
 * A mass spectrum is sampled in time or in frequency, so over a wide m/z range
 * the steps grow by far more than that and the noise would not be filtered.
 * @param {import('cheminfo-types').NumberArray} y
 * @param {number} [noiseFactor=3] - 0 leaves the decision to gsd
 * @returns {number|undefined}
 */
function getNoiseLevel(y, noiseFactor = 3) {
  if (!noiseFactor) return undefined;
  const {
    median,
    sd
  } = (0, ml_spectra_processing_1$8.xNoiseStandardDeviation)(y);
  return median + noiseFactor * sd;
}

var peaksWidth$1 = {};

/**
 * Check that x and y are arrays with the same length.
 * @param x - first array
 * @param y - second array
 * @throws if x or y are not the same length, or if they are not arrays
 */
function checkArrayLength(x, y) {
  if (!isAnyArray$2(x) || !isAnyArray$2(y)) {
    throw new TypeError('x and y must be arrays');
  }
  if (x.length !== y.length) {
    throw new RangeError('x and y arrays must have the same length');
  }
}

class BaseRegression {
  constructor() {
    if (new.target === BaseRegression) {
      throw new Error('BaseRegression must be subclassed');
    }
  }
  predict(x) {
    if (typeof x === 'number') {
      return this._predict(x);
    } else if (isAnyArray$2(x)) {
      const y = [];
      for (const xVal of x) {
        y.push(this._predict(xVal));
      }
      return y;
    } else {
      throw new TypeError('x must be a number or array');
    }
  }
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  _predict(x) {
    throw new Error('_predict must be implemented');
  }
  train() {
    // Do nothing for this package
  }
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  toString(precision) {
    return '';
  }
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  toLaTeX(precision) {
    return '';
  }
  /**
   * Return the correlation coefficient of determination (r) and chi-square.
   * @param x - explanatory variable
   * @param y - response variable
   * @return - Object with further statistics.
   */
  score(x, y) {
    checkArrayLength(x, y);
    const n = x.length;
    const y2 = new Array(n);
    for (let i = 0; i < n; i++) {
      y2[i] = this._predict(x[i]);
    }
    let xSum = 0;
    let ySum = 0;
    let chi2 = 0;
    let rmsd = 0;
    let xSquared = 0;
    let ySquared = 0;
    let xY = 0;
    for (let i = 0; i < n; i++) {
      xSum += y2[i];
      ySum += y[i];
      xSquared += y2[i] * y2[i];
      ySquared += y[i] * y[i];
      xY += y2[i] * y[i];
      if (y[i] !== 0) {
        chi2 += (y[i] - y2[i]) * (y[i] - y2[i]) / y[i];
      }
      rmsd += (y[i] - y2[i]) * (y[i] - y2[i]);
    }
    const r = (n * xY - xSum * ySum) / Math.sqrt((n * xSquared - xSum * xSum) * (n * ySquared - ySum * ySum));
    return {
      r,
      r2: r * r,
      chi2,
      rmsd: Math.sqrt(rmsd / n)
    };
  }
}

/**
 * Cast `number` to string. Optionally `digits` specifies significant figures.
 * @param number
 * @param figures
 * @returns - A string representation of `number`.
 */
function maybeToPrecision(number, figures) {
  if (number < 0) {
    number = 0 - number;
    if (typeof figures === 'number') {
      return `- ${number.toPrecision(figures)}`;
    } else {
      return `- ${number.toString()}`;
    }
  } else if (typeof figures === 'number') {
    return number.toPrecision(figures);
  } else {
    return number.toString();
  }
}

/**
 * Class representing simple linear regression.
 * The regression uses OLS to calculate intercept and slope.
 */
class SimpleLinearRegression extends BaseRegression {
  /**
   * @param x - explanatory variable
   * @param y - response variable
   */
  constructor(x, y) {
    super();
    // @ts-expect-error internal use of the constructor, from `this.load`
    if (x === true) {
      // @ts-expect-error internal use of the constructor, from `this.load`
      const yObj = y;
      this.slope = yObj.slope;
      this.intercept = yObj.intercept;
      this.coefficients = [yObj.intercept, yObj.slope];
    } else {
      checkArrayLength(x, y);
      const result = regress$1(x, y);
      this.slope = result.slope;
      this.intercept = result.intercept;
      this.coefficients = [result.intercept, result.slope];
    }
  }
  /**
   * Get the parameters and model name in JSON format
   * @returns
   */
  toJSON() {
    return {
      name: 'simpleLinearRegression',
      slope: this.slope,
      intercept: this.intercept
    };
  }
  _predict(x) {
    return this.slope * x + this.intercept;
  }
  /**
   * Finds x for the given y value.
   * @param y - response variable value
   * @returns - x value
   */
  computeX(y) {
    return (y - this.intercept) / this.slope;
  }
  /**
   * Strings the linear function in the form 'f(x) = ax + b'
   * @param precision - number of significant figures.
   * @returns
   */
  toString(precision) {
    let result = 'f(x) = ';
    if (this.slope !== 0) {
      const xFactor = maybeToPrecision(this.slope, precision);
      result += `${xFactor === '1' ? '' : `${xFactor} * `}x`;
      if (this.intercept !== 0) {
        const absIntercept = Math.abs(this.intercept);
        const operator = absIntercept === this.intercept ? '+' : '-';
        result += ` ${operator} ${maybeToPrecision(absIntercept, precision)}`;
      }
    } else {
      result += maybeToPrecision(this.intercept, precision);
    }
    return result;
  }
  /**
   * Strings the linear function in the form 'f(x) = ax + b'
   * @param precision - number of significant figures.
   * @returns
   */
  toLaTeX(precision) {
    return this.toString(precision);
  }
  /**
   * Class instance from a JSON Object.
   * @param json
   * @returns
   */
  static load(json) {
    if (json.name !== 'simpleLinearRegression') {
      throw new TypeError('not a SLR model');
    }
    // @ts-expect-error internal use of the constructor
    return new SimpleLinearRegression(true, json);
  }
}
/**
 * Internal  function.
 * It determines the parameters (slope, intercept) of the line that best fit the `x,y` vector-data (simple linear regression).
 * @param x - explanatory variable
 * @param y - response variable
 * @returns - slope and intercept of the best fit line
 */
function regress$1(x, y) {
  const n = x.length;
  let xSum = 0;
  let ySum = 0;
  let xSquared = 0;
  let xY = 0;
  for (let i = 0; i < n; i++) {
    xSum += x[i];
    ySum += y[i];
    xSquared += x[i] * x[i];
    xY += x[i] * y[i];
  }
  const numerator = n * xY - xSum * ySum;
  const slope = numerator / (n * xSquared - xSum * xSum);
  return {
    slope,
    intercept: 1 / n * ySum - slope * (1 / n) * xSum
  };
}

class PowerRegression extends BaseRegression {
  constructor(x, y) {
    super();
    if (x === true) {
      // reloading model
      this.A = y.A;
      this.B = y.B;
    } else {
      checkArrayLength(x, y);
      regress(this, x, y);
    }
  }
  _predict(newInputs) {
    return this.A * newInputs ** this.B;
  }
  toJSON() {
    return {
      name: 'powerRegression',
      A: this.A,
      B: this.B
    };
  }
  toString(precision) {
    return `f(x) = ${maybeToPrecision(this.A, precision)} * x^${maybeToPrecision(this.B, precision)}`;
  }
  toLaTeX(precision) {
    let latex = '';
    if (this.B >= 0) {
      latex = `f(x) = ${maybeToPrecision(this.A, precision)}x^{${maybeToPrecision(this.B, precision)}}`;
    } else {
      latex = `f(x) = \\frac{${maybeToPrecision(this.A, precision)}}{x^{${maybeToPrecision(-this.B, precision)}}}`;
    }
    latex = latex.replace(/e([+-]?[0-9]+)/g, 'e^{$1}');
    return latex;
  }
  static load(json) {
    if (json.name !== 'powerRegression') {
      throw new TypeError('not a power regression model');
    }
    return new PowerRegression(true, json);
  }
}
function regress(pr, x, y) {
  const n = x.length;
  const xl = new Array(n);
  const yl = new Array(n);
  for (let i = 0; i < n; i++) {
    xl[i] = Math.log(x[i]);
    yl[i] = Math.log(y[i]);
  }
  const linear = new SimpleLinearRegression(xl, yl);
  pr.A = Math.exp(linear.intercept);
  pr.B = linear.slope;
}

var src$c = /*#__PURE__*/Object.freeze({
	__proto__: null,
	PowerRegression: PowerRegression
});

var require$$0$5 = /*@__PURE__*/getAugmentedNamespace(src$c);

Object.defineProperty(peaksWidth$1, "__esModule", {
  value: true
});
peaksWidth$1.peaksWidth = peaksWidth;
const ml_regression_power_1 = require$$0$5;
const ml_spectra_processing_1$7 = require$$0$7;
function peaksWidth(peaks) {
  let xs = peaks.map(peak => peak.x);
  let widths = peaks.map(peak => peak.width);
  if (xs.length < 2) {
    throw new Error(`peaksWidth: not enough peaks (less than 2) for automatic width calculation: ${xs.length}`);
  }
  let regression = new ml_regression_power_1.PowerRegression(xs, widths);
  if (Number.isNaN(regression.A) || Number.isNaN(regression.B)) {
    throw new Error('peaksWidth: can not calculate regression');
  }
  let from = (0, ml_spectra_processing_1$7.xMinValue)(xs);
  let to = (0, ml_spectra_processing_1$7.xMaxValue)(xs);
  let regressionChart = {
    x: [],
    y: []
  };
  for (let x = from; x <= to; x += (to - from) / 1000) {
    regressionChart.x.push(x);
    regressionChart.y.push(regression.predict(x));
  }
  return {
    widths: {
      x: xs,
      y: widths
    },
    fit: regressionChart,
    score: regression.score(xs, widths),
    predictFct: regression.predict.bind(regression),
    tex: regression.toLaTeX(3),
    A: regression.A,
    B: regression.B,
    predictFctString: `${regression.A} * mass ** ${regression.B}`
  };
}

Object.defineProperty(Spectrum$2, "__esModule", {
  value: true
});
Spectrum$2.Spectrum = void 0;
Spectrum$2.fromPeaks = fromPeaks;
Spectrum$2.fromText = fromText;
const is_any_array_1 = require$$0$8;
const ml_spectra_processing_1$6 = require$$0$7;
const xy_parser_1 = require$$2$1;
const getBestPeaks_js_1 = getBestPeaks$2;
const getChargeClusters_js_1 = getChargeClusters$1;
const getChargeLadders_js_1 = getChargeLadders$1;
const getFragmentPeaks_js_1 = getFragmentPeaks$1;
const getMassRemainder_js_1 = getMassRemainder$1;
const getPeakChargeBySimilarity_js_1 = getPeakChargeBySimilarity$1;
const getPeaks_js_1 = getPeaks$1;
const getPeaksWithCharge_js_1 = getPeaksWithCharge$1;
const isContinuous_js_1 = isContinuous$1;
const peakPicking_js_1 = peakPicking$1;
const peaksWidth_js_1 = peaksWidth$1;
const defaultData = {
  x: [],
  y: []
};
/**
 * Class dealing with mass spectra and peak picking
 */
let Spectrum$1 = class Spectrum {
  /**
   *
   * @param {import('cheminfo-types').DataXY} data
   * @param {object} [options={}]
   * @param {number} [options.threshold=0.00025]
   * @param {number} [options.noiseFactor=3] - peaks under `median + noiseFactor * sd`
   * of the noise are ignored when peak picking a continuous spectrum. Set it to 0
   * to let the peak picking decide by itself.
   * @param {string|Array} [options.ionizations='H+'] - the charge carriers a
   * multiply charged species may show, used by `getChargeLadders`. A comma
   * separated list (`'H+,Na+,K+'`) or an array of preprocessed ionizations.
   */
  constructor(data = defaultData, options = {}) {
    if (typeof data !== 'object' || !(0, is_any_array_1.isAnyArray)(data.x) || !(0, is_any_array_1.isAnyArray)(data.y)) {
      throw new TypeError('Spectrum data must be an object with x:[], y:[]');
    }
    this.data = {
      ...data
    };
    this.options = {
      threshold: 0.00025,
      noiseFactor: 3,
      ionizations: 'H+',
      ...options
    };
    Object.defineProperty(this.data, 'xOriginal', {
      enumerable: false,
      writable: true
    });
    /**
     * someProperty is an example property that is set to `true`
     * @type {array}
     * @public
     */
    this.peaks = [];
    this.clearCache();
  }
  /**
   * Forget everything that was derived from the data. Has to be called by any
   * method changing `data`, otherwise the peaks, the sums or the min / max
   * values would still describe the previous data.
   * @returns {this}
   */
  clearCache() {
    this.cache = {};
    this.peaks = [];
    this.continuous = undefined;
    this.info = this.data && this.data.x.length > 0 ? {
      minX: (0, ml_spectra_processing_1$6.xMinValue)(this.data.x),
      maxX: (0, ml_spectra_processing_1$6.xMaxValue)(this.data.x),
      minY: (0, ml_spectra_processing_1$6.xMinValue)(this.data.y),
      maxY: (0, ml_spectra_processing_1$6.xMaxValue)(this.data.y)
    } : {
      minX: Number.NaN,
      maxX: Number.NaN,
      minY: Number.NaN,
      maxY: Number.NaN
    };
    return this;
  }
  minMaxX() {
    return (0, ml_spectra_processing_1$6.xMinMaxValues)(this.data.x);
  }
  /**
   *
   * @param {import('ml-spectra-processing').XYMaxYOptions} options
   * @returns
   */
  maxY(options) {
    return (0, ml_spectra_processing_1$6.xyMaxY)(this.data, options);
  }
  sumY() {
    if (!this.cache.sumY) {
      this.cache.sumY = (0, ml_spectra_processing_1$6.xSum)(this.data.y);
    }
    return this.cache.sumY;
  }
  scaleY(intensity = 1) {
    this.data.y = Array.from((0, ml_spectra_processing_1$6.xNormed)(this.data.y, {
      value: intensity,
      algorithm: 'max'
    }));
    return this.clearCache();
  }
  rescaleX(callback) {
    this.ensureOriginalX();
    for (let i = 0; i < this.data.x.length; i++) {
      this.data.x[i] = callback(this.data.xOriginal[i]);
    }
    return this.clearCache();
  }
  ensureOriginalX() {
    if (!this.data.xOriginal) {
      this.data.xOriginal = this.data.x.slice(0);
    }
  }
  normedY(total = 1) {
    this.data.y = (0, ml_spectra_processing_1$6.xNormed)(this.data.y, {
      value: total
    });
    return this.clearCache();
  }
  peakPicking() {
    (0, peakPicking_js_1.peakPicking)(this);
    return this.peaks;
  }
  peaksWidth() {
    (0, peakPicking_js_1.peakPicking)(this);
    return (0, peaksWidth_js_1.peaksWidth)(this.peaks);
  }
  getBestPeaks(options) {
    (0, peakPicking_js_1.peakPicking)(this);
    return (0, getBestPeaks_js_1.getBestPeaks)(this.peaks, options);
  }
  /**
   * All the peaks of the spectrum, each carrying the `charge` of the series it
   * belongs to — an isotopologue cluster or, on an unresolved multiply charged
   * species, a charge-state ladder — when one was found. The charges are
   * evaluated once, over all the peaks, and cached; `getSelectedPeaksWithCharge`
   * reads them out of this result rather than recomputing them.
   * @param {object} [options={}]
   * @param {number} [options.min=1] - lowest charge the isotopologue clusters
   * consider
   * @param {number} [options.max=100] - highest charge to consider; shared by the
   * isotopologue clusters and the charge-state ladder (which spans `1` to `max`)
   * @param {number} [options.precision=20] - tolerance on the position of an
   * isotopologue, in ppm
   * @param {number} [options.minLength=3] - shortest series that shows a charge
   * @param {number} [options.minSignalToNoise=10] - on a continuous spectrum a
   * peak under `median + minSignalToNoise * sd` of the noise takes no part in a
   * series; ignored for a centroided spectrum
   * @param {string|Array} [options.ionizations] - the charge carriers a
   * charge-state ladder may show, see `getChargeLadders`. Defaults to the
   * spectrum's `ionizations`
   * @param {object} [options.ladder={}] - options forwarded to `getChargeLadders`,
   * kept apart because a ladder is broader than an isotopologue and needs its own
   * tolerances. `max` above is shared and caps both, so the ladder has no
   * `maxCharge` of its own
   * @param {number} [options.ladder.tolerance=500] - tolerance on the position of
   * the next charge state, in ppm
   * @param {number} [options.ladder.minLength=5] - shortest ladder that shows a
   * charge
   * @param {number} [options.ladder.minRelativeIntensity=0.05] - peaks under this
   * fraction of the most intense one take no part in the ladders
   * @param {number} [options.maxClusteredFraction=0.2] - the charge-state ladders
   * are ignored when the isotopologue clusters already explain more than this
   * fraction of the significant peaks: a resolved spectrum (where the ladders
   * would only be coincidences) is read from its isotopologues alone
   * @returns {Array} copy of the peaks, with a `charge` when one was found
   */
  getPeaksWithCharge(options = {}) {
    (0, peakPicking_js_1.peakPicking)(this);
    const merged = {
      minIntensity: (0, getPeakChargeBySimilarity_js_1.getMinIntensity)(this, options),
      ionizations: this.options.ionizations,
      ...options
    };
    if (Object.keys(options).length > 0) {
      return (0, getPeaksWithCharge_js_1.getPeaksWithCharge)(this.peaks, merged);
    }
    if (this.cache.peaksWithCharge === undefined) {
      this.cache.peaksWithCharge = (0, getPeaksWithCharge_js_1.getPeaksWithCharge)(this.peaks, merged);
    }
    return this.cache.peaksWithCharge;
  }
  /**
   * Give to each of `selectedPeaks` the charge of the peak at the same mass in
   * `getPeaksWithCharge`. A peak matching none keeps no `charge`. Both arrays are
   * sorted by mass, so one pointer walks the precomputed peaks a single time.
   * This only reads the precomputed charges, so both entry points always agree.
   * @param {Array} selectedPeaks - peaks to evaluate
   * @param {object} [options={}] - see `getPeaksWithCharge`
   * @returns {Array} copy of `selectedPeaks` sorted by mass, with a `charge` when
   * one was found
   */
  getSelectedPeaksWithCharge(selectedPeaks, options = {}) {
    const peaks = this.getPeaksWithCharge(options);
    const selected = structuredClone(selectedPeaks).toSorted((a, b) => a.x - b.x);
    let index = 0;
    for (const peak of selected) {
      while (index < peaks.length && peaks[index].x < peak.x) index++;
      if (index < peaks.length && peaks[index].x === peak.x) {
        const {
          charge
        } = peaks[index];
        if (charge !== undefined) peak.charge = charge;
      }
    }
    return selected;
  }
  /**
   * The isotopologue clusters of the spectrum, from the one holding the most
   * intensity to the one holding the least. To give their charge to the peaks
   * themselves, use `getSelectedPeaksWithCharge`.
   * @param {object} [options={}] - see `getChargeClusters`
   * @param {number} [options.minSignalToNoise=10]
   * @returns {Array<{charge: number, peaks: Array}>}
   */
  getChargeClusters(options = {}) {
    (0, peakPicking_js_1.peakPicking)(this);
    const minIntensity = (0, getPeakChargeBySimilarity_js_1.getMinIntensity)(this, options);
    const peaks = [];
    for (const peak of this.peaks) {
      if (peak.y >= minIntensity) peaks.push(peak);
    }
    return (0, getChargeClusters_js_1.getChargeClusters)(peaks, options);
  }
  getPeakChargeBySimilarity(targetMass, options) {
    return (0, getPeakChargeBySimilarity_js_1.getPeakChargeBySimilarity)(this, targetMass, options);
  }
  /**
   * The charge carriers a multiply charged species may show, tried by
   * `getChargeLadders`. Changing them clears only the caches that depend on
   * them, so the peak picking and the noise estimate are kept.
   * @param {string|Array} ionizations - a comma separated list (`'H+,Na+,K+'`)
   * or an array of preprocessed ionizations
   * @returns {this}
   */
  setIonizations(ionizations) {
    if (ionizations === this.options.ionizations) return this;
    this.options.ionizations = ionizations;
    this.cache.chargeLadders = undefined;
    this.cache.peaksWithCharge = undefined;
    return this;
  }
  /**
   * The charge-state ladders of a multiply charged species (a protein
   * electrospray, ...). Contrary to `getChargeClusters`, which reads the charge
   * on the isotopologues of a single envelope, this reconstructs the neutral
   * mass from a series of peaks of the same molecule ionized a growing number of
   * times by the spectrum's `ionizations`. See `getChargeLadders`.
   * @returns {Array<{mass: number, ionization: string, peaks: Array}>}
   */
  getChargeLadders() {
    (0, peakPicking_js_1.peakPicking)(this);
    if (this.cache.chargeLadders === undefined) {
      this.cache.chargeLadders = (0, getChargeLadders_js_1.getChargeLadders)(this.peaks, {
        ionizations: this.options.ionizations
      });
    }
    return this.cache.chargeLadders;
  }
  getPeaks(options) {
    (0, peakPicking_js_1.peakPicking)(this);
    return (0, getPeaks_js_1.getPeaks)(this.peaks, options);
  }
  getPeaksAsDataXY(options) {
    (0, peakPicking_js_1.peakPicking)(this);
    const peaks = (0, getPeaks_js_1.getPeaks)(this.peaks, options);
    return {
      x: peaks.map(peak => peak.x),
      y: peaks.map(peak => peak.y)
    };
  }
  /**
   * Returns also peaks possible for a specific molecular formula
   * @example
   *  const spectrum = new Spectrum({x:[], y:[]})
   *  await spectrum.getFragmentPeaks();
   * @param {string} mf
   * @param {object} options
   * @returns
   */
  getFragmentPeaksFct(mf, options) {
    (0, peakPicking_js_1.peakPicking)(this);
    return (0, getFragmentPeaks_js_1.getFragmentPeaks)(this.peaks, mf, options);
  }
  isContinuous() {
    return (0, isContinuous_js_1.isContinuous)(this);
  }
  /**
   * Remove an integer number of time the specifiedd monoisotopic mass
   * Mass remainder analysis (MARA): https://doi.org/10.1021/acs.analchem.7b04730
   */
  getMassRemainderFct(mass, options = {}) {
    return (0, getMassRemainder_js_1.getMassRemainder)(this.data, mass, options);
  }
};
Spectrum$2.Spectrum = Spectrum$1;
function fromPeaks(peaks) {
  if (peaks.length === 0) return new Spectrum$1();
  const data = {};
  for (let key of Object.keys(peaks[0])) {
    data[key] = peaks.map(peak => peak[key]);
  }
  return new Spectrum$1(data);
}
function fromText(text, options) {
  const data = (0, xy_parser_1.parseXY)(text);
  return new Spectrum$1(data, options);
}

var MSComparator$2 = {};

Object.defineProperty(MSComparator$2, "__esModule", {
  value: true
});
MSComparator$2.MSComparator = void 0;
const ml_spectra_processing_1$5 = require$$0$7;
let MSComparator$1 = class MSComparator {
  /**
   * Create a class that will be able to get the similarity between 2 spectra
   * The similarity is based on 'cosine' similarity. The goal is 2 prepare 2 vectors
   * on which the similarity is calculated.
   * The vectors are created by taking the mass and the intensity of the peaks.
   * @param {object} [options={}]
   * @param {number} [options.nbPeaks] - Before comparing spectra how many peaks should be kept
   * @param {number} [options.minNbCommonPeaks] - Minimum number of peaks in common to consider any similarity
   * @param {number} [options.minIntensity] - What is the minimal relative intensity to keep a peak
   * @param {number} [options.massPower=3] - High power will give more weight to the mass. If you would prefer to observe fragments you should use a number less than 1
   * @param {number} [options.intensityPower=0.6] - How important is the intensity. By default we don't give to much importance to it
   * @param {number[]} [options.selectedMasses] - List of allowed masses.
   * @param {number|Function} [options.delta=0.1] - Tolerance in Da (u) to consider 2 peaks as aligned. If a function is provided it will be called with the mass of the peak
   */
  constructor(options = {}) {
    this.options = {
      massPower: 3,
      intensityPower: 0.6,
      delta: 0.1,
      ...options
    };
    this.cache = new WeakMap();
  }
  /**
   * Get the similarity between a spectrum and a list of masses.
   * The main issue is that we don't have the intensity of the peaks.
   * So we will use the intensity of the closest peak.
   * @param {import('cheminfo-types').DataXY} dataXY
   * @param {number[]} masses
   */
  getSimilarityToMasses(dataXY, masses) {
    const data1 = normalizeAndCacheData(this.cache, dataXY, this.options);
    const data2 = {
      x: Float64Array.from(masses),
      y: new Float64Array(masses.length).fill(1)
    };
    let aligned;
    if (this.options.selectedMasses?.length > 0) {
      aligned = (0, ml_spectra_processing_1$5.xyArrayAlign)([data1, data2, {
        // this allows to force the selection of some specific masses
        x: Float64Array.from(this.options.selectedMasses),
        y: new Float64Array(this.options.selectedMasses.length).fill(1)
      }], {
        delta: this.options.delta,
        requiredY: true
      });
    } else {
      aligned = (0, ml_spectra_processing_1$5.xyArrayAlign)([data1, data2], {
        delta: this.options.delta
      });
    }
    // because we don't have any idea of the intensity we will use the intensity of the experimental peak
    // and otherwise we ignore the theoretical peak
    for (let i = 0; i < aligned.ys[0].length; i++) {
      if (aligned.ys[0][i] === 0) {
        aligned.ys[1][i] = 0;
      }
      if (aligned.ys[0][i] > 0 && aligned.ys[1][i] !== 0) {
        aligned.ys[1][i] = aligned.ys[0][i];
      }
    }
    return returnSimilarity(aligned, this.options);
  }
  /**
   *
   * @param {import('cheminfo-types').DataXY} dataXY1
   * @param {import('cheminfo-types').DataXY} dataXY2
   */
  getSimilarity(dataXY1, dataXY2) {
    const data1 = normalizeAndCacheData(this.cache, dataXY1, this.options);
    const data2 = normalizeAndCacheData(this.cache, dataXY2, this.options);
    let aligned;
    if (this.options.selectedMasses?.length > 0) {
      aligned = (0, ml_spectra_processing_1$5.xyArrayAlign)([data1, data2, {
        // this allows to force the selection of some specific masses
        x: Float64Array.from(this.options.selectedMasses),
        y: new Float64Array(this.options.selectedMasses.length).fill(1)
      }], {
        delta: this.options.delta,
        requiredY: true
      });
    } else {
      aligned = (0, ml_spectra_processing_1$5.xyArrayAlign)([data1, data2], {
        delta: this.options.delta
      });
    }
    return returnSimilarity(aligned, this.options);
  }
};
MSComparator$2.MSComparator = MSComparator$1;
/**
 *
 * @param {WeakMap} cache
 * @param {import('cheminfo-types').DataXY} dataXY
 * @param {object} [options={}]
 * @param {number} [options.nbPeaks]
 * @param {number} [options.minIntensity]
 */
function normalizeAndCacheData(cache, dataXY, options = {}) {
  const {
    nbPeaks,
    minIntensity
  } = options;
  if (cache.has(dataXY)) return cache.get(dataXY);
  let data = {
    ...dataXY
  };
  if ((0, ml_spectra_processing_1$5.xIsMonotonic)(data.x) !== 1) {
    data = (0, ml_spectra_processing_1$5.xySortX)(data);
  }
  if (minIntensity !== undefined) {
    data = (0, ml_spectra_processing_1$5.xyFilterMinYValue)(data, minIntensity);
  }
  if (nbPeaks !== undefined) {
    data = (0, ml_spectra_processing_1$5.xyFilterTopYValues)(data, nbPeaks);
  }
  cache.set(dataXY, data);
  return data;
}
/**
 *
 * @param {*} aligned
 * @param {object} [options={}]
 * @param {number} [options.massPower]
 * @param {number} [options.intensityPower]
 * @param {number} [options.minNbCommonPeaks]

 * @returns
 */
function returnSimilarity(aligned, options = {}) {
  const {
    massPower,
    intensityPower,
    minNbCommonPeaks
  } = options;
  let nbCommonPeaks = 0;
  let nbPeaks1 = 0;
  let nbPeaks2 = 0;
  for (let i = 0; i < aligned.ys[0].length; i++) {
    if (aligned.ys[0][i] !== 0) {
      nbPeaks1++;
    }
    if (aligned.ys[1][i] !== 0) {
      nbPeaks2++;
    }
    if (aligned.ys[0][i] !== 0 && aligned.ys[1][i] !== 0) {
      nbCommonPeaks++;
    }
  }
  if (nbCommonPeaks === 0 || minNbCommonPeaks && nbCommonPeaks < minNbCommonPeaks) {
    return {
      nbCommonPeaks,
      nbPeaks1,
      nbPeaks2,
      tanimoto: 0,
      cosine: 0
    };
  }
  const vector1 = new Float64Array(aligned.x.length);
  const vector2 = new Float64Array(aligned.x.length);
  for (let i = 0; i < aligned.x.length; i++) {
    vector1[i] = aligned.x[i] ** massPower * aligned.ys[0][i] ** intensityPower;
    vector2[i] = aligned.x[i] ** massPower * aligned.ys[1][i] ** intensityPower;
  }
  return {
    nbCommonPeaks,
    nbPeaks1,
    nbPeaks2,
    tanimoto: nbCommonPeaks / (nbPeaks1 + nbPeaks2 - nbCommonPeaks),
    cosine: cosineSimilarity(vector1, vector2)
  };
}
/**
 * Returns the average of cosine distances between vectors a and b
 * Copied from https://github.com/mljs/distance/blob/0b15acd6476413f4111cb4852ca1bec9edaa2805/src/similarities/cosine.ts
 * @param a {import('cheminfo-types').NumberArray} - first vector
 * @param b {import('cheminfo-types').NumberArray} - second vector
 * @returns {number} - cosine similarity
 */
function cosineSimilarity(a, b) {
  let p = 0;
  let p2 = 0;
  let q2 = 0;
  for (let i = 0; i < a.length; i++) {
    p += a[i] * b[i];
    p2 += a[i] * a[i];
    q2 += b[i] * b[i];
  }
  return p / (Math.sqrt(p2) * Math.sqrt(q2));
}

var jsgraph = {};

var getPeaksAnnotation$1 = {};

Object.defineProperty(getPeaksAnnotation$1, "__esModule", {
  value: true
});
getPeaksAnnotation$1.getPeaksAnnotation = getPeaksAnnotation;
const fromMonoisotopicMass_1 = fromMonoisotopicMass$1;
/**
 *
 * @param {array} bestPeaks
 * @param {object} [options={}]
 * @param {number} [options.numberDigits=5]
 * @param {number} [options.numberMFs=0]
 * @param {boolean} [options.showMF=false]
 * @param {array} [options.mfColors={}]
 * @param {number} [options.charge=1]
 * @param {number} [options.shift=0]
 * @param {object} [options.mfPrefs]
 * @param {number} [options.displayCharge=true]
 * @param {number} [options.displayProperties=[]] Array of properties name to display
 * @returns {Promise}
 */
async function getPeaksAnnotation(bestPeaks, options = {}) {
  let {
    numberDigits = 5,
    shift = 0,
    showMF = false,
    numberMFs = 0,
    charge = 1,
    mfPrefs = {},
    displayCharge = true,
    displayProperties = [],
    mfColors = [{
      limit: 3,
      color: 'green'
    }, {
      limit: 20,
      color: 'lightgreen'
    }, {
      limit: 50,
      color: 'lightorange'
    }]
  } = options;
  if (showMF && !numberMFs) numberMFs = 1;
  let annotations = [];
  bestPeaks.sort((a, b) => a.close ? -1 : b.close ? 1 : 0);
  for (let peak of bestPeaks) {
    let textLine = 0;
    let annotation;
    if (peak.close) {
      annotation = {
        type: 'line',
        _highlight: peak._highlight,
        info: peak,
        position: [{
          y: peak.y,
          dy: '-5px',
          x: peak.x
        }, {
          y: peak.y,
          dy: '-15px',
          x: peak.x
        }]
      };
      annotations.push(annotation);
      annotation = {
        type: 'ellipse',
        _highlight: peak._highlight,
        info: peak,
        position: [{
          y: peak.y,
          dy: '-15px',
          x: peak.x
        }],
        props: {
          rx: '3px',
          ry: '3px',
          fillOpacity: 0.3
        }
      };
    } else {
      annotation = {
        type: 'line',
        _highlight: peak._highlight,
        position: [{
          y: peak.y,
          dy: '-5px',
          x: peak.x
        }, {
          y: peak.y,
          dy: '-25px',
          x: peak.x
        }],
        labels: [{
          text: (peak.x + shift).toFixed(numberDigits),
          color: 'red',
          position: {
            x: peak.x,
            y: peak.y,
            dy: `${textLine++ * -13 - 17}px`,
            dx: '2px'
          }
        }]
      };
      if (displayCharge && peak.charge !== undefined) {
        annotation.labels.push({
          text: `Z:${peak.charge}`,
          color: 'grey',
          position: {
            x: peak.x,
            y: peak.y,
            dy: '-4px',
            dx: '2px'
          }
        });
      }
      let mfs = [];
      if (numberMFs) {
        // we have 2 cases. Either there is a shift and we deal with differences
        // otherwise it is absolute
        // if there is a shift we consider only a neutral loss and the parameter charge is important
        // we also check that the selected peak (for relative mass) is not the current peak
        if (shift && Math.abs(peak.x + shift) > Number.EPSILON) {
          // neutral loss
          let currentMfPrefs = {
            ...mfPrefs,
            allowNeutral: true,
            ionizations: ''
          };
          // we need to deal with the precision and increase it
          currentMfPrefs.precision = currentMfPrefs.precision / Math.max(Math.abs(peak.x + shift), 1) * peak.x;
          ({
            mfs
          } = await (0, fromMonoisotopicMass_1.fromMonoisotopicMass)(Math.abs((peak.x + shift) * charge), currentMfPrefs));
        } else {
          ({
            mfs
          } = await (0, fromMonoisotopicMass_1.fromMonoisotopicMass)(Math.abs(peak.x * charge), mfPrefs));
        }
        let numberOfMFS = Math.min(mfs.length, numberMFs);
        for (let i = 0; i < numberOfMFS; i++) {
          let mf = mfs[i];
          let ppm = shift ? mf.ms.ppm / shift * mfs[0].ms.em : mf.ms.ppm;
          annotation.labels.push({
            text: mf.mf,
            color: getColor$1(mfColors, Math.abs(ppm)),
            position: {
              x: peak.x,
              y: peak.y,
              dy: `${textLine++ * -13 - 17}px`,
              dx: '2px'
            }
          });
        }
      }
      if (displayProperties.length > 0) {
        for (let property of displayProperties) {
          annotation.labels.push({
            text: peak[property],
            color: 'red',
            position: {
              x: peak.x,
              y: peak.y,
              dy: `${textLine++ * -13 - 17}px`,
              dx: '2px'
            }
          });
        }
      }
    }
    annotations.push(annotation);
  }
  return annotations;
}
function getColor$1(colors, value) {
  for (let color of colors) {
    if (value < color.limit) return color.color;
  }
  return 'lightgrey';
}

Object.defineProperty(jsgraph, "__esModule", {
  value: true
});
jsgraph.JsGraph = void 0;
const getPeaksAnnotation_js_1 = getPeaksAnnotation$1;
jsgraph.JsGraph = {
  getPeaksAnnotation: getPeaksAnnotation_js_1.getPeaksAnnotation
};

(function (exports) {

  var __createBinding = src$k && src$k.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$k && src$k.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(Spectrum$2, exports);
  __exportStar(getPeaks$1, exports);
  __exportStar(getBestPeaks$2, exports);
  __exportStar(MSComparator$2, exports);
  __exportStar(jsgraph, exports);
  __exportStar(fromMonoisotopicMass$1, exports);
})(src$k);

var appendFragmentsInfo$1 = {};

Object.defineProperty(appendFragmentsInfo$1, "__esModule", {
  value: true
});
appendFragmentsInfo$1.appendFragmentsInfo = appendFragmentsInfo;
const mf_finder_1$1 = src$e;
/**
 *
 * @param {object}   experimentalSpectrum
 * @param {object}   database
 * @param {object}   [options={}]
 * @param {function} [options.onStep] - Callback to do after each step
 * @param {string}   [options.ionizations=''] - string containing a comma separated list of modifications
 * @param {number}   [options.precision=100] - Allowed mass range based on precision
 */
async function appendFragmentsInfo(experimentalSpectrum, database, options = {}) {
  const {
    ionizations,
    onStep,
    precision
  } = options;
  if (!experimentalSpectrum) {
    throw new Error('Experimental spectrum is not defined');
  }
  if (!database) {
    throw new Error('Database is not defined');
  }
  const peaks = experimentalSpectrum.getPeaks({
    sumValue: 1
  });
  for (let entry of database) {
    const ranges = Object.keys(entry.atoms).map(atom => `${atom}0-${entry.atoms[atom]}`).join(' ');
    entry.fragments = {
      nbFound: 0,
      intensityFound: 0,
      assignments: []
    };
    for (let i = 0; i < peaks.length; i++) {
      if (onStep) await onStep(i);
      const peak = peaks[i];
      const possibleMFs = await (0, mf_finder_1$1.findMFs)(peak.x, {
        ionizations,
        precision,
        ranges
      });
      if (possibleMFs.mfs.length > 0) {
        entry.fragments.nbFound++;
        entry.fragments.intensityFound += peak.y;
        entry.fragments.assignments.push({
          peak,
          bestMF: possibleMFs.mfs[0]
        });
      }
    }
  }
}

var fromArray$1 = {};

var src$b = {};

var generateMFs$1 = {};

/**
 * Modify object a to join it with b and make the sum of each of the keys
 * @param {*} a
 * @param {*} source1
 *
 * @return {object}
 */

function sum(target) {
  for (var i = 1; i < arguments.length; i++) {
    let toSum = arguments[i];
    for (var key of Object.keys(toSum)) {
      if (target[key]) {
        target[key] += toSum[key];
      } else {
        target[key] = toSum[key];
      }
    }
  }
  return target;
}
var lib$3 = sum;

var __importDefault$4 = generateMFs$1 && generateMFs$1.__importDefault || function (mod) {
  return mod && mod.__esModule ? mod : {
    "default": mod
  };
};
Object.defineProperty(generateMFs$1, "__esModule", {
  value: true
});
generateMFs$1.generateMFs = generateMFs;
const chemical_elements_1$3 = src$j;
const mf_matcher_1$3 = src$d;
const mf_parser_1$b = src$h;
const mf_utilities_1$8 = src$i;
const sum_object_keys_1 = __importDefault$4(lib$3);
/**
 * Generate all the possible combinations of molecular formula and calculate
 * for each of them the monoisotopic mass and observed monoisotopic mass (m/z)
 * In the molecular formula there may be a comment after the '$' symbol
 *
 * @param {Array}         ranges
 * @param {object}        [options={}]
 * @param {number}        [options.limit=10000000] - Maximum number of results
 * @param {boolean}       [options.estimate=false] - estimate the number of MF without filters
 * @param {boolean}       [options.canonizeMF=true] - Canonize molecular formula
 * @param {boolean}       [options.uniqueMFs=true] - Force canonization and make MF unique
 * @param {string}        [options.ionizations=''] - Comma separated list of ionizations (to charge the molecule)
 * @param {function}      [options.onStep] - Callback to do after each step
 * @param {import('mf-matcher').MSEMFilterOptions}        [options.filter={}]
 * @param {string}        [options.filterFct]
 * @param {object}        [options.links]
 * @param {boolean}       [options.links.filter] We filter all the MF that do not match the '*X'
 * @returns {Promise}
 */
async function generateMFs(ranges, options = {}) {
  if (!Array.isArray(ranges)) {
    throw new Error('Ranges must be an array of string or object');
  }
  options = {
    ...options
  };
  let {
    limit = 100000,
    uniqueMFs = true,
    estimate = false,
    onStep,
    filterFct,
    canonizeMF,
    ionizations: rawIonizations
  } = options;
  let filterFctVariables = {};
  for (let i = 0; i < ranges.length; i++) {
    const range = ranges[i];
    if (typeof range === 'object' && range.name) {
      filterFctVariables[range.name] = i;
      ranges[i] = range.value;
    }
  }
  if (filterFct) {
    // we create a real javascript function
    let variables = Object.keys(filterFctVariables);
    variables.push('mm', 'mz', 'charge', 'unsaturation', 'atoms');
    // eslint-disable-next-line no-new-func
    filterFct = new Function(...variables, `return ${filterFct}`);
  }
  if (uniqueMFs === true) canonizeMF = true;
  if (canonizeMF === undefined) canonizeMF = true;
  const ionizations = (0, mf_utilities_1$8.preprocessIonizations)(rawIonizations);
  options = {
    ...options,
    filterFctVariables,
    filterFct,
    canonizeMF,
    ionizations
  };
  // we allow String delimited by ". or ;" instead of an array
  for (let i = 0; i < ranges.length; i++) {
    if (!Array.isArray(ranges[i])) {
      ranges[i] = ranges[i].split(/[,.]/);
    }
  }
  // we allow ranges in a string ...
  // problem with ranges is that we need to know to what the range applies
  for (let i = 0; i < ranges.length; i++) {
    let parts = ranges[i];
    let newParts = [];
    for (let j = 0; j < parts.length; j++) {
      let part = parts[j];
      if (part.match(/\d-[\d-]/)) {
        // deal with negative numbers
        // there are ranges ... we are in trouble !
        newParts = newParts.concat(new mf_parser_1$b.MF(part).flatten({
          groupIdentical: false,
          limit
        }));
      } else {
        newParts.push(parts[j]); // the part with the comments !
      }
    }
    ranges[i] = newParts;
  }
  if (estimate) {
    let total = ranges.reduce((previous, current) => previous * current.length, 1);
    return total * ionizations.length;
  }
  let results = [];
  let sizes = [];
  let currents = [];
  for (let i = 0; i < ranges.length; i++) {
    sizes.push(ranges[i].length - 1);
    currents.push(0);
  }
  let position = 0;
  let evolution = 0;
  while (position < currents.length) {
    if (currents[position] < sizes[position]) {
      if (onStep) await onStep(evolution);
      evolution++;
      appendResult(results, currents, ranges, options);
      currents[position]++;
      for (let i = 0; i < position; i++) {
        currents[i] = 0;
      }
      position = 0;
    } else {
      position++;
    }
    if (evolution > limit) {
      throw new Error(`You have reached the limit of ${limit}. You could still change this value using the limit option but it is likely to crash.`);
    }
  }
  appendResult(results, currents, ranges, options);
  if (uniqueMFs) {
    let uniqueMFsObject = {};
    for (const result of results) {
      uniqueMFsObject[result.mf + result.ionization.mf] = result;
    }
    results = Object.keys(uniqueMFsObject).map(k => uniqueMFsObject[k]);
  }
  results.sort((a, b) => a.em - b.em);
  return results;
}
let ems = {};
// internal method used as a cache
function getMonoisotopicMass(mfString) {
  if (!ems[mfString]) {
    // we need to calculate based on the mf but not very often ...
    let mf = new mf_parser_1$b.MF(mfString);
    let info = mf.getInfo();
    ems[mfString] = {
      em: info.monoisotopicMass,
      charge: info.charge,
      mw: info.mass,
      unsaturation: (info.unsaturation - 1) * 2,
      atoms: info.atoms
    };
  }
  return ems[mfString];
}
function getEMFromParts(parts, currents, ionization) {
  let charge = 0;
  let em = 0;
  let mw = 0;
  let unsaturation = 0;
  let validUnsaturation = true;
  let atoms = {};
  for (let i = 0; i < parts.length; i++) {
    let part = parts[i][currents[i]];
    if (part) {
      let info = getMonoisotopicMass(part);
      charge += info.charge;
      em += info.em;
      mw += info.mw;
      (0, sum_object_keys_1.default)(atoms, info.atoms);
      if (info.unsaturation && validUnsaturation) {
        unsaturation += info.unsaturation;
      }
    }
  }
  return {
    charge,
    em,
    mw,
    ionization,
    unsaturation: unsaturation / 2 + 1 ,
    atoms
  };
}
function appendResult(results, currents, keys, options = {}) {
  const {
    canonizeMF,
    filter,
    ionizations,
    filterFct,
    filterFctVariables,
    links = {}
  } = options;
  // this script is designed to combine molecular formula
  // that may contain comments after a "$" sign
  // therefore we should put all the comments at the ned
  if (links.filter) {
    let sharps = [];
    for (let i = 0; i < keys.length; i++) {
      let anchors = keys[i][currents[i]].match(/#\d+/g);
      if (anchors) sharps.push(...anchors);
    }
    if (sharps.length % 2 === 1) return;
    sharps = sharps.toSorted();
    for (let i = 0; i < sharps.length; i += 2) {
      if (sharps[i] !== sharps[i + 1]) return;
    }
  }
  for (let ionization of ionizations) {
    let result = getEMFromParts(keys, currents, ionization);
    if (filterFct) {
      let variables = [];
      for (let key in filterFctVariables) {
        variables.push(currents[filterFctVariables[key]]);
      }
      variables.push(result.em, (result.em + ionization.em - ionization.charge * chemical_elements_1$3.ELECTRON_MASS) / Math.abs(ionization.charge), result.charge + result.ionization.charge, result.unsaturation, result.atoms);
      if (!filterFct(...variables)) continue;
    }
    result.parts = [];
    result.mf = '';
    let comments = [];
    for (let i = 0; i < keys.length; i++) {
      let key = keys[i][currents[i]];
      if (key) {
        if (key.includes('$')) {
          comments.push(key.replace(/^[^$]*\$/, ''));
          key = key.replace(/\$.*/, '');
        }
        result.parts[i] = key;
        result.mf += key;
      }
    }
    if (comments.length > 0) {
      result.comment = comments.join(' ');
    }
    let match = (0, mf_matcher_1$3.msemMatcher)(result, filter);
    if (!match) continue;
    result.ms = match.ms;
    result.ionization = match.ionization;
    if (canonizeMF) {
      result.mf = new mf_parser_1$b.MF(result.mf).toMF();
    }
    results.push(result);
  }
}

(function (exports) {

  var __createBinding = src$b && src$b.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$b && src$b.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(generateMFs$1, exports);
})(src$b);

Object.defineProperty(fromArray$1, "__esModule", {
  value: true
});
fromArray$1.fromArray = fromArray;
const mf_generator_1$6 = src$b;
/**
 * Generates a database 'generated' from an array of molecular formula
 * @param {array} mfsArray - Array of string or Array of array containing the parts to combine
 * @param {object} [options={}]
 * @param {boolean} [options.estimate=false] - estimate the number of MF without filters
 * @param {string} [options.databaseName='generated']
 * @param {function} [options.onStep] - Callback to do after each step
 * @param {number} [options.limit=10000000] - Maximum number of results
 * @param {boolean} [options.canonizeMF=true] - Canonize molecular formula
 * @param {boolean} [options.uniqueMFs=true] - Force canonization and make MF unique
 * @param {string} [options.ionizations=''] - Comma separated list of ionizations (to charge the molecule)
 * @param {object} [options.filter={}]
 * @param {number} [options.filter.minMass=0] - Minimal monoisotopic mass
 * @param {number} [options.filter.maxMass=+Infinity] - Maximal monoisotopic mass
 * @param {number} [options.filter.minEM=0] - Minimal neutral monoisotopic mass
 * @param {number} [options.filter.maxEM=+Infinity] - Maximal neutral monoisotopic mass
 * @param {number} [options.filter.minMSEM=0] - Minimal observed monoisotopic mass
 * @param {number} [options.filter.maxMSEM=+Infinity] - Maximal observed monoisotopic mass
 * @param {number} [options.filter.minCharge=-Infinity] - Minimal charge
 * @param {number} [options.filter.maxCharge=+Infinity] - Maximal charge
 * @param {boolean}  [options.filter.absoluteCharge=false] - If true, the charge is absolute (so between 0 and +Infinity by default)
 * @param {object} [options.filter.unsaturation={}]
 * @param {number} [options.filter.unsaturation.min=-Infinity] - Minimal unsaturation
 * @param {number} [options.filter.unsaturation.max=+Infinity] - Maximal unsaturation
 * @param {boolean} [options.filter.unsaturation.onlyInteger=false] - Integer unsaturation
 * @param {boolean} [options.filter.unsaturation.onlyNonInteger=false] - Non integer unsaturation
 * @param {object} [options.filter.atoms] - object of atom:{min, max}
 * @param {function} [options.filter.callback] - a function to filter the MF
 * @param {string}  [options.filterFct] - A string representing a function
 *
 * @example
 *
 * const {EMDB} = require('emdb');
 * let emdb = new EMDB();
 * let array = ['C1-10', 'H1-10'];
 * emdb.fromArray(array); // create a database 'generated' combining all possibilies
 * console.log(emdb.get('generated').length); // 100
 *
 * @example
 * const {EMDB} = require('emdb');
 * let emdb = new EMDB();
 * let array = ['C1-10 H1-10'];
 * emdb.fromArray(array); // create a database 'generated' combining all possibilies
 * console.log(emdb.get('generated').length); // 100
 *
 * @example
 * const {EMDB} = require('emdb');
 * let emdb = new EMDB();
 * // in case of an array of array, one of the group is allwed
 * let array = [['C1-10','H1-10'],'Cl0-1 Br0-1'];
 * emdb.fromArray(array); // create a database 'generated' combining all possibilies
 * console.log(emdb.get('generated').length); // 80
 *
 * @example
 * <script src="https://www.lactame.com/lib/mass-tools/HEAD/mass-tools.js" />
 * <script>
 *   let emdb = new MassTools.EMDB();
 *   let array = ['C1-10', 'H1-10'];
 *   emdb.fromArray(array); // create a database 'generated' combining all possibilities
 *   console.log(emdb.get('generated').length); // 100
 * </script>
 *
 * // from the browser
 */
async function fromArray(mfsArray, options = {}) {
  return (0, mf_generator_1$6.generateMFs)(mfsArray, options);
}

var fromMolecules$1 = {};

var src$a = {};

var fragment$3 = {};

let xAtomicNumber = 0;
/**
 * Returns the atomic number of the X atom
 * @param {import('openchemlib').Molecule} molecule - An instance of a molecule
 * @returns
 */
function getXAtomicNumber(molecule) {
  if (!xAtomicNumber) {
    const OCL = molecule.getOCL();
    xAtomicNumber = OCL.Molecule.getAtomicNoFromLabel('X', OCL.Molecule.cPseudoAtomX);
  }
  return xAtomicNumber;
}

/**
 * Check if a specific atom is a sp3 carbon
 * @param {import('openchemlib').Molecule} molecule
 * @param {number} atomID
 */
function isCsp3(molecule, atomID) {
  if (molecule.getAtomicNo(atomID) !== 6) return false;
  if (molecule.getAtomCharge(atomID) !== 0) return false;
  if (molecule.getImplicitHydrogens(atomID) + molecule.getConnAtoms(atomID) !== 4) {
    return false;
  }
  return true;
}

/**
 * This method put all the chiral centers in the molecule in the same group and racemic
 * @param {import('openchemlib').Molecule} molecule - An instance of a molecule
 * @param {object} [options={}]
 * @param {object} [options.OCL] - openchemlib library
 */
function makeRacemic(molecule) {
  const {
    Molecule
  } = molecule.getOCL();
  // if we don't calculate this we have 2 epimers
  molecule.ensureHelperArrays(Molecule.cHelperCIP);
  // we need to make one group "AND" for chiral (to force to racemic, this means diastereotopic and not enantiotopic)
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    if (molecule.getAtomParity(i) !== Molecule.cAtomParityNone) {
      molecule.setAtomESR(i, Molecule.cESRTypeAnd, 0); // changed to group 0; TLS 9.Nov.2015
    }
  }
  // after the change we need to recalculate the CIP
  molecule.ensureHelperArrays(Molecule.cHelperCIP);
}

/**
 * Tag an atom to be able to visualize it
 * @param molecule
 * @param iAtom
 */
function tagAtom(molecule, iAtom) {
  const customLabel = `${molecule.getAtomLabel(iAtom)}*`;
  molecule.setAtomCustomLabel(iAtom, customLabel);
  if (molecule.getAtomicNo(iAtom) === 1) {
    molecule.setAtomicNo(iAtom, getXAtomicNumber(molecule));
  } else {
    // we can not use X because we would have problems with valencies if it is
    // expanded hydrogens or not
    // we can not only use a custom label because it does not count for the canonisation
    molecule.setAtomMass(iAtom, molecule.getAtomMass(iAtom) + 5);
  }
  return customLabel;
}

const FULL_HOSE_CODE$1 = 1;
const HOSE_CODE_CUT_C_SP3_SP3$1 = 2;
/**
 * Returns an array of hose code fragments for the specified molecule.
 * @param molecule - The OCL molecule to process.
 * @param options - Options for generating hose codes.
 * @returns An array of hose code fragments.
 */
function getHoseCodesForAtomsAsFragments(molecule, options = {}) {
  const OCL = molecule.getOCL();
  const {
    allowedCustomLabels,
    minSphereSize = 0,
    maxSphereSize = 4,
    kind = FULL_HOSE_CODE$1,
    tagAtoms = [],
    tagAtomFct = tagAtom
  } = options;
  const rootAtoms = options.rootAtoms ? options.rootAtoms.slice() : [];
  molecule = molecule.getCompactCopy();
  if (tagAtoms.length > 0) {
    internalTagAtoms(molecule, tagAtoms, rootAtoms, tagAtomFct);
  } else {
    // this force reordering of atoms in order to have hydrogens at the end
    molecule.ensureHelperArrays(OCL.Molecule.cHelperNeighbours);
  }
  if (rootAtoms.length === 0) {
    for (let j = 0; j < molecule.getAllAtoms(); j++) {
      if (allowedCustomLabels?.includes(molecule.getAtomCustomLabel(j) ?? '') || molecule.getAtomCustomLabel(j)) {
        rootAtoms.push(j);
      }
    }
  }
  const fragments = [];
  // keep track of the atoms when creating the fragment
  const mappings = [];
  let min = 0;
  let max = 0;
  const atomMask = new Array(molecule.getAllAtoms()).fill(false);
  const atomList = new Array(molecule.getAllAtoms());
  for (let sphere = 0; sphere <= maxSphereSize; sphere++) {
    if (max === 0) {
      for (const rootAtom of rootAtoms) {
        atomList[max] = rootAtom;
        atomMask[rootAtom] = true;
        max++;
      }
    } else {
      let newMax = max;
      for (let i = min; i < max; i++) {
        const atom = atomList[i];
        for (let j = 0; j < molecule.getAllConnAtoms(atom); j++) {
          const connAtom = molecule.getConnAtom(atom, j);
          if (!atomMask[connAtom]) {
            switch (kind) {
              case FULL_HOSE_CODE$1:
                atomMask[connAtom] = true;
                atomList[newMax++] = connAtom;
                break;
              case HOSE_CODE_CUT_C_SP3_SP3$1:
                if (!(isCsp3(molecule, atom) && isCsp3(molecule, connAtom))) {
                  atomMask[connAtom] = true;
                  atomList[newMax++] = connAtom;
                }
                break;
              default:
                throw new Error('getHoseCoesForAtom unknown kind');
            }
          }
        }
      }
      min = max;
      max = newMax;
    }
    if (sphere >= minSphereSize) {
      const fragment = new OCL.Molecule(0, 0);
      molecule.copyMoleculeByAtoms(fragment, atomMask, true, mappings);
      // we using atomMapNo field in order to keep track of the original atom number even if we remove hydrogens
      for (let i = 0; i < fragment.getAllAtoms(); i++) {
        fragment.setAtomMapNo(i, mappings.indexOf(i) + 1);
      }
      fragment.removeExplicitHydrogens();
      makeRacemic(fragment);
      // we encode atom characteristics in the query features
      addQueryFeaturesAndRemoveMapNo(fragment, molecule);
      fragments.push(fragment);
    }
  }
  return fragments;
}
/**
 * If the atom is not an halogen, X or an hydrogen
 * we add query features to the atom
 * This includes aromaticity, ring size, number of hydrogens
 * @param fragment
 * @param molecule
 */
function addQueryFeaturesAndRemoveMapNo(fragment, molecule) {
  const Molecule = molecule.getOCL().Molecule;
  for (let i = 0; i < fragment.getAllAtoms(); i++) {
    const mapping = fragment.getAtomMapNo(i) - 1;
    fragment.setAtomMapNo(i, 0);
    if ([1, 9, 17, 35, 53, getXAtomicNumber(molecule)].includes(fragment.getAtomicNo(i))) {
      continue;
    }
    // aromaticity
    const isAromatic = molecule.isAromaticAtom(mapping);
    if (isAromatic) {
      fragment.setAtomQueryFeature(i, Molecule.cAtomQFAromatic, true);
      fragment.setAtomQueryFeature(i, Molecule.cAtomQFNotAromatic, false);
    } else {
      fragment.setAtomQueryFeature(i, Molecule.cAtomQFAromatic, false);
      fragment.setAtomQueryFeature(i, Molecule.cAtomQFNotAromatic, true);
    }
    // cycles
    const smallestRing = molecule.getAtomRingSize(mapping);
    switch (smallestRing) {
      case 0:
        break;
      case 3:
        fragment.setAtomQueryFeature(i, Molecule.cAtomQFRingSize3, true);
        break;
      case 4:
        fragment.setAtomQueryFeature(i, Molecule.cAtomQFRingSize4, true);
        break;
      case 5:
        fragment.setAtomQueryFeature(i, Molecule.cAtomQFRingSize5, true);
        break;
      case 6:
        fragment.setAtomQueryFeature(i, Molecule.cAtomQFRingSize6, true);
        break;
      case 7:
        fragment.setAtomQueryFeature(i, Molecule.cAtomQFRingSize7, true);
        break;
      default:
        fragment.setAtomQueryFeature(i, Molecule.cAtomQFRingSizeLarge, true);
    }
    const nbHydrogens = molecule.getAllHydrogens(mapping);
    if (nbHydrogens === 0) {
      fragment.setAtomQueryFeature(i, Molecule.cAtomQFNot0Hydrogen, false);
    } else {
      fragment.setAtomQueryFeature(i, Molecule.cAtomQFNot0Hydrogen, true);
    }
    if (nbHydrogens === 1) {
      fragment.setAtomQueryFeature(i, Molecule.cAtomQFNot1Hydrogen, false);
    } else {
      fragment.setAtomQueryFeature(i, Molecule.cAtomQFNot1Hydrogen, true);
    }
    if (nbHydrogens === 2) {
      fragment.setAtomQueryFeature(i, Molecule.cAtomQFNot2Hydrogen, false);
    } else {
      fragment.setAtomQueryFeature(i, Molecule.cAtomQFNot2Hydrogen, true);
    }
    if (nbHydrogens === 3) {
      fragment.setAtomQueryFeature(i, Molecule.cAtomQFNot3Hydrogen, false);
    } else {
      fragment.setAtomQueryFeature(i, Molecule.cAtomQFNot3Hydrogen, true);
    }
  }
}
// tagging atoms may change the order of the atoms because hydrogens must be at the end of the file
// in order to remember the rootAtoms we will tag before
function internalTagAtoms(molecule, tagAtoms, rootAtoms, tagAtomFct) {
  const OCL = molecule.getOCL();
  if (tagAtoms) {
    for (let i = 0; i < molecule.getAllAtoms(); i++) {
      molecule.setAtomMapNo(i, i + 1);
    }
    if (tagAtoms.length > 0) {
      for (const atom of tagAtoms) {
        tagAtomFct(molecule, atom);
      }
    }
  }
  // this force reordering of atoms in order to have hydrogens at the end
  molecule.ensureHelperArrays(OCL.Molecule.cHelperNeighbours);
  if (rootAtoms.length > 0) {
    const mapping = new Int32Array(molecule.getAllAtoms());
    for (let i = 0; i < molecule.getAllAtoms(); i++) {
      mapping[molecule.getAtomMapNo(i) - 1] = i;
    }
    for (let i = 0; i < rootAtoms.length; i++) {
      rootAtoms[i] = mapping[rootAtoms[i]];
    }
  }
}

/**
 * We need to create an array of atoms
 * that contains an array of pathLength
 * that contains an array of object
 * @param molecule
 * @param options
 * @returns
 */
function getAllAtomsPaths(molecule, options = {}) {
  const {
    maxPathLength = 5
  } = options;
  const allAtomsPaths = [];
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    const oneAtomPaths = [];
    allAtomsPaths.push(oneAtomPaths);
    let atomPaths = [{
      path: [i],
      pathLength: 0
    }];
    oneAtomPaths.push(atomPaths);
    let nextIndexes = [0];
    let nextAtoms = [i];
    for (let sphere = 1; sphere <= maxPathLength; sphere++) {
      atomPaths = [];
      oneAtomPaths.push(atomPaths);
      const currentIndexes = nextIndexes;
      const currentAtoms = nextAtoms;
      nextIndexes = [];
      nextAtoms = [];
      for (let i = 0; i < currentIndexes.length; i++) {
        const atom = currentAtoms[i];
        const index = currentIndexes[i];
        const previousPath = oneAtomPaths[sphere - 1]?.[index]?.path;
        if (!previousPath) {
          throw new Error(`Unexpected missing previousPath for sphere ${sphere - 1} and index ${index}`);
        }
        for (let conn = 0; conn < molecule.getAllConnAtoms(atom); conn++) {
          const connectedAtom = molecule.getConnAtom(atom, conn);
          if (previousPath.includes(connectedAtom)) continue;
          nextIndexes.push(atomPaths.length);
          nextAtoms.push(connectedAtom);
          atomPaths.push({
            path: [...previousPath, connectedAtom],
            pathLength: sphere
          });
        }
      }
    }
  }
  return allAtomsPaths;
}

/**
 * Ensures that all atoms in the molecule have a unique mapNo.
 * Atoms that already have a mapNo keep it. Atoms without a mapNo
 * are assigned the next available number starting from 1.
 * Throws if the molecule contains duplicate mapNo values.
 * @param molecule - The molecule to process (modified in place)
 */
function ensureMapNo(molecule) {
  const existingMapNo = {};
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    const mapNo = molecule.getAtomMapNo(i);
    if (mapNo) {
      if (existingMapNo[mapNo]) {
        throw new Error('The molecule contains several atoms with the same mapNo');
      }
      existingMapNo[mapNo] = true;
    }
  }
  let nextMapNo = 1;
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    const mapNo = molecule.getAtomMapNo(i);
    if (!mapNo) {
      while (existingMapNo[nextMapNo]) {
        nextMapNo++;
      }
      existingMapNo[nextMapNo] = true;
      molecule.setAtomMapNo(i, nextMapNo, false);
    }
  }
}

/**
 * Creates a compact copy of the molecule without custom labels.
 * We don't want that custom labels interfere with hose code and diaID generation.
 * @param molecule
 * @returns
 */
function getCompactCopyWithoutCustomLabels(molecule) {
  const tempMolecule = molecule.getCompactCopy();
  for (let i = 0; i < tempMolecule.getAllAtoms(); i++) {
    tempMolecule.setAtomCustomLabel(i, '');
  }
  return tempMolecule;
}

/**
 * Algorithm that finds the shortest distance from one node to the other
 * @param {Matrix} adjMatrix - A squared adjacency matrix
 * @return {Matrix} - Distance from a node to the other, -1 if the node is unreachable
 */
function floydWarshall(adjMatrix) {
  if (Matrix$1.isMatrix(adjMatrix) && adjMatrix.columns !== adjMatrix.rows) {
    throw new TypeError('The adjacency matrix should be squared');
  }
  const numVertices = adjMatrix.columns;
  let distMatrix = new Matrix$1(numVertices, numVertices);
  distMatrix.apply((row, column) => {
    // principal diagonal is 0
    if (row === column) {
      distMatrix.set(row, column, 0);
    } else {
      let val = adjMatrix.get(row, column);
      if (val || Object.is(val, -0)) {
        // edges values remain the same
        distMatrix.set(row, column, val);
      } else {
        // 0 values become infinity
        distMatrix.set(row, column, Number.POSITIVE_INFINITY);
      }
    }
  });
  for (let k = 0; k < numVertices; ++k) {
    for (let i = 0; i < numVertices; ++i) {
      for (let j = 0; j < numVertices; ++j) {
        let dist = distMatrix.get(i, k) + distMatrix.get(k, j);
        if (distMatrix.get(i, j) > dist) {
          distMatrix.set(i, j, dist);
        }
      }
    }
  }
  // When there's no connection the value is -1
  distMatrix.apply((row, column) => {
    if (distMatrix.get(row, column) === Number.POSITIVE_INFINITY) {
      distMatrix.set(row, column, -1);
    }
  });
  return distMatrix;
}

/**
 * Returns a connectivity matrix
 * @param {import('openchemlib').Molecule} molecule
 * @param {object} [options={}]
 * @param {boolean} [options.pathLength=false] - get the path length between atoms
 * @param {boolean} [options.mass=false] - set the nominal mass of the atoms on diagonal
 * @param {boolean} [options.atomicNo=false] - set the atomic number of the atom on diagonal
 * @param {boolean} [options.negativeAtomicNo=false] - set the atomic number * -1 of the atom on diagonal
 * @param {boolean} [options.sdt=false] - set 1, 2 or 3 depending if single, double or triple bond
 * @param {boolean} [options.sdta=false] - set 1, 2, 3 or 4 depending if single, double, triple or aromatic  bond
 */
function getConnectivityMatrix(molecule, options = {}) {
  const OCL = molecule.getOCL();
  molecule.ensureHelperArrays(OCL.Molecule.cHelperNeighbours);
  const nbAtoms = molecule.getAllAtoms();
  let result = new Array(nbAtoms).fill();
  result = result.map(() => new Array(nbAtoms).fill(0));
  if (!options.pathLength) {
    if (options.atomicNo) {
      for (let i = 0; i < nbAtoms; i++) {
        result[i][i] = molecule.getAtomicNo(i);
      }
    } else if (options.negativeAtomicNo) {
      for (let i = 0; i < nbAtoms; i++) {
        result[i][i] = -molecule.getAtomicNo(i);
      }
    } else if (options.mass) {
      for (let i = 0; i < nbAtoms; i++) {
        result[i][i] = OCL.Molecule.cRoundedMass[molecule.getAtomicNo(i)];
      }
    } else {
      for (let i = 0; i < nbAtoms; i++) {
        result[i][i] = 1;
      }
    }
  }
  if (options.sdt) {
    for (let i = 0; i < nbAtoms; i++) {
      const l = molecule.getAllConnAtoms(i);
      for (let j = 0; j < l; j++) {
        result[i][molecule.getConnAtom(i, j)] = molecule.getConnBondOrder(i, j);
      }
    }
  } else if (options.sdta) {
    for (let i = 0; i < nbAtoms; i++) {
      const l = molecule.getAllConnAtoms(i);
      for (let j = 0; j < l; j++) {
        const bondNumber = molecule.getConnBond(i, j);
        if (molecule.isAromaticBond(bondNumber)) {
          result[i][molecule.getConnAtom(i, j)] = 4;
        } else {
          result[i][molecule.getConnAtom(i, j)] = molecule.getConnBondOrder(i, j);
        }
      }
    }
  } else {
    for (let i = 0; i < nbAtoms; i++) {
      const l = molecule.getAllConnAtoms(i);
      for (let j = 0; j < l; j++) {
        result[i][molecule.getConnAtom(i, j)] = 1;
      }
    }
  }
  if (options.pathLength) {
    result = floydWarshall(new Matrix$1(result)).to2DArray();
  }
  return result;
}

/**
 * Computes a canonical ID for each atom in `moleculeWithH` by tagging it
 * and calling `getCanonizedIDCode`.
 * By default (`racemic: false`) the ID encodes absolute stereochemistry so
 * enantiomers produce distinct IDs — suitable as independent cache keys for
 * pro-R / pro-S assignment.
 * With `racemic: true` the probe is first racemized (same logic as `diaIDs`),
 * yielding IDs that are identical for both enantiomers.
 * @param topicMolecule
 * @param options
 */
function getEnantioIDs(topicMolecule, options = {}) {
  const {
    racemic = false
  } = options;
  const moleculeWithH = topicMolecule.moleculeWithH;
  const {
    Molecule
  } = moleculeWithH.getOCL();
  const heterotopicSymmetryRanks = topicMolecule.heterotopicSymmetryRanks;
  const ids = new Array(moleculeWithH.getAllAtoms());
  const cache = {};
  for (let i = 0; i < moleculeWithH.getAllAtoms(); i++) {
    const rank = heterotopicSymmetryRanks[i];
    if (rank && cache[rank]) {
      ids[i] = cache[rank];
      continue;
    }
    const tempMolecule = getCompactCopyWithoutCustomLabels(moleculeWithH);
    tagAtom(tempMolecule, i);
    if (racemic) makeRacemic(tempMolecule);
    const id = tempMolecule.getCanonizedIDCode(Molecule.CANONIZER_ENCODE_ATOM_CUSTOM_LABELS);
    ids[i] = id;
    if (rank) cache[rank] = id;
  }
  return ids;
}

/**
 * Computes canonical diastereotopic IDs indexed by `finalRanks` (not by atom
 * position). The rank-indexed layout is required so that the cached array can
 * be reused across `TopicMolecule` instances with the same `idCode` but
 * different atom orderings (see `fromMolecule`).
 * @param topicMolecule
 */
function getCanonizedDiaIDs(topicMolecule) {
  // `racemic: true` collapses the absolute enantioIDs into diaIDs that are
  // identical for both enantiomers (they encode the diastereotopic environment
  // only, not the absolute configuration).
  const atomIDs = getEnantioIDs(topicMolecule, {
    racemic: true
  });
  const finalRanks = topicMolecule.finalRanks;
  const canonized = new Array(atomIDs.length);
  for (let i = 0; i < atomIDs.length; i++) {
    canonized[finalRanks[i]] = atomIDs[i];
  }
  return canonized;
}

/**
 * Returns an array of strings (idCodes) specified molecule. Each string corresponds to a
 * hose code. By default it will calculate the hose codes for sphere 0 to 4 and will reuse
 * the existing tagged atoms.
 * @param molecule - The OCL molecule to process.
 * @param options - Options for generating hose codes.
 * @returns An array of hose code strings.
 */
function getHoseCodesForAtomsAsStrings(molecule, options = {}) {
  const fragments = getHoseCodesForAtomsAsFragments(molecule, options);
  const OCL = molecule.getOCL();
  const hoses = [];
  for (const fragment of fragments) {
    hoses.push(fragment.getCanonizedIDCode(OCL.Molecule.CANONIZER_ENCODE_ATOM_CUSTOM_LABELS));
  }
  return hoses;
}

/**
 * Get the canonized hose codes for a topic molecule. It will use the moleculeWithH
 * @param topicMolecule - The topic molecule to get the hose codes for.
 * @returns The canonized hose codes.
 */
function getCanonizedHoseCodes(topicMolecule) {
  const options = topicMolecule.options;
  const heterotopicSymmetryRanks = topicMolecule.heterotopicSymmetryRanks;
  const moleculeWithH = topicMolecule.moleculeWithH;
  const finalRanks = topicMolecule.finalRanks;
  const canonizedHoseCodes = new Array(moleculeWithH.getAllAtoms());
  moleculeWithH.ensureHelperArrays(topicMolecule.molecule.getOCL().Molecule.cHelperSymmetryStereoHeterotopicity);
  const cache = {};
  for (let i = 0; i < topicMolecule.moleculeWithH.getAllAtoms(); i++) {
    const rank = heterotopicSymmetryRanks[i];
    if (rank && cache[rank]) {
      canonizedHoseCodes[finalRanks[i]] = cache[rank].diaID;
      continue;
    }
    const tempMolecule = getCompactCopyWithoutCustomLabels(moleculeWithH);
    tagAtom(tempMolecule, i);
    const hoses = getHoseCodesForAtomsAsStrings(tempMolecule, options);
    canonizedHoseCodes[finalRanks[i]] = hoses;
  }
  return canonizedHoseCodes;
}

/**
 * For each atom we will return an array of objects
 * @param topicMolecule
 * @param options
 * @returns
 */
function getCanonizedHoseCodesForPath(topicMolecule, options = {}) {
  const {
    minPathLength = 0,
    maxPathLength = topicMolecule.options.maxPathLength,
    toAtomicNo,
    fromAtomicNo
  } = options;
  if (maxPathLength > topicMolecule.options.maxPathLength) {
    throw new Error(`maxPathLength cannot be larger than the one defined in topicMolecule: ${topicMolecule.options.maxPathLength}`);
  }
  const atomsPaths = topicMolecule.atomsPaths;
  const molecule = topicMolecule.moleculeWithH;
  const results = new Array(molecule.getAllAtoms());
  for (let fromAtom = 0; fromAtom < molecule.getAllAtoms(); fromAtom++) {
    results[fromAtom] = {
      fromDiaID: topicMolecule.diaIDs[fromAtom],
      paths: []
    };
    if (fromAtomicNo && molecule.getAtomicNo(fromAtom) !== fromAtomicNo) {
      continue;
    }
    for (let pathLength = minPathLength; pathLength <= maxPathLength; pathLength++) {
      const pathOfSpecificLength = atomsPaths[fromAtom][pathLength];
      for (const path of pathOfSpecificLength) {
        const toAtom = path.path.at(-1);
        if (toAtomicNo && molecule.getAtomicNo(toAtom) !== toAtomicNo) {
          continue;
        }
        results[fromAtom].paths.push({
          toDiaID: topicMolecule.diaIDs[toAtom],
          pathLength: path.pathLength,
          path: path.path,
          hoses: getHoseCodesForAtomsAsStrings(topicMolecule.moleculeWithH, {
            ...options,
            rootAtoms: path.path,
            tagAtoms: [fromAtom, toAtom]
          })
        });
      }
    }
  }
  return results;
}

function getDiaIDsAndInfo(topicMolecule, canonizedDiaIDs) {
  const newDiaIDs = [];
  const molecule = topicMolecule.moleculeWithH;
  const counts = {};
  for (const diaID of canonizedDiaIDs) {
    if (!counts[diaID]) {
      counts[diaID] = 0;
    }
    counts[diaID]++;
  }
  for (let i = 0; i < canonizedDiaIDs.length; i++) {
    const diaID = canonizedDiaIDs[topicMolecule.finalRanks[i]];
    if (!diaID) {
      throw new Error(`Unexpected missing canonized diaID for atom ${i}`);
    }
    const count = counts[diaID];
    if (!count) {
      throw new Error(`Unexpected missing count for diaID ${diaID}`);
    }
    const newDiaID = {
      idCode: diaID,
      attachedHydrogensIDCodes: [],
      attachedHydrogens: [],
      nbAttachedHydrogens: 0,
      atomLabel: molecule.getAtomLabel(i),
      nbEquivalentAtoms: count,
      heavyAtom: undefined,
      atomMapNo: molecule.getAtomMapNo(i)
    };
    if (molecule.getAtomicNo(i) === 1) {
      const atom = molecule.getConnAtom(i, 0);
      newDiaID.heavyAtom = canonizedDiaIDs[topicMolecule.finalRanks[atom]];
    }
    for (let j = 0; j < molecule.getAllConnAtoms(i); j++) {
      const atom = molecule.getConnAtom(i, j);
      if (molecule.getAtomicNo(atom) === 1) {
        newDiaID.nbAttachedHydrogens++;
        newDiaID.attachedHydrogens.push(atom);
        const hydrogenDiaID = canonizedDiaIDs[topicMolecule.finalRanks[atom]];
        if (!hydrogenDiaID) {
          throw new Error(`Unexpected missing canonized diaID for atom ${atom}`);
        }
        if (!newDiaID.attachedHydrogensIDCodes.includes(hydrogenDiaID)) {
          newDiaID.attachedHydrogensIDCodes.push(hydrogenDiaID);
        }
      }
    }
    newDiaIDs.push(newDiaID);
  }
  return newDiaIDs;
}

/**
 * Get a unique atomic number for a X
 * @param xMolecule
 * @returns
 */
function getHeterotopicSymmetryRanks(xMolecule) {
  xMolecule.ensureHelperArrays(xMolecule.getOCL().Molecule.cHelperSymmetryStereoHeterotopicity);
  const symmetryRanks = [];
  for (let i = 0; i < xMolecule.getAllAtoms(); i++) {
    symmetryRanks.push(xMolecule.getSymmetryRank(i));
  }
  return symmetryRanks;
}
function getFinalRanks(xMolecule) {
  xMolecule.ensureHelperArrays(xMolecule.getOCL().Molecule.cHelperSymmetryStereoHeterotopicity);
  return xMolecule.getFinalRanks(0).map(rank => rank - 1);
}

/**
 * Returns the atoms that are chiral or pseudo chiral.
 * There could be some issues if the original molecule lacks chiral bonds.
 * The function will add them and this could lead to some issues in the case of pseudochiral atoms.
 * @param {import('openchemlib').Molecule} molecule
 * @returns {number[]}
 */
function getChiralOrHeterotopicCarbons(molecule) {
  const {
    Molecule
  } = molecule.getOCL();
  const xAtomicNumber = getXAtomicNumber(molecule);
  const internalMolecule = molecule.getCompactCopy();
  // hydrogens may be diastereotopic, we need to add them
  internalMolecule.addImplicitHydrogens();
  for (let i = 0; i < internalMolecule.getAllAtoms(); i++) {
    // hydrogens are not taken into account during canonization, we need to change them with an atom with a valence of 1
    if (internalMolecule.getAtomicNo(i) === 1) {
      internalMolecule.setAtomicNo(i, xAtomicNumber);
    }
  }
  addPossibleChiralBonds(internalMolecule);
  internalMolecule.ensureHelperArrays(Molecule.cHelperSymmetryStereoHeterotopicity);
  const atoms = [];
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    if (internalMolecule.getAtomicNo(i) === xAtomicNumber) {
      continue;
    }
    if (molecule.getAtomicNo(i) !== internalMolecule.getAtomicNo(i)) {
      throw new Error('getChiralOrHeterotopicCarbons: mismatching atomic numbers');
    }
    if (internalMolecule.getAtomicNo(i) !== 6) {
      continue;
    }
    const neighbourSymmetries = getNeighbourSymmetries(internalMolecule, i);
    if (neighbourSymmetries.length === 4) {
      atoms.push(i);
    }
  }
  return atoms;
}
function addPossibleChiralBonds(molecule) {
  const {
    Molecule
  } = molecule.getOCL();
  molecule.ensureHelperArrays(Molecule.cHelperSymmetryStereoHeterotopicity);
  for (let i = 0; i < molecule.getAtoms(); i++) {
    if (molecule.getAtomicNo(i) !== 6) continue;
    if (molecule.getStereoBond(i) >= 0) continue;
    const neighbourSymmetries = getNeighbourSymmetries(molecule, i);
    if (neighbourSymmetries.length <= 2) continue;
    const stereoBond = molecule.getAtomPreferredStereoBond(i);
    if (stereoBond !== -1) {
      molecule.setBondType(stereoBond, Molecule.cBondTypeUp);
      if (molecule.getBondAtom(1, stereoBond) === i) {
        const connAtom = molecule.getBondAtom(0, stereoBond);
        molecule.setBondAtom(0, stereoBond, i);
        molecule.setBondAtom(1, stereoBond, connAtom);
      }
      // To me it seems that we have to add all stereo centers into AND group 0. TLS 9.Nov.2015
      molecule.setAtomESR(i, Molecule.cESRTypeAnd, 0);
    }
  }
}
function getNeighbourSymmetries(molecule, iAtom) {
  const neighbourSymmetries = [];
  for (let j = 0; j < molecule.getAllConnAtoms(iAtom); j++) {
    const connAtom = molecule.getConnAtom(iAtom, j);
    const symmetryRank = molecule.getSymmetryRank(connAtom);
    if (!neighbourSymmetries.includes(symmetryRank)) {
      neighbourSymmetries.push(molecule.getSymmetryRank(connAtom));
    }
  }
  return neighbourSymmetries;
}

/**
 * This function will add missing chiral bonds on carbons ensure that all enantiotopic
 * or diastereotopic atoms can be identified uniquely
 * @param {import('openchemlib').Molecule} molecule
 * @param {object} [options={}]
 * @param {number} [options.esrType=Molecule.cESRTypeAnd]
 * @param {boolean} [options.atLeastThreeAtoms=true] - if true, only carbons with at least three atoms will be considered
 */
function ensureHeterotopicChiralBonds(molecule, options = {}) {
  const {
    Molecule
  } = molecule.getOCL();
  const {
    esrType = Molecule.cESRTypeAnd,
    atLeastThreeAtoms = true
  } = options;
  molecule.ensureHelperArrays(Molecule.cHelperBitNeighbours);
  const heterotopicCarbons = getChiralOrHeterotopicCarbons(molecule);
  for (const i of heterotopicCarbons) {
    if (atLeastThreeAtoms && molecule.getAllConnAtoms(i) < 3) continue;
    if (molecule.getStereoBond(i) === -1) {
      const stereoBond = molecule.getAtomPreferredStereoBond(i);
      if (stereoBond !== -1) {
        molecule.setBondType(stereoBond, Molecule.cBondTypeUp);
        if (molecule.getBondAtom(1, stereoBond) === i) {
          const connAtom = molecule.getBondAtom(0, stereoBond);
          molecule.setBondAtom(0, stereoBond, i);
          molecule.setBondAtom(1, stereoBond, connAtom);
        }
        // To me it seems that we have to add all stereo centers into AND group 0. TLS 9.Nov.2015
        molecule.setAtomESR(i, esrType, 0);
      }
    }
  }
}

/**
 * Expand all the implicit hydrogens and ensure chiral bonds on heterotopic bonds
 * @param molecule
 * @param options
 * @returns
 */
function getMoleculeWithH(molecule, options) {
  const {
    logger,
    maxNbAtoms
  } = options;
  const moleculeWithH = molecule.getCompactCopy();
  moleculeWithH.addImplicitHydrogens();
  if (moleculeWithH.getAllAtoms() > maxNbAtoms) {
    logger.warn(`too many atoms to evaluate heterotopic chiral bonds: ${moleculeWithH.getAllAtoms()} > ${maxNbAtoms}`);
  } else {
    ensureHeterotopicChiralBonds(moleculeWithH);
  }
  return moleculeWithH;
}

/**
 * In order to be able to give a unique ID to all the atoms we are replacing the H by X
 * @param moleculeWithH
 * @returns
 */
function getXMolecule(moleculeWithH) {
  const xAtomNumber = getXAtomicNumber(moleculeWithH);
  const xMolecule = moleculeWithH.getCompactCopy();
  for (let i = 0; i < xMolecule.getAllAtoms(); i++) {
    // hydrogens are not taken into account during canonization, we need to change them with an atom with a valence of 1
    if (xMolecule.getAtomicNo(i) === 1) {
      xMolecule.setAtomicNo(i, xAtomNumber);
    }
  }
  return xMolecule;
}

/**
 * This class deals with topicity information and hose codes
 * It is optimized to avoid recalculation of the same information
 */
class TopicMolecule {
  originalMolecule;
  molecule;
  idCode;
  options;
  cache;
  constructor(molecule, options = {}) {
    this.originalMolecule = molecule;
    this.options = {
      maxPathLength: 5,
      maxNbAtoms: 250,
      logger: console,
      ...options
    };
    this.idCode = molecule.getIDCode();
    this.molecule = this.originalMolecule.getCompactCopy();
    this.molecule.ensureHelperArrays(molecule.getOCL().Molecule.cHelperNeighbours);
    this.molecule.ensureHelperArrays(this.molecule.getOCL().Molecule.cHelperNeighbours);
    this.cache = {};
  }
  /**
   * This method ensures that all the atoms have a mapNo corresponding to the atom number.
   * It will enforce mapNo in molecule and moleculeWithH
   * We start numbering the atoms at 1
   */
  setAtomNoInMapNo() {
    const molecules = [this.molecule, this.moleculeWithH];
    for (const molecule of molecules) {
      for (let i = 0; i < molecule.getAllAtoms(); i++) {
        molecule.setAtomMapNo(i, i + 1, false);
      }
    }
  }
  /**
   * This method ensures that all the atoms have a mapNo in the molecule (and not the moleculeWithH! )
   */
  ensureMapNo() {
    ensureMapNo(this.molecule);
  }
  /**
   * For each atom we will return an array of objects that contains the
   * different possible path as well as the canonic hose codes
   * @param options
   * @returns
   */
  getHoseCodesForPath(options = {}) {
    return getCanonizedHoseCodesForPath(this, options);
  }
  /**
   * Return one fragment for a specific sphere size and specific root atoms
   * @param rootAtoms
   * @param options
   * @returns
   */
  getHoseFragment(rootAtoms, options = {}) {
    const {
      sphereSize = 2,
      tagAtoms = rootAtoms,
      tagAtomFct
    } = options;
    const fragments = getHoseCodesForAtomsAsFragments(this.moleculeWithH, {
      rootAtoms,
      minSphereSize: sphereSize,
      maxSphereSize: sphereSize,
      tagAtoms,
      tagAtomFct
    });
    return fragments[0];
  }
  getAtomPathsFrom(atom, options = {}) {
    const {
      minPathLength = 1,
      maxPathLength = this.options.maxPathLength,
      toAtomicNo
    } = options;
    if (maxPathLength > this.options.maxPathLength) {
      throw new Error('The maxPathLength is too long, you should increase the maxPathLength when instantiating the TopicMolecule');
    }
    const atomPaths = this.atomsPaths[atom];
    if (!atomPaths) {
      throw new Error('Unexpected missing atom path');
    }
    const paths = [];
    for (let i = minPathLength; i <= maxPathLength; i++) {
      const atomPathValue = atomPaths[i];
      if (!atomPathValue) {
        throw new Error(`Unexpected missing atom path at index ${i}`);
      }
      for (const atomPath of atomPathValue) {
        if (!toAtomicNo || this.moleculeWithH.getAtomicNo(atomPath.path.at(-1)) === toAtomicNo) {
          paths.push(atomPath.path);
        }
      }
    }
    return paths;
  }
  getAtomPaths(atom1, atom2, options = {}) {
    const {
      pathLength
    } = options;
    if (pathLength !== undefined && pathLength > this.options.maxPathLength) {
      throw new Error('The distance is too long, you should increase the maxPathLength when instantiating the TopicMolecule');
    }
    const atomPaths = this.atomsPaths[atom1];
    if (!atomPaths) {
      throw new Error('Unexpected missing atom path');
    }
    const minDistance = pathLength || 0;
    const maxDistance = pathLength || this.options.maxPathLength;
    const paths = [];
    for (let i = minDistance; i <= maxDistance; i++) {
      const atomPathValue = atomPaths[i];
      if (!atomPathValue) {
        throw new Error(`Unexpected missing atom path at index ${i}`);
      }
      for (const atomPath of atomPathValue) {
        if (atomPath.path.at(-1) === atom2) {
          paths.push(atomPath.path);
        }
      }
    }
    return paths;
  }
  get atomsPaths() {
    if (this.cache.atomsPaths) return this.cache.atomsPaths;
    this.cache.atomsPaths = getAllAtomsPaths(this.moleculeWithH, {
      maxPathLength: this.options.maxPathLength
    });
    return this.cache.atomsPaths;
  }
  toMolfile(options = {}) {
    const {
      version = 2
    } = options;
    if (version === 2) {
      return this.molecule.toMolfile();
    }
    return this.molecule.toMolfileV3();
  }
  getMolecule() {
    return this.molecule;
  }
  /**
   * Returns a new TopicMolecule but will copy precalculated information
   * if possible (same idCode). This is very practical when expanding hydrogens
   * for example.
   * @param molecule
   * @returns
   */
  fromMolecule(molecule) {
    const idCode = molecule.getIDCode();
    if (idCode !== this.idCode) {
      // no way for optimisation
      return new TopicMolecule(molecule);
    }
    const topicMolecule = new TopicMolecule(molecule);
    topicMolecule.cache = {
      canonizedDiaIDs: this.cache.canonizedDiaIDs,
      canonizedHoseCodes: this.cache.canonizedHoseCodes,
      prochiralityByEnantioID: this.cache.prochiralityByEnantioID
    };
    return topicMolecule;
  }
  /**
   * Returns a molecule with all the hydrogens added. The order is NOT canonized
   */
  get moleculeWithH() {
    if (this.cache.moleculeWithH) return this.cache.moleculeWithH;
    this.cache.moleculeWithH = getMoleculeWithH(this.molecule, {
      maxNbAtoms: this.options.maxNbAtoms,
      logger: this.options.logger
    });
    return this.cache.moleculeWithH;
  }
  get xMolecule() {
    if (this.cache.xMolecule) return this.cache.xMolecule;
    this.cache.xMolecule = getXMolecule(this.moleculeWithH);
    return this.cache.xMolecule;
  }
  /**
   * This is related to the current moleculeWithH. The order is NOT canonized
   */
  get diaIDs() {
    if (this.cache.diaIDs) return this.cache.diaIDs;
    const diaIDs = [];
    if (this.moleculeWithH.getAllAtoms() > this.options.maxNbAtoms) {
      this.options.logger.warn(`too many atoms to evaluate heterotopicity: ${this.moleculeWithH.getAllAtoms()} > ${this.options.maxNbAtoms}`);
    } else {
      for (let i = 0; i < this.moleculeWithH.getAllAtoms(); i++) {
        diaIDs.push(this.canonizedDiaIDs[this.finalRanks[i]]);
      }
    }
    this.cache.diaIDs = diaIDs;
    return diaIDs;
  }
  /**
   * Computes a canonical ID for each atom in `moleculeWithH` that encodes
   * absolute stereochemistry (no `makeRacemic` step). Unlike `diaIDs`,
   * these IDs differ between enantiomers and are used as cache keys for
   * pro-R / pro-S assignment so that each enantiomer gets an independent
   * computation.
   */
  get enantioIDs() {
    if (this.cache.enantioIDs) return this.cache.enantioIDs;
    this.cache.enantioIDs = this.moleculeWithH.getAllAtoms() <= this.options.maxNbAtoms ? getEnantioIDs(this) : [];
    return this.cache.enantioIDs;
  }
  /**
   * We return the atomIDs corresponding to the specified diaID as well has the attached hydrogens or heavy atoms
   * @param diaID
   * @returns
   */
  getDiaIDsObject() {
    return groupDiastereotopicAtomIDsAsObject(this.diaIDs, this.molecule, this.moleculeWithH);
  }
  /**
   * This is related to the current moleculeWithH. The order is NOT canonized
   */
  get hoseCodes() {
    if (this.cache.hoseCodes) return this.cache.hoseCodes;
    const hoseCodes = [];
    for (let i = 0; i < this.moleculeWithH.getAllAtoms(); i++) {
      hoseCodes.push(this.canonizedHoseCodes[this.finalRanks[i]]);
    }
    this.cache.hoseCodes = hoseCodes;
    return hoseCodes;
  }
  get canonizedDiaIDs() {
    if (this.cache.canonizedDiaIDs) return this.cache.canonizedDiaIDs;
    if (this.moleculeWithH.getAllAtoms() > this.options.maxNbAtoms) {
      this.options.logger.warn(`too many atoms to evaluate heterotopic chiral bonds: ${this.moleculeWithH.getAllAtoms()} > ${this.options.maxNbAtoms}`);
      this.cache.canonizedDiaIDs = [];
      return [];
    }
    this.cache.canonizedDiaIDs = getCanonizedDiaIDs(this);
    return this.cache.canonizedDiaIDs;
  }
  get canonizedHoseCodes() {
    if (this.cache.canonizedHoseCodes) {
      return this.cache.canonizedHoseCodes;
    }
    this.cache.canonizedHoseCodes = getCanonizedHoseCodes(this);
    return this.cache.canonizedHoseCodes;
  }
  /**
   * Returns the distance matrix for the current moleculeWithH
   */
  get distanceMatrix() {
    return getConnectivityMatrix(this.moleculeWithH, {
      pathLength: true
    });
  }
  get diaIDsAndInfo() {
    if (this.cache.diaIDsAndInfo) {
      return this.cache.diaIDsAndInfo;
    }
    this.cache.diaIDsAndInfo = getDiaIDsAndInfo(this, this.canonizedDiaIDs);
    return this.cache.diaIDsAndInfo;
  }
  /**
   * Returns symmetryRanks for all the atoms including hydrogens. Those ranks
   * deals with topicity and is related to the current moleculeWithH.
   * In order to calculate the ranks we replace all the
   * hydrogens with a X atom.
   */
  get heterotopicSymmetryRanks() {
    if (this.cache.heterotopicSymmetryRanks) {
      return this.cache.heterotopicSymmetryRanks;
    }
    this.cache.heterotopicSymmetryRanks = getHeterotopicSymmetryRanks(this.xMolecule);
    return [...this.cache.heterotopicSymmetryRanks];
  }
  /**
   * Returns finalRanks for all the atoms including hydrogens. Those ranks
   * deals with topicity and is related to the current moleculeWithH.
   * All the atoms have a unique identifier.j
   * In order to calculate the ranks we replace all the
   * hydrogens with a X atom.
   */
  get finalRanks() {
    if (this.cache.finalRanks) return this.cache.finalRanks;
    this.cache.finalRanks = getFinalRanks(this.xMolecule);
    return this.cache.finalRanks;
  }
  toMolfileWithH(options = {}) {
    const {
      version = 2
    } = options;
    if (version === 2) {
      return this.moleculeWithH.toMolfile();
    }
    return this.moleculeWithH.toMolfileV3();
  }
  toMolfileWithoutH(options = {}) {
    const molecule = this.molecule.getCompactCopy();
    molecule.ensureHelperArrays(molecule.getOCL().Molecule.cHelperNeighbours);
    const atomsToDelete = [];
    for (let atomID = 0; atomID < molecule.getAtoms(); atomID++) {
      if (molecule.getExplicitHydrogens(atomID) > 0) {
        for (let i = 0; i < molecule.getAllConnAtoms(atomID); i++) {
          const connectedAtom = molecule.getConnAtom(atomID, i);
          if (molecule.getAtomicNo(connectedAtom) === 1) {
            atomsToDelete.push(connectedAtom);
          }
        }
      }
    }
    molecule.deleteAtoms(atomsToDelete);
    const {
      version = 2
    } = options;
    if (version === 2) {
      return molecule.toMolfile();
    }
    return molecule.toMolfileV3();
  }
  /**
   * Returns an array of objects containing the oclID and the corresponding hydrogens and atoms
   * for the specified atomLabel (if any)
   * This always applied to the molecule with expanded hydrogens and chirality
   * @param options
   * @returns
   */
  getGroupedDiastereotopicAtomIDs(options = {}) {
    if (!this.diaIDs) return undefined;
    return groupDiastereotopicAtomIDs$1(this.diaIDs, this.moleculeWithH, options);
  }
  /**
   * Returns an array, indexed by atom number in `moleculeWithH`, holding the
   * pro-R / pro-S descriptor (`'r'` or `'s'`) for every hydrogen of a CH2
   * whose two hydrogens are diastereotopic. Atoms that are not labelled
   * prochiral hydrogens hold `undefined`. The underlying hash
   * (`prochiralityByEnantioID`) is keyed by `enantioID`, which encodes
   * absolute stereochemistry, so two enantiomers receive independent
   * assignments. Hydrogens are never R or S themselves (that is a
   * stereocenter descriptor), so the label is always lowercase regardless
   * of whether the prochiral carbon is a true or a pseudoasymmetric centre.
   * The assignment is determined by replacing one H with a higher-priority
   * pseudo-atom (via `tagAtom`) and reading `getAtomCIPParity` of the carbon.
   * @returns array of `'r'` / `'s'` / `undefined` indexed by atom number
   */
  get prochiralities() {
    if (this.cache.prochiralities) return this.cache.prochiralities;
    const map = this.prochiralityByEnantioID;
    const enantioIDs = this.enantioIDs;
    const result = new Array(enantioIDs.length);
    for (let atom = 0; atom < enantioIDs.length; atom++) {
      result[atom] = map[enantioIDs[atom]];
    }
    this.cache.prochiralities = result;
    return result;
  }
  /**
   * Hash from `enantioID` to the pro-R / pro-S descriptor (`'r'` or `'s'`).
   * Only entries for hydrogens that actually carry a prochiral descriptor
   * are present. Keyed by absolute IDs (no `makeRacemic`), so enantiomers
   * get independent entries. Transferred across instances by `fromMolecule()`.
   * @returns map from enantioID string to `'r'` or `'s'`
   */
  get prochiralityByEnantioID() {
    if (this.cache.prochiralityByEnantioID) {
      return this.cache.prochiralityByEnantioID;
    }
    this.cache.prochiralityByEnantioID = computeProchiralityByEnantioID(this);
    return this.cache.prochiralityByEnantioID;
  }
  /**
   * Set a pro-R / pro-S `customLabel` on each diastereotopic CH2 hydrogen,
   * appended as lowercase `r` or `s`. Idempotent: calling it again replaces
   * any trailing pro-R / pro-S letter rather than stacking. The label is
   * appended to whatever `customLabel` the hydrogen already has, falling
   * back to the parent carbon's `customLabel` when the hydrogen has none.
   * Both `molecule` and `moleculeWithH` are labelled in place, sharing the
   * same cached `prochiralityByEnantioID` hash; on `molecule` only hydrogens
   * that are explicit (i.e. exist as atoms there) receive a label.
   * Repeated calls do no extra CIP work.
   * @returns The number of hydrogens labelled in `moleculeWithH`
   */
  setProchiralHydrogenLabels() {
    const moleculeWithH = this.moleculeWithH;
    const molecule = this.molecule;
    const moleculeAtoms = molecule.getAllAtoms();
    const map = this.prochiralityByEnantioID;
    const enantioIDs = this.enantioIDs;
    let count = 0;
    for (let atom = 0; atom < enantioIDs.length; atom++) {
      const letter = map[enantioIDs[atom]];
      if (!letter) continue;
      appendProchiralLabel(moleculeWithH, atom, moleculeWithH.getConnAtom(atom, 0), letter);
      count++;
      if (atom < moleculeAtoms && molecule.getAtomicNo(atom) === 1) {
        appendProchiralLabel(molecule, atom, molecule.getConnAtom(atom, 0), letter);
      }
    }
    return count;
  }
  /**
   * Remove a trailing pro-R / pro-S character (`r` or `s`) from the
   * `customLabel` of every hydrogen that carries one, in both `molecule`
   * and `moleculeWithH`. Idempotent. Hydrogens whose `customLabel` does
   * not end with `r` or `s` are left untouched.
   * @returns The number of labels that were stripped from `moleculeWithH`
   */
  removeProchiralHydrogenLabels() {
    const count = stripTrailingProchiralLetter(this.moleculeWithH);
    stripTrailingProchiralLetter(this.molecule);
    return count;
  }
  /**
   * This method returns a mapping between the diaIDs of the current molecule.
   * It expects that the initial molfile and the final molfile contains atomMapNo
   * in order to track which atom becomes which one.
   * @param molecule
   */
  getDiaIDsMapping(molecule) {
    const topicMolecule = new TopicMolecule(molecule);
    const originalDiaIDs = this.diaIDsAndInfo.filter(diaID => diaID.atomMapNo);
    const destinationDiaIDs = topicMolecule.diaIDsAndInfo.filter(diaID => diaID.atomMapNo);
    const mapping = {};
    // we first check all the atoms present in the molfile
    for (const destinationDiaID of destinationDiaIDs) {
      const originalDiaID = originalDiaIDs.find(diaID => diaID.atomMapNo === destinationDiaID.atomMapNo);
      const newIDCode = destinationDiaID.idCode;
      const oldIDCode = originalDiaID.idCode;
      if (oldIDCode in mapping) {
        if (mapping[oldIDCode] !== newIDCode) {
          mapping[oldIDCode] = undefined;
        }
      } else {
        mapping[oldIDCode] = newIDCode;
      }
    }
    // we now check all the attached hydrogens that are not defined in the molfile and were not yet mapped
    for (const destinationDiaID of destinationDiaIDs) {
      const originalDiaID = originalDiaIDs.find(diaID => diaID.atomMapNo === destinationDiaID.atomMapNo);
      for (let i = 0; i < originalDiaID.attachedHydrogensIDCodes.length; i++) {
        const oldHydrogenIDCode = originalDiaID.attachedHydrogensIDCodes.at(i);
        if (mapping[oldHydrogenIDCode]) continue;
        const newHydrogenIDCode = destinationDiaID.attachedHydrogensIDCodes[i];
        if (oldHydrogenIDCode && newHydrogenIDCode) {
          if (oldHydrogenIDCode in mapping) {
            if (mapping[oldHydrogenIDCode] !== newHydrogenIDCode) {
              mapping[oldHydrogenIDCode] = undefined;
            }
          } else {
            mapping[oldHydrogenIDCode] = newHydrogenIDCode;
          }
        }
      }
    }
    return mapping;
  }
}
function computeProchiralityByEnantioID(topicMolecule) {
  const target = topicMolecule.moleculeWithH;
  const {
    Molecule
  } = target.getOCL();
  const enantioIDs = topicMolecule.enantioIDs;
  const result = {};
  for (let atom = 0; atom < target.getAllAtoms(); atom++) {
    if (target.getAtomicNo(atom) !== 6) continue;
    const hydrogens = [];
    let nonHydrogenCount = 0;
    for (let j = 0; j < target.getAllConnAtoms(atom); j++) {
      const connected = target.getConnAtom(atom, j);
      if (target.getAtomicNo(connected) === 1) {
        hydrogens.push(connected);
      } else {
        nonHydrogenCount++;
      }
    }
    if (hydrogens.length !== 2 || nonHydrogenCount !== 2) continue;
    const enantioID0 = enantioIDs[hydrogens[0]];
    const enantioID1 = enantioIDs[hydrogens[1]];
    if (enantioID0 === enantioID1) continue;
    if (result[enantioID0] && result[enantioID1]) continue;
    const probe = getCompactCopyWithoutCustomLabels(target);
    tagAtom(probe, hydrogens[0]);
    probe.ensureHelperArrays(Molecule.cHelperCIP);
    const cipParity = probe.getAtomCIPParity(atom);
    if (cipParity === Molecule.cAtomCIPParityRorM) {
      result[enantioID0] = 'r';
      result[enantioID1] = 's';
    } else if (cipParity === Molecule.cAtomCIPParitySorP) {
      result[enantioID0] = 's';
      result[enantioID1] = 'r';
    }
  }
  return result;
}
function appendProchiralLabel(molecule, hydrogen, parent, letter) {
  const existing = molecule.getAtomCustomLabel(hydrogen);
  if (existing) {
    molecule.setAtomCustomLabel(hydrogen, existing.replace(/[rs]$/, '') + letter);
    return;
  }
  const parentLabel = molecule.getAtomCustomLabel(parent);
  if (parentLabel) {
    molecule.setAtomCustomLabel(hydrogen, parentLabel + letter);
    return;
  }
  molecule.setAtomCustomLabel(hydrogen, letter);
}
function stripTrailingProchiralLetter(molecule) {
  let count = 0;
  for (let atom = 0; atom < molecule.getAllAtoms(); atom++) {
    if (molecule.getAtomicNo(atom) !== 1) continue;
    const customLabel = molecule.getAtomCustomLabel(atom);
    if (!customLabel) continue;
    const stripped = customLabel.replace(/[rs]$/, '');
    if (stripped === customLabel) continue;
    molecule.setAtomCustomLabel(atom, stripped || null);
    count++;
  }
  return count;
}
function groupDiastereotopicAtomIDs$1(diaIDs, molecule, options = {}) {
  const diaIDsObject = groupDiastereotopicAtomIDsAsObject(diaIDs, molecule, molecule, options);
  return Object.values(diaIDsObject);
}
function groupDiastereotopicAtomIDsAsObject(diaIDs, molecule, moleculeWithH, options = {}) {
  const {
    atomLabel
  } = options;
  const diaIDsObject = {};
  for (let i = 0; i < diaIDs.length; i++) {
    if (!atomLabel || moleculeWithH.getAtomLabel(i) === atomLabel) {
      const diaID = diaIDs[i];
      if (!diaIDsObject[diaID]) {
        diaIDsObject[diaID] = {
          counter: 0,
          oclID: diaID,
          atomLabel: moleculeWithH.getAtomLabel(i),
          atoms: [],
          existingAtoms: [],
          heavyAtoms: [],
          attachedHydrogens: [],
          customLabels: [],
          attachedHydrogensCustomLabels: [],
          heavyAtomsCustomLabels: []
        };
      }
      const customLabel = moleculeWithH.getAtomCustomLabel(i)?.replace(/^\]/, '');
      if (customLabel && !diaIDsObject[diaID].customLabels.includes(customLabel)) {
        diaIDsObject[diaID].customLabels.push(customLabel);
      }
      if (moleculeWithH.getAtomicNo(i) === 1) {
        const connected = moleculeWithH.getConnAtom(i, 0);
        if (!diaIDsObject[diaID].heavyAtoms.includes(connected)) {
          diaIDsObject[diaID].heavyAtoms.push(connected);
        }
        const heavyAtomCustomLabel = molecule.getAtomCustomLabel(connected)?.replace(/^\]/, '');
        if (heavyAtomCustomLabel && !diaIDsObject[diaID].heavyAtomsCustomLabels.includes(heavyAtomCustomLabel)) {
          diaIDsObject[diaID].heavyAtomsCustomLabels.push(heavyAtomCustomLabel);
        }
        if (molecule.getAtomicNo(i)) {
          diaIDsObject[diaID].existingAtoms.push(i);
        } else if (!diaIDsObject[diaID].existingAtoms.includes(connected)) {
          diaIDsObject[diaID].existingAtoms.push(connected);
        }
      } else {
        for (let j = 0; j < moleculeWithH.getAllConnAtoms(i); j++) {
          const connected = moleculeWithH.getConnAtom(i, j);
          if (moleculeWithH.getAtomicNo(connected) === 1) {
            const attachedHydrogenCustomLabel = molecule.getAtomCustomLabel(connected)?.replace(/^\]/, '');
            if (attachedHydrogenCustomLabel && !diaIDsObject[diaID].attachedHydrogensCustomLabels.includes(attachedHydrogenCustomLabel)) {
              diaIDsObject[diaID].attachedHydrogensCustomLabels.push(attachedHydrogenCustomLabel);
            }
            diaIDsObject[diaID].attachedHydrogens.push(connected);
          }
        }
        diaIDsObject[diaID].existingAtoms.push(i);
      }
      diaIDsObject[diaID].counter++;
      diaIDsObject[diaID].atoms.push(i);
    }
  }
  for (const diaIDObject of Object.values(diaIDsObject)) {
    diaIDObject.existingAtoms.sort((a, b) => a - b);
    diaIDObject.attachedHydrogens.sort((a, b) => a - b);
  }
  return diaIDsObject;
}

/**
 * Returns an array of symmetry ranks.
 * @param {import('openchemlib').Molecule} molecule - An instance of a molecule
 * @returns
 */
function getSymmetryRanks(molecule) {
  const {
    Molecule
  } = molecule.getOCL();
  const xAtomNumber = getXAtomicNumber(molecule);
  // most of the molecules have some symmetry
  const internalMolecule = molecule.getCompactCopy();
  for (let i = 0; i < internalMolecule.getAllAtoms(); i++) {
    // hydrogens are not taken into account during canonization, we need to change them with an atom with a valence of 1
    if (internalMolecule.getAtomicNo(i) === 1) {
      internalMolecule.setAtomicNo(i, xAtomNumber);
    }
  }
  internalMolecule.ensureHelperArrays(Molecule.cHelperSymmetryStereoHeterotopicity);
  const symmetryRanks = [];
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    symmetryRanks.push(internalMolecule.getSymmetryRank(i));
  }
  return symmetryRanks;
}

/**
 * Returns an array of diastereotopic ID (as idCode)
 * @param {import('openchemlib').Molecule} molecule
 */
function getDiastereotopicAtomIDs(molecule) {
  const {
    Molecule
  } = molecule.getOCL();
  ensureHeterotopicChiralBonds(molecule);
  const symmetryRanks = getSymmetryRanks(molecule);
  const numberAtoms = molecule.getAllAtoms();
  const ids = [];
  const cache = {};
  for (let iAtom = 0; iAtom < numberAtoms; iAtom++) {
    const rank = symmetryRanks[iAtom];
    if (rank && cache[rank]) {
      ids[iAtom] = cache[rank];
      continue;
    }
    const tempMolecule = getCompactCopyWithoutCustomLabels(molecule);
    tagAtom(tempMolecule, iAtom);
    makeRacemic(tempMolecule);
    // We need to ensure the helper array in order to get correctly the result of racemisation
    ids[iAtom] = tempMolecule.getCanonizedIDCode(Molecule.CANONIZER_ENCODE_ATOM_CUSTOM_LABELS);
    cache[rank] = ids[iAtom];
  }
  return ids;
}

/**
 *
 * @param {import('openchemlib').Molecule} molecule
 */
function getDiastereotopicAtomIDsAndH(molecule) {
  const OCL = molecule.getOCL();
  molecule = molecule.getCompactCopy();
  molecule.addImplicitHydrogens();
  molecule.ensureHelperArrays(OCL.Molecule.cHelperNeighbours);
  const diaIDs = getDiastereotopicAtomIDs(molecule);
  const newDiaIDs = [];
  for (let i = 0; i < diaIDs.length; i++) {
    const diaID = diaIDs[i];
    const newDiaID = {
      oclID: diaID,
      hydrogenOCLIDs: [],
      nbHydrogens: 0
    };
    if (molecule.getAtomicNo(i) === 1) {
      const atom = molecule.getConnAtom(i, 0);
      newDiaID.heavyAtom = diaIDs[atom];
    }
    for (let j = 0; j < molecule.getAllConnAtoms(i); j++) {
      const atom = molecule.getConnAtom(i, j);
      if (molecule.getAtomicNo(atom) === 1) {
        newDiaID.nbHydrogens++;
        if (!newDiaID.hydrogenOCLIDs.includes(diaIDs[atom])) {
          newDiaID.hydrogenOCLIDs.push(diaIDs[atom]);
        }
      }
    }
    newDiaIDs.push(newDiaID);
  }
  return newDiaIDs;
}

function groupDiastereotopicAtomIDs(diaIDs, molecule, options = {}) {
  const {
    atomLabel
  } = options;
  const diaIDsObject = {};
  for (let i = 0; i < diaIDs.length; i++) {
    if (!atomLabel || molecule.getAtomLabel(i) === atomLabel) {
      const diaID = diaIDs[i];
      if (!diaIDsObject[diaID]) {
        diaIDsObject[diaID] = {
          counter: 0,
          atoms: [],
          oclID: diaID,
          atomLabel: molecule.getAtomLabel(i)
        };
      }
      diaIDsObject[diaID].counter++;
      diaIDsObject[diaID].atoms.push(i);
    }
  }
  return Object.keys(diaIDsObject).map(key => diaIDsObject[key]);
}

/**
 * This function groups the diasterotopic atomIds of the molecule based on equivalence of atoms. The output object contains
 * a set of chemically equivalent atoms(element.atoms) and the groups of magnetically equivalent atoms (element.magneticGroups)
 * @param {import('openchemlib').Molecule} molecule
 * @param {object} [options={}]
 * @param {string} [options.atomLabel] - Select atoms of the given atomLabel. By default it returns all the explicit atoms in the molecule
 * @returns {Array}
 */
function getGroupedDiastereotopicAtomIDs(molecule, options = {}) {
  const diaIDs = getDiastereotopicAtomIDs(molecule);
  return groupDiastereotopicAtomIDs(diaIDs, molecule, options);
}

/**
 * Parse a molfile and returns an object containing the molecule, the map and the diaIDs
 * The map allows to reload properties assigned to the atom molfile
 * Please take care than numbering of atoms starts at 0 !
 * @param {typeof import('openchemlib')} OCL - openchemlib library
 * @param {string} molfile
 * @returns
 */
function getDiastereotopicAtomIDsFromMolfile(OCL, molfile) {
  const {
    map,
    molecule
  } = OCL.Molecule.fromMolfileWithAtomMap(molfile);
  const diaIDsArray = getDiastereotopicAtomIDsAndH(molecule);
  const diaIDs = {};
  for (let i = 0; i < map.length; i++) {
    diaIDs[map[i]] = {
      source: map[i],
      destination: i,
      ...diaIDsArray[i]
    };
  }
  return {
    map: diaIDs,
    molecule,
    diaIDs: diaIDsArray
  };
}

/**
 * Returns a SVG
 * @param {*} molecule
 * @param {*} [options={}]
 */
function toDiastereotopicSVG(molecule, options = {}) {
  const {
    width = 300,
    height = 200,
    prefix = 'ocl',
    heavyAtomHydrogen = false
  } = options;
  let svg = options.svg;
  let diaIDs = [];
  const hydrogenInfo = {};
  for (const line of getDiastereotopicAtomIDsAndH(molecule)) {
    hydrogenInfo[line.oclID] = line;
  }
  if (heavyAtomHydrogen) {
    for (let i = 0; i < molecule.getAtoms(); i++) {
      diaIDs.push([]);
    }
    const groupedDiaIDs = molecule.getGroupedDiastereotopicAtomIDs();
    for (const diaID of groupedDiaIDs) {
      if (hydrogenInfo[diaID.oclID] && hydrogenInfo[diaID.oclID].nbHydrogens > 0) {
        for (const atom of diaID.atoms) {
          for (const id of hydrogenInfo[diaID.oclID].hydrogenOCLIDs) {
            if (!diaIDs[atom * 1].includes(id)) diaIDs[atom].push(id);
          }
        }
      }
    }
  } else {
    diaIDs = molecule.getDiastereotopicAtomIDs().map(a => [a]);
  }
  if (!svg) svg = molecule.toSVG(width, height, prefix);
  svg = svg.replaceAll(/Atom:\d+"/g, value => {
    const atom = value.replaceAll(/\D/g, '');
    return `${value} data-diaid="${diaIDs[atom].join(',')}"`;
  });
  return svg;
}

/**
 * Returns the hose codes for all atoms in the molecule
 * @param {*} molecule
 * @param {object} [options={}]
 * @param {string[]} [options.atomLabels]
 * @param {number} [options.minSphereSize=0]
 * @param {number} [options.maxSphereSize=4]
 * @returns
 */
function getHoseCodes(molecule, options = {}) {
  const {
    atomLabels,
    minSphereSize,
    maxSphereSize
  } = options;
  const {
    Molecule
  } = molecule.getOCL();
  const atomicNumbers = atomLabels?.map(label => Molecule.getAtomicNoFromLabel(label));
  const internalMolecule = getCompactCopyWithoutCustomLabels(molecule);
  internalMolecule.addImplicitHydrogens();
  ensureHeterotopicChiralBonds(internalMolecule);
  const hoses = [];
  for (let i = 0; i < internalMolecule.getAllAtoms(); i++) {
    if (atomicNumbers && !atomicNumbers.includes(internalMolecule.getAtomicNo(i))) {
      hoses.push(undefined);
    } else {
      const tempMolecule = internalMolecule.getCompactCopy();
      tagAtom(tempMolecule, i);
      hoses.push(getHoseCodesForAtomsAsStrings(tempMolecule, {
        minSphereSize,
        maxSphereSize
      }));
    }
  }
  return hoses;
}

/**
 * Returns an object containing a molfile, molfile with hydrogens, hoses codes and optionally the diaIDs
 * and the diaIDs
 * The map allows to reload properties assigned to the atom molfile
 * Please take care than numbering of atoms starts at 0 !
 * @param {import('openchemlib').Molecule} molecule
 * @param {object} [options={}]
 * @param {string[]} [options.atomLabels]
 * @param {boolean} [options.calculateDiastereotopicIDs=true]
 * @param {number} [options.minSphereSize=0]
 * @param {number} [options.maxSphereSize=4]
 * @returns
 */
function getHoseCodesAndInfo(molecule, options = {}) {
  const {
    minSphereSize,
    maxSphereSize,
    calculateDiastereotopicIDs = true
  } = options;
  const {
    Molecule
  } = molecule.getOCL();
  molecule = molecule.getCompactCopy();
  // this will force reordering of the hydrogens to the end, just to have the same order as in the molfile
  molecule.ensureHelperArrays(Molecule.cHelperNeighbours);
  const newMolfile = molecule.toMolfile();
  molecule.addImplicitHydrogens();
  ensureHeterotopicChiralBonds(molecule);
  molecule.ensureHelperArrays(Molecule.cHelperSymmetryStereoHeterotopicity);
  const newMolfileWithH = molecule.toMolfile();
  const symmetryRanks = getSymmetryRanks(molecule);
  const cache = {};
  const hoses = [];
  const diaIDs = [];
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    const rank = symmetryRanks[i];
    if (rank && cache[rank]) {
      diaIDs.push(cache[rank].diaID);
      hoses.push(cache[rank].hose);
      continue;
    }
    const tempMolecule = getCompactCopyWithoutCustomLabels(molecule);
    tagAtom(tempMolecule, i);
    let diaID;
    if (calculateDiastereotopicIDs) {
      makeRacemic(tempMolecule);
      diaID = tempMolecule.getCanonizedIDCode(Molecule.CANONIZER_ENCODE_ATOM_CUSTOM_LABELS);
      diaIDs.push(diaID);
    }
    const hose = getHoseCodesForAtomsAsStrings(tempMolecule, {
      minSphereSize,
      maxSphereSize
    });
    hoses.push(hose);
    cache[rank] = {
      diaID,
      hose
    };
  }
  const distanceMatrix = getConnectivityMatrix(molecule, {
    pathLength: true
  });
  return {
    molfile: newMolfile,
    molfileWithH: newMolfileWithH,
    hoses,
    diaIDs: calculateDiastereotopicIDs ? diaIDs : undefined,
    moleculeWithHydrogens: molecule,
    distanceMatrix
  };
}

const FULL_HOSE_CODE = 1;
const HOSE_CODE_CUT_C_SP3_SP3 = 2;
/**
 * Returns the hose code for specific atom numbers
 * @param {import('openchemlib').Molecule} originalMolecule - The OCL molecule to be fragmented
 * @param {number[]} rootAtoms
 * @param {object} [options={}]
 * @param {number} [options.minSphereSize=0] - Smallest hose code sphere
 * @param {number} [options.maxSphereSize=4] - Largest hose code sphere
 * @param {number} [options.kind=FULL_HOSE_CODE] - Kind of hose code, default usual sphere
 */
function getHoseCodesForAtoms(originalMolecule, rootAtoms = [], options = {}) {
  const {
    minSphereSize = 0,
    maxSphereSize = 4,
    kind = FULL_HOSE_CODE
  } = options;
  const molecule = getCompactCopyWithoutCustomLabels(originalMolecule);
  // those 2 lines should be done only once
  molecule.addImplicitHydrogens();
  ensureHeterotopicChiralBonds(molecule);
  const allowedCustomLabels = [];
  for (const rootAtom of rootAtoms) {
    allowedCustomLabels.push(tagAtom(molecule, rootAtom));
  }
  return getHoseCodesForAtomsAsStrings(molecule, {
    minSphereSize,
    maxSphereSize,
    allowedCustomLabels,
    kind
  });
}

/**
 * Returns the hose code for a specific atom number
 * @param {import('openchemlib').Molecule} originalMolecule
 * @param {number} rootAtom
 * @param {object} [options={}]
 * @param {boolean} [options.isTagged] - Specify is the atom is already tagged
 * @param {number} [options.minSphereSize=0] - Smallest hose code sphere
 * @param {number} [options.maxSphereSize=4] - Largest hose code sphere
 * @param {number} [options.kind=FULL_HOSE_CODE] - Kind of hose code, default usual sphere
 */
function getHoseCodesForAtom(originalMolecule, rootAtom, options = {}) {
  return getHoseCodesForAtoms(originalMolecule, [rootAtom], options);
}

/**
 * Returns an array of strings (idCodes) specified molecule. Each string corresponds to a
 * hose code. By default it will calculate the hose codes for sphere 0 to 4 and will reuse
 * the existing tagged atoms.
 * This method ensure implicity hydrogens and possible missing chiral bonds.
 * @param {import('openchemlib').Molecule} molecule - The OCL molecule to process.
 * @param {object} options - Options for generating hose codes.
 * @param {string[]} [options.allowedCustomLabels] - Array of the custom labels that are considered as root atoms. By default all atoms having a customLabel
 * @param {number} [options.minSphereSize=0] - Smallest hose code sphere
 * @param {number} [options.maxSphereSize=4] - Largest hose code sphere
 * @param {number} [options.kind=FULL_HOSE_CODE] - Kind of hose code, default usual sphere
 *  @param {number[]} [options.rootAtoms=[]] - Array of atom from which we should start to create the HOSE. By default we will used the taggedAtoms
 * @param {number[]} [options.tagAtoms=[]] - Array of atom indices to tag as root atoms
 * @param {Function} [options.tagAtomFct=tagAtom] - Function to tag an atom as root atom. By default it is defined internal
 * @returns {Array} - An array of hose code fragments.
 */
function getHoseCodesFromDiastereotopicID(molecule, options = {}) {
  molecule.addImplicitHydrogens();
  ensureHeterotopicChiralBonds(molecule);
  return getHoseCodesForAtomsAsStrings(molecule, options);
}

let fragment$2;
/**
 * Returns the hose code for a specific atom number
 * @param {import('openchemlib').Molecule} molecule
 * @param from
 * @param to
 * @param maxLength
 */
function getHoseCodesForPath(molecule, from, to, maxLength) {
  const OCL = molecule.getOCL();
  const originalFrom = from;
  const originalTo = to;
  molecule = getCompactCopyWithoutCustomLabels(molecule);
  const originalAtoms = []; // path before renumbering
  molecule.getPath(originalAtoms, from, to, maxLength + 1);
  let torsion;
  if (originalAtoms.length === 4) {
    torsion = molecule.calculateTorsion(originalAtoms);
  }
  const tag1 = tagAtom(molecule, from);
  const tag2 = tagAtom(molecule, to);
  molecule.addImplicitHydrogens();
  ensureHeterotopicChiralBonds(molecule);
  molecule.ensureHelperArrays(OCL.Molecule.cHelperNeighbours);
  from = -1;
  to = -1;
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    if (tag1 === tag2) {
      if (molecule.getAtomCustomLabel(i) === tag1) {
        if (from === -1) {
          from = i;
        } else {
          to = i;
        }
      }
    } else {
      if (tag1 === molecule.getAtomCustomLabel(i)) {
        from = i;
      }
      if (tag2 === molecule.getAtomCustomLabel(i)) {
        to = i;
      }
    }
  }
  if (!fragment$2) fragment$2 = new OCL.Molecule(0, 0);
  const atoms = [];
  molecule.getPath(atoms, from, to, maxLength + 1);
  let min = 0;
  let max = 0;
  const atomMask = new Array(molecule.getAllAtoms()).fill(false);
  const atomList = new Array(molecule.getAllAtoms()).fill(-1);
  const hoses = [];
  for (let sphere = 0; sphere <= 2; sphere++) {
    if (max === 0) {
      for (const atom of atoms) {
        atomMask[atom] = true;
        atomList[max++] = atom;
      }
    } else {
      let newMax = max;
      for (let i = min; i < max; i++) {
        const atom = atomList[i];
        for (let j = 0; j < molecule.getAllConnAtoms(atom); j++) {
          const connAtom = molecule.getConnAtom(atom, j);
          if (!atomMask[connAtom]) {
            atomMask[connAtom] = true;
            atomList[newMax++] = connAtom;
          }
        }
      }
      min = max;
      max = newMax;
    }
    const atomMap = [];
    molecule.copyMoleculeByAtoms(fragment$2, atomMask, true, atomMap);
    makeRacemic(fragment$2);
    const oclID = fragment$2.getCanonizedIDCode(OCL.Molecule.CANONIZER_ENCODE_ATOM_CUSTOM_LABELS);
    hoses.push({
      sphere,
      oclID
    });
  }
  return {
    atoms: originalAtoms,
    from: originalFrom,
    to: originalTo,
    torsion,
    hoses,
    length: originalAtoms.length - 1
  };
}

/**
 * Create a polymer from a unit, alpha and omega groups
 * A unit must contain a R1 and a R2
 * An alpha end group must contain a R1
 * An omega end group must contain a R2
 * @param {import('openchemlib').Molecule} unit - an instance of OCL.Molecule
 * @param {object} options
 * @param {number} [options.count=10] - number of units
 * @param {boolean} [options.markMonomer=false] - mark the different units of the polymer in the atom map
 * @param {import('openchemlib').Molecule} [options.alpha] - alpha end group, default is an hydrogen
 * @param {import('openchemlib').Molecule} [options.gamma] - omega end group, default is an hydrogen
 */
function createPolymer(unit, options = {}) {
  const {
    count = 10
  } = options;
  checkEntity(unit, 'unit');
  const {
    Molecule
  } = unit.getOCL();
  const {
    alpha,
    gamma
  } = getAlphaGamma(unit, options);
  checkEntity(alpha, 'alpha');
  checkEntity(gamma, 'gamma');
  const {
    r1AtomicNo,
    r2AtomicNo
  } = getR1R2AtomicNo(Molecule);
  const polymer = alpha.getCompactCopy();
  polymer.addMolecule(getUnit(unit, 1, options));
  addBond(polymer, r1AtomicNo, r1AtomicNo);
  for (let i = 0; i < count - 1; i++) {
    polymer.addMolecule(getUnit(unit, i + 2, options));
    addBond(polymer, r2AtomicNo, r1AtomicNo);
  }
  polymer.addMolecule(gamma);
  addBond(polymer, r2AtomicNo, r2AtomicNo);
  polymer.ensureHelperArrays(Molecule.cHelperNeighbours);
  // encoding directly in atomNapNo didn't work out because it was removed when deleting atoms
  for (let i = 0; i < polymer.getAtoms(); i++) {
    polymer.setAtomMapNo(i, (polymer.getAtomCustomLabel(i) || '').replace(/monomer_/, ''));
    polymer.setAtomCustomLabel(i, '');
  }
  return polymer;
}
function getUnit(unit, index, options) {
  const {
    markMonomer = false
  } = options;
  if (markMonomer) {
    unit = unit.getCompactCopy();
    unit.ensureHelperArrays(unit.getOCL().Molecule.cHelperNeighbours);
    for (let j = 0; j < unit.getAtoms(); j++) {
      unit.setAtomCustomLabel(j, `monomer_${index}`);
    }
  }
  return unit;
}
function addBond(molecule, firstAtomicNo, secondAtomicNo) {
  molecule.ensureHelperArrays(molecule.getOCL().Molecule.cHelperNeighbours);
  let i, j;
  loop: for (i = 0; i < molecule.getAtoms(); i++) {
    if (molecule.getAtomicNo(i) === firstAtomicNo) {
      for (j = i + 1; j < molecule.getAtoms(); j++) {
        if (molecule.getAtomicNo(j) === secondAtomicNo) {
          molecule.addBond(molecule.getConnAtom(i, 0), molecule.getConnAtom(j, 0), 1);
          break loop;
        }
      }
    }
  }
  molecule.deleteAtoms([i, j]);
}
function checkEntity(unit, kind) {
  let nbR1 = 1;
  let nbR2 = 1;
  switch (kind) {
    case 'unit':
      break;
    case 'alpha':
      nbR2 = 0;
      break;
    case 'gamma':
      nbR1 = 0;
      break;
    default:
      throw new Error('Unknown kind');
  }
  if (!unit) {
    throw new Error('unit is required');
  }
  const {
    Molecule
  } = unit.getOCL();
  // unit must contain ONE R1 and ONE R2
  const {
    r1AtomicNo,
    r2AtomicNo
  } = getR1R2AtomicNo(Molecule);
  let r1Count = 0;
  let r2Count = 0;
  for (let i = 0; i < unit.getAtoms(); i++) {
    if (unit.getAtomicNo(i) === r1AtomicNo) {
      r1Count++;
    }
    if (unit.getAtomicNo(i) === r2AtomicNo) {
      r2Count++;
    }
  }
  if (r1Count !== nbR1) {
    throw new Error(`${kind} must contain ${nbR1} R1`);
  }
  if (r2Count !== nbR2) {
    throw new Error(`${kind} must contain ${nbR2} R2`);
  }
}
function getAlphaGamma(unit, options) {
  let {
    alpha,
    gamma
  } = options;
  const {
    Molecule
  } = unit.getOCL();
  const {
    r1AtomicNo,
    r2AtomicNo
  } = getR1R2AtomicNo(Molecule);
  if (!alpha) {
    alpha = Molecule.fromSmiles('CC');
    alpha.setAtomicNo(0, r1AtomicNo);
    alpha.setAtomicNo(1, 1);
  }
  if (!gamma) {
    gamma = Molecule.fromSmiles('CC');
    gamma.setAtomicNo(0, r2AtomicNo);
    gamma.setAtomicNo(1, 1);
  }
  return {
    alpha,
    gamma
  };
}
function getR1R2AtomicNo(Molecule) {
  const r1AtomicNo = Molecule.getAtomicNoFromLabel('R1', Molecule.cPseudoAtomsRGroups);
  const r2AtomicNo = Molecule.getAtomicNoFromLabel('R2', Molecule.cPseudoAtomsRGroups);
  return {
    r1AtomicNo,
    r2AtomicNo
  };
}

/**
 * Applies fragment labels from a fragment molecule to a target molecule. This method is in
 * place and modifies the target molecule directly.
 *
 * The OpenChemLib library is recovered from the molecule itself via
 * `molecule.getOCL()`, so this package never imports `openchemlib` at
 * runtime (avoids version conflicts and keeps it out of consumer bundles).
 * @param molecule - The target molecule to which fragment labels will be applied.
 * @param fragment - The fragment molecule containing the labels to apply.
 * @param options
 * @returns The number of matches found
 */
function applyFragmentLabels(molecule, fragment, options = {}) {
  const {
    algorithm = 'overlapping',
    prefix = '',
    suffix = ''
  } = options;
  const OCL = molecule.getOCL();
  const sssearcher = new OCL.SSSearcher();
  sssearcher.setMolecule(molecule);
  sssearcher.setFragment(fragment);
  const found = sssearcher.findFragmentInMolecule({
    countMode: algorithm
  });
  const matches = sssearcher.getMatchList();
  for (const match of matches) {
    for (let fragmentAtomIndex = 0; fragmentAtomIndex < match.length; fragmentAtomIndex++) {
      const moleculeAtomIndex = match[fragmentAtomIndex];
      const label = fragment.getAtomCustomLabel(fragmentAtomIndex);
      if (label) {
        molecule.setAtomCustomLabel(moleculeAtomIndex, prefix + label + suffix);
      }
    }
  }
  return found;
}

const autoLabelDatabase = [{
  idCode: 'ea^P@@@LdbVRRbbvRRbLVRbrTVRdsRuMTmSSMLuSPEdEaLWEiATSUCRu]_QKPiHn{FkY]vLVZ{l[MuwXrX[ni`tw]cQen{FC[Mv\\\\wQuw]cSgf{v~[kXEnuhVzVQ{lX]bw\\qK]STmvLswXw[gnqfwxeXN@@AkhB\\@S@XM]@C`BXB`[hBL@C@DpG@wPDXAN@I`IFn`NpALAhMtAF@Q`BXBqkhAl@S@^C]@Q`BX@f@bZz@k@DpFPwPDXAf@I`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?bGvH_Xa}Gqhq`ELXb@KxF}MgYVBw?Cctm?vw?K_}m?s~_p',
  mf: 'C30H54',
  mw: 414.75876,
  label: 'Cucurbitane'
}, {
  idCode: 'eghP@@@LddTbbtVdIVbdsRdabcfefSUUUUUUUUUUUW@D`bDh`bbbR@~PPbbOt^PAnchN{FKHMv]`w^qG]cCjN{FsL]vMVx{nXLIwXpZSnqhrc][Z]vMvL{lYMYwXsYqnuoF{FB{lZ]EwTpYInelfzfJ{jYMUwTtYinynnzfgC]uLNf{j[LmwTq[[nijqw]S]knzf[@',
  coordinates: '!BmpJH@oy??`C~@A}eL[~H__x@bGt_Fh`BTqc~_x`B?`AeXHa}bGvw?Cctb@KxF}Mgm?vw?K_}m?s~_p',
  mf: 'C30H54',
  mw: 414.75876,
  label: 'Dammarane'
}, {
  idCode: 'eghP@@@LddTTVbTad|VLVR`fdea`VUUUUUUUUUUUUW@B`UBxRdBST@~P`bbOt^PCnq`tC]gHMvm`wXqG]cSjFzNX{lZMpwRpc][RMuLiwXq[Qn}cN{FSVMwLywTt{sniapW]cYhn{FkI]wLFr{l[lUwXpzknqfsW]SAnnzfSC]uMFf{j[LmwTq[[nijqw]S]knzf[@',
  coordinates: '!BmpK~_x`B?`Bw__x@bGvw_Xa}mpK~_{\\Bb@KxF}Mg?`@_YSF?Gqhq`ELXYVBw@cctm?vw@k_}mpK~_p',
  mf: 'C30H54',
  mw: 414.75876,
  label: 'Lanostane'
}, {
  idCode: 'eghP@@@LddTbbtVdIVbdsRdabcfefSUUUUUUUUUUUW@B`RBhPbbbR@~PPbbOtnPAnchN{FKHMv]`w^qG]cCjN{FsL]vMVD{lXMIwXtYQnmmN{F{F]vLfl{lYlxwZwc]cA]vMNb{jXLdwRvS]SE]uLfj{jZLtw\\wW]SSanzfGS]uMfV{jXmmwTuX{ninuw]SM`',
  coordinates: '!BmpJH@oy??`C~@A}eL[~H__x@bGt_Fh`BTqc~_x`B?`AeXHa}bGvw@cctb@KxF}Mgm?vw@k_}mpK~_p',
  mf: 'C30H54',
  mw: 414.75876,
  label: 'Protostane'
}, {
  idCode: 'egdP@@@LddTQdVeRdtVLVRgD`bfag`VUUUUUUUUUUUUUp@jHICHy@du@OhCHQy@FzV`[mYAnylNzfgD]uLNh{lXLpwVwC]SBMv]HwXrg]cSmF{vL[hzsnqhsg]cEoN{FSA]vMfb{lZlew\\p[KnqnqW]cCjn{F[M]uLFz{jYLMwTtZ[nilrw]SEmnzfkG]uMvn{jYl',
  coordinates: '!BmpJH@o`[tv_~@K]}?`Bw@h`B?`Bw@k]}?`Bw@k\\B?`@_YSF?Gqhq`ELXYVBw@cctm?vw@k_}mpK~_p',
  mf: 'C30H52',
  mw: 412.74288,
  label: 'Cycloartane'
}, {
  idCode: 'egdP@@@LddTbbtVbtVtT|R`ebf`QVWVquUUUUUUUUUUTh@hHaJDIMHDhitidA}`aEDQQ~cr@]vMf`{lXlawXp{CnqdqG]SMjFzNX{lZmqwTwXSnqntg]cSeN{FcZMv\\Xw^ug]cMgNzfS^]uLNB{jXMEwXpYKnijvS][E]uMFj{nXLuwTt{inuaf{Ff[iY[nibvs]SGMwM]wTvX',
  coordinates: '!B?l]klaRrW`@TcVnM?l]kc_{XEHtTlo{GZ{IklalMZ{HTc_{GEHw~vAL|HgS~qqRrEHtAmqRMEKK~qp',
  mf: 'C30H52',
  mw: 412.74288,
  label: 'Friedelane'
}, {
  idCode: 'egdP@@@LddTbbtVadLTRltdabce`VSPvuUUUUUUUUUUUpAHHaAEhgIt`OdDHDc}Gd@{lXm@wQrG]cYlN{FkD]uMvh[lyan}nNzf[B]vLNd{lYLiwXs[Snq`qg]cQkFzv\\{l[mywXtxInuhf{FR{jZmewTrXkniauW]SAfnzfc]MtlLwTtw]sAenzfg[MwL]wTqZ{nilp',
  coordinates: '!BbGw~@K]}?g~H@oy??`Bw@h`BmpJH__x@bGvw_Yg@?g~H@ox@nuSOsURDotzH_Xa}bGwIPH`BuB^KAp',
  mf: 'C30H52',
  mw: 412.74288,
  label: 'Lupane'
}, {
  idCode: 'egdP@@@LddTbbtVdLJtRdvdabcedQPwVuUUUUUUUUUUUpAHHHmIELet`OhMHQy@FzN`{lXl`wYvC]{D]uLvh{l[LqwXu[cninpg]cAiN{FcJMumiwXpxsnqdug]cMgF{V|[lXKnijtW]c]dn{FgYMtlTwTuW]SIfnzfG]]uLFF[nZ[nibrw]SYmnzfcG]wLFn{jZ\\',
  coordinates: '!BmpJH@oy??`C~@K]}?g~H__x@bGvw@h`BmpK~_x`B?`Bw__x@bGvH_[\\BCwvw@h`BuB^KA?x@vuPlf@',
  mf: 'C30H52',
  mw: 412.74288,
  label: 'Oleanane'
}, {
  idCode: 'egdP@@@LddTbbtVadLTRvtdabce`UTpvuUUUUUUUUUUUHAHHaAIhgIyJet`OdDHDc}Gd@{lXm@wQrG]cYlN{FkD]uMvh[lyan}nNzf[B]vLNd{lYLiwXs[Snq`qg]cQkFzv\\{l[mywXtxInuhf{FR{jZmewTrXkniauW]SAfnzfg]MtlLwTtw]SQen{fC[MwL]wTqZ{nilp',
  coordinates: '!BRGw~`C]}?k}H@oz??`@w@d`BMpIH__z@RGtw__z@?k}H@ox@MpKwoS\\Bb@IH_Ta}?hC~@D`BANmSip',
  mf: 'C30H52',
  mw: 412.74288,
  label: 'Taraxastane'
}, {
  idCode: 'egdP@@@LdbTbbTVbbQvdjteB`e`QVSRvsUUUUUUUUUUTH`lIQAIH`hdidA}AaGzOHAwXvZCnqdrG]cElN{FGD]vMFh[hycnqjwG]S]aN{F{R]vMNT[l{Qn}cNzf[V]vLv\\{jYMywTpxKni`tW]SSdn{FCYMulUwTtZkny`sS]k]MvLMwTuZYneefzfv[nX{nibuw]SY`',
  coordinates: '!BR@K~os\\BRGuH_S]}?k|w__z@?k?~o?x@MpHw@o^}MpJH@da}RGw~`Ox@?k}H@ox@RGuH_T`BANmSip',
  mf: 'C30H50',
  mw: 410.727,
  label: 'Ursane'
}, {
  idCode: 'ek`P@@@LddTTVbvebQbrbbxtdlL\\BRjjjjjjjjjjk`APJaJQqYSj@_XPQQBd_i\\`G]cAhF{NP[m[AnqbN{FgTMt\\qwXt[anmaFzVd[jYSnqbvc]{F]vLfl[nYsnqlwg]cU`n{F{Q]vLNR{lYmewTpXkniduW]SQfnzfs]]uLVF{jZmMwTpy[ninvw]SMcnzfg@',
  coordinates: '!BmpK~_x`B?`Bw__x@mwvH_Xa}mpK~_{\\Bb@K~@A}eGqhq`ELXYVBw?Cctm?vw?K_}?`Bw?Oy?Stp',
  mf: 'C29H52',
  mw: 400.73187999999993,
  label: 'Poriferastane'
}, {
  idCode: 'ek`P@@@LddTTVbvebQbrbbxtdlL\\BRjjjjjjjjjjk`APJaJQqYSi@_XPQQBd_i\\`G]cAhF{NP[m[AnqbN{FgTMt\\qwXt[anmaFzVd[jYSnqbvc]{F]vLfl[nYsnqlwg]cU`n{F{Q]vLNR{lYmewTpXkniduW]SQfnzfs]]uLVF{jZmMwTpy[ninvw]SMcnzfg@',
  coordinates: '!BmpK~_x`B?`Bw__x@mwvH_Xa}mpK~_{\\Bb@K~@A}eGqhq`ELXYVBw?Cctm?vw?K_}?`Bw?Oy?Stp',
  mf: 'C29H52',
  mw: 400.73187999999993,
  label: 'Stigmastane'
}, {
  idCode: 'ekdPD@@@LLdTbRbRUTRtrTfVXTxDl\\RrZzvNjjjjjjjjjjjbHDPkET`Oz[IAwTrYCnifqG]SAjNzfsL]uMVx{lYlIwXwZSnihrg]SEmNzf{F]vMVl{l[LywXq[snqdpW]cChfzNR{lZMdwYqS]{U]vLFZ[k[inuaf{Ff{lZ\\lwRvs]SGMwL',
  coordinates: '!BgF_GS_ygnOiwSb|fnOeBRwiXe?U?IdIKnOfx~fSR?badSVSMYCK~YvQMYDw~YvPr?aadSVQMYCH',
  mf: 'C27H44O2',
  mw: 400.64435999999995,
  label: 'Spirostane'
}, {
  idCode: String.raw`fc@@@LddTTVbvebQbrbgMRlYpTuUUUUUUUUUW@JBheQrsNhGvHQREQ~atAwXpZC]gH[m[C]cD{lZ]Qncf]vMFxwVpfzVdwTrn{FKZ[oXw]cIkMwL{nqlwn{FkA{l[mGnqar^{F[Y{jXLWnidu^zfcM{j[Mwnibp~zfkS{jX\oninv~zf[@`,
  coordinates: '!BmpK~_x`B?`Bw__x@mwvH_Xa}mpK~_{\\Bb@K~@A}eGqhq`ELXYVBw@cctmwvw@k]}?`Bw@oy?',
  mf: 'C28H50',
  mw: 386.705,
  label: 'Campestane'
}, {
  idCode: String.raw`fc@@@LddTTVbvebQbrbgMRlYpTuUUUUUUUUUW@JBheQrsNpGvHQREQ~atAwXpZC]gH[m[C]cD{lZ]Qncf]vMFxwVpfzVdwTrn{FKZ[oXw]cIkMwL{nqlwn{FkA{l[mGnqar^{F[Y{jXLWnidu^zfcM{j[Mwnibp~zfkS{jX\oninv~zf[@`,
  coordinates: '!BmpK~_x`B?`Bw__x@mwvH_Xa}mpK~_{\\Bb@K~@A}eGqhq`ELXYVBw@cctmwvw@k]}?`Bw@oy?',
  mf: 'C28H50',
  mw: 386.705,
  label: 'Ergostane'
}, {
  idCode: 'ec`PH@@@LdTTRRTVVbfQdrvEG@g`USRvuUUUUUUUUUUXTKaEHC~frP]vLvP{jYMawXwXcnqjuG]SAfNzfs\\]vMfD{lXmIwTtYSnibvg]cIcN{FGVMt\\ywTu[snqhpS]gQMwlewTw[KnifqW]cAjfzvZ[m[inqan{FgSMtllwTvs]s@',
  coordinates: '!BtJW~hNpx{D_Pfd_ltJWPfak`esvhPox@jCvWPj`}jDK~gy\\}?bBhOZ`}?i~hPoz`jCvhOZaB',
  mf: 'C27H46O',
  mw: 386.66124,
  label: 'Furostane'
}, {
  idCode: 'eglPD@@@MlbbbbbRRqfbbbRRsDbeagaSPqrusP@PAE@D@HPP@@_tTQsnq`vS]KUMvltwYwS]cCMwMLwQrs][GMuM\\w^wxiXN@AAkhB\\@S@TC]@S`BXCFxXFz@G@DpFMpHMt@V@I`L[aQkhBL@S@VK]@Q`@X@f@qnGFn`ApALADut@V@I`Lan`Hp@L@S@UM]@I`BXCikhBl@S@SM]@]`BXCYkhCL@S@_M]@M`BXBEkh@l@c\\Hc]@Q`@XAFxIZz@g@Hw@kWP@xAFx@',
  coordinates: '!B?`Bw@h`B?`Bw__x@bOvw?H`BmpJH@h`Bm?w~@Hc}mpJH@ox@m?w~@Hc}b@Jw@k\\Bb@JH@ox@m?vH?P',
  mf: 'C28H18O2',
  mw: 386.44892,
  label: 'Bisanthrone'
}, {
  idCode: 'fmo@@@LddTTVbvebQbrTyjUcNBfjjjjjjjjjh@Oz[PCFCPirJmbcDXtzdNXqhwIlJKRdrfLVu]cLYMZsNXv[sFkAXwZKFGIXs[JfCETrZjfcMTv[jfKCTuZZf{KTsX',
  coordinates: '!BetK~gzaBM`BWO_z`esvhOZ`}etK~gy]BjDK~hL~esyhqXNLxi]BWP`QLesvWPi\\}?i~WP`',
  mf: 'C27H48',
  mw: 372.67812,
  label: 'cholesterol'
}, {
  idCode: 'fmo@@@LddTTVbvebQbrTyjUcNBfjjjjjjjjji`EATRhyY`OlPbdJc}MhCnq`tF{NPwZvF{FIwXtzc]GL{lZMqnmaMtmInie]vLVtw^qn{FSV[nYw]cYo]vMVCwXwZO]cCd}vLvswTpXo]SIj}uMF[wTv[o]SEa}uMVgwTwY_]SM`',
  coordinates: '!BmpK~_x`B?`Bw__x@mwvH_Xa}mpK~_{\\Bb@K~@A}eGqhq`ELXYVBw@cctmwvw@k]}mpK~_p',
  mf: 'C27H48',
  mw: 372.67812,
  label: 'Cholestane'
}, {
  idCode: 'fa{@@@LddTTVbvebQbwMRlYpTuUUUUUUUUL@hJbUGKLA}bDTaT_hM@]vLF`wYrF{VpwXqN{FgT[hyg]cQnMulIneiMuLknqbvf{vMwXrZs]sN{l[M{nqjp^{F{Q{lX\\gnqfv^zfCE{jYMWnihs^zfs]{jXl',
  coordinates: '!BmpK~_x`B?`Bw__x@mwvH_Xa}mpK~_{\\Bb@K~@A}eGqhq`ELXYVBw@cctmwvw@`',
  mf: 'C24H42',
  mw: 330.59748,
  label: 'Cholane'
}, {
  idCode: 'fj}@p@@FmxI\\dTTTRbTRR~XJSdyhJHBb`JCBDqB`OlHadBc}AHAnqdMuLQncfMwMqnuaMtmIn}gMum~HdG@@awP@xAFxX{h@l@c\\J]tAF@I`Jnz@[@DpGW]@I`BXCGn`JpALASwPFX@f@y{h@l@S@P',
  coordinates: '!BbOvw?_y?bOrw?Oy?bGvw_Xc}m?w~@K]}?g~H@oy?bOrw?K\\B?`Bw@`',
  mf: 'C15H14O6',
  mw: 290.27016000000003,
  label: 'Flavan-3,4-diol'
}, {
  idCode: 'fjc@@@LddTTVbvebQyjUcNBfjjjjjjjj`EATRhy@~qBJPjOtj`N{FCP[lyC]kX[lXg]cSjMt\\snqhwFzvDwRtfzfUwXq[S]{F{lYMYnyg]vMf}wXuXO]c]h}vLNSwXs[O]SAb}uMF@',
  coordinates: '!BmpK~_x`B?`Bw__x@mwvH_Xa}mpK~_{\\Bb@K~@A}eGqhq`ELXYV@x}@',
  mf: 'C21H36',
  mw: 288.51684,
  label: 'Pregnane'
}, {
  idCode: 'fj}@p@@LDhI\\bbbbbfqbRvxKUdyZBhb@`JAFEq@~QbNQ~`d`wRvF{fhwZwFzfDwXtfzNtwVuf{vDRC`@H{h@l@c\\B]t@N@QnAnz@c@DpEw]@M`BXC{n`DpALAcwPEX@f@i{hCL@S@\\}t@V@I`H',
  coordinates: '!B?`BH@k\\B?`BH_[]}?`Bw?Hc|?g~H@k_|bOvw?_x@bOrw?K\\B?`Bw@`',
  mf: 'C15H12O6',
  mw: 288.25428,
  label: 'Dihydroflavonol'
}, {
  idCode: 'fj}@p@@DEiI\\bbbfbTtQRQXHwhyZdJH@BJ@@OzBRC]KH[nZc]S\\[mXS]cJ[hxs][^[o[|QHN@Acn`BpBMpYwP@xAFxR{hBL@S@[]t@v@I`Knz@S@DpDO]@U`BXCGn`LpALAswPAX@f@`',
  coordinates: '!B?`Bw@h`Bmww~@Ox@bGvH?K_|bOs~_x`Bm?w~@Hc}m?rw@hc|?`Bw@`',
  mf: 'C15H10O6',
  mw: 286.23839999999996,
  label: 'Flavonol'
}, {
  idCode: 'fbmAP@@Fm{NRJJJIQJYIy`iNbf`h`JHB`PaLPOdHad_hI@MvLanibMt\\qnynMvlIneiMwlynmoqD`x@DNz@G@HwCG]@E`D[aSn`HpALAUwPCX@f@z{hAL@S@P}tAV@I`L^z@s@DpEO]@E`BXB',
  coordinates: '!BbOvw?_y?bOrw?Oy?bGvw_Xc}m?w~@K]}?g~H@hc|m?rw@ox@mpH',
  mf: 'C15H14O5',
  mw: 274.27116,
  label: 'Flavan-3-ol'
}, {
  idCode: 'fbmAP@@\\e{NQQQJJKFIKYgEFbehJH`HB``q@~`rOtDdFzVpw\\uF{VXwTwF{FDwQrfzvLw^wxbP\\@AG]@E`D[`Sn`ApBMpuwPDX@f@v{hAl@S@W]t@f@I`H^z@k@DpFO]@Y`BXBgn`BpALA@',
  coordinates: '!B?`BH@k\\B?`BH?_x@m?rH?Oy?b@Jw?Hc}m?w~@Hc|m?rw@ox@mpH',
  mf: 'C15H12O5',
  mw: 272.25527999999997,
  label: 'Flavanone'
}, {
  idCode: 'fbmAPD@\\}GHIrQQQQQHiQItDXKd`PP@ADP@@_tD`F{F`wTvF{fXwQpfzVtwZqf{vBwVwxbP\\@AG]@C`D[`Sn`HpALAiwPAXAFxR{hAl@S@U]t@f@I`Mnz@k@DpEw]@Y`BXBgn`BpALA@',
  coordinates: '!Bm?vH?_y?m?s~_xc|mwvH_[_}?`BH_Xc}m?rw@oy?b@JH?Ox@mpH',
  mf: 'C15H11O5',
  mw: 271.24734,
  label: 'Anthocyanidine'
}, {
  idCode: 'fbmAP@@\\e{NQQQJJKFIKYgEFbehFH`HB`@C~`d`wRvF{fhwZsFzfxwXpfzNTwVqf{vDRC`@H{h@l@c\\B]t@N@QnFnz@c@DpFw]@M`BXB{n`DpALACwPEX@f@q{hCL@S@T}t@V@I`H',
  coordinates: '!B?`BH@k\\B?`BH?_x@mpJH@oy?b@Jw@hc}m?w~@H`BmpJw@ox@mpH',
  mf: 'C15H10O5',
  mw: 270.2394,
  label: 'Flavone'
}, {
  idCode: String.raw`fluhP@DTxIPCQSdTRbbUTRRSNRT{sUKMUUUP@_t\dIlbcXjqIMR{LbwKMJGJivfMrlinSdmr|ynPVmr@`,
  coordinates: '!B?oum~QKy?ouBuo{}Dog]aYkMPlg~_ySz^bTT~Rc~?cK~eQKz',
  mf: 'C10H13N5O4',
  mw: 267.24422,
  label: 'deoxyguanosine'
}, {
  idCode: 'fbm@`@@HRY[UfUWISrXyZjj@@@H@@iIHMv]ancfMwlInqeMuminigMvmynydmtm~LdG@@IwPDx@f@t{h@\\@S@^]tAv@I`Lnz@c@DpDw]@M`BXC[n`DpALACwPEX@f@q{hCL@S@\\}t@V@I`H',
  coordinates: '!BFfASFF@ZKAc~@Hc}b@K~_xc}m?vH?_y?b@K~_?y?bOvH?Xc}b@H',
  mf: 'C18H18O2',
  mw: 266.33892,
  label: 'Butyrolactone'
}, {
  idCode: 'fb}@`@@FrQQJIIIHsIDiHvgIsUPTE@@T@@_tddF{vpwXqFzNXwVwFzfDwYrf{Vtw\\sfzVFRC`@H{hB\\@S@Z]t@N@I`Lnz@{@DpFw]@Q`BXC{n`FpALACwPBX@f@q{hBl@S@T}tAf@I`N^z@K@DpD',
  coordinates: String.raw`!Bb@J{UHc}f\CRtOy?b@KRtIg@bOvH?[mTs}JH@f]SLXCOtl?RLX@`,
  mf: 'C18H18O2',
  mw: 266.33892,
  label: 'Furanofuran lignan'
}, {
  idCode: 'fb}@`@@HRY[efuWHrRoIcejjh@@@h@@iIHMv]ancjMwlInqcMumYni`mvmEnylmtm~LdG@@IwPDx@f@l{h@\\@S@^]t@v@I`Lnz@{@DpEW]@Q`BXCkn`JpALA]wPBX@f@~{h@l@S@T}tAf@I`H',
  coordinates: '!BFfASFF@ZKAbH?_x@b@K~_x`B?`BH?[_}bOvH@h`B?g?~_xc}bOt',
  mf: 'C18H16O2',
  mw: 264.32304,
  label: 'Arylnaphthalene lactone'
}, {
  idCode: 'flm@@@LddTTVbvebyjUcNBfjjjjjjj@C~fT@q`tJ\\bkXhqFMNiCfLZMr[BbtiLicEmWXsFSVlsfMf|qjpVMvbqarVLv@',
  coordinates: '!BetK~gzaBM`BWO_z`esvhOZ`}etK~gy]BjDK~hL~esyhqXNLx',
  mf: 'C19H32',
  mw: 260.46308,
  label: 'steroid'
}, {
  idCode: 'flm@@@LddTTVbvebyjUcNBfjjjjjjjhAPUDjNPOlPbdJc}LhCnq`tF{NPwZvF{FIwXtzc]GL{lZMqnmaMtmInie]vLVtw^qn{FSV[nYw]cYo]vMVCwXwZO]cCd}vLv@',
  coordinates: '!BmpK~_x`B?`Bw__x@mwvH_Xa}mpK~_{\\Bb@K~@A}eGqhq`ELX',
  mf: 'C19H32',
  mw: 260.46308,
  label: 'Androstane'
}, {
  idCode: 'fle@P@@\\\\eIfVWyWyZCEhFB@`H@Pi_tddF{NpwQsF{vTwXqfzvlwTwf{VBw\\tVzVEbC`@H{hBL@S@R]t@f@I`MNz@[@DpDW]@Y`BXCKn`JpALAuwPAX@f@`',
  coordinates: '!B?`BH@k\\BbGw~@Ox@?g~H@hc|m?s~@K_}?`BH?K_|mpK~@K\\B',
  mf: 'C15H12O4',
  mw: 256.25628,
  label: 'Chalcone'
}, {
  idCode: 'fluA@@@ISLrrn~QchaSUTDD@A@@G}IHan}jMvLqnceMuminicMv]ynu`mwLeneoqd`x@DNz@{@DpGG]@Q`BXBSn`ApALAywPCX@f@b{hAL@S@Y]tAN@I`Mnz@k@DpEw]@Y`BXCGn`BpALA@',
  coordinates: '!BsA_LZNU_HNkeHBCeEOm?VVcSEOa?IfcLyU?eW~T`yRA?VW|f',
  mf: 'C18H20O',
  mw: 252.35579999999996,
  label: 'Monofuranic lignan 7-O-7′'
}, {
  idCode: 'fluA@@@ISKJn}jRfkQSUPTD@A@@G}IIAn}lMvLQncfMumqniaMv\\inumMwMYneoqd`x@BNz@g@DpFg]@C`BXCKn`NpALAMwPDX@f@n{hAl@S@_]t@f@I`H^z@k@DpFO]@Y`BXBgn`BpALA@',
  coordinates: String.raw`!BG@\\^LE?lEjpIY\]fOwhw^cBp^?A{~c]fOw~{~cBzMwhw^cB`,
  mf: 'C18H20O',
  mw: 252.35579999999996,
  label: 'Monofuranic lignan 7-O-9′'
}, {
  idCode: 'fluA@@@IRjkLjo`chaSUUP@@A@@G}IHansbMt\\qn}aMvMinmcMuMynu`mwLeneoqd`x@DNz@g@DpGG]@C`BXCSn`NpALAywPDX@f@r{hAl@S@U]t@f@I`Mnz@k@DpEw]@Y`BXCGn`BpALA@',
  coordinates: '!BKA`lYvAeXAjH@ha}bGw~_?y?b@Jw_Xa}bGvH__y??g~H@ha}',
  mf: 'C18H20O',
  mw: 252.35579999999996,
  label: 'Monofuranic lignan 9-O-9′'
}, {
  idCode: 'fdei`@LZlFHIJrQQQSIQEYDhZw`uUUPHEP@G}GIAc\\dI[ebgDTwJcfyLZwKdVECmVXuVm]gR[tvCQ`',
  coordinates: '!Bj?dT~_x@^bTEI_xrO]ZZtozUDoim~_{|i]Im~fwz?os~?@',
  mf: 'C10H13N5O3',
  mw: 251.24521999999996,
  label: 'deoxyadenosine'
}, {
  idCode: 'fdu@@@LddTRtjTrSA\\dZpXuUUUUUUT@hJddmHGqHQRIQjOtR`N{FsP{lXlcnqdvN{F{D{lX]Qncf]vMVywXtXW]cMiMv\\in}m]vLFLwVuf{V\\wXwfzVBwTtV{f@',
  coordinates: '!B?g~H?A|ZLPBH_Q}ebOuSYx`B?g~H_Xc}?g~H@hc}bGvH?@',
  mf: 'C18H30',
  mw: 246.43619999999999,
  label: 'Estrane'
}, {
  idCode: 'fhiQP@DX@IW`yEEDeDdbdsakMUMMUU@ASRPdrJMbsDfuFMrYEnUZRfyFRwJsfyNZwH',
  coordinates: '!B@yhCi_xl@yk~_pNZ?brT~ghe?bpCfaSyJO{~LozUDoh',
  mf: 'C10H14N2O5',
  mw: 242.23016,
  label: 'deoxythymidine'
}, {
  idCode: 'fdy@@@DjU^{yVg@qBBJj@@@@iIAMt\\in}mMv\\YnqkMulynioMvlEnyhmtm~LdG@@AwPDX@f@p{hAl@S@T]t@f@I`NNz@{@DpDg]@U`BXCSn`LpALAYwP@x@f@|{h@l@S@Y]tAN@I`H',
  coordinates: String.raw`!B?g~H@k\BbOvH?[_}b@K~_{\BbOvw?_y?m?vH?_y??g~H?P`,
  mf: 'C18H22',
  mw: 238.37267999999997,
  label: 'Dibenzylbutane'
}, {
  idCode: 'fde@@@LdbbTRtVRKIBTFHQEDE@D@ARRX[o[c]cB[h{S][F[jZs]g^[mXK]sQ[i[|YHN@@Cn`FpALAawPDX@f@h{hBl@S@R]t@f@I`MNz@{@DpEg]@E`BXCKn`LpALAUwP@x@f@n{hB\\@S@P',
  coordinates: '!B?`BH?[_}b@Jw@h`B?g~w@hc}m?vw?Xc}GvT_Foy??g~H?P',
  mf: 'C18H20',
  mw: 236.35679999999996,
  label: 'Arylnaphthalene'
}, {
  idCode: 'fde@@@LdbbbTRVQpcZ][t@DDDUA@ARR@[kYC]cX[mYc]S\\[oXS]KF[nZs]GA[l{|YHN@ACn`DpALAIwPDX@f@t{hCL@S@Y]t@v@I`Jnz@{@DpGW]@E`BXB{n`JpALA}wP@x@f@q{hB\\@S@P',
  coordinates: '!B?g~[iBAzfyl`AWh`_?yzHGi__?yzWrAzfyl`AYndKwHoCP',
  mf: 'C18H20',
  mw: 236.35679999999996,
  label: 'Dibenzocycloctane'
}, {
  idCode: 'fhe@@@LdbbbTReryHQmN|Fjjjjjj`@iE@TzCFCHavFMFIUjTYcFK\\npfLfeMeQ[TfLqlufMV]YoL[lEcM`',
  coordinates: '!BbOvw?_x@?g~H@k\\B?g~w@k_}bOvH?_x@GvVH@a|ZTq`',
  mf: 'C17H28',
  mw: 232.40931999999998,
  label: 'steroid core'
}, {
  idCode: 'fhe@@@LdbbbTReryHQmN|Fjjjjjjj@TDaLadCz`HaBHYAhRJ@[lzG]cAdMt]cnqhqF{VhwXsN{FK\\[oXW]cIiMulinemMuL[nqlun{FkN[n[w]c]`}vLv@',
  coordinates: '!BbGvw__x@?g~H@k\\B?g~w?K_}bOvH__x@GvVH?A|ZTq`',
  mf: 'C17H28',
  mw: 232.40931999999998,
  label: 'Gonane'
}, {
  idCode: 'f`qQP@DX@ISoILrl{jsfcMUMMUT@G}MIBSHhvKLR[TXwIdVyUiJ[eiK\\cN[eYk\\`',
  coordinates: '!B@yhCi_xl@yk~_pNZ?brT~ghe?bpT~Rc~?cK~eQKz',
  mf: 'C9H12N2O5',
  mw: 228.20328,
  label: 'deoxyuridine'
}, {
  idCode: 'f`qpP@DXxBSoYEDhihTdjBtYijjji`@iiHRYEfqQbQZdvXqnPjliS\\mI[dYs\\kM[d',
  coordinates: '!B@yk~K@Ne@yhCfoy??bpCiYSz^bTT~Rc~?cK~eQKz',
  mf: 'C9H13N3O4',
  mw: 227.21921999999998,
  label: 'deoxycytidine'
}, {
  idCode: 'fhy@`@@BrJJJJIPy[`eV|EhJ`@@`@C~`d`wRvF{fhwZwFzfDwXtfzNTwVuf{vDRC`@H{h@l@c\\B]t@N@QnCNz@c@DpGW]@M`BXB[n`DpALA]wPEX@f@~{hCL@S@P}t@V@I`H',
  coordinates: '!B?`BH@k\\B?`BH_[]}?`Bw@h`Bb@K~_{\\BbGvw_[]}mpH',
  mf: 'C15H12O2',
  mw: 224.25827999999998,
  label: 'Isoflavanone'
}, {
  idCode: 'fhy@`@@JRYfYU_XhwgAZd@`@H@@hIHMtlanyjMuMqnueMvMinccMumyn}oqD`x@FNz@K@Hw@g]@Q`BXBsn`ApBMpEwPCX@f@r{hAL@S@[]tAV@I`Knz@s@DpDO]@E`BXB',
  coordinates: '!B?`Bw@h`Bm?w~@Ox@bOw~_{\\Bb@JH@h`Bm?vw?Xc}mpH',
  mf: 'C15H10O2',
  mw: 222.24239999999998,
  label: 'Isoflavone'
}, {
  idCode: 'f`i@`@@VRYfYU]`eNMyh@`AB@@OzJRC]gT[l[c]GB{lXMIneeMuMinucMwlynyoMum~ILE@@QkhgBM|ZzApc\\fn`lHwX[hc@LHw@',
  coordinates: '!B?g~w_Xa}?g~w@oy?b@JH_[]}mwvH_Xa}?g~w@h`B',
  mf: 'C14H8O2',
  mw: 208.21552,
  label: 'Anthraquinone'
}, {
  idCode: 'foQ@`@@BRYfYWvBUXsf`B@@`@C~bd`wYuF{FxwQpn{FCR[iYS]SZ[mXs]{V[nYs][_bSAP@DZzIpc_Fn`\\HwIkhKBMvFzHpCBMp',
  coordinates: '!B?g~w?Xc}?g~w@oy?b@JH?[_}m?vH?Xc}mpJH@`',
  mf: 'C13H8O2',
  mw: 196.20452,
  label: 'Xanthone'
}, {
  idCode: String.raw`foQA@@@YEEEEDdbrRkF\t@D@D@@_tTdF{NhwXwFzNDwRtn{FCJ[j[S]kF[oZs]sN[k[|RXJ@@cWQND[xutCaFyM]AXQnpwQF@XQn`,
  coordinates: '!B?g~w?Xc}?g~w@oy?b@Jw?Xc}m?vH?Xc}mpJH@`',
  mf: 'C14H10O',
  mw: 194.23239999999998,
  label: 'Anthrone'
}, {
  idCode: 'dg|@@DjU_eZx{BAH@@BJozL`mvMK][JwTvmvl[]sVwRwxb`x@@]tAF@I`L]t@v@I`J]t@f@I`N]t@f@Y`I]tAV@I`M]tAf@I`K]tAF@Y`O]t@V@I`H',
  coordinates: '!B?`Bw?Xc}mpJw?Hc|m?vH?_y?bOrH?Xc}b@H',
  mf: 'C14H12',
  mw: 180.24928,
  label: 'Stilbene'
}, {
  idCode: 'fgA@@@DjYU_VByHu`@@@@@@OzJQC]gX[lXg]cAjMtmqniiMwLincmMvlYn}kMum~ILE@@AkhgBMxZzBpc]fn`\\HwD[hc@LHw@',
  coordinates: String.raw`!B?g~H@k\BbOvw?Xc}m?vH@k\Bb@JH?Xc}b@H`,
  mf: 'C14H10',
  mw: 178.2334,
  label: 'Anthracene'
}, {
  idCode: 'dclD@@UIfV][iuhFAH@OzBdMtmc]sTwZsMuMs]cBwQtmumk]{_bbB`@IwPVD[ewPND[`',
  coordinates: '!B?`BH@k\\B?`BH?_x@mpJH@h`B?`BH?P',
  mf: 'C10H6O2',
  mw: 158.15563999999998,
  label: 'Naphtoquinone'
}, {
  idCode: 'dmLD@@QIe[VfeVi@B@C~`iC]SHwXvMwMS]K\\wQpmvmK]{JwVp',
  coordinates: '!Bb@JH?_x@b@JH@ox@bOvH@h`BbOt',
  mf: 'C9H6O2',
  mw: 146.14463999999998,
  label: 'Coumarin'
}, {
  idCode: 'dazH`Jx@aJ]nji`dG}JPGJQap|T\\MGGBaIppP',
  coordinates: '!B?g~H@k_}?g~H?[_}?g|',
  mf: 'C5H11NOS',
  mw: 133.21434,
  label: 'methionine'
}, {
  idCode: 'detH@@rQQJHtpsPT@`APTAnqd[jXfzNinyf[i[f{VEn}i[k[|TPT@BNzApc_NzBpc\\',
  coordinates: '!BbOvw?_y?b@K~_{_}bOvH?X`B',
  mf: 'C9H8O',
  mw: 132.16152,
  label: '2H-Chromene'
}, {
  idCode: 'daDD@@qJYnnjjh@htQcIkESUKM[]s@',
  coordinates: '!Bm?vH?[_|?g?~_x`BbOt',
  mf: 'C6H12O2',
  mw: 116.15928000000001,
  label: 'pyranose'
}, {
  idCode: 'gOp`AdifMjj`OzVIcJVMM^Yzp',
  coordinates: '!BTv]`YW?~KF_~_q`l',
  mf: 'C5H10O2',
  mw: 102.1324,
  label: 'furanose'
}, {
  idCode: 'gOp`Adigkjj`OzVIcKVMMYY|p',
  coordinates: '!Bm?vH?[_|?g?~_xc}',
  mf: 'C5H10O2',
  mw: 102.1324,
  label: 'pyranose core'
}, {
  idCode: 'gFp`AdidvjhC~abXrecSWf@',
  coordinates: '!BTv]`YW?~KF_~_p',
  mf: 'C4H8O2',
  mw: 88.10552,
  label: 'furanose core'
}];

/**
 * In place modification of the molecule to add auto labels to its atoms based on
 * a database of common substructures.
 * @param molecule
 */
function autoLabel(molecule) {
  const {
    Molecule
  } = molecule.getOCL();
  for (const entry of autoLabelDatabase) {
    const fragment = Molecule.fromIDCode(entry.idCode);
    const result = applyFragmentLabels(molecule, fragment, {
      algorithm: 'separated'
    });
    if (result > 0) return;
  }
}

const MAX_R = 10;
/**
 * Generate molecules and calculate predicted properties form a list of smiles and fragments
 * @param {string} coreSmiles
 * @param {Array} fragments - Array of {smiles,R1,R2,...}
 * @param {typeof import('openchemlib')} OCL - openchemlib library
 * @param {object} [options={}] - Options
 * @param {Function} [options.onStep] - method to execute each new molecules
 * @param {boolean} [options.complexity] - returns only the number of molecules to evaluate
 * @returns {Promise<any>} promise that resolves to molecules or complexity as a number
 */
async function combineSmiles(coreSmiles, fragments, OCL, options = {}) {
  const {
    complexity = false
  } = options;
  const core = getCore(coreSmiles);
  const rGroups = getRGroups(core, fragments);
  if (complexity) {
    return getComplexity(rGroups);
  }
  return generate(core, rGroups, OCL, options);
}
function getComplexity(rGroups) {
  let complexity = 1;
  for (const rGroup of rGroups) {
    complexity *= rGroup.smiles.length;
  }
  return complexity;
}
async function generate(core, rGroups, OCL, options = {}) {
  const {
    onStep
  } = options;
  const molecules = {};
  const sizes = new Array(rGroups.length);
  const currents = new Array(rGroups.length);
  for (let i = 0; i < rGroups.length; i++) {
    sizes[i] = rGroups[i].smiles.length - 1;
    currents[i] = 0;
  }
  let position = 0;
  let counter = 0;
  while (true) {
    counter++;
    while (position < currents.length) {
      if (currents[position] < sizes[position]) {
        if (onStep) {
          // eslint-disable-next-line no-await-in-loop
          await onStep(counter);
        }
        appendMolecule(molecules, core, rGroups, currents, OCL);
        currents[position]++;
        for (let i = 0; i < position; i++) {
          currents[i] = 0;
        }
        position = 0;
      } else {
        position++;
      }
    }
    if (position = currents.length) {
      if (onStep) {
        // eslint-disable-next-line no-await-in-loop
        await onStep(counter);
      }
      appendMolecule(molecules, core, rGroups, currents, OCL);
      break;
    }
  }
  const mols = Object.values(molecules);
  mols.sort((m1, m2) => m1.mw - m2.mw);
  return mols;
}
function appendMolecule(molecules, core, rGroups, currents, OCL) {
  let newSmiles = core.smiles;
  for (let i = 0; i < currents.length; i++) {
    newSmiles += `.${rGroups[i].smiles[currents[i]]}`;
  }
  const currentMol = OCL.Molecule.fromSmiles(newSmiles);
  const idCode = currentMol.getIDCode();
  if (!molecules[idCode]) {
    const molecule = {};
    molecules[idCode] = molecule;
    molecule.smiles = currentMol.toIsomericSmiles();
    molecule.combinedSmiles = newSmiles;
    molecule.idCode = idCode;
    molecule.molfile = currentMol.toMolfile();
    const props = new OCL.MoleculeProperties(currentMol);
    molecule.nbHAcceptor = props.acceptorCount;
    molecule.nbHDonor = props.donorCount;
    molecule.logP = props.logP;
    molecule.logS = props.logS;
    molecule.PSA = props.polarSurfaceArea;
    molecule.nbRottable = props.rotatableBondCount;
    molecule.nbStereoCenter = props.stereoCenterCount;
    const mf = currentMol.getMolecularFormula();
    molecule.mf = mf.formula;
    molecule.mw = mf.relativeWeight;
  }
}
function getCore(coreSmiles) {
  const core = {
    originalSmiles: coreSmiles,
    smiles: updateRPosition(coreSmiles).replaceAll(/\[R(?<group>[1-4])]/g, '%5$<group>')
  };
  for (let i = 0; i < MAX_R; i++) {
    if (core.originalSmiles.includes(`[R${i}]`)) core[`R${i}`] = true;
  }
  return core;
}
function getRGroups(core, fragments) {
  const rGroups = {};
  for (const fragment of fragments) {
    if (fragment.smiles) {
      const smiles = updateRPosition(fragment.smiles);
      for (let i = 0; i < MAX_R; i++) {
        if (core[`R${i}`] &&
        // we only consider the R that are in the core
        fragment[`R${i}`]) {
          if (!rGroups[`R${i}`]) {
            rGroups[`R${i}`] = {
              group: `R${i}`,
              smiles: []
            };
          }
          rGroups[`R${i}`].smiles.push(smiles.replace(/\[R]/, `(%5${i})`));
        }
      }
    }
  }
  return Object.keys(rGroups).map(key => rGroups[key]);
}
/**
 * Repositions an R-group marker when it appears at the beginning of a SMILES string.
 * R-group markers (`[R]`, `[R1]`, `[R2]`, ..., `[R9]`) at position 0 are not valid in
 * SMILES notation, so this function moves them after the first atom at the top level
 * of the molecular graph.
 * @param {string} smiles - SMILES string potentially starting with an R-group marker
 * @returns {string} SMILES string with the R-group marker repositioned if needed
 */
function updateRPosition(smiles) {
  // Match R group at the beginning: [R], [R1], [R2], ..., [R9]
  const match = smiles.match(/^\[R\d?]/);
  if (!match) return smiles;
  const rGroup = match[0];
  if (smiles.length === rGroup.length) return `[H]${rGroup}`;
  // we are in trouble ... we need to move the R
  const newSmiles = smiles.slice(rGroup.length);
  // we need to check where we should put the R group
  let level = 0;
  for (let j = 0; j < newSmiles.length; j++) {
    const currentChar = newSmiles.charAt(j);
    const currentSubstring = newSmiles.slice(j);
    if (currentChar === '(') {
      level++;
    } else if (currentChar === ')') {
      level--;
    } else if (level === 0) {
      if (currentSubstring.match(/^[a-z]/)) {
        return `${newSmiles.slice(0, Math.max(0, j + 1))}(${rGroup})${newSmiles.slice(j + 1)}`;
      } else if (currentSubstring.match(/^[A-Z][a-z]/)) {
        return `${newSmiles.slice(0, Math.max(0, j + 2))}(${rGroup})${newSmiles.slice(j + 2)}`;
      } else if (currentSubstring.match(/^[A-Z]/)) {
        return `${newSmiles.slice(0, Math.max(0, j + 1))}(${rGroup})${newSmiles.slice(j + 1)}`;
      }
    }
  }
  return smiles;
}

/**
 * Converts a string to camel case.
 * @param {string} name
 * @returns {string}
 */
function getCamelCase(name) {
  return name.replaceAll(/[ -][a-z]/g, string => string[1].toUpperCase());
}

function getParts(text) {
  const lines = text.split(/\r?\n/);
  const parts = {
    data: []
  };
  let currentPart = parts.data;
  let currentLabel = '';
  for (const line of lines) {
    if (line.startsWith('</')) {
      // close existing part
      if (currentLabel !== line.slice(2, -1)) {
        throw new Error('This should not happen');
      }
      currentLabel = '';
      currentPart = parts.data;
    } else if (line.startsWith('<') && !line.includes('=')) {
      // open new part
      if (currentLabel) {
        throw new Error('This should not happen');
      }
      currentLabel = line.slice(1, -1);
      const target = getCamelCase(currentLabel);
      parts[target] = [];
      currentPart = parts[target];
    } else if (currentLabel) {
      // add line to current part
      currentPart.push(line);
    } else {
      //data lines
      currentPart.push(line);
    }
  }
  return parts;
}

function parseColumnbProperties(lines) {
  lines = lines.map(line => {
    const [key, value] = line.slice(1, -1).split('=');
    return {
      key,
      value: value.slice(1, -1)
    };
  });
  const columnProperties = {};
  let currentColumnName = '';
  for (const line of lines) {
    switch (line.key) {
      case 'columnName':
        currentColumnName = line.value;
        columnProperties[currentColumnName] = {};
        break;
      case 'columnProperty':
        {
          if (!currentColumnName) {
            throw new Error('This should not happen');
          }
          const [key, value] = line.value.split('\t');
          columnProperties[currentColumnName][key] = value;
          break;
        }
      default:
        throw new Error('This should not happen');
    }
  }
  for (const key in columnProperties) {
    const columnPropery = columnProperties[key];
    if (columnProperties[key].parent) {
      const target = columnProperties[columnPropery.parent];
      if (!target) {
        throw new Error('Parent column not found');
      }
      if (!target.related) {
        target.related = {};
      }
      target.related[columnPropery.specialType] = key;
    }
  }
  return columnProperties;
}

function parseData(lines, options = {}) {
  lines = lines.filter(line => !line.match(/^\s*$/));
  const {
    columnProperties = {}
  } = options;
  const headers = lines.shift().split('\t').map(header => {
    if (columnProperties[header]) {
      return {
        label: header,
        ...columnProperties[header]
      };
    }
    return {
      label: header
    };
  });
  const entries = [];
  const rawEntries = [];
  for (const line of lines) {
    const fields = line.split('\t');
    const rawEntry = {};
    for (const [index, header] of headers.entries()) {
      rawEntry[header.label] = fields[index];
    }
    rawEntries.push(rawEntry);
    const entry = {};
    for (const header of headers) {
      if (header.parent) continue;
      entry[header.label] = valueEhnhancer(header, rawEntry);
    }
    entries.push(entry);
  }
  return {
    entries,
    rawEntries
  };
}
function valueEhnhancer(header, rawEntry) {
  if (header?.specialType === 'rxncode') {
    return `${rawEntry[header.label]}#${rawEntry[header.related.atomMapping]}#${rawEntry[header.related.idcoordinates2D]}`;
  }
  return rawEntry[header.label];
}
/*
entry.rxnCode =
*/

/**
 * Convert a DataWarrior database into a JSON object
 * @param {string} text
 * @returns
 */
function parseDwar(text) {
  text = ensureString(text);
  const parts = getParts(text);
  improveParts(parts);
  return parts;
}
function improveParts(parts) {
  for (const key in parts) {
    switch (key) {
      case 'columnProperties':
        parts[key] = parseColumnbProperties(parts[key]);
        break;
      case 'data':
        break;
      default:
        parts[key] = parseDefault(parts[key]);
    }
  }
  const data = parseData(parts.data, {
    columnProperties: parts.columnProperties
  });
  parts.data = data.entries;
  parts.rawData = data.rawEntries;
}
function parseDefault(lines) {
  const result = {};
  for (const line of lines) {
    const [key, value] = line.slice(1, -1).split('=');
    result[key] = value.slice(1, -1);
  }
  return result;
}

/**
 * Returns various information about atoms in the molecule
 * @param {import('openchemlib').Molecule} [molecule]
 */
function getAtomsInfo(molecule) {
  const OCL = molecule.getOCL();
  molecule.ensureHelperArrays(OCL.Molecule.cHelperRings);
  const diaIDs = getDiastereotopicAtomIDs(molecule);
  const results = [];
  for (let i = 0; i < diaIDs.length; i++) {
    const result = {
      oclID: diaIDs[i],
      extra: {
        singleBonds: 0,
        doubleBonds: 0,
        tripleBonds: 0,
        aromaticBonds: 0,
        cnoHybridation: 0 // should be 1 (sp), 2 (sp2) or 3 (sp3)
      }
    };
    const extra = result.extra;
    results.push(result);
    result.abnormalValence = molecule.getAtomAbnormalValence(i); // -1 is normal otherwise specified
    result.charge = molecule.getAtomCharge(i);
    result.cipParity = molecule.getAtomCIPParity(i);
    result.color = molecule.getAtomColor(i);
    result.customLabel = molecule.getAtomCustomLabel(i);
    //        result.esrGroup=molecule.getAtomESRGroup(i);
    //        result.esrType=molecule.getAtomESRType(i);
    result.atomicNo = molecule.getAtomicNo(i);
    result.label = molecule.getAtomLabel(i);
    //        result.list=molecule.getAtomList(i);
    //        result.listString=molecule.getAtomListString(i);
    //        result.mapNo=molecule.getAtomMapNo(i);
    result.mass = molecule.getAtomMass(i);
    //        result.parity=molecule.getAtomParity(i);
    //        result.pi=molecule.getAtomPi(i);
    //        result.preferredStereoBond=molecule.getAtomPreferredStereoBond(i);
    //        result.queryFeatures=molecule.getAtomQueryFeatures(i);
    result.radical = molecule.getAtomRadical(i);
    result.ringBondCount = molecule.getAtomRingBondCount(i);
    //        result.ringCount=molecule.getAtomRingCount(i);
    result.ringSize = molecule.getAtomRingSize(i);
    result.x = molecule.getAtomX(i);
    result.y = molecule.getAtomY(i);
    result.z = molecule.getAtomZ(i);
    result.allHydrogens = molecule.getAllHydrogens(i);
    result.connAtoms = molecule.getConnAtoms(i);
    result.allConnAtoms = molecule.getAllConnAtoms(i);
    result.implicitHydrogens = result.allHydrogens + result.connAtoms - result.allConnAtoms;
    result.isAromatic = molecule.isAromaticAtom(i);
    result.isAllylic = molecule.isAllylicAtom(i);
    result.isStereoCenter = molecule.isAtomStereoCenter(i);
    result.isRing = molecule.isRingAtom(i);
    result.isSmallRing = molecule.isSmallRingAtom(i);
    result.isStabilized = molecule.isStabilizedAtom(i);
    // todo HACK to circumvent bug in OCL that consider than an hydrogen is connected to itself
    result.extra.singleBonds = result.atomicNo === 1 ? 0 : result.implicitHydrogens;
    for (let j = 0; j < molecule.getAllConnAtoms(i); j++) {
      const bond = molecule.getConnBond(i, j);
      const bondOrder = molecule.getBondOrder(bond);
      if (molecule.isAromaticBond(bond)) {
        extra.aromaticBonds++;
      } else if (bondOrder === 1) {
        // not an hydrogen
        extra.singleBonds++;
      } else if (bondOrder === 2) {
        extra.doubleBonds++;
      } else if (bondOrder === 3) {
        extra.tripleBonds++;
      }
    }
    result.extra.totalBonds = result.extra.singleBonds + result.extra.doubleBonds + result.extra.tripleBonds + result.extra.aromaticBonds;
    if (result.atomicNo === 6) {
      result.extra.cnoHybridation = result.extra.totalBonds - 1;
    } else if (result.atomicNo === 7) {
      result.extra.cnoHybridation = result.extra.totalBonds;
    } else if (result.atomicNo === 8) {
      result.extra.cnoHybridation = result.extra.totalBonds + 1;
    } else if (result.atomicNo === 1) {
      const connectedAtom = molecule.getAllConnAtoms(i) === 0 ? 0 : molecule.getAtomicNo(molecule.getConnAtom(i, 0));
      result.extra.hydrogenOnAtomicNo = connectedAtom;
      if (connectedAtom === 7 || connectedAtom === 8) {
        result.extra.labileHydrogen = true;
      }
    }
  }
  return results;
}

function getImplicitHydrogensCount(molecule, atomID) {
  return molecule.getImplicitHydrogens(atomID);
}

/**
 * Calculate the molecular formula in 'chemcalc' notation taking into account fragments, isotopes and charges
 * @param {import('openchemlib').Molecule} molecule - an instance of OCL.Molecule
 * @returns {object}
 */
function getMF(molecule) {
  const entries = molecule.getFragments();
  const result = {};
  let parts = [];
  const allAtoms = [];
  for (const entry of entries) {
    const mf = getFragmentMF(entry, allAtoms);
    parts.push(mf);
  }
  const counts = {};
  for (const part of parts) {
    if (!counts[part]) counts[part] = 0;
    counts[part]++;
  }
  parts = [];
  const sortedKeys = Object.keys(counts);
  sortedKeys.sort();
  for (const key of sortedKeys) {
    if (counts[key] > 1) {
      parts.push(counts[key] + key);
    } else {
      parts.push(key);
    }
  }
  result.parts = parts;
  result.mf = toMFString(allAtoms);
  return result;
}
function getFragmentMF(molecule, allAtoms) {
  const atoms = [];
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    const atom = {
      charge: molecule.getAtomCharge(i),
      label: molecule.getAtomLabel(i),
      mass: molecule.getAtomMass(i),
      implicitHydrogens: molecule.getImplicitHydrogens(i)
    };
    if (atom.label === '?') atom.label = 'R';
    atoms.push(atom);
    allAtoms.push(atom);
  }
  return toMFString(atoms);
}
function toMFString(atoms) {
  let charge = 0;
  const mfs = {};
  for (const atom of atoms) {
    let label = atom.label;
    charge += atom.charge;
    if (atom.mass) {
      label = `[${atom.mass}${label}]`;
    }
    const mfAtom = mfs[label];
    if (!mfAtom) {
      mfs[label] = 0;
    }
    mfs[label] += 1;
    if (atom.implicitHydrogens) {
      if (!mfs.H) mfs.H = 0;
      mfs.H += atom.implicitHydrogens;
    }
  }
  let mf = '';
  const keys = Object.keys(mfs);
  keys.sort(atomSorter_1);
  for (const key of keys) {
    mf += key;
    if (mfs[key] > 1) mf += mfs[key];
  }
  if (charge > 0) {
    mf += `(+${charge > 1 ? charge : ''})`;
  } else if (charge < 0) {
    mf += `(${charge < -1 ? charge : '-'})`;
  }
  return mf;
}

/**
 * Returns the charge of a molecule
 * @param {import('openchemlib').Molecule} molecule - an instance of OCL.Molecule
 * @returns {number}
 */
function getCharge(molecule) {
  let charge = 0;
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    charge += molecule.getAtomCharge(i);
  }
  return charge;
}

/**
 * We have 2 molfiles and we would like to map the atom number from one to the other.
 * We expect that both molfiles contain the same atoms that can be in a different order.
 * @param {typeof import('openchemlib')} OCL - openchemlib library
 * @param {string} from
 * @param {string} to
 * @returns {{fromTo: number[], toFrom: number[]}} - fromTo is an array of the same length as the number of atoms in the from molfile. Each element is the index of the corresponding atom in the to molfile. toFrom is the opposite.
 */
function getMolfilesMapping(OCL, from, to) {
  const {
    Molecule
  } = OCL;
  const fromF = from.replaceAll(' H ', ' X ');
  const toF = to.replaceAll(' H ', ' X ');
  // we may ignore mapping because we should not have hydrogens anymore
  const fromMoleculeF = Molecule.fromMolfile(fromF);
  const toMoleculeF = Molecule.fromMolfile(toF);
  if (fromMoleculeF.getIDCode() !== toMoleculeF.getIDCode()) {
    // only a problem of hydrogens ?
    const fromMolecule = Molecule.fromMolfile(from);
    const toMolecule = Molecule.fromMolfile(to);
    if (fromMolecule.getIDCode() === toMolecule.getIDCode()) {
      throw new Error('Molecules do not have the same explicit hydrogens');
    } else {
      throw new Error('Molecules are different');
    }
  }
  const fromFinalRanks = [...fromMoleculeF.getFinalRanks()];
  const toFinalRanks = [...toMoleculeF.getFinalRanks()];
  // need now to create the mapping
  const fromTo = [];
  const toFrom = [];
  for (let i = 0; i < fromFinalRanks.length; i++) {
    const fromRank = fromFinalRanks[i];
    const toRank = toFinalRanks.indexOf(fromRank);
    if (toRank === -1) {
      throw new Error('Rank not found. This should never happen.');
    }
    fromTo[i] = toRank;
    toFrom[toRank] = i;
  }
  return {
    fromTo,
    toFrom
  };
}

/**
 * Returns the custom labels that are shared by more than one atom.
 * Atoms without a custom label are ignored, so a molecule with no custom labels,
 * or with only unique ones, yields an empty array.
 * @param molecule - The molecule whose atom custom labels should be checked.
 * @returns The deduplicated list of non-unique custom labels, in first-seen
 * order. Empty when every custom label is unique.
 */
function getNonUniqueCustomLabels(molecule) {
  const counts = new Map();
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    const customLabel = molecule.getAtomCustomLabel(i)?.replace(/^\]/, '');
    if (!customLabel) continue;
    counts.set(customLabel, (counts.get(customLabel) ?? 0) + 1);
  }
  const nonUniqueCustomLabels = [];
  for (const [customLabel, count] of counts) {
    if (count > 1) nonUniqueCustomLabels.push(customLabel);
  }
  return nonUniqueCustomLabels;
}

const unsaturationsObject = {
  O: 0,
  N: 1,
  H: -1,
  C: 2,
  F: -1,
  Si: 2,
  Cl: -1,
  Br: -1,
  I: -1
};
/**
 * Simplified version of the calculation in mf-parser
 * @param mf
 * @returns
 */
function getUnsaturation(mf) {
  // split a molecular formula into its elements
  const elements = mf.match(/[A-Z][a-z]*\d*/g);
  if (!elements || elements.length === 0) return undefined;
  let unsaturation = 0;
  for (const element of elements) {
    const matches = element.match(/([A-Z][a-z]?)(\d*)/);
    const symbol = matches[1];
    const count = matches[2] ? Number.parseInt(matches[2], 10) : 1;
    const elementObject = unsaturationsObject[symbol];
    if (elementObject === undefined) {
      return undefined;
    }
    unsaturation += elementObject * count;
  }
  return unsaturation / 2 + 1;
}

// this page allows to debug the hints: https://my.cheminfo.org/?viewURL=https%3A%2F%2Fmyviews.cheminfo.org%2Fdb%2Fvisualizer%2Fentry%2F108024089da99d0cb70a57724486d0c6%2Fview.json
const defaultPossibleHints = [{
  idCode: String.raw`eF@Hp\pcc`,
  message: 'What about a non-aromatic ring?'
}, {
  idCode: 'eF@HpZpk|X`',
  message: 'You should consider an aromatic ring.'
}, {
  idCode: 'gFp@DiTt@@B',
  message: 'Did you think about benzene derivatives?'
}, {
  idCode: 'eFHBLFLYpB@QVE_cD',
  message: 'An aromatic cycle can be an heterocycle.'
}, {
  idCode: 'eMHJN`q[N@PBGN@PBJhjU~JU@',
  anyMatches: ['gFx@@eJf`@@P', 'gKP@Di\\YZ@qas`D@`'],
  message: 'There could be more than one heteroatom in an aromatic cycle.'
}, {
  idCode: 'gFp@DiTvjhCYbKFuXUEIVTUUWxlTeZMX',
  anyMatches: ['gKP@Di\\Zj@vhbqkPjJRlhj?FbdkQ`'],
  message: 'Aromatic cycles can have 5 or 6 atoms.',
  remarks: 'Proposed 5 and it is 6'
}, {
  idCode: 'gKP@Di\\Zj@vhbqkPjJRlhj?FbdkQ`',
  anyMatches: ['gFp@DiTvjhCYbKFuXUEIVTUUWxlTeZMX'],
  message: 'Aromatic cycles can have 5 or 6 atoms.',
  remarks: 'Proposed 6 and it is 5'
}, {
  idCode: 'gFx@@eJf`@@P',
  message: 'Did you think about pyridine derivatives?'
}, {
  idCode: 'gNp@LdbLjj@vdrpqSdm_qhXiKT',
  message: 'I would consider bicyclo products.',
  remarks: 'One atom bridge'
}, {
  idCode: 'eFHBJD',
  message: 'Adding a carbonyl could help.'
}, {
  idCode: 'eMHAIhMi}EqfFBmN?vP',
  message: 'You should consider an alcohol.'
}, {
  idCode: 'eMB@HRZCBKSFXXJt{?Y@',
  message: 'You should consider a thiol.'
}, {
  idCode: 'gJQ@@eKU@[KFJtLAa`sAUR]g_zlP',
  message: 'You should consider an ether.'
}, {
  idCode: 'gJQ@@eKU@[KFJtLAa`r`q?EAcuX`',
  anyMatches: ['gJQ@@eKU@[KFJtLAa`?uX`'],
  message: 'An ether can be in a cycle.'
}, {
  idCode: 'gJPH@DIRuPFrqbmC@XXLpUTgYw~kD',
  message: 'You should consider a thioether.'
}, {
  idCode: 'gJPH@DIRuPFrqbmC@XXLhL_qPX}VH',
  anyMatches: ['gJPH@DIRuPFrqbmC@XXO}VH'],
  message: 'A thioether can be in a cycle.'
}, {
  idCode: 'eM`AIhLHmLYa`kSo}d',
  message: 'You should consider a primary amine.',
  remarks: 'primary'
}, {
  idCode: 'gJX@@eKU@XPVVLUhXCCAUIv]?jq@',
  message: 'You should consider a secondary amine.',
  remarks: 'secondary'
}, {
  idCode: 'gNx@@eRmUPFDElZxxppVFAppUv\\WUw~xu`',
  message: 'You should consider a tertiary amine.',
  remarks: 'tertiary'
}, {
  idCode: 'gJX@@eKU@XPVVLUhXCCAeAcUIv]~JCGjq@',
  anyMatches: ['gJX@@eKU@XPVVLUhXCCAfBjd{N?uX`'],
  message: 'A secondary amine can be in a cycle.',
  remarks: 'secondary cyclic amine'
}, {
  idCode: 'gNx@@eRmUPFDElZxxppVFAppYPXuv\\WUwxhL^xu`',
  anyMatches: ['gNx@@eRmUPFDElZxxppVFAppY`j{NKj{?\\Zp'],
  message: 'A tertiary amine can be in a cycle.',
  remarks: 'tertiary cyclic amine'
}, {
  idCode: 'gGP`@df]j`MekEZFBppUa]?ju@',
  message: 'What about an ester?'
}, {
  idCode: 'gGP`@df]j`MekEZFBppYdZpn?FQzmP',
  anyMatches: ['gGP`@df]j`MekEZFBppUa]?ju@'],
  message: 'An ester can be in a cycle.'
}, {
  idCode: 'gGY@DDf]j`MekEZFBppUa]?ju@',
  message: 'There is an amide function in the molecule.'
}, {
  idCode: 'gGY@DDf]j`MekEZFBppYdZpn?FQzmP',
  anyMatches: ['gGY@DDf]j`MekEZFBppUa]?ju@@'],
  message: 'An amide can be in a cycle.'
}, {
  idCode: 'gCi@DDfZ@~btl',
  message: 'There is a primary amide in the molecule.'
}, {
  idCode: 'gC``@dfZ@~bl',
  message: 'You should think about carboxylic acids. The OH signal may be very wide.'
}, {
  idCode: String.raw`eF@Hh\q@`,
  message: 'What about having an olefin?'
}, {
  idCode: 'gFp@DiTt@@CqC^LmV[m`',
  anyMatches: ['gFp@DiTt@@CBqXwd@'],
  message: 'Did you think about disubstituted aromatic rings?',
  remarks: 'meta'
}, {
  idCode: 'gFp@DiTt@@CqB~LmWkM`',
  anyMatches: ['gFp@DiTt@@CBqXwd@'],
  message: 'Did you think about disubstituted aromatic rings?',
  remarks: 'para'
}, {
  idCode: 'gFp@DiTt@@CqB^JoV[m',
  anyMatches: ['gFp@DiTt@@CBqXwd@'],
  message: 'Did you think about disubstituted aromatic rings?',
  remarks: 'ortho'
}, {
  idCode: 'gFp@DiTt@@CqB^JoV[m',
  anyMatches: ['gFp@DiTt@@CqC^LmV[m`', 'gFp@DiTt@@CqB~LmWkM`'],
  message: 'Disubstituted aromatic ring can be ortho (1,2), meta (1,3) or para (1,4).',
  remarks: 'ortho'
}, {
  idCode: 'gFp@DiTt@@CqC^LmV[m`',
  anyMatches: ['gFp@DiTt@@CqB^JoV[m', 'gFp@DiTt@@CqB~LmWkM`'],
  message: 'Disubstituted aromatic ring can be ortho (1,2), meta (1,3) or para (1,4).',
  remarks: 'meta'
}, {
  idCode: 'gFp@DiTt@@CqB~LmWkM`',
  anyMatches: ['gFp@DiTt@@CqC^LmV[m`', 'gFp@DiTt@@CqB^JoV[m'],
  message: 'Disubstituted aromatic ring can be ortho (1,2), meta (1,3) or para (1,4).',
  remarks: 'para'
}, {
  idCode: 'gGP`@df]j`H',
  anyMatches: ['gGP`@dfUj`H'],
  message: 'You should check the orientation of the ester.'
}, {
  idCode: String.raw`gOq@@drm\@@Aa@`,
  message: 'Alcohols on aromatic ring may have surprising chemical shifts.'
}, {
  idCode: String.raw`gOx@@drm\@@A}A@`,
  message: 'NH on aromatic ring may have surprising chemical shifts.'
}, {
  idCode: 'eFHBJGuP',
  message: 'Hydrogens on a carbonyl have very high chemical shifts.'
}];
/**
 *
 * @param correct
 * @param proposed
 * @param options
 * @returns
 */
function getNMRHints(correct, proposed, options = {}) {
  const hints = [...checkMF(correct, proposed), ...checkUnsaturation(correct, proposed), ...checkStereoAndTautomer(correct, proposed)];
  const {
    possibleHints = defaultPossibleHints
  } = options;
  const OCL = correct.getOCL();
  const searcherCorrect = new OCL.SSSearcher();
  searcherCorrect.setMolecule(correct);
  const searcherAnswer = new OCL.SSSearcher();
  searcherAnswer.setMolecule(proposed);
  for (const possibleHint of possibleHints) {
    const {
      anyMatches
    } = possibleHint;
    if (anyMatches) {
      // we filter the molecules so they match at least one of the anyMatches
      let match = false;
      for (const anyMatch of anyMatches) {
        const matchFragment = OCL.Molecule.fromIDCode(anyMatch);
        searcherAnswer.setFragment(matchFragment);
        if (searcherAnswer.isFragmentInMolecule()) {
          match = true;
          break;
        }
      }
      if (!match) continue;
    }
    const {
      idCode
    } = possibleHint;
    const fragment = OCL.Molecule.fromIDCode(idCode);
    searcherCorrect.setFragment(fragment);
    searcherAnswer.setFragment(fragment);
    if (searcherCorrect.isFragmentInMolecule() && !searcherAnswer.isFragmentInMolecule()) {
      hints.push(possibleHint);
    }
  }
  // we suggest symmetry only if MF is correct
  if (isMFCorrect(correct, proposed)) {
    hints.push(...checkSymmetry(correct, proposed));
  }
  return hints.map(hint => ({
    ...hint,
    hash: getHash(JSON.stringify(hint))
  }));
}
function isMFCorrect(correct, answer) {
  const mfCorrect = correct.getMolecularFormula().formula;
  const mfAnswer = answer.getMolecularFormula().formula;
  return mfCorrect === mfAnswer;
}
function checkMF(correct, answer) {
  if (isMFCorrect(correct, answer)) return [];
  return [{
    message: 'You should check the molecular formula.'
  }];
}
function checkUnsaturation(correct, answer) {
  const mfCorrect = correct.getMolecularFormula().formula;
  const mfAnswer = answer.getMolecularFormula().formula;
  if (mfCorrect !== mfAnswer) {
    const unsaturationCorrect = getUnsaturation(mfCorrect);
    const unsaturationAnswer = getUnsaturation(mfAnswer);
    if (unsaturationCorrect === unsaturationAnswer || unsaturationAnswer === undefined || unsaturationCorrect === undefined) {
      return [];
    }
    if (unsaturationCorrect > unsaturationAnswer) {
      return [{
        message: 'The proposed molecule has a double bond equivalent (DBE) that is too low.'
      }];
    } else {
      return [{
        message: 'The proposed molecule has a double bond equivalent (DBE) that is too high.'
      }];
    }
  }
  return [];
}
function checkStereoAndTautomer(correct, answer) {
  if (correct.getIDCode() === answer.getIDCode()) return [];
  if (getNoStereoIDCode(correct) === getNoStereoIDCode(answer)) {
    return [{
      message: 'There is only a problem with stereochemistry.'
    }];
  }
  if (getTautomerIDCode(correct) === getTautomerIDCode(answer)) {
    return [{
      message: "Weird, you didn't draw the expected tautomer."
    }];
  }
  return [];
}
function checkSymmetry(correct, answer) {
  const nbCorrectRanks = Object.keys(new TopicMolecule(correct).getDiaIDsObject()).length;
  const nbAnswerRanks = Object.keys(new TopicMolecule(answer).getDiaIDsObject()).length;
  if (nbCorrectRanks === nbAnswerRanks) return [];
  if (nbCorrectRanks > nbAnswerRanks) {
    return [{
      message: 'The proposed molecule is too symmetric.'
    }];
  } else {
    return [{
      message: 'The proposed molecule is not symmetric enough.'
    }];
  }
}
function getTautomerIDCode(molecule) {
  const OCL = molecule.getOCL();
  return OCL.CanonizerUtil.getIDCode(molecule, OCL.CanonizerUtil.TAUTOMER);
}
function getNoStereoIDCode(molecule) {
  const OCL = molecule.getOCL();
  return OCL.CanonizerUtil.getIDCode(molecule, OCL.CanonizerUtil.NOSTEREO);
}
/*
    https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js
    cyrb53a (c) 2023 bryc (github.com/bryc)
    License: Public domain. Attribution appreciated.
    The original cyrb53 has a slight mixing bias in the low bits of h1.
    This shouldn't be a huge problem, but I want to try to improve it.
    This new version should have improved avalanche behavior, but
    it is not quite final, I may still find improvements.
    So don't expect it to always produce the same output.
*/
function getHash(str, seed = 0) {
  let h1 = 0xdeadbeef ^ seed;
  let h2 = 0x41c6ce57 ^ seed;
  for (let i = 0, ch; i < str.length; i++) {
    ch = str.codePointAt(i);
    h1 = Math.imul(h1 ^ ch, 0x85ebca77);
    h2 = Math.imul(h2 ^ ch, 0xc2b2ae3d);
  }
  h1 ^= Math.imul(h1 ^ h2 >>> 15, 0x735a2d97);
  h2 ^= Math.imul(h2 ^ h1 >>> 15, 0xcaf649a9);
  h1 ^= h2 >>> 16;
  h2 ^= h1 >>> 16;
  return 2097152 * (h2 >>> 0) + (h1 >>> 11);
}

/**
 *
 * @param correct
 * @param proposed
 * @param providedHints
 */
function getNextNMRHint(correct, proposed, providedHints) {
  const hints = getNMRHints(correct, proposed);
  const possibleHints = hints.filter(possibleHint => !providedHints.some(providedHint => possibleHint.hash === providedHint.hash));
  if (possibleHints.length === 0) return undefined;
  return {
    ...possibleHints[0],
    idCode: proposed.getIDCode()
  };
}

let toxicityPredictor;
let druglikenessPredictor;
/**
 *
 * @param {import('openchemlib').Molecule} molecule
 * @param {object} [options={}]
 * @param {boolean} [options.includeToxicities=false]
 * @param {boolean} [options.includeDruglikeness=false]
 */
function getProperties(molecule, options = {}) {
  const {
    includeToxicities = false,
    includeDruglikeness = false
  } = options;
  const OCL = molecule.getOCL();
  if (!OCL.MoleculeProperties) {
    throw new Error('OCL.MoleculeProperties is not defined');
  }
  const props = new OCL.MoleculeProperties(molecule);
  const moleculeFormula = molecule.getMolecularFormula();
  const result = {
    acceptorCount: props.acceptorCount,
    donorCount: props.donorCount,
    logP: props.logP,
    logS: props.logS,
    polarSurfaceArea: props.polarSurfaceArea,
    rotatableBondCount: props.rotatableBondCount,
    stereoCenterCount: props.stereoCenterCount,
    mw: moleculeFormula.relativeWeight,
    mf: moleculeFormula.formula
  };
  if (includeToxicities) {
    const {
      ToxicityPredictor
    } = molecule.getOCL();
    if (!ToxicityPredictor) {
      throw new Error('OCL.ToxicityPredictor is not defined');
    }
    if (!toxicityPredictor) {
      toxicityPredictor = new ToxicityPredictor();
    }
    result.mutagenic = toxicityPredictor.assessRisk(molecule, ToxicityPredictor.TYPE_MUTAGENIC);
    result.tumorigenic = toxicityPredictor.assessRisk(molecule, ToxicityPredictor.TYPE_TUMORIGENIC);
    result.irritant = toxicityPredictor.assessRisk(molecule, ToxicityPredictor.TYPE_IRRITANT);
    result.reproductiveEffective = toxicityPredictor.assessRisk(molecule, ToxicityPredictor.TYPE_REPRODUCTIVE_EFFECTIVE);
  }
  if (includeDruglikeness) {
    const {
      DruglikenessPredictor
    } = molecule.getOCL();
    if (!DruglikenessPredictor) {
      throw new Error('OCL.DruglikenessPredictor is not defined');
    }
    if (!druglikenessPredictor) {
      druglikenessPredictor = new DruglikenessPredictor();
    }
    result.drugLikeness = druglikenessPredictor.assessDruglikeness(molecule);
  }
  if (result.drugLikeness !== undefined && result.mutagenic !== undefined) {
    result.drugScore = OCL.DrugScoreCalculator.calculate(result.logP, result.polarSurfaceArea, result.mw, result.drugLikeness, [result.mutagenic, result.tumurogenic, result.irritant, result.reproductiveEffective]);
  }
  return result;
}

/**
 * Calculate the molecular formula in 'chemcalc' notation taking into account fragments, isotopes and charges
 * @param {OCL.Molecule} [molecule] - an instance of OCL.Molecule
 * @returns {}
 */
function getAtoms(molecule) {
  const entries = molecule.getFragments();
  const atoms = {};
  const result = {
    atoms,
    parts: []
  };
  for (const entry of entries) {
    const part = {};
    result.parts.push(part);
    appendAtomPart(entry, atoms, part);
  }
  return result;
}
function appendAtomPart(molecule, atoms, part) {
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    const label = molecule.getAtomLabel(i);
    if (!atoms[label]) {
      atoms[label] = 0;
    }
    atoms[label] += 1;
    if (!part[label]) {
      part[label] = 0;
    }
    part[label] += 1;
    const implicitHydrogens = molecule.getImplicitHydrogens(i);
    if (implicitHydrogens) {
      if (!atoms.H) {
        atoms.H = 0;
      }
      atoms.H += implicitHydrogens;
      if (!part.H) {
        part.H = 0;
      }
      part.H += implicitHydrogens;
    }
  }
}

/**
 * Return the number of Hydroxyl groups in a molecule or fragment
 * @param {import('openchemlib').Molecule} molecule
 * @returns {number} 'Number of Hydroxyl groups'
 */
function nbOH(molecule) {
  let counter = 0;
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    if (molecule.getAtomicNo(i) === 6) {
      let carbonyl = false;
      let hydroxyl = false;
      let carbonOrHydrogen = true;
      for (let neighbour = 0; neighbour < molecule.getConnAtoms(i); neighbour++) {
        const neighbourAtom = molecule.getConnAtom(i, neighbour);
        const neighbourBond = molecule.getConnBond(i, neighbour);
        if (molecule.getAtomicNo(neighbourAtom) === 8) {
          if (molecule.getBondOrder(neighbourBond) === 1 && molecule.getAllHydrogens(neighbourAtom) > 0) {
            // If there is more than a Hydroxyl in the same carbon atome they are not couted as Hydroxyl groups
            if (hydroxyl) {
              hydroxyl = false;
              break;
            }
            hydroxyl = true;
          } else if (molecule.getBondOrder(neighbourBond) === 2) {
            // If there is Carbonyl group on the same carbon atom it is not couted as Hydroxyl group
            carbonyl = true;
          }
        } else if (
        // If there is not at least one carbon or hydrogen as neighbour atom it is not counted as Hydroxyl group
        molecule.getAtomicNo(neighbourAtom) !== 6 && molecule.getAtomicNo(neighbourAtom) !== 1) {
          carbonOrHydrogen = false;
        }
      }
      if (!carbonyl && hydroxyl && carbonOrHydrogen) counter++;
    }
  }
  return counter;
}

/**
 * Return the number of Carboxyl groups in a molecule or fragment
 * @param {import('openchemlib').Molecule} molecule
 * @returns {number} 'Number of Carboxyl groups'
 */
function nbCOOH(molecule) {
  let counter = 0;
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    if (molecule.getAtomicNo(i) === 6) {
      let carbonyl = false;
      let hydroxyl = false;
      let carbonOrHydrogen = true;
      for (let neighbour = 0; neighbour < molecule.getConnAtoms(i); neighbour++) {
        const neighbourAtom = molecule.getConnAtom(i, neighbour);
        const neighbourBond = molecule.getConnBond(i, neighbour);
        if (molecule.getAtomicNo(neighbourAtom) === 8) {
          if (molecule.getBondOrder(neighbourBond) === 1 && molecule.getAllHydrogens(neighbourAtom) > 0) {
            // If there is more than a Hydroxyl in the same carbon atom it is not couted as Carboxyl group
            if (hydroxyl) {
              hydroxyl = false;
              break;
            }
            hydroxyl = true;
          } else if (molecule.getBondOrder(neighbourBond) === 2) {
            // If there is more than one carbonyl in the same carbon atom it is not count as Carboxyl group
            if (carbonyl) {
              carbonyl = false;
              break;
            }
            carbonyl = true;
          }
        } else if (
        // If there is not at least one carbon or hydrogen as neighbour atom it is not counted as Carboxyl group
        molecule.getAtomicNo(neighbourAtom) !== 6 && molecule.getAtomicNo(neighbourAtom) !== 1) {
          carbonOrHydrogen = false;
        }
      }
      if (carbonyl && hydroxyl && carbonOrHydrogen) counter++;
    }
  }
  return counter;
}

/**
 * Return the number of Carbonyl groups in a molecule or fragment
 * @param {import('openchemlib').Molecule} molecule
 * @returns {number} 'Number of Carbonyl groups'
 */
function nbCHO(molecule) {
  let counter = 0;
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    // if there is not at least one hydrogen in the carbon atom there can not be a carbonyl group
    if (molecule.getAtomicNo(i) === 6 && molecule.getAllHydrogens(i) > 0) {
      let carbonyl = false;
      let carbonOrHydrogen = true;
      for (let neighbour = 0; neighbour < molecule.getConnAtoms(i); neighbour++) {
        const neighbourAtom = molecule.getConnAtom(i, neighbour);
        const neighbourBond = molecule.getConnBond(i, neighbour);
        if (molecule.getAtomicNo(neighbourAtom) === 8) {
          if (molecule.getBondOrder(neighbourBond) === 2) {
            // If there is more than one carbonyl group on the same carbon atom they are not counted as carbonyl groups
            if (carbonyl) {
              carbonyl = false;
              break;
            }
            carbonyl = true;
          }
        } else if (
        // If there is not at least one carbon or hydrogen as neighbour atom it is not counted as Carbonyl group
        molecule.getAtomicNo(neighbourAtom) !== 6 && molecule.getAtomicNo(neighbourAtom) !== 1) {
          carbonOrHydrogen = false;
        }
      }
      if (carbonyl && carbonOrHydrogen) counter++;
    }
  }
  return counter;
}

/**
 * Return the number of Primary amine groups in a molecule or fragment
 * @param {import('openchemlib').Molecule} molecule
 * @returns {number} 'Number of Primary amine groups'
 */
function nbNH2(molecule) {
  let counter = 0;
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    if (molecule.getAtomicNo(i) === 6) {
      let amine = false;
      let carbonOrHydrogen = true;
      for (let neighbour = 0; neighbour < molecule.getConnAtoms(i); neighbour++) {
        const neighbourAtom = molecule.getConnAtom(i, neighbour);
        const neighbourBond = molecule.getConnBond(i, neighbour);
        if (molecule.getAtomicNo(neighbourAtom) === 7 && molecule.getBondOrder(neighbourBond) === 1 && molecule.getAllHydrogens(neighbourAtom) > 1) {
          // If there is more than a Primary amine in the same carbon atom they are not couted as Primary amines groups
          if (amine) {
            amine = false;
            break;
          }
          amine = true;
        } else if (
        // If there is not at least one carbon or hydrogen as neighbour atom it is not counted as Primary amine group
        molecule.getAtomicNo(neighbourAtom) !== 6 && molecule.getAtomicNo(neighbourAtom) !== 1) {
          carbonOrHydrogen = false;
        }
      }
      if (amine && carbonOrHydrogen) counter++;
    }
  }
  return counter;
}

/**
 * Return the number of Nitrile groups in a molecule or fragment
 * @param {import('openchemlib').Molecule} molecule
 * @returns {number} 'Number of Nitrile groups'
 */
function nbCN(molecule) {
  let counter = 0;
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    if (molecule.getAtomicNo(i) === 6) {
      let cn = false;
      let carbonOrHydrogen = true;
      for (let neighbour = 0; neighbour < molecule.getConnAtoms(i); neighbour++) {
        const neighbourAtom = molecule.getConnAtom(i, neighbour);
        const neighbourBond = molecule.getConnBond(i, neighbour);
        if (molecule.getAtomicNo(neighbourAtom) === 7 && molecule.getBondOrder(neighbourBond) === 3) {
          // If there is more than one Nitrile group in the same carbon atome they are not counted as Nitrile groups
          if (cn) {
            cn = false;
            break;
          }
          cn = true;
        } else if (
        // If there is not at least one carbon or hydrogen as neighbour atom it is not counted as Nitrile group
        molecule.getAtomicNo(neighbourAtom) !== 6 && molecule.getAtomicNo(neighbourAtom) !== 1) {
          carbonOrHydrogen = false;
        }
      }
      if (cn && carbonOrHydrogen) counter++;
    }
  }
  return counter;
}

/**
 * Return the number of labile protons being either on O, N, Br, Cl, F, I or S
 * @param {import('openchemlib').Molecule} molecule
 * @param {object} [options={}]
 * @param {Array<number>} [options.atomicNumbers=[7, 8, 9, 16, 17, 35, 53]] - atomic numbers of the labile protons
 * @returns {number} 'Number of labile protons'
 */
function nbLabileH(molecule, options = {}) {
  const {
    atomicNumbers = [7, 8, 9, 16, 17, 35, 53]
  } = options;
  let counter = 0;
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    if (atomicNumbers.includes(molecule.getAtomicNo(i))) {
      counter += molecule.getAllHydrogens(i);
    }
  }
  return counter;
}

/**
 * Toggle presence of implicity hydrogens on/off
 * @param molecule
 * @param atomID
 */
function toggleHydrogens(molecule, atomID) {
  if (molecule.getImplicitHydrogens(atomID) === 0) {
    const atomsToDelete = [];
    for (let i = 0; i < molecule.getAllConnAtoms(atomID); i++) {
      const connectedAtom = molecule.getConnAtom(atomID, i);
      if (molecule.getAtomicNo(connectedAtom) === 1) {
        atomsToDelete.push(connectedAtom);
      }
    }
    molecule.deleteAtoms(atomsToDelete);
  } else {
    molecule.addImplicitHydrogens(atomID);
  }
}

/**
 * Convert a molecule to a molfile object compatible with the visualizer.
 * @param {import('openchemlib').Molecule} molecule - The molecule to convert.
 * @param {object} [options={}] - Options to control atom highlighting and grouping.
 * @param {boolean} [options.diastereotopic] - If true, group atoms by diastereotopic IDs.
 * @param {boolean} [options.atomMapNo] - If true, group atoms by their atom map number. Atoms with no map number (0) are excluded from highlighting.
 * @param {boolean} [options.customAtomLabel] - If true, group atoms by their custom atom label. Atoms with no custom label are excluded from highlighting.
 * @param {boolean} [options.heavyAtomHydrogen] - If true, copy each hydrogen's highlight label to its parent heavy atom. When used with diastereotopic, implicit hydrogens are added internally to compute their diastereotopic IDs.
 * @param {boolean} [options.collapseHydrogens] - If true, remove explicit hydrogens from the molfile. Implies heavyAtomHydrogen.
 * @returns {{ type: string, value: string, _highlight: Array, _atoms: object }} A molfile object with highlight and atom mapping information.
 */
function toVisualizerMolfile(molecule, options = {}) {
  const {
    diastereotopic,
    atomMapNo,
    customAtomLabel,
    heavyAtomHydrogen,
    collapseHydrogens
  } = options;
  const copyH = heavyAtomHydrogen || collapseHydrogens;
  // Work on a copy to avoid mutating the original molecule.
  // When heavyAtomHydrogen is used with diastereotopic, add implicit H
  // so we can compute their diastereotopic IDs.
  let labelMolecule = molecule.getCompactCopy();
  const {
    Molecule
  } = labelMolecule.getOCL();
  if (heavyAtomHydrogen && diastereotopic) {
    labelMolecule.addImplicitHydrogens();
  }
  labelMolecule.ensureHelperArrays(Molecule.cHelperNeighbours);
  // Phase 1: Label all atoms based on the chosen mode
  // Build groups: label → [atomIndices]
  const groups = {};
  if (diastereotopic) {
    const diaIDs = getDiastereotopicAtomIDs(labelMolecule);
    for (let i = 0; i < diaIDs.length; i++) {
      const label = diaIDs[i];
      if (!groups[label]) {
        groups[label] = [];
      }
      if (!groups[label].includes(i)) {
        groups[label].push(i);
      }
    }
  } else if (customAtomLabel) {
    for (let i = 0; i < labelMolecule.getAllAtoms(); i++) {
      const label = labelMolecule.getAtomCustomLabel(i);
      if (!label) continue;
      if (!groups[label]) {
        groups[label] = [];
      }
      groups[label].push(i);
    }
  } else if (atomMapNo) {
    for (let i = 0; i < labelMolecule.getAllAtoms(); i++) {
      const mapNo = labelMolecule.getAtomMapNo(i);
      if (mapNo === 0) continue;
      if (!groups[mapNo]) {
        groups[mapNo] = [];
      }
      groups[mapNo].push(i);
    }
  } else {
    for (let i = 0; i < labelMolecule.getAllAtoms(); i++) {
      groups[i] = [i];
    }
  }
  // Phase 2: If heavyAtomHydrogen or collapseHydrogens, copy each hydrogen's
  // label entries to its parent heavy atom
  if (copyH) {
    for (const atomIndices of Object.values(groups)) {
      for (const atomIndex of atomIndices) {
        if (labelMolecule.getAtomicNo(atomIndex) !== 1) continue;
        if (labelMolecule.getAllConnAtoms(atomIndex) === 0) continue;
        const heavyAtom = labelMolecule.getConnAtom(atomIndex, 0);
        if (!atomIndices.includes(heavyAtom)) {
          atomIndices.push(heavyAtom);
        }
      }
    }
  }
  // Phase 3: Remove H atoms from groups and remap indices.
  // This runs when collapseHydrogens is set, or when we internally added H
  // for heavyAtomHydrogen with diastereotopic (to restore the original atom count).
  const shouldCollapse = collapseHydrogens || heavyAtomHydrogen && diastereotopic;
  if (shouldCollapse) {
    const totalAtoms = labelMolecule.getAllAtoms();
    const isHydrogen = new Array(totalAtoms).fill(false);
    const atomsToDelete = [];
    for (let i = 0; i < totalAtoms; i++) {
      if (labelMolecule.getAtomicNo(i) === 1) {
        isHydrogen[i] = true;
        atomsToDelete.push(i);
      }
    }
    // Build index remap: old index → new index for non-H atoms
    const indexRemap = new Map();
    let newIdx = 0;
    for (let i = 0; i < totalAtoms; i++) {
      if (!isHydrogen[i]) {
        indexRemap.set(i, newIdx++);
      }
    }
    // Remap atom indices in groups: remove H, remap heavy atoms
    for (const label of Object.keys(groups)) {
      groups[label] = groups[label].filter(i => !isHydrogen[i]).map(i => indexRemap.get(i));
      if (groups[label].length === 0) {
        delete groups[label];
      }
    }
    if (collapseHydrogens) {
      labelMolecule.deleteAtoms(atomsToDelete);
    }
  }
  // Build highlight and atoms from groups
  const highlight = [];
  const atoms = {};
  for (const label of Object.keys(groups)) {
    highlight.push(atomMapNo ? Number(label) : label);
    atoms[label] = groups[label];
  }
  // Use the original molecule for the molfile unless we collapsed H
  const outputMolecule = collapseHydrogens ? labelMolecule : molecule;
  return {
    type: 'mol2d',
    value: outputMolecule.toMolfile(),
    _highlight: highlight,
    _atoms: atoms
  };
}

/**
 * Calculates the path between 2 atoms
 * @param {import('openchemlib').Molecule} molecule
 * @param {number} from - index of the first atom
 * @param {number} to - index of the end atom
 * @param {number} maxLength - maximal length of the path
 */
function getPathAndTorsion(molecule, from, to, maxLength) {
  const originalAtoms = []; // path before renumbering
  molecule.getPath(originalAtoms, from, to, maxLength + 1);
  let torsion;
  if (originalAtoms.length === 4) {
    torsion = molecule.calculateTorsion(originalAtoms);
  }
  return {
    atoms: originalAtoms,
    from,
    to,
    torsion,
    length: originalAtoms.length - 1
  };
}

let fragment$1;
/**
 *
 * @param {import('openchemlib').Molecule} molecule
 * @param {object} [options={}]
 * @param {string} [options.fromLabel='H']
 * @param {string} [options.toLabel='H']
 * @param {number} [options.minLength=1]
 * @param {number} [options.maxLength=4]
 * @param {boolean} [options.withHOSES=false]
 */
function getPathsInfo(molecule, options = {}) {
  const {
    fromLabel = 'H',
    toLabel = 'H',
    minLength = 1,
    maxLength = 4,
    withHOSES = false
  } = options;
  const OCL = molecule.getOCL();
  if (!fragment$1) {
    fragment$1 = new OCL.Molecule(0, 0);
  }
  const fromAtomicNumber = OCL.Molecule.getAtomicNoFromLabel(fromLabel);
  const toAtomicNumber = OCL.Molecule.getAtomicNoFromLabel(toLabel);
  // we need to find all the atoms 'fromLabel' and 'toLabel'
  const atomsInfo = getAtomsInfo(molecule);
  const pathLengthMatrix = getConnectivityMatrix(molecule, {
    pathLength: true
  });
  for (let from = 0; from < molecule.getAllAtoms(); from++) {
    atomsInfo[from].paths = [];
    for (let to = 0; to < molecule.getAllAtoms(); to++) {
      if (from !== to && molecule.getAtomicNo(from) === fromAtomicNumber && molecule.getAtomicNo(to) === toAtomicNumber) {
        const pathLength = pathLengthMatrix[from][to];
        if (pathLength >= minLength && pathLength <= maxLength) {
          if (withHOSES) {
            atomsInfo[from].paths.push(getHoseCodesForPath(molecule, from, to, pathLength));
          } else {
            atomsInfo[from].paths.push(getPathAndTorsion(molecule, from, to, pathLength));
          }
        }
      }
    }
  }
  return atomsInfo;
}

/**
 * Get the shortest path between each pair of atoms in the molecule
 * @param {import('openchemlib').Molecule} molecule
 * @param {object} [options={}]
 * @param {string} [options.fromLabel='H']
 * @param {string} [options.toLabel='H']
 * @param {number} [options.maxLength=4]
 * @returns {Array<Array>} A matrix containing on each cell (i,j) the shortest path from atom i to atom j
 */
function getShortestPaths(molecule, options = {}) {
  const OCL = molecule.getOCL();
  const {
    fromLabel = '',
    toLabel = '',
    maxLength = 3
  } = options;
  const fromAtomicNumber = OCL.Molecule.getAtomicNoFromLabel(fromLabel);
  const toAtomicNumber = OCL.Molecule.getAtomicNoFromLabel(toLabel);
  const nbAtoms = molecule.getAllAtoms();
  const allShortestPaths = new Array(nbAtoms);
  for (let i = 0; i < nbAtoms; i++) {
    allShortestPaths[i] = new Array(nbAtoms);
  }
  for (let from = 0; from < nbAtoms; from++) {
    allShortestPaths[from][from] = [from];
    for (let to = from + 1; to < nbAtoms; to++) {
      if ((fromAtomicNumber === 0 || molecule.getAtomicNo(from) === fromAtomicNumber) && (toAtomicNumber === 0 || molecule.getAtomicNo(to) === toAtomicNumber)) {
        const path = [];
        molecule.getPath(path, from, to, maxLength);
        if (path.length > 0) {
          allShortestPaths[from][to] = path.slice();
          allShortestPaths[to][from] = path.toReversed();
        } else {
          allShortestPaths[from][to] = null;
          allShortestPaths[to][from] = null;
        }
      } else {
        allShortestPaths[from][to] = null;
        allShortestPaths[to][from] = null;
      }
    }
  }
  return allShortestPaths;
}

var papaparse_min$1 = {exports: {}};

/* @license
Papa Parse
v5.5.4
https://github.com/mholt/PapaParse
License: MIT
*/
var papaparse_min = papaparse_min$1.exports;
(function (module, exports) {
  ((e, t) => {
    module.exports = t() ;
  })(papaparse_min, function r() {
    var n = "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== n ? n : {};
    var d,
      s = !n.document && !!n.postMessage,
      a = n.IS_PAPA_WORKER || false,
      o = {},
      h = 0,
      v = {};
    function P(e) {
      return 65279 === e.charCodeAt(0) ? e.slice(1) : e;
    }
    function u(e) {
      this._handle = null, this._finished = false, this._completed = false, this._halted = false, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = true, this._completeResults = {
        data: [],
        errors: [],
        meta: {}
      }, function (e) {
        var t = b(e);
        t.chunkSize = parseInt(t.chunkSize), e.step || e.chunk || (t.chunkSize = null);
        this._handle = new i(t), (this._handle.streamer = this)._config = t;
      }.call(this, e), this.parseChunk = function (t, e) {
        var i = parseInt(this._config.skipFirstNLines) || 0;
        if (this.isFirstChunk && 0 < i) {
          let e = this._config.newline;
          e || (r = this._config.quoteChar || '"', e = this._handle.guessLineEndings(t, r)), t = [...t.split(e).slice(i)].join(e);
        }
        this.isFirstChunk && q(this._config.beforeFirstChunk) && void 0 !== (r = this._config.beforeFirstChunk(t)) && (t = r), this.isFirstChunk = false, this._halted = false;
        var i = this._partialLine + t,
          r = (this._partialLine = "", this._handle.parse(i, this._baseIndex, !this._finished));
        if (!this._handle.paused() && !this._handle.aborted()) {
          t = r.meta.cursor, i = (this._finished || (this._partialLine = i.substring(t - this._baseIndex), this._baseIndex = t), r && r.data && (this._rowCount += r.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview);
          if (a) n.postMessage({
            results: r,
            workerId: v.WORKER_ID,
            finished: i
          });else if (q(this._config.chunk) && !e) {
            if (this._config.chunk(r, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = true);
            this._completeResults = r = void 0;
          }
          return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(r.data), this._completeResults.errors = this._completeResults.errors.concat(r.errors), this._completeResults.meta = r.meta), this._completed || !i || !q(this._config.complete) || r && r.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = true), i || r && r.meta.paused || this._nextChunk(), r;
        }
        this._halted = true;
      }, this._sendError = function (e) {
        q(this._config.error) ? this._config.error(e) : a && this._config.error && n.postMessage({
          workerId: v.WORKER_ID,
          error: e,
          finished: false
        });
      };
    }
    function f(e) {
      var r;
      (e = e || {}).chunkSize || (e.chunkSize = v.RemoteChunkSize), u.call(this, e), this._nextChunk = s ? function () {
        this._readChunk(), this._chunkLoaded();
      } : function () {
        this._readChunk();
      }, this.stream = function (e) {
        this._input = e, this._nextChunk();
      }, this._readChunk = function () {
        if (this._finished) this._chunkLoaded();else {
          if (r = new XMLHttpRequest(), this._config.withCredentials && (r.withCredentials = this._config.withCredentials), s || (r.onload = y(this._chunkLoaded, this), r.onerror = y(this._chunkError, this)), r.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !s), this._config.downloadRequestHeaders) {
            var e,
              t = this._config.downloadRequestHeaders;
            for (e in t) r.setRequestHeader(e, t[e]);
          }
          var i;
          this._config.chunkSize && (i = this._start + this._config.chunkSize - 1, r.setRequestHeader("Range", "bytes=" + this._start + "-" + i));
          try {
            r.send(this._config.downloadRequestBody);
          } catch (e) {
            this._chunkError(e.message);
          }
          s && 0 === r.status && this._chunkError();
        }
      }, this._chunkLoaded = function () {
        4 === r.readyState && (r.status < 200 || 400 <= r.status ? this._chunkError() : (this._start += this._config.chunkSize || r.responseText.length, this._finished = !this._config.chunkSize || this._start >= (e => null !== (e = e.getResponseHeader("Content-Range")) ? parseInt(e.substring(e.lastIndexOf("/") + 1)) : -1)(r), this.parseChunk(r.responseText)));
      }, this._chunkError = function (e) {
        e = r.statusText || e;
        this._sendError(new Error(e));
      };
    }
    function l(e) {
      (e = e || {}).chunkSize || (e.chunkSize = v.LocalChunkSize), u.call(this, e);
      var i,
        r,
        n = "undefined" != typeof FileReader;
      this.stream = function (e) {
        this._input = e, r = e.slice || e.webkitSlice || e.mozSlice, n ? ((i = new FileReader()).onload = y(this._chunkLoaded, this), i.onerror = y(this._chunkError, this)) : i = new FileReaderSync(), this._nextChunk();
      }, this._nextChunk = function () {
        this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
      }, this._readChunk = function () {
        var e = this._input,
          t = (this._config.chunkSize && (t = Math.min(this._start + this._config.chunkSize, this._input.size), e = r.call(e, this._start, t)), i.readAsText(e, this._config.encoding));
        n || this._chunkLoaded({
          target: {
            result: t
          }
        });
      }, this._chunkLoaded = function (e) {
        this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(e.target.result);
      }, this._chunkError = function () {
        this._sendError(i.error);
      };
    }
    function c(e) {
      var i;
      u.call(this, e = e || {}), this.stream = function (e) {
        return i = e, this._nextChunk();
      }, this._nextChunk = function () {
        var e, t;
        if (!this._finished) return e = this._config.chunkSize, i = e ? (t = i.substring(0, e), i.substring(e)) : (t = i, ""), this._finished = !i, this.parseChunk(t);
      };
    }
    function p(e) {
      u.call(this, e = e || {});
      var t = [],
        i = true,
        r = false;
      this.pause = function () {
        u.prototype.pause.apply(this, arguments), this._input.pause();
      }, this.resume = function () {
        u.prototype.resume.apply(this, arguments), this._input.resume();
      }, this.stream = function (e) {
        this._input = e, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
      }, this._checkIsFinished = function () {
        r && 1 === t.length && (this._finished = true);
      }, this._nextChunk = function () {
        this._checkIsFinished(), t.length ? this.parseChunk(t.shift()) : i = true;
      }, this._streamData = y(function (e) {
        try {
          t.push("string" == typeof e ? e : e.toString(this._config.encoding)), i && (i = !1, this._checkIsFinished(), this.parseChunk(t.shift()));
        } catch (e) {
          this._streamError(e);
        }
      }, this), this._streamError = y(function (e) {
        this._streamCleanUp(), this._sendError(e);
      }, this), this._streamEnd = y(function () {
        this._streamCleanUp(), r = true, this._streamData("");
      }, this), this._streamCleanUp = y(function () {
        this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
      }, this);
    }
    function i(m) {
      var n,
        s,
        a,
        t,
        o = Math.pow(2, 53),
        h = -o,
        u = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,
        d = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,
        i = this,
        r = 0,
        f = 0,
        l = false,
        e = false,
        c = [],
        p = {
          data: [],
          errors: [],
          meta: {}
        };
      function y(e) {
        return "greedy" === m.skipEmptyLines ? "" === e.join("").trim() : 1 === e.length && 0 === e[0].length;
      }
      function g() {
        if (p && a && (k("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + v.DefaultDelimiter + "'"), a = false), m.skipEmptyLines && (p.data = p.data.filter(function (e) {
          return !y(e);
        })), _()) {
          if (p) if (Array.isArray(p.data[0])) {
            for (var e = 0; _() && e < p.data.length; e++) p.data[e].forEach(t);
            p.data.splice(0, 1);
          } else p.data.forEach(t);
          function t(e, t) {
            e = P(e), q(m.transformHeader) && (e = m.transformHeader(e, t)), c.push(e);
          }
        }
        function i(e, t) {
          for (var i = m.header ? {} : [], r = 0; r < e.length; r++) {
            var n = r,
              s = e[r],
              s = ((e, t) => (e => (m.dynamicTypingFunction && void 0 === m.dynamicTyping[e] && (m.dynamicTyping[e] = m.dynamicTypingFunction(e)), true === (m.dynamicTyping[e] || m.dynamicTyping)))(e) ? "true" === t || "TRUE" === t || "false" !== t && "FALSE" !== t && ((e => {
                if (u.test(e)) {
                  e = parseFloat(e);
                  if (h < e && e < o) return 1;
                }
              })(t) ? parseFloat(t) : d.test(t) ? new Date(t) : "" === t ? null : t) : t)(n = m.header ? r >= c.length ? "__parsed_extra" : c[r] : n, s = m.transform ? m.transform(s, n) : s);
            "__parsed_extra" === n ? (i[n] = i[n] || [], i[n].push(s)) : i[n] = s;
          }
          return m.header && (r > c.length ? k("FieldMismatch", "TooManyFields", "Too many fields: expected " + c.length + " fields but parsed " + r, f + t) : r < c.length && k("FieldMismatch", "TooFewFields", "Too few fields: expected " + c.length + " fields but parsed " + r, f + t)), i;
        }
        var r;
        p && (m.header || m.dynamicTyping || m.transform) && (r = 1, !p.data.length || Array.isArray(p.data[0]) ? (p.data = p.data.map(i), r = p.data.length) : p.data = i(p.data, 0), m.header && p.meta && (p.meta.fields = c), f += r);
      }
      function _() {
        return m.header && 0 === c.length;
      }
      function k(e, t, i, r) {
        e = {
          type: e,
          code: t,
          message: i
        };
        void 0 !== r && (e.row = r), p.errors.push(e);
      }
      q(m.step) && (t = m.step, m.step = function (e) {
        p = e, _() ? g() : (g(), 0 !== p.data.length && (r += e.data.length, m.preview && r > m.preview ? s.abort() : (p.data = p.data[0], t(p, i))));
      }), this.parse = function (e, t, i) {
        var r = m.quoteChar || '"',
          r = (m.newline || (m.newline = this.guessLineEndings(e, r)), a = false, m.delimiter ? q(m.delimiter) && (m.delimiter = m.delimiter(e), p.meta.delimiter = m.delimiter) : ((r = ((e, t, i, r, n) => {
            var s, a, o, h;
            n = n || [",", "\t", "|", ";", v.RECORD_SEP, v.UNIT_SEP];
            for (var u = 0; u < n.length; u++) {
              for (var d, f = n[u], l = 0, c = 0, p = 0, g = (o = void 0, new E({
                  comments: r,
                  delimiter: f,
                  newline: t,
                  preview: 10
                }).parse(e)), _ = 0; _ < g.data.length; _++) i && y(g.data[_]) ? p++ : (d = g.data[_].length, c += d, void 0 === o ? o = d : 0 < d && (l += Math.abs(d - o), o = d));
              0 < g.data.length && (c /= g.data.length - p), (void 0 === a || l <= a) && (void 0 === h || h < c) && 1.99 < c && (a = l, s = f, h = c);
            }
            return {
              successful: !!(m.delimiter = s),
              bestDelimiter: s
            };
          })(e, m.newline, m.skipEmptyLines, m.comments, m.delimitersToGuess)).successful ? m.delimiter = r.bestDelimiter : (a = true, m.delimiter = v.DefaultDelimiter), p.meta.delimiter = m.delimiter), b(m));
        return m.preview && m.header && r.preview++, n = e, s = new E(r), p = s.parse(n, t, i), g(), l ? {
          meta: {
            paused: true
          }
        } : p || {
          meta: {
            paused: false
          }
        };
      }, this.paused = function () {
        return l;
      }, this.pause = function () {
        l = true, s.abort(), n = q(m.chunk) ? "" : n.substring(s.getCharIndex());
      }, this.resume = function () {
        i.streamer._halted ? (l = false, i.streamer.parseChunk(n, true)) : setTimeout(i.resume, 3);
      }, this.aborted = function () {
        return e;
      }, this.abort = function () {
        e = true, s.abort(), p.meta.aborted = true, q(m.complete) && m.complete(p), n = "";
      }, this.guessLineEndings = function (e, t) {
        e = e.substring(0, 1048576);
        var t = new RegExp(U(t) + "([^]*?)" + U(t), "gm"),
          i = (e = e.replace(t, "")).split("\r"),
          t = e.split("\n"),
          e = 1 < t.length && t[0].length < i[0].length;
        if (1 === i.length || e) return "\n";
        for (var r = 0, n = 0; n < i.length; n++) "\n" === i[n][0] && r++;
        return r >= i.length / 2 ? "\r\n" : "\r";
      };
    }
    function U(e) {
      return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
    }
    function E(C) {
      var S = (C = C || {}).delimiter,
        O = C.newline,
        x = C.comments,
        I = C.step,
        A = C.preview,
        T = C.fastMode,
        D = null,
        L = false,
        F = null == C.quoteChar ? '"' : C.quoteChar,
        j = F;
      if (void 0 !== C.escapeChar && (j = C.escapeChar), ("string" != typeof S || -1 < v.BAD_DELIMITERS.indexOf(S)) && (S = ","), x === S) throw new Error("Comment character same as delimiter");
      true === x ? x = "#" : ("string" != typeof x || -1 < v.BAD_DELIMITERS.indexOf(x)) && (x = false), "\n" !== O && "\r" !== O && "\r\n" !== O && (O = "\n");
      var z = 0,
        M = false;
      this.parse = function (i, t, r) {
        if ("string" != typeof i) throw new Error("Input must be a string");
        var n = i.length,
          e = S.length,
          s = O.length,
          a = x.length,
          o = q(I),
          h = [],
          u = [],
          d = [],
          f = z = 0;
        if (!i) return w();
        if (T || false !== T && -1 === i.indexOf(F)) {
          for (var l = i.split(O), c = 0; c < l.length; c++) {
            if (d = l[c], z += d.length, c !== l.length - 1) z += O.length;else if (r) return w();
            if (!x || d.substring(0, a) !== x) {
              if (o) {
                if (h = [], k(d.split(S)), R(), M) return w();
              } else k(d.split(S));
              if (A && A <= c) return h = h.slice(0, A), w(true);
            }
          }
          return w();
        }
        for (var p = i.indexOf(S, z), g = i.indexOf(O, z), _ = new RegExp(U(j) + U(F), "g"), m = i.indexOf(F, z);;) if (i[z] === F) for (m = z, z++;;) {
          if (-1 === (m = i.indexOf(F, m + 1))) return r || u.push({
            type: "Quotes",
            code: "MissingQuotes",
            message: "Quoted field unterminated",
            row: h.length,
            index: z
          }), E();
          if (m === n - 1) return E(i.substring(z, m).replace(_, F));
          if (F === j && i[m + 1] === j) m++;else if (F === j || 0 === m || i[m - 1] !== j) {
            -1 !== p && p < m + 1 && (p = i.indexOf(S, m + 1));
            var y = v(-1 === (g = -1 !== g && g < m + 1 ? i.indexOf(O, m + 1) : g) ? p : Math.min(p, g));
            if (i.substr(m + 1 + y, e) === S) {
              d.push(i.substring(z, m).replace(_, F)), i[z = m + 1 + y + e] !== F && (m = i.indexOf(F, z)), p = i.indexOf(S, z), g = i.indexOf(O, z);
              break;
            }
            y = v(g);
            if (i.substring(m + 1 + y, m + 1 + y + s) === O) {
              if (d.push(i.substring(z, m).replace(_, F)), b(m + 1 + y + s), p = i.indexOf(S, z), m = i.indexOf(F, z), o && (R(), M)) return w();
              if (A && h.length >= A) return w(true);
              break;
            }
            u.push({
              type: "Quotes",
              code: "InvalidQuotes",
              message: "Trailing quote on quoted field is malformed",
              row: h.length,
              index: z
            }), m++;
          }
        } else if (x && 0 === d.length && i.substring(z, z + a) === x) {
          if (-1 === g) return w();
          z = g + s, g = i.indexOf(O, z), p = i.indexOf(S, z);
        } else if (-1 !== p && (p < g || -1 === g)) d.push(i.substring(z, p)), z = p + e, p = i.indexOf(S, z);else {
          if (-1 === g) break;
          if (d.push(i.substring(z, g)), b(g + s), o && (R(), M)) return w();
          if (A && h.length >= A) return w(true);
        }
        return E();
        function k(e) {
          h.push(e), f = z;
        }
        function v(e) {
          var t = 0;
          return t = -1 !== e && (e = i.substring(m + 1, e)) && "" === e.trim() ? e.length : t;
        }
        function E(e) {
          return r || (void 0 === e && (e = i.substring(z)), d.push(e), z = n, k(d), o && R()), w();
        }
        function b(e) {
          z = e, k(d), d = [], g = i.indexOf(O, z);
        }
        function w(e) {
          if (C.header && !t && h.length && !L) {
            var s = h[0],
              a = Object.create(null),
              o = new Set(s);
            let n = false;
            for (let r = 0; r < s.length; r++) {
              let i = P(s[r]);
              if (a[i = q(C.transformHeader) ? C.transformHeader(i, r) : i]) {
                let e,
                  t = a[i];
                for (; e = i + "_" + t, t++, o.has(e););
                o.add(e), s[r] = e, a[i]++, n = true, (D = null === D ? {} : D)[e] = i;
              } else a[i] = 1, s[r] = i;
              o.add(i);
            }
            n && console.warn("Duplicate headers found and renamed."), L = true;
          }
          return {
            data: h,
            errors: u,
            meta: {
              delimiter: S,
              linebreak: O,
              aborted: M,
              truncated: !!e,
              cursor: f + (t || 0),
              renamedHeaders: D
            }
          };
        }
        function R() {
          I(w()), h = [], u = [];
        }
      }, this.abort = function () {
        M = true;
      }, this.getCharIndex = function () {
        return z;
      };
    }
    function g(e) {
      var t = e.data,
        i = o[t.workerId],
        r = false;
      if (t.error) i.userError(t.error, t.file);else if (t.results && t.results.data) {
        var n = {
          abort: function () {
            r = true, _(t.workerId, {
              data: [],
              errors: [],
              meta: {
                aborted: true
              }
            });
          },
          pause: m,
          resume: m
        };
        if (q(i.userStep)) {
          for (var s = 0; s < t.results.data.length && (i.userStep({
            data: t.results.data[s],
            errors: t.results.errors,
            meta: t.results.meta
          }, n), !r); s++);
          delete t.results;
        } else q(i.userChunk) && (i.userChunk(t.results, n, t.file), delete t.results);
      }
      t.finished && !r && _(t.workerId, t.results);
    }
    function _(e, t) {
      var i = o[e];
      q(i.userComplete) && i.userComplete(t), i.terminate(), delete o[e];
    }
    function m() {
      throw new Error("Not implemented.");
    }
    function b(e) {
      if ("object" != typeof e || null === e) return e;
      var t,
        i = Array.isArray(e) ? [] : {};
      for (t in e) i[t] = b(e[t]);
      return i;
    }
    function y(e, t) {
      return function () {
        e.apply(t, arguments);
      };
    }
    function q(e) {
      return "function" == typeof e;
    }
    return v.parse = function (e, t) {
      var i = (t = t || {}).dynamicTyping || false;
      q(i) && (t.dynamicTypingFunction = i, i = {});
      if (t.dynamicTyping = i, t.transform = !!q(t.transform) && t.transform, !t.worker || !v.WORKERS_SUPPORTED) return i = null, v.NODE_STREAM_INPUT, "string" == typeof e ? (e = P(e), i = new (t.download ? f : c)(t)) : true === e.readable && q(e.read) && q(e.on) ? i = new p(t) : (n.File && e instanceof File || e instanceof Object) && (i = new l(t)), i.stream(e);
      (i = (() => {
        var e;
        return !!v.WORKERS_SUPPORTED && (e = (() => {
          var e = n.URL || n.webkitURL || null,
            t = r.toString();
          return v.BLOB_URL || (v.BLOB_URL = e.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", t, ")();"], {
            type: "text/javascript"
          })));
        })(), (e = new n.Worker(e)).onmessage = g, e.id = h++, o[e.id] = e);
      })()).userStep = t.step, i.userChunk = t.chunk, i.userComplete = t.complete, i.userError = t.error, t.step = q(t.step), t.chunk = q(t.chunk), t.complete = q(t.complete), t.error = q(t.error), delete t.worker, i.postMessage({
        input: e,
        config: t,
        workerId: i.id
      });
    }, v.unparse = function (e, t) {
      var s = false,
        _ = true,
        m = ",",
        y = "\r\n",
        a = '"',
        o = a + a,
        i = false,
        r = null,
        h = false,
        u = ((() => {
          if ("object" == typeof t) {
            if ("string" != typeof t.delimiter || v.BAD_DELIMITERS.filter(function (e) {
              return -1 !== t.delimiter.indexOf(e);
            }).length || (m = t.delimiter), "boolean" != typeof t.quotes && "function" != typeof t.quotes && !Array.isArray(t.quotes) || (s = t.quotes), "boolean" != typeof t.skipEmptyLines && "string" != typeof t.skipEmptyLines || (i = t.skipEmptyLines), "string" == typeof t.newline && (y = t.newline), "string" == typeof t.quoteChar && (a = t.quoteChar, o = a + a), "boolean" == typeof t.header && (_ = t.header), Array.isArray(t.columns)) {
              if (0 === t.columns.length) throw new Error("Option columns is empty");
              r = t.columns;
            }
            void 0 !== t.escapeChar && (o = t.escapeChar + a), t.escapeFormulae instanceof RegExp ? h = t.escapeFormulae : "boolean" == typeof t.escapeFormulae && t.escapeFormulae && (h = /^[=+\-@\t\r].*$/);
          }
        })(), new RegExp(U(a), "g"));
      "string" == typeof e && (e = JSON.parse(e));
      if (Array.isArray(e)) {
        if (!e.length || Array.isArray(e[0])) return n(null, e, i);
        if ("object" == typeof e[0]) return n(r || Object.keys(e[0]), e, i);
      } else if ("object" == typeof e) return "string" == typeof e.data && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || r), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : "object" == typeof e.data[0] ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || "object" == typeof e.data[0] || (e.data = [e.data])), n(e.fields || [], e.data || [], i);
      throw new Error("Unable to serialize unrecognized input");
      function n(e, t, i) {
        var r = "",
          n = ("string" == typeof e && (e = JSON.parse(e)), "string" == typeof t && (t = JSON.parse(t)), Array.isArray(e) && 0 < e.length),
          s = !Array.isArray(t[0]);
        if (n && _) {
          for (var a = 0; a < e.length; a++) 0 < a && (r += m), r += k(e[a], a);
          0 < t.length && (r += y);
        }
        for (var o = 0; o < t.length; o++) {
          var h = (n ? e : t[o]).length,
            u = false,
            d = n ? 0 === Object.keys(t[o]).length : 0 === t[o].length;
          if (i && !n && (u = "greedy" === i ? "" === t[o].join("").trim() : 1 === t[o].length && 0 === t[o][0].length), "greedy" === i && n) {
            for (var f = [], l = 0; l < h; l++) {
              var c = s ? e[l] : l;
              f.push(t[o][c]);
            }
            u = "" === f.join("").trim();
          }
          if (!u) {
            for (var p = 0; p < h; p++) {
              0 < p && !d && (r += m);
              var g = n && s ? e[p] : p;
              r += k(t[o][g], p);
            }
            o < t.length - 1 && (!i || 0 < h && !d) && (r += y);
          }
        }
        return r;
      }
      function k(e, t) {
        var i, r, n;
        return null == e ? "" : e.constructor === Date ? JSON.stringify(e).slice(1, 25) : (n = false, h && "string" == typeof e && h.test(e) && (e = "'" + e, n = true), r = (i = e.toString()).replace(u, o), (n = n || true === s || "function" == typeof s && s(e, t) || Array.isArray(s) && s[t] || ((e, t) => {
          for (var i = 0; i < t.length; i++) if (-1 < e.indexOf(t[i])) return true;
          return false;
        })(r, v.BAD_DELIMITERS) || -1 < r.indexOf(m) || -1 < i.indexOf(a) || " " === r.charAt(0) || " " === r.charAt(r.length - 1)) ? a + r + a : r);
      }
    }, v.RECORD_SEP = String.fromCharCode(30), v.UNIT_SEP = String.fromCharCode(31), v.BYTE_ORDER_MARK = "\ufeff", v.BAD_DELIMITERS = ["\r", "\n", '"', v.BYTE_ORDER_MARK], v.WORKERS_SUPPORTED = !s && !!n.Worker, v.NODE_STREAM_INPUT = 1, v.LocalChunkSize = 10485760, v.RemoteChunkSize = 5242880, v.DefaultDelimiter = ",", v.Parser = E, v.ParserHandle = i, v.NetworkStreamer = f, v.FileStreamer = l, v.StringStreamer = c, v.ReadableStreamStreamer = p, n.jQuery && ((d = n.jQuery).fn.parse = function (o) {
      var i = o.config || {},
        h = [];
      return this.each(function (e) {
        if (!("INPUT" === d(this).prop("tagName").toUpperCase() && "file" === d(this).attr("type").toLowerCase() && n.FileReader) || !this.files || 0 === this.files.length) return true;
        for (var t = 0; t < this.files.length; t++) h.push({
          file: this.files[t],
          inputElem: this,
          instanceConfig: d.extend({}, i)
        });
      }), e(), this;
      function e() {
        if (0 === h.length) q(o.complete) && o.complete();else {
          var e,
            t,
            i,
            r,
            n = h[0];
          if (q(o.before)) {
            var s = o.before(n.file, n.inputElem);
            if ("object" == typeof s) {
              if ("abort" === s.action) return e = "AbortError", t = n.file, i = n.inputElem, r = s.reason, void (q(o.error) && o.error({
                name: e
              }, t, i, r));
              if ("skip" === s.action) return void u();
              "object" == typeof s.config && (n.instanceConfig = d.extend(n.instanceConfig, s.config));
            } else if ("skip" === s) return void u();
          }
          var a = n.instanceConfig.complete;
          n.instanceConfig.complete = function (e) {
            q(a) && a(e, n.file, n.inputElem), u();
          }, v.parse(n.file, n.instanceConfig);
        }
      }
      function u() {
        h.splice(0, 1), e();
      }
    }), a && (n.onmessage = function (e) {
      e = e.data;
      void 0 === v.WORKER_ID && e && (v.WORKER_ID = e.workerId);
      "string" == typeof e.input ? n.postMessage({
        workerId: v.WORKER_ID,
        results: v.parse(e.input, e.config),
        finished: true
      }) : (n.File && e.input instanceof File || e.input instanceof Object) && (e = v.parse(e.input, e.config)) && n.postMessage({
        workerId: v.WORKER_ID,
        results: e,
        finished: true
      });
    }), (f.prototype = Object.create(u.prototype)).constructor = f, (l.prototype = Object.create(u.prototype)).constructor = l, (c.prototype = Object.create(c.prototype)).constructor = c, (p.prototype = Object.create(u.prototype)).constructor = p, v;
  });
})(papaparse_min$1);
var papaparse_minExports = papaparse_min$1.exports;
var Papa = /*@__PURE__*/getDefaultExportFromCjs(papaparse_minExports);

function getMoleculeCreators(OCL) {
  const fields = new Map([['oclid', OCL.Molecule.fromIDCode], ['idcode', OCL.Molecule.fromIDCode], ['smiles', OCL.Molecule.fromSmiles], ['molfile', OCL.Molecule.fromMolfile], ['smarts', smarts => {
    const smilesParser = new OCL.SmilesParser({
      smartsMode: 'smarts'
    });
    return smilesParser.parseMolecule(smarts);
  }]]);
  return fields;
}

const defaultCSVOptions = {
  header: true,
  dynamicTyping: true,
  skipEmptyLines: true
};
async function appendCSV(moleculesDB, csv, options = {}) {
  const {
    onStep
  } = options;
  csv = ensureString(csv);
  const moleculeCreators = getMoleculeCreators(moleculesDB.OCL);
  if (typeof csv !== 'string') {
    throw new TypeError('csv must be a string');
  }
  options = {
    ...defaultCSVOptions,
    ...options
  };
  const parsed = Papa.parse(csv, options);
  const fields = parsed.meta.fields;
  const stats = new Array(fields.length);
  const firstElement = parsed.data[0];
  let moleculeCreator, moleculeField;
  for (let i = 0; i < fields.length; i++) {
    stats[i] = {
      label: fields[i],
      isNumeric: typeof firstElement[fields[i]] === 'number'
    };
    const lowerField = fields[i].toLowerCase();
    if (moleculeCreators.has(lowerField)) {
      moleculeCreator = moleculeCreators.get(lowerField);
      moleculeField = fields[i];
    }
  }
  if (!moleculeCreator) {
    throw new Error('this document does not contain any molecule field');
  }
  for (let i = 0; i < parsed.data.length; i++) {
    moleculesDB.pushEntry(moleculeCreator(parsed.data[i][moleculeField]), parsed.data[i]);
    if (onStep) {
      // eslint-disable-next-line no-await-in-loop
      await onStep(i + 1, parsed.data.length);
    }
  }
}

function appendColor(moleculesDB, options = {}) {
  const {
    dataLabel,
    propertyLabel,
    minValue,
    maxValue,
    minHue = 0,
    maxHue = 360,
    saturation = 65,
    lightness = 65,
    colorLabel = 'color'
  } = options;
  const db = moleculesDB.getDB();
  let values;
  if (dataLabel) {
    values = db.flatMap(result => result.data.map(datum => ({
      value: datum[dataLabel],
      data: datum
    })));
  } else if (propertyLabel) {
    values = db.flatMap(result => result.data.map(datum => ({
      value: result.properties[propertyLabel],
      data: datum
    })));
  } else {
    values = db.flatMap(result => result.data.map(datum => ({
      value: undefined,
      data: datum
    })));
  }
  if (minValue !== undefined) {
    for (const value of values) {
      if (value.value !== undefined && value.value < minValue) {
        value.value = minValue;
      }
    }
  }
  if (maxValue !== undefined) {
    for (const value of values) {
      if (value.value !== undefined && value.value > maxValue) {
        value.value = maxValue;
      }
    }
  }
  const definedValues = values.filter(value => value.value !== undefined);
  const min = Math.min(...definedValues.map(value => value.value));
  const max = Math.max(...definedValues.map(value => value.value));
  for (const value of values) {
    if (value.value !== undefined) {
      value.data[colorLabel] = `hsl(${Math.floor((value.value - min) / (max - min) * (maxHue - minHue) + minHue)},${saturation}%,${lightness}%)`;
    } else {
      value.data.color = 'black';
    }
  }
}

var __defProp$1 = Object.defineProperty;
var __name = (target, value) => __defProp$1(target, "name", {
  value,
  configurable: true
});

// index.ts
var isObject = /* @__PURE__ */__name(v => v !== null && typeof v === "object", "isObject");
var join = /* @__PURE__ */__name((segs, joinChar, options) => {
  if (typeof options.join === "function") {
    return options.join(segs);
  }
  return segs[0] + joinChar + segs[1];
}, "join");
var split = /* @__PURE__ */__name((path, splitChar, options) => {
  if (typeof options.split === "function") {
    return options.split(path);
  }
  return path.split(splitChar);
}, "split");
var isValid = /* @__PURE__ */__name((key, target = {}, options) => {
  if (typeof options?.isValid === "function") {
    return options.isValid(key, target);
  }
  return true;
}, "isValid");
var isValidObject = /* @__PURE__ */__name(v => {
  return isObject(v) || typeof v === "function";
}, "isValidObject");
var getValue = /* @__PURE__ */__name((target, path, options = {}) => {
  if (!isObject(options)) {
    options = {
      default: options
    };
  }
  if (!isValidObject(target)) {
    return typeof options.default !== "undefined" ? options.default : target;
  }
  if (typeof path === "number") {
    path = String(path);
  }
  const pathIsArray = Array.isArray(path);
  const pathIsString = typeof path === "string";
  const splitChar = options.separator || ".";
  const joinChar = options.joinChar || (typeof splitChar === "string" ? splitChar : ".");
  if (!pathIsString && !pathIsArray) {
    return target;
  }
  let value = target[path];
  if (value === void 0 && typeof target.get === "function") {
    value = target.get(path);
  }
  if (value !== void 0) {
    return isValid(path, target, options) ? value : options.default;
  }
  const segs = pathIsArray ? path : split(path, splitChar, options);
  const len = segs.length;
  let idx = 0;
  do {
    let prop = segs[idx];
    if (typeof prop !== "string") {
      prop = String(prop);
    }
    while (prop && prop.slice(-1) === "\\") {
      prop = join([prop.slice(0, -1), segs[++idx] || ""], joinChar, options);
    }
    value = target[prop];
    if (value === void 0 && typeof target.get === "function") {
      value = target.get(prop);
    }
    if (value !== void 0) {
      if (!isValid(prop, target, options)) {
        return options.default;
      }
      target = value;
    } else {
      let hasProp = false;
      let n = idx + 1;
      while (n < len) {
        prop = join([prop, segs[n++]], joinChar, options);
        value = target[prop];
        if (value === void 0 && typeof target.get === "function") {
          value = target.get(prop);
        }
        if (hasProp = value !== void 0) {
          if (!isValid(prop, target, options)) {
            return options.default;
          }
          target = value;
          idx = n - 1;
          break;
        }
      }
      if (!hasProp) {
        return options.default;
      }
    }
  } while (++idx < len && isValidObject(target));
  if (idx === len) {
    return target;
  }
  return options.default;
}, "getValue");
var index_default = getValue;
/*!
 * get-value <https://github.com/jonschlinkert/get-value>
 *
 * Copyright (c) 2014-present, Jon Schlinkert.
 * Released under the MIT License.
 */

/**
 * Append an array of entries to the current database. An entry is an object that by default should contain a 'ocl' property containing idCode and optionally index and coordinates
 * @param {*} moleculesDB
 * @param {object[]} entries
 * @param {object} [options={}]
 * @param {string} [options.idCodePath='ocl.idCode']
 * @param {string} [options.indexPath='ocl.index']
 * @param {string} [options.coordinatesPath='ocl.coordinates']
 * @param {string} [options.mwPath='mw']
 * @param {string} [options.smilesPath]
 * @param {string} [options.molfilePath]
 * @param {Function} [options.onStep] - call back to execute after each molecule
 * @returns
 */
async function appendEntries(moleculesDB, entries, options = {}) {
  const {
    onStep,
    idCodePath = 'ocl.idCode',
    indexPath = 'ocl.index',
    coordinatesPath = 'ocl.coordinates',
    mwPath = 'mw',
    smilesPath,
    molfilePath
  } = options;
  const Molecule = moleculesDB.OCL.Molecule;
  for (let i = 0; i < entries.length; i++) {
    let idCode;
    const entry = entries[i];
    let molecule;
    if (smilesPath) {
      molecule = Molecule.fromSmiles(index_default(entry, smilesPath));
    }
    if (molfilePath && !molecule) {
      molecule = Molecule.fromMolfile(index_default(entry, molfilePath));
    }
    if (!molecule) {
      idCode = index_default(entry, idCodePath);
      if (idCode) {
        const coordinates = index_default(entry, coordinatesPath);
        molecule = Molecule.fromIDCode(idCode, coordinates || false);
      }
    }
    const index = index_default(entry, indexPath);
    const mw = index_default(entry, mwPath);
    if (onStep) {
      // eslint-disable-next-line no-await-in-loop
      await onStep(i + 1, entries.length);
    }
    if (!moleculesDB.keepEmptyMolecules && (!molecule || molecule.getAllAtoms() === 0)) {
      continue;
    } else if (!molecule) {
      molecule = new moleculesDB.OCL.Molecule(0, 0);
    }
    if (molecule) {
      moleculesDB.pushEntry(molecule, entry, {
        index,
        mw
      });
    }
  }
}

/**
 * Get the [start, end] boundaries of each SDF entry in a string.
 *
 * Uses `indexOf` for fast splitting without regex overhead.
 * @param string - The full SDF string.
 * @param substring - The delimiter to search for (e.g. `'\n$$$$'`).
 * @param eol - The end-of-line character used to skip past the delimiter line.
 * @returns An array of `[start, end]` index pairs, one per SDF entry.
 */
function getEntriesBoundaries(string, substring, eol) {
  const res = [];
  let previous = 0;
  let next = 0;
  while (next !== -1) {
    next = string.indexOf(substring, previous);
    if (next !== -1) {
      res.push([previous, next]);
      const nextMatch = string.indexOf(eol, next + substring.length);
      if (nextMatch === -1) {
        next = -1;
      } else {
        previous = nextMatch + eol.length;
        next = previous;
      }
    } else {
      res.push([previous, string.length]);
    }
  }
  return res;
}

/**
 * Parse a single SDF entry string into a molecule object.
 * @param sdfPart - A single SDF record (everything before the `$$$$` line).
 * @param labels - Shared label tracking object, mutated in place.
 * @param currentLabels - Array to collect label names found in this entry.
 * @param options - Resolved parse options.
 * @returns The molecule object, or `undefined` if the entry is too short.
 */
function getMolecule$1(sdfPart, labels, currentLabels, options) {
  const {
    eol,
    dynamicTyping,
    include,
    exclude,
    modifiers,
    forEach
  } = options;
  const parts = sdfPart.split(`${eol}>`);
  if (parts.length === 0 || parts[0].length <= 5) return undefined;
  const molecule = {
    molfile: parts[0] + eol
  };
  for (let j = 1; j < parts.length; j++) {
    const lines = parts[j].split(eol);
    const from = lines[0].indexOf('<');
    const to = lines[0].indexOf('>');
    const label = lines[0].slice(from + 1, to);
    currentLabels.push(label);
    if (!labels[label]) {
      labels[label] = {
        counter: 0,
        isNumeric: dynamicTyping,
        keep: false
      };
      if (!exclude?.includes(label) && (!include || include.includes(label))) {
        labels[label].keep = true;
        if (modifiers[label]) labels[label].modifier = modifiers[label];
        if (forEach[label]) labels[label].forEach = forEach[label];
      }
    }
    if (labels[label].keep) {
      for (let k = 1; k < lines.length - 1; k++) {
        if (molecule[label]) {
          molecule[label] = `${molecule[label]}${eol}${lines[k]}`;
        } else {
          molecule[label] = lines[k];
        }
      }
      if (labels[label].modifier) {
        const modifiedValue = labels[label].modifier(molecule[label]);
        if (modifiedValue === undefined || modifiedValue === null) {
          // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
          delete molecule[label];
        } else {
          molecule[label] = modifiedValue;
        }
      }
      if (labels[label].isNumeric && (!Number.isFinite(+molecule[label]) || molecule[label].match(/^0[0-9]/))) {
        labels[label].isNumeric = false;
      }
    }
  }
  return molecule;
}

/**
 * Synchronously parse an SDF file into an array of molecule objects.
 * @param sdf - The SDF content as a string, `ArrayBuffer`, or `ArrayBufferView`.
 * @param options - Parsing options.
 * @returns A {@link ParseResult} containing molecules and statistics.
 * @example
 * ```ts
 * import { readFileSync } from 'node:fs';
 * import { parse } from 'sdf-parser';
 *
 * const sdf = readFileSync('compounds.sdf', 'utf8');
 * const { molecules, statistics } = parse(sdf);
 * ```
 */
function parse$1(sdf, options = {}) {
  options = {
    ...options
  };
  if (options.modifiers === undefined) options.modifiers = {};
  if (options.forEach === undefined) options.forEach = {};
  if (options.dynamicTyping === undefined) options.dynamicTyping = true;
  // ensureString converts ArrayBuffer/ArrayBufferView to string
  const sdfString = ensureString(sdf);
  if (typeof sdfString !== 'string') {
    throw new TypeError('Parameter "sdf" must be a string');
  }
  if (options.eol === undefined) {
    options.eol = '\n';
    if (!options.mixedEOL && sdfString.slice(0, 1000).includes('\r\n')) {
      options.eol = '\r\n';
    }
  }
  let workingSdf = sdfString;
  if (options.mixedEOL) {
    workingSdf = workingSdf.replaceAll('\r\n', '\n');
  }
  const eol = options.eol;
  const modifiers = options.modifiers;
  const forEachMap = options.forEach;
  const dynamicTyping = options.dynamicTyping;
  const entriesBoundaries = getEntriesBoundaries(workingSdf, `${eol}$$$$`, eol);
  const molecules = [];
  const labels = {};
  const start = Date.now();
  for (const boundary of entriesBoundaries) {
    const sdfPart = workingSdf.slice(...boundary);
    if (sdfPart.length < 40) continue;
    const currentLabels = [];
    const molecule = getMolecule$1(sdfPart, labels, currentLabels, {
      eol,
      dynamicTyping,
      modifiers,
      forEach: forEachMap,
      include: options.include,
      exclude: options.exclude
    });
    if (!molecule) continue;
    if (!options.filter || options.filter(molecule)) {
      molecules.push(molecule);
      for (const label of currentLabels) {
        labels[label].counter++;
      }
    }
  }
  // Convert all numeric fields and compute min/max
  for (const label in labels) {
    const currentLabel = labels[label];
    if (currentLabel.isNumeric) {
      currentLabel.minValue = Infinity;
      currentLabel.maxValue = -Infinity;
      for (const molecule of molecules) {
        if (molecule[label]) {
          const value = Number.parseFloat(molecule[label]);
          molecule[label] = value;
          if (value > (currentLabel.maxValue ?? -Infinity)) {
            currentLabel.maxValue = value;
          }
          if (value < (currentLabel.minValue ?? Infinity)) {
            currentLabel.minValue = value;
          }
        }
      }
    }
  }
  for (const key in labels) {
    labels[key].always = labels[key].counter === molecules.length;
  }
  const statistics = [];
  for (const key in labels) {
    const info = labels[key];
    statistics.push({
      label: key,
      counter: info.counter,
      isNumeric: info.isNumeric,
      keep: info.keep,
      minValue: info.minValue,
      maxValue: info.maxValue,
      always: info.always ?? false
    });
  }
  return {
    time: Date.now() - start,
    molecules,
    labels: Object.keys(labels),
    statistics
  };
}

async function appendSDF(moleculesDB, sdf, options = {}) {
  const {
    onStep,
    dynamicTyping,
    mixedEOL = true,
    eol
  } = options;
  sdf = ensureString(sdf);
  if (typeof sdf !== 'string') {
    throw new TypeError('sdf must be a string');
  }
  const parsed = parse$1(sdf, {
    dynamicTyping,
    mixedEOL,
    eol
  });
  for (let i = 0; i < parsed.molecules.length; i++) {
    const molecule = parsed.molecules[i];
    moleculesDB.pushEntry(moleculesDB.OCL.Molecule.fromMolfile(molecule.molfile), molecule);
    if (onStep) {
      // eslint-disable-next-line no-await-in-loop
      await onStep(i + 1, parsed.molecules.length);
    }
  }
}

async function appendSmilesList(moleculesDB, text, options = {}) {
  const {
    onStep
  } = options;
  text = ensureString(text);
  if (typeof text !== 'string') {
    throw new TypeError('text must be a string');
  }
  const smilesArray = text.split(/\r?\n/).map(line => line.trim()).filter(Boolean);
  for (let i = 0; i < smilesArray.length; i++) {
    const oneSmiles = smilesArray[i];
    moleculesDB.pushEntry(moleculesDB.OCL.Molecule.fromSmiles(oneSmiles));
    if (onStep) {
      // eslint-disable-next-line no-await-in-loop
      await onStep(i + 1, smilesArray.length);
    }
  }
}

/**
 *
 * @param {MoleculesDB} moleculesDB
 * @param {import('openchemlib').Molecule} molecule
 * @param {object} data
 * @param {object} [moleculeInfo]
 * @param {string} [moleculeInfo.idCode]
 * @param {number[]} [moleculeInfo.index]
 */
function pushEntry(moleculesDB, molecule, data = {}, moleculeInfo = {}) {
  // the following line could be the source of problems if the idCode version
  // changes
  const moleculeIDCode = getMoleculeIDCode(molecule, moleculeInfo);
  const id = moleculeIDCode || crypto.randomUUID();
  let entry = moleculesDB.db[id];
  if (!entry) {
    // a new molecule
    // ensure helper arrays needed for substructure search
    molecule.ensureHelperArrays(moleculesDB.OCL.Molecule.cHelperRings);
    let index;
    if (!moleculeInfo.index) {
      index = molecule.getIndex();
    } else {
      index = moleculeInfo.index;
    }
    const molecularFormula = molecule.getMolecularFormula();
    entry = {
      molecule,
      properties: {
        mw: molecularFormula.relativeWeight,
        em: molecularFormula.absoluteWeight,
        mf: molecularFormula.formula
      },
      data: [],
      idCode: moleculeIDCode,
      index
    };
    moleculesDB.db[id] = entry;
    if (moleculesDB.computeProperties) {
      const properties = new moleculesDB.OCL.MoleculeProperties(molecule);
      entry.properties = {
        ...entry.properties,
        acceptorCount: properties.acceptorCount,
        donorCount: properties.donorCount,
        logP: properties.logP,
        logS: properties.logS,
        polarSurfaceArea: properties.polarSurfaceArea,
        rotatableBondCount: properties.rotatableBondCount,
        stereoCenterCount: properties.stereoCenterCount
      };
    }
    updateStatistics(moleculesDB.calculatedStatistics, entry.properties);
  }
  entry.data.push(data);
  updateStatistics(moleculesDB.dataStatistics, data);
}
function updateStatistics(statistics, data) {
  for (const key in data) {
    const value = data[key];
    if (!statistics.has(key)) {
      statistics.set(key, {
        counter: 0,
        kind: typeof value
      });
    }
    const stat = statistics.get(key);
    stat.counter++;
    if (stat.kind !== typeof value) {
      stat.kind = 'mixed';
    }
  }
}
function getMoleculeIDCode(molecule, moleculeInfo) {
  let idCode = moleculeInfo.idCode;
  if (!idCode) {
    idCode = molecule.getIDCode();
  }
  if (idCode === 'd@') return ''; // empty molecule
  return idCode;
}

function pushMoleculeInfo(moleculesDB, moleculeInfo, data = {}) {
  if (typeof moleculeInfo !== 'object') {
    throw new Error('pushMoleculeInfo requires an object as first parameter');
  }
  const Molecule = moleculesDB.OCL.Molecule;
  let molecule;
  if (moleculeInfo.molfile) {
    molecule = Molecule.fromMolfile(moleculeInfo.molfile);
  }
  if (moleculeInfo.smiles) molecule = Molecule.fromSmiles(moleculeInfo.smiles);
  if (moleculeInfo.idCode) {
    if (moleculesDB.db[moleculeInfo.idCode]) {
      molecule = moleculesDB.db[moleculeInfo.idCode].molecule;
    } else {
      molecule = Molecule.fromIDCode(moleculeInfo.idCode, moleculeInfo.coordinates || false);
    }
  }
  if (molecule) {
    moleculesDB.pushEntry(molecule, data, moleculeInfo);
  }
}

async function noWait() {
  return new Promise(resolve => {
    if (typeof setImmediate === 'function') {
      setImmediate(() => resolve());
    } else {
      // didn't find a better way to do it in the browser
      setTimeout(() => resolve(), 0);
    }
  });
}

class AbortError extends Error {
  name = 'AbortError';
  code = 20;
}
function getQuery(moleculesDB, query, options) {
  const {
    format = 'idCode'
  } = options;
  if (typeof query === 'string') {
    const moleculeCreators = getMoleculeCreators(moleculesDB.OCL);
    query = moleculeCreators.get(format.toLowerCase())(query);
  } else if (!(query instanceof moleculesDB.OCL.Molecule)) {
    throw new TypeError('toSearch must be a Molecule or string');
  }
  return query;
}
/**
 * Internal function to search in the database
 * @param {import('../MoleculesDB.js').MoleculesDB} moleculesDB
 * @param {string} query
 * @param {Record<string, any>} [options={}]
 * @param {'exact'|'substructure'|'substructureOR'|'similarity'} [options.mode='substructure']
 * @returns
 */
function search$4(moleculesDB, query = '', options = {}) {
  const {
    mode = 'substructure'
  } = options;
  query = getQuery(moleculesDB, query, options);
  let result;
  switch (mode.toLowerCase()) {
    case 'exact':
      result = exactSearch(moleculesDB, query);
      break;
    case 'exactnostereo':
      result = exactSearchNoStereo(moleculesDB, query);
      break;
    case 'substructure':
      result = substructureSearch(moleculesDB, query);
      break;
    case 'substructureor':
      result = substructureSearchOR(moleculesDB, query);
      break;
    case 'similarity':
      result = similaritySearch(moleculesDB, query);
      break;
    default:
      throw new Error(`unknown search mode: ${options.mode}`);
  }
  return processResult(result, options);
}
async function searchAsync(moleculesDB, query = '', options = {}) {
  const {
    mode = 'substructure'
  } = options;
  query = getQuery(moleculesDB, query, options);
  let result;
  switch (mode.toLowerCase()) {
    case 'exact':
      result = exactSearch(moleculesDB, query);
      break;
    case 'exactnostereo':
      result = exactSearchNoStereo(moleculesDB, query);
      break;
    case 'substructure':
      result = await subStructureSearchAsync(moleculesDB, query, options);
      break;
    case 'substructureor':
      result = substructureSearchOR(moleculesDB, query);
      break;
    case 'similarity':
      result = similaritySearch(moleculesDB, query);
      break;
    default:
      throw new Error(`unknown search mode: ${options.mode}`);
  }
  return processResult(result, options);
}
/**
 * Search for an exact match in the database including stereochemistry
 * @param {import('../MoleculesDB.js').MoleculesDB} moleculesDB
 * @param {import('openchemlib').Molecule} query
 * @returns
 */
function exactSearch(moleculesDB, query) {
  query = query.getCompactCopy();
  query.setFragment(false);
  const queryIDCode = query.getIDCode();
  const searchResult = moleculesDB.db[queryIDCode] ? [moleculesDB.db[queryIDCode]] : [];
  return searchResult;
}
/**
 * Search for an exact match without stereo information
 * @param {import('../MoleculesDB.js').MoleculesDB} moleculesDB
 * @param {import('openchemlib').Molecule}  query
 * @returns
 */
function exactSearchNoStereo(moleculesDB, query) {
  query = query.getCompactCopy();
  query.setFragment(false);
  query.stripStereoInformation();
  const queryIDCode = query.getIDCode();
  // first filter by molecular weight
  const mw = query.getMolecularFormula().relativeWeight;
  const results = [];
  for (const idCode in moleculesDB.db) {
    const entry = moleculesDB.db[idCode];
    if (mw !== entry.properties.mw) {
      continue;
    }
    const candidateMolecule = entry.molecule.getCompactCopy();
    candidateMolecule.stripStereoInformation();
    const candidateIDCode = candidateMolecule.getIDCode();
    if (candidateIDCode !== queryIDCode) {
      continue;
    }
    results.push(entry);
  }
  return results;
}
/**
 * No atoms in the query, we return all the molecules
 * @param {import('../MoleculesDB.js').MoleculesDB} moleculesDB
 * @param {import('openchemlib').Molecule} query
 * @returns
 */
function substructureSearchBegin(moleculesDB, query) {
  const searchResult = [];
  if (query.getAllAtoms() === 0) {
    for (const idCode in moleculesDB.db) {
      searchResult.push(moleculesDB.db[idCode]);
    }
  }
  return {
    searchResult
  };
}
function substructureSearchEnd(searchResult, queryMW) {
  searchResult.sort((a, b) => {
    return Math.abs(queryMW - a.properties.mw) - Math.abs(queryMW - b.properties.mw);
  });
  return searchResult;
}
/**
 * Search by substructure in the database
 * If the substructure is composed of many fragments all the fragments must be present
 * @param {import('../MoleculesDB.js').MoleculesDB} moleculesDB
 * @param {import('openchemlib').Molecule} query
 * @returns
 */
function substructureSearch(moleculesDB, query) {
  const queryMW = getMW(query);
  const {
    searchResult
  } = substructureSearchBegin(moleculesDB, query);
  if (searchResult.length === 0) {
    query = query.getCompactCopy();
    query.setFragment(true);
    const queryIndex = query.getIndex();
    const searcher = moleculesDB.searcher;
    searcher.setFragment(query, queryIndex);
    for (const idCode in moleculesDB.db) {
      const entry = moleculesDB.db[idCode];
      searcher.setMolecule(entry.molecule, entry.index);
      if (searcher.isFragmentInMolecule()) {
        searchResult.push(entry);
      }
    }
  }
  return substructureSearchEnd(searchResult, queryMW);
}
/**
 * Search by substructure in the database
 * If the substructure is composed of many fragments only one fragment must be present
 * @param {import('../MoleculesDB.js').MoleculesDB} moleculesDB
 * @param {import('openchemlib').Molecule} query
 * @returns
 */
function substructureSearchOR(moleculesDB, query) {
  const queryMW = getMW(query);
  const {
    searchResult
  } = substructureSearchBegin(moleculesDB, query);
  if (searchResult.length === 0) {
    query = query.getCompactCopy();
    query.setFragment(true);
    const queries = [];
    for (const fragment of query.getFragments()) {
      queries.push({
        fragment,
        queryIndex: fragment.getIndex()
      });
    }
    const searcher = moleculesDB.searcher;
    molecule: for (const idCode in moleculesDB.db) {
      const entry = moleculesDB.db[idCode];
      searcher.setMolecule(entry.molecule, entry.index);
      for (const {
        fragment,
        queryIndex
      } of queries) {
        searcher.setFragment(fragment, queryIndex);
        if (searcher.isFragmentInMolecule()) {
          searchResult.push(entry);
          continue molecule;
        }
      }
    }
  }
  return substructureSearchEnd(searchResult, queryMW);
}
async function subStructureSearchAsync(moleculesDB, query, options = {}) {
  const queryMW = getMW(query); // we
  query = query.getCompactCopy();
  query.setFragment(true);
  const {
    interval = 100,
    onStep,
    controller
  } = options;
  let shouldAbort = false;
  if (controller) {
    const abortEventListener = () => {
      shouldAbort = true;
    };
    controller.signal.addEventListener('abort', abortEventListener);
  }
  const {
    searchResult
  } = substructureSearchBegin(moleculesDB, query);
  let begin = performance.now();
  if (searchResult.length === 0) {
    const queryIndex = query.getIndex();
    const searcher = moleculesDB.searcher;
    searcher.setFragment(query, queryIndex);
    let index = 0;
    const length = Object.keys(moleculesDB.db).length;
    for (const idCode in moleculesDB.db) {
      if (shouldAbort) {
        throw new AbortError('Query aborted');
      }
      const entry = moleculesDB.db[idCode];
      searcher.setMolecule(entry.molecule, entry.index);
      if (searcher.isFragmentInMolecule()) {
        searchResult.push(entry);
      }
      if ((onStep || controller) && performance.now() - begin >= interval) {
        begin = performance.now();
        if (onStep) {
          onStep(index, length);
        }
        if (controller && !onStep) {
          // eslint-disable-next-line no-await-in-loop
          await noWait();
        }
      }
      index++;
    }
  }
  return substructureSearchEnd(searchResult, queryMW);
}
function similaritySearch(moleculesDB, query) {
  const queryIndex = query.getIndex();
  const queryMW = getMW(query);
  const queryIdCode = query.getIDCode();
  const searchResult = [];
  let similarity;
  for (const idCode in moleculesDB.db) {
    const entry = moleculesDB.db[idCode];
    if (entry.idCode === queryIdCode) {
      similarity = Number.MAX_SAFE_INTEGER;
    } else {
      similarity = moleculesDB.OCL.SSSearcherWithIndex.getSimilarityTanimoto(queryIndex, entry.index) * 1000000 - Math.abs(queryMW - entry.properties.mw) / 10000;
    }
    searchResult.push({
      similarity,
      entry
    });
  }
  searchResult.sort((a, b) => {
    return b.similarity - a.similarity;
  });
  return searchResult.map(entry => entry.entry);
}
function getMW(query) {
  const copy = query.getCompactCopy();
  copy.setFragment(false);
  return copy.getMolecularFormula().relativeWeight;
}
function processResult(entries, options = {}) {
  const {
    flattenResult = true,
    keepMolecule = false,
    limit = Number.MAX_SAFE_INTEGER
  } = options;
  const results = [];
  if (flattenResult) {
    for (const entry of entries) {
      for (const data of entry.data) {
        const result = {
          data,
          idCode: entry.idCode,
          properties: entry.properties
        };
        if (keepMolecule) {
          result.molecule = entry.molecule;
        }
        results.push(result);
      }
    }
  } else {
    for (const entry of entries) {
      results.push({
        data: entry.data,
        idCode: entry.idCode,
        properties: entry.properties,
        molecule: keepMolecule ? entry.molecule : undefined
      });
    }
  }
  if (limit < results.length) results.length = limit;
  return results;
}

/*
 * @typedef {object} InternalStatistics
 * @property {number} counter - number of entries
 * @property {'number'|'boolean'|'string'|'object'|'mixed'} kind - kind of value
 */
/**
 * this.db is an object with properties 'oclID' that has as value
 * an object that contains the following properties:
 * molecule: an OCL molecule instance
 * index: OCL index used for substructure searching
 * properties: all the calculates properties
 * data: array containing free data associated with this molecule
 */
class MoleculesDB {
  /**
   * Creates an instance of MoleculesDB.
   * @param {typeof import('openchemlib')} OCL - openchemlib library
   * @param {object} [options={}] - Options.
   * @param {boolean} [options.computeProperties=false]
   * @param {boolean} [options.keepEmptyMolecules=false]
   */
  constructor(OCL, options = {}) {
    const {
      computeProperties = false,
      keepEmptyMolecules = false
    } = options;
    this.OCL = OCL;
    this.db = {};
    /**
     * @type {Map<string, InternalStatistics>}
     */
    this.dataStatistics = new Map();
    /**
     * @type {Map<string, InternalStatistics>}
     */
    this.calculatedStatistics = new Map();
    this.computeProperties = computeProperties;
    this.keepEmptyMolecules = keepEmptyMolecules;
    this.searcher = new OCL.SSSearcherWithIndex();
  }
  clear() {
    this.db = {};
    this.dataStatistics.clear();
    this.calculatedStatistics.clear();
  }
  get nbMolecules() {
    return Object.keys(this.db).length;
  }
  get nbData() {
    let number = 0;
    for (const entry of Object.values(this.db)) {
      number += entry.data.length;
    }
    return number;
  }
  get statistics() {
    const nbData = this.nbData;
    const nbMolecules = this.nbMolecules;
    const statistics = {
      data: [],
      calculated: []
    };
    for (const [key, value] of this.dataStatistics.entries()) {
      const statistic = {
        label: key,
        counter: value.counter,
        kind: value.kind,
        always: value.counter === nbData,
        isNumber: false
      };
      statistics.data.push(statistic);
      // if kind is numeric, add minValue and maxValue. Need to go through all the values
      if (value.kind === 'number') {
        statistic.isNumeric = true;
        statistic.minValue = Number.POSITIVE_INFINITY;
        statistic.maxValue = Number.NEGATIVE_INFINITY;
        for (const entry of Object.values(this.db)) {
          for (const data of entry.data) {
            if (data[key] < statistic.minValue) {
              statistic.minValue = data[key];
            }
            if (data[key] > statistic.maxValue) {
              statistic.maxValue = data[key];
            }
          }
        }
      }
    }
    for (const [key, value] of this.calculatedStatistics.entries()) {
      const statistic = {
        label: key,
        counter: value.counter,
        kind: value.kind,
        always: value.counter === nbMolecules,
        isNumeric: false
      };
      statistics.calculated.push(statistic);
      // if kind is numeric, add minValue and maxValue. Need to go through all the values
      if (value.kind === 'number') {
        statistic.isNumeric = true;
        statistic.minValue = Number.POSITIVE_INFINITY;
        statistic.maxValue = Number.NEGATIVE_INFINITY;
        for (const entry of Object.values(this.db)) {
          if (entry.properties[key] < statistic.minValue) {
            statistic.minValue = entry.properties[key];
          }
          if (entry.properties[key] > statistic.maxValue) {
            statistic.maxValue = entry.properties[key];
          }
        }
      }
    }
    return statistics;
  }
  /**
   * Append an array of entries to the current database. An entry is an object that by default should contain a 'ocl' property containing idCode and optionally index and coordinates
   * @param {*} moleculesDB
   * @param {object[]} entries
   * @param {object} [options={}]
   * @param {string} [options.idCodePath='ocl.idCode']
   * @param {string} [options.indexPath='ocl.index']
   * @param {string} [options.coordinatesPath='ocl.coordinates']
   * @param {string} [options.mwPath='mw']
   * @param {string} [options.smilesPath]
   * @param {string} [options.molfilePath]
   * @param {Function} [options.onStep] - call back to execute after each molecule
   * @returns {Promise<void>}
   */
  appendEntries(entries, options) {
    return appendEntries(this, entries, {
      computeProperties: this.computeProperties,
      ...options
    });
  }
  /**
   * append to the current database a CSV file
   * @param {string|ArrayBuffer} csv - text file containing the comma separated value file
   * @param {object} [options={}] - options.
   * @param {boolean} [options.header=true] - if the first line of the file is a header
   * @param {boolean} [options.dynamicTyping=true] - dynamically type the data (convert values to number of boolean if possible)
   * @param {boolean} [options.skipEmptyLines=true] - skip empty lines
   * @param {Function} [options.onStep] - call back to execute after each molecule
   * @returns {Promise<void>}
   */
  appendCSV(csv, options) {
    return appendCSV(this, csv, options);
  }
  /**
   * Append a SDF to the current database
   * @param {string|ArrayBuffer} sdf - text file containing the sdf
   * @param {object} [options={}] - options
   * @param {Function} [options.onStep] - callback to execute after each molecule
   * @param {boolean} [options.dynamicTyping=true] - Dynamically type the data
   * @param {boolean} [options.mixedEOL=false] - Set to true if you know there is a mixture between \r\n and \n
   * @param {string} [options.eol] - Specify the end of line character. Default will be the one found in the file
   * @returns {Promise<void>}
   */
  appendSDF(sdf, options) {
    return appendSDF(this, sdf, options);
  }
  /**
   * Append a list of SMILES to the current database.
   * @param {string|ArrayBuffer} smiles - text file containing a list of smiles
   * @param {object} [options={}] - Options
   * @param {Function} [options.onStep] - call back to execute after each molecule
   * @returns {Promise<void>}
   */
  appendSmilesList(smiles, options) {
    return appendSmilesList(this, smiles, options);
  }
  /**
   * Add a molecule to the current database.
   * @param {import('openchemlib').Molecule} molecule - The molecule to append.
   * @param {object} [data={}] - Options.
   * @param {object} [moleculeInfo={}] - May contain precalculated index and mw.
   */
  pushEntry(molecule, data, moleculeInfo) {
    pushEntry(this, molecule, data, moleculeInfo);
  }
  /**
   * Add an entry in the database.
   * @param {object} moleculeInfo - a molecule as a JSON that may contain the following properties: molfile, smiles, idCode, mf, index
   * @param {object} [data={}]
   */
  pushMoleculeInfo(moleculeInfo, data) {
    return pushMoleculeInfo(this, moleculeInfo, data);
  }
  /**
   * Search in a MoleculesDB
   * Inside the database all the same molecules are group together
   * @param {string|import('openchemlib').Molecule} [query] - smiles, molfile, idlCode or instance of Molecule to look for
   * @param {object} [options={}] - Options
   * @param {'smiles'|'idCode'|'smarts'|'molfile'} [options.format='idCode'] - query format
   * @param {'substructure'|'substructureOR'|'exact'|'exactNoStereo'|'similarity'} [options.mode='substructure'] - search algorithm
   * @param {boolean} [options.flattenResult=true] - The database group the data for the same product. This allows to flatten the result
   * @param {boolean} [options.keepMolecule=false] - keep the OCL.Molecule object in the result
   * @param {number} [options.limit=Number.MAX_SAFE_INTEGER] - maximal number of result
   * @returns {Array} array of object of the type {(molecule), idCode, data, properties}
   */
  search(query, options) {
    return search$4(this, query, options);
  }
  /**
   * Search in a MoleculesDB
   * Inside the database all the same molecules are group together
   * @param {string|import('openchemlib').Molecule} [query] - smiles, molfile, idCode or instance of Molecule to look for
   * @param {object} [options={}] - Options.
   * @param {'smiles'|'idCode'|'smarts'|'molfile'} [options.format='idCode'] - query format
   * @param {'substructure'|'substructureOR'|'exact'|'exactNoStereo'|'similarity'} [options.mode='substructure'] - search algorithm
   * @param {boolean} [options.flattenResult=true] - The database group the data for the same product. This allows to flatten the result
   * @param {boolean} [options.keepMolecule=false] - keep the OCL.Molecule object in the result
   * @param {number} [options.limit=Number.MAX_SAFE_INTEGER] - maximal number of result
   * @param {number} [options.interval=100] - interval in ms to call the onStep callback
   * @param {Function} [options.onStep] - callback to execute after each interval
   * @param {AbortController} [options.controler] - callback to execute to check if the search should be aborted
   * @returns {Promise<Array>} array of object of the type {(molecule), idCode, data, properties}
   */
  searchAsync(query, options) {
    return searchAsync(this, query, options);
  }
  /**
   * Returns an array with the current database
   * @returns
   */
  getDB() {
    return Object.keys(this.db).map(key => this.db[key]);
  }
  /**
   * Append the property `data.color` to each entry based on a data or property label
   * {object} [options={}]
   * {string} [options.dataLabel] name of the property from `data` to use
   * {string} [options.propertyLabel] name of the property from `properties` to use
   * {number} [options.colorLabel='color'] name of the property to add in data that will contain the color
   * {number} [options.minValue]
   * {number} [options.maxValue]
   * {number} [options.minHue=0]
   * {number} [options.maxHue=360]
   * {number} [options.saturation=65] percent of color saturation
   * {number} [options.lightness=65] percent of color lightness
   * @param options
   */
  appendColor(options) {
    appendColor(this, options);
  }
}

function getAtomFeatures(originalMolecule, options = {}) {
  const OCL = originalMolecule.getOCL();
  const {
    sphere = 1
  } = options;
  const fragment = new OCL.Molecule(0, 0);
  const results = [];
  for (let rootAtom = 0; rootAtom < originalMolecule.getAllAtoms(); rootAtom++) {
    let min = 0;
    let max = 0;
    const atomMask = new Array(originalMolecule.getAtoms());
    const atomList = new Array(originalMolecule.getAtoms());
    const molecule = originalMolecule.getCompactCopy();
    for (let currentSphere = 0; currentSphere <= sphere; currentSphere++) {
      if (max === 0) {
        atomList[max] = rootAtom;
        atomMask[rootAtom] = true;
        max++;
      } else {
        let newMax = max;
        for (let i = min; i < max; i++) {
          const atom = atomList[i];
          for (let j = 0; j < molecule.getAllConnAtoms(atom); j++) {
            const connAtom = molecule.getConnAtom(atom, j);
            if (!atomMask[connAtom]) {
              atomMask[connAtom] = true;
              atomList[newMax++] = connAtom;
            }
          }
        }
        min = max;
        max = newMax;
      }
      molecule.copyMoleculeByAtoms(fragment, atomMask, true, null);
      if (currentSphere === sphere) {
        makeRacemic(fragment);
        results.push(fragment.getCanonizedIDCode());
      }
    }
  }
  const atoms = {};
  for (const result of results) {
    if (!atoms[result]) {
      atoms[result] = 1;
    } else {
      atoms[result]++;
    }
  }
  return atoms;
}

let rAtomicNumber = 0;
/**
 * Returns the atomic number of the X atom
 * @param {import('openchemlib').Molecule} molecule - An instance of a molecule
 * @returns
 */
function getRAtomicNumber(molecule) {
  if (!rAtomicNumber) {
    const OCL = molecule.getOCL();
    rAtomicNumber = OCL.Molecule.getAtomicNoFromLabel('R', OCL.Molecule.cPseudoAtomR);
  }
  return rAtomicNumber;
}

function fragmentAcyclicSingleBonds(molecule) {
  const OCL = molecule.getOCL();
  const atoms = [];
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    const atom = {};
    atoms.push(atom);
    atom.i = i;
    atom.links = []; // we will store connected atoms of broken bonds
  }
  const bonds = [];
  for (let i = 0; i < molecule.getAllBonds(); i++) {
    const bond = {};
    bonds.push(bond);
    bond.i = i;
    bond.order = molecule.getBondOrder(i);
    bond.atom1 = molecule.getBondAtom(0, i);
    bond.atom2 = molecule.getBondAtom(1, i);
    bond.type = molecule.getBondType(i);
    bond.isAromatic = molecule.isAromaticBond(i);
    bond.isRingBond = molecule.isRingBond(i);
    if (!bond.isAromatic && (bond.type & 0b11) === 1 && !bond.isRingBond) {
      bond.selected = true;
      atoms[bond.atom1].links.push(bond.atom2);
      atoms[bond.atom2].links.push(bond.atom1);
    }
  }
  const brokenMolecule = molecule.getCompactCopy();
  for (const bond of bonds) {
    if (bond.selected) {
      brokenMolecule.markBondForDeletion(bond.i);
    }
  }
  brokenMolecule.deleteMarkedAtomsAndBonds();
  const fragmentMap = [];
  const nbFragments = brokenMolecule.getFragmentNumbers(fragmentMap);
  const results = [];
  for (let i = 0; i < nbFragments; i++) {
    const result = {
      atomMap: []
    };
    const includeAtom = fragmentMap.map(id => {
      return id === i;
    });
    const fragment = new OCL.Molecule(0, 0);
    const atomMap = [];
    brokenMolecule.copyMoleculeByAtoms(fragment, includeAtom, false, atomMap);
    // we will add some R groups at the level of the broken bonds
    for (let j = 0; j < atomMap.length; j++) {
      if (atomMap[j] > -1) {
        result.atomMap.push(j);
        if (atoms[j].links.length > 0) {
          for (let k = 0; k < atoms[j].links.length; k++) {
            fragment.addBond(atomMap[j], fragment.addAtom(getRAtomicNumber(brokenMolecule)), 1);
          }
        }
      }
    }
    fragment.setFragment(false);
    result.idCode = fragment.getIDCode();
    result.mf = getMF(fragment).mf.replace(/R[1-9]?/, '');
    results.push(result);
  }
  return results;
}

/**
 * @description Append the OCL reaction to the reaction object
 * @param {Array} reactions - array of reactions objects with rxnCode and label
 * @param {typeof import('openchemlib')} OCL - OCL object
 * @param {object} [options={}]
 * @param {import('cheminfo-types').Logger} [options.logger]
 * @returns {Array} array of reactions objects with rxnCode, label and oclReaction (a decoded version of rxnCode reaction)
 */
function appendOCLReaction(reactions, OCL, options = {}) {
  const {
    logger
  } = options;
  const newReactions = [];
  for (const reaction of reactions) {
    if (reaction.rxnCode) {
      newReactions.push({
        ...reaction,
        oclReaction: OCL.ReactionEncoder.decode(reaction.rxnCode)
      });
    } else if (logger) {
      logger.warn(reaction, 'Reaction without rxnCode');
    }
  }
  return newReactions;
}

/**
 *
 * @param {*} processedMolecules
 * @param {import('openchemlib').Molecule|string} molecule
 * @param {*} options
 * @returns
 */
function checkIfExistsOrAddInfo(processedMolecules, molecule, options) {
  const {
    moleculeInfoCallback,
    asReagent,
    asProduct
  } = options;
  const idCode = typeof molecule === 'string' ? idCode : molecule.getIDCode();
  if (processedMolecules.has(idCode)) {
    const entry = processedMolecules.get(idCode);
    let exists = false;
    if (asReagent) {
      if (entry.asReagent) {
        exists = true;
      } else {
        entry.asReagent = true;
      }
    }
    if (asProduct) {
      if (entry.asProduct) {
        exists = true;
      } else {
        entry.asProduct = true;
      }
    }
    return {
      exists,
      info: entry
    };
  } else {
    let info = {
      idCode,
      asReagent,
      asProduct,
      info: {}
    };
    if (moleculeInfoCallback) {
      info.info = moleculeInfoCallback(molecule);
    }
    processedMolecules.set(idCode, info);
    return {
      exists: false,
      info
    };
  }
}

/**
 * @description apply one reaction to one reactant
 * @param {import('openchemlib').Molecule[]} reactants
 * @param tree
 * @param {Array<object>} reactions - rxnCode of the reaction
 * @param {object} options - options to apply the reaction
 * @param {number} options.currentDepth - current depth of the recursion
 * @param {number} options.maxDepth - max depth of the recursion
 * @param {number} options.maxCurrentDepth - max depth of the recursion for this set of reactions
 * @param {number} options.limitReactions - limit the number of reactions
 * @param {object} options.stats - stats of the recursion
 * @param {number} options.stats.counter - number of reactions
 * @param {Map} options.processedMolecules - set of processed molecules
 * @param {Array} options.trees - array of trees of previous recursions
 * @param {object} options.OCL - OCL object
 * @returns {Array} array of results
 */
function applyOneReactantReactions(tree, reactions, options) {
  const {
    currentDepth,
    maxDepth,
    maxCurrentDepth,
    processedMolecules,
    OCL,
    logger,
    stats,
    limitReactions
  } = options;
  if (tree.molecules.length !== 1) {
    logger?.warn('applyOneReactantReactions:tree.reactants.length!==1', tree.reactants.length);
    return [];
  }
  const reactant = OCL.Molecule.fromIDCode(tree.molecules[0].idCode);
  const todoNextDepth = [];
  // if the current depth is greater than the max depth, we stop the recursion and return an empty array
  if (currentDepth > maxCurrentDepth || tree.depth >= maxDepth) {
    return [];
  }
  const existsAndInfo = checkIfExistsOrAddInfo(processedMolecules, reactant, {
    ...options,
    asReagent: true
  });
  // check if the reactant has already been processed
  if (existsAndInfo.exists) {
    return [];
  }
  for (const reaction of reactions) {
    if (stats.counter >= limitReactions) {
      return [];
    }
    const reactor = new OCL.Reactor(reaction.oclReaction);
    // isMatching is true if the reactant is matching the reaction else we continue to the next reaction
    const isMatching = Boolean(reactor.setReactant(0, reactant));
    if (isMatching) {
      stats.counter++;
      // get the products of the reaction
      const oneReactionProducts = reactor.getProducts();
      for (const oneReactionProduct of oneReactionProducts) {
        for (const reactionProduct of oneReactionProduct) {
          // get the info of the product (idCode, mf)
          const productExistsAndInfo = checkIfExistsOrAddInfo(processedMolecules, reactionProduct, {
            ...options,
            asProduct: true
          });
          // if the product has not been processed yet, we add it to the list of products and we add it to the list of todoNextDepth
          if (!productExistsAndInfo.exists) {
            // eslint-disable-next-line no-unused-vars
            const {
              oclReaction,
              needToBeCharged,
              ...reactionWithoutOCL
            } = reaction;
            const oneReaction = {
              reaction: reactionWithoutOCL,
              depth: tree.depth + 1,
              isValid: true,
              currentDepth,
              molecules: [checkIfExistsOrAddInfo(processedMolecules, reactionProduct, options).info]
            };
            if (!tree.children) tree.children = [];
            tree.children.push(oneReaction);
            todoNextDepth.push(() => {
              return applyOneReactantReactions(oneReaction, reactions, {
                ...options,
                currentDepth: currentDepth + 1
              });
            });
          }
        }
      }
    }
  }
  // by returning todoNextDepth, we make sure that the recursion will continue
  return todoNextDepth;
}

function getFilteredTrees(reactions, options = {}) {
  const {
    filter = () => true
  } = options;
  const nodesToKeep = reactions.getNodes().filter(filter);
  const parentMap = reactions.getParentMap();
  for (let currentNode of nodesToKeep) {
    const parent = parentMap.get(currentNode);
    if (parent && nodesToKeep.includes(parent) === false) {
      nodesToKeep.push(parent);
    }
  }
  return getValidChildren(reactions.trees, {
    nodesToKeep
  });
}
function getValidChildren(nodes, options) {
  const {
    nodesToKeep
  } = options;
  const validNodes = nodes.filter(node => nodesToKeep.includes(node)).map(node => ({
    ...node
  }));
  for (const node of validNodes) {
    if (node.children) {
      const validChildren = node.children.filter(child => nodesToKeep.includes(child));
      if (validChildren.length > 0) {
        node.children = getValidChildren(validChildren, {
          nodesToKeep
        });
      } else {
        delete node.children;
      }
    }
  }
  return validNodes;
}

function getLeaves(trees) {
  const leaves = [];
  for (const tree of trees) {
    appendLeavesSS(leaves, tree);
  }
  return leaves;
}
function appendLeavesSS(leaves, currentBranch) {
  if (!currentBranch.children || currentBranch.children.length === 0) {
    leaves.push(currentBranch);
    return;
  }
  for (const child of currentBranch.children) {
    appendLeavesSS(leaves, child);
  }
}

function getNodes(trees) {
  const nodes = [];
  for (const tree of trees) {
    getNodesSS(nodes, tree);
  }
  return nodes;
}
function getNodesSS(nodes, currentBranch) {
  nodes.push(currentBranch);
  for (const child of currentBranch?.children || []) {
    getNodesSS(nodes, child);
  }
}

class Reactions {
  /**
   *
   * @param OCL
   * @param {object} [options={}]
   * @param {import('cheminfo-types').Logger} logger
   * @param {number} [options.maxDepth=5]
   * @param {Function} [options.moleculeInfoCallback]
   * @param {boolean} [options.skipProcessed=true]
   */
  constructor(OCL, options = {}) {
    this.moleculeInfoCallback = options.moleculeInfoCallback;
    this.maxDepth = options.maxDepth ?? 5;
    this.limitReactions = options.limitReactions ?? 200;
    this.skipProcessed = options.skipProcessed ?? true;
    this.logger = options.logger;
    this.processedMolecules = new Map();
    this.OCL = OCL;
    this.trees = [];
    this.moleculeInfo = {}; // a cache containing molecule information like mw, etc.
  }
  /**
   * We need to call this method for all the reactants on which we want to apply the reactions.
   * If there is only one reactant, we call this method with an array of one reactant.
   * If there are multiple reactants, we call this method with an array of the reactants.
   * This method has to be called for all the reactants
   * @param {import('openchemlib').Molecule[]|string[]} molecules
   * @param moleculesOrIDCodes
   */
  appendHead(moleculesOrIDCodes) {
    if (!Array.isArray(moleculesOrIDCodes)) {
      throw new TypeError('reactants must be an array');
    }
    const molecules = moleculesOrIDCodes.map(molecule => checkIfExistsOrAddInfo(this.processedMolecules, molecule, {
      moleculeInfoCallback: this.moleculeInfoCallback
    }).info);
    const tree = {
      molecules,
      depth: 0,
      isValid: true // this node could be implied in reactions
    };
    this.trees.push(tree);
  }
  /**
   * Returns all the leaves of the trees
   * @returns
   */
  getLeaves() {
    return getLeaves(this.trees);
  }
  /**
   * Returns all the nodes of the trees
   * @returns
   */
  getNodes() {
    return getNodes(this.trees);
  }
  getParentMap() {
    const parentMap = new Map();
    const nodes = this.getNodes();
    for (const node of nodes) {
      if (node.children) {
        for (const child of node.children) {
          parentMap.set(child, node);
        }
      }
    }
    return parentMap;
  }
  /**
   * When applying reactions some branches may be dead because it can not be implied in any reaction.
   * This is the case when we specify a 'min' reaction depth.
   * This will returno only the valid nodes
   * @returns
   */
  getValidNodes() {
    return this.getNodes().filter(node => node.isValid);
  }
  /**
   *
   * @param {object} [options={}]
   * @param {(object):boolean} [options.filter] - a function that will be called for each node and return true if the node should be kept
   */
  getFilteredReactions(options = {}) {
    const filteredReactions = new Reactions();
    filteredReactions.moleculeInfoCallback = this.moleculeInfoCallback;
    filteredReactions.maxDepth = this.maxDepth;
    filteredReactions.limitReactions = this.limitReactions;
    filteredReactions.skipProcessed = this.skipProcessed;
    filteredReactions.logger = this.logger;
    filteredReactions.processedMolecules = this.processedMolecules;
    filteredReactions.OCL = this.OCL;
    filteredReactions.moleculeInfo = this.moleculeInfo; // a cache containing molecule information like mw, etc.
    filteredReactions.trees = getFilteredTrees(this, options);
    return filteredReactions;
  }
  /**
   *
   * @param {object[]} reactions - array of reactions that should be applied
   * @param {object} [options={}]
   * @param {number} [options.min=0] - min depth of the reaction
   * @param {number} [options.max=3] - max depth of the reaction
   */
  applyOneReactantReactions(reactions, options = {}) {
    const {
      min = 0,
      max = 3
    } = options;
    clearAsFromProcessedMolecules(this.processedMolecules);
    const nodes = this.getNodes().filter(node => node.isValid);
    for (const node of nodes) {
      node.currentDepth = 0;
    }
    reactions = appendOCLReaction(reactions, this.OCL);
    const stats = {
      counter: 0
    };
    // Start the recursion by applying the first level of reactions
    for (const node of nodes) {
      let todoCurrentLevel = applyOneReactantReactions(node, reactions, {
        OCL: this.OCL,
        currentDepth: 1,
        processedMolecules: this.processedMolecules,
        moleculeInfoCallback: this.moleculeInfoCallback,
        maxDepth: this.maxDepth,
        maxCurrentDepth: max,
        stats,
        limitReactions: this.limitReactions
      });
      do {
        const nexts = [];
        for (const todo of todoCurrentLevel) {
          nexts.push(todo());
        }
        todoCurrentLevel = nexts.flat();
      } while (todoCurrentLevel.length > 0);
    }
    const newNodes = this.getNodes().filter(node => node.isValid);
    for (const node of newNodes) {
      if (node.currentDepth < min || node.currentDepth > max) {
        node.isValid = false;
      }
      delete node.currentDepth;
    }
  }
}
function clearAsFromProcessedMolecules(processedMolecules) {
  for (const [, value] of processedMolecules) {
    if (value.asReagent) {
      value.asReagent = false;
    }
    if (value.asProduct) {
      value.asProduct = false;
    }
  }
}

var lib$2 = /*#__PURE__*/Object.freeze({
	__proto__: null,
	FULL_HOSE_CODE: FULL_HOSE_CODE,
	HOSE_CODE_CUT_C_SP3_SP3: HOSE_CODE_CUT_C_SP3_SP3,
	MoleculesDB: MoleculesDB,
	Reactions: Reactions,
	TopicMolecule: TopicMolecule,
	applyFragmentLabels: applyFragmentLabels,
	autoLabel: autoLabel,
	autoLabelDatabase: autoLabelDatabase,
	combineSmiles: combineSmiles,
	createPolymer: createPolymer,
	ensureHeterotopicChiralBonds: ensureHeterotopicChiralBonds,
	ensureMapNo: ensureMapNo,
	fragmentAcyclicSingleBonds: fragmentAcyclicSingleBonds,
	getAtomFeatures: getAtomFeatures,
	getAtoms: getAtoms,
	getAtomsInfo: getAtomsInfo,
	getCharge: getCharge,
	getConnectivityMatrix: getConnectivityMatrix,
	getDiastereotopicAtomIDs: getDiastereotopicAtomIDs,
	getDiastereotopicAtomIDsAndH: getDiastereotopicAtomIDsAndH,
	getDiastereotopicAtomIDsFromMolfile: getDiastereotopicAtomIDsFromMolfile,
	getGroupedDiastereotopicAtomIDs: getGroupedDiastereotopicAtomIDs,
	getHoseCodes: getHoseCodes,
	getHoseCodesAndInfo: getHoseCodesAndInfo,
	getHoseCodesForAtom: getHoseCodesForAtom,
	getHoseCodesForAtoms: getHoseCodesForAtoms,
	getHoseCodesForPath: getHoseCodesForPath,
	getHoseCodesFromDiastereotopicID: getHoseCodesFromDiastereotopicID,
	getImplicitHydrogensCount: getImplicitHydrogensCount,
	getMF: getMF,
	getMolfilesMapping: getMolfilesMapping,
	getNMRHints: getNMRHints,
	getNextNMRHint: getNextNMRHint,
	getNonUniqueCustomLabels: getNonUniqueCustomLabels,
	getPathAndTorsion: getPathAndTorsion,
	getPathsInfo: getPathsInfo,
	getProperties: getProperties,
	getShortestPaths: getShortestPaths,
	groupDiastereotopicAtomIDs: groupDiastereotopicAtomIDs$1,
	isCsp3: isCsp3,
	makeRacemic: makeRacemic,
	nbCHO: nbCHO,
	nbCN: nbCN,
	nbCOOH: nbCOOH,
	nbLabileH: nbLabileH,
	nbNH2: nbNH2,
	nbOH: nbOH,
	parseDwar: parseDwar,
	tagAtom: tagAtom,
	toDiastereotopicSVG: toDiastereotopicSVG,
	toVisualizerMolfile: toVisualizerMolfile,
	toggleHydrogens: toggleHydrogens
});

var require$$2 = /*@__PURE__*/getAugmentedNamespace(lib$2);

var fragmentAcyclicBonds$1 = {};

Object.defineProperty(fragmentAcyclicBonds$1, "__esModule", {
  value: true
});
fragmentAcyclicBonds$1.fragmentAcyclicBonds = fragmentAcyclicBonds;
const mf_parser_1$a = src$h;
const openchemlib_utils_1$4 = require$$2;
/**
 * The function performs the fragmentation of all single linear bonds
 * @param {import('openchemlib').Molecule} molecule - The OCL molecule to be fragmented
 * @param {object} [options={}]
 * @param {boolean} [options.calculateHoseCodes=false] - calculating hose code for bonds is quite time consuming
 * @param {string} [options.parentIDCode=molecule.getIDCode()]
 * @returns Results fragmentation of acyclic bonds
 */
function fragmentAcyclicBonds(molecule, options = {}) {
  const {
    Molecule
  } = molecule.getOCL();
  const {
    calculateHoseCodes,
    parentIDCode = molecule.getIDCode()
  } = options;
  let atoms = [];
  // Prepare object with lenght equal to number of atoms
  for (let i = 0; i < molecule.getAllAtoms(); i++) {
    let atom = {};
    atoms.push(atom);
    atom.i = i;
    atom.links = [];
  }
  let bonds = [];
  for (let i = 0; i < molecule.getAllBonds(); i++) {
    let bond = {
      index: i,
      order: molecule.getBondOrder(i),
      atom1: molecule.getBondAtom(0, i),
      atom2: molecule.getBondAtom(1, i),
      type: molecule.getBondType(i),
      isAromatic: molecule.isAromaticBond(i),
      isRingBond: molecule.isRingBond(i),
      selected: false
    };
    // Mapping of bonds to be fragmented, only if they are single bond not aromatic and cyclic the mapping occurs
    if (bond.isAromatic || bond.type > 1 || bond.isRingBond || bond.order !== 1) {
      continue;
    } else {
      bond.selected = true;
      atoms[bond.atom1].links.push(bond.atom2);
      atoms[bond.atom2].links.push(bond.atom1);
    }
    bonds.push(bond);
  }
  let brokenMolecule = {};
  let fragmentMap = [];
  let nbFragments = 0;
  let results = [];
  for (let bond of bonds) {
    if (bond.selected) {
      // if bond.selected is true (line 46) the molecule will be fragmented
      brokenMolecule[bond.index] = molecule.getCompactCopy(); // get a copy of the molecule
      brokenMolecule[bond.index].setAtomCustomLabel(bond.atom1, '*');
      brokenMolecule[bond.index].setAtomCustomLabel(bond.atom2, '*');
      brokenMolecule[bond.index].markBondForDeletion(bond.index); //mark bond to be deleted
      // the function returns an array of map
      brokenMolecule[bond.index].deleteMarkedAtomsAndBonds(); // delete marked bonds
    }
    nbFragments = brokenMolecule[bond.index].getFragmentNumbers(fragmentMap);
    // only if there are 2 fragments code can continue
    if (nbFragments === 2) {
      for (let i = 0; i < nbFragments; i++) {
        const result = {};
        if (calculateHoseCodes) {
          result.hoses = (0, openchemlib_utils_1$4.getHoseCodesForAtoms)(molecule, [bond.atom1, bond.atom2]);
        }
        result.atomMap = [];
        // assign fragment id to index of for loop
        let includeAtom = fragmentMap.map(id => {
          return id === i;
        });
        let fragment = new Molecule(100, 100);
        let atomMap = [];
        brokenMolecule[bond.index].copyMoleculeByAtoms(fragment, includeAtom, false, atomMap);
        for (let j = 0; j < atomMap.length; j++) {
          if (fragment.getAtomCustomLabel(atomMap[j]) === '*') {
            result.atomMap.push(j);
            if (atoms[j].links.length > 0) {
              fragment.addBond(atomMap[j], fragment.addAtom(154));
            }
          }
        }
        fragment.removeAtomCustomLabels();
        fragment.setFragment(false);
        result.idCode = fragment.getIDCode();
        result.parentIDCode = parentIDCode;
        result.cleavedBonds = [{
          index: bond.index,
          order: bond.order,
          atom1: bond.atom1,
          atom2: bond.atom2
        }];
        result.mfInfo = new mf_parser_1$a.MF((0, openchemlib_utils_1$4.getMF)(fragment).mf.replace(/R[1-9]?/, '')).getInfo();
        result.fragmentType = 'acyclic';
        results.push(result);
      }
    }
  }
  // sort result in order fragment 1-2; 3-4; ...
  results = results.toSorted((a, b) => {
    return a.mfInfo.monoisotopicMass - b.mfInfo.monoisotopicMass;
  });
  return results;
}

var fragmentRings$1 = {};

var getFragmentableRings$1 = {};

var getRingsInfo$1 = {};

/**
 * This function returns ringBond, and object that contains information about the bonds of each ring
 * @param {import('openchemlib').Molecule} molecule - The OCL molecule to be fragmented
 * @returns Information of ring bonds for each ring in the molecule
 */
Object.defineProperty(getRingsInfo$1, "__esModule", {
  value: true
});
getRingsInfo$1.getRingsInfo = getRingsInfo;
function getRingsInfo(molecule) {
  const ringSet = molecule.getRingSet();
  let ringBonds = [];
  // create a new array with the length of the number of bonds in the molecule and fills it with 0
  let nbRingForBonds = new Array(molecule.getAllBonds()).fill(0);
  for (let i = 0; i < ringSet.getSize(); i++) {
    for (let bond of ringSet.getRingBonds(i)) {
      nbRingForBonds[bond]++;
    }
  }
  for (let i = 0; i < ringSet.getSize(); i++) {
    ringBonds.push({
      bonds: ringSet.getRingBonds(i).map(bondIndex => ({
        index: bondIndex,
        ringIndex: i,
        nbRings: nbRingForBonds[bondIndex],
        // in how many rings this bond is included
        order: molecule.getBondOrder(bondIndex),
        isAromatic: ringSet.isAromatic(i),
        atom1: molecule.getBondAtom(0, bondIndex),
        atom2: molecule.getBondAtom(1, bondIndex)
      }))
    });
  }
  return ringBonds;
}

Object.defineProperty(getFragmentableRings$1, "__esModule", {
  value: true
});
getFragmentableRings$1.getFragmentableRings = getFragmentableRings;
const getRingsInfo_js_1 = getRingsInfo$1;
/**
 * This function returns an array of objects with all combination of 2 bonds who can be fragmented in the same ring
 * @param {import('openchemlib').Molecule} molecule - The OCL molecule to be fragmented
 * @returns All combination of 2 bonds who can be fragmented in the same ring
 */
function getFragmentableRings(molecule) {
  let ringsInfo = (0, getRingsInfo_js_1.getRingsInfo)(molecule);
  let fragmentableRingBonds = [];
  for (let ring = 0; ring < ringsInfo.length; ring++) {
    let bonds = ringsInfo[ring].bonds;
    // we prevent to consecutive bonds to be cleaved
    for (let first = 0; first < bonds.length; first++) {
      let end = first === 0 ? bonds.length - 1 : bonds.length;
      for (let second = first + 2; second < end; second++) {
        if (bonds[first].order === 1 && bonds[second].order === 1 && !bonds[first].isAromatic && !bonds[second].isAromatic && bonds[first].nbRings < 2 && bonds[second].nbRings < 2) {
          fragmentableRingBonds.push({
            bonds: [bonds[first], bonds[second]]
          });
        }
      }
    }
  }
  return fragmentableRingBonds;
}

Object.defineProperty(fragmentRings$1, "__esModule", {
  value: true
});
fragmentRings$1.fragmentRings = fragmentRings;
const mf_parser_1$9 = src$h;
const openchemlib_utils_1$3 = require$$2;
const getFragmentableRings_js_1 = getFragmentableRings$1;
/**
 * The function performs the fragmentation of all single ring bonds not belonging to aromatic rings
 * @param {import('openchemlib').Molecule} molecule - The OCL molecule to be fragmented
 * @param {object} [options={}]
 * @param {boolean} [options.calculateHoseCodes=false] - calculating hose code for bonds is quite time consuming
 * @param {string} [options.parentIDCode=molecule.getIDCode()]
 * @returns  Array with results for the fragmentation of ring bonds
 */
function fragmentRings(molecule, options = {}) {
  const {
    Molecule
  } = molecule.getOCL();
  const {
    calculateHoseCodes,
    parentIDCode = molecule.getIDCode()
  } = options;
  const fragmentableRingBonds = (0, getFragmentableRings_js_1.getFragmentableRings)(molecule);
  let fragmentationResults = [];
  for (let ringBonds of fragmentableRingBonds) {
    const brokenMolecule = molecule.getCompactCopy();
    let fragmentMap = [];
    let atoms = [];
    let rLinks = {};
    for (let bond of ringBonds.bonds) {
      brokenMolecule.markBondForDeletion(bond.index);
      brokenMolecule.setAtomCustomLabel(bond.atom1, '*');
      brokenMolecule.setAtomCustomLabel(bond.atom2, '*');
      atoms.push(bond.atom1, bond.atom2);
      rLinks[bond.atom1] = bond.atom2;
      rLinks[bond.atom2] = bond.atom1;
    }
    brokenMolecule.deleteMarkedAtomsAndBonds();
    const nbFragments = brokenMolecule.getFragmentNumbers(fragmentMap);
    for (let i = 0; i < nbFragments; i++) {
      const result = {};
      if (calculateHoseCodes) {
        result.hoses = (0, openchemlib_utils_1$3.getHoseCodesForAtoms)(molecule, atoms);
      }
      result.atomMap = [];
      let includeAtom = fragmentMap.map(id => {
        return id === i;
      });
      let fragment = new Molecule(0, 0);
      let atomMap = [];
      brokenMolecule.copyMoleculeByAtoms(fragment, includeAtom, false, atomMap);
      // if includeAtom has more then 3 true all true should become false and all false should become true
      for (let j = 0; j < atomMap.length; j++) {
        if (fragment.getAtomCustomLabel(atomMap[j]) === '*') {
          result.atomMap.push(j);
          if (rLinks[j] !== undefined) {
            fragment.addBond(atomMap[j], fragment.addAtom(154));
          }
        }
      }
      fragment.removeAtomCustomLabels();
      fragment.setFragment(false);
      //      console.log(fragment.getIDCode(), getMF(fragment).mf);
      result.idCode = fragment.getIDCode();
      result.parentIDCode = parentIDCode;
      result.cleavedBonds = ringBonds.bonds;
      result.mfInfo = new mf_parser_1$9.MF((0, openchemlib_utils_1$3.getMF)(fragment).mf.replace(/R[1-9]?/, '')).getInfo();
      result.fragmentType = 'cyclic';
      fragmentationResults.push(result);
    }
  }
  fragmentationResults = fragmentationResults.toSorted((a, b) => {
    return a.mfInfo.monoisotopicMass - b.mfInfo.monoisotopicMass;
  });
  return fragmentationResults;
}

Object.defineProperty(fragment$3, "__esModule", {
  value: true
});
fragment$3.fragment = fragment;
const mf_parser_1$8 = src$h;
const openchemlib_utils_1$2 = require$$2;
const fragmentAcyclicBonds_js_1 = fragmentAcyclicBonds$1;
const fragmentRings_js_1 = fragmentRings$1;
/**
 * This function fragment both acyclic and cyclic bonds of the molecule
 * @param {import('openchemlib').Molecule} molecule - The OCL molecule to be fragmented
 * @param {object} [options={}]
 * @param {boolean} [options.calculateHoseCodes=false] - calculating hose code for bonds is quite time consuming
 * @param {boolean} [options.cyclic=true] - calculate cyclic fragmentation
 * @param {boolean} [options.acyclic=true] - calculate acyclic fragmentation
 * @param {boolean} [options.full=true] - calculate the molecular formula of the full molecule
 * @returns {object} In-Silico fragmentation results
 */
function fragment(molecule, options = {}) {
  const {
    cyclic = true,
    acyclic = true,
    full = true,
    calculateHoseCodes = false
  } = options;
  const parentIDCode = molecule.getIDCode();
  let molecularIon = full ? [{
    idCode: parentIDCode,
    parentIDCode,
    mfInfo: new mf_parser_1$8.MF((0, openchemlib_utils_1$2.getMF)(molecule).mf).getInfo(),
    fragmentType: 'molecule'
  }] : [];
  let acyclicBonds = acyclic ? (0, fragmentAcyclicBonds_js_1.fragmentAcyclicBonds)(molecule, {
    calculateHoseCodes,
    parentIDCode
  }) : [];
  let cyclicBonds = cyclic ? (0, fragmentRings_js_1.fragmentRings)(molecule, {
    calculateHoseCodes,
    parentIDCode
  }) : [];
  let result = [...molecularIon, ...acyclicBonds, ...cyclicBonds];
  return result.toSorted((a, b) => a.mfInfo.monoisotopicMass - b.mfInfo.monoisotopicMass);
}

var reactionFragmentation$1 = {};

var ql=class{copyMolecule(Z){let vt=Z.getIDCodeAndCoordinates();navigator.clipboard.writeText(`${vt.idCode} ${vt.coordinates}`);}pasteMolecule(){return null;}};var ZS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ao=new Uint8Array(256);for(let w=0;w<ZS.length;w++)ao[ZS.charCodeAt(w)]=w;function WS(w){let Z=w.length*.75,vt=w.length,ot,kt=0,C1,jt,T1,u1;w.at(-1)==="="&&(Z--,w.at(-2)==="="&&Z--);let h1=new ArrayBuffer(Z),s1=new Uint8Array(h1);for(ot=0;ot<vt;ot+=4)C1=ao[w.charCodeAt(ot)],jt=ao[w.charCodeAt(ot+1)],T1=ao[w.charCodeAt(ot+2)],u1=ao[w.charCodeAt(ot+3)],s1[kt++]=C1<<2|jt>>4,s1[kt++]=(jt&15)<<4|T1>>2,s1[kt++]=(T1&3)<<6|u1&63;return h1;}function zl(w){return w.toString(16).padStart(2,"0");}var R9=globalThis.devicePixelRatio||1;var $2=class{constructor(Z){this.ctx=Z,this.ctx.textAlign="left",this.ctx.textBaseline="top",this.currentFontSize=12,this.currentFont="12px sans-serif",this.ctx.font=this.currentFont,this.currentColor="#000000",this.currentLineWidth=1,this.canvasCache=new Map();}clearRect(Z,vt,ot,kt){this.ctx.clearRect(Z,vt,ot,kt);}getBackgroundRGB(){return 16777215;}getForegroundRGB(){return 0;}getSelectionBackgroundRGB(){return 12310268;}getLineWidth(){return this.currentLineWidth;}setRGB(Z){let vt=Z>>>16&255,ot=Z>>>8&255,kt=Z>>>0&255;this.currentColor=`#${zl(vt)}${zl(ot)}${zl(kt)}`,this.ctx.fillStyle=this.currentColor,this.ctx.strokeStyle=this.currentColor;}setFont(Z,vt,ot){this.currentFontSize=Z,this.currentFont=`${vt?"bold":""} ${ot?"italic":""} ${Z}px sans-serif`,this.ctx.font=this.currentFont;}getFontSize(){return this.currentFontSize;}getBounds(Z){let vt=this.ctx.measureText(Z);return {x:vt.actualBoundingBoxLeft,y:vt.actualBoundingBoxAscent,width:vt.actualBoundingBoxRight,height:vt.actualBoundingBoxAscent};}drawString(Z,vt,ot){this.ctx.fillText(ot,Z,vt);}drawCenteredString(Z,vt,ot){this.ctx.textAlign="center",this.ctx.textBaseline="middle",this.ctx.fillText(ot,Z,vt),this.ctx.textAlign="left",this.ctx.textBaseline="top";}setLineWidth(Z){this.currentLineWidth=Z,this.ctx.lineWidth=Z;}fillRectangle(Z,vt,ot,kt){this.ctx.fillRect(Z,vt,ot,kt);}fillCircle(Z,vt,ot){let kt=ot/2;this.ctx.beginPath(),this.ctx.arc(Z+kt,vt+kt,kt,0,2*Math.PI),this.ctx.fill();}drawLine(Z,vt,ot,kt){this.ctx.beginPath(),this.ctx.moveTo(Z,vt),this.ctx.lineTo(ot,kt),this.ctx.stroke();}drawPolygon(Z){this.ctx.beginPath(),this.ctx.moveTo(Z.getX(0),Z.getY(0));for(let vt=1;vt<Z.getSize();vt++)this.ctx.lineTo(Z.getX(vt),Z.getY(vt));this.ctx.stroke();}drawRectangle(Z,vt,ot,kt){this.ctx.strokeRect(Z,vt,ot,kt);}fillPolygon(Z){this.ctx.beginPath(),this.ctx.moveTo(Z.getX(0),Z.getY(0));for(let vt=1;vt<Z.getSize();vt++)this.ctx.lineTo(Z.getX(vt),Z.getY(vt));this.ctx.fill();}drawImage(Z,vt,ot,kt,C1,jt,T1,u1,h1){if(arguments.length!==9)throw new Error(`drawImage call with ${arguments.length} arguments unimplemented`);let s1=this.canvasCache.get(Z);if(!s1){s1=document.createElement("canvas");let r0=Z.imageData;s1.width=r0.width,s1.height=r0.height;let K0=s1.getContext("2d");K0.globalAlpha=0,K0.putImageData(r0,0,0),this.canvasCache.set(Z,s1);}this.ctx.drawImage(s1,vt,ot,kt,C1,jt,T1,u1,h1);}isDarkBackground(){return  false;}};var Kl=class{constructor(Z,vt){this.canvasElement=Z,this.changeListener=vt,this.drawContext=new $2(this.canvasElement.getContext("2d"));}getBackgroundRGB(){return 16777215;}getCanvasWidth(){return this.canvasElement.width;}getCanvasHeight(){return this.canvasElement.height;}getDrawContext(){return this.drawContext;}onChange(Z,vt){this.changeListener?.({what:Z,isUserEvent:vt});}getClipboardHandler(){return new ql();}};var Z8t=`
/* We can customize editor styles here. */
`,Qw;function _S(){if(Qw)return Qw;let w=new CSSStyleSheet();return w.replaceSync(Z8t),Qw=w,w;}function ow(w,Z,vt){let ot=-1;function kt(jt,T1,u1=0){T1.button>0||Z.fireMouseEvent(jt,T1.button+1,u1,Math.round(T1.offsetX*R9),Math.round(T1.offsetY*R9),T1.shiftKey,T1.ctrlKey,T1.altKey,T1.button===2);}w.addEventListener("pointerdown",jt=>{ot===-1&&(ot=jt.pointerId,kt(vt.MOUSE_EVENT_PRESSED,jt));});function C1(jt){ot===jt.pointerId&&(ot=-1,kt(vt.MOUSE_EVENT_RELEASED,jt));}return document.addEventListener("pointerup",C1),w.addEventListener("click",jt=>{kt(vt.MOUSE_EVENT_CLICKED,jt,jt.detail);}),w.addEventListener("pointerenter",jt=>{kt(vt.MOUSE_EVENT_ENTERED,jt);}),w.addEventListener("pointerleave",jt=>{kt(vt.MOUSE_EVENT_EXITED,jt);}),w.addEventListener("pointermove",jt=>{ot!==-1?ot===jt.pointerId&&kt(vt.MOUSE_EVENT_DRAGGED,jt):kt(vt.MOUSE_EVENT_MOVED,jt);}),()=>{document.removeEventListener("pointerup",C1);};}function $S(w,Z,vt,ot,kt){let C1=typeof navigator<"u"&&navigator.platform==="MacIntel",jt=u1=>C1&&u1.metaKey||!C1&&u1.ctrlKey;function T1(u1,h1){let s1=W8t(h1,ot);s1!==null&&vt.fireKeyEvent(u1,s1,h1.altKey,h1.ctrlKey,h1.shiftKey,jt(h1));}Z.addEventListener("keydown",u1=>{jt(u1)&&u1.key==="c"||jt(u1)&&u1.key==="v"||T1(ot.KEY_EVENT_PRESSED,u1);}),Z.addEventListener("keyup",u1=>{T1(ot.KEY_EVENT_RELEASED,u1);}),w.addEventListener("paste",u1=>{let h1=u1.clipboardData.getData("text"),s1=kt.fromText(h1);s1&&s1.getAllAtoms()>0&&vt.addPastedOrDropped(s1);});}function W8t(w,Z){switch(w.key){case "Control":return Z.KEY_CTRL;case "Alt":return Z.KEY_ALT;case "Shift":return Z.KEY_SHIFT;case "Delete":case "Backspace":return Z.KEY_DELETE;case "F1":return Z.KEY_HELP;case "Escape":return Z.KEY_ESCAPE;case "Enter":return Z.KEY_ENTER;default:return w.key.length===1?w.key.codePointAt(0):null;}}var Jl=class{constructor(Z){this.canvasElement=Z,this.drawContext=new $2(this.canvasElement.getContext("2d"));}setDimensions(Z,vt){this.canvasElement.width=Z,this.canvasElement.style.width=`${Z/R9}px`,this.canvasElement.height=vt,this.canvasElement.style.height=`${vt/R9}px`;}getDrawContext(){return this.drawContext;}getBackgroundRGB(){return 16777215;}getForegroundRGB(){return 0;}};var aS={"chain.png":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAB2UlEQVR4XmNgGJmAkYGJgQULZGXAhCygIGICQg4GdjTIARRDh5xAEQwNKYzXeK4xY1Oez3SNfz8TmoYUxq+6m9bfqLjDI4tmfhzLff9VR17FoWhwZXpkOm2v1C+79+cbD4gga8lneuhrfdv6/+ItSBpSGB+bTDos9IfzP9N/k3cX6+7wwByWz/TWR/E1w/+kO+8j4BpSGL9rz9wh+Efs14TF3heY/tu/vlF2hxtkSxzLY2/FVyz/om69jT0G8kM6QyNDM9MT41nbZX9y/J/ct1/4iU7aIYb/9q8uVx0UbmF64mV7i/1/0s0HSVM5dRgYrjB84/8U+bh80iH+34z/17Xc51ZhUGX8qpkK1GL6+krltyClVyz/c+69C57CwQsK1v+Sl9rdvgr8Z/7P9WvKxNs8fsD44ABqeWLkdYHhv9sL8e+s/xJuv4k4yajEAI6H/+6llxn+g6DUh75gSXhgugEdmXIUJB5150HSFA59oHKIBteGSyBhpv+q9wsVQaZDICdDKuNnneRjCY9exU3l5AUrh2gQelAQ/8Tgve2Tb25NjIgYBkmnMl5Sumi+hQmiGKqhgaGB57Pts4Bfek0sjkjmIxQhs8BpiZFBh0EPCLGlTnQxcGod8gAAp9es6fCW8G8AAAAASUVORK5CYII=)","eraser.png":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAC1UlEQVR4XnWU309SYRjHn8OYTTM3zTmjC8NFFBR10dJu27wx11VX/QNdeGebTsvua93mRbUmLhURzYgKRZRJUJL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5ErkJggg==)"};var Uw=Object.create(null),tI=3/4,Yl=class{constructor(Z){this.HOTSPOT_32=Z.HOTSPOT_32,this.IMAGE_NAME_32=Z.IMAGE_NAME_32,this.cPointerCursor=Z.cPointerCursor,this.cTextCursor=Z.cTextCursor;}getCursor(Z){if(Uw[Z])return Uw[Z];if(this.IMAGE_NAME_32[Z])return this.buildCursor(Z);switch(Z){case this.cPointerCursor:return "default";case this.cTextCursor:return "text";default:throw new Error(`Unknown cursor: ${Z}`);}}buildCursor(Z){let vt=this.IMAGE_NAME_32[Z],kt=`${aS[vt]} ${this.HOTSPOT_32[Z*2]*tI} ${this.HOTSPOT_32[Z*2+1]*tI}, default`;return Uw[Z]=kt,kt;}};var Xl=class{constructor(Z,vt){this.title=Z,this.rootElement=vt,this.elements=[],this.dialogElement=null;}setLayout(Z,vt){this.hLayout=eI(Z),this.vLayout=`${eI(vt)} auto`;}add(Z,vt,ot,kt,C1){this.elements.push({component:Z,x:vt,y:ot,x2:kt,y2:C1});}createTextField(Z,vt){return new sw(Z,vt);}createLabel(Z){return new Lw(Z);}createComboBox(){return new yw();}createCheckBox(Z){return new lw(Z);}setEventConsumer(Z){this.consumer=Z;}showMessage(Z){window.alert(Z);}showDialog(Z){let vt=document.createElement("dialog"),ot=this.rootElement.getBoundingClientRect();Object.assign(vt.style,{position:"absolute",marginBlock:0,left:`${ot.left}px`,right:`${document.body.parentElement.clientWidth-ot.right}px`,top:`${this.rootElement.offsetTop+30}px`}),this.dialogElement=vt,this.rootElement.getRootNode().append(vt);let kt=document.createElement("form");kt.style.display="grid",kt.style.gridTemplateColumns=this.hLayout,kt.style.gridTemplateRows=this.vLayout,kt.addEventListener("submit",u1=>{u1.preventDefault(),this.consumer.fireOk(),Z();}),vt.append(kt);for(let{component:u1,x:h1,y:s1,x2:r0,y2:K0}of this.elements){let x0=document.createElement("div");r0===void 0?(x0.style.gridColumn=`${h1+1} / ${h1+2}`,x0.style.gridRow=`${s1+1} / ${s1+2}`):(x0.style.gridColumn=`${h1+1} / ${r0+2}`,x0.style.gridRow=`${s1+1} / ${K0+2}`),x0.append(u1.getElement()),kt.append(x0);}let C1=document.createElement("div");Object.assign(C1.style,{display:"flex",flexDirection:"row-reverse",gap:"15px",gridColumn:"1 / -1",gridRow:"-1"}),kt.append(C1);let jt=document.createElement("button");jt.type="submit",jt.textContent="OK",C1.append(jt);let T1=document.createElement("button");T1.type="button",T1.textContent="Cancel",T1.addEventListener("click",()=>{this.consumer.fireCancel(),Z();}),C1.append(T1),vt.showModal(),vt.addEventListener("cancel",()=>{this.consumer.fireCancel(),Z();});}disposeDialog(){this.dialogElement!==null&&(this.dialogElement.remove(),this.dialogElement=null);}},a2=class{setEventHandler(Z){this.eventHandler=Z;}fireEvent(Z,vt){this.eventHandler(Z,vt);}},Lw=class extends a2{constructor(Z){super(),this.element=document.createElement("label"),this.setText(Z);}setText(Z){this.element.textContent=Z;}getElement(){return this.element;}},sw=class extends a2{constructor(){super(),this.element=document.createElement("input"),this.element.type="text";}setText(Z){this.element.value=Z;}getText(){return this.element.value;}getElement(){return this.element;}},yw=class extends a2{constructor(){super(),this.element=document.createElement("select"),this.element.addEventListener("change",()=>{this.fireEvent(2,this.element.selectedIndex);});}setEnabled(Z){this.element.disabled=!Z;}addItem(Z){let vt=document.createElement("option");vt.textContent=Z,this.element.append(vt);}getSelectedIndex(){return this.element.selectedIndex;}setSelectedIndex(Z){this.element.selectedIndex=Z;}setSelectedItem(Z){let vt=this.element.options;for(let ot=0;ot<vt.length;ot++)vt[ot].textContent===Z&&(this.element.selectedIndex=ot);}getSelectedItem(){return this.element.options[this.element.selectedIndex].textContent;}removeAllItems(){this.element.innerHTML="";}setEditable(){}getElement(){return this.element;}},lw=class extends a2{constructor(Z){super();let vt=document.createElement("label"),ot=document.createElement("input");ot.type="checkbox",ot.addEventListener("change",()=>{this.fireEvent(3,ot.checked?1:0);}),vt.append(ot),vt.append(Z),this.element=vt,this.checkBox=ot;}setEnabled(Z){this.checkBox.disabled=!Z;}isSelected(){return this.checkBox.checked;}setSelected(Z){this.checkBox.checked=Z;}getElement(){return this.element;}};function eI(w){return w.map(Z=>Z>0?`${Z}px`:"auto").join(" ");}var tU=class{constructor(Z){this.imageData=Z,this.dataView=new DataView(Z.data.buffer);}getWidth(){return this.imageData.width;}getHeight(){return this.imageData.height;}getRGB(Z,vt){let ot=this.dataView.getInt32((vt*this.imageData.width+Z)*4,false);return (ot&255)<<24|ot>>>8;}setRGB(Z,vt,ot){let kt=ot>>>24&255,C1=ot<<8|kt;this.dataView.setInt32((vt*this.imageData.width+Z)*4,C1,false);}toDataURL(){let Z=document.createElement("canvas"),vt=Z.getContext("2d");return Z.width=this.imageData.width,Z.height=this.imageData.height,vt.putImageData(this.imageData,0,0),Z.toDataURL("image/png");}};var Zl=class{constructor(Z,vt,ot){this.canvasElement=Z,this.dialogRoot=vt,this.JavaEditorArea=ot;}register(Z){this.javaUiHelper=Z,this.cursorManager=new Yl(this.JavaEditorArea,Z);}grabFocus(){this.canvasElement.focus({preventScroll:true});}setCursor(Z){this.canvasElement.style.cursor=this.cursorManager.getCursor(Z);}showHelpDialog(){}createImage(Z,vt){let ot=new ImageData(Z,vt);return new tU(ot);}createImageFromBase64(Z,vt,ot){ot=ot.replaceAll(/%\d+%/g,T1=>"A".repeat(Number(T1.slice(1,-1))));let kt=WS(ot),C1=new Uint8ClampedArray(kt),jt=new ImageData(C1,Z,vt);return new tU(jt);}createDialog(Z){return new Xl(Z,this.dialogRoot);}runLater(Z){typeof requestAnimationFrame=="function"?requestAnimationFrame(Z):typeof setImmediate=="function"?setImmediate(Z):setTimeout(Z,0);}};function AI(w,Z,vt,ot,kt,C1,jt,T1){let{readOnly:u1=false,initialMode:h1="molecule",initialFragment:s1=false}=Z,r0=document.createElement("div");r0.dataset.openchemlibCanvasEditor="true",Object.assign(r0.style,{width:"100%",height:"100%",display:"flex",flexDirection:"row",alignItems:"start",backgroundColor:"white",touchAction:"none",userSelect:"none",webkitUserSelect:"none"});let K0=r0.attachShadow({mode:"open"});K0.adoptedStyleSheets=[_S()];let x0=null;u1||(x0=document.createElement("canvas"),K0.append(x0));let qe=document.createElement("div");Object.assign(qe.style,{width:"100%",height:"100%"}),K0.append(qe);let N0=document.createElement("canvas");N0.tabIndex=0,Object.assign(N0.style,{outline:"none"}),qe.append(N0),w.append(r0);let S8=new C1(new Zl(N0,qe,ot)),JP=new ot(_8t(h1,ot),new Kl(N0,vt),S8);if(s1)if(h1==="molecule"){let we=new jt(0,0);we.setFragment(true),JP.setMolecule(we);}else {let we=T1.create();we.setFragment(true),JP.setReaction(we);}S8.setEditorArea(JP);let tu=u1?null:new kt(JP,new Jl(x0),S8);function eu(we){N0.style.width=`${we.width}px`,N0.width=Math.floor(we.width*R9),N0.style.height=`${we.height}px`,N0.height=Math.floor(we.height*R9),we.width>0&&we.height>0&&JP.repaint();}let eU=qe.getBoundingClientRect();eu(eU);let Au=new ResizeObserver(([we])=>{eu(we.contentRect);});Au.observe(qe);let nu=null,Pu=null,ru=null;u1||(nu=ow(N0,JP,ot),Pu=$S(qe,N0,JP,ot,jt),ru=ow(x0,tu,ot));function AU(){r0.remove(),Au.disconnect(),nu?.(),Pu?.(),ru?.();}return {editorArea:JP,toolbar:tu,uiHelper:S8,destroy:AU};}function _8t(w,Z){switch(w){case "molecule":return 0;case "reaction":return Z.MODE_REACTION|Z.MODE_MULTIPLE_FRAGMENTS;default:throw new Error(`Invalid initial mode: ${w}`);}}function nI(w,Z,vt,ot,kt){class C1{#t;#e;#P;#n;#f;#r;constructor(T1,u1={}){let{editorArea:h1,toolbar:s1,uiHelper:r0,destroy:K0}=AI(T1,u1,x0=>this.#i(x0),w,Z,vt,ot,kt);this.#t=h1,this.#e=s1,this.#P=r0,this.#n=null,this.#f={[w.EDITOR_EVENT_MOLECULE_CHANGED]:"molecule",[w.EDITOR_EVENT_SELECTION_CHANGED]:"selection",[w.EDITOR_EVENT_HIGHLIGHT_ATOM_CHANGED]:"highlight-atom",[w.EDITOR_EVENT_HIGHLIGHT_BOND_CHANGED]:"highlight-bond"},this.#r=K0;}getMode(){return this.#A(),this.#t.getMode()&w.MODE_REACTION!==0?"reaction":"molecule";}setMolecule(T1){this.#A(),this.#t.setMolecule(T1);}getMolecule(){return this.#A(),this.#t.getMolecule();}setReaction(T1){this.#A(),this.#t.setReaction(T1);}getReaction(){return this.#A(),this.#t.getReaction();}setOnChangeListener(T1){this.#A(),this.#n=T1;}removeOnChangeListener(){this.#A(),this.#n=null;}clearAll(){this.#A(),this.#t.clearAll();}destroy(){this.#A(),this.#r(),this.#t=null,this.#e=null,this.#P=null,this.#n=null,this.#r=null;}get isDestroyed(){return !this.#t;}moleculeChanged(){this.#A(),this.#t.moleculeChanged();}#A(){if(this.isDestroyed)throw new Error("CanvasEditor has been destroyed");}#i(T1){if(!this.#n)return;let{what:u1,isUserEvent:h1}=T1;this.#n({type:this.#f[u1],isUserEvent:h1});}}return C1;}function PI(w,Z,vt,ot){class kt extends HTMLElement{static MODE=Object.freeze(Object.create({MOLECULE:"molecule",REACTION:"reaction"}));static observedAttributes=Object.freeze(["idcode","fragment","mode","readonly"]);#t={idcode:"",fragment:false,mode:kt.MODE_MOLECULE,readonly:false};get idcode(){return this.#t.idcode;}set idcode(jt){this.#t.idcode=String(jt),this.setAttribute("idcode",this.#t.idcode);}get fragment(){return this.#t.fragment;}set fragment(jt){this.#t.fragment=!!jt,this.#t.fragment?this.setAttribute("fragment",""):this.removeAttribute("fragment");}get mode(){return this.#t.mode;}set mode(jt){this.#t.mode=String(jt),this.setAttribute("mode",this.#t.mode);}get readonly(){return this.#t.readonly;}set readonly(jt){this.#t.readonly=!!jt,this.#t.readonly?this.setAttribute("readonly",""):this.removeAttribute("readonly");}setMolecule(jt){this.fragment=jt.isFragment(),this.idcode=`${jt.getIDCode()} ${jt.getIDCoordinates()}`,this.#e.setMolecule(jt);}getMolecule(){return this.#e.getMolecule();}setReaction(jt){this.fragment=jt.isFragment(),this.idcode=ot.encode(jt,{keepAbsoluteCoordinates:true,mode:ot.INCLUDE_MAPPING|ot.INCLUDE_COORDS|ot.RETAIN_REACTANT_AND_PRODUCT_ORDER})??"",this.#e.setReaction(jt);}getReaction(){return this.#e.getReaction();}clearAll(){this.#e.clearAll(),this.idcode="";}moleculeChanged(){this.#e.moleculeChanged();}#e;#P(){this.#e||(this.#e=new w(this,{readOnly:this.readonly,initialMode:this.mode}),this.#e.setOnChangeListener(this.#o),requestIdleCallback(()=>this.#n()));}#n(){switch(this.mode){case kt.MODE.MOLECULE:return this.#r();case kt.MODE.REACTION:return this.#A();default:throw new Error(`Mode ${this.mode} is not supported`);}}#f(jt){let T1=jt.indexOf(" ");if(T1===-1)return Z.fromIDCode(jt);let u1=jt.slice(0,T1),h1=jt.slice(T1+1);return Z.fromIDCode(u1,h1);}#r(){let jt=this.#f(this.idcode);jt.setFragment(this.fragment),this.#e.setMolecule(jt);}#A(){let jt=ot.decode(this.idcode,{ensureCoordinates:true})??vt.create();jt.setFragment(this.fragment),this.#e.setReaction(jt);}#i=false;#Q(jt){this.#i=true;try{jt();}finally{this.#i=false;}}#o=jt=>{let T1=this.idcode,u1=this.fragment;this.#Q(()=>{if(jt.type==="molecule")switch(this.mode){case kt.MODE.MOLECULE:{let s1=this.getMolecule();this.idcode=`${s1.getIDCode()} ${s1.getIDCoordinates()}`,this.fragment=s1.isFragment();break;}case kt.MODE.REACTION:{let s1=this.getReaction();this.idcode=ot.encode(s1,{keepAbsoluteCoordinates:true,mode:ot.INCLUDE_MAPPING|ot.INCLUDE_COORDS|ot.RETAIN_REACTANT_AND_PRODUCT_ORDER}),this.fragment=s1.isFragment();break;}default:throw new Error(`Unsupported mode ${this.mode}`);}});let h1=new CustomEvent("change",{detail:jt,bubbles:true});if(this.dispatchEvent(h1),jt.mode==="molecule"){if(this.idcode!==T1){let s1=new CustomEvent("idcode-changed",{detail:this.idcode,bubbles:true});this.dispatchEvent(s1);}if(this.fragment!==u1){let s1=new CustomEvent("fragment-changed",{detail:this.fragment,bubbles:true});this.dispatchEvent(s1);}}};#D(){this.#e&&(this.#e.destroy(),this.#e=void 0);}#u(){this.#D(),this.#P();}connectedCallback(){this.#t={idcode:this.getAttribute("idcode")||"",fragment:this.hasAttribute("fragment"),mode:this.getAttribute("mode")||kt.MODE.MOLECULE,readonly:this.hasAttribute("readonly")},this.#P();}disconnectedCallback(){this.#D();}adoptedCallback(){this.connectedCallback();}attributeChangedCallback(jt,T1,u1){if(!this.#e||this.#i)return;(()=>{switch(jt){case "idcode":return this.#t.idcode=String(u1),()=>this.#n();case "fragment":return this.#t.fragment=u1!==null,()=>this.#n();case "mode":return this.#t.mode=String(u1),()=>this.#u();case "readonly":return this.#t.readonly=u1!==null,()=>this.#u();default:throw new Error("unsupported attribute change");}})()();}}return kt;}function hw(w){let{GenericEditorArea:Z,GenericEditorToolbar:vt,GenericUIHelper:ot,Molecule:kt,Reaction:C1,ReactionEncoder:jt}=w,T1=nI(Z,vt,ot,kt,C1);function u1(){let h1=customElements.get("openchemlib-editor");if(h1)return h1;let s1=PI(T1,kt,C1,jt);customElements.define("openchemlib-editor",s1);let r0=document.createElement("style");return r0.id="openchemlib-editor-default-style",r0.innerHTML=`
    /* dynamicaly added from openchemlib registerCustomElement with low priority */
    openchemlib-editor:defined {
      display: block;
      height: 400px;
      width: 600px;
    }
    `,document.head.prepend(r0),s1;}w.CanvasEditor=T1,w.registerCustomElement=u1,delete w.GenericEditorArea,delete w.GenericEditorToolbar,delete w.GenericUIHelper;}function rI(w){w.prototype.changeCustomLabelPosition=function(vt){switch(vt){case "superscript":for(let ot=0;ot<this.getAllAtoms();ot++){let kt=this.getAtomCustomLabel(ot);kt&&!kt.startsWith("]")&&this.setAtomCustomLabel(ot,`]${kt}`);}break;case "normal":for(let ot=0;ot<this.getAllAtoms();ot++){let kt=this.getAtomCustomLabel(ot);kt?.startsWith("]")&&this.setAtomCustomLabel(ot,kt.slice(1));}break;case "auto":for(let ot=0;ot<this.getAllAtoms();ot++){let kt=this.getAtomCustomLabel(ot);kt&&(this.getAtomLabel(ot)==="C"?kt.startsWith("]")&&this.setAtomCustomLabel(ot,kt.slice(1)):kt.startsWith("]")||this.setAtomCustomLabel(ot,`]${kt}`));}break;}};}function iI(w){w.prototype.getNextCustomAtomLabel=function(vt){let ot=vt||"1",kt=new Set();for(let jt=0;jt<this.getAllAtoms();jt++){let T1=this.getAtomCustomLabel(jt);T1&&kt.add(T1);}let C1=0;for(;kt.has(ot)&&C1++<100;)ot=$8t(ot);return ot;};}function $8t(w){let Z=w.match(/(\d+)/);if(Z){let ot=Number.parseInt(Z[1],10);return w.replace(/(\d+)/,(ot+1).toString());}let vt=w.match(/([a-yA-Y])([^a-zA-Z]*)$/);if(vt){let ot=vt[1],kt=String.fromCodePoint(ot.codePointAt(0)+1);return kt==="Z"||kt==="z"?"1":w.replace(/([a-yA-Y])([^a-zA-Z]*)$/,`${kt}$2`);}return "1";}function fI(w){let Z=w.fromMolfile;w.fromMolfile=function(ot,kt={}){let{customLabelPosition:C1}=kt,jt=Z.call(this,ot),T1=ot.includes(`\r
`)?`\r
`:`
`,u1=ot.split(T1);if(u1.length<4||!u1[3].includes("V2000"))return jt;let h1=u1.slice(4+jt.getAllAtoms()+jt.getAllBonds());for(let s1=0;s1<h1.length;s1++){let r0=h1[s1];if(r0.startsWith("A  ")){let K0=Number(r0.slice(3)),x0=h1[s1+1]?.trim();s1++,!Number.isNaN(K0)&&K0<=jt.getAllAtoms()&&x0&&!jt.getAtomCustomLabel(K0-1)&&jt.setAtomCustomLabel(K0-1,x0);}if(r0.startsWith("V  ")){let K0=r0.split(" ").filter(Boolean);if(K0.length>=3){let x0=Number(K0[1]),qe=K0.slice(2).join(" ");!Number.isNaN(x0)&&x0<=jt.getAllAtoms()&&!jt.getAtomCustomLabel(x0-1)&&jt.setAtomCustomLabel(x0-1,qe);}}if(r0.startsWith("M  ZZC")){let K0=Number(r0.slice(7,10).trim()),x0=r0.slice(10).trim();K0&&x0&&jt.setAtomCustomLabel(K0-1,x0);}}return jt.changeCustomLabelPosition(C1),jt;};}var a8t=["M  STY","M  SLB","M  SAL","M  SDT","M  SDD","M  SED"];function DI(w){let Z=w.prototype.toMolfile;w.prototype.toMolfile=function(ot={}){let kt=this.getCompactCopy(),{includeCustomAtomLabelsAsALines:C1=false,includeCustomAtomLabelsAsVLines:jt=false,customLabelPosition:T1,removeCustomAtomLabels:u1=false}=ot;kt.changeCustomLabelPosition(T1);let h1=Z.call(kt);if(!C1&&!jt&&!u1)return h1;let s1=h1.includes(`\r
`)?`\r
`:`
`,r0=h1.split(s1);if(u1&&(r0=r0.filter(qe=>!a8t.some(N0=>qe.startsWith(N0)))),r0.length<4||!r0[3].includes("V2000"))return h1;let K0=[];for(let qe=0;qe<kt.getAllAtoms();qe++){let N0=kt.getAtomCustomLabel(qe);if(N0){let S8=String(qe+1).padStart(3," ");C1&&K0.push(`A  ${S8}`,N0),jt&&K0.push(`V  ${S8} ${N0}`);}}let x0=r0.findIndex(qe=>qe.startsWith("M  END"));return x0===-1?h1:(r0.splice(x0,0,...K0),r0.join(s1));};}function QI(w){let Z=w.prototype.toRxn,vt=w.prototype.toRxnV3;w.prototype.toRxn=function(kt={}){return uI(this,Z,kt);},w.prototype.toRxnV3=function(kt={}){return uI(this,vt,kt);};}function uI(w,Z,vt){let{programName:ot="",keepIdCode:kt=false}=vt,C1=Z.call(w,ot);return kt?C1:C1.replace(/^OCL_RXN_V1.0:.*$/m,"");}function oI(w){let Z=w.prototype.toSVG;w.prototype.toSVG=function(ot,kt,C1,jt){if(typeof ot!="number"||typeof kt!="number")throw new Error("Molecule#toSVG requires width and height to be specified");jt=jt||{};let T1=jt.factorTextSize||1,u1=jt.autoCrop===true,h1=jt.autoCropMargin===void 0?5:jt.autoCropMargin,s1=Z.call(this,ot,kt,T1,u1,h1,C1,jt),r0=/svg id="(.*)" xmlns/.exec(s1)[1];return s1=s1.replace("<style>",`<style> #${r0} text {font-family: sans-serif;}`),s1=s1.replace("line {",`#${r0} line {`),s1=s1.replace("polygon {",`#${r0} polygon {`),jt.fontWeight&&(s1=s1.replaceAll("font-size=",`font-weight="${jt.fontWeight}" font-size=`)),jt.strokeWidth&&(s1=s1.replaceAll(/stroke-width="[^"]+"/g,`stroke-width="${jt.strokeWidth}"`)),s1;};}function UI(w){let{ConformerGenerator:Z,ForceFieldMMFF94:vt,Molecule:ot,Reaction:kt}=w;Z.prototype.molecules=function*(){let h1;for(;(h1=this.getNextConformerAsMolecule())!==null;)yield h1;};let C1={maxIts:4e3,gradTol:1e-4,funcTol:1e-6},jt=vt.prototype._minimise;delete vt.prototype._minimise,vt.prototype.minimise=function(h1){return h1={...C1,...h1},jt.call(this,h1.maxIts,h1.gradTol,h1.funcTol);},rI(ot),iI(ot),fI(ot),DI(ot),QI(kt),oI(ot);function T1(u1){if(!u1)return null;if(u1.includes("V2000")||u1.includes("V3000"))return ot.fromMolfile(u1);try{return ot.fromSmiles(u1);}catch{}try{return ot.fromIDCode(u1);}catch{}return null;}ot.fromText=function(h1){let s1=T1(h1);return s1&&s1.getAllAtoms()>0?s1:null;},ot.prototype.getOCL=function(){return w;};}function rD(){}function trt(w){let Z=w.document,vt={},kt=rD;kt.__moduleStartupDone=rD;function u1(){}function h1(){}function s1(){}function r0(){}function K0(){}function x0(){}function qe(){}function N0(){}function S8(){}function JP(){}function tu(){}function eu(){}function eU(){}function Au(){}function nu(){}function Pu(){}function ru(){}function AU(){}function we(){}function iD(){}function Tw(){}function Wl(){}function cw(){}function ww(){}function gw(){}function dw(){}function _l(){}function fD(){}function Bw(){}function DD(){}function v1(){}function sI(){}function vw(){}function Fw(){}function kw(){}function ki(){}function $l(){}function Q0(){}function mw(){}function bw(){}function nU(){}function jw(){}function Rw(){}function PU(){}function al(){}function pw(){}function Mw(){}function Cw(){}function Hw(){}function Vw(){}function Ew(){}function Sw(){}function Iw(){}function xw(){}function Nw(){}function Gw(){}function Ow(){}function qw(){}function zw(){}function Kw(){}function Jw(){}function Yw(){}function Xw(){}function Zw(){}function Ww(){}function yI(t,e){t.G=e;}function lI(t,e){t.d=e;}function hI(t,e){t.f=e;}function TI(t,e){t.i=e;}function cI(t,e){t.i=e;}function th(t,e){t.J=e;}function wI(t,e){t.U=e;}function gI(t,e){t.T=e;}function dI(t,e){t.P=e;}function iu(t,e){t.Q=e;}function BI(t,e){t.f=e;}function vI(t,e){t.n=e;}function _w(t,e){t.p=e;}function FI(t,e){t.b=e;}function kI(t,e){t.e=e;}function mI(t,e){t.r=e;}function bI(t){t.a=t.b;}function $w(t){this.a=t;}function rU(t){this.a=t;}function p9(t){this.j=t;}function WA(t){this.b=t;}function aw(t){this.e=t;}function t7(t){this.e=t;}function e7(t){this.a=t;}function A7(t){this.a=t;}function n7(t){this.a=t;}function P7(t){this.a=t;}function r7(t){this.a=t;}function i7(t){this.a=t;}function f7(t){this.a=t;}function D7(t){this.a=t;}function u7(t){this.a=t;}function fu(t){this.a=t;}function iU(t){this.a=t;}function uD(t){this.a=t;}function Q7(t){this.b=t;}function Du(){this.i=0;}function o7(){this.i=1;}function U7(){this.a=-1;}function eh(){this.b=-1;}function mi(t){this.a=t;}function uu(t){this.a=t;}function Ah(t){this.a=t;}function nh(t){this.a=t;}function Ph(t){this.a=t;}function QD(t){this.a=t;}function rh(t){this.d=t;}function ih(t){this.a=t;}function fh(t){this.a=t;}function oD(t){this.a=t;}function UD(t){this.a=t;}function br(t){this.a=t;}function jr(t){this.a=t;}function Dh(t){this.b=t;}function fU(t){this.b=t;}function L7(t){this.a=t;}function s7(t){this.c=t;}function Zt(t){this.c=t;}function y7(t){this.a=t;}function uh(t){this.a=t;}function l7(t){this.c=t;}function h7(t){this.a=t;}function T7(t){this.a=t;}function c7(t){this.a=t;}function w7(t){this.a=t;}function g7(t){this.a=t;}function d7(t){this.a=t;}function jI(t,e){t.a=e;}function RI(t,e){t.a=e;}function pI(t,e){t.d=e;}function MI(t,e){t.e=e;}function DU(t,e){t.n=e;}function CI(t,e){t.U&=~e;}function B7(t,e){t.D[e]=-1;}function HI(t,e){f2(e,t.a);}function VI(t,e){II(e,t.B);}function EI(t,e){xI(e,t.v);}function SI(t,e){Vx(e,t.f);}function II(t,e){fq(t.a,e);}function xI(t,e){Dq(t.a,e);}function NI(t,e){DQ(t.a,e);}function Qh(t,e){Ft(t.a,e);}function oh(t,e){Ft(t.a,e);}function YP(t,e){Ft(t.a,e);}function GI(t,e){Ft(t.S,e);}function uU(t,e){cA(t.d,e);}function n1(){bD(this);}function Qu(){hU(this);}function Jn(){i8(this);}function Uh(t){DZ(this,t);}function QU(){n1.call(this);}function v7(){n1.call(this);}function F7(){S9.call(this);}function OI(t){return MX(t);}function qI(t){return IX(t);}function zI(){return ++hE;}function ou(){this.c=new n1();}function LD(){this.a=new n1();}function k7(){this.a=new n1();}function m7(){this.a=new MU();}function b7(){k7.call(this);}function Lh(){k7.call(this);}function sh(){S9.call(this);}function Rr(){S9.call(this);}function bi(t,e){t.length=e;}function KI(t,e){t.I[e]=512;}function hP(t,e){t.v[e]|=o0;}function yh(t,e){t.G[e]|=q0;}function JI(t,e,A){t.k[e]=A;}function YI(t,e){t.r=e,t.U=0;}function XI(t,e){t.s=e,t.U=0;}function QA(t,e){Ni(t.a,e);}function ZI(t,e){Ft(t.c,e);}function w0(){w0=v1,_u();}function lh(){S9.call(this);}function j7(){S9.call(this);}function mA(){S9.call(this);}function hh(){S9.call(this);}function R7(){S9.call(this);}function p7(){dQ.call(this,0);}function WI(t){t.a>0&&--t.a;}function _I(t){return ir(t);}function $I(t){return t>>>0;}function aI(){return pf(),F9;}function M7(){this.b=new Vr();}function C7(){this.a=new n1();}function Th(){this.a=new gD();}function tx(t){this.a=t,Li(t);}function sD(t){this.a=ZK(t);}function ji(){this.a=new Jn();}function oU(){this.a=new gk();}function ch(){this.a=new cP();}function H7(){this.a=new cP();}function V7(){fM(),this.b=Et;}function Ri(t){zL(t),t.d=null;}function ex(t){kS=t,No=true;}function Ax(t){An(),J1(),Bn=t;}function M9(t){H1.call(this,t);}function E7(){sh.call(this);}function nx(t,e){QA(e,t.a.a);}function UU(t,e,A){t.k[e].a=A;}function LU(t,e,A){t.k[e].b=A;}function sU(t,e,A){t.k[e].c=A;}function Px(t,e){return t.o[e];}function rx(t,e){return t.X[e];}function ix(t,e){return t.Y[e];}function yD(t,e){return t.e[e];}function Ct(t,e){return t.e[e];}function e0(t,e){return t.p[e];}function O(t,e){return t.k[e];}function R1(t,e){return t.t[e];}function S7(t,e){return t.K[e];}function ge(t,e){return t.B[e];}function h0(t,e){return t.C[e];}function X(t,e){return t.D[e];}function fe(t,e){return t.H[e];}function c1(t,e){return t.I[e];}function fx(t,e){return t.d[e];}function wh(t,e){return t.e[e];}function Dx(t,e){return t.f[e];}function pr(t,e){return t.a[e];}function Z0(t,e){return t.k[e];}function Uu(t,e){return t.a[e];}function Lu(t,e){return t.b[e];}function lD(t,e){return t.e[e];}function ux(t,e){return t.a[e];}function I7(t,e){return t.b[e];}function x7(t,e){return t.c[e];}function Qx(t,e,A){f8(t.a,A,e);}function ox(t){MK(t.a,t.c,t.b);}function N7(t){M9.call(this,t);}function G7(t){PX.call(this,t);}function O7(t){Htt.call(this,t);}function q7(t){_U.call(this,t);}function z7(t){_U.call(this,t);}function K7(t){_U.call(this,t);}function J7(t){_U.call(this,t);}function XP(t){M9.call(this,t);}function Y7(t){M9.call(this,t);}function X7(t){ts.call(this,t);}function pi(t){return y1(t),t;}function hD(t){return y1(t),t;}function Ux(t){return fP*t*t;}function Lx(t,e){return t.db[e];}function sx(t){return si(t),t.B;}function yx(t){return si(t),t.H;}function lx(t){return ys(t,t.i);}function hx(t,e){return cJ(t,e);}function Tx(t,e){return PK(t,e);}function TD(t,e){t.U|=248&(8|e);}function Z7(t,e){t.g=new $i(e);}function Mi(t){t.b=null,t.c=0;}function I8(t){M9.call(this,t);}function ZP(t){M9.call(this,t);}function yU(t){M9.call(this,t);}function W7(t){M9.call(this,t);}function cD(t){M9.call(this,t);}function cx(t){nG(t,t.length);}function wx(t){aN(t,t.length);}function gx(t){tG(t,t.length);}function dx(t){PG(t,t.length);}function gh(t){xu(t,t.length);}function lU(t){y1(t),this.a=t;}function dh(t){new n1(),this.a=t;}function _7(t){return 4e3*t*t;}function Bx(t){return 8e3*t*t;}function WP(t){return !!t&&t.b;}function $7(t){return t.b==t.c;}function Bh(t,e){return t.a[e];}function d(t,e){return uv(t,e);}function a7(t){return zu(t,t.jb);}function v0(t,e){return t.v[e]&3;}function mt(t,e){return t.K[e].a;}function Rt(t,e){return t.K[e].b;}function oA(t,e){return t.K[e].c;}function ze(t,e){return t.G[e]&3;}function Fn(t,e){return t.A[e]<0;}function wD(t,e,A){HD(t.k[e],A);}function bA(t){qA.call(this,t,0);}function tg(t){dD.call(this,t,0);}function vh(t){XP.call(this,t);}function _A(){J1(),i3.call(this);}function eg(t){this.b=t,this.a=1;}function hU(t){t.a=0,t.b=0,t.c=1;}function vx(t,e){t.c=e,t.U&=-144;}function Mr(t,e){return t.k[e].a;}function Cr(t,e){return t.k[e].b;}function Hr(t,e){return t.k[e].c;}function Fx(t){return t.c||bQ(t);}function kx(t){return An(),ii(t);}function mx(t){return An(),Pi(t);}function Ag(t){tx.call(this,t.a);}function ng(t){XP.call(this,t);}function _P(t){ZP.call(this,t);}function gD(){uu.call(this,"");}function su(){uu.call(this,"");}function C0(){uu.call(this,"");}function Vr(){uu.call(this,"");}function Fh(t){sD.call(this,t);}function TU(t){fU.call(this,t);}function Pg(t){NU.call(this,t);}function rg(t){TU.call(this,t);}function ig(t){XB.call(this,t);}function kh(t){x8.call(this,t);}function mh(t){w7.call(this,t);}function fg(t){xr.call(this,t);}function Ci(){Oh.call(this,null);}function Dg(){Dg=v1,p1=new Td();}function ug(){ug=v1,cc=new u1();}function bh(){bh=v1,wc=new Bw();}function Hi(){Hi=v1,cl=new Jn();}function Er(){Er=v1,jo=false;}function yu(t){return qU(t),t.n;}function lu(t,e){return hF(t,e);}function bx(t,e){uN(t.b,t.a,e);}function cU(t,e){return t<e?t:t-e;}function Z1(t,e){return e*t.c+t.b;}function W1(t,e){return e*t.c+t.a;}function jh(t,e){return G(t.j,e);}function Qg(t,e){return G(t.k,e);}function Rh(t,e){return Lx(t.d,e);}function jx(t,e){return Px(t.d,e);}function H0(t,e){return zU(t.d,e);}function Rx(t,e){return G(t.a,e);}function ph(t,e){return G(t.f,e);}function C9(t,e){return G(t.g,e);}function jA(t,e){return t.v[e]&48;}function hu(t,e){return t.B[e]==0;}function px(t,e){return Qf(t.d,e);}function Tu(t){return tj(t,u6(t));}function og(t){return t.l|t.m<<22;}function kn(t){return ut(t,7),t.q;}function Mx(t,e){return t.a+=e,t;}function Mh(t,e){return t.a+=e,t;}function b0(t,e,A){t.t[e]=A,t.U=0;}function g0(t,e,A){t.I[e]=A,t.U=0;}function Ug(t,e){Ft(t.f,e),t.d=-1;}function Lg(t,e){Ft(t.g,e),t.d=-1;}function Cx(){Go!=0&&(Go=0),Oo=-1;}function Ch(){Ch=v1,tS=(w5(),Eo);}function x8(t){this.a=(y1(t),t);}function wU(t){this.a=new Ji(t);}function sg(t){this.a=new O7(t.a);}function Sr(t){this.b=t,this.a=0;}function yg(){this.a=0,this.b=0;}function dD(t,e){this.k=t,this.j=e;}function u(t,e){this.b=t,this.a=e;}function UA(t,e){return t.a[e]&d1;}function TP(t,e){return t.c[e]&d1;}function cu(t,e){return t.I[e]&127;}function wu(t,e){return t.v[e]&448;}function Hx(t,e){return t.D[e]==-1;}function Vi(t,e){return a0[t.D[e]];}function gU(t,e){Ktt.call(this,t,e);}function BD(t){nZ.call(this,t,t.o);}function dU(){sq.call(this,new we());}function vD(t,e){gu.call(this,t,e);}function lg(t,e){this.b=t,this.a=e;}function $P(t,e){this.a=t,this.b=e;}function gu(t,e){this.a=t,this.b=e;}function hg(t,e){this.a=t,this.b=e;}function ae(t,e){this.a=t,this.b=e;}function Tg(t,e){this.a=t,this.b=e;}function cg(t,e){this.a=t,this.b=e;}function wg(t,e){this.a=t,this.b=e;}function BU(t,e){this.b=t,this.a=e;}function FD(t,e){this.b=t,this.a=e;}function gg(t,e){this.a=t,this.b=e;}function dg(t,e){this.a=t,this.b=e;}function vU(t,e){this.k=e,this.j=t;}function Hh(t,e){this.a=t,this.b=e;}function Ei(t,e){gu.call(this,t,e);}function Bg(t,e,A){GA(t,A),MA(t,e);}function Vx(t,e){sz(t.a,t.b,t.c,e);}function Ex(t,e){cL(t.c,new P7(e));}function Sx(){throw At(new mA());}function Vh(){throw At(new mA());}function q1(){q1=v1,k9=new kw();}function FU(){FU=v1,Vl=new bw();}function vg(){Ll==null&&(Ll=[]);}function Fg(t){ID.call(this,t,0);}function kg(){XB.call(this,null);}function cP(){Ji.call(this,null);}function un(t){this.b=t,this.a=-2;}function Ix(t){throw new Error(t);}function aP(t){return t.a.c+t.c.c;}function mg(t,e){return Ft(t.a,e);}function bg(t,e){return Qf(t.a,e);}function xx(t,e){return t.exec(e);}function K(t,e,A){return t.F[e][A];}function _(t,e,A){return t.j[e][A];}function Nt(t,e,A){return t.n[e][A];}function EA(t,e,A){return t.o[e][A];}function Nx(t,e){return t.I[e]==512;}function Eh(t,e){return G(t.a,e).a;}function jg(t,e){return G(t.a,e).b;}function Rg(t){return CA(t,1,t.c)>0;}function Gx(t){return Array.from(t);}function Ox(){return new P8(new U8());}function pg(){Ch(),No||ML(),new lp();}function Mg(t){eM(),P1t.call(this,t);}function Cg(){xr.call(this,null);}function Ir(t,e){gu.call(this,t,e);}function Hg(t,e){this.a=t,this.b=e;}function qx(t,e){fG(t),t.b.bd(e);}function I1(t,e){return z(t,e)>0;}function Si(t,e){return z(t,e)<0;}function du(t,e){return Kr(t.a,e);}function Bu(t,e){return $g(e,t.a);}function Sh(t,e){return $g(e,t.a);}function H9(t){return t.b=Cv(t.a);}function kU(t,e){return JU(t.a,e);}function Vg(t,e){return t.a.get(e);}function mU(t,e){zr(t,t.length,e);}function vu(t,e){gu.call(this,t,e);}function bU(t,e){gu.call(this,t,e);}function Eg(t,e){this.a=t,this.b=e;}function wP(t,e){this.a=t,this.b=e;}function Sg(t,e){this.a=t,this.c=e;}function jU(t,e){this.c=t,this.d=e;}function Ig(t,e){this.b=t,this.a=e;}function xg(t,e){this.b=t,this.a=e;}function Ng(t,e){this.b=t,this.a=e;}function zx(t){return t.B?t.B.t:1;}function Fu(t){return typeof t===m2;}function Ii(t){return typeof t===s9;}function N8(t){return typeof t===Mf;}function z1(t){return t??null;}function Ih(t,e){return t==e-1?0:t+1;}function Kx(t,e){j6.call(this,t,0,e);}function Jx(t){w.clearTimeout(t);}function Gg(t){this.b=t,this.c=false;}function Og(){No||ML(),this.a=new nm();}function tA(t,e,A,n){t.A[e]=n?-A:A;}function de(t,e,A){t.K[e].a=A,t.U&=7;}function Ve(t,e,A){t.K[e].b=A,t.U&=7;}function Yn(t,e,A){t.K[e].c=A,t.U&=7;}function n0(t,e){return z(t,e)==0;}function ku(t,e){return z(t,e)>=0;}function qg(t,e){return z(t,e)<=0;}function gt(t,e){return z(t,e)!=0;}function Yx(t,e){return An(),Ze(t,e);}function Xx(t,e){return An(),zA(t,e);}function zg(t,e){return z1(t)===z1(e);}function xh(t,e,A){return t.e[e][A];}function Nh(t,e,A){return t.f[e][A];}function xi(t,e){return (t.v[e]&4)!=0;}function RU(t,e){return (t.G[e]&4)!=0;}function Le(t,e){return t.j[e].length;}function Gh(t,e){return t.e[e]-t.k[e];}function pU(t,e){return (t.v[e]&8)!=0;}function Kg(t){return parseInt(t)||-1;}function Zx(t,e,A){f8(t.f,A,e),t.d=-1;}function Wx(t,e,A){f8(t.g,A,e),t.d=-1;}function Ni(t,e){return t.a+=""+e,t;}function Jg(t,e){return t.a+=""+e,t;}function q(t,e){return t.a+=""+e,t;}function xr(t){this.f=t,this.g=true;}function Oh(t){this.d=new n1(),this.c=t;}function Yg(){this.c=new cP(),this.b=0;}function MU(){pf(),this.g=new Gr(),DJ();}function CU(){CU=v1,Ac=zA("X",32);}function Xg(){Xg=v1,Zf=(q1(),nn);}function Zg(){Zg=v1,R8=(q1(),nn);}function mu(t){g6(),YB.call(this,t,0);}function Wg(){w7.call(this,"UTF-8");}function qh(t){U8.call(this),this.e=t;}function Nr(t){return t.b<t.d.size();}function t8(t){return t?t.jd():null;}function _g(t){return G0(t.l,t.m,t.h);}function G8(t){return dP(t,t.r,t.s,Bn);}function _x(t,e,A){return t6(t.a,e,A);}function bu(t,e){return (t.G[e]&48)>>4;}function LA(t,e){return (t.G[e]&64)!=0;}function $x(t,e){return t.k[e]-JL(t,e);}function $g(t,e){return t.toFixed(e);}function ag(t,e){return e==0?t.i:t.j;}function L0(t){return typeof t===s9;}function ax(t,e){return V0(t.a[e][3]);}function tN(t,e){return V0(t.a[e][2]);}function td(t,e){return V0(t.a[e][2]);}function ed(t,e){return V0(t.a[e][1]);}function kD(t,e){uG(t.a,t.a.length,e);}function ju(t,e){ai(t,0,t.length,e);}function e8(t,e,A){Ft(t.a,new ae(e,A));}function HU(t,e,A,n){t.a=e,t.b=A,t.c=n;}function Ad(t,e,A,n){t.e=e,t.c=A,t.d=n;}function mD(t,e,A,n){t.F[e][A]=n,t.U=0;}function nd(t,e){this.b=iP(e),this.a=t;}function Pd(t,e){this.b=iP(e),this.a=t;}function rd(t,e){return t.a+=Fe(e),t;}function id(t){Ce(),Qz.call(this,t);}function fd(){vu.call(this,"Head",1);}function Dd(){vu.call(this,"Tail",3);}function ud(t){Yq.call(this,t,UO());}function zh(t){Kx.call(this,t,new Vr());}function Qd(t){oW.call(this,t,new Vr());}function bD(t){t.a=c(qn,A0,1,0,5,1);}function od(t){ai(t,0,t.length,null);}function Kh(t){ut(t,31),t.d&&xY(t.d);}function VU(t){return t!=null?fr(t):0;}function eN(t){return t.e==null?"":t.e;}function gP(t,e){return (t.G[e]&768)>>8;}function Jh(t,e){return (t.G[e]&g8)!=0;}function Ru(t,e){return (t.H[e]&d8)!=0;}function Ud(t,e){return (t.v[e]&o0)!=0;}function V9(t,e){return (t.G[e]&o0)!=0;}function Yh(t,e){return (t.G[e]&q0)!=0;}function W0(t,e){return (t.v[e]&q0)!=0;}function E9(t,e){return (t.v[e]&oo)!=0;}function O8(t,e){return (t.v[e]&wn)!=0;}function Gi(t,e){return (t.v[e]&gn)!=0;}function AN(t,e){return (t.v[e]&S0)!=0;}function nN(t,e){return (t.v[e]&je)!=0;}function f0(t,e){return (t.a[e]&o0)!=0;}function Ee(t,e){return (t.c[e]&o0)!=0;}function q8(t,e){return (t.c[e]&q0)!=0;}function PN(t,e){return (t.a[e]&q0)!=0;}function Xh(t,e){return (t.a[e]&v8)!=0;}function i0(t,e){return (t.v[e]&512)!=0;}function A8(t,e){return (t.G[e]&128)!=0;}function Zh(t,e){return t<e?-1:t>e?1:0;}function Wh(t,e,A){return {x:t,y:e,z:A};}function G0(t,e,A){return {l:t,m:e,h:A};}function Qn(t,e){return dP(t,t.r,t.s,e);}function SA(t,e){J1(),DF.call(this,t,e);}function sA(t){An(),UL.call(this,0,0,t);}function Ld(){RL.call(this,"#","","");}function sd(){vu.call(this,"Range",2);}function rN(t,e,A){return LN(t.a,e,A);}function iN(t,e){return new xg(t.a,e);}function Yt(t,e){return t!=null&&vJ(t,e);}function EU(t,e){gL(t,e),t.d&&(e.U=0);}function fN(t,e){t.I[e]=512,Rf(t),t.U=0;}function DN(t,e){e.Nb(t.c),Zq(e,t.a,t.b);}function _h(t,e){wv(e,t.c),GL(e,t.a,t.b);}function uN(t,e,A){jI(t,rN(e,t.a,A));}function QN(t,e,A,n){t.a.rd(A,e.od(n));}function SU(t,e,A){return t.j=e,k6(t,A);}function Ft(t,e){return t.a.push(e),true;}function De(t,e){return (t.v[e]&b1)>>18;}function $h(t,e){return (t.H[e]&7680)>>9;}function ah(t,e){return G(t.k,e).length;}function z8(t){return PP(t,0,t.length);}function At(t){return t.backingJsObject;}function mn(t,e){return e<t.g&&f0(t.q,e);}function oN(t,e){return e<t.g&&Xh(t.q,e);}function eA(t,e){return e<t.i&&Ee(t.q,e);}function UN(t,e){return V0(t.b[e-1][2]);}function yd(t,e,A){return V0(t.a[e][A]);}function t3(t,e,A){return e.od(t.od(A));}function LN(t,e,A){return t.a.rd(e,A),e;}function sN(t,e,A){t.a=e^1502,t.b=A^ol;}function ld(t,e,A){t.i[0].a=e,t.i[0].b=A;}function yN(t,e){t.q=n5(new fv(t.o,e),t);}function e3(t){t.g=c(uS,c0,116,0,0,1);}function pu(t){Ke.call(this,t.a,t.b,t.c);}function hd(t){this.c=t,this.b=t.length;}function IU(){this.a=0,this.b=0,this.c=0;}function Td(){this.a=0,this.b=0,this.c=0;}function S9(){e3(this),a3(this),this.kc();}function lN(){return An(),J1(),J1(),Bn;}function hN(t,e){return {type:e,value:t};}function TN(t){return e1(s9,typeof t);}function cN(t){return e1(Mf,typeof t);}function jD(t){return t.$H||(t.$H=++hE);}function A3(t){return t.p==null?t.o.Q:t.p;}function Mu(t){return Dg(),Ftt(t,t.length);}function wN(t){return t.l+t.m*oP+t.h*UP;}function gN(t){return t>=56320&&t<=57343;}function xU(t){this.d=c(XA,re,6,t,14,1);}function cd(t,e){this.a=new qA(t.a,r$(e));}function wd(t,e,A){this.a=new ep(t.a,e.a);}function gd(t){No||ML(),this.a=new ud(t);}function dd(){Ci.call(this),this.b=new n1();}function NU(t){fU.call(this,t),this.a=t;}function bn(t){uu.call(this,(y1(t),t));}function K8(t){this.a=t,Dh.call(this,t);}function Bd(){this.a=c(qn,A0,1,8,5,1);}function vd(){this.a=c(F,m,6,0,15,1);}function Fd(){this.b=new eh(),this.a=this.b;}function GU(t){t.e=Ge,t.a=null,t.d=null;}function n3(t,e){return jL(t.a,e)!=null;}function Oi(t,e){return Be(t.a,A3(e.c));}function Cu(t,e,A){return en(t,e,A,t.D[e]);}function OU(t,e){return (t.v[e]&49152)>>14;}function dN(t,e){return {molecule:t,map:e};}function I9(t,e){return e<0?null:G(t.d,e);}function BN(t,e,A){return pY(Jp(t.a,e,A));}function RD(t,e,A){t.v[e]&=-449,t.v[e]|=A;}function n8(t,e,A,n){t.a+=e,t.b+=A,t.c+=n;}function se(t,e){t.d[t.c]=at(t.d[t.c],e);}function vN(t,e){We(t.a,A3(e.c),new Rd());}function pD(t,e,A){return $F(t,e,e,A),t;}function FN(t,e,A,n,P){yb(e,A,t.i[n][P]);}function kd(t,e,A){t.Q=-6,t.F=e,t.D=A,Tj(t);}function md(t,e){t.s=w.Math.min(e,t.t);}function qU(t){t.n==null&&gZ(t);}function kN(t){if(!t)throw At(new lh());}function bd(t){if(!t)throw At(new lh());}function x9(t){if(!t)throw At(new j7());}function MD(t){if(!t)throw At(new R7());}function jd(t){if(!t)throw At(new hh());}function Hu(t){Mk.call(this,t),this.e=NaN;}function P3(t,e){this.c=1,this.a=t,this.b=e;}function Xn(t,e){this.a=0,this.b=t,this.c=e;}function Rd(){this.b=new C0(),this.c=new n1();}function pd(){this.e=new Jn(),this.c=5e5;}function Md(t){this.a=c(Pt,it,6,t,16,1);}function mN(t){return t<0?t+36:t>=36?t-36:t;}function zU(t,e){return t.g==null?-1:t.g[e];}function Cd(t,e){return t.j==null?-1:t.j[e];}function Hd(t,e){return t&&e&&t instanceof e;}function bN(t,e){return lu(new Array(e),t);}function dP(t,e,A,n){return LR(t,e,A,n,t.K);}function jN(t,e,A,n,P){return qZ(t,e,A,n,P);}function Vd(t,e){return VO(t,e,t.a.length-1);}function CD(t,e){return S5(t,e,e.r,e.s,true);}function qi(t,e){return t.j[e].length-t.e[e];}function Ed(t){return t.c==1&&t.a==0&&t.b==0;}function AA(t,e){t.a=e,t.c=0,t.b=63,wx(t.d);}function RN(t,e){t.backingJsObject=e,Wb(t,e);}function r3(t,e){Hi(),$B(cl,t)||qD(cl,t,e);}function pN(t,e){K1(t),gR(t,WQ(e,true,null));}function HD(t,e){return HU(t,e.a,e.b,e.c),t;}function Sd(t,e){var A;return A=t.d,t.d=e,A;}function MN(t,e){return Er(),t==e?0:t?1:-1;}function CN(t,e,A,n){return An(),pA(t,e,A,n);}function HN(t,e,A){return t.apply(e,A);}function Id(t,e){return y1(e),new wP(t,e);}function xd(t,e){return y1(e),new wP(t,e);}function VN(t){return Ot(j0(t,32))^Ot(t);}function on(t){return z8(F2(t,0,t.length));}function Nd(t){return t.d.length-t.c.length;}function e1(t,e){return y1(t),z1(t)===z1(e);}function EN(t,e,A){t.ub(e-t.V/2,A-t.V/2,t.V);}function Gd(t,e,A){t.G[e]&=-49,t.G[e]|=A<<4;}function Vu(t,e,A){this.b=t,this.c=e,this.a=A;}function Ke(t,e,A){this.a=t,this.b=e,this.c=A;}function Od(t){this.a=new w.Map(),this.b=t;}function qd(t){this.a=new w.Map(),this.b=t;}function zd(t,e){this.a=new uF(new Sr(t),e);}function Gr(){this.c=8,this.O=new wU(new fD());}function i3(){J1(),this.N=this.O=256,oR(this);}function f3(t,e,A){this.c=t,this.a=e,this.b=A;}function D3(t,e,A){this.c=t,this.a=e,this.b=A;}function BP(t,e,A){this.a=t,this.b=e,this.c=A;}function Kd(t,e,A){this.a=t,this.b=e,this.c=A;}function Jd(t,e,A){this.a=t,this.c=e,this.b=A;}function Yd(t,e,A){this.a=t,this.c=e,this.b=A;}function x1(t,e,A){vU.call(this,e,t),this.a=A;}function KU(t,e,A){vU.call(this,e,t),this.a=A;}function Xd(t){BD.call(this,t),HT(this,t);}function J8(t){oz.call(this,t,(iT(),Hc));}function Zd(){An(),UL.call(this,32,32,null);}function Wd(t){var e;e=aY(t),this.a=new G7(e);}function N9(t){var e=t.Kc();e.disposeDialog();}function JU(t,e){var A;return A=e,!!e9(t,A);}function YU(t,e){return mk(e,KO(t,E3(e)));}function SN(t,e,A){return t.indexOf(p0(e),A);}function M1(t,e){return w.Math.abs(t.A[e]);}function IA(t,e){return t.w==null?null:t.w[e];}function u3(t,e){return t.u==null?null:t.u[e];}function _d(t,e){return t.e[e]-t.k[e]+xt(t,e);}function $d(t,e){return t.e[e]-P0(t,e)+xt(t,e);}function G9(t,e){return ((t.v[e]&b8)>>>27)-1;}function ye(t,e){return gt(V(t.C[e],Pe),0);}function IN(t,e){Yi(t.e,e)&&TL(t.d,e);}function XU(t,e){Gu(e,t.R),Yu(e,t.v),rB(e,t.w);}function xN(t,e){t.B=false,cL(t.v,new Tg(t,e));}function NN(t,e){t.v=false,cL(t.s,new cg(t,e));}function GN(t,e){t.f=false,cL(t.c,new wg(t,e));}function ON(t){t.b=false,h1t(t.a,new fu(pB(t)));}function VD(t){this.c=t,this.O=new wU(new fD());}function ad(t,e,A){this.a=t,this.b=e,this.c=A;}function tB(t,e,A){this.d=t,this.b=A,this.a=e;}function zi(t,e){this.a=t>e?t:e,this.b=t>e?e:t;}function ZU(t,e){return t.a*=e,t.b*=e,t.c*=e,t;}function qN(t,e){return t.d==null&&sj(t,e),t.d;}function Q3(t,e){t.u=new C0(),t.t=6,t.v=0,t.r=e;}function O9(t,e,A){t.B[e]=A,t.U&=t.D[e]==1?0:7;}function eB(t,e,A){t.v[e]&=-49153,t.v[e]|=A<<14;}function Je(t,e,A){t.v[e]&=-49,t.v[e]|=A,t.U&=7;}function o3(t,e,A){F5(A,0,t,e,A.length,false);}function zN(t,e,A,n,P){R6(t,e,A,0,A.length,n,P);}function KN(t,e,A){return Ae(t,e)||Ae(t,A)?16:1;}function V0(t){return Ii(t)?(y1(t),t):t.Zc();}function JN(t){return t.g.a.length+t.f.a.length;}function AB(t){N3(t.a),fF(t.c,t.b),t.b=null;}function nB(t){this.a=t.a,this.b=t.b,this.c=t.c;}function Ki(t){var e=t.Gc();return e.getText();}function WU(t){var e=t.Mc();return e.getWidth();}function ED(t,e){var A=t.Kc();A.showMessage(e);}function YN(){var t;return t=YL(null),t.f=2,t;}function XN(t){return Er(),e1(m2,typeof t);}function ZN(t){return An(),new sA(mv(new Du(),t));}function Zn(t){return Vn(cG(L0(t)?Se(t):t));}function PB(t,e){return Dk(e,t.c)||Dk(e,t.a);}function WN(t,e){return e==1?t.a+t.f++:t.i+t.g++;}function rB(t,e){e.a=e.a*t.c+t.a,e.b=e.b*t.c+t.b;}function G(t,e){return ee(e,t.a.length),t.a[e];}function U3(t){var e;return e=t.slice(),hF(e,t);}function M(t){var e;return e=YL(t),MF(t,e),e;}function iB(t){Hi(),y6.call(this,t,Jy,new Jn());}function fB(t,e){if(t!=e)throw At(new hh());}function SD(t,e){if(!t)throw At(new ZP(e));}function ID(t,e){this.e=e,CT(this,(y1(t),t));}function L3(t){this.f=t,this.e=2,this.a=Hs(t);}function DB(t,e){this.a=t,this.c=e,this.b=true;}function uB(t,e){e?this.a=e:this.a=new qh(t);}function Wn(t,e,A){A?t.v[e]|=q0:t.v[e]&=Ry;}function q9(t,e){return t.I[e]==257||t.I[e]==129;}function Or(t,e){return t.q&&e<t.g?UA(t.q,e):0;}function z9(t,e){return t.q&&e<t.i?TP(t.q,e):0;}function QB(t){return (!$4&&($4=new rM()),$4).b[t];}function _U(t){this.b=t,this.a=new n1(),kO(this,t);}function _N(t){return !Tc&&(Tc=new MU()),ks(Tc,t);}function nA(t,e){var A=t.Lc();return A.setRGB(e);}function $U(t){var e=t.Mc();return e.getHeight();}function oB(t){var e=t.Dc();return e.grabFocus();}function Be(t,e){var A;return A=e,t8(e9(t,A));}function $N(t,e){var A;for(A=0;A<e;A++)aD(t,A);}function aN(t,e){var A;for(A=0;A<e;++A)t[A]=0;}function tG(t,e){var A;for(A=0;A<e;++A)t[A]=2;}function ve(t,e){t.L!=e&&(t.L=e,e||pj(t),t.U=0);}function UB(t,e){this.c=t,this.a=e,this.b=false;}function P8(t){t?this.a=t:this.a=new qh(null);}function Eu(t){return t.p==null&&(t.p=N_(t)),t.p;}function eG(t){return t.d==null&&sj(t,10240),t.d;}function AG(t){return aP(new QD(t.e).a)<t.c;}function Su(t,e){return y1(t),t+(""+(y1(e),e));}function LB(t,e,A,n){return (n[t]&n[e]&~n[A])!=0;}function j1(t,e,A,n,P,r){return Ub(t,e,A,n,P,0,r);}function aU(t,e){var A=t.Gc();return A.setText(e);}function Y8(t,e){var A=t.Gc();return A.setText(e);}function Gt(t,e){var A=t.Gc();return A.addItem(e);}function $A(t){var e=t.Gc();return e.isSelected();}function tL(t,e,A,n){var P=t.Mc();P.setRGB(e,A,n);}function nG(t,e){var A;for(A=0;A<e;++A)t[A]=-1;}function PG(t,e){var A;for(A=0;A<e;++A)t[A]=-1;}function s3(t){var e;for(e=0;e<t.r;e++)t.v[e]&=Ry;}function vP(t,e,A){A?t.v[e]|=512:t.v[e]&=-513;}function rG(t,e,A){Ex(new Ev(t._,e),new Jd(t,e,A));}function iG(t,e){!t.b&&(t.b=new Ci()),tr(t.b,U1(e));}function fG(t){t.b||(t.b=t.a.Tb(),t.a.size());}function _n(t){return Ii(t)?Bt((y1(t),t)):t.$c();}function y3(t){return Array.isArray(t)&&t.yd===DD;}function qr(t){return t.length==0?0:L1(t,f1,Et);}function DG(){return B(d(bE,1),m,6,15,[0,1,2]);}function sB(){sB=v1,vc=c(x8t,_e,141,128,0,1);}function yB(){yB=v1,Fc=c(N8t,_e,142,256,0,1);}function lB(){lB=v1,kc=c(G8t,_e,143,256,0,1);}function hB(){JF(),$D.call(this,4,(Qr(),Hl));}function FP(t,e,A){HQ(),xL.call(this,t,e,A,255);}function uG(t,e,A){Vk(0,e,t.length),ai(t,0,e,A);}function zr(t,e,A){var n;for(n=0;n<e;++n)t[n]=A;}function TB(t){var e;return e=t.a[0],t.e>0?e:-e|0;}function K9(t){var e;return e=YL(t),e.k=t,e.f=1,e;}function QG(t,e){return !t&&(t=[]),t[t.length]=e,t;}function cB(t){return t.N==null&&(si(t),VW(t)),t.N;}function Ot(t){return L0(t)?t|0:og(t);}function r8(t,e){return t.a.get(e)!==void 0;}function wB(t,e){return BA(0,t,0,e.a.length,true,e);}function gB(t,e,A,n){return BA(1,e,0,A,n,new rU(t));}function eL(t,e){return t==null?e:e==null?t:t+","+e;}function l3(t){return !Array.isArray(t)&&t.yd===DD;}function h3(t){aR(),this.a="Helvetica",this.b=t;}function H1(t){e3(this),this.f=t,a3(this),this.kc();}function T3(t){this.b=-1,this.a=c(F,m,6,t,15,1);}function xD(t){t.a||(t.a=true,BL(t.e,new D7(t)));}function P1(t){t.b||(t.b=true,BL(t.f,new f7(t)));}function oG(t,e,A){A?t.G[e]|=g8:t.G[e]&=-32769;}function UG(t,e,A){A?t.G[e]|=o0:t.G[e]&=-65537;}function LG(t){var e;for(e=0;e<t.r;e++)t.v[e]&=-513;}function dB(t){var e;for(e=0;e<t.r;e++)t.v[e]&=-449;}function BB(t,e){var A=t.Dc();return A.setCursor(e);}function Fe(t){return L0(t)?""+t:Jj(t);}function Wt(t,e){return Vn(Cb(L0(t)?Se(t):t,e));}function O0(t,e){return Vn(R5(L0(t)?Se(t):t,e));}function j0(t,e){return Vn(sX(L0(t)?Se(t):t,e));}function vB(t,e,A){return t.c?rr(e.b,A.b):Yk(e,A);}function sG(t,e,A){return A<0?-1:t.lastIndexOf(e,A);}function yG(t,e){return G0(t.l&e.l,t.m&e.m,t.h&e.h);}function lG(t,e){return G0(t.l|e.l,t.m|e.m,t.h|e.h);}function hG(t,e){return G0(t.l^e.l,t.m^e.m,t.h^e.h);}function X8(t,e){return t.a+=e.a,t.b+=e.b,t.c+=e.c,t;}function FB(t,e){return t.a-=e.a,t.b-=e.b,t.c-=e.c,t;}function i8(t){t.a=new Od(t),t.c=new qd(t),++t.b;}function c3(t,e){if(t==null)throw At(new Y7(e));}function Iu(t,e){if(t<0||t>=e)throw At(new E7());}function kB(t,e){this.k=t,this.c=0,this.g=e,Vs(this);}function w3(t){this.c=0,this.d=0,this.b=t,this.a=0;}function le(t,e,A){Ce(),this.e=t,this.d=e,this.a=A;}function mB(t,e){w6(),xe.call(this,t),I$(this,e);}function Ji(t){this.b=null,this.a=(FU(),t||Vl);}function bB(t,e,A){xr.call(this,e),r1t(this,t,e,A);}function TG(t,e,A,n,P){for(;e<A;)n[P++]=Xi(t,e++);}function Kr(t,e){return N8(e)?$B(t,e):!!YU(t.a,e);}function cG(t){return G0(~t.l&z0,~t.m&z0,~t.h&Pn);}function Z8(t,e){return e<t.i&&(q8(t.q,e)||t.I[e]==8);}function jB(t,e,A){return l8(t,e,e.F[0][A],e.F[1][A]);}function wG(t,e,A){t.v[e]&=-67108865,A&&(t.v[e]|=wn);}function RB(t,e,A){var n=t.Mc();return n.getRGB(e,A);}function kP(t,e){var A=t.Gc();return A.setEnabled(e);}function yA(t,e){var A=t.Gc();return A.setSelected(e);}function gG(t,e){var A=t.Lc();return A.drawPolygon(e);}function AL(t,e){var A=t.Lc();return A.fillPolygon(e);}function pB(t){var e=t.Bc();return e.getDrawContext();}function MB(t){var e=t.Cc();return e.getDrawContext();}function ND(t){var e=t.Bc();return e.getCanvasWidth();}function dG(t){var e;return e=y2(LP,t),e?KR(e):null;}function BG(t){var e;return e=y2(LP,t),e?Ep(e):null;}function vG(t){var e;return e=y2(LP,t),e?yp(e):null;}function xA(t,e){var A;return A=Jr(t.a,e,t),A==null;}function Yi(t,e){return We(t.a,e,(Er(),jo))==null;}function FG(t,e){return z(t,e)<0?-1:z(t,e)>0?1:0;}function mP(t){return t.e==0?t:new le(-t.e,t.d,t.a);}function g3(t,e){return t.f[e]&&(t.o[e]==1||t.o[e]==2);}function GD(t,e){return zt(e,t.length+1),t.substr(e);}function f8(t,e,A){Ju(e,t.a.length),t.a.splice(e,0,A);}function jn(t,e){for(y1(e);t.cd();)bx(e,t.dd());}function J9(t,e){q(t.c,"  "),q(t.c,e),q(t.c,nn);}function d3(t,e){qL.call(this,t,true,e),this.a=true;}function CB(t){var e;e=eZ(t),this.a=e,this.b=new VD(e);}function Y9(t){var e=t.Bc();return e.getCanvasHeight();}function kG(t,e,A){var n=t.Bc();return n.onChange(e,A);}function HB(t,e){var A=t.Dc();return A.createDialog(e);}function nL(t,e){var A=t.Lc();return A.setLineWidth(e);}function mG(t,e){var A;A=e+1,A>t.length&&(t.length=A);}function xu(t,e){var A;for(A=0;A<e;++A)t[A]=false;}function VB(t){var e;for(e=0;e<t.s;e++)t.G[e]&=-98305;}function W8(t){var e;for(e=0;t>0;)t>>=1,++e;return e;}function EB(t,e){return t.a+=String.fromCharCode(e),t;}function Ye(t,e){return t.a+=String.fromCharCode(e),t;}function y1(t){if(t==null)throw At(new Rr());return t;}function $n(t){var e;return e=new SA(t.r,t.s),Uf(t,e),e;}function bG(t,e){var A;for(A=0;A<e.r;A++)HI(t,e.K[A]);}function _8(t,e){return new Ke(t.a-e.a,t.b-e.b,t.c-e.c);}function SB(t,e){return new BP(e.a-t.a,e.b-t.b,e.c-t.c);}function PL(t,e){return t.k[e]==2&&t.p[e]==2&&t.D[e]<=7;}function rL(t,e,A){A?t.v[e]|=oo:t.v[e]&=py,t.U&=7;}function B3(t,e,A){t.I[e]=A==1?1:A==2?2:A==3?4:16,t.U=0;}function jG(t,e,A,n,P,r){t.F=e,t.B=A,t.D=n,t.C=P,t.A=r;}function RG(t,e,A,n){return {x:t,y:e,width:A,height:n};}function pG(t){w.setTimeout(function(){throw t;},0);}function IB(t,e){return t.c==null?null:t.c[e];}function iL(t,e,A){var n=t.Kc();return n.setLayout(e,A);}function v3(t){var e=t.Lc();return e.getBackgroundRGB();}function xB(t){var e=t.Lc();return e.getForegroundRGB();}function F0(t){var e=t.Gc();return e.getSelectedIndex();}function MG(t){var e;return e=t-10,(e<0?48+t:97+e)&d1;}function CG(t,e){var A;return A=cp(t),A?us(A,e):null;}function Xi(t,e){return zt(e,t.length),t.charCodeAt(e);}function HG(t,e){t.c=e,t.e*w.Math.pow(10,-t.b/1.36);}function NB(t){K1(t),t.eb=w.Math.max(t.eb,3),P1(t.k);}function F3(t,e){return new Ou(t.d,t.a,t.b,t.c.nd(e));}function D8(t,e){return N8(e)?Ku(t,e):t8(YU(t.a,e));}function GB(t,e,A){this.i=t,this.d=e,this.f=wZ(A,t,e);}function Zi(t,e,A,n){this.b=t,this.a=e,this.c=A,this.d=n;}function It(t,e,A,n){this.c=t,this.b=e,this.d=A,this.a=n;}function lA(t,e,A,n){this.c=t,this.d=e,this.b=A,this.a=n;}function OB(t,e,A,n){vU.call(this,t,n),this.b=e,this.a=A;}function k3(t,e){this.a=I4,this.d=t,this.b=e,this.c=-1;}function fL(t){this.d=t,this.a=this.d.b,this.b=this.d.c;}function qB(){ou.call(this),this.b=new n1(),this.a=new n1();}function zB(t,e,A){Jq.call(this,t,e,e.F[0][A],e.F[1][A]);}function DL(t,e,A){t.d=6,t.e=A,t.c=e,t.f=(e[t.e]&63)<<11;}function VG(t,e,A,n){for(var P=0;P<=n;P++)t[P]=e[A+P];}function Jr(t,e,A){return N8(e)?qD(t,e,A):zb(t.a,e,A);}function m3(t,e){return z1(t)===z1(e)||t!=null&&SP(t,e);}function $8(t,e){return z1(t)===z1(e)||t!=null&&SP(t,e);}function uL(t,e,A){return J0(t,e,A,Ae(t,e)||Ae(t,A)?16:1);}function Nu(t,e,A,n){return A<n?t.a[e][n][A]:t.a[e][A][n];}function EG(t){return String.fromCharCode.apply(null,t);}function an(t){return /\d/.test(String.fromCharCode(t));}function QL(t){if(t==null)throw At(new Rr());return t;}function KB(t,e){return t.c!=e.c?t.c>e.c?1:-1:0;}function SG(t){return t.a==t.b?-1:t.c[t.a++];}function IG(t,e){var A=t.Gc();return A.setSelectedItem(e);}function oL(t,e,A,n){var P=t.Lc();return P.setFont(e,A,n);}function xG(t,e){var A;return A=jX(t,e),A?us(A,e):null;}function b3(t,e){var A;return A=t.D[e],A==7||A==15||A==33;}function NG(t,e){var A;return A=BY(t.a,e),t.a=ux(t.a,A),A;}function j3(t,e){var A;return A=En(t,e),A+en(t,e,A,t.D[e]);}function GG(t,e){var A;for(A=0;A<e.r;A++)HD(t.k[A],e.K[A]);}function OG(t,e){t.H=e,t.eb=w.Math.max(t.eb,1),P1(t.k);}function Gu(t,e){e.c*=t.c,e.a=e.a*t.c+t.a,e.b=e.b*t.c+t.b;}function JB(t,e,A){e<A?t.u[A][e]=true:t.u[e][A]=true;}function UL(t,e,A){An(),A?this.a=A:this.a=new SA(t,e);}function Ou(t,e,A,n){this.d=t,this.a=e,this.b=A,this.c=n;}function YB(t,e){this.v=new iD(),this.L=t,this.G=e,this.xb();}function XB(t){this.b=new pL(11),this.a=(FU(),t||Vl);}function a8(t){this.e=t,(t&1)==0&&!Vo&&!Vo&&(Vo=new ub());}function ZB(t){var e;this.a=t,e=this.Dc(),e.register(this);}function qG(t){var e;for(e=0;e<t.R.g;e++)wG(t.R,e,t.M[e]);}function zG(t){var e;for(e=Np(t);e;)lT(t,e,yo),e=Np(t);}function KG(t){var e;for(e=UF(t);e;)lT(t,e,nC),e=UF(t);}function $t(t,e){var A=t.Gc();return A.setSelectedIndex(e);}function WB(t,e,A){var n=t.Cc();return n.setDimensions(e,A);}function JG(t,e){return t.b!=e.b?t.b<e.b?-1:1:0;}function OD(t,e,A){var n;return n=new Q7(HB(t,e)),iJ(n,A),n;}function Yr(t,e){var A;return A=YL(t),MF(t,A),A.f=e?8:0,A;}function _B(t,e){var A;return A=yu(t.wd),e==null?A:A+": "+e;}function hA(t,e,A){return Mt(e,A,t.length),t.substr(e,A-e);}function $B(t,e){return e==null?!!YU(t.a,null):r8(t.c,e);}function aB(t,e){return new Ou(e.d,new Eg(e,t),e.b,e.c);}function Rn(t,e){return t.a[BA(0,e,0,t.a.length,true,t)][2];}function NA(t,e){return t.a[BA(0,e,0,t.a.length,true,t)][5];}function X9(t,e){return t.a[BA(0,e,0,t.a.length,true,t)][4];}function u8(t,e){return t.a[BA(0,e,0,t.a.length,true,t)][3];}function YG(t,e){return W9(t,e.c,e.d)&&W9(t,e.c+e.b,e.d+e.a);}function XG(t){return String.fromCodePoint(t).trim()==="";}function tv(t){return /[A-Z]/i.test(String.fromCharCode(t));}function ev(t){return /[A-Z]/i.test(String.fromCharCode(t));}function ZG(t){return _3(t.ad().Vb(),uq(new jw(),new Rw()));}function WG(t){return t>=5&&t<=9||t>=15&&t<=17||t==35||t==53;}function Av(t){t.a.a=t.c,t.c.b=t.a,t.a.b=t.c.a=null,t.b=0;}function qu(t){var e;e=t.a,t.a=t.b,t.b=e,e=t.c,t.c=t.d,t.d=e;}function R3(){R3=v1,nS=(F6(),af),eS=xE,AS=NE,PS=GE;}function _G(t,e){var A;for(A=0;A<e;++A)t[A]=new uh(t[A]);}function p3(t,e,A){nB.call(this,SB(new I3(t,e),new I3(t,A)));}function k0(t,e,A){nB.call(this,SB(new Wi(t,e),new Wi(t,A)));}function $G(t,e){return a9(t.toLowerCase(),e.toLowerCase());}function aG(t,e){return D8(t.a,e)!=null?D8(t.a,e):(P9(),Y2);}function M3(t,e){return ((t.H[e]&7680)>>9)+((t.H[e]&jy)>>13);}function LL(t,e){return t.a[BA(0,e,0,t.a.length,true,t)][6]>0;}function nv(t,e){return t.a[BA(0,e,0,t.a.length,true,t)][8]>0;}function sL(t,e){return t.a[BA(0,e,0,t.a.length,true,t)][5].a;}function tO(t,e){return q9(t.V,e)&&(Is(t,e)!=-1||ns(t,e)!=-1);}function Bt(t){return Math.max(Math.min(t,Et),-2147483648)|0;}function pn(t){return w.Math.sqrt(t.a*t.a+t.b*t.b+t.c*t.c);}function eO(t){return t==2||t==10||t==18||t==36||t==54||t==86;}function Q8(t,e,A,n){t.G[e]&=-131080,t.G[e]|=A,n&&(t.G[e]|=4);}function AO(t,e,A,n){var P;for(P=0;P<t.r;P++)n8(t.K[P],e,A,n);}function yL(t,e,A,n){var P=t.Lc();return P.fillCircle(e,A,n);}function C3(t,e,A,n){var P=t.Lc();return P.drawString(e,A,n);}function H3(t,e,A){var n=t.Dc();return n.showHelpDialog(e,A);}function Pv(t,e,A,n){var P;return P=tn(t,e,A),P!=-1&&RT(t,P,n);}function te(t,e,A,n){var P;return P=i9(t,6),HU(t.K[P],e,A,n),P;}function V3(t,e){var A,n;return A=e,n=new PU(),sp(t,A,n),n.d;}function E3(t){var e;return t==null?0:(e=fr(t),e|0);}function nO(t){if(t.Yc())return null;var e=t.k;return bo[e];}function rv(t,e){return Yt(e,86)?ib(t.a,e):false;}function zu(t,e){return t.s==null&&(si(t),htt(t,e,t.R.K)),t.s;}function Ku(t,e){return e==null?t8(YU(t.a,null)):Vg(t.c,e);}function iv(t,e){return e===t?"(this Map)":e==null?y9:P2(e);}function bP(t,e){return (t.v[t.F[0][e]]&t.v[t.F[1][e]]&512)!=0;}function lL(t,e){var A;A=t.b,t.b=e.b,e.b=A,A=t.d,t.d=e.d,e.d=A;}function fv(t,e){Ms(),this.b=t,ut(this.b,63),this.d=e,SR(this);}function Wi(t,e){this.a=t[3*e],this.b=t[3*e+1],this.c=t[3*e+2];}function Dv(t,e,A){No||ML(),s_(e),this.a=new y6(t.a,e,new Jn());}function Z9(t,e,A,n,P){var r=t.Lc();return r.drawLine(e,A,n,P);}function uv(t,e){var A=t.a=t.a||[];return A[e]||(A[e]=t.Tc(e));}function PO(t){var e;return e=xx(t.b,t.a),e?new g7(e):null;}function rO(t,e){return ok(t,e)?(EF(t),true):false;}function Ju(t,e){if(t<0||t>e)throw At(new XP(V6+t+E6+e));}function iO(t,e){t.b.a.length!=0&&q(t.b,"<NL>"),q(t.b,e);}function fO(t,e,A){t.b=null,t.a=e,A==null?t.c=ks(t,e):t.c=A;}function DO(t,e,A){t.e=null,t.d=e,A==null?t.f=ks(t,e):t.f=A;}function Qv(t,e,A){this.k=t,this.c=2,this.g=A,this.j=e,Vs(this);}function uO(t,e,A,n,P){var r=t.Lc();return r.clearRect(e,A,n,P);}function qD(t,e,A){return e==null?zb(t.a,null,A):ak(t.c,e,A);}function QO(t){var e;return z8(F2(t,0,(e=t.length,_u(),e)));}function oO(t,e){return o8(e),pP(t,c(E,I,6,e,15,1),0,e);}function zD(t,e){return o8(e),pP(t,c(Ut,Tt,6,e,15,1),0,e);}function Mn(t,e){return o8(e),pP(t,c(F,m,6,e,15,1),0,e);}function hL(t,e){return o8(e),pP(t,c(Kt,t1,6,e,15,1),0,e);}function UO(){return Xo||(!Xo&&(Xo=new pd()),Xo);}function LO(t){try{return new RegExp(t);}catch{return null;}}function sO(t){throw new Error("missing static resource: "+t);}function yO(t){return t.r?"Unresolved SMARTS features:"+t.r:"";}function lO(t){return /[A-Z\d]/i.test(String.fromCharCode(t));}function S3(t){if(t<0)throw At(new XP("bitIndex < 0: "+t));}function ee(t,e){if(t<0||t>=e)throw At(new XP(V6+t+E6+e));}function zt(t,e){if(t<0||t>=e)throw At(new vh(V6+t+E6+e));}function I3(t,e){this.a=t.K[e].a,this.b=t.K[e].b,this.c=t.K[e].c;}function ov(t){Ms(),this.b=t,ut(this.b,63),this.d=Fb(t),SR(this);}function Uv(){this.a=am("/resources/forcefield/mmff94/def.csv");}function Lv(){this.a=am("/resources/forcefield/mmff94/atom.csv");}function sv(){this.a=iP("/resources/forcefield/mmff94/bndk.csv");}function yv(){this.a=iP("/resources/forcefield/mmff94/dfsb.csv");}function KD(t){var e=t.Lc();return e.getSelectionBackgroundRGB();}function jP(t){return Ce(),z(t,0)>=0?be(t):mP(be(E0(t)));}function hO(){return hQ(),B(d(El,1),_e,96,0,[FS,Yo,Vc]);}function lv(t,e){le.call(this,1,2,B(d(F,1),m,6,15,[t,e]));}function TO(t,e){return i0(t.u,K(t.u,0,e))&&i0(t.u,K(t.u,1,e));}function hv(t,e){return V0(t.a[BA(0,e,0,t.a.length,true,t)][1]);}function Tv(t,e){return V0(t.a[BA(0,e,0,t.a.length,true,t)][4]);}function cv(t,e){return V0(t.a[BA(0,e,0,t.a.length,true,t)][2]);}function _0(t,e,A){return pA(t.K[e].a,t.K[e].b,t.K[A].a,t.K[A].b);}function cO(t,e,A){return gt(V(e.c[t.d[A]],Wt(1,t.b[A])),0);}function V(t,e){return Vn(yG(L0(t)?Se(t):t,L0(e)?Se(e):e));}function J(t,e){return Vn(lG(L0(t)?Se(t):t,L0(e)?Se(e):e));}function d0(t,e){return Vn(hG(L0(t)?Se(t):t,L0(e)?Se(e):e));}function wO(t,e){return e<t.i&&(q8(t.q,e)||t.I[e]==8)?1.5:dt(t,e);}function W9(t,e,A){return e>=t.c&&e<=t.c+t.b&&A>=t.d&&A<=t.d+t.a;}function _9(t,e,A){return (t.I[e]==257||t.I[e]==129)&&t.F[0][e]==A;}function wv(t,e){var A;for(A=0;A<t.r;A++)t.K[A].a*=e,t.K[A].b*=e;}function _i(t,e){var A;return A=En(t,e),A+en(t,e,A,t.D[e])-G1(t,e);}function gv(t,e,A){var n;Wk(e,A,t.a.length),n=A-e,t.a.splice(e,n);}function TL(t,e){y1(e),t.a[t.c]=e,t.c=t.c+1&t.a.length-1,KJ(t);}function _t(t){return MD(t.a<t.c.a.length),t.b=t.a++,t.c.a[t.b];}function Yu(t,e){e.c=e.c*t.c+t.a,e.d=e.d*t.c+t.b,e.b*=t.c,e.a*=t.c;}function x3(t,e,A,n,P){t.i[0].a=e,t.i[0].b=A,t.i[1].a=n,t.i[1].b=P;}function Cn(t){for(;t.d>0&&t.a[--t.d]==0;);t.a[t.d++]==0&&(t.e=0);}function N3(t){x9(t.c!=-1),t.d.removeAtIndex(t.c),t.b=t.c,t.c=-1;}function JD(t,e,A){Wk(e,A,t.size()),this.c=t,this.a=e,this.b=A-e;}function dv(t){ug(),ts.call(this,t),this.a="",this.b=t,this.a="";}function Bv(t){this.a=new nU(),this.c=new nU(),Av(this),cT(this,t);}function G3(t,e){if(e==null)throw At(new Rr());return Kr(t.e,e);}function vv(t,e){if(e==null)throw At(new Rr());return D8(t.e,e);}function Fv(t,e){var A;return A=1-e,t.a[A]=PQ(t.a[A],A),PQ(t,e);}function Xr(t,e){var A,n;return n=V(t,g1),A=Wt(e,32),J(A,n);}function D0(t,e,A,n){var P=t.Kc(),r=e.Gc();return P.add(r,A,n);}function cL(t,e){var A=t.Kc();function n(){e.oc();}A.showDialog(n);}function kv(t,e){var A;return A=e.D[t],A<(k2(),JA).length?JA[A]:2;}function gO(t,e){var A;return e==null?null:c6(t,ln((A=e,w0(),A)));}function O3(t,e,A){return A=CX(A),t.replace(new RegExp(e,"g"),A);}function mv(t,e){return t.j=null,k6(t,new un(new Sr(e)))?t.j:null;}function bv(){this.a=iP("/resources/forcefield/mmff94/covrad.csv");}function q3(t,e,A,n,P){var r=t.Lc();return r.fillRectangle(e,A,n,P);}function dO(t,e){var A;return A=ja(t,e),A?new P8(A):null;}function BO(t,e,A){var n;n=LJ();try{return HN(t,e,A);}finally{XO(n);}}function $9(t){var e;return L0(t)?(e=t,e==-0?0:e):dq(t);}function jv(t){var e,A;for(e=0,A=t-1;A>0;)A>>=1,++e;return e;}function Rv(t,e){var A;return A=vv(t,e),++t.a,A&&(++A.b,++t.b),A;}function YD(t,e){var A;return A=t.b?Be(t.b,U1(e)):null,A?A.a:e-1;}function wL(t,e){var A;return A=t.c?Be(t.c,U1(e)):null,A?A.a:e-1;}function vO(t){var e,A;for(A=op(t);A;)e=TY(A),lT(t,e,ho),A=op(t);}function FO(t){qs();var e,A;for(ut(t,1),A=t.g,e=0;e<A;e++)AM(t,e);}function kO(t,e){var A=t;e.setEventHandler(function(n,P){A.Fc(n,P);});}function z3(t,e,A,n){var P=t.Lc();return P.drawCenteredString(e,A,n);}function mO(t,e,A,n,P){var r=t.Lc();return r.drawDottedLine(e,A,n,P);}function K3(t,e,A,n,P){this.a=t,this.b=e,this.g=A,this.f=n,this.e=P;}function gL(t,e){e.L=t.L,e.M=t.M,e.T=t.T,e.J=t.J,e.Q=t.Q,e.U=t.U&24;}function J3(t,e){this.a=t,rh.call(this,t),Ju(e,t.size()),this.b=e;}function RA(t,e){Ce(),le.call(this,t,1,B(d(F,1),m,6,15,[e]));}function Y3(){Y3=v1,pS=B(d(F,1),m,6,15,[40,20,20,100,20]);}function bO(){return P9(),B(d(x1t,1),_e,108,0,[Uc,sc,Lc,wi,Y2]);}function jO(){return Dr(),B(d(N1t,1),_e,98,0,[Fl,vl,Bl,kl,So,ml]);}function RO(){return iT(),B(d(K8t,1),_e,83,0,[Hc,dS,BS,vS]);}function pv(t,e,A){return aP(new QD(t.e).a)<t.c?sF(t,e,A):null;}function Mv(t,e,A){t.b=e,t.a=A,t.c&&t.e*w.Math.pow(10,-e/1.36);}function dL(t){return MD(t.b!=t.d.c),t.c=t.b,t.b=t.b.a,++t.a,t.c.c;}function Cv(t){return MD(t.b<t.d.size()),t.d.getAtIndex(t.c=t.b++);}function X3(t,e){var A;return A=t.v[e]&gn,A==0?0:A==Qe?2:A==O1?3:4;}function Hv(t,e){var A;return A=yJ(t,e),!!Hm(A,t);}function TA(t){var e=t.Kc(),A=e.createComboBox();return new z7(A);}function he(t,e){var A=t.Kc(),n=A.createLabel(e);return new K7(n);}function BL(t,e){var A=t,n=t.Dc();n.runLater(function(){A.Ec(e);});}function Vv(t,e){var A;return A=t-e,A>=l1?A-=m0:A<_6&&(A+=m0),A;}function Xu(t,e,A){var n;return n=new GB(e,A,t.C),MI(n,RJ(t,n)),n;}function pO(t){if(!("stack"in t))try{throw t;}catch{}return t;}function RP(t,e){return e.e==0||t.e==0?vr:(Lr(),zs(t,e));}function Zu(t,e){t.e&&(!t.r&&(t.r=new C0()),q(t.r," "),q(t.r,e));}function o8(t){if(t<0)throw At(new W7("Negative array size: "+t));}function MO(){throw new Error("drug likeness must be assessed first");}function CO(t){return function(){return BO(t,this,arguments);};}function Ev(t,e){bb(),this.c=OD(t,"Edit Text",this),this.e=e,W$(this);}function Z3(t){this.a=c(F,m,6,t,15,1),this.b=c(F,m,6,t,15,1);}function Wu(t){bD(this),o3(this.a,0,JT(t,c(qn,A0,1,aP(t.a),5,1)));}function Sv(t){bi(t.g.a,0),bi(t.f.a,0),bi(t.a.a,0),t.b=null,t.d=-1;}function Zr(t,e,A){var n;return n=(ee(e,t.a.length),t.a[e]),t.a[e]=A,n;}function Iv(t,e,A){var n;for(n=0;n<t.e.length;n++)t.a[n]+=e,t.b[n]+=A;}function HO(t,e){var A;for(A=t.d-1;A>=0&&t.a[A]==e[A];A--);return A<0;}function tr(t,e){var A;return A=u9(t,e),A<0&&(A=-(A+1),f8(t.d,A,e)),A;}function VO(t,e,A){for(;A>=0;--A)if($8(e,t.a[A]))return A;return  -1;}function EO(t){var e,A;return A=c6(new p7(),ln((e=t,_u(),e))),new P8(A);}function SO(t,e){var A=t.Hc(),n=new sA(e);return A.copyMolecule(n);}function xv(t,e,A,n){var P=t.Dc();return P.createImageFromBase64(e,A,n);}function W3(t,e){var A;return A=t.D[e],A==8||A==16||A==34||A==52||A==84;}function IO(t,e){var A;return A=t.D[e],A==9||A==17||A==35||A==53||A==85;}function vL(t){var e;for(e=t.length-1;e>=0&&(t[e]|0)==0;--e);return e;}function Nv(t,e){return e<t.g.a.length?G(t.g,e):G(t.f,e-t.g.a.length);}function xO(t,e){return Lr(),e<pc.length?sW(t,pc[e]):RP(t,Qi(e));}function _3(t,e){var A;return e.c.od($q(t,e.d.qc(),(A=new c7(e),A)));}function $i(t){P5(),sN(this,Ot(V(O0(t,24),yi)),Ot(V(t,yi)));}function Wr(t){J1(),DF.call(this,t?t.N:256,t?t.O:256),t&&Uf(t,this);}function $3(t){this.d=t,this.b=this.d.a.entries(),this.a=this.b.next();}function Gv(){this.a=iP("/resources/forcefield/mmff94/vanderwaals.csv");}function Ov(t){t.cb&&(Uf(t.cb,t.V),t.I=t.bb?new Ts(t.bb):null);}function a3(t){return t.j&&(t.backingJsObject!==oM&&t.kc(),t.g=null),t;}function tP(t){var e,A;e=_k(t);do A=e,z_(t),e=_k(t);while(A!=e);return e;}function qv(t,e){var A;return A=new M7(),A.c=e,ut(t,15),iM(A,t,true),A.b.a;}function NO(t,e){var A;return A=WQ(t,e,null),A?new P8(A):null;}function Un(t,e){var A=t.Kc(),n=A.createCheckBox(e);return new q7(n);}function FL(t,e){return e[0]!=-1&&e[3]!=-1?YQ(t,e):R$(t.o,t,e);}function GO(t,e){return t.a=(t.a+e.a)/2,t.b=(t.b+e.b)/2,t.c=(t.c+e.c)/2,t;}function GA(t,e){if(!e||e.r==0){t.H=null;return;}t.H=e,t.L=false,ut(t.H,1);}function zv(t,e,A,n){var P;P=new nU(),P.c=e,P.b=A,P.a=n,n.b=A.a=P,++t.b;}function Xe(t,e,A,n){n?t.H[e]|=A:t.H[e]&=~A,t.U=0,n&&A!=0&&(t.L=true);}function Kv(t,e,A){return t.f.k.F[0][e]==A?t.f.k.F[1][e]:t.f.k.F[0][e];}function OO(t,e){return w.Math.pow(10,w.Math.log10(2e3)*t/(e-1)-1);}function qO(t){t.eb=w.Math.max(t.eb,4),P1(t.k),N1(t,new x1(t,1,false));}function Jv(t,e){var A;t.b&&(K1(t),A=new pm(t._,t.V,e),NN(A,new A7(t)));}function N1(t,e){var A;A=e.j,(A&t.J)==0&&(BL(t._,new Yd(t,A,e)),t.J|=A);}function kL(t,e,A){var n,P;n=e>>4,P=2*(e&15),t.a[n]&=~(3<<P),t.a[n]|=A<<P;}function mL(t){var e,A,n;return e=t&z0,A=t>>22&z0,n=t<0?Pn:0,G0(e,A,n);}function Yv(t,e,A){var n=t.Dc(),P=n.createImage(e,A);return new iU(P);}function bL(t,e,A,n){var P;return P=c(F,m,6,e,15,1),SY(P,t,e,A,n),P;}function Xv(){Xv=v1,Ec=B(d(XA,1),re,6,14,[0,1,3,7,15,31,63,127]);}function _r(t,e){return e==0||t.e==0?t:e>0?Fm(t,e):Cj(t,-e);}function tT(t,e){return e==0||t.e==0?t:e>0?Cj(t,e):Fm(t,-e);}function zO(t,e){An(),e=e||{};var A=new Uh(e);return A.parseMolecule(t,e);}function a9(t,e){var A,n;return A=(y1(t),t),n=(y1(e),e),A==n?0:A<n?-1:1;}function Zv(t,e){var A,n;return A=e.hd(),n=e9(t,A),!!n&&$8(n.d,e.jd());}function KO(t,e){var A;return A=t.a.get(e),A??c(qn,A0,1,0,5,1);}function JO(t){var e,A;return e=t.c.e.length,A=t.c.e.length,A<e?-1:A>e?1:0;}function YO(t){var e,A;return e=t.c.e.length,A=t.c.e.length,e<A?-1:e>A?1:0;}function Wv(t){var e;return !!(t.r&&(e=zq(t.r),RR(t,e)));}function XO(t){t&&kq((bh(),wc)),--Go,t&&Oo!=-1&&(Jx(Oo),Oo=-1);}function _v(t){return t==5||t==6||t==7||t==8||t==15||t==16||t==33||t==34;}function jL(t,e){return N8(e)?e==null?b5(t.a,null):yk(t.c,e):b5(t.a,e);}function $v(t,e){return t.a?q(t.a,t.b):t.a=new bn(t.d),Jg(t.a,e),t;}function av(t,e){var A;S3(e),A=e/31|0,mG(t.a,A),t.a[A]=t.a[A]|0|1<<e%31;}function XD(t){var e;return e=(k2(),JA)[t<JA.length?t:6],e*(.9);}function ke(t,e,A,n,P,r){var i=t.Kc(),f=e.Gc();return i.add(f,A,n,P,r);}function eT(t,e,A,n,P){xr.call(this,e),this.c=PW(this,t,n,e,A),this.b=P;}function RL(t,e,A){this.b=t,this.d=e,this.e=A,this.c=this.d+(""+this.e);}function tF(t){this.b=iP("/resources/forcefield/mmff94/stbn.csv"),this.a=t;}function eF(t){this.b=iP("/resources/forcefield/mmff94/bond.csv"),this.a=t;}function AF(t){this.b=iP("/resources/forcefield/mmff94/angle.csv"),this.a=t;}function pL(t){bD(this),SD(t>=0,"Initial capacity must not be negative");}function ML(){throw new Error("static resources must be registered first");}function nF(){return q1(),""+null.zd(),null;}function CL(t,e){var A;return A=c(F,m,6,e,15,1),PA(t,0,A,0,t.length),A;}function HL(t,e,A,n){var P;return P=c(F,m,6,e+1,15,1),Y_(P,t,e,A,n),P;}function c(t,e,A,n,P,r){var i;return i=Zm(P,n),P!=10&&B(d(t,r),e,A,P,i),i;}function cA(t,e){var A;return A=(ee(e,t.a.length),t.a[e]),t.a.splice(e,1),A;}function VL(t,e){var A;for(A=t-e;A<_6;)A+=m0;for(;A>l1;)A-=m0;return A;}function PF(t,e){var A,n;return n=t.j.k[e],A=t.j.j[e],n==0?t.b:n==1?A:t.a+A;}function me(t,e,A,n){t.v[e]&=-8,A!=3&&(t.v[e]&=py),t.v[e]|=A,n&&(t.v[e]|=4);}function EL(t,e){t.eb=w.Math.max(t.eb,e),P1(t.k),N1(t,new x1(t,1,true));}function K1(t){!t.cb&&(t.cb=new i3()),Uf(t.V,t.cb),t.bb=t.I?new Ts(t.I):null;}function ZO(t){var e;for(ut(t,15),e=0;e<t.r;e++)(t.v[e]&3)!=0&&Ne(t,e,1,0);}function WO(t,e){return t.a[e]>-1?t.a[e]:t.D[e]==1?Ka(t,e):p6(t,e);}function rF(t,e){return e<t.i&&(q8(t.q,e)||t.I[e]==8)?0:t.I[e]&127;}function iF(t,e){return e<t.i&&(q8(t.q,e)||t.I[e]==8)?0:t.I[e]&127;}function fF(t,e){var A;return A=new PU(),A.c=true,A.d=e.jd(),sp(t,e.hd(),A);}function er(t,e){var A;return A=$r(t,e,0),A==-1?false:(cA(t,A),true);}function SL(t){var e;return e=-1,t.a!=-2?(e=t.a,t.a=-2):e=t.b.Qc(),e;}function AT(t){var e,A;for(A=0,e=0;e<t.a.length;e++)A+=ir(t.a[e]);return A;}function ZD(t,e){var A;return A=BA(0,e,0,t.a.length,true,t),A>=0&&t.a[A][7]>0;}function WD(t){this.b=c(Ut,Tt,6,t,15,1),this.c=c(Ut,Tt,6,t,15,1),this.a=0;}function nT(t){this.e=t,this.d=c(F,m,6,0,15,1),this.c=c(F,m,6,0,15,1);}function DF(t,e){this.N=w.Math.max(1,t),this.O=w.Math.max(1,e),oR(this);}function PT(t){this.e=t,this.b=this.e.a.entries(),this.a=c(qn,A0,1,0,5,1);}function IL(t,e){jU.call(this,t,e),this.a=c(z8t,A0,123,2,0,1),this.b=true;}function xL(t,e,A,n){HQ(),this.a=(n&255)<<24|(t&255)<<16|(e&255)<<8|A&255;}function Ar(t,e,A,n,P,r,i){i.a=e.a+P,i.c=e.c+r,i.b=e.b+P,i.d=e.d+r,In(t,i,A,n);}function Mt(t,e,A){if(t<0||e>A||e<t)throw At(new vh(to+t+H6+e+LM+A));}function _O(t){if(!t)throw At(new yU("Unable to add element to queue"));}function _u(){_u=v1,new Wg(),new mh("ISO-LATIN-1"),new mh("ISO-8859-1");}function uF(t,e){im(),this.d=e,this.i=new un(t),this.g=new Vr(),this.b=new Vr();}function U8(){this.g=new n1(),this.f=new n1(),this.a=new n1(),this.d=-1,this.c=false;}function QF(){this.b=c(Ut,Tt,6,64,15,1),this.c=c(Ut,Tt,6,64,15,1),this.a=0;}function oF(t,e,A){this.b=w.Math.max(t,e),this.c=w.Math.min(t,e),this.a=A;}function $O(t){return e1(s9,typeof t)||Hd(t,w.java.lang.Number$impl);}function aO(t,e){try{t.c=sn(e);}catch(A){if(A=_1(A),!Yt(A,42))throw At(A);}}function $u(t,e,A){var n=t.Kc(),P=n.createTextField(e,A);return new J7(P);}function au(t,e){var A;for(A=e;A<t.length;A++)if(t[A]==62)return A;return  -1;}function L8(t,e){var A;for(A=0;A<t.e.length;A++)if(e==t.e[A])return A;return  -1;}function $r(t,e,A){for(;A<t.a.length;++A)if($8(e,t.a[A]))return A;return  -1;}function rT(t){var e;for(e=0;e<t.r;e++)if(t.K[e].c!=0)return  true;return  false;}function tq(t,e){var A;for(A=Tl[e]/2;t<-A;)t+=m0;for(;t>=A;)t-=Tl[e];return t;}function eq(t,e){var A;return A=t.D[e],A==3||A==11||A==19||A==37||A==55||A==87;}function Aq(t,e){var A;return A=t.D[e],A==4||A==12||A==20||A==38||A==56||A==88;}function NL(t){return t.a.d!=t.c?Vg(t.a,t.b.value[0]):t.b.value[1];}function nq(t){return z(t,0)==0&&2<zo.length?zo[2]:new ff(t,2);}function UF(t){return t.d.a.length<2?null:new Mj(G(t.d,0),G(t.d,1));}function LF(t,e,A,n){return y1(t),y1(e),y1(A),y1(n),new Ou(t,e,A,new Kw());}function ai(t,e,A,n){var P;n=(FU(),n||Vl),P=t.slice(e,A),h5(P,t,e,A,-e,n);}function Pq(t,e,A,n,P){Mt(e,A,t.length),Mt(P,P+(A-e),n.length),TG(t,e,A,n,P);}function sF(t,e,A){if(e==null||A==null)throw At(new Rr());return Jr(t.e,e,A);}function iT(){iT=v1,Hc=new vu("All",0),dS=new fd(),BS=new sd(),vS=new Dd();}function yF(t){return t.__elementTypeCategory$==null?10:t.__elementTypeCategory$;}function fT(t,e){return new BP(t.b*e.c-t.c*e.b,t.c*e.a-t.a*e.c,t.a*e.b-t.b*e.a);}function lF(t,e){return ut(t,7),t.p[e]==2&&t.k[e]==2?Kb(t,e):_s(t,e,false);}function tf(t,e){var A;return e==null||e.length==0?null:qT(t,ln((A=e,w0(),A)));}function rq(t){var e,A;return new P8((e=new U8(),A=new un(new Sr(t)),kY(e,A),e));}function iq(t,e){var A,n;for(n=new n1(),A=0;A<e.s;A++)Ft(n,new zB(t,e,A));return n;}function Ze(t,e){J1();var A;for(A=t-e;A<_6;)A+=m0;for(;A>l1;)A-=m0;return A;}function hF(t,e){return yF(e)!=10&&B(Qs(e),e.xd,e.__elementTypeId$,yF(e),t),t;}function fq(t,e){e&&(t.eb=w.Math.max(t.eb,1),P1(t.k),N1(t,new x1(t,1,true)));}function Dq(t,e){e&&(t.eb=w.Math.max(t.eb,1),P1(t.k),N1(t,new x1(t,1,true)));}function uq(t,e){return F3(nz(Id(t,new al()),xd(e,new al()),new Vw()),new Ew());}function DT(t,e){var A,n;for(n=new Zt(t.a);n.a<n.c.a.length;)A=_t(n),A.nc(e);}function Qq(t,e){var A,n;for(n=new Zt(t.a);n.a<n.c.a.length;)A=_t(n),A.nc(e);}function GL(t,e,A){var n;for(n=0;n<t.r;n++)t.K[n].a+=e,t.K[n].b+=A;t.V+=e,t.W+=A;}function TF(t,e){var A;for(A=0;A<e.length;A++)if(e[A]==t)return  true;return  false;}function E0(t){var e;return L0(t)&&(e=0-t,!isNaN(e))?e:Vn(Ai(t));}function oq(t,e){try{t.i[0].b=sn(e);}catch(A){if(A=_1(A),!Yt(A,42))throw At(A);}}function Uq(t,e){try{t.i[0].a=sn(e);}catch(A){if(A=_1(A),!Yt(A,42))throw At(A);}}function cF(t,e,A){f8(t.g,A,e),t.b[e.a]=true,e.g!=-1&&(t.c[o1(t.k,e.a,e.g)]=true);}function Lq(t,e){t.L||(Ia(t,e),t.L=true),t.r||(G$(t,e),Utt(t),sY(t),t.r=true);}function OL(t){return t.v<<=t.t,(!t.r||t.v!=63)&&(t.v+=64),Ye(t.u,t.v&d1),t.u.a;}function uT(t){var e;return e=t.b.a.length==0?null:G(t.b,0),e!=null&&yT(t,0),e;}function QT(t,e,A,n){if(A==null||A.length==0){zL(e),e.d=null;return;}DM(t,e,A,n,0);}function wF(t,e,A,n,P,r){this.c=t,this.e=e,this.d=A,this.f=n,this.b=P,this.a=r;}function sq(t){this.e="",this.c=9,this.d=0,this.i=c(lc,A0,56,1,0,1),this.i[0]=t;}function gF(t,e){this.a=V0(t.b[e][5]),this.b=V0(t.b[e][6]),this.c=V0(t.b[e][7]);}function ef(t,e){return (t.G[e]&768)>>8!=1&&(t.G[e]&768)>>8!=2?-1:(t.G[e]&cn)>>10;}function oT(t,e){return t.p[e]==2&&t.k[e]==2&&t.o[e][0]==2&&t.o[e][1]==2&&t.D[e]<=7;}function yq(t){return t==1||t>=5&&t<=9||t>=14&&t<=17||t>=32&&t<=35||t>=52&&t<=53;}function lq(t,e){return new Ke(t.b*e.c-t.c*e.b,-(t.a*e.c-t.c*e.a),t.a*e.b-t.b*e.a);}function hq(t,e){var A,n;for(A=0,n=0;n<t.b;n++)t.e[n][e]&&t.c[n]==-3&&++A;return A;}function Tq(t){var e,A;for(A=t.a,e=0;e<t.b.length;e++)A+=t.b[e]*X4[t.c[e]];return A;}function cq(t){var e,A;for(A=t.d,e=0;e<t.b.length;e++)A+=t.b[e]*Z4[t.c[e]];return A;}function wq(t){var e,A,n;for(e=lk(t),n=0,A=0;A<qP.length;A++)n+=e[A]*qP[A];return n;}function UT(t,e,A){var n;for(n=G(t.k,e).length;A>=n;)A-=n;for(;A<0;)A+=n;return A;}function dF(t,e){return t.V.r!=0&&t.r?SO(t.r,e?Bj(t.V):$n(t.V)):false;}function gq(t,e){if(t.N!=0){t.C!=-4&&(t.C=-4,t.Bb(t.N));return;}t.C=-5,t.P=e,t.Bb(e);}function dq(t){return _T(t,(ti(),Bc))<0?-wN(Ai(t)):t.l+t.m*oP+t.h*UP;}function Bq(t,e,A,n,P){return y1(t),y1(e),y1(A),y1(n),y1(P),new Ou(t,e,A,n);}function qL(t,e,A){Yp.call(this,t),this.b=e,this.c=z(A,0)==0?new n2():new $i(A);}function BF(){ZP.call(this,"invalid JS RegExp: RGROUPS=\\((\\d+) (\\d+).*\\)");}function vF(){this.a=iP("/resources/forcefield/mmff94/herschbachlaurie.csv");}function _D(){this.i=c(lc,A0,56,2,0,1),this.i[0]=new we(),this.i[1]=new we(),this.a=0;}function ti(){ti=v1,gc=G0(z0,z0,524287),iS=G0(0,0,B8),dc=mL(1),mL(2),Bc=mL(0);}function vq(t,e){try{t.d=L1(e,f1,Et);}catch(A){if(A=_1(A),!Yt(A,42))throw At(A);}}function tQ(t,e){var A,n;for(n=Bu(t.b,e),A=n.length;A<10;A++)Ye(t.a,32);q(t.a,n);}function FF(t,e){var A,n;for(n=Bu(t.a,e),A=n.length;A<10;A++)Ye(t.b,32);q(t.b,n);}function kF(t,e){var A,n;for(A=t.p[e],n=0;n<t.k[e];n++)rA(t,t.j[e][n])&&++A;return A;}function ei(t,e,A){var n,P;for(n=0,P=0;P<t.k[e];P++)X(t,t.j[e][P])==A&&++n;return n;}function Fq(t){var e,A;return e=c(F,m,6,t.r,15,1),A=Ur(t,e,false,false),OR(t,e,A);}function kq(t){var e,A;if(t.b){A=null;do e=t.b,t.b=null,A=pb(e,A);while(t.b);t.b=A;}}function mq(t){var e,A;if(t.a){A=null;do e=t.a,t.a=null,A=pb(e,A);while(t.a);t.a=A;}}function zL(t){t.r=0,t.s=0,t.L=false,t.M=false,t.J=0,t.w=null,t.u=null,t.Q=null,t.U=0;}function ar(t,e){var A;for(A=0;A<t.e.length;A++)if(e==t.e[A])return  true;return  false;}function LT(t,e){var A,n,P;return A=t.length-(e/32|0)-1,n=e%32,P=1,P=P<<n,(t[A]&P)!=0;}function mF(t,e,A,n){var P;return P=0,e&&(P|=1),A&&(P|=2),n&&(P|=4),Eu(new dD(t.a,P));}function KL(t,e){return e?(ut(t,1),dP(t,t.g,t.i,Bn)):dP(t,t.r,t.s,Bn);}function bq(t,e){var A;return S3(e),A=e/31|0,A<t.a.length&&((t.a[A]|0)>>>e%31&1)==1;}function bF(t,e,A,n,P){var r;return r=dj(t,e,A,n,P),r<0?bj(t,e,A,n,P):V0(t.b[r][5]);}function eP(t,e){var A;return t.u==null||t.u[e]==null?null:on((A=t.u[e],w0(),A));}function OA(t,e){return (t.v[e]&b1)>>18!=1&&(t.v[e]&b1)>>18!=2?-1:(t.v[e]&VA)>>20;}function P0(t,e){var A,n;for(A=t.k[e],n=0;n<t.k[e];n++)t.D[t.j[e][n]]==1&&--A;return A;}function JL(t,e){var A,n;if(A=0,t.L)for(n=0;n<t.k[e];n++)ye(t,t.j[e][n])&&++A;return A;}function sT(t,e){var A,n,P,r;return n=e/2|0,P=t>=n,P&&(t-=n),r=e/32,A=r*t/(n-t),P?-A:A;}function jq(t){var e,A,n,P;return P=0,e=t.d.i,n=t.k.i,A=t.n.i,P=A/w.Math.max(e,n),P;}function Rq(t,e){var A;return A=e.c,e.a.b=e.b,e.b.a=e.a,e.a=e.b=null,e.c=null,--t.b,A;}function jF(t){var e;x9(!!t.c),e=t.c.a,Rq(t.d,t.c),t.b==t.c?t.b=e:--t.a,t.c=null;}function YL(t){var e;return e=new jT(),e.n="Class$"+(t?"S"+t:""+e.i),e.b=e.n,e.j=e.n,e;}function pq(t){var e,A;for(ut(t,7),e=0,A=0;A<t.q.j.a.length;A++)wh(t.q,A)&&++e;return e;}function XL(t,e,A){var n,P;for(n=0,P=0;P<Ct(t.f,A);P++)ar(e,_(t.f,A,P))&&++n;return n;}function Mq(t,e,A){var n,P;for(P=0;P<t.k[A];P++)if(n=t.j[A][P],n!=e)return n;return  -1;}function Cq(t,e,A){var n;return n=UX(t,e,A),n&&A==386&&(ut(t,7),n=n&(t.G[e]&128)==0),n;}function pe(t,e,A){var n=function(){return t.apply(n,arguments);};return e.apply(n,A),n;}function Hq(){vg();for(var t=Ll,e=0;e<arguments.length;e++)t.push(arguments[e]);}function Vq(){return Qr(),B(d(O8t,1),_e,75,0,[wS,lS,yS,hS,Hl,TS,ce,cS]);}function eQ(t){return J1(),t>=0&&t<v9.length&&v9[t]!=null?v9[t]:t>=171&&t<=190?gE:dE;}function RF(t){return t!=null&&(typeof t===ly||typeof t=="function")&&t.yd!==DD;}function pF(t,e){var A;if(t.i!=null)for(A=0;A<t.i.length;A++)t.i[A].a*=e,t.i[A].b*=e;}function MF(t,e){if(t){e.k=t;var n=nO(e);if(!n){bo[t]=[e];return;}n.wd=e;}}function AP(t,e){for(var A in e)e[A].configurable=true;Object.defineProperties(t,e);}function AQ(t,e,A){if(!t.c){if(t.e.a.length==4){t.c=true;return;}Ft(t.e,new f3(t,e,A));}}function Eq(t,e){var A;return A=t.D[e]<v9.length?v9[t.D[e]]:null,A==null?6:A[A.length-1];}function Sq(t,e){var A;for(A=0;A<t.k[e];A++)if(t.t[t.j[e][A]]<0)return  true;return  false;}function CF(t,e){var A;for(A=0;A<t.k[e];A++)if(t.t[t.j[e][A]]>0)return  true;return  false;}function w1(t,e,A,n){n?t.C[e]=J(t.C[e],A):t.C[e]=V(t.C[e],Zn(A)),t.U=0,t.L=true;}function Iq(t,e,A){t.a==null&&(t.a=c(E,I,6,t.R.g,15,1),cx(t.a)),t.a[e]=A<<24>>24;}function HF(t,e){t&&(this.k=c(gr,B9,26,1,0,1),this.k[0]=t),this.c=0,this.g=e,Vs(this);}function VF(t,e,A,n,P,r,i,f){this.e=t,this.a=e,this.b=A,this.f=n,this.d=i,this.c=P*r/f;}function ZL(t,e,A,n,P,r){xr.call(this,n),this.e=t,this.b=e,this.c=A,this.a=P,this.d=r;}function $D(t,e){SD(t>=0,"Digits < 0"),c3(e,"null RoundingMode"),this.a=t,this.b=e;}function EF(t){x9(t.c>=0),PJ(t.d,t.c)<0&&(t.a=t.a-1&t.d.a.length-1,t.b=t.d.c),t.c=-1;}function xq(t,e){var A,n,P,r;if(t.e!=null)for(n=t.e,P=0,r=n.length;P<r;++P)A=n[P],A.J=e;}function SF(t,e,A){var n,P,r;for(r=t.a.length-1,P=t.b,n=0;n<A;P=P+1&r,++n)e[n]=t.a[P];}function Nq(t,e){var A,n;return A=AT(t),n=AT(e),A>n?1:A<n?-1:0;}function Gq(t){var e,A;return e=vL(t.a),e==-1?0:(A=t.a[e]|0,e*31+(32-D9(A)));}function IF(t,e){var A;for(A=0;A<t.k[e];A++)if(R1(t,t.j[e][A])<0)return  true;return  false;}function Oq(t){var e,A;for(A=0,e=0;e<t.a.r;e++)(X(t.a,e)==7||X(t.a,e)==8)&&++A;return A;}function qq(t){var e,A;if(t.L)return 0;for(ut(t,1),A=0,e=0;e<t.g;e++)A+=xt(t,e);return A;}function WL(t){var e,A;if(t==0)return 32;for(A=0,e=1;(e&t)==0;e<<=1)++A;return A;}function _L(t){var e;return e=t.e[t.d++]-48,an(t.e[t.d]&d1)&&(e=10*e+(t.e[t.d++]-48)),e;}function xF(t){var e;return e=c(Ut,Tt,6,2,15,1),e[0]=vn*(t/17|0)+p8,e[1]=vn*(t%17)+p8,e;}function zq(t){var e=t.Hc(),A=e.pasteMolecule();return A?A.wc():null;}function NF(t,e){return t.b!=e.b?t.b>e.b?-1:1:t.c!=e.c?t.c>e.c?-1:1:0;}function Kq(t,e){return t.d!=e.d?t.d<e.d?-1:1:t.e!=e.e?t.e<e.e?-1:1:0;}function yT(t,e){var A;A=cA(t.b,t.b.a.length-1),e<t.b.a.length&&(Zr(t.b,e,A),Xb(t,e));}function lT(t,e,A){var n;vtt(e,A,(t.e&12)!=0),n=X5(t,e.b[0],e.b[1],0),rk(t,e.b[0],e.b[1],n);}function nQ(t,e,A,n){return Bt(w.Math.round((t.a[e]*t.c[e]+n*t.c[A])/(t.c[e]+t.c[A])));}function Jq(t,e,A,n){this.d=e,this.a=A,this.b=n,this.e=d2(t.d,e,A,n),this.c=ia(t.d,e,A,n);}function Yq(t,e){Bm(),this.o=t,this.n=z(t,0)==0?new n2():new $i(t),this.r=new UB(t,e);}function GF(t,e){var A,n;t.b&&(K1(t),n=(t.U&4)!=0,A=new gm(t._,t.V,e,n),xN(A,new e7(t)));}function OF(t){var e;t.a=false,e=new fu(MB(t)),uO(e,0,0,t.b.o,t.b.e),Ra(t.b,new fu(MB(t)));}function Xq(t,e,A){var n,P;for(t.J&=~e,P=new Zt(t.S);P.a<P.c.a.length;)n=_t(P),n.nc(A);}function Zq(t,e,A){var n;if(t.i!=null)for(n=0;n<t.i.length;n++)t.i[n].a+=e,t.i[n].b+=A;}function qF(t,e,A){var n,P;for(P=G(t.j,e),n=0;n<P.length;n++)if(A==P[n])return n;return  -1;}function Wq(t,e,A){var n,P;for(P=G(t.k,e),n=0;n<P.length;n++)if(A==P[n])return n;return  -1;}function zF(t,e){var A;for(OJ(t),A=0;A<t.b.length;A++)if(e[t.b[A]])return  true;return  false;}function _q(t,e){var A;for(A=0;A<t.k[e];A++)if(X(t,t.j[e][A])!=6)return  true;return  false;}function PQ(t,e){var A,n;return A=1-e,n=t.a[A],t.a[A]=n.a[e],n.a[e]=t,t.b=true,n.b=false,n;}function $q(t,e,A){var n;return Bz(t),t.b=true,n=new Jw(),n.a=e,qx(t.a,new Ig(n,A)),n.a;}function rQ(t,e,A,n){var P,r;this.a=hn(t,e,A,n),P=A-t,r=n-e,this.b=w.Math.sqrt(P*P+r*r);}function iQ(t,e){var A;for(A=0;A<t.r;A++)w.Math.abs(t.A[A])==w.Math.abs(e)&&(t.A[A]=0);}function nr(t,e){var A;return A=c(F,m,6,e,15,1),PA(t,0,A,0,w.Math.min(t.length,e)),A;}function aq(t,e){var A;return A=c(XA,re,6,e,14,1),PA(t,0,A,0,w.Math.min(t.length,e)),A;}function tz(t,e){var A;for(A=0;A<O(t.k,e);A++)if(!t.b[_(t.k,e,A)])return  true;return  false;}function Af(t,e){var A;return A=c(F,m,6,e,15,1),PA(t,0,A,0,w.Math.min(t.length,e)),A;}function Me(t){return t.J==null&&(si(t),(t.Q&O1)==0&&(rtt(t),ip(t,1),ip(t,2)),k1t(t)),t.J;}function ez(t){var e={};return t!=null&&(e=t&&t.prototype,!e&&(e=bo[t])),Object.create(e);}function KF(t,e){var A;(!t.q||!e.q)&&(A=new ov(t.o),!t.q&&(t.q=n5(A,t)),!e.q&&(e.q=n5(A,e)));}function Az(t,e){var A,n;if(t.g)for(n=new Zt(t.g);n.a<n.c.a.length;)A=_t(n),A.Ib(e,t.p);}function aD(t,e){var A,n,P;A=t.a.length-(e/32|0)-1,n=e%32,P=1,P=P<<n,t.a[A]=t.a[A]|P,t.b=-1;}function pP(t,e,A,n){var P,r;return r=t.length,P=w.Math.min(n,r)-A,F5(t,A,e,0,P,true),e;}function $L(t,e){var A;return A=c(Pt,it,6,e,16,1),PA(t,0,A,0,w.Math.min(t.length,e)),A;}function aL(t,e){var A=t.Lc(),n=A.getBounds(e);return new lA(n.x,n.y,n.width,n.height);}function nz(t,e,A){return LF(A,new DB(t,e),new Ow(),B(d(El,1),_e,96,0,[(hQ(),Yo)]));}function JF(){JF=v1,new $D(34,(Qr(),ce)),new $D(7,ce),new $D(16,ce),new $D(0,Hl);}function Hn(t){return xs(t,26)*14901161193847656e-24+xs(t,27)*11102230246251565e-32;}function Pz(t){return t>=21&&t<=30||t>=39&&t<=48||t==57||t>=72&&t<=80||t==89||t>=104&&t<=112;}function YF(t){return Bt(w.Math.round((Re==-1&&(Re=globalThis.devicePixelRatio||1),Re*t)));}function ts(t){e3(this),a3(this),this.backingJsObject=t,Wb(this,t),this.f=t==null?y9:P2(t);}function es(t,e,A,n,P,r){this.f=e,this.d=A,this.a=n,this.b=P,this.c=r,this.e=qW(t.k,e,A,n,P,r);}function XF(t,e,A){var n,P,r;for(n=0,P=0;P<A;P++)r=e[P],t[P]=r<<1|n,n=r>>>31;n!=0&&(t[A]=n);}function ZF(t,e,A){var n,P,r;for(P=0,r=0;r<t.k[e];r++)n=t.j[e][r],n!=A&&t.k[n]>2&&++P;return P;}function o1(t,e,A){var n;for(n=0;n<t.j[e].length;n++)if(t.j[e][n]==A)return t.n[e][n];return  -1;}function As(t,e,A){var n;for(n=0;n<t.k.a.length;n++)if(Pf(t,n,e)&&Pf(t,n,A))return n;return  -1;}function nf(t,e){var A;for(A=0;A<O(t.j,e);A++)if(Ae(t.j,_(t.j,e,A)))return  true;return  false;}function rz(t){var e;for(e=0;e<t.i;e++)if(t.I[e]==8)return jf(new p9(t),null,false);return  false;}function WF(t){var e,A;for(ut(t,31),A=0,e=0;e<t.g;e++)(t.v[e]&3)!=0&&(t.v[e]&4)==0&&++A;return A;}function iz(t){var e,A;if(e=t.q,t.t)for(A=0;A<t.q;A++)t.e[A]&&--e;return t.i>0&&e>t.i&&(e=t.i),e;}function ns(t,e){var A;return A=ws(t.V,K(t.V,0,e)),A!=-1&&ze(t.V,A)!=1&&ze(t.V,A)!=2&&(A=-1),A;}function _F(t,e,A){var n,P,r;n=Bt(T4*G8(t.V)),P=Bt(mt(t.V,A)),r=Bt(Rt(t.V,A)),yL(e,P-n,r-n,2*n);}function fz(t,e,A){var n;return n=G(t.I,0),EQ(n,mt(t.V,e),Rt(t.V,e))==EQ(n,mt(t.V,A),Rt(t.V,A));}function $F(t,e,A,n){var P;P=t.a.length,A>P?A=P:zt(e,A+1),t.a=hA(t.a,0,e)+(""+n)+GD(t.a,A);}function hT(t,e,A,n){xr.call(this,t),this.a=c(Ut,Tt,6,1,15,1),this.a[0]=A,this.b=e,this.c=n;}function aF(t){this.f=t,this.e=new $3(this.f.c),this.a=this.e,this.b=vT(this),this.d=this.f.b;}function tk(t){return t.a<54?t.f<0?-1:t.f>0?1:0:(!t.c&&(t.c=jP(E1(t.f))),t.c).e;}function ek(t){var e;if(t.b==-2){if(t.e==0)e=-1;else for(e=0;t.a[e]==0;e++);t.b=e;}return t.b;}function Dz(t){var e,A,n;for(A=0,e=-1,n=0;n<t.a.length;n++)A<t.a[n]&&(A=t.a[n],e=n);return e;}function uz(t){var e,A;for(A=true,e=0;e<t.i.g;e++)if(t.o[e]!=0&&!t.e[e]){A=false;break;}return A;}function TT(t,e){var A,n;for(A=0,n=0;n<t.k[e];n++)rA(t,t.j[e][n])&&!Ru(t,t.n[e][n])&&++A;return A;}function fQ(t,e){var A,n;for(n=0,A=0;A<t.s;A++)(t.F[0][A]==e||t.F[1][A]==e)&&(n+=dt(t,A));return n;}function Ak(t){var e,A,n;for(n=0,A=t.Tb();A.cd();)e=A.dd(),n=n+(e!=null?fr(e):0),n=n|0;return n;}function cT(t,e){var A,n,P;for(y1(e),A=false,P=e.Tb();P.cd();)n=P.dd(),A=A|t.add(n);return A;}function wT(t,e){var A,n;for(n=t.o.Gc(),n.removeAllItems(),A=0;A<16;A++)Gt(t.o,""+(e+A));return 16;}function t9(t,e){var A;return A=c(F,m,6,2,15,1),t>e?(A[0]=t,A[1]=e):(A[0]=e,A[1]=t),A;}function nk(t,e){xr.call(this,t),this.a=c(Ut,Tt,6,2,15,1),this.a[0]=e,this.a[1]=Ge,this.c=-1;}function Qz(t){if(y1(t),t.length==0)throw At(new _P("Zero length BigInteger"));T_(this,t);}function Ln(t,e){var A;A=t.a.length,e<A?t.a=hA(t.a,0,e):e>A&&(t.a+=z8(c(Fr,re,6,e-A,15,1)));}function oz(t,e){var A;this.c=t,A=new n1(),ZT(t,A,e,t.b,null,false,null),this.a=new J3(A,0);}function Uz(t){var e;for(e=0;e<t.o.r;e++)if((t.a==null?NaN:t.a[e])>2.72)return  false;return  true;}function Pk(t,e){var A,n;for(A=0,n=t.size();A<n;++A)if($8(e,t.getAtIndex(A)))return A;return  -1;}function gT(t,e){return !!(e0(t.b,e)==1&&X(t.b,e)<10||mn(t.b,e)||xP(t.b,e,true));}function Lz(t,e){return t.D[e]==1&&t.B[e]==0&&t.t[e]==0&&(t.v[e]&b8)==0&&(t.u==null||t.u[e]==null);}function dT(t,e){return w.Math.sqrt((e.a-t.a)*(e.a-t.a)+(e.b-t.b)*(e.b-t.b)+(e.c-t.c)*(e.c-t.c));}function rk(t,e,A,n){var P;P=w.Math.min($r(t.d,e,0),$r(t.d,A,0)),f8(t.d,P,n),er(t.d,e),er(t.d,A);}function sz(t,e,A,n){n&&e!=-1&&(t.eb=w.Math.max(t.eb,1),P1(t.k),N1(t,new x1(t,1,true))),A.oc();}function PA(t,e,A,n,P){q1(),c3(t,"src"),c3(A,"dest"),Oz(t,e,A,n,P),F5(t,e,A,n,P,true);}function Ps(t,e,A,n,P,r,i,f,D,Q){var o=t.Lc(),L=e.qc();return o.drawImage(L,A,n,P,r,i,f,D,Q);}function Vn(t){var e;return e=t.h,e==0?t.l+t.m*oP:e==Pn?t.l+t.m*oP-UP:t;}function E1(t){return N2<t&&t<UP?t<0?w.Math.ceil(t):w.Math.floor(t):Vn(WZ(t));}function yz(t){return ut(t,15),!t.d&&(t.g<2||!hs(t.K[0],t.K[1]))&&(t.d=new bA(t)),t.d?a7(t.d):null;}function ik(t){return ut(t,15),!t.d&&(t.g<2||!hs(t.K[0],t.K[1]))&&(t.d=new bA(t)),t.d?Me(t.d):null;}function lz(t,e,A){var n;for(n=0;n<t.j.g.length;n++)if(t.e[e][n]&&t.e[A][n])return  true;return  false;}function hz(t,e){var A;for(A=0;A<t.b;A++)if(t.e[A][e]&&t.c[A]==-3)return A<t.a?1:A<t.b?2:0;return  -1;}function fk(t,e){return e>=t.g?0:e<t.g&&f0(t.q,e)&&t.D[e]==6&&t.t[e]!=0?1:t.p[e];}function Se(t){var e,A,n,P;return P=t,n=0,P<0&&(P+=UP,n=Pn),A=Bt(P/oP),e=Bt(P-A*oP),G0(e,A,n);}function Tz(t,e){var A,n,P;for(P=(ut(t,7),t.q),n=0,A=0;A<P.j.a.length;A++)qF(P,A,e)>=0&&++n;return n;}function Dk(t,e){var A,n;for(n=e.Tb();n.cd();)if(A=n.dd(),m3(t,A.jd()))return  true;return  false;}function cz(t){var e,A,n;for(n=1,A=t.Tb();A.cd();)e=A.dd(),n=31*n+(e!=null?fr(e):0),n=n|0;return n;}function _1(t){var e;return Yt(t,27)?t:(e=t&&t.__java$exception,e||(e=new dv(t),void 0),e);}function BT(t){var e;return z(t,0)<0&&(t=Zn(t)),e=Ot(j0(t,32)),64-(e!=0?D9(e):D9(Ot(t))+32);}function wz(t,e,A){var n,P;return e==null?null:ds(t,ln((P=e,w0(),P)),A==null?null:ln((n=A,n)),0);}function gz(t,e){var A;for(A=0;A<t.j.i;A++)t.e[A]&&Gs(e,A)&&(Df(t,K(t.j,0,A)),Df(t,K(t.j,1,A)));}function uk(t,e){return w.Math.sqrt((t.a-e.a)*(t.a-e.a)+(t.b-e.b)*(t.b-e.b)+(t.c-e.c)*(t.c-e.c));}function DQ(t,e){t.w!=e&&(t.w==19||e==19?(t.w=e,t.eb=w.Math.max(t.eb,1),P1(t.k)):t.w=e);}function Qk(t,e,A,n){return g1t(n,t,e),A!=null&&(A[0]=n.f[0],A[1]=n.b[0],A[2]=n.b[1],A[3]=n.f[1]),n.d;}function dz(t,e){typeof window===ly&&typeof window.$gwt===ly&&(window.$gwt[t]=e);}function Bz(t){if(t.b)throw At(new yU("Stream already terminated, can't be modified or used"));}function vT(t){return t.a.cd()?true:t.a!=t.e?false:(t.a=new PT(t.f.a),t.a.cd());}function ok(t,e){if(e==null)return  false;for(;t.a!=t.b;)if(SP(e,qk(t)))return  true;return  false;}function vz(t){return t==null?false:t.$implements__java_lang_Cloneable||Array.isArray(t);}function Uk(t){return t.n==null&&(t.n=Mn(t.e,t.e.length),t.n.sort(pe(Q0.prototype.ld,Q0,[]))),t.n;}function Fz(t){return t.includes("ATOMS=(")?E2:t.includes("BONDS=(")?"BONDS":null;}function kz(t){var e;return t<128?(e=(sB(),vc)[t],!e&&(e=vc[t]=new Ah(t)),e):new Ah(t);}function FT(t){var e,A;return e=Bt(t.i[1].a-t.i[0].a),A=Bt(t.i[1].b-t.i[0].b),w.Math.sqrt(e*e+A*A);}function Lk(t,e){var A,n,P;return A=t.l-e.l,n=t.m-e.m+(A>>22),P=t.h-e.h+(n>>22),G0(A&z0,n&z0,P&Pn);}function mz(t,e){var A,n,P;return A=t.l+e.l,n=t.m+e.m+(A>>22),P=t.h+e.h+(n>>22),G0(A&z0,n&z0,P&Pn);}function sk(t,e){var A;return e>0?(t[e]+t[e-1])/2:(A=l1+(t[0]+t[t.length-1])/2,A>l1?A-m0:A);}function bz(t){var e;return e=t.a[t.b],e==null?null:(t.a[t.b]=null,t.b=t.b+1&t.a.length-1,e);}function yk(t,e){var A;return A=t.a.get(e),A===void 0?++t.d:(t.a.delete(e),--t.c,++t.b.b),A;}function lk(t){var e,A;for(A=c(F,m,6,qP.length+2,15,1),ut(t,7),e=0;e<t.g;e++)++A[i1t(t,e)];return A;}function jz(t){var e,A;if(t.r==0)return null;for(A=new N0(),e=0;e<t.r;e++)X8(A,t.K[e]);return ZU(A,1/t.r);}function hk(t){var e,A;for(A=new Zt(t.U);A.a<A.c.a.length;)e=_t(A),$1(t,e.a),EN(t,e.b,e.c);$1(t,t.Q);}function Rz(t){var e,A;for(A=0,e=0;e<t.a.r;e++)(X(t.a,e)==7||X(t.a,e)==8)&&$d(t.a,e)>0&&++A;return A;}function uQ(t,e){var A;for(A=0;A<t.k[e];A++)if(t.o[e][A]==2&&X(t,t.j[e][A])>6)return  true;return  false;}function pz(t,e){var A,n;return A=Ns(t,e),A==-1?-1:(n=t.b.a.length,Ft(t.b,e),f8(t.a,A,U1(n)),n);}function Mz(t){var e,A,n;for(n=w.Math.max(t.d.length,t.c.length),A=1,e=n-t.a+1;e<=n;e++)A*=e;return A;}function B(t,e,A,n,P){return P.wd=t,P.xd=e,P.yd=DD,P.__elementTypeId$=A,P.__elementTypeCategory$=n,P;}function Cz(t){return e1(typeof t,Mf)?true:t!=null&&t.$implements__java_lang_CharSequence;}function Hz(t){var e;if(t<0)return f1;if(t==0)return 0;for(e=dn;(e&t)==0;e>>=1);return e;}function Ai(t){var e,A,n;return e=~t.l+1&z0,A=~t.m+(e==0?1:0)&z0,n=~t.h+(e==0&&A==0?1:0)&Pn,G0(e,A,n);}function MP(t,e){var A,n;return A=e.toArray(),n=A.length,n==0?false:(o3(t.a,t.a.length,A),true);}function Vz(t,e){var A;for(A=0;A<t.b;A++)if(t.e[A][e]&&t.c[A]==-3)return A<t.a?A:A<t.b?A-t.a:-1;return  -1;}function Tk(t,e,A,n){var P,r;for(r=0;r<O(t.f,A);r++)if(P=_(t.f,A,r),P!=n&&P<e)return  false;return  true;}function kT(t,e,A){var n,P,r,i;for(P=e,r=0,i=P.length;r<i;++r)n=P[r],t.f[n&1073741823]=(n&dn)!=0^A?2:1;}function Ez(t,e,A,n){Ft(t.$,new lA(e-t.V,A-t.V,2*t.V,2*t.V)),t.K||Ft(t.U,new Vu(e,A,wQ(t,n)?-3:t.p[n]));}function Ie(t,e,A){t.a==t.b.length&&(t.b=zD(t.b,2*t.a),t.c=zD(t.c,2*t.a)),t.b[t.a]=e,t.c[t.a]=A,++t.a;}function QQ(t,e){t.F[0]=nr(t.F[0],e),t.F[1]=nr(t.F[1],e),t.I=nr(t.I,e),t.G=nr(t.G,e),t.H=nr(t.H,e),t.O=e;}function Sz(t){var e,A;return A=Up(t),A?(kD(A,t.a),e=G(A,A.a.length-1),t.n=Cs(t.d,e),t.n):null;}function ck(t,e,A,n){var P;return w2(t,e,A,n),Ed(t.R)?null:(P=t.R,_h(t.R,t.L),t.R=new Qu(),P);}function We(t,e,A){var n,P;return n=new IL(e,A),P=new PU(),t.b=xj(t,t.b,n,P),P.b||++t.c,t.b.b=false,P.d;}function wk(t){var e,A;return A=D9(t.h),A==32?(e=D9(t.m),e==32?D9(t.l)+32:e+20-10):A-12;}function Iz(t,e){var A;if(t.c!=null){for(A=0;A<t.c.length;A++)if(e==t.c[A]&&t.d[A])return  true;}return  false;}function xz(t,e){var A,n;for(A=c(q2,V2,28,e,0,1),n=0;n<t.length;n++)t[n]&&(A[n]=new pu(t[n]));return A;}function Nz(t,e){var A,n,P;for(P=new Wu(t.g),n=new Zt(P);n.a<n.c.a.length;)A=_t(n),Hv(e,A)&&n3(t.g,A);}function Gz(t,e,A){var n,P,r;for(ut(e,1),P=G(t.a,A),n=0;n<t.d.d.a.length;n++)r=I9(t.d,n),MW(r,e,P);ui(e);}function Oz(t,e,A,n,P){var r,i;if(i=t.length,r=A.length,e<0||n<0||P<0||e+P>i||n+P>r)throw At(new sh());}function qz(t){dk();var e;e=Al,(e.startsWith(nl)||e.startsWith(Pl)||e.startsWith(rl))&&uY(t,zE);}function gk(){SD(true,"Negative initial capacity"),SD(true,"Non-positive load factor"),i8(this);}function s8(){s8=v1,Sl=B(d(ft,1),Dt,2,6,["distance","plane","line","torsion","stereo","binap"]);}function dk(){dk=v1,hc=B(d(F,1),m,6,15,[5258420,0]),zE=B(d(F,1),m,6,15,[11837695,14737632]);}function ni(){ni=v1,YA=B(d(Oe,1),uA,6,15,[.29899999499320984,.5870000123977661,.11400000005960464]);}function zz(t){return t>=3&&t<=4||t>=11&&t<=13||t>=19&&t<=31||t>=37&&t<=51||t>=55&&t<=84||t>=87&&t<=112;}function rs(t){var e,A,n;e=~t.l+1&z0,A=~t.m+(e==0?1:0)&z0,n=~t.h+(e==0&&A==0?1:0)&Pn,t.l=e,t.m=A,t.h=n;}function Kz(t,e){var A,n;for(A=t.a.length-1,t.c=t.c-1&A;e!=t.c;)n=e+1&A,t.a[e]=t.a[n],e=n;t.a[t.c]=null;}function Jz(t,e){var A,n;for(A=t.a.length-1;e!=t.b;)n=e-1&A,t.a[e]=t.a[n],e=n;t.a[t.b]=null,t.b=t.b+1&A;}function Bk(t,e,A){var n;return t.A.d.a.length!=0&&(n=I9(t.A,0),n.a<e)?(uU(t.A,0),n.b):t.sd(A);}function vk(t,e,A){var n;for(n=0;n<t.k[e];n++)if(X(t,t.j[e][n])!=6&&t.j[e][n]!=A)return  true;return  false;}function oQ(t,e){var A,n;for(y1(e),n=e.Tb();n.cd();)if(A=n.dd(),!t.contains(A))return  false;return  true;}function mT(t){var e,A;for(e=0,A=0;A<t.length;A++)e=(e<<5)-e+(zt(A,t.length),t.charCodeAt(A))|0;return e;}function Yz(t){var e,A,n;for(n=new N0(),A=0;A<t.r;A++)X8(n,t.K[A]);for(ZU(n,1/t.r),e=0;e<t.r;e++)FB(t.K[e],n);}function Fk(t,e){QM();var A,n;for(n=e-t,A=0;A<yl[t].length;A++)if(yl[t][A].b==n)return yl[t][A].a;return NaN;}function e9(t,e){var A,n,P;for(P=t.b;P;){if(A=t.a.Rb(e,P.c),A==0)return P;n=A<0?0:1,P=P.a[n];}return null;}function Xz(t,e){return t.a>e.a?1:t.a<e.a?-1:t.b>e.b?1:t.b<e.b?-1:0;}function Zz(t,e){return t.c<e.c?-1:t.c>e.c?1:t.d<e.d?-1:t.d>e.d?1:0;}function Wz(t,e){return zA(e,t.c)!=0?1:(t.j=zW(e),t.j==null?oK(e)?3:4:t.j.length==0?3:2);}function _z(t,e){return sr(t)==-1||sr(e)==-1||((sr(t)|sr(e))&1)!=0?3:sr(t)==sr(e)?1:2;}function bT(t){var e,A;return A=(t[1]+t[0])/2,e=w.Math.abs(t[1]-t[0]),e>l1?A:A<0?A+l1:A-l1;}function UQ(t){var e,A;for(A=false,e=0;e<t.r;e++)(t.v[e]&512)!=0&&(t.D[e]=-1,A=true);return A&&ui(t)!=null;}function $z(t){qs();var e,A;for(ut(t,1),A=0,e=0;e<t.r;e++)t.D[e]==1?++A:A+=t.e[e]-t.k[e]+xt(t,e);return A;}function az(t,e,A,n,P){var r;return r=R5(t,e),A&&rs(r),P&&(t=SJ(t,e),n?zn=Ai(t):zn=G0(t.l,t.m,t.h)),r;}function kk(t,e,A,n){var P,r,i;for(P=c(E,I,6,n,15,1),i=QK(t.a,P),r=0;r<i;r++)e[A+r]=P[r]&d1;return i;}function tK(t,e){var A,n,P;for(P=0,n=new Zt(e);n.a<n.c.a.length;)A=_t(n),P+=Sk(t,A.c,A.b)?t.b:0;return P;}function mk(t,e){var A,n,P,r;for(n=e,P=0,r=n.length;P<r;++P)if(A=n[P],m3(t,A.hd()))return A;return null;}function eK(t,e,A){var n,P;for(P=0;P<t.g[e].length;P++)n=t.g[e][P],t.k[n]==2&&(t.k[n]=1,t.j[n]=A<<24>>24);}function bk(t,e,A){var n;if(t.i!=null)for(n=0;n<t.i.length;n++)t.i[n].a=t.o[n]+e-t.k,t.i[n].b=t.p[n]+A-t.n;}function t2(t,e,A,n){var P;return (t.G&1)!=0?false:(P=G(t.$,n),e>P.c&&e<P.c+P.b&&A>P.d&&A<P.d+P.a);}function AK(t,e){var A;if(O(t.L,e)!=2)return  false;for(A=0;A<2;A++)if(EA(t.L,e,A)!=2)return  false;return  true;}function nK(t,e){var A;for(A=0;A<O(t.R,e);A++)if(t.o[Nt(t.R,e,A)]==3&&EA(t.R,e,A)==1)return  true;return  false;}function wA(t,e,A){var n,P,r,i;for(P=G(t.j,e),r=0,i=P.length;r<i;++r)if(n=P[r],A==n)return  true;return  false;}function Pf(t,e,A){var n,P,r,i;for(P=G(t.k,e),r=0,i=P.length;r<i;++r)if(n=P[r],A==n)return  true;return  false;}function PK(t,e){pf();var A,n,P;for(P=0,A=0,n=0;n<t.length;n++)P+=ir(t[n]&e[n]),A+=ir(t[n]|e[n]);return P/A;}function jk(t,e){var A;for(A=0;A<t.f.length;A++)if(gt(t.f[A],e.f[A]))return Si(t.f[A],e.f[A])?-1:1;return 0;}function Rk(t,e){var A;return A=BA(0,e,0,t.a.length,true,t),V0(t.a[A][3])*w.Math.pow(V0(t.a[A][1]),.25);}function LQ(t,e){var A;e*2+1>=t.b.a.length||(LQ(t,2*e+1),A=2*e+2,A<t.b.a.length&&LQ(t,A),Xb(t,e));}function rf(t,e){var A;return A=O3(e,"([/\\\\\\.\\*\\+\\?\\|\\(\\)\\[\\]\\{\\}$^])","\\\\$1"),O3(t,A,"");}function pk(t,e){var A,n;for(n=c(F,m,6,e.length+1,15,1),A=0;A<e.length;A++)n[A]=e[A];return n[e.length]=t,n;}function rK(t,e,A){var n,P;for(++t.b,n=new BD(t),n.p=A,P=t.g.length-1;P>=0;P--)FN(t,n,t.g[P],P,e[P]);return n;}function sQ(t,e,A){var n;for(n=A-1;n>=0&&t[n]==e[n];n--);return n<0?0:Si(V(t[n],g1),V(e[n],g1))?-1:1;}function e2(t,e){var A;for(A=0;A<e.k.length;A++)HD(t.k[A],e.k[A]);e.j==null?t.j=null:t.j=hL(e.j,e.j.length);}function Mk(t){var e;for(this.o=t,this.k=c(q2,V2,28,t.r,0,1),e=0;e<t.r;e++)this.k[e]=new pu(t.K[e]);this.n=NaN;}function Ck(t,e){this.n=t,this.k=e,this.j=(e&16)==0,this.d=-1,this.e=0,this.o=0,this.a=-1,this.g=-1,this.c=0;}function jT(){this.i=b1t++,this.n=null,this.j=null,this.g=null,this.d=null,this.b=null,this.k=null,this.a=null;}function is(t,e,A,n,P){xr.call(this,t),this.a=c(Ut,Tt,6,2,15,1),this.a[0]=A,this.a[1]=n,this.b=e,this.c=P;}function yQ(t,e,A,n,P,r,i){return o9(t,e,A,n,P,r==null?t.F[0][A]:r[t.F[0][A]],r==null?t.F[1][A]:r[t.F[1][A]],i);}function iK(t){var e,A,n,P,r;for(r=1,A=t,n=0,P=A.length;n<P;++n)e=A[n],r=31*r+(e!=null?fr(e):0),r=r|0;return r;}function fK(t,e){var A;for(A=0;A<e.length;A++){if(e[A]<t.g[A].a.length-1)return ++e[A],true;e[A]=0;}return  false;}function DK(t,e){var A;for(A=0;A<O(t.i,e);A++)if(EA(t.i,e,A)==2&&X(t.i,_(t.i,e,A))==8)return  true;return  false;}function uK(t){var e,A;if(A=ma(t),i0(t.A,t.a))for(e=0;e<t.A.r;e++)i0(t.A,e)&&nM(t,e,A);else nM(t,t.a,A);up(t.A);}function Hk(t,e,A){var n;K1(t),n=e==-1?new om(t._,t,t.F,t.B,t.D,t.C,t.A):new Bb(t._,t,t.V,e),GN(n,new Kd(t,e,A));}function Vk(t,e,A){if(t>e)throw At(new ZP(to+t+UM+e));if(t<0||e>A)throw At(new ng(to+t+H6+e+LM+A));}function fs(t,e){return (t.v[e]&b8)!=0?true:t.D[e]<=1?false:Lj(t,e)||t.D[e]==13||t.D[e]>=171;}function Ek(t,e){var A;return t===e?true:Yt(e,163)?(A=e,t.Oc()==A.Oc()&&t.Pc()==A.Pc()):t===e;}function QK(t,e){var A;return t.a==t.b?-1:(A=w.Math.min(e.length,t.b-t.a),VG(e,t.c,t.a,A),t.a+=A,A);}function lQ(t){var e,A,n;for(n=t.a.a.length,e=new Array(n),A=0;A<n;A++)e[A]=hN(G(t.a,A).a,G(t.a,A).b);return e;}function oK(t){var e;if(t.length<3){for(e=1;e<(J1(),a0).length;e++)if(a0[e].startsWith(t))return  true;}return  false;}function Sk(t,e,A){var n;for(n=0;n<e.length;n++)if(gt(V(t.f[n],e[n]),V(A[n],e[n])))return  false;return  true;}function Ds(t,e){var A,n,P;for(y1(e),A=false,n=t.Tb();n.cd();)P=n.dd(),e.contains(P)&&(n.ed(),A=true);return A;}function UK(t,e){var A,n,P;for(n=false,A=1;A<4;A++)for(P=0;P<A;P++)t[P]>t[A]&&(n=!n),e[P]>e[A]&&(n=!n);return n;}function us(t,e){var A;for(!e&&(e=$n(t.o)),e.U&=-249,A=0;A<e.r;A++)HD(e.K[A],t.k[A]);return t.p!=null&&iu(e,t.p),e;}function Ik(t,e){return !(t.D[e]!=6||t.t[e]!=0||xt(t,e)+t.k[e]!=4);}function LK(t){var e;return t!=null&&(e=t.__java$exception,e)?e:Hd(t,TypeError)?new X7(t):new ts(t);}function sK(t,e){var A,n,P;for(n=0,A=0;A<t.V.r;A++)i0(t.V,A)&&++n;P=n!=0&&n!=t.V.r,(t.U&1)!=0?Att(t,e,P):rY(t,e,P);}function yK(t){var e,A,n;for(n=t.a.length,e=new Array(n),A=0;A<n;A++)e[A]=Gx((ee(A,t.a.length),t.a[A]));return e;}function xk(t){var e;for(t.q=c(Pt,it,6,t.L.r,16,1),e=0;e<t.L.s;e++)t.q[K(t.L,0,e)]=true,t.q[K(t.L,1,e)]=true;}function Nk(t,e,A,n){this.c=c(XA,re,6,n.c,14,1),this.b=c(XA,re,6,n.c,14,1),iY(n,t,e,this.c,this.b),this.a=A;}function Gk(t,e,A,n){this.a=(o8(e),pP(t,c(F,m,6,e,15,1),0,e)),this.b=(o8(n),pP(A,c(F,m,6,n,15,1),0,n));}function z(t,e){var A;return L0(t)&&L0(e)&&(A=t-e,!isNaN(A))?A:_T(L0(t)?Se(t):t,L0(e)?Se(e):e);}function Ok(t,e){var A,n,P;for(y1(e),A=false,n=t.Tb();n.cd();)P=n.dd(),e.contains(P)||(n.ed(),A=true);return A;}function qk(t){var e;return MD(t.a!=t.b),e=t.d.a[t.a],jd(t.b==t.d.c&&e!=null),t.c=t.a,t.a=t.a+1&t.d.a.length-1,e;}function zk(t){var e;if(t.c!=0)return t.c;for(e=0;e<t.a.length;e++)t.c=t.c*33+(t.a[e]&-1);return t.c=t.c*t.e,t.c;}function Pr(t,e){var A;return A=Be(t.b,e),A||(A=new Pp(t.k,t.q,t.s,e,t.n),We(t.b,Mn(e,e.length),A),A);}function RT(t,e,A){if(A){if(t.t[e]>8)return  false;++t.t[e];}else {if(t.t[e]<-8)return  false;--t.t[e];}return t.U=0,true;}function Kk(t,e,A){var n,P;return Ju(e,t.a.length),n=A.toArray(),P=n.length,P==0?false:(o3(t.a,e,n),true);}function lK(t,e){var A,n;for(n=c(gr,B9,26,t.length,0,1),A=0;A<t.length;A++)n[A]=t[A].a;return new P8(new OT(n,e));}function hK(t,e){var A,n;for(A=lk(t),n=0;n<qP.length;n++)A[n]!=0&&e8(e,""+A[n]+" * "+qP[n]+"   AtomType: "+ME[n],2);}function TK(t,e,A,n,P,r,i,f){var D;for(D=A;r<i;)D>=n||e<A&&f.Rb(t[e],t[D])<=0?P[r++]=t[e++]:P[r++]=t[D++];}function cK(t,e,A,n,P){e==0||n==0||(e==1?P[n]=cs(P,A,n,t[0]):n==1?P[e]=cs(P,t,e,A[0]):iZ(t,A,P,e,n));}function wK(t,e){var A,n,P,r;if(e.length==0)return null;for(n=e,P=0,r=n.length;P<r;++P)A=n[P],t.D[A]=-1;return ui(t);}function pT(){uM();var t,e,A,n;if(!Wf&&!Wf)for(Wf=new Ci(),e=pE,A=0,n=e.length;A<n;++A)t=gQ(e[A]),tr(Wf,t);}function hQ(){hQ=v1,FS=new bU("CONCURRENT",0),Yo=new bU("IDENTITY_FINISH",1),Vc=new bU("UNORDERED",2);}function Jk(t){t.J=1,t.R=new Qu(),t.$=new n1(),t.U=new n1(),t.s=c(Pt,it,6,t.L.r,16,1),t.w=new we(),t.Q=0,t.C=-1,Tj(t);}function MT(t,e,A){t.w==null&&(t.w=c(F,u0,7,t.N,0,2)),A.sort(pe(Q0.prototype.ld,Q0,[])),t.w[e]=A,t.U=0,t.L=true;}function gK(t,e,A){var n,P,r;return r=1.02*kv(t.f[1],e)+kv(t.f[0],e),n=A/r,P=w.Math.pow(n,-6),n>=1?0:2*(P*P-P);}function CP(t,e){var A,n;for(n=new Zt(t);n.a<n.c.a.length;)if(A=_t(n),TJ(A,e))return  false;return t.a.push(e),true;}function dK(t){var e,A;for(e=new gD(),A=0;A<t.b.length;A++)Ni(e,(J1(),a0)[t.c[A]]),t.b[A]>1&&Mx(e,t.b[A]);return e.a;}function U1(t){var e,A;return t>-129&&t<128?(yB(),e=t+128,A=Fc[e],!A&&(A=Fc[e]=new nh(t)),A):new nh(t);}function sn(t){var e;return e=Te(t),e>wM?1/0:e<-34028234663852886e22?-1/0:e;}function BK(t,e,A){var n,P;if(t.I){for(P=new Zt(t.I);P.a<P.c.a.length;)if(n=_t(P),n.Hb(e,A))return n;}return null;}function vK(t,e,A){var n,P;for(n=j1(ft,[DA,Dt],[13,2],6,[t.g,e],2),ut(t,7),P=0;P<t.g;P++)n[P]=CR(t,P,e,A);return n;}function A9(){A9=v1,Bi=B(d(ft,1),Dt,2,6,["","0","00","000","0000","00000","000000","0000000","00000000"]);}function Qs(t){return N8(t)?ft:Ii(t)?R1t:Fu(t)?j1t:l3(t)||y3(t)?t.wd:t.wd||Array.isArray(t)&&d(TE,1)||TE;}function Yk(t,e){return Er(),N8(t)?a9(t,e):Ii(t)?rr((y1(t),t),(y1(e),e)):Fu(t)?MN((y1(t),t),(y1(e),e)):t.Sb(e);}function ff(t,e){this.e=e,this.a=BT(t),this.a<54?this.f=$9(t):this.c=(Ce(),z(t,0)>=0?be(t):mP(be(E0(t))));}function CT(t,e){var A;t.c=e,t.a=IT(e),t.a<54&&(t.f=(A=e.d>1?Xr(e.a[0],e.a[1]):Xr(e.a[0],0),$9(e.e>0?A:E0(A))));}function HT(t,e){t.e=e.e,t.c=e.c,t.b=e.b,t.a=e.a==null?null:zD(e.a,e.a.length),t.d=e.d==null?null:zD(e.d,e.d.length);}function TQ(t,e){return t.e[e]-P0(t,e)+xt(t,e)<=0?false:rA(t,e)?true:t.p[e]==0;}function cQ(t,e,A){var n,P;return n=G(t.g,t.q[e]),n.g==A?false:(P=G(t.g,t.q[A]),P.g==e?true:Iz(P,e));}function Xk(t,e,A){var n;for(n=0;n<t.k[e];n++)if(t.o[e][n]==2&&X(t,t.j[e][n])>6&&t.j[e][n]!=A)return  true;return  false;}function FK(t,e,A,n){var P,r,i;for(P=e+1;P<A;++P)for(r=P;r>e&&n.Rb(t[r-1],t[r])>0;--r)i=t[r],t[r]=t[r-1],t[r-1]=i;}function Zk(t,e,A,n,P,r){var i;this.a=A,this.b=n,this.c=P,this.d=r,i=T1t(t.o,e,A,n,P,r),this.e=i.a,this.f=i.b,this.g=i.c;}function os(t,e,A,n,P){A<n?(this.a=t,this.b=e,this.c=A,this.d=n):(this.a=e,this.b=t,this.c=n,this.d=A),this.e=P;}function Wk(t,e,A){if(t<0||e>A)throw At(new XP(to+t+H6+e+", size: "+A));if(t>e)throw At(new ZP(to+t+UM+e));}function kK(t,e){t.V!=e&&(K1(t),t.V=e,t.U=0,t.I=null,t.eb=w.Math.max(t.eb,4),P1(t.k),N1(t,new x1(t,1,false)));}function mK(t,e){return t.a!=e.a?t.a<e.a?-1:1:t.b!=e.b?t.b<e.b?-1:1:t.c!=e.c?t.c<e.c?-1:1:0;}function rr(t,e){return t<e?-1:t>e?1:t==e?t==0?rr(1/t,1/e):0:isNaN(t)?isNaN(e)?0:1:-1;}function VT(t,e){var A;return z1(t)===z1(e)?true:Yt(e,23)?(A=e,t.e==A.e&&t.d==A.d&&HO(t,A.a)):false;}function _k(t){var e,A;for(e=0,od(t.e),A=0;A<t.e.length;A++)(A==0||gs(t.e[A],t.e[A-1])!=0)&&++e,t.f[t.e[A].a]=e;return e;}function bK(t){var e,A;if(t.$!=null)for(e=0;e<t.R.g;e++)eB(t.R,e,t.$[e]);if(t.i!=null)for(A=0;A<t.R.i;A++)Gd(t.R,A,t.i[A]);}function jK(t){var e,A,n,P;for(t.a=15,P=(A=new oD(t.c).a.ad().Tb(),new UD(A));P.a.cd();)n=(e=P.a.dd(),e.jd()),Wtt(n);}function RK(t){var e,A,n,P;for(e=(t.g==null&&(t.g=(P=FY(t),hY(P))),t.g),A=0,n=e.length;A<n;++A);}function $k(t){var e,A,n,P;return t.e==0?t:(e=t.d,A=e+1,n=c(F,m,6,A,15,1),XF(n,t.a,e),P=new le(t.e,A,n),Cn(P),P);}function ET(t,e){var A,n,P,r;return A=t.F[0][e],n=t.F[1][e],P=t.K[n].a-t.K[A].a,r=t.K[n].b-t.K[A].b,w.Math.sqrt(P*P+r*r);}function ak(t,e,A){var n;return n=t.a.get(e),t.a.set(e,A===void 0?null:A),n===void 0?(++t.c,++t.b.b):++t.d,n;}function yn(t,e){var A;return L0(t)&&L0(e)&&(A=t*e,N2<A&&A<UP)?A:Vn(fa(L0(t)?Se(t):t,L0(e)?Se(e):e));}function at(t,e){var A;return L0(t)&&L0(e)&&(A=t+e,N2<A&&A<UP)?A:Vn(mz(L0(t)?Se(t):t,L0(e)?Se(e):e));}function Y1(t,e){var A;return L0(t)&&L0(e)&&(A=t-e,N2<A&&A<UP)?A:Vn(Lk(L0(t)?Se(t):t,L0(e)?Se(e):e));}function pK(t,e,A,n){return (t.U&6)!=0&&A[1]!=n[1]?A[1]==0?-1:1:rr(e[A[0]].a+e[A[0]].b,e[n[0]].a+e[n[0]].b);}function tm(t,e,A){var n,P;for(n=e;t.k[A]==2&&t.p[A]==2&&A!=n;)P=A,A=t.j[A][0]==e?t.j[A][1]:t.j[A][0],e=P;return A==n?-1:A;}function A2(t){var e,A;return t.includes("/csd/")?null:(e=(A=kS[t],typeof A===ly?A:null),!e&&sO(t),new hd(e));}function wQ(t,e){var A;if(Ct(t.L,e)==0)return  false;for(A=0;A<Ct(t.L,e);A++)if(!V9(t.L,Nt(t.L,e,A)))return  false;return  true;}function em(t,e,A,n,P){var r,i;return r=l8(t,e,A,n)+l8(t,e,n,P),i=r,T2(e,A,n,P,3)?i+=r>0?4:3:T2(e,A,n,P,4)&&(i+=r>0?6:4),i;}function MK(t,e,A){var n,P;for(P=false,n=0;n<e.e.length;n++)if(!XG(Xi(e.e,n))){P=true;break;}P||er(t.I,e),P1(t.k),NB(A.a);}function Df(t,e){var A,n;for(t.d[e]&&(t.d[e]=false,--t.b),n=0;n<O(t.j,e);n++)A=Nt(t.j,e,n),t.e[A]&&(t.e[A]=false,--t.c);}function uf(t,e){var A,n;for(n=c(F,m,6,t==null?1:t.length+1,15,1),A=0;A<n.length-1;A++)n[A]=t[A];return n[n.length-1]=e,n;}function CK(t,e){var A,n,P,r;for(P=0,r=0;P<t.length&&r<e.length;){if(A=t[P],n=e[r],A==n)return  true;A<n?++P:++r;}return  false;}function HK(t){return t.c?(Ix("find was already called on this matcher"),false):(t.c=true,t.b=PO(t.a),!!t.b);}function Am(t){if(t<f1)throw At(new I8("Overflow"));if(t>Et)throw At(new I8("Underflow"));return Bt(t);}function nm(){if(!wl)try{gi=new $j(),wl=!0;}catch(t){if(t=_1(t),Yt(t,19))q1();else throw At(t);}}function Pm(){this.b=iP("/resources/forcefield/mmff94/pbci.csv"),this.a=iP("/resources/forcefield/mmff94/bci.csv");}function rm(){rm=v1,qE=B(d(ft,1),Dt,2,6,["none","pressed","released","clicked","entered","exited","moved","dragged"]);}function im(){im=v1,RE=B(d(ft,1),Dt,2,6,["Idorsia No","Actelion No","ID","IDNUMBER","COMPOUND_ID","NAME","COMPND"]);}function ir(t){return t-=t>>1&1431655765,t=(t>>2&858993459)+(t&858993459),t=(t>>4)+t&252645135,t+=t>>8,t+=t>>16,t&63;}function fm(t){var e,A;return t.w.d.a.length==0?null:(e=Yt(t,118)?FQ(t.c,t.w.d.a.length):0,A=I9(t.w,e),uU(t.w,e),A);}function VK(t,e){var A;if(t.i==null)return  false;for(A=0;A<t.i.length;A++)if(!e.Hb(t.i[A].a,t.i[A].b))return  false;return  true;}function EK(t,e,A,n,P){var r;return r=e.a[n],!(ZD(t.b,r)||A==P||o1(e,A,n)==-1||o1(e,n,P)==-1);}function Us(t,e,A){var n;for(n=0;n<t.g;n++)if(t.D[n]==A&&t.t[n]==0&&t.k[n]==0&&(t.t[n]=-1,t.U=0,--e,e==0))return 0;return e;}function SK(t,e){var A,n;for(A=0,n=0;n<t.a.length;n++)if(t.a[n]>e.a[n]){A=1;break;}else if(t.a[n]<e.a[n]){A=-1;break;}return A;}function IK(t,e){var A,n,P;for(A=0,od(t.b),n=0;n<e.length;n++)(n==0||gs(t.b[n],t.b[n-1])!=0)&&++A,P=t.b[n].a,e[P]=A;return A;}function ln(t){var e,A,n,P;for(P=t.length,e=c(E,I,6,0,15,1),n=0;n<P;)A=_m(t,n,t.length),n+=A>=o0?2:1,La(e,A);return e;}function Dm(t){var e,A;ut(t.V,15),e=c(F,m,6,t.V.r,15,1),A=Ur(t.V,e,false,true),A=ca(t,e,A),l$(t,e,A),t.M=e,t.L=OR(t.V,e,A);}function xK(t){var e,A,n;for(Ja(t),n=c(gr,DA,78,iz(t),0,2),e=0,A=0;A<t.q&&e<t.i;A++)(!t.t||!t.e[A])&&(n[e++]=t.n[A]);return n;}function um(t,e,A,n,P){var r,i,f;for(vf(t,e,t.k[A],n,P),f=t.o,i=0;i<f.e[e];i++)r=f.j[e][i],f.e[r]==1&&vf(t,r,t.k[A],n,P);}function Qm(t,e,A,n,P){this.f=e,this.a=A,this.b=n,this.c=P,this.d=ZD(t.b,e.a[n]),this.g=bF(t.a,e,A,n,P),this.e=DY(t.a,e,A,n,P);}function om(t,e,A,n,P,r,i){NT(),this.c=OD(t,$V,this),this.d=e,this.a=-1,this.k=A,this.g=n,this.j=P,this.i=r,this.n=i,xp(this);}function ST(t,e,A,n,P,r,i,f,D,Q){rm(),vU.call(this,t,Q),this.b=e,this.c=A,this.g=n,this.i=P,this.f=r,this.d=i,this.a=f,this.e=D;}function Um(t,e,A){this.b=new Hj(this,t.a),this.c=e,this.e=A,this.d=new Lh(),Qh(this.d,this.b),WB(this,this.b.o,this.b.e),OF(this);}function n2(){P5();var t,e,A;A=q8t+++Date.now(),t=Bt(w.Math.floor(A*oE))&yi,e=Bt(A-t*N4),this.a=t^1502,this.b=e^ol;}function P2(t){var e;return Array.isArray(t)&&t.yd===DD?yu(Qs(t))+"@"+(e=fr(t)>>>0,e.toString(16)):t.toString();}function Lm(t,e){var A;return A=e?YK(t):GT(t),A&&t.r?(q1(),""+null.zd(),true):false;}function sm(t,e,A){var n,P;for(P=t.Tb();P.cd();)if(n=P.dd(),z1(e)===z1(n)||e!=null&&SP(e,n))return A&&P.ed(),true;return  false;}function NK(t){var e;for(e=0;e<t.o.r;e++)if((t.a==null?NaN:t.a[e])>1e3||(t.a==null?NaN:t.a[e])>2e3)return  true;return  false;}function GK(t,e){var A,n;for(n=0;n<t.b.length;n++)if(A=w.Math.abs(t.b[n]-e.b[n]),A>Gy&&A<t.a[n]-Gy)return  false;return  true;}function ym(t,e){var A,n;for(n=0;n<t.$.a.length;n++)t.v=RQ(t.v,G(t.$,n));hW(t,e),A=.1*e,t.v.c-=A,t.v.d-=A,t.v.b+=2*A,t.v.a+=2*A;}function lm(t,e){var A,n;return n=t.d.a.length,A=tr(t,e),t.d.a.length!=n?(Ft(t.b,e),t.a=null,n):(t.a==null&&gJ(t),t.a[A]);}function hm(t,e){var A,n;for(n=0,ai(t,0,t.length,null),A=0;A<t.length;A++)(A==0||gs(t[A],t[A-1])!=0)&&++n,e[t[A].a]=n;return n;}function OK(t,e,A){var n,P,r;for(P=0,r=0;r<t.a.length;r++)if(n=(1-A)*t.a[r]+A/t.a.length,P+=n,e<=P)return r;return t.a.length-1;}function qK(t){var e,A,n;for(A=false,n=false,e=0;e<t.r;e++)t.B[e]!=0&&(t.B[e]=0,A=true,t.D[e]==1&&(n=true));return n&&(t.U=0),A;}function IT(t){var e,A,n;return t.e==0?0:(e=t.d<<5,A=t.a[t.d-1],t.e<0&&(n=ek(t),n==t.d-1&&(--A,A=A|0)),e-=D9(A),e);}function zK(t){var e,A,n;return t<Jo.length?Jo[t]:(A=t>>5,e=t&31,n=c(F,m,6,A+1,15,1),n[A]=1<<e,new le(1,A+1,n));}function KK(t,e){return t.h==B8&&t.m==0&&t.l==0?(e&&(zn=G0(0,0,0)),_g((ti(),dc))):(e&&(zn=G0(t.l,t.m,t.h)),G0(0,0,0));}function nP(t){return t<3?0:t<11?1:t<19?2:t<37?3:t<55?4:0;}function hn(t,e,A,n){var P,r,i;return r=A-t,i=n-e,i!=0?(P=w.Math.atan(r/i),i<0&&(r<0?P-=l1:P+=l1)):P=r>0?HA:uo,P;}function JK(t,e,A){var n,P;for(n=V(A,g1),P=0;z(n,0)!=0&&P<e;P++)n=at(n,V(t[P],g1)),t[P]=Ot(n),n=O0(n,32);return Ot(n);}function Tm(t){var e,A,n;for(n=new C0(),A=new Zt(t);A.a<A.c.a.length;)e=_t(A),q(q(n,K6+e.Lb()+'"'+e.Kb()+J6),nn);return n.a;}function YK(t){var e,A,n;for(A=new U8(),e=0;e<t.L.length;e++)n=Bj(t.L[e]),n&&(e<t.Y?(Ft(A.g,n),A.d=-1):(Ft(A.f,n),A.d=-1));return A;}function XK(t){var e;if(TO(t,t.a))for(e=0;e<t.u.s;e++)i0(t.u,K(t.u,0,e))&&i0(t.u,K(t.u,1,e))&&XR(t,e);else XR(t,t.a);Ej(t.u);}function cm(t,e,A,n){var P,r;for(ut(t,1),P=0;P<n;P++)for(r=0;r<t.e[e[P]];r++)if(t.j[e[P]][r]==e[P+1]){A[P]=t.n[e[P]][r];break;}}function wm(t,e,A){var n,P;for(t.U=e,n=0;n<t.R.g;n++)t.f[n]=A[n],t.db[n]=0,t.ib[n]=false;for(P=0;P<t.R.i;P++)t.o[P]=0,t.q[P]=false;}function $0(t,e,A){A>=0&&A<=190&&(A==151||A==152?(t.D[e]=1,t.B[e]=A-149):(t.D[e]=A,t.B[e]=0),t.v[e]&=-2013265921,t.U=0);}function En(t,e){var A,n;return A=((t.v[e]&b8)>>>27)-1,A==-1&&(A=(n=t.D[e]<v9.length?v9[t.D[e]]:null,n==null?6:n[n.length-1])),A;}function nt(t,e){var A,n;for(A=e,n=0;e!=0;)t.d==0&&(t.f=(t.c[++t.e]&63)<<11,t.d=6),n|=(o0&t.f)>>16-A+e,t.f<<=1,--e,--t.d;return n;}function PP(t,e,A){var n,P,r,i;for(r=e+A,Mt(e,r,t.length),i="",P=e;P<r;)n=w.Math.min(P+fP,r),i+=EG(t.slice(P,n)),P=n;return i;}function xT(t){var e,A;for(A=0,e=0;e<t.length;e++)A<(zt(e,t.length),t.charCodeAt(e))&&(A=(zt(e,t.length),t.charCodeAt(e)));return A;}function be(t){Ce();var e,A;return A=Ot(t),e=Ot(j0(t,32)),e!=0?new lv(A,e):A>10||A<0?new RA(1,A):US[A];}function ZK(t){var e=/^#?0\.(0+)$/.exec(t);if(!e)throw new Error("unimplemented DecimalFormat with pattern "+t);return e[1].length;}function gm(t,e,A,n){T6(),this.v=OD(t,(e.v[A]&512)!=0?"Atom Query Features (Multiple)":"Atom Query Features",this),B1t(this,e,A,n);}function dm(t,e,A,n,P,r,i,f,D,Q){this.i=t,this.a=e,this.f=A,this.o=n,this.c=P,this.k=r,this.j=i,this.p=f,this.d=D,this.n=Q,ga(this);}function NT(){NT=v1,EE=B(d(ft,1),Dt,2,6,["None","One electron (duplet)","Two electrons (triplet)","Two electrons (singulet)"]);}function r2(t,e){var A;if(t.f==null)e.a+=" atoms:<null>";else for(q(e," atoms:"+t.f[0]),A=1;A<t.f.length;A++)q(e,","+t.f[A]);}function Bm(){var t;!LP&&(LP=new Yg()),(LP.b&1)!=0&&LP.a!=15&&q1(),t=1&~LP.b,t!=0&&(Stt(LP,t),t==1&&jK(LP));}function WK(t,e,A){var n;n=new Wr(A),ut(n,7),e6(n,false),ut(n,7),t.k=e,t.d=n,i8(t.g.a),i8(t.i.a),i8(t.j.a),i8(t.f),i8(t.e),B_(t);}function vm(t,e,A){var n,P,r;for(r=0,n=c(F,m,6,O(t.b,e)-1,15,1),P=0;P<O(t.b,e);P++)_(t.b,e,P)!=A&&(n[r++]=_(t.b,e,P));return n;}function _K(t,e,A){var n,P,r;for(r=0,n=c(F,m,6,O(t.c,e)-1,15,1),P=0;P<O(t.c,e);P++)_(t.c,e,P)!=A&&(n[r++]=_(t.c,e,P));return n;}function Fm(t,e){var A,n,P,r;return A=e>>5,e&=31,P=t.d+A+(e==0?0:1),n=c(F,m,6,P,15,1),r5(n,t.a,A,e),r=new le(t.e,P,n),Cn(r),r;}function Qf(t,e){var A,n;for(n=t.a.length,e.length<n&&(e=lu(new Array(n),e)),A=0;A<n;++A)e[A]=t.a[A];return e.length>n&&(e[n]=null),e;}function km(t,e){var A,n;for(n=0;n<t.g[e].length;n++)if(A=t.g[e][n],t.f[A]&&(t.o[A]==1||t.o[A]==2)&&t.k[A]==0)return  true;return  false;}function mm(t,e,A){var n;for(n=0;n<t.s;n++)if((t.F[0][n]==e&&t.F[1][n]==A||t.F[0][n]==A&&t.F[1][n]==e)&&t.I[n]!=512)return n;return  -1;}function $K(t){An();var e,A,n;return n=new o7(),A=(n.j=null,k6(n,new un(new Sr(t)))?n.j:null),e=n.f==null?Tu(n.j):n.f,dN(new sA(A),e);}function n9(t,e){var A;return L0(t)&&L0(e)&&(A=t%e,N2<A&&A<UP)?A:Vn((o6(L0(t)?Se(t):t,L0(e)?Se(e):e,true),zn));}function aK(t){var e;return e=typeof t,e1(e,m2)||e1(e,s9)||e1(e,Mf)?true:t!=null&&t.$implements__java_lang_Comparable;}function Ls(t,e){for(var A=0;!e[A]||e[A]=="";)A++;for(var n=e[A++];A<e.length;A++)!e[A]||e[A]==""||(n+=t+e[A]);return n;}function GT(t){var e,A;if((t.U&4)==0||t.L==null)return null;for(A=new U8(),e=0;e<t.L.length;e++)e<t.Y?Lg(A,t.L[e]):Ug(A,t.L[e]);return A;}function gQ(t){var e,A;return z(t,-129)>0&&z(t,128)<0?(lB(),e=Ot(t)+128,A=kc[e],!A&&(A=kc[e]=new Ph(t)),A):new Ph(t);}function tJ(){var t,e;if(t=(e=LO("RGROUPS=\\((\\d+) (\\d+).*\\)"),e?new d7(e):null),t)return new T7(t);throw At(new BF());}function bm(t,e,A){for(t.j==null&&(t.j=c(Kt,t1,6,t.o.s,15,1),dx(t.j));A<0;)A=A+360<<16>>16;for(;A>=360;)A=A-360<<16>>16;t.j[e]=A;}function pA(t,e,A,n){J1();var P,r,i;return r=A-t,i=n-e,i!=0?(P=w.Math.atan(r/i),i<0&&(r<0?P-=l1:P+=l1)):P=r>0?HA:uo,P;}function eJ(t){var e;try{return qY((new pT(),t.a));}catch(A){if(A=_1(A),Yt(A,19))return e=A,ur(e,(q1(),k9)),-999;throw At(A);}}function OT(t,e){U8.call(this),t!=null&&(MP(this.g,new JD(new lU(t),0,e)),MP(this.f,new JD(new lU(t),e,t.length))),this.c=bQ(this);}function ss(t,e){return t.e>e.e?1:t.e<e.e?-1:t.d>e.d?t.e:t.d<e.d?-e.e:t.e*sQ(t.a,e.a,t.d);}function AJ(t){return t>=48&&t<48+w.Math.min(10,10)?t-48:t>=97&&t<97?t-97+10:t>=65&&t<65?t-65+10:-1;}function nJ(t,e){var A,n;for(A=e;A<t.length;A++){if(n=(zt(A,t.length),t.charCodeAt(A)),n==32||n==9)return  -1;if(n==61)return A;}return  -1;}function PJ(t,e){var A,n,P,r;return n=t.a.length-1,A=e-t.b&n,r=t.c-e&n,P=t.c-t.b&n,jd(A<P),A>=r?(Kz(t,e),-1):(Jz(t,e),1);}function jm(t,e){var A,n;for(n=t.a.length,e.length<n&&(e=lu(new Array(n),e)),A=0;A<n;++A)e[A]=t.a[A];return e.length>n&&(e[n]=null),e;}function qT(t,e){var A;if(e==null||e.length==0)return null;for(A=2;A<e.length-2;A++)if(e[A]==32)return ds(t,e,e,A+1);return ds(t,e,null,0);}function Rm(){Rm=v1,FE=B(d(F,2),u0,7,0,[B(d(F,1),m,6,15,[0,0,1]),B(d(F,1),m,6,15,[0,2,3]),B(d(F,1),m,6,15,[1,3,3])]);}function P9(){P9=v1,Uc=new vD("ONE_ONE",0),sc=new vD("ONE_TWO",1),Lc=new vD("ONE_THREE",2),wi=new vD("ONE_FOUR",3),Y2=new vD("ONE_X",4);}function pm(t,e,A){this.s=OD(t,i0(e,e.F[0][A])&&i0(e,e.F[1][A])?"Bond Query Features (Multiple)":"Bond Query Features",this),e1t(this,e,A);}function rJ(t,e){e=e||{};var A=(typeof e.maxSphereSize===ko?5:e.maxSphereSize)|0,n=(typeof e.type===ko?0:e.type)|0;return _X(t,A,n);}function iJ(t,e){t.a=e;var A=t.Kc(),n=t;function P(){n.Jc();}function r(){n.Ic();}var i={fireOk:P,fireCancel:r};A.setEventConsumer(i);}function xe(t){w6();var e;if(!isNaN(t)&&!isFinite(t)||isNaN(t))throw At(new _P("Infinite or NaN"));Xtt(this,(e=t,e.toPrecision(20)));}function r9(t,e){return y1(t),e==null?false:e1(t,e)?true:t.length==e.length&&e1(t.toLowerCase(),e.toLowerCase());}function fJ(t){var e;return _3(t.Vb(),(e=aB(new Cw(),LF(new Mw(),new pw(),new Gw(),B(d(El,1),_e,96,0,[(hQ(),Yo)]))),F3(e,new Hw())));}function DJ(){var t,e;if(K2==null)for(e=new WA(false),K2=c(gr,B9,26,F9.length,0,1),t=0;t<F9.length;t++)K2[t]=tf(e,F9[t]),ut(K2[t],1);}function Mm(t){Ce(),t.length==0?(this.e=0,this.d=1,this.a=B(d(F,1),m,6,15,[0])):(this.e=1,this.d=t.length,this.a=t,Cn(this));}function of(t,e){var A,n;for(A=0,n=0;n<t.k[e];n++)t.o[e][n]==2&&(X(t,t.j[e][n])==7||X(t,t.j[e][n])==8||X(t,t.j[e][n])==16)&&++A;return A;}function Cm(t,e,A){var n,P,r,i,f;for(P=0,i=0,f=0;f<t.g[e].length;f++)n=t.g[e][f],t.k[n]==A&&(r=1<<t.j[n],(i&r)==0&&(i|=r,++P));return P;}function ys(t,e){var A,n,P,r,i;for(i=0,n=1,r=new Zt(t.a);r.a<r.c.a.length;)P=_t(r),A=P.dc(e,null,""+n,false),A!=0&&(i+=A,++n);return i;}function dQ(t){this.j=t&-4,this.q=t&3,this.o=(t&32)!=0,this.e=(t&64)!=0,this.i=(t&8)!=0,this.d=2,(t&4)!=0&&(this.d|=1),this.i&&(this.d&=-3);}function uJ(t,e,A,n){var P,r;if(t.d.length>t.c.length)for(P=0;P<t.a;P++)A[n+P]=t.c[P];else for(r=G(t.b,e),P=0;P<t.a;P++)A[n+P]=t.c[r[P]];}function QJ(t,e,A,n){var P,r;if(t.d.length<=t.c.length)for(P=0;P<t.a;P++)A[n+P]=t.d[P];else for(r=G(t.b,e),P=0;P<t.a;P++)A[n+P]=t.d[r[P]];}function Hm(t,e){var A,n;if(A=true,t.a.length!=e.a.length)return  false;for(n=0;n<t.a.length;n++)if(t.a[n]!=e.a[n]){A=false;break;}return A;}function oJ(t,e){var A,n,P;if(n=sr(t),P=sr(e),n==-1||P==-1||(n+P&1)==0)return 3;switch(A=0,n+P){case 3:case 7:A=2;break;case 5:A=1;}return A;}function UJ(t,e){var A,n,P;if(n=sr(t),P=sr(e),n==-1||P==-1||(n+P&1)==0)return 3;switch(A=0,n+P){case 3:case 7:A=1;break;case 5:A=2;}return A;}function LJ(){var t;return Go!=0&&(t=Date.now(),t-rS>2e3&&(rS=t,Oo=w.setTimeout(Cx,10))),Go++==0?(mq((bh(),wc)),true):false;}function Pi(t){switch(J1(),t){case 7:case 8:case 9:case 15:case 16:case 17:case 33:case 34:case 35:case 52:case 53:return  true;}return  false;}function Vm(t,e,A,n){var P;P=new ls(t,e),kL(P,A,dt(e,A)==1?2:3),kL(P,n,dt(e,n)==2?1:2),t.g[A]=true,t.g[n]=true,Yi(t.e,P)&&TL(t.d,P);}function sJ(){var t,e;if(bl==null&&bl==null){for(t=c(G1t,A0,203,Io.length,0,1),e=0;e<Io.length;e++)t[e]=new $p(Io[e][0],Io[e][1]);bl=t;}}function HP(t){var e;if(t<Bi.length)return Bi[t];for(e=new C0();t>=Bi.length;)q(e,Bi[Bi.length-1]),t-=Bi.length-1;return q(e,Bi[t]),e.a;}function yJ(t,e){var A,n;for(n=new T3(t.a.length),A=0;A<t.a.length;A++)n.a[A]=t.a[A]|e.a[A];return n.a.length==1?n.b=n.a[0]:n.b=Mu(n.a),n;}function lJ(t,e){var A,n;for(n=true,A=0;A<t.c.length;A++)(gt(V(Zn(e.c[A]),t.c[A]),0)||gt(V(e.b[A],t.c[A]),t.b[A]))&&(n=false);return n;}function hJ(t,e){var A,n;for(n=true,A=0;A<t.c.length;A++)(gt(V(Zn(t.c[A]),e.c[A]),0)||gt(V(t.b[A],e.c[A]),e.b[A]))&&(n=false);return n;}function Em(t,e){var A,n,P;for(P=0,n=0;n<t.length;n++){for(A=t[n];e[P]<A;)if(++P,P==e.length)return  false;if(e[P]>A)return  false;}return  true;}function TJ(t,e){var A,n,P;if(e.e.length!=t.e.length)return  false;for(n=Uk(t),P=Uk(e),A=0;A<n.length;A++)if(n[A]!=P[A])return  false;return  true;}function BQ(t,e){var A,n;if(Ju(e,t.b),e>=t.b>>1)for(n=t.c,A=t.b;A>e;--A)n=n.b;else for(n=t.a.a,A=0;A<e;++A)n=n.a;return new tB(t,e,n);}function Sm(t,e){var A,n,P,r;for(n=0,P=0,r=0,A=0;A<t.V.r;A++)(!e||i0(t.V,A))&&(P+=mt(t.V,A),r+=Rt(t.V,A),++n);return n>1?new Hg(P/n,r/n):null;}function cJ(t,e){pf();var A,n,P,r;for(r=0,n=0,P=0,A=0;A<t.length;A++)r+=ir(t[A]&e[A]),n+=ir(t[A]),P+=ir(e[A]);return r/w.Math.sqrt(n*P);}function wJ(t,e,A,n){var P,r,i;for(r=0,i=0;i<t.i[e].length;i++)if(P=(1-n)*t.e[e][i]+n/t.i[e].length,r+=P,A<=r)return i;return t.i[e].length-1;}function Im(t,e,A,n){var P;for(P=0;P<A.length;P++)A[P]||(A[P]=true,n[e]=P,e+1==n.length?Ft(t.b,Mn(n,n.length)):Im(t,e+1,A,n),A[P]=false);}function xm(t,e,A){var n,P,r,i;for(i=i=c(Pt,it,6,t.r,16,1),r=IZ(t,e,A,i),P=c(F,m,6,r,15,1),r=0,n=0;n<t.r;n++)i[n]&&(P[r++]=n);return P;}function VP(t,e,A){this.j=t,this.i=A,this.e=c(F,m,6,e,15,1),this.k=c(F,m,6,e,15,1),this.a=c(Ut,Tt,6,e,15,1),this.b=c(Ut,Tt,6,e,15,1);}function Nm(t){this.b=-1,this.a=c(F,m,6,t.length,15,1),PA(t,0,this.a,0,t.length),this.a.length==1?this.b=this.a[0]:this.b=Mu(this.a);}function gJ(t){var e,A,n,P;for(t.a=c(F,m,6,t.d.a.length,15,1),e=0,P=new Zt(t.b);P.a<P.c.a.length;)n=_t(P),t.a[A=u9(t,n),A<0?-1:A]=e++;}function dJ(t,e){var A,n,P;for(t.c=e,P=new Zt(t.g);P.a<P.c.a.length;)A=_t(P),ve(A,e);for(n=new Zt(t.f);n.a<n.c.a.length;)A=_t(n),ve(A,e);}function ls(t,e){var A;for(this.b=t,this.a=c(F,m,6,(t.i.i+15)/16|0,15,1),A=0;A<t.i.i;A++)this.a[A>>4]|=w.Math.min(3,dt(e,A))<<2*(A&15);}function BJ(t){var e,A,n,P,r;for(A=$Z(new FP(238,238,238)),n=yi&A.a,P=0;P<WU(t);P++)for(r=0;r<$U(t);r++)e=RB(t,P,r),tL(t,P,r,(On&e)+n);}function zT(t,e){var A,n,P,r;return A=e/2|0,P=t<0,t=w.Math.abs(t),r=e/32|0,n=w.Math.min(A-1,Ot(E1(w.Math.round(t*A/(t+r))))),P?A+n:n;}function Gm(t,e,A){var n;return n=e==0?m0+t[0]-t[t.length-1]:t[e]-t[e-1],A>z6&&A<fA?n-=2*w.Math.cos(A+C2):n-=.5*w.Math.cos(A+C2),n;}function hs(t,e){var A;return e==null||!Yt(e,28)?false:(A=e,w.Math.abs(A.a-t.a)+w.Math.abs(A.b-t.b)+w.Math.abs(A.c-t.c)<1e-6);}function Om(){Om=v1,Mo=B(d(Pt,1),it,6,16,[false,false,false,false,false,true,true,true,true,false,false,false,false,false,false,true,true]);}function vJ(t,e){return N8(t)?!!lE[e]:t.xd?!!t.xd[e]:Ii(t)?!!yE[e]:Fu(t)?!!sE[e]:false;}function vQ(t,e){switch(e){case 0:return OY(t,false);case 1:return FJ(t);case 2:return $Y(t);case 3:return GJ(t);case 4:return wY(t);}return null;}function qm(t){var e;e=t.R.c*(t.r!=0?t.r:G8(t.L)),t.Y=e*M1t,t.T=e*p1t,t.S=e*.38,t.W=e*.47,t.X=Bt(e*t.J*C1t+.5),t.V=e*.12,t.Z=e*.4,t.A=e*.5+.5;}function FJ(t){try{return t=$n(t),ps(t),Me(new bA(t));}catch(e){if(e=_1(e),Yt(e,27))return q1(),null;throw At(e);}}function KT(t,e){var A;A=BQ(t,e);try{return dL(A);}catch(n){throw n=_1(n),Yt(n,147)?At(new XP("Can't get element "+e)):At(n);}}function kJ(t,e){var A,n;for(n=0;n<t.b.i.i;n++)t.b.g[n]&&(A=3&t.a[n>>4]>>2*(n&15),g0(e,n,A==1?1:A==2?t.b.g[n]&&!A8(t.b.i,n)?386:2:A==3?4:16));}function mJ(t,e,A){var n,P;for(n=new bA(us(A,null)),Me(n),zu(n,n.jb),t.d=c(F,m,6,e.g.length,15,1),P=0;P<t.d.length;P++)t.d[P]=Cd(A,e.g[P].a);}function fr(t){return N8(t)?mT(t):Ii(t)?Bt((y1(t),t)):Fu(t)?(y1(t),t?1231:1237):l3(t)?t.ob():y3(t)?jD(t):t&&t.hashCode?t.hashCode():jD(t);}function bJ(t){var e,A;for(e=0;e<t.R.g;e++)(!t.M[e]||t.db[e]==3)&&(t.bb[e]=0);for(A=0;A<t.R.i;A++)(c1(t.R,A)!=1||t.o[A]==0||t.o[A]==3)&&(t.n[A]=0);}function jJ(t,e){var A,n;if((t.v[e]&gn)!=0){for(n=(ut(t,7),t.q),A=0;A<n.j.a.length;A++)if(G(n.k,A).length==6&&wA(n,A,e))return  true;}return  false;}function i2(t,e){var A,n;if(t.D[e]==7&&t.e[e]+xt(t,e)>=3){for(A=0;A<t.e[e];A++)if(n=t.j[e][A],t.D[n]==8&&t.e[n]+xt(t,n)==1)return  true;}return  false;}function FQ(t,e){var A,n;if(bd(e>0),(e&-e)==e)return Bt(e*xs(t,31)*4656612873077393e-25);do A=xs(t,31),n=A%e;while(A-n+(e-1)<0);return Bt(n);}function Ts(t){var e,A;bD(this);try{if(t)for(A=new Zt(t);A.a<A.c.a.length;)e=_t(A),Ft(this,e.Gb());}catch(n){if(n=_1(n),!Yt(n,19))throw At(n);}}function aA(t,e,A){A>=-1&&A<=14&&(t.v[e]&=-2013265921,t.v[e]|=1+A<<27,t.D[e]==6&&(A==-1||A==0||A==2||A==4)&&(t.v[e]&=-49,A==2&&(t.v[e]|=16)));}function zm(t,e,A,n){var P,r,i,f;for(r=-1,i=-1,f=0;f<Ct(t.e,e);f++)if(P=_(t.e,e,f),P==A||P==n)if(i==-1)i=f;else {r=f;break;}return t.a[e][r][i];}function Km(t,e){var A,n,P,r,i;for(A=-1,n=-1,r=0;r<O(t.k,e);r++)P=_(t.k,e,r),i=(EA(t.k,e,r)<<24)+t.a[P],!t.b[P]&&(A==-1||n<i)&&(A=r,n=i);return A;}function RJ(t,e){var A,n,P,r;for(n=1,r=0;r<t.u.length;r++)n*=Bh(t.u[r],e.d[r]);for(A=Pr(t.i,e.d),P=0;P<t.v.length;P++)n*=xh(A,P,e.i[P]);return n;}function JT(t,e){var A,n,P,r;for(r=t.size(),e.length<r&&(e=lu(new Array(r),e)),P=e,n=t.Tb(),A=0;A<r;++A)P[A]=n.dd();return e.length>r&&(e[r]=null),e;}function Jm(t,e){return w.Math.acos((t.a*e.a+t.b*e.b+t.c*e.c)/(w.Math.sqrt(t.a*t.a+t.b*t.b+t.c*t.c)*w.Math.sqrt(e.a*e.a+e.b*e.b+e.c*e.c)));}function cs(t,e,A,n){Lr();var P,r;for(P=0,r=0;r<A;r++)P=at(yn(V(e[r],g1),V(n,g1)),V(Ot(P),g1)),t[r]=Ot(P),P=j0(P,32);return Ot(P);}function rP(t,e){var A;for(A=0;A<t.w;A++)e-=16;for(e<0&&q1();e>15;)qt(t,1,1),qt(t,15,4),e-=16,++t.w;qt(t,1,1),qt(t,e,4);}function YT(){Rm(),this.c=new SA(24,29),this.i=c(F,m,6,24,15,1),this.b=c(F,m,6,2,15,1),this.e=c(F,m,6,2,15,1),this.f=c(F,m,6,2,15,1);}function pJ(t,e,A){return kN(t>=0&&t<=1114111),t>=o0?(e[A++]=55296+(t-o0>>10&1023)&d1,e[A]=56320+(t-o0&1023)&d1,2):(e[A]=t&d1,1);}function MJ(t){var e;if(t.r==1)return  true;for(e=1;e<t.r;e++)if(t.K[e].a!=t.K[0].a||t.K[e].b!=t.K[0].b||t.K[e].c!=t.K[0].c)return  true;return  false;}function CJ(t,e,A){var n,P;for(P=0;P<O(t.j,e);P++)if(n=_(t.j,e,P),X(t.j,n)==8&&O(t.j,n)==1)return A&&R1(t.j,n)==0&&b0(t.j,n,-1),true;return  false;}function Ym(t,e){var A,n;for(n=0;n<t.b.length;n++)if(A=w.Math.abs(t.b[n]-e.b[n]),A>Gy&&A<t.a[n]-Gy)return A<t.a[n]/2^t.b[n]<e.b[n]?1:-1;return 0;}function XT(t,e,A,n){var P,r;for(r=0;r<t.g[e].length;r++)P=t.g[e][r],t.f[P]&&(t.o[P]==1||t.o[P]==2)&&t.k[P]==0&&(t.k[P]=n<<24>>24,t.j[P]=A<<24>>24);}function HJ(t){var e;return _3(t.Vb(),(e=aB(new xw(),Bq(new Sw(),new Iw(),new qw(),new zw(),B(d(El,1),_e,96,0,[(hQ(),Vc),Yo]))),F3(e,new Nw())));}function ws(t,e){var A;if(t.k[e]==3&&e<t.g&&f0(t.q,e)&&(t.q&&e<t.g?UA(t.q,e):0)>=5){for(A=0;A<t.k[e];A++)if(oi(t,t.n[e][A]))return t.n[e][A];}return  -1;}function VJ(t){var e,A,n;for(A=false,e=1;e<t.e.a.length;e++)for(n=0;n<e;n++)G(t.e,n).a>G(t.e,e).a&&(A=!A),G(t.e,n).b>G(t.e,e).b&&(A=!A);return A;}function EJ(t){var e,A;for(e=0;e<t.f.r;e++)!t.b[e]&&Ct(t.f,e)==0&&(A=new VP(t.f,1,false),t.b[e]=true,A.e[0]=e,A.a[0]=0,A.b[0]=0,A.k[0]=0,CP(t.d,A));}function SJ(t,e){var A,n,P;return e<=22?(A=t.l&(1<<e)-1,n=P=0):e<=44?(A=t.l,n=t.m&(1<<e-22)-1,P=0):(A=t.l,n=t.m,P=t.h&(1<<e-44)-1),G0(A,n,P);}function ZT(t,e,A,n,P,r,i,f){var D,Q;n&&(D=n.a[0],D&&ZT(t,e,A,D,P,r,i),XJ(t,A,n.c,P,r,i)&&e.add(n),Q=n.a[1],Q&&ZT(t,e,A,Q,P,r,i));}function gs(t,e){var A;for(A=0;A<t.c;A++)if(gt(t.d[A],e.d[A]))return Si(t.d[A],e.d[A])?-1:1;return n0(t.d[t.c],e.d[t.c])?0:Si(t.d[t.c],e.d[t.c])?-1:1;}function Xm(t,e,A){var n,P,r;for(r=e.length,n=new VP(t.f,r,false),n.a[0]=0,n.b[0]=0,P=0;P<r;P++)n.k[P]=128-r,n.e[P]=e[P];r<8?kQ(n):U1t(t,n,e,A),CP(t.d,n);}function Zm(t,e){var A=new Array(e),n;switch(t){case 14:case 15:n=0;break;case 16:n=false;break;default:return A;}for(var P=0;P<e;++P)A[P]=n;return A;}function Wm(t){var e;return e=new iD(),t.a<=t.b?(e.c=t.a,e.b=t.b-t.a):(e.c=t.b,e.b=t.a-t.b),t.c<=t.d?(e.d=t.c,e.a=t.d-t.c):(e.d=t.d,e.a=t.c-t.d),e;}function qt(t,e,A){for(;A!=0;)t.t==0&&((!t.r||t.v!=63)&&(t.v+=64),Ye(t.u,t.v&d1),t.t=6,t.v=0),t.v<<=1,t.v=Ot(J(t.v,V(e,1))),e=O0(e,1),--A,--t.t;}function IJ(t,e,A,n,P,r,i,f,D,Q){var o;return o=WT(I5(t,e,A,n,P,r,i,f,D)),o==-1&&(o=WT(I5(t,e,A,n,P,r,i,7,7)),o==-1&&(o=WT(I5(t,e,A,n,P,3,3,7,7)))),o;}function WT(t){var e,A,n,P;for(ec||M$(),P=S0,n=O1,A=0;A<13;A++){if(e=P>=po.length||t<po[P]?-1:t==po[P]?0:1,e==0)return P;P=e<0?P-n:P+n,n=n/2|0;}return  -1;}function xJ(t,e){An();var A;return typeof e===ko&&(e=true),typeof e===m2?A=new sA(tf(new WA(e),t)):typeof e===Mf&&(A=new sA(wz(new WA(false),t,e))),A;}function _m(t,e,A){var n,P;return n=Xi(t,e++),n>=55296&&n<=56319&&e<A&&gN(P=(zt(e,t.length),t.charCodeAt(e)))?o0+((n&1023)<<10)+(P&1023):n;}function NJ(t){var e;return t==null?false:(e=typeof t,e1(e,m2)||e1(e,s9)||e1(e,Mf)||t.$implements__java_io_Serializable||Array.isArray(t));}function GJ(t){var e;try{return e=MR(new k5(t)),Me(new qA(e,8));}catch(A){if(A=_1(A),Yt(A,27))return q1(),null;throw At(A);}}function f2(t,e){var A,n,P;return A=t.a,n=t.b,P=t.c,t.a=A*e[0][0]+n*e[1][0]+P*e[2][0],t.b=A*e[0][1]+n*e[1][1]+P*e[2][1],t.c=A*e[0][2]+n*e[1][2]+P*e[2][2],t;}function ds(t,e,A,n){var P,r,i,f,D;return e==null?null:(DL(t,e,0),P=nt(t,4),f=nt(t,4),P>8&&(P=f),r=nt(t,P),i=nt(t,f),D=new SA(r,i),DM(t,D,e,A,n),D);}function $m(t,e,A){var n,P,r;if(t.i!=null)for(n=0;n<t.i.length;n++)r=t.p[n]*e,P=t.o[n]-A,t.i[n].a=t.k+r*w.Math.sin(P),t.i[n].b=t.n+r*w.Math.cos(P);}function OJ(t){var e,A,n,P,r,i;for(A=0,P=t.a,r=0,i=P.length;r<i;++r)n=P[r],n&&++A;for(t.b=c(F,m,6,A,15,1),A=0,e=0;e<t.a.length;e++)t.a[e]&&(t.b[A++]=e);}function R0(t,e){t.b!=e&&e>=0&&e<34&&(e!=t.b||e==20||e==33)&&(e!=19||(t.a.U&4)!=0)&&(e!=21||(t.a.U&8)!=0)&&!(e==0||e==17||e==1)&&(t.b=e,DQ(t.a,e),xD(t.n));}function qJ(t,e){switch(e){default:case 0:return vQ(t.a,0);case 1:return vQ(t.a,1);case 2:return vQ(t.a,2);case 3:return vQ(t.a,3);case 4:return vQ(t.a,4);}}function zJ(t){switch(typeof t){case Mf:return mT(t);case s9:return Bt((y1(t),t));case m2:return y1(t),t?1231:1237;default:return t==null?0:jD(t);}}function KJ(t){var e,A,n;t.b==t.c&&(n=t.a.length,A=Hz(w.Math.max(8,n))<<1,t.b!=0?(e=bN(t.a,A),SF(t,e,n),t.a=e,t.b=0):bi(t.a,A),t.c=n);}function EP(t,e,A,n,P){var r,i,f;P&&(r=t.vb(n),i=r/2+(t.wb()/8|0),f=t.wb()/2|0,(n=="+"||n=="-")&&(f=f*2/3),Ft(t.$,new lA(e-i,A-f,2*i,2*f))),t.K||t.tb(n,e,A);}function JJ(t){var e,A;for(A=false,e=0;e<t.V.g;e++)M1(t.V,e)!=0&&Fn(t.V,e)&&(A||(K1(t),A=true),tA(t.V,e,M1(t.V,e),false));A&&EL(t,w.Math.max(t.eb,1));}function YJ(t,e){var A,n,P;return P=t.h-e.h,P<0||(A=t.l-e.l,n=t.m-e.m+(A>>22),P+=n>>22,P<0)?false:(t.l=A&z0,t.m=n&z0,t.h=P&Pn,true);}function XJ(t,e,A,n,P,r,i){var f,D;return !(e.pd()&&(D=t.a.Rb(A,n),D<0||D==0)||e.qd()&&(f=t.a.Rb(A,r),f>0||f==0));}function D2(t,e,A,n){var P;return P=c(Ut,Tt,6,3,15,1),P[0]=t.k[n].a-t.k[A].a,P[1]=t.k[n].b-t.k[A].b,P[2]=t.k[n].c-t.k[A].c,P[0]*e[0]+P[1]*e[1]+P[2]*e[2]>0;}function ZJ(t,e){var A;for(A=0;A<t.j.g;A++)t.d[A]&&yf(t.j,A)==0&&(!e||X(t.j,A)==5&&R1(t.j,A)<0||X(t.j,A)==6||X(t.j,A)==14||rA(t.j,A)&&R1(t.j,A)>0)&&Df(t,A);}function ri(t){var e;return e=w.Math.sqrt(t.a*t.a+t.b*t.b+t.c*t.c),e==0?(q1(),t.a=1,t.b=0,t.c=0,t):(t.a/=e,t.b/=e,t.c/=e,t);}function ii(t){return J1(),!(t==1||t==6||Pi(t)||t==2||t==10||t==18||t==36||t==54||t==86||t>103);}function am(t){var e,A,n,P,r,i;for(i=iP(t),r=i.length,e=i[0].length,P=j1(F,[u0,m],[7,6],15,[r,e],2),A=0;A<r;A++)for(n=0;n<e;n++)P[A][n]=i[A][n].a;return P;}function tb(t){var e;return e=0,t==2?e=1:t>=3&&t<=10?e=2:t>=11&&t<=18?e=3:t>=19&&t<=36?e=4:t>=37&&t<=54&&(e=5),(t>=21&&t<=30||t>=39&&t<=48)&&(e*=10),e;}function WJ(t,e){e.j==1?(t.a!=-1&&($0(t.e,t.a,t.k),O9(t.e,t.a,t.g),aA(t.e,t.a,t.j),Je(t.e,t.a,t.i),IP(t.e,t.a,t.n)),N9(t.c)):e.j==0&&(ett(t),N9(t.c));}function Bs(t){var e,A;return isNaN(t)?{l:0,m:0,h:524160}:(e=(A=new ArrayBuffer(8),new Float64Array(A)[0]=t,new Uint32Array(A)),Xr(e[0]|0,e[1]|0));}function eb(t){var e,A;if(t.L){for(e=0;e<t.r;e++)if(gt(V(t.C[e],Pe),0)){for(t=new Wr(t),A=e;A<t.r;A++)gt(V(t.C[A],Pe),0)&&(t.D[A]=-1);ui(t);}}return t;}function Ab(t,e,A,n,P,r){this.f=t,P!=0&&P!=1?this.c=true:(this.a=e,this.b=A,this.d=r,this.e=new n1(),n!=-1&&AQ(this,n,A-1),n!=-1&&P==1&&AQ(this,so,A+1));}function y8(t,e){K1(t),o5(t.V,t.hb,t.kb,e,0,-1,0,null)&&(t.t!=-1&&(t.t=-1,N1(t,new x1(t,4,true))),t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true)));}function _J(t){var e,A,n,P,r,i;for(r=-1,i=Ge,e=0;e<t.V.r;e++)n=t.hb-mt(t.V,e),P=t.kb-Rt(t.V,e),A=w.Math.sqrt(n*n+P*P),A<24&&i>A&&(i=A,r=t.M[e]);return r;}function $J(t,e){var A,n,P;for(n=0;n<t.k[e];n++)if(t.o[e][n]!=1){for(A=t.j[e][n],P=0;P<t.k[A];P++)if(t.o[A][P]==1&&of(t,t.j[A][P])!=0)return  true;}return  false;}function Uf(t,e){var A,n;for(e.w=null,e.u=null,e.L=t.L,e.r=0,A=0;A<t.r;A++)Nn(t,e,A,0,0);for(e.s=0,n=0;n<t.s;n++)o9(t,e,n,0,0,t.F[0][n],t.F[1][n],false);t.Zb(e);}function aJ(t,e){var A,n;for(A=c(F,u0,7,e,0,2),n=0;n<t.length;n++)t[n]!=null&&(A[n]=c(F,m,6,t[n].length,15,1),PA(t[n],0,A[n],0,t[n].length));return A;}function tY(t,e){var A,n;for(A=c(E,m8,10,e,0,2),n=0;n<t.length;n++)t[n]!=null&&(A[n]=c(E,I,6,t[n].length,15,1),PA(t[n],0,A[n],0,t[n].length));return A;}function nb(t,e,A){var n,P,r,i,f;if(r=G1(t,e),n=en(t,e,r,A),i=((t.v[e]&b8)>>>27)-1,i==-1){for(f=eQ(t.D[e]),P=0;P<f.length-1&&r>f[P]+n;)++P;i=f[P];}return i+n-r;}function eY(t,e){var A;if(t.b.length!=e.b.length)return t.b.length<e.b.length?-1:1;for(A=0;A<t.b.length;A++)if(t.b[A]!=e.b[A])return t.b[A]<e.b[A]?-1:1;return 0;}function AY(t,e){var A,n,P;t.j||e.startsWith("COUNTS")&&(A=gA(e,ue(e,7)),n=L1(hA(e,7,ue(e,7)),f1,Et),P=L1(hA(e,A,ue(e,A)),f1,Et),t.j=new SA(n,P));}function nY(t,e){var A,n,P,r,i,f;for(i=new N0(),f=t.c.length==2?t.c:t.b,n=f,P=0,r=n.length;P<r;++P)A=n[P],X8(i,e.k[A]);return ZU(i,.5),ri(FB(i,Z0(e,t.f[4]))),i;}function PY(t,e){var A,n;if(n=false,t.f.t==null)for(t.f.t=c(F,m,6,e.length,15,1),A=t.f.t.length;--A>=0;)t.f.t[e[A]]=A;return n=Cp(t,e,0,n),n=Cp(t,e,1,n),n;}function rY(t,e,A){var n;if(t.eb==6){if(A)for(n=0;n<t.V.r;n++)Wn(t.V,n,!i0(t.V,n));U9(new a8(A?4:0),t.V),A&&s3(t.V);}_5(t.G,e,new lA(0,0,ND(t.k),Y9(t.k)),o0|t.T);}function Pb(t,e){var A,n,P;if(S3(e),A=e/31|0,n=t.a.length,A>=n)return  -1;for(P=(t.a[A]|0)&Et<<e%31;P==0;){if(++A>=n)return  -1;P=t.a[A]|0;}return A*31+WL(P);}function Lf(t,e,A,n){var P;if(e==0){A<0?n.a=t.T:n.a=-t.T,n.b=0;return;}P=w.Math.atan(A/e),e<0&&(P+=l1),n.a=-(t.T*w.Math.sin(P)),n.b=t.T*w.Math.cos(P);}function rb(t,e){var A,n;A=BQ(t,e);try{return n=dL(A),jF(A),n;}catch(P){throw P=_1(P),Yt(P,147)?At(new XP("Can't remove element "+e)):At(P);}}function iY(t,e,A,n,P){var r,i,f,D;for(i=A,f=0,D=i.length;f<D;++f)r=i[f],P[t.d[r]]=at(P[t.d[r]],e[r]<<t.b[r]),n[t.d[r]]=at(n[t.d[r]],Wt(Ec[t.a[r]],t.b[r]));}function fY(t){var e=t.backingJsObject;if(e&&e.stack){var A=e.stack,n=e+nn;return A.substring(0,n.length)==n&&(A=A.substring(n.length)),A.split(nn);}return [];}function kQ(t){var e,A;for(e=l1-l1*(t.e.length-2)/t.e.length,A=1;A<t.e.length;A++)t.a[A]=t.a[A-1]+w.Math.sin(e*(A-1)),t.b[A]=t.b[A-1]+w.Math.cos(e*(A-1));}function DY(t,e,A,n,P){var r;return r=dj(t,e,A,n,P),r<0?hp(t,e,A,n,P,bj(t,e,A,n,P)):w.Math.abs(V0(t.b[r][4]))<.001?hp(t,e,A,n,P,V0(t.b[r][5])):V0(t.b[r][4]);}function uY(t,e){var A,n,P,r,i;for(r=0;r<WU(t);r++)for(i=0;i<$U(t);i++)for(A=RB(t,r,i),P=A&yi,n=0;n<hc.length;n++)if(P==hc[n]){tL(t,r,i,(On&A)+e[n]);break;}}function _T(t,e){var A,n,P,r,i,f,D,Q;return D=t.h>>19,Q=e.h>>19,D!=Q?Q-D:(P=t.h,f=e.h,P!=f?P-f:(n=t.m,i=e.m,n!=i?n-i:(A=t.l,r=e.l,A-r)));}function QY(t,e,A){var n,P;if(t.k=e,t.n=A,t.i!=null)for(P=t.i.length,t.o=c(Ut,Tt,6,P,15,1),t.p=c(Ut,Tt,6,P,15,1),n=0;n<P;n++)t.o[n]=t.i[n].a,t.p[n]=t.i[n].b;}function vs(t,e){var A,n,P;if(e0(t.R,e)<2)return  false;if(O(t.R,e)==2)return  true;for(A=0,P=0;P<O(t.R,e);P++)n=Nt(t.R,e,P),eA(t.R,n)&&(A+=dt(t.R,n)-1);return A>1;}function Dr(){Dr=v1,Fl=new Ei("CREATE",0),vl=new Ei("CHANGE_DIF",1),Bl=new Ei("CHANGE_ABS",2),kl=new Ei("REMOVE",3),So=new Ei("NO_CHANGE",4),ml=new Ei("UNKNOWN",5);}function ib(t,e){var A,n,P;return A=e.hd(),P=e.jd(),n=t.get(A),!(!(z1(P)===z1(n)||P!=null&&SP(P,n))||n==null&&!t.containsKey(A));}function oY(t,e,A){var n,P,r,i,f,D,Q;if(t.e!=null)for(r=t.e,f=0,Q=r.length;f<Q;++f)n=r[f],kd(n,e,A);if(t.b!=null)for(P=t.b,i=0,D=P.length;i<D;++i)n=P[i],kd(n,e,A);}function fb(t,e,A){var n,P,r,i,f;for(r=true,f=G(t.g,e).a,i=Km(t,f);i!=-1;)n=_(t.k,f,i),P=Nt(t.k,f,i),i=Km(t,n),cF(t,new K3(n,P,f,A&&r,A&&i==-1),++e),f=n,r=false;}function Db(t,e){var A,n;if(e!=null)for(ut(t.j,1),A=0;A<t.j.g;A++)e[A]!=0&&(n=Cu(t.j,A,G1(t.j,A)),e[A]==15?n>=0&&aA(t.j,A,0):e[A]!=j3(t.j,A)&&aA(t.j,A,e[A]-n));}function $T(t){var e,A,n;if(A=new n1(),e=t.e.indexOf(p0(10)),e==-1)Ft(A,t.e);else {for(n=0;e!=-1;)Ft(A,hA(t.e,n,e)),n=e+1,e=SN(t.e,10,n);Ft(A,GD(t.e,n));}return A;}function SP(t,e){return N8(t)?e1(t,e):Ii(t)||Fu(t)?(y1(t),z1(t)===z1(e)):l3(t)?t.mb(e):y3(t)?zg(t,e):t&&t.equals?t.equals(e):z1(t)===z1(e);}function UY(t,e,A){var n,P;return n=c(F,m,6,4,15,1),n[0]=e.b,n[1]=e.a,n[2]=A.a,n[3]=A.b,P=JQ(t.R,n),w.Math.abs(P)<.3||w.Math.abs(P)>sM?3:P<0?2:1;}function LY(t,e,A){var n,P;return n=c(F,m,6,4,15,1),n[0]=e.b,n[1]=e.a,n[2]=A.a,n[3]=A.b,P=JQ(t.R,n),w.Math.abs(P)<.3||w.Math.abs(P)>sM?3:P<0?1:2;}function gA(t,e){var A;if(e==-1)return  -1;for(A=e+1;A<t.length;A++)if(zt(A,t.length),t.charCodeAt(A)!=32&&(zt(A,t.length),t.charCodeAt(A)!=9))return A;return  -1;}function sY(t){var e,A;for(t.b=null,e=0;e<t.g.i;e++)Ru(t.g,e)&&(!t.b&&(t.b=new n1()),A=new eU(),A.a=K(t.g,0,e),A.b=K(t.g,1,e),A.d=$h(t.g,e),A.c=M3(t.g,e),Ft(t.b,A));}function ub(){ap();var t,e,A,n,P,r,i;for(bD(this),r=new MU(),A=mE,n=0,P=A.length;n<P;++n)e=A[n],t=tf(new JP(),e),ut(t,31),cX(r,t),i=new Gg(t),i.a=G8(i.b),this.a.push(i);}function mQ(t){var e,A,n;for(Dm(t),btt(new V7(),GT(t)),n=c(F,m,6,t.L.length,15,1),e=0;e<t.V.r;e++)A=t.M[e],tA(t.V,e,M1(t.L[A],n[A]),M1(t.V,e)==0||Fn(t.V,e)),++n[A];}function yY(t,r){var A=fS;A||(A=Z.createElement("canvas"),fS=A);var n=""+t.b+"px "+t.a,P=A.getContext("2d");P.font=n;var r=P.measureText(r);return r.width;}function Qb(t,e){var A,n,P,r,i;for(r=wj(t,t.F[0][e])||wj(t,t.F[1][e])?5:3,n=0;n<2;n++)A=t.F[n][e],P=dt(t,e)+(i=En(t,A),i+en(t,A,i,t.D[A]))-G1(t,A),r>P&&(r=P);return r;}function lY(t,e,A){var n,P,r,i,f;if(n=Nt(t.k,e,A),i=_(t.k,e,A),t.e[n]!=0){for(f=8*t.q[e]+1,P=G(t.g,t.q[e]).c,r=0;r<P.length&&i!=P[r];r++)++f;return f;}return 8*t.q[i];}function hY(t){var e,A,n,P;for(e="D4",A="nB",P=w.Math.min(t.length,5),n=P-1;n>=0;n--)if(e1(t[n].d,e)||e1(t[n].d,A)){t.length>=n+1&&t.splice(0,n+1);break;}return t;}function TY(t){var e,A,n,P;for(P=0,n=null,A=new Zt(t);A.a<A.c.a.length;)e=_t(A),P<e.b[0].e.length*e.b[1].e.length&&(P=e.b[0].e.length*e.b[1].e.length,n=e);return n;}function bQ(t){var e,A,n;for(n=new Zt(t.g);n.a<n.c.a.length;)if(e=_t(n),e.L)return  true;for(A=new Zt(t.f);A.a<A.c.a.length;)if(e=_t(A),e.L)return  true;return  false;}function Sn(t,e){var A;return L0(t)&&L0(e)&&(A=t/e,N2<A&&A<UP)?A<0?w.Math.ceil(A):w.Math.floor(A):Vn(o6(L0(t)?Se(t):t,L0(e)?Se(e):e,false));}function cY(t,e){var A,n,P;for(t.g=c(F,m,6,t.k.r,15,1),A=Vj(t.k,t.g,e,true),t.q=c(J8t,A0,179,A,0,1),P=true,n=0;n<A;n++)P=P&!!(t.q[n]=l1t(t.r,t.k,t.g,n));return P;}function wY(t){var e;try{return t=$n(t),ps(t),e=MR(new k5(t)),Me(new qA(e,8));}catch(A){if(A=_1(A),Yt(A,27))return q1(),null;throw At(A);}}function sf(t,e,A){var n,P,r;if(P=G1(t,e),P-=en(t,e,P,t.D[e]),A&&(P-=t.e[e]-t.k[e]),r=eQ(t.D[e]),P<=r[0])return  -1;for(n=1;n<r.length;n++)if(r[n]>=P)return r[n];return P;}function ob(t,e,A,n,P){this.f=e,this.a=A,this.b=n,this.c=P,this.j=bF(t.a,e,A,n,P),this.g=d2(t.d,e,A,n),this.i=d2(t.d,e,P,n),this.d=_j(t.n,e,A,n,P),this.e=_j(t.n,e,P,n,A);}function Ub(t,e,A,n,P,r,i){var f,D,Q,o,L;if(o=P[r],Q=r==i-1,f=Q?n:0,L=Zm(f,o),n!=10&&B(d(t,i-r),e[r],A[r],f,L),!Q)for(++r,D=0;D<o;++D)L[D]=Ub(t,e,A,n,P,r,i);return L;}function jQ(t,e){var A,n;for(A=0;A<t.s;A++)for(n=0;n<2;n++)t.F[n][A]==e&&(t.I[A]=512);iQ(t,t.A[e]),t.D[e]=-1,t.w!=null&&(t.w[e]=null),t.u!=null&&(t.u[e]=null),Rf(t),t.U=0;}function gY(t,e){var A,n,P,r;for(A=t.e[e],r=c(F,m,6,A,15,1),P=0;P<A;P++)r[P]=(t.j[e][P]<<16)+P;for(r.sort(pe(Q0.prototype.ld,Q0,[])),n=0;n<A;n++)r[n]&=d1;return r;}function dY(t,e){var A,n,P;for(P=new C0(),n=0;n<t.a.a.length;n++)P.a.length!=0&&(P.a+="+"),A=new bA(G(t.a,n)),q(P,Me(A)),e&&(P.a+=" ",q(P,zu(A,true)));return P.a;}function BY(t,e){if(t.b==-1)t.a=c(q1t,A0,173,e,0,1),t.b=e,t.c=e-1;else do t.c=t.c==0?t.b-1:t.c-1;while(t.a[t.c]&&t5(t.a[t.c]));return !t.a[t.c]&&(t.a[t.c]=new eh()),t.c;}function aT(t,e,A){var n,P,r;for(P=t.ad().Tb();P.cd();)if(n=P.dd(),r=n.hd(),z1(e)===z1(r)||e!=null&&SP(e,r))return A&&(n=new jU(n.hd(),n.jd()),P.ed()),n;return null;}function In(t,e,A,n){V9(t.L,o1(t.L,A,n))?($1(t,-3),t.qb(e),$1(t,t.Q)):t.p[A]!=t.p[n]?yX(t,e,A,n):t.p[A]!=0?($1(t,t.p[A]),t.qb(e),$1(t,t.Q)):t.qb(e);}function yf(t,e){var A,n,P,r,i;if(!t.L||t.w==null||t.w[e]==null)return nb(t,e,t.D[e]);for(i=0,n=t.w[e],P=0,r=n.length;P<r;++P)A=n[P],i=w.Math.max(i,nb(t,e,A));return i;}function Lb(){Lb=v1,p8=Bt(w.Math.round(Bt(w.Math.round((Re==-1&&(Re=globalThis.devicePixelRatio||1),Re*2))))),vn=(Re==-1&&(Re=globalThis.devicePixelRatio||1),Re*21);}function RQ(t,e){var A,n,P,r;return P=w.Math.min(t.c,e.c),r=w.Math.min(t.d,e.d),n=w.Math.max(t.c+t.b,e.c+e.b)-P,A=w.Math.max(t.d+t.a,e.d+e.a)-r,new lA(P,r,n,A);}function vY(t,e,A,n){vg();var P=Ll;function r(){for(var i=0;i<P.length;i++)P[i]();}if(t)try{HS(r)();}catch(i){t(e,i);}else HS(r)();}function sb(t,e,A,n){var P,r,i;for(P=0;P<t.r;P++)(!n||(t.v[P]&512)!=0)&&(i=t.S[P]*e,r=t.R[P]-A,t.K[P].a=t.V+i*w.Math.sin(r),t.K[P].b=t.W+i*w.Math.cos(r));n&&(t.U&=7);}function t5(t){var e,A,n,P,r;if(!t.d)if(t.b==-1)t.d=true;else {for(r=false,A=t.a,n=0,P=A.length;n<P;++n)if(e=A[n],!e)r=true;else if(!t5(e))return  false;t.d=!r;}return t.d;}function FY(t){var e,A,n,P,r,i;if(P=fY(t),r=c(uS,c0,116,0,0,1),e=0,n=P.length,n==0)return r;for(i=dp(P[0]),e1(i.d,S4)||(r[e++]=i),A=1;A<n;A++)r[e++]=dp(P[A]);return r;}function yb(t,e,A){for(var n,P;A<0;)A=A+360<<16>>16;for(;A>=360;)A=A-360<<16>>16;n=e.a,A!=(t.j==null?-1:t.j[n])&&(P=A-(t.j==null?-1:t.j[n]),JW(t,e,l1*P/180),bm(t,n,A));}function pQ(t){var e,A,n;if(!t.a)return null;for(t.e||FR(t,1),e=null,n=new Zt(t.a);n.a<n.c.a.length;)A=_t(n),!A.b&&(!e||e.e>A.e)&&(e=A);return e?e.b=true:t.a=null,e;}function lb(t){var e,A,n,P;for(n=-1,P=Et,e=0;e<t.k.g;e++)t.b[e]||(A=t.a[e],ye(t.k,e)&&(A+=dn),O(t.k,e)==0?A+=1056964608:A+=O(t.k,e)<<24,P>A&&(P=A,n=e));return n;}function lf(t,e,A){var n,P;if(e<t.g&&f0(t.q,e)){for(P=(ut(t,7),t.q),n=0;n<P.j.a.length;n++)if(!(G(P.k,n).length!=A||!wA(P,n,e))&&t.b[n]==0)return  true;}return  false;}function kY(t,e){var A,n;if(n=X1(e),A=false,n==null||!n.startsWith("$RXN"))throw At(new H1("'$RXN' tag not found"));return e1(n,qC)?A=Ya(t,e):A=stt(t,e),A;}function hb(t,e,A){if(t.f[e])return 0;if(t.a){if(Ct(t.j,e)!=3)return 0;}else if(Ct(t.j,e)>3)return 0;return X(t.j,e)==6?(A&&b0(t.j,e,1),2):X(t.j,e)==5?4:0;}function tn(t,e,A){var n,P,r,i,f,D,Q,o;for(i=-1,P=dP(t,t.r,t.s,Bn),f=Ge,D=P*P/12,n=0;n<t.r;n++)Q=t.K[n].a,o=t.K[n].b,r=(e-Q)*(e-Q)+(A-o)*(A-o),r<D&&r<f&&(f=r,i=n);return i;}function Tb(t,e){var A,n,P,r,i,f;for(n=t,P=0,r=n.length;P<r;++P)if(A=n[P],e.k[A]!=0)return  false;for(i=R1(e,t[0]),f=1;f<t.length;f++)if(R1(e,t[f])!=i)return  false;return  true;}function cb(t,e,A){var n,P;return t.L.r==0?null:(t.v=Wj(t),n=t.R.c*G8(t.L),P=new ry(t.v,e,n,A),P.c==1&&P.a==0&&P.b==0?P=null:(Gu(P,t.R),Yu(P,t.v)),N5(t,e,n,A),P);}function mY(t){var e,A,n,P;for(ut(t,1),P=0,e=0;e<t.r;e++)n=t.B[e]!=0?t.B[e]:wr[t.D[e]],P+=n+xt(t,e)*wr[1],t.D[e]>=171&&t.D[e]<=190&&(A=t.e[e],A>2&&(P-=(A-2)*wr[1]));return P;}function wb(t,e,A){var n,P,r,i,f,D;for(P=0,r=0;r<t.k[e];r++)if(n=t.j[e][r],n!=A){for(i=0,f=0;f<t.k[n];f++)D=t.j[n][f],D!=e&&eA(t,t.n[n][f])&&t.k[D]>2&&++i;i==2&&++P;}return P;}function bY(t,e){var A,n,P,r,i,f,D,Q;for(D=-1,n=0,i=0;i<2;i++)for(A=t.F[i][e],f=0;f<t.e[A];f++)P=t.j[A][f],P!=t.F[1-i][e]&&(r=t.n[A][f],Q=NQ(t,r,P),n<Q&&(n=Q,D=r));return D;}function jY(t,e){var A,n,P,r,i,f;for(A=new n1(),n=0;n<e.r;n++)if(e.e[n]>1)for(P=0;P<e.e[n];P++)for(i=e.j[n][P],r=P+1;r<e.e[n];r++)f=e.j[n][r],Ft(A,new Qm(t,e,i,n,f));return A;}function RY(t,e){var A,n,P,r;for(A=1;A<e.r;A++)for(n=0;n<A;n++)!t[A][n]&&(t[A][n]=new nk(t9(A,n),(r=e.D[A],(r<(k2(),JA).length?JA[r]:2)+(P=e.D[n],P<JA.length?JA[P]:2))));}function pY(t){var e,A,n,P,r;for(r=new Ld(),A=t,n=0,P=A.length;n<P;++n)e=A[n],r.a?q(r.a,r.b):r.a=new bn(r.d),Jg(r.a,e);return r.a?r.e.length==0?r.a.a:r.a.a+(""+r.e):r.c;}function e5(t,e){var A,n,P;return P=-1,n=-1,(t.G&128)!=0||(O8(t.L,e)&&(P=De(t.L,e),n=OA(t.L,e)),A=ws(t.L,e),A!=-1&&(P=gP(t.L,A),n=ef(t.L,A)),P!=-1&&P!=0&&(P|=n<<8)),P;}function A5(t,e,A,n,P,r,i,f){var D,Q;for(Q=1;Q<f;Q++){for(D=i[Q];D<i[Q+1];D++)A[D]=r[P[D]]+(A[n[D]]<<8);if(kR(t,e,A,n,P,i,Q),A[1]!=A[2])return  true;Q>1&&Kj(A,n,i,Q);}return  false;}function gb(t,e,A){var n,P;if(A[0]=0,t[e]==43||t[e]==45){for(P=t[e],n=1,++A[0];t[e+A[0]]==P;)++n,++A[0];return n==1&&an(t[e+1]&d1)&&(n=t[e+1]-48,++A[0]),P==43?n:-n;}return 0;}function n5(t,e){var A,n,P;for(P=c(Oe,uA,6,t.d.length,15,1),n=c(Oe,uA,6,t.d.length,15,1),A=0;A<t.d.length;A++)P[A]=tq(FL(e,t.a[A]),t.e[A]),n[A]=Tl[t.e[A]];return new lg(P,n);}function P5(){P5=v1;var t,e,A,n;for(Mc=c(Ut,Tt,6,25,15,1),Cc=c(Ut,Tt,6,33,15,1),n=152587890625e-16,e=32;e>=0;e--)Cc[e]=n,n*=.5;for(A=1,t=24;t>=0;t--)Mc[t]=A,A*=.5;}function db(t,e){var A,n,P,r,i;for(P=-1,r=Ge,n=0;n<t.e.length;n++)i=l1*t.e[n]/180,A=w.Math.abs(e-i),A>l1&&(A=m0-A),A/=10+w.Math.sqrt(t.b[n]),r>A&&(r=A,P=n);return P;}function ur(t,e,A){var n,P,r,i,f;for(RK(t),P=(t.i==null&&(t.i=c(cE,c0,27,0,0,1)),t.i),r=0,i=P.length;r<i;++r)n=P[r],ur(n);f=t.e,f&&ur(f);}function MY(t,e,A){var n,P,r;if(n=A[e],n!=-1&&v0(t.a,n)!=0&&mX(t,e,n,A)){if(r=v0(t.b,e),P=v0(t.a,n),r==3){if(P==1||P==2)return 5;}else if(P==3||JY(t,e,A)==(r==P))return 5;}return 0;}function CY(t){var e,A,n;return z(t,0)>=0?(A=Sn(t,Jf),n=n9(t,Jf)):(e=j0(t,1),A=Sn(e,5e8),n=n9(e,5e8),n=at(Wt(n,1),V(t,1))),J(Wt(n,32),V(A,g1));}function HY(t,e){Lr();var A,n;for(n=(Ce(),X2),A=t;e>1;e>>=1)(e&1)!=0&&(n=RP(n,A)),A.d==1?A=RP(A,A):A=new Mm(cR(A.a,A.d,c(F,m,6,A.d<<1,15,1)));return n=RP(n,A),n;}function Fs(t,e){var A,n;for(y1(e),n=t.b.a.length,Ft(t.b,e);n>0;){if(A=n,n=(n-1)/2|0,t.a.Rb(G(t.b,n),e)<=0)return Zr(t.b,A,e),true;Zr(t.b,A,G(t.b,n));}return Zr(t.b,n,e),true;}function u2(t,e){var A,n,P,r;for(c1(t.j,e)==1&&(g0(t.j,e,2),t.k+=2),P=0;P<2;P++)for(A=K(t.j,P,e),t.d[A]=false,r=0;r<O(t.j,A);r++)n=Nt(t.j,A,r),t.e[n]&&(t.e[n]=false,--t.c);}function VY(t){var e,A,n,P,r;for(A=0;A<t.j.i;A++)if(dt(t.j,A)==2){for(P=0;P<2;P++)if(e=K(t.j,P,A),X(t.j,e)<=8){for(r=0;r<O(t.j,e);r++)if(n=Nt(t.j,e,r),t.e[n]){Df(t,e);break;}}}}function EY(t,e){var A,n,P,r,i,f;if(!(e.length<=0||e[0]<64))for(DL(t,e,0),f=nt(t,4),P=nt(t,1)==1,r=nt(t,1)==1,A=0;A<t.g.g;A++)i=nt(t,f),n=P,P&&r&&(n=nt(t,1)==1),tA(t.g,A,i,n);}function SY(t,e,A,n,P){var r,i;for(r=0,i=0;i<P;i++)r=at(r,Y1(V(e[i],g1),V(n[i],g1))),t[i]=Ot(r),r=O0(r,32);for(;i<A;i++)r=at(r,V(e[i],g1)),t[i]=Ot(r),r=O0(r,32);}function IY(t,e,A,n,P){var r,i;if(r=t3(t.a,t.b,P),i=QL(t3(e.a,e.b,P)),n.containsKey(r)){if(A)throw At(new yU("Duplicate key "+r));n.put(r,null.zd(n.get(r)));}else n.put(r,i);}function xY(t){var e,A,n;for(e=0;e<t.R.g;e++)!E9(t.R,e)&&t.db[e]==3&&rL(t.R,e,true);for(A=0;A<t.R.i;A++)t.o[A]==3&&(n=dt(t.R,A),n==1?rL(t.R,K(t.R,0,A),true):n==2&&g0(t.R,A,386));}function r5(t,e,A,n){var P,r,i;if(n==0)PA(e,0,t,A,t.length-A);else for(i=32-n,t[t.length-1]=0,r=t.length-1;r>A;r--)t[r]|=e[r-A-1]>>>i,t[r-1]=e[r-A-1]<<n;for(P=0;P<A;P++)t[P]=0;}function B0(t,e){var A,n,P;if(e<0||e>999){q(t.a,"  ?");return;}for(A=false,n=0;n<3;n++)P=e/100|0,P==0?n==2||A?Ye(t.a,48):Ye(t.a,32):(Ye(t.a,48+P&d1),A=true),e=10*(e%100);}function NY(t){var e,A,n,P,r;if(r=Up(t),!r)return null;for(kD(r,t.a),n=G(r,r.a.length-1),t.n=Cs(t.d,n),P=new n1(),A=new Zt(r);A.a<A.c.a.length;)e=_t(A),Ft(P,Cs(t.d,e));return nX(P);}function Bb(t,e,A,n){NT(),this.c=OD(t,$V,this),this.d=e,this.e=A,this.a=n,this.k=X(this.e,n),this.g=ge(this.e,n),this.j=G9(this.e,n),this.i=jA(this.e,n),this.n=eP(this.e,n),xp(this);}function i5(t,e,A,n,P){var r,i,f,D;for(r=-1,i=-1,D=0;D<Ct(t.e,e);D++)if(f=Nt(t.e,e,D),f==A||f==n)if(r==-1)r=D;else {i=D;break;}t.a[e][i][r]==0&&(t.a[e][i][r]=P,t.d[e]+=P,++t.c[e]);}function GY(t,e){var A,n,P;return P=c(F,m,6,2,15,1),o1(t,e[1],e[2])!=-1?(P[0]=e[2],P[1]=e[1]):(A=c(F,m,6,16,15,1),n=B2(t,A,e[1],e[2],15,null,null),P[0]=A[1],P[1]=A[n-1]),P;}function OY(t,e){try{return e?(t=$n(t),e6(t,!0),Ytt(t),Me(new bA(t))):Me(new bA(t));}catch(A){if(A=_1(A),Yt(A,27))return q1(),null;throw At(A);}}function vb(t,e,A){g6(),YB.call(this,t,e),this.j=1,this.k=10,this.n=400,this.f=400,this.i=true,this.d="black",this.b=new n1(),this.a=new n1(),this.c=new C0(),this.e=new h3(12),this.g=A,++J2;}function qY(t){var e,A,n,P,r;for(A=0,Li(t),ut(t,7),e=0;e<t.g;e++)try{r=Uy(t,e,6241),P=(n=u9(Wf,gQ(r)),n<0?-1:n),P!=-1&&(A+=yc[P]);}catch(i){if(i=_1(i),!Yt(i,19))throw At(i);}return A;}function p0(t){var e,A;return t>=o0?(e=55296+(t-o0>>10&1023)&d1,A=56320+(t-o0&1023)&d1,String.fromCharCode(e)+(""+String.fromCharCode(A))):String.fromCharCode(t&d1);}function Q2(t,e){var A;return w.Math.abs(t)>w.Math.abs(e)?(A=e/t,A=w.Math.abs(t)*w.Math.sqrt(1+A*A)):e!=0?(A=t/e,A=w.Math.abs(e)*w.Math.sqrt(1+A*A)):A=0,A;}function rA(t,e){var A,n,P,r;if(t.L){if(gt(V(t.C[e],1),0))return  false;if(t.w!=null&&t.w[e]!=null){for(n=t.w[e],P=0,r=n.length;P<r;++P)if(A=n[P],!Pi(A))return  false;}}return Pi(t.D[e]);}function zY(t,e){var A,n,P,r;if(t.L){if(gt(V(t.C[e],1),0))return  false;if(t.w!=null&&t.w[e]!=null){for(n=t.w[e],P=0,r=n.length;P<r;++P)if(A=n[P],!ii(A))return  false;}}return ii(t.D[e]);}function KY(){yy();var t,e,A,n,P,r,i,f,D;for(ll=new cP(),i=W4,f=0,D=i.length;f<D;++f)for(r=i[f],P=c8(r[0],";"),e=P,A=0,n=e.length;A<n;++A)t=e[A],We(ll,rf(t.toLowerCase(),"-"),r[1]);}function Fb(t){Ms();var e,A,n,P,r;for(ut(t,7),P=c(Pt,it,6,t.i,16,1),n=0,A=0;A<t.i;A++)da(t,A)&&(P[A]=true,++n);for(r=c(F,m,6,n,15,1),n=0,e=0;e<t.i;e++)P[e]&&(r[n++]=e);return r;}function JY(t,e,A){var n,P,r,i,f,D,Q;if(D=false,e0(t.b,e)==0)for(f=1;f<O(t.b,e);f++)for(Q=0;Q<f;Q++)n=_(t.b,e,f),P=_(t.b,e,Q),r=A[n],i=A[P],r!=-1&&i!=-1&&r>i^n>P&&(D=!D);return D;}function YY(t,e,A){var n,P,r,i,f,D,Q;if(D=false,e0(t.g,e)==0)for(f=1;f<O(t.g,e);f++)for(Q=0;Q<f;Q++)n=_(t.g,e,f),P=_(t.g,e,Q),r=M1(t.g,n),i=M1(t.g,P),A[r]>A[i]^n>P&&(D=!D);return D;}function f5(t,e,A){var n,P;for(P=false,n=0;n<t.V.g;n++)M1(t.V,n)!=0&&(A&&!Fn(t.V,n)||e&&Fn(t.V,n))&&(P||(K1(t),P=true),tA(t.V,n,0,false));P&&(e||mQ(t),EL(t,w.Math.max(t.eb,1)));}function ks(t,e){var A,n;if(!e)return null;for(n=c(F,m,6,(F9.length+31)/32|0,15,1),e=eb(e),GA(t.g,e),A=0;A<F9.length;A++)MA(t.g,K2[A]),CA(t.g,1,4)>0&&(n[A/32|0]|=1<<31-A%32);return n;}function kb(t,e){var A,n,P,r;for(A=c(F,m,6,t.k[e]-JL(t,e),15,1),r=0,P=0;P<t.k[e];P++)n=t.j[e][P],gt(V(t.C[n],Pe),0)||(A[r++]=t.D[n]);return A.sort(pe(Q0.prototype.ld,Q0,[])),A;}function ms(t,e){var A;if(t==null)return e==null?0:1;if(e==null)return  -1;for(A=0;A<t.length;A++){if(e.length==A)return 1;if(t[A]!=e[A])return t[A]<e[A]?-1:1;}return e.length>t.length?-1:0;}function bs(t,e){var A;if(t==null)return e==null?0:1;if(e==null)return  -1;for(A=0;A<t.length;A++){if(e.length==A)return 1;if(t[A]!==e[A])return t[A]<e[A]?-1:1;}return e.length>t.length?-1:0;}function XY(t,e,A,n){var P,r;for(r=e,P=r.c==null||t.a.Rb(A.c,r.c)>0?1:0;r.a[P]!=A;)r=r.a[P],P=t.a.Rb(A.c,r.c)>0?1:0;r.a[P]=n,n.b=A.b,n.a[0]=A.a[0],n.a[1]=A.a[1],A.a[0]=null,A.a[1]=null;}function ZY(t){var e,A;try{return A=new iB(t),Fj(A,4e3,go),ys(A,A.i);}catch(n){if(n=_1(n),Yt(n,188))return NaN;if(Yt(n,19))return e=n,ur(e,(q1(),k9)),NaN;throw At(n);}}function mb(t,e){var A,n,P,r,i;for(r=e.length,i=c(F,m,6,r,15,1),n=0;n<r;n++)for(A=n==r-1?e[0]:e[n+1],P=0;P<O(t.i,e[n]);P++)if(_(t.i,e[n],P)==A){i[n]=Nt(t.i,e[n],P);break;}return i;}function js(t,e,A){var n,P;if((t.v[e]&gn)==0||(t.v[A]&gn)==0)return  false;for(P=(ut(t,7),t.q),n=0;n<P.j.a.length;n++)if(G(P.k,n).length==5&&wA(P,n,e)&&wA(P,n,A))return  true;return  false;}function WY(t){var e,A;return t.f||(A=new Du(),t.a&&(A.a=true),t.f=mv(A,(e=t.g.a,e)),t.f&&(t.f.Q==null||t.f.Q.length==0)&&iu(t.f,t.e!=-1&&t.c!=null?t.c[t.e]:t.f?t.f.Q:null)),t.f;}function bb(){bb=v1,jl=B(d(F,1),m,6,15,[0,2,1,3]),IE=B(d(ft,1),Dt,2,6,["plain","italic","bold","italics & bold"]),SE=B(d(ft,1),Dt,2,6,["8","9","10","12","14","18","24","32"]);}function _Y(t,e){var A;for(A=0;e<t.length&&(t[e]!=93||A!=0);)t[e]==91?++A:t[e]==93&&--A,++e;if(e==t.length)throw At(new H1("SmilesParser: No matching closing bracket found."));return e+1;}function jb(t,e,A){return t.L!=null&&t.L[e]!=null&&t.L[e][A]?null:t.I[e]==0&&t.B[A]==0?(O(t.u,A)!=0&&(t.H[t.G[e]]=true),O(t.D,e)!=0&&(t.A[t.w[A]]=true),new FD(e,A)):null;}function Rb(t){var e,A,n;for(n=new RL(", ","[","]"),A=t.Tb();A.cd();)e=A.dd(),$v(n,z1(e)===z1(t)?"(this Collection)":e==null?y9:P2(e));return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c;}function o2(t){var e,A,n;if(hl==null){if(e=A2("/resources/csd/"+t),e)return hl="csd/",new un(new mi((n=e,w0(),n)));hl="cod/";}return new un(new mi((A=A2("/resources/"+hl+t),w0(),A)));}function $Y(t){var e,A;try{for(t=$n(t),ps(t),e=t.s,A=0;A<e;A++)t.I[A]=1,t.U=0;return Me(new bA(t));}catch(n){if(n=_1(n),Yt(n,27))return q1(),null;throw At(n);}}function pb(t,e){var A,n,P,r;for(n=0,P=t.length;n<P;n++){r=t[n];try{r[1]?r[0].zd()&&(e=QG(e,r)):r[0].zd();}catch(i){if(i=_1(i),Yt(i,27))A=i,pG(Yt(A,166)?A.Nc():A);else throw At(i);}}return e;}function Mb(t){var e,A,n,P,r,i,f,D;for(f=c(F,m,6,t.g,15,1),D=(ut(t,7),t.q),r=0;r<w.Math.min(32,D.j.a.length);r++)for(i=G(D.j,r),A=i,n=0,P=A.length;n<P;++n)e=A[n],f[e]|=1<<r;return f;}function D5(t){var e,A,n,P;if(A=Ot(j0(t,32)),A==0)return n=Ot(t)>>>0,n.toString(16);e=c(Fr,re,6,17,15,1),P=17;do e[--P]=MG(Ot(t)&15),t=j0(t,4);while(z(t,0)!=0);return PP(e,P,17-P);}function G1(t,e){var A,n,P,r,i,f;for(t._b(1),i=false,n=false,f=0,P=0;P<t.e[e];P++)(!t.L||!ye(t,t.j[e][P]))&&(r=t.o[e][P],f+=r,r>1&&(i=true),A=t.n[e][P],t.I[A]==8&&(n=true));return n&&!i&&++f,f;}function MQ(t,e){var A,n,P,r;for(c1(t.k,e)==1&&g0(t.k,e,2),P=0;P<2;P++)for(A=K(t.k,P,e),W0(t.k,A)&&(Wn(t.k,A,false),--t.b),r=0;r<O(t.k,A);r++)n=Nt(t.k,A,r),t.g[n]&&(t.g[n]=false,--t.c);}function u5(t,e,A){var n,P,r,i,f;for(P=0,i=new Zt(A);i.a<i.c.a.length;)r=_t(i),r.length!=0&&(f=aL(e,r).b,P<f&&(P=f));return n=t.c*yo*(A.a.length-1)+t.c,new lA(t.i[0].a,t.i[0].b-t.c/2,P,n);}function Te(t){if(q4==null&&(q4=new RegExp("^\\s*[+-]?(NaN|Infinity|((\\d+\\.?\\d*)|(\\.\\d+))([eE][+-]?\\d+)?[dDfF]?)\\s*$")),!q4.test(t))throw At(new _P(b2+t+'"'));return parseFloat(t);}function Q5(t){var e,A;for(A=j1(F,[DA,u0],[29,7],0,[2,32],2),e=0;e<t.R.g;e++)t.M[e]&&(t.bb[e]==1?A[0][t.ab[e]]=uf(A[0][t.ab[e]],e):t.bb[e]==2&&(A[1][t.ab[e]]=uf(A[0][t.ab[e]],e)));return A;}function Rs(t){var e,A,n,P;for(P=new un(new mi((A=A2(t),w0(),A))),n=new ou();;)try{if(e=X1(P),e!=null)Ns(n,e);else break;}catch(r){if(r=_1(r),Yt(r,79))break;throw At(r);}return n;}function aY(t){t=t||{};var e=t.ringMatchMode||rE;switch(e){case rE:return 0;case "keepRings":return 1;case "keepAromaticRings":return 2;default:throw new Error("invalid ring match mode: "+e);}}function Cb(t,e){var A,n,P;return e&=63,e<22?(A=t.l<<e,n=t.m<<e|t.l>>22-e,P=t.h<<e|t.m>>22-e):e<44?(A=0,n=t.l<<e-22,P=t.m<<e-22|t.l>>44-e):(A=0,n=0,P=t.l<<e-44),G0(A&z0,n&z0,P&Pn);}function Hb(t,e){var A,n,P,r,i;if(e1(t.a,"Helvetica")){for(r=0,n=0,P=e.length;n<P;n++)A=(zt(n,e.length),e.charCodeAt(n)),r+=(A<128?i=DS[A]:i=FA,i*t.b/20);return r;}else return yY(t,e);}function Vb(t,e,A){var n,P,r,i;return P=t.c[A][0]*l1/180,r=t.c[A][1]*l1/180,i=t.e[A]*l1/180,e<i-l1?e+=m0:e>i+l1&&(e-=m0),n=(i-e)/(i-(e<i?P:r)),n<1?0:n<2?(n-=1,n*n):1;}function tX(t,e){var A,n,P,r,i;if(t.e!=null)for(A=a5(t)/t.p.c,P=t.e,r=0,i=P.length;r<i;++r)n=P[r],yI(n,t.f),n.r=A/n.R.c,h6(n,e);if(t.b!=null)for(P=t.b,r=0,i=P.length;r<i;++r)n=P[r],h6(n,e);}function ue(t,e){var A,n,P,r;for(A=false,P=false,n=e;n<t.length;n++)if(r=(zt(n,t.length),t.charCodeAt(n)),r==40?A=true:r==41?A=false:r==34&&(P=!P),!A&&!P&&(r==32||r==9))return n;return  -1;}function ps(t){var e,A;for(ut(t,15),t.M=false,e=0;e<t.r;e++)t.v[e]&=My,(t.v[e]&3)!=0?t.v[e]|=oo:t.v[e]&=py;for(A=0;A<t.s;A++)(t.G[A]&3)!=0&&dt(t,A)==2?t.I[A]=386:t.I[A]&=-385;t.U&=-249;}function eX(t){CU();var e,A,n,P;for(x5(t,1),n=t.r,A=c(ft,Dt,2,n,6,1),e=0;e<n;e++)P=$n(t),IP(P,e,(J1(),a0)[P.D[e]]+"*"),P.D[e]==1?$0(P,e,Ac):O9(P,e,P.B[e]+5),ZO(P),A[e]=Me(new qA(P,8));return A;}function CQ(t,e,A,n,P){var r;n|=f1,r=xF(A),n!=-1&&(nA(e,n),q3(e,r[0],r[1],vn,vn)),A==20?Ps(e,t.c,0,t.d*84,84,84,r[0],r[1],vn,vn):Ps(e,P?t.g:t.i,(r[0]-p8)*t.j,(r[1]-p8)*t.j,84,84,r[0],r[1],vn,vn);}function U2(t,e){var A,n,P,r;for(P=false,n=0;n<t.R.i;n++)$Q(t,n,1)&&(t.q[n]=t.L,e&&U_(t,n),P=true);for(r=false,A=0;A<t.R.g;A++)Qy(t,A,1)&&(t.ib[A]=t.L,e&&ea(t,A),r=true);return r&&(t.L=!t.L),P||r;}function i9(t,e){return t.r>=t.N&&VQ(t,t.N*2),t.D[t.r]=0,$0(t,t.r,e),t.t[t.r]=0,t.v[t.r]=0,t.C[t.r]=0,t.A[t.r]=0,HU(t.K[t.r],0,0,0),t.w!=null&&(t.w[t.r]=null),t.u!=null&&(t.u[t.r]=null),t.U=0,t.r++;}function AX(t){var e,A,n,P,r;for(r=new BU(t.g,t.f),P=c(F,m,6,t.g.r,15,1),A=0;A<t.g.r;A++)P[A]=M1(t.g,A);for(n=c(F,m,6,t.f.r,15,1),e=0;e<t.f.r;e++)n[e]=M1(t.f,e);return -Ay(r,c5(r,P,n))*.25;}function nX(t){var e,A,n,P,r,i;for(i=new Gr(),n=new Bv(t),e=n.b-1;e>=0;e--)for(P=KT(n,e),A=0;A<n.b;A++)if(e!=A&&(r=KT(n,A),P.g<r.g&&(GA(i,r),MA(i,P),CA(i,1,i.c)>0))){rb(n,e);break;}return n;}function PX(t){switch(this.c=false,this.b=false,t){case 1:this.c=true;break;case 2:this.b=true;}this.g=new oU(),this.i=new oU(),this.j=new oU(),this.o=new Gr(),this.a=new ru(),this.f=new Jn(),this.e=new Jn();}function fi(t){var e,A,n,P;for(P=new un(new mi((n=A2(t),w0(),n))),e=new n1();;)try{if(A=X1(P),A!=null)e.a.push(A);else break;}catch(r){if(r=_1(r),Yt(r,79))break;throw At(r);}return e;}function rX(t,e){var A,n,P;for(A=c(F,m,6,t.e.length,15,1),P=0;P<t.e.length;P++)n=Wt(Ec[t.a[P]],t.b[P]),gt(V(e.c[t.d[P]],n),0)?A[P]=Ot(O0(V(e.b[t.d[P]],n),t.b[P])):A[P]=-1;return A;}function iX(t,e){s8();var A,n,P,r;for(n=c(Pt,it,6,e.r,16,1),A=0;A<e.g;A++)if(!n[A]&&e.p[A]==2&&e.D[A]<=8){for(P=i_(A,e),r=0;r<P.length;r++)n[P[r]]=true;P[0]!=P[P.length-1]&&Ft(t,new fg(P));}}function o5(t,e,A,n,P,r,i,f){var D,Q;return D=tn(t,e,A),D==-1?(t.r>=t.N&&VQ(t,t.N*2),D=i9(t,n),HU(t.K[D],e,A,0),t.B[D]=P,aA(t,D,r),Je(t,D,i),IP(t,D,f),true):(Q=mf(t,D,n,P,r,i),Q=Q|IP(t,D,f),Q);}function Eb(t,e,A,n){var P,r,i,f;for(ut(e,1),r=0;r<A;r++)n[r]!=-1&&t.D[r]!=1&&t.e[r]!=Ct(e,n[r])&&(P=sf(t,r,false),P!=-1&&(f=sf(e,n[r],false),P!=f&&(i=G9(e,n[r]),(i==-1||i<P)&&aA(e,n[r],P))));}function fX(t,e,A){var n,P,r;for(r=0;r<t.e.length;r++)P=w.Math.sqrt((t.a[r]-e)*(t.a[r]-e)+(t.b[r]-A)*(t.b[r]-A)),n=0-hn(e,A,t.a[r],t.b[r]),t.a[r]=e+P*w.Math.sin(n),t.b[r]=A+P*w.Math.cos(n);}function DX(t,e,A){var n,P,r,i,f;return r=(P=t/e,P>0?w.Math.floor(P):w.Math.ceil(P)),i=t%e,f=rr(t*e,0),i!=0&&(n=rr(w.Math.abs(i)*2,w.Math.abs(e)),r+=zQ(Bt(r)&1,f*(5+n),A)),new L3(r);}function U5(t,e){var A,n,P;for(xr.call(this,t),A=0,P=0;P<t.length;P++)e.k[t[P]]!=1&&++A;if(A>2)for(this.a=c(F,m,6,A,15,1),A=0,n=0;n<t.length;n++)e.k[t[n]]!=1&&(this.a[A++]=t[n]);else this.a=t;}function Di(t,e,A,n,P,r){var i,f,D,Q;for(D=0,f=0;f<t.R.i;f++)(fe(t.R,t.C[f])&n)!=0&&++D;if(D!=0)for(rP(t,e),qt(t,D,A),i=0;i<t.R.i;i++)Q=fe(t.R,t.C[i])&n,Q!=0&&(qt(t,i,A),P!=1&&qt(t,Q>>r,P));}function L5(t,e){var A,n,P;if(t.w==null||t.w[e]==null)return gt(V(t.C[e],1),0)?"":a0[t.D[e]];for(P="",n=0;n<t.w[e].length;n++)n>0&&(P=(y1(P),P+(y1(","),","))),A=t.w[e][n],P=Su(P,a0[A]);return P;}function hf(t){var e,A,n,P;for(ut(t,7),n=0;n<t.i;n++)(t.I[n]==257||t.I[n]==129)&&(t.I[n]=1);for(e=0;e<t.g;e++)oy(t,e);for(P=0;P<t.i;P++)bp(t,P);for(A=0;A<t.i;A++)t.I[A]==2&&(t.G[A]&3)==3&&(t.I[A]=386);}function uX(t,e,A){var n,P,r;if(e.c!=null)for(P=0;P<e.c.length;P++)for(r=0;r<O(t.k,e.a);r++)e.c[P]==_(t.k,e.a,r)&&(n=Nt(t.k,e.a,r),e.d[P]||Rp(t,n,e.a,A),t.e[n]>9&&(A.a+="%"),Mh(A,t.e[n]));}function QX(t,e){var A,n,P,r,i;if(t.i.L){if(gt(V(h0(t.i,e),1),0))return  false;if(A=IA(t.i,e),A!=null){for(P=A,r=0,i=P.length;r<i;++r)if(n=P[r],!Pi(n))return  false;return  true;}}return Pi(X(t.i,e));}function Sb(t,e,A,n,P){var r,i,f;for(r=true,i=0;i<n;i++)r=r&A[i]==0;if(P==0)PA(A,n,t,0,e),i=e;else {for(f=32-P,r=r&A[i]<<f==0,i=0;i<e-1;i++)t[i]=A[i+n]>>>P|A[i+n+1]<<f;t[i]=A[i+n]>>>P,++i;}return r;}function oX(t){var e,A;(t.G&32)==0&&(A=QR(t.L),A!=null&&(t.w.a==0&&t.w.b==0&&(e=t.R.c*G8(t.L),t.v=Wj(t),ym(t,e),N5(t,null,e,0)),t.Cb(Bt(t.A)),t.L.P!=1&&$1(t,448),t.tb(A,t.w.a,t.w.b+Hf*t.A)));}function Ib(t){var e,A,n;if(bD(this),!(t==null||t.length==0))for(e=0,A=t.indexOf(p0(10));A!=-1;)n=YZ((Mt(e,A,t.length),t.substr(e,A-e))),n&&this.a.push(n),e=A+1,A=t.indexOf(p0(10),e);}function UX(t,e,A){var n,P;switch(P=A&127,n=Qb(t,e),P){case 1:case 8:return n>=1;case 2:return n>=2;case 4:return n>=3;case 32:return n>=4;case 64:return n>=5;case 16:return  true;default:return  false;}}function Tf(t,e,A,n){var P,r,i;for(i=0;i<t.e.length;i++)r=w.Math.sqrt((t.a[i]-e)*(t.a[i]-e)+(t.b[i]-A)*(t.b[i]-A)),P=hn(e,A,t.a[i],t.b[i])+n,t.a[i]=e+r*w.Math.sin(P),t.b[i]=A+r*w.Math.cos(P);}function s5(t,e){var A,n,P;return n=e.g-p8,P=e.i-p8,n<0||n>=2*vn||P<0||P>=17*vn?-1:(A=17*Bt(n/vn)+Bt(P/vn),A>=0&&A<34&&(A!=t.b||A==20||A==33)&&(A!=19||(t.a.U&4)!=0)&&(A!=21||(t.a.U&8)!=0)?A:-1);}function LX(t){var e;t.c==null&&(e=z1(t.b)===z1(cc)?null:t.b,t.d=e==null?y9:RF(e)?e==null?null:e.name:N8(e)?"String":yu(Qs(e)),t.a=t.a+": "+(RF(e)?e==null?null:e.message:e+""),t.c="("+t.d+") "+t.a);}function sX(t,e){var A,n,P,r;return e&=63,A=t.h&Pn,e<22?(r=A>>>e,P=t.m>>e|A<<22-e,n=t.l>>e|t.m<<22-e):e<44?(r=0,P=A>>>e-22,n=t.m>>e-22|t.h<<44-e):(r=0,P=0,n=A>>>e-44),G0(n&z0,P&z0,r&Pn);}function yX(t,e,A,n){var P,r;P=new h1(),r=new h1(),P.a=e.a,P.c=e.c,P.b=(e.a+e.b)/2,P.d=(e.c+e.d)/2,r.a=P.b,r.c=P.d,r.b=e.b,r.d=e.d,vA(t,P)&&($1(t,t.p[A]),t.qb(P)),vA(t,r)&&($1(t,t.p[n]),t.qb(r)),$1(t,t.Q);}function xb(t,e,A){var n,P;return n=tn(t,e,A),n!=-1?((t.v[n]&512)!=0?UQ(t):jQ(t,n),t.U=0,true):(P=kf(t,e,A),P!=-1?((t.v[t.F[0][P]]&t.v[t.F[1][P]]&512)!=0?UQ(t):l5(t,P),t.U=0,true):false);}function Nb(t,e,A){var n,P,r;for(t.V=e,t.W=A,t.R=c(Ut,Tt,6,t.r,15,1),t.S=c(Ut,Tt,6,t.r,15,1),n=0;n<t.r;n++)P=e-t.K[n].a,r=A-t.K[n].b,t.S[n]=w.Math.sqrt(P*P+r*r),t.R[n]=pA(e,A,t.K[n].a,t.K[n].b);}function Gb(t,e){var A,n,P,r;for(r=c(F,m,6,t.k[e]-JL(t,e),15,1),P=0,n=0;n<t.k[e];n++)A=t.j[e][n],gt(V(t.C[A],Pe),0)||(r[P++]=w.Math.abs(t.A[A]));return r.sort(pe(Q0.prototype.ld,Q0,[])),r;}function Ob(t,e){var A,n,P,r,i;if(A=-1,t.p[e]==1){for(r=0;r<t.k[e];r++)if(t.o[e][r]==2){if(n=t.j[e][r],t.k[n]==2&&t.p[n]==2){for(i=0;i<2;i++)if(P=t.j[n][i],P!=e&&t.p[P]==1){A=n;break;}}break;}}return A;}function lX(t,e){var A,n,P,r,i;for(i=new n1(),r=0;r<e.r;r++)e.e[r]==3&&(A=e.j[r][0],n=e.j[r][1],P=e.j[r][2],Ft(i,new es(t,e,r,A,n,P)),Ft(i,new es(t,e,r,A,P,n)),Ft(i,new es(t,e,r,n,P,A)));return i;}function X1(t){var e,A,n;if(A=SL(t),A==-1)return null;for(n=new C0(),e=false;!e;)if(A==10?e=true:A==13&&(e=true,A=SL(t),A!=10&&(t.a=A)),!e){if(A==-1)break;Ye(n,A&d1),A=SL(t);}return n.a;}function hX(t,e,A){var n,P,r,i,f,D;if(D=G(t.b,e),t.d.length<=t.c.length)for(f=0;f<t.a;f++)A[t.d[f]]=t.c[D[f]];else {for(P=t.d,r=0,i=P.length;r<i;++r)n=P[r],A[n]=-1;for(f=0;f<t.a;f++)A[t.d[D[f]]]=t.c[f];}}function TX(t){return t.K++==64?false:t.i?t5(t.i.b)?false:(mU(t.I,0),mU(t.B,0),gh(t.H),gh(t.A),qb(t),bI(t.i),t.q=iR(t),t.g=7,t.c=0,t.d=0,t.e=0,t.f=0,true):(t.i=new Fd(),true);}function p(t,e,A){var n=bo,P=n[t],r=P instanceof Array?P[0]:null;P&&!r?U=P:(U=ez(e),U.xd=A,!e&&(U.yd=DD),n[t]=U);for(var i=3;i<arguments.length;++i)arguments[i].prototype=U;r&&(U.wd=r);}function y5(t,e){var A,n;if((t.G&4224)!=0||(n=e5(t,e),n==-1&&(A=Ob(t.L,e),A!=-1&&(e=A,n=e5(t,e))),n==-1))return t.p[e];switch(n&255){case 1:return 384;case 2:return 64;default:return 448;}}function l5(t,e){var A,n,P;for(n=0;n<2;n++){for(A=0,P=0;P<t.s;P++)P!=e&&(t.F[0][P]==t.F[n][e]||t.F[1][P]==t.F[n][e])&&++A;A==0&&(iQ(t,t.A[t.F[n][e]]),t.D[t.F[n][e]]=-1);}t.I[e]=512,Rf(t),t.U=0;}function cX(t,e){var A,n;if(!e)return null;for(n=c(XA,re,6,(F9.length+63)/64|0,14,1),e=eb(e),GA(t.g,e),A=0;A<F9.length;A++)MA(t.g,K2[A]),CA(t.g,1,4)>0&&(n[A/64|0]=J(n[A/64|0],Wt(1,63-A%64)));return n;}function wX(t,e,A,n){var P,r,i,f;for(f=c(F,m,6,t.o[e].g,15,1),zr(f,f.length,-1),r=C9(t.c,e),P=0;P<r.g;P++)A[P]!=-1&&(f[A[P]]=w.Math.abs(r.A[P]));for(i=0;i<f.length;i++)f[i]==-1&&(f[i]=n++);return f;}function qb(t){var e,A,n,P,r,i,f,D,Q;for(Q=t.F.g,t.J=Mn(Q,Q.length),e=t.v.g,t.C=Mn(e,e.length),P=t.J,i=0,D=P.length;i<D;++i)A=P[i],t.o<A&&(t.o=A);for(n=t.C,r=0,f=n.length;r<f;++r)A=n[r],t.n<A&&(t.n=A);}function gX(t,e){var A,n,P,r,i,f,D,Q,o;if(t==null)return e;for(o=c(F,m,6,t.length+e.length,15,1),Q=0,P=t,i=0,D=P.length;i<D;++i)A=P[i],o[Q++]=A;for(n=e,r=0,f=n.length;r<f;++r)A=n[r],o[Q++]=A;return o;}function dX(t,e){switch(e){case 0:ab(t);return;case 1:K1(t),t.eb=w.Math.max(t.eb,6),P1(t.k),N1(t,new x1(t,1,true));return;case 17:Ov(t),t.eb=w.Math.max(t.eb,2),P1(t.k),N1(t,new x1(t,1,true));return;}}function zb(t,e,A){var n,P,r,i;if(i=E3(e),P=(n=t.a.get(i),n??c(qn,A0,1,0,5,1)),P.length==0)t.a.set(i,P);else if(r=mk(e,P),r)return r.kd(A);return P[P.length]=new jU(e,A),++t.c,++t.b.b,null;}function Kb(t,e,A){var n,P,r,i,f,D,Q,o;for(Q=-1,P=0,f=0;f<2;f++)for(n=t.j[e][f],D=0;D<t.e[n];D++)r=t.j[n][D],r!=e&&(i=t.n[n][D],o=NQ(t,i,r),P<o&&(true)&&(P=o,Q=i));return Q;}function Jb(t){var e,A,n,P;for(A=0,e=0,n=0;n<t.g.a.length+t.f.a.length;n++)P=n<t.g.a.length?G(t.g,n):G(t.f,n-t.g.a.length),P.s!=0&&(A+=P.s,e+=dP(P,P.r,P.s,(J1(),Bn))*P.s);return A==0?(J1(),J1(),Bn):e/A;}function BX(t,e,A,n){var P,r,i,f,D;for(i=c(Pt,it,6,t.length+1,16,1),D=c(F,m,6,n,15,1),f=0;f<n;f++)P=A==null?f:A[f],P!=-1&&(D[f]=t[P],i[D[f]]=true);for(r=0;r<e.length;r++)i[e[r]]||(e[r]=0);return D;}function vX(t,e,A){var n,P,r,i,f,D,Q,o,L,s;for(n=0,A*=A,f=0;f<e.r;f++){for(Q=e.K[f].a,L=e.K[f].b,i=false,D=0;D<t.V.r;D++)if(o=mt(t.V,D),s=Rt(t.V,D),P=o-Q,r=s-L,P*P+r*r<A){i=true;break;}i&&++n;}return n==e.r;}function HQ(){HQ=v1,new FP(255,255,255),new FP(128,128,128),new FP(0,0,0),new FP(0,255,0),new FP(255,255,0),new FP(255,200,0),new FP(255,0,0),new FP(0,255,255),new FP(0,0,255),new FP(255,0,255);}function FX(t,e,A){var n;return xb(t.V,e,A)?(t.eb=w.Math.max(t.eb,1),P1(t.k),N1(t,new x1(t,1,true)),true):(n=BK(t,e,A),n?(er(t.I,n),t.v=null,t.eb=w.Math.max(t.eb,1),P1(t.k),true):false);}function kX(t,e,A){A!=null&&A.length==0&&(A=null),A==null?t.u!=null&&(t.u[e]!=null&&t.D[e]==1&&(t.U=0),t.u[e]=null):(t.u==null&&(t.u=c(E,m8,10,t.N,0,2)),t.u[e]==null&&t.D[e]==1&&(t.U=0),t.u[e]=A);}function mX(t,e,A,n){var P,r,i,f;if(O(t.b,e)!=O(t.a,A))return  false;for(r=0;r<O(t.b,e);r++){for(f=_(t.b,e,r),P=false,i=0;i<O(t.a,A);i++)if(n[f]==_(t.a,A,i)){P=true;break;}if(!P)return  false;}return  true;}function Yb(t,e){var A,n,P,r,i,f,D,Q,o;for(o=0,P=t,i=0,D=P.length;i<D;++i)A=P[i],e[A]==0&&++o;if(o==0)return null;for(Q=c(F,m,6,o,15,1),o=0,n=t,r=0,f=n.length;r<f;++r)A=n[r],e[A]==0&&(Q[o++]=A);return Q;}function bX(t,e){var A,n,P,r;for(t.j=new _A(),n=0;n<e.g.a.length;n++)r=G(e.g,n),ut(r,1),S5(t.j,r,r.g,r.i,!r.L);for(t.d=new _A(),A=0;A<e.f.a.length;A++)P=G(e.f,A),ut(P,1),S5(t.d,P,P.g,P.i,!P.L);Li(t.j),Li(t.d);}function jX(t,e){var A,n;return Ip(t,e,false)?t.s!=null?(t.B=new d3(t,t.o),md(t.B,400),t.b=new Ji(new fD()),cp(t)):(n=new XQ(e),DU(n,t.v),A=jZ(n,t.o),iy(t,A),A.p="SO#1",A):null;}function Xb(t,e){var A,n,P,r,i,f;for(A=t.b.a.length,P=G(t.b,e);e*2+1<A&&(n=(r=2*e+1,i=r+1,f=r,i<A&&t.a.Rb(G(t.b,i),G(t.b,r))<0&&(f=i),f),!(t.a.Rb(P,G(t.b,n))<0));)Zr(t.b,e,G(t.b,n)),e=n;Zr(t.b,e,P);}function k1(t){var e,A,n;for(A=t.length,n=0;n<A&&(zt(n,t.length),t.charCodeAt(n)<=32);)++n;for(e=A;e>n&&(zt(e-1,t.length),t.charCodeAt(e-1)<=32);)--e;return n>0||e<A?(Mt(n,e,t.length),t.substr(n,e-n)):t;}function Zb(t,e,A,n,P){var r,i,f,D,Q;for(r=A[n],Q=false,f=0;f<e.g;f++)if(f!=n&&A[f]==r){Q=true;break;}if(!Q)return P;for(i=0;i<e.g;i++)(i==n||A[i]>r)&&++A[i];++P;do D=P,X$(t,e,A),P=IK(t,A);while(D!=P);return P;}function h5(t,e,A,n,P,r){var i,f,D,Q;if(i=n-A,i<7){FK(e,A,n,r);return;}if(D=A+P,f=n+P,Q=D+(f-D>>1),h5(e,t,D,Q,-P,r),h5(e,t,Q,f,-P,r),r.Rb(t[Q-1],t[Q])<=0){for(;A<n;)e[A++]=t[D++];return;}TK(t,D,Q,f,e,A,n,r);}function Wb(t,e){if(e instanceof Object)try{e.__java$exception=t;var A=t;Object.defineProperties(e,{cause:{get:function(){var n=A.ic();return n&&n.gc();}},suppressed:{get:function(){return A.hc();}}});}catch{}}function _b(t,e){var A,n,P;return n=t.a*t.a+t.b*t.b+t.c*t.c,P=e.a*e.a+e.b*e.b+e.c*e.c,n==0||P==0||(A=(t.a*e.a+t.b*e.b+t.c*e.c)/w.Math.sqrt(n*P),A>=1)?0:A<=-1?l1:w.Math.acos(A);}function RX(t,e,A){var n,P,r;P=k1((Mt(31,34,A.length),A.substr(31,3))),e1(P,"A")||e1(P,"*")?w1(t.j,e,1,true):e1(P,"Q")?(r=c(F,m,6,1,15,1),r[0]=6,gf(t.j,e,r,true)):(n=zA(P,67),$0(t.j,e,n));}function T5(t,e){var A,n,P,r;if(r=t.c.a.length,r==0)return  -1;for(P=1;2*P<=r;)P<<=1;for(n=P,--P;n!=0;){if(n>>=1,P>=r){P-=n;continue;}if(A=a9(e,G(t.c,P)),A==0)return P;if(n==0)break;A<0?P-=n:P+=n;}return  -1;}function c5(t,e,A){var n,P,r,i;for(r=c(F,m,6,t.b.g+1,15,1),zr(r,r.length,-1),P=0;P<A.length;P++)A[P]!=0&&(r[A[P]]=P);for(i=c(F,m,6,t.b.g,15,1),zr(i,i.length,-1),n=0;n<e.length;n++)i[n]=r[e[n]];return i;}function $b(t){var e,A;return t.d>0||(e=1,A=1,t.a<54?(t.a>=1&&(A=t.f),e+=w.Math.log10(w.Math.abs(A))):(e+=(t.a-1)*mo,D6((!t.c&&(t.c=jP(E1(t.f))),t.c),Qi(e)).e!=0&&++e),t.d=Bt(e)),t.d;}function pX(t){var e;for(e=0;e<t.r;e++)switch(t.D[e]){case 1:case 5:case 6:case 7:case 8:case 9:case 14:case 15:case 16:case 17:case 33:case 34:case 35:case 52:case 53:continue;default:return  false;}return  true;}function MX(t){pf();var e,A,n,P,r,i;if(t==null)return null;for(e=c(E,I,6,t.length*8,15,1),n=0;n<t.length;n++)for(i=t[n],P=7;P>=0;P--)A=i&15,A>9&&(A+=7),e[n*8+P]=48+A<<24>>24,i>>=4;return on((r=e,w0(),r));}function y0(t,e,A,n,P){var r,i,f,D,Q,o;for(r=Ct(t.e,e),D=O(t.e,e),Q=1;Q<r;Q++)for(i=Q<D?t.f[Nt(t.e,e,Q)]:0,o=0;o<Q;o++)t.a[e][Q][o]==0&&(f=o<D?t.f[Nt(t.e,e,o)]:0,(i==A&&f==n||i==n&&f==A)&&(t.a[e][Q][o]=P));}function w5(){w5=v1,CE=B(d(ft,1),Dt,2,6,["mutagenic","tumorigenic","irritant","reproductive effective"]),Eo=B(d(ft,1),Dt,2,6,["Mutagenicity","Tumorigenicity","Irritating effects","Reproductive effects"]);}function CX(t){var e;for(e=0;0<=(e=t.indexOf("\\",e));)zt(e+1,t.length),t.charCodeAt(e+1)==36?t=(Mt(0,e,t.length),t.substr(0,e)+"$"+GD(t,++e)):t=(Mt(0,e,t.length),t.substr(0,e)+(""+GD(t,++e)));return t;}function HX(t,e,A,n){var P,r,i,f,D;for(D=new n1(),r=0;r<e.r;r++)for(i=r+1;i<e.r;i++)P=new zi(r,i),f=D8(A.a,P)!=null?D8(A.a,P):(P9(),Y2),(f==(P9(),wi)||f==Y2)&&pn(new p3(e,r,i))<n&&Ft(D,new ZR(t,e,r,i));return D;}function g5(t,e,A){var n;n=t.F[0][e],t.F[0][e]=t.F[0][A],t.F[0][A]=n,n=t.F[1][e],t.F[1][e]=t.F[1][A],t.F[1][A]=n,n=t.I[e],t.I[e]=t.I[A],t.I[A]=n,n=t.G[e],t.G[e]=t.G[A],t.G[A]=n,n=t.H[e],t.H[e]=t.H[A],t.H[A]=n,t.U=0;}function VX(t,e){var A,n,P;if(e.j==0){try{A=L1((P=t.b.Gc(),P.getSelectedItem()),f1,Et);}catch(r){if(r=_1(r),Yt(r,42)){ED(t.c,"Illegal text size.");return;}else throw At(r);}n=jl[F0(t.a)],Ad(t.e,Ki(t.d),A,n);}N9(t.c);}function EX(t){var e,A,n,P;for(t.Ab(2*t.S),P=new h1(),n=0;n<t.L.s;n++)e=K(t.L,0,n),A=K(t.L,1,n),Jh(t.L,n)&&(P.a=W1(t.R,mt(t.L,e)),P.c=Z1(t.R,Rt(t.L,e)),P.b=W1(t.R,mt(t.L,A)),P.d=Z1(t.R,Rt(t.L,A)),$1(t,-2),t.qb(P));}function Ms(){Ms=v1,Tl=B(d(Ut,1),Tt,6,15,[m0,l1,I2,fA]),vE=B(d(F,2),u0,7,0,[B(d(F,1),m,6,15,[0,0,0,2]),B(d(F,1),m,6,15,[0,0,1,2]),B(d(F,1),m,6,15,[0,1,1,3]),B(d(F,1),m,6,15,[2,2,3,2])]);}function SX(t){var e,A,n,P;for(n=-0.5299999713897705,Li(t),ut(t,7),e=0;e<t.g;e++){P=-1;try{P=Uy(t,e,2144);}catch(r){if(r=_1(r),!Yt(r,19))throw At(r);}for(A=0;A<_f.length;A++)if(n0(gl[A],P)){n+=_f[A];break;}}return n;}function ab(t){var e;t.I&&(t.I.a.length=0,t.eb=w.Math.max(t.eb,1),P1(t.k)),K1(t),e=t.V.L,Ri(t.V),ve(t.V,e),t.cb.r!=0?(t.eb=w.Math.max(t.eb,1),P1(t.k),N1(t,new x1(t,1,true))):(t.eb=w.Math.max(t.eb,1),P1(t.k));}function tj(t,e){var A,n,P,r,i,f;for(r=c(F,m,6,t.r,15,1),n=0;n<t.r;n++)r[n]=n;P=t.r;do--P;while(P>=0&&e[P]);for(A=0;A<P;A++)if(e[r[A]]){f=r[A],r[A]=r[P],r[P]=f,i=e[A],e[A]=e[P],e[P]=i;do--P;while(e[P]);}return r;}function IX(t){pf();var e,A,n,P;if(t.length==0||(t.length&7)!=0)return null;for(n=c(F,m,6,t.length/8|0,15,1),A=0;A<t.length;A++)P=A/8|0,e=(zt(A,t.length),t.charCodeAt(A)-48),e>16&&(e-=7),n[P]<<=4,n[P]+=e;return n;}function f9(t,e,A){var n,P,r;if(t.length!=e.length)return  -1;for(r=0,n=A.mc(),P=0;P<t.length-1;P++)if(r=BA(t[P],e[P],r,n+1,true,A),n=BA(t[P],e[P],r,n+1,false,A),r==-1||n==-1)return  -1;return BA(t[P],e[P],r,n+1,true,A);}function Cs(t,e){var A,n,P,r,i,f,D;for(D=c(Pt,it,6,t.g,16,1),n=0,r=t.i,P=0;P<r;P++)if(LT(e.a,P))for(f=0;f<2;f++)A=t.F[f][P],D[A]||(D[A]=true,++n);return i=new SA(n,r),ve(i,true),L9(t,i,D,true,null),ut(i,7),i;}function xX(t,e,A){var n,P,r,i,f,D,Q;P=Bt(T4*G8(t.V)),r=Bt(mt(t.V,K(t.V,0,A))),f=Bt(Rt(t.V,K(t.V,0,A))),i=Bt(mt(t.V,K(t.V,1,A))),D=Bt(Rt(t.V,K(t.V,1,A))),n=(Q=e.Lc(),Q.getLineWidth()),nL(e,P),Z9(e,r,f,i,D),nL(e,n);}function ej(t){switch(t){case 6:return 1;case 53:return 2;case 33:return 3;case 34:return 4;case 35:return 5;case 15:return 6;case 16:return 7;case 17:return 8;case 7:return 9;case 8:return 10;case 9:return 11;}return 0;}function NX(t){var e;for(t.e=new ch(),t.d=new Bd(),IN(t,new ls(t,t.i)),e=$n(t.i);!$7(t.d);)if(kJ(bz(t.d),e),ntt(t,e),t.e.a.c>=I1t){q1(),""+Me(new bA(t.i));break;}}function Hs(t){var e,A;return t>-140737488355328&&t<0x800000000000?t==0?0:(e=t<0,e&&(t=-t),A=Bt(w.Math.floor(w.Math.log(t)/.6931471805599453)),(!e||t!=w.Math.pow(2,A))&&++A,A):BT(E1(t));}function GX(t,e){var A,n,P,r,i,f;if(t.t[e]==0)return  false;for(f=true,A=t.t[e],r=t.k[e],i=0,n=0;n<r;n++)P=t.j[e][n],i+=t.t[P];return w.Math.abs(A)<=w.Math.abs(i)&&w.Math.sign(A)!=w.Math.sign(i)&&(f=false),f;}function OX(t,e){var A,n,P,r,i,f;for(ut(t,1),i=0;i<2;i++)if(A=t.F[i][e],t.D[A]==7){for(n=t.F[1-i][e],f=0;f<t.k[n];f++)if(P=t.j[n][f],r=t.n[n][f],(t.D[P]==7||t.D[P]==8||t.D[P]==16)&&dt(t,r)>=2)return  true;}return  false;}function qX(t){var e;if(t.f!=null){for(e=0;e<t.f.length;e++)if((t.c[e]&~t.f[e])!=0)return  false;}else return  false;return !t.d&&(t.d=qT(new WA(false),t.e)),!t.a&&(t.a=qT(new WA(false),t.b)),GA(t.g,t.d),MA(t.g,t.a),Rg(t.g);}function Aj(t){var e;e=$A(t.d),kP(t.k,!e),kP(t.c,!e),kP(t.n,!e),kP(t.i,!e),kP(t.j,!e),kP(t.b,!e),kP(t.g,!e),kP(t.f,!e&&dt(t.u,t.a)==2&&ze(t.u,t.a)!=0&&ze(t.u,t.a)!=3),kP(t.q,!e),kP(t.r,!e&&F0(t.q)!=1),kP(t.p,e),kP(t.o,e);}function Qr(){Qr=v1,wS=new Ir("UP",0),lS=new Ir("DOWN",1),yS=new Ir("CEILING",2),hS=new Ir("FLOOR",3),Hl=new Ir("HALF_UP",4),TS=new Ir("HALF_DOWN",5),ce=new Ir("HALF_EVEN",6),cS=new Ir("UNNECESSARY",7);}function d5(t,e,A){var n,P,r;for(n=false,r=0;r<t.k[e];r++)if(!eA(t,t.n[e][r])&&t.o[e][r]==1&&(P=t.j[e][r],!(P<t.g&&f0(t.q,P))&&(t.D[P]==6&&of(t,P)==1||t.D[P]==16&&of(t,P)==2))){if(n||!A)return  true;n=true;}return  false;}function zX(t,e){var A,n,P,r,i;for(A=c(Ut,Tt,6,t.v.length+t.u.length,15,1),n=Pr(t.i,e.d).c,r=new Zt(n);r.a<r.c.a.length;)if(P=_t(r),(Sk(e,P.c,P.b)?e.b:0)!=0)for(i=0;i<A.length;i++)cO(t.C,P,i)&&(A[i]+=P.a);return A;}function dA(t,e,A,n,P,r){var i,f,D,Q;for(D=0,f=0;f<t.R.g;f++)gt(V(h0(t.R,t.B[f]),n),0)&&++D;if(D!=0)for(rP(t,e),qt(t,D,A),i=0;i<t.R.g;i++)Q=V(h0(t.R,t.B[i]),n),z(Q,0)!=0&&(qt(t,i,A),P!=1&&qt(t,O0(Q,r),P));}function KX(t,e){var A,n,P,r,i,f,D;for(i=Ct(t.R,e),f=c(F,m,6,i,15,1),P=0;P<i;P++)f[P]=_(t.R,e,P);for(n=i;n>1;n--){for(A=false,r=1;r<n;r++)v6(t,e,f[r-1],f[r])&&(A=true,D=f[r-1],f[r-1]=f[r],f[r]=D);if(!A)break;}return f;}function JX(t){var e,A,n,P,r,i,f;for(i=c(E,Wy,58,8,0,3),f=0;f<=7;f++)for(i[f]=c(E,m8,10,t[f].c,0,2),n=0,r=(A=new J8(new K8(new br(t[f]).a).b),new jr(A));Nr(r.a.a);)P=(e=H9(r.a),e.hd()),i[f][n++]=P;return i;}function VQ(t,e){var A,n;for(t.D=nr(t.D,e),t.t=nr(t.t,e),t.A=nr(t.A,e),n=t.K.length,t.K=xz(t.K,e),A=n;A<e;A++)t.K[A]=new N0();t.B=nr(t.B,e),t.v=nr(t.v,e),t.C=aq(t.C,e),t.w!=null&&(t.w=aJ(t.w,e)),t.u!=null&&(t.u=tY(t.u,e)),t.N=e;}function nj(t,e,A){var n,P,r,i;if(t.k=e,t.n=A,t.i!=null)for(i=t.i.length,t.o=c(Ut,Tt,6,i,15,1),t.p=c(Ut,Tt,6,i,15,1),r=0;r<i;r++)n=e-t.i[r].a,P=A-t.i[r].b,t.p[r]=w.Math.sqrt(n*n+P*P),t.o[r]=pA(e,A,t.i[r].a,t.i[r].b);}function YX(t){var e,A,n,P,r;for(r=new Wu(t),e=r.a.length-1;e>=0;e--)for(A=(ee(e,r.a.length),r.a[e]),P=0;P<r.a.length;P++)if(n=(ee(P,r.a.length),r.a[P]),e!=P&&Hv(n,A)){ee(e,r.a.length),r.a.splice(e,1);break;}return r;}function XX(t,e){var A,n,P,r,i,f,D;for(n=c(Pt,it,6,O(t.e,e),16,1),D=0,P=0;P<O(t.e,e);P++){for(f=0,i=-1,r=0;r<O(t.e,e);r++)n[r]||(A=Nt(t.e,e,r),f<t.f[A]&&(f=t.f[A],i=r));if(f==0)return D;D<<=8,D+=f,n[i]=true;}return D;}function xn(t){return w.Math.sqrt(t.a*t.a+t.b*t.b+t.c*t.c)>0?new BP(t.a/w.Math.sqrt(t.a*t.a+t.b*t.b+t.c*t.c),t.b/w.Math.sqrt(t.a*t.a+t.b*t.b+t.c*t.c),t.c/w.Math.sqrt(t.a*t.a+t.b*t.b+t.c*t.c)):new BP(0,0,0);}function Vs(t){var e;if(t.p=new Qu(),t.k!=null)for(t.e=c(OE,A0,105,t.k.length,0,1),e=0;e<t.k.length;e++)t.e[e]=new mu(t.k[e]);if(t.a!=null)for(t.b=c(OE,A0,105,t.a.length,0,1),e=0;e<t.a.length;e++)t.b[e]=new mu(t.a[e]);t.d=24;}function ZX(t,e,A){var n,P;if(P=G(t.b,e),t.d.length<=t.c.length){for(n=0;n<t.a;n++)if(A[t.d[n]]!=null&&A[t.d[n]][t.c[P[n]]])return  true;}else for(n=0;n<t.a;n++)if(A[t.d[P[n]]]!=null&&A[t.d[P[n]]][t.c[n]])return  true;return  false;}function WX(t,e){F6();var A,n,P,r;if(af[e]!=null){for(n=0;n<af[e].length;n++)for(r=af[e][n],P=15;P>=0;P--)(r&3)==0&&tL(t,P,n,-1),r>>=2;for(A=0;A<af[e].length;A++)for(r=af[e][A],P=15;P>=0;P--)(r&3)==1&&tL(t,P,A,On),r>>=2;}}function D9(t){var e,A,n;return t<0?0:t==0?32:(n=-(t>>16),e=n>>16&16,A=16-e,t=t>>e,n=t-256,e=n>>16&8,A+=e,t<<=e,n=t-S0,e=n>>16&4,A+=e,t<<=e,n=t-Gn,e=n>>16&2,A+=e,t<<=e,n=t>>14,e=n&~(n>>1),A+2-e);}function s0(t,e){var A=w;if(t==="")return A;var n=t.split(".");if(!(n[0]in A)&&A.execScript&&A.execScript("var "+n[0]),e){var P=e.prototype.wd;P.e=e;}for(var r;n.length&&(r=n.shift());)A=A[r]=A[r]||!n.length&&e||{};return A;}function B5(t,e,A,n,P,r,i){var f,D;return f=_(t.g,t.s[e],n),f<t.D.length&&(!t.D[f]||t.f[f]==i)&&f!=t.u[e]&&(D=Nt(t.g,t.s[e],n),!r[D]&&!Ru(t.g,D)&&(t.s[++A]=f,t.u[A]=t.s[e],t.v[A]=D,r[D]=true,P[f]?t.t[A]=true:P[f]=true)),A;}function L2(t,e){var A,n,P,r,i;for(i=0,A=0,n=0;n<e;n++)i+=t[n].b*w.Math.sin(t[n].a),A+=t[n].b*w.Math.cos(t[n].a);return A==0?r=i>0?HA:uo:(r=w.Math.atan(i/A),A<0&&(r+=l1)),P=w.Math.sqrt(i*i+A*A)/e,new $P(r,P);}function Es(t){var e,A,n;if(t.d!=-1)return t.d;for(t.d=0,A=0;A<t.g.a.length+t.f.a.length;A++)for(n=A<t.g.a.length?G(t.g,A):G(t.f,A-t.g.a.length),e=0;e<n.r;e++)t.d<w.Math.abs(n.A[e])&&(t.d=w.Math.abs(n.A[e]));return t.d;}function v5(t,e){ni();var A;return A=c(Oe,uA,6,4,15,1),A[0]=E4*((t&QP)>>16),A[1]=E4*((t&DP)>>8),A[2]=E4*(t&255),D_(A,e),t&On|Bt(w.Math.round(A[0]*255))<<16|Bt(w.Math.round(A[1]*255))<<8|Bt(w.Math.round(A[2]*255));}function F5(t,e,A,n,P,r){var i,f,D,Q,o;if(P!=0)for(z1(t)===z1(A)&&(t=t.slice(e,e+P),e=0),D=A,f=e,Q=e+P;f<Q;)i=w.Math.min(f+fP,Q),P=i-f,o=t.slice(f,i),o.splice(0,0,n,r?P:0),Array.prototype.splice.apply(D,o),f=i,n+=P;}function s2(t,e){var A;if(e<0)throw At(new I8("Negative exponent"));if(e==0)return X2;if(e==1||VT(t,X2)||VT(t,vr))return t;if(!SQ(t,0)){for(A=1;!SQ(t,A);)++A;return RP(zK(A*e),s2(tT(t,A),e));}return HY(t,e);}function _X(t,e,A){var n,P,r,i,f;for(f=tf(new WA(true),t),P=-1,r=0;r<f.r;r++)if(n=f.u==null||f.u[r]==null?null:on((i=f.u[r],w0(),i)),n!=null&&n.endsWith("*")){P=r;break;}return P>=0?CR(f,P,e,A):c(ft,Dt,2,0,6,1);}function Pj(t,e,A,n,P){var r,i,f,D,Q;for(Q=-1,i=0;i<O(t.j,A);i++)if(_(t.j,A,i)==e){Q=i;break;}for(f=-1,r=0;r<O(t.d,P);r++)if(_(t.d,P,r)==n){f=r;break;}for(D=0;D<8;D++)if(bs(t.k[A][Q][D],t.e[P][f][D])!=0)return D<<8;return O1;}function rj(t,e,A,n){var P;for(P=0;P<t.s;P++)if(t.F[0][P]==e&&t.F[1][P]==A||t.F[0][P]==A&&t.F[1][P]==e)return h8(t,P,n),t.U=0,P;return t.s>=t.O&&QQ(t,t.O*2),t.F[0][t.s]=e,t.F[1][t.s]=A,t.I[t.s]=n,t.G[t.s]=0,t.H[t.s]=0,t.U=0,t.s++;}function ij(t,e,A){var n,P,r,i,f,D,Q,o,L,s;for(s=e.length,P=e,r=0,i=P.length;r<i;++r)n=P[r],L=t.a[n]&d1,(L==0||L>s)&&(t.a[n]&=GP,t.a[n]|=s);for(D=A,Q=0,o=D.length;Q<o;++Q)f=D[Q],L=t.c[f]&d1,(L==0||L>s)&&(t.c[f]&=GP,t.c[f]|=s);}function Ss(t,e){this.a=new AF(this),this.e=new Pm(),this.b=new Lv(),this.c=new sv(),this.d=new eF(this),this.f=new bv(),this.i=new yv(),this.g=new Uv(),this.j=new vF(),this.k=new nd(this,t),this.n=new tF(this),this.o=new Pd(this,e),this.p=new Gv();}function EQ(t,e,A){var n,P,r,i,f,D;return n=t.i[1].a-t.i[0].a,P=t.i[1].b-t.i[0].b,i=(t.i[0].a+t.i[1].a)/2,f=(t.i[0].b+t.i[1].b)/2,n==0?P<0^A>f:P==0?n<0^e>i:(r=-n/P,D=(t.i[0].a+r*r*e-r*A+r*t.i[0].b)/(1+r*r),n<0^D>i);}function ui(t){var e,A,n;for(n=false,e=0;e<t.r;e++)t.D[e]==-1&&(n=true,iQ(t,t.A[e]));for(A=0;A<t.s;A++)t.I[A]==512?n=true:(t.D[t.F[0][A]]==-1||t.D[t.F[1][A]]==-1)&&(t.I[A]=512,n=true);return n?(t.U=0,Rf(t)):null;}function $X(t,e,A){var n,P,r,i,f,D;for(f=c(Pt,it,6,t.g,16,1),A[0]=e,D=1,f[e]=true,r=0;r<D;r++)for(i=0;i<t.k[A[r]];i++)P=t.n[A[r]][i],((t.G[P]&64)!=0||dt(t,P)==2||oi(t,P))&&(n=t.j[A[r]][i],f[n]||(A[D++]=n,f[n]=true));return D;}function aX(t,e,A){var n,P,r,i,f;for(f=c(I8t,c0,162,A,0,1),i=c(F,m,6,A,15,1),r=0;r<A;r++)f[r]=new Fw();for(n=0;n<t.V.r;n++)f[e[n]].a+=mt(t.V,n),f[e[n]].b+=Rt(t.V,n),++i[e[n]];for(P=0;P<A;P++)f[P].a/=i[P],f[P].b/=i[P];return f;}function tZ(t){var e,A,n,P;for(P=false,A=0;A<t.V.r;A++)if(i0(t.V,A)){P=true;break;}if(n=Sm(t,P),n){for(K1(t),e=0;e<t.V.r;e++)(!P||i0(t.V,e))&&(de(t.V,e,2*n.a-mt(t.V,e)),Ve(t.V,e,2*n.b-Rt(t.V,e)));t.eb=w.Math.max(t.eb,1),P1(t.k);}}function fj(t,e,A){var n;R3();var P;this.a=new pR(new _A(),t,A,this),GI(this.a,new i7(this)),this.c=e,this.f=A,this.e=new Lh(),Qh(this.e,this.a),this.d=new b7(),Qh(this.d,this.a),P=(n=this.Bc(),n.getClipboardHandler()),mI(this.a,new u7(P));}function Dj(t){Yp.call(this,t),this.d=c(F,m,6,this.v.length,15,1),this.c=c(F,m,6,this.u.length,15,1),this.a=c(RS,H2,168,1,0,1),this.a[0]=Xu(this,c(F,m,6,this.v.length,15,1),c(F,m,6,this.u.length,15,1)),this.b=-1;}function k5(t){var e,A;for(this.i=$n(t),S_(this),ut(this.i,7),this.g=c(Pt,it,6,this.i.i,16,1),this.f=c(Pt,it,6,this.i.g,16,1),e=0;e<this.i.g;e++)A=eQ(X(this.i,e))[0],this.f[e]=P0(this.i,e)<A;NX(this),J_(this),bW(this),ZZ(this);}function eZ(t){t=t||{};var e=0;return t.matchAtomCharge===true&&(e|=1),t.matchAtomMass===true&&(e|=2),t.matchDBondToDelocalized===true&&(e|=4),(t.matchAromDBondToDelocalized===true||t.matchAromDBondToDelocalized===void 0)&&(e|=8),e;}function uj(t,e){var A,n,P,r,i,f,D;for(D=kn(t.R),A=0;A<D.j.a.length;A++)if(D.e[A]&&wA(D,A,e)){for(P=G(D.j,A),r=0,i=P.length;r<i;++r)if(n=P[r],n!=e){for(f=0;f<O(t.R,n);f++)if(oi(t.R,Nt(t.R,n,f)))return  true;}return  false;}return  false;}function cf(t,e,A){var n,P,r;if(n=X(t.j,e),n>=5&&n<=8||n==15||n==16||n==33||n==34||n==52){if(r=yf(t.j,e),r!=0)return  true;if(P=R1(t.j,e),n==5&&P>=0)return A&&b0(t.j,e,P-1),true;if(n!=5&&P<=0)return A&&b0(t.j,e,P+1),true;}return  false;}function AZ(t,e,A){var n,P,r,i,f;for(f=false,i=1,e[A]=i,n=true;n;){for(n=false,P=0;P<t.b;P++)if(e[P]==i)for(r=0;r<t.b;r++)e[r]==0&&lz(t,P,r)&&(t.c[r]==-2?(e[r]=i+1,n=true):t.c[r]!=t.c[A]&&(e[r]=i+1,f=true));++i;}return f;}function nZ(t,e){var A;for(this.o=e,this.k=c(q2,V2,28,t.k.length,0,1),A=0;A<this.k.length;A++)this.k[A]=new pu(t.k[A]);t.j!=null&&(this.j=hL(t.j,t.j.length)),this.p=t.p==null||t.p.endsWith(" (copy)")?t.p:Su(t.p," (copy)"),this.n=NaN;}function Qj(t,e){var A,n,P,r,i;for(r=c(gS,c0,44,8,0,1),i=0;i<=7;i++)for(r[i]=new Ji(new _l()),A=0;A<t.g;A++)P=e[A][i],P!=null&&(n=Be(r[i],P),n=n==null?c(F,m,6,1,15,1):Mn(n,n.length+1),n[n.length-1]=A,We(r[i],P,n));return r;}function PZ(t,e){var A,n,P;if(t.t!=-1&&(nA(e,(P=KD(e),P!=0?P:el)),_F(t,e,t.t),t.w==19&&(n=M1(t.V,t.t),n!=0)))for(A=0;A<t.V.g;A++)A!=t.t&&M1(t.V,A)==n&&_F(t,e,A);t.u!=-1&&(nA(e,(P=KD(e),P!=0?P:el)),xX(t,e,t.u)),t.v&&t.v.Mb(e);}function rZ(t,e){var A,n,P,r,i;if(t.D[e]!=8||t.k[e]!=1)return  false;if(A=t.j[e][0],t.D[A]==15){for(i=t.k[A],n=0;n<i;n++)if(P=t.j[A][n],P!=e&&t.D[P]==8&&(r=o1(t,A,P),t.I[r]==2))return  true;}return  false;}function m5(t,e){var A,n;if(t==null)return e==null?0:1;if(e==null)return  -1;for(A=w.Math.min(t.length,e.length),n=0;n<A;n++)if((t[n]&GP)!=(e[n]&GP))return (t[n]&GP)<(e[n]&GP)?-1:1;return t.length==e.length?0:t.length<e.length?-1:1;}function iZ(t,e,A,n,P){var r,i,f,D;if(z1(t)===z1(e)&&n==P){cR(t,n,A);return;}for(f=0;f<n;f++){for(i=0,r=t[f],D=0;D<P;D++)i=at(at(yn(V(r,g1),V(e[D],g1)),V(A[f+D],g1)),V(Ot(i),g1)),A[f+D]=Ot(i),i=j0(i,32);A[f+P]=Ot(i);}}function b5(t,e){var A,n,P,r,i;for(r=E3(e),n=(A=t.a.get(r),A??c(qn,A0,1,0,5,1)),i=0;i<n.length;i++)if(P=n[i],m3(e,P.hd()))return n.length==1?(n.length=0,t.a.delete(r)):n.splice(i,1),--t.c,++t.b.b,P.jd();return null;}function fZ(t){var e,A,n,P,r;for(A=0;A<t.R.g;A++)AA(t.e[A],A),a1(t.e[A],t.c+1,yn(2,t.f[A]));for(r=c(F,m,6,t.U+1,15,1),n=0;n<t.R.g;n++)++r[t.f[n]];for(P=1;r[P]==1;)++P;for(e=0;e<t.R.g;e++)if(t.f[e]==P){se(t.e[e],1);break;}t.U=tP(t);}function j5(t,e){var A,n,P;if(t.a==null){for(t.a=c(Ut,Tt,6,t.o.r,15,1),t.d=c(Ut,Tt,6,(s8(),Sl).length,15,1),P=new Zt(e);P.a<P.c.a.length;)n=_t(P),n.g&&(t.d[n.vd()]+=n.td(t,t.a));for(t.e=0,A=0;A<t.o.r;A++)t.e+=t.a[A];t.c=-1;}}function DZ(t,e){e=e||{};var A=e.smartsMode||"smiles",n=e.skipCoordinateTemplates||false,P=e.makeHydrogenExplicit||false,r=e.noCactvs||false,i=e.singleDotSeparator||false,f=e.createSmartsWarnings||false;t.zc(A,n,P,r,i,f);}function SQ(t,e){var A,n,P;if(e==0)return (t.a[0]&1)!=0;if(e<0)throw At(new I8("Negative bit address"));if(P=e>>5,P>=t.d)return t.e<0;if(A=t.a[P],e=1<<(e&31),t.e<0){if(n=ek(t),P<n)return  false;n==P?A=-A:A=~A;}return (A&e)!=0;}function oj(t,e,A,n,P,r,i){var f,D,Q;f=A==-1?(i[e].a-i[t.B[0]].a)/8:i[e].a-i[A].a,D=A==-1?(i[e].b-i[t.B[0]].b)/8:i[e].b-i[A].b,qt(t,Bt((n+f)/P),r),qt(t,Bt((n+D)/P),r),t.jb&&(Q=A==-1?(i[e].c-i[t.B[0]].c)/8:i[e].c-i[A].c,qt(t,Bt((n+Q)/P),r));}function Uj(t,e){var A,n,P,r;if(t.d!=e.d)return t.d>e.d?1:-1;for(P=t.a.length,r=e.a.length,A=w.Math.min(P,r),n=0;n<A;n++)if(--P,--r,t.a[P]!=e.a[r])return t.a[P]>e.a[r]?1:-1;return P!=r?P>r?1:-1:t.b!=e.b?t.b>e.b?1:-1:0;}function Lj(t,e){var A,n,P,r;if(t.L){if(gt(V(t.C[e],1),0))return  false;if(t.w!=null&&t.w[e]!=null){for(n=t.w[e],P=0,r=n.length;P<r;++P)if(A=n[P],!(A==1||A>=5&&A<=9||A>=14&&A<=17||A>=32&&A<=35||A>=52&&A<=53))return  false;}}return yq(t.D[e]);}function uZ(t){var e,A,n,P,r,i;if(!wl)return xV;for(r=0,n=0,i=new VD(1),A=new _A(),P=0;P<gi.a.a.length;P++)l2(new WA(false),A,Eh(gi,P)),GA(i,t),MA(i,A),CA(i,1,i.c)>0&&(r+=jg(gi,P),++n);return e=n==0?-1:r/w.Math.sqrt(n),e+"	"+n+"	"+t.g;}function R5(t,e){var A,n,P,r,i;return e&=63,A=t.h,n=(A&B8)!=0,n&&(A|=-1048576),e<22?(i=A>>e,r=t.m>>e|A<<22-e,P=t.l>>e|t.m<<22-e):e<44?(i=n?Pn:0,r=A>>e-22,P=t.m>>e-22|A<<44-e):(i=n?Pn:0,r=n?z0:0,P=A>>e-44),G0(P&z0,r&z0,i&Pn);}function sj(t,e){var A,n,P,r;for(r=0,n=new qB();r<e;){try{P=X1(t.i);}catch(i){if(i=_1(i),Yt(i,79))break;throw At(i);}if(P==null)break;P.startsWith(Uo)&&++r,P.startsWith(">")&&(A=IR(P),A!=null&&pz(n,A));}t.d=Qf(n.b,c(ft,Dt,2,0,6,1));}function wf(t,e,A,n,P,r){for(var i,f,D;t.r+n>t.N;)VQ(t,t.N*2);for(;t.s+n>t.O;)QQ(t,t.O*2);return i=tn(t,e,A),i!=-1?UR(t,i,n,P,r):(f=kf(t,e,A),f!=-1?_Q(t,f,n,P,r):(i=te(t,e,A,0),D=l1*(n-2)/n,U6(t,i,n,i,P,0,l1-D,r),t.U=0,true));}function yj(t){var e,A,n,P,r,i,f,D,Q,o;for(D=0,n=t,r=0,f=n.length;r<f;++r)e=n[r],e==-1&&++D;if(D!=0)for(o=t,t=c(F,m,6,o.length-D,15,1),Q=0,A=o,P=0,i=A.length;P<i;++P)e=A[P],e!=-1&&(t[Q++]=e);return t.sort(pe(Q0.prototype.ld,Q0,[])),t;}function QZ(t){var e,A,n,P;if(A=new U8(),t.g.a.length!=0){for(P=new Wr(G(t.g,0)),e=1;e<t.g.a.length;e++)CD(P,G(t.g,e));Ft(A.g,P),A.d=-1;}if(t.f.a.length!=0){for(n=new Wr(G(t.f,0)),e=1;e<t.f.a.length;e++)CD(n,G(t.f,e));Ft(A.f,n),A.d=-1;}return A;}function oZ(t,e){var A,n,P,r,i;for(t.i=c(F,m,6,t.g.g,15,1),n=0;n<t.f.g;n++)M1(t.f,n)!=0&&(t.i[e[M1(t.f,n)]]=H0(t.f,n));if(i=c(F,m,6,t.g.r,15,1),r=Ur(t.g,i,false,false),r>1)for(P=c(F,m,6,r,15,1),A=0;A<t.g.g;A++)t.i[A]|=P[i[A]]++<<5;}function UZ(t,e){return !e&&(e={mode:3}),e=Object.assign({},e),"ensureCoordinates"in e?(e.ensureCoordinates=!!e.ensureCoordinates,NO(t,e.ensureCoordinates)):(typeof e.mode!==s9&&(e.mode=3),e.mode=Math.trunc(e.mode),dO(t,e.mode));}function gf(t,e,A,n){var P;if(A==null){t.w!=null&&(t.w[e]=null);return;}if(A.length==1&&!n){P=A[0],t.D[e]!=P&&mf(t,e,P,0,-1,0),t.w!=null&&(t.w[e]=null);return;}t.w==null&&(t.w=c(F,u0,7,t.N,0,2)),t.w[e]=A,n&&(t.C[e]=J(t.C[e],1)),t.U=0,t.L=true;}function LZ(t,e){var A,n,P,r,i,f,D;for(A=c(Ut,Tt,6,Ct(t.L,e),15,1),P=0;P<Ct(t.L,e);P++)A[P]=_0(t.L,e,_(t.L,e,P));for(A.sort(pe(ki.prototype.ld,ki,[])),r=sk(A,0),i=Gm(A,0,r),n=1;n<A.length;n++)f=sk(A,n),D=Gm(A,n,f),i<D&&(i=D,r=f);return r;}function sZ(t,e,A){var n,P,r,i,f,D,Q,o,L,s;for(s=new wU(new fD()),Q=e,o=0,L=Q.length;o<L;++o)for(D=Q[o],P=A,r=0,i=P.length;r<i;++r)n=P[r],f=c(F,m,6,2,15,1),f[0]=t.J[D],f[1]=t.C[n],We(s.a,f,(Er(),jo))==null;return JT(s,c(F,u0,7,0,0,2));}function u9(t,e){var A,n,P,r;if(r=t.d.a.length,r==0)return  -1;for(P=1;2*P<=r;)P<<=1;for(n=P,--P;n!=0;){if(n>>=1,P>=r){P-=n;continue;}if(A=vB(t,e,G(t.d,P)),A==0)return P;if(n==0)break;A<0?P-=n:P+=n;}return P<r&&vB(t,e,G(t.d,P))>0&&++P,-(P+1);}function yZ(t,e,A,n){var P,r,i,f,D,Q;if(P=t.e[e],f=c(F,m,6,P,15,1),Q=W5(t,e,A,n,f),Q==3)return  false;for(i=(t.v[e]&3)==Q?257:129,D=0;D<P;D++)(f[D]&1)==1&&(r=t.n[e][A[D]],t.I[r]=i,t.F[0][r]!=e&&(t.F[1][r]=t.F[0][r],t.F[0][r]=e));return  true;}function lZ(t){var e,A,n,P;for(n=new Zt(t.g);n.a<n.c.a.length;)if(e=_t(n),e.r!=0)return  false;for(P=new Zt(t.f);P.a<P.c.a.length;)if(e=_t(P),e.r!=0)return  false;for(A=new Zt(t.a);A.a<A.c.a.length;)if(e=_t(A),e.r!=0)return  false;return  true;}function hZ(t,e){var A,n,P;if(t.f=e,Bg(t.e,t.c,t.f),CA(t.e,4,8)==0)return t.a=null,0;for(t.a=t.e.F,A=t.a.a.length-1;A>=0;A--)for(P=G(t.a,A),n=0;n<P.length;n++)if(P[n]!=-1&&t.b[n]>0&&t.b[n]>_i(t.f,P[n])){cA(t.a,A);break;}return t.a.a.length;}function lj(t,e,A){var n,P,r,i,f;for(this.a=c(F,m,6,t.g,15,1),this.a[0]=e,A[e]=true,r=0,i=0;r<=i;){for(P=O(t,this.a[r]),f=0;f<P;f++)n=_(t,this.a[r],f),w.Math.abs(t.A[n])==0&&n0(V(t.C[n],Pe),0)&&!A[n]&&(this.a[++i]=n,A[n]=true);++r;}}function TZ(t,e,A,n,P){var r,i,f,D,Q,o,L,s;return r=nP(e.D[A]),i=nP(e.D[P]),f=r>i?4:3,D=(Q=nP(e.D[A]),o=nP(e.D[n]),L=nP(e.D[P]),Q>L&&(Q=(s=U1(L),U1(L=Q),s).a),f9(B(d(F,1),m,6,15,[1,0,2]),B(d(F,1),m,6,15,[o,Q,L]),t)),D>=0?V0(t.a[D][f]):0;}function hj(t,e,A){var n,P,r;if(t.p[e]==2||(t.p[e]==1||xP(t,e,true))&&t.k[e]!=3||t.p[e]==0&&t.k[e]!=4)return 1;for(r=-2,P=0;P<t.k[e];P++)if(n=t.j[e][P],n!=A){if(r==-2)r=zU(t.d,n);else if(r!=zU(t.d,n))return 1;}return t.k[e]-1;}function cZ(t,e){var A,n,P,r,i;if(t.i.L){if(gt(V(h0(t.i,e),1),0))return  true;if(i=IA(t.i,e),i!=null){for(n=i,P=0,r=n.length;P<r;++P)if(A=n[P],A==5||A==6||A==7||A==8||A==15||A==16||A==33||A==34)return  true;return  false;}}return _v(X(t.i,e));}function wZ(t,e,A){var n,P,r,i,f,D,Q,o,L;for(L=c(XA,re,6,1+t.d[t.d.length-1],14,1),n=0,i=e,D=0,o=i.length;D<o;++D)P=i[D],L[t.d[n]]=at(L[t.d[n]],P<<t.b[n]),++n;for(r=A,f=0,Q=r.length;f<Q;++f)P=r[f],L[t.d[n]]=at(L[t.d[n]],P<<t.b[n]),++n;return L;}function p5(t,e){var A,n,P;this.a=t.F[0][e],this.b=t.F[1][e],n=M1(t,this.a),P=M1(t,this.b),n<P?(this.d=n,this.e=P):(this.d=P,this.e=n),this.c=t.H[e]&31,A=t.I[e]&127,A==16?this.c|=16:A==2?this.c|=2:A==4?this.c|=4:this.c|=1,this.i=(Dr(),ml);}function Is(t,e){var A,n,P;if(A=K(t.V,0,e),v0(t.V,A)!=0)return xi(t.V,A)||v0(t.V,A)!=1&&v0(t.V,A)!=2?-1:A;if(e0(t.V,A)==1){for(P=0;P<O(t.V,A);P++)if(EA(t.V,A,P)==2&&(n=_(t.V,A,P),e0(t.V,n)==2&&(v0(t.V,n)==1||v0(t.V,n)==2)))return n;}return  -1;}function gZ(t){if(t.Xc()){var e=t.c;e.Yc()?t.n="["+e.k:e.Xc()?t.n="["+e.Vc():t.n="[L"+e.Vc()+";",t.b=e.Uc()+"[]",t.j=e.Wc()+"[]";return;}var A=t.g,n=t.d;n=n.split("/"),t.n=Ls(".",[A,Ls("$",n)]),t.b=Ls(".",[A,Ls(".",n)]),t.j=n[n.length-1];}function Tj(t){var e,A,n,P;e=t.M!=0?t.M:t.D!=0?t.D:-1,t.t=(ni(),A=(e&QP)>>16,n=(e&DP)>>8,P=e&255,(A+Bt(w.Math.round(Hf*(92-A)))<<16)+(n+Bt(w.Math.round(Hf*(160-n)))<<8)+P+Bt(w.Math.round(Hf*(255-P)))),t.u=$s(vy,e),t.H=-24321,t.I=-6291392;}function IQ(t){var e,A,n,P,r,i,f;do for(f=false,A=0;A<t.j.i;A++)if(t.e[A]){for(r=false,P=0;P<2;P++){for(n=K(t.j,P,A),e=false,i=0;i<O(t.j,n);i++)if(A!=Nt(t.j,n,i)&&t.e[Nt(t.j,n,i)]){e=true;break;}if(!e){r=true;break;}}r&&(f=true,u2(t,A));}while(f);}function M5(t){var e,A,n,P,r,i,f;do for(f=false,A=0;A<t.k.i;A++)if(t.g[A]){for(r=false,P=0;P<2;P++){for(e=false,n=K(t.k,P,A),i=0;i<O(t.k,n);i++)if(A!=Nt(t.k,n,i)&&t.g[Nt(t.k,n,i)]){e=true;break;}if(!e){r=true;break;}}r&&(f=true,MQ(t,A));}while(f);}function cj(t){var e,A,n,P,r,i;for(t.e=c(Ut,Tt,6,t.d,15,1),A=new Zt(t.a);A.a<A.c.a.length;)e=_t(A),e.ec(t.i,t.e);for(i=-1e8,n=.1,r=0;r<t.d;r++)t.e[r]*=n,t.e[r]>i&&(i=t.e[r]);if(i>10){for(;i*n>10;)n*=.5;for(P=0;P<t.d;P++)t.e[P]*=n;}return n;}function dZ(t){t=t||{};var e=t.countMode||fE;switch(e){case fE:return 4;case "existence":return 1;case "firstMatch":return 2;case "separated":return 3;case "rigorous":return 5;case "unique":return 6;default:throw new Error("invalid count mode: "+e);}}function xs(t,e){var A,n,P,r,i,f;return r=t.a*ol+t.b*1502,f=t.b*ol+11,A=w.Math.floor(f*oE),r+=A,f-=A*N4,r%=N4,t.a=r,t.b=f,e<=24?w.Math.floor(t.a*Mc[e]):(P=t.a*(1<<e-24),i=w.Math.floor(t.b*Cc[e]),n=P+i,n>=Fo&&(n-=w8),n);}function wj(t,e){var A,n,P,r;if(t.L){if(gt(V(t.C[e],1),0))return  false;if(t.w!=null&&t.w[e]!=null){for(n=t.w[e],P=0,r=n.length;P<r;++P)if(A=n[P],!(A>=21&&A<=30||A>=39&&A<=48||A==57||A>=72&&A<=80||A==89||A>=104&&A<=112))return  false;}}return Pz(t.D[e]);}function BZ(t,e,A,n,P,r){var i,f,D,Q,o,L,s;for(n8(t.k[A],n,P,r),s=t.o,L=c(Pt,it,6,s.r,16,1),D=c(F,m,6,s.r,15,1),D[0]=A,L[e]=true,L[A]=true,f=0,Q=0;f<=Q;){for(o=0;o<s.e[D[f]];o++)i=s.j[D[f]][o],L[i]||(L[i]=true,D[++Q]=i,n8(t.k[i],n,P,r));++f;}}function J0(t,e,A,n){var P;if(e==A)return  -1;for(P=0;P<t.s;P++)if(t.F[0][P]==e&&t.F[1][P]==A||t.F[0][P]==A&&t.F[1][P]==e)return t.I[P]<n&&(t.I[P]=n),P;return t.s>=t.O&&QQ(t,t.O*2),t.F[0][t.s]=e,t.F[1][t.s]=A,t.I[t.s]=n,t.G[t.s]=0,t.H[t.s]=0,t.U=0,t.s++;}function C5(t,e,A){var n,P,r,i,f,D;if(e==A)return 0;for(ut(t,1),i=c(F,m,6,t.r,15,1),r=c(F,m,6,t.r,15,1),r[0]=e,i[e]=1,P=0,f=0;P<=f;){for(D=0;D<t.e[r[P]];D++){if(n=t.j[r[P]][D],n==A)return i[r[P]];i[n]==0&&(r[++f]=n,i[n]=i[r[P]]+1);}++P;}return  -1;}function xQ(t,e){var A,n;if(ut(t,1),t.k[e]==2&&t.o[e][0]==2&&t.o[e][1]==2){for(A=0;A<2;A++)for(n=0;n<t.e[t.j[e][A]];n++)if(_9(t,t.n[t.j[e][A]][n],t.j[e][A]))return t.n[t.j[e][A]][n];}else for(A=0;A<t.e[e];A++)if(_9(t,t.n[e][A],e))return t.n[e][A];return  -1;}function H5(t,e,A){var n,P,r,i,f,D;for(ut(t,1),r=c(F,m,6,t.g,15,1),D=c(Pt,it,6,t.g,16,1),r[0]=e,r[1]=A,D[e]=true,D[A]=true,P=1,i=1;P<=i;){for(f=0;f<t.k[r[P]];f++){if(n=t.j[r[P]][f],n==e&&P!=1)return  -1;D[n]||(D[n]=true,r[++i]=n);}++P;}return i;}function y2(t,e){var A;return e==null?null:(A=Be(t.c,e),A||((e.endsWith("<")||e.endsWith("-"))&&(A=Be(t.c,e.endsWith("<")?hA(e,0,e.length-1)+">":e.endsWith("-")?hA(e,0,e.length-1)+"+":e),A)?(A=new tp(A),We(t.c,e,A),A):null));}function vZ(t,e,A,n,P,r){var i,f,D,Q,o;for(f=new n1(),i=L$(t,e),D=0;D<e.r;D++)for(Q=0;Q<D+1;Q++)o=aG(A,new zi(D,Q)),(o==(P9(),wi)||o==Y2)&&w.Math.abs(i[D])>vo&&w.Math.abs(i[Q])>vo&&pn(new p3(e,D,Q))<n&&Ft(f,new VF(e,D,Q,o,i[D],i[Q],P,r));return f;}function FZ(t,e,A,n,P){var r,i,f,D,Q;for(Q=-1,i=0;i<O(t.j,A);i++)if(_(t.j,A,i)==e){Q=i;break;}for(f=-1,r=0;r<O(t.d,P);r++)if(_(t.d,P,r)==n){f=r;break;}for(D=2;D<8;D++)if(t.p[A][Q][D]==null||bs(t.p[A][Q][D],t.i[P][f][D])!=0)return D-2<<8;return 1536;}function kZ(t,e,A,n){var P,r,i,f,D,Q,o;for(o=n.a.length,0<o?n.a=hA(n.a,0,0):0>o&&(n.a+=z8(c(Fr,re,6,-o,15,1))),D=mn(t.k,e)&&(t.j&4)==0,r=A,i=0,f=r.length;i<f;++i)P=r[i],n.a.length!=0&&(n.a+=","),Q=(J1(),a0)[P],q(n,D?Q.toLowerCase():Q);return n.a;}function mZ(t){var e,A;for(A=new gD(),e=0;e<t.length;e++)switch(zt(e,t.length),t.charCodeAt(e)){case 38:A.a+="&&";break;case 9:A.a+="&09";break;case 10:A.a+="&0A";break;case 32:A.a+="&20";break;default:EB(A,(zt(e,t.length),t.charCodeAt(e)));}return A.a;}function bZ(t,e,A,n,P){var r,i,f,D;if(t.j.length==0||t.n.a.length==0)return null;for(D=c(Pt,c0,12,e,0,2),f=c(Pt,it,6,n,16,1),i=0;i<P.length;i++)P[i]!=-1&&M1(t.f,i)==0&&(f[P[i]]=true);for(r=0;r<A.length;r++)A[r]!=-1&&M1(t.g,r)==0&&(D[A[r]]=f);return D;}function V5(t,e,A,n,P,r){var i,f,D,Q,o;for(n8(t.k[e],n,P,r),o=t.o,D=0;D<o.e[e];D++){if(i=o.j[e][D],f=false,A!=null){for(Q=0;Q<A.length;Q++)if(i==A[Q]){f=true;break;}}f||(o.e[i]==1?n8(t.k[i],n,P,r):LA(o,o.n[e][D])?n8(t.k[i],n/3,P/3,r/3):BZ(t,e,i,n,P,r));}}function l2(t,e,A){var n,P,r,i;if(A==null||A.length==0){QT(t,e,null,null);return;}n=A.indexOf(p0(32)),n>0&&n<A.length-1?QT(t,e,ln((r=(Mt(0,n,A.length),A.substr(0,n)),w0(),r)),ln((i=(zt(n+1,A.length+1),A.substr(n+1)),i))):QT(t,e,ln((P=A,w0(),P)),null);}function jZ(t,e){var A,n,P,r;for(t.f=z(e,0)==0?new n2():new $i(e),n=new Hu(t.d),A=null,P=0;P<12&&!(gt(t.n,0)&&(q1(),I1(E1(Date.now()),t.n)));P++){if(aj(t,n)||z(e,0)!=0)return n;A?A.e>n.e&&(r=A,A=n,n=r):(A=n,n=new Hu(t.d));}return A;}function h2(t,e){var A,n,P,r,i,f;if(!t.b)return  false;for(P=false,r=t.b.a.length-1;r>=0;r--)if(n=false,i=G(t.b,r),i.a==2?n=e$(t,i.b,i.c,i.d,e):i.a==1&&(n=q_(t,i.b,e)),n){for(er(t.b,i),f=0;f<t.g[i.b].length;f++)A=t.g[i.b][f],t.n[A]=false;P=true;}return P;}function NQ(t,e,A){return dt(t,e)!=1?0:16-t.e[A]+16*w.Math.max(0,w.Math.min(9,t.q&&e<t.i?TP(t.q,e):0)-2)+((t.I[e]&384)==0||t.F[0][e]!=A?g8:0)+((t.v[A]&3)==0?S0:0)+(t.D[A]==1?O1:0)+(t.e[A]==1?Qe:0)+((t.G[e]&64)!=0?0:512)+(t.D[A]!=6?256:0);}function gj(t,e,A,n){var P,r,i,f,D,Q,o;for(P=c(F,m,6,O(t.i,A),15,1),f=0,i=0;i<O(t.i,A);i++)P[f]=_(t.i,A,i),!n[P[f]]&&ny(t,e,P[f])&&++f;if(f==0)return  -1;if(f==1)return P[0];for(D=-1,Q=Et,r=0;r<f;r++)o=Gj(t.i,e,P[r],Et,n),o<Q&&(Q=o,D=P[r]);return D;}function RZ(t,e){var A,n,P;e.j==1?N9(t.s):e.j==0?(XK(t),t.v=true,N9(t.s)):z1(e.k)===z1(t.d)||z1(e.k)===z1(t.q)?Aj(t):z1(e.k)===z1(t.p)&&(P=F0(t.p),t.t!=P&&(n=t.t+F0(t.o),A=wT(t,P),n<P?$t(t.o,0):n<P+A?$t(t.o,n-P):$t(t.o,A-1),t.t=P));}function pZ(t,e){var A,n,P,r;return A=G9(t.R,e),n=sf(t.R,e,false),P=sf(t.R,e,true),r=-1,n!=P?A!=-1&&A>n?r=A<<24>>24:r=n<<24>>24:A!=-1?(A>P||A<P&&A>=G1(t.R,e))&&(r=A<<24>>24):!fs(t.R,e)&&Gh(t.R,e)!=0&&(r=G1(t.R,e),r-=Cu(t.R,e,r)),Iq(t,e,r),r;}function MZ(t){var e,A,n;for(e=0,A=0,n=0;n<t.g.a.length+t.f.a.length;n++)e+=G8(n<t.g.a.length?G(t.g,n):G(t.f,n-t.g.a.length))*(n<t.g.a.length?G(t.g,n):G(t.f,n-t.g.a.length)).s,A+=(n<t.g.a.length?G(t.g,n):G(t.f,n-t.g.a.length)).s;return A!=0?A/e:1;}function CZ(t){var e,A,n;for(e=0,A=0,n=0;n<t.g.a.length+t.f.a.length;n++)e+=G8(n<t.g.a.length?G(t.g,n):G(t.f,n-t.g.a.length))*(n<t.g.a.length?G(t.g,n):G(t.f,n-t.g.a.length)).s,A+=(n<t.g.a.length?G(t.g,n):G(t.f,n-t.g.a.length)).s;return A!=0?A/e:1;}function Ae(t,e){var A,n,P,r;if(t.L){if(gt(V(t.C[e],1),0))return  false;if(t.w!=null&&t.w[e]!=null){for(n=t.w[e],P=0,r=n.length;P<r;++P)if(A=n[P],!(A>=3&&A<=4||A>=11&&A<=13||A>=19&&A<=31||A>=37&&A<=51||A>=55&&A<=84||A>=87&&A<=112))return  false;}}return zz(t.D[e]);}function Ns(t,e){var A,n,P,r;if(r=t.c.a.length,r==0)return f8(t.c,0,e),0;for(P=1;2*P<=r;)P<<=1;for(n=P,--P;n!=0;){if(n>>=1,P>=r){P-=n;continue;}if(A=a9(e,G(t.c,P)),A==0)return  -1;if(n==0)break;A<0?P-=n:P+=n;}return P<r&&a9(e,G(t.c,P))>0&&++P,f8(t.c,P,e),P;}function HZ(t){var e,A,n,P,r,i,f,D,Q;if(Q=1,n=dP(t,t.r,t.s,(J1(),Bn)),n!=0)(n<1||n>3)&&(Q=1.5/n);else {for(D=wM,e=1;e<t.r;e++)for(A=0;A<e;A++)r=t.K[A].a-t.K[e].a,i=t.K[A].b-t.K[e].b,f=t.K[A].c-t.K[e].c,P=r*r+i*i+f*f,D>P&&(D=P);Q=3/w.Math.max(.75,D);}return Q;}function VZ(t){var e,A,n,P;for(A=0;A<t.R.g;A++)AA(t.e[A],A),a1(t.e[A],2*t.c+4,Wt(t.f[A],t.c+4));for(P=false,e=0;e<t.R.g;e++)P=P|Qy(t,e,3);for(n=0;n<t.R.i;n++)P=P|$Q(t,n,3);if(!P)return  false;for(;t.U<t.R.g&&(P=Fa(t),!!P);)g2(t),t.P&&h2(t.P,t.f);return  true;}function dj(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y;for(r=e.a[A],f=e.a[n],D=e.a[P],o=em(t.a,e,A,n,P),s=-1,L=0;L<5&&s<0;L++)i=t.a.g.a[r-1][L],Q=t.a.g.a[D-1][L],i>Q&&(i=(y=U1(Q),U1(Q=i),y).a),s=f9(B(d(F,1),m,6,15,[2,1,3,0]),B(d(F,1),m,6,15,[f,i,Q,o]),t);return s;}function EZ(t,e,A,n,P){var r,i,f;for(r=0,i=0,f=0;f<n;f++)r=(Lr(),at(yn(V(A[f],g1),V(P,g1)),V(Ot(r),g1))),i=at(Y1(V(t[e+f],g1),V(r,g1)),i),t[e+f]=Ot(i),i=O0(i,32),r=j0(r,32);return i=at(Y1(V(t[e+n],g1),r),i),t[e+n]=Ot(i),Ot(O0(i,32));}function SZ(t,e,A,n){var P,r,i,f,D,Q;for(i=c(F,m,6,t.f.r,15,1),f=c(F,m,6,t.f.r,15,1),i[0]=A,i[1]=e,f[A]=1,f[e]=2,r=1,D=1;r<=D;){for(Q=0;Q<O(t.f,i[r]);Q++){if(P=_(t.f,i[r],Q),P==n)return 1+f[i[r]];f[P]==0&&Gi(t.f,P)&&(i[++D]=P,f[P]=f[i[r]]+1);}++r;}return 0;}function IZ(t,e,A,n){var P,r,i,f,D,Q,o;for(ut(t,1),n==null&&(n=c(Pt,it,6,t.r,16,1)),D=c(F,m,6,t.r,15,1),D[0]=e,n[e]=true,i=0,Q=0,f=1;i<=Q;){for(r=A?t.j[D[i]].length:t.e[D[i]],o=0;o<r;o++)P=t.j[D[i]][o],P<n.length&&!n[P]&&(D[++Q]=P,n[P]=true,++f);++i;}return f;}function Gs(t,e){var A,n,P,r,i,f;for(i=0;i<2;i++)if(A=K(t.i,i,e),X(t.i,A)==7&&O(t.i,A)==2&&(n=K(t.i,1-i,e),X(t.i,n)==6)){for(f=0;f<O(t.i,n);f++)if(P=_(t.i,n,f),r=Nt(t.i,n,f),(X(t.i,P)==8||X(t.i,P)==16)&&dt(t.i,r)==2&&O(t.i,P)==1)return  true;}return  false;}function xZ(t){var e,A,n;return A=t.l,(A&A-1)!=0||(n=t.m,(n&n-1)!=0)||(e=t.h,(e&e-1)!=0)||e==0&&n==0&&A==0?-1:e==0&&n==0&&A!=0?WL(A):e==0&&n!=0&&A==0?WL(n)+22:e!=0&&n==0&&A==0?WL(e)+44:-1;}function GQ(t,e,A,n,P){t[e[0]][e[1]]?t[e[0]][e[1]].a.length==2||t[e[0]][e[1]].c<P?t[e[0]][e[1]]=new hT(e,A,n,P):t[e[0]][e[1]].c==P&&(t[e[0]][e[1]].a[0]=(t[e[0]][e[1]].a[0]+n)/2,t[e[0]][e[1]].b=gX(t[e[0]][e[1]].b,A)):t[e[0]][e[1]]=new hT(e,A,n,P);}function NZ(t,e,A){var n,P,r,i,f,D,Q;if(Ct(t.d,A)==1&&(r=_(t.d,A,0),pU(t.d,r))){for(n=e.k[A],P=e.k[r],D=new Ke(P.a-n.a,P.b-n.b,P.c-n.c),i=0;i<O(t.d,r);i++)if(f=_(t.d,r,i),Gi(t.d,f)&&(Q=_8(P,e.k[f]),_b(D,Q)>HA))return  false;return X8(X8(n,D),D),true;}return  false;}function GZ(t){var e,A,n,P,r,i;for(e=0;e<t.k.i;e++)if(t.g[e]){for(r=true,P=0;P<2&&r;P++)for(A=K(t.k,P,e),i=0;i<O(t.k,A)&&r;i++)e!=Nt(t.k,A,i)&&t.g[Nt(t.k,A,i)]&&(r=false);if(r)for(g0(t.k,e,8),--t.c,n=0;n<2;n++)A=K(t.k,n,e),W0(t.k,A)&&(Wn(t.k,A,false),--t.b);}}function OZ(t,e){e.j==0?(uK(t),t.B=true,N9(t.v)):e.j==1?N9(t.v):z1(e.k)===z1(t.b)?e.a==1?(Y8(t.D,""),aU(t.w,k4)):(Y8(t.D,Vi(t.A,t.a)),aU(t.w,_V)):z1(e.k)===z1(t.c)?(yA(t.f,false),$t(t.n,0),$t(t.j,0)):z1(e.k)===z1(t.f)&&yA(t.c,false);}function qZ(t,e,A,n,P){var r,i,f,D,Q,o;for(r=1/(1+w.Math.exp(t-5)),o=1-1/(1+w.Math.exp(e+5)),Q=1/(1+w.Math.exp(.012*A-6)),i=1-1/(1+w.Math.exp(n)),f=(.5+r/2)*(.5+o/2)*(.5+Q/2)*(.5+i/2),D=0;P!=null&&D<P.length;D++)P[D]==2?f*=.8:P[D]==3&&(f*=.6);return f;}function Bj(t){var e,A,n,P,r,i,f;for(n=0,A=0;A<t.r;A++)(t.v[A]&512)!=0&&++n;if(n==0)return null;for(r=0,P=0;P<t.s;P++)(t.v[t.F[0][P]]&t.v[t.F[1][P]]&512)!=0&&++r;for(f=c(Pt,it,6,t.r,16,1),e=0;e<t.r;e++)f[e]=(t.v[e]&512)!=0;return i=new SA(n,r),L9(t,i,f,false,null),i;}function zZ(t,e){var A,n,P,r,i,f,D,Q;for(i=0,n=e,P=0,r=n.length;P<r;++P)A=n[P],A==-1&&++i;for(Q=c(F,m,6,e.length-i,15,1),D=0,f=0;f<e.length;f++)e[f]!=-1&&(Q[D]=H0(t.g,f)<<16|H0(t.H,e[f]),t.i!=null&&(Q[D]|=t.i[f]<<24),++D);return Q.sort(pe(Q0.prototype.ld,Q0,[])),Q;}function Os(t,e){var A,n;A=-1,n=0,(t.H[e]&16)!=0&&(A=16,++n),(t.H[e]&64)!=0&&(A=64,++n),(t.H[e]&32)!=0&&(A=32,++n),(t.H[e]&4)!=0&&(A=4,++n),(t.H[e]&2)!=0&&(A=2,++n),(t.H[e]&8)!=0&&(A=8,++n),(t.H[e]&1)!=0&&(A=1,++n),A!=-1&&A!=(t.I[e]&127)&&(t.I[e]=A),n<2&&(t.H[e]&=-128);}function KZ(t,e){var A,n;t.c==e.c?t.i=(Dr(),So):ir(e.c)==1?(t.g=e.c==1?1:e.c==2?386:e.c==4?4:e.c==16?16:8,t.i=(Dr(),Bl)):(A=(t.c&16)!=0?0:(t.c&1)!=0?1:(t.c&2)!=0?2:3,n=(e.c&16)!=0?0:(e.c&1)!=0?1:(e.c&2)!=0?2:3,n==A?t.i=(Dr(),So):(t.f=n-A,t.i=(Dr(),vl)));}function JZ(t,e,A,n,P,r){var i,f,D,Q,o,L;return Q=o1(e,n,P),i=l8(t,e,A,n),f=l8(t,e,n,P),D=l8(t,e,P,r),L=f,f==0&&dt(e,Q)==1&&(i==1||D==1)&&(L=2),o=P_(e,A,n,P,r),o==4&&o1(e,A,P)==-1&&o1(e,n,r)==-1?40+L:o==5&&(e.a[A]==1||e.a[n]==1||e.a[P]==1||e.a[r]==1)?50+L:L;}function YZ(t){var e,A,n;return !t.startsWith(K6)||!t.endsWith(J6)||(A=t.indexOf(p0(34),21),A==-1)?null:(n=(Mt(21,A,t.length),t.substr(21,A-21)),e=hA(t,21+n.length+1,t.length-17),e1(n,"arrow")?new np(e):e1(n,"text")?new uR(e):null);}function XZ(t){var e,A,n,P,r,i,f,D;for(ut(t,1),f=c(Oe,uA,6,t.g,15,1),n=c(F,m,6,t.g,15,1),D=0;D<t.g;D++){for(n[0]=D,P=c(F,m,6,t.g,15,1),P[D]=1,A=0,r=0;A<=r;){for(i=0;i<t.k[n[A]];i++)e=t.j[n[A]][i],P[e]==0&&(P[e]=P[n[A]]+1,n[++r]=e,f[D]+=P[e]-1);++A;}f[D]/=r;}return f;}function ZZ(t){var e,A,n;for(t.n=c(F,m,6,t.j,15,1),t.k=c(F,m,6,t.j,15,1),t.o=c(F,m,6,t.j,15,1),e=0;e<t.i.g;e++)t.b[e]!=0&&(n=t.b[e]-1,t.a!=null&&(t.k[n]+=t.a[e]),t.c!=null&&(t.o[n]+=t.c[e]));for(A=0;A<t.i.i;A++)t.g[A]&&dt(t.i,A)==2&&(t.n[t.b[K(t.i,0,A)]-1]+=2);}function qs(){qs=v1,nc=w.Math.cos(C2),fc=w.Math.sin(C2),rc=w.Math.cos(v4),uc=w.Math.sin(v4),Co=w.Math.cos(fA),Ho=w.Math.sin(fA),Pc=w.Math.cos(wo),Dc=w.Math.sin(wo),ic=w.Math.cos($6),Qc=w.Math.sin($6),w.Math.cos(kC),w.Math.sin(kC);}function WZ(t){var e,A,n,P,r;return isNaN(t)?(ti(),Bc):t<-9223372036854776e3?(ti(),iS):t>=9223372036854776e3?(ti(),gc):(P=false,t<0&&(P=true,t=-t),n=0,t>=UP&&(n=Bt(t/UP),t-=n*UP),A=0,t>=oP&&(A=Bt(t/oP),t-=A*oP),e=Bt(t),r=G0(e,A,n),P&&rs(r),r);}function E5(t,e){ni();var A,n,P,r,i;return A=t&On,i=(t&QP)>>16,P=(t&DP)>>8,n=t&255,r=Bt(1/(1-e)),i==0&&P==0&&n==0?A|r<<16|r<<8|r:(i>0&&i<r&&(i=r),P>0&&P<r&&(P=r),n>0&&n<r&&(n=r),A|w.Math.min(Bt(i/e),255)<<16|w.Math.min(Bt(P/e),255)<<8|w.Math.min(Bt(n/e),255));}function _Z(t,e){var A,n,P,r,i,f,D,Q,o;for(D=kn(t.e),Q=G(D.k,e).length,f=G(D.k,e),o=false,P=0;P<Q;P++)if(t.f[f[P]]==0){o=true;break;}if(o){for(A=(180*Q-360)/Q*.01745329238474369,i=G(D.j,e),r=0;r<Q;r++)i5(t,i[r],f[r==0?Q-1:r-1],f[r],A);if(Q<=4)for(n=0;n<Q;n++)t.f[f[n]]+=Q;}}function OQ(t,e,A,n){this.b=c(oc,A0,48,2,0,1),this.b[0]=t,this.b[1]=e,this.c=c(Ut,Tt,6,2,15,1),this.d=c(Ut,Tt,6,2,15,1),this.c[0]=Uu(this.b[0],A),this.d[0]=Lu(this.b[0],A),this.c[1]=Uu(this.b[1],n),this.d[1]=Lu(this.b[1],n),this.a=c(F,m,6,2,15,1),this.a[0]=1,this.a[1]=1;}function $Z(t){ni();var e,A,n,P;return P=t.a>>16&255,n=t.a>>8&255,A=t.a&255,e=t.a>>24&255,P==0&&n==0&&A==0?new xL(5,5,5,e):(P>0&&P<5&&(P=5),n>0&&n<5&&(n=5),A>0&&A<5&&(A=5),new xL(w.Math.min(Bt(P/zf),255),w.Math.min(Bt(n/zf),255),w.Math.min(Bt(A/zf),255),e));}function zs(t,e){Lr();var A,n,P,r,i,f,D,Q,o;return e.d>t.d&&(f=t,t=e,e=f),e.d<63?wW(t,e):(i=(t.d&-2)<<4,Q=tT(t,i),o=tT(e,i),n=Ws(t,_r(Q,i)),P=Ws(e,_r(o,i)),D=zs(Q,o),A=zs(n,P),r=zs(Ws(Q,n),Ws(P,o)),r=v2(v2(r,D),A),r=_r(r,i),D=_r(D,i<<1),v2(v2(D,r),A));}function l8(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y;for(P=e.a[A],r=e.a[n],o=o1(e,A,n),L=true,y=(ut(e,7),e.q),s=0;s<y.j.a.length&&L;s++)for(f=G(y.k,s),D=0,Q=f.length;D<Q;++D)if(i=f[D],i==o&&e.b[s]==0){L=false;break;}return dt(e,o)==1&&L&&(LL(t.b,P)&&LL(t.b,r)||nv(t.b,P)&&nv(t.b,r))?1:0;}function Q9(t,e){A9();var A,n,P,r;if(isNaN(t))return "NaN";if(!isNaN(t)&&!isFinite(t))return "Infinity";if(t==0)return "0";for(P=1,n=1;n<e;n++)P*=10;for(r=P*10,A=0;w.Math.abs(t)+.5<P;)t*=10,--A;for(;w.Math.abs(t)+.5>=r;)t/=10,++A;return Ntt(E1(t+(t<0?-0.5:.5)),A,e);}function aZ(t){var e,A,n,P,r,i;for(n=0,r=0;r<t.e.length;r++)for(e=t.e[r],A=Ct(t.j,e),i=0;i<A;i++)_(t.j,e,i)>e&&++n;for(t.f=c(F,m,6,n,15,1),t.g=c(F,m,6,t.j.r,15,1),n=0,P=0;P<t.e.length;P++)for(e=t.e[P],A=Ct(t.j,e),t.g[e]=P,i=0;i<A;i++)_(t.j,e,i)>e&&(t.f[n++]=Nt(t.j,e,i));}function tW(t,e,A){var n,P,r,i,f,D,Q,o;for(n=A.i,o=new n1(),P=new ji(),i=0;i<n;i++)LT(e.a,i)&&(f=A.F[0][i],D=A.F[1][i],xA(P,U1(f)),xA(P,U1(D)));for(r=0;r<n;r++)LT(e.a,r)||(f=A.F[0][r],D=A.F[1][r],(du(P,U1(f))||du(P,U1(D)))&&(Q=new Nm(e.a),DR(t,r,Q),o.a.push(Q)));return o;}function eW(t){for(var e,A,n,P,r,i;;){for(r=c(Pt,it,6,t.U+1,16,1),n=-1,A=0;A<t.R.g;A++)yf(t.R,A)!=0&&(r[t.f[A]]&&n<t.f[A]&&(n=t.f[A]),r[t.f[A]]=true);if(n==-1)break;for(P=0,e=0;e<t.R.g;e++)i=0,t.f[e]==n&&(i=++P),AA(t.e[e],e),a1(t.e[e],t.c,t.f[e]),a1(t.e[e],8,i);t.U=tP(t);}}function vj(t,e){var A,n,P,r,i;if(t.r==0)return null;for(n=t.K[0].a,r=t.K[0].b,P=t.K[0].a,i=t.K[0].b,A=1;A<t.r;A++)n>t.K[A].a?n=t.K[A].a:P<t.K[A].a&&(P=t.K[A].a),r>t.K[A].b?r=t.K[A].b:i<t.K[A].b&&(i=t.K[A].b);return e?(e.c=n,e.d=r,e.b=P-n,e.a=i-r):e=new lA(n,r,P-n,i-r),e;}function Fj(t,e,A){var n,P,r,i;for(i=1,P=0;P<t.g.r;P++)t.i[3*P]=mt(t.g,P),t.i[3*P+1]=Rt(t.g,P),t.i[3*P+2]=oA(t.g,P);if(i=Ztt(t,e,A),i==0)for(n=0;n<t.g.r;n++)de(t.g,n,t.i[3*n]),Ve(t.g,n,t.i[3*n+1]),Yn(t.g,n,t.i[3*n+2]);for(r=new Zt(t.c);r.a<r.c.a.length;)_t(r),null.zd();return i;}function AW(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y;for(r=false,P=0;P<2;P++)if(A=K(t.g,P,e),o=t.G[A],O(t.H,o)>2){for(s=K(t.g,1-P,e),D=Et,f=0;f<O(t.g,A);f++)n=_(t.g,A,f),n!=s&&D>n&&(D=n);for(y=t.G[s],Q=Et,i=0;i<O(t.H,o);i++)L=_(t.H,o,i),L!=y&&Q>L&&(Q=L);t.G[D]!=Q&&(r=!r);}return r;}function nW(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y;for(Q=new Zt(e);Q.a<Q.c.a.length;)if(D=_t(Q),D.vd()==1){for(f=D.f,L=t,s=0,y=L.length;s<y;++s){if(o=L[s],o==-1)return  false;for(A=false,P=f,r=0,i=P.length;r<i;++r)if(n=P[r],o==n){A=true;break;}if(!A)return  false;}return  true;}return  false;}function PW(t,e,A,n,P){var r,i,f,D,Q,o,L;if(A)return F$(e,n[1],n[2]);for(Q=j1(Pt,[c0,it],[12,6],16,[2,e.r],2),i=c(F,m,6,2,15,1),f=0;f<2;f++)i[f]=KQ(e,n[1+f],P[f],Q[f],null,null);for(L=i[0]<i[1]?0:1,o=c(F,m,6,i[L],15,1),D=0,r=0;r<e.r;r++)Q[L][r]&&(o[D++]=r);return t.a=L==1,o;}function kj(t,e){var A,n,P,r,i,f;for(P=0;P<t.b;P++)if(t.e[P][e]&&t.c[P]!=-3){for(n=0;n<=t.j.g.length;n++)if(n!=e&&t.e[P][n])for(t.e[P][e]=false,f=P<t.a?P:P<t.b?P-t.a:-1,i=WN(t,P<t.a?1:P<t.b?2:0),r=0;r<t.j.g[e].length;r++)A=t.j.g[e][r],g3(t.j,A)&&t.j.j[A]==f&&(t.j.j[A]=i<<24>>24);}}function df(t){var e,A,n,P,r;for(r=new C0(),P=t.length,n=0;n<P;n++)switch(e=_m(t,n,t.length),A=e&d1,e){case 38:r.a+="&amp;";break;case 60:r.a+="&lt;";break;case 62:r.a+="&gt;";break;case 34:r.a+="&quot;";break;case 39:r.a+="&apos;";break;default:r.a+=String.fromCharCode(A);}return r.a;}function rW(t){var e,A,n,P;for(e=0;e<t.k.g;e++)if(X(t.k,e)==7&&R1(t.k,e)==0&&G1(t.k,e)>3&&e0(t.k,e)>0){for(P=0;P<O(t.k,e);P++)if(A=_(t.k,e,P),n=Nt(t.k,e,P),dt(t.k,n)>1&&rA(t.k,A)){c1(t.k,n)==4?g0(t.k,n,2):g0(t.k,n,1),b0(t.k,e,R1(t.k,e)+1),b0(t.k,A,R1(t.k,A)-1),aA(t.k,e,-1);break;}}}function iW(t,e){var A,n,P,r,i,f;for(r=t.indexOf(e+"=(")+e.length+2,i=t.indexOf(p0(41),r),P=ue(t,r),A=L1((Mt(r,P,t.length),t.substr(r,P-r)),f1,Et),f=c(F,m,6,A,15,1),n=0;n<A;n++)r=gA(t,P),P=ue(t,r),(P==-1||P>i)&&(P=i),f[n]=L1((Mt(r,P,t.length),t.substr(r,P-r)),f1,Et);return f;}function mj(t,e){var A;if(A=0,e<t.i&&(q8(t.q,e)||t.I[e]==8)||t.I[e]==8)A|=8;else switch(dt(t,e)){case 0:A|=16;break;case 1:A|=1;break;case 2:A|=2;break;case 3:A|=4;break;case 4:A|=32;break;case 5:A|=64;}return (t.G[e]&64)!=0?A|=256:t.L||(A|=128),e<t.i&&Ee(t.q,e)?A|=KA:t.L||(A|=oP),A;}function bj(t,e,A,n,P){var r;if(T2(e,A,n,P,3))return 60;if(T2(e,A,n,P,4))return 90;switch(r=e.a[n],Rn(t.a.b,r)){case 2:if(e.D[n]==8)return 105;if(ZD(t.a.b,r))return 180;break;case 3:if(u8(t.a.b,r)==3&&NA(t.a.b,r)==0)return e.D[n]==7?107:92;break;case 4:return 109.45;}return 120;}function fW(t,e,A){var n,P,r,i,f,D,Q,o;for(n=false,D=0;D<e.j.a.length;D++)if(G(e.k,D).length==6){for(f=true,Q=G(e.j,D),o=G(e.k,D),r=0;r<6;r++)if(!cf(t,Q[r],false)||!t.e[o[r]]){f=false;break;}if(f){if(A)for(i=0;i<6;i++)cf(t,Q[i],true);for(P=0;P<6;P+=2)u2(t,o[P]);n=true;break;}}return n;}function a1(t,e,A){t.b==0&&(++t.c,t.b=63),t.b==63?(t.d[t.c]=J(t.d[t.c],A),t.b-=e):t.b>=e?(t.d[t.c]=Wt(t.d[t.c],e),t.d[t.c]=J(t.d[t.c],A),t.b-=e):(t.d[t.c]=Wt(t.d[t.c],t.b),t.d[t.c]=J(t.d[t.c],O0(A,e-t.b)),e-=t.b,++t.c,t.b=63-e,t.d[t.c]=J(t.d[t.c],V(A,(1<<e)-1)));}function jj(t,e,A,n){var P,r,i,f;if(n==1&&!gT(t,e)){if(O(t.b,e)==3)return  -1;if(O(t.b,e)==3)return P=vm(t,e,A),H0(t.b,P[0])==H0(t.b,P[1])?P[2]:H0(t.b,P[0])==H0(t.b,P[2])?P[1]:P[0];}for(i=-1,f=-1,r=0;r<O(t.b,e);r++)P=_(t.b,e,r),P!=A&&i<H0(t.b,P)&&(i=H0(t.b,P),f=P);return f;}function Rj(t){var e,A,n,P,r,i,f,D;for(t.c=0,A=new n1(),P=1;P<t.e.length;P++)for(r=0;r<P;r++)f=w.Math.abs(t.a[P]-t.a[r]),D=w.Math.abs(t.b[P]-t.b[r]),n=w.Math.sqrt(f*f+D*D),n<.8&&(e=c(F,m,6,2,15,1),e[0]=t.e[P],e[1]=t.e[r],A.a.push(e)),i=1-w.Math.min(n,1),t.c+=i*i;return A;}function DW(t){var e;return e=new LD(),Ft(e.a,new ae("The polar surface area prediction is based on an atom-type based",2)),Ft(e.a,new ae("increment system, published by P. Ertl, B. Rohde, P. Selzer",2)),Ft(e.a,new ae("in J. Med. Chem. 2000, 43, 3714-3717",2)),Ft(e.a,new ae(F4,2)),hK(t,e),e;}function uW(t){var e,A,n,P,r,i,f;for(f=t.U&248,ut(t,1),i=c(F,m,6,t.g,15,1),A=0;A<t.g;A++)i[A]=xt(t,A);for(n=0;n<i.length;n++)if(i[n]!=0)for(r=0;r<i[n];r++)J0(t,n,i9(t,1),1);for(ut(t,1),P=.8*dP(t,t.r,t.s,(J1(),Bn)),e=0;e<i.length;e++)i[e]!=0&&ka(t,e,i[e],P);(f&8)!=0&&(t.U|=248&(8|f));}function pj(t){var e,A,n,P;for(P=false,A=0;A<t.r;A++)gt(V(t.C[A],Pe),0)&&(t.D[A]=-1,P=true);for(P&&ui(t),t.w!=null&&(t.w=null,P=true),e=0;e<t.r;e++)gt(t.C[e],0)&&(t.C[e]=0,P=true);for(n=0;n<t.s;n++)t.H[n]!=0&&(t.H[n]=0,P=true),t.I[n]==8&&(t.I[n]=1,P=true);return P&&(t.U=0),P;}function QW(t,e,A,n,P){var r,i,f,D,Q,o,L,s;for(i=c(F,m,6,P,15,1),r=0;r<t.f.r;r++){for(D=0;D<Ct(t.f,r);D++){for(s=A[_(t.f,r,D)],Q=0;Q<D&&!(s<i[Q]);Q++);for(o=D;o>Q;o--)i[o]=i[o-1];i[Q]=s;}for(L=Ct(t.f,r),AA(e[r],r),a1(e[r],n,A[r]),a1(e[r],(P-L)*(n+1),0),f=0;f<L;f++)a1(e[r],n+1,i[f]);}}function Mj(t,e){var A,n;for(this.b=c(oc,A0,48,2,0,1),this.b[0]=t,this.b[1]=e,this.c=c(Ut,Tt,6,2,15,1),this.d=c(Ut,Tt,6,2,15,1),this.a=c(F,m,6,2,15,1),A=0;A<2;A++){for(n=0;n<this.b[A].e.length;n++)this.c[A]+=Uu(this.b[A],n),this.d[A]+=Lu(this.b[A],n);this.a[A]=this.b[A].e.length;}}function oW(t,e){var A,n,P,r;this.a=new Fh((n=Ey,n)),ut(t,15),r=(q1(),nn),this.b=e,P=t.Q!=null?t.Q:"",q(this.b,P+r),q(this.b,"Actelion Java MolfileCreator 2.0"+r+r),q(this.b,"  0  0  0  0  0  0              0 V3000"+r),this.c=1,A=MJ(t),A&&(this.c=HZ(t)),iM(this,t,A),q(this.b,hr+r);}function UW(t,e){var A,n,P;if(A=K(t.R,0,e),A>=t.R.g)return  false;if(t.db[A]==1||t.db[A]==2)return  true;if(t.db[A]==3)return  false;if(n=ws(t.R,A),n!=-1)return t.o[n]==1||t.o[n]==2;for(P=0;P<O(t.R,A);P++)if(EA(t.R,A,P)==2&&(t.db[_(t.R,A,P)]==1||t.db[_(t.R,A,P)]==2))return  true;return  false;}function S5(t,e,A,n,P){var r,i,f,D,Q;for(t.L=t.L|e.L,i=c(F,m,6,e.r,15,1),D=ne(t,1),Q=ne(t,2),r=0;r<A;r++)(P||n0(V(e.C[r],Pe),0))&&(i[r]=Nn(e,t,r,D,Q));for(f=0;f<n;f++)(P||!ye(e,e.F[0][f])&&!ye(e,e.F[1][f]))&&o9(e,t,f,D,Q,i[e.F[0][f]],i[e.F[1][f]],false);return t.M=t.M&&e.M,t.J=0,t.U=0,i;}function LW(t,e,A){var n,P;if(e<3||(n=e-1,(t[n]==43||t[n]==45)&&--n,!an(t[n]&d1))||(--n,t[n]!=68&&t[n]!=82&&t[n]!=88&&t[n]!=122))return  false;for(A[0]=0;n>0&&tv(t[n-1]);)--n,++A[0];for(P=e+1;tv(t[n]);){if(t.length<=P||t[n]!==t[P])return  false;++n,++P;}return  true;}function sW(t,e){var A,n,P,r,i,f,D,Q,o;return Q=t.e,Q==0?(Ce(),vr):(n=t.d,A=t.a,n==1?(P=yn(V(A[0],g1),V(e,g1)),D=Ot(P),i=Ot(j0(P,32)),i==0?new RA(Q,D):new le(Q,2,B(d(F,1),m,6,15,[D,i]))):(f=n+1,r=c(F,m,6,f,15,1),r[n]=cs(r,A,n,e),o=new le(Q,f,r),Cn(o),o));}function yW(t,e){var A,n,P,r,i,f;if(e.startsWith("M  CHG")&&(r=L1(k1((Mt(6,9,e.length),e.substr(6,3))),f1,Et),r>0))for(A=10,f=14,i=1;i<=r;++i,A+=8,f+=8)n=L1(k1((Mt(A,A+3,e.length),e.substr(A,A+3-A))),f1,Et)-1,P=L1(k1((Mt(f,f+3,e.length),e.substr(f,f+3-f))),f1,Et),b0(t.j,n,P);}function lW(t,e){var A,n,P,r,i,f;if(e.startsWith("M  ISO")&&(P=L1(k1((Mt(6,9,e.length),e.substr(6,3))),f1,Et),P>0))for(A=10,f=14,r=1;r<=P;++r,A+=8,f+=8)n=L1(k1((Mt(A,A+3,e.length),e.substr(A,A+3-A))),f1,Et)-1,i=L1(k1((Mt(f,f+3,e.length),e.substr(f,f+3-f))),f1,Et),O9(t.j,n,i);}function Cj(t,e){var A,n,P,r,i;if(n=e>>5,e&=31,n>=t.d)return t.e<0?(Ce(),Rc):(Ce(),vr);if(r=t.d-n,P=c(F,m,6,r+1,15,1),Sb(P,r,t.a,n,e),t.e<0){for(A=0;A<n&&t.a[A]==0;A++);if(A<n||e>0&&t.a[A]<<32-e!=0){for(A=0;A<r&&P[A]==-1;A++)P[A]=0;A==r&&++r,++P[A];}}return i=new le(t.e,r,P),Cn(i),i;}function hW(t,e){var A,n,P,r,i,f,D;for(P=c(Pt,it,6,t.L.r,16,1),n=0;n<t.L.s;n++)Jh(t.L,n)&&(P[K(t.L,0,n)]=true,P[K(t.L,1,n)]=true);for(i=new iD(),A=0;A<t.L.r;A++)r=ye(t.L,A)?e*.47:P[A]?e*.38:0,r!=0&&(f=W1(t.R,mt(t.L,A)),D=Z1(t.R,Rt(t.L,A)),i.c=f-r,i.d=D-r,i.b=r*2,i.a=r*2,t.v=RQ(t.v,i));}function TW(t){var e,A,n,P;for(P=new C0(),A=0;A<t.g.a.length;A++)A!=0&&(P.a+="."),q(P,Eu(new dD(G(t.g,A),2)));for(P.a+=">",n=0;n<t.a.a.length;n++)n!=0&&(P.a+="."),q(P,Eu(new tg(G(t.a,n))));for(P.a+=">",e=0;e<t.f.a.length;e++)e!=0&&(P.a+="."),q(P,Eu(new dD(G(t.f,e),2)));return P.a;}function Hj(t,e){Lb(),this.n=t,this.a=e,this.i=C6(this.a._,p4),qz(this.i),this.g=C6(this.a._,p4),BJ(this.g),this.o=2*p8+YF(WU(this.i)/4|0),this.e=2*p8+YF($U(this.i)/4|0),this.c=C6(this.a._,nE),this.j=(Re==-1&&(Re=globalThis.devicePixelRatio||1),4/Re),this.b=5,this.k=-1,this.f=-1,this.a.db=this;}function cW(t,e,A,n,P){if(!Ip(t,e,P))return  false;if(t.s==null)t.t=new XQ(e),DU(t.t,t.v),q5(t.t,t.o,-1);else {switch(t.b=new Ji(new fD()),A){case 2:t.B=new qL(t,false,t.o);break;case 3:t.B=new qL(t,true,t.o);break;case 4:t.B=new d3(t,t.o);break;case 1:t.B=new Dj(t);}md(t.B,n);}return  true;}function T2(t,e,A,n,P){var r,i,f,D,Q,o,L,s;if(s=(ut(t,7),t.q),Q=new ji(),xA(Q,U1(e)),xA(Q,U1(A)),xA(Q,U1(n)),o1(t,e,A)>=0&&o1(t,A,n)>=0){for(o=0;o<s.j.a.length;o++)if(G(s.k,o).length==P){for(L=new ji(),i=G(s.j,o),f=0,D=i.length;f<D;++f)r=i[f],xA(L,U1(r));if(oQ(L,Q))return  true;}}return  false;}function Vj(t,e,A,n){var P,r,i,f,D,Q,o,L,s;for(ut(t,1),r=0;r<t.r;r++)e[r]=-1;for(Q=0,P=0;P<t.r;P++)if(e[P]==-1){for(e[P]=Q,o=c(F,m,6,t.r,15,1),o[0]=P,D=0,L=0;D<=L;){for(f=n?t.j[o[D]].length:t.e[o[D]],s=0;s<f;s++)i=t.j[o[D]][s],e[i]==-1&&!A[t.n[o[D]][s]]&&(o[++L]=i,e[i]=Q);++D;}++Q;}return Q;}function Ej(t){var e,A,n;if(t.L)for(ut(t,7),e=0;e<t.i;e++)n=ir(t.H[e]&127),(e<t.i&&(q8(t.q,e)||t.I[e]==8))&(t.H[e]&8)!=0&&(t.H[e]&=-9,--n),n!=0&&(A=t.I[e]&127,A==1?t.H[e]|=1:A==2?t.H[e]|=2:A==4?t.H[e]|=4:A==32?t.H[e]|=32:A==64?t.H[e]|=64:A==16?t.H[e]|=16:A==8&&(t.H[e]|=8));}function I5(t,e,A,n,P,r,i,f,D){var Q,o,L,s,y;return s=n<Mo.length&&Mo[n]?w.Math.min(3,r):0,y=P<Mo.length&&Mo[P]?w.Math.min(3,i):0,f=w.Math.min(7,f),D=w.Math.min(7,D),Q=f+(s<<3)+(w.Math.min(127,n)<<5),o=D+(y<<3)+(w.Math.min(127,P)<<5),L=A?8:e?8+t:t,(L<<24)+(Q<o?(Q<<12)+o:(o<<12)+Q);}function wW(t,e){var A,n,P,r,i,f,D,Q,o,L,s;return n=t.d,r=e.d,f=n+r,D=t.e!=e.e?-1:1,f==2?(o=yn(V(t.a[0],g1),V(e.a[0],g1)),s=Ot(o),L=Ot(j0(o,32)),L==0?new RA(D,s):new le(D,2,B(d(F,1),m,6,15,[s,L]))):(A=t.a,P=e.a,i=c(F,m,6,f,15,1),cK(A,n,P,r,i),Q=new le(D,f,i),Cn(Q),Q);}function Sj(t,e){var A,n,P,r,i,f;if(dt(t,e)!=1)return  false;for(r=0;r<2;r++){for(A=t.F[r][e],f=t.F[1-r][e];t.p[A]==2&&t.k[A]==2&&t.D[A]<10;)for(i=0;i<2;i++)if(n=t.j[A][i],n!=f){if(t.k[n]==1||(P=t.n[A][i],dt(t,P)==1&&P<e))return  true;f=A,A=n;break;}if(t.k[A]==1)return  true;}return  false;}function Ij(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y;for(y=c(Pt,it,6,n.length,16,1),f=t,Q=0,L=f.length;Q<L;++Q)if(r=f[Q],e[r]==0){if(n[A[r]]||y[A[r]])return  false;y[A[r]]=true;}for(s=-1,i=t,D=0,o=i.length;D<o;++D)if(r=i[D],e[r]==0){if(s==-1)s=P[r];else if(P[r]!=s)return  false;}return  true;}function xj(t,e,A,n){var P,r;if(e){if(P=t.a.Rb(A.c,e.c),P==0)return n.d=Sd(e,A.d),n.b=true,e;r=P<0?0:1,e.a[r]=xj(t,e.a[r],A,n),WP(e.a[r])&&(WP(e.a[1-r])?(e.b=true,e.a[0].b=false,e.a[1].b=false):WP(e.a[r].a[r])?e=PQ(e,1-r):WP(e.a[r].a[1-r])&&(e=Fv(e,1-r)));}else return A;return e;}function Nj(t,e,A,n,P){var r,i,f;return r=A==-1?w.Math.abs(P[e].a-P[t.B[0]].a)/8:w.Math.abs(P[e].a-P[A].a),n<r&&(n=r),i=A==-1?w.Math.abs(P[e].b-P[t.B[0]].b)/8:w.Math.abs(P[e].b-P[A].b),n<i&&(n=i),t.jb&&(f=A==-1?w.Math.abs(P[e].c-P[t.B[0]].c)/8:w.Math.abs(P[e].c-P[A].c),n<f&&(n=f)),n;}function Gj(t,e,A,n,P){var r,i,f,D,Q,o;if(e==A)return 0;for(t._b(1),D=c(F,m,6,t.r,15,1),f=c(F,m,6,t.r,15,1),f[0]=e,D[e]=1,i=0,Q=0;i<=Q&&D[f[i]]<=n;){for(o=0;o<t.e[f[i]];o++){if(r=t.j[f[i]][o],r==A)return D[f[i]];D[r]==0&&(P==null||P.length<=r||!P[r])&&(f[++Q]=r,D[r]=D[f[i]]+1);}++i;}return  -1;}function gW(t,e,A){var n,P,r,i,f;return r=nJ(e,A),r==-1?-1:(P=(n=ue(e,r+1),n==-1?e.length:n),i=(Mt(A,r,e.length),e.substr(A,r-A)),f=(Mt(r+1,P,e.length),e.substr(r+1,P-(r+1))),(f.startsWith("(")&&f.endsWith(")")||f.startsWith('"')&&f.endsWith('"'))&&(f=hA(f,1,f.length-1)),We(t,i,f),gA(e,P));}function iA(t,e){var A;return y1(e),A=2-t.e,A==0?t:A>0?A<vi.length&&t.a+Cl[Bt(A)]<54?new L3(t.f*vi[Bt(A)]):new ID(xO((!t.c&&(t.c=jP(E1(t.f))),t.c),Bt(A)),2):t.a<54&&-A<vi.length?DX(t.f,vi[Bt(-A)],e):Ca((!t.c&&(t.c=jP(E1(t.f))),t.c),Qi(-A),e);}function x5(t,e){CU();var A,n,P,r,i;for(P=0;P<t.r;P++)for(i=$n(t),$0(i,P,Ac),ut(i,15),n=0;n<i.g;n++)(i.v[n]&wn)!=0&&xQ(i,n)==-1&&(r=(ut(i,7),i.p[n]==2&&i.k[n]==2?Kb(i,n):_s(i,n,false)),r!=-1&&(t.I[r]=257,t.U=0,t.F[1][r]==n&&(A=t.F[0][r],t.F[0][r]=n,t.U=0,t.F[1][r]=A,t.U=0),Ne(t,n,e,0)));}function dW(t,e,A,n,P,r){s8();var i,f,D,Q,o,L,s,y,l,h,T;for(s=t.o,i=c(Pt,it,6,s.r,16,1),Q=c(F,m,6,s.r,15,1),Q[0]=e,i[e]=true,l=A,h=0,T=l.length;h<T;++h)y=l[h],i[y]=true;for(vf(t,e,n,P,r),D=0,o=0;D<=o;){for(L=0;L<s.e[Q[D]];L++)f=s.j[Q[D]][L],i[f]||(i[f]=true,Q[++o]=f,vf(t,f,n,P,r));++D;}}function BW(t){var e,A,n,P;if(t.g.L)for(e=0;e<t.g.s;e++)n=fe(t.g,e),(n&127)!=0&&(A=-1,P=0,(n&16)!=0&&(A=16,++P),(n&64)!=0&&(A=64,++P),(n&32)!=0&&(A=32,++P),(n&4)!=0&&(A=4,++P),(n&2)!=0&&(A=2,++P),(n&8)!=0&&(A=8,++P),(n&1)!=0&&(A=1,++P),A!=-1&&(g0(t.g,e,A),P==1&&Xe(t.g,e,127,false)));}function vW(t,e,A){var n;switch(n=A.length<45?0:qr(k1((Mt(42,45,A.length),A.substr(42,3)))),n){case 0:break;case 1:w1(t.j,e,768,true);break;case 2:w1(t.j,e,128,true);break;case 3:w1(t.j,e,384,true);break;default:w1(t.j,e,896,true);}A.length>=48&&(zt(47,A.length),A.charCodeAt(47)==49)&&w1(t.j,e,je,true);}function Oj(t,e,A,n,P){var r,i,f,D,Q,o;if(ut(t,7),!((t.v[e]&gn)==0||A&&!(e<t.g&&f0(t.q,e))))for(D=c(F,m,6,t.g,15,1),D[0]=e,n[e]=true,f=0,Q=0;f<=Q;){for(o=0;o<t.k[D[f]];o++)i=t.n[D[f]][o],!P[i]&&(t.G[i]&64)!=0&&(!A||i<t.i&&Ee(t.q,i))&&(P[i]=true,r=t.j[D[f]][o],n[r]||(n[r]=true,D[++Q]=r));++f;}}function Bf(t,e,A,n,P,r){var i,f,D,Q,o,L;for(t.a[A]=e<<16>>16,t.c[A]=t.c[A]+t.c[n]<<16>>16,t.d[A][0]=P<<16>>16,t.d[A][1]=r<<16>>16,L=t.a.length-1,D=c(Kt,t1,6,L,15,1),Q=c(Kt,t1,6,L,15,1),o=c(Kt,ie,16,L,0,2),f=0,i=0;i<t.a.length;i++)i!=n&&(D[f]=t.a[i],Q[f]=t.c[i],o[f]=t.d[i],++f);t.a=D,t.c=Q,t.d=o;}function or(t){var e;switch(e=-1,t.w){case 18:e=9;break;case 2:t.t!=-1&&i0(t.V,t.t)||t.u!=-1&&bP(t.V,t.u)?e=t.W?4:t.Z?3:2:t.t!=-1||t.u!=-1?e=11:t.v?e=t.W?4:t.Z&&!Yt(t.v,64)?3:2:e=t.Z?t.d?8:6:t.d?7:5;break;case 4:e=1;break;case 22:e=0;break;case 21:e=12;break;default:e=11;}t.s!=e&&(t.s=e,BB(t._,e));}function vf(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y;L=n.a,s=n.b,y=n.c,r=w.Math.cos(P),Q=w.Math.sin(P),o=1-r,i=t.k[e].a-A.a,f=t.k[e].b-A.b,D=t.k[e].c-A.c,UU(t,e,A.a+(o*L*L+r)*i+(o*L*s+Q*y)*f+(o*L*y-Q*s)*D),LU(t,e,A.b+(o*L*s-Q*y)*i+(o*s*s+r)*f+(o*s*y+Q*L)*D),sU(t,e,A.c+(o*L*y+Q*s)*i+(o*y*s-Q*L)*f+(o*y*y+r)*D);}function FW(t,e){var A,n,P,r,i,f,D,Q;for(Q=new n1(),A=0;A<e.r;A++)if(n=e.a[A],!(e.e[A]<=1&&ZD(t.b,n)))for(r=0;r<e.e[A];r++)for(f=e.j[A][r],i=0;i<e.e[A];i++)D=e.j[A][i],!(f>D)&&EK(t,e,f,A,D)&&(P=new ob(t,e,f,A,D),(w.Math.abs(P.d)>go||w.Math.abs(P.e)>go)&&Q.a.push(P));return Q;}function kW(t,e,A,n,P){var r,i,f,D,Q,o,L;switch(r=e.a[A],i=e.a[P],Q=l8(t,e,A,n),L=l8(t,e,n,P),D=r<=i?Q:L,o=r<i?L:Q,f=em(t,e,A,n,P),f){case 1:return D>0||D==o?1:2;case 2:return 3;case 3:return 5;case 4:return 4;case 5:return D>0||D==o?6:7;case 6:return 8;case 7:return D>0||D==o?9:10;case 8:return 11;}return 0;}function mW(t,e){var A,n,P;if(t.c)return 3;for(P=new Zt(t.e);P.a<P.c.a.length;)n=_t(P),n.a!=so&&n.a!=Et&&(n.a=e[n.a]);switch(A=false,t.e.a.length){case 2:if(G(t.e,0).a>=so||G(t.e,1).a>=so)return 3;A=PY(t,e);break;case 3:Ft(t.e,new f3(t,Et,t.b));case 4:A=VJ(t);break;default:return 3;}return t.d^A?1:2;}function qj(t,e,A){var n,P;if(dt(t,e)!=1)return  false;if((t.v[A]&3)!=0)return  true;for(P=0;P<t.s;P++)if(P!=e&&t.I[P]==2&&(t.F[0][P]==A&&(t.v[t.F[1][P]]&3)!=0||t.F[1][P]==A&&(t.v[t.F[0][P]]&3)!=0))return  true;for(n=0;n<t.s;n++)if(n!=e&&t.I[n]==1&&(t.F[0][n]==A||t.F[1][n]==A)&&(t.G[n]&3)!=0)return  true;return  false;}function bW(t){var e,A,n,P;for(n=0;n<t.i.s;n++)for(P=0;P<2;P++)e=K(t.i,P,n),A=K(t.i,1-P,n),X(t.i,e)==1&&ge(t.i,e)>1&&X(t.i,A)>1&&t.b[A]!=0&&(ge(t.i,e)==2?(t.a==null&&(t.a=c(F,m,6,t.i.r,15,1)),++t.a[A]):(t.c==null&&(t.c=c(F,m,6,t.i.r,15,1)),++t.c[A]),B7(t.i,e));(t.a!=null||t.c!=null)&&ui(t.i);}function jW(t){var e,A,n,P,r,i,f,D,Q;if(t.b){for(e=c(F,m,6,t.F.a.length,15,1),n=0;n<e.length;n++)for(e[n]=n,r=G(t.a,n),i=0,f=r.length;i<f;++i)P=r[i],P&&(e[n]+=o0);for(e.sort(pe(Q0.prototype.ld,Q0,[])),Q=new n1(),D=new n1(),A=0;A<e.length;A++)Ft(Q,G(t.F,e[A]&d1)),Ft(D,G(t.a,e[A]&d1));t.F=Q,t.a=D;}}function RW(t){return t.t!=-1?(jQ(t.V,t.t),t.t=-1,t.eb=w.Math.max(t.eb,1),P1(t.k),N1(t,new x1(t,1,true)),true):t.u!=-1?(l5(t.V,t.u),t.u=-1,t.eb=w.Math.max(t.eb,1),P1(t.k),N1(t,new x1(t,1,true)),true):t.v&&!t.v.j?(er(t.I,t.v),t.v=null,t.eb=w.Math.max(t.eb,1),P1(t.k),true):false;}function pW(t,e){var A,n,P,r;for(P=2+2*w.Math.sqrt(t.d.r),n=0;n<t.d.r;n++)Ct(t.d,n)!=1&&(UU(e,n,P*Hn(t.f)-P/2),LU(e,n,P*Hn(t.f)-P/2),sU(e,n,P*Hn(t.f)-P/2));for(A=0;A<t.d.r;A++)Ct(t.d,A)==1&&(r=_(t.d,A,0),UU(e,A,e.k[r].a+4*Hn(t.f)-2),LU(e,A,e.k[r].b+4*Hn(t.f)-2),sU(e,A,e.k[r].c+4*Hn(t.f)-2));GU(e);}function MW(t,e,A){var n,P,r,i;if(n=A[t.a],P=A[t.b],t.i==(Dr(),Fl))return J0(e,n,P,t.g),true;if(r=o1(e,n,P),t.i==Bl)return g0(e,r,t.g),true;if(t.i==vl){if(i=dt(e,r)+t.f,i>=0&&i<=3)return g0(e,r,(J1(),i==0?16:i==1?1:i==2?386:i==3?4:i==4?32:64)),true;}else if(t.i==kl)return e.I[r]=512,true;return  false;}function N5(t,e,A,n){var P;switch(P=A/2,n&b1){case b1:if(e){t.w.a=e.c+e.b/2,t.w.b=e.d+e.a-P;break;}case 0:t.w.a=t.v.c+t.v.b/2,t.w.b=t.v.d+t.v.a+P,e&&t.w.b>e.d+e.a-P&&(t.w.b=e.d+e.a-P);break;case B8:if(e){t.w.a=e.c+e.b/2,t.w.b=e.d+P;break;}case v8:t.w.a=t.v.c+t.v.b/2,t.w.b=t.v.d-P,e&&t.w.b<e.d+P&&(t.w.b=e.d+P);}}function zj(t,e){var A,n;for(this.k=c(gr,B9,26,t.g.a.length+t.f.a.length,0,1),n=0;n<t.g.a.length+t.f.a.length;n++)this.k[n]=n<t.g.a.length?G(t.g,n):G(t.f,n-t.g.a.length);for(this.n=t.g.a.length,this.a=c(gr,B9,26,t.a.a.length,0,1),A=0;A<t.a.a.length;A++)this.a[A]=G(t.a,A);this.o=false,this.c=1,this.g=e,Vs(this);}function CW(t,e){var A,n,P,r,i,f,D,Q;for(Q=kn(t.H),f=0;f<Q.j.a.length;f++)if(Pf(Q,f,e)){for(D=c(F,m,6,2,15,1),P=0;P<2;P++)for(D[P]=Et,n=K(t.H,P,e),r=0;r<O(t.H,n);r++)A=_(t.H,n,r),A!=K(t.H,1-P,e)&&D[P]>A&&(D[P]=A);return i=0,wA(Q,f,D[0])&&++i,wA(Q,f,D[1])&&++i,i==2?2:i==1?1:2;}return 0;}function HW(t,e){var A,n,P,r,i,f;if(e.startsWith("M  RGP")&&(P=L1(k1((Mt(6,9,e.length),e.substr(6,3))),f1,Et),P>0))for(A=10,f=14,r=1;r<=P;++r,A+=8,f+=8)n=L1(k1((Mt(A,A+3,e.length),e.substr(A,A+3-A))),f1,Et)-1,i=L1(k1((Mt(f,f+3,e.length),e.substr(f,f+3-f))),f1,Et),i>=1&&i<=20&&$0(t.j,n,zA("R"+i,2));}function Kj(t,e,A,n){var P,r,i,f,D,Q,o,L,s;for(L=A[n],i=A[n+1]-L,s=c(V1t,A0,177,i,0,1),D=0;D<i;D++)s[D]=new x0(),s[D].c=t[D+L],s[D].b=e[D+L],s[D].a=D+L;for(P=new K0(),o=n;o>1;o--){for(Q=0;Q<i;Q++)s[Q].c+=t[s[Q].b]<<16,s[Q].b=e[s[Q].b];for(ai(s,0,s.length,P),r=1,f=0;f<i;f++)t[s[f].a]=r,f!=i-1&&KB(s[f],s[f+1])!=0&&++r;}}function VW(t){var e,A,n,P,r,i;if(t.R.g==0){t.N="";return;}for(r=0,n=false,P=false,A=0;A<t.R.g;A++)r<M1(t.R,A)&&(r=M1(t.R,A)),Fn(t.R,A)?n=true:P=true;if(r==0){t.N="";return;}for(i=W8(r),Q3(t,true),qt(t,i,4),qt(t,n?1:0,1),qt(t,P?1:0,1),e=0;e<t.R.g;e++)qt(t,M1(t.R,t.B[e]),i),n&&P&&qt(t,Fn(t.R,t.B[e])?1:0,1);t.N=OL(t);}function G5(t,e,A,n){var P,r,i;for(P=0;P<2;P++)if(r=t.j[A[1]][P],r!=A[0])return r==e||(i=t.n[A[1]][P],A[0]=A[1],A[1]=r,t.k[r]==1)?false:(n!=null&&(t.v[A[0]]&q0)==0&&(t.v[A[1]]&q0)==0&&(n[0]=w.Math.max(n[0],i)),t.k[r]==2&&t.p[r]==2&&t.D[r]<=7?G5(t,e,A,n):true);return  false;}function EW(t){var e;for(t.S=c(Pt,it,6,t.R.g,16,1),e=0;e<t.R.g;e++)if(X(t.R,e)==7){if(O(t.R,e)==4){t.S[e]=true;continue;}if(O(t.R,e)==3){if(Or(t.R,e)==3){t.S[e]=true;continue;}if(R1(t.R,e)==1){t.S[e]=true;continue;}if(xP(t.R,e,true))continue;if((t.Q&32)!=0){t.S[e]=true;continue;}if(Ys(t.R,e)){t.S[e]=true;continue;}}}}function Ks(t){var e,A,n,P,r,i;for(U8.call(this),i=t&&t.g?t.g.a.length:0,r=t&&t.f?t.f.a.length:0,e=t&&t.a?t.a.a.length:0,n=0;n<i;n++)Ft(this.g,new Wr(G(t.g,n)));for(P=0;P<r;P++)Ft(this.f,new Wr(G(t.f,P)));for(A=0;A<e;A++)Ft(this.a,new Wr(G(t.a,A)));this.b=new Ts(t.b),t.e!=null&&(this.e=t.e),this.c=t.c||bQ(t);}function SW(t,e,A,n,P){var r,i,f,D,Q,o,L,s;for(s=0,L=-1,i=0;i<t.j.g;i++){o=G(e.g,s),ut(o,1);do++L==o.g&&(L=0,o=C9(e,++s));while(o.L&&gt(V(o.C[L],Pe),0));tA(o,L,A[i],A[i]<=P);}for(Q=0,D=-1,r=0;r<t.d.g;r++){f=G(e.f,Q),ut(f,1);do++D==f.g&&(D=0,f=ph(e,++Q));while(f.L&&gt(V(f.C[D],Pe),0));tA(f,D,n[r],n[r]<=P);}}function Jj(t){var e,A,n,P,r;if(t.l==0&&t.m==0&&t.h==0)return "0";if(t.h==B8&&t.m==0&&t.l==0)return "-9223372036854775808";if(t.h>>19!=0)return "-"+Jj(Ai(t));for(A=t,n="";!(A.l==0&&A.m==0&&A.h==0);){if(P=mL(Jf),A=o6(A,P,true),e=""+og(zn),!(A.l==0&&A.m==0&&A.h==0))for(r=9-e.length;r>0;r--)e="0"+e;n=e+n;}return n;}function IW(t,e){var A,n,P,r;if(!dl)return 0;if($f[e].cc(Me(new bA(t)))!=-1)return 3;for(r=new VD(1),A=new _A(),P=0;P<dr[e].a.length;P++)if(l2(new WA(false),A,G(dr[e],P)),GA(r,t),MA(r,A),CA(r,1,r.c)>0)return 3;for(n=0;n<Br[e].a.length;n++)if(l2(new WA(false),A,G(Br[e],n)),GA(r,t),MA(r,A),CA(r,1,r.c)>0)return 2;return 1;}function c2(t,e){var A,n,P,r;return r=w.Math.sin(e),A=w.Math.cos(e),n=1-A,P=j1(Ut,[c0,Tt],[15,6],15,[3,3],2),P[0][0]=t.a*t.a*n+A,P[1][1]=t.b*t.b*n+A,P[2][2]=t.c*t.c*n+A,P[0][1]=t.a*t.b*n-t.c*r,P[1][2]=t.b*t.c*n-t.a*r,P[2][0]=t.c*t.a*n-t.b*r,P[0][2]=t.a*t.c*n+t.b*r,P[1][0]=t.b*t.a*n+t.c*r,P[2][1]=t.c*t.b*n+t.a*r,P;}function Yj(t,e,A){var n;if(O(t.b,e)==2)return 1;if(n=vm(t,e,A),O(t.b,e)==3)return H0(t.b,n[0])==H0(t.b,n[1])?gT(t,e)?2:1:gT(t,e)?1:0;if(O(t.b,e)==4){if(H0(t.b,n[0])==H0(t.b,n[1])&&H0(t.b,n[0])==H0(t.b,n[2]))return 3;if(H0(t.b,n[0])==H0(t.b,n[1])||H0(t.b,n[0])==H0(t.b,n[2])||H0(t.b,n[1])==H0(t.b,n[2]))return 1;}return 0;}function xW(t,e){var A,n,P,r,i;return n=V(e,g1),z(t,0)>=0?(r=Sn(t,n),i=n9(t,n)):(A=j0(t,1),P=e>>>1,r=Sn(A,P),i=n9(A,P),i=at(Wt(i,1),V(t,1)),(e&1)!=0&&(z(r,i)<=0?i=Y1(i,r):qg(Y1(r,i),n)?(i=at(i,Y1(n,r)),r=Y1(r,1)):(i=at(i,Y1(Wt(n,1),r)),r=Y1(r,2)))),J(Wt(i,32),V(r,g1));}function Xj(t,e){var A,n,P;for(A=j1(Ut,[c0,Tt],[15,6],15,[2,3],2),n=0;n<2;n++)A[n][0]=Mr(e,t.f[n])-Mr(e,t.f[4]),A[n][1]=Cr(e,t.f[n])-Cr(e,t.f[4]),A[n][2]=Hr(e,t.f[n])-Hr(e,t.f[4]);return P=c(Ut,Tt,6,3,15,1),P[0]=A[0][1]*A[1][2]-A[0][2]*A[1][1],P[1]=A[0][2]*A[1][0]-A[0][0]*A[1][2],P[2]=A[0][0]*A[1][1]-A[0][1]*A[1][0],P;}function NW(t){var e,A,n,P;for(t.L=true,t.$=c(E,I,6,t.R.g,15,1),t.i=c(E,I,6,t.R.i,15,1),P=U2(t,true);t.U<t.R.g&&P;){for(e=0;e<t.R.g;e++)AA(t.e[e],e),a1(t.e[e],t.c+4,J(Wt(t.f[e],4),t.db[e]<<2));for(A=0;A<t.R.i;A++)se(t.e[K(t.R,0,A)],t.o[A]),se(t.e[K(t.R,1,A)],t.o[A]);if(n=tP(t),t.U==n)break;t.U=n,P=U2(t,true);}}function O5(t,e){var A,n,P,r,i,f;for(ut(t,e?15:1),t.r=t.g,t.s=t.i,f=c(Pt,it,6,t.g,16,1),P=0;P<t.g;P++)t.e[P]!=t.k[P]&&(A=sf(t,P,false),f[P]=t.e[P]==t.k[P]+1&&q9(t,t.n[P][t.k[P]]),t.e[P]=t.k[P],A!=-1&&(i=sf(t,P,true),A!=i&&(r=((t.v[P]&b8)>>>27)-1,(r==-1||r<A)&&aA(t,P,A))));if(e)for(n=0;n<t.g;n++)f[n]&&oy(t,n);t.U=0;}function GW(t,e){var A,n;return !_v(X(t.k,e))||X(t.k,e)==6&&(!W0(t.k,e)||R1(t.k,e)>0)||(A=eP(t.k,e)==null||u3(t.k,e)[0]==9?0:u3(t.k,e)[0],n=_i(t.k,e)-A,n<1)?false:X(t.k,e)==16||X(t.k,e)==34||X(t.k,e)==52?O(t.k,e)==2&&R1(t.k,e)<=0?false:n!=2:true;}function dt(t,e){if(t.L&&(t.H[e]&127)!=0){if((t.H[e]&9)!=0)return 1;if((t.H[e]&2)!=0)return 2;if((t.H[e]&4)!=0)return 3;if((t.H[e]&32)!=0)return 4;if((t.H[e]&64)!=0)return 5;if((t.H[e]&16)!=0)return 0;}switch(t.I[e]&127){case 1:case 8:return 1;case 2:return 2;case 4:return 3;case 32:return 4;case 64:return 5;default:return 0;}}function Ur(t,e,A,n){var P,r,i,f,D,Q,o,L,s;for(ut(t,1),r=0;r<t.r;r++)e[r]=-1;for(Q=0,P=0;P<t.r;P++)if(e[P]==-1&&(!A||(t.v[P]&q0)!=0)){for(e[P]=Q,o=c(F,m,6,t.r,15,1),o[0]=P,D=0,L=0;D<=L;){for(f=n?t.j[o[D]].length:t.e[o[D]],s=0;s<f;s++)i=t.j[o[D]][s],e[i]==-1&&(!A||(t.v[i]&q0)!=0)&&(o[++L]=i,e[i]=Q);++D;}++Q;}return Q;}function Zj(t,e,A){var n,P,r;return r=w.Math.sqrt((t.i[0].a-e)*(t.i[0].a-e)+(t.i[0].b-A)*(t.i[0].b-A)),r<8?1:(P=w.Math.sqrt((t.i[1].a-e)*(t.i[1].a-e)+(t.i[1].b-A)*(t.i[1].b-A)),P<8?2:(n=w.Math.sqrt((t.i[1].a-t.i[0].a)*(t.i[1].a-t.i[0].a)+(t.i[1].b-t.i[0].b)*(t.i[1].b-t.i[0].b)),r+P<n+5?3:0));}function q5(t,e,A){var n,P,r;for(t.f=z(e,0)==0?new n2():new $i(e),t.a=new n1(),new n1(),t.c=c(Ut,Tt,6,2,15,1),t.c[0]=Ge,t.c[1]=Ge,t.e=false,P=0,r=0,n=0;n<t.d.i;n++)!eA(t.d,n)&&dt(t.d,n)==1&&Ct(t.d,K(t.d,0,n))>1&&Ct(t.d,K(t.d,1,n))>1&&(LA(t.d,n)?z9(t.d,n)>4&&++r:++P);t.b=A==-1?1<<1+P+(r/2|0):A,FR(t,w.Math.min(8,t.b));}function Wj(t){var e,A,n,P,r;for(P=W1(t.R,mt(t.L,0)),A=W1(t.R,mt(t.L,0)),r=Z1(t.R,Rt(t.L,0)),n=Z1(t.R,Rt(t.L,0)),e=0;e<t.L.r;e++)P>W1(t.R,mt(t.L,e))&&(P=W1(t.R,mt(t.L,e))),A<W1(t.R,mt(t.L,e))&&(A=W1(t.R,mt(t.L,e))),r>Z1(t.R,Rt(t.L,e))&&(r=Z1(t.R,Rt(t.L,e))),n<Z1(t.R,Rt(t.L,e))&&(n=Z1(t.R,Rt(t.L,e)));return new lA(P,r,A-P,n-r);}function _j(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y,l,h;return r=e.a[A],i=e.a[P],D=l8(t.a,e,A,n),Q=l8(t.a,e,n,P),o=(L=e.a[A],s=e.a[n],y=e.a[P],l=kW(t.a,e,A,n,P),L>y&&(L=(h=U1(y),U1(y=L),h).a),f9(B(d(F,1),m,6,15,[2,1,3,0]),B(d(F,1),m,6,15,[s,L,y,l]),t)),f=r>i||r==i&&D<Q?1:0,o>=0?V0(t.b[o][4+f]):TZ(t.a.i,e,A,n,P);}function $j(){var t,e,A,n,P,r;for(r=new un(new mi((A=A2("/resources/druglikenessNoIndex.txt"),w0(),A))),this.a=new n1();P=X1(r),P!=null;){if(n=P.indexOf(p0(9)),n==-1)throw At(new H1("line without TAB"));t=(Mt(0,n,P.length),P.substr(0,n)),e=hD(Te((zt(n+1,P.length+1),P.substr(n+1)))),Ft(this.a,new hg(t,e));}}function aj(t,e){var A,n,P,r,i;if(t.d.r<2)return  true;for(i=new Zt(t.j);i.a<i.c.a.length;)r=_t(i),r.g=true;for(P=0;P<t.k.length;P++)t.k[P]=false;for(pW(t,e),A=new Xd(e),ty(t,e,A,0),n=0;NK(e)&&n<3&&!(gt(t.n,0)&&(q1(),I1(E1(Date.now()),t.n)))&&Da(t,e)!=0;n++)ty(t,e,A,2);return ty(t,e,A,3),ty(t,e,A,4),Uz(e);}function OW(t,e,A,n){var P,r,i,f,D,Q;return r=n==e.length-1?0:n+1,f=n==0?e.length-1:n-1,i=r==e.length-1?0:r+1,dt(t.f,A[n])==2&&(P=ze(t.f,A[n]),P==1||P==2)?(Tk(t,e[f],e[n],e[r])^Tk(t,e[i],e[r],e[n])&&(P=P==1?2:1),P):A8(t.f,A[n])?(D=As(kn(t.f),A[f],A[n]),Q=As(kn(t.f),A[r],A[n]),D!=-1||Q!=-1?D==Q?2:1:2):0;}function qW(t,e,A,n,P,r){var i,f,D,Q,o,L;for(i=e.a[A],o=B(d(F,1),m,6,15,[e.a[n],e.a[P],e.a[r]]),f=0;f<4;f++){for(L=c(F,m,6,3,15,1),Q=0;Q<3;Q++)L[Q]=t.a.g.a[o[Q]-1][f+1];if(L.sort(pe(Q0.prototype.ld,Q0,[])),D=f9(B(d(F,1),m,6,15,[1,0,2,3]),B(d(F,1),m,6,15,[i,L[0],L[1],L[2]]),t),D>=0)return V0(t.b[D][4]);}return 0;}function zW(t){yy();var e,A,n,P,r,i,f,D,Q,o;if(t==null||t.length==0)return null;for(i=null,t=rf(t.toLowerCase(),"-"),D=W4,Q=0,o=D.length;Q<o;++Q)for(f=D[Q],r=c8(f[0],";"),A=r,n=0,P=A.length;n<P;++n){if(e=A[n],e1(rf(e.toLowerCase(),"-"),t))return e;if(rf(e.toLowerCase(),"-").startsWith(t))if(i==null)i=e;else return "";}return i;}function z5(t,e){var A,n,P,r,i,f,D,Q;if(i=false,e0(t.g,e)==0)for(r=1;r<O(t.g,e);r++)for(f=0;f<r;f++)n=_(t.g,e,r),P=_(t.g,e,f),t.G[n]>t.G[P]^n>P&&(i=!i);else for(r=0;r<O(t.g,e);r++){for(A=_(t.g,e,r),Q=0,D=c(F,m,6,3,15,1),f=0;f<O(t.g,A);f++)D[Q]=_(t.g,A,f),D[Q]!=e&&++Q;Q==2&&t.G[D[0]]>t.G[D[1]]^D[0]>D[1]&&(i=!i);}return i;}function KW(t){var e,A,n,P,r;for(r=w.Math.max(t.D.g,t.u.g),t.a=W8(r),t.s=2,A=0;A<t.D.g;A++)t.s=w.Math.max(t.s,O(t.D,A)+qi(t.D,A));for(n=0;n<t.u.g;n++)t.s=w.Math.max(t.s,O(t.u,n)+qi(t.u,n));for(P=w.Math.max(2,(62+t.a+t.s*(t.a+5))/63|0),t.b=c(K4,H2,101,r,0,1),e=0;e<r;e++)t.b[e]=new xU(P);t.F=new qA(t.D,1),t.v=new qA(t.u,1);}function K5(t,e){var A,n,P,r,i;for(i=false,n=0;n<t.V.r;n++)if(i0(t.V,n)){i=true;break;}if(r=Sm(t,i),r){for(K1(t),A=0;A<t.V.r;A++)(!i||i0(t.V,A))&&(e?de(t.V,A,2*r.a-mt(t.V,A)):Ve(t.V,A,2*r.b-Rt(t.V,A)));for(P=0;P<t.V.s;P++)(!i||bP(t.V,P))&&(c1(t.V,P)==257?g0(t.V,P,129):c1(t.V,P)==129&&g0(t.V,P,257));t.eb=w.Math.max(t.eb,1),P1(t.k);}}function tR(t){var e,A,n,P,r;for(n=Hp(t);n;){for(r=false,A=0;A<O(t.D,n.b);A++)t.I[_(t.D,n.b,A)]==0&&(r=true);for(P=false,e=0;e<O(t.u,n.a);e++)t.B[_(t.u,n.a,e)]==0&&(P=true);if(r&&P)break;t.I[n.b]=_y,t.B[n.a]=_y,n=Hp(t);}if(!n){for(A=0;A<t.I.length;A++)t.I[A]==_y&&(t.I[A]=0);for(e=0;e<t.B.length;e++)t.B[e]==_y&&(t.B[e]=0);}return n;}function JW(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l;for(o=e.p,D=e.n,Q=Z0(t,o[2]),L=ri(_8(Q,Z0(t,o[1]))),f=c2(L,D==o[1]?A:-A),P=e.o,r=0,i=P.length;r<i;++r)n=P[r],n!=D&&(s=t.k[n].a-Q.a,y=t.k[n].b-Q.b,l=t.k[n].c-Q.c,UU(t,n,s*f[0][0]+y*f[0][1]+l*f[0][2]+Q.a),LU(t,n,s*f[1][0]+y*f[1][1]+l*f[1][2]+Q.b),sU(t,n,s*f[2][0]+y*f[2][1]+l*f[2][2]+Q.c));}function YW(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T;for(ut(e,1),l=t.k,h=0,T=l.length;h<T;++h)y=l[h],Q=A[y.a],o=A[y.b],L=o1(e,Q,o),L==-1?J0(e,Q,o,y.e):y.e==-1?e.I[L]=512:y.e!=-2&&g0(e,L,y.e);if(f=ui(e),t.a.length!=0)for(ut(e,7),P=t.a,r=0,i=P.length;r<i;++r)n=P[r],D=f==null?A[n]:f[A[n]],s=e.v[D]&3,me(e,D,s==1?2:1,false),oy(e,D);return f;}function XW(t,e,A){var n,P,r,i,f;if(t.V.L){if(ye(t.V,e)||ye(t.V,A)||(n=IA(t.V,e),P=IA(t.V,A),n==null^P==null))return  false;if(n!=null){if(n.length!=P.length)return  false;for(r=0;r<n.length;r++)if(n[r]!=P[r])return  false;}if(i=gt(V(h0(t.V,e),1),0),f=gt(V(h0(t.V,A),1),0),i!=f)return  false;}return X(t.V,e)==X(t.V,A);}function eR(){eR=v1,jS=B(d(Kt,1),t1,6,15,[0,60,120,180,240,300]),mS=B(d(Kt,1),t1,6,15,[17,17,17,17,17,17]),bS=B(d(Kt,2),ie,16,0,[B(d(Kt,1),t1,6,15,[-20,20]),B(d(Kt,1),t1,6,15,[40,80]),B(d(Kt,1),t1,6,15,[100,140]),B(d(Kt,1),t1,6,15,[160,200]),B(d(Kt,1),t1,6,15,[220,260]),B(d(Kt,1),t1,6,15,[280,320])]);}function J5(t,e){var A,n,P,r;return A=t.F[0][e],n=t.F[1][e],P=rA(t,A),r=rA(t,n),!P&&!r?e<t.i&&Ee(t.q,e)?UC:L4+dt(t,e)/10:P&&r||P&&Ae(t,n)||r&&Ae(t,A)?co:P&&Xk(t,n,A)||r&&Xk(t,A,n)?Ny:P&&vk(t,n,A)||r&&vk(t,A,n)?g4:P&&n<t.g&&f0(t.q,n)||r&&A<t.g&&f0(t.q,A)?1.9500000476837158:L4;}function ZW(t){var e,A;for(t=V(t,l9),A=0;A<(T6(),di).length;A++)if(n0(t,di[A]))return VE[A];return e=new bn("R"),gt(V(t,w8),0)&&(e.a+="0"),gt(V(t,h9),0)&&(e.a+="3"),gt(V(t,T9),0)&&(e.a+="4"),gt(V(t,c9),0)&&(e.a+="5"),gt(V(t,w9),0)&&(e.a+="6"),gt(V(t,g9),0)&&(e.a+="7"),gt(V(t,Vf),0)&&(e.a+="8"),e.a;}function WW(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y;for(L=Qp(t.D),f=Qp(t.u),i=c(gS,c0,44,8,0,1),y=Qj(t.D,L),Q=Qj(t.u,f),o=0;o<=7;o++)for(i[o]=new Ji(new _l()),r=(n=new J8(new K8(new br(y[o]).a).b),new jr(n));Nr(r.a.a);)P=(A=H9(r.a),A.hd()),s=Be(y[o],P),D=Be(Q[o],P),D!=null&&(e=c(F,u0,7,2,0,2),e[0]=s,e[1]=D,We(i[o],P,e));return i;}function _W(t,e){var A,n,P,r,i,f,D,Q,o,L,s;for(A=e.a,s=e.i,i=1;i<A.length;i++)if(A[i]!=null){for(f=0;f<i;f++)if(A[i][f]!=0){for(o=t.f[i][f],L=new Nk(s,o,A[i][f],t.C),D=false,Q=null,n=Pr(t.i,e.d).c,r=new Zt(n);r.a<r.c.a.length;){if(P=_t(r),lJ(P,L)){D=true;break;}hJ(P,L)&&(!Q&&(Q=new n1()),Q.a.push(P));}D||(Q&&Ds(n,Q),n.a.push(L));}}}function Y5(t,e){var A,n,P,r;if(t.p[e]==2&&t.k[e]==2&&t.o[e][0]==2){for(P=0;P<2;P++)if(A=tm(t,e,t.j[e][P]),A!=-1)for(r=0;r<t.k[A];r++)n=t.n[A][r],(t.I[n]==257||t.I[n]==129)&&t.F[0][n]==A&&(t.I[t.n[A][r]]=1);return;}if(t.p[e]==0||t.D[e]>=15)for(P=0;P<t.e[e];P++)n=t.n[e][P],(t.I[n]==257||t.I[n]==129)&&t.F[0][n]==e&&t.F[0][n]==e&&(t.I[n]=1);}function AR(t,e,A){var n,P,r,i,f;if(t.b){for(t.C=c(Pt,it,6,e.length,16,1),P=new Zt(t.b);P.a<P.c.a.length;)if(n=_t(P),t.f==null||A==-1&&t.f[n.a]==-1&&t.f[n.b]==-1||A!=-1&&(t.f[n.a]==A||t.f[n.b]==A)){if(f=c(F,m,6,n.c+2,15,1),r=B2(t.H,f,t.G[n.a],t.G[n.b],n.c+1,e,null)-1,r<n.d||r>n.c)return  false;for(i=1;i<=r;i++)t.C[f[i]]=true;}}return  true;}function $W(t){var e,A,n,P,r,i;if(t.L.L){for(i=t.W,$1(t,-7),e=0;e<t.L.g;e++)ye(t.L,e)&&t.ub(W1(t.R,mt(t.L,e))-i,Z1(t.R,Rt(t.L,e))-i,2*i);for(t.Ab(2*t.W),r=new h1(),P=0;P<t.L.s;P++)A=K(t.L,0,P),n=K(t.L,1,P),gt(V(V(h0(t.L,A),h0(t.L,n)),Pe),0)&&(r.a=W1(t.R,mt(t.L,A)),r.c=Z1(t.R,Rt(t.L,A)),r.b=W1(t.R,mt(t.L,n)),r.d=Z1(t.R,Rt(t.L,n)),t.qb(r));}}function aW(t,e){var A,n,P,r,i,f,D,Q,o;for(o=new n1(),A=0;A<e.r;A++)for(i=0;i<e.e[A];i++)for(n=e.j[A][i],f=0;f<e.e[n];f++)if(P=e.j[n][f],A!=P)for(D=0;D<e.e[P];D++)r=e.j[P][D],!(n==r||A==r)&&r>A&&(Q=new Zk(t,e,A,n,P,r),(w.Math.abs(Q.e)>.001||w.Math.abs(Q.f)>.001||w.Math.abs(Q.g)>.001)&&o.a.push(Q));return o;}function nR(t){var e,A,n,P,r,i,f,D,Q;for(Q=0,ut(t,7),n=0;n<t.i;n++)if(dt(t,n)==1&&(t.G[n]&64)==0){for(f=true,i=0;i<2;i++){if(e=t.F[i][n],t.k[e]==1){f=false;break;}if(t.D[e]==7&&!(e<t.g&&f0(t.q,e))){for(A=t.F[1-i][n],D=0;D<t.k[A];D++)if(P=t.j[A][D],r=t.n[A][D],r!=n&&dt(t,r)>1&&!(P<t.g&&f0(t.q,P))&&rA(t,P)){f=false;break;}}}f&&!Sj(t,n)&&++Q;}return Q;}function BA(t,e,A,n,P,r){var i,f,D,Q;if(A=w.Math.max(0,A),n=w.Math.min(r.mc(),n),i=(n-A)/2|0,D=A,f=n,r.lc(D,t)>e||r.lc(f-1,t)<e)return  -1;for(;n>=A;){if(i=A+((n-A)/2|0),Q=r.lc(i,t),Q==e){if(P&&i>D&&r.lc(i-1,t)==e)n=i;else if(!P&&i<f-1&&r.lc(i+1,t)==e)A=i;else return i;}else Q>e?n=i:Q<e&&(A=i);if(n-A==1&&r.lc(A,t)<e&&r.lc(n,t)>e)break;}return  -1;}function PR(t,e,A){var n,P,r,i;if(O(t.c,e)==2)return 1;if(n=_K(t,e,A),O(t.c,e)==3)return H0(t.c,n[0])==H0(t.c,n[1])?e0(t.c,e)==1&&X(t.c,e)<10||mn(t.c,e)||xP(t.c,e,true)?2:1:e0(t.c,e)==1&&X(t.c,e)<10||mn(t.c,e)||xP(t.c,e,true)?1:0;if(O(t.c,e)==4){for(P=0;P<n.length;P++)for(i=H0(t.c,n[P]),r=P+1;r<n.length;r++)if(i==H0(t.c,n[r]))return 1;}return 0;}function X5(t,e,A,n){var P,r,i,f,D;for(r=new VP(t.f,e.e.length+A.e.length-n,e.i|A.i),P=0,f=0;f<e.e.length;f++)r.e[P]=e.e[f],r.k[P]=e.k[f],r.a[P]=e.a[f],r.b[P++]=e.b[f];for(i=0;i<A.e.length;i++)D=L8(e,A.e[i]),D==-1?(r.e[P]=A.e[i],r.k[P]=A.k[i],r.a[P]=A.a[i],r.b[P++]=A.b[i]):r.k[D]<A.k[i]&&(r.k[D]=A.k[i],r.a[D]=A.a[i],r.b[D]=A.b[i]);return r;}function Z5(t,e,A,n){var P,r,i,f;if(f=new h1(),!(e.a==e.b&&e.c==e.d)){for(f.a=e.a,f.c=e.c,f.b=e.b,f.d=e.d,i=Wm(f),P=0;P<t.$.a.length;P++)if(r=G(t.$,P),!(r.c>i.c+i.b||r.d>i.d+i.a||i.c>r.c+r.b||i.d>r.d+r.a)){if(t2(t,f.a,f.c,P)){if(t2(t,f.b,f.d,P))return;Xs(t,f,0,P),Z5(t,f,A,n);return;}if(t2(t,f.b,f.d,P)){Xs(t,f,1,P),Z5(t,f,A,n);return;}}E_(t,f,A,n);}}function t_(t){var e,A,n,P,r,i,f,D,Q;for(D=c(F,m,6,t.j.r,15,1),n=0;n<t.j.s;n++)if(c1(t.j,n)==8)for(i=0;i<2;i++)D[K(t.j,i,n)]=1;for(P=0;P<t.j.s;P++)for(Q=dt(t.j,P),r=0;r<2;r++)D[K(t.j,r,P)]+=Q;for(A=0;A<t.j.s;A++)if(dt(t.j,A)==1){for(r=0;r<2;r++)if(f=K(t.j,1-r,A),Ae(t.j,f)&&(e=K(t.j,r,A),rA(t.j,e)&&D[e]>j3(t.j,e))){g0(t.j,A,16);continue;}}}function ut(t,e){var A,n,P,r;if(Fp(t,e),(e&~t.U)!=0){for((t.U&15)!=0&&t.r>1&&hs(t.K[0],t.K[1])&&U9(new a8(0),t),t.c&&(e|=128),A=0;A<t.r;A++)t.v[A]&=-67223560;for(n=0;n<t.i;n++)t.G[n]&=-64;P=0,r=0,(e&32)!=0?(P=32,r=1):(e&64)!=0&&(P=64,r=3),(e&128)!=0&&(P|=128,r|=32),t.d=new qA(t,r),l6(t.d),qG(t.d),bK(t.d),H$(t)&&(t.d=new qA(t,r)),t.U|=24|P;}}function e_(t,e,A){var n,P,r,i,f,D,Q;for(gh(t.p),t.o[0]=e,t.p[e]=true,r=0,i=0;r<=i;){for(f=0;f<t.j[t.o[r]].length;f++){if(P=t.j[t.o[r]][f],P==A){for(n=1,D=r;D!=0;)++n,D=t.q[D];for(Q=c(F,m,6,n,15,1),Q[0]=t.k[t.o[r]][f],n=1;r!=0;)Q[n++]=t.n[r],r=t.q[r];return Q;}t.p[P]||(t.p[P]=true,++i,t.o[i]=P,t.n[i]=t.k[t.o[r]][f],t.q[i]=r);}++r;}return null;}function A_(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h;for(L=e.b-e.a,l=e.d-e.c,D=w.Math.sqrt(L*L+l*l),Q=2*Ot(E1(w.Math.round(D/(4*t.Y)))),s=L/(Q-1),h=l/(Q-1),V9(t.L,o1(t.L,A,n))?(P=-3,r=-3):(P=t.p[A],r=t.p[n]),o=e.a-t.Y/2,y=e.c-t.Y/2,$1(t,P),f=0;f<(Q/2|0);f++)t.ub(o,y,t.Y),o+=s,y+=h;for($1(t,r),i=0;i<(Q/2|0);i++)t.ub(o,y,t.Y),o+=s,y+=h;$1(t,t.Q);}function n_(t){for((t.Q&1)!=0&&(t.Q&2)==0&&(t.g=Mn(t.f,t.R.g)),(t.Q&O1)==0&&(t.W=c(Pt,it,6,t.R.g,16,1),t.V=c(Pt,it,6,t.R.i,16,1),t.U<t.R.g&&(VZ(t),(t.Q&O1)==0&&(g2(t),t.P&&h2(t.P,t.f)))),t.g==null&&(t.Q&1)!=0&&(t.Q&2)!=0&&(t.g=Mn(t.f,t.R.g));t.U<t.R.g;)fZ(t),(t.Q&O1)==0&&(g2(t),t.P&&h2(t.P,t.f));(t.Q&O1)==0&&(g2(t),A1t(t),va(t));}function P_(t,e,A,n,P){var r,i,f,D,Q,o,L,s;if(o1(t,e,A)==-1||o1(t,A,n)==-1||o1(t,n,P)==-1)return 0;if(o1(t,P,e)>=0)return 4;for(L=(ut(t,7),t.q),s=new ji(),xA(s,U1(e)),xA(s,U1(A)),xA(s,U1(n)),xA(s,U1(P)),Q=0;Q<L.j.a.length;Q++)if(G(L.k,Q).length==5){for(o=new ji(),i=G(L.j,Q),f=0,D=i.length;f<D;++f)r=i[f],xA(o,U1(r));if(oQ(o,s))return 5;}return 0;}function r_(t,e,A){var n,P,r,i,f,D,Q,o,L;for(o=c(Pt,it,6,A.r,16,1),o[t[0]]=true,i=0,f=0;i<=f&&A.p[t[i]]<2;){for(Q=0;Q<A.k[t[i]];Q++)n=A.j[t[i]][Q],P=A.n[t[i]][Q],e[P]&&(o[n]||(t[++f]=n,o[n]=true),e[P]=false);++i;}for(D=f;D>=0;D--)if(A.D[t[D]]<=8)for(L=0;L<A.e[t[D]];L++)r=A.j[t[D]][L],!o[r]&&A.o[t[D]][L]!=0&&(t[++f]=r,o[r]=true);return f+1;}function i_(t,e){var A,n,P,r,i,f,D,Q;for(r=t,n=e.j[r][0];e.e[r]!=1&&e.p[r]==2&&(Q=n,n=r,r=e.j[r][0]==Q?e.j[r][1]:e.j[r][0],r!=t););for(D=r,i=n,P=2;e.e[i]!=1&&e.p[i]==2&&(Q=D,D=i,i=e.j[i][0]==Q?e.j[i][1]:e.j[i][0],++P,i!=r););for(A=c(F,m,6,P,15,1),A[0]=r,A[1]=n,f=2;f<P;f++)A[f]=e.j[A[f-1]][0]==A[f-2]?e.j[A[f-1]][1]:e.j[A[f-1]][0];return A;}function f_(t){var e,A;if(t.indexOf("[")>=0){if(e=t.indexOf(" NOT["),A=t.indexOf("]",e),e>=0&&A>0)return -(A+1);if(e=t.indexOf(" ["),A=t.indexOf("]",e),e>=0&&A>0)return A+1;if(e=t.indexOf(" 'NOT["),A=t.indexOf("]'",e),e>=0&&A>0)return -(A+2);if(e=t.indexOf(" '["),A=t.indexOf("]'",e),e>=0&&A>0)return A+2;q1();}return 0;}function D_(t,e){var A,n,P,r,i,f,D,Q;if(i=YA[0]*t[0]+YA[1]*t[1]+YA[2]*t[2],i==0){t[0]=0,t[1]=0,t[2]=0;return;}for(A=e/i,Q=0,D=0,P=0;P<3;P++)t[P]*=A,t[P]<1?D+=YA[P]:(Q+=(t[P]-1)*YA[P],t[P]=1);if(Q!=0){for(f=0,r=0;r<3;r++)t[r]<1&&(t[r]+=Q/D,t[r]>1&&(f+=(t[r]-1)*YA[r],t[r]=1));if(f!=0)for(n=0;n<3;n++)t[n]<1&&(t[n]+=f/YA[n],t[n]>1&&(t[n]=1));}}function Js(t,e,A,n){var P,r,i,f,D,Q,o,L;for(P=0;P<t.g;P++)if(t.D[P]==A&&t.t[P]==0&&xt(t,P)>0)for(f=false,Q=0;Q<t.k[P];Q++){if(t.o[P][Q]==1&&(r=t.j[P][Q],t.D[r]==n)){for(L=false,D=false,o=0;o<t.k[r];o++){if(i=t.j[r][o],t.t[i]<0){D=true;break;}i!=P&&t.D[i]==8&&t.o[r][o]==2&&(L=true);}if(!D&&L){if(t.t[P]=-1,t.U=0,--e,e==0)return 0;f=true;}}if(f)break;}return e;}function u_(t,e,A,n,P){var r,i,f,D;if((e.v[A]&3)!=0&&(e.v[A]&4)==0&&n0(V(e.C[A],k8),0)&&(f=w.Math.abs(e.A[A]),f!=0)){for(i=0;i<t.c.g.a.length;i++)for(r=C9(t.c,i),D=0;D<r.g;D++)if(w.Math.abs(r.A[D])==f)return !!(e.k[A]==n.k[P]||gt(V(r.C[D],je),0)||(r.v[D]&b1)>>18!=(e.v[A]&b1)>>18);}return  false;}function Q_(t,e){var A,n,P,r,i,f,D;if(e.startsWith("M  ALS")&&(n=L1(k1((Mt(7,10,e.length),e.substr(7,3))),f1,Et)-1,n>=0)){for(i=L1(k1((Mt(10,13,e.length),e.substr(10,3))),f1,Et),P=(zt(14,e.length),e.charCodeAt(14)==84),D=c(F,m,6,i,15,1),A=16,r=0;r<i;++r,A+=4)f=k1((Mt(A,A+4,e.length),e.substr(A,A+4-A))),D[r]=zA(f,1);$0(t.j,n,6),gf(t.j,n,D,P);}}function qQ(t,e,A,n){var P,r,i,f,D;f=(e.b-e.a)/10,D=(e.d-e.c)/10,P=new h1(),V9(t.L,o1(t.L,A,n))?(r=-3,i=-3):(r=t.p[A],i=t.p[n]),$1(t,r),P.a=e.a,P.c=e.c,P.b=e.a+f*2,P.d=e.c+D*2,t.qb(P),P.a=e.a+f*4,P.c=e.c+D*4,P.b=e.a+f*5,P.d=e.c+D*5,t.qb(P),$1(t,i),P.a=e.a+f*5,P.c=e.c+D*5,P.b=e.a+f*6,P.d=e.c+D*6,t.qb(P),P.a=e.a+f*8,P.c=e.c+D*8,P.b=e.b,P.d=e.d,t.qb(P),$1(t,t.Q);}function W5(t,e,A,n,P){var r,i,f,D,Q,o,L,s;if((t.q&&e<t.g?UA(t.q,e):0)>24||(r=t.e[e],P==null&&(P=c(F,m,6,r,15,1)),!C_(t,e,A,n,P)))return 3;for(D=-1,Q=0;Q<r;Q++)if((P[Q]&1)==1){if(i=t.I[t.n[e][A[Q]]],D!=-1&&D!=i)return 3;D=i;}return o=w.Math.abs(P[0]-P[1])==2?1:0,f=P[o]-P[o+1],s=w.Math.abs(f)==3^P[o]<P[o+1],L=r==3||(P[3]&1)==1,s^L^D==129?1:2;}function w2(t,e,A,n){var P,r,i,f;if(t.L.r==0)return null;for(i=t.Db(A,n),ut(t.L,(t.G&256)!=0?63:(t.G&512)!=0?95:31),xk(t),t.U.a.length=0,t.$.a.length=0,t.B=e,qm(t),t.Cb(t.X),t.K=true,r=0;r<t.L.r;r++)aQ(t,r,null);return t.K=false,P=t.R.c*G8(t.L),ym(t,P),N5(t,A,P,n),!A||YG(A,t.v)?i:(f=new ry(t.v,A,P,n),Gu(f,t.R),Yu(f,t.v),rB(f,t.w),i?(Gu(f,i),i):f);}function o_(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y;for(P=c(F,m,6,n,15,1),r=0,i=0;i<e.e.length;i++)for(f=0;f<A.e.length;f++)e.e[i]==A.e[f]&&(P[r++]=e.e[i]);D=n==1?(Q=L8(e,P[0]),o=L8(A,P[0]),Iv(A,e.a[Q]-A.a[o],e.b[Q]-A.b[o]),L=Dp(t,e,P[0]),s=Dp(t,A,P[0]),y=0,XL(t,e,P[0])==1&&XL(t,A,P[0])==1&&(y=fA),Tf(A,A.a[o],A.b[o],L-s+y+l1),X5(t,e,A,1)):Jtt(t,e,A,P,n),rk(t,e,A,D);}function U_(t,e){var A,n,P,r,i,f;if((t.o[e]==1||t.o[e]==2)&&!A8(t.R,e)){i=false;try{for(r=0;r<2;r++)if(A=K(t.R,r,e),O(t.R,A)==3){for(n=c(F,m,6,2,15,1),P=0,f=0;f<O(t.R,A);f++)Nt(t.R,A,f)!=e&&(n[P++]=_(t.R,A,f));t.f[n[0]]>t.f[n[1]]^v6(t,A,n[0],n[1])&&(i=!i);}}catch(D){if(D=_1(D),Yt(D,19)){t.i[e]=3;return;}else throw At(D);}t.o[e]==1^i?t.i[e]=1:t.i[e]=2;}}function L_(t){var e,A,n;for(this.c=new n1(),n=0,e=0;e<t.g;e++)n+=xt(t,e);if(n>0)throw At(new ZP("molecule needs explicit hydrogen atoms for force field calculations"));for(this.g=t,this.d=3*t.r,this.e=c(Ut,Tt,6,this.d,15,1),this.i=c(Ut,Tt,6,this.d,15,1),this.f=false,this.j=20,A=0;A<t.r;A++)this.i[3*A]=t.K[A].a,this.i[3*A+1]=t.K[A].b,this.i[3*A+2]=t.K[A].c;}function rR(t){var e,A,n,P,r,i,f,D,Q,o;for(this.a=new Jn(),e=0;e<t.r;e++)for(Jr(this.a,new zi(e,e),(P9(),Uc)),A=0;A<t.e[e];A++)for(D=t.j[e][A],f=new zi(e,D),Jr(this.a,f,sc),n=0;n<t.e[D];n++)for(Q=t.j[D][n],i=new zi(e,Q),(!Kr(this.a,i)||z1(D8(this.a,i))===z1(wi))&&Jr(this.a,i,Lc),P=0;P<t.e[Q];P++)o=t.j[Q][P],r=new zi(e,o),Kr(this.a,r)||Jr(this.a,r,wi);}function s_(t){e1(t,H4)&&!KE?(Hi(),r3(H4,new Ss("/resources/forcefield/mmff94/outofplane.csv","/resources/forcefield/mmff94/torsion.csv")),KE=true):e1(t,V4)&&!JE?(Hi(),r3(V4,new Ss(PE,"/resources/forcefield/mmff94/94s/torsion.csv")),JE=true):e1(t,Jy)&&!YE&&(Hi(),r3(Jy,new Ss(PE,"/resources/forcefield/mmff94/94s/torsionPlus.csv")),YE=true);}function y_(t,e){return !e&&(e={keepAbsoluteCoordinates:false,mode:3}),e=Object.assign({},e),e.keepAbsoluteCoordinates=!!e.keepAbsoluteCoordinates,"sortByIDCode"in e?(e.sortByIDCode=!!e.sortByIDCode,BN(t,e.keepAbsoluteCoordinates,e.sortByIDCode)):(typeof e.mode!==s9&&(e.mode=3),e.mode=Math.trunc(e.mode),_x(t,e.keepAbsoluteCoordinates,e.mode));}function Ff(t,e,A,n){var P,r,i,f;for(this.e=t,this.g=A,this.a=n,i=-1,f=0;f<Ct(this.e,this.a);f++){if(P=_(this.e,this.a,f),r=Nt(this.e,this.a,f),P==this.g){c1(this.e,r)==386&&(this.j=-1);continue;}_9(this.e,r,this.a)&&(this.i&&(t.v[n]|=o0),this.i=true),i==e[P]?(this.d=P,this.f=true,this.c=LA(this.e,r)):i<e[P]?(i=e[P],this.d=this.b,this.b=P):this.d=P;}}function l_(t,e){var A,n,P,r,i,f;if(e.startsWith("M  RAD")&&(P=L1(k1((Mt(6,9,e.length),e.substr(6,3))),f1,Et),P>0))for(A=10,f=14,r=1;r<=P;++r,A+=8,f+=8)switch(n=L1(k1((Mt(A,A+3,e.length),e.substr(A,A+3-A))),f1,Et)-1,i=L1(k1((Mt(f,f+3,e.length),e.substr(f,f+3-f))),f1,Et),i){case 1:Je(t.j,n,16);break;case 2:Je(t.j,n,32);break;case 3:Je(t.j,n,48);}}function iR(t){var e,A,n,P,r,i,f,D;for(t.t=new n1(),n=1,r=0,A=0;A<t.u.g;A++)M1(t.u,A)!=0&&!Fn(t.u,A)&&(r=w.Math.max(r,M1(t.u,A)));if(r!=0){for(P=c(F,m,6,r+1,15,1),e=0;e<t.u.g;e++)M1(t.u,e)!=0&&!Fn(t.u,e)&&(P[M1(t.u,e)]=e+1);for(f=0;f<t.D.g;f++)D=M1(t.D,f),D!=0&&D<=r&&!Fn(t.D,f)&&P[D]!=0&&(i=P[D]-1,t.I[f]=n,t.B[i]=n++,Ft(t.t,new FD(f,i)));}return t.t.a.length;}function Ce(){Ce=v1;var t;for(X2=new RA(1,1),Ko=new RA(1,10),new RA(1,2),vr=new RA(0,0),Rc=new RA(-1,1),US=B(d(Fi,1),_e,23,0,[vr,X2,new RA(1,2),new RA(1,3),new RA(1,4),new RA(1,5),new RA(1,6),new RA(1,7),new RA(1,8),new RA(1,9),Ko]),Jo=c(Fi,_e,23,32,0,1),t=0;t<Jo.length;t++)Jo[t]=ku(Wt(1,t),0)?be(Wt(1,t)):mP(be(E0(Wt(1,t))));}function fR(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h;if(r=e.e,r==0)throw At(new I8(DE));return P=e.d,n=e.a,P==1?n$(t,n[0],r):(y=t.a,l=t.d,A=l!=P?l>P?1:-1:sQ(y,n,l),A<0?B(d(Fi,1),_e,23,0,[vr,t]):(h=t.e,f=l-P+1,o=P,D=h==r?1:-1,i=c(F,m,6,f,15,1),Q=vp(i,f,y,l,n,P),L=new le(D,f,i),s=new le(h,o,Q),Cn(L),Cn(s),B(d(Fi,1),_e,23,0,[L,s])));}function _5(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g;if($R(t,e,A,n),Ed(t.p))return null;if(t.k!=null)for(s=t.k,y=0,l=s.length;y<l;++y)L=s[y],_h(t.p,L);if(t.g)for(T=new Zt(t.g);T.a<T.c.a.length;)h=_t(T),DN(t.p,h);if(t.e!=null)for(i=t.e,D=0,o=i.length;D<o;++D)P=i[D],hU(P.R);if(t.b!=null)for(r=t.b,f=0,Q=r.length;f<Q;++f)P=r[f],hU(P.R);return g=t.p,t.p=new Qu(),g;}function h8(t,e,A){var n,P,r,i,f;return r=false,i=t.I[e],A==511?r=_$(t,e):Cq(t,e,A)&&(A==257||A==129?(n=qj(t,e,t.F[0][e]),P=qj(t,e,t.F[1][e]),A==i?(n==P||P)&&(f=t.F[0][e],t.F[0][e]=t.F[1][e],t.F[1][e]=f,r=true):(!n&&P&&(f=t.F[0][e],t.F[0][e]=t.F[1][e],t.F[1][e]=f),t.I[e]=A,r=true)):(t.I[e]=A,r=true)),r&&(t.U=(i&127)==(A&127)?t.U&7:0,t.H[e]=0),r;}function h_(t){var e,A,n,P,r,i,f,D;if(f=null,A=t.indexOf("["),n=t.indexOf("]",A),A>=0&&n>0){for(e=c(F,m,6,16,15,1),D=(Mt(A+1,n,t.length),t.substr(A+1,n-(A+1))),P=0,i=true;i&&P<16;)A=D.indexOf(","),r=null,A==-1?(r=D,i=false):(r=(Mt(0,A,D.length),D.substr(0,A)),D=(zt(A+1,D.length+1),D.substr(A+1))),e[P++]=zA(r,1);f=c(F,m,6,P,15,1),PA(e,0,f,0,P);}return f;}function DR(t,e,A){var n,P,r,i;if(!t.b&&!t.c)aD(A,e);else if(t.c){if(aD(A,e),Kr(t.f,U1(e)))for(i=D8(t.f,U1(e)),P=0;P<i.size();P++)for(n=i.getAtIndex(P),r=0;r<n.length;r++)aD(A,n[r]);}else if(t.b&&(aD(A,e),Kr(t.e,U1(e))))for(i=D8(t.e,U1(e)),P=0;P<i.size();P++)for(n=i.getAtIndex(P),r=0;r<n.length;r++)aD(A,n[r]);A.a.length==1?A.b=A.a[0]:A.b=Mu(A.a);}function uR(t){var e,A,n,P;for(dU.call(this),e=0;e!=-1&&(A=t.indexOf('="',e),A!=-1);)n=(Mt(e+1,A,t.length),t.substr(e+1,A-(e+1))),e=t.indexOf('"',A+2),P=e==-1?(zt(A+1,t.length+1),t.substr(A+1)):(Mt(A+1,e,t.length),t.substr(A+1,e-(A+1))),e1(n,"text")?this.e=$_(P):e1(n,"x")?Uq(this,P):e1(n,"y")?oq(this,P):e1(n,"size")?aO(this,P):e1(n,"style")&&vq(this,P);}function T_(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T;for(y=e.length,D=y,zt(0,e.length),e.charCodeAt(0)==45?(L=-1,s=1,--y):(L=1,s=0),r=(Zs(),sS)[10],P=y/r|0,T=y%r,T!=0&&++P,f=c(F,m,6,P,15,1),A=LS[8],i=0,l=s+(T==0?r:T),h=s;h<D;h=l,l=h+r)n=L1((Mt(h,l,e.length),e.substr(h,l-h)),f1,Et),Q=(Lr(),cs(f,f,i,A)),Q+=JK(f,i,n),f[i++]=Q;o=i,t.e=L,t.d=o,t.a=f,Cn(t);}function QR(t){var e;switch(ut(t,31),e=t.J&d1,t.J&GP){case o0:return null;case q0:return e==1?"meso":""+e+" meso diastereomers";case 0:return "unknown chirality";case Fy:return "both enantiomers";case v8:return "this enantiomer";case 327680:return "this or other enantiomer";case Ti:return "two epimers";default:return e==1?"one stereo isomer":""+e+" stereo isomers";}}function oR(t){var e;for(t.U=0,t.D=c(F,m,6,t.N,15,1),t.t=c(F,m,6,t.N,15,1),t.A=c(F,m,6,t.N,15,1),t.K=c(q2,V2,28,t.N,0,1),e=0;e<t.N;e++)t.K[e]=new N0();t.B=c(F,m,6,t.N,15,1),t.v=c(F,m,6,t.N,15,1),t.C=c(XA,re,6,t.N,14,1),t.w=null,t.u=null,t.F=j1(F,[u0,m],[7,6],15,[2,t.O],2),t.I=c(F,m,6,t.O,15,1),t.G=c(F,m,6,t.O,15,1),t.H=c(F,m,6,t.O,15,1);}function c_(t,e,A,n,P,r,i){var f,D,Q,o,L;if(O(t.j,A)==3&&(v0(t.j,A)==1||v0(t.j,A)==2)&&O(t.d,r)==3&&(v0(t.d,r)==1||v0(t.d,r)==2)){for(L=e>n,Q=-1,D=0;D<O(t.j,A);D++)if(Q=_(t.j,A,D),Q!=e&&Q!=n){(Q>n&&Q<e||Q<n&&Q>e)&&(L=!L);break;}for(o=P>i,f=0;f<O(t.d,r);f++)if(Q=_(t.d,r,f),Q!=P&&Q!=i){(Q>i&&Q<P||Q<i&&Q>P)&&(o=!o);break;}return L==o==(v0(t.j,A)==v0(t.d,r));}return  true;}function $5(t,e){var A,n,P,r,i,f;for(i=(t.U&4)!=0,f=false,P=false,r=false,A=null,n=0;n<t.V.r;n++)if(i0(t.V,n))if(f){if(r!=EQ(A,mt(t.V,n),Rt(t.V,n))){P=true;break;}}else {if(f=true,!i)break;A=G(t.I,0),r=EQ(A,mt(t.V,n),Rt(t.V,n));}return e?i?P?(Lm(t,true),true):f?(dF(t,true),false):(Lm(t,false),true):(dF(t,f),false):i&&(P||!f);}function w_(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T;for(f=0,s=0;s<A.c.length;s++)for(P=A.e[A.c[s]],T=XD(X(t.k,P)),y=0;y<n.c.length;y++)r=n.e[n.c[y]],l=T+XD(X(t.k,r)),Q=w.Math.abs(e.k[P].a-e.k[r].a),Q<l&&(o=w.Math.abs(e.k[P].b-e.k[r].b),o<l&&(L=w.Math.abs(e.k[P].c-e.k[r].c),L<l&&(D=w.Math.sqrt(Q*Q+o*o+L*L),D<l&&(h=(l-D)/l,i=h*h,f+=i))));return 20*f;}function g_(t){var e,A,n,P,r;for(t.a=t.d.f,t.b=c(Pt,it,6,t.k.g,16,1),t.c=c(Pt,it,6,t.k.i,16,1),t.g=new n1(),e=lb(t);e!=-1;){if(A=t.g.a.length,cF(t,new K3(e,-1,-1,false,false),A),O(t.k,e)!=0)for(fb(t,A,false);A<t.g.a.length-1;){for(;tz(t,G(t.g,A).a);)fb(t,A,true);++A;}e=lb(t);}for(t.q=c(F,m,6,t.k.g,15,1),n=0,r=new Zt(t.g);r.a<r.c.a.length;)P=_t(r),t.q[P.a]=n++;}function IP(t,e,A){var n,P,r;if(A!=null&&(A.length==0?A=null:(n=zA(A,321),(n!=0&&n==t.D[e]||e1(A,"?"))&&($0(t,e,n),A=null))),A==null){if(t.u!=null&&t.u[e]!=null)return t.u[e]=null,t.D[e]==1&&(t.U=0),true;}else if(t.u==null&&(t.u=c(E,m8,10,t.N,0,2)),t.u[e]==null||!e1(on((r=t.u[e],w0(),r)),A))return t.u[e]=ln((P=A,w0(),P)),t.D[e]==1&&(t.U=0),true;return  false;}function UR(t,e,A,n,P){var r,i,f,D,Q,o;if(n&&G1(t,e)>1||!n&&G1(t,e)>2)return  false;for(i=0,r=c(Ut,Tt,6,4,15,1),D=0;D<t.s;D++){for(Q=0;Q<2;Q++)if(t.F[Q][D]==e){if(i==2){i=3;break;}r[i++]=_0(t,e,t.F[1-Q][D]);}if(i==3)break;}return i==3?false:(o=i==1?r[0]+l1:w.Math.abs(r[0]-r[1])>l1?(r[0]+r[1])/2:(r[0]+r[1])/2+l1,f=l1*(A-2)/A,U6(t,e,A,e,n,o-f/2,l1-f,P),t.U=0,true);}function a5(t){var e,A,n,P,r;if(P=new ig(new S8()),r=new kg(),t.k!=null)for(n=0;n<t.k.length;n++)for(e=0;e<t.k[n].s;e++)Fs(P,t.e[n].R.c*ET(t.k[n],e)),Fs(r,uT(P)),P.b.a.length<r.b.a.length&&Fs(P,uT(r));return A=P.b.a.length+r.b.a.length,A==0?m_(t):t.p.c*(A%2==0?(hD(P.b.a.length==0?null:G(P.b,0))+hD(r.b.a.length==0?null:G(r.b,0)))/2:hD(P.b.a.length==0?null:G(P.b,0)));}function LR(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y,l;for(L=false,s=0,Q=0;Q<A;Q++)t.I[Q]!=16&&(t.H[Q]&d8)==0&&++s;if(s==0){for(o=0;o<A;o++)(t.H[o]&d8)==0&&++s;L=true;}if(s==0){if(e<2)return n;for(l=Ge,r=1;r<e;r++)for(i=0;i<r;i++)y=dT(P[r],P[i]),y>0&&y<l&&(l=y);return l!=Ge?.6*l:n;}for(f=0,D=0;D<A;D++)(L||t.I[D]!=16)&&(t.H[D]&d8)==0&&(f+=dT(P[t.F[1][D]],P[t.F[0][D]]));return f/s;}function sR(t,e,A){var n,P,r,i,f,D,Q,o,L,s;for(o=-1,L=-1,s=-1,r=c(Pt,it,6,O(t.c,e),16,1),D=0;D<O(t.c,e);D++)if(!r[D]&&(P=_(t.c,e,D),P!=A&&(i=H0(t.c,P),L<i))){for(f=false,Q=D+1;Q<O(t.c,e);Q++)if(n=_(t.c,e,Q),n!=A&&H0(t.c,n)==i){if(r[Q]=true,f)return P;f=true;}f?s=P:(L=i,o=P);}return o==-1&&(e0(t.c,e)==1&&X(t.c,e)<10||mn(t.c,e)||xP(t.c,e,true))?s:o;}function d_(t){var e,A,n,P,r,i,f,D,Q,o,L;for(n=W8(t.f.g),D=2,A=0;A<t.f.g;A++)D=w.Math.max(D,Ct(t.f,A));for(r=(62+2*n+D*(n+1))/63|0,P=c(K4,H2,101,t.f.r,0,1),e=0;e<t.f.r;e++)P[e]=new xU(r),AA(P[e],e);for(L=c(F,m,6,t.f.r,15,1),i=0;i<t.f.i;i++)f=ze(t.f,i),(f==1||f==2)&&(se(P[K(t.f,0,i)],f),se(P[K(t.f,1,i)],f));Q=hm(P,L);do o=Q,QW(t,P,L,n,D),Q=hm(P,L);while(o!=Q);return L;}function yR(t,e,A,n){HQ();var P,r,i,f,D,Q;if(i=0,Q=0,P=0,n==null&&(n=c(Oe,uA,6,3,15,1)),D=w.Math.min(t,w.Math.min(e,A)),f=w.Math.max(t,w.Math.max(e,A)),P=f,r=f-D,r==0)return P=D,i=0,n[0]=i,n[1]=Q,n[2]=P,n;if(f!=0)Q=r/f;else return Q=0,i=0,n[0]=i,n[1]=Q,n[2]=P,n;return t==f?i=(e-A)/r:e==f?i=2+(A-t)/r:i=4+(t-e)/r,i*=60,i<0&&(i+=360),n[0]=i/360,n[1]=Q,n[2]=P,n;}function B_(t){var e,A,n,P,r,i,f,D,Q,o;for(Q=kn(t.d),o=Q.j.a.length,n=0;n<o;n++){for(e=G(Q.k,n),i=0;i<e.length;i++)Kr(t.f,U1(e[i]))||Jr(t.f,U1(e[i]),new n1()),f=D8(t.f,U1(e[i])),f.add(e);if(Q.e[n])for(r=0;r<e.length;r++)Kr(t.e,U1(e[r]))||Jr(t.e,U1(e[r]),new n1()),f=D8(t.e,U1(e[r])),f.add(e);}for(D=Bt(t.d.i/32+.96875),A=0;A<t.d.i;A++)P=new T3(D),DR(t,A,P),xA(t.g,P);}function v_(t,e,A,n,P,r){var i,f,D,Q,o,L,s;for(Q=wk(e)-wk(t),i=Cb(e,Q),D=G0(0,0,0);Q>=0&&(f=YJ(t,i),!(f&&(Q<22?D.l|=1<<Q:Q<44?D.m|=1<<Q-22:D.h|=1<<Q-44,t.l==0&&t.m==0&&t.h==0)));)o=i.m,L=i.h,s=i.l,i.h=L>>>1,i.m=o>>>1|(L&1)<<21,i.l=s>>>1|(o&1)<<21,--Q;return A&&rs(D),r&&(n?(zn=Ai(t),P&&(zn=Lk(zn,(ti(),dc)))):zn=G0(t.l,t.m,t.h)),D;}function L1(t,e,A){var n,P,r,i,f;if(t==null)throw At(new _P(y9));for(r=t.length,i=r>0&&(zt(0,t.length),t.charCodeAt(0)==45||(zt(0,t.length),t.charCodeAt(0)==43))?1:0,n=i;n<r;n++)if(AJ((zt(n,t.length),t.charCodeAt(n)))==-1)throw At(new _P(b2+t+'"'));if(f=parseInt(t,10),P=f<e,isNaN(f))throw At(new _P(b2+t+'"'));if(P||f>A)throw At(new _P(b2+t+'"'));return f;}function lR(t,e){var A,n,P,r,i,f,D,Q;for(t.q=new gU(t,e|t.f),n=c(F,m,6,t.g,15,1),P=0;P<t.i;P++)TP(t.q,P)!=0&&(t.G[P]|=64,++n[t.F[0][P]],++n[t.F[1][P]]);for(A=0;A<t.g;A++)n[A]==2?t.v[A]|=Qe:n[A]==3?t.v[A]|=O1:n[A]>3&&(t.v[A]|=gn);for(Q=0;Q<t.q.j.a.length;Q++)for(i=jh(t.q,Q),D=Qg(t.q,Q),f=i.length,r=0;r<f;r++)t.v[i[r]]|=8,t.G[D[r]]|=128,t.I[D[r]]==386&&(t.I[D[r]]=2);}function F_(t,e){var A,n,P,r;if(e>0&&(e=Us(t,e,9)),e>0&&(e=Us(t,e,17)),e>0&&(e=Us(t,e,35)),e>0&&(e=Us(t,e,53)),e>0){for(A=0;A<t.g;A++)if(t.t[A]>0){for(P=false,r=0;r<t.k[A];r++)if(n=t.j[A][r],t.t[n]==0&&rA(t,n)&&xt(t,n)>0){if(t.t[n]=-1,t.U=0,--e,e==0)return 0;P=true;break;}if(P)continue;}}return e>0&&(e=Js(t,e,8,16)),e>0&&(e=Js(t,e,8,15)),e>0&&(e=Js(t,e,8,6)),e>0&&(e=Js(t,e,7,16)),e;}function hR(t,e){var A,n,P,r,i,f,D,Q;for(P=0;P<t.g.i;P++)if((fe(t.g,P)&F8)!=0){if(r=ze(t.g,P),r==0)continue;if(A=K(t.g,0,P),n=K(t.g,1,P),t.f==null||e==-1&&t.f[A]==-1&&t.f[n]==-1||e!=-1&&(t.f[A]==e||t.f[n]==e)){if(i=t.G[A],f=t.G[n],D=o1(t.H,i,f),Q=ze(t.H,D),Q==0&&(A8(t.H,D)&&(Q=CW(t,D)),Q==0)||r==3||Q==3)continue;if(AW(t,P)==(r==Q))return  false;}}return  true;}function k_(t,e,A){var n,P,r,i,f,D;f=E1(vi[A]),i=Y1(E1(t.e),A),D=E1(t.f),r=Sn(D,f),P=n9(D,f),z(P,0)!=0&&(n=Si(Wt(z(P,0)<0?E0(P):P,1),f)?-1:I1(Wt(z(P,0)<0?E0(P):P,1),f)?1:0,r=at(r,zQ(Ot(r)&1,(z(P,0)==0?0:z(P,0)<0?-1:1)*(5+n),e.b)),w.Math.log10($9(z(r,0)<0?E0(r):r))>=e.a&&(r=Sn(r,10),i=Y1(i,1))),t.e=Am($9(i)),t.d=e.a,t.f=$9(r),t.a=BT(r),t.c=null;}function TR(t,e,A,n){var P,r,i,f,D,Q,o;for(Q=0,r=V(n,g1),f=A-1;f>=0;f--)o=J(Wt(Q,32),V(e[f],g1)),z(o,0)>=0?(D=Sn(o,r),Q=n9(o,r)):(P=j0(o,1),i=n>>>1,D=Sn(P,i),Q=n9(P,i),Q=at(Wt(Q,1),V(o,1)),(n&1)!=0&&(z(D,Q)<=0?Q=Y1(Q,D):qg(Y1(D,Q),r)?(Q=at(Q,Y1(r,D)),D=Y1(D,1)):(Q=at(Q,Y1(Wt(r,1),D)),D=Y1(D,2)))),t[f]=Ot(V(D,g1));return Ot(Q);}function m_(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h;if(L=Ge,s=W6,l=Ge,h=W6,P=0,t.k!=null)for(f=0;f<t.k.length;f++)for(A=0;A<t.k[f].r;A++)o=W1(t.e[f].R,S7(t.k[f],A).a),y=Z1(t.e[f].R,S7(t.k[f],A).b),L=w.Math.min(L,o),s=w.Math.max(s,o),l=w.Math.min(l,y),h=w.Math.max(h,y),++P;return P<=1?t.d:(r=s-L,i=h-l,D=(r+i)/2,Q=3*P,e=r*i,n=D/(1-Q),w.Math.sqrt(n*n-e/(1-Q))-n);}function b_(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h;for(Q=t.i.N,o=0,r=0;r<A;r++)Q>e[r]&&(Q=e[r],o=r);for(h=c(F,m,6,A,15,1),D=o>0?o-1:A-1,L=o<A-1?o+1:0,i=e[D]<e[L],P=0;P<A;P++)h[P]=e[o],i?--o<0&&(o=A-1):++o==A&&(o=0);for(l=new Zt(t.j);l.a<l.c.a.length;)if(y=_t(l),y.length==A){for(n=true,f=0;f<A;f++)if(y[f]!=h[f]){n=false;break;}if(n)return;}Ft(t.j,h),s=mb(t,h),Ft(t.k,s),ij(t,h,s);}function j_(t,e,A,n,P,r,i){return !(X(t.j,A)==8&&e0(t.j,A)==0&&uQ(t.j,e)&&uQ(t.d,n)&&r!=O1||X(t.j,A)==8&&O(t.j,A)==2&&uQ(t.j,Mq(t.j,e,A))&&r<768||X(t.j,e)==8&&(uQ(t.j,A)||uQ(t.d,P))&&r<512||!i&&(X(t.j,A)!=6||!_q(t.j,e))||X(t.j,A)==8&&X(t.j,e)!=6&&r!=O1||X(t.j,e)==5&&X(t.j,A)==6&&r<768);}function t6(t,e,A){var n,P;return P=Jp(t,e,(A&16)==0),P==null?null:(n=new bn(P[0]),A!=0&&(n.a+="#",(A&1)!=0&&P.length>1&&P[1]!=null&&(n.a+=""+P[1])),A&=-2,A!=0&&(n.a+="#",(A&2)!=0&&P.length>2&&P[2]!=null&&(n.a+=""+P[2])),A&=-3,A!=0&&(n.a+="#",(A&4)!=0&&P.length>3&&P[3]!=null&&(n.a+=""+P[3])),A&=-5,A!=0&&(n.a+="#",(A&8)!=0&&P.length>4&&P[4]!=null&&(n.a+=""+P[4])),n.a);}function cR(t,e,A){var n,P,r,i,f;for(r=0;r<e;r++){for(n=0,f=r+1;f<e;f++)n=at(at(yn(V(t[r],g1),V(t[f],g1)),V(A[r+f],g1)),V(Ot(n),g1)),A[r+f]=Ot(n),n=j0(n,32);A[r+e]=Ot(n);}for(XF(A,A,e<<1),n=0,P=0,i=0;P<e;++P,i++)n=at(at(yn(V(t[P],g1),V(t[P],g1)),V(A[i],g1)),V(Ot(n),g1)),A[i]=Ot(n),n=j0(n,32),++i,n=at(n,V(A[i],g1)),A[i]=Ot(n),n=j0(n,32);return A;}function wR(t){var e,A,n,P,r,i,f,D,Q,o;i=u6(t),D=t.r;do--D;while(D>=0&&i[D]);for(e=0;e<D;e++)if(i[e]){r6(t,e,D),o=i[e],i[e]=i[D],i[D]=o;do--D;while(i[D]);}if(t.g=D+1,t.r==t.g){t.i=t.s;return;}for(f=c(Pt,it,6,t.s,16,1),r=0;r<t.s;r++)A=t.F[0][r],n=t.F[1][r],(i[A]||i[n])&&(f[r]=true);Q=t.s;do--Q;while(Q>=0&&f[Q]);for(P=0;P<Q;P++)if(f[P]){g5(t,P,Q),f[P]=false;do--Q;while(f[Q]);}t.i=Q+1;}function R_(t,e,A){var n,P,r,i,f,D,Q;for(D=c(F,m,6,t.g,15,1),i=c(F,m,6,t.g,15,1),Q=c(Pt,it,6,t.i.g,16,1),n=K(t.i,0,e),P=K(t.i,1,e),D[0]=n,D[1]=P,i[1]=-1,Q[P]=true,f=1;f>=1;){if(++i[f],i[f]==O(t.i,D[f])){Q[D[f]]=false,--f;continue;}if(r=_(t.i,D[f],i[f]),!(Q[r]||A[r])){if(r==n&&f>1){if(b_(t,D,f+1),t.j.a.length>=Qe)return;continue;}f+1<t.g&&(++f,D[f]=r,Q[r]=true,i[f]=-1);}}}function Lr(){Lr=v1;var t,e;for(m9=c(Fi,_e,23,32,0,1),tD=c(Fi,_e,23,32,0,1),pc=B(d(F,1),m,6,15,[1,10,100,1e3,fP,xy,1e6,1e7,1e8,Jf]),t=1,e=0;e<=18;e++)m9[e]=(Ce(),z(t,0)>=0?be(t):mP(be(E0(t)))),tD[e]=ku(Wt(t,e),0)?be(Wt(t,e)):mP(be(E0(Wt(t,e)))),t=yn(t,5);for(;e<tD.length;e++)m9[e]=RP(m9[e-1],m9[1]),tD[e]=RP(tD[e-1],(Ce(),Ko));}function p_(t,e){var A,n,P,r,i,f,D,Q,o,L;if(o=Nd(t.f)!=1?1:hj(e,t.p[1],t.k[0]),L=Nd(t.g)!=1?1:hj(e,t.p[2],t.k[1]),!(o==1&&L==1)){for(i=360/w.Math.max(o,L)|0,A=0,n=0,r=0;r<t.d.length&&t.d[r]<i;r++)n+=t.c[r],++A;if(A!=0){for(Q=c(Kt,t1,6,A,15,1),f=c(Kt,t1,6,A,15,1),D=c(Kt,ie,16,A,0,2),P=0;P<A;P++)Q[P]=t.d[P],f[P]=(t.c[P]*100/n|0)<<16>>16,D[P]=t.e[P];t.d=Q,t.c=f,t.e=D;}}}function e6(t,e){var A,n,P,r,i,f,D,Q,o,L;if(f=c(F,m,6,t.r,15,1),i=Ur(t,f,false,e),i<=1)return null;for(D=c(F,m,6,i,15,1),n=0;n<t.g;n++)++D[f[n]];for(o=0,L=D[0],Q=1;Q<i;Q++)L<D[Q]&&(L=D[Q],o=Q);for(A=0;A<t.r;A++)f[A]!=o&&(t.D[A]=-1);for(r=0;r<t.s;r++)(!e&&t.I[r]==16||f[t.F[0][r]]!=o)&&(t.I[r]=512);P=Rf(t),t.U=0;try{Kp(t,!0,!0);}catch(s){if(s=_1(s),!Yt(s,19))throw At(s);}return P;}function M_(t){for(var e,A,n,P,r,i,f;;){for(r=null,e=0;e<t.f.r;e++){for(f=0,P=0;P<Ct(t.f,e);P++)t.c[Nt(t.f,e,P)]||++f;f==1&&(i=u$(t,e),(!r||i.a.length>r.a.length)&&(r=i));}if(!r)break;for(A=new VP(t.f,r.a.length,false),n=0;n<r.a.length;n++)t.b[r.a[n]]=true,n<r.a.length-1&&(t.c[r.b[n]]=true),A.e[n]=r.a[n],A.a[n]=w.Math.cos(C2)*n,A.b[n]=(n&1)==1?0:.5,A.k[n]=128+r.a.length;CP(t.d,A);}}function C_(t,e,A,n,P){var r,i,f,D;if(i=t.e[e],t.p[e]!=0||e<t.g&&f0(t.q,e)||t.k[e]<3||i>4)return  false;for(D=c(Pt,it,6,4,16,1),f=0;f<i;f++){if(r=3.9269908169872414-n[f],w.Math.abs($6-r%HA)>.0872664675116539||(P[f]=3&Bt(r/HA),D[P[f]]))return  false;if(D[P[f]]=true,(P[f]&1)==0){if(t.I[t.n[e][A[f]]]!=1)return  false;}else if(!_9(t,t.n[e][A[f]],e))return  false;}return D[0]&&D[2];}function H_(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y;for(s=c(F,m,6,t.g,15,1),y=$X(t,e,s),i=false,r=false,L=new n1(),P=0;P<y;P++)(t.v[s[P]]&4)!=0&&(Q=A6(t,s[P],n),(Q==1||Q==2)&&(f=A.v[n[s[P]]]&3,(f==1||f==2)&&(Q==f?i=true:r=true)),D=c(F,m,6,2,15,1),D[0]=s[P],D[1]=Q,L.a.push(D));if(!i||!r)for(o=new Zt(L);o.a<o.c.a.length;)Q=_t(o),D=Q[1],(D==1||D==2)&&r&&(D=D==1?2:1),me(A,n[Q[0]],D,true);}function zQ(t,e,A){var n;switch(n=0,A.b){case 7:if(e!=0)throw At(new I8("Rounding necessary"));break;case 0:n=e==0?0:e<0?-1:1;break;case 2:n=w.Math.max(e==0?0:e<0?-1:1,0);break;case 3:n=w.Math.min(e==0?0:e<0?-1:1,0);break;case 4:w.Math.abs(e)>=5&&(n=e==0?0:e<0?-1:1);break;case 5:w.Math.abs(e)>5&&(n=e==0?0:e<0?-1:1);break;case 6:w.Math.abs(e)+t>5&&(n=e==0?0:e<0?-1:1);}return n;}function V_(t,e){var A,n;if(A=dT(Z0(e,t.f[1]),Z0(e,t.f[0])),t.a.length==2){if(A<1.02*t.a[0])return gK(t,e.o,A);if(A>t.a[1])return _7((A-t.a[1])/A);}else if(n=t.c==10?Ux(w.Math.abs(t.a[0]-A)/w.Math.max(t.a[0],A)):t.c==5?Bx(w.Math.abs(t.a[0]-A)/w.Math.max(t.a[0],A)):_7(w.Math.abs(t.a[0]-A)/w.Math.max(t.a[0],A)),w.Math.abs(n)>.009999999776482582)return n;return 0;}function Ys(t,e){var A,n,P,r,i;if(e<t.g&&f0(t.q,e)||t.p[e]!=0||gt(V(t.C[e],d9),0)||(n=t.v[e]&gn,(n==0?0:n==Qe?2:n==O1?3:4)<3)||(i=t.q&&e<t.g?UA(t.q,e):0,i>7))return  false;for(r=0;r<t.q.j.a.length&&!(ah(t.q,r)==i&&wA(t.q,r,e));)++r;if(r>=Qe&&r==t.q.j.a.length)return  false;for(P=0;P<t.k[e];P++)if(A=t.n[e][P],!Pf(t.q,r,A)&&Ttt(t,e,r,t.j[e][P],A))return  true;return  false;}function E_(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g;D=(e.c-e.d)/9,y=(e.b-e.a)/9,Q=e.b+D,l=e.d+y,o=e.b-D,h=e.d-y,L=(e.a+Q)/2,T=(e.c+l)/2,s=(e.a+o)/2,g=(e.c+h)/2,i=new WD(3),f=new WD(4),Ie(i,e.a,e.c),Ie(i,L,T),Ie(i,s,g),Ie(f,s,g),Ie(f,L,T),Ie(f,Q,l),Ie(f,o,h),V9(t.L,o1(t.L,A,n))?(P=-3,r=-3):(P=t.p[A],r=t.p[n],t.L.P!=1&&(r=y5(t,A),P==wu(t.L,A)&&(P=r))),$1(t,P),t.sb(i),$1(t,r),t.sb(f),$1(t,t.Q);}function S_(t){var e,A,n,P,r,i,f,D;ut(t.i,1),f=t.i.g;do--f;while(f>=0&&X(t.i,f)==1);for(e=0;e<f;e++)if(X(t.i,e)==1){r6(t.i,e,f);do--f;while(X(t.i,f)==1);}if(f!=t.i.g-1){for(i=c(Pt,it,6,t.i.i,16,1),r=0;r<t.i.i;r++)A=K(t.i,0,r),n=K(t.i,1,r),(X(t.i,A)==1||X(t.i,n)==1)&&(i[r]=true);D=t.i.i;do--D;while(D>=0&&i[D]);for(P=0;P<D;P++)if(i[P]){g5(t.i,P,D),i[P]=false;do--D;while(i[D]);}}}function I_(t,e,A){var n,P,r,i,f,D;for(f=new C0(),n=rX(t,e),f.a+=" rb:",D=f.a.length,r=0;r<n.length;r++)n[r]!=-1&&(f.a.length!=D&&(f.a+=","),f.a+=r);for(f.a+=" ti:",D=f.a.length,i=0;i<n.length;i++)n[i]!=-1&&(f.a.length!=D&&(f.a+=","),f.a+=n[i]);for(f.a+=" (",D=f.a.length,P=0;P<n.length;P++)n[P]!=-1&&(f.a.length!=D&&(f.a+=","),Mh(f,A.i[P][n[P]]));return q(f,(A9(),") "+Q9(e.a,3))),f.a;}function Xs(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l;A==0?(L=e.a,y=e.c,s=e.b,l=e.d):(L=e.b,y=e.d,s=e.a,l=e.c),o=G(t.$,n),D=s>L?o.c+o.b:o.c,Q=l>y?o.d+o.a:o.d,P=s-L,r=l-y,w.Math.abs(P)>w.Math.abs(r)?y==l?(i=D,f=y):(i=L+P*(Q-y)/r,s>L==D>i?f=Q:(i=D,f=y+r*(D-L)/P)):L==s?(i=L,f=Q):(f=y+r*(D-L)/P,l>y==Q>f?i=D:(i=L+P*(Q-y)/r,f=Q)),A==0?(e.a=i,e.c=f):(e.b=i,e.d=f);}function A6(t,e,A){var n,P,r,i,f,D,Q,o,L;if(L=t.v[e]&3,L==1||L==2){if(f=false,t.p[e]==2&&t.k[e]==2&&t.o[e][0]==2&&t.o[e][1]==2&&t.D[e]<=7)for(i=0;i<t.k[e];i++){for(n=t.j[e][i],o=0,Q=c(F,m,6,3,15,1),D=0;D<t.k[n];D++)Q[o]=t.j[n][D],Q[o]!=e&&++o;o==2&&Q[0]<Q[1]^A[Q[0]]<A[Q[1]]&&(f=!f);}else for(i=1;i<t.k[e];i++)for(D=0;D<i;D++)P=t.j[e][i],r=t.j[e][D],P<r^A[P]<A[r]&&(f=!f);f&&(L=L==1?2:1);}return L;}function x_(t){var e,A,n,P,r,i,f,D,Q,o,L,s;for(t.u=c(Pt,c0,12,t.k.r,0,2),A=1;A<t.k.r;A++)t.u[A]=c(Pt,it,6,A,16,1);for(o=t.q,L=0,s=o.length;L<s;++L)for(Q=o[L],i=1;i<Q.d.length;i++)for(D=0;D<i;D++)JB(t,Q.e[Q.d[i]],Q.e[Q.d[D]]);for(e=0;e<t.k.g;e++)for(r=1;r<Ct(t.k,e);r++)for(f=0;f<r;f++)JB(t,_(t.k,e,r),_(t.k,e,f));if(t.e!=null)for(n=1;n<t.k.r;n++)for(P=0;P<n;P++)t.e[n]!=t.e[P]&&(t.u[n][P]=true);}function N_(t){var e,A,n,P,r,i,f,D;if(!t.k||t.k.r==0)return "";for(ut(t.k,15),t.d=new qA(t.k,129),P=t.d.T,t.o=c(Pt,it,6,P+1,16,1),t.n=c(Pt,it,6,P+1,16,1),t.i=j1(F,[u0,m],[7,6],15,[2,32],2),e=0;e<t.k.g;e++)D=De(t.k,e)-1,D!=-1&&++t.i[D][OA(t.k,e)];for(g_(t),Ha(t),att(t),n=new C0(),A=new C0(),r=true,f=new Zt(t.g);f.a<f.c.a.length;)i=_t(f),i.g==-1&&(r?r=false:n.a+="."),xtt(t,i,n,A);return n.a;}function gR(t,e){var A,n,P,r;for(Ri(t.V),t.L=c(gr,B9,26,e.g.a.length+e.f.a.length,0,1),t.Y=e.g.a.length,P=0;P<e.g.a.length+e.f.a.length;P++)t.L[P]=P<e.g.a.length?G(e.g,P):G(e.f,P-e.g.a.length),CD(t.V,t.L[P]);for(ve(t.V,e.c||bQ(e)),K1(t),t.M=c(F,m,6,t.V.r,15,1),A=0,n=0;n<t.L.length;n++)for(r=0;r<t.L[n].r;r++)t.M[A++]=n;t.I=new QU(),t.U=5,t.eb=w.Math.max(t.eb,5),P1(t.k),N1(t,new x1(t,1,false));}function G_(t){var e,A,n,P,r,i;if(t.L.L){for($1(t,320),e=0;e<t.L.g;e++)P=h0(t.L,e),z(P,0)!=0&&((t.G&8)!=0||gt(V(P,{l:je,m:896,h:1048448}),0))&&t.ub(W1(t.R,mt(t.L,e))-t.Z/2,Z1(t.R,Rt(t.L,e))-t.Z/2,t.Z);for(r=0;r<t.L.i;r++)i=fe(t.L,r),i!=0&&((t.G&8)!=0||(i&-8388481)!=0)&&(A=K(t.L,0,r),n=K(t.L,1,r),t.ub((W1(t.R,mt(t.L,A))+W1(t.R,mt(t.L,n))-t.Z)/2,(Z1(t.R,Rt(t.L,A))+Z1(t.R,Rt(t.L,n))-t.Z)/2,t.Z));}}function dR(t){t.r&&($5(t,false),null.zd(),null.zd(),(t.U&4)!=0&&(null.zd(),null.zd()),(t.U&4)!=0&&null.zd()),(t.U&4)!=0&&t.w==19&&(null.zd(),null.zd(),null.zd(),null.zd(),null.zd(),null.zd()),t.w==18&&(null.zd(),null.zd(),null.zd()),t.g&&t.t!=-1&&(wu(t.V,t.t),null.zd(),null.zd(),null.zd(),null.zd(),null.zd(),null.zd(),null.zd(),null.zd(),null.zd(),null.zd()),null.zd();}function KQ(t,e,A,n,P,r){var i,f,D,Q,o;for(ut(t,1),P&&(zL(P),P.d=null,P.L=false),D=c(F,m,6,t.r,15,1),n==null?n=c(Pt,it,6,t.r,16,1):xu(n,n.length),D[0]=e,D[1]=A,n[e]=true,n[A]=true,f=1,Q=1;f<=Q;){for(o=0;o<t.e[D[f]];o++){if(i=t.j[D[f]][o],i==e&&f!=1)return  -1;n[i]||(n[i]=true,D[++Q]=i);}++f;}return P&&(r==null&&(r=c(F,m,6,n.length,15,1)),L9(t,P,n,false,r),mf(P,r[e],0,0,-1,0)),n[e]=false,Q;}function O_(t){var e,A,n,P,r,i,f,D;for(A=0;A<t.j.i;A++)if(t.e[A])for(P=0;P<2;P++){for(f=K(t.j,P,A),e=false,i=0;i<O(t.j,f);i++)if(A!=Nt(t.j,f,i)&&t.e[Nt(t.j,f,i)]){e=true;break;}if(!e){for(D=A,n=K(t.j,1-P,A);D!=-1;)for(t.d[f]=false,t.e[D]=false,--t.c,g0(t.j,D,8),D=-1,f=n,r=0;r<O(t.j,f);r++)if(t.e[Nt(t.j,f,r)])if(D==-1)D=Nt(t.j,f,r),n=_(t.j,f,r);else {f=-1,D=-1;break;}f!=-1&&(t.d[n]=false);break;}}}function q_(t,e,A){var n,P,r,i,f,D,Q,o;for(r=t.g[e],P=1,D=0;D<r.length;D++)if(n=r[D],t.f[n]&&t.k[n]==2){P=2;break;}for(i=c(F,u0,7,32,0,2),Q=0;Q<r.length;Q++)n=r[Q],t.f[n]&&t.k[n]==P&&(i[t.j[n]]=uf(i[t.j[n]],(A[n]<<16)+n));for(o=0;o<32;o++)i[o]!=null&&i[o].sort(pe(Q0.prototype.ld,Q0,[]));if(ju(i,new qe()),m5(i[0],i[1])==0)return  false;for(f=0;f<i[0].length;f++)n=i[0][f]&d1,t.k[n]=0,t.j[n]=-1;return  true;}function z_(t){var e,A,n,P,r,i,f,D,Q,o,L;for(n=c(F,m,6,t.O,15,1),e=0;e<t.R.g;e++){for(o=O(t.R,e)+qi(t.R,e),Q=0,r=0;r<Le(t.R,e);r++)if(r<O(t.R,e)||r>=Ct(t.R,e)){for(L=2*t.f[_(t.R,e,r)],A=Nt(t.R,e,r),dt(t.R,A)==2&&(eA(t.R,A)||++L),f=0;f<Q&&!(L<n[f]);f++);for(D=Q;D>f;D--)n[D]=n[D-1];n[f]=L,++Q;}for(AA(t.e[e],e),a1(t.e[e],t.c,t.f[e]),i=o;i<t.O;i++)a1(t.e[e],t.c+1,0);for(P=0;P<o;P++)a1(t.e[e],t.c+1,n[P]);}}function K_(t,e){var A,n,P,r,i,f,D,Q;if(e.startsWith("M  SUB")&&(r=L1(k1((Mt(6,9,e.length),e.substr(6,3))),f1,Et),r>0)){for(A=10,Q=14,i=1;i<=r;++i,A+=8,Q+=8)if(n=L1(k1((Mt(A,A+3,e.length),e.substr(A,A+3-A))),f1,Et)-1,f=L1(k1((Mt(Q,Q+3,e.length),e.substr(Q,Q+3-Q))),f1,Et),f==-2)w1(t.j,n,O1,true);else if(f>0){for(D=0,P=0;P<t.j.s;P++)(K(t.j,0,P)==n||K(t.j,1,P)==n)&&++D;f>D&&w1(t.j,n,S0,true);}}}function BR(t,e){var A,n,P,r,i,f;return P=tk(t),f=tk(e),P==f?t.e==e.e&&t.a<54&&e.a<54?t.f<e.f?-1:t.f>e.f?1:0:(n=t.e-e.e,A=(t.d>0?t.d:w.Math.floor((t.a-1)*mo)+1)-(e.d>0?e.d:w.Math.floor((e.a-1)*mo)+1),A>n+1?P:A<n-1?-P:(r=(!t.c&&(t.c=jP(E1(t.f))),t.c),i=(!e.c&&(e.c=jP(E1(e.f))),e.c),n<0?r=RP(r,Qi(-n)):n>0&&(i=RP(i,Qi(n))),ss(r,i))):P<f?-1:1;}function J_(t){var e,A,n,P,r,i,f,D,Q,o,L;for(t.b=c(F,m,6,t.i.g,15,1),f=c(F,m,6,t.i.g,15,1),n=c(Pt,it,6,t.i.i,16,1),L=0,A=0;A<t.i.i;A++)if(!n[A]&&t.g[A])for(++L,t.b[K(t.i,0,A)]=L,t.b[K(t.i,1,A)]=L,n[A]=true,Q=0;Q<2;Q++)for(e=K(t.i,Q,A),t.b[e]=L,i=0,D=0,f[0]=e;i<=D;){for(o=0;o<O(t.i,f[i]);o++)r=Nt(t.i,f[i],o),!n[r]&&t.g[r]&&(n[r]=true,P=_(t.i,f[i],o),t.b[P]==0&&(t.b[P]=L,f[++D]=P));++i;}t.j=L;}function Y_(t,e,A,n,P){var r,i;if(r=at(V(e[0],g1),V(n[0],g1)),t[0]=Ot(r),r=O0(r,32),A>=P){for(i=1;i<P;i++)r=at(r,at(V(e[i],g1),V(n[i],g1))),t[i]=Ot(r),r=O0(r,32);for(;i<A;i++)r=at(r,V(e[i],g1)),t[i]=Ot(r),r=O0(r,32);}else {for(i=1;i<A;i++)r=at(r,at(V(e[i],g1),V(n[i],g1))),t[i]=Ot(r),r=O0(r,32);for(;i<P;i++)r=at(r,V(n[i],g1)),t[i]=Ot(r),r=O0(r,32);}z(r,0)!=0&&(t[i]=Ot(r));}function n6(t,e,A,n,P){s8();var r,i,f,D,Q,o,L,s,y,l,h;for(D=0;D<e.length;D++)X8(A,t.k[e[D]]);for(ZU(A,1/e.length),Q=0;Q<e.length;Q++)P[Q][0]=t.k[e[Q]].a-A.a,P[Q][1]=t.k[e[Q]].b-A.b,P[Q][2]=t.k[e[Q]].c-A.c;for(l=j1(Ut,[c0,Tt],[15,6],15,[3,3],2),o=0;o<e.length;o++)for(L=0;L<3;L++)for(s=0;s<3;s++)l[L][s]+=P[o][L]*P[o][s];for(h=new sy(l),r=h.e,y=0,f=1;f<3;f++)r[f]<r[y]&&(y=f);i=h.a,n.a=i[0][y],n.b=i[1][y],n.c=i[2][y];}function X_(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l;if(o=c(Pt,it,6,e.r,16,1),s=KQ(e,t.k[0],t.p[1],o,null,null),P=0,t.k[0]!=t.p[2]&&(P=C5(e,t.k[0],t.p[2])),Q=false,s>n-P-s&&(s=n-P-s,Q=true),Q&&P!=0){for(l=t.k[0],i=t.p[1];e.p[l]==2&&e.k[l]==2&&e.D[l]<10;)for(o[l]=true,L=0;L<2;L++)if(f=e.j[l][L],f!=i){i=l,l=f;break;}}for(y=0,D=A[t.p[1]],t.o=c(F,m,6,s,15,1),r=0;r<e.r;r++)A[r]==D&&o[r]^Q&&(t.o[y++]=r);t.n=t.p[Q?2:1];}function vR(t,e){Xg();var A,n,P,r;n=new Ks(t);try{for(r=new Th(),QA(r,"$RXN"+Zf),Ni(r.a,e??""),QA(r,Zf+(""+Zf)),QA(r,Yy+t6(t,!0,27)),QA(r,Zf),QA(r,"  "+n.g.a.length+"  "+n.f.a.length+Zf),P=MZ(n),A=0;A<n.g.a.length+n.f.a.length;A++)QA(r,"$MOL"+Zf),nx(new j6(A<n.g.a.length?G(n.g,A):G(n.f,A-n.g.a.length),P,null),r);this.a=r.a;}catch(i){if(i=_1(i),Yt(i,19))q1();else throw At(i);}}function Z_(t){var e,A,n,P,r,i,f,D,Q,o;for(r=dP(t,t.r,t.s,Bn),i=r*r/16,n=1;n<t.r;n++)for(P=0;P<n;P++)if(D=t.K[P].a-t.K[n].a,Q=t.K[P].b-t.K[n].b,o=t.K[P].c-t.K[n].c,D*D+Q*Q+o*o<i)throw At(new H1("The distance between two atoms is too close."));for(ut(t,1),e=0,A=0;A<t.g;A++){if(G1(t,A)>(f=En(t,A),f+en(t,A,f,t.D[A])))throw At(new H1("atom valence exceeded"));e+=t.t[A];}if(e!=0)throw At(new H1("unbalanced atom charge"));}function JQ(t,e){var A,n,P,r,i,f,D,Q,o;return A=t.K[e[0]],n=t.K[e[1]],P=t.K[e[2]],r=t.K[e[3]],D=new Ke(n.a-A.a,n.b-A.b,n.c-A.c),Q=new Ke(P.a-n.a,P.b-n.b,P.c-n.c),o=new Ke(r.a-P.a,r.b-P.b,r.c-P.c),i=new Ke(D.b*Q.c-D.c*Q.b,-(D.a*Q.c-D.c*Q.a),D.a*Q.b-D.b*Q.a),f=new Ke(Q.b*o.c-Q.c*o.b,-(Q.a*o.c-Q.c*o.a),Q.a*o.b-Q.b*o.a),-w.Math.atan2(w.Math.sqrt(Q.a*Q.a+Q.b*Q.b+Q.c*Q.c)*(D.a*f.a+D.b*f.b+D.c*f.c),i.a*f.a+i.b*f.b+i.c*f.c);}function YQ(t,e){var A,n,P,r,i,f,D,Q,o;return A=Z0(t,e[0]),n=Z0(t,e[1]),P=Z0(t,e[2]),r=Z0(t,e[3]),D=new Ke(n.a-A.a,n.b-A.b,n.c-A.c),Q=new Ke(P.a-n.a,P.b-n.b,P.c-n.c),o=new Ke(r.a-P.a,r.b-P.b,r.c-P.c),i=new Ke(D.b*Q.c-D.c*Q.b,-(D.a*Q.c-D.c*Q.a),D.a*Q.b-D.b*Q.a),f=new Ke(Q.b*o.c-Q.c*o.b,-(Q.a*o.c-Q.c*o.a),Q.a*o.b-Q.b*o.a),-w.Math.atan2(w.Math.sqrt(Q.a*Q.a+Q.b*Q.b+Q.c*Q.c)*(D.a*f.a+D.b*f.b+D.c*f.c),i.a*f.a+i.b*f.b+i.c*f.c);}function FR(t,e){var A,n,P,r,i,f;for(P=null,r=t.a.a.length+e,f=e*12,n=new n1(),i=0;i<f&&t.a.a.length<r&&!(gt(t.n,0)&&(q1(),I1(E1(Date.now()),t.n)));i++)!P&&(P=new Hu(t.d)),aj(t,P)?jR(t,P,t.a,0)&&(P=null):jR(t,P,n,1)&&(P=null);t.a.a.length==0&&n.a.length!=0&&(A=Qf(n,c(CS,LE,97,0,0,1)),ju(A,new Ww()),MP(t.a,new JD(new lU(A),0,w.Math.min(e,A.length))),t.e=true),(t.a.a.length<r||t.a.a.length==t.b)&&(t.e=true);}function kf(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;for(s=-1,l=dP(t,t.r,t.s,Bn),y=Ge,n=0;n<t.s;n++)h=t.K[t.F[0][n]].a,g=t.K[t.F[0][n]].b,T=t.K[t.F[1][n]].a,k=t.K[t.F[1][n]].b,o=T-h,L=k-g,P=w.Math.sqrt(o*o+L*L),r=(h+T)/2,i=(g+k)/2,o=e-r,L=A-i,!(w.Math.sqrt(o*o+L*L)>P/2)&&(T==h?Q=w.Math.abs(h-e):(f=(k-g)/(h-T),D=-f*h-g,Q=w.Math.abs((f*e+A+D)/w.Math.sqrt(f*f+1))),Q<l&&Q<y&&(y=Q,s=n));return s;}function W_(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l;for(P=K(t.i,0,e),r=K(t.i,1,e),D=c(F,m,6,t.i.g,15,1),Q=c(F,m,6,t.i.g,15,1),o=c(F,m,6,t.i.g,15,1),D[0]=P,D[1]=r,Q[P]=1,Q[r]=2,o[P]=-1,o[r]=P,f=1,L=1;f<=L;){for(s=0;s<O(t.i,D[f]);s++){if(i=_(t.i,D[f],s),f>1&&i==P){for(l=c(F,m,6,Q[D[f]],15,1),n=D[f],y=0;y<l.length;y++)l[y]=n,n=o[n];return l;}Q[i]==0&&!A[i]&&(D[++L]=i,Q[i]=Q[D[f]]+1,o[i]=D[f]);}++f;}return null;}function __(t,e){var A,n,P,r,i,f,D,Q,o,L;for(o=Et,D=-1,L=-1,Q=-1,n=0;n<t.j.i.g;n++)if(g3(t.j,n)&&t.j.k[n]!=0)for(f=0;f<e.length;f++)P=e[f]<t.a?e[f]:e[f]<t.b?e[f]-t.a:-1,r=e[f]<t.a?1:e[f]<t.b?2:0,t.j.k[n]==r&&t.j.j[n]==P&&o>t.j.a[n]+(r==1?o0:0)&&(o=t.j.a[n]+(r==1?o0:0),D=P,L=r,Q=e[f]);for(A=0;A<t.j.i.g;A++)g3(t.j,A)&&t.j.k[A]==L&&t.j.j[A]==D&&(t.j.k[A]=0,t.j.j[A]=-1);for(i=0;i<t.j.g.length;i++)t.e[Q][i]=false;}function $_(t){var e,A,n,P,r;if(A=t.indexOf(p0(38)),A==-1)return t;for(P=0,r=new gD();A!=-1;)Ni(r,(Mt(P,A,t.length),t.substr(P,A-P))),zt(A+1,t.length),t.charCodeAt(A+1)==38?(r.a+="&",P=A+2):(e=(zt(A+1,t.length),t.charCodeAt(A+1)),e=e-(e<65?48:e<97?65:97),n=(zt(A+2,t.length),t.charCodeAt(A+2)),n=n-(n<65?48:n<97?65:97),EB(r,16*e+n&d1),P=A+3),A=t.indexOf(p0(38),P);return Ni(r,(zt(P,t.length+1),t.substr(P))),r.a;}function a_(t){var e,A,n,P,r,i,f,D,Q,o;e=t.a,A=t.b,n=t.c,n=d0(n,A),n=Y1(n,(r=d0(Wt(A,14),j0(A,18)),r)),e=d0(e,n),e=Y1(e,(i=d0(Wt(n,11),j0(n,21)),i)),A=d0(A,e),A=Y1(A,(f=d0(Wt(e,25),j0(e,7)),f)),n=d0(n,A),n=Y1(n,(D=d0(Wt(A,16),j0(A,16)),D)),e=d0(e,n),e=Y1(e,(Q=d0(Wt(n,4),j0(n,28)),Q)),A=d0(A,e),A=Y1(A,(o=d0(Wt(e,14),j0(e,18)),o)),n=d0(n,A),n=Y1(n,(P=d0(Wt(A,24),j0(A,8)),P)),t.a=e,t.b=A,t.c=n;}function t$(t){var e,A,n,P,r,i;for(t.L=true,r=U2(t,false);t.U<t.R.g&&r;){for(e=0;e<t.R.g;e++)AA(t.e[e],e),a1(t.e[e],t.c,t.f[e]),i=t.db[e]<<7,(t.db[e]==1||t.db[e]==2)&&t.bb[e]!=0&&(i|=t.bb[e]<<5,i|=t.ab[e]),a1(t.e[e],18,Wt(i,9));for(A=0;A<t.R.i;A++)n=t.o[A]<<7,(t.o[A]==1||t.o[A]==2)&&c1(t.R,A)==1&&t.n[A]!=0&&(n|=t.n[A]<<5,n|=t.k[A]),se(t.e[K(t.R,0,A)],n),se(t.e[K(t.R,1,A)],n);if(P=tP(t),t.U==P)break;t.U=P,r=U2(t,false);}}function qA(t,e){this.R=t,this.Q=e,ut(this.R,7),this.c=W8(this.R.g),(this.Q&O1)==0&&EW(this),this.jb=(e&64)!=0||rT(this.R),this.b=qq(this.R)==0,(this.Q&O1)==0&&(this.db=c(E,I,6,this.R.g,15,1),this.fb=c(Pt,it,6,this.R.g,16,1),this.ib=c(Pt,it,6,this.R.g,16,1),this.o=c(E,I,6,this.R.i,15,1),this.q=c(Pt,it,6,this.R.i,16,1),this.p=c(Pt,it,6,this.R.i,16,1)),this.d=false,Q1t(this),(this.Q&O1)==0&&pa(this),n_(this);}function e$(t,e,A,n,P){var r,i,f,D,Q,o;for(D=null,r=null,o=0;o<t.g[e].length;o++)i=t.g[e][o],t.f[i]&&(t.o[i]==1||t.o[i]==2)&&(t.k[i]==0?r=uf(r,(P[i]<<16)+i):t.k[i]==n&&t.j[i]==A&&(D=uf(D,(P[i]<<16)+i)));if(f=m5(D,r),f==0)return  false;if(f<0)for(Q=0;Q<t.g[e].length;Q++)i=t.g[e][Q],t.f[i]&&(t.o[i]==1||t.o[i]==2)&&(t.k[i]==0?(t.k[i]=n<<24>>24,t.j[i]=A<<24>>24):t.k[i]==n&&t.j[i]==A&&(t.k[i]=0,t.j[i]=-1));return  true;}function A$(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l;for(f=c(F,m,6,t.f.r,15,1),D=c(F,m,6,t.f.r,15,1),Q=c(F,m,6,t.f.r,15,1),o=c(F,m,6,t.f.r,15,1),f[0]=A,Q[A]=1,o[0]=-1,i=0,L=0;i<=L;){for(s=0;s<Ct(t.f,f[i]);s++){if(P=_(t.f,f[i],s),l=Nt(t.f,f[i],s),P==e){for(r=Q[f[i]],n=c(F,m,6,r,15,1),n[0]=l,y=1;y<r;y++)n[y]=D[i],i=o[i];return n;}Q[P]==0&&(f[++L]=P,D[L]=l,Q[P]=Q[f[i]]+1,o[L]=i);}if(i==L)return null;++i;}return null;}function n$(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h;return y=t.a,l=t.d,h=t.e,l==1?(n=V(y[0],g1),P=V(e,g1),r=Sn(n,P),Q=n9(n,P),h!=A&&(r=E0(r)),h<0&&(Q=E0(Q)),B(d(Fi,1),_e,23,0,[(Ce(),z(r,0)>=0?be(r):mP(be(E0(r)))),z(Q,0)>=0?be(Q):mP(be(E0(Q)))])):(f=l,D=h==A?1:-1,i=c(F,m,6,f,15,1),o=B(d(F,1),m,6,15,[TR(i,y,l,e)]),L=new le(D,f,i),s=new le(h,1,o),Cn(L),Cn(s),B(d(Fi,1),_e,23,0,[L,s]));}function P$(t,e,A){var n,P,r,i,f;return !oi(t.R,e)||(n=K(t.R,0,e),P=K(t.R,1,e),i=new Ff(t.R,t.f,n,P),i.f&&A==1)||(f=new Ff(t.R,t.f,P,n),f.f&&A==1)||i.f&&f.f?false:(A==3&&(i.f&&(t.V[e]=uj(t,P)),f.f&&(t.V[e]=uj(t,n))),r=t.jb?LY(t,i,f):UJ(i,f),A==1?t.o[e]=r:A==2&&(i.f&&(r==2?se(t.e[i.b],t.f[P]):se(t.e[i.d],t.f[P])),f.f&&(r==2?se(t.e[f.b],t.f[n]):se(t.e[f.d],t.f[n]))),true);}function r$(t){t=t||{};var e=0;return t.createSymmetryRank&&(e|=1),t.considerStereoheterotopicity&&(e|=2),t.encodeAtomCustomLabels&&(e|=8),t.encodeAtomSelection&&(e|=16),t.assignParitiesToTetrahedralN&&(e|=32),t.coordsAre3d&&(e|=64),t.createPseudoStereoGroups&&(e|=128),t.distinguishRacemicOrGroups&&(e|=256),t.tieBreakFreeValenceAtoms&&(e|=512),t.encodeAtomCustomLabelsWithoutRanking&&(e|=Qe),t.neglectAnyStereoInformation&&(e|=O1),e;}function kR(t,e,A,n,P,r,i){var f,D,Q,o,L,s,y,l,h,T,g;for(L=i;L>1;L--){for(h=r[L]-r[L-1],g=c(H1t,A0,176,h,0,1),f=r[L],l=0;l<h;l++){for(T=r[L-1]+l,s=f;s<r[L+1]&&n[s]==T;)++s;for(g[l]=new r0(),g[l].c=T,g[l].d=A[T],g[l].b=e[T]?0:_d(t.R,P[T]),g[l].a=c(F,m,6,s-f,15,1),o=f;o<s;o++)g[l].a[o-f]=A[o];g[l].a.sort(pe(Q0.prototype.ld,Q0,[])),f=s;}for(D=new s1(),ai(g,0,g.length,D),Q=1,y=0;y<h;y++)A[g[y].c]=Q,y!=h-1&&Uj(g[y],g[y+1])!=0&&++Q;}}function i$(t,e,A){var n,P,r,i,f,D,Q,o,L,s;for(r=0;r<t.f.s;r++)if(n=K(t.f,0,r),P=K(t.f,1,r),!(LA(t.f,r)||dt(t.f,r)!=1||Ct(t.f,n)==1||Ct(t.f,P)==1)&&!((t.e&4)!=0&&W0(t.f,n)&&W0(t.f,P))){for(L=false,Q=0;Q<2;Q++)if(i=K(t.f,Q,r),Ct(t.f,i)>2){for(s=true,D=-1,o=0;o<Ct(t.f,i);o++)f=_(t.f,i,o),f!=K(t.f,1-Q,r)&&(D==-1?D=A[f]:D!=A[f]&&(s=false));if(s){L=true;break;}}L||((t.e&8)!=0&&W0(t.f,n)&&W0(t.f,P)?e[r]=1:e[r]=2);}}function g2(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y;for(f=false,D=0;D<t.hb.a.length;D++){for(i=G(t.hb,D),e=true,y=-1,Q=false,L=0;L<i.length;L++){if(A=i[L],t.db[A]==0){e=false;break;}if(t.db[A]!=3){for(o=true,s=0;s<i.length;s++)if(s!=L&&t.f[A]==t.f[i[s]]){o=false;break;}o&&y<t.f[A]&&(y=t.f[A],Q=t.db[A]==1);}}if(e&&y!=-1){for(n=i,P=0,r=n.length;P<r;++P)A=n[P],(t.db[A]==1||t.db[A]==2)&&(t.eb[A]=Q),t.gb[A]=false;er(t.hb,i),f=true,--D;}}return f;}function mR(t,e,A,n){var P,r,i,f,D,Q,o,L,s;for(ut(e,1),n==null&&(n=c(F,m,6,e.r,15,1)),f=ne(t,1),D=ne(t,2),s=c(Pt,it,6,e.r,16,1),Q=c(F,m,6,e.r,15,1),Q[0]=A,s[A]=true,n[A]=Nn(e,t,A,f,D),i=0,o=0;i<=o;){for(L=0;L<e.e[Q[i]];L++)r=e.j[Q[i]][L],s[r]||(Q[++o]=r,s[r]=true,n[r]=Nn(e,t,r,f,D));++i;}for(P=0;P<e.s;P++)s[e.F[0][P]]&&o9(e,t,P,f,D,n==null?e.F[0][P]:n[e.F[0][P]],n==null?e.F[1][P]:n[e.F[1][P]],false);ne(t,1),ne(t,2),t.U=0;}function P6(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l;for(ut(t,7),r=c(Pt,it,6,t.i,16,1),L=c(Pt,it,6,t.i,16,1),l=c(F,m,6,t.g,15,1),i=0,f=1;f<t.k[e];f++)if(n=t.n[e][f],(t.G[n]&64)!=0){for(Q=0;Q<f;Q++)if(P=t.n[e][Q],(t.G[P]&64)!=0&&(L[n]=true,L[P]=true,y=B2(t,l,t.j[e][f],t.j[e][Q],A-2,null,L),L[n]=false,L[P]=false,y!=-1)){for(D=false,s=c(F,m,6,y,15,1),cm(t,l,s,y),o=0;o<y;o++)r[s[o]]||(r[s[o]]=true,D=true);D&&++i;}}return i;}function bR(t,e,A,n,P,r){var i,f,D,Q;switch(Q=1,f=false,P){case 1:Q=257;break;case 3:Q=386;break;case 4:Q=257,f=true;break;case 6:Q=129;break;default:switch(n){case 1:Q=1;break;case 2:Q=2;break;case 3:Q=4;break;case 4:Q=8;break;case 9:Q=16;}}if(i=J0(t.j,e,A,Q),D=0,f&&Ne(t.j,e,1,-1),n>4)switch(n){case 5:D|=3;break;case 6:D|=9;break;case 7:D|=10;break;case 8:Q!=16&&(D|=127);}return r==1&&(D|=256),r==2&&(D|=128),D!=0&&Xe(t.j,i,D,true),i;}function f$(t){var e,A,n,P,r,i,f,D,Q;e=t.a,A=t.b,n=t.c,e=Y1(e,n),e=d0(e,(r=d0(Wt(n,4),j0(n,28)),r)),n=at(n,A),A=Y1(A,e),A=d0(A,(i=d0(Wt(e,6),j0(e,26)),i)),e=at(e,n),n=Y1(n,A),n=d0(n,(f=d0(Wt(A,8),j0(A,24)),f)),A=at(A,e),e=Y1(e,n),e=d0(e,(D=d0(Wt(n,16),j0(n,16)),D)),n=at(n,A),A=Y1(A,e),A=d0(A,(Q=d0(Wt(e,19),j0(e,13)),Q)),e=at(e,n),n=Y1(n,A),n=d0(n,(P=d0(Wt(A,4),j0(A,28)),P)),A=at(A,e),t.a=e,t.b=A,t.c=n;}function d2(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;return o=jB(t.a,e,o1(e,A,n)),i=e.a[A],Q=e.a[n],i>Q&&(i=(T=U1(Q),U1(Q=i),T).a),l=f9(B(d(F,1),m,6,15,[1,2,0]),B(d(F,1),m,6,15,[i,Q,o]),t),l>=0?V0(t.b[l][4]):(r=e.D[A],D=e.D[n],r>D&&(r=(h=U1(D),U1(D=r),h).a),P=wB(r,t.a.f),f=wB(D,t.a.f),g=ed(t.a.f,P),k=ed(t.a.f,f),s=td(t.a.f,P),y=td(t.a.f,f),L=r==1||D==1?.05:.085,g+k-L*w.Math.pow(w.Math.abs(s-y),1.4));}function mf(t,e,A,n,P,r){var i;if((A==1||A==151||A==152)&&G1(t,e)>1)return  false;if((A==151||A==152)&&(n=A-149,A=1),i=A!=t.D[e]&&(!t.L||n0(V(t.C[e],1),0)&&(t.w==null||t.w[e]==null)),i)t.C[e]=0,t.w!=null&&t.w[e]!=null&&(t.w[e]=null),t.u!=null&&t.u[e]!=null&&(t.u[e]=null);else if(n==t.B[e]&&P==((t.v[e]&b8)>>>27)-1&&r==(t.v[e]&48))return  false;return i&&(t.D[e]=A,t.v[e]&=960,t.t[e]=0,iQ(t,t.A[e])),t.B[e]=n,aA(t,e,P),Je(t,e,r),t.U=0,true;}function jR(t,e,A,n){var P,r,i,f;if(t.g==null&&(t.g=Fb(t.d)),i=w.Math.max(t.c[n]+2.72,t.c[n]*2),e.e>i)return  false;for(yN(e,t.g),r=A.a.length-1;r>=0;r--)if(f=(ee(r,A.a.length),A.a[r]),KF(e,f),GK(e.q,f.q))return f.e>e.e?(ee(r,A.a.length),A.a.splice(r,1),A.a.push(e),t.c[n]>e.e&&(t.c[n]=e.e),true):false;if(A.a.push(e),t.c[n]>e.e)for(t.c[n]=e.e,P=A.a.length-1;P>=0;P--)f=(ee(P,A.a.length),A.a[P]),f.e>i&&cA(A,P);return  true;}function en(t,e,A,n){var P,r;return n>=171&&n<=190?0:(r=0,(t.v[e]&48)==32&&(r-=1),((t.v[e]&48)==16||(t.v[e]&48)==48)&&(r-=2),P=t.t[e],P==0&&t.L&&(n0(V(t.C[e],yr),Sf)&&(P=-1),n0(V(t.C[e],yr),Ef)&&(P=1)),n==7||n==8||n==9?r+=P:n==6||n==14||n==32?r-=w.Math.abs(P):n==15||n==33?A-r-P<=3?r+=P:r-=P:n==16||n==34||n==52?A-r-P<=4?r+=P:r-=w.Math.abs(P):n==17||n==35||n==53?A-r-P<=5?r+=P:r-=w.Math.abs(P):r-=P,r);}function D$(t,e){var A,n,P,r,i,f;if((e.startsWith("M  RBC")||e.startsWith("M  RBD"))&&(P=L1(k1((Mt(6,9,e.length),e.substr(6,3))),f1,Et),P>0))for(A=10,f=14,r=1;r<=P;++r,A+=8,f+=8)switch(n=L1(k1((Mt(A,A+3,e.length),e.substr(A,A+3-A))),f1,Et)-1,i=L1(k1((Mt(f,f+3,e.length),e.substr(f,f+3-f))),f1,Et),i){case 3:case  -1:w1(t.j,n,112,true);break;case 1:w1(t.j,n,8,true);break;case 2:w1(t.j,n,104,true);break;case 4:w1(t.j,n,56,true);}}function u$(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y;for(P=c(F,m,6,t.f.r,15,1),r=c(F,m,6,t.f.r,15,1),i=c(F,m,6,t.f.r,15,1),f=c(F,m,6,t.f.r,15,1),P[0]=e,i[e]=1,f[0]=-1,n=0,D=0;n<=D;){if(n==0||!t.b[P[n]])for(Q=0;Q<Ct(t.f,P[n]);Q++)A=_(t.f,P[n],Q),s=Nt(t.f,P[n],Q),i[A]==0&&!t.c[s]&&(P[++D]=A,r[D]=s,i[A]=i[P[n]]+1,f[D]=n);if(n==D){for(y=new Z3(i[P[n]]),o=n,L=0;L<y.a.length;L++)y.a[L]=P[o],y.b[L]=r[o],o=f[o];return y;}++n;}return null;}function Q$(t,e,A,n){var P,r,i,f,D,Q,o;return o=A>n?1:-1,Q=A>n?n:A,D=A>n?A:n,r=gB(t,Q,t.a.length,true),P=gB(t,Q,t.a.length,false),r==-1||P==-1||(f=BA(2,D,r,P+1,true,new rU(t)),i=BA(2,D,r,P+1,false,new rU(t)),f==-1||i==-1)?V0(t.b[A-1][1])-V0(t.b[n-1][1]):e==0&&_n(t.a[f][0])==0?o*V0(t.a[f][3]):e==1&&_n(t.a[i][0])==1?o*V0(t.a[i][3]):V0(t.b[A-1][1])-V0(t.b[n-1][1]);}function o$(t,e,A,n,P){var r,i,f,D,Q,o,L,s;for(r=c(F,m,6,n,15,1),s=c(F,m,6,4,15,1),s[0]=_(t,A,t.j[A][0]==e?1:0),s[1]=A,s[2]=e,s[3]=_(t,e,t.j[e][0]==A?1:0),D=0,Q=0;Q<t.e[e];Q++)i=t.j[e][Q],i!=A&&(r[D++]=i);L=c(Kt,t1,6,3,15,1),f=c(Kt,t1,6,3,15,1),o=j1(Kt,[ie,t1],[16,6],15,[3,2],2),L[0]=60,L[1]=180,L[2]=300,f[0]=33,f[1]=33,f[2]=33,o[0][0]=45,o[0][1]=75,o[1][0]=165,o[1][1]=195,o[2][0]=285,o[2][1]=315,Ft(P,new ZL(L,f,o,s,r,1));}function r6(t,e,A){var n,P,r,i,f,D;for(i=t.D[e],t.D[e]=t.D[A],t.D[A]=i,i=t.t[e],t.t[e]=t.t[A],t.t[A]=i,i=t.B[e],t.B[e]=t.B[A],t.B[A]=i,i=t.v[e],t.v[e]=t.v[A],t.v[A]=i,D=t.C[e],t.C[e]=t.C[A],t.C[A]=D,i=t.A[e],t.A[e]=t.A[A],t.A[A]=i,r=t.K[e],t.K[e]=t.K[A],t.K[A]=r,t.w!=null&&(f=t.w[e],t.w[e]=t.w[A],t.w[A]=f),t.u!=null&&(f=t.u[e],t.u[e]=t.u[A],t.u[A]=f),n=0;n<t.s;n++)for(P=0;P<2;P++)t.F[P][n]==e?t.F[P][n]=A:t.F[P][n]==A&&(t.F[P][n]=e);t.U=0;}function B2(t,e,A,n,P,r,i){var f,D,Q,o,L,s,y,l,h;if(A==n)return e[0]=A,0;for(t._b(1),o=c(F,m,6,t.r,15,1),Q=c(F,m,6,t.r,15,1),h=c(F,m,6,t.r,15,1),Q[0]=A,o[A]=1,D=0,L=0;D<=L&&o[Q[D]]<=P;){for(l=Q[D],s=0;s<t.e[l];s++)if(i==null||i.length<=t.n[l][s]||!i[t.n[l][s]]){if(f=t.j[l][s],f==n){for(y=o[l],e[y]=f,e[--y]=l;y>0;)e[y-1]=h[e[y]],--y;return o[l];}o[f]==0&&(r==null||r.length<=f||!r[f])&&(Q[++L]=f,o[f]=o[l]+1,h[f]=l);}++D;}return  -1;}function U$(t,e){var A,n,P,r,i,f;for(r=0;r<2;r++){for(A=K(e,r,t.a),f=K(e,1-r,t.a);e.p[A]==2&&e.k[A]==2&&e.D[A]<10;)for(i=0;i<2;i++)if(n=e.j[A][i],n!=f){f=A,A=n;break;}t.p[r+1]=A,t.k[r]=f;}if(e0(e,t.p[1])==0&&O(e,t.p[1])==3)t.p[0]=-1;else for(P=0;P<O(e,t.p[1]);P++)if(n=_(e,t.p[1],P),n!=t.p[2]){t.p[0]=n;break;}if(e0(e,t.p[2])==0&&O(e,t.p[2])==3)t.p[3]=-1;else for(P=0;P<O(e,t.p[2]);P++)if(n=_(e,t.p[2],P),n!=t.p[1]){t.p[3]=n;break;}}function L$(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g;for(f=t1t(e),i=c(Ut,Tt,6,f.length,15,1),n=0;n<f.length;n++){if(T=e.a[n],y=f[n],g=UN(t.e,T),A=Rn(t.b,T),l=0,h=0,w.Math.abs(g)<go)for(Q=0;Q<e.e[n];Q++)L=e.j[n][Q],f[L]<0&&(y+=f[L]/(2*e.e[L]));if(T==62)for(o=0;o<e.e[n];o++)L=e.j[n][o],f[L]>0&&(y-=f[L]/2);for(D=0;D<e.e[n];D++)L=e.j[n][D],P=o1(e,n,L),s=e.a[L],r=l8(t,e,e.F[0][P],e.F[1][P]),h+=Q$(t.e,r,T,s),l+=f[L];i[n]=(1-A*g)*y+g*l+h;}return i;}function i6(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;for(L=e.f,s=e.g,P=e.a,g=0,r=K(t.o,0,P),i=K(t.o,1,P),y=0;y<L.c.length;y++)if(A=L.e[L.c[y]],A!=r&&A!=i)for(k=XD(X(t.o,A)),l=0;l<s.c.length;l++)n=s.e[s.c[l]],n!=r&&n!=i&&(h=k+XD(X(t.o,n)),D=w.Math.abs(t.k[A].a-t.k[n].a),D<h&&(Q=w.Math.abs(t.k[A].b-t.k[n].b),Q<h&&(o=w.Math.abs(t.k[A].c-t.k[n].c),o<h&&(f=w.Math.sqrt(D*D+Q*Q+o*o),f<h&&(T=(h-f)/h,g+=T*T)))));return g;}function s$(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T;if(L=e[n==0?4:n-1],T=e[n==4?0:n+1],O(t.j,L)==3&&O(t.j,T)==3){for(y=c(F,m,6,t.j.g,15,1),s=c(Pt,it,6,t.j.i,16,1),r=A,i=0,f=r.length;i<f;++i)D=r[i],s[D]=true;for(P=0;P<t.j.i;P++)t.e[P]||(s[P]=true);if(l=B2(t.j,y,L,T,14,null,s),l==14){for(h=true,o=2;o<=12;o++)if((o&3)!=1^Or(t.j,y[o])==5){h=false;break;}if(h)for(Df(t,y[7]),Q=1;Q<=5;Q+=2)u2(t,o1(t.j,y[Q],y[Q+1])),u2(t,o1(t.j,y[Q+7],y[Q+8]));}}}function RR(t,e){var A,n,P,r;if(!e||e.r==0)return  false;if(e.s!=0)for(n=Qn(t.V,24*t.ab),ck(new mu(e),new fu(pB(t.k)),new lA(0,0,ND(t.k),Y9(t.k)),o0+Bt(n));vX(t,e,.2*n);)GL(e,.5*n,.5*n);if(K1(t),dB(e),VB(e),P=t.V.L,t.V.r==0)Uf(e,t.V),t.a||ve(t.V,P),t.eb=w.Math.max(t.eb,4),P1(t.k),N1(t,new x1(t,1,true));else {for(r=t.V.r,CD(t.V,e),t.a||ve(t.V,P),A=0;A<t.V.r;A++)vP(t.V,A,A>=r);t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true));}return  true;}function pR(t,e,A,n){this.V=t,this.U=e,this._=A,this.k=n,this.S=new n1(),this.w=5,this.t=-1,this.u=-1,this.v=null,this.e=-1,this.F=6,this.B=0,this.D=-1,this.C=0,this.A=null,this.b=true,this.a=false,this.X=0,this.s=11,this.i=new C0(),this.c=331,this.$=1,this.ab=(Re==-1&&(Re=globalThis.devicePixelRatio||1),Re),this.T=Bt(w.Math.round((Re==-1&&(Re=globalThis.devicePixelRatio||1),Re*24))),(this.U&6)!=0&&(this.U|=1),(this.U&12)!=0&&(this.I=new QU()),this.eb=4;}function MR(t){var e,A,n,P,r,i,f,D,Q,o;if(t.e.a.c==1)return t.i;for(Q=$n(t.i),ve(Q,true),ut(Q,7),P=0;P<Q.i;P++)t.g[P]&&(Q.I[P]=1,Q.U=0,Xe(Q,P,3,true));for(A=0;A<Q.g;A++)t.b[A]!=0&&P0(t.i,A)<4&&(Y5(Q,A),Q.v[A]&=py,Q.U&=7,Ne(Q,A,0,-1));for(f=c(F,m,6,t.j,15,1),D=c(F,m,6,t.j,15,1),n=new bA(Q).f,e=0;e<Q.g;e++)t.b[e]!=0&&(o=t.b[e]-1,D[o]<n[e]&&(D[o]=n[e],f[o]=e));for(r=0;r<t.j;r++)i=""+t.n[r]+"|"+t.k[r]+"|"+t.o[r],IP(Q,f[r],i);return Q;}function CR(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h;for(D=new SA(t.g,t.i),o=new C7(),y=0,s=0,i=c(Pt,it,6,t.g,16,1),r=c(F,m,6,t.g,15,1),h=0;h<A&&s<t.g;h++){if(s==0)r[0]=e,i[e]=true,s=1;else {for(l=s,Q=y;Q<s;Q++)for(P=r[Q],L=0;L<t.k[P];L++)if(f=t.j[P][L],!i[f])switch(n){case 0:i[f]=true,r[l++]=f;break;case 1:Ik(t,P)&&Ik(t,f)||(i[f]=true,r[l++]=f);}y=s,s=l;}L9(t,D,i,true,null),mg(o,Me(new qA(D,8)));}return bg(o,c(ft,Dt,2,o.a.a.length,6,1));}function y$(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y;for(i=c(F,m,6,t.j.r,15,1),A=0;A<t.j.r;A++)i[A]=-R1(t.j,A);for(jf(new p9(t.j),null,true),n=0;n<t.j.r;n++)i[n]+=R1(t.j,n);for(e=0;e<t.j.r;e++)if(i[e]!=0)for(f=-i[e],P=0;P<t.j.s;P++)for(Q=0;Q<2;Q++)f>0&&c1(t.j,P)==16&&K(t.j,1-Q,P)==e&&(L=K(t.j,Q,P),Ae(t.j,L)&&(o=(s=X(t.j,L),y=s<(J1(),Y4).length?Y4[s]:null,y==null?0:y[y.length-1]),r=R1(t.j,L),r<o&&(D=w.Math.min(f,o-r),b0(t.j,L,r+D),f-=D)));}function HR(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h;if(h=Yb(e,t.I),h==null||(l=Yb(A,t.B),l==null))return null;if(h.length==1&&l.length==1)return new FD(h[0],l[0]);if(y=sZ(t,h,l),y.length==1)return new FD(h[0],l[0]);for(o=NG(t.i,y.length),s=-1,r=h,f=0,Q=r.length;f<Q;++f)if(n=r[f],t.J[n]==y[o][0]){s=n;break;}for(L=-1,P=l,i=0,D=P.length;i<D;++i)if(n=P[i],t.C[n]==y[o][1]){L=n;break;}return t.o=Zb(t,t.D,t.J,s,t.o),t.n=Zb(t,t.u,t.C,L,t.n),new FD(s,L);}function o9(t,e,A,n,P,r,i,f){var D,Q,o,L;return Q=e.s,Q>=e.O&&QQ(e,e.O*2),L=(t.G[A]&768)>>8,o=-1,L==1&&(n==-1?o=ne(e,L):o=w.Math.min(32,n+((t.G[A]&768)>>8!=1&&(t.G[A]&768)>>8!=2?-1:(t.G[A]&cn)>>10))),L==2&&(P==-1?o=ne(e,L):o=w.Math.min(32,P+((t.G[A]&768)>>8!=1&&(t.G[A]&768)>>8!=2?-1:(t.G[A]&cn)>>10))),e.F[0][Q]=r,e.F[1][Q]=i,D=f&&t.$b(A)?8:t.I[A],e.I[Q]=D,e.G[Q]=t.G[A],e.H[Q]=e.L?t.H[A]:0,o!=-1&&(e.G[Q]&=-31745,e.G[Q]|=o<<10),++e.s,e.U=0,Q;}function Qi(t){Lr();var e,A,n,P;if(e=Bt(t),t<tD.length)return tD[e];if(t<=50)return s2((Ce(),Ko),e);if(t<=1e3)return _r(s2(m9[1],e),e);if(t>1e6)throw At(new I8("power of ten too big"));if(t<=Et)return _r(s2(m9[1],e),e);for(n=s2(m9[1],Et),P=n,A=E1(t-Et),e=Bt(t%Et);z(A,Et)>0;)P=RP(P,n),A=Y1(A,Et);for(P=RP(P,s2(m9[1],e)),P=_r(P,Et),A=E1(t-Et);z(A,Et)>0;)P=_r(P,Et),A=Y1(A,Et);return P=_r(P,e),P;}function sr(t){var e,A,n,P,r,i;if(t.j!=0)return t.j;if(t.i&&X(t.e,t.a)!=15&&X(t.e,t.a)!=16){for(i=0;i<Ct(t.e,t.a);i++)if(r=Nt(t.e,t.a,i),_9(t.e,r,t.a))return _(t.e,t.a,i)==t.b?t.j=c1(t.e,r)==257?3:1:t.j=c1(t.e,r)==257?1:3,t.j;}return e=_0(t.e,t.a,t.g),n=_0(t.e,t.a,t.b),n<e&&(n+=m0),Ct(t.e,t.a)==2?(A=n-e,A>3.0915926535897933&&A<3.191592653589793?(t.j=-1,t.j):(t.j=A<l1?4:2,t.j)):(P=_0(t.e,t.a,t.d),P<e&&(P+=m0),t.j=P<n?2:4,t.j);}function l$(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y;for(L=j1(F,[u0,m],[7,6],15,[A,(t.U&6)!=0?2:1],2),D=0;D<A;D++)L[D][0]=D;if(o=aX(t,e,A),(t.U&4)!=0)for(t.Y=0,n=(t.U&4)!=0?G(t.I,0):null,Q=0;Q<A;Q++)L[Q][1]=EQ(n,o[Q].a,o[Q].b)?1:0,L[Q][1]==0&&++t.Y;else if((t.U&2)!=0)for(t.Y=A,P=0;P<t.V.r;P++)X(t.V,P)==0&&L[e[P]][1]==0&&(L[e[P]][1]=1,--t.Y);for(i=o,ju(L,new gg(t,i)),s=c(F,m,6,A,15,1),f=0;f<A;f++)y=L[f][0],s[y]=f;for(r=0;r<t.V.r;r++)e[r]=s[e[r]];}function h$(t){var e,A,n,P,r,i,f,D,Q,o,L,s;if(!t.A){for(t.A=new n1(),o=0,L=c(F,m,6,t.R.g,15,1),i=c(F,m,6,t.R.g,15,1),D=c(F,m,6,t.R.i,15,1),e=0;e<t.R.g;e++)if(L[e]==0&&(Gi(t.R,e)||e0(t.R,e)==1)){for(i[0]=e,f=1,Q=0,L[e]=++o,A=c(Pt,it,6,t.R.i,16,1),r=0;r<f;r++)for(s=0;s<O(t.R,i[r]);s++)P=Nt(t.R,i[r],s),(LA(t.R,P)||dt(t.R,P)==2||oi(t.R,P))&&(n=_(t.R,i[r],s),A[P]||(D[Q++]=P,A[P]=true),L[n]==0&&(i[f++]=n,L[n]=o));Ft(t.A,new Gk(i,f,D,Q));}}}function T$(t,e){s8();var A,n,P,r,i,f,D,Q,o,L;for(A=0;A<e.g;A++)if(e.e[A]>=3&&(o=e.v[A]&3,(o==1||o==2)&&!(e.p[A]==2&&e.k[A]==2&&e.o[A][0]==2&&e.o[A][1]==2&&e.D[A]<=7))){for(n=c(F,m,6,5,15,1),P=c(F,m,6,4,15,1),f=0;f<e.e[A];f++){for(r=e.j[A][f],i=e.n[A][f],D=0;D<f&&r>n[D];)++D;for(Q=f-1;Q>=D;Q--)n[Q+1]=n[Q],P[Q+1]=P[Q];n[D]=r,P[D]=i;}e.e[A]==3&&(n[3]=-1,P[3]=-1),n[4]=A,o==1&&(L=n[1],n[1]=n[0],n[0]=L,L=P[1],P[1]=P[0],P[0]=L),Ft(t,new bB(e,n,P));}}function c$(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T;for(l=0;l<e.j.a.length;l++)if(G(e.k,l).length!=6&&t.i[l]){for(L=true,T=G(e.k,l),o=0;o<T.length;o++)if(!t.e[T[o]]){L=false;break;}if(L){for(f=-1,D=0,h=G(e.j,l),Q=0;Q<h.length;Q++)n=h[Q],y=t.g[n]?NR(t,n,false):hb(t,n,false),D<y&&(D=y,f=Q);if(f!=-1){if(s=h[f],A){for(P=h,r=0,i=P.length;r<i;++r)n=P[r],n!=s&&cf(t,n,true);t.g[s]?NR(t,s,true):hb(t,s,true);}return Df(t,s),t.g[s]&&s$(t,h,T,f),true;}}}return  false;}function VR(t,e,A,n){var P,r,i,f,D;if(e[A+1]!=40)throw At(new H1("SmilesParser: '$' for recursive SMARTS must be followed by '('. position:"+A));for(f=1,r=A+2;r<e.length&&f>0;)e[r]==40?++f:e[r]==41&&--f,++r;if(f>0)throw At(new H1("SmilesParser: Missing closing ')' for recursive SMARTS. '('-position:"+(A+1)));if(i=new SA(16,16),D=new dQ(t.k),BI(D,t.n.f),R6(D,i,e,A+2,r-1,true,true),ve(i,true),n.a.push(i),e[A-1]==33)for(P=0;P<i.r;P++)w1(i,P,Pe,true);return r-A;}function f6(t){var e,A;for(this.j=t.j,this.i=t.i,this.e=c(F,m,6,t.e.length,15,1),this.k=c(F,m,6,t.e.length,15,1),this.a=c(Ut,Tt,6,t.e.length,15,1),this.b=c(Ut,Tt,6,t.e.length,15,1),A=0;A<t.e.length;A++)this.e[A]=t.e[A],this.k[A]=t.k[A],this.a[A]=t.a[A],this.b[A]=t.b[A];if(t.f!=null)for(this.f=c(F,m,6,t.f.length,15,1),e=0;e<t.f.length;e++)this.f[e]=t.f[e];if(t.g!=null)for(this.g=c(F,m,6,t.g.length,15,1),e=0;e<t.g.length;e++)this.g[e]=t.g[e];}function vA(t,e){var A,n,P,r,i,f;if(e.a==e.b&&e.c==e.d){for(i=new Zt(t.$);i.a<i.c.a.length;)if(r=_t(i),W9(r,e.a,e.c))return  false;return  true;}for(f=Wm(e),A=false,e.a>e.b&&(qu(e),A=true),n=0;n<t.$.a.length;n++)if(r=G(t.$,n),!(r.c>f.c+f.b||r.d>f.d+f.a||f.c>r.c+r.b||f.d>r.d+r.a)){if(t2(t,e.a,e.c,n))return t2(t,e.b,e.d,n)?(A&&qu(e),false):(Xs(t,e,0,n),P=vA(t,e),A&&qu(e),P);if(t2(t,e.b,e.d,n))return Xs(t,e,1,n),P=vA(t,e),A&&qu(e),P;}return A&&qu(e),true;}function w$(t,e){var A,n,P,r,i,f,D;if(t.D[e]!=8||t.t[e]!=0||t.k[e]!=1||t.o[e][0]!=1)return  false;if(A=t.j[e][0],t.D[A]==6){for(i=t.k[A],n=0;n<i;n++)if(P=t.j[A][n],P!=e&&t.D[P]==8&&(r=o1(t,A,P),t.I[r]==2))return  true;}else if(t.D[A]==7){if(t.t[A]==1)return  true;}else if(t.D[A]==16){for(f=t.k[A],D=0,n=0;n<f;n++)P=t.j[A][n],P!=e&&t.D[P]==8&&(r=o1(t,A,P),t.I[r]==2&&++D);if(D==2)return  true;}else if(rZ(t,e))return  true;return  false;}function g$(t,e,A){var n,P,r,i,f,D,Q,o;if(t.o[e]=A,t.n=null,P=C9(t.c,e),Bg(t.s,P,t.o[e]),D=8+(t.a?0:1),CA(t.s,5,D)==0)return t.g[e]=new n1(),t.q=0,false;for(t.g[e]=t.s.F,i=t.g[e].a.length-1;i>=0;i--)for(Q=G(t.g[e],i),f=0;f<Q.length;f++)if(Q[f]!=-1&&(n=0,t.a&&P.t[f]==0&&R1(t.o[e],Q[f])!=0&&(o=En(t.o[e],Q[f]),n=Cu(t.o[e],Q[f],o)),t.k[e][f]>0&&t.k[e][f]>_i(t.o[e],Q[f])-n)){cA(t.g[e],i);break;}for(t.q=1,r=0;r<t.o.length;r++)t.q*=t.g[r]?t.g[r].a.length:0;return  true;}function d$(t){t=t||{};var e=0;if(t.maxAVBL){if(!Number.isInteger(t.maxAVBL)||t.maxAVBL<0||t.maxAVBL>d1)throw new Error("maxAVBL must be an integer between 0 and 65535");e|=t.maxAVBL;}return (t.inflateToMaxAVBL===true||t.inflateToMaxAVBL===void 0&&t.inflateToHighResAVBL!==true)&&(e|=o0),t.inflateToHighResAVBL&&(e|=q0),t.chiralTextBelowMolecule!==false&&(e|=0),t.chiralTextAboveMolecule&&(e|=v8),t.chiralTextOnFrameTop&&(e|=B8),t.chiralTextOnFrameBottom&&(e|=b1),e;}function B$(t,e,A,n){var P,r,i,f,D,Q,o,L;for(L=c(F,m,6,t.i,15,1),D=c(Pt,it,6,t.i,16,1),i=0;i<t.i;i++)L[i]=t.I[i],e[i]&&(D[i]=true,t.I[i]=1,t.U=0);for(P=0;P<t.g;P++)if(P!=n&&t.p[P]==0&&D[t.n[n][0]])for(o=0;o<t.k[P];o++)f=t.n[P][o],t.I[f]=1,t.U=0,D[f]=false;for(Q=0;Q<t.k[A];Q++)f=t.n[A][Q],t.I[f]=1,t.U=0,D[f]=false;if(jf(new p9(t),D,false))return t.t[A]=0,t.U=0,t.k[n]!=t.e[n]&&jQ(t,_(t,n,t.e[n]-1)),ut(t,7),true;for(r=0;r<t.i;r++)g0(t,r,L[r]);return  false;}function bf(t,e,A){var n,P,r,i,f;if(t.a=false,t.d=e,an(t.e[e]&d1)){for(f=_L(t),t.c=t.b=f,n=e-1;n>1&&lO(t.e[n-1]);)--n;for(;t.e[t.d]==44;){for(i=true,r=e-n,P=0;P<r;P++)if(t.e[n+P]!==t.e[t.d+1+P]){i=false;break;}if(!i)break;t.d+=1+r,f=_L(t),t.c>f?t.c=f:t.b<f&&(t.b=f);}return t.d-e;}return t.e[e]==123&&an(t.e[e+1]&d1)?(++t.d,t.c=_L(t),t.e[t.d++]!=45||!an(t.e[t.d]&d1)||(t.b=_L(t),t.e[t.d++]!=125)?0:t.d-e):(t.c=1,t.b=A,t.a=true,0);}function ER(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y;if(dt(t,A)!=2&&!(A<t.i&&Ee(t.q,A))||(y=t.G[A]&3,y!=1&&y!=2))return  -1;for(D=0;D<2;D++){for(n=t.F[D][A],P=t.F[1-D][A],s=-1,i=false,o=0;o<t.k[n];o++)r=t.j[n][o],r!=P&&(r==e?i=true:s=r);if(i){for(L=-1,f=-1,Q=0;Q<t.k[P];Q++)r=t.j[P][Q],r!=n&&(L==-1?L=r:r>L?f=r:(f=L,L=r));return t.k[n]==2?t.k[P]==2?y==2?L:-1:y==2?L:f:t.k[P]==2?y==2^e<s?-1:L:y==2^e<s?f:L;}}return  -1;}function D6(t,e){var A,n,P,r,i,f,D,Q,o,L;if(e.e==0)throw At(new I8(DE));return P=e.e,e.d==1&&e.a[0]==1?e.e>0||t.e==0?t:new le(-t.e,t.d,t.a):(o=t.e,Q=t.d,n=e.d,Q+n==2?(L=Sn(V(t.a[0],g1),V(e.a[0],g1)),o!=P&&(L=E0(L)),z(L,0)>=0?be(L):mP(be(E0(L)))):(A=Q!=n?Q>n?1:-1:sQ(t.a,e.a,Q),A==0?o==P?X2:Rc:A==-1?vr:(i=Q-n+1,r=c(F,m,6,i,15,1),f=o==P?1:-1,n==1?TR(r,t.a,Q,e.a[0]):vp(r,i,t.a,Q,e.a,n),D=new le(f,i,r),Cn(D),D)));}function SR(t){var e,A,n,P,r;for(t.a=j1(F,[u0,m],[7,6],15,[t.d.length,4],2),t.c=j1(F,[u0,m],[7,6],15,[t.d.length,2],2),t.e=c(F,m,6,t.d.length,15,1),e=c(F,m,6,2,15,1),P=0;P<t.d.length;P++){for(r=0;r<2;r++)e[0]=K(t.b,1-r,t.d[P]),e[1]=K(t.b,r,t.d[P]),PL(t.b,e[1])&&G5(t.b,e[0],e,null),t.a[P][1+r]=e[1],t.c[P][r]=e[0];A=Yj(t,t.a[P][1],t.c[P][0]),n=Yj(t,t.a[P][2],t.c[P][1]),t.e[P]=vE[A][n],t.a[P][0]=jj(t,t.a[P][1],t.c[P][0],A),t.a[P][3]=jj(t,t.a[P][2],t.c[P][1],n);}}function v$(t){var e,A,n,P,r,i;for(Z_(t),ut(t,31),n=0;n<t.g;n++){if(((t.v[n]&b1)>>18==1||(t.v[n]&b1)>>18==2)&&((t.v[n]&wn)==0||(t.v[n]&3)==3))throw At(new H1(r4));if((t.v[n]&o0)!=0)throw At(new H1(i4));if(((t.v[n]&3)==1||(t.v[n]&3)==2)&&t.p[n]==0){for(e=c(Ut,Tt,6,t.k[n],15,1),r=0;r<t.k[n];r++)e[r]=_0(t,n,t.j[n][r]);for(P=1;P<t.k[n];P++)if(!_9(t,t.n[n][P],n)){for(i=0;i<P;i++)if(!_9(t,t.n[n][i],n)&&(A=w.Math.abs(Ze(e[P],e[i])),A<.08||A>yM))throw At(new H1(f4));}}}}function F$(t,e,A){var n,P,r,i,f,D,Q,o,L,s;for(n=c(F,m,6,t.g,15,1),L=c(Pt,it,6,t.g,16,1),L[A]=true,L[e]=true,n[0]=e,i=0,f=1;i<=f;){for(Q=0;Q<t.k[n[i]];Q++)eA(t,t.n[n[i]][Q])&&(r=t.j[n[i]][Q],L[r]||(n[++f]=r,L[r]=true));++i;}for(o=0;o<=f;o++)for(s=0;s<t.k[n[o]];s++)r=t.j[n[o]][s],!L[r]&&!LA(t,t.n[n[o]][s])&&KQ(t,n[o],r,L,null,null);for(L[A]=false,D=0;D<=f;D++)L[n[D]]=false;for(P=0;P<L.length;P++)L[P]&&(n[++f]=P);return o8(f+1),pP(n,c(F,m,6,f+1,15,1),0,f+1);}function Zs(){Zs=v1,LS=B(d(F,1),m,6,15,[f1,1162261467,dn,1220703125,362797056,1977326743,dn,387420489,Jf,214358881,429981696,815730721,1475789056,170859375,d9,410338673,612220032,893871739,128e7,1801088541,113379904,148035889,191102976,244140625,308915776,387420489,481890304,594823321,729e6,887503681,dn,1291467969,1544804416,1838265625,60466176]),sS=B(d(F,1),m,6,15,[-1,-1,31,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]);}function k$(t,e){var A,n,P,r,i;if(t.i!=0&&t.k!=null){for(n=a5(t)/t.p.c,nA(e,t.i),oL(e,Bt(1.6*n),true,false),r=0;r<t.k.length;r++)if(t.k[r].r!=0){for(P=new yg(),A=0;A<t.k[r].r;A++)P.a=Bt(P.a+mt(t.k[r],A)),P.b=Bt(P.b+Rt(t.k[r],A));P.a=P.a/t.k[r].r|0,P.b=P.b/t.k[r].r|0,P.a=Bt(W1(t.e[r].R,P.a)),P.b=Bt(Z1(t.e[r].R,P.b)),i=t.c==0?""+(r+1):t.c==2?r<t.j?""+String.fromCharCode(65+r&d1):"R"+(r+1-t.j):t.c==1?r<t.n?""+String.fromCharCode(65+r&d1):"P"+(r+1-t.n):"?"+(r+1),z3(e,P.a,P.b,i);}}}function m$(t){var e,A,n,P,r,i,f,D,Q,o;for(r=0,A=0;A<t.R.g;A++)t.bb[A]!=0&&(t.bb[A]!=2||(t.Q&256)==0)&&++r;if(r!=0){for(o=c(F,m,6,r,15,1),r=0,n=0;n<t.R.g;n++)t.bb[n]!=0&&(t.bb[n]!=2||(t.Q&256)==0)&&(o[r]=t.bb[n]<<29|t.ab[n]<<24|t.f[n]<<12|n,++r);for(o.sort(pe(Q0.prototype.ld,Q0,[])),i=0,Q=0,f=o[0]&On;;)if(++Q,Q==o.length||f!=(o[Q]&On)){for(P=c(F,m,6,Q-i,15,1),D=i;D<Q;D++)e=o[D]&4095,P[D-i]=e,t.gb[e]=true;if(Ft(t.hb,P),Q==o.length)break;f=o[Q]&On,i=Q;}}}function IR(t){var e,A,n,P;if(t.length==0||(zt(0,t.length),t.charCodeAt(0)!=62))return null;for(n=1,P=0,e=0;n<t.length;){if(zt(n,t.length),t.charCodeAt(n)==60){if(P!=0)return null;P=n;}else if(zt(n,t.length),t.charCodeAt(n)==62){if(e!=0)return null;e=n;}++n;}if(P!=0&&P<e)return Mt(P+1,e,t.length),t.substr(P+1,e-(P+1));if(n=t.indexOf("DT",1),n==-1)return null;for(A=n+2;t.length>A&&an((zt(A,t.length),t.charCodeAt(A)));)++A;return A==n+2?null:(Mt(n,A,t.length),t.substr(n,A-n));}function b$(t,e,A,n,P,r,i,f,D,Q){var o,L,s,y,l,h,T,g,k,v;t!=e&&(o=t9(t,e),!(D[o[0]][o[1]]&&D[o[0]][o[1]].a.length==1)&&(s=f.a[i]-f.a[A]*w.Math.cos(P)-f.a[n]*w.Math.cos(r),k=f.a[A]*w.Math.sin(P),v=f.a[n]*w.Math.sin(r),y=k+v,l=k-v,T=w.Math.sqrt(s*s+l*l),h=w.Math.sqrt(s*s+y*y),g=c(F,m,6,2,15,1),g[0]=Q.F[0][i],g[1]=Q.F[1][i],L=D[o[0]][o[1]],L?(L.a[0]=w.Math.min(L.a[0],T),L.a[1]=w.Math.min(L.a[1],h)):D[o[0]][o[1]]=new is(o,g,T,h,3)));}function j$(t,e,A,n,P){if(e[A-1]==42)t.d=6,t.c=J(t.c,1);else if(e[A-1]==63)t.d=0;else if((e[A-1]==65||e[A-1]==97)&&P)t.d=6,t.c=J(t.c,1),t.c=J(t.c,e[A-1]==65?4:2),t.r=true;else switch(String.fromCharCode(e[A-1]).toUpperCase().charCodeAt(0)){case 66:A<n&&e[A]==114?(t.d=35,++A):t.d=5;break;case 67:A<n&&e[A]==108?(t.d=17,++A):t.d=6;break;case 70:t.d=9;break;case 73:t.d=53;break;case 78:t.d=7;break;case 79:t.d=8;break;case 80:t.d=15;break;case 83:t.d=16;}return A;}function R$(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T;for(n=c(Ut,Tt,6,2,15,1),y=GY(t,A),D=0;D<2;D++)if(A[3*D]!=-1){for(r=2-D,l=3-3*D,Q=0,s=0;s<3;s++)i=t.j[A[r]][s],i!=y[1-D]&&t.D[i]!=1&&(A[l]=i,e?n[Q++]=YQ(e,A):n[Q++]=JQ(t,A));return A[l]=-1,bT(n);}for(P=c(Ut,Tt,6,2,15,1),o=0,f=0;f<3;f++)if(h=t.j[A[1]][f],h!=y[0]&&t.D[h]!=1){for(A[0]=h,L=0,s=0;s<3;s++)T=t.j[A[2]][s],T!=y[1]&&t.D[T]!=1&&(A[3]=T,e?P[L++]=YQ(e,A):P[L++]=JQ(t,A));n[o++]=bT(P);}return A[0]=-1,A[3]=-1,bT(n);}function xR(t,e){Xv();var A,n,P,r,i,f,D,Q,o,L,s,y;for(this.e=e,this.a=c(F,m,6,e.length+t.length,15,1),this.b=c(F,m,6,e.length+t.length,15,1),this.d=c(F,m,6,e.length+t.length,15,1),A=0,r=0,P=0,f=e,D=0,Q=f.length;D<Q;++D)i=f[D],n=jv(i.d.length),A+n<=64?(this.b[P]=A,A+=n):(++r,this.b[P]=0,A=0),this.a[P]=n,this.d[P]=r,++P;for(L=t,s=0,y=L.length;s<y;++s)o=L[s],n=jv(o.b.length),A+n<=64?(this.b[P]=A,A+=n):(++r,this.b[P]=0,A=0),this.a[P]=n,this.d[P]=r,++P;this.c=r+1;}function p$(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l;for(Q=c(F,m,6,t.k.g,15,1),f=c(F,m,6,t.k.g,15,1),D=c(F,m,6,t.k.g,15,1),o=c(F,m,6,t.k.g,15,1),A=K(t.k,0,e),n=K(t.k,1,e),f[0]=A,f[1]=n,D[0]=-1,D[1]=e,Q[A]=1,Q[n]=2,o[A]=-1,o[n]=A,i=1,L=1;i<=L&&Q[f[i]]<15;){for(l=f[i],s=0;s<O(t.k,l);s++)if(P=_(t.k,l,s),P!=o[l]){if(r=Nt(t.k,l,s),P==A){for(D[0]=r,y=0;y<=L;y++)t.g[D[s]]||(t.g[D[s]]=true,++t.c);return;}W0(t.k,P)&&Q[P]==0&&(++L,f[L]=P,D[L]=r,Q[P]=Q[l]+1,o[P]=l);}++i;}}function Ws(t,e){var A,n,P,r,i,f,D,Q,o,L;if(i=t.e,D=e.e,D==0)return t;if(i==0)return e.e==0?e:new le(-e.e,e.d,e.a);if(r=t.d,f=e.d,r+f==2)return A=V(t.a[0],g1),n=V(e.a[0],g1),i<0&&(A=E0(A)),D<0&&(n=E0(n)),Ce(),ku(Y1(A,n),0)?be(Y1(A,n)):mP(be(E0(Y1(A,n))));if(P=r!=f?r>f?1:-1:sQ(t.a,e.a,r),P==-1)L=-D,o=i==D?bL(e.a,f,t.a,r):HL(e.a,f,t.a,r);else if(L=i,i==D){if(P==0)return Ce(),vr;o=bL(t.a,r,e.a,f);}else o=HL(t.a,r,e.a,f);return Q=new le(L,o.length,o),Cn(Q),Q;}function M$(){var t,e,A,n,P,r,i;if(!ec)try{for(t=o2("bondLengthData.txt"),A=X1(t),e=A==null?0:L1(A,f1,Et),po=c(F,m,6,e,15,1),a4=c(Oe,uA,6,e,15,1),tc=c(Oe,uA,6,e,15,1),BE=c(F,m,6,e,15,1),P=0;P<e;P++)if(i=X1(t),i!=null&&(r=c8(i,"\\t"),r.length==4))try{po[P]=L1(r[0],f1,Et),a4[P]=sn(r[1]),tc[P]=sn(r[2]),BE[P]=L1(r[3],f1,Et);}catch(f){if(f=_1(f),Yt(f,42))break;throw At(f);}ec=!0;}catch(f){if(f=_1(f),Yt(f,79))n=f,ur(n,(q1(),k9));else throw At(f);}}function C$(t,e){var A,n;return n={},A=t.H[e],n.single=I1(V(A,1),0),n.double=I1(V(A,2),0),n.triple=I1(V(A,4),0),n.delocalized=I1(V(A,8),0),n.metalLigand=I1(V(A,16),0),n.quadruple=I1(V(A,32),0),n.quintuple=I1(V(A,64),0),n.notRing=I1(V(A,128),0),n.ring=I1(V(A,256),0),n.aromatic=I1(V(A,KA),0),n.nonAromatic=I1(V(A,oP),0),n.ringSize=Ot(V(A,NP))>>17,n.brigdeMin=Ot(V(A,7680))>>9,n.brigdeSpan=Ot(V(A,jy))>>13,n;}function NR(t,e,A){if(t.f[e])return 0;if(X(t.j,e)==7){if(Ct(t.j,e)==3)return 6;if(O(t.j,e)==2)return t.a?0:4;}else {if(X(t.j,e)==8)return 10;if(X(t.j,e)==15||X(t.j,e)==33){if(O(t.j,e)==3)return 8;}else if(X(t.j,e)==16||X(t.j,e)==34||X(t.j,e)==52){if(O(t.j,e)==2)return 11;if(O(t.j,e)==3)return R1(t.j,e)==1?12:(A&&b0(t.j,e,1),5);}else if(X(t.j,e)==6)return R1(t.j,e)==-1?Ct(t.j,e)==3?16:Le(t.j,e)==3?15:14:(A&&b0(t.j,e,-1),Ct(t.j,e)!=Le(t.j,e)?2:3);}return 0;}function H$(t){var e,A,n,P,r,i,f;for(f=false,A=0;A<t.g;A++)((t.v[A]&wn)==0||(t.v[A]&3)==3)&&(t.v[A]&=My);for(r=0;r<t.i;r++)(dt(t,r)!=1||(t.G[r]&3)==0||(t.G[r]&3)==3)&&(t.G[r]&=-32513);if(t.M){if((t.J&GP)!=q0){for(i=c(Pt,it,6,t.g,16,1),n=0;n<t.g;n++)(t.v[n]&wn)!=0&&(t.v[n]&3)!=3&&(t.v[n]&b1)>>18==1&&(i[n]=true);for(P=0;P<t.g;P++)(t.v[P]&wn)!=0&&(t.v[P]&3)!=3&&(Ne(t,P,1,0),f=true);for(e=0;e<t.g;e++)i[e]&&(me(t,e,1,false),Ne(t,e,1,-1),f=true);}t.M=false;}return ne(t,1),ne(t,2),f;}function V$(t){var e,A,n;if(t.a==0)return  true;if(t.d.length==1&&t.c.length==1)return (t.e.i==null||t.e.i[t.d[0]]==null||!t.e.i[t.d[0]][t.c[0]])&&(++t.e.b,t.e.f[t.d[0]]=t.e.b,t.e.d[t.c[0]]=t.e.b),true;if(Tb(t.d,t.e.e)||Tb(t.c,t.e.c)){for(e=w.Math.min(t.d.length,t.c.length),n=0;e!=0&&n<t.d.length;n++)for(A=0;A<t.c.length;A++)if(t.e.d[t.c[A]]==0&&(t.e.i==null||t.e.i[t.d[n]]==null||!t.e.i[t.d[n]][t.c[A]])){--e,++t.e.b,t.e.f[t.d[n]]=t.e.b,t.e.d[t.c[A]]=t.e.b;break;}return  true;}return  false;}function GR(t,e,A,n,P,r,i){eR();var f,D;this.a=e,this.p=c(F,m,6,4,15,1),this.k=c(F,m,6,2,15,1),f=new YT(),Qk(t,e,this.p,f)!=null?(this.k[0]=f.e[0],this.k[1]=f.e[1]):U$(this,t),this.i=A[this.p[1]],this.j=A[this.p[2]],this.f=r[this.i],this.g=r[this.j],this.b=A[t.F[0][e]]==this.i,i?(this.d=jS,this.c=mS,this.e=bS):(this.d=vG(f.d),this.d==null?(D=new b6(t,this.p),this.d=D.b,this.c=D.a,this.e=D.c):(this.c=dG(f.d),this.e=BG(f.d))),Y$(this,t),p_(this,t),X_(this,t,n,P);}function E$(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l;for(D=n+1;D<t.j.g.length;D++)if(D!=n&&t.e[e][D]&&t.e[A][D])return i=c(F,m,6,2,15,1),i[0]=A,i[1]=e,i;for(l=c(F,m,6,t.b,15,1),o=c(F,m,6,t.b,15,1),Q=c(F,m,6,t.b,15,1),r=0,L=0,Q[0]=e,o[e]=1;r<=L;){for(s=0;s<t.d[Q[r]].length;s++){if(P=t.d[Q[r]][s],P==A){if(r==0)continue;for(f=o[Q[r]]+1,i=c(F,m,6,f,15,1),i[0]=P,i[1]=Q[r],y=2;y<f;y++)i[y]=l[i[y-1]];return i;}o[P]==0&&t.c[P]!=-3&&(o[P]=o[Q[r]]+1,Q[++L]=P,l[P]=Q[r]);}++r;}return null;}function S$(t){var e,A,n,P;if(t.g.a.length+t.f.a.length<=1)return  false;for(e=Jb(t),P=c(Rl,A0,36,t.g.a.length+t.f.a.length,0,1),A=0;A<t.g.a.length+t.f.a.length;A++)if(P[A]=vj(A<t.g.a.length?G(t.g,A):G(t.f,A-t.g.a.length),null),P[A]){for(n=0;n<A;n++)if(P[n]&&(P[A].c+P[A].b>=P[n].c&&P[A].c<=P[n].c+P[n].b||P[A].d+P[A].a>=P[n].d&&P[A].d<=P[n].d+P[n].a))return  true;if(A!=0&&P[A-1]&&(P[A].c-P[A-1].c-P[A].b>5*e||P[A].d-P[A-1].d-P[A].a>5*e))return  true;}return  false;}function Ne(t,e,A,n){var P,r,i;if(A==0)t.v[e]&=My,t.v[e]|=A<<18;else {if(n>=32)return;if(n==-1){for(i=-1,r=0;r<t.r;r++)r!=e&&A==(t.v[r]&b1)>>18&&i<((t.v[r]&b1)>>18!=1&&(t.v[r]&b1)>>18!=2?-1:(t.v[r]&VA)>>20)&&(i=(t.v[r]&b1)>>18!=1&&(t.v[r]&b1)>>18!=2?-1:(t.v[r]&VA)>>20);for(P=0;P<t.s;P++)A==(t.G[P]&768)>>8&&i<((t.G[P]&768)>>8!=1&&(t.G[P]&768)>>8!=2?-1:(t.G[P]&cn)>>10)&&(i=(t.G[P]&768)>>8!=1&&(t.G[P]&768)>>8!=2?-1:(t.G[P]&cn)>>10);if(n=i+1,n>=32)return;}t.v[e]&=My,t.v[e]|=A<<18|n<<20;}t.U&=7;}function T8(t,e,A,n){var P,r,i;if(A==0)t.G[e]&=-32513,t.G[e]|=A<<8;else {if(n>=32)return;if(n==-1){for(i=-1,r=0;r<t.r;r++)A==(t.v[r]&b1)>>18&&i<((t.v[r]&b1)>>18!=1&&(t.v[r]&b1)>>18!=2?-1:(t.v[r]&VA)>>20)&&(i=(t.v[r]&b1)>>18!=1&&(t.v[r]&b1)>>18!=2?-1:(t.v[r]&VA)>>20);for(P=0;P<t.s;P++)P!=e&&A==(t.G[P]&768)>>8&&i<((t.G[P]&768)>>8!=1&&(t.G[P]&768)>>8!=2?-1:(t.G[P]&cn)>>10)&&(i=(t.G[P]&768)>>8!=1&&(t.G[P]&768)>>8!=2?-1:(t.G[P]&cn)>>10);if(n=i+1,n>=32)return;}t.G[e]&=-32513,t.G[e]|=A<<8|n<<10;}t.U&=7;}function I$(t,e){var A,n,P,r,i,f,D;if(r=e.a,!((t.d>0?t.d:w.Math.floor((t.a-1)*mo)+1)-r<0||r==0)&&(n=$b(t)-r,!(n<=0))){if(t.a<54){k_(t,e,n);return;}f=Qi(n),P=fR((!t.c&&(t.c=jP(E1(t.f))),t.c),f),i=t.e-n,P[1].e!=0&&(A=ss($k(P[1].e<0?P[1].e==0?P[1]:new le(-P[1].e,P[1].d,P[1].a):P[1]),f),A=zQ(SQ(P[0],0)?1:0,P[1].e*(5+A),e.b),A!=0&&(P[0]=v2(P[0],(Ce(),z(A,0)>=0?be(A):mP(be(E0(A)))))),D=new Fg(P[0]),$b(D)>r&&(P[0]=D6(P[0],(Ce(),Ko)),--i)),t.e=Am(i),t.d=r,CT(t,P[0]);}}function OR(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g;for(T=c(gr,B9,26,A,0,1),i=c(F,m,6,A,15,1),Q=c(F,m,6,A,15,1),r=c(F,m,6,t.r,15,1),P=0;P<t.r;P++)e[P]!=-1&&(r[P]=i[e[P]]++);for(D=0;D<t.s;D++)l=e[t.F[0][D]],h=e[t.F[1][D]],l==h&&l!=-1&&++Q[l];for(g=0;g<A;g++)T[g]=new SA(i[g],Q[g]),EU(t,T[g]);for(n=0;n<t.r;n++)e[n]!=-1&&Nn(t,T[e[n]],n,0,0);for(f=0;f<t.s;f++)l=e[t.F[0][f]],h=e[t.F[1][f]],l==h&&l!=-1&&yQ(t,T[l],f,0,0,r,false);for(L=T,s=0,y=L.length;s<y;++s)o=L[s],ne(o,1),ne(o,2);return T;}function x$(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l;for(A=K(t.f,0,e),n=K(t.f,1,e),i=c(F,m,6,t.f.r,15,1),f=c(F,m,6,t.f.r,15,1),D=c(F,m,6,t.f.r,15,1),Q=c(F,m,6,t.f.r,15,1),i[0]=A,i[1]=n,f[1]=e,D[A]=1,D[n]=2,Q[0]=-1,Q[1]=0,r=1,o=1;r<=o;){for(L=0;L<O(t.f,i[r]);L++){if(P=_(t.f,i[r],L),r>1&&P==A){for(l=new Z3(D[i[r]]),f[0]=Nt(t.f,i[r],L),s=r,y=0;y<l.a.length;y++)l.a[y]=i[s],l.b[y]=f[s],s=Q[s];return l;}D[P]==0&&Gi(t.f,P)&&(i[++o]=P,f[o]=Nt(t.f,i[r],L),D[P]=D[i[r]]+1,Q[o]=r);}++r;}return null;}function N$(t,e){var A,n,P,r,i,f,D,Q,o,L,s;for(A=0;A<t.k.g;A++)if(W0(t.k,A))for(D=c(F,m,6,t.k.g,15,1),f=c(F,m,6,t.k.g,15,1),Q=c(F,m,6,t.k.g,15,1),f[0]=A,D[A]=1,Q[A]=-1,i=0,o=0;i<=o;){for(P=(D[f[i]]&1)==1?1:2,L=0;L<O(t.k,f[i]);L++)if(n=Nt(t.k,f[i],L),dt(t.k,n)==P&&e[n]&&(r=_(t.k,f[i],L),D[r]==0)){if(P==1&&W0(t.k,r)){for(s=f[i];s!=-1;)g0(t.k,o1(t.k,r,s),P==1?2:1),P=3-P,r=s,s=Q[s];return Wn(t.k,A,false),Wn(t.k,r,false),t.b-=2,true;}f[++o]=r,Q[r]=f[i],D[r]=D[f[i]]+1;}++i;}return  false;}function qR(t,e,A,n,P,r){var i,f,D,Q,o,L;for(t.j=e,t.d=A,t.n=c(F,m,6,n.length,15,1),t.f=c(F,m,6,P.length,15,1),t.k=uy(t.j,false),t.p=uy(t.j,true),t.e=uy(t.d,false),t.i=uy(t.d,true),t.o=Mb(t.j),t.g=Mb(t.d),t.q=Zy,Q=new _R(e,A,t.n,t.f,r),t.a=0;TX(Q);){for(++t.a,t.c=Q.q,f=Q.r,D=tR(Q);D;)Itt(t,D),D=tR(Q);t.b=t.c,t.c<f?(i=new YR(t.j,t.d,t.n,t.f,t.c,r),o=Vtt(i),t.c+=i.b-i.g):(L=new BU(t.j,t.d),o=Ay(L,c5(L,t.n,t.f))),t.q<o&&(t.q=o,PA(t.n,0,n,0,n.length),PA(t.f,0,P,0,P.length));}return t.q!=Zy;}function G$(t,e){var A,n,P,r,i,f,D,Q,o,L;for(r=null,D=null,i=null,ut(t.g,t.N),t.o=c(F,m,6,t.g.g,15,1),n=0;n<t.g.g;n++)t.o[n]=O(t.g,n);if(t.p!=0){for(Q=new SA(t.g.r,t.g.s),L=c(Pt,it,6,t.g.r,16,1),P=0;P<t.g.r;P++)L[P]=!t.D[P];for(L9(t.g,Q,L,true,null),ut(Q,t.N),jp(t,Q,e),r=t.j,D=t.n,i=t.k,o=0,A=0;A<t.g.g;A++)t.D[A]||(t.o[A]=O(Q,o++));}if(jp(t,t.g,e),t.p!=0){for(o=0,A=0;A<t.g.r;A++)t.D[A]||(t.j[A]=r[o],t.k[A]=i[o++]);for(o=0,f=0;f<t.g.s;f++)!t.D[K(t.g,0,f)]&&!t.D[K(t.g,1,f)]&&(t.n[f]=D[o++]);}}function O$(t,e){var A,n,P,r,i,f,D,Q,o;if(A=new LD(),!wl)return Ft(A.a,new ae(xV,2)),-999;for(Ft(A.a,new ae("Found sub-structure fragments and their contributions:",2)),Ft(A.a,new ae("(yellow atoms carry at least one more substituent)",2)),Q=0,D=0,r=0,o=new VD(1),P=new _A(),i=0;i<gi.a.a.length;i++)l2(new WA(false),P,Eh(gi,i)),GA(o,e),MA(o,P),CA(o,1,o.c)>0&&(f=jg(gi,i),f<-1?Q+=f:(D+=f,++r),e8(A,Eh(gi,i),1),Ft(A.a,new ae(""+f,3)));return r==0?-1:(n=Q+D/w.Math.sqrt(r),n=n+.0625*(r-40),t.a=A,n);}function zR(t){J1();var e,A,n,P,r;for(Wr.call(this,t),tj(this,u6(this)),r=(ut(this,7),this.q),this.b=c(bE,m,6,r.j.a.length,15,1),gx(this.b),e=false,A=true;!e&&A;)for(e=true,A=false,P=0;P<r.j.a.length;P++)this.b[P]==2&&(this.b[P]=qa(this,P),this.b[P]!=2&&(A=true)),this.b[P]==2&&(e=false);if(!e)throw At(new F7());for(this.a=c(F,m,6,this.r,15,1),n=0;n<this.a.length;n++)if(this.a[n]=-1,this.a[n]=WO(this,n),this.a[n]==0)throw At(new N7("Couldn't assign an atom type to atom "+n+" ("+a0[this.D[n]]+")"));}function q$(t,e){var A,n,P,r,i,f,D,Q,o,L,s;for(r=j1(F,[u0,m],[7,6],15,[2,32],2),i=0;i<2;i++){for(A=c(F,u0,7,32,0,2),s=0,P=0;P<32;P++)if(e[i][P]!=null){for(o=e[i][P].length,A[P]=c(F,m,6,o,15,1),f=0;f<o;f++)A[P][f]=t.f[e[i][P][f]];A[P].sort(pe(Q0.prototype.ld,Q0,[])),++s;}for(L=s;L>0;L--){for(Q=0,D=null,n=0;n<32;n++)if(A[n]!=null){if(D==null||D.length<A[n].length)D=A[n],Q=n;else if(D.length==A[n].length){for(f=D.length-1;f>=0;f--)if(D[f]<A[n][f]){D=A[n],Q=n;break;}}}r[i][Q]=L,A[Q]=null;}}return r;}function z$(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l;for(r=0,A=0;A<t.V.r;A++)i0(t.V,A)&&++r;for(y=t.V.r,l=t.V.s,t.gb=zD(t.gb,t.gb.length+r),t.jb=zD(t.jb,t.jb.length+r),i=c(F,m,6,t.V.r,15,1),D=ne(t.V,1),Q=ne(t.V,2),n=0;n<y;n++)i0(t.V,n)&&(L=t.V.r,t.gb[L]=t.gb[n],t.jb[L]=t.jb[n],i[n]=L,Nn(t.V,t.V,n,D,Q));for(f=0;f<l;f++)bP(t.V,f)&&yQ(t.V,t.V,f,D,Q,i,false);for(P=0;P<y;P++)vP(t.V,P,false);for(e=y;e<t.V.r;e++)tA(t.V,e,0,false);if(t.I)for(o=t.I.a.length-1;o>=0;o--)s=G(t.I,o),s.g&&!Yt(s,64)&&Ft(t.I,s.Gb());}function K$(t){var e,A,n,P,r,i,f,D;if(t.g!=null)for(i=new Zp(t),t.b=new n1(),P=0;P<t.g.length;P++)n=hq(i,P),n==0?(kj(i,P),f=Cm(t,P,2),e=Cm(t,P,1),A=km(t,P),f==1&&e==1&&!A&&(eK(t,P,i.a+i.f++),Ft(t.b,new Zi(P,1,-1,-1))),f>0?(A&&(XT(t,P,i.i+i.g++,2),++f),Ft(t.b,new Zi(P,1,-1,-1))):e>0?(A&&XT(t,P,i.a+i.f++,1),Ft(t.b,new Zi(P,1,-1,-1))):A&&(XT(t,P,i.a+i.f++,1),Ft(t.b,new Zi(P,1,-1,-1)))):n==1&&(km(t,P)?(r=Vz(i,P),D=hz(i,P),Ft(t.b,new Zi(P,2,r,D))):(kj(i,P),Ft(t.b,new Zi(P,1,-1,-1))));}function XQ(t){Y3(),this.d=t,ut(this.d,15),this.j=new n1(),this.k=c(Pt,it,6,(s8(),Sl).length,16,1),this.i=c(F,m,6,Sl.length,15,1),d1t(this.j,t),this.i[0]=this.j.a.length,this.i[1]=-this.j.a.length,qtt(this.j,t),this.i[1]+=this.j.a.length,this.i[2]=-this.j.a.length,iX(this.j,t),this.i[2]+=this.j.a.length,this.i[4]=-this.j.a.length,T$(this.j,t),this.i[4]+=this.j.a.length,this.i[5]=-this.j.a.length,Ga(this.j,t),this.i[5]+=this.j.a.length,this.i[3]=-this.j.a.length,ytt(this.j,t),this.i[3]+=this.j.a.length;}function J$(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l;for(i=c(F,m,6,A.r,15,1),o=c(F,m,6,A.r,15,1),Q=c(Ut,Tt,6,A.r,15,1),o[0]=e,D=0,L=0;D<=L;){for(l=o[D],s=0;s<A.e[l];s++)f=A.j[l][s],i[f]==0&&f!=e&&(o[++L]=f,i[f]=i[l]+1,i[f]==2?Q[f]=f<e?t[e][f].a[0]:t[f][e].a[0]:i[f]>2&&(Q[f]=Q[l]+pr(n,A.n[l][s]),f<e&&!t[e][f]&&(i[f]==3?t[e][f]=new Cg():(y=c(F,m,6,2,15,1),y[0]=o[1],y[1]=l,t[e][f]=new is(t9(e,f),y,(r=A.D[e],(r<(k2(),JA).length?JA[r]:2)+(P=A.D[f],P<JA.length?JA[P]:2)),Q[f],0)))));++D;}}function c8(t,e){var A,n,P,r,i,f,D,Q;for(A=new RegExp(e,"g"),D=c(ft,Dt,2,0,6,1),n=0,Q=t,r=null;;)if(f=A.exec(Q),f==null||Q==""){D[n]=Q;break;}else {if(i=f.index,r==null&&i==0&&f[0].length==0){Q=hA(Q,i+f[0].length,Q.length),A.lastIndex=0,r=Q;continue;}D[n]=(Mt(0,i,Q.length),Q.substr(0,i)),Q=hA(Q,i+f[0].length,Q.length),A.lastIndex=0,r==Q&&(D[n]=(Mt(0,1,Q.length),Q.substr(0,1)),Q=(zt(1,Q.length+1),Q.substr(1))),r=Q,++n;}if(t.length>0){for(P=D.length;P>0&&D[P-1]=="";)--P;P<D.length&&(D.length=P);}return D;}function _s(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;for(n=t.e[e],P=c(Ut,Tt,6,n,15,1),y=0;y<n;y++)P[y]=_0(t,e,t.j[e][y]);for(l=1;l<n;l++)for(h=0;h<l;h++)if(r=w.Math.abs(Ze(P[l],P[h])),r<.08||r>yM){for(i=0,f=0,T=0;T<n;T++)T!=l&&T!=h&&(i+=w.Math.abs(Vv(P[l],P[T])),f+=w.Math.abs(Vv(P[h],P[T])));if(Q=i<f?t.n[e][l]:t.n[e][h],dt(t,Q)==1&&(!A||!(t.I[Q]==257||t.I[Q]==129)))return Q;}for(g=-1,D=0,s=0;s<n;s++)o=t.j[e][s],L=t.n[e][s],k=NQ(t,L,o),D<k&&(!A||!(t.I[L]==257||t.I[L]==129))&&(D=k,g=L);return g;}function Y$(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h;if(dt(e,t.a)==1&&(ze(e,t.a)==1||ze(e,t.a)==2)){for(Q=false,f=0;f<2;f++)for(n=t.p[3*f],A=t.p[1+f],h=t.p[2-f],o=0;o<e.k[A];o++)if(l=e.j[A][o],l!=h&&l!=n){l<n&&(Q=!Q);break;}for(ze(e,t.a)==1&&(Q=!Q),P=0,r=0,D=0;D<t.d.length;D++)t.d[D]<180^Q&&(r+=t.c[D],++P);if(P<t.d.length){for(y=c(Kt,t1,6,P,15,1),L=c(Kt,t1,6,P,15,1),s=c(Kt,ie,16,P,0,2),P=0,i=0;i<t.d.length;i++)t.d[i]<180^Q&&(y[P]=t.d[i],L[P]=(t.c[i]*100/r|0)<<16>>16,s[P]=t.e[i],++P);t.d=y,t.c=L,t.e=s;}}}function X$(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l;for(i=c(F,m,6,t.s,15,1),P=0;P<e.g;P++){for(y=e.k[P]+(e.j[P].length-e.e[P]),s=0,D=0;D<e.j[P].length;D++)if(D<e.k[P]||D>=e.e[P]){for(l=2*A[e.j[P][D]],r=e.n[P][D],dt(e,r)==2&&(r<e.i&&Ee(e.q,r)||++l),o=0;o<s&&!(l<i[o]);o++);for(L=s;L>o;L--)i[L]=i[L-1];i[o]=l,++s;}for(AA(t.b[P],P),a1(t.b[P],t.a,A[P]),Q=y;Q<t.s;Q++)a1(t.b[P],t.a+1,0);for(f=0;f<y;f++)a1(t.b[P],t.a+1,i[f]);}for(n=e.g;n<t.b.length;n++)for(AA(t.b[n],n),a1(t.b[n],t.a,e.g+1),f=0;f<t.s;f++)a1(t.b[n],t.a+1,0);}function KR(t){var e,A,n,P,r,i,f,D,Q,o;switch(e=null,o=t.c.length,t.e){case 1:for(e=c(Kt,t1,6,2*o,15,1),n=0;n<o;n++)e[n]=t.c[n],e[o+n]=t.c[n];return e;case 2:for(P=t.a[0]==0?1:0,r=t.a[o-1]==180?o-1:o,Q=r-P,e=c(Kt,t1,6,o+Q,15,1),i=0;i<o;i++)e[i]=t.c[i];for(f=P;f<r;f++)e[e.length-1-f+P]=t.c[f];return e;case 3:for(P=t.a[0]==0?1:0,r=t.a[o-1]==90?o-1:o,Q=r-P,e=c(Kt,t1,6,2*o+2*Q,15,1),D=0;D<o;D++)e[D]=t.c[D],e[o+Q+D]=t.c[D];for(A=P;A<r;A++)e[o+Q-1-A+P]=t.c[A],e[e.length-1-A+P]=t.c[A];return e;default:return t.c;}}function MA(t,e){var A,n,P,r,i;if(!e||e.r==0||!e.L){t.g=null;return;}for(t.g=e,t.r=false,ut(t.g,1),t.N=7,n=0;n<t.g.g;n++)gt(V(h0(t.g,n),{l:je,m:0,h:3}),0)&&(t.N=15);for(i=0;i<t.g.i;i++)(fe(t.g,i)&F8)!=0&&(t.N=15);for(t.L&&t.N!=7&&ut(t.H,t.N),t.p=0,t.q=0,t.D=c(Pt,it,6,t.g.g,16,1),P=0;P<t.g.g;P++)t.D[P]=ye(t.g,P),t.D[P]&&++t.p;if(t.d=0,t.f=null,t.i=null,t.p!=0){for(r=0;r<t.g.i;r++)(t.D[K(t.g,0,r)]||t.D[K(t.g,1,r)])&&++t.q;for(A=0;A<t.g.r;A++)Wn(t.g,A,t.D[A]);t.f=c(F,m,6,t.g.r,15,1),t.d=Ur(t.g,t.f,true,false);}}function JR(t,e){Zg();var A,n,P,r,i,f;r=new Ks(t);try{if(f=new Th(),QA(f,qC+R8),Ni(f.a,e??""),QA(f,R8+(""+R8)),QA(f,Yy+t6(t,!0,11)),QA(f,R8),P=r.g.a.length,n=r.f.a.length,QA(f,hM+P+" "+n+R8),i=CZ(r),P>0){for(QA(f,JC+R8),A=0;A<r.g.a.length;A++)QA(f,qv(G(r.g,A),i));QA(f,"M  V30 END REACTANT"+R8);}if(n>0){for(QA(f,XC+R8),A=0;A<r.f.a.length;A++)QA(f,qv(G(r.f,A),i));QA(f,"M  V30 END PRODUCT"+R8);}QA(f,hr+R8),this.a=f.a;}catch(D){if(D=_1(D),Yt(D,19))q1();else throw At(D);}}function Z$(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l;for(D=null,l=kn(t.R),L=0;L<l.j.a.length;L++)if(l.f[L]){for(r=0,s=G(l.j,L),A=s,n=0,P=A.length;n<P;++n)e=A[n],vs(t,e)&&++r;if(r!=0)if(y=G(l.k,L),D==null&&(D=c(Pt,it,6,t.R.i,16,1)),r==s.length){for(Q=-1,o=Et,i=0;i<s.length;i++)o>t.B[y[i]]&&(o=t.B[y[i]],Q=i);for(;r>0;)D[y[Q]]=true,Q=cU(Q+2,s.length),r-=2;}else {for(f=0;vs(t,s[f]);)++f;for(;!vs(t,s[f]);)f=cU(f+1,s.length);for(;r>0;)for(D[y[f]]=true,f=cU(f+2,s.length),r-=2;!vs(t,s[f]);)f=cU(f+1,s.length);}}return D;}function W$(t){var e,A,n,P,r,i,f,D,Q,o,L,s;for(t.b=TA(t.c),r=SE,f=0,Q=r.length;f<Q;++f)n=r[f],Gt(t.b,n);for(s=t.b.Gc(),s.setEditable(true),IG(t.b,""+Bt(t.e.c)),t.a=TA(t.c),P=IE,i=0,D=P.length;i<D;++i)n=P[i],Gt(t.a,n);for(o=0,A=0;A<jl.length;A++)if(t.e.d==jl[A]){o=A;break;}$t(t.a,o),e=B(d(F,1),m,6,15,[8,-2,4,-2,8]),L=B(d(F,1),m,6,15,[8,-2,4,-2,8,-2,8]),iL(t.c,e,L),D0(t.c,he(t.c,"Text size:"),1,1),D0(t.c,t.b,3,1),D0(t.c,he(t.c,"Text style:"),1,3),D0(t.c,t.a,3,3),t.d=$u(t.c,20,3),Y8(t.d,t.e.e),ke(t.c,t.d,1,5,3,5);}function _$(t,e){var A,n,P;return n=Qb(t,e),A=Ae(t,t.F[0][e])||Ae(t,t.F[1][e]),P=A?16:1,t.I[e]==64?(t.I[e]=P,t.U=0,true):t.I[e]==32?(t.I[e]=n>4?64:P,t.U=0,true):t.I[e]==4?(t.I[e]=n>3?32:P,t.U=0,true):t.I[e]==2&&(t.I[e]=386,t.U&=7,(t.G[e]&128)==0)?true:t.I[e]==386?(n>2?t.I[e]=4:t.I[e]=P,t.U=0,true):(384&t.I[e])!=0?(t.I[e]=1,t.U&=7,true):!A&&n<2?false:t.I[e]==1?(t.I[e]=2,t.U=0,true):n<1?false:t.I[e]==16?(t.I[e]=1,t.U=0,true):false;}function $$(t,e){var A,n;if(e.j==1){if(A=s5(t,e),!(A>=0&&A<34&&(A!=t.b||A==20||A==33)&&(A!=19||(t.a.U&4)!=0)&&(A!=21||(t.a.U&8)!=0)))return;A==20&&A==t.b&&(t.d=++t.d%3),t.k=A,xD(t.n);}else if(e.j==2){if(t.k==-1)return;if(n=s5(t,e),n!=t.k||t.k==19&&(t.a.U&4)==0||t.k==21&&(t.a.U&8)==0){t.k=-1,xD(t.n);return;}if(t.k=-1,n==0||n==1||n==17){xD(t.n),dX(t.a,n);return;}t.b=n,xD(t.n),t.b==20?DQ(t.a,t.d==0?101:t.d==1?103:102):t.b==33?Hk(t.a,-1,new dg(t,n)):DQ(t.a,n);}else (e.j==6||e.j==5)&&(A=s5(t,e),A==t.k&&(A=-1),A!=t.f&&(t.f=A,xD(t.n)));}function oi(t,e){var A,n,P,r,i,f;return t.I[e]!=1||e<t.i&&Ee(t.q,e)||(t.G[e]&64)!=0&&(t.q&&e<t.i?TP(t.q,e):0)<7||(A=t.F[0][e],!(A<t.g&&f0(t.q,A))||(t.q&&A<t.g?UA(t.q,A):0)<5)||(n=t.F[1][e],!(n<t.g&&f0(t.q,n))||(t.q&&n<t.g?UA(t.q,n):0)<5)?false:(P=ZF(t,A,n),r=ZF(t,n,A),(t.q&&A<t.g?UA(t.q,A):0)>5&&(t.q&&n<t.g?UA(t.q,n):0)>5?P+r>2:(i=wb(t,A,n),f=wb(t,n,A),P==2&&f>=1||r==2&&i>=1||i==2&&(r>=1||f>=1)||f==2&&(P>=1||i>=1)));}function a$(t){var e,A,n,P,r,i,f;for(t.L=true,n=Q5(t),t.P&&h2(t.P,t.f)&&(n=Q5(t)),U2(t,false)&&g2(t),i=true;t.U<t.R.g&&i;){for(P=q$(t,n),e=0;e<t.R.g;e++)AA(t.e[e],e),a1(t.e[e],t.c,t.f[e]),a1(t.e[e],20,0),!t.cb[e]&&t.bb[e]!=0&&se(t.e[e],at(t.bb[e]<<18,Wt(P[t.bb[e]==1?0:1][t.ab[e]],8))),f=t.db[e],t.eb[e]&&(f==1?f=2:f==2&&(f=1)),se(t.e[e],f<<4);for(A=0;A<t.R.i;A++)se(t.e[K(t.R,0,A)],t.o[A]),se(t.e[K(t.R,1,A)],t.o[A]);if(r=tP(t),t.U==r)break;t.U=r,i=false,t.P&&h2(t.P,t.f)&&(i=true,n=Q5(t)),U2(t,false)&&(i=true,g2(t));}}function ta(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l;for(e=0;e<t.j.g;e++)if(t.d[e])for(i=false,f=c(F,m,6,t.j.g,15,1),l=c(F,m,6,t.j.g,15,1),D=c(F,m,6,t.j.g,15,1),f[0]=e,l[e]=-1,D[e]=1,P=0,Q=0;P<=Q&&!i;){for(r=f[P],o=0;o<O(t.j,r)&&!i;o++)if(L=(D[r]&1)==1^dt(t.j,Nt(t.j,r,o))>1,n=_(t.j,r,o),D[n]==0&&L)if(t.d[n]){if((D[r]&1)==1){for(t.d[e]=false,t.d[n]=false,t.k+=2,y=r,s=0;s<D[r];s++)A=o1(t.j,n,y),t.e[A]&&(t.e[A]=false,--t.c),B3(t.j,A,dt(t.j,A)==1?2:dt(t.j,A)-1),n=y,y=l[n];i=true;}}else f[++Q]=n,l[n]=r,D[n]=D[r]+1;++P;}}function zA(t,e){J1();var A,n,P,r,i;if((e&256)!=0&&e1(t,"?"))return 0;for(n=1;n<=128;n++)if(!e1(t,t0)&&r9(t,a0[n]))return n;if((e&2)!=0){for(P=129;P<=144;P++)if(r9(t,a0[P]))return P;}if((e&4)!=0){for(r=146;r<=148;r++)if(r9(t,a0[r]))return r;}if((e&1)!=0){for(i=151;i<=152;i++)if(r9(t,a0[i]))return i;}if((e&32)!=0&&r9(t,a0[153]))return 153;if((e&8)!=0&&r9(t,a0[154]))return 154;if((e&16)!=0&&r9(t,a0[145]))return 145;if((e&128)!=0&&r9(t,a0[159]))return 159;if((e&64)!=0){for(A=171;A<=190;A++)if(r9(t,a0[A]))return A;}return 0;}function ea(t,e){var A,n,P,r,i,f,D;if(t.db[e]==1||t.db[e]==2){if(f=false,e0(t.R,e)==2&&O(t.R,e)==2)try{for(i=0;i<2;i++)if(A=_(t.R,e,i),O(t.R,A)==3){for(P=c(F,m,6,2,15,1),r=0,D=0;D<O(t.R,A);D++)EA(t.R,A,D)==1&&(P[r++]=_(t.R,A,D));t.f[P[0]]>t.f[P[1]]^v6(t,A,P[0],P[1])&&(f=!f);}}catch(Q){if(Q=_1(Q),Yt(Q,19)){t.$[e]=3;return;}else throw At(Q);}else {try{n=KX(t,e);}catch(Q){if(Q=_1(Q),Yt(Q,19)){t.$[e]=3;return;}else throw At(Q);}for(i=1;i<n.length;i++)for(D=0;D<i;D++)t.f[n[i]]<t.f[n[D]]&&(f=!f);}t.db[e]==1^f?t.$[e]=1:t.$[e]=2;}}function Aa(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y,l,h;for(L=-1,o=0;o<t.k[A];o++)t.o[A][o]==2&&(L=t.j[A][o]);for(r=c(F,m,6,n,15,1),h=c(F,m,6,4,15,1),h[0]=L,h[1]=A,h[2]=e,D=0,Q=0;Q<t.e[e];Q++)i=t.j[e][Q],t.D[i]==1&&(D==0&&(h[3]=i),r[D++]=i);y=!(A<t.g&&f0(t.q,A))&&n==1?1:2,l=c(Kt,t1,6,y,15,1),f=c(Kt,t1,6,y,15,1),s=j1(Kt,[ie,t1],[16,6],15,[y,2],2),!(A<t.g&&f0(t.q,A))&&n==1?(l[0]=0,f[0]=100,s[0][0]=-15,s[0][1]=15):(l[0]=0,l[1]=180,f[0]=50,f[1]=50,s[0][0]=-15,s[0][1]=15,s[1][0]=165,s[1][1]=195),Ft(P,new ZL(l,f,s,h,r,1));}function He(t){var e,A,n,P,r;return t.g!=null?t.g:t.a<32?(t.g=ktt(E1(t.f),Bt(t.e)),t.g):(P=d6((!t.c&&(t.c=jP(E1(t.f))),t.c),0),t.e==0?P:(e=(!t.c&&(t.c=jP(E1(t.f))),t.c).e<0?2:1,A=P.length,n=-t.e+A-e,r=new C0(),r.a+=""+P,t.e>0&&n>=-6?n>=0?pD(r,A-Bt(t.e),"."):($F(r,e-1,e-1,"0."),pD(r,e+1,PP(qo,0,-Bt(n)-1))):(A-e>=1&&(pD(r,e,"."),++A),pD(r,A,"E"),n>0&&pD(r,++A,"+"),pD(r,++A,""+Fe(E1(n)))),t.g=r.a,t.g));}function na(t){var e,A,n,P,r,i,f;if(n=new LD(),Ft(n.a,new ae("Solubility values are estimated applying an atom-type based increment system.",2)),Ft(n.a,new ae(IV,2)),Ft(n.a,new ae(F4,2)),Ft(n.a,new ae("Base value = -0.530",2)),A=c(F,m,6,_f.length,15,1),t)for(Li(t),ut(t,7),e=0;e<t.g;e++){f=-1;try{f=Uy(t,e,2144);}catch(D){if(D=_1(D),!Yt(D,19))throw At(D);}for(i=0;i<_f.length;i++)if(n0(gl[i],f)){++A[i];break;}}for(P=new sD("#0.000"),r=0;r<_f.length;r++)A[r]!=0&&e8(n,""+A[r]+" * "+Sh(P,_f[r])+"   AtomType: 0x"+D5(gl[r]),2);return n;}function u6(t){var e,A,n,P,r,i,f,D;for(f=c(Pt,it,6,t.r,16,1),A=0;A<t.r;A++)f[A]=t.D[A]==1&&t.B[A]==0&&t.t[A]==0&&(t.v[A]&b8)==0&&(t.u==null||t.u[A]==null);for(D=c(Pt,it,6,t.r,16,1),i=0;i<t.s;i++){if(n=t.F[0][i],P=t.F[1][i],dt(t,i)!=1){f[n]=false,f[P]=false;continue;}D[n]&&(f[n]=false),D[P]&&(f[P]=false),f[n]&&Ae(t,P)&&t.D[P]!=13&&(f[n]=false),f[P]&&Ae(t,n)&&t.D[n]!=13&&(f[P]=false),D[n]=true,D[P]=true;}for(r=0;r<t.s;r++)f[t.F[0][r]]&&f[t.F[1][r]]&&(f[t.F[0][r]]=false,f[t.F[1][r]]=false);for(e=0;e<t.r;e++)D[e]||(f[e]=false);return f;}function Pa(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g;for(g=0;g<t.e.length;g++)if(t.e[g]){for(T=false,n=G(t.j,g),r=0,f=n.length;r<f;++r)e=n[r],t.a[e]|=o0,QX(t,e)&&(T=true);for(o=G(t.k,g),s=0,h=o.length;s<h;++s)D=o[s],t.c[D]|=o0;if(t.f[g]){for(A=G(t.j,g),P=0,i=A.length;P<i;++P)e=A[P],t.a[e]|=q0;for(Q=G(t.k,g),L=0,l=Q.length;L<l;++L)D=Q[L],t.c[D]|=q0;}if(T){for(A=G(t.j,g),P=0,i=A.length;P<i;++P)e=A[P],t.a[e]|=v8;for(Q=G(t.k,g),L=0,l=Q.length;L<l;++L)D=Q[L],t.c[D]|=v8;}}for(y=new Zt(t.b);y.a<y.c.a.length;)D=_t(y).a,t.c[D]=0;}function ra(t,e,A,n,P){var r,i;return !(X(t.j,A)==6&&w.Math.abs(O(t.j,A)-O(t.d,P))>1||X(t.j,A)==8&&O(t.j,A)==2&&ei(t.j,e,8)>ei(t.d,n,8)||X(t.d,P)==8&&O(t.d,P)==2&&ei(t.j,e,8)<ei(t.d,n,8)||X(t.j,A)==8&&O(t.j,A)==2&&O(t.d,P)==2&&(i=_(t.j,A,0)==e?0:1,r=_(t.d,P,0)==n?0:1,bs(t.p[A][i][3],t.i[P][r][3])!=0)||X(t.j,A)==7&&ei(t.j,e,7)<ei(t.d,n,7)||X(t.d,P)==7&&ei(t.j,e,7)>ei(t.d,n,7)||z9(t.j,o1(t.j,e,A))==3^z9(t.d,o1(t.d,n,P))==3);}function $s(t,e){ni();var A,n,P,r,i,f,D,Q,o,L,s;return A=(YA[0]*((e&QP)>>16)+YA[1]*((e&DP)>>8)+YA[2]*(e&255))/255,i=(YA[0]*((t&QP)>>16)+YA[1]*((t&DP)>>8)+YA[2]*(t&255))/255,P=w.Math.abs(A-i),P>Hf||(f=(HQ(),yR(((e&QP)>>16)/255,((e&DP)>>8)/255,(e&255)/255,null)),D=yR(((t&QP)>>16)/255,((t&DP)>>8)/255,(t&255)/255,null),Q=w.Math.abs(D[0]-f[0]),Q>.5&&(Q=1-Q),s=1-w.Math.max(D[1],f[1]),n=w.Math.abs(i+A-1),o=w.Math.cos(l1*Q*3),L=Hf*w.Math.max(s,w.Math.max(n,o)),P>L)?t:(r=i>A?i+L>1:i-L>0,v5(t,r?A-L:A+L));}function iP(t){var e,A,n,P,r,i,f,D,Q;e=null;try{for(e=new un(new mi((P=A2(t),w0(),P))),D=L1(k1(X1(e)),f1,Et),n=c8(k1(X1(e)),","),Q=j1(qn,[DA,A0],[8,1],5,[D,n.length],2),i=0;(r=X1(e))!=null&&i<D;i++)for(f=c8(k1(r),","),A=0;A<n.length;A++)switch(Xi(n[A],0)){case 105:Q[i][A]=U1(L1(k1(f[A]),f1,Et));break;case 102:Q[i][A]=Te(k1(f[A]));break;case 99:Q[i][A]=kz(Xi(rf(rf(k1(f[A]),"'"),'"'),0));}return Q;}catch(o){if(o=_1(o),Yt(o,79))q1();else throw At(o);}return j1(qn,[DA,A0],[8,1],5,[1,1],2);}function jf(t,e,A){var n,P,r,i;if(ut(t.j,1),i=new gU(t.j,1),Ea(t,e,i),t.c==0)return  true;if(A)for(P=0;P<t.j.g;P++)t.d[P]&&X(t.j,P)==7&&(t.f[P]||O(t.j,P)==3&&!t.g[P])&&b0(t.j,P,1);for(t.a=false,ZJ(t,A),t.j.L&&O_(t),ztt(t,i),gz(t,i),VY(t),A&&ptt(t),IQ(t);ba(t,i,A);)IQ(t);for(;fW(t,i,A);)IQ(t);for(;c$(t,i,A);)IQ(t);for(;t.c!=0;)for(r=0;r<t.j.i;r++)t.e[r]&&(u2(t,r),IQ(t));for(A&&Ua(t,A),t.b-t.k>=2&&ta(t),n=0;n<t.j.g;n++)t.d[n]&&xt(t.j,n)!=0&&(A&&(R1(t.j,n)==1&&rA(t.j,n)||R1(t.j,n)==-1&&X(t.j,n)==5)?b0(t.j,n,0):Je(t.j,n,32),++t.k);return t.b==t.k;}function YR(t,e,A,n,P,r){var i,f,D,Q,o,L,s,y;for(this.e=t,this.c=e,this.f=A,this.d=n,this.g=P,this.b=P,this.i=r,Q=new cP(),f=0;f<t.g;f++)A[f]==0&&(D=t.D[f]+(t.B[f]<<16),s=Be(Q,U1(D)),s||(s=new nT(this),We(Q,U1(D),s)),s.d=pk(f,s.d),s.d.length<=s.c.length&&(s.a=s.d.length));for(i=0;i<e.g;i++)n[i]==0&&(D=e.D[i]+(e.B[i]<<16),s=Be(Q,U1(D)),s||(s=new nT(this),We(Q,U1(D),s)),s.c=pk(i,s.c),s.c.length<=s.d.length&&(s.a=s.c.length));for(this.a=new n1(),y=(L=new oD(Q).a.ad().Tb(),new UD(L));y.a.cd();)s=(o=y.a.dd(),o.jd()),V$(s)||Ft(this.a,s);}function XR(t,e){var A,n,P,r,i;r=0,$A(t.d)?(P=F0(t.p),A=F0(t.o),r|=P<<9,r|=A<<13,r&=-128,g0(t.u,e,1)):($A(t.k)&&(r|=1),$A(t.c)&&(r|=2),$A(t.n)&&(r|=4),$A(t.i)&&(r|=32),$A(t.j)&&(r|=64),$A(t.b)&&(r|=8),$A(t.g)&&(r|=16),F0(t.q)!=0&&(F0(t.q)==1?LA(t.u,e)||(r|=128):F0(t.q)==2?LA(t.u,e)||(r|=256):F0(t.q)==3?eA(t.u,e)||(r|=4194560):F0(t.q)==4?eA(t.u,e)||(r|=KA):F0(t.q)==5&&(eA(t.u,e)||(r|=oP))),F0(t.r)!=0&&(i=F0(t.r)+2,i>7&&(i-=7),n=z9(t.u,e),(i<=2||i!=n)&&(r|=i<<17)),$A(t.e)&&(r|=Nf),$A(t.f)&&(r|=F8)),Xe(t.u,e,yi,false),Xe(t.u,e,r,true),Os(t.u,e);}function as(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h;for(P=c(F,m,6,e.r,15,1),D=ne(t,1),Q=ne(t,2),n=0;n<e.r;n++)if(e.D[n]!=0||(e.u==null||e.u[n]==null?null:on((y=e.u[n],w0(),y)))!=null)P[n]=Nn(e,t,n,D,Q);else if(P[n]=A,(e.U&8)!=0){for(f=0;f<e.s;f++)for(o=0;o<2;o++)if(e.F[o][f]==n){if(l=e.F[1-o][f],h=e.v[l]&3,L=false,h==1||h==2){for(r=0;r<e.s;r++)if(r!=f)for(s=0;s<2;s++)e.F[s][r]==l&&e.F[1-s][r]<n&&(L=!L);}L&&me(e,l,h==1?2:1,(e.v[l]&4)!=0);}}for(i=0;i<e.s;i++)o9(e,t,i,D,Q,P[e.F[0][i]],P[e.F[1][i]],false);return t.M=t.M&&e.M,t.J=0,t.U=0,P;}function ZR(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g;this.g=e,this.b=e.a[A],this.d=e.a[n],this.a=A,this.c=n,P=(i=Rk(t.p,this.b),f=Rk(t.p,this.d),D=sL(t.p,this.b),Q=sL(t.p,this.d),o=(i-f)/(i+f),.5*(i+f)*(1+(D==68||Q==68?0:.2*(1-w.Math.exp(-12*o*o))))),r=(L=Tv(t.p,this.b),s=Tv(t.p,this.d),y=hv(t.p,this.b),l=hv(t.p,this.d),h=cv(t.p,this.b),T=cv(t.p,this.d),g=P*P,181.16*L*s*y*l/((w.Math.sqrt(y/h)+w.Math.sqrt(l/T))*g*g*g)),this.e=sL(t.p,this.b),this.f=sL(t.p,this.d),(this.e==68&&this.f==65||this.e==65&&this.f==68)&&(P=P*.8,r*=.5),this.i=P,this.j=r;}function ia(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h;return o=jB(t.a,e,o1(e,A,n)),r=e.a[A],f=e.a[n],r>f&&(r=(l=U1(f),U1(f=r),l).a),s=f9(B(d(F,1),m,6,15,[1,2,0]),B(d(F,1),m,6,15,[r,f,o]),t),s>=0?V0(t.b[s][3]):(P=e.D[A],i=e.D[n],P>i&&(P=(y=U1(i),U1(i=P),y).a),h=d2(t,e,A,n),Q=f9(B(d(F,1),m,6,15,[0,1]),B(d(F,1),m,6,15,[P,i]),t.a.c),Q>=0?(L=w.Math.pow(tN(t.a.c,Q)/h,6),ax(t.a.c,Q)*L):(D=f9(B(d(F,1),m,6,15,[0,1]),B(d(F,1),m,6,15,[tb(P),tb(i)]),t.a.j),w.Math.pow(10,-(h-yd(t.a.j,D,2))/yd(t.a.j,D,3))));}function fa(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H;return A=t.l&8191,n=t.l>>13|(t.m&15)<<9,P=t.m>>4&8191,r=t.m>>17|(t.h&255)<<5,i=(t.h&1048320)>>8,f=e.l&8191,D=e.l>>13|(e.m&15)<<9,Q=e.m>>4&8191,o=e.m>>17|(e.h&255)<<5,L=(e.h&1048320)>>8,S=A*f,x=n*f,N=P*f,tt=r*f,H=i*f,D!=0&&(x+=A*D,N+=n*D,tt+=P*D,H+=r*D),Q!=0&&(N+=A*Q,tt+=n*Q,H+=P*Q),o!=0&&(tt+=A*o,H+=n*o),L!=0&&(H+=A*L),y=S&z0,l=(x&511)<<13,s=y+l,T=S>>22,g=x>>9,k=(N&262143)<<4,v=(tt&31)<<17,h=T+g+k+v,j=N>>18,R=tt>>5,C=(H&4095)<<8,b=j+R+C,h+=s>>22,s&=z0,b+=h>>22,h&=z0,b&=Pn,G0(s,h,b);}function Da(t,e){var A,n,P,r,i,f,D,Q,o,L,s;for(j5(e,t.j),r=0,n=0;n<t.d.r;n++)i=e.a==null?NaN:e.a[n],i>1e3&&NZ(t,e,n)&&++r;if(r==0){for(s=16,P=0;P<t.d.r;P++)s>Ct(t.d,P)&&(e.a==null?NaN:e.a[P])>(o=w.Math.min(4,Ct(t.d,P)),400+o*2e3/5)&&(s=Ct(t.d,P));if(s!=16)for(A=0;A<t.d.r;A++)s==Ct(t.d,A)&&(e.a==null?NaN:e.a[A])>(Q=w.Math.min(4,Ct(t.d,A)),400+Q*2e3/5)&&(f=e.k[A],Ct(t.d,A)==1?(D=Z0(e,_(t.d,A,0)),n8(f,2*(D.a-f.a),2*(D.b-f.b),2*(D.c-f.c))):(L=Ct(t.d,A)==0?16:8,n8(f,L*Hn(t.f)-L/2,L*Hn(t.f)-L/2,L*Hn(t.f)-L/2)),++r);}return r!=0&&GU(e),r;}function WR(t){var e,A,n,P,r,i,f;for(i=c(F,m,6,t.U+1,15,1),A=0;A<t.R.g;A++)De(t.R,A)==0&&(t.db[A]==1?++i[t.f[A]]:t.db[A]==2&&--i[t.f[A]]);for(P=0;P<t.R.i;P++)dt(t.R,P)==1&&gP(t.R,P)==0&&(t.o[P]==1?(++i[t.f[K(t.R,0,P)]],++i[t.f[K(t.R,1,P)]]):t.o[P]==2&&(--i[t.f[K(t.R,0,P)]],--i[t.f[K(t.R,1,P)]]));for(f=1;f<=t.U;f++)if(i[f]!=0){if(r=i[f]<0,r){for(e=0;e<t.R.g;e++)De(t.R,e)==0&&(t.db[e]==1?t.db[e]=2:t.db[e]==2&&(t.db[e]=1));for(n=0;n<t.R.i;n++)dt(t.R,n)==1&&gP(t.R,n)==0&&(t.o[n]==1?t.o[n]=2:t.o[n]==2&&(t.o[n]=1));}return r;}return  false;}function ua(t,e){var A,n,P,r,i,f,D,Q,o,L;for(t.j=0,P=0;P<e.g.a.length+e.f.a.length;P++)for(D=Nv(t.c,P),A=0;A<D.g;A++)gt(V(D.C[A],Pe),0)?D.A[A]=0:t.j<w.Math.abs(D.A[A])&&(t.j=w.Math.abs(D.A[A]));for(L=c(Pt,it,6,t.j+1,16,1),r=0;r<e.g.a.length;r++)for(o=G(e.g,r),A=0;A<o.g;A++)f=w.Math.abs(o.A[A]),f!=0&&(L[f]=true);for(i=0;i<e.f.a.length;i++)for(Q=G(e.f,i),A=0;A<Q.g;A++)f=w.Math.abs(Q.A[A]),f!=0&&(L[f]?L[f]=false:Q.A[A]=0);for(n=0;n<e.g.a.length;n++)for(o=G(e.g,n),A=0;A<o.g;A++)f=w.Math.abs(o.A[A]),f!=0&&L[f]&&(o.A[A]=0);}function Qa(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;for(l=null,l=new Gr(),GA(l,t.f),i=c(Pt,it,6,t.f.g,16,1),T=e.Tb();T.cd();)if(h=T.dd(),y=null,k=h.b,MA(l,k),CA(l,4,8)!=0&&(y=l.F),y)for(s=new Zt(y);s.a<s.c.a.length;){for(L=_t(s),g=0,n=L,P=0,r=n.length;P<r;++P)A=n[P],i[A]&&++g;if(g<=1){for(D=h.c,t.a?D=false:t.a=true,Q=new VP(t.f,L.length,D),o=0;o<L.length;o++)A=L[o],D&&Wn(t.f,A,true),Q.k[o]=256,Q.e[o]=A,Q.a[o]=mt(h.b,o)/h.a,Q.b[o]=Rt(h.b,o)/h.a,i[A]=true,t.b[A]=true;for(f=0;f<k.i;f++)t.c[o1(t.f,L[k.F[0][f]],L[k.F[1][f]])]=true;CP(t.d,Q);}}return i;}function _R(t,e,A,n,P){var r,i,f,D,Q;for(this.D=t,this.u=e,this.I=A,this.B=n,this.L=P,KW(this),qb(this),this.k=WW(this),this.j=JX(this.k),this.r=0,Q=(f=new J8(new K8(new br(this.k[0]).a).b),new jr(f));Nr(Q.a.a);)D=(i=H9(Q.a),i.hd()),r=Be(this.k[0],D),this.r+=w.Math.min(r[0].length,r[1].length);this.p=this.r==this.D.g&&this.D.g==this.u.g,this.G=c(F,m,6,this.D.g,15,1),this.w=c(F,m,6,this.u.g,15,1),this.H=c(Pt,it,6,Ur(this.D,this.G,false,false),16,1),this.A=c(Pt,it,6,Ur(this.u,this.w,false,false),16,1),this.q=iR(this),this.g=7,this.K=0;}function $R(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T;if(t.o&&ott(t,e),r=null,t.e!=null)for(f=t.e,Q=0,L=f.length;Q<L;++Q)i=f[Q],w2(i,e,null,0),r=r?RQ(r,i.v):i.v;if(t.b!=null)for(f=t.b,Q=0,L=f.length;Q<L;++Q)i=f[Q],w2(i,e,null,0),r=r?RQ(r,i.v):i.v;if(t.g)for(l=new Zt(t.g);l.a<l.c.a.length;)y=_t(l),h=y.Jb(e),Yu(t.p,h),r=r?RQ(r,h):h;if(!r)return null;if(P=a5(t),T=new ry(r,A,P,n),!(T.c==1&&T.a==0&&T.b==0)){if(Gu(T,t.p),t.e!=null)for(D=t.e,o=0,s=D.length;o<s;++o)i=D[o],XU(i,T);if(t.b!=null)for(f=t.b,Q=0,L=f.length;Q<L;++Q)i=f[Q],XU(i,T);return T;}return null;}function ty(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;for(D=pS[n],f=1,y=n==4?w.Math.exp(w.Math.log(.01)/D):1,P=t.d.r*t.d.r,s=c(Ut,Tt,6,10,15,1),L=0,o=0;o<D&&!(gt(t.n,0)&&(q1(),I1(E1(Date.now()),t.n)));o++){for(n!=0&&o%10==0&&jtt(t,e),Q=0;Q<P&&!(gt(t.n,0)&&(q1(),I1(E1(Date.now()),t.n)));Q++)l=null,l=G(t.j,Bt(Hn(t.f)*t.j.a.length)),l.g&&!t.k[l.vd()]&&(i=l.ud(e,f),i&&GU(e));if(j5(e,t.j),s[L++]=e.e,L==10&&(L=0),o>10){for(r=0,T=s,g=0,k=T.length;g<k;++g)h=T[g],r+=h;if(r/=10,e.e>r)break;}A.e>e.e&&(e2(A,e),HT(A,e)),f*=y;}e.e>A.e&&(e2(e,A),HT(e,A));}function aR(){aR=v1,DS=B(d(Ut,1),Tt,6,15,[5.55,15,15,15,15,15,15,15,15,FA,FA,FA,FA,FA,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,FA,FA,7.1,oe,oe,17.78,cr,3.82,6.66,6.66,7.78,11.68,FA,6.66,FA,FA,oe,oe,oe,oe,oe,oe,oe,oe,oe,oe,FA,FA,11.68,11.68,11.68,oe,20.3,cr,cr,Yf,Yf,cr,12.22,15.56,Yf,FA,10,cr,oe,16.66,Yf,15.56,cr,15.56,Yf,cr,12.22,Yf,cr,18.88,cr,cr,12.22,FA,FA,FA,9.38,oe,6.66,oe,oe,10,oe,oe,FA,oe,oe,4.44,4.44,10,4.44,16.66,oe,oe,oe,oe,6.66,10,FA,oe,10,Yf,10,10,10,6.68,5.2,6.68,11.68,10.5]);}function oa(t,e){var A,n,P,r,i,f,D,Q,o,L;if(eO(t.D[e]))return 0;if(t.D[e]==1)return t.k[e]==0?0:ii(t.D[t.j[e][0]])?-1:1;if(L=t.t[e],D=t.e[e]-P0(t,e)+xt(t,e),t.D[e]!=1&&t.D[e]!=15&&(ii(t.D[e])?L+=D:L-=D),t.k[e]==0)return L;for(o=0;o<t.k[e];o++)r=t.j[e][o],A=Z8(t,t.n[e][o])?1:t.o[e][o],ii(t.D[e])?ii(t.D[r])||(L+=A):ii(t.D[r])?L-=A:t.D[e]!=t.D[r]&&(QB(t.D[e]).a<QB(t.D[r]).a?L+=A:L-=A);if(e<t.g&&PN(t.q,e)){for(n=0,P=0,f=0,Q=0;Q<t.k[e];Q++)Z8(t,t.n[e][Q])&&(i=t.D[t.j[e][Q]],i==6?++P:Pi(i)?++f:++n);t.D[e]==6?n>1?--L:f>1&&++L:rA(t,e)?n+P>1&&--L:f+P>1&&++L;}return L;}function Q6(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l;for(l=c(F,m,6,16,15,1),A=c(Ut,Tt,6,16,15,1),r=c(Ut,Tt,6,2,15,1),n=0,o=0;o<2;o++)for(P=t.F[o][e],L=0;L<t.k[P];L++)if(D=t.n[P][L],D!=e){if(n==4)return 0;f=t.j[P][L],l[n]=16,t.p[f]!=0&&(l[n]+=(t.v[f]&gn)!=0?1:4),(t.G[e]&64)!=0&&(t.G[D]&64)!=0&&(s=As(t.q,e,D),s!=-1&&(l[n]+=wh(t.q,s)?64:6)),A[n++]=pA(t.K[P].a,t.K[P].b,t.K[f].a,t.K[f].b);}for(r[0]=_0(t,t.F[0][e],t.F[1][e]),r[0]<0?(r[1]=r[0]+l1,i=false):(r[1]=r[0],r[0]=r[1]-l1,i=true),y=0,Q=0;Q<n;Q++)A[Q]>r[0]&&A[Q]<r[1]?y-=l[Q]:y+=l[Q];return i?-y:y;}function tp(t){var e;if(this.e=t.e,t.a!=null)for(this.a=c(Kt,t1,6,t.a.length,15,1),e=0;e<this.a.length;e++)this.a[e]=360-t.a[this.a.length-e-1]<<16>>16;if(t.d!=null)for(this.d=j1(Kt,[ie,t1],[16,6],15,[t.d.length,2],2),e=0;e<this.d.length;e++)this.d[e][0]=360-t.d[this.a.length-e-1][1]<<16>>16,this.d[e][1]=360-t.d[this.a.length-e-1][0]<<16>>16;if(t.c!=null)for(this.c=c(Kt,t1,6,t.c.length,15,1),e=0;e<this.c.length;e++)this.c[e]=t.c[this.c.length-e-1];if(t.b!=null)for(this.b=c(E,I,6,t.b.length,15,1),e=0;e<this.b.length;e++)this.b[e]=t.b[this.b.length-e-1];}function Ua(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h;for(A=0;A<t.j.g;A++)if(ut(t.j,1),X(t.j,A)==7&&R1(t.j,A)==1&&e0(t.j,A)==1&&!CJ(t,A,e))for(f=false,D=c(F,m,6,t.j.g,15,1),h=c(F,m,6,t.j.g,15,1),Q=c(F,m,6,t.j.g,15,1),D[0]=A,h[A]=-1,Q[A]=1,r=0,o=0;r<=o&&!f;){for(i=D[r],L=0;L<O(t.j,i)&&!f;L++)if(s=(Q[i]&1)==0^dt(t.j,Nt(t.j,i,L))>1,P=_(t.j,i,L),Q[P]==0&&s)if(X(t.j,P)==7&&e0(t.j,P)==0&&O(t.j,P)==2){if((Q[i]&1)==0){for(b0(t.j,A,0),l=i,y=0;y<Q[i];y++)n=o1(t.j,P,l),B3(t.j,n,dt(t.j,n)==1?2:dt(t.j,n)-1),P=l,l=h[P];f=true;}}else D[++o]=P,h[P]=i,Q[P]=Q[i]+1;++r;}}function La(t,e){if(e<128)t.push((e&127)<<24>>24);else if(e<O1)t.push((e>>6&31|192)<<24>>24),t.push((e&63|128)<<24>>24);else if(e<o0)t.push((e>>12&15|224)<<24>>24),t.push((e>>6&63|128)<<24>>24),t.push((e&63|128)<<24>>24);else if(e<KA)t.push((e>>18&7|240)<<24>>24),t.push((e>>12&63|128)<<24>>24),t.push((e>>6&63|128)<<24>>24),t.push((e&63|128)<<24>>24);else if(e<wn)t.push((e>>24&3|248)<<24>>24),t.push((e>>18&63|128)<<24>>24),t.push((e>>12&63|128)<<24>>24),t.push((e>>6&63|128)<<24>>24),t.push((e&63|128)<<24>>24);else throw At(new ZP("Character out of range: "+e));}function sa(t,e,A){var n,P,r,i,f;return X(t.R,e)!=6&&X(t.R,e)!=7||(P=_(t.R,e,0),r=_(t.R,e,1),e0(t.R,P)!=1||e0(t.R,r)!=1)||O(t.R,P)==1||O(t.R,r)==1||Ct(t.R,P)>3||Ct(t.R,r)>3||(i=new Ff(t.R,t.f,e,P),i.f&&A==1)||(f=new Ff(t.R,t.f,e,r),f.f&&A==1)||i.f&&f.f?false:(A==3&&(i.f&&i.c&&(t.W[e]=true),f.f&&f.c&&(t.W[e]=true)),n=t.jb?UY(t,i,f):oJ(i,f),A==1?t.db[e]=n:A==2&&(i.f&&(n==1?se(t.e[i.b],t.f[P]):se(t.e[i.d],t.f[P])),f.f&&(n==2?se(t.e[f.b],t.f[r]):se(t.e[f.d],t.f[r]))),true);}function ey(t,e,A){var n,P,r,i,f,D,Q,o,L,s;if(Q=t.K[e],i=t.n[A],(fe(t.g,A)&Nf)!=0){if(D=cu(t.H,e),P=cu(t.g,A),r=fe(t.g,A)&127,D!=P&&!(D==1&&(r&1)!=0)&&!(D==2&&(r&2)!=0)&&!(D==4&&(r&4)!=0)&&!(D==32&&(r&32)!=0)&&!(D==64&&(r&64)!=0)&&!(D==16&&(r&16)!=0)&&!(D==8&&(r&8)!=0))return  false;Q&=-128,i&=-128;}if((Q&~i)!=0)return  false;if(s=(fe(t.g,A)&NP)>>17,s!=0){if(t.H.L&&s==(fe(t.H,A)&NP)>>17)return  true;if(s<=2)return o=z9(t.H,e),s==1?o>=8&&o<=12:o>=12;for(n=false,L=kn(t.H),f=0;f<L.j.a.length;f++)if(G(L.k,f).length==s&&Pf(L,f,e)){n=true;break;}if(!n)return  false;}return  true;}function ya(t,e,A,n,P,r,i,f,D,Q){var o,L,s,y,l,h,T,g,k,v,b,j,R,C;t!=e&&(o=t9(t,e),!(D[o[0]][o[1]]&&D[o[0]][o[1]].a.length==1)&&(C=.866,L=.5,(Q.G[i]&64)!=0&&(b=Q.q&&i<Q.i?TP(Q.q,i):0,b<6&&(C=0,L=1)),y=f.a[i]-f.a[A]*w.Math.cos(P)-f.a[n]*w.Math.cos(r),j=f.a[A]*w.Math.sin(P),R=f.a[n]*w.Math.sin(r),l=j+R,h=j-R*L,T=R*C,k=w.Math.sqrt(y*y+h*h+T*T),g=w.Math.sqrt(y*y+l*l),v=c(F,m,6,2,15,1),v[0]=Q.F[0][i],v[1]=Q.F[1][i],s=D[o[0]][o[1]],s?(s.a[0]=w.Math.min(s.a[0],k),s.a[1]=w.Math.min(s.a[1],g)):D[o[0]][o[1]]=new is(o,v,k,g,3)));}function U9(t,e){var A,n,P,r,i,f,D;for(f=(e.U&15)!=0,D=e.U&248,!t.g&&(t.g=new n2()),(t.e&2)!=0&&O5(e,false),t.f=e,ut(t.f,7),t.d=new v7(),t.b=c(Pt,it,6,t.f.r,16,1),t.c=c(Pt,it,6,t.f.s,16,1),t.i=c(F,m,6,t.f.r,15,1),A=0;A<t.f.r;A++)t.i[A]=R1(t.f,A);for((t.e&12)!=0&&za(t),(t.e&1)==0&&Vo&&Qa(t,Vo),w1t(t),fp(t),M_(t),fp(t),r=new Zt(t.d);r.a<r.c.a.length;)n=_t(r),aZ(n);for(Ma(t),itt(t),EJ(t),vO(t),zG(t),KG(t),P=new Zt(t.d);P.a<P.c.a.length;)for(n=_t(P),i=0;i<n.e.length;i++)de(t.f,n.e[i],n.a[i]),Ve(t.f,n.e[i],n.b[i]),Yn(t.f,n.e[i],0);f&&(TD(t.f,D),hf(t.f)),t.a&&s3(t.f);}function Ay(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T;for(L=0,i=c(Pt,it,6,t.a.g,16,1),n=e,P=0,r=n.length;P<r;++P)A=n[P],A!=-1&&(i[A]=true);for(s=c(Pt,it,6,t.a.i,16,1),T=0;T<t.b.i;T++)if(l=K(t.b,0,T),h=K(t.b,1,T),!(t.b.L&&(ye(t.b,l)||ye(t.b,h)))){if(f=e[l],D=e[h],wO(t.b,T),f==-1||D==-1){(f!=-1||D!=-1)&&(L+=J5(t.b,T));continue;}if(o=o1(t.a,f,D),o==-1){L+=J5(t.b,T);continue;}s[o]=true,L+=rF(t.b,T)==rF(t.a,o)?0:1;}for(Q=0;Q<t.a.i;Q++)t.a.L&&(ye(t.a,K(t.a,0,Q))||ye(t.a,K(t.a,1,Q)))||s[Q]||(L+=J5(t.a,Q));for(y=0;y<t.b.g;y++)v0(t.b,y)!=0&&(L+=MY(t,y,e));return -L;}function la(t){if(!t)return 0;var e=0;return t.noTabus&&(e|=1),t.showAtomNumber&&(e|=2),t.showBondNumber&&(e|=4),t.highlightQueryFeatures&&(e|=8),t.showMapping&&(e|=16),t.suppressChiralText&&(e|=32),t.suppressCIPParity&&(e|=64),t.suppressESR&&(e|=128),t.noCarbonLabelWithCustomLabel&&(e|=g8),t.noAtomCustomLabels&&(e|=o0),t.showSymmetryAny&&(e|=768),t.showSymmetrySimple&&(e|=256),t.showSymmetryStereoHeterotopicity&&(e|=512),t.noImplicitAtomLabelColors&&(e|=Qe),t.noStereoProblem&&(e|=O1),t.noColorOnESRAndCIP&&(e|=S0),t.noImplicitHydrogen&&(e|=je),t.drawBondsInGray&&(e|=Gn),e;}function Ui(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y,l;for(s=false,P.a=0,P.b=0,n>0?r=S6:r=I6,l=_0(t.L,e,A),o=0;o<O(t.L,e);o++)i=Nt(t.L,e,o),f=l,K(t.L,0,i)==e?L=K(t.L,1,i):L=K(t.L,0,i),L!=A&&(y=_0(t.L,e,L),f<y&&(f+=m0),D=f-y,n>0?(D<l1&&(s=true),D>S6&&(D=S6),D<.523598776&&(D=.523598776),D<=r&&(r=D,Q=t.T*w.Math.tan(r-HA)/2,P.a=-(Q*w.Math.sin(f)),P.b=-(Q*w.Math.cos(f)))):(D>=l1&&(s=true),D<I6&&(D=I6),D>5.759586531&&(D=5.759586531),D>=r&&(r=D,Q=t.T*w.Math.tan(4.712388981-r)/2,P.a=-(Q*w.Math.sin(f)),P.b=-(Q*w.Math.cos(f)))));return s;}function ha(t,e,A){var n,P,r,i,f,D;for(n=c(F,m,6,4,15,1),f=0;f<Ct(t.R,e);f++)n[f]=_(t.R,e,A[f]);for(Ct(t.R,e)==3&&(n[3]=e),P=j1(Ut,[c0,Tt],[15,6],15,[3,3],2),i=0;i<3;i++)P[i][0]=mt(t.R,n[i+1])-mt(t.R,n[0]),P[i][1]=Rt(t.R,n[i+1])-Rt(t.R,n[0]),P[i][2]=oA(t.R,n[i+1])-oA(t.R,n[0]);return D=c(Ut,Tt,6,3,15,1),D[0]=P[0][1]*P[1][2]-P[0][2]*P[1][1],D[1]=P[0][2]*P[1][0]-P[0][0]*P[1][2],D[2]=P[0][0]*P[1][1]-P[0][1]*P[1][0],r=(P[2][0]*D[0]+P[2][1]*D[1]+P[2][2]*D[2])/(w.Math.sqrt(P[2][0]*P[2][0]+P[2][1]*P[2][1]+P[2][2]*P[2][2])*w.Math.sqrt(D[0]*D[0]+D[1]*D[1]+D[2]*D[2])),r>0?1:2;}function ep(t,e){var A,n,P,r,i,f,D,Q,o,L,s;for(ut(t,7),ut(e,7),this.c=t,this.d=new Ci(),n=0;n<t.i;n++)tr(this.d,new p5(t,n));for(A=0;A<e.i;A++)o=new p5(e,A),D=(f=u9(this.d,o),f<0?-1:f),D==-1?(o.i=(Dr(),Fl),tr(this.d,o)):KZ(I9(this.d,D),o);for(i=this.d.d.a.length-1;i>=0;i--)o=I9(this.d,i),o.i!=(Dr(),ml)?I9(this.d,i).i==So&&uU(this.d,i):o.i=kl;for(this.b=c(F,m,6,t.g,15,1),r=0;r<t.g;r++)for(Q=0;Q<e.g;Q++)if(w.Math.abs(e.A[Q])==w.Math.abs(t.A[r])){P=(s=En(t,r),s+en(t,r,s,t.D[r])-G1(t,r)-(L=En(e,Q),L+en(e,Q,L,e.D[Q])-G1(e,Q))),this.b[r]=P>0?P:0;break;}this.e=new Gr();}function Ap(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y,l,h;for(f=0;f<A;f++)if(n[f]!=-1&&t.e[f]>3&&(t.v[f]&wn)!=0){for(h=0,s=-1,L=-1,o=0;o<t.e[f];o++)P[t.n[f][o]]!=-1?++h:t.o[f][o]==1&&q9(t,t.n[f][o])&&t.F[0][t.n[f][o]]==f&&(s=t.n[f][o],L=t.j[f][o]);if(s!=-1&&h>=3){for(r=pA(t.K[f].a,t.K[f].b,t.K[L].a,t.K[L].b),y=10,l=-1,Q=0;Q<t.e[f];Q++)t.o[f][Q]==1&&(!q9(t,t.n[f][Q])||t.F[0][t.n[f][Q]]==f)&&P[t.n[f][Q]]!=-1&&(i=w.Math.abs(Ze(r,_0(t,f,t.j[f][Q]))),y>i&&(y=i,l=t.n[f][Q]));l!=-1&&(D=P[l],g0(e,D,t.I[l]==257?129:257),t.F[0][l]!=f&&(mD(e,1,D,n[t.F[0][l]]),mD(e,0,D,n[f])));}}}function np(t){var e,A,n,P;for(_D.call(this),e=0;e!=-1&&(A=t.indexOf('="',e),A!=-1);)if(n=(Mt(e+1,A,t.length),t.substr(e+1,A-(e+1))),e=t.indexOf('"',A+2),P=e==-1?(zt(A+1,t.length+1),t.substr(A+1)):(Mt(A+1,e,t.length),t.substr(A+1,e-(A+1))),e1(n,"x1"))try{this.i[0].a=sn(P);}catch(r){if(r=_1(r),!Yt(r,42))throw At(r);}else if(e1(n,"y1"))try{this.i[0].b=sn(P);}catch(r){if(r=_1(r),!Yt(r,42))throw At(r);}else if(e1(n,"x2"))try{this.i[1].a=sn(P);}catch(r){if(r=_1(r),!Yt(r,42))throw At(r);}else if(e1(n,"y2"))try{this.i[1].b=sn(P);}catch(r){if(r=_1(r),!Yt(r,42))throw At(r);}}function o6(t,e,A){var n,P,r,i,f,D;if(e.l==0&&e.m==0&&e.h==0)throw At(new I8("divide by zero"));if(t.l==0&&t.m==0&&t.h==0)return A&&(zn=G0(0,0,0)),G0(0,0,0);if(e.h==B8&&e.m==0&&e.l==0)return KK(t,A);if(D=false,e.h>>19!=0&&(e=Ai(e),D=!D),i=xZ(e),r=false,P=false,n=false,t.h==B8&&t.m==0&&t.l==0){if(P=true,r=true,i==-1)t=_g((ti(),gc)),n=true,D=!D;else return f=R5(t,i),D&&rs(f),A&&(zn=G0(0,0,0)),f;}else t.h>>19!=0&&(r=true,t=Ai(t),n=true,D=!D);return i!=-1?az(t,i,D,r,A):_T(t,e)<0?(A&&(r?zn=Ai(t):zn=G0(t.l,t.m,t.h)),G0(0,0,0)):v_(n?t:G0(t.l,t.m,t.h),e,D,r,P,A);}function v2(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l;if(i=t.e,D=e.e,i==0)return e;if(D==0)return t;if(r=t.d,f=e.d,r+f==2)return A=V(t.a[0],g1),n=V(e.a[0],g1),i==D?(o=at(A,n),l=Ot(o),y=Ot(j0(o,32)),y==0?new RA(i,l):new le(i,2,B(d(F,1),m,6,15,[l,y]))):(Ce(),ku(i<0?Y1(n,A):Y1(A,n),0)?be(i<0?Y1(n,A):Y1(A,n)):mP(be(E0(i<0?Y1(n,A):Y1(A,n)))));if(i==D)s=i,L=r>=f?HL(t.a,r,e.a,f):HL(e.a,f,t.a,r);else {if(P=r!=f?r>f?1:-1:sQ(t.a,e.a,r),P==0)return Ce(),vr;P==1?(s=i,L=bL(t.a,r,e.a,f)):(s=D,L=bL(e.a,f,t.a,r));}return Q=new le(s,L.length,L),Cn(Q),Q;}function ZQ(t,e){var A,n,P,r,i,f,D,Q,o,L,s;if(t.D.d.a.length==t.t)return null;L=c(F,m,6,t.v.length,15,1),n=c(F,m,6,t.u.length,15,1),P=0;do{if(P++==64)return null;if(e&&t.D.d.a.length==0){for(o=0;o<t.u.length;o++)n[o]=Dz(t.u[o]);for(A=Pr(t.i,n),Q=0;Q<t.v.length;Q++)L[Q]=A.a[Q];}else if(t.b){for(D=P/64,o=0;o<t.u.length;o++)n[o]=OK(t.u[o],Hn(t.c),D);for(A=Pr(t.i,n),Q=0;Q<t.v.length;Q++)L[Q]=wJ(A,Q,Hn(t.c),D);}else {for(f=0;f<t.u.length;f++)n[f]=FQ(t.c,t.u[f].b.length);for(i=0;i<t.v.length;i++)L[i]=FQ(t.c,t.v[i].d.length);}s=Xu(t,L,n);}while(r=u9(t.D,s),(r<0?-1:r)!=-1);return s;}function ny(t,e,A){var n,P,r,i,f;if(e==A||t.a[e]!=t.a[A]||t.o[e]!=0&&(t.o[e]==3||t.o[A]==3||t.p[e]^t.o[e]!==t.o[A]||t.k[e]!==t.k[A]||t.j[e]!==t.j[A])||(n=o1(t.i,e,A),n!=-1&&(dt(t.i,n)==1&&t.c[n]!=0||dt(t.i,n)==2&&t.c[n]==1)))return  false;if(e0(t.i,e)==1&&!mn(t.i,e)){for(P=-1,f=0;f<O(t.i,e);f++)if(_(t.i,e,f)!=A&&EA(t.i,e,f)==2){P=Nt(t.i,e,f);break;}for(r=-1,i=0;i<O(t.i,A);i++)if(_(t.i,A,i)!=e&&EA(t.i,A,i)==2){r=Nt(t.i,A,i);break;}if(P!=-1&&t.c[P]!=0&&t.d[P]^t.c[P]===t.c[r])return  false;}return  true;}function Ta(t){var e,A,n,P,r,i,f;r=fe(t.u,t.a),n=c1(t.u,t.a)==8||Z8(t.u,t.a)?6:dt(t.u,t.a),((r&1)!=0||n==1)&&yA(t.k,true),((r&2)!=0||n==2)&&yA(t.c,true),((r&4)!=0||n==3)&&yA(t.n,true),((r&32)!=0||n==4)&&yA(t.i,true),((r&64)!=0||n==5)&&yA(t.j,true),((r&8)!=0||n==6)&&yA(t.b,true),((r&16)!=0||n==0)&&yA(t.g,true),(r&Nf)!=0&&yA(t.e,true),(r&F8)!=0&&yA(t.f,true),f=r&384,e=r&Qo,f==128?$t(t.q,1):e==KA?$t(t.q,4):f==256?$t(t.q,e==0?2:3):$t(t.q,e==0?0:5),i=(r&NP)>>17,$t(t.r,i==0?0:i<=2?i+5:i-2),(r&d8)!=0?(yA(t.d,true),P=(r&7680)>>9,A=(r&jy)>>13,$t(t.p,P),wT(t,P),$t(t.o,A)):$t(t.o,0),Aj(t);}function Pp(t,e,A,n,P){var r,i,f,D,Q,o,L,s;for(Mk.call(this,t),this.f=P,this.g=A,this.i=c(Kt,ie,16,A.length,0,2),this.d=c(Kt,ie,16,A.length,0,2),this.e=c(Ut,c0,15,A.length,0,2),f=c(Kt,DA,38,A.length,0,3),i=0;i<A.length;i++)s=A[i].d,this.i[i]=hL(s,s.length),D=A[i].c,this.d[i]=hL(D,D.length),this.e[i]=c(Ut,Tt,6,this.i[i].length,15,1),f[i]=A[i].e;for(this.a=c(F,m,6,A.length,15,1),o=c(Pt,it,6,e.length,16,1),r=0;r<A.length;r++)y1t(this,A[r],r,o,n,f[r]);for(Q=0;Q<e.length;Q++)if(!o[Q])for(L=0;L<e[Q].c.length;L++)wD(this,e[Q].e[e[Q].c[L]],Z0(e[Q].b[n[Q]],e[Q].c[L]));this.c=new n1();}function Py(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y,l,h,T;for(r=c(F,u0,7,t.j.a.length,0,2),Q=0;Q<t.j.a.length;Q++)for(r[Q]=c(F,m,6,G(t.j,Q).length,15,1),o=0;o<G(t.j,Q).length;o++)r[Q][o]=-1;for(h=c(F,m,6,t.i.i,15,1),y=0;y<t.k.a.length;y++)if(l=G(t.k,y),l.length==3||l.length>=5&&l.length<=7)for(D=0;D<l.length;D++)f=l[D],O(t.i,K(t.i,0,f))==3&&O(t.i,K(t.i,1,f))==3&&(h[f]>0?(r[h[f]>>>16][h[f]&32767]=y,r[y][D]=h[f]>>>16):h[f]=(y<<16)+g8+D);for(i=c(Pt,it,6,t.j.a.length,16,1),T=0,L=-1;T>L;)for(L=T,s=0;s<t.j.a.length;s++)i[s]||n1t(t,s,r,i,e,A,n,P)&&(i[s]=true,++T);}function ca(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C;if(A<2)return A;for(j=c(Pt,c0,12,A,0,2),l=1;l<A;l++)j[l]=c(Pt,it,6,l,16,1);for(i=Qn(t.V,24*t.ab),P=1;P<t.V.r;P++)for(r=0;r<P;r++)D=mt(t.V,r)-mt(t.V,P),Q=Rt(t.V,r)-Rt(t.V,P),f=w.Math.sqrt(D*D+Q*Q),f<co*i&&(L=e[P],s=e[r],L!=s&&(L>s?j[L][s]=true:j[s][L]=true));for(C=c(F,m,6,A,15,1),o=0;o<A;o++)C[o]=o;for(b=0,y=1;y<A;y++)for(g=0;g<y;g++)if(j[y][g]&&(h=C[y],T=C[g],h!=T))for(++b,R=w.Math.min(h,T),v=w.Math.max(h,T),k=0;k<A;k++)C[k]==v?C[k]=R:C[k]>v&&--C[k];for(n=0;n<t.V.r;n++)e[n]=C[e[n]];return A-b;}function WQ(t,e,A){var n,P,r,i,f,D,Q,o,L;return t==null?null:(D=t,o=null,Q=null,L=null,f=null,n=t.indexOf(p0(35)),n==-1?D=t:(D=(Mt(0,n,t.length),t.substr(0,n)),P=t.indexOf(p0(35),n+1),P==-1?o=(zt(n+1,t.length+1),t.substr(n+1)):(o=(Mt(n+1,P,t.length),t.substr(n+1,P-(n+1))),r=t.indexOf(p0(35),P+1),r==-1?Q=(zt(P+1,t.length+1),t.substr(P+1)):(Q=(Mt(P+1,r,t.length),t.substr(P+1,r-(P+1))),i=t.indexOf(p0(35),r+1),i==-1?L=(zt(r+1,t.length+1),t.substr(r+1)):(L=(Mt(r+1,i,t.length),t.substr(r+1,i-(r+1))),f=(zt(i+1,t.length+1),t.substr(i+1)))))),Op(D,o,Q,L,f,e,A));}function U6(t,e,A,n,P,r,i,f){var D,Q,o,L,s,y,l,h,T,g;for(e!=n&&(T=t.K[e].a-t.K[n].a,g=t.K[e].b-t.K[n].b,f=w.Math.sqrt(T*T+g*g)),D=e,o=fQ(t,e)!=3,h=1;h<A;h++){for(s=t.K[D].a+f*w.Math.sin(r),y=t.K[D].b+f*w.Math.cos(r),l=-1,L=0;L<t.r;L++)if(w.Math.abs(s-t.K[L].a)<4&&w.Math.abs(y-t.K[L].b)<4){l=L;break;}l==-1&&(l=te(t,s,y,0),t.K[l].a=s,t.K[l].b=y,t.K[l].c=0),Q=mm(t,D,l),Q==-1&&(Q=J0(t,D,l,Ae(t,D)||Ae(t,l)?16:1),P&&(o&&fQ(t,t.F[0][Q])<4&&fQ(t,t.F[1][Q])<3&&(t.I[Q]=2),o=!o)),D=l,r+=i;}Q=mm(t,D,n),Q==-1&&(Q=J0(t,D,n,Ae(t,D)||Ae(t,n)?16:1)),P&&o&&fQ(t,t.F[0][Q])<4&&fQ(t,t.F[1][Q])<4&&(t.I[Q]=2);}function rp(t){var e,A,n,P,r,i,f,D,Q,o;Om();var L,s;for(ut(t,7),this.a=c(Oe,uA,6,t.s,15,1),this.b=c(Oe,uA,6,t.s,15,1),L=0;L<t.s;L++)s=(e=t.F[0][L],A=t.F[1][L],n=t.D[e],P=t.D[A],r=t.k[e],i=t.k[A],IJ(dt(t,L),L<t.i&&Ee(t.q,L),L<t.i&&(q8(t.q,L)||t.I[L]==8),n,P,fk(t,e),fk(t,A),r,i)),s==-1?(this.a[L]=(f=X(t,t.F[0][L]),D=X(t,t.F[1][L]),(f<(k2(),Xf).length?Xf[f]:f<JA.length?lo*JA[f]:Ny)+(D<Xf.length?Xf[D]:D<JA.length?lo*JA[D]:Ny)),this.b[L]=(Q=X(t,t.F[0][L]),o=X(t,t.F[1][L]),(Q<Xf.length?Q4:.125)+(o<Xf.length?Q4:.125))):(this.a[L]=s==-1?2.000499963760376:a4[s],this.b[L]=s==-1?1:tc[s]);}function ry(t,e,A,n){var P,r,i,f;hU(this),e?(n&Fy)==0?W9(e,t.c,t.d)&&W9(e,t.c+t.b,t.d+t.a)||((t.b>e.b||t.a>e.a)&&(r=e.b/t.b,f=e.a/t.a,this.c=w.Math.min(r,f)),t.c*this.c<e.c?this.a=e.c-t.c*this.c:(t.c+t.b)*this.c>e.c+e.b&&(this.a=e.c+e.b-(t.c+t.b)*this.c),t.d*this.c<e.d?this.b=e.d-t.d*this.c:(t.d+t.a)*this.c>e.d+e.a&&(this.b=e.d+e.a-(t.d+t.a)*this.c)):(r=e.b/t.b,f=e.a/t.a,i=n&d1,i==0?i=24:(n&q0)!=0&&(i/=256),P=i/A,this.c=w.Math.min(P,w.Math.min(r,f)),this.a=e.c+e.b/2-this.c*(t.c+t.b/2),this.b=e.d+e.a/2-this.c*(t.d+t.a/2)):(n&o0)!=0&&(i=(n&d1)!=0?n&d1:24,this.c=i/A);}function L6(t,e){var A,n,P,r,i,f,D,Q,o,L,s;if(L=I2,e!=-1){for(A=c(Ut,Tt,6,9,15,1),i=0;i<Le(t.V,e);i++)A[i]=_0(t.V,e,_(t.V,e,i));if(Le(t.V,e)==1)A[0]<-2.6179938779914944?L=fA:A[0]<uo?L=I2:A[0]<v4?L=fA:A[0]<0?L=I2:A[0]<C2?L=z6:A[0]<HA?L=wo:A[0]<2.6179938779914944?L=z6:L=wo;else {for(f=Le(t.V,e)-1;f>0;f--)for(D=0;D<f;D++)A[D]>A[D+1]&&(s=A[D],A[D]=A[D+1],A[D+1]=s);for(A[Le(t.V,e)]=A[0]+m0,o=0,Q=0,r=0;r<Le(t.V,e);r++)n=A[r+1]-A[r],Q<n&&(Q=n,o=r);L=(A[o]+A[o+1])/2;}}P=Qn(t.V,24*t.ab),t.ib=(e==-1?t.hb:mt(t.V,e))+P*w.Math.sin(L),t.lb=(e==-1?t.kb:Rt(t.V,e))+P*w.Math.cos(L);}function wa(t,e){var A,n,P,r,i,f,D,Q,o;for(si(t),Q=new SA(t.R.g,t.R.i),ve(Q,t.R.L),i=0;i<t.R.g;i++)Nn(t.R,Q,t.B[i],0,0),Ne(Q,i,t.bb[t.B[i]],t.ab[t.B[i]]);for(f=0;f<t.R.i;f++)yQ(t.R,Q,t.C[f],0,0,t.H,false),!(Q.I[f]==257||Q.I[f]==129)&&Q.F[0][f]>Q.F[1][f]&&(o=Q.F[0][f],mD(Q,0,f,Q.F[1][f]),Q.F[1][f]=o,Q.U=0),T8(Q,f,t.n[t.C[f]],t.k[t.C[f]]);if(e)for(r=0;r<t.R.g;r++)for(A=t.B[r],D=O(t.R,A);D<Ct(t.R,A);D++)P=Nn(t.R,Q,_(t.R,A,D),0,0),o9(t.R,Q,Nt(t.R,A,D),0,0,t.H[A],P,false);for(n=0;n<Q.s;n++)A=Q.F[0][n],t.eb[t.B[A]]&&(Q.I[n]==257?(Q.I[n]=129,Q.U=0):Q.I[n]==129&&(Q.I[n]=257,Q.U=0));return EU(t.R,Q),Q.U&=-9,Q;}function _Q(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y,l,h;if(Q=c(F,m,6,2,15,1),D=c(Ut,Tt,6,2,15,1),Q[0]=t.F[0][e],Q[1]=t.F[1][e],G1(t,Q[0])>3||G1(t,Q[1])>3)return  false;for(i=0,r=c(Ut,Tt,6,4,15,1),s=0;s<t.s;s++)if(s!=e){for(y=0;y<2;y++){for(l=0;l<2;l++)if(t.F[y][s]==Q[l]){if(i==4){i=5;break;}r[i++]=_0(t,Q[l],t.F[1-y][s]);}if(i==5)break;}if(i==5)break;}if(i==5)return  false;for(D[0]=_0(t,Q[0],Q[1]),D[0]<0?(D[1]=D[0]+l1,f=0):(D[1]=D[0],D[0]=D[1]-l1,f=1),h=0,L=0;L<i;L++)r[L]>D[0]&&r[L]<D[1]?--h:++h;return f=h>0?1-f:f,o=l1*(A-2)/A,U6(t,Q[f],A-1,Q[1-f],n,D[h>0?0:1]+l1-o,l1-o,P),t.U=0,true;}function s6(t,e){var A;Yt(e,137)?$$(t,e):Yt(e,159)&&(A=e.b,e.j==1&&(A==-9&&t.b>=17?R0(t,t.b-17):A==-10&&t.b<17?R0(t,t.b+17):A==-11&&t.b%17>0?R0(t,t.b-1):A==-12&&t.b%17<16?R0(t,t.b+1):A==122?R0(t,18):A==32?R0(t,2):A==48?R0(t,4):A==116?R0(t,21):A==49?R0(t,5):A==50?R0(t,22):A==109?R0(t,19):A==51?R0(t,7):A==52?R0(t,24):A==53?R0(t,8):A==54?R0(t,25):A==55?R0(t,9):A==97?R0(t,26):A==45?R0(t,27):A==43?R0(t,10):A==117?R0(t,6):A==100?R0(t,23):A==99?R0(t,11):A==110?R0(t,12):A==112?R0(t,29):A==111?R0(t,13):A==115?R0(t,30):A==102?R0(t,14):A==108?R0(t,31):A==98?R0(t,15):A==105?R0(t,32):A==104?R0(t,16):A==46&&R0(t,33)));}function $1(t,e){if(!t.K&&(e==-10&&(t.C=-999,e=t.Q),e!=-2&&e!=-7&&t.N!=0&&(e=-4),e!=t.C&&!(t.C==-8&&e!=-9)))switch(e==-8&&(t.O=t.C),e==-9&&(e=t.O),t.C=e,e){case 0:t.Bb(t.F==0?On:t.F);break;case  -6:t.Bb(t.F);break;case  -4:t.Bb(t.N);break;case  -2:t.Bb(t.t);break;case  -3:t.Bb(t.u);break;case  -7:t.Bb(t.H);break;case  -8:t.Bb(t.I);break;case  -5:t.Bb(t.P);break;case 64:t.Bb(-14655233);break;case 128:t.Bb(GP);break;case 256:t.Bb(-4194049);break;case 192:t.Bb(-16711936);break;case 320:t.Bb(-24576);break;case 384:t.Bb(-16744448);break;case 448:t.Bb(-6291456);break;case 1:t.Bb(hy);break;default:t.Bb(On);}}function ga(t){var e,A,n,P,r,i,f,D,Q,o,L,s;for(o=new ch(),L=0;L<t.i.g;L++)if(e0(t.i,L)<2||O(t.i,L)>2)for(i=1;i<O(t.i,L);i++)for(e=_(t.i,L,i),f=0;f<i;f++)A=_(t.i,L,f),ny(t,e,A)&&(D=_p(t,e,A),D&&zF(D,t.f)&&We(o.a,D,(Er(),jo))==null);for(s=0;s<t.i.i;s++)t.c[s]!=0&&(dt(t.i,s)!=2||t.c[s]!=2)||(e=K(t.i,0,s),A=K(t.i,1,s),ny(t,e,A)&&(D=_p(t,e,A),D&&zF(D,t.f)&&We(o.a,D,(Er(),jo))==null));for(t.g=c(F,u0,7,o.a.c,0,2),t.e=c(Pt,it,6,t.i.g,16,1),r=0,Q=(P=new J8(new K8(new br(o.a).a).b),new jr(P));Nr(Q.a.a);)for(D=(n=H9(Q.a),n.hd()),t.g[r++]=D.b,i=0;i<D.b.length;i++)t.e[D.b[i]]=true;}function da(t,e){var A,n,P,r,i,f,D,Q,o,L,s;if(dt(t,e)!=1||e<t.i&&Ee(t.q,e)||(t.q&&e<t.i?TP(t.q,e):0)==3)return  false;for(A=c(F,m,6,2,15,1),f=0;f<2;f++)if(A[f]=t.F[f][e],(t.v[A[f]]&q0)!=0||P0(t,A[f])<=1)return  false;if(PL(t,A[0])||PL(t,A[1])){for(L=c(F,m,6,1,15,1),L[0]=e,n=c(F,u0,7,2,0,2),D=0;D<2;D++)if(PL(t,A[D])&&(n[D]=c(F,m,6,2,15,1),n[D][0]=A[1-D],n[D][1]=A[D],!G5(t,A[1-D],n[D],L)))return  false;if(e!=L[0])return  false;for(Q=0;Q<2;Q++)n[Q]!=null&&(A[Q]=n[Q][1]);}for(i=0;i<2;i++){if(r=t.k[A[i]],r==1)return  false;for(s=0,o=0;o<r;o++)P=t.j[A[i]][o],(t.v[P]&q0)!=0||++s;if(s<2)return  false;}return  true;}function ip(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l;for(D=c(F,m,6,32,15,1),Q=0,n=0;n<t.R.g;n++)(t._[n]==1||t._[n]==2)&&t.bb[n]==e&&(f=t.ab[n],D[f]<t.f[n]&&(D[f]==0&&++Q,D[f]=t.f[n]));for(r=0;r<t.R.i;r++)(t.j[r]==1||t.j[r]==2)&&t.n[r]==e&&c1(t.R,r)==1&&(f=t.k[r],l=w.Math.max(t.f[K(t.R,0,r)],t.f[K(t.R,1,r)]),D[f]<l&&(D[f]==0&&++Q,D[f]=l));for(i=c(E,I,6,32,15,1),o=0;o<Q;o++){for(s=-1,y=0,L=0;L<32;L++)y<D[L]&&(y=D[L],s=L);D[s]=0,i[s]=o<<24>>24;}for(A=0;A<t.R.g;A++)(t._[A]==1||t._[A]==2)&&t.bb[A]==e&&(t.ab[A]=i[t.ab[A]]);for(P=0;P<t.R.i;P++)(t.j[P]==1||t.j[P]==2)&&t.n[P]==e&&c1(t.R,P)==1&&(t.k[P]=i[t.k[P]]);}function Ba(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y;for(ut(t.k,7),L=false,s=c(F,m,6,2,15,1),y=c(F,m,6,2,15,1),o=c(F,m,6,2,15,1),n=0;n<t.k.i;n++)if(!A8(t.k,n)&&c1(t.k,n)==2){for(i=0;i<2;i++){for(s[i]=-1,o[i]=-1,e=K(t.k,i,n),Q=0;Q<O(t.k,e);Q++)P=Nt(t.k,e,Q),P!=n&&(s[i]==-1&&(c1(t.k,P)==257||c1(t.k,P)==129)?(s[i]=_(t.k,e,Q),y[i]=P):o[i]=_(t.k,e,Q));if(s[i]==-1)break;}if(s[0]!=-1&&s[1]!=-1){for(D=c1(t.k,y[0])==c1(t.k,y[1]),f=0;f<2;f++)s[f]==K(t.k,0,y[f])&&(D=!D);for(r=0;r<2;r++)o[r]!=-1&&o[r]<s[r]&&(D=!D);Q8(t.k,n,D?2:1,false),L=true;}}for(A=0;A<t.k.i;A++)(c1(t.k,A)==257||c1(t.k,A)==129)&&g0(t.k,A,1);return L;}function fp(t){for(var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;;){for(k=0,y=0,T=null,g=null,i=1;i<t.d.a.length;i++)for(n=G(t.d,i),f=0;f<i;f++){for(P=G(t.d,f),e=0,A=0,l=0,h=0,o=0;o<n.e.length;o++)for(s=0;s<P.e.length;s++)n.e[o]==P.e[s]&&(++A,e=n.e[o],l<n.k[o]&&(l=n.k[o]),h<P.k[s]&&(h=P.k[s]));if(A>0&&(r=A==1&&XL(t,n,e)==1&&XL(t,P,e)==1?0:1,l>h?D=(r<<24)+(l<<16)+(h<<8)+A:D=(r<<24)+(h<<16)+(l<<8)+A,k<D)){for(k=D,y=A,l=0,h=0,L=0;L<n.e.length;L++)l<n.k[L]&&(l=n.k[L]);for(Q=0;Q<P.e.length;Q++)h<P.k[Q]&&(h=P.k[Q]);l>h?(T=n,g=P):(T=P,g=n);}}if(k==0)break;y==T.e.length?er(t.d,T):y==g.e.length?er(t.d,g):o_(t,T,g,y);}}function iy(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l;if(t.d>1){for(Q=c(Ut,Tt,6,t.d,15,1),o=c(Ut,Tt,6,t.d,15,1),L=c(Ut,Tt,6,t.d,15,1),D=c(Ut,Tt,6,t.d,15,1),i=0;i<t.d;i++)L[i]=Jf,D[i]=-1e9;for(n=0;n<e.k.length;n++)Q[t.e[n]]+=e.k[n].a,o[t.e[n]]+=e.k[n].b,L[t.e[n]]>e.k[n].c&&(L[t.e[n]]=e.k[n].c),D[t.e[n]]<e.k[n].c&&(D[t.e[n]]=e.k[n].c);for(f=0;f<t.d;f++)Q[f]/=t.f[f],o[f]/=t.f[f];for(s=c(Ut,Tt,6,t.d,15,1),y=c(Ut,Tt,6,t.d,15,1),l=c(Ut,Tt,6,t.d,15,1),r=1;r<t.d;r++)s[r]=Q[0]-Q[r],y[r]=o[0]-o[r],l[r]=l[r-1]+D[r-1]-L[r]+3;for(A=0;A<e.k.length;A++)t.e[A]!=0&&(P=e.k[A],P.a+=s[t.e[A]],P.b+=y[t.e[A]],P.c+=l[t.e[A]]);}}function Rf(t){var e,A,n,P,r,i,f,D;for(i=0;i<t.s;i++)t.I[i]==512&&(A=t.F[0][i],n=t.F[1][i],t.D[A]==-1^t.D[n]==-1&&t.t[A]!=0&&t.t[n]!=0&&t.t[A]<0^t.t[n]<0&&(t.t[A]<0?(++t.t[A],--t.t[n]):(--t.t[A],++t.t[n])));for(D=c(F,m,6,t.r,15,1),P=0,e=0;e<t.r;e++){if(t.D[e]==-1){D[e]=-1;continue;}P<e&&(t.D[P]=t.D[e],t.t[P]=t.t[e],t.B[P]=t.B[e],t.v[P]=t.v[e],t.C[P]=t.C[e],t.A[P]=t.A[e],HD(t.K[P],t.K[e]),t.w!=null&&(t.w[P]=t.w[e]),t.u!=null&&(t.u[P]=t.u[e])),D[e]=P,++P;}for(t.r=P,f=0,r=0;r<t.s;r++)t.I[r]!=512&&(t.I[f]=t.I[r],t.G[f]=t.G[r],t.H[f]=t.H[r],t.F[0][f]=D[t.F[0][r]],t.F[1][f]=D[t.F[1][r]],++f);return t.s=f,D;}function xt(t,e){var A,n,P,r,i,f,D,Q;if(t.L&&n0(V(t.C[e],O1),0)||!fs(t,e))return 0;if(ut(t,1),t.L){if(gt(V(t.C[e],1),0)||t.w!=null&&t.w[e]!=null&&t.w[e].length>1)return 0;for(P=0;P<t.e[e];P++)if(ir(t.H[t.n[e][P]]&127)>1)return 0;}if(t.D[e]==0||e1("*",t.u==null||t.u[e]==null?null:on((i=t.u[e],w0(),i))))return t.e[e]==0?1:0;for(D=0,r=0;r<t.e[e];r++)(!t.L||n0(V(t.C[t.j[e][r]],Pe),0))&&(D+=t.o[e][r]);if(t.L){for(A=1,n=0;n<t.k[e];n++)t.I[t.n[e][n]]==8&&++A;D+=A>>1;}if(D-=en(t,e,D,t.D[e]),f=((t.v[e]&b8)>>>27)-1,f==-1)for(Q=eQ(t.D[e]),f=Q[0],n=1;f<D&&n<Q.length;n++)f=Q[n];return w.Math.max(0,f-D);}function Dp(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v;for(P=c(Ut,Tt,6,Ct(t.f,A)+1,15,1),i=c(F,m,6,Ct(t.f,A)+1,15,1),f=c(F,m,6,Ct(t.f,A)+1,15,1),T=L8(e,A),r=0,Q=0;Q<Ct(t.f,A);Q++)i[r]=_(t.f,A,Q),f[r]=Nt(t.f,A,Q),L=L8(e,i[r]),L!=-1&&(P[r++]=hn(e.a[T],e.b[T],e.a[L],e.b[L]));if(r==1)return P[0]+l1;for(o=r-1;o>0;o--)for(s=0;s<o;s++)P[s]>P[s+1]&&(g=P[s],P[s]=P[s+1],P[s+1]=g,k=i[s],i[s]=i[s+1],i[s+1]=k,v=f[s],f[s]=f[s+1],f[s+1]=v);for(P[r]=P[0]+m0,i[r]=i[0],f[r]=f[0],y=-100,l=0,D=0;D<r;D++)n=P[D+1]-P[D],r>2&&LA(t.f,f[D])&&LA(t.f,f[D+1])&&(h=SZ(t,i[D],A,i[D+1]),h!=0&&(n-=100-h)),y<n&&(y=n,l=D);return (P[l]+P[l+1])/2;}function va(t){var e,A,n;for(e=0;e<t.R.g;e++)t.db[e]==3&&!E9(t.R,e)&&hP(t.R,e),(De(t.R,e)==1||De(t.R,e)==2)&&t.db[e]==3&&hP(t.R,e),E9(t.R,e)&&t.db[e]!=3&&!nK(t,e)&&hP(t.R,e);for(n=0;n<t.R.s;n++)q9(t.R,n)&&!UW(t,n)&&hP(t.R,K(t.R,0,n));for(A=0;A<t.R.i;A++)dt(t.R,A)==2&&(Yh(t.R,A)&&(t.o[A]==1||t.o[A]==2)&&(t.o[A]=3,g0(t.R,A,386)),t.o[A]==3&&!t.p[A]&&c1(t.R,A)!=386&&(hP(t.R,K(t.R,0,A)),hP(t.R,K(t.R,1,A)))),c1(t.R,A)==1&&t.o[A]==3&&!E9(t.R,K(t.R,0,A))&&!E9(t.R,K(t.R,1,A))&&(hP(t.R,K(t.R,0,A)),hP(t.R,K(t.R,1,A))),(gP(t.R,A)==1||gP(t.R,A)==2)&&(c1(t.R,A)!=1||t.o[A]!=1&&t.o[A]!=2)&&(hP(t.R,K(t.R,0,A)),hP(t.R,K(t.R,1,A)));}function Fa(t){var e,A,n,P,r,i,f,D,Q;for(A=0;A<t.R.g;A++)AA(t.e[A],A),a1(t.e[A],2*t.c+4,Wt(t.f[A],t.c+4));for(D=1;D<=t.U;D++){for(P=false,n=0;n<t.R.g;n++)t.f[n]==D&&(P=P|Qy(t,n,2));if(P){if(f=t.U,t.U=tP(t),t.U!=f)return  true;for(e=0;e<t.R.g;e++)AA(t.e[e],e),a1(t.e[e],2*t.c+4,Wt(t.f[e],t.c+4));}}for(Q=c(E1t,H2,175,t.R.i,0,1),i=0;i<Q.length;i++)Q[i]=new oF(t.f[K(t.R,0,i)],t.f[K(t.R,1,i)],i);for(ai(Q,0,Q.length,null),r=0;r<Q.length;r++)if($Q(t,Q[r].a,2)){for(;r+1<Q.length&&NF(Q[r],Q[r+1])==0;)$Q(t,Q[++r].a,2);if(f=t.U,t.U=tP(t),t.U!=f)return  true;for(e=0;e<t.R.g;e++)AA(t.e[e],e),a1(t.e[e],2*t.c+4,Wt(t.f[e],t.c+4));}return  false;}function ka(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b;for(L=t.e[e]-A,b=-1,k=NaN,l=0;l<L;l++)if(_9(t,t.n[e][l],e)){b=l,k=_0(t,e,t.j[e][l]);break;}if(v=b==-1?0:1,i=null,v<L){for(i=c(Ut,Tt,6,L-v,15,1),Q=0,h=0;h<L;h++)h!=b&&(i[Q++]=_0(t,e,t.j[e][h]));i.sort(pe(ki.prototype.ld,ki,[]));}if(f=m0/w.Math.max(A,3),g=0,i!=null)if(i.length==1&&A==1)g=i[0];else {for(D=0,h=0;h<i.length;h++)P=h==0?i[i.length-1]-m0:i[h-1],r=i[h],D<r-P&&(D=r-P,g=P);f=D/(A+1);}for(y=0;y<A;y++)g+=f,s=g,v!=0&&(o=Ze(s,k),w.Math.abs(o)<f/2&&(o<0?s=k-f/2:s=k+f/2)),T=t.j[e][L+y],de(t,T,t.K[e].a+n*w.Math.sin(s)),Ve(t,T,t.K[e].b+n*w.Math.cos(s));}function up(t){var e,A;if(t.L)for(ut(t,7),e=0;e<t.g;e++)(t.v[e]&gn)!=0&&(n0(V(t.C[e],120),8)&&(t.C[e]=V(t.C[e],-9)),t.C[e]=V(t.C[e],-4294967297)),e<t.g&&f0(t.q,e)?t.C[e]=V(t.C[e],{l:4194297,m:z0,h:1048571}):gt(V(t.C[e],2),0)&&(t.C[e]=V(t.C[e],-5)),(gt(V(t.C[e],lr),0)||gt(V(t.C[e],l9),0)&&n0(V(t.C[e],w8),0))&&n0(V(t.C[e],120),8)&&(t.C[e]=V(t.C[e],-9)),t.t[e]!=0&&(t.C[e]=V(t.C[e],-234881025)),G1(t,e)==(A=En(t,e),A+en(t,e,A,t.D[e]))&&(t.C[e]=V(t.C[e],-4063233),t.C[e]=V(t.C[e],-17042430230529),t.C[e]=V(t.C[e],-1921),t.C[e]=V(t.C[e],-114689)),gt(V(t.C[e],Pe),0)&&t.A[e]!=0&&iQ(t,t.A[e]);}function Qp(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T;for(ut(t,7),D=new SA(t.g,t.i),f=j1(E,[Wy,m8],[58,10],0,[t.g,8],2),n=c(F,m,6,t.g,15,1),P=c(Pt,it,6,t.g,16,1),r=c(Pt,it,6,t.i,16,1),h=0;h<t.g;h++){for(h!=0&&(xu(P,P.length),xu(r,r.length)),f[h][0]=c(E,I,6,2,15,1),f[h][0][0]=t.D[h]<<24>>24,f[h][0][1]=t.B[h]<<24>>24,n[0]=h,P[h]=true,y=0,s=1,t.v[h]|=512,T=1;T<=7&&s<t.g;T++){for(l=s,Q=y;Q<s;Q++)for(A=n[Q],o=0;o<t.k[A];o++)i=t.j[A][o],P[i]||(P[i]=true,n[l++]=i),r[t.n[A][o]]=true;if(l==s)break;for(y=s,s=l,wp(t,D,r,true,null),e=0;e<D.r;e++)D.t[e]=0,D.U=0,Je(D,e,0);f[h][T]=ln((L=Me(new qA(D,16)),w0(),L));}t.v[h]&=-513;}return f;}function ma(t){var e,A,n,P,r,i,f,D,Q;for(f=null,D=k1(Ki(t.D));D.length!=0;){if(A=D.indexOf(p0(44)),A==-1?(i=k1(D),D=""):(i=k1((Mt(0,A,D.length),D.substr(0,A))),D=k1((zt(A+1,D.length+1),D.substr(A+1)))),e1(i,"X")){D.length!=0&&(D=","),D=(y1(D),D+(y1("F,Cl,Br,I"),"F,Cl,Br,I"));continue;}if(e=(J1(),zA(i,321)),e!=0)if(e==1)ED(t.v,"'H' cannot be part of an atom list and is removed.");else if(f==null)f=c(F,m,6,1,15,1),f[0]=e;else {for(n=false,r=0;r<f.length;r++)if(e==f[r]){n=true;break;}if(!n){for(Q=c(F,m,6,f.length+1,15,1),P=0;P<f.length;P++)Q[P]=f[P];Q[f.length]=e,f=Q;}}}return f?.sort(pe(Q0.prototype.ld,Q0,[])),f;}function F2(t,e,A){var n,P,r,i,f,D,Q,o,L;for(r=0,Q=0;Q<A;){if(++r,P=t[e+Q],(P&192)==128)throw At(new ZP(G4));if((P&128)==0)++Q;else if((P&224)==192)Q+=2;else if((P&240)==224)Q+=3;else if((P&248)==240)Q+=4;else throw At(new ZP(G4));if(Q>A)throw At(new XP(G4));}for(i=c(Fr,re,6,r,15,1),L=0,f=0,D=0;D<A;){for(P=t[e+D++],(P&128)==0?(f=1,P&=127):(P&224)==192?(f=2,P&=31):(P&240)==224?(f=3,P&=15):(P&248)==240?(f=4,P&=7):(P&252)==248&&(f=5,P&=3);--f>0;){if(n=t[e+D++],(n&192)!=128)throw At(new ZP("Invalid UTF8 sequence at "+(e+D-1)+", byte="+(o=n>>>0,o.toString(16))));P=P<<6|n&63;}L+=pJ(P,i,L);}return i;}function op(t){var e,A,n,P,r,i,f,D,Q,o;for(e=null,Q=null,i=0;i<t.f.i;i++)if(c1(t.f,i)==16){for(A=K(t.f,0,i),P=-1,f=0;f<t.d.a.length&&(P=L8(G(t.d,f),A),P==-1);f++);for(n=K(t.f,1,i),r=-1,D=0;D<t.d.a.length&&(r=L8(G(t.d,D),n),r==-1);D++);f!=D&&(f>D&&(o=f,f=D,D=o,o=P,P=r,r=o),Q==null&&(Q=c(kE,DA,473,t.d.a.length,0,2)),Q[D]==null&&(Q[D]=c(kE,{473:1,4:1,5:1,8:1},106,D,0,1)),Q[D][f]?(Q[D][f].c[0]+=Uu(Q[D][f].b[0],P),Q[D][f].d[0]+=Lu(Q[D][f].b[0],P),Q[D][f].c[1]+=Uu(Q[D][f].b[1],r),Q[D][f].d[1]+=Lu(Q[D][f].b[1],r),++Q[D][f].a[0],++Q[D][f].a[1]):(Q[D][f]=new OQ(G(t.d,f),G(t.d,D),P,r),!e&&(e=new n1()),e.a.push(Q[D][f])));}return e;}function ba(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;for(k=c(F,m,6,t.j.i,15,1),h=0;h<e.j.a.length;h++){for(g=G(e.k,h),L=true,D=0;D<g.length;D++)if(!t.e[g[D]]){L=false;break;}if(L)for(f=0;f<g.length;f++)++k[g[f]];}for(P=t.c,l=0;l<e.j.a.length;l++)for(i=false,T=G(e.j,l),g=G(e.k,l),f=0;f<g.length&&!i;f++)if(k[g[f]]>1&&(r=Ih(f,g.length),k[g[r]]==1)){for(Q=false,y=Ih(r,g.length);k[g[y]]==1;)(!cf(t,T[y],false)||g.length!=6&&X(t.j,T[y])!=6)&&(Q=true),y=Ih(y,g.length);if(!Q&&(n=y>r?y-r:y+g.length-r,n>2&&(n&1)==1)){for(s=1;s<n;s+=2)o=r+s<g.length?r+s:r+s-g.length,A&&(cf(t,T[o],true),cf(t,T[o==T.length-1?0:o+1],true)),u2(t,g[o]);i=true;}}return P!=t.c;}function ja(t,e){var A,n,P,r,i,f,D,Q,o;return t==null?null:(f=t,Q=null,D=null,o=null,i=null,A=t.indexOf(p0(35)),A==-1?f=t:(f=(Mt(0,A,t.length),t.substr(0,A)),n=t.indexOf(p0(35),A+1),n==-1?Q=(zt(A+1,t.length+1),t.substr(A+1)):(Q=(Mt(A+1,n,t.length),t.substr(A+1,n-(A+1))),P=t.indexOf(p0(35),n+1),P==-1?D=(zt(n+1,t.length+1),t.substr(n+1)):(D=(Mt(n+1,P,t.length),t.substr(n+1,P-(n+1))),r=t.indexOf(p0(35),P+1),r==-1?o=(zt(P+1,t.length+1),t.substr(P+1)):(o=(Mt(P+1,r,t.length),t.substr(P+1,r-(P+1))),i=(zt(r+1,t.length+1),t.substr(r+1)))))),Op(f,(e&1)!=0?Q:null,(e&2)!=0?D:null,(e&4)!=0?o:null,(e&8)!=0?i:null,false,null));}function Up(t){var e,A,n,P,r,i,f,D,Q;GA(t.o,t.k),ve(t.d,true),MA(t.o,t.d);try{if(CA(t.o,4,4)>0&&(t.n=t.d,D=new Wu(t.g),D.a.length!=0))return n=(ee(0,D.a.length),D.a[0]),$N(n,n.a.length*32),n.a.length==1?n.b=n.a[0]:n.b=Mu(n.a),i=new n1(),i.a.push(n),i;}catch(o){if(o=_1(o),Yt(o,19))e=o,ur(e,(q1(),k9));else throw At(o);}for(Q=0;aP(t.g.a)!=0;)if(D=new Wu(t.g),kD(D,t.a),n=G(D,D.a.length-1),n3(t.g,n),A=Cs(t.d,n),MA(t.o,A),CA(t.o,4,8)>0){if(xA(t.j,n),Nz(t,n),AT(n)!=t.d.i)for(f=tW(t,n,t.d),r=new Zt(f);r.a<r.c.a.length;)P=_t(r),!du(t.i,P)&&!du(t.j,P)&&xA(t.g,P);Q<aP(t.g.a)&&(Q=aP(t.g.a));}else xA(t.i,n);return aP(t.j.a)==0?null:YX(t.j);}function Lp(t,e,A){var n,P,r,i,f,D,Q;if(e&&e.g&&++t.B,e&&t.r>e.b&&(t.r=e.b),t.F)return fm(t);if(t.D.d.a.length==t.s)return null;if(e&&e.b>3){if(n=A?Pr(t.i,e.d):null,i=A?n.c:null,r=A?i.a.length:0,_W(t,e),A)for(f=r;f<i.a.length;f++)ZI(Be(A.a,A3(e.c)),I_(t.C,(ee(f,i.a.length),i.a[f]),n));e.g||(e.b<6?tr(t.w,e):(!t.e||t.e.b>e.b)&&(t.e=e)),++t.g;}for(D=t.r+3,Q=Bk(t,D,e);Q&&(P=tK(Q,Pr(t.i,Q.d).c),!(P<D));){if(P<6&&tr(t.A,new Ng(Q,P)),++t.g,lm(t.D,Q),t.D.d.a.length==t.s)return null;D=t.r+3,Q=Bk(t,D,Q);}if(!Q){if(t.w.d.a.length!=0){for(t.F=true;t.w.d.a.length!=0&&I9(t.w,t.w.d.a.length-1).b>t.r+3;)uU(t.w,t.w.d.a.length-1);Q=fm(t);}return Q;}return lm(t.D,Q),Q;}function Ra(t,e){var A,n,P,r,i,f,D,Q;A=(Q=t.n.Cc(),Q.getBackgroundRGB()),P=(ni(),(YA[0]*((A&QP)>>16)+YA[1]*((A&DP)>>8)+YA[2]*(A&255))/255<.5),n=P?E5(A,Hf):A&On|Bt(w.Math.round(lo*((A&QP)>>16)))<<16|Bt(w.Math.round(lo*((A&DP)>>8)))<<8|Bt(w.Math.round(lo*(A&255))),i=P?E5(A,.5):A&On|Bt(w.Math.round(zf*((A&QP)>>16)))<<16|Bt(w.Math.round(zf*((A&DP)>>8)))<<8|Bt(w.Math.round(zf*(A&255))),D=WU(t.i),f=$U(t.i),Ps(e,t.i,0,0,D,f,p8,p8,D/t.j,f/t.j),r=xF(20),Ps(e,t.c,0,t.d*84,84,84,r[0],r[1],vn,vn),(t.a.U&4)==0&&CQ(t,e,19,-1,true),(t.a.U&8)==0&&CQ(t,e,21,-1,true),CQ(t,e,t.b,i,false),t.f!=-1&&t.f!=t.k&&CQ(t,e,t.f,n,false),t.k!=-1&&CQ(t,e,t.k,7167924,false);}function sp(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y;if(!t.b)return  false;for(i=null,s=null,D=new IL(null,null),P=1,D.a[1]=t.b,L=D;L.a[P];)Q=P,f=s,s=L,L=L.a[P],n=t.a.Rb(e,L.c),P=n<0?0:1,n==0&&(!A.c||$8(L.d,A.d))&&(i=L),!(L&&L.b)&&!WP(L.a[P])&&(WP(L.a[1-P])?s=s.a[Q]=PQ(L,P):WP(L.a[1-P])||(y=s.a[1-Q],y&&(!WP(y.a[1-Q])&&!WP(y.a[Q])?(s.b=false,y.b=true,L.b=true):(r=f.a[1]==s?1:0,WP(y.a[Q])?f.a[r]=Fv(s,Q):WP(y.a[1-Q])&&(f.a[r]=PQ(s,Q)),L.b=f.a[r].b=true,f.a[r].a[0].b=false,f.a[r].a[1].b=false))));return i&&(A.b=true,A.d=i.d,L!=i&&(o=new IL(L.c,L.d),XY(t,D,i,o),s==i&&(s=o)),s.a[s.a[1]==L?1:0]=L.a[L.a[0]?0:1],--t.c),t.b=D.a[1],t.b&&(t.b.b=false),A.b;}function y6(t,e,A){Hi();var n,P,r,i,f;L_.call(this,t),this.a=new n1(),this.b=new zR(t),ut(this.g,7),f=Ku(cl,e),r=r8(A.c,RC)?hD(A.c.a.get(RC)):100,n=r8(A.c,pC)?hD(A.c.a.get(pC)):1,P=r8(A.c,MC)&&SP(A.c.a.get(MC),"distance"),i=new rR(this.b),(!r8(A.c,CC)||pi(A.c.a.get(CC)))&&MP(this.a,jY(f,this.b)),(!r8(A.c,HC)||pi(A.c.a.get(HC)))&&MP(this.a,iq(f,this.b)),(!r8(A.c,VC)||pi(A.c.a.get(VC)))&&MP(this.a,vZ(f,this.b,i,r,P,n)),(!r8(A.c,EC)||pi(A.c.a.get(EC)))&&MP(this.a,lX(f,this.b)),(!r8(A.c,SC)||pi(A.c.a.get(SC)))&&MP(this.a,FW(f,this.b)),(!r8(A.c,IC)||pi(A.c.a.get(IC)))&&MP(this.a,aW(f,this.b)),(!r8(A.c,xC)||pi(A.c.a.get(xC)))&&MP(this.a,HX(f,this.b,i,r));}function pa(t){var e,A,n,P,r;for(r=t.U,P=Mn(t.f,t.R.g),t.R.L||(NW(t),wm(t,r,P)),t.bb=c(E,I,6,t.R.g,15,1),t.ab=c(E,I,6,t.R.g,15,1),A=0;A<t.R.g;A++)t.bb[A]=De(t.R,A)<<24>>24,t.ab[A]=OA(t.R,A)<<24>>24;for(t.n=c(E,I,6,t.R.i,15,1),t.k=c(E,I,6,t.R.i,15,1),n=0;n<t.R.i;n++)t.n[n]=gP(t.R,n)<<24>>24,t.k[n]=ef(t.R,n)<<24>>24;for(t$(t),t.Z=false,t.M=c(Pt,it,6,t.R.g,16,1),e=0;e<t.R.g;e++)t.db[e]!=0&&(t.M[e]=true,t.Z=true);bJ(t),t.P=null,t.cb=c(Pt,it,6,t.R.g,16,1),t.Z&&(t.P=new dm(t.R,P,t.M,t.db,t.o,t.bb,t.ab,t.ib,t.q,t.cb),K$(t.P)),t.eb=c(Pt,it,6,t.R.g,16,1),t.gb=c(Pt,it,6,t.R.g,16,1),t.hb=new n1(),t.P&&h2(t.P,t.f),m$(t),wm(t,r,P),a$(t),t.P&&(t.K=uz(t.P)),wtt(t);}function Ma(t){var e,A,n,P,r,i,f,D,Q,o,L,s;for(D=new Zt(t.d);D.a<D.c.a.length;)for(f=_t(D),Q=0;Q<f.f.length;Q++)if(n=f.f[Q],dt(t.f,n)==2&&(!A8(t.f,n)&&(ze(t.f,n)==3||ze(t.f,n)==0)&&yh(t.f,n),!LA(t.f,n)&&O(t.f,K(t.f,0,n))>1&&O(t.f,K(t.f,1,n))>1&&(ze(t.f,n)==1||ze(t.f,n)==2))){for(s=c(F,m,6,2,15,1),P=c(F,m,6,2,15,1),o=0;o<2;o++)for(s[o]=t.f.N,P[o]=K(t.f,o,n),L=0;L<Ct(t.f,P[o]);L++)r=_(t.f,P[o],L),r!=K(t.f,1-o,n)&&s[o]>r&&(s[o]=r);i=hn(f.a[f.g[P[0]]],f.b[f.g[P[0]]],f.a[f.g[P[1]]],f.b[f.g[P[1]]]),e=hn(f.a[f.g[s[0]]],f.b[f.g[s[0]]],f.a[f.g[P[0]]],f.b[f.g[P[0]]]),A=hn(f.a[f.g[P[1]]],f.b[f.g[P[1]]],f.a[f.g[s[1]]],f.b[f.g[s[1]]]),VL(i,e)<0^VL(i,A)<0^ze(t.f,n)==2&&Vp(f,n);}}function Ca(t,e,A){var n,P,r,i,f,D,Q,o,L;return r=fR(t,e),i=r[0],D=r[1],D.e==0?new ID(i,2):(Q=t.e*e.e,IT(e)<54?(f=(L=D.d>1?Xr(D.a[0],D.a[1]):Xr(D.a[0],0),D.e>0?L:E0(L)),P=(o=e.d>1?Xr(e.a[0],e.a[1]):Xr(e.a[0],0),e.e>0?o:E0(o)),n=Si(Wt(z(f,0)<0?E0(f):f,1),z(P,0)<0?E0(P):P)?-1:I1(Wt(z(f,0)<0?E0(f):f,1),z(P,0)<0?E0(P):P)?1:0,n=zQ(SQ(i,0)?1:0,Q*(5+n),A)):(n=ss($k(D.e<0?D.e==0?D:new le(-D.e,D.d,D.a):D),e.e<0?e.e==0?e:new le(-e.e,e.d,e.a):e),n=zQ(SQ(i,0)?1:0,Q*(5+n),A)),n!=0?IT(i)<54?nq((o=i.d>1?Xr(i.a[0],i.a[1]):Xr(i.a[0],0),at(i.e>0?o:E0(o),n))):(i=v2(i,(Ce(),z(n,0)>=0?be(n):mP(be(E0(n))))),new ID(i,2)):new ID(i,2));}function yp(t){var e,A,n,P,r,i,f,D,Q;switch(e=null,t.e){case 1:for(e=c(Kt,t1,6,2*t.a.length,15,1),n=0;n<t.a.length;n++)e[n]=t.a[n],e[t.a.length+n]=180+t.a[n]<<16>>16;return e;case 2:for(P=t.a[0]==0?1:0,r=t.a[t.a.length-1]==180?t.a.length-1:t.a.length,Q=r-P,e=c(Kt,t1,6,t.a.length+Q,15,1),i=0;i<t.a.length;i++)e[i]=t.a[i];for(f=P;f<r;f++)e[e.length-1-f+P]=360-t.a[f]<<16>>16;return e;case 3:for(P=t.a[0]==0?1:0,r=t.a[t.a.length-1]==90?t.a.length-1:t.a.length,Q=r-P,e=c(Kt,t1,6,2*t.a.length+2*Q,15,1),D=0;D<t.a.length;D++)e[D]=t.a[D],e[t.a.length+Q+D]=180+t.a[D]<<16>>16;for(A=P;A<r;A++)e[t.a.length+Q-1-A+P]=180-t.a[A]<<16>>16,e[e.length-1-A+P]=360-t.a[A]<<16>>16;return e;default:return t.a;}}function Ha(t){var e,A,n,P,r,i,f,D,Q,o,L;for(L=new Zt(t.g);L.a<L.c.a.length;){for(Q=_t(L),A=0,r=0;r<O(t.k,Q.a);r++)t.c[Nt(t.k,Q.a,r)]||++A;if(A!=0){for(Q.c=c(F,m,6,A,15,1),A=0,i=0;i<O(t.k,Q.a);i++)t.c[Nt(t.k,Q.a,i)]||(D=_(t.k,Q.a,i),Q.c[A++]=t.q[D]<<16|D);for(Q.c.sort(pe(Q0.prototype.ld,Q0,[])),P=0;P<Q.c.length;P++)Q.c[P]=d1&Q.c[P];}}for(n=c(Pt,it,6,t.k.i,16,1),t.e=c(F,m,6,t.k.i,15,1),o=new Zt(t.g);o.a<o.c.a.length;)if(Q=_t(o),Q.c!=null){for(Q.d=c(Pt,it,6,Q.c.length,16,1),P=0;P<Q.c.length;P++)for(f=0;f<O(t.k,Q.a);f++)if(Q.c[P]==_(t.k,Q.a,f))if(e=Nt(t.k,Q.a,f),t.c[e])n[t.e[e]]=false;else {for(t.c[e]=true,Q.d[P]=true,t.e[e]=1;n[t.e[e]];)++t.e[e];n[t.e[e]]=true;}}}function lp(){if(w5(),!dl)try{$f=c(S1t,c0,102,4,0,1),dr=c(J4,c0,20,4,0,1),Br=c(J4,c0,20,4,0,1),dr[0]=fi("/resources/toxpredictor/m1.txt"),dr[1]=fi("/resources/toxpredictor/t1.txt"),dr[2]=fi("/resources/toxpredictor/i1.txt"),dr[3]=fi("/resources/toxpredictor/r1.txt"),Br[0]=fi("/resources/toxpredictor/m2.txt"),Br[1]=fi("/resources/toxpredictor/t2.txt"),Br[2]=fi("/resources/toxpredictor/i2.txt"),Br[3]=fi("/resources/toxpredictor/r2.txt"),$f[0]=Rs("/resources/toxpredictor/m3.txt"),$f[1]=Rs("/resources/toxpredictor/t3.txt"),$f[2]=Rs("/resources/toxpredictor/i3.txt"),$f[3]=Rs("/resources/toxpredictor/r3.txt"),dl=!0;}catch(t){if(t=_1(t),Yt(t,19))q1();else throw At(t);}}function Va(t,e){var A,n,P,r,i,f,D;if(D=new LD(),!dl)return Ft(D.a,new ae("Toxicity predictor not properly initialized.",2)),D;if(i=Me(new bA(t)),$f[e].cc(i)!=-1)return e8(D,"This molecule is known to be "+CE[e]+":",2),Ft(D.a,new ae(i,1)),D;for(f=new VD(1),A=false,n=new _A(),r=0;r<dr[e].a.length;r++)l2(new WA(false),n,G(dr[e],r)),GA(f,t),MA(f,n),CA(f,1,f.c)>0&&(A||e8(D,"High-risk fragments indicating "+Eo[e]+":",2),A=true,e8(D,G(dr[e],r),1));for(A=false,P=0;P<Br[e].a.length;P++)l2(new WA(false),n,G(Br[e],P)),GA(f,t),MA(f,n),CA(f,1,f.c)>0&&(A||e8(D,"Medium-risk fragments indicating "+Eo[e]+":",2),A=true,e8(D,G(Br[e],P),1));return D.a.a.length==0&&e8(D,"No indication for "+Eo[e]+" found.",2),D;}function hp(t,e,A,n,P,r){var i,f,D,Q,o,L,s,y,l;for(l=B(d(Ut,1),Tt,6,15,[0,0,0]),Q=B(d(Ut,1),Tt,6,15,[0,0,0]),f=B(d(F,1),m,6,15,[e.D[A],e.D[n],e.D[P]]),D=1.75,o=0;o<3;o++)switch(f[o]){case 1:l[o]=1.395;break;case 6:l[o]=2.494,Q[o]=1.016;break;case 7:l[o]=2.711,Q[o]=1.113;break;case 8:l[o]=3.045,Q[o]=1.337;break;case 9:l[o]=2.847;break;case 14:l[o]=2.35,Q[o]=.811;break;case 15:l[o]=2.35,Q[o]=1.068;break;case 16:l[o]=2.98,Q[o]=1.249;break;case 17:l[o]=2.909,Q[o]=1.078;break;case 35:l[o]=3.017;break;case 53:l[o]=3.086;}return L=d2(t.a.d,e,A,n),s=d2(t.a.d,e,n,P),i=(L-s)*(L-s)/((L+s)*(L+s)),y=mC*r,T2(e,A,n,P,4)?D*=.85:T2(e,A,n,P,3)&&(D*=.05),D*l[0]*Q[1]*l[2]/((L+s)*y*y*w.Math.exp(2*i));}function Ea(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g;if(e!=null)t.e=e;else for(t.e=c(Pt,it,6,t.j.i,16,1),s=0;s<t.j.i;s++)c1(t.j,s)==8&&(t.e[s]=true,g0(t.j,s,1));for(y=0;y<t.j.i;y++)t.e[y]&&++t.c;for(t.d=c(Pt,it,6,t.j.g,16,1),t.f=c(Pt,it,6,t.j.g,16,1),f=0;f<t.j.g;f++){for(l=0,h=0;h<O(t.j,f);h++)t.e[Nt(t.j,f,h)]&&++l;l>0&&(t.d[f]=true,++t.b,l==3&&(t.f[f]=true));}for(t.i=c(Pt,it,6,A.j.a.length,16,1),g=0;g<A.j.a.length;g++)for(t.i[g]=true,Q=G(A.k,g),o=0,L=Q.length;o<L;++o)if(D=Q[o],!t.e[D]){t.i[g]=false;break;}for(t.g=c(Pt,it,6,t.j.g,16,1),T=0;T<A.j.a.length;T++)if(t.i[T]&&G(A.k,T).length!=6)for(P=G(A.j,T),r=0,i=P.length;r<i;++r)n=P[r],G(A.k,T).length==5&&(t.g[n]=true);t.k=0;}function fy(t,e,A,n,P,r,i){var f,D,Q,o,L,s,y,l,h,T,g,k;for(y=0;y<e.k[A];y++)if(f=e.j[A][y],!r[f]&&(o=e.n[A][y],g=dt(e,o),n&&g>=2||!n&&g<=2)){for(r[f]=true,i.add(U1(o)),l=0;l<e.k[f];l++)if(D=e.j[f][l],!r[D]&&(L=e.n[f][l],k=dt(e,L),e.p[f]+2==g+k&&(n&&k<=2||!n&&k>=2))){if(r[D]=true,i.add(U1(L)),t.f[D]&&(X(t.i,D)==5||X(t.i,D)==6||X(t.i,D)==7||X(t.i,D)==8||X(t.i,D)==16||X(t.i,D)==34||X(t.i,D)==52)&&(!n||TQ(e,D))){for(s=new ls(t,e),h=0;h<i.a.length;h++)Q=(ee(h,i.a.length),i.a[h]).a,T=h<2?n^(h&1)==0:P^(h&1)==0,T?kL(s,Q,dt(e,Q)==1?2:3):kL(s,Q,dt(e,Q)==2?1:2),t.g[Q]=true;Yi(t.e,s)&&TL(t.d,s);}else fy(t,e,D,n,P,r,i);cA(i,i.a.length-1),r[D]=false;}cA(i,i.a.length-1),r[f]=false;}return  false;}function ne(t,e){var A,n,P,r,i,f,D,Q,o;if(e==0)return 0;for(f=null,n=0;n<t.r;n++)(t.v[n]&b1)>>18==e&&(f==null&&(f=c(Pt,it,6,32,16,1)),f[(t.v[n]&b1)>>18!=1&&(t.v[n]&b1)>>18!=2?-1:(t.v[n]&VA)>>20]=true);for(r=0;r<t.s;r++)(t.G[r]&768)>>8==e&&(f==null&&(f=c(Pt,it,6,32,16,1)),f[(t.G[r]&768)>>8!=1&&(t.G[r]&768)>>8!=2?-1:(t.G[r]&cn)>>10]=true);if(o=0,f!=null){for(Q=c(F,m,6,32,15,1),D=0;D<32;D++)f[D]&&(Q[D]=o++);for(A=0;A<t.r;A++)(t.v[A]&b1)>>18==e&&(i=Q[(t.v[A]&b1)>>18!=1&&(t.v[A]&b1)>>18!=2?-1:(t.v[A]&VA)>>20],t.v[A]&=-32505857,t.v[A]|=i<<20);for(P=0;P<t.s;P++)(t.G[P]&768)>>8==e&&(i=Q[(t.G[P]&768)>>8!=1&&(t.G[P]&768)>>8!=2?-1:(t.G[P]&cn)>>10],t.G[P]&=-31745,t.G[P]|=i<<10);}return o;}function L9(t,e,A,n,P){var r,i,f,D,Q,o,L,s;for(ut(t,n?7:1),e.w=null,t.L&&ve(e,true),D=A.length,P==null&&(P=c(F,m,6,D,15,1)),e.r=0,r=0;r<D;r++)if(A[r]){if(P[r]=Nn(t,e,r,0,0),t.D[r]==1&&(s=G1(t,r),s>1)){for(L=0;L<t.e[r];L++)if(!A[t.j[r][L]]){aA(e,P[r],s);break;}}}else P[r]=-1;for(o=c(F,m,6,t.s,15,1),zr(o,o.length,-1),e.s=0,Q=0;Q<t.s;Q++)i=t.F[0][Q],f=t.F[1][Q],i<D&&f<D&&(A[i]&&A[f]?o[Q]=o9(t,e,Q,0,0,P==null?t.F[0][Q]:P[t.F[0][Q]],P==null?t.F[1][Q]:P[t.F[1][Q]],n):t.t[i]!=0&&t.t[f]!=0&&t.t[i]<0^t.t[f]<0&&(A[i]&&(e.t[P[i]]+=t.t[i]<0?1:-1),A[f]&&(e.t[P[f]]+=t.t[f]<0?1:-1)));gL(t,e),t.d&&(e.U=0),e.U=0,ne(e,1),ne(e,2),e.r!=D&&ve(e,true),Ap(t,e,D,P,o),Eb(t,e,D,P),n&&jf(new p9(e),null,false);}function Sa(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l;if(D=false,e0(t.k,e)!=0&&O(t.k,e)==2&&EA(t.k,e,0)==2&&EA(t.k,e,1)==2){for(i=0;i<O(t.k,e);i++)if(n=_(t.k,e,i),n!=A&&O(t.k,n)==2){D=true;break;}for(r=0;r<O(t.k,e);r++){for(n=_(t.k,e,r),l=0,y=c(F,m,6,3,15,1),o=0;o<O(t.k,n);o++)y[l]=_(t.k,n,o),y[l]!=e&&++l;l==2&&t.q[y[0]]<t.q[y[1]]^y[0]<y[1]&&(D=!D);}}else {for(L=c(F,m,6,4,15,1),s=c(F,m,6,4,15,1),f=0,A!=-1&&(L[f]=A,s[f++]=8*t.q[A]),(xt(t.k,e)!=0||O(t.k,e)==3)&&(L[f]=Et,s[f++]=8*t.q[e]),r=0;r<O(t.k,e);r++)n=_(t.k,e,r),n!=A&&(L[f]=n,s[f++]=lY(t,e,r));D=UK(L,s);}return Q=v0(t.k,e)==1^D,xi(t.k,e)&&(P=ix(t.d,e),t.n[P]||(t.n[P]=true,t.o[P]=Q),t.o[P]&&(Q=!Q)),Q?"@@":"@";}function Ia(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y;for(ut(t.H,t.N),o=t.H.g,t.J=c(F,m,6,o,15,1),t.I=c(XA,re,6,o,14,1),i=0;i<o;i++)t.I[i]=d0(V(J(Wp(t.H,i),h0(t.H,i)),e4),gM),t.J[i]=X(t.H,i),(e&1)!=0&&(t.J[i]+=R1(t.H,i)+16<<8),(e&2)!=0&&(t.J[i]+=ge(t.H,i)<<16);for(t.M=c(XA,re,6,o,14,1),s=kn(t.H),Q=0;Q<s.j.a.length;Q++)for(y=G(s.k,Q).length,n=G(s.j,Q),P=0,r=n.length;P<r;++P)f=n[P],y==3?t.M[f]=J(t.M[f],h9):y==4?t.M[f]=J(t.M[f],T9):y==5?t.M[f]=J(t.M[f],c9):y==6?t.M[f]=J(t.M[f],w9):y==7&&(t.M[f]=J(t.M[f],g9));for(A=0;A<o;A++)y=Or(t.H,A),y==0?t.M[A]=J(t.M[A],w8):y>7&&(t.M[A]=J(t.M[A],Vf));for(L=t.H.i,t.K=c(F,m,6,L,15,1),D=0;D<L;D++)t.K[D]=(mj(t.H,D)|fe(t.H,D))&6422527^6291840;}function Dy(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l;if(Ln(t.i,0),n=zA(e,t.c),n!=0){if(K1(t),L=n==1^X(t.V,t.t)==1,mf(t.V,t.t,n,0,-1,0)){L&&(t.t=-1,N1(t,new x1(t,4,true))),t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true));return;}t.eb=w.Math.max(t.eb,0),P1(t.k);}if(t.j!=null&&t.j.length!=0&&(e=t.j),y=(yy(),o=(!ll&&KY(),Be(ll,rf(e.toLowerCase(),"-"))),o==null?null:tf(new WA(false),o)),y){for(K1(t),D=new _A(),mR(D,t.V,t.t,null),s=Qn(D,t.ab*24),i=D.r,A=0;A<D.r;A++)D.v[A]|=q0;for(as(D,y,0),U9(new a8(4),D),P=mt(t.V,t.t)-s*D.K[0].a,r=Rt(t.V,t.t)-s*D.K[0].b,f=t.V.r,as(t.V,y,t.t),l=t.V.r-f,Q=0;Q<l;Q++)de(t.V,f+Q,s*D.K[i+Q].a+P),Ve(t.V,f+Q,s*D.K[i+Q].b+r);hf(t.V),t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true));}}function Tp(t,e,A){if(R1(t.j,e)!=0)return 0;if(t.a){if(X(t.j,e)==5)return G1(t.j,e)!=2?0:(A&&b0(t.j,e,1),1);if(X(t.j,e)==7)return G1(t.j,e)!=2?0:(A&&b0(t.j,e,-1),nf(t,e)?6:3);if(X(t.j,e)==8)return G1(t.j,e)!=1?0:(A&&b0(t.j,e,-1),nf(t,e)?7:4);if(X(t.j,e)==16)return G1(t.j,e)!=1?0:(A&&b0(t.j,e,-1),nf(t,e)?5:2);if(X(t.j,e)==34)return G1(t.j,e)!=1?0:(A&&b0(t.j,e,-1),nf(t,e)?4:1);}else {if(X(t.j,e)==5)return G1(t.j,e)>2?0:(A&&b0(t.j,e,1),1);if(X(t.j,e)==7)return G1(t.j,e)>2?0:(A&&b0(t.j,e,-1),nf(t,e)?5:3);if(X(t.j,e)==8)return G1(t.j,e)>1?0:(A&&b0(t.j,e,-1),nf(t,e)?7:4);if(X(t.j,e)==16)return G1(t.j,e)>1?0:(A&&b0(t.j,e,-1),nf(t,e)?5:2);}return 0;}function cp(t){var e,A;if(t.s==null&&!t.t)return null;if(t.t)return A=pQ(t.t),A?(iy(t,A),++t.p,_w(A,"SO#"+ ++t.a),A):null;if(t.j)return null;for(t.b.c==0&&Pr(t,c(F,m,6,t.q.length,15,1)),t.A=Lp(t.B,t.A,t.c);t.A&&!(gt(t.v,0)&&(q1(),I1(E1(Date.now()),t.v)));){if(e=Pr(t,t.A.d),t.A.c||(HG(t.A,rK(e,t.A.i,"#"+ ++t.a)),t.i&&vN(t.c,t.A)),t.A.b==0&&(gp(t,t.A,t.A.c),t.A.b!=0&&dtt(t,t.A),t.i&&(mJ(Oi(t.c,t.A),e,t.A.c),Oi(t.c,t.A))),t.A.b>t.B.r+3){if(t.A=Lp(t.B,t.A,t.c),t.A||t.p!=0)continue;if(t.C&&(t.t=new XQ(t.k),DU(t.t,t.v),q5(t.t,t.o,-1),A=pQ(t.t),A))return iy(t,A),++t.p,_w(A,"SO#"+ ++t.a),A;t.A=t.B.e,t.j=true;}if(t.A)return iy(t,t.A.c),t.A.g=true,++t.p,t.i&&Oi(t.c,t.A),t.A.c;}return null;}function xa(t,e,A,n){var P,r,i,f,D,Q;if(P=i9(e,t.d),b0(e,P,t.e),tA(e,P,t.o,false),aA(e,P,t.a),gt(t.c,0)&&(gt(V(t.c,2),0)?(t.c=V(t.c,-3),e.v[P]|=q0):e.v[P]&=Ry,w1(e,P,t.c,true)),t.b){for(Q=c(F,m,6,t.b.d.a.length,15,1),D=0;D<t.b.d.a.length;D++)Q[D]=I9(t.b,D).a;MT(e,P,Q),t.b.d.a.length=0;}else if(String.fromCharCode(A).toLowerCase().charCodeAt(0)==A&&ev(A)){if(t.d!=5&&t.d!=6&&t.d!=7&&t.d!=8&&t.d!=15&&t.d!=16&&t.d!=33&&t.d!=34)throw At(new H1("SmilesParser: atomicNo "+t.d+" must not be aromatic. Position:"+(n-1)));e.v[P]|=q0;}else e.v[P]&=Ry;if(t.f)for(f=new Zt(t.f);f.a<f.c.a.length;)i=_t(f),t.r=true,$0(i,0,0),ve(e,true),as(e,i,P);return t.g!=-1&&t.d!=1&&(r=c(E,I,6,1,15,1),r[0]=t.g<<24>>24,kX(e,P,r)),P;}function Na(t,e){var A,n,P,r,i,f,D,Q,o,L,s;if(e==2||e==5)Ft(t.F,Af(t.G,t.G.length)),t.b&&Ft(t.a,$L(t.C,t.C.length));else if(e==4)s=yj(Af(t.G,t.G.length)),kU(t.O,s)||(Yi(t.O,s),Ft(t.F,Af(t.G,t.G.length)),t.b&&Ft(t.a,$L(t.C,t.C.length)));else if(e==3){if(s=yj(Af(t.G,t.G.length)),!kU(t.O,s)){for(L=false,Q=(f=new J8(new K8(new br(t.O.a).a).b),new jr(f));Nr(Q.a.a);){for(D=(i=H9(Q.a),i.hd()),o=0,n=s,P=0,r=n.length;P<r;++P){for(A=n[P];o<D.length&&D[o]<A;)++o;if(o<D.length&&A==D[o]){L=true;break;}}if(L)break;}L||(Yi(t.O,s),Ft(t.F,Af(t.G,t.G.length)),t.b&&Ft(t.a,$L(t.C,t.C.length)));}}else e==6&&(s=zZ(t,Af(t.G,t.G.length)),kU(t.O,s)||(Yi(t.O,s),Ft(t.F,Af(t.G,t.G.length)),t.b&&Ft(t.a,$L(t.C,t.C.length))));}function Nn(t,e,A,n,P){var r,i,f;return r=e.r,r>=e.N&&VQ(e,e.N*2),f=(t.v[A]&b1)>>18,i=-1,f==1?n==-1?i=ne(e,f):i=w.Math.min(31,n+((t.v[A]&b1)>>18!=1&&(t.v[A]&b1)>>18!=2?-1:(t.v[A]&VA)>>20)):f==2&&(P==-1?i=ne(e,f):i=w.Math.min(31,P+((t.v[A]&b1)>>18!=1&&(t.v[A]&b1)>>18!=2?-1:(t.v[A]&VA)>>20))),e.D[r]=t.D[A],e.t[r]=t.t[A],e.B[r]=t.B[A],e.v[r]=t.v[A],e.C[r]=e.L?t.C[A]:0,HD(e.K[r],t.K[A]),e.A[r]=t.A[A],e.w!=null&&(e.w[r]=null),t.w!=null&&t.w[A]!=null&&e.L&&(e.w==null&&(e.w=c(F,u0,7,e.D.length,0,2)),e.w[r]=Mn(t.w[A],t.w[A].length)),e.u!=null&&(e.u[r]=null),t.u!=null&&t.u[A]!=null&&(e.u==null&&(e.u=c(E,m8,10,e.D.length,0,2)),e.u[r]=oO(t.u[A],t.u[A].length)),i!=-1&&(e.v[r]&=-32505857,e.v[r]|=i<<20),++e.r,e.U=0,r;}function Ga(t,e){s8();var A,n,P,r,i,f,D,Q,o,L,s;for(r=0;r<e.g;r++)if(e.p[r]==2&&e.k[r]==2&&e.o[r][0]==2&&e.o[r][1]==2&&e.D[r]<=7&&(o=e.v[r]&3,o==1||o==2)){for(n=c(F,m,6,4,15,1),s=c(F,m,6,2,15,1),f=0;f<e.k[r];f++){for(A=e.j[r][f],Q=Et,D=0;D<e.k[A];D++)i=e.j[A][D],i!=r&&Q>i&&(Q=i);n[3*f]=Q,n[1+f]=A,s[f]=r;}if(n[0]==Et||n[3]==Et){q1(),""+Me(new bA(e));break;}Ft(t,new eT(e,n,s,(e.v[r]&gn)!=0,o==1));}for(P=0;P<e.i;P++)if(o=e.G[P]&3,(o==1||o==2)&&dt(e,P)!=2){for(n=c(F,m,6,4,15,1),s=c(F,m,6,2,15,1),f=0;f<2;f++){for(A=e.F[f][P],L=e.F[1-f][P],Q=Et,D=0;D<e.k[A];D++)i=e.j[A][D],i!=L&&Q>i&&(Q=i);n[3*f]=Q,n[1+f]=A,s[f]=e.F[1-f][P];}Ft(t,new eT(e,n,s,(e.G[P]&64)!=0,o==2));}}function Oa(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l;for(f=Es(t),i=c(Pt,it,6,f+1,16,1),l=new Zt(t.g);l.a<l.c.a.length;)for(s=_t(l),A=0;A<s.r;A++)if(P=w.Math.abs(s.A[A]),P!=0){if(i[P])throw At(new H1("Duplicate mapping no in reactants: "+P));i[P]=true;}for(r=c(Pt,it,6,f+1,16,1),L=new Zt(t.f);L.a<L.c.a.length;)for(Q=_t(L),A=0;A<Q.r;A++)if(P=w.Math.abs(Q.A[A]),P!=0){if(r[P])throw At(new H1("Duplicate mapping no in products: "+P));r[P]=true;}for(D=c(F,m,6,f+1,15,1),n=0,e=1;e<=f;e++)i[e]&&r[e]&&(D[e]=++n);if(n!=f){for(y=new Zt(t.g);y.a<y.c.a.length;)for(s=_t(y),A=0;A<s.r;A++)tA(s,A,D[w.Math.abs(s.A[A])],s.A[A]<0);for(o=new Zt(t.f);o.a<o.c.a.length;)for(Q=_t(o),A=0;A<Q.r;A++)tA(Q,A,D[w.Math.abs(Q.A[A])],Q.A[A]<0);}}function qa(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g;if(g=(ut(t,7),t.q),!g.e[e])return 1;if(G(g.k,e).length==6){for(n=G(g.j,e),P=0,r=n.length;P<r;++P)if(A=n[P],G1(t,A)+xt(t,A)!=t.e[A]+xt(t,A)+1)return 1;for(D=G(g.k,e),Q=0,o=D.length;Q<o;++Q)if(f=D[Q],L=B(d(F,1),m,6,15,[-1,-1]),dt(t,f)==1){for(y=0;y<=1;y++)for(i=t.F[y][f],s=0;s<t.e[i];s++)if(l=t.j[i][s],!wA(g,e,l)&&dt(t,o1(t,i,l))==2){L[y]=l;break;}if(L[0]>-1&&L[1]>-1)for(T=0;T<g.j.a.length;T++){if(wA(g,T,L[0])&&wA(g,T,L[1])&&t.b[T]==2)return 2;if(wA(g,T,L[0])&&wA(g,T,L[1])&&t.b[T]!=0)return 1;}}}if(G(g.k,e).length==5)for(h=1,n=G(g.j,e),P=0,r=n.length;P<r;++P){if(A=n[P],G1(t,A)+xt(t,A)==t.e[A]+xt(t,A)&&h>0){--h;continue;}if(G1(t,A)+xt(t,A)!=t.e[A]+xt(t,A)+1)return 1;}return 0;}function l6(t){var e,A,n,P,r,i,f,D,Q,o,L;for(e=0;e<t.R.g;e++)if(t.db[e]==1||t.db[e]==2){if(D=false,oT(t.R,e))for(f=0;f<O(t.R,e);f++){for(P=_(t.R,e,f),L=0,o=c(F,m,6,3,15,1),Q=0;Q<O(t.R,P);Q++)o[L]=_(t.R,P,Q),o[L]!=e&&++L;L==2&&t.f[o[0]]>t.f[o[1]]^o[0]<o[1]&&(D=!D);}else for(f=1;f<O(t.R,e);f++)for(Q=0;Q<f;Q++)r=_(t.R,e,f),i=_(t.R,e,Q),t.f[r]>t.f[i]&&(D=!D),r<i&&(D=!D);me(t.R,e,t.db[e]==1^D?1:2,t.fb[e]);}else me(t.R,e,t.db[e],t.fb[e]);for(A=0;A<t.R.i;A++)if(t.o[A]==1||t.o[A]==2){for(D=false,f=0;f<2;f++)if(n=K(t.R,f,A),O(t.R,n)==3){for(o=c(F,m,6,2,15,1),L=0,Q=0;Q<3;Q++)_(t.R,n,Q)!=K(t.R,1-f,A)&&(o[L++]=_(t.R,n,Q));t.f[o[0]]>t.f[o[1]]&&(D=!D),o[0]<o[1]&&(D=!D);}Q8(t.R,A,t.o[A]==1^D?1:2,t.p[A]);}else Q8(t.R,A,t.o[A],t.p[A]);}function wp(t,e,A,n,P){var r,i,f,D,Q,o,L,s;for(ut(t,n?7:1),e.w=null,t.L&&ve(e,true),P==null&&(P=c(F,m,6,t.r,15,1)),e.r=0,r=0;r<t.r;r++)for(P[r]=-1,o=0;o<t.k[r];o++)if(A[t.n[r][o]]){if(P[r]=Nn(t,e,r,0,0),t.D[r]==1&&(s=G1(t,r),s>1)){for(L=0;L<t.e[r];L++)if(!A[t.n[r][L]]){aA(e,P[r],s);break;}}break;}for(Q=c(F,m,6,t.s,15,1),e.s=0,D=0;D<t.s;D++)A[D]?Q[D]=o9(t,e,D,0,0,P==null?t.F[0][D]:P[t.F[0][D]],P==null?t.F[1][D]:P[t.F[1][D]],n):(Q[D]=-1,i=t.F[0][D],f=t.F[1][D],P[i]==-1^P[f]==-1&&t.t[i]!=0&&t.t[f]!=0&&t.t[i]<0^t.t[f]<0&&(P[i]!=-1&&(e.t[P[i]]+=t.t[i]<0?1:-1),P[f]!=-1&&(e.t[P[f]]+=t.t[f]<0?1:-1)));return gL(t,e),t.d&&(e.U=0),e.U=0,ne(e,1),ne(e,2),e.r!=t.r&&ve(e,true),Ap(t,e,t.r,P,Q),Eb(t,e,t.r,P),n&&jf(new p9(e),null,false),P;}function za(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j;for(f=0,A=0;A<t.f.r;A++)W0(t.f,A)&&++f;if(!(f<2)){for(L=0,Q=0,o=0;o<t.f.s;o++)n=K(t.f,0,o),P=K(t.f,1,o),W0(t.f,n)&&W0(t.f,P)&&(t.c[o]=true,t.b[n]=true,t.b[P]=true,Q+=ET(t.f,o),++L);for(L!=0&&Q!=0?Q/=L:Q=G8(t.f),r=0;r<t.f.r;r++)W0(t.f,r)&&!t.b[r]&&--f;if(!(f<2)){for(v=c(F,m,6,t.f.r,15,1),s=Ur(t.f,v,true,true),k=c(F,m,6,s,15,1),i=0;i<t.f.r;i++)v[i]!=-1&&++k[v[i]];for(g=c(oc,A0,48,s,0,1),l=0;l<s;l++)g[l]=new VP(t.f,k[l],true);for(D=c(F,m,6,s,15,1),e=0;e<t.f.r;e++)h=v[e],h!=-1&&(g[h].k[D[h]]=Qe,g[h].e[D[h]]=e,g[h].a[D[h]]=mt(t.f,e)/Q,g[h].b[D[h]]=Rt(t.f,e)/Q,++D[h]);for(b=-1,j=0,T=0;T<s;T++)j<k[T]&&(j=k[T],b=T);for(CP(t.d,g[b]),y=0;y<s;y++)y!=b&&CP(t.d,g[y]);}}}function Ka(t,e){var A,n,P,r,i,f,D,Q,o,L,s;for(n=0;n<t.e[e];n++)switch(o=t.j[e][n],t.D[o]){case 6:return 5;case 7:switch(p6(t,o)){case 8:case 39:case 62:case 67:case 68:return 23;case 34:case 54:case 55:case 56:case 58:case 81:return 36;case 9:return 27;default:return 28;}case 8:switch(p6(t,o)){case 49:return 50;case 51:return 52;case 70:return 31;case 6:for(P=false,r=false,i=false,f=false,D=0;D<t.e[o];D++){if(L=t.j[o][D],t.D[L]==6)for(Q=0;Q<t.e[L];Q++)s=t.j[L][Q],s!=o&&(A=o1(t,L,s),(t.D[s]==6||t.D[s]==7)&&(dt(t,A)==2||A<t.i&&Ee(t.q,A))&&(P=true),t.D[s]==8&&dt(t,A)==2&&(r=true));t.D[L]==15&&(i=true),t.D[L]==16&&(f=true);}if(r||i)return 24;if(P)return 29;if(f)return 33;default:return 21;}case 14:return 5;case 16:case 15:return 71;}return 0;}function Ja(t){var e,A,n,P,r,i,f,D,Q,o,L;if(t.n==null){if(t.b)for(n=t.j+1,t.p=c(F,DA,29,t.o.length,0,3),r=0;r<t.o.length;r++){for(t.p[r]=c(F,u0,7,t.g[r].a.length,0,2),f=0;f<t.g[r].a.length;f++)t.p[r][f]=wX(t,r,G(t.g[r],f),n);for(n+=t.o[r].g,P=C9(t.c,r),e=0;e<P.g;e++)gt(V(P.C[e],Pe),0)||--n;}if(t.n=j1(gr,[DA,B9],[78,26],0,[t.q,t.c.f.a.length],2),t.d=j1(ft,[DA,Dt],[13,2],6,[t.q,t.c.f.a.length],2),t.e=c(Pt,it,6,t.q,16,1),L=new ou(),o=new C0(),i=0,A=0,t.q!=0){D=c(F,m,6,t.o.length,15,1);do{for(Q=o.a.length,0<Q?o.a=hA(o.a,0,0):0>Q&&(o.a+=z8(c(Fr,re,6,-Q,15,1))),r=0;r<t.c.f.a.length;r++)t.n[i][r]=v1t(t,t.g,D,r),t.d[i][r]=Me(new bA(t.n[i][r])),q(o,t.d[i][r]);t.e[i]=Ns(L,o.a)==-1,(!t.t||!t.e[i])&&++A,++i;}while(fK(t,D)&&A<t.i);}}}function gp(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;for(t.i&&(Oi(t.c,e).a=null),D=0,f=null,T=A.o,n=1;n<T.r;n++)for(k=XD(T.D[n]),P=0;P<n;P++)t.u[n][P]||(h=k+XD(T.D[P]),o=w.Math.abs(A.k[n].a-A.k[P].a),o<h&&(L=w.Math.abs(A.k[n].b-A.k[P].b),L<h&&(s=w.Math.abs(A.k[n].c-A.k[P].c),s<h&&(Q=w.Math.sqrt(o*o+L*L+s*s),Q<h&&(g=(h-Q)/h,i=20*g*g,D+=i,t.i&&(iO(Oi(t.c,e),"a1:"+n+" f1:"+t.g[n]+" a2:"+P+" f2:"+t.g[P]+UE+(A9(),Q9(Q,5))+" min:"+Q9(h,5)),Oi(t.c,e).a==null&&(r=c(F,m,6,2,15,1),r[0]=n,r[1]=P,RI(Oi(t.c,e),r))),f==null&&(f=c(Ut,c0,15,t.q.length,0,2)),y=t.g[n],l=t.g[P],y<l?(f[l]==null&&(f[l]=c(Ut,Tt,6,l,15,1)),f[l][y]+=i):(f[y]==null&&(f[y]=c(Ut,Tt,6,y,15,1)),f[y][l]+=i))))));return Mv(e,D,f),D!=0;}function Ya(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l;if(Q=k1(X1(e)),Q.length==0||(t.e=Q),X1(e),n=X1(e),n.startsWith(Yy)&&(P=(zt(13,n.length+1),n.substr(13)),WQ(P,true,t)))return  true;if(l=X1(e),i=new Du(),l!=null&&l.startsWith("M  V30 COUNTS")){if(y=k1((zt(13,l.length+1),l.substr(13))),o=c8(y," "),s=L1(o[0],f1,Et),L=L1(o[1],f1,Et),s>0){if(l=X1(e),e1(JC,l))for(r=0;r<s;r++){f=new _A(),D=new su(),D.a+=YC;do l=X1(e),D.a+=""+l,D.a+=nn;while(l!=null&&!l.startsWith(a6));SU(i,f,new un(new Sr(D.a))),Ft(t.g,f),t.d=-1;}l=X1(e);}if(L>0&&(l=X1(e),e1(XC,l))){for(r=0;r<L;r++){f=new _A(),D=new su(),D.a+=YC;do l=X1(e),D.a+=""+l,D.a+=nn;while(l!=null&&!l.startsWith(a6));SU(i,f,new un(new Sr(D.a))),Ft(t.f,f),t.d=-1;}l=X1(e);}return  true;}return  false;}function dp(t){var e,A,n,P,r,i,f;return i="",t.length==0?new k3(S4,I4):(f=k1(t),f.startsWith("at ")&&(f=(zt(3,f.length+1),f.substr(3))),f=f.replace(/\[.*?\]/g,""),P=f.indexOf("("),P==-1?(P=f.indexOf("@"),P==-1?(i=f,f=""):(i=k1((zt(P+1,f.length+1),f.substr(P+1))),f=k1((Mt(0,P,f.length),f.substr(0,P))))):(e=f.indexOf(")",P),i=(Mt(P+1,e,f.length),f.substr(P+1,e-(P+1))),f=k1((Mt(0,P,f.length),f.substr(0,P)))),P=f.indexOf(p0(46)),P!=-1&&(f=(zt(P+1,f.length+1),f.substr(P+1))),(f.length==0||e1(f,"Anonymous function"))&&(f=S4),r=i.lastIndexOf(p0(58)),A=sG(i,p0(58),r-1),n=I4,r!=-1&&A!=-1&&(n=(Mt(0,A,i.length),i.substr(0,A)),Kg((Mt(A+1,r,i.length),i.substr(A+1,r-(A+1)))),Kg((zt(r+1,i.length+1),i.substr(r+1)))),new k3(f,n));}function Bp(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T;for(l=false,n=0;n<t.L.i;n++)Q=null,Ru(t.L,n)?(L=$h(t.L,n),o=M3(t.L,n),Q=L==o?"["+L+"]":"["+L+":"+o+"]"):(fe(t.L,n)&Qo)!=0?Q=(fe(t.L,n)&Qo)==KA?"a":(fe(t.L,n)&384)==256?"!ar":"!a":(fe(t.L,n)&384)!=0&&(Q=(fe(t.L,n)&384)==256?"r":"!r"),s=(fe(t.L,n)&NP)>>17,s!=0&&(y=s==1?"8-11":s==2?">11":""+s,Q=(Q==null?"":Q.endsWith("r")?Q:Q+"r")+y),Q!=null&&(e=K(t.L,0,n),A=K(t.L,1,n),l||(t.Cb((t.X*2+1)/3|0),l=true),h=(W1(t.R,mt(t.L,e))+W1(t.R,mt(t.L,A)))/2,T=(Z1(t.R,Rt(t.L,e))+Z1(t.R,Rt(t.L,A)))/2,r=W1(t.R,mt(t.L,A))-W1(t.R,mt(t.L,e)),i=Z1(t.R,Rt(t.L,A))-Z1(t.R,Rt(t.L,e)),P=w.Math.sqrt(r*r+i*i),D=.6*t.vb(Q),f=.55*t.wb(),P!=0&&(r>0?EP(t,h+D*i/P,T-f*r/P,Q,true):EP(t,h-D*i/P,T+f*r/P,Q,true)));l&&t.Cb(t.X);}function Li(t){var e,A,n,P,r,i,f,D,Q,o,L;for(ut(t,1),rz(t),Q=false,A=0;A<t.g;A++)if(t.D[A]==7&&t.t[A]==0){if(L=G1(t,A),L==4){for(o=0;o<t.k[A];o++)if(f=t.j[A][o],t.o[A][o]==1&&t.D[f]==8&&t.k[f]==1&&t.t[f]==0){Q=true,++t.t[A],--t.t[f];break;}}else if(L==5)for(o=0;o<t.k[A];o++){if(f=t.j[A][o],D=t.n[A][o],t.o[A][o]==2&&t.D[f]==8){Q=true,++t.t[A],--t.t[f],t.I[D]=1;break;}if(t.o[A][o]==3&&t.D[f]==7){Q=true,++t.t[A],--t.t[f],t.I[D]=2;break;}}}for(i=false,r=0;r<t.i;r++)for(o=0;o<2;o++)if(rA(t,t.F[o][r])){e=t.F[1-o][r],P=t.D[e],(P==3||P==11||P==19||P==37||P==55||P==87||(n=t.D[e],n==4||n==12||n==20||n==38||n==56||n==88))&&(dt(t,r)==1?(++t.t[e],--t.t[t.F[o][r]],t.I[r]=512,i=true):t.I[r]==16&&(t.I[r]=512,i=true));break;}return i&&(Rf(t),Q=true),Q&&(t.U=0),Q;}function h6(t,e){var A,n,P,r,i,f;if(t.L.r!=0){for(ut(t.L,(t.G&256)!=0?63:(t.G&512)!=0?95:31),t.B=e,qm(t),P=Xa(t.L),r=false,t.p=c(F,m,6,t.L.r,15,1),A=0;A<t.L.r;A++)t.p[A]=wu(t.L,A),t.p[A]!=0&&(r=true),i0(t.L,A)&&(t.p[A]=128),Ud(t.L,A)&&(t.G&O1)==0&&(t.p[A]=256);for($1(t,-10),$W(t),EX(t),G_(t),oX(t),t.Cb(t.X),t.Ab(t.Y),$1(t,t.Q),xk(t),t.U.a.length=0,t.$.a.length=0,(t.G&1)!=0&&(zp(t,P),hk(t),Bp(t)),i=0;i<t.L.r;i++)wQ(t,i)?($1(t,-3),aQ(t,i,P),$1(t,t.Q)):t.p[i]!=0?($1(t,t.p[i]),aQ(t,i,P),$1(t,t.Q)):!r&&t.L.P!=1&&X(t.L,i)!=1&&X(t.L,i)!=6&&(t.G&Qe)==0&&IA(t.L,i)==null&&X(t.L,i)<sl.length&&sl[X(t.L,i)]!=0?(f=sl[X(t.L,i)],gq(t,(n=t.M!=0?t.M:t.D!=0?t.D:-1,$s(f,n))),aQ(t,i,P),$1(t,t.Q)):aQ(t,i,P);(t.G&1)==0&&(hk(t),Bp(t),zp(t,P));}}function vp(t,e,A,n,P,r){var i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C;for(T=c(F,m,6,n+1,15,1),g=c(F,m,6,r+1,15,1),k=r,D=D9(P[r-1]),D!=0?(r5(g,P,0,D),r5(T,A,0,D)):(PA(A,0,T,0,n),PA(P,0,g,0,r)),Q=g[k-1],L=e-1,s=n;L>=0;){if(o=0,T[s]==Q)o=-1;else if(v=at(Wt(V(T[s],g1),32),V(T[s-1],g1)),R=xW(v,Q),o=Ot(R),j=Ot(O0(R,32)),o!=0){l=0,C=0,b=false,++o;do{if(--o,b)break;l=yn(V(o,g1),V(g[k-2],g1)),C=at(Wt(j,32),V(T[s-2],g1)),h=at(V(j,g1),V(Q,g1)),D9(Ot(j0(h,32)))<32?b=true:j=Ot(h);}while(I1(d0(l,uE),d0(C,uE)));}if(o!=0&&(i=EZ(T,s-k,g,k,o),i!=0))for(--o,f=0,y=0;y<k;y++)f=at(f,at(V(T[s-k+y],g1),V(g[y],g1))),T[s-k+y]=Ot(f),f=j0(f,32);t[L]=o,--s,--L;}return D!=0?(Sb(g,k,T,0,D),g):(PA(T,0,g,0,r),T);}function Xa(t){var e,A,n,P,r,i,f;for(ut(t,15),i=c(F,m,6,3,15,1),A=0;A<t.g;A++)(t.v[A]&wn)!=0&&(f=(t.v[A]&b1)>>18,f!=0&&(i[f]=w.Math.max(i[f],(t.v[A]&b1)>>18!=1&&(t.v[A]&b1)>>18!=2?-1:(t.v[A]&VA)>>20)));for(P=0;P<t.i;P++)((t.G[P]&3)==1||(t.G[P]&3)==2)&&t.I[P]==1&&(f=(t.G[P]&768)>>8,f!=0&&(i[f]=w.Math.max(i[f],(t.G[P]&768)>>8!=1&&(t.G[P]&768)>>8!=2?-1:(t.G[P]&cn)>>10)));for(r=c(F,u0,7,3,0,2),r[1]=c(F,m,6,1+i[1],15,1),r[2]=c(F,m,6,1+i[2],15,1),e=0;e<t.g;e++)(t.v[e]&wn)!=0&&(f=(t.v[e]&b1)>>18,f!=0&&++r[f][(t.v[e]&b1)>>18!=1&&(t.v[e]&b1)>>18!=2?-1:(t.v[e]&VA)>>20]);for(n=0;n<t.i;n++)((t.G[n]&3)==1||(t.G[n]&3)==2)&&t.I[n]==1&&(f=(t.G[n]&768)>>8,f!=0&&++r[f][(t.G[n]&768)>>8!=1&&(t.G[n]&768)>>8!=2?-1:(t.G[n]&cn)>>10]);return r;}function Za(t,e){var A,n,P,r;for(t.b&&Mi(t.b),t.c&&Mi(t.c),P=0,n=X1(e);n!=null&&n.startsWith(Lo);){for(n=k1((zt(7,n.length+1),n.substr(7)));n.endsWith("-");){if(A=X1(e),!A.startsWith(Lo))return  false;n=k1(Su(hA(n,0,n.length-1),(zt(7,A.length+1),A.substr(7))));}if(n.startsWith("BEGIN")){if(r=k1((zt(6,n.length+1),n.substr(6))),r.startsWith("CTAB"))P=1;else if(r.startsWith("ATOM"))P=2;else if(r.startsWith("BOND"))P=3;else if(r.startsWith("SGROUP"))P=4;else if(r.startsWith("COLLECTION"))P=5;else return  false;}else if(n.startsWith("END"))P=0;else if(P==1)AY(t,n);else if(P==2)L1t(t,n);else if(P==3)Ltt(t,n);else if(P==4)ctt(t,n);else if(P==5)Wa(t,n);else return  false;n=X1(e);}for(;n!=null&&!(n.startsWith(hr)||e1(n,Uo));)n=X1(e);return  true;}function Wa(t,e){var A,n,P,r,i,f;if(f=Fz(e),f!=null){if(i=iW(e,f),e.startsWith("MDLV30/STEABS")){if(e1(f,E2))for(r=0;r<i.length;r++)Ne(t.j,YD(t,i[r]),0,-1);else for(P=0;P<i.length;P++)T8(t.j,wL(t,i[P]),0,-1);}else if(e.startsWith("MDLV30/STERAC")){if(n=L1(hA(e,13,ue(e,13)),f1,Et),e1(f,E2))for(r=0;r<i.length;r++)Ne(t.j,YD(t,i[r]),1,n-1);else for(P=0;P<i.length;P++)T8(t.j,wL(t,i[P]),1,n-1);}else if(e.startsWith("MDLV30/STEREL")){if(n=L1(hA(e,13,ue(e,13)),f1,Et),e1(f,E2))for(r=0;r<i.length;r++)Ne(t.j,YD(t,i[r]),2,n-1);else for(P=0;P<i.length;P++)T8(t.j,wL(t,i[P]),2,n-1);}else if(e.startsWith("MDLV30/HILITE"))if(e1(f,E2))for(P=0;P<i.length;P++)RD(t.j,YD(t,i[P]),448);else for(P=0;P<i.length;P++)A=wL(t,i[P]),RD(t.j,K(t.j,0,A),448),RD(t.j,K(t.j,1,A),448);}}function _a(t){var e,A,n,P,r,i,f,D,Q;if(!t.i)return  false;Ln(t.g,0),Ln(t.b,0),t.f=null,Q=false,A=-1,n=null,t.c=t.d==null?null:c(ft,Dt,2,t.d.length,6,1),t.e=-1;do{try{if(D=X1(t.i),D==null)return Ln(t.g,0),!1;}catch(o){if(o=_1(o),Yt(o,79))return Ln(t.g,0),false;throw At(o);}if(Q)q(t.b,D),Ye(t.b,10);else if(D.startsWith(">"))Q=true,q(t.g,hr),Ye(t.g,10),q(t.b,D),Ye(t.b,10);else {q(t.g,D),Ye(t.g,10),D.startsWith(hr)&&(Q=true);continue;}if(t.d!=null)if(D.length==0)A=-1;else if(A==-1){if(n=IR(D),n!=null){for(A=-1,e=0;e<t.d.length;e++)if(e1(n,t.d[e])){A=e;break;}if(t.e==-1){for(r=RE,i=0,f=r.length;i<f;++i)if(P=r[i],e1(n,P)){t.e=A;break;}}}}else t.c[A]==null?t.c[A]=D:t.c[A]=Su(Su(t.c[A],nn),D);}while(!D.startsWith(Uo));return  true;}function $a(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y;for(A=0;A<t.r;A++)y=En(t,A),y+en(t,A,y,t.D[A])-G1(t,A)<=0&&!(t.t[A]==0&&(t.D[A]==5||(P=t.D[A],P==7||P==15||P==33)||(n=t.D[A],n==8||n==16||n==34||n==52||n==84)))&&(t.C[A]=V(t.C[A],-6145));if(t.T)return  false;for(i=false,e=0;e<t.g;e++)if(f=t.e[e]-t.k[e],f>0)for(n0(V(t.C[e],O1),0)&&(o=n0(V(t.C[e],uP),896)?3:n0(V(t.C[e],uP),384)?2:n0(V(t.C[e],128),128)?1:0,D=(y=En(t,e),y+en(t,e,y,t.D[e])-G1(t,e)),t.t[e]==0&&n0(V(t.C[e],yr),0)&&t.D[e]!=6&&++D,L=f,L>3-o&&(L=3-o),L>D+f-o&&(L=D+f-o),L>0&&(s=o==0?0:Wt(V(t.C[e],uP),L),s=J(s,(L==3?7:f==2?3:1)<<7),t.C[e]=V(t.C[e],-1921),t.C[e]=J(t.C[e],V(uP,s)))),Q=t.k[e];Q<t.e[e];Q++)r=t.n[e][Q],t.I[r]==1&&(t.D[t.j[e][Q]]=-1,t.I[r]=512,i=true);return i&&Rf(t),i;}function Fp(t,e){var A,n,P,r,i,f,D,Q,o,L;if((e&~t.U)!=0&&((t.U&1)==0&&(wR(t),Gp(t),t.U|=1,t.L&&!rT(t)&&$a(t)&&(wR(t),Gp(t),t.U|=1)),(e&~t.U)!=0)){if((t.U&-7)!=0){for(n=0;n<t.g;n++)t.v[n]&=-15369;for(r=0;r<t.i;r++)t.G[r]&=-705;if((e&4)==0){lR(t,1),t.U|=2;return;}for(lR(t,7),P=0;P<t.g;P++)for(o=0;o<t.k[P];o++)if(D=t.n[P][o],!(D<t.i&&Ee(t.q,D)))for(f=t.j[P][o],L=0;L<t.k[f];L++)t.n[f][L]!=D&&t.o[f][L]>1&&(t.D[t.j[f][L]]==6?t.v[P]|=S0:!eA(t,t.n[f][L])&&rA(t,t.j[f][L])&&(t.v[P]|=je));for(;;){for(Q=false,A=0;A<t.g;A++)if(t.p[A]>0&&(t.v[A]&je)!=0&&!f0(t.q,A)){for(o=0;o<t.k[A];o++)if(t.o[A][o]>1)for(f=t.j[A][o],D=t.n[A][o],L=0;L<t.k[f];L++)t.n[f][L]!=D&&(i=t.j[f][L],(t.v[i]&je)==0&&(t.v[i]|=je,Q=true));}if(!Q)break;}}t.U|=6;}}function kp(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g;for(ut(t,7),Q=0,P=0;P<t.i;P++)dt(t,P)==1&&!(P<t.i&&Ee(t.q,P))&&P0(t,t.F[0][P])>1&&P0(t,t.F[1][P])>1&&(t.G[P]&64)==0&&!((t.G[P]&128)!=0&&(t.q&&P<t.i?TP(t.q,P):0)<=5)&&(e[P]=true,++Q);for(i=c(F,m,6,2,15,1),y=c(F,m,6,2,15,1),r=null,n=0;n<t.i;n++)if(e[n]&&(r==null||!r[n])){for(A=0,L=0;L<2;L++)for(i[L]=t.F[L][n],y[L]=t.F[1-L][n],h=y[L];t.p[i[L]]==2&&P0(t,i[L])==2&&t.D[i[L]]<10;){for(s=0;s<2;s++)if(f=t.j[i[L]][s],f!=y[L]){D=t.n[i[L]][s],e[D]&&dt(t,D)==1&&(e[D]=false,--Q),y[L]=i[L],i[L]=f,++A;break;}if(i[L]==h){A=0;break;}}A!=0&&(e[n]=false,--Q,P0(t,i[0])>1&&P0(t,i[1])>1&&(T=H5(t,y[0],i[0]),g=H5(t,y[1],i[1]),o=T<g?0:1,l=o1(t,y[o],i[o]),r==null&&(r=c(Pt,it,6,t.i,16,1)),r[l]=true,e[l]=true,++Q));}return Q;}function $Q(t,e,A){var n,P,r,i,f,D,Q,o;if(t.o[e]!=0)return  false;if(t.R.L){for(Q=0;Q<2;Q++)for(n=K(t.R,Q,e),o=0;o<Ct(t.R,n);o++)if(ye(t.R,_(t.R,n,o)))return  false;}return dt(t.R,e)==1?P$(t,e,A):dt(t.R,e)!=2||eA(t.R,e)||(r=K(t.R,0,e),i=K(t.R,1,e),O(t.R,r)==1||O(t.R,i)==1)||O(t.R,r)>3||O(t.R,i)>3||e0(t.R,r)==2||e0(t.R,i)==2||(f=new Ff(t.R,t.f,i,r),f.f&&A==1)||(D=new Ff(t.R,t.f,r,i),D.f&&A==1)||f.f&&D.f?false:(A==3&&(f.f&&f.c&&(t.V[e]=true),D.f&&D.c&&(t.V[e]=true)),P=Yh(t.R,e)?3:t.jb?ltt(t,f,D):_z(f,D),A==1?t.o[e]=P:A==2&&(f.f&&(P==1?se(t.e[f.b],t.f[r]):P==2&&se(t.e[f.d],t.f[r])),D.f&&(P==1?se(t.e[D.b],t.f[i]):P==2&&se(t.e[D.d],t.f[i]))),true);}function aa(t){var e,A,n,P,r,i,f,D,Q,o,L;for(A=0,L=new Zt(t.g);L.a<L.c.a.length;)if(Q=_t(L),ut(Q,1),Q.L){for(e=0;e<Q.g;e++)if(gt(V(Q.C[e],Pe),0)){if(w.Math.abs(Q.A[e])!=0)return  false;}else ++A;}else A+=Q.g;for(D=new Zt(t.f);D.a<D.c.a.length;)if(i=_t(D),ut(i,1),i.L){for(e=0;e<i.g;e++)if(gt(V(i.C[e],Pe),0)){if(w.Math.abs(i.A[e])!=0)return  false;}else --A;}else A-=i.g;if(A!=0)return  false;for(r=Es(t),n=c(Pt,it,6,r+1,16,1),o=new Zt(t.g);o.a<o.c.a.length;)for(Q=_t(o),e=0;e<Q.g;e++)if(!Q.L||n0(V(Q.C[e],Pe),0)){if(P=w.Math.abs(Q.A[e]),n[P])return  false;n[P]=true;}for(f=new Zt(t.f);f.a<f.c.a.length;)for(i=_t(f),ut(i,1),e=0;e<i.g;e++)if(!i.L||n0(V(i.C[e],Pe),0)){if(P=w.Math.abs(i.A[e]),P>=r||!n[P])return  false;n[P]=false;}return  true;}function ttt(t,e,A,n){var P,r,i,f,D,Q,o,L;for(f=t.e[n],D=f+1;D<t.A&&t.f[t.s[D]]==n;)++D;for(o=f;o<D;o++)A[o]=-1;for(i=f;;){if(L=t.u[i]==-1?t.H.g:Le(t.H,t.G[t.u[i]]),++A[i],A[i]==L){if(A[i]=-1,i==f)break;--i,t.t[i]||(e[t.G[t.s[i]]]=false,t.G[t.s[i]]=-1);continue;}if(t.u[i]==-1)e[A[i]]||Ly(t,A[i],t.s[i])&&(t.G[t.s[i]]=A[i],e[A[i]]=true,++i);else {if(_(t.H,t.G[t.u[i]],A[i])>=t.H.g)continue;r=_(t.H,t.G[t.u[i]],A[i]),t.t[i]?r==t.G[t.s[i]]&&ey(t,Nt(t.H,t.G[t.u[i]],A[i]),t.v[i])&&++i:e[r]||Ly(t,r,t.s[i])&&ey(t,Nt(t.H,t.G[t.u[i]],A[i]),t.v[i])&&(e[r]=true,t.G[t.s[i]]=r,++i);}if(i==D){if(Mp(t,n)&&hR(t,n)&&AR(t,e,n)){for(Q=f;Q<D;Q++)t.t[Q]||(P=t.s[Q],e[t.G[P]]=false,t.G[P]=-1);return  true;}--i,t.t[i]||(e[t.G[t.s[i]]]=false,t.G[t.s[i]]=-1);}}return  false;}function ett(t){var e,A,n,P,r,i,f;if(i=Ki(t.o),A=null,i.length!=0&&(n=i.indexOf(p0(64)),n!=-1&&(A=(Mt(0,n,i.length),i.substr(0,n)),i=(zt(n+1,i.length+1),i.substr(n+1)))),i.length!=0&&(e=zA(i,t.d.c),e!=0||e1(i,"?"))){if(P=0,Ki(t.p).length!=0)try{if(P=L1(Ki(t.p),f1,Et),P<(J1(),wr)[e]-18||P>wr[e]+12){ED(t.c,"Your mass is out of range!");return;}}catch(D){if(D=_1(D),Yt(D,42)){ED(t.c,"Your mass is not a number!");return;}else throw At(D);}if(f=-1,Ki(t.q).length!=0)try{if(f=L1(Ki(t.q),f1,Et),f<0||f>15){ED(t.c,"Your valence is out of range!");return;}}catch(D){if(D=_1(D),Yt(D,42)){ED(t.c,"Your valence is not a number!");return;}else throw At(D);}r=F0(t.b)==1?32:F0(t.b)==2?48:F0(t.b)==3?16:0,jG(t.d,e,P,f,r,A),t.a!=-1&&(mf(t.e,t.a,e,P,f,r),IP(t.e,t.a,A)),t.f=true,N9(t.c);}}function T6(){T6=v1,VE=B(d(ft,1),Dt,2,6,["","r0","r","r3","r3-4","r3-5","r3-6","r3-7","r4","r4-5","r4-6","r4-7","r>3","r5","r5-6","r5-7","r>4","r6","r6-7","r>5","r7","r>6","r>7","r0|>7"]),HE=B(d(ft,1),Dt,2,6,[j8,YV,"is in any ring","3 members","3-4 members","3-5 members","3-6 members","3-7 members","4 members","4-5 members","4-6 members","4-7 members","> 3 members","5 members","5-6 members","5-7 members","> 4 members","6 members","6-7 members","> 5 members","7 members","> 6 members","> 7 members","no ring or >7 members"]),di=B(d(XA,1),re,6,14,[0,w8,lM,h9,25769803776,60129542144,128849018880,266287972352,T9,51539607552,120259084288,257698037760,532575944704,c9,103079215104,240518168576,515396075520,w9,206158430208,481036337152,g9,412316860416,Vf,279172874240]);}function Att(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;if(A&&t.eb==6)for(T=c(F,m,6,t.L.length,15,1),r=0;r<t.V.r;r++)s=t.M[r],Wn(t.L[s],T[s],!i0(t.V,r)),++T[s];for(f=c(Rl,A0,36,t.L.length,0,1),y=0;y<t.L.length;y++)t.eb==6&&(U9(new a8(A?4:0),t.L[y]),hf(t.L[y])),D=new mu(t.L[y]),ck(D,e,null,o0|t.T),f[y]=D.v;for(k=1.8000000715255737*t.T,i=Qn(t.V,24*t.ab),n=(t.U&4)==0?0:t.eb==5?EV*ND(t.k):FT(G(t.I,0))*t.T/i,g=.5*k,l=0;l<=t.L.length&&((t.U&4)!=0&&l==t.Y&&(x3(G(t.I,0),g-k/2,Y9(t.k)/2,g-k/2+n,Y9(t.k)/2),g+=n),l!=t.L.length);l++)Q=g-f[l].c,o=.5*(Y9(t.k)-f[l].a)-f[l].d,GL(t.L[l],Q,o),g+=k+f[l].b;for(_5(t.G,e,new lA(0,0,ND(t.k),Y9(t.k)),o0|t.T),h=c(F,m,6,t.L.length,15,1),P=0;P<t.V.r;P++)L=t.M[P],de(t.V,P,mt(t.L[L],h[L])),Ve(t.V,P,Rt(t.L[L],h[L])),++h[L];hf(t.V);}function ntt(t,e){var A,n,P,r,i,f,D,Q,o,L,s;for(f=new n1(),ut(e,1),Q=c(Pt,it,6,e.g,16,1),A=0;A<e.g;A++)if(t.f[A]&&(X(t.i,A)==7||X(t.i,A)==8||X(t.i,A)==16||X(t.i,A)==34||X(t.i,A)==52)){for(Q[A]=true,D=0;D<e.k[A];D++)if(n=e.j[A][D],r=e.n[A][D],L=e.o[A][D],e.p[n]!=0&&e.p[A]<L){for(Q[n]=true,Ft(f,U1(r)),o=0;o<e.k[n];o++)P=e.j[n][o],Q[P]||(Q[P]=true,i=e.n[n][o],s=e.o[n][o],e.p[n]+2==L+s&&(Ft(f,U1(i)),L>=s&&(e.p[P]<s?TQ(e,P)&&fy(t,e,P,true,false,Q,f):fy(t,e,P,true,true,Q,f)),s>=L&&TQ(e,A)&&fy(t,e,P,false,false,Q,f),t.f[P]&&(X(t.i,P)==5||X(t.i,P)==6||X(t.i,P)==7||X(t.i,P)==8||X(t.i,P)==16||X(t.i,P)==34||X(t.i,P)==52)&&e.p[P]<s&&(L<=2&&s>=2&&TQ(e,A)&&Vm(t,e,r,i),L>=2&&s<=2&&TQ(e,P)&&Vm(t,e,i,r)),cA(f,f.a.length-1)),Q[P]=false);cA(f,f.a.length-1),Q[n]=false;}Q[A]=false;}}function Ptt(t,e,A,n,P,r){var i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt;for(v=-1,C=0,R=0,x=0,T=0,g=0,k=0,N=0,tt=0,C=0,o=0;o<t.d;o++)C+=n[o]*n[o];if(C=w.Math.sqrt(C),C>r)for(L=0;L<t.d;L++)n[L]*=r/C;for(R=0,s=0;s<t.d;s++)R+=n[s]*t.e[s];if(R>=0)return v;for(x=0,y=0;y<t.d;y++)S=w.Math.abs(n[y])/w.Math.max(w.Math.abs(e[y]),1),S>x&&(x=S);for(k=1e-7/x,T=1,h=0;h<1e3;){if(T<k){v=1;break;}for(l=0;l<t.d;l++)P[l]=e[l]+T*n[l];if(t.k=ys(t,P),t.k-A<=go*T*R)return 0;h==0?N=-R/(2*(t.k-A-R)):(b=t.k-A-T*R,j=tt-A-g*R,i=(b/(T*T)-j/(g*g))/(T-g),f=(-g*b/(T*T)+T*j/(g*g))/(T-g),i==0?N=-R/(2*f):(D=f*f-3*i*R,D<0?N=.5*T:f<=0?N=(-f+w.Math.sqrt(D))/(3*i):N=-R/(f+w.Math.sqrt(D))),N>.5*T&&(N=.5*T)),g=T,tt=t.k,T=w.Math.max(N,.1*T),++h;}for(Q=0;Q<t.d;Q++)P[Q]=e[Q];return v;}function rtt(t){var e,A,n,P,r,i,f,D,Q,o,L;for(t._=c(E,I,6,t.R.g,15,1),e=0;e<t.R.g;e++)if(t.db[e]==1||t.db[e]==2){if(D=t.eb[e],oT(t.R,e))for(f=0;f<O(t.R,e);f++){for(P=_(t.R,e,f),L=0,o=c(F,m,6,3,15,1),Q=0;Q<O(t.R,P);Q++)o[L]=_(t.R,P,Q),o[L]!=e&&++L;L==2&&t.f[o[0]]>t.f[o[1]]^t.H[o[0]]<t.H[o[1]]&&(D=!D);}else for(f=1;f<O(t.R,e);f++)for(Q=0;Q<f;Q++)r=_(t.R,e,f),i=_(t.R,e,Q),t.f[r]>t.f[i]&&(D=!D),t.H[r]<t.H[i]&&(D=!D);t._[e]=t.db[e]==1^D?1:2;}else t._[e]=t.db[e];for(t.j=c(E,I,6,t.R.i,15,1),A=0;A<t.R.i;A++)if(t.o[A]==1||t.o[A]==2){for(D=false,f=0;f<2;f++)if(n=K(t.R,f,A),O(t.R,n)==3){for(o=c(F,m,6,2,15,1),L=0,Q=0;Q<3;Q++)_(t.R,n,Q)!=K(t.R,1-f,A)&&(o[L++]=_(t.R,n,Q));t.f[o[0]]>t.f[o[1]]&&(D=!D),t.H[o[0]]<t.H[o[1]]&&(D=!D);}t.j[A]=t.o[A]==1^D?1:2;}else t.j[A]=t.o[A];}function itt(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b;for(e=d_(t),r=c(E,I,6,t.f.s,15,1),i$(t,r,e),P=0;P<t.f.s;P++)r[P]==2&&(Gi(t.f,K(t.f,0,P))||Gi(t.f,K(t.f,1,P)))&&(r[P]=3);for(y=0;y<t.d.a.length;y++){for(L=G(t.d,y),D=Rj(L),g=L.c,T=new f6(L),h=-1,s=0;s<224&&D.a.length!=0;s++){if(Q=FQ(t.g,D.a.length),f=(ee(Q,D.a.length),D.a[Q]),i=A$(t,f[0],f[1]),A=c(F,m,6,i.length,15,1),n=0,s<32)for(l=1;l<i.length-1;l++)r[i[l]]==3&&(A[n++]=i[l]);else if(s<96)for(l=1;l<i.length-1;l++)r[i[l]]>=2&&(A[n++]=i[l]);else for(l=1;l<i.length-1;l++)r[i[l]]>=1&&(A[n++]=i[l]);if(n!=0){if(v=A[0],n>1)do v=A[FQ(t.g,n)];while(v==h);v!=h&&(h=v,Vp(L,v),D=Rj(L),g>L.c&&(g=L.c,T=new f6(L)));}}Zr(t.d,y,T),L=T,o=1;do{for(k=9999,l=0;l<L.e.length;l++)b=e[L.e[l]],b==o?Rtt(L,l):b>o&&b<k&&(k=b);o=k;}while(k!=9999);}}function mp(t,e,A,n,P){var r,i;if(P.d=true,P.c=true,e[A]==35){for(++A,t.r=true,P.a=0,P.b=1;A<n&&an(e[A]&d1);)P.a=10*P.a+e[A]-48,++P.b,++A;if(P.a==0||P.a>=(J1(),a0).length)throw At(new H1("SmilesParser: Atomic number out of range. position:"+(A-1)));return  true;}if(e[A]>=65&&e[A]<=90){if(P.b=e[A+1]>=97&&e[A+1]<=122?2:1,P.a=(J1(),zA(z8(F2(e,A,(i=P.b,w0(),i))),321)),P.b==2&&P.a==0&&(P.b=1,P.a=zA(z8(F2(e,A,(r=P.b,r))),321)),P.d=false,P.a==0)throw At(new H1("SmilesParser: Unknown atom label. position:"+(A-1)));return  true;}return e[A]==97&&e[A+1]==115||e[A]==115&&e[A+1]==101?(P.b=2,P.a=(J1(),zA(z8(F2(e,A,(r=P.b,w0(),r))),321)),P.c=false,true):e[A]==99||e[A]==110||e[A]==111||e[A]==112||e[A]==115?(P.b=1,P.a=(J1(),zA(z8(F2(e,A,(r=P.b,w0(),r))),321)),P.c=false,true):false;}function ftt(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;for(A=-1,Q=false,y=Ge,e=Pr(t.i,t.c),h=0;h<t.d.length;h++)t.d[h]<t.v[h].d.length-1&&(s=xh(e,h,t.d[h])/xh(e,h,t.d[h]+1),y>s&&(y=s,A=h));for(T=0;T<t.c.length;T++)t.c[T]<t.u[T].b.length-1&&(s=Bh(t.u[T],t.c[T])/Bh(t.u[T],t.c[T]+1),y>s&&(y=s,A=T,Q=true));if(A==-1){t.a=null;return;}for(r=1,f=0;f<t.d.length;f++)(Q||f!=A)&&(r*=t.d[f]+1);for(D=0;D<t.c.length;D++)(!Q||D!=A)&&(r*=t.c[D]+1);for(t.a=c(RS,H2,168,r,0,1),Q?++t.c[A]:++t.d[A],i=0;i<r;i++){for(l=i,k=c(F,m,6,t.d.length,15,1),L=0;L<t.d.length;L++)(Q||L!=A)&&(g=t.d[L]+1,g!=1&&(k[L]=l%g,l=l/g|0));for(P=c(F,m,6,t.c.length,15,1),o=0;o<t.c.length;o++)(!Q||o!=A)&&(n=t.c[o]+1,n!=1&&(P[o]=l%n,l=l/n|0));Q?P[A]=t.c[A]:k[A]=t.d[A],t.a[i]=Xu(t,k,P);}ju(t.a,new Zw()),t.b=-1;}function bp(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C;if(!((t.G[e]&3)==0||(t.G[e]&3)==3||!oi(t,e))){for(j=-1,v=-1,b=-1,k=-1,P=0,L=0;L<2;L++)for(n=t.F[L][e],l=0;l<t.e[n];l++)f=t.n[n][l],f!=e&&dt(t,f)==1&&(i=t.j[n][l],R=NQ(t,f,i),P<R&&(P=R,v=i,j=f,b=n,k=t.F[1-L][e]));if(v!=-1){for(s=0;s<2;s++)for(l=0;l<t.e[t.F[s][e]];l++)f=t.n[t.F[s][e]][l],f!=e&&dt(t,f)==1&&(t.I[f]=1);for(t.F[1][j]!=v&&(t.F[0][j]=t.F[1][j],t.F[1][j]=v),D=Et,y=0;y<t.k[b];y++)i=t.j[b][y],t.n[b][y]!=e&&D>i&&(D=i);for(T=c(F,m,6,2,15,1),g=0,o=0;o<t.k[k];o++)t.n[k][o]!=e&&(T[g++]=t.j[k][o]);r=pA(t.K[b].a,t.K[b].b,t.K[k].a,t.K[k].b),A=0,g==2?(T[0]>T[1]&&(C=T[0],T[0]=T[1],T[1]=C),Q=Ze(r,_0(t,k,T[0])),h=Ze(r,_0(t,k,T[1])),A=Q-h):A=Ze(r,_0(t,k,T[0])),A<0^(t.G[e]&3)==2^D==v?t.I[j]=257:t.I[j]=129;}}}function Dtt(t){var e,A,n;if(null.zd()||null.zd())$5(t,true);else if(null.zd())t.r&&nF();else if(null.zd())pN(t,null.zd());else if(null.zd())Wv(t);else if(!null.zd())if(null.zd())mQ(t),EL(t,w.Math.max(t.eb,1));else if(null.zd())f5(t,true,true);else if(null.zd())f5(t,false,true);else if(null.zd())f5(t,true,false);else if(null.zd())JJ(t);else if(null.zd())xo=!xo,xo&&mQ(t);else if(null.zd())K5(t,true);else if(null.zd())K5(t,false);else if(null.zd())tZ(t);else if(null.zd())H3(t._,aV,tE);else if(null.zd()){if(null.zd(),e=L1(null.zd(),f1,Et),A=L1(null.zd(),f1,Et),i0(t.V,e))for(n=0;n<t.V.g;n++)i0(t.V,n)&&RD(t.V,n,A);else RD(t.V,e,A);}else null.zd()?(t.H=6,t.eb=w.Math.max(t.eb,1),P1(t.k)):null.zd()?(t.H=256,t.eb=w.Math.max(t.eb,1),P1(t.k)):null.zd()&&OG(t,t.w==19?16:0);}function utt(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h;if(P=new LD(),Ft(P.a,new ae("cLogP Values are estimated applying an atom-type based increment system.",2)),Ft(P.a,new ae(IV,2)),Ft(P.a,new ae(F4,2)),t){for(Li(t),ut(t,7),f=0,n=new cP(),D=new sD("#0.000"),e=0;e<t.g;e++)try{A=Uy(t,e,6241),h=Be(n,gQ(A)),h?We(n,gQ(A),U1(h.a+1)):We(n,gQ(A),U1(1));}catch(T){if(T=_1(T),Yt(T,19))++f;else throw At(T);}for(f!=0&&Ft(P.a,new ae("Warning: "+f+" atom type(s) could not be determined.",2)),l=(i=new J8(new K8(new br(n).a).b),new jr(i));Nr(l.a.a);)y=(r=H9(l.a),r.hd()),o=u9(Wf,y),(o<0?-1:o)!=-1?e8(P,(s=y,t8(e9(n,s))+" * "+Sh(D,yc[Q=u9(Wf,y),Q<0?-1:Q])+" AtomType: 0x"+D5(y.a)),2):e8(P,"Warning: For atom type 0x"+D5(y.a)+" ("+(L=y,t8(e9(n,L)))+" times found) is no increment available.",2);}return P;}function jp(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;for(h=e.g,t.j=c(XA,re,6,e.g,14,1),t.k=c(F,m,6,e.g,15,1),f=0;f<h;f++)t.j[f]=d0(V(J(Wp(e,f),e.C[f]),e4),gM),t.k[f]=e.D[f],(A&1)!=0&&(t.k[f]+=e.t[f]+16<<8),(A&2)!=0&&(t.k[f]+=e.B[f]<<16);for(t.B=c(XA,re,6,e.g,14,1),g=(ut(e,7),e.q),l=0;l<g.j.a.length;l++){for(y=false,Q=G(g.k,l),o=0,L=Q.length;o<L;++o)if(s=Q[o],(e.H[s]&d8)!=0){y=true;break;}if(!y)for(k=G(g.k,l).length,P=G(g.j,l),r=0,i=P.length;r<i;++r)n=P[r],k==3?t.B[n]=J(t.B[n],h9):k==4?t.B[n]=J(t.B[n],T9):k==5?t.B[n]=J(t.B[n],c9):k==6?t.B[n]=J(t.B[n],w9):k==7&&(t.B[n]=J(t.B[n],g9));}for(T=e.i,t.n=c(F,m,6,e.i,15,1),D=0;D<T;D++)t.n[D]=(mj(e,D)|e.H[D])&6291967^6291840,(A&4)!=0?(t.n[D]&2)!=0&&(t.n[D]|=8):(A&8)!=0&&(t.n[D]&2)!=0&&D<e.i&&Ee(e.q,D)&&(t.n[D]|=8);}function Qtt(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l;if(f=-1,P=Is(t,e),i=P==-1?ns(t,e):-1,A!=0){for(y=-1,o=0;o<t.V.g;o++)o!=P&&De(t.V,o)==A&&(!bP(t.V,e)||!i0(t.V,o))&&(D=OA(t.V,o),y<D&&(y=D));for(L=0;L<t.V.i;L++)L!=i&&gP(t.V,L)==A&&(!bP(t.V,e)||!bP(t.V,L))&&(D=ef(t.V,L),y<D&&(y=D));if((P==-1?gP(t.V,i):De(t.V,P))!=A)f=w.Math.min(y+1,31);else if(f=P==-1?ef(t.V,i):OA(t.V,P),bP(t.V,e)){for(l=true,s=0;s<t.V.g;s++)if(s!=P&&i0(t.V,s)&&De(t.V,s)==A&&OA(t.V,s)!=f){l=false;break;}for(Q=0;Q<t.V.i;Q++)if(Q!=i&&bP(t.V,Q)&&gP(t.V,Q)==A&&ef(t.V,Q)!=f){l=false;break;}l&&(f<=y?(++f,f==32&&(f=0)):f=0);}else f<=y?(++f,f==32&&(f=0)):f=0;}if(bP(t.V,e))for(Q=0;Q<t.V.i;Q++)bP(t.V,Q)&&q9(t.V,Q)&&(n=Is(t,Q),r=ns(t,Q),n!=-1?Ne(t.V,n,A,f):r!=-1&&T8(t.V,r,A,f));else P!=-1?Ne(t.V,P,A,f):i!=-1&&T8(t.V,i,A,f);}function ott(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j;for(P=c(Rl,A0,36,t.k.length,0,1),j=0,b=0,y=0;y<t.k.length;y++)w2(t.e[y],e,null,o0),P[y]=t.e[y].v,j+=P[y].b,b=w.Math.max(b,P[y].a);for(f=c(Rl,A0,36,t.a.length,0,1),v=0,k=0,l=0;l<t.a.length;l++)w2(t.b[l],e,null,65552),f[l]=t.b[l].v,v=w.Math.max(v,f[l].b),k+=f[l].a+12;if(n=w.Math.max(48,v+24),b=w.Math.max(b,24+2*k),A=-1,!t.g)t.g=new QU(),Ft(t.g,new _D()),A=0;else {for(h=0;h<t.g.a.length;h++)if(Yt(G(t.g,h),64)){A=h;break;}A==-1&&(A=t.g.a.length,Ft(t.g,new _D()));}for(g=18,s=0;s<t.k.length;s++){if(s==t.n){for(x3(G(t.g,A),g-18,b/2,g-18+n,b/2),r=g+-6,i=.5*(b-12)-k,T=0;T<t.a.length;T++)Q=r+.5*(v-f[T].b)-f[T].c,L=i-f[T].d,XU(t.b[T],new P3(Q,L)),i+=12+f[T].a;g+=n;}D=g-P[s].c,o=.5*(b-P[s].a)-P[s].d,XU(t.e[s],new P3(D,o)),g+=36+P[s].b;}t.o=false;}function Utt(t){var e,A,n,P,r,i,f,D,Q,o,L,s;for(ut(t.g,t.N),D=w.Math.max(t.g.g,t.g.i)+16,t.s=c(F,m,6,D,15,1),t.u=c(F,m,6,D,15,1),t.v=c(F,m,6,D,15,1),t.t=c(Pt,it,6,D+1,16,1),i=c(Pt,it,6,t.g.g,16,1),f=c(Pt,it,6,t.g.i,16,1),n=0,A=0;A<t.g.g;A++)if(!t.D[A]&&!i[A])for(t.s[n]=A,t.v[n]=-1,t.u[n]=-1,Q=n;n<=Q;){for(o=0;o<Le(t.g,t.s[n]);o++)Q=B5(t,n,Q,o,i,f,-1);for(;t.t[++n];);}if(t.w=n,t.p!=0){for(Q=t.w-1,r=0;r<t.d;r++)for(n=0;n<=Q;){for(L=0;L<Le(t.g,t.s[n]);L++)Q=B5(t,n,Q,L,i,f,r);for(;t.t[++n];);}for(e=0;e<t.g.g;e++)if(t.D[e]&&!i[e])for(t.s[n]=e,t.v[n]=-1,t.u[n]=-1,Q=n;n<=Q;){for(L=0;L<Le(t.g,t.s[n]);L++)_(t.g,t.s[n],L)<t.g.g&&(Q=B5(t,n,Q,L,i,f,t.f[e]));for(;t.t[++n];);}for(t.e=c(F,m,6,t.d,15,1),s=0;s<t.d;s++)t.e[s]=-1;for(o=t.w;o<n;o++)P=t.f[t.s[o]],t.e[P]==-1&&(t.e[P]=o);}t.A=n;}function Ltt(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v;for(l=0,h=(D=ue(e,l),D==-1?e.length:D),r=L1((Mt(l,h,e.length),e.substr(l,h-l)),f1,Et),l=gA(e,h),h=(Q=ue(e,l),Q==-1?e.length:Q),i=L1((Mt(l,h,e.length),e.substr(l,h-l)),f1,Et),l=gA(e,h),h=(o=ue(e,l),o==-1?e.length:o),A=YD(t,L1((Mt(l,h,e.length),e.substr(l,h-l)),f1,Et)),l=gA(e,h),h=(L=ue(e,l),L==-1?e.length:L),n=YD(t,L1((Mt(l,h,e.length),e.substr(l,h-l)),f1,Et)),g=0,k=0;(l=gA(e,h))!=-1;)if(h=(f=ue(e,l),f==-1?e.length:f),T=(Mt(l,h,e.length),e.substr(l,h-l)),y=T.indexOf(p0(61)),s=(Mt(0,y,T.length),T.substr(0,y)),v=L1((zt(y+1,T.length+1),T.substr(y+1)),f1,Et),e1(s,"CFG"))switch(v){case 1:g=1;break;case 2:g=i==2?3:4;break;case 3:g=6;}else e1(s,"TOPO")&&(k=v);P=bR(t,A,n,i,g,k),P+1!=r&&(!t.c&&(t.c=new cP()),We(t.c,U1(r),U1(P)));}function stt(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l;if(Q=k1(X1(e)),Q.length==0||(t.e=Q),X1(e),n=X1(e),n.startsWith(Yy)&&(P=(zt(13,n.length+1),n.substr(13)),WQ(P,true,t)))return  true;for(l=X1(e),y=L1(k1((Mt(0,3,l.length),l.substr(0,3))),f1,Et),L=L1(k1((Mt(3,6,l.length),l.substr(3,3))),f1,Et),f=new Du(),i=0;i<y;i++){if(l=X1(e),l==null||!l.startsWith("$MOL"))throw At(new H1(zC));s=new _A(),D=new su();do l=X1(e),D.a+=""+l,D.a+=nn;while(l!=null&&!l.startsWith(hr));if(l==null)throw At(new H1(KC));SU(f,s,new un(new Sr(D.a))),Ft(t.g,s),t.d=-1;}for(r=0;r<L;r++){if(l=X1(e),l==null||!l.startsWith("$MOL"))throw At(new H1(zC));o=new _A(),D=new su();do l=X1(e),D.a+=""+l,D.a+=nn;while(l!=null&&!l.startsWith(hr));if(l==null)throw At(new H1(KC));SU(f,o,new un(new Sr(D.a))),Ft(t.f,o),t.d=-1;}return  true;}function ytt(t,e){s8();var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N;for(Bm(),l=c(Pt,it,6,e.s,16,1),kp(e,l),i=0;i<e.i;i++)if(l[i]&&(S=c(F,m,6,4,15,1),x=new YT(),N=Qk(e,i,S,x),N!=null&&!nW(S,t)&&(C=(j=y2(LP,N),j?yp(j):null),Q=(R=y2(LP,N),R?KR(R):null),g=(b=y2(LP,N),b?Ep(b):null),C==null&&(T=new b6(e,S),C=T.b,Q=T.a,g=T.c),C!=null))){if(n=null,v=0,(e.G[i]&64)==0){for(y=j1(Pt,[c0,it],[12,6],16,[2,e.r],2),D=c(F,m,6,2,15,1),L=0;L<2;L++)D[L]=KQ(e,x.e[L],x.b[L],y[L],null,null);for(v=D[0]<D[1]?0:1,n=c(F,m,6,D[v],15,1),s=0,A=0;A<e.r;A++)y[v][A]&&(n[s++]=A);}Ft(t,new ZL(C,Q,g,S,n,v));}for(r=0;r<e.i;r++)if(e.I[r]==1&&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!=0&&((P&1)!=0&&t.f[e]==0&&(n.a+="-"),(P&2)!=0&&(n.a.length!=D&&(n.a+=","),n.a+="="),(P&4)!=0&&(n.a.length!=D&&(n.a+=","),n.a+="#"),(P&32)!=0&&(n.a.length!=D&&(n.a+=","),n.a+="$"),(P&64)!=0&&(n.a.length!=D&&(n.a+=","),n.a+="$"),(P&8)!=0&&(n.a.length!=D&&(n.a+=","),n.a+=":"),(P&16)!=0&&(n.a.length!=D&&(n.a+=","),q(n,Ae(t.k,A)?"<-":"->")))),D==n.a.length&&(!eA(t.k,e)||(t.j&4)!=0)&&(r=c1(t.k,e)&127,r==1?mn(t.k,K(t.k,0,e))&&mn(t.k,K(t.k,1,e))&&(t.j&4)==0&&t.f[e]==0&&(n.a+="-"):r==2?n.a+="=":r==4?n.a+="#":r==32||r==64?n.a+="$":r==8?n.a+=":":r==16&&q(n,Ae(t.k,A)?"<-":"->")),t.j==1&&(i=D==n.a.length?"":";",f=fe(t.k,e)&384,f==256?n.a+=i+"@":f==128&&(n.a+=i+"!@"));}function htt(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T;if(t.R.g==0){t.s="";return;}for(L=t.jb&t.b,T=t.jb?16:8,Q3(t,true),Ye(t.u,L?35:33),qt(t,t.jb?1:0,1),qt(t,e?1:0,1),qt(t,T>>1,4),l=0,D=1;D<t.R.g;D++)l=Nj(t,t.B[D],t.F[D]==-1?-1:t.B[t.F[D]],l,A);if(L)for(Q=0;Q<t.R.g;Q++)for(n=t.B[Q],y=O(t.R,n);y<Ct(t.R,n);y++)l=Nj(t,_(t.R,n,y),n,l,A);if(t.R.g>1&&l==0){t.s="";return;}for(i=1<<T,s=l/((i>>1)-1),h=l+.5*s,o=1;o<t.R.g;o++)oj(t,t.B[o],t.F[o]==-1?-1:t.B[t.F[o]],h,s,T,A);if(L)for(f=0;f<t.R.g;f++)for(n=t.B[f],y=O(t.R,n);y<Ct(t.R,n);y++)oj(t,_(t.R,n,y),n,h,s,T,A);e&&(r=t.jb?1.5:(J1(),J1(),Bn),P=LR(t.R,L?t.R.r:t.R.g,L?t.R.s:t.R.i,r,A),qt(t,w.Math.min(i-1,w.Math.max(0,Bt(.5+w.Math.log10(P/.1)/w.Math.log10(2e3)*(i-1)))),T),qt(t,zT(A[t.B[0]].a/P,i),T),qt(t,zT(A[t.B[0]].b/P,i),T),t.jb&&qt(t,zT(A[t.B[0]].c/P,i),T)),t.s=OL(t);}function c6(t,e){var A,n,P,r,i,f,D,Q,o,L;for(P=au(e,0);P>0&&e[P-1]==45;)P=au(e,P+1);for(r=P==-1?-1:au(e,P+1);r>0&&e[r-1]==45;)r=au(e,r+1);if(r==-1)throw At(new H1("Missing one or both separators ('>')."));if(au(e,r+1)!=-1)throw At(new H1("Found more than 2 separators ('>')."));for(L=new U8(),o=0,n=0;n<e.length;){for(;n<e.length&&e[n]==46;)++n;if(n==e.length)break;for(Q=n,D=-1,i=0,A=n;A<e.length;A++){if(e[A]==40){++i;continue;}if(e[A]==41){if(--i<0)throw At(new H1("Found closing bracket without matching opening one."));continue;}if(i==0&&(e[A]==46&&(t.o||A+1<e.length&&e[A+1]==46)||e[A]==62&&(A==0||e[A-1]!=45))){D=A;break;}}if(D==-1&&(D=e.length),Q<D){if(f=new _A(),R6(t,f,e,Q,D,true,true),t.q==1&&t.p)return c6(new dQ(t.j|2),e);o==0?(Ft(L.g,f),L.d=-1):o==1?Ft(L.a,f):(Ft(L.f,f),L.d=-1);}for(n=D;n<e.length&&e[n]==62;)++n,++o;}return L;}function w6(){w6=v1;var t,e,A;for(new ff(1,0),new ff(10,0),new ff(0,0),QS=c(oS,_e,31,11,0,1),qo=c(Fr,re,6,100,15,1),mc=B(d(Ut,1),Tt,6,15,[1,5,25,125,625,3125,15625,78125,390625,1953125,9765625,48828125,244140625,1220703125,6103515625,30517578125,152587890625,762939453125,3814697265625,19073486328125,95367431640625,476837158203125,0x878678326eac9]),bc=c(F,m,6,mc.length,15,1),vi=B(d(Ut,1),Tt,6,15,[1,10,100,1e3,fP,xy,1e6,1e7,1e8,Jf,1e10,1e11,1e12,1e13,1e14,1e15,1e16]),Cl=c(F,m,6,vi.length,15,1),zo=c(oS,_e,31,11,0,1),t=0;t<zo.length;t++)QS[t]=new ff(t,0),zo[t]=new ff(0,t),qo[t]=48;for(;t<qo.length;t++)qo[t]=48;for(A=0;A<bc.length;A++)bc[A]=Hs(mc[A]);for(e=0;e<Cl.length;e++)Cl[e]=Hs(vi[e]);Lr();}function pp(t){var e,A,n,P,r,i;if(r='<svg id="'+df(t.g!=null?t.g:"mol"+J2)+I0+'xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+t.n+'px" height="'+t.f+'px" viewBox="0 0 '+t.n+" "+t.f+`">
`,i=t.i?"<style> #"+df(t.g!=null?t.g:"mol"+J2)+" { pointer-events:none; } #"+df(t.g!=null?t.g:"mol"+J2)+` .event  { pointer-events:all; } line { stroke-linecap:round; } polygon { stroke-linejoin:round; } </style>
`:'<g style="font-size:'+t.k+'px; fill-opacity:1; stroke-opacity:1; fill:black; stroke:black; font-weight:normal; text-rendering:optimizeLegibility; font-family:sans-serif; stroke-linejoin:round; stroke-linecap:round; stroke-dashoffset:0;">',r+="  ",r+=i,t.i){for(P=new Zt(t.b);P.a<P.c.a.length;)n=_t(P),J9(t,n);for(A=new Zt(t.a);A.a<A.c.a.length;)e=_t(A),J9(t,e);}return t.i||J9(t,"</g>"),r+t.c.a+"</svg>";}function Ttt(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y,l,h,T,g,k;if(s=c(Pt,it,6,t.i,16,1),s[P]=true,y=c(F,m,6,11,15,1),l=B2(t,y,n,e,10,null,s),l==-1)return  false;for(i=1;!wA(t.q,A,y[i]);)++i;if(r=l-i,f=y[i],k=ah(t.q,A),k==6&&r==2&&i==3&&X3(t,y[1])>=3){for(g=jh(t.q,A),L=0;L<6;L++)if(e==g[L]){if(T=UT(t.q,A,f==g[UT(t.q,A,L+2)]?L-2:L+2),h=g[T],o=t.v[h]&gn,(o==0?0:o==Qe?2:o==O1?3:4)>=3&&Gj(t,y[1],h,2,null)==2)return  true;break;}}if(D=t.p[f]==1||f<t.g&&f0(t.q,f)||xP(t,f,false),Q=!D&&t.D[f]==7&&t.t[f]!=1,r==1)return !D&&!Q&&k<=4&&i<=3;switch(k){case 4:if(!D&&!Q&&i<=4)return  true;break;case 5:if(Q){if(i<=3)return  true;}else if(!D&&i<=4)return  true;break;case 6:if(r==2){if(D){if(i<=4)return  true;}else if(!Q&&i<=3)return  true;}else if(r==3){if(D){if(i<=6)return  true;}else if(i<=4)return  true;}break;case 7:if(r==3&&i<=3)return  true;}return  false;}function Mp(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h;for(i=0,D=0;D<t.g.g;D++)if((t.f==null||t.f[D]==e)&&gt(V(h0(t.g,D),je),0)){if(s=t.G[D],L=v0(t.g,D),l=v0(t.H,s),L==0||L==3)continue;if(l==0||l==3)return  false;if(De(t.g,D)==1){++i;continue;}if(De(t.H,s)==1)return  false;if(De(t.g,D)==2){++i;continue;}if(De(t.H,s)==2||z5(t,D)==(L==l))return  false;}if(i!=0){for(P=c(F,m,6,i,15,1),r=0,Q=0;Q<t.g.g;Q++)(t.f==null||t.f[Q]==e)&&gt(V(h0(t.g,Q),je),0)&&(L=v0(t.g,Q),L!=0&&L!=3&&(P[r++]=OA(t.g,Q)<<24|De(t.g,Q)<<22|Q));for(P.sort(pe(Q0.prototype.ld,Q0,[])),r=0;r<P.length;)for(o=P[r]&z0,y=t.G[o],A=P[r]&-4194304,n=z5(t,o)^v0(t.g,o)==v0(t.H,y),++r;r<P.length&&(P[r]&-4194304)==A;r++)if(f=P[r]&z0,s=t.G[f],De(t.H,s)!=De(t.H,y)||OA(t.H,s)!=OA(t.H,y)||(h=z5(t,f)^v0(t.g,f)==v0(t.H,s),h!=n))return  false;}return  true;}function ctt(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v;if(s=0,y=(r=ue(e,s),r==-1?e.length:r),v=(Mt(s,y,e.length),e.substr(s,y-s)),e1("DEFAULT",v)&&(s=gA(e,y),y=(i=ue(e,s),i==-1?e.length:i),v=(Mt(s,y,e.length),e.substr(s,y-s)),v.startsWith("CLASS")&&(s=gA(e,y),y=(f=ue(e,s),f==-1?e.length:f),v=(Mt(s,y,e.length),e.substr(s,y-s)),e1("-",v)&&(s=gA(e,y),y=(D=ue(e,s),D==-1?e.length:D),v=(Mt(s,y,e.length),e.substr(s,y-s))))),L1(v,f1,Et),s=gA(e,y),y=(Q=ue(e,s),Q==-1?e.length:Q),k=(Mt(s,y,e.length),e.substr(s,y-s)),!!e1("DAT",k)){for(s=gA(e,y),y=(P=ue(e,s),P==-1?e.length:P),L1((Mt(s,y,e.length),e.substr(s,y-s)),f1,Et),g=new cP(),s=gA(e,y);s!=-1;)s=gW(g,e,s);n=(h=E2,t8(e9(g,h))),L=(T="FIELDNAME",t8(e9(g,T))),o=(l="FIELDDATA",t8(e9(g,l))),!(!e1(Sy,L)||n==null||o==null)&&(A=c8(n," "),A.length==2&&IP(t.j,L1(A[1],f1,Et)-1,o));}}function Cp(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y;if(v=t.f.k,P=G(t.e,A),Y=P.a,L=e[t.a],T=xt(v,Y)>0&&v.k[Y]==v.e[Y],h=bq(t.f.a,t.f.t[Y]),!T&&!h)return i=v.j[Y][2],v.D[i]==1&&(i=t.f.t[i],(A==0?i>Y:t.f.t[v.j[Y][1]]>i)&&(n=!n)),n;if(T&&(r=v.j[Y][A],i=t.f.t[r],i>Y&&(n=!n,v.D[r]==1&&(n=!n))),h){for(b=v.e[Y],y=c(F,m,6,b-1,15,1),l=c(F,m,6,b-1,15,1),j=0,g=0,C=0;g<b;g++)i=v.j[Y][g],i!=L&&(y[C]=i,Q=o1(v,Y,i),N=Ku(t.f.s,t.f.t[Y]+"_"+t.f.t[i]),l[C++]=N==null?-1:Q,N!=null&&++j);if(T)y[0]<Y&&(n=!n);else switch(j){case 1:if(xt(v,Y)>0)break;k=l[0]>=0,s=y[k?0:1],R=y[k?1:0],R>Y?s>Y&&v.D[R]!=1&&(n=!n):s<Y&&(n=!n);break;case 2:f=Kv(t,l[0],Y),D=Kv(t,l[1],Y),tt=Ku(t.f.s,Y+"_"+t.f.t[f]),H=Ku(t.f.s,Y+"_"+t.f.t[D]),o=t.b,A==0?(S=tt[1]<o?tt[1]:tt[0],x=H[1]<o?H[1]:H[0]):(S=tt[0]<o?tt[1]:tt[0],x=H[0]<o?H[1]:H[0]),S<x!=f<D&&(n=!n);}}return n;}function wtt(t){var e,A,n,P,r,i,f,D,Q,o,L,s;for(r=0,o=0,i=0,f=0,D=0,Q=0,L=0,s=false,e=c(Pt,it,6,32,16,1),A=0;A<t.R.g;A++)t.db[A]!=0&&(++r,t.db[A]==3?++o:t.bb[A]==0?(++i,t.P&&yD(t.P,A)&&++f):t.bb[A]==2?t.ab[A]==0&&++Q:t.bb[A]==1&&(P=t.ab[A],e[P]||(++L,e[P]=true),t.ab[A]==0&&++D,t.P&&yD(t.P,A)&&(s=true)));for(n=0;n<t.R.i;n++)t.o[n]!=0&&c1(t.R,n)==1&&(++r,t.o[n]==3?++o:t.n[n]==0?(++i,t.P&&yD(t.P,K(t.R,0,n))&&yD(t.P,K(t.R,1,n))&&++f):t.n[n]==2?t.k[n]==0&&++Q:t.n[n]==1&&(P=t.k[n],e[P]||(++L,e[P]=true),t.k[n]==0&&++D,t.P&&yD(t.P,K(t.R,0,n))&&yD(t.P,K(t.R,1,n))&&(s=true)));if(r==0){t.R.J=o0;return;}if(o!=0){t.R.J=0;return;}if(t.K){th(t.R,q0+(1<<L));return;}D+f==r&&!s?t.R.J=Fy:i==r?t.R.J=v8:Q==r?t.R.J=327680:i==r-1&&D==1?t.R.J=Ti:th(t.R,458752+(1<<L));}function gtt(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C;if(t.k[e]!=2||t.o[e][0]!=2||t.o[e][1]!=2||t.k[t.j[e][0]]<2||t.k[t.j[e][1]]<2||t.p[t.j[e][0]]!=1||t.p[t.j[e][1]]!=1){me(t,e,0,false);return;}for(j=-1,b=-1,v=-1,T=-1,r=0,L=0;L<2;L++)for(n=t.j[e][L],l=0;l<t.e[n];l++)i=t.j[n][l],i!=e&&(f=t.n[n][l],R=NQ(t,f,i),r<R&&(r=R,b=i,j=f,v=n,T=t.j[e][1-L]));if(b!=-1){for(s=0;s<2;s++)for(n=t.j[e][s],l=0;l<t.e[n];l++)i=t.j[n][l],f=t.n[n][l],i!=e&&t.F[0][f]==n&&(t.I[f]=1);for(t.F[1][j]!=b&&(t.F[0][j]=t.F[1][j],t.F[1][j]=b),D=Et,y=0;y<t.k[v];y++)i=t.j[v][y],i!=e&&D>i&&(D=i);for(g=c(F,m,6,2,15,1),k=0,o=0;o<t.k[T];o++)i=t.j[T][o],i!=e&&(g[k++]=i);A=pA(t.K[e].a,t.K[e].b,t.K[T].a,t.K[T].b),P=0,k==2?(g[0]>g[1]&&(C=g[0],g[0]=g[1],g[1]=C),Q=Ze(A,_0(t,T,g[0])),h=Ze(A,_0(t,T,g[1])),P=Q-h):P=Ze(A,_0(t,T,g[0])),P<0^(t.v[e]&3)==1^D==b?t.I[j]=257:t.I[j]=129;}}function dtt(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C;if(gt(t.v,0)&&(q1(),I1(E1(Date.now()),t.v)))return  false;for(y=e.a,k=0,i=1;i<y.length;i++)if(y[i]!=null)for(D=0;D<i;D++)y[i][D]!=0&&Nh(t.B,i,D).length!=2&&(k+=y[i][D]);if(k>6)return  false;for(P=null,s=null,Q=null,A=Ge,l=e.b,r=1;r<y.length;r++)if(y[r]!=null){for(f=0;f<r;f++)if(y[r][f]>1&&Nh(t.B,r,f).length==2){for(g=Nh(t.B,r,f),b=c(F,m,6,2,15,1),L=0;L<2;L++)v=t.s[g[L]],b[L]=Cd(e.c,v.a);for(C=c(F,m,6,2,15,1),h=-1;h<=1;h+=2)for(C[0]=h*8,T=-1;T<=1;T+=2){for(C[1]=T*8,n=y[r][f],j=1;j<=3;j++){for(P?e2(P,e.c):P=new BD(e.c),o=0;o<2;o++)yb(P,t.s[g[o]],b[o]+j*C[o]<<16>>16);if(R=w_(t,P,t.q[r],t.q[f]),R<n-1){if(n=R,s?e2(s,P):s=new BD(P),n<1)break;}else break;}n<y[r][f]&&n<A&&(A=n,Q?e2(Q,s):Q=new BD(s));}}}return Q?(gp(t,e,Q),e.b>=l?(Mv(e,l,y),false):(e2(e.c,Q),true)):false;}function Btt(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H;if(t.e.length==1)return 0;for(x=P+w.Math.sqrt(n),o=c(Ut,Tt,6,36,15,1),l=0;l<t.e.length;l++)r=hn(e,A,t.a[l],t.b[l]),f=mN(Ot(E1(w.Math.round(r*36/m0)))),L=e-t.a[l],s=A-t.b[l],tt=L*L+s*s,o[f]<tt&&(o[f]=tt);for(j=-1,b=-1,h=0;h<36;h++)o[h]=w.Math.sqrt(o[h]),j<o[h]&&(j=o[h],b=h);for(N=b-18<0?b-18+36:b-18>=36?b-18-36:b-18,T=0;T<=18;T++)o[N+T<0?N+T+36:N+T>=36?N+T-36:N+T]+=.01*T,o[N-T<0?N-T+36:N-T>=36?N-T-36:N-T]+=.01*T;for(H=c(Ut,Tt,6,9,15,1),D=c(Ut,Tt,6,9,15,1),g=1;g<9;g++)H[g]=w.Math.sin(g*bC),D[g]=w.Math.cos(g*bC);for(C=Ge,R=-1,i=0;i<36;i++)if(!(o[i]>=C)){for(v=o[i],y=1;y<9;y++){for(k=-1;k<=1&&(S=i+k*y<0?i+k*y+36:i+k*y>=36?i+k*y-36:i+k*y,!(!(o[S]*D[y]<=v)&&(Q=D[y]*w.Math.min(o[S],x/H[y]),v<Q&&(v=Q,C<=v))));k+=2);if(C<=v)break;}C>v&&(C=v,R=i);}return m0*R/36;}function Hp(t){for(var e,A,n,P,r;t.t.a.length!=0;)if(n=cA(t.t,0),t.I[n.b]==0&&t.B[n.a]==0)return n;for(;t.g>=0;){for(;t.g>=2&&t.c<t.j[t.g].length;){if(A=t.j[t.g][t.c],e=Be(t.k[t.g],A),X(t.D,e[0][0])==6&&(n=HR(t,e[0],e[1]),n))return n;++t.c;}for(;t.g>=2&&t.d<t.j[t.g].length;){if(A=t.j[t.g][t.d],e=Be(t.k[t.g],A),X(t.D,e[0][0])!=6&&(n=HR(t,e[0],e[1]),n))return n;++t.d;}for(;t.p&&t.g==0&&t.e<t.j[0].length;)if(A=t.j[0][t.e++],e=Be(t.k[t.g],A),e[0].length==1&&e[1].length==1&&(n=jb(t,e[0][0],e[1][0]),n))return n;for(;t.g==0&&t.f<t.j[t.g].length;)if(A=t.j[t.g][t.f++],e=Be(t.k[t.g],A),e[0].length>=e[1].length&&Ij(e[0],t.I,t.G,t.H,t.J)||e[1].length>=e[0].length&&Ij(e[1],t.B,t.w,t.A,t.C)){for(r=0,P=0;r<e[0].length&&t.I[e[0][r]]!=0;)++r;for(;P<e[1].length&&t.B[e[1][P]]!=0;)++P;if(r<e[0].length&&P<e[1].length&&(n=jb(t,e[0][r],e[1][P]),n))return n;}--t.g,t.c=0,t.d=0,t.e=0,t.f=0;}return null;}function xP(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h;if(t.D[e]!=7||t.k[e]==4)return  false;if(e<t.g&&f0(t.q,e)||t.p[e]!=0||gt(V(t.C[e],d9),0))return  true;if(t.t[e]==1)return  false;for(D=0;D<t.k[e];D++)if(z9(t,t.n[e][D])==3)return  false;for(i=0,Q=0;Q<t.k[e];Q++)t.o[e][Q]==1&&(n=t.D[t.j[e][Q]],(n==8||n==9||n==17)&&++i);if(i==0){for(f=0;f<t.k[e];f++)if(P=t.j[e][f],t.p[P]!=0){if(P<t.g&&f0(t.q,P)){if((t.q&&P<t.g?UA(t.q,P):0)>=5){for(h=0,s=0;s<t.k[P];s++)l=t.j[P][s],l!=e&&P0(t,l)>=3&&++h;if(y=P0(t,e),h==2&&y>=2||h==1&&y==3)continue;}return !A||!Ys(t,e);}for(L=0;L<t.k[P];L++)if(t.o[P][L]==2||eA(t,t.n[P][L]))return !A||!Ys(t,e);}}if(i<2)for(f=0;f<t.k[e];f++){for(P=t.j[e][f],o=false,r=false,L=0;L<t.k[P];L++)t.j[P][L]!=e&&(t.o[P][L]!=1&&(t.D[t.j[P][L]]==7||t.D[t.j[P][L]]==8||t.D[t.j[P][L]]==16)&&(o=true),t.o[P][L]==1&&t.D[t.j[P][L]]==7&&(r=true));if(o&&(!r||i==0))return !A||!Ys(t,e);}return  false;}function vtt(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R;for(n=c(Ut,Tt,6,2,15,1),Q=0;Q<2;Q++)t.c[Q]/=t.a[Q],t.d[Q]/=t.a[Q],n[Q]=Btt(t.b[Q],t.c[Q],t.d[Q],t.b[1-Q].e.length,e);for(Tf(t.b[0],t.c[0],t.d[0],HA-n[0]),Tf(t.b[1],t.c[1],t.d[1],4.71238898038469-n[1]),R=Ge,j=W6,i=t.d[0]-t.d[1],o=0;o<t.b[1].b.length;o++)t.b[1].b[o]+=i,R>t.b[1].b[o]&&(R=t.b[1].b[o]),j<t.b[1].b[o]&&(j=t.b[1].b[o]);for(v=j-R+2*e,P=Bt(w.Math.ceil(v)),R+=(v-P)/2-e,g=c(Ut,Tt,6,P,15,1),L=0;L<P;L++)g[L]=t.c[1]+e;for(s=0;s<t.b[1].b.length;s++)for(b=t.b[1].b[s]-R,k=Bt(b-e),f=w.Math.min(Bt(b+e),P-1),T=k;T<=f;T++)g[T]>t.b[1].a[s]&&(g[T]=t.b[1].a[s]);for(y=0;y<P;y++)g[y]-=e;for(r=t.c[0]-t.c[1],l=0;l<t.b[0].a.length;l++)h=Bt(t.b[0].b[l]-R),h>=0&&h<g.length&&r<t.b[0].a[l]-g[h]&&(r=t.b[0].a[l]-g[h]);for(D=0;D<t.b[1].a.length;D++)t.b[1].a[D]+=r;A&&(Tf(t.b[0],t.c[0],t.d[0],n[0]-HA),Tf(t.b[1],t.c[0],t.d[0],n[0]-HA));}function Vp(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R;if(t.d==null&&(t.d=c(F,u0,7,t.j.s,0,2)),t.d[e]==null){for(y=c(F,m,6,t.e.length,15,1),v=c(Pt,it,6,t.j.r,16,1),P=K(t.j,0,e),r=K(t.j,1,e),y[0]=P,v[P]=true,o=0,l=0;o<=l;){for(T=0;T<Ct(t.j,y[o]);T++)i=_(t.j,y[o],T),!v[i]&&i!=r&&(y[++l]=i,v[i]=true);if(o==l)break;++o;}if(s=l+1>(t.e.length/2|0),t.i){for(D=false,f=false,T=0;T<t.e.length;T++)n=t.e[T],W0(t.j,n)&&n!=P&&n!=r&&(v[t.e[T]]?D=true:f=true);D!=f&&(s=D);}for(Q=2,t.d[e]=c(F,m,6,s?t.e.length-l:l+2,15,1),g=0;g<t.e.length;g++)t.e[g]==P?t.d[e][s?0:1]=g:t.e[g]==r?t.d[e][s?1:0]=g:s^v[t.e[g]]&&(t.d[e][Q++]=g);}for(j=t.a[t.d[e][0]],R=t.b[t.d[e][0]],b=hn(j,R,t.a[t.d[e][1]],t.b[t.d[e][1]]),h=2;h<t.d[e].length;h++)k=t.d[e][h],L=w.Math.sqrt((t.a[k]-j)*(t.a[k]-j)+(t.b[k]-R)*(t.b[k]-R)),A=2*b-hn(j,R,t.a[k],t.b[k]),t.a[k]=j+L*w.Math.sin(A),t.b[k]=R+L*w.Math.cos(A);}function Ep(t){var e,A,n,P,r,i,f,D,Q,o;switch(e=null,o=t.d.length,t.e){case 1:for(e=j1(Kt,[ie,t1],[16,6],15,[2*o,2],2),n=0;n<o;n++)e[n][0]=t.d[n][0],e[n][1]=t.d[n][1],e[o+n][0]=180+t.d[n][0]<<16>>16,e[o+n][1]=180+t.d[n][1]<<16>>16;return e;case 2:for(P=t.a[0]==0?1:0,r=t.a[o-1]==180?o-1:o,Q=r-P,e=j1(Kt,[ie,t1],[16,6],15,[o+Q,2],2),i=0;i<o;i++)e[i][0]=t.d[i][0],e[i][1]=t.d[i][1];for(f=P;f<r;f++)e[e.length-1-f+P][0]=360-t.d[f][1]<<16>>16,e[e.length-1-f+P][1]=360-t.d[f][0]<<16>>16;return e;case 3:for(P=t.a[0]==0?1:0,r=t.a[o-1]==90?o-1:o,Q=r-P,e=j1(Kt,[ie,t1],[16,6],15,[2*o+2*Q,2],2),D=0;D<o;D++)e[D][0]=t.d[D][0],e[D][1]=t.d[D][1],e[o+Q+D][0]=180+t.d[D][0]<<16>>16,e[o+Q+D][1]=180+t.d[D][1]<<16>>16;for(A=P;A<r;A++)e[o+Q-1-A+P][0]=180-t.d[A][1]<<16>>16,e[o+Q-1-A+P][1]=180-t.d[A][0]<<16>>16,e[e.length-1-A+P][0]=360-t.d[A][1]<<16>>16,e[e.length-1-A+P][1]=360-t.d[A][0]<<16>>16;return e;default:return t.d;}}function Sp(t,e,A,n){var P,r,i,f,D,Q;if(i=tn(t.V,e,A),f=-1,n&&t.X==8&&i!=-1&&(!XW(t,t.e,i)||M1(t.V,t.e)!=0&&M1(t.V,t.e)==M1(t.V,i)&&!Fn(t.V,t.e)||fz(t,t.e,i))&&(i=-1),i!=-1&&(t.w==101||t.w==103||t.w==102?(f=xQ(t.V,i),i=-1):t.w==19&&i>=t.V.g&&(i=-1)),f==-1&&i==-1&&t.w!=22&&t.w!=19&&t.w!=3&&t.w!=10&&t.w!=27&&t.w!=16&&t.w!=11&&t.w!=12&&t.w!=13&&t.w!=28&&t.w!=29&&t.w!=30&&t.w!=14&&t.w!=31&&t.w!=15&&t.w!=32&&t.w!=33&&(f=kf(t.V,e,A)),f!=-1&&(t.w==101||t.w==103||t.w==102)&&!(q9(t.V,f)&&(Is(t,f)!=-1||ns(t,f)!=-1))&&(f=-1),P=t.v,!n&&t.I&&(P=null,i==-1&&f==-1&&(t.w==2||t.w==4||t.w==21))){for(Q=new Zt(t.I);Q.a<Q.c.a.length;)if(D=_t(Q),(t.w==2||t.w==4&&!Yt(D,64)||t.w==21&&Yt(D,95))&&D.Eb(e,A)){P=D,t.v&&t.v!=D&&t.v.Fb();break;}}return r=t.t!=i||t.u!=f||t.v!=P||!!P,t.t!=i&&(t.t!=-1&&t.i.a.length!=0?Dy(t,t.i.a):(t.t=i,Ln(t.i,0),N1(t,new x1(t,4,true)))),t.u!=f&&(t.u=f,N1(t,new x1(t,8,true))),t.v=P,r;}function uy(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b;for(ut(t,7),o=new SA(t.g,t.i),Q=j1(E,[DA,Wy],[208,58],0,[t.g,8],2),n=c(F,m,6,t.g,15,1),P=c(F,m,6,t.g,15,1),r=c(Pt,it,6,t.g,16,1),v=0;v<t.g;v++)if(Q[v]=j1(E,[Wy,m8],[58,10],0,[t.k[v],8],2),!(e&&t.D[v]!=6))for(D=0;D<t.k[v];D++){for(L=t.j[v][D],xu(r,r.length),g=1,T=2,t.v[L]|=512,b=0;b<8&&T<t.g;b++){if(b==0)n[0]=L,r[L]=true,n[1]=v,r[v]=true;else {for(k=T,y=g;y<T;y++)for(A=n[y],l=0;l<t.k[A];l++)f=t.j[A][l],!r[f]&&(!e||t.D[f]==6)&&(r[f]=true,n[k++]=f);if(k==T){if(!e)for(s=b;s<8;s++)Q[v][D][s]=Q[v][D][s-1];break;}g=T,T=k;}if(b==0)Q[v][D][b]=c(E,I,6,2,15,1),Q[v][D][b][0]=t.D[v]<<24>>24,Q[v][D][b][1]=t.B[v]<<24>>24;else {for(L9(t,o,r,true,P),b0(o,P[L],0),Je(o,P[L],0),A=0;A<t.g;A++)P[A]!=-1&&t.k[A]>o.k[P[A]]&&w1(o,P[A],S0,true);if(e)for(i=0;i<o.i;i++)o.I[i]=1,o.U=0;Q[v][D][b]=ln((h=Me(new qA(o,16)),w0(),h));}}t.v[L]&=-513;}return Q;}function Ftt(t,e){var A,n,P,r,i;for(i=e,A=n=P=at(at(-559038737,i),13),p1.a=A,p1.b=n,p1.c=P,r=0;i>12;)p1.a=at(p1.a,t[r]),p1.a=at(p1.a,Wt(t[r+1],8)),p1.a=at(p1.a,Wt(t[r+2],16)),p1.a=at(p1.a,Wt(t[r+3],24)),p1.b=at(p1.b,t[r+4]),p1.b=at(p1.b,Wt(t[r+5],8)),p1.b=at(p1.b,Wt(t[r+6],16)),p1.b=at(p1.b,Wt(t[r+7],24)),p1.c=at(p1.c,t[r+8]),p1.c=at(p1.c,Wt(t[r+9],8)),p1.c=at(p1.c,Wt(t[r+10],16)),p1.c=at(p1.c,Wt(t[r+11],24)),f$(p1),i-=12,r+=12;switch(i){case 12:p1.c=at(p1.c,Wt(t[r+11],24));case 11:p1.c=at(p1.c,Wt(t[r+10],16));case 10:p1.c=at(p1.c,Wt(t[r+9],8));case 9:p1.c=at(p1.c,t[8]);case 8:p1.b=at(p1.b,Wt(t[r+7],24));case 7:p1.b=at(p1.b,Wt(t[r+6],16));case 6:p1.b=at(p1.b,Wt(t[r+5],8));case 5:p1.b=at(p1.b,t[4]);case 4:p1.a=at(p1.a,Wt(t[r+3],24));case 3:p1.a=at(p1.a,Wt(t[r+2],16));case 2:p1.a=at(p1.a,Wt(t[r+1],8));case 1:p1.a=at(p1.a,t[r]);break;case 0:return Ot(p1.c);}return a_(p1),Ot(p1.c);}function ktt(t,e){Zs();var A,n,P,r,i,f,D,Q,o,L,s,y,l,h;if(D=z(t,0)<0,D&&(t=E0(t)),z(t,0)==0)switch(e){case 0:return "0";case 1:return "0.0";case 2:return "0.00";case 3:return "0.000";case 4:return Ey;case 5:return "0.00000";case 6:return "0.000000";default:return y=new C0(),e<0?y.a+="0E+":y.a+="0E",y.a+=e==f1?"2147483648":""+-e,y.a;}o=18,L=c(Fr,re,6,o+1,15,1),A=o,h=t;do Q=h,h=Sn(h,10),L[--A]=Ot(at(48,Y1(Q,yn(h,10))))&d1;while(z(h,0)!=0);if(P=Y1(Y1(Y1(o,A),e),1),e==0)return D&&(L[--A]=45),PP(L,A,o-A);if(e>0&&z(P,-6)>=0){if(z(P,0)>=0){for(r=A+Ot(P),f=o-1;f>=r;f--)L[f+1]=L[f];return L[++r]=46,D&&(L[--A]=45),PP(L,A,o-A+1);}for(i=2;Si(i,at(E0(P),1));i++)L[--A]=48;return L[--A]=46,L[--A]=48,D&&(L[--A]=45),PP(L,A,o-A);}return l=A+1,n=o,s=new Vr(),D&&(s.a+="-"),n-l>=1?(Ye(s,L[A]),s.a+=".",s.a+=PP(L,A+1,o-A-1)):s.a+=PP(L,A,o-A),s.a+="E",z(P,0)>0&&(s.a+="+"),s.a+=""+Fe(P),s.a;}function mtt(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g;if(e==0||(e&A)!=0){kQ(t);return;}for(T=-1,g=0,r=1<<t.e.length-2,P=1<<t.e.length-1,f=1,i=2,Q=0;Q<t.e.length;Q++)(A&(P|f))==0&&(e&(P|f))!=0&&(e&r)==0&&(l=0,(A&r)!=0&&(l+=4),(e&P)!=0&&(l+=2),(e&f)!=0&&(l+=1),g<l&&(g=l,T=Q)),r=P,P=f,f=i,i=1<<(Q+2<t.e.length?Q+2:Q+2-t.e.length);if(T==-1){kQ(t);return;}for(s=0,s|=1<<T,y=2;y<t.e.length-1;){if(L=T+y<t.e.length?T+y:T+y-t.e.length,P=1<<(L==0?t.e.length-1:L-1),(A&P)!=0){++y;continue;}if(f=1<<L,(e&P)!=0){if((A&f)!=0){kQ(t);return;}s|=f,y+=2;continue;}if(i=1<<(L+1<t.e.length?L+1:L+1-t.e.length),(e&f)!=0&&(A&i)!=0){s|=f,y+=3;continue;}++y;}if(s==0){kQ(t);return;}for(n=l1-l1*(t.e.length-2)/t.e.length,o=1;o<t.e.length;o++)t.a[o]=t.a[o-1]+w.Math.sin(n*(o-1)),t.b[o]=t.b[o-1]+w.Math.cos(n*(o-1));for(f=1,h=2*w.Math.sin(n/2),D=0;D<t.e.length;D++)(s&f)!=0&&(t.a[D]+=h*w.Math.cos(n*(D-.5)),t.b[D]-=h*w.Math.sin(n*(D-.5))),f<<=1;}function Ip(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h;for(t.v=n0(t.w,0)?0:(q1(),at(E1(Date.now()),t.w)),pI(t.r,t.v),t.t=null,ut(e,1),P=0;P<e.g;P++)if(G1(e,P)>(h=En(e,P),h+en(e,P,h,e.D[P])))return  false;if(uW(e),e.T=true,i=null,o=null,f=null,L=null,(e.U&8)!=0){for(i=c(F,m,6,e.g,15,1),f=c(Pt,it,6,e.g,16,1),r=0;r<e.g;r++)i[r]=e.v[r]&3,f[r]=(e.v[r]&4)!=0;for(o=c(F,m,6,e.i,15,1),L=c(Pt,it,6,e.i,16,1),Q=0;Q<e.i;Q++)o[Q]=e.G[Q]&3,L[Q]=(e.G[Q]&4)!=0;}if(ut(e,63),i!=null){for(r=0;r<e.g;r++)me(e,r,i[r],f[r]);for(Q=0;Q<e.i;Q++)Q8(e,Q,o[Q],L[Q]);}for(t.k=e,t.a=0,t.p=0,t.A=null,t.s=null,t.e=c(F,m,6,e.r,15,1),t.d=Ur(e,t.e,false,true),t.f=c(F,m,6,t.d,15,1),n=0;n<e.r;n++)++t.f[t.e[n]];if(y=c(Pt,it,6,e.s,16,1),s=kp(e,y),s==0)return  true;if(!cY(t,y))return  false;for(t.s=c(Y8t,A0,178,s,0,1),l=0,D=0;D<e.i;D++)y[D]&&(t.s[l++]=new GR(e,D,t.g,t.e,t.f[t.e[e.F[0][D]]],t.q,A));return ju(t.s,new Yw()),t.i&&(t.c=new H7()),x_(t),true;}function btt(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt;for(sJ(),D=new eu(),bX(D,e),T=D.j,L=D.d,ut(T,1),ut(L,1),b=new Gr(),h=new Gr(),GA(b,T),GA(h,L),t.c=f1,i=null,r=null,P=0,x=0,t.a=new C0(),A=new _A(),R=bl,C=0,S=R.length;C<S&&(j=R[C],x++!=t.b);++C)if(MA(b,j.g),cI(b,j.i),CA(b,6,8)!=0&&(MA(h,j.f),CA(h,2,8)!=0&&b.F.a.length<=512)){for(f=-1e4,l=G(h.F,0),v=new Zt(b.F);v.a<v.c.a.length&&(k=_t(v),!(x++>=t.b));)Uf(T,A),Q=YW(j,A,k),tt=bZ(j,T.g,k,L.g,l),ut(A,1),n=c(F,m,6,A.g,15,1),y=c(F,m,6,L.g,15,1),qR(D,A,L,n,y,tt)&&(N=D.q-j.e,f<N&&(f=N),t.c<N&&(t.c=N,i=BX(n,y,Q,T.g),r=y,P=D.b));o=D.a<=1?"":JV+D.a+")",q(t.a,j.d+(j.b?"_S":j.j.length==0?"_L":j.n.a.length==0?"_I":"_U")+(A9(),Q9(f,5))+o+nn);}return g=c(F,m,6,T.g,15,1),s=c(F,m,6,L.g,15,1),qR(D,T,L,g,s,null)&&(N=D.q,t.c<=N&&(t.c=N,i=g,r=s,P=D.b),o=D.a<=1?"":JV+D.a+")",q(t.a,(A9(),"no rule:"+Q9(N,5)+o+nn))),t.c==f1?false:(SW(D,e,i,r,P),true);}function jtt(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N;for(r=false,S=kn(t.d),k=0;k<S.j.a.length;k++)if(C=G(S.j,k),C.length==6&&!S.f[k]){for(y=true,b=G(S.k,k),j=0,R=b.length;j<R;++j)if(v=b[j],dt(t.d,v)!=1||Z8(t.d,v)){y=false;break;}if(y){for(i=new N0(),h=new N0(),D=j1(Ut,[c0,Tt],[15,6],15,[6,3],2),n6(e,C,i,h,D),Q=c(Ut,Tt,6,C.length,15,1),x=0,L=0;L<C.length;L++)Q[L]=-(h.a*D[L][0]+h.b*D[L][1]+h.c*D[L][2]),Q[L]<0^(L&1)==1&&++x;if(x!=0&&x!=6){for(o=0;o<C.length;o++)if(Q[o]<0^(o&1)==1^x>=3){if(T=c(F,m,6,2,15,1),T[0]=C[o==0?5:o-1],T[1]=C[o==5?0:o+1],g=e.k[C[o]],n=ri(lq(_8(e.k[C[o]],i),h)),A=.6+w.Math.asin(w.Math.abs(Q[o])/w.Math.sqrt((i.a-g.a)*(i.a-g.a)+(i.b-g.b)*(i.b-g.b)+(i.c-g.c)*(i.c-g.c))),N=Q[o]<0?A:-A,P=GO(new pu(g),i),s=false,O(t.d,C[o])>2){for(l=0;l<O(t.d,C[o]);l++)if(f=_(t.d,C[o],l),f!=T[0]&&f!=T[1]&&LA(t.d,Nt(t.d,C[o],l))){s=true;break;}}s||dW(e,C[o],T,P,n,N);}r=true;}}}return r&&(GU(e),j5(e,t.j)),r;}function Rtt(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j;for(l=t.a[e],k=t.b[e],r=c(ci,A0,43,4,0,1),o=0,L=0;L<t.f.length&&!(o>=4);L++)if(!(e==t.g[K(t.j,0,t.f[L])]||e==t.g[K(t.j,1,t.f[L])])){if(h=t.a[t.g[K(t.j,0,t.f[L])]],v=t.b[t.g[K(t.j,0,t.f[L])]],T=t.a[t.g[K(t.j,1,t.f[L])]],b=t.b[t.g[K(t.j,1,t.f[L])]],f=w.Math.sqrt((h-l)*(h-l)+(v-k)*(v-k)),D=w.Math.sqrt((T-l)*(T-l)+(b-k)*(b-k)),P=w.Math.sqrt((T-h)*(T-h)+(b-v)*(b-v)),f<P&&D<P){h==T?(i=w.Math.abs(l-h),i<.5&&(r[o++]=new $P(hn(h,k,l,k),(.5-i)/2))):v==b?(i=w.Math.abs(k-v),i<.5&&(r[o++]=new $P(hn(l,v,l,k),(.5-i)/2))):(s=(b-v)/(T-h),y=-1/s,A=v-s*h,n=k-y*l,g=(n-A)/(s-y),j=s*g+A,i=w.Math.sqrt((g-l)*(g-l)+(j-k)*(j-k)),i<.5&&(r[o++]=new $P(hn(g,j,l,k),(.5-i)/2)));continue;}if(f<.5){r[o++]=new $P(hn(h,v,l,k),(.5-f)/2);continue;}if(D<.5){r[o++]=new $P(hn(T,b,l,k),(.5-D)/2);continue;}}o>0&&(Q=L2(r,o),t.a[e]+=Q.b*w.Math.sin(Q.a),t.b[e]+=Q.b*w.Math.cos(Q.a));}function xp(t){var e,A,n,P,r,i,f,D,Q;for(A=B(d(F,1),m,6,15,[8,-2,8,-2,8]),Q=B(d(F,1),m,6,15,[8,-2,4,-2,12,-2,4,-2,12,-2,4,-2,12,-2,8]),iL(t.c,A,Q),t.o=$u(t.c,1,1),YP(t.o,t),D0(t.c,he(t.c,"Atom Label:"),1,1),D0(t.c,t.o,3,1),ke(t.c,he(t.c,"(examples: 'D', 'Li', 'Cys', 'R12', 'R3@C')"),1,3,3,3),t.p=$u(t.c,1,1),YP(t.p,t),D0(t.c,he(t.c,"Atom Mass:"),1,5),D0(t.c,t.p,3,5),ke(t.c,he(t.c,"(empty for natural abundance)"),1,7,3,7),t.q=$u(t.c,1,1),YP(t.q,t),D0(t.c,he(t.c,"Abnormal Valence:"),1,9),D0(t.c,t.q,3,9),ke(t.c,he(t.c,"(empty for default valence)"),1,11,3,11),t.a==-1?(n=(J1(),a0)[t.k],Y8(t.o,t.n==null?n:t.n+"@"+n),t.g!=0&&Y8(t.p,""+t.g),t.j!=-1&&Y8(t.q,""+t.j)):(n=Vi(t.e,t.a),e=eP(t.e,t.a),Y8(t.o,e==null?n:e+"@"+n),ge(t.e,t.a)!=0&&Y8(t.p,""+ge(t.e,t.a)),G9(t.e,t.a)!=-1&&Y8(t.q,""+G9(t.e,t.a))),t.b=TA(t.c),r=EE,i=0,f=r.length;i<f;++i)P=r[i],Gt(t.b,P);D=t.a==-1?t.i:jA(t.e,t.a),$t(t.b,D==32?1:D==48?2:D==16?3:0),D0(t.c,he(t.c,"Radical State:"),1,13),D0(t.c,t.b,3,13);}function ptt(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g;for(e=0;e<t.j.g;e++){for(i=0,f=false,Q=0,s=0;s<O(t.j,e)&&!f;s++)if(P=Nt(t.j,e,s),t.e[P]){for(++i,n=_(t.j,e,s),rA(t.j,n)&&++Q,h=0;h<O(t.j,n);h++)if(T=_(t.j,n,h),g=Nt(t.j,n,h),T!=e&&t.e[g]){f=true;break;}}if(i>=2&&!f&&i==Q){if(r=c(F,m,6,i,15,1),o=yf(t.j,e),o==0)if(X(t.j,e)==7&&R1(t.j,e)==0)o=1,b0(t.j,e,1);else if(X(t.j,e)>14)o=2;else continue;for(l=0,y=0;y<O(t.j,e);y++)P=Nt(t.j,e,y),t.e[P]&&(n=_(t.j,e,y),r[l++]=(A=X(t.j,n),((A==8?14+(O(t.j,n)==1?1:0):A==7?12+(O(t.j,n)==1?1:0):A==16?10+(O(t.j,n)==1?1:0):A==34?8+(O(t.j,n)==1?1:0):A==15?6+(O(t.j,n)==1?1:0):A==33?4+(O(t.j,n)==1?1:0):A==6?2+(O(t.j,n)==1?0:1):O(t.j,n)==1?0:1)<<16)+y));for(r.sort(pe(Q0.prototype.ld,Q0,[])),t.b-=1+i,t.d[e]=false,D=w.Math.min(i-1,o),L=0;L<r.length;L++)n=_(t.j,e,r[L]&d1),P=Nt(t.j,e,r[L]&d1),t.d[n]=false,t.e[P]=false,--t.c,L<r.length-D?yf(t.j,n)!=0&&b0(t.j,n,-1):(yf(t.j,n)==0&&b0(t.j,n,1),g0(t.j,P,2));}}}function Mtt(t,e,A){var n,P,r,i,f,D,Q,o,L,s;for(s=B(d(F,2),u0,7,0,[B(d(F,1),m,6,15,[2,1,2,1]),B(d(F,1),m,6,15,[1,2,2,1]),B(d(F,1),m,6,15,[1,1,2,2]),B(d(F,1),m,6,15,[2,1,1,2]),B(d(F,1),m,6,15,[2,2,1,1]),B(d(F,1),m,6,15,[1,2,1,2])]),n=c(Ut,Tt,6,Ct(t.R,e),15,1),i=0;i<Ct(t.R,e);i++)n[i]=_0(t.R,_(t.R,e,A[i]),e);if(Q=W5(t.R,e,A,n,null)<<24>>24,Q!=3)return Q;for(o=0,L=0,f=0;f<Ct(t.R,e);f++)P=Nt(t.R,e,A[f]),K(t.R,0,P)==e&&(c1(t.R,P)==129&&(L!=0&&hP(t.R,e),o=f,L=1),c1(t.R,P)==257&&(L!=0&&hP(t.R,e),o=f,L=2));if(L==0)return 3;for(r=1;r<Ct(t.R,e);r++)n[r]<n[0]&&(n[r]+=m0);if(Ct(t.R,e)==3){switch(o){case 0:(n[1]<n[2]&&n[2]-n[1]<l1||n[1]>n[2]&&n[1]-n[2]>l1)&&(L=3-L);break;case 1:n[2]-n[0]>l1&&(L=3-L);break;case 2:n[1]-n[0]<l1&&(L=3-L);}return L==1?2:1;}return D=0,n[1]<=n[2]&&n[2]<=n[3]?D=0:n[1]<=n[3]&&n[3]<=n[2]?D=1:n[2]<=n[1]&&n[1]<=n[3]?D=2:n[2]<=n[3]&&n[3]<=n[1]?D=3:n[3]<=n[1]&&n[1]<=n[2]?D=4:n[3]<=n[2]&&n[2]<=n[1]&&(D=5),s[D][o]==L?2:1;}function Ctt(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v;if(t.g.a.length==0||t.f.a.length==0||(s=Es(t),s==0))return null;for(L=c(F,u0,7,t.f.a.length,0,2),r=0;r<t.f.a.length;r++)for(h=G(t.f,r),ut(h,15),L[r]=c(F,m,6,s+1,15,1),mU(L[r],-1),e=0;e<h.r;e++){if(o=w.Math.abs(h.A[e]),o!=0&&L[r][o]!=-1)return null;L[r][o]=e;}for(i=c(Pt,it,6,s+1,16,1),P=0;P<t.g.a.length;P++)for(v=G(t.g,P),ut(v,15),g=0;g<v.r;g++)if(o=w.Math.abs(v.A[g]),o!=0&&!i[o]){for(f=0;f<t.f.a.length;f++)if(y=L[f][o],y!=-1){if(h=G(t.f,f),v.k[g]!=h.k[y]){i[o]=true;break;}if((v.v[g]&3)!=(h.v[y]&3)){i[o]=true;break;}for(D=0;D<v.k[g];D++)if(A=M1(v,v.j[g][D]),A==0)i[o]=true;else {for(k=v.n[g][D],n=false,Q=0;Q<h.k[y];Q++){if(T=M1(h,h.j[y][Q]),T==0){i[o]=true;break;}if(T==A){if(n=true,l=h.n[y][Q],(k<v.i&&(q8(v.q,k)||v.I[k]==8))^(l<h.i&&(q8(h.q,l)||h.I[l]==8))||!(k<v.i&&(q8(v.q,k)||v.I[k]==8))&&(dt(v,k)!=dt(h,l)||(v.G[k]&3)!=(h.G[l]&3))){i[o]=true,i[A]=true;break;}break;}}n||(i[o]=true);}}}return i;}function Htt(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y;for(this.r=true,this.b=false,this.t=true,this.a=false,this.i=Et,this.c=t,this.o=c(gr,B9,26,t.g.a.length,0,1),n=0;n<t.g.a.length;n++)ve(G(t.g,n),true),ut(G(t.g,n),15);for(P=0;P<t.f.a.length;P++)ut(G(t.f,P),15);for(ua(this,t),this.k=c(F,u0,7,t.g.a.length,0,2),r=0;r<t.g.a.length;r++)for(L=G(t.g,r),this.k[r]=c(F,m,6,L.g,15,1),i=0;i<L.g;i++)if(Q=w.Math.abs(L.A[i]),Q!=0)for(f=0;f<t.f.a.length;f++)for(o=G(t.f,f),D=0;D<o.g;D++)w.Math.abs(o.A[D])==Q&&(e=(y=En(L,i),y+en(L,i,y,L.D[i])-G1(L,i)-(s=En(o,D),s+en(o,D,s,o.D[D])-G1(o,D))),this.k[r][i]=w.Math.max(e,0));for(this.f=c(Pt,c0,12,t.f.a.length,0,2),A=0;A<t.f.a.length;A++)for(o=G(t.f,A),this.f[A]=c(Pt,it,6,o.g,16,1),i=0;i<o.g;i++)if(Q=w.Math.abs(o.A[i]),Q!=0)for(f=0;f<t.g.a.length;f++)for(L=G(t.g,f),D=0;D<L.g;D++)w.Math.abs(L.A[D])==Q&&(ms(Gb(o,i),Gb(L,D))!=0||ms(kb(o,i),kb(L,D))!=0)&&(this.f[A][i]=true);this.s=new Gr(),this.g=c(J4,c0,20,this.o.length,0,1);}function Vtt(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C;if(g=new BU(t.e,t.c),h=c5(g,t.f,t.d),t.a.a.length==0)return Ay(g,h);for(k=1,b=new Zt(t.a);b.a<b.c.a.length;)v=_t(b),k*=Mz(v);if(k>4e6)return q1(),-k;for(e=0,i=c(F,m,6,t.a.a.length,15,1),y=c(F,m,6,t.a.a.length,15,1),D=0;D<t.a.a.length;D++)v=G(t.a,D),y[D]=(v.b=new n1(),R=c(F,m,6,v.a,15,1),C=c(Pt,it,6,w.Math.max(v.d.length,v.c.length),16,1),Im(v,0,C,R),v.b.a.length),i[D]=e,e+=v.a;for(r=Zy,P=null,n=null,l=c(F,m,6,t.a.a.length,15,1),s=t.a.a.length!=0;s;){if(j=false,t.i!=null){for(Q=0;Q<t.a.a.length;Q++)if(ZX(G(t.a,Q),l[Q],t.i)){j=true;break;}}if(!j){for(Q=0;Q<t.a.a.length;Q++)hX(G(t.a,Q),l[Q],h);if(T=Ay(g,h),r<T)for(r=T,P=c(F,m,6,e,15,1),n=c(F,m,6,e,15,1),A=0,o=0;o<t.a.a.length;o++)v=G(t.a,o),QJ(v,l[o],P,A),uJ(v,l[o],n,A),A+=v.a;}for(s=false,f=0;f<l.length;f++){if(++l[f],l[f]<y[f]){s=true;break;}l[f]=0;}}if(r!=Zy)for(L=t.b,f=0;f<e;f++)++L,t.f[P[f]]=L,t.d[n[f]]=L;return r;}function Np(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g;for(s=new n1(),g=new n1(),n=new n1(),r=new Zt(t.d);r.a<r.c.a.length;){for(P=_t(r),i=0,n.a.length=0,f=0;f<P.e.length;f++)e=P.e[f],A=t.i[e],A!=0&&(Ft(n,new D3(P,f,A)),i+=A);if(i!=0)for(kD(n,new Pu()),Q=new Zt(n);Q.a<Q.c.a.length&&(D=_t(Q),!(i*D.b>0&&(A=w.Math.abs(i)>=w.Math.abs(D.b)?D.b:i,i-=A,Ft(A<0?s:g,new D3(P,D.a,A)),i==0))););}if(s.a.length==0||g.a.length==0)return null;for(kD(g,new Au()),kD(s,new nu()),h=new Zt(g);h.a<h.c.a.length;)for(y=_t(h),L=new Zt(s);L.a<L.c.a.length;)if(o=_t(L),y.b==-o.b)return t.i[lD(y.c,y.a)]-=y.b,t.i[lD(o.c,o.a)]-=o.b,new OQ(y.c,o.c,y.a,o.a);for(T=new Zt(g);T.a<T.c.a.length;)for(y=_t(T),L=new Zt(s);L.a<L.c.a.length;)if(o=_t(L),y.b>-o.b)return t.i[lD(y.c,y.a)]+=o.b,t.i[lD(o.c,o.a)]-=o.b,new OQ(y.c,o.c,y.a,o.a);for(l=new Zt(g);l.a<l.c.a.length;)for(y=_t(l),L=new Zt(s);L.a<L.c.a.length;)if(o=_t(L),y.b<-o.b)return t.i[lD(y.c,y.a)]-=y.b,t.i[lD(o.c,o.a)]+=y.b,new OQ(y.c,o.c,y.a,o.a);return null;}function CA(t,e,A){var n,P,r,i,f,D,Q;if(t.P=false,t.F=new n1(),t.a=new n1(),Mi(t.O.a),!t.H||!t.g||t.g.g-t.p>t.H.g||t.g.i-t.q>t.H.i||t.g.g==0)return 0;for(e==6&&(t.N=63),Lq(t,A),n=c(Pt,it,6,t.H.g,16,1),t.G=c(F,m,6,t.g.g,15,1),mU(t.G,-1),f=c(F,m,6,t.A,15,1),zr(f,f.length,-1),r=0;!t.P;){if(t.w!=0){if(Q=t.u[r]==-1?t.H.g:Le(t.H,t.G[t.u[r]]),++f[r],f[r]==Q){if(f[r]=-1,r==0)break;--r,t.t[r]||(n[t.G[t.s[r]]]=false);continue;}if(t.u[r]==-1)n[f[r]]||Ly(t,f[r],t.s[r])&&(t.G[t.s[r]]=f[r],n[f[r]]=true,++r);else {if(_(t.H,t.G[t.u[r]],f[r])>=t.H.g)continue;P=_(t.H,t.G[t.u[r]],f[r]),t.t[r]?P==t.G[t.s[r]]&&ey(t,Nt(t.H,t.G[t.u[r]],f[r]),t.v[r])&&++r:n[P]||Ly(t,P,t.s[r])&&ey(t,Nt(t.H,t.G[t.u[r]],f[r]),t.v[r])&&(n[P]=true,t.G[t.s[r]]=P,++r);}}if(r==t.w){if(Mp(t,-1)&&hR(t,-1)&&AR(t,n,-1)){for(D=false,i=0;i<t.d;i++)if(ttt(t,n,f,i)){D=true;break;}if(e==1&&!D||!D&&(Na(t,e),e==2))return 1;}if(r==0)break;--r,t.t[r]||(n[t.G[t.s[r]]]=false);}}return jW(t),t.F.a.length;}function Ett(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht;for($=kn(t.e),a=G($.k,e).length,et=G($.j,e),W=G($.k,e),x=true,g=1;g<a;g++)if(pr(t.b,W[g])!=pr(t.b,W[0])){x=false;break;}if(x){for(r=(a-2)*S2/a,k=0;k<a;k++)i5(t,et[k],W[k],W[k==0?a-1:k-1],r);return;}for(H=c(Oe,uA,6,a,15,1),P=0,v=0;v<a;v++)H[v]=e0(t.e,et[v])==0?1.9106119386631804:e0(t.e,et[v])==1?2.094499897810209:S2,P+=H[v];for(n=((a-2)*S2-P)/a,b=0;b<a;b++)H[b]+=n;for(o=c(Oe,uA,6,a,15,1),j=1;j<a;j++)o[j]=o[j-1]+S2-H[j];for(f=c(Oe,uA,6,a,15,1),i=0;i<100;i++){for(st=0,ht=0,k=0;k<a;k++)st+=pr(t.b,W[k])*w.Math.sin(o[k]),ht+=pr(t.b,W[k])*w.Math.cos(o[k]);for(y=pA(0,0,st,ht),h=w.Math.sqrt(st*st+ht*ht),tt=-1,N=0,R=0;R<a;R++)C=R==0?a-1:R-1,S=R+1==a?0:R+1,D=Ze(o[R],o[C]),Q=Ze(o[S],o[R]),Y=Ze(H[R],H[S]),f[R]=2*D-2*Q+2*Y,l=w.Math.cos(o[R]-D4-y),s=h*l-MM*f[R],w.Math.abs(s)>w.Math.abs(N)&&(N=s,tt=R);L=w.Math.exp(-5*i/100),o[tt]+=L*N;}for(T=0;T<a;T++)C=T==0?a-1:T-1,A=o[C]+S2-o[T],A>m0&&(A-=m0),i5(t,et[T],W[C],W[T],A);}function Gp(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y;for(t.k=c(F,m,6,t.r,15,1),t.e=c(F,m,6,t.r,15,1),t.j=c(F,u0,7,t.r,0,2),t.n=c(F,u0,7,t.r,0,2),t.o=c(F,u0,7,t.r,0,2),t.p=c(F,m,6,t.g,15,1),o=c(F,m,6,t.r,15,1),i=0;i<t.s;i++)++o[t.F[0][i]],++o[t.F[1][i]];for(n=0;n<t.r;n++)t.j[n]=c(F,m,6,o[n],15,1),t.n[n]=c(F,m,6,o[n],15,1),t.o[n]=c(F,m,6,o[n],15,1);for(s=false,Q=0;Q<t.i;Q++){if(y=dt(t,Q),y==0){s=true;continue;}for(L=0;L<2;L++)A=t.F[L][Q],e=t.e[A],t.o[A][e]=y,t.j[A][e]=t.F[1-L][Q],t.n[A][e]=Q,++t.e[A],++t.k[A],A<t.g&&y>1&&(t.p[A]+=y-1);}for(D=0;D<t.i;D++)if(t.I[D]==8)for(L=0;L<2;L++)A=t.F[L][D],A<t.g&&t.p[A]==0&&(t.p[A]=1);for(f=t.i;f<t.s;f++){if(y=dt(t,f),y==0){s=true;continue;}for(L=0;L<2;L++)A=t.F[L][f],e=t.e[A],t.o[A][e]=y,t.j[A][e]=t.F[1-L][f],t.n[A][e]=f,++t.e[A],t.F[1-L][f]<t.g&&++t.k[A];}if(s){for(e=c(F,m,6,t.r,15,1),P=0;P<t.r;P++)e[P]=t.e[P];for(r=0;r<t.s;r++)if(y=dt(t,r),y==0)for(L=0;L<2;L++)A=t.F[L][r],t.o[A][e[A]]=y,t.j[A][e[A]]=t.F[1-L][r],t.n[A][e[A]]=r,++e[A];}}function Stt(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h;t.b|=e;try{for(l=o2("torsionID.txt"),n=(e&1)==0?null:o2("torsionAngle.txt"),s=(e&1)==0?null:o2("torsionRange.txt"),f=(e&1)==0?null:o2("torsionFrequency.txt"),r=(e&2)==0?null:o2("torsionBins.txt"),h=X1(l);h!=null;){if(y=Be(t.c,h),y||(y=new t7(h.endsWith("<")||h.endsWith(">")?0:h.endsWith("-")||h.endsWith("+")?1:h.endsWith("=")?3:2),We(t.c,h,y)),n)for(A=c8(X1(n),","),y.a=c(Kt,t1,6,A.length,15,1),Q=0;Q<A.length;Q++)y.a[Q]=L1(A[Q],vy,32767)<<16>>16;if(s)for(L=c8(X1(s),","),y.d=j1(Kt,[ie,t1],[16,6],15,[L.length,2],2),Q=0;Q<L.length;Q++)o=L[Q].indexOf(p0(45),1),y.d[Q][0]=L1(hA(L[Q],0,o),vy,32767)<<16>>16,y.d[Q][1]=L1(GD(L[Q],o+1),vy,32767)<<16>>16;if(f)for(D=c8(X1(f),","),y.c=c(Kt,t1,6,D.length,15,1),Q=0;Q<D.length;Q++)y.c[Q]=L1(D[Q],-128,127)<<24>>24;if(r)for(P=c8(X1(r),","),y.b=c(E,I,6,P.length,15,1),Q=0;Q<P.length;Q++)y.b[Q]=L1(P[Q],-128,127)<<24>>24;h=X1(l);}}catch(T){if(T=_1(T),Yt(T,79))i=T,ur(i,(q1(),k9));else throw At(T);}}function si(t){var e,A,n,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j;if(t.R.g!=0&&!t.G){for(t.I=0,j=0,A=1;A<t.R.g;A++)t.f[A]>t.f[j]&&(j=A);for(n=c(Pt,it,6,t.R.g,16,1),i=c(Pt,it,6,t.R.i,16,1),t.H=c(F,m,6,t.R.g,15,1),t.B=c(F,m,6,t.R.g,15,1),t.F=c(F,m,6,t.R.g,15,1),t.C=c(F,m,6,t.R.i,15,1),t.B[0]=j,t.H[j]=0,n[j]=true,D=0,Q=1,o=0;D<t.R.g;)if(D<Q){for(;;){for(l=0,h=0,s=-1,e=t.B[D],T=0;T<Le(t.R,e);T++)(T<O(t.R,e)||T>=Ct(t.R,e))&&(f=_(t.R,e,T),!n[f]&&t.f[f]>s&&(l=f,h=Nt(t.R,e,T),s=t.f[f]));if(s==-1)break;t.H[l]=Q,t.F[Q]=D,t.B[Q++]=l,t.C[o++]=h,n[l]=true,i[h]=true;}++D;}else {for(y=0,s=-1,e=0;e<t.R.g;e++)!n[e]&&t.f[e]>s&&(y=e,s=t.f[e]);t.H[y]=Q,t.F[Q]=-1,t.B[Q++]=y,n[y]=true;}for(t.D=c(F,m,6,2*(t.R.i-o),15,1);;){for(k=t.R.N,v=t.R.N,b=-1,r=0;r<t.R.i;r++)i[r]||(t.H[K(t.R,0,r)]<t.H[K(t.R,1,r)]?(g=t.H[K(t.R,0,r)],L=t.H[K(t.R,1,r)]):(g=t.H[K(t.R,1,r)],L=t.H[K(t.R,0,r)]),(g<k||g==k&&L<v)&&(k=g,v=L,b=r));if(b==-1)break;i[b]=true,t.C[o++]=b,t.D[2*t.I]=k,t.D[2*t.I+1]=v,++t.I;}t.G=true;}}function Op(t,e,A,n,P,r,i){var f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R;if(t==null||t.length==0||(R=t.indexOf(p0(33)),R==-1))return null;for(l=false,L=R!=0?0:t.length==1?-1:1,v=0,D=0,i?Sv(i):i=new U8();L!=-1;)L>R&&(l=true),Q=t.indexOf(p0(32),L),R>L&&(Q>R||Q==-1)&&(Q=R),o=Q==-1?(zt(L,t.length+1),t.substr(L)):(Mt(L,Q,t.length),t.substr(L,Q-L)),L=Q==-1||Q==t.length-1?-1:Q+1,k=null,e!=null&&e.length!=0&&(Q=e.indexOf(p0(32),v),Q==-1?k=(zt(v,e.length+1),e.substr(v)):(k=(Mt(v,Q,e.length),e.substr(v,Q-v)),v=Q+1)),f=null,A!=null&&A.length!=0&&(Q=A.indexOf(p0(32),D),Q==-1?f=(zt(D,A.length+1),A.substr(D)):(f=(Mt(D,Q,A.length),A.substr(D,Q-D)),D=Q+1)),j=new WA(r),b=o==null?null:ds(j,ln((T=o,w0(),T)),f==null?null:ln((g=f,g)),0),k!=null&&EY(j,ln((h=k,w0(),h))),l?(Ft(i.f,b),i.d=-1):(Ft(i.g,b),i.d=-1);if(n!=null&&n.length!=0&&FI(i,new Ib(n)),P!=null&&P.length!=0){for(j=new WA(r),s=0,y=P.indexOf(p0(43));y!=-1;)oh(i,tf(j,(Mt(s,y,P.length),P.substr(s,y-s)))),s=y+1,y=P.indexOf(p0(43),s);oh(i,tf(j,(zt(s,P.length+1),P.substr(s))));}return i;}function Itt(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S;for(Q=c(F,m,6,t.j.g,15,1),g=c(F,m,6,t.d.g,15,1),o=c(F,m,6,t.j.g,15,1),v=c(F,m,6,t.d.g,15,1),Q[0]=e.b,o[e.b]=e.b,g[0]=e.a,v[e.a]=e.a,t.n[e.b]==0&&(++t.c,t.n[e.b]=t.c,t.f[e.a]=t.c),f=0,L=0;f<=L;){for(R=Q[f],b=g[f],T=j1(F,[u0,m],[7,6],15,[O(t.j,R),O(t.d,b)],2),y=0;y<O(t.j,R);y++)if(j=_(t.j,R,y),t.n[j]==0)for(r=iF(t.j,Nt(t.j,R,y)),h=0;h<O(t.d,b);h++)k=_(t.d,b,h),t.f[k]==0&&X(t.j,j)==X(t.d,k)&&(i=Nt(t.d,b,h),S=FZ(t,R,j,b,k),r==iF(t.d,i)||S!=0?ra(t,R,j,b,k)&&(D=Pj(t,R,j,b,k),C=w.Math.max(S,D),C!=0&&(l=c_(t,o[R],R,j,v[b],b,k),j_(t,R,j,b,k,C,l)&&(T[y][h]=C,l&&(T[y][h]+=64),LB(o[R],R,j,t.o)==LB(v[b],b,k,t.g)&&(T[y][h]+=128),kF(t.j,j)==kF(t.d,k)&&(T[y][h]+=1)))):Pj(t,R,j,b,k)==O1&&(T[y][h]=768));for(;;){for(A=0,P=-1,n=-1,s=0;s<T.length;s++)if(j=_(t.j,R,s),t.n[j]==0)for(h=0;h<T[s].length;h++)k=_(t.d,b,h),t.f[k]==0&&A<T[s][h]&&(A=T[s][h],P=j,n=k);if(A==0)break;++L,Q[L]=P,o[P]=Q[f],g[L]=n,v[n]=g[f],++t.c,t.n[P]=t.c,t.f[n]=t.c;}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]);}function xtt(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g;P=e.a,y=e.g,Q=gt(V(h0(t.k,P),1),0),r=IA(t.k,P),L=r!=null?kZ(t,P,r,n):Q?"*":Vi(t.k,P),!Q&&r==null&&mn(t.k,P)&&(t.j&4)==0&&(e0(t.k,P)!=0||G9(t.k,P)==-1&&jA(t.k,P)==0)&&(L=L.toLowerCase()),e.f&&(A.a+="("),y!=-1&&Rp(t,o1(t.k,e.a,e.g),e.g,A),i=R1(t.k,P),i==0&&(t.j&1)!=0&&(f=V(h0(t.k,P),yr),z(f,Sf)==0?i=-1:z(f,Ef)==0&&(i=1)),o=ge(t.k,P),s=(t.j&2)!=0?M1(t.k,P):0,l=(t.j&1)!=0?D1t(t,P,n):null,g=!Q&&!WG(X(t.k,P))||r!=null||(v0(t.k,P)==1||v0(t.k,P)==2)&&(T=De(t.k,P)-1,!(T!=-1&&t.i[T][OA(t.k,P)]<=1))&&(X(t.k,P)!=7||R1(t.k,P)>0)||mn(t.k,P)&&e0(t.k,P)==0&&(t.j&4)==0||i!=0||o!=0||s!=0||G9(t.k,P)!=-1||jA(t.k,P)!=0||l!=null,g&&(A.a+="["),o!=0&&(A.a+=o),A.a+=""+L,(v0(t.k,P)==1||v0(t.k,P)==2)&&(h=De(t.k,P)-1,!(h!=-1&&t.i[h][OA(t.k,P)]<=1))&&(X(t.k,P)!=7||R1(t.k,P)>0)&&q(A,Sa(t,P,y)),(t.j&1)==0&&g&&(D=_d(t.k,P),D==1?A.a+="H":D>1&&(A.a+="H"+D)),i!=0&&(A.a+=String.fromCharCode(i>0?43:45),w.Math.abs(i)>1&&Mh(A,w.Math.abs(i))),l!=null&&(A.a+=""+l),s!=0&&(A.a+=":",A.a+=s),g&&(A.a+="]"),uX(t,e,A),e.e&&(A.a+=")");}function Ntt(t,e,A,n){var P,r,i,f,Q;if(i=1,z(t,0)==0)return "0";if(z(t,0)!=0){for(;n0(n9(t,10),0);)t=Sn(t,10),++e;for(i=0,f=t;z(f,0)!=0;f=Sn(f,10))++i;}return r=new C0(),z(t,0)<0&&(r.a+="-"),w.Math.max(0,A-i),P=""+Fe(z(t,0)<0?E0(t):t),e==0?(r.a+=P,false):e>0?(Q=e>4,Q?(i==1?(r.a+=P,A>1&&(r.a+=".",r.a+="0")):(q(r,(Mt(0,1,P.length),P.substr(0,1))),r.a+=".",q(r,(zt(1,P.length+1),P.substr(1))),false),r.a+="e",r.a+=""+(e+i-1)):(r.a+=P,q(r,HP(e)),false)):-e<i?(q(r,(Mt(0,i+e,P.length),P.substr(0,i+e))),r.a+=".",q(r,(zt(i+e,P.length+1),P.substr(i+e))),false):-e==i?(r.a+="0.",r.a+=P,false):e+i<-2?(i==1?(r.a+=P,A>1&&(r.a+=".",r.a+="0")):(Ye(r,(zt(0,P.length),P.charCodeAt(0))),r.a+=".",q(r,(zt(1,P.length+1),P.substr(1))),false),r.a+="e-",r.a+=""+(1-e-i)):(r.a+="0.",q(r,HP(-e-i)),r.a+=P,false),r.a;}function Gtt(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g;if(r=tn(t.V,e,A),i=kf(t.V,e,A),t.w==2){if(t.V.L){if(r!=-1)GF(t,r);else if(i!=-1)Jv(t,i);else if(t.v){if(!t.Z){for(s=0;s<t.V.r;s++)vP(t.V,s,false);for(P=new Zt(t.I);P.a<P.c.a.length;)n=_t(P),n.g=false;}t.v.g=true,t.eb=w.Math.max(t.eb,1),P1(t.k);}}else if(g=-1,r!=-1?g=r:i!=-1&&(g=K(t.V,0,i)),g!=-1||t.v){if(!t.Z){for(s=0;s<t.V.r;s++)vP(t.V,s,false);if(t.I)for(Q=new Zt(t.I);Q.a<Q.c.a.length;)D=_t(Q),D.g=false;}if(g!=-1){if((t.U&1)!=0)for(o=t.M[g],s=0;s<t.V.r;s++)t.M[s]==o&&vP(t.V,s,true);else for(L=xm(t.V,g,false),s=0;s<L.length;s++)vP(t.V,L[s],true);}else t.v.g=true;t.eb=w.Math.max(t.eb,1),P1(t.k);}}else if(t.w==18&&(o=-2,(t.U&1)!=0&&(o=_J(t)),o!=-1)){for(T=Et,h=f1,y=0;y<t.V.r;y++)(o==-2||t.M[y]==o)&&(T>mt(t.V,y)&&(T=mt(t.V,y)),h<mt(t.V,y)&&(h=mt(t.V,y)));if(h>T){for(f=(h+T)/2,l=0;l<t.V.r;l++)(o==-2||t.M[l]==o)&&de(t.V,l,2*f-mt(t.V,l));for(s=0;s<t.V.s;s++)if(o==-2||t.M[K(t.V,0,s)]==o)switch(c1(t.V,s)){case 257:g0(t.V,s,129);break;case 129:g0(t.V,s,257);}}t.eb=w.Math.max(t.eb,1),P1(t.k),N1(t,new x1(t,1,true));}}function zp(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l;for(o=t.Q,L=t.F,(t.G&Gn)!=0&&(t.Q=-6,t.F=hy,$1(t,1)),t.o=c(lc,A0,56,t.L.r,0,1),D=0;D<t.L.s;D++)(c1(t.L,D)==2||c1(t.L,D)==386||c1(t.L,D)==8)&&tM(t,D);for(Q=0;Q<t.L.s;Q++)c1(t.L,Q)!=2&&c1(t.L,Q)!=386&&c1(t.L,Q)!=8&&tM(t,Q);if((t.G&64)==0)for(f=0;f<t.L.s;f++)bu(t.L,f)!=0&&(P=null,bu(t.L,f)==1||bu(t.L,f)==2?(dt(t.L,f)==2||gP(t.L,f)==0||e[gP(t.L,f)][ef(t.L,f)]>1)&&(bu(t.L,f)==1?P=dt(t.L,f)==2?"E":RU(t.L,f)?"p":"P":P=dt(t.L,f)==2?"Z":RU(t.L,f)?"m":"M"):P="?",P!=null&&(t.Cb((t.X*2+1)/3|0),$1(t,V9(t.L,f)?-3:t.L.P==1||(t.G&S0)!=0?t.Q:448),A=K(t.L,0,f),n=K(t.L,1,f),y=(W1(t.R,mt(t.L,A))+W1(t.R,mt(t.L,n)))/2,l=(Z1(t.R,Rt(t.L,A))+Z1(t.R,Rt(t.L,n)))/2,r=(W1(t.R,mt(t.L,A))-W1(t.R,mt(t.L,n)))/3,i=(Z1(t.R,Rt(t.L,A))-Z1(t.R,Rt(t.L,n)))/3,EP(t,y+i,l-r,P,true),$1(t,t.Q),t.Cb(t.X)));if((t.G&4)!=0){for(t.Cb((t.X*2+1)/3|0),$1(t,384),f=0;f<t.L.s;f++)A=K(t.L,0,f),n=K(t.L,1,f),s=Z8(t.L,f)?"d":eA(t.L,f)?"a":"",y=(W1(t.R,mt(t.L,A))+W1(t.R,mt(t.L,n)))/2,l=(Z1(t.R,Rt(t.L,A))+Z1(t.R,Rt(t.L,n)))/2,EP(t,y,l,s+(""+f),true);$1(t,t.Q),t.Cb(t.X);}(t.G&Gn)!=0&&(t.Q=o,t.F=L);}function Kp(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R;for(ut(t,1),A&&(e=true),D=0;D<t.s;D++)if(Q=dt(t,D),Q==1||Q==2){if(t.t[t.F[0][D]]>0&&t.t[t.F[1][D]]<0)r=t.F[0][D],i=t.F[1][D];else if(t.t[t.F[0][D]]<0&&t.t[t.F[1][D]]>0)r=t.F[1][D],i=t.F[0][D];else continue;if(Ae(t,r)||Ae(t,i)||t.D[r]<9&&G1(t,r)>3||t.D[i]<9&&G1(t,i)>3)continue;L=xt(t,r)!=0,t.t[r]-=1,t.t[i]+=1,L||(k=t.I[D],Q==1?t.I[D]=2:t.I[D]=4,(k==129||k==257)&&(R=t.F[0][D],g=_s(t,R,false),t.F[0][g]!=R&&(t.F[1][g]=t.F[0][g],t.F[0][g]=R))),t.U=0;}for(v=0,h=0,y=0,P=0;P<t.r;P++)v+=t.t[P],t.t[P]<0&&!CF(t,P)&&(++h,rA(t,P)&&(y-=t.t[P]));if(!e&&v!=0)throw At(new H1("molecule's overall charges are not balanced"));for(ut(t,1),b=0,j=A?v+y:y,f=0;f<t.r;f++)t.t[f]>0&&!Sq(t,f)&&rA(t,f)&&(o=w.Math.min(xt(t,f),t.t[f]),o!=0&&j>=o&&(v-=o,b-=o,j-=o,t.t[f]-=o,t.U&=1));if(T=A?v:b,T<0){for(l=c(F,m,6,h,15,1),h=0,r=0;r<t.r;r++)t.t[r]<0&&!CF(t,r)&&(l[h++]=(t.D[r]<<22)+r);for(l.sort(pe(Q0.prototype.ld,Q0,[])),s=l.length-1;T<0&&s>=l.length-h;s--)n=l[s]&z0,rA(t,n)&&(o=w.Math.min(-T,-t.t[n]),v+=o,T+=o,t.t[n]+=o,t.U&=1);}return v;}function Jp(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;for(o=c(ft,Dt,2,t.g.a.length+t.f.a.length,6,1),l=c(ft,Dt,2,t.g.a.length+t.f.a.length,6,1),r=c(ft,Dt,2,t.g.a.length+t.f.a.length,6,1),D=0;D<t.g.a.length+t.f.a.length;D++){if(g=D<t.g.a.length?G(t.g,D):G(t.f,D-t.g.a.length),g.L&&D<t.g.a.length)for(n=0;n<g.r;n++)w1(g,n,k8,false);if(P=new bA(g),o[D]=Me(P),o[D]==null)return null;l[D]=cB(P),r[D]=zu(P,e);}for(L=new C0(),i=new C0(),h=new C0(),Q=0;Q<t.g.a.length;Q++){if(s=Q,A)for(T="",s=-1,y=0;y<t.g.a.length;y++)a9(T,o[y])<0&&(T=o[y],s=y);Q>0&&(L.a+=" ",h.a+=" ",i.a+=" "),L.a+=""+o[s],h.a+=""+l[s],i.a+=""+r[s],o[s]="";}for(L.a+="!",t.f.a.length!=0&&t.g.a.length!=0&&(h.a+=" ",i.a+=" "),f=t.g.a.length;f<t.g.a.length+t.f.a.length;f++){if(s=f,A)for(T="",s=-1,y=t.g.a.length;y<t.g.a.length+t.f.a.length;y++)a9(T,o[y])<0&&(T=o[y],s=y);f>t.g.a.length&&(L.a+=" ",h.a+=" ",i.a+=" "),L.a+=""+o[s],h.a+=""+l[s],i.a+=""+r[s],o[s]="";}return k=c(ft,Dt,2,5,6,1),k[0]=L.a,h.a.length>t.g.a.length+t.f.a.length-1&&(k[1]=h.a),i.a.length>t.g.a.length+t.f.a.length-1&&(k[2]=i.a),t.b&&(k[3]=Tm(t.b)),t.a.a.length!=0&&(k[4]=dY(t,e)),k;}function Yp(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j;for(this.i=t,this.v=t.s,this.u=t.q,this.C=new xR(this.u,this.v),r=0,o=this.v,y=0,T=o.length;y<T;++y)D=o[y],r=w.Math.max(r,w.Math.max(1+D.i,1+D.j));for(e=c(F,m,6,r,15,1),L=this.v,l=0,g=L.length;l<g;++l)D=L[l],++e[D.i],++e[D.j];for(this.j=c(F,u0,7,e.length,0,2),this.k=c(F,u0,7,e.length,0,2),f=0;f<e.length;f++)this.j[f]=c(F,m,6,e[f],15,1),this.k[f]=c(F,m,6,e[f],15,1);for(zr(e,e.length,0),i=0;i<this.v.length;i++)n=ag(this.v[i],0),P=ag(this.v[i],1),this.j[n][e[n]]=P,this.j[P][e[P]]=n,this.k[n][e[n]]=i,this.k[P][e[P]]=i,++e[n],++e[P];for(this.o=c(F,m,6,r,15,1),this.n=c(F,m,6,r,15,1),this.q=c(F,m,6,r,15,1),this.p=c(Pt,it,6,r,16,1),this.f=c(F,DA,29,r,0,3),A=1;A<r;A++)for(this.f[A]=c(F,u0,7,A,0,2),P=0;P<A;P++)this.f[A][P]=e_(this,A,P);for(this.t=1,Q=this.v,s=0,h=Q.length;s<h;++s)D=Q[s],this.t*=D.d.length;for(v=this.u,b=0,j=v.length;b<j;++b)k=v[b],this.t*=k.b.length;this.t<=0&&(this.t=Et),this.D=new dd(),this.w=new Oh((y1(new Xw()),new mw())),this.A=new Ci(),this.g=0,this.B=0,this.r=3,this.F=false,this.s=w.Math.min(fP,this.t);}function Ott(t,e){var A,n;return n={},A=t.C[e],n.aromatic=I1(V(A,2),0),n.notAromatic=I1(V(A,4),0),n.notChain=I1(V(A,8),0),n.not2RingBonds=I1(V(A,16),0),n.not3RingBonds=I1(V(A,32),0),n.not4RingBonds=I1(V(A,64),0),n.noMoreNeighbours=I1(V(A,O1),0),n.moreNeighbours=I1(V(A,S0),0),n.matchStereo=I1(V(A,je),0),n.not0PiElectrons=I1(V(A,Gn),0),n.not1PiElectron=I1(V(A,g8),0),n.not2PiElectrons=I1(V(A,o0),0),n.not0Hydrogen=I1(V(A,128),0),n.not1Hydrogen=I1(V(A,256),0),n.not2Hydrogen=I1(V(A,512),0),n.not3Hydrogen=I1(V(A,Qe),0),n.not0Neighbours=I1(V(A,q0),0),n.not1Neighbour=I1(V(A,v8),0),n.not2Neighbours=I1(V(A,B8),0),n.not3Neighbours=I1(V(A,F8),0),n.not4Neighbours=I1(V(A,KA),0),n.notChargeNeg=I1(V(A,oo),0),n.notCharge0=I1(V(A,wn),0),n.noChargePos=I1(V(A,134217728),0),n.ringSize0=I1(V(A,w8),0),n.ringSize3=I1(V(A,h9),0),n.ringSize4=I1(V(A,T9),0),n.ringSize5=I1(V(A,c9),0),n.ringSize6=I1(V(A,w9),0),n.ringSize7=I1(V(A,g9),0),n.ringSizeLarge=I1(V(A,Vf),0),n;}function qtt(t,e){s8();var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j;for(g=c(Pt,it,6,e.i,16,1),j=(ut(e,7),e.q),T=c(Pt,it,6,j.j.a.length,16,1),Py(j,T,c(Pt,it,6,j.j.a.length,16,1),c(F,m,6,j.j.a.length,15,1),true),b=0;b<j.j.a.length;b++)if(T[b])for(h=0;h<G(j.k,b).length;h++)g[G(j.k,b)[h]]=true;for(P=c(F,m,6,2,15,1),i=0;i<e.i;i++)if(D=e.F[0][i],Q=e.F[1][i],P[0]=e.D[D],P[1]=e.D[Q],g[i]=g[i]|(i<e.i&&Ee(e.q,i)||dt(e,i)==2&&P[0]<=8&&P[1]<=8&&e.p[D]==1&&e.p[Q]==1&&e.e[D]>1&&e.e[Q]>1),!g[i]&&dt(e,i)==1){for(l=0;l<2;l++)if((P[l]==7||P[l]==8)&&P[1-l]==6){for(o=e.F[1-l][i],v=0;v<e.k[o];v++)if(e.o[o][v]==2&&(L=e.j[o][v],e.D[L]==7||e.D[L]==8||e.D[L]==16)){g[i]=true;break;}}}for(k=c(Pt,it,6,e.g,16,1),f=0;f<e.i;f++)g[f]&&(k[e.F[0][f]]=true,k[e.F[1][f]]=true);for(y=c(F,m,6,e.r,15,1),r=0;r<e.i;r++)if(g[r]){for(y[0]=e.F[0][r],s=r_(y,g,e),n=c(F,m,6,s,15,1),l=0;l<s;l++)n[l]=y[l];Ft(t,new U5(n,e));}for(A=0;A<e.g;A++)if(!k[A]&&(e.D[A]==5&&e.t[A]==0&&e.e[A]<=3||e.D[A]<=8&&e.p[A]==1&&e.e[A]>1||xP(e,A,true)&&e.p[A]!=2&&e.e[A]>1)){for(n=c(F,m,6,1+e.e[A],15,1),l=0;l<e.e[A];l++)n[l]=e.j[A][l];n[e.e[A]]=A,Ft(t,new U5(n,e));}}function ztt(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H;for(v=c(Pt,it,6,t.j.g,16,1),x=0;x<e.j.a.length;x++)if(N=G(e.k,x).length,(N==3||N==5||N==6||N==7)&&t.i[x])for(n=G(e.j,x),P=0,r=n.length;P<r;++P)A=n[P],v[A]=true;for(s=c(F,m,6,t.j.g,15,1),l=c(Pt,it,6,t.j.g,16,1),Q=0;Q<t.j.i;Q++)i=K(t.j,0,Q),f=K(t.j,1,Q),!v[i]&&!v[f]&&(t.e[Q]&&(++s[i],++s[f]),c1(t.j,Q)==16&&(l[i]=true,l[f]=true));for(S=c(F,m,6,t.j.g,15,1),y=c(F,m,6,t.j.g,15,1),H=0;H<t.j.g;H++)if(s[H]==1)for(y[0]=H,L=0,h=0;L<=h;){for(T=0;T<O(t.j,y[L]);T++)if(t.e[Nt(t.j,y[L],T)]&&(o=_(t.j,y[L],T),(L==0||o!=y[L-1])&&s[o]!=0)){if(y[++h]=o,(s[o]&1)!=0){for(j=1;j<h;j+=2)S[y[j]]=-1;h=0;}break;}++L;}for(D=c(Pt,it,6,t.j.g,16,1),tt=0;tt<t.j.g;tt++)if(!D[tt]&&s[tt]!=0){for(y[0]=tt,D[tt]=true,L=0,h=0;L<=h;){for(T=0;T<O(t.j,y[L]);T++)t.e[Nt(t.j,y[L],T)]&&(o=_(t.j,y[L],T),D[o]||(y[++h]=o,D[o]=true));++L;}if((h&1)==0){for(g=0;g<=h;g++)S[y[g]]==0&&(S[y[g]]=Tp(t,y[g],false));for(b=true,k=0;k<=h;k++)if(S[y[k]]<=0&&!cf(t,y[k],false)){b=false;break;}if(b){for(C=0,R=-1,T=0;T<=h;T++)C<S[y[T]]&&(C=S[y[T]],R=y[T]);C>0&&(Tp(t,R,true),Df(t,R));}}}}function Xp(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h;P=new h1(),D=new h1(),o=new we(),Q=new we(),i=K(t.L,0,A),f=K(t.L,1,A),n&&(s=e.a,e.a=e.b,e.b=s,s=e.c,e.c=e.d,e.d=s,y=i,i=f,f=y),vA(t,e)&&(LA(t.L,A)?(P.a=e.a,P.c=e.c,P.b=e.b,P.d=e.d,L=n?-Q6(t.L,A):Q6(t.L,A),L==0&&(L=1),Lf(t,e.b-e.a,e.d-e.c,o),L>0?(D.a=e.a+o.a,D.c=e.c+o.b,D.b=e.b+o.a,D.d=e.d+o.b,(Ui(t,i,f,1,Q)||O(t.L,i)>1)&&(D.a+=Q.a+o.b,D.c+=Q.b-o.a)):(D.a=e.a-o.a,D.c=e.c-o.b,D.b=e.b-o.a,D.d=e.d-o.b,(Ui(t,i,f,-1,Q)||O(t.L,i)>1)&&(D.a+=Q.a+o.b,D.c+=Q.b-o.a)),c1(t.L,A)==386&&lL(P,D),vA(t,P)&&In(t,P,i,f),c1(t.L,A)==8?vA(t,D)&&qQ(t,D,i,f):vA(t,D)&&In(t,D,i,f)):(Lf(t,e.b-e.a,e.d-e.c,o),l=o.a/2,h=o.b/2,r=false,P.a=e.a+l,P.c=e.c+h,P.b=e.b+l,P.d=e.d+h,O(t.L,i)>1&&(Ui(t,i,f,1,Q)?(P.a+=Q.a,P.c+=Q.b,O(t.L,i)==2&&(Q.a!=0||Q.b!=0)&&(P.a+=o.b,P.c-=o.a)):t.o[i]=new Hh(P.a,P.c)),D.a=e.a-l,D.c=e.c-h,D.b=e.b-l,D.d=e.d-h,O(t.L,i)>1&&(Ui(t,i,f,0,Q)?(D.a+=Q.a,D.c+=Q.b,O(t.L,i)==2&&(Q.a!=0||Q.b!=0)&&(D.a+=o.b,D.c-=o.a)):(t.o[i]=new Hh(D.a,D.c),r=true)),c1(t.L,A)==386&&lL(P,D),c1(t.L,A)==8?r?(qQ(t,P,i,f),In(t,D,i,f)):(In(t,P,i,f),qQ(t,D,i,f)):(In(t,P,i,f),In(t,D,i,f))));}function Ktt(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;this.i=t,this.g=7,this.j=new n1(),this.k=new n1(),this.b=new n1(),this.a=c(F,m,6,this.i.g,15,1),this.c=c(F,m,6,this.i.i,15,1),this.i._b(1),s=c(Pt,it,6,this.i.g,16,1),y=c(Pt,it,6,this.i.i,16,1);do for(i=false,A=0;A<this.i.g;A++)if(!s[A]){for(T=0,L=0;L<O(this.i,A);L++)s[_(this.i,A,L)]||++T;if(T<2){for(s[A]=true,o=0;o<O(this.i,A);o++)y[Nt(this.i,A,o)]=true;i=true;}}while(i);for(k=0;k<this.i.g&&s[k];)++k;if(k!=this.i.g){for(D=c(F,m,6,this.i.g,15,1),D[0]=k,h=c(F,m,6,this.i.g,15,1),h[0]=-1,f=c(F,m,6,this.i.g,15,1),f[k]=1,r=0,Q=0,l=1;r<=Q;){for(o=0;o<O(this.i,D[r]);o++)if(P=_(this.i,D[r],o),P!=h[D[r]]){if(f[P]!=0){R_(this,Nt(this.i,D[r],o),s);continue;}s[P]||(f[P]=l,h[P]=D[r],D[++Q]=P);}if(++r,r>Q){for(A=0;A<this.i.g;A++)if(f[A]==0&&!s[A]){f[A]=++l,D[++Q]=A,h[A]=-1;break;}}}if((e&4)!=0&&(this.e=c(Pt,it,6,this.j.a.length,16,1),this.f=c(Pt,it,6,this.j.a.length,16,1),this.d=c(F,m,6,this.j.a.length,15,1),Py(this,this.e,this.f,this.d,(e&8)!=0),Pa(this)),(e&2)!=0)for(n=0;n<this.i.i;n++)!y[n]&&dt(this.i,n)!=0&&(g=W_(this,n,s),g!=null&&ij(this,g,mb(this,g)));}}function Jtt(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a;for(v=c(F,m,6,P,15,1),b=c(F,m,6,P,15,1),h=0;h<P;h++)v[h]=L8(e,n[h]),b[h]=L8(A,n[h]);for(tt=0,Y=0,H=0,et=0,T=0;T<P;T++)tt+=e.a[v[T]],Y+=e.b[v[T]],H+=A.a[b[T]],et+=A.b[b[T]];for(tt/=P,Y/=P,H/=P,et/=P,Iv(A,tt-H,Y-et),Q=c(ci,A0,43,P,0,1),L=c(ci,A0,43,P,0,1),r=c(ci,A0,43,P,0,1),i=c(ci,A0,43,P,0,1),g=0;g<P;g++)Q[g]=new rQ(tt,Y,e.a[v[g]],e.b[v[g]]),L[g]=new rQ(tt,Y,A.a[b[g]],A.b[b[g]]),r[g]=new $P(Q[g].a-L[g].a,Q[g].b*L[g].b),i[g]=new $P(Q[g].a+L[g].a,Q[g].b*L[g].b);for(R=L2(r,P),C=L2(i,P),$=0,a=0,k=0;k<P;k++)for(j=0;j<Ct(t.f,n[k]);j++)f=_(t.f,n[k],j),ar(e,f)&&!ar(A,f)&&++$,!ar(e,f)&&ar(A,f)&&++a;for(o=c(ci,A0,43,$,0,1),s=c(ci,A0,43,a,0,1),y=c(ci,A0,43,a,0,1),$=0,a=0,l=0;l<P;l++)for(j=0;j<Ct(t.f,n[l]);j++)f=_(t.f,n[l],j),ar(e,f)&&!ar(A,f)&&(D=L8(e,f),o[$]=new rQ(e.a[v[l]],e.b[v[l]],e.a[D],e.b[D]),++$),!ar(e,f)&&ar(A,f)&&(D=L8(A,f),W=new rQ(A.a[b[l]],A.b[b[l]],A.a[D],A.b[D]),s[a]=new $P(R.a+W.a,W.b),y[a]=new $P(C.a-W.a,W.b),++a);return S=L2(o,$),x=L2(s,a),N=L2(y,a),w.Math.abs(VL(S.a,x.a))>w.Math.abs(VL(S.a,N.a))?Tf(A,tt,Y,R.a):(fX(A,tt,Y),Tf(A,tt,Y,C.a)),X5(t,e,A,P);}function Ytt(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x;for(ut(t,7),S=0,y=c(Pt,it,6,t.g,16,1),x=c(F,m,6,t.g,15,1),r=0;r<t.i;r++)A=t.F[0][r],n=t.F[1][r],i=t.t[A],f=t.t[n],i!=0&&f!=0&&i<0^f<0&&(y[A]=true,y[n]=true),x[A]+=dt(t,r),x[n]+=dt(t,r);for(D=0;D<t.g;D++)if(S+=t.t[D],t.t[D]==1){if(t.D[D]==7&&!y[D]){if(x[D]<=3)S-=1,t.t[D]=0,t.U=0,t.k[D]!=t.e[D]&&(jQ(t,_(t,D,t.e[D]-1)),ut(t,7));else if(D<t.g&&f0(t.q,D)){for(g=c(Pt,it,6,t.g,16,1),k=c(Pt,it,6,t.i,16,1),Oj(t,D,true,g,k),o=0;o<t.g;o++)if(g[o]&&t.D[o]==7&&t.t[o]==0&&x[o]==2&&B$(t,k,D,o)){S-=1;break;}}}}else if(t.t[D]<0&&(t.D[D]==6||t.D[D]==7||t.D[D]==8||t.D[D]==16))if(y[D]){for(j=c(F,m,6,16,15,1),j[0]=D,C=1,R=0;R<C;){for(P=0;P<t.s;P++)if(e=-1,t.F[0][P]==j[R]?e=t.F[1][P]:t.F[1][P]==j[R]&&(e=t.F[0][P]),e!=-1&&t.t[e]!=0){for(L=false,h=0;h<C;h++)if(e==j[h]){L=true;break;}L||(C==j.length&&(Q=c(F,m,6,2*j.length,15,1),PA(j,0,Q,0,j.length),j=Q),j[C++]=e);}++R;}for(s=0,T=0;T<C;T++)s+=t.t[j[T]];if(s<0){for(v=-1,b=99,l=0;l<C;l++)t.t[j[l]]<0&&b>ej(t.D[j[l]])&&(b=ej(t.D[j[l]]),v=j[l]);v!=-1&&(S-=t.t[v],t.t[v]=0,t.U=0);}}else S-=t.t[D],t.t[D]=0,t.U=0;return S>0&&(S=F_(t,S)),S;}function g6(){g6=v1,sl=B(d(F,1),m,6,15,[0,yi,14286847,13402367,12779264,16758197,9474192,3166456,16715021,9494608,11789301,11230450,9109248,12560038,1578e4,16744448,16777008,2093087,8442339,9388244,4062976,15132390,12567239,10921643,9083335,10255047,14706227,15765664,5296208,13140019,8224944,12750735,6721423,12419299,16752896,10889513,6076625,7351984,DP,9764863,9756896,7586505,5551541,3907230,2396047,687500,27013,12632256,16767375,10909043,6717568,10380213,13924864,9699476,4366e3,5707663,51456,7394559,16777159,14286791,13107143,10747847,9437127,6422471,4587463,3211207,2097095,65436,58997,54354,48952,43812,5096191,5089023,2200790,2522539,2516630,1528967,13684960,16765219,12105936,10900557,5724513,10375093,11230208,7688005,4358806,4325478,32e3,7384058,47871,41471,36863,33023,27647,5528818,7888099,9064419,10565332,11739092,11739066,11734438,12389767,13041766,13369433,13697103,14221381,14680120,15073326,15400998,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,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,13158600,1334015,56540,15075850,15132160,56540,15075850,15461355,8553170,1016335,1016335,1334015,15132160,3289770,14456450,16422400,16422400,11819700,3289770,1016335]);}function Qy(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h;if(t.db[e]!=0||X(t.R,e)!=5&&X(t.R,e)!=6&&X(t.R,e)!=7&&X(t.R,e)!=14&&X(t.R,e)!=15&&X(t.R,e)!=16||(t.Q&S0)!=0&&X(t.R,e)>=14)return  false;if(e0(t.R,e)!=0){if(oT(t.R,e))return sa(t,e,A);if(X(t.R,e)!=15&&X(t.R,e)!=16)return  false;}if(O(t.R,e)<3||Ct(t.R,e)>4||R1(t.R,e)>0&&X(t.R,e)==6||X(t.R,e)==5&&Ct(t.R,e)!=4)return  false;if(t.R.L){if(ye(t.R,e))return  false;for(f=0;f<Ct(t.R,e);f++)if(ye(t.R,_(t.R,e,f)))return  false;}if(X(t.R,e)==7&&!t.S[e])return  false;for(l=c(F,m,6,4,15,1),h=c(F,m,6,4,15,1),o=c(Pt,it,6,4,16,1),D=0;D<Ct(t.R,e);D++){for(r=-1,P=0,Q=0;Q<Ct(t.R,e);Q++)o[Q]||r<t.f[_(t.R,e,Q)]&&(r=t.f[_(t.R,e,Q)],P=Q);l[D]=P,h[D]=r,o[P]=true;}if(Ct(t.R,e)==4&&h[0]==h[1]&&h[2]==h[3]||Ct(t.R,e)==4&&(h[0]==h[2]||h[1]==h[3])||Ct(t.R,e)==3&&h[0]==h[2])return  false;for(L=0,s=0,y=false,i=1;i<Ct(t.R,e);i++)if(h[i-1]==h[i]){if(A==1||h[i]==0)return  false;L=_(t.R,e,l[i-1]),s=_(t.R,e,l[i]),A==3&&LA(t.R,Nt(t.R,e,l[i]))&&(t.W[e]=true),y=true;}return A!=1&&!y?false:(n=t.jb?ha(t,e,l):Mtt(t,e,l),A==1?t.db[e]=n:A==2&&(n==1?se(t.e[L],t.f[e]):n==2&&se(t.e[s],t.f[e])),true);}function oy(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T;if(Y5(t,e),!((t.v[e]&3)==0||(t.v[e]&3)==3)){if(t.p[e]==2&&t.k[e]==2){gtt(t,e);return;}if(t.k[e]<3||t.k[e]>4){me(t,e,0,false);return;}for(A=t.e[e],l=false,i=0;i<A;i++)if(dt(t,t.n[e][i])==1){l=true;break;}if(l){for(h=gY(t,e),n=c(Ut,Tt,6,A,15,1),f=0;f<A;f++)n[f]=_0(t,t.j[e][h[f]],e);for(D=0;D<A;D++)t.F[0][t.n[e][D]]==e&&dt(t,t.n[e][D])==1&&(t.I[t.n[e][D]]=1);if(!((t.q&&e<t.g?UA(t.q,e):0)<=24&&yZ(t,e,h,n))&&(s=_s(t,e,true),s!=-1)){for(t.F[0][s]!=e&&(t.F[1][s]=t.F[0][s],t.F[0][s]=e),y=-1,Q=0;Q<A;Q++)if(s==t.n[e][h[Q]]){y=Q;break;}for(T=B(d(F,2),u0,7,0,[B(d(F,1),m,6,15,[2,1,2,1]),B(d(F,1),m,6,15,[1,2,2,1]),B(d(F,1),m,6,15,[1,1,2,2]),B(d(F,1),m,6,15,[2,1,1,2]),B(d(F,1),m,6,15,[2,2,1,1]),B(d(F,1),m,6,15,[1,2,1,2])]),r=1;r<A;r++)n[r]<n[0]&&(n[r]+=m0);if(A==3){switch(o=false,y){case 0:o=n[1]<n[2]&&n[2]-n[1]<l1||n[1]>n[2]&&n[1]-n[2]>l1;break;case 1:o=n[2]-n[0]>l1;break;case 2:o=n[1]-n[0]<l1;}P=(t.v[e]&3)==1^o?257:129;}else L=0,n[1]<=n[2]&&n[2]<=n[3]?L=0:n[1]<=n[3]&&n[3]<=n[2]?L=1:n[2]<=n[1]&&n[1]<=n[3]?L=2:n[2]<=n[3]&&n[3]<=n[1]?L=3:n[3]<=n[1]&&n[1]<=n[2]?L=4:n[3]<=n[2]&&n[2]<=n[1]&&(L=5),P=(t.v[e]&3)==1^T[L][y]==1?129:257;t.I[s]=P;}}}}function Uy(t,e,A){qp();var n,P,r,i,f,D,Q,o,L,s,y,l,h,T;for(ut(t,7),y=c(XA,re,6,t.k[e],14,1),s=0,D=0;D<t.k[e];D++)if(P=t.j[e][D],t.D[P]!=1){if(i=0,(A&32)!=0&&(r=t.o[e][D],A==32190?z(r,3)<0&&Z8(t,t.n[e][D])&&t.p[e]==1&&(r=0):z(r,3)<0&&eA(t,t.n[e][D])&&(r=0),i=J(i,Wt(r,4))),(A&128)!=0){if(Ro[t.D[P]]==-1)throw At(new H1(Y6+t.D[P]));i=at(i,Ro[t.D[P]]);}else if((A&64)!=0){if(z4[t.D[P]]==-1)throw At(new H1(Y6+t.D[P]));i=at(i,z4[t.D[P]]);}for((A&256)!=0&&(l=t.k[P]-1,l>3&&(l=3),(A&512)==0&&l>1&&(l=1),i=J(i,l<<6)),(A&Qe)!=0&&(t.v[P]&8)!=0&&(i=J(i,256)),(A&O1)!=0&&P<t.g&&f0(t.q,P)&&(i=J(i,512)),(A&Gn)!=0&&(t.v[P]&je)!=0&&(i=J(i,Qe)),o=0;z(i,y[o])<0;)++o;for(L=D;L>o;L--)y[L]=y[L-1];y[o]=i,++s;}for(s>4&&(s=4),n=0,Q=0;Q<s;Q++)n=Wt(n,11),n=J(n,y[Q]);if(n=Wt(n,15),Ro[t.D[e]]==-1)throw At(new H1(Y6+t.D[e]));if(n=J(n,Ro[t.D[e]]),(A&2)!=0?(T=t.q&&e<t.g?UA(t.q,e):0,T>9&&(T=9),T>2&&(T-=2),n=J(n,T<<4)):(A&1)!=0&&(t.v[e]&8)!=0&&(n=J(n,64)),(A&4)!=0&&e<t.g&&f0(t.q,e)&&(n=J(n,Qe)),(A&8)!=0&&(t.v[e]&S0)!=0&&(n=J(n,O1)),(A&16)!=0&&(t.v[e]&je)!=0&&(n=J(n,S0)),(A&S0)!=0&&(GX(t,e)&&(n=J(n,je)),u1t(t,e))){for(f=0;f<t.g;f++)if(w$(t,f)){n=J(n,Gn);break;}}return (A&je)!=0&&(h=P6(t,e,10),n=J(n,Wt(h,7))),n;}function d6(t,e){Zs();var A,n,P,f,D,Q,L,y,l,h,T,g,k,v,b,R,C,S,N,tt,H,Y;if(S=t.e,l=t.d,P=t.a,S==0)switch(e){case 0:return "0";case 1:return "0.0";case 2:return "0.00";case 3:return "0.000";case 4:return Ey;case 5:return "0.00000";case 6:return "0.000000";default:return R=new C0(),R.a+="0E",R.a+=-e,R.a;}if(v=l*10+1+7,b=c(Fr,re,6,v+1,15,1),A=v,l==1){if(f=P[0],f<0){Y=V(f,g1);do h=Y,Y=Sn(Y,10),b[--A]=48+Ot(Y1(h,yn(Y,10)))&d1;while(z(Y,0)!=0);}else {Y=f;do h=Y,Y=Y/10|0,b[--A]=48+(h-Y*10)&d1;while(Y!=0);}}else {N=c(F,m,6,l,15,1),H=l,PA(P,0,N,0,H);t:for(;;){for(C=0,Q=H-1;Q>=0;Q--)tt=at(Wt(C,32),V(N[Q],g1)),g=CY(tt),N[Q]=Ot(g),C=Ot(O0(g,32));k=Ot(C),T=A;do b[--A]=48+k%10&d1;while((k=k/10|0)!=0&&A!=0);for(n=9-T+A,D=0;D<n&&A>0;D++)b[--A]=48;for(L=H-1;N[L]==0;L--)if(L==0)break t;H=L+1;}for(;b[A]==48;)++A;}if(y=S<0,e==0)return y&&(b[--A]=45),PP(b,A,v-A);}function Ly(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y;if(f=O(t.H,e),n=t.o[A],n>f)return  false;if(Q=h0(t.H,e),r=h0(t.g,A),P=IA(t.g,A),D=IA(t.H,e),gt(V(r,1),0)){if(P!=null){if(gt(V(Q,1),0)){if(D==null||!Em(P,D))return  false;}else if(D!=null){if(CK(D,P))return  false;}else if(TF(X(t.H,e),P))return  false;}}else {if(gt(V(Q,1),0))return  false;if(P!=null){if(D!=null){if(!Em(D,P))return  false;}else if(!TF(X(t.H,e),P))return  false;}else if(D!=null||t.J[e]!=t.k[A])return  false;}if(gt(J(Q,r),0)){if(gt(V(r,O1),0)){if(t.H.L&&n0(V(Q,O1),0))return  false;if(n!=f)return  false;}if(gt(V(r,S0),0)&&n>=f&&n0(V(Q,S0),0))return  false;}if(gt(V(t.I[e],Zn(t.j[A])),0)||gt(V(t.B[A],Zn(t.M[e])),0))return  false;if(i=V(r,l9),t.H.L){if(o=V(r,l9),z(o,0)!=0&&(z(i,0)==0||gt(V(i,Zn(o)),0)))return  false;}else if(z(i,0)!=0&&n0(V(i,t.M[e]),0))return  false;return R1(t.g,A)!=0&&R1(t.g,A)!=R1(t.H,e)||ge(t.g,A)!=0&&ge(t.g,A)!=ge(t.H,e)||jA(t.g,A)!=0&&jA(t.g,A)!=jA(t.H,e)||(L=V(r,M2),z(L,0)!=0&&oa(t.H,e)!=Ot(O0(L,47))-7)?false:(s=V(r,lr),z(s,0)!=0?(s=O0(s,22),t.H.L?(y=Ot(O0(V(h0(t.H,e),lr),22)),Ot(s)==y):Or(t.H,e)==Ot(s)):true);}function Xtt(t,e){var A,n,P,r,i,f,D,Q;if(A=0,i=0,r=e.length,f=null,Q=new Vr(),i<r&&(zt(i,e.length),e.charCodeAt(i)==43)&&(++i,++A,i<r&&(zt(i,e.length),e.charCodeAt(i)==43||(zt(i,e.length),e.charCodeAt(i)==45))))throw At(new _P(b2+e+'"'));for(;i<r&&(zt(i,e.length),e.charCodeAt(i)!=46)&&(zt(i,e.length),e.charCodeAt(i)!=101)&&(zt(i,e.length),e.charCodeAt(i)!=69);)++i;if(Q.a+=""+(Mt(A,i,(e??y9).length),(e??y9).substr(A,i-A)),i<r&&(zt(i,e.length),e.charCodeAt(i)==46)){for(++i,A=i;i<r&&(zt(i,e.length),e.charCodeAt(i)!=101)&&(zt(i,e.length),e.charCodeAt(i)!=69);)++i;t.e=i-A,Q.a+=""+(Mt(A,i,(e??y9).length),(e??y9).substr(A,i-A));}else t.e=0;if(i<r&&(zt(i,e.length),e.charCodeAt(i)==101||(zt(i,e.length),e.charCodeAt(i)==69))&&(++i,A=i,i<r&&(zt(i,e.length),e.charCodeAt(i)==43)&&(++i,i<r&&(zt(i,e.length),e.charCodeAt(i)!=45)&&++A),f=(Mt(A,r,e.length),e.substr(A,r-A)),t.e=t.e-L1(f,f1,Et),t.e!=Bt(t.e)))throw At(new _P("Scale out of range."));if(D=Q.a,D.length<16){if(t.f=(jc==null&&(jc=new RegExp("^[+-]?\\d*$","i")),jc.test(D)?parseInt(D,10):NaN),isNaN(t.f))throw At(new _P(b2+e+'"'));t.a=Hs(t.f);}else CT(t,new id(D));for(t.d=Q.a.length,P=0;P<Q.a.length&&(n=Xi(Q.a,P),!(n!=45&&n!=48));++P)--t.d;t.d==0&&(t.d=1);}function Zp(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T;for(this.j=t,n=0;n<t.i.g;n++)t.f[n]&&(t.o[n]==1||t.o[n]==2)&&(t.k[n]==1?this.a<=t.j[n]&&(this.a=1+t.j[n]):t.k[n]==2&&this.i<=t.j[n]&&(this.i=1+t.j[n]));for(this.b=this.a+this.i,this.e=j1(Pt,[c0,it],[12,6],16,[this.b+1,t.g.length+1],2),P=0;P<t.i.g;P++)t.f[P]&&(t.o[P]==1||t.o[P]==2)&&!t.e[P]&&(this.e[PF(this,P)][t.g.length]=true);for(D=0;D<t.g.length;D++)for(T=0;T<t.g[D].length;T++)A=t.g[D][T],t.f[A]&&(t.o[A]==1||t.o[A]==2)&&(this.e[PF(this,A)][D]=true);for(this.d=c(F,u0,7,this.b,0,2),Q=0;Q<t.g.length;Q++)for(y=1;y<this.b;y++)if(this.e[y][Q])for(l=0;l<y;l++)this.e[l][Q]&&(this.d[y]=uf(this.d[y],l),this.d[l]=uf(this.d[l],y));for(this.c=c(F,m,6,this.b+1,15,1),s=0;s<this.b;s++)this.e[s][t.g.length]?this.c[s]=-1:this.c[s]=-2;for(o=0;o<t.g.length;o++)if(this.e[this.b][o])for(L=0;L<this.b;L++)this.e[L][o]&&this.c[L]!=o&&(this.c[L]==-2?this.c[L]=o:this.c[L]=-3);for(e=0;e<this.b;e++)if(this.c[e]>=-1&&(r=c(F,m,6,this.b,15,1),AZ(this,r,e)))for(L=0;L<this.b;L++)r[L]!=0&&(this.c[L]=-3);for(f=0;f<t.g.length-1;f++)for(y=1;y<this.b;y++)if(this.e[y][f]&&this.c[y]!=-3){for(l=0;l<y;l++)if(this.e[l][f]&&this.c[l]!=-3&&(i=E$(this,y,l,f),i!=null)){for(h=0;h<i.length;h++)this.c[i[h]]=-3;__(this,i);break;}}}function Ztt(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt;for(t.e=c(Ut,Tt,6,t.d,15,1),n=c(Ut,Tt,6,t.d,15,1),Q=c(Ut,Tt,6,t.d,15,1),S=c(Ut,Tt,6,t.d,15,1),wt=c(Ut,Tt,6,t.d,15,1),k=c(Ut,Tt,6,t.d*t.d,15,1),L=0;L<t.d;L++)S[L]=t.i[L];for(f=ys(t,t.i),cj(t),N=0,s=0;s<t.d;s++)k[s*t.d+s]=1,wt[s]=-t.e[s],N+=t.i[s]*t.i[s];for(C=100*w.Math.max(w.Math.sqrt(N),t.d),Y=(q1(),E1(Date.now())),b=1;b<=e&&!t.f;b++){if(x=Ptt(t,t.i,f,wt,S,C),x<0)return 2;for(f=t.k,a=0,y=0;y<t.d;y++)wt[y]=S[y]-t.i[y],t.i[y]=S[y],W=w.Math.abs(wt[y])/w.Math.max(w.Math.abs(t.i[y]),1),W>a&&(a=W),n[y]=t.e[y];if(a<12e-8)return 0;for(D=cj(t),a=0,$=w.Math.max(t.k*D,1),l=0;l<t.d;l++)ht=w.Math.abs(t.e[l])*w.Math.max(w.Math.abs(t.i[l]),1),a=w.Math.max(a,ht),n[l]=t.e[l]-n[l];if(a/=$,a<A)return 0;for(P=0,i=0,tt=0,H=0,h=0;h<t.d;h++){for(v=h*t.d,Q[h]=0,j=0;j<t.d;j++)Q[h]+=k[v+j]*n[j];P+=n[h]*wt[h],i+=n[h]*Q[h],tt+=n[h]*n[h],H+=wt[h]*wt[h];}if(P>w.Math.sqrt(3e-8*tt*H)){for(P=1/P,r=1/i,T=0;T<t.d;T++)n[T]=P*wt[T]-r*Q[T];for(g=0;g<t.d;g++)for(v=g*t.d,j=g;j<t.d;j++)k[v+j]+=P*wt[g]*wt[j]-r*Q[g]*Q[j]+i*n[g]*n[j],k[j*t.d+g]=k[v+j];}for(o=0;o<t.d;o++)for(v=o*t.d,wt[o]=0,j=0;j<t.d;j++)wt[o]-=k[v+j]*t.e[j];if(et=E1(Date.now()),st=Y1(et,Y),ku(st,t.j)){for(R=new Zt(t.c);R.a<R.c.a.length;)_t(R),null.zd();Y=et;}}return 1;}function Wtt(t){var e,A,n,P,r,i,f,D,Q,o,L,s;for(e=0;t.a.length!=0;){if(t.a.length==1){if(t.e==1||t.e==0)break;if(t.e==2&&(t.a[0]==0||t.a[0]==180))break;if(t.e==3&&(t.a[0]==0||t.a[0]==90))break;}for(s=t.a[0]!=0&&(t.e==2||t.e==3)?-1:0,L=-1,o=Et,i=s;i<t.a.length;i++)D=i+1,A=i>=0?t.a[i]:-t.a[0],n=D<t.a.length?t.a[D]:t.e==1?t.a[0]+180:t.e==2?360-t.a[t.a[i]==180?i-1:i]:t.e==3?180-t.a[t.a[i]==90?i-1:i]:t.a[0]+360,o>n-A&&(o=n-A,L=i);if(o>15)break;r=L,f=r+1,r==-1?(e+=t.c[0],t.a[0]=0,t.c[0]=t.c[0]*2<<16>>16,t.d[0][0]=-t.d[0][1]):f<t.a.length?(Q=nQ(t,r,f,t.a[f]),Bf(t,Q,r,f,t.d[r][0],t.d[f][1])):t.e==1?(f=0,Q=nQ(t,r,f,t.a[f]+180),Q<=180?Bf(t,Q,r,f,t.d[r][0],t.d[f][1]+180):Bf(t,Q-180,f,r,t.d[f][0],t.d[r][1]-180)):t.e==2?(f=t.a[r]==180?r-1:r,t.a[r]<180?(e+=t.c[r],t.a[r]=180,t.c[r]=t.c[r]*2<<16>>16,t.d[r][1]=360-t.d[r][0]<<16>>16):(q1(),Q=nQ(t,r,f,t.a[f]),Bf(t,Q,f,r,t.d[f][0],t.d[r][1]))):t.e==3?(f=t.a[r]==90?r-1:r,t.a[r]<90?(e+=t.c[r],t.a[r]=90,t.c[r]=t.c[r]*2<<16>>16,t.d[r][1]=180-t.d[r][0]<<16>>16):(q1(),Q=nQ(t,r,f,t.a[f]),Bf(t,Q,f,r,t.d[f][0],t.d[r][1]))):(f=0,Q=nQ(t,r,f,t.a[f]+360),Q<=360?Bf(t,Q,r,f,t.d[r][0],t.d[f][1]+360):Bf(t,Q-360,f,r,t.d[f][0],t.d[r][1]-360));}if(e!=0)for(P=0;P<t.c.length;P++)t.c[P]=Bt(w.Math.round(100*t.c[P]/(100+e)))<<16>>16;}function Wp(t,e){var A,n,P,r,i,f,D,Q;if(D=0,t.L){switch(e<t.g&&Xh(t.q,e)?D=J(D,t4):e<t.g&&f0(t.q,e)&&(D=J(D,2)),Q=(P=t.v[e]&gn,P==0?0:P==Qe?2:P==O1?3:4),Q!=0&&(D=J(D,8),Q>2&&(D=J(D,16)),Q>3&&(D=J(D,32))),A=t.t[e],A<0?D=J(D,Sf):A>0&&(D=J(D,Ef)),i=t.k[e],i){case 0:break;case 1:D=J(D,q0);break;case 2:D=J(D,Ti);break;case 3:D=J(D,NP);break;default:D=J(D,If);}switch(n=TT(t,e),n){case 0:break;case 1:D=J(D,p2);break;case 2:D=J(D,dy);break;case 3:D=J(D,By);break;default:D=J(D,Do);}f=t.p[e],f>0&&(D=J(D,Gn)),f>1&&(D=J(D,g8));}else {switch(e<t.g&&Xh(t.q,e)?D=J(D,t4):e<t.g&&f0(t.q,e)?D=J(D,2):D=J(D,4),(t.v[e]&wn)!=0?D=J(D,eo):D=J(D,Ao),Q=(P=t.v[e]&gn,P==0?0:P==Qe?2:P==O1?3:4),Q==0?D=J(D,112):Q==2?D=J(D,104):Q==3?D=J(D,88):D=J(D,56),A=t.t[e],A==0?D=J(D,Po):A<0?D=J(D,Sf):D=J(D,Ef),r=t.e[e]-P0(t,e)+xt(t,e),r){case 0:D=J(D,1792);break;case 1:D=J(D,1664);break;case 2:D=J(D,1408);break;default:D=J(D,896);}switch(i=t.k[e],i){case 0:D=J(D,3932160);break;case 1:D=J(D,ro);break;case 2:D=J(D,j2);break;case 3:D=J(D,R2);break;default:D=J(D,If);}switch(n=TT(t,e),n){case 0:D=J(D,Ty);break;case 1:D=J(D,cy);break;case 2:D=J(D,wy);break;case 3:D=J(D,gy);break;default:D=J(D,Do);}switch(f=t.p[e],f){case 0:D=J(D,98304);break;case 1:D=J(D,81920);break;default:D=J(D,49152);}}return D;}function _p(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j;for(D=c(F,m,6,t.i.g,15,1),g=c(F,m,6,t.i.g,15,1),l=c(Pt,it,6,t.i.g,16,1),Q=c(Pt,it,6,t.i.g,16,1),k=new Md(t.i.g),D[0]=e,g[e]=A,g[A]=-2,k.a[e]=true,k.a[A]=true,r=0,o=0;r<=o;){if(i=D[r],g[i]==i){for(L=0;L<O(t.i,i);L++)if(n=_(t.i,i,L),!k.a[n]){if(EA(t.i,i,L)==2&&X(t.i,n)<10)D[++o]=n,g[n]=n,Q[n]=Q[i]||e0(t.i,n)==2,l[n]=Q[i]&&!l[i],k.a[n]=true;else if(Q[i]&&l[i]){if(v=gj(t,n,g[i],k.a),v==-1)return null;D[++o]=n,g[n]=v,g[v]=-2,Q[n]=false,k.a[n]=true,k.a[v]=true;}else if(LA(t.i,Nt(t.i,i,L))&&(D[++o]=n,g[n]=n,Q[n]=false,k.a[n]=true,(X(t.i,n)==6&&e0(t.i,n)==0||X(t.i,n)==7&&R1(t.i,n)==1||X(t.i,n)==14||X(t.i,n)==15&&O(t.i,n)>2||X(t.i,n)==16&&O(t.i,n)>2)&&O(t.i,n)>2)){for(f=false,h=1;h<O(t.i,n);h++)if(b=_(t.i,n,h),!k.a[b])for(T=0;T<h;T++)j=_(t.i,n,T),k.a[j]||ny(t,b,j)&&(D[++o]=b,g[b]=j,g[j]=-2,Q[b]=false,k.a[b]=true,k.a[j]=true,f=true);if(!f)return null;}}}else {for(P=c(Pt,it,6,O(t.i,i),16,1),s=0;s<O(t.i,i);s++)if(n=_(t.i,i,s),k.a[n])P[s]=g[n]==n;else for(h=0;h<O(t.i,n);h++)if(_(t.i,n,h)==g[i]){P[s]=true;break;}for(y=0;y<O(t.i,i);y++)if(P[y])if(n=_(t.i,i,y),k.a[n]){if(o1(t.i,n,g[i])==-1)return null;}else D[++o]=n,g[n]=n,l[n]=false,Q[n]=true,k.a[n]=true;for(L=0;L<O(t.i,i);L++)if(!P[L]&&(n=_(t.i,i,L),!k.a[n])){if(v=gj(t,n,g[i],k.a),v==-1)return null;D[++o]=n,g[n]=v,g[v]=-2,Q[n]=false,k.a[n]=true,k.a[v]=true;}}++r;}return k;}function _tt(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h;switch(s=t.X,t.X=0,s){case 1:if(l=tn(t.V,t.ib,t.lb),l!=-1&&Le(t.V,l)==8)return;K1(t),t.e==-1&&(t.e=te(t.V,t.hb,t.kb,0)),l==-1&&(l=te(t.V,t.ib,t.lb,0)),t.e!=-1&&l!=-1&&(P=Ae(t.V,t.e)||Ae(t.V,l)?16:1,t.w==6&&(P=257),t.w==23&&(P=129),rj(t.V,t.e,l,P)),t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true));break;case 2:if(K1(t),t.q>0&&(t.e==-1&&(t.e=te(t.V,t.hb,t.kb,0)),t.n[0]==-1&&(t.n[0]=te(t.V,t.o[0],t.p[0],0)),t.n[0]!=-1&&uL(t.V,t.e,t.n[0])),t.q>1)for(f=1;f<t.q;f++)t.n[f]==-1&&(t.n[f]=te(t.V,t.o[f],t.p[f],0)),t.n[f]!=-1&&uL(t.V,t.n[f-1],t.n[f]);t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true));break;case 3:case 4:case 7:t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true));break;case 10:t.eb=w.Math.max(t.eb,3),P1(t.k);break;case 5:case 6:for(y=false,i=0;i<t.V.r;i++)if(t.P[i]!=i0(t.V,i)){y=true;break;}P1(t.k),y&&N1(t,new x1(t,2,true));break;case 8:if(L=false,n=t.t,n!=-1&&t.V.L&&ye(t.V,n)&&(n=-1),Q=M1(t.V,t.e),n==-1){if(K1(t),Q!=0){for(L=true,h=false,e=0;e<t.V.g;e++)M1(t.V,e)==Q&&(h=h|Fn(t.V,e),tA(t.V,e,0,false));xo&&!h&&mQ(t);}}else {if(K1(t),L=true,h=false,t.e==n)for(D=M1(t.V,t.e),e=0;e<t.V.g;e++)M1(t.V,e)==D&&(h=h|Fn(t.V,e),tA(t.V,e,0,false));else {for(o=M1(t.V,n),A=0;A<t.V.g;A++)(M1(t.V,A)==Q||M1(t.V,A)==o)&&tA(t.V,A,0,false);for(r=1,e=0;e<t.V.g;e++)M1(t.V,e)==r&&(++r,e=-1);tA(t.V,t.e,r,false),tA(t.V,n,r,false);}xo&&!h&&mQ(t);}L&&EL(t,w.Math.max(t.eb,1)),P1(t.k);}}function $tt(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b;if(v=pA(t.hb,t.kb,t.ib,t.lb),g=t.ib-t.hb,k=t.lb-t.kb,L=t.q,s=0,l=0,y=0,h=0,L>0&&(s=Ot(E1(w.Math.round(t.o[0]))),l=Ot(E1(w.Math.round(t.p[0])))),L>1&&(y=Ot(E1(w.Math.round(t.o[1]))),h=Ot(E1(w.Math.round(t.p[1])))),D=0,t.e==-1||Le(t.V,t.e)==0)D=fA*$9(E1(w.Math.round(v*3/l1)));else if(Le(t.V,t.e)==1)A=_0(t.V,_(t.V,t.e,0),t.e),n=A-fA,P=A+fA,D=w.Math.abs(Ze(v,n))<w.Math.abs(Ze(v,P))?n:P;else {for(r=c(Ut,Tt,6,Le(t.V,t.e),15,1),o=0;o<Le(t.V,t.e);o++)r[o]=_0(t.V,t.e,_(t.V,t.e,o));for(r.sort(pe(ki.prototype.ld,ki,[])),Q=0;Q<r.length;Q++){if(T=Q==0?r[r.length-1]-m0:r[Q-1],T<v&&v<r[Q]){D=(r[Q]+T)/2;break;}if(T<v-m0&&v-m0<r[Q]){D=(r[Q]+T)/2;break;}}}if(e=Qn(t.V,24*t.ab),t.q=w.Math.abs(Ze(v,D))>fA?0:Bt(w.Math.sqrt(g*g+k*k)/e),t.q>0){for((t.o==null||t.o.length<t.q)&&(t.o=c(Ut,Tt,6,t.q,15,1),t.p=c(Ut,Tt,6,t.q,15,1)),i=c(Ut,Tt,6,2,15,1),f=c(Ut,Tt,6,2,15,1),b=Ze(v,D)<0?D-fA:D+fA,i[0]=e*w.Math.sin(D),f[0]=e*w.Math.cos(D),i[1]=e*w.Math.sin(b),f[1]=e*w.Math.cos(b),o=0;o<t.q;o++)t.o[o]=(o==0?t.hb:t.o[o-1])+i[o&1],t.p[o]=(o==0?t.kb:t.p[o-1])+f[o&1];for(t.n=c(F,m,6,t.q,15,1),Q=0;Q<t.q;Q++)t.n[Q]=tn(t.V,t.o[Q],t.p[Q]),t.n[Q]!=-1&&(t.o[Q]=mt(t.V,t.n[Q]),t.p[Q]=Rt(t.V,t.n[Q]));}return L!=t.q||t.q!=0&&(s!=Ot(E1(w.Math.round(t.o[0])))||l!=Ot(E1(w.Math.round(t.p[0]))))||t.q>1&&(y!=Ot(E1(w.Math.round(t.o[1])))||h!=Ot(E1(w.Math.round(t.p[1]))));}function att(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt;for(st=new n1(),g=new Zt(t.g);g.a<g.c.a.length;)if(T=_t(g),T.g!=-1&&(v=o1(t.k,T.a,T.g),!oi(t.k,v)&&!A8(t.k,v)&&(ze(t.k,v)==1||ze(t.k,v)==2))){if($=G(t.g,t.q[T.g]),A=c(F,m,6,O(t.k,T.a)+O(t.k,$.a)-2,15,1),S=0,a=false,$.g!=-1)A[S++]=$.b;else {for(b=-1,ht=-1,j=Et,N=0;N<O(t.k,$.a);N++)L=_(t.k,$.a,N),L!=T.a&&(b==-1?(b=N,j=t.q[L]):j<t.q[L]?ht=N:(ht=b,b=N));ht==-1?(Y=_(t.k,$.a,b),et=Nt(t.k,$.a,b),A[S++]=et|(cQ(t,$.a,Y)?dn:0)):(s=_(t.k,$.a,b),l=Nt(t.k,$.a,b),y=_(t.k,$.a,ht),h=Nt(t.k,$.a,ht),A[S++]=l|(cQ(t,$.a,s)?dn:0),A[S++]=h|(cQ(t,$.a,y)?0:dn));}if(O(t.k,$.a)==3&&$.g!=-1){for(N=0;N<O(t.k,$.a);N++)if(L=_(t.k,$.a,N),L!=$.g&&L!=T.a){n=Nt(t.k,$.a,N),A[S++]=n|(cQ(t,$.a,L)?dn:0),L<$.g&&(a=!a);break;}}for(ze(t.k,v)==2&&(a=!a),x=0;x<O(t.k,T.a);x++)if(D=_(t.k,T.a,x),D!=T.g){if(C=a,O(t.k,T.a)==3){for(H=0;H<O(t.k,T.a);H++)if(L=_(t.k,T.a,H),L!=T.g&&L!=D){L<D&&(C=!C);break;}}RU(t.k,v)&&(R=rx(t.d,v),t.n[R]||(t.n[R]=true,t.o[R]=C),t.o[R]&&(C=!C)),Q=o1(t.k,T.a,D),A[S++]=Q|(C^cQ(t,T.a,D)?0:dn);}st.a.push(A);}for(t.f=c(F,m,6,t.k.i,15,1),st.a.length!=0&&kT(t,cA(st,0),false);st.a.length!=0;){for(wt=st.a.length,x=st.a.length-1;x>=0;x--){for(A=(ee(x,st.a.length),st.a[x]),W=0,tt=false,o=false,r=A,i=0,f=r.length;i<f;++i)P=r[i],e=P&1073741823,t.f[e]!=0&&(k=(P&dn)!=0^t.f[e]==2,W==0?tt=k:tt!=k&&(o=true),++W);W!=0&&(A=cA(st,x),o||kT(t,A,tt));}wt==st.a.length&&kT(t,cA(st,0),false);}}function $p(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x;for(this.d=t,x=WQ(e,false,null),(x.g.a.length!=1||x.f.a.length!=1)&&q1(),x.c||bQ(x)||q1(),this.g=G(x.g,0),this.f=G(x.f,0),ut(this.g,1),ut(this.f,63),Q=new Ci(),this.c=c(F,m,6,this.g.g+1,15,1),this.c[0]=-1,n=0;n<this.g.g;n++)M1(this.g,n)!=0&&(this.c[M1(this.g,n)]=n);for(oZ(this,this.c),R=c(Pt,it,6,this.g.i,16,1),g=0;g<this.f.i;g++)h=K(this.f,0,g),T=K(this.f,1,g),s=M1(this.f,h),y=M1(this.f,T),s!=0&&y!=0&&(P=this.c[s],r=this.c[y],k=cu(this.f,g),j=o1(this.g,P,r),j==-1?tr(Q,new os(P,r,s,y,k)):((fe(this.g,j)&31)==0&&(C=cu(this.g,j),C!=k&&tr(Q,new os(P,r,s,y,k))),R[j]=true));for(D=0;D<this.g.i;D++)R[D]||(P=K(this.g,0,D),r=K(this.g,1,D),!ye(this.g,P)&&!ye(this.g,r)&&(s=M1(this.g,P),y=M1(this.g,r),(s!=0||y!=0)&&tr(Q,new os(P,r,s,y,-1))));for(this.k=px(Q,c(O1t,{487:1,4:1,5:1,11:1,8:1},149,0,0,1)),o=0,i=0;i<this.g.g;i++)M1(this.g,i)==0&&!ye(this.g,i)&&++o;for(this.j=c(F,m,6,o,15,1),o=0,f=0;f<this.g.g;f++)M1(this.g,f)==0&&!ye(this.g,f)&&(this.j[o++]=f);for(this.n=new n1(),L=c(Pt,it,6,this.f.g,16,1),A=0;A<this.f.g;A++)M1(this.f,A)==0&&!ye(this.f,A)&&!L[A]&&Ft(this.n,new lj(this.f,A,L));for(this.b=this.j.length==0&&this.n.a.length==0,this.a=c(F,m,6,0,15,1),l=0;l<this.f.g;l++)v=v0(this.f,l),(v==1||v==2)&&(b=this.c[M1(this.f,l)],b!=-1&&(S=v0(this.g,b),YY(this,l,this.c)==(S==v)&&(this.a=Mn(this.a,this.a.length+1),this.a[this.a.length-1]=b)));this.e=AX(this);}function B6(){B6=v1,ME=B(d(ft,1),Dt,2,6,["[N](-*)(-*)-*","[N](-*)=*","[N]#*","[N](-*)(=*)=* as in nitro","[N](=*)#* middle atom of azide","[N]1(-*)-*-*-1 3-membered ring","[NH](-*)-*","[NH]1-*-*-1 3-membered ring","[NH]=*","[NH2]-*","[N+](-*)(-*)(-*)-*","[N+](-*)(-*)=*","[N+](-*)#* N in isocyano","[NH+](-*)(-*)-*","[NH+](-*)=*","[NH2+](-*)-*","[NH2+]=*","[NH3+]-*","[n](:*):*","[n](:*)(:*):*","[n](-*)(:*):*","[n](=*)(:*):* as in pyridine-N-oxid","[nH](:*):*","[n+](:*)(:*):*","[n+](-*)(:*):*","[nH+](:*):*","[O](-*)-*","[O]1-*-*-1 3-membered ring","[O]=*","[OH]-*","[O-]-*","[o](:*):*","[S](-*)-*","[S]=*","[S](-*)(-*)=*","[S](-*)(-*)(=*)=*","[SH]-*","[s](:*):*","[s](=*)(:*):*","[P](-*)(-*)-*","[P](-*)=*","[P](-*)(-*)(-*)=*","[PH](-*)(-*)=*"]),qP=B(d(Oe,1),uA,6,15,[3.240000009536743,12.359999656677246,23.790000915527344,11.680000305175781,13.600000381469727,NV,12.029999732971191,21.940000534057617,23.850000381469727,26.020000457763672,0,NV,4.360000133514404,4.440000057220459,13.970000267028809,16.610000610351562,25.59000015258789,27.639999389648438,12.890000343322754,4.409999847412109,4.929999828338623,8.390000343322754,15.789999961853027,4.099999904632568,3.880000114440918,14.140000343322754,9.229999542236328,12.529999732971191,17.06999969482422,20.229999542236328,23.059999465942383,13.140000343322754,25.299999237060547,32.09000015258789,19.209999084472656,8.380000114440918,38.79999923706055,28.239999771118164,21.700000762939453,13.59000015258789,34.13999938964844,9.8100004196167,23.469999313354492]);}function ap(){ap=v1,mE=B(d(ft,1),Dt,2,6,["gkvt@@@@LddTTTrbTRTRTRRRRRRRRRRRRRrVRrIh\\IAaQxlY@gRHdJCJcRXlv_CfJx|A\\hRHejiLaQjTje^kSjtFcIhvXmVKMjt{lN{Kavy\\^wGjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjh@@vo@HBC@PhLN@bPhtFKCcpDbILaRhtzCIbsX\\nOO`JDbqDjSKdJeJmQjtz}Ahr[LVkMnpz\\nwGj{PBhBdBlBBBjBfBnBaBiBeBmBcBkBgBoB`bhbdblbbbjbfbnbabibebmbcbkbgbob`RhRdRlRbRjRfRnRaRiReRmRcRkRgRoR`rhrdrlrbrjrfrnrarirermrcrkrgror`JhJdJlJbJjJfJnJaJiJeJmJcJkJgJoJ`jhjdjljbjjjfjnjajijej` !BnkjyVwsVr|iQn|Q|goTZW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,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x;i=c(Ut,Tt,6,t.r,15,1);t:for(r=0;r<i.length;r++){switch(x=t.a[r],i[r]=0,x){case 32:case 72:for(Q=0;Q<t.e[r];Q++){for(g=t.j[r][Q],b=t.a[g],h=0,T=0,L=0;L<t.e[g];L++)k=t.j[g][L],t.D[k]==7&&t.e[k]+xt(t,k)==2&&!(k<t.g&&f0(t.q,k))&&++h,(t.D[k]==8||t.D[k]==16)&&t.e[k]+xt(t,k)==1&&++T;if(t.D[g]==16&&T==2&&h==1&&(h=0),t.D[g]==6&&T>0){i[r]=T==1?-1:-(T-1)/T;continue t;}if(b==45&&T==3){i[r]=-0.3333333333333333;continue t;}if(b==25&&T>0){i[r]=T==1?0:-(T-1)/T;continue t;}if(b==18&&T>0){i[r]=h+T==2?0:-(h+T-2)/T;continue t;}if(b==73&&T>0){i[r]=T==1?0:-(T-1)/T;continue t;}if(b==77&&T>0){i[r]=-1/T;continue t;}}break;case 76:for(C=0,S=(ut(t,7),t.q),R=0;R<S.j.a.length;R++)if(wA(S,R,r)){C=R;break;}if(C<S.j.a.length){for(l=0,A=G(S.j,C),n=0,P=A.length;n<P;++n)e=A[n],e>-1&&t.a[e]==76&&++l;if(l>0){i[r]=-1/l;continue t;}}break;case 55:case 56:case 81:for(i[r]=t.t[r],y=1,j=0,f=c(Pt,it,6,t.r,16,1),f[r]=true;y>j;)for(j=y,o=0;o<t.r;o++)if(f[o]){for(L=0;L<t.e[o];L++)if(g=t.j[o][L],b=t.a[g],!(b!=57&&b!=80))for(s=0;s<t.e[g];s++)k=t.j[g][s],v=t.a[k],!(v!=55&&v!=56&&v!=81)&&(f[k]||(f[k]=true,i[r]+=t.t[k],++y));}i[r]/=y;continue t;case 61:for(D=0;D<t.e[r];D++)if(g=t.j[r][D],t.a[g]==42){i[r]=1;continue t;}continue t;case 34:case 49:case 51:case 54:case 58:case 92:case 93:case 94:case 97:i[r]=1;continue t;case 87:case 95:case 96:case 98:case 99:i[r]=2;continue t;case 88:i[r]=3;continue t;case 35:case 62:case 89:case 90:case 91:i[r]=-1;continue t;}i[r]=0;}return i;}function e1t(t,e,A){var n,P,r,i;for(t.u=e,t.a=A,n=Bt(w.Math.round((Re==-1&&(Re=globalThis.devicePixelRatio||1),Re*8))),P=B(d(F,1),m,6,15,[n,-1,-2,-2,n]),i=B(d(F,1),m,6,15,[n,-2,n,-2,-2,-2,-2,-2,-2,-2,n,-2,n,-2,n,-2,n,-2,2*n,-2,n/2|0,-2,n/2|0,-2,2*n]),iL(t.s,P,i),ke(t.s,he(t.s,"Desired Bond type(s):"),1,1,3,1),t.k=Un(t.s,"Single"),ke(t.s,t.k,1,3,3,3),t.c=Un(t.s,"Double"),ke(t.s,t.c,1,4,3,4),t.n=Un(t.s,"Triple"),ke(t.s,t.n,1,5,3,5),t.i=Un(t.s,"Quadruple"),ke(t.s,t.i,1,6,3,6),t.j=Un(t.s,"Quintuple"),ke(t.s,t.j,1,7,3,7),t.b=Un(t.s,"Delocalized"),ke(t.s,t.b,1,8,3,8),t.g=Un(t.s,"Coordinate (0-order)"),ke(t.s,t.g,1,9,3,9),t.q=TA(t.s),Gt(t.q,"any ring state"),Gt(t.q,YV),Gt(t.q,"is any ring bond"),Gt(t.q,"is non-aromatic ring bond"),Gt(t.q,"is aromatic bond"),Gt(t.q,"is any non-aromatic bond"),YP(t.q,t),ke(t.s,t.q,1,11,3,11),t.r=TA(t.s),Gt(t.r,"any ring size"),Gt(t.r,"is in 3-membered ring"),Gt(t.r,"is in 4-membered ring"),Gt(t.r,"is in 5-membered ring"),Gt(t.r,"is in 6-membered ring"),Gt(t.r,"is in 7-membered ring"),Gt(t.r,"smallest ring 8 to 11"),Gt(t.r,"smallest ring >= 12"),ke(t.s,t.r,1,13,3,13),t.e=Un(t.s,"Match formal bond order"),yA(t.e,(e.H[A]&Nf)!=0),YP(t.e,t),ke(t.s,t.e,1,15,3,15),t.f=Un(t.s,"Match Stereo Configuration"),yA(t.f,(e.H[A]&F8)!=0),YP(t.f,t),ke(t.s,t.f,1,17,3,17),t.d=Un(t.s,"Is atom bridge between"),YP(t.d,t),ke(t.s,t.d,1,19,3,19),t.p=TA(t.s),r=0;r<16;r++)Gt(t.p,""+r);D0(t.s,t.p,2,21),D0(t.s,he(t.s," and"),3,21),YP(t.p,t),t.o=TA(t.s),wT(t,0),D0(t.s,t.o,2,23),D0(t.s,he(t.s," atoms"),3,23),ut(t.u,7),Ta(t);}function A1t(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S;for(k=c(Pt,it,6,t.R.g,16,1),v=c(Pt,it,6,t.R.i,16,1),e=0,j=false,(t.Q&128)!=0&&(t.Y=c(F,m,6,t.R.g,15,1),t.X=c(F,m,6,t.R.i,15,1)),n=0;n<t.R.g;n++)t.W[n]&&(t.fb[n]||Qy(t,n,1)&&(t.fb[n]=true,k[n]=true,++e));for(r=0;r<t.R.i;r++)t.V[r]&&(t.p[r]||$Q(t,r,1)&&(t.p[r]=true,v[r]=true,++e));if(e==1){for(A=0;A<t.R.g;A++)if(k[A]){t.db[A]=0;break;}for(P=0;P<t.R.i;P++)if(v[P]){t.o[P]=0;break;}}else if(e>1)for(h$(t),t.T=0,f=new Zt(t.A);f.a<f.c.a.length;){for(i=_t(f),b=0,R=0,o=0,Q=0,L=-1,D=-1,l=0;l<i.a.length;l++)k[i.a[l]]&&(++b,(t.db[i.a[l]]==1||t.db[i.a[l]]==2)&&(++R,j=true,L<t.f[i.a[l]]&&(L=t.f[i.a[l]],o=i.a[l])));for(h=0;h<i.b.length;h++)v[i.b[h]]&&(++b,C=t.f[K(t.R,0,i.b[h])],S=t.f[K(t.R,1,i.b[h])],s=C>S?(C<<16)+S:(S<<16)+C,(t.o[i.b[h]]==1||t.o[i.b[h]]==2)&&(++R,j=true,D<s&&(D=s,Q=i.b[h])));if(b!=0)if(b==1){for(T=0;T<i.a.length;T++)k[i.a[T]]&&(t.db[i.a[T]]=0);for(y=0;y<i.b.length;y++)v[i.b[y]]&&(t.o[i.b[y]]=0);}else if(R==1){for(T=0;T<i.a.length;T++)k[i.a[T]]&&(t.db[i.a[T]]=3);for(y=0;y<i.b.length;y++)v[i.b[y]]&&(t.o[i.b[y]]=3);}else {if((t.Q&128)!=0){for(++t.T,T=0;T<i.a.length;T++)k[i.a[T]]&&(t.Y[i.a[T]]=t.T);for(y=0;y<i.b.length;y++)v[i.b[y]]&&(t.X[i.b[y]]=t.T);}if(g=false,L!=-1?t.db[o]==2&&(g=true):t.o[Q]==2&&(g=true),g){for(T=0;T<i.a.length;T++)if(k[i.a[T]])switch(t.db[i.a[T]]){case 1:t.db[i.a[T]]=2;break;case 2:t.db[i.a[T]]=1;}for(y=0;y<i.b.length;y++)if(v[i.b[y]])switch(t.o[i.b[y]]){case 1:t.o[i.b[y]]=2;break;case 2:t.o[i.b[y]]=1;}}}}return j;}function n1t(t,e,A,n,P,r,i,f){var D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt;for(et=G(t.j,e),L=et,s=0,y=L.length;s<y;++s)if(o=L[s],!cZ(t,o))return  true;for(W=G(t.k,e),$=W.length,h=0,Q=0,rt=false,C=0;C<$;C++)h<<=1,Q<<=1,dt(t.i,W[C])>1||c1(t.i,W[C])==8?h|=1:f&&Gs(t,W[C])?(h|=1,Q|=1):(D=A[e][C],D!=-1&&(n[D]?P[D]&&(h|=1,r[D]||(Q|=1)):rt=true));switch(j=false,$){case 3:for(T=B(d(F,1),m,6,15,[2,1,4]),j=true,b=0;b<3;b++)(h&T[b])==T[b]&&(X(t.i,et[b])==6&&R1(t.i,et[b])==1||X(t.i,et[b])==5&&R1(t.i,et[b])==0)&&(P[e]=true,i[e]=b,(Q&T[b])==0&&(j=false));break;case 5:for(g=B(d(F,1),m,6,15,[10,5,18,9,20]),j=true,Y=0;Y<5;Y++)if((h&g[Y])==g[Y])switch(X(t.i,et[Y])){case 6:R1(t.i,et[Y])==-1&&(P[e]=true,i[e]=Y,(Q&g[Y])==0&&(j=false));break;case 7:R1(t.i,et[Y])<=0&&(P[e]=true,i[e]=Y);break;case 8:P[e]=true,i[e]=Y;break;case 16:case 34:case 52:O(t.i,et[Y])==2&&(P[e]=true,i[e]=Y);}break;case 6:j=true,(h&21)==21&&(P[e]=true,(Q&21)==0&&(j=false)),(h&42)==42&&(P[e]=true,(Q&42)==0&&(j=false));break;case 7:for(k=B(d(F,1),m,6,15,[42,21,74,37,82,41,84]),j=true,v=0;v<7;v++)if((h&k[v])==k[v]){if(X(t.i,et[v])==6&&(R1(t.i,et[v])==1||f&&DK(t,et[v]))||X(t.i,et[v])==5&&R1(t.i,et[v])==0)P[e]=true,i[e]=v,(Q&k[v])==0&&(j=false);else for(R=0;R<2;R++)if(st=(v+6+R)%7,a=W[st],ht=A[e][st],ht!=-1&&!P[ht]&&G(t.k,ht).length==5){for(wt=G(t.k,ht),S=0;wt[S]!=a;)++S;for(x=false,H=0,N=1;N<=4;N++){if(l=wt[(S+N)%5],tt=dt(t.i,l)>1||c1(t.i,l)==8||f&&Gs(t,l),tt&&x){H=0;break;}x=tt,x&&++H;}if(H==2){P[e]=true,P[ht]=true,r[e]=true,r[ht]=true,Ft(t.b,U1(a));break;}}}}return P[e]&&!j&&(r[e]=true),P[e]?true:!rt;}function P1t(t){var e,A,n,P,r,i,f,D,Q,o,L;for(ut(t,1),P=c(F,m,6,191,15,1),A=0;A<t.r;A++)switch(t.D[A]){case 171:P[1]+=5,P[6]+=3,P[7]+=1,P[8]+=1;break;case 172:P[1]+=12,P[6]+=6,P[7]+=4,P[8]+=1;break;case 173:P[1]+=6,P[6]+=4,P[7]+=2,P[8]+=2;break;case 174:P[1]+=5,P[6]+=4,P[7]+=1,P[8]+=3;break;case 175:P[1]+=5,P[6]+=3,P[7]+=1,P[8]+=1,P[16]+=1;break;case 176:P[1]+=8,P[6]+=5,P[7]+=2,P[8]+=2;break;case 177:P[1]+=7,P[6]+=5,P[7]+=1,P[8]+=3;break;case 178:P[1]+=3,P[6]+=2,P[7]+=1,P[8]+=1;break;case 179:P[1]+=7,P[6]+=6,P[7]+=3,P[8]+=1;break;case 181:case 180:P[1]+=11,P[6]+=6,P[7]+=1,P[8]+=1;break;case 182:P[1]+=12,P[6]+=6,P[7]+=2,P[8]+=1;break;case 183:P[1]+=9,P[6]+=5,P[7]+=1,P[8]+=1,P[16]+=1;break;case 184:P[1]+=9,P[6]+=9,P[7]+=1,P[8]+=1;break;case 185:P[1]+=7,P[6]+=5,P[7]+=1,P[8]+=1;break;case 186:P[1]+=5,P[6]+=3,P[7]+=1,P[8]+=2;break;case 187:P[1]+=7,P[6]+=4,P[7]+=1,P[8]+=2;break;case 188:P[1]+=10,P[6]+=11,P[7]+=2,P[8]+=1;break;case 189:P[1]+=9,P[6]+=9,P[7]+=1,P[8]+=2;break;case 190:P[1]+=9,P[6]+=5,P[7]+=1,P[8]+=1;break;case 1:switch(t.B[A]){case 0:case 1:++P[1];break;case 2:++P[151];break;case 3:++P[152];}break;default:++P[t.D[A]];}for(n=0;n<t.r;n++)t.D[n]>=171&&t.D[n]<=190?P[1]+=2-G1(t,n):P[1]+=xt(t,n);for(f=0,Q=1;Q<=190;Q++)P[Q]!=0&&++f;for(this.b=c(F,m,6,f,15,1),this.c=c(F,m,6,f,15,1),f=0,D=0;D<z2.length;D++)P[z2[D]]!=0&&(this.b[f]=P[z2[D]],this.c[f]=z2[D],++f,P[z2[D]]=0);for(;;){for(L="zzz",o=-1,i=1;i<=190;i++)P[i]>0&&a9(L,(J1(),a0)[i])>0&&(L=(J1(),a0)[i],o=i);if(o==-1)break;this.b[f]=P[o],this.c[f]=o,++f,P[o]=0;}for(this.a=0,this.d=0,e=0;e<t.g;e++)t.D[e]!=1&&t.B[e]!=0&&(i=t.D[e],r=t.B[e],this.a+=Fk(i,r)-X4[i],this.d+=Fk(i,r)-Z4[i]);}function r1t(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct,Xt,St,A1,Qt,bt,yt,Jt,S1,D1,Q1,Lt,pt,U0,V1,l0;for(l0=A[4],Jt=A[3]==-1?3:4,l=c(F,m,6,e.r,15,1),St=c(Pt,it,6,e.s,16,1),g=0;g<Jt;g++)St[n[g]]=true;for(y=Vj(e,l,St,false),h=c(F,m,6,y,15,1),Q=l,o=0,L=Q.length;o<L;++o)s=Q[o],++h[s];for(Qt=0,C=c(Pt,it,6,y,16,1),k=0;k<Jt;k++)s=l[A[k]],C[s]||(C[s]=true,++Qt);for(bt=c(F,m,6,Qt,15,1),yt=c(F,m,6,Qt,15,1),A1=c(F,m,6,Qt,15,1),R=0,D=0;D<y;D++)if(C[D]){for(bt[R]=D,yt[R]=h[D],v=0;v<Jt;v++)D==l[A[v]]&&++A1[R];++R;}if(S=c(Pt,it,6,e.r,16,1),D1=0,V1=2,Qt==Jt)for(Xt=-1,v=0;v<Jt-2;v++){for(Lt=-1,pt=Et,N=0;N<Qt;N++)N!=Xt&&yt[N]<pt&&(Lt=N,pt=yt[N]);for(P=0;P<e.r;P++)l[P]==bt[Lt]&&(S[P]=true,++D1);Xt=Lt;}else for(v=0;v<bt.length;v++){if(A1[v]==1&&Jt==3){for(x=2*yt[v]<e.r,x||(V1=1),P=0;P<e.r;P++)P!=l0&&l[P]==bt[v]==x&&(S[P]=true,++D1);break;}if(A1[v]==2&&Jt==4){for(x=2*yt[v]<e.r,P=0;P<e.r;P++)P!=l0&&l[P]==bt[v]==x&&(S[P]=true,++D1);break;}}if(D1==0){for(v=0;v<bt.length;v++)if(A1[v]==1){for(P=0;P<e.r;P++)l[P]==bt[v]&&(S[P]=true,++D1);break;}for(S1=Jt-2-(D1==0?0:1),b=0;b<S1;b++)for(N=0;N<Jt;N++)if(!S[A[N]]){S[A[N]]=true,++D1;break;}}for(R=0,t.a=c(F,m,6,D1,15,1),j=0;j<S.length;j++)S[j]&&(t.a[R++]=j);for(U0=0,Q1=0,t.c=c(F,m,6,V1,15,1),t.b=c(F,m,6,Jt-V1,15,1),T=0;T<Jt;T++)if(S[A[T]]){if(Q1>=t.b.length){for(q1(),""+new zh(e).a.a,H=A,$=0,wt=H.length;$<wt;++$);for(Y=n,a=0,rt=Y.length;a<rt;++a);for(et=l,st=0,ct=et.length;st<ct;++st);for(tt=C,W=0,ht=tt.length;W<ht;++W);for(r=S,i=0,f=r.length;i<f;++i);}t.b[Q1++]=A[T];}else t.c[U0++]=A[T];}function i1t(t,e){var A;switch(t.D[e]){case 7:if(e<t.g&&f0(t.q,e)){if(t.t[e]==0){if(t.e[e]-P0(t,e)+xt(t,e)==0){if(P0(t,e)==2)return 18;for(A=0;A<P0(t,e);A++)if(!eA(t,t.n[e][A]))return 20;return 19;}else return 22;}else if(t.t[e]==1)if(t.e[e]-P0(t,e)+xt(t,e)==0){for(A=0;A<P0(t,e);A++)if(!eA(t,t.n[e][A]))return R1(t,t.j[e][A])<0?21:24;return 23;}else return 25;}else if(t.t[e]==0)switch(t.e[e]-P0(t,e)+xt(t,e)){case 0:switch(t.p[e]){case 0:return (t.q&&e<t.g?UA(t.q,e):0)==3?5:0;case 1:return 1;case 2:return 2;}break;case 1:switch(t.p[e]){case 0:return (t.q&&e<t.g?UA(t.q,e):0)==3?7:6;case 1:return 8;}break;case 2:return 9;}else if(t.t[e]==1)switch(t.e[e]-P0(t,e)+xt(t,e)){case 0:switch(t.p[e]){case 0:return 10;case 1:return IF(t,e)?3:11;case 2:return t.o[e][0]==2?IF(t,e)?4:qP.length+1:12;}break;case 1:switch(t.p[e]){case 0:return 13;case 1:return 14;}break;case 2:return t.p[e]==0?15:16;case 3:return 17;}return qP.length+1;case 8:if(e<t.g&&f0(t.q,e)){if(t.t[e]==0)return 31;}else {if(t.t[e]==0)return t.p[e]>0?28:P0(t,e)==1?29:(t.q&&e<t.g?UA(t.q,e):0)==3?27:26;if(t.t[e]==-1)return P0(t,e)==1&&R1(t,t.j[e][0])>0?28:30;}return qP.length+1;case 15:if(t.t[e]==0){if(t.e[e]-P0(t,e)+xt(t,e)==0){if(P0(t,e)==3&&t.p[e]==0)return 39;if(P0(t,e)==2&&t.p[e]==1)return 40;if(P0(t,e)==4&&t.p[e]==1)return 41;}else if(t.e[e]-P0(t,e)+xt(t,e)==1&&P0(t,e)==3&&t.p[e]==1)return 42;}return qP.length+1;case 16:if(t.t[e]==0){if(e<t.g&&f0(t.q,e))return P0(t,e)==2?37:38;if(t.e[e]-P0(t,e)+xt(t,e)==0){if(P0(t,e)==2&&t.p[e]==0)return 32;if(P0(t,e)==1&&t.p[e]==1)return 33;if(P0(t,e)==3&&t.p[e]==1)return 34;if(P0(t,e)==4&&t.p[e]==2)return 35;}else if(t.e[e]-P0(t,e)+xt(t,e)==1&&P0(t,e)==1)return 36;}return qP.length+1;}return qP.length;}function f1t(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct,Xt,St,A1,Qt;for(ut(t.k,1),t.g=c(Pt,it,6,t.k.i,16,1),t.c=0,L=0;L<t.k.i;L++)c1(t.k,L)==8&&(g0(t.k,L,1),t.g[L]=true,++t.c);for(v=c(Pt,it,6,t.k.g,16,1),Qt=new gU(t.k,3),k=c(Pt,it,6,Qt.j.a.length,16,1),ct=0;ct<Qt.j.a.length;ct++){for(St=G(Qt.j,ct),k[ct]=true,C=St,N=0,Y=C.length;N<Y;++N)if(j=C[N],!W0(t.k,j)){k[ct]=false;break;}if(k[ct]){for(S=St,tt=0,et=S.length;tt<et;++tt)j=S[tt],v[j]=true;for(A1=G(Qt.k,ct),R=A1,x=0,H=R.length;x<H;++x)j=R[x],t.g[j]||(t.g[j]=true,++t.c);}}for(s=0;s<t.k.i;s++)!t.g[s]&&(Qt.c[s]&d1)!=0&&W0(t.k,K(t.k,0,s))&&W0(t.k,K(t.k,1,s))&&p$(t,s);for(y=0;y<t.k.i;y++)t.g[y]||(r=K(t.k,0,y),i=K(t.k,1,y),!v[r]&&!v[i]&&W0(t.k,r)&&W0(t.k,i)&&(t.g[y]=true,++t.c));for(ut(t.k,7),(t.q==2||t.q==1&&t.p)&&GZ(t),g=c(Pt,it,6,t.k.i,16,1),t.k.i>=0&&PA(t.g,0,g,0,t.k.i),Xt=0;Xt<Qt.j.a.length;Xt++)if(k[Xt]){for(St=G(Qt.j,Xt),$=St,a=0,st=$.length;a<st;++a)if(W=$[a],!GW(t,W))for(W0(t.k,W)&&(Wn(t.k,W,false),--t.b),j=0;j<O(t.k,W);j++)h=Nt(t.k,W,j),t.g[h]&&(t.g[h]=false,--t.c);}for(M5(t),rt=0;rt<Qt.j.a.length;rt++)if(k[rt]&&G(Qt.k,rt).length==6){for(A1=G(Qt.k,rt),b=true,D=A1,Q=0,o=D.length;Q<o;++Q)if(f=D[Q],!t.g[f]){b=false;break;}b&&(MQ(t,A1[0]),MQ(t,A1[2]),MQ(t,A1[4]),M5(t));}for(wt=5;wt>=4;wt--)do for(ht=false,f=0;f<t.k.i;f++)if(t.g[f]){for(n=0,T=0;T<2;T++)for(l=K(t.k,T,f),j=0;j<O(t.k,l);j++)t.g[Nt(t.k,l,j)]&&++n;if(n==wt){MQ(t,f),M5(t),ht=true;break;}}while(ht);for(;t.b>=2&&N$(t,g););if(e){if(t.b!=0)for(P=0;P<t.k.g;P++)W0(t.k,P)&&(Wn(t.k,P,false),w1(t.k,P,2,true),--t.b,A=true);if(t.c!=0)for(f=0;f<t.k.i;f++)t.g[f]&&(t.g[f]=false,g0(t.k,f,8),--t.c,A=true);}else for(P=0;P<t.k.g;P++)W0(t.k,P)&&xt(t.k,P)!=0&&(Wn(t.k,P,false),Je(t.k,P,32),--t.b);if(t.q==0||t.q==1&&!A){if(t.b!=0)throw At(new H1(jM));if(t.c!=0)throw At(new H1(jM));}}function k2(){k2=v1,JA=B(d(Oe,1),uA,6,15,[1,ho,o4,2.119999885559082,1.9800000190734863,1.909999966621399,1.7699999809265137,Oy,1.5,U4,1.5800000429153442,2.5,2.509999990463257,2.25,2.190000057220459,L4,1.8899999856948853,GM,1.8300000429153442,2.7300000190734863,2.619999885559082,2.5799999237060547,OM,qM,qy,qy,s4,zM,zM,2.380000114440918,2.390000104904175,y4,l4,1.8799999952316284,GM,KM,2.25,3.2100000381469727,2.8399999141693115,2.75,2.5199999809265137,2.559999942779541,qy,s4,OM,s4,2.1500000953674316,JM,YM,2.430000066757202,qM,XM,1.9900000095367432,2.0399999618530273,2.059999942779541,3.4800000190734863,3.0299999713897705,2.9800000190734863,ZM,WM,2.950000047683716,WM,2.9000000953674316,_M,h4,$M,_M,aM,h4,$M,tC,2.740000009536743,2.630000114440918,JM,2.569999933242798,YM,2.4800000190734863,2.4100000858306885,l4,y4,qy,XM,2.5999999046325684,2.5399999618530273,2.5,2.5,2.5,2.5,2.5,tC,2.930000066757202,ZM,2.7100000381469727,2.819999933242798,aM,h4,eC,3.4000000953674316,eC,2.700000047683716]),Xf=B(d(Oe,1),uA,6,15,[.25,T4,.46000000834465027,AC,1.0199999809265137,To,.75,.7099999785423279,.6299999952316284,.6399999856948853,.9599999785423279,nC,PC,1.2599999904632568,c4,rC,1.0299999713897705,.9900000095367432,iC,fC,DC,1.4800000190734863,w4,uC,QC,1.190000057220459,c4,rC,1.100000023841858,ho,ho,oC,zy,zy,c4,1.1399999856948853,zy,UC,g4,d4,1.5399999618530273,LC,1.3799999952316284,sC,1.25,1.25,ho,PC,yC,U4,yo,yo,w4,AC,1.350000023841858,y4,fC,Ny,d4,lC,1.7400000095367432,hC,TC,Ky,cC,Ky,wC,Oy,B4,1.6399999856948853,co,gC,1.5199999809265137,U4,dC,1.309999942779541,BC,QC,1.2300000190734863,oC,1.4199999570846558,1.5,yC,1.5099999904632568,vC,LC,vC,2.2300000190734863,2.009999990463257,KM,1.75,cC,co,DC,TC,Oy,Oy,Ky,Ky,B4,wC,hC,lC,1.6100000143051147,FC,1.4900000095367432,o4,1.409999966621399,uC,BC,sC,zy,dC,w4,o4,gC,1.75,B4,FC]);}function D1t(t,e,A){var n,P,r,i,f,D,Q,o;switch(f=A.a.length,0<f?A.a=hA(A.a,0,0):0>f&&(A.a+=z8(c(Fr,re,6,-f,15,1))),D=h0(t.k,e),P=Ot(O0(V(D,yr),3)),P){case 20971520:A.a+="+0";break;case 25165824:R1(t.k,e)==0&&(A.a+="-");break;case 12582912:R1(t.k,e)==0&&(A.a+="+");}return n=V(D,ky),z(n,2)==0?A.a+=";a":z(n,4)==0&&(A.a+=";A"),r=V(D,uP),z(r,0)!=0&&(z(r,1792)==0?A.a+=";H0":z(r,1664)==0?A.a+=";H1":z(r,1408)==0?A.a+=";H2":z(r,896)==0?A.a+=";H3":z(r,128)==0?A.a+=";!H0":z(r,384)==0?A.a+=";!H0;!H1":z(r,1536)==0?A.a+=";!H2;!H3":z(r,Qe)==0&&(A.a+=";!H3")),o=V(D,120),z(o,8)==0?A.a+=";!R0":z(o,16)==0?A.a+=";!R1":z(o,32)==0?A.a+=";!R2":z(o,64)==0?A.a+=";!R3":z(o,112)==0?A.a+=";R0":z(o,104)==0?A.a+=";R1":z(o,88)==0?A.a+=";R2":z(o,56)==0&&(A.a+=";R3"),Q=V(D,l9),z(Q,w8)==0?A.a+=";!r"+Fe(Q):z(Q,lM)==0?A.a+=";r"+Fe(Q):z(Q,0)!=0&&(gt(V(Q,Vf),0)?(n0(V(Q,w8),0)&&(A.a+=";!r0"+Fe(Q)),n0(V(Q,h9),0)&&(A.a+=";!r3"+Fe(Q)),n0(V(Q,T9),0)&&(A.a+=";!r4"+Fe(Q)),n0(V(Q,c9),0)&&(A.a+=";!r5"+Fe(Q)),n0(V(Q,w9),0)&&(A.a+=";!r6"+Fe(Q)),n0(V(Q,g9),0)&&(A.a+=";!r7"+Fe(Q))):(A.a+=";",gt(V(Q,w8),0)&&(A.a+="r0,"+Fe(Q)),gt(V(Q,h9),0)&&(A.a+="r3,"+Fe(Q)),gt(V(Q,T9),0)&&(A.a+="r4,"+Fe(Q)),gt(V(Q,c9),0)&&(A.a+="r5,"+Fe(Q)),gt(V(Q,w9),0)&&(A.a+="r6,"+Fe(Q)),gt(V(Q,g9),0)&&(A.a+="r7,"+Fe(Q)),Ln(A,A.a.length-1))),z(Q,0)==0&&(Q=O0(V(D,lr),22),z(Q,0)!=0&&(A.a+=";r"+Fe(Q))),i=V(D,hi),z(i,ro)==0&&(A.a+=";D1"),z(i,j2)==0&&(A.a+=";D2"),z(i,R2)==0&&(A.a+=";D3"),z(i,io)==0&&(A.a+=";!D3;!D4"),z(i,KA)==0&&(A.a+=";!D4"),z(i,Ti)==0&&(A.a+=";!D0;!D1"),z(i,NP)==0&&(A.a+=";!D0;!D1;!D2"),z(i,If)==0&&(A.a+=";!D0;!D1;!D2;!D3"),gt(V(D,O1),0)&&q(A,";D"+O(t.k,e)),gt(V(D,S0),0)&&q(A,";!D"+O(t.k,e)),A.a.length==0?null:A.a;}function u1t(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C;if(t.D[e]!=7||t.t[e]!=0||t.k[e]+t.p[e]>3)return  false;if(e<t.g&&f0(t.q,e)){if(t.p[e]!=1||P6(t,e,7)!=1)return  false;for(b=(ut(t,7),t.q),k=0;k<b.j.a.length;k++)if(wA(b,k,e)){if(G(b.k,k).length==5||G(b.k,k).length==6){for(j=G(b.j,k),T=-1,D=0;D<j.length;D++)if(j[D]==e){T=D;break;}for(P=0,g=null,h=null,j.length==5&&(g=c(F,m,6,2,15,1),g[0]=j[T-1<0?T+4:T-1],g[1]=j[T-4<0?T+1:T-4],h=c(F,m,6,2,15,1),h[0]=j[T-2<0?T+3:T-2],h[1]=j[T-3<0?T+2:T-3]),j.length==6&&(g=c(F,m,6,3,15,1),g[0]=j[T-1<0?T+5:T-1],g[1]=j[T-3<0?T+3:T-3],g[2]=j[T-5<0?T+1:T-5],h=c(F,m,6,2,15,1),h[0]=j[T-2<0?T+4:T-2],h[1]=j[T-4<0?T+2:T-4]),Q=0;Q<j.length;Q++)e!=j[Q]&&t.D[j[Q]]==7&&t.p[j[Q]]==1&&--P;for(o=0;o<g.length;o++){for(r=-1,i=-1,l=0;l<t.k[g[o]];l++)if(!eA(t,t.n[g[o]][l])){r=t.j[g[o]][l],i=t.n[g[o]][l];break;}if(r!=-1){if(t.D[r]==7&&t.p[r]==0&&t.k[r]+t.p[r]<=3&&!d5(t,r,false)){++P;continue;}if(t.D[r]==8&&t.k[r]==1){P+=2;continue;}if(i<t.i&&Ee(t.q,i)){for(R=0;R<b.j.a.length;R++)if(b.e[R]&&wA(b,R,r)){for(v=G(b.j,R),y=0;y<v.length;y++)if(t.D[v[y]]==7&&t.p[v[y]]==1){--P;break;}break;}}}}for(L=0;L<h.length;L++){for(r=-1,y=0;y<t.k[h[L]];y++)eA(t,t.n[h[L]][y])||(r=t.j[h[L]][y]);t.D[h[L]]==6?r!=-1&&of(t,r)!=0&&--P:t.D[h[L]]==7&&t.p[h[L]]==0&&(r==-1||!(r<t.g&&f0(t.q,r))&&of(t,r)==0)&&++P;}return P>0;}break;}return  false;}if(t.p[e]>1)return  false;if(t.p[e]==1){for(s=-1,C=0,D=0;D<t.k[e];D++){if(n=t.j[e][D],t.o[e][D]==2){if(t.D[n]!=6)return  false;s=n;continue;}if(t.D[n]==8)return  false;if(t.D[n]==7){--C,d5(t,n,false)&&--C;continue;}n<t.g&&f0(t.q,n)&&--C;}if(s==-1)return  false;for(A=0,Q=0;Q<t.k[s];Q++)if(t.o[s][Q]==1){if(n=t.j[s][Q],of(t,n)!=0)return  false;n<t.g&&f0(t.q,n)&&++A,t.D[n]==7&&!d5(t,n,true)&&++C,(t.D[n]==8||t.D[n]==16)&&--C;}return A==2&&--C,C>=0;}for(f=0;f<t.k[e];f++)if(n=t.j[e][f],n<t.g&&f0(t.q,n)||t.D[n]!=6||of(t,n)!=0||t.p[n]!=0&&$J(t,n))return  false;return  true;}function v6(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st;if(X(t.R,A)!=X(t.R,n))return X(t.R,A)>X(t.R,n);if(ge(t.R,A)!=ge(t.R,n))return Y=hu(t.R,A)?(J1(),wr)[X(t.R,A)]:ge(t.R,A),et=hu(t.R,n)?(J1(),wr)[X(t.R,n)]:ge(t.R,n),Y>et;for(R=t.R.g,k=c(F,m,6,R,15,1),b=c(F,m,6,R,15,1),j=c(F,m,6,R,15,1),v=c(Pt,it,6,R,16,1),D=c(Pt,it,6,t.R.r,16,1),k[0]=e,k[1]=A,k[2]=n,b[0]=-1,b[1]=0,b[2]=0,D[e]=true,D[A]=true,D[n]=true,s=1,C=2,H=c(F,m,6,64,15,1),H[1]=1,H[2]=3,l=2;s<=C;){for(;s<H[l];){if(y=k[s],!v[s]){for(h=0,T=0,x=0;x<O(t.R,y);x++){if(o=_(t.R,y,x),C+EA(t.R,y,x)+1>=R&&(R+=t.R.g,k=CL(k,R),b=CL(b,R),j=CL(j,R),v=(st=c(Pt,it,6,R,16,1),PA(v,0,st,0,v.length),st)),Z8(t.R,Nt(t.R,y,x)))++h,T+=X(t.R,o);else if(o!=e)for(tt=1;tt<EA(t.R,y,x);tt++)++C,k[C]=o,b[C]=s,v[C]=true;if($=b[s],o!=k[$]){if(f=false,D[o])for(W=b[$];W!=-1;){if(o==k[W]){f=true;break;}W=b[W];}f?(++C,k[C]=o,b[C]=s,v[C]=true):(++C,k[C]=o,b[C]=s,D[o]=true);}}h!=0&&(++C,j[C]=(T<<2)/h|0,b[C]=s,v[C]=true);}if(++s,s==fP)throw At(new H1("Emergency break in while loop."));}for(H.length==l+1&&(H=CL(H,H.length+64)),H[l+1]=C+1,S=H[l];S<H[l+1];S++)j[S]==0&&(j[S]=(X(t.R,k[S])==151||X(t.R,k[S])==152?1:X(t.R,k[S]))<<2),j[S]+=j[b[S]]<<16;if(kR(t,v,j,b,k,H,l),j[1]!=j[2])return j[1]>j[2];l>1&&Kj(j,b,H,l),++l;}for(L=c(F,m,6,t.R.g,15,1),N=false,r=0;r<t.R.g;r++)if(D[r]&&!hu(t.R,r)){N=true;break;}if(N){for(i=0;i<t.R.g;i++)L[i]=hu(t.R,i)?(J1(),wr)[X(t.R,i)]:ge(t.R,i);if(A5(t,v,j,b,k,L,H,l))return j[1]>j[2];}for(zr(L,L.length,0),g=false,Q=0;Q<t.R.i;Q++)(D[K(t.R,0,Q)]||D[K(t.R,1,Q)])&&(t.i[Q]==1?(L[K(t.R,0,Q)]=1,L[K(t.R,1,Q)]=1,g=true):t.i[Q]==2&&(L[K(t.R,0,Q)]=2,L[K(t.R,1,Q)]=2,g=true));if(g&&A5(t,v,j,b,k,L,H,l))return j[1]>j[2];for(zr(L,L.length,0),a=false,P=0;P<t.R.g;P++)D[P]&&(t.$[P]==2?(L[P]=1,a=true):t.$[P]==1&&(L[P]=2,a=true));if(a&&A5(t,v,j,b,k,L,H,l))return j[1]>j[2];throw t.d=true,At(new H1("no distinction applying CIP rules"));}function F6(){F6=v1,af=B(d(F,2),u0,7,0,[B(d(F,1),m,6,15,[-1432180054,-1434146134,-1441453406,-1471067516,-1589095916,-2060839854,1420461386,1454022954,1454024874]),B(d(F,1),m,6,15,[-1431677611,-1431764987,-1432092655,-1433403327,-1438646015,-1459616762,-1543499750,-1879031702,1431634346,1073809066,1073814186,1073834666,1431677610]),B(d(F,1),m,6,15,[-1431737686,-1453057622,-1542187926,-1542188954,-1459351471,-1459351487,M4,1094713345,1077936134,-1879048186,-1543503866,-1543503846,-1459617766,C4,x2,x2]),B(d(F,1),m,6,15,[-1431737686,-1453057622,-1542187926,-1542188954,-1459351471,-1459351487,M4,1094713345,1077952518,-1879031802,-1543154682,-1543487462,-1459601382,C4,x2,x2]),B(d(F,1),m,6,15,[il,il,-1431741782,-1437330070,-1459351462,-1459351482,M4,-1858076671,-1874853882,-1879048186,-1543503866,-1543503846,-1459617766,C4,x2,x2]),B(d(F,1),m,6,15,[il,-1432005270,-1454374890,-1543503871,-1879048191,1073741825,1073741846,1073743210,-1795073366,1079421610,1147841194,-1783977302,fl,fl,-1498764630]),B(d(F,1),m,6,15,[il,-1432005270,-1454374890,-1543438335,-1878982655,1075138561,1073807382,1073808746,-1795073366,1079421610,1147841194,-1783977302,fl,fl,-1498764630]),B(d(F,1),m,6,15,[1431655786,Tr,Kf,Tr,Kf,Tr,Kf,Tr,Kf,Tr,Kf,Tr,1145324650]),B(d(F,1),m,6,15,[1431655786,Tr,Kf,Tr,Kf,Tr,1073758314,1073758250,1074091114,1073758250,1073758314,Tr,1145324650]),B(d(F,1),m,6,15,[-1432003926,-1437248086,1767548266,1437248090,1437248086,1433053846,1433037477,-1431672155,-1432004955,1433037477,1433037462,1437248086,1437248090,1767548266,-1437248086,-1432003926]),null]),xE=B(d(F,1),m,6,15,[1,7,7,5,8,7,8,7,8,7,2,14,2,14,0,0,0,0,8,8,0,0]),NE=B(d(F,1),m,6,15,[4,20,10,29,18,18,18,18,18,18,16,11,16,11,4,5,4,5,16,16,16,16,0,0,0,0,12,2]),GE=B(d(ft,1),Dt,2,6,["chain.png","eraser.png","hand.png","handPlus.png","fist.png","lasso.png","lassoPlus.png","rect.png","rectPlus.png","zoom.png","invisible.png",null,null,"pointingHand.png"]);}function Q1t(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v;if(L=false,t.R.L){for(Q=0;Q<t.R.i;Q++)if(fe(t.R,Q)!=0){L=true;break;}}for(t.O=2,A=0;A<t.R.g;A++)t.O=w.Math.max(t.O,O(t.R,A)+qi(t.R,A));for(D=w.Math.max(2,L?(62+t.c+t.O*(t.c+23))/63|0:(62+t.c+t.O*(t.c+5))/63|0),t.f=c(F,m,6,t.R.r,15,1),t.e=c(K4,H2,101,t.R.g,0,1),n=0;n<t.R.g;n++)t.e[n]=new xU(D);for(f=false,P=0;P<t.R.g;P++)AA(t.e[P],P),gt(V(h0(t.R,P),1),0)||IA(t.R,P)!=null?a1(t.e[P],8,6):a1(t.e[P],8,X(t.R,P)),a1(t.e[P],8,ge(t.R,P)),a1(t.e[P],2,e0(t.R,P)),a1(t.e[P],4,O(t.R,P)+qi(t.R,P)),gt(V(h0(t.R,P),1),0)?a1(t.e[P],4,8):a1(t.e[P],4,8+R1(t.R,P)),a1(t.e[P],5,w.Math.min(31,Or(t.R,P))),a1(t.e[P],4,pZ(t,P)+1),a1(t.e[P],2,jA(t.R,P)>>4),t.R.L&&(a1(t.e[P],51,h0(t.R,P)),IA(t.R,P)!=null&&(f=true));if(t.U=tP(t),t.U<t.R.g){for(e=0;e<t.R.g;e++){for(AA(t.e[e],e),a1(t.e[e],t.c,t.f[e]),s=c(F,m,6,O(t.R,e),15,1),l=0;l<O(t.R,e);l++)s[l]=t.f[_(t.R,e,l)]<<5,s[l]|=w.Math.min(31,z9(t.R,Nt(t.R,e,l)));for(s.sort(pe(Q0.prototype.ld,Q0,[])),h=t.O;h>s.length;h--)a1(t.e[e],t.c+5,0);for(y=s.length-1;y>=0;y--)a1(t.e[e],t.c+5,s[y]);}t.U=tP(t);}if(f&&t.U<t.R.g){for(e=0;e<t.R.g;e++){for(AA(t.e[e],e),a1(t.e[e],t.c,t.f[e]),i=IA(t.R,e),k=i==null?0:w.Math.min(12,i.length),l=12;l>k;l--)a1(t.e[e],8,0);for(y=k-1;y>=0;y--)a1(t.e[e],8,i[y]);}t.U=tP(t);}if(L&&t.U<t.R.g){for(e=0;e<t.R.g;e++){for(AA(t.e[e],e),a1(t.e[e],t.c,t.f[e]),o=c(XA,re,6,O(t.R,e)+qi(t.R,e),14,1),T=0,l=0;l<Le(t.R,e);l++)(l<O(t.R,e)||l>=Ct(t.R,e))&&(o[T]=t.f[_(t.R,e,l)],o[T]=Wt(o[T],23),o[T]=J(o[T],fe(t.R,Nt(t.R,e,l))),++T);for(o.sort(pe($l.prototype.md,$l,[])),h=t.O;h>o.length;h--)a1(t.e[e],t.c+23,0);for(y=o.length-1;y>=0;y--)a1(t.e[e],t.c+23,o[y]);}t.U=tP(t);}if((t.Q&8)!=0&&t.U<t.R.g){for(g=new ou(),r=0;r<t.R.g;r++)eP(t.R,r)!=null&&Ns(g,eP(t.R,r));for(e=0;e<t.R.g;e++)v=eP(t.R,e)==null?0:1+T5(g,eP(t.R,e)),AA(t.e[e],e),a1(t.e[e],t.c,t.f[e]),a1(t.e[e],t.c,v);t.U=tP(t);}if((t.Q&16)!=0&&t.U<t.R.g){for(e=0;e<t.R.g;e++)AA(t.e[e],e),a1(t.e[e],t.c,t.f[e]),a1(t.e[e],1,i0(t.R,e)?1:0);t.U=tP(t);}(t.Q&512)!=0&&t.R.L&&eW(t);}function o1t(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k;if(e.j==1){if(t.t!=-1&&t.i.a.length!=0&&Dy(t,t.i.a),Ln(t.i,0),e.e){dR(t);return;}if(e.b==1){if(e.c==2)return;t.W=true,or(t),F1t(t,e);}}if(e.j==2){if(e.e){dR(t);return;}e.b==1&&(t.W=false,or(t),_tt(t));}if(e.j==3&&e.b==1&&e.c==2){Gtt(t,e.g,e.i);return;}if(e.j==4&&(oB(t._),or(t)),e.j==6&&(t.W=false,g=e.g,k=e.i,Sp(t,g,k,false)&&P1(t.k),or(t)),e.j==7){switch(t.W=true,t.ib=e.g,t.lb=e.i,s=Sp(t,t.ib,t.lb,true),t.X){case 2:$tt(t)&&(s=true);break;case 1:(t.ib-t.hb)*(t.ib-t.hb)+(t.lb-t.kb)*(t.lb-t.kb)<100&&L6(t,t.e),s=true;break;case 3:de(t.V,t.e,t.gb[t.e]+t.ib-t.hb),Ve(t.V,t.e,t.jb[t.e]+t.lb-t.kb),t.f!=-1&&(de(t.V,t.f,t.gb[t.f]+t.ib-t.hb),Ve(t.V,t.f,t.jb[t.f]+t.lb-t.kb)),t.eb=w.Math.max(t.eb,2),P1(t.k);break;case 9:z$(t),t.X=4;case 4:if(t.I)for(r=new Zt(t.I);r.a<r.c.a.length;)P=_t(r),P.g&&P.Ob(t.ib,t.lb);for(f=0;f<t.V.r;f++)i0(t.V,f)&&(de(t.V,f,t.gb[f]+t.ib-t.hb),Ve(t.V,f,t.jb[f]+t.lb-t.kb));t.eb=w.Math.max(t.eb,2),P1(t.k);break;case 11:Ft(t.I,t.v.Gb()),t.X=10;case 10:t.v.Ob(t.ib,t.lb),t.eb=w.Math.max(t.eb,2),P1(t.k);break;case 7:for(y=false,n=0;n<t.V.r&&!y;n++)y=i0(t.V,n);if(l=false,t.I)for(D=0;D<t.I.a.length&&!l;D++)l=G(t.I,D).g;if(o=w.Math.abs(t.lb-t.kb)<20?1:w.Math.exp((t.lb-t.kb)/100),A=w.Math.abs(t.ib-t.hb)<20?0:(t.ib-t.hb)/50,h=y||l,t.I&&(!h||l)){for(D=0;D<t.I.a.length;D++)(!h||G(t.I,D).g)&&G(t.I,D).Pb(o,A);t.eb=w.Math.max(t.eb,2),P1(t.k);}(!h||y)&&(sb(t.V,o,A,h),t.eb=w.Math.max(t.eb,2),P1(t.k));break;case 5:case 6:if(T=null,t.X==5){if(w.Math.abs(t.ib-I7(t.R,t.R.a-1))<3&&w.Math.abs(t.lb-x7(t.R,t.R.a-1))<3)break;WI(t.R),Ie(t.R,t.ib,t.lb),Ie(t.R,t.hb,t.kb),T=t.R;}else T=new lA(w.Math.min(t.hb,t.ib),w.Math.min(t.kb,t.lb),w.Math.abs(t.ib-t.hb),w.Math.abs(t.lb-t.kb));if(t.I)for(D=0;D<t.I.a.length;D++)L=G(t.I,D),Q=VK(L,T),(!t.O||!t.Q[D])&&Q!=L.g&&(L.g=Q,t.eb=w.Math.max(t.eb,1));for(i=0;i<t.V.r;i++)Q=T.Hb(Bt(mt(t.V,i)),Bt(Rt(t.V,i))),(!t.O||!t.P[i])&&Q!=i0(t.V,i)&&(vP(t.V,i,Q),t.eb=w.Math.max(t.eb,1));s=true;break;case 8:s=true;}s&&P1(t.k);}}function U1t(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x;if(o=B(d(Ut,2),c0,15,0,[B(d(Ut,1),Tt,6,15,[20]),null,null,B(d(Ut,1),Tt,6,15,[0,10]),null,null,B(d(Ut,1),Tt,6,15,[-4,12]),B(d(Ut,1),Tt,6,15,[0,0,-7.5]),null,null,null,null,B(d(Ut,1),Tt,6,15,[8.571428571428571,-8.571428571428571]),null,null,null,B(d(Ut,1),Tt,6,15,[-2.4])]),L=B(d(F,2),u0,7,0,[B(d(F,1),m,6,15,[146]),B(d(F,1),m,6,15,[627]),null,B(d(F,1),m,6,15,[2457,1170]),null,B(d(F,1),m,6,15,[2451,8643,2519]),B(d(F,1),m,6,15,[9362,14798]),B(d(F,1),m,6,15,[34377,-2147448999,26214]),null,B(d(F,1),m,6,15,[37449,137313,95703,34371,37815,54891,132867,-2147309741,54857,55129,-2147449005,-2147449065]),null,B(d(F,1),m,6,15,[530697,531819,899169,137289,694617,-2146951863,-2146952797,-2146939175,-2146929547,-2146929564,-2146625111,-2146931799,-2146940503,-2146931935]),B(d(F,1),m,6,15,[1007293,610915]),B(d(F,1),m,6,15,[542985,137283,2122017,530691,2206773,-2144711351,219209,2840841,137555,-2146871031,-2147264167,613705,-2145360543,-2146625271,694611,2454837,-2145356703,-2147345133,-2146928951,-2146931805,-2144641719,-2146951869,-2146625237,-2146624183,2841963,1074905,-2146625117,2799955,-2144723645,138583,859225,-2145264843,-2145216253,-2146624149,-2144700727,-2146928917,-2143905527,-2144045771,-2146789097,2288547,544407,2104323,-2146911977,-2144479405,3633737,-2146870089,-2146952169]),null,B(d(F,1),m,6,15,[8487297,2172633,2116611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8829813]),B(d(F,1),m,6,15,[14071213])]),k=1<<e.e.length,i=0,D=0,e.e.length>7)for(y=0;y<e.e.length;y++)f=OW(t,A,n,y),f==1?i+=k:f==2&&(D+=k),i>>>=1,D>>>=1;if(j=e.e.length-9,e.e.length>=9&&e.e.length<=25&&L[j]!=null)for(x=0;x<L[j].length;x++)for(g=(f1&L[j][x])==0,Q=Et&L[j][x],h=false;!h;h=!h){if(h){if(g)break;for(v=0,P=1;P!=k;P<<=1)v<<=1,(Q&P)!=0&&(v|=1);Q=v;}for(R=0;R<e.e.length;R++){if((Q&i)==0&&(~Q&D)==0){for(r=0,s=mC*(o[j]==null?0:o[j][x]),b=0,C=Q,T=true,l=0;l<e.e.length;l++)T&&++b,(C&1)==0&&(T=!T),C>>>=1;for(S=b>(e.e.length/2|0),y=1;y<e.e.length;y++)e.a[y]=e.a[y-1]+w.Math.sin(r),e.b[y]=e.b[y-1]+w.Math.cos(r),(Q&1)==0&&(S=!S),r+=s+(S?fA:wo),Q>>>=1;return;}(Q&1)!=0&&(Q|=k),Q>>>=1;}}mtt(e,i,D);}function L1t(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W;for(h=0,T=(f=ue(e,h),f==-1?e.length:f),n=L1((Mt(h,T,e.length),e.substr(h,T-h)),f1,Et),h=gA(e,T),T=(D=ue(e,h),D==-1?e.length:D),v=(Mt(h,T,e.length),e.substr(h,T-h)),tt=null,P=false,k=f_(e),k!=0&&(tt=h_(e),k<0&&(P=true),T=w.Math.abs(k)),h=gA(e,T),T=(Q=ue(e,h),Q==-1?e.length:Q),Y=sn((Mt(h,T,e.length),e.substr(h,T-h))),h=gA(e,T),T=(o=ue(e,h),o==-1?e.length:o),et=sn((Mt(h,T,e.length),e.substr(h,T-h))),h=gA(e,T),T=(L=ue(e,h),L==-1?e.length:L),W=sn((Mt(h,T,e.length),e.substr(h,T-h))),h=gA(e,T),T=(s=ue(e,h),s==-1?e.length:s),j=L1((Mt(h,T,e.length),e.substr(h,T-h)),f1,Et),A=te(t.j,Y,-et,-W),A+1!=n&&(!t.b&&(t.b=new cP()),We(t.b,U1(n),U1(A))),tt!=null&&($0(t.j,A,6),gf(t.j,A,tt,P)),j!=0&&tA(t.j,A,j,false),e1(v,"A")||e1(v,"*")?w1(t.j,A,1,true):e1(v,"Q")?(b=c(F,m,6,1,15,1),b[0]=6,gf(t.j,A,b,true)):$0(t.j,A,zA(v,67));(h=gA(e,T))!=-1;)if(T=(i=ue(e,h),i==-1?e.length:i),x=(Mt(h,T,e.length),e.substr(h,T-h)),l=x.indexOf(p0(61)),y=(Mt(0,l,x.length),x.substr(0,l)),e1(y,"CHG"))H=L1((zt(l+1,x.length+1),x.substr(l+1)),f1,Et),b0(t.j,A,H);else if(e1(y,"RAD"))switch(H=L1((zt(l+1,x.length+1),x.substr(l+1)),f1,Et),H){case 1:Je(t.j,A,16);break;case 2:Je(t.j,A,32);break;case 3:Je(t.j,A,48);}else if(!e1(y,"CFG"))if(e1(y,"MASS"))H=L1((zt(l+1,x.length+1),x.substr(l+1)),f1,Et),O9(t.j,A,H);else if(e1(y,"VAL"))H=L1((zt(l+1,x.length+1),x.substr(l+1)),f1,Et),aA(t.j,A,H==-1?0:H==0?-1:H);else if(e1(y,"HCOUNT"))switch(H=L1((zt(l+1,x.length+1),x.substr(l+1)),f1,Et),H){case 0:break;case  -1:w1(t.j,A,1792,true);break;case 1:w1(t.j,A,128,true);break;case 2:w1(t.j,A,384,true);break;default:w1(t.j,A,896,true);}else if(e1(y,"SUBST")){if(H=L1((zt(l+1,x.length+1),x.substr(l+1)),f1,Et),H==-1)w1(t.j,A,O1,true);else if(H>0){for(N=0,r=0;r<t.j.s;r++)(K(t.j,0,r)==A||K(t.j,1,r)==A)&&++N;H>N&&w1(t.j,A,S0,true);}}else if(e1(y,"RBCNT"))switch(H=L1((zt(l+1,x.length+1),x.substr(l+1)),f1,Et),H){case 3:case  -1:w1(t.j,A,112,true);break;case 1:w1(t.j,A,8,true);break;case 2:w1(t.j,A,104,true);break;case 4:w1(t.j,A,56,true);}else e1(y,"RGROUPS")&&(C=tJ(),R=(g=iN(C.a,e),new h7(g)),HK(R)&&(S="R"+(R.b.a[2]||null),IP(t.j,A,S)));}function s1t(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T;for(o=h0(t.A,t.a),gt(V(o,1),0)?(yA(t.b,true),aU(t.w,k4)):aU(t.w,_V),Y8(t.D,IA(t.A,t.a)==null?"":L5(t.A,t.a)),e=V(o,ky),gt(V(e,no),0)?$t(t.g,2):z(e,2)==0?$t(t.g,1):z(e,4)==0?$t(t.g,3):$t(t.g,0),y=V(o,120),z(y,112)==0?$t(t.s,1):z(y,96)==0?$t(t.s,2):z(y,8)==0?$t(t.s,3):z(y,104)==0?$t(t.s,4):z(y,88)==0?$t(t.s,5):z(y,56)==0?$t(t.s,6):$t(t.s,0),h=Ot(O0(V(o,lr),22)),$t(t.t,h==0?0:h-2),s=V(o,l9),f=-1,i=0;i<di.length;i++)if(n0(s,di[i])){f=i;break;}f!=-1?$t(t.r,f):(n=new bn("Custom:"),gt(V(s,w8),0)&&(n.a+=" 0"),gt(V(s,h9),0)&&(n.a+=" 3"),gt(V(s,T9),0)&&(n.a+=" 4"),gt(V(s,c9),0)&&(n.a+=" 5"),gt(V(s,w9),0)&&(n.a+=" 6"),gt(V(s,g9),0)&&(n.a+=" 7"),gt(V(s,Vf),0)&&(n.a+=" >=8"),t.C=s,Gt(t.r,n.a),$t(t.r,di.length)),D=V(o,hi),z(D,ro)==0?$t(t.n,1):z(D,j2)==0?$t(t.n,2):z(D,R2)==0?$t(t.n,3):z(D,io)==0?$t(t.n,4):z(D,KA)==0?$t(t.n,5):z(D,q0)==0?$t(t.n,6):z(D,Ti)==0?$t(t.n,7):z(D,NP)==0?$t(t.n,8):z(D,If)==0?$t(t.n,9):z(D,3276800)==0?$t(t.n,10):z(D,2228224)==0?$t(t.n,11):z(D,2490368)==0?$t(t.n,12):$t(t.n,0),P=V(o,xf),z(P,Ty)==0?$t(t.j,1):z(P,cy)==0?$t(t.j,2):z(P,wy)==0?$t(t.j,3):z(P,gy)==0?$t(t.j,4):z(P,x6)==0?$t(t.j,5):z(P,N6)==0?$t(t.j,6):z(P,fo)==0?$t(t.j,7):z(P,p2)==0?$t(t.j,8):z(P,dy)==0?$t(t.j,9):z(P,By)==0?$t(t.j,10):z(P,Do)==0?$t(t.j,11):z(P,G6)==0?$t(t.j,12):z(P,O6)==0?$t(t.j,13):z(P,q6)==0?$t(t.j,14):$t(t.j,0),A=V(o,yr),z(A,Po)==0?$t(t.i,1):z(A,Sf)==0?$t(t.i,2):z(A,Ef)==0?$t(t.i,3):$t(t.i,0),r=V(o,uP),z(r,1792)==0?$t(t.k,1):z(r,1664)==0?$t(t.k,2):z(r,1408)==0?$t(t.k,3):z(r,128)==0?$t(t.k,4):z(r,384)==0?$t(t.k,5):z(r,896)==0?$t(t.k,6):z(r,1536)==0?$t(t.k,7):z(r,Qe)==0?$t(t.k,8):z(r,1152)==0?$t(t.k,9):$t(t.k,0),Q=V(o,li),z(Q,98304)==0?$t(t.p,1):z(Q,81920)==0?$t(t.p,2):z(Q,49152)==0?$t(t.p,3):z(Q,Gn)==0?$t(t.p,4):$t(t.p,0),L=O0(V(o,M2),47),$t(t.o,Ot(L)),gt(V(o,O1),0)&&yA(t.c,true),gt(V(o,S0),0)&&yA(t.f,true),T=V(o,X6),n0(T,eo)?$t(t.u,1):n0(T,Ao)?$t(t.u,2):$t(t.u,0),gt(V(o,je),0)&&yA(t.e,true),gt(V(o,Pe),0)&&yA(t.d,true),t.q&&(l=V(o,k8),z(l,dn)==0?$t(t.q,1):z(l,Fo)==0?$t(t.q,2):z(l,k8)==0?$t(t.q,3):$t(t.q,0));}function tM(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j;if(v=new h1(),A=new h1(),i=new h1(),T=new we(),h=new we(),P=K(t.L,0,e),r=K(t.L,1,e),t.zb(e,W1(t.R,mt(t.L,P)),Z1(t.R,Rt(t.L,P)),W1(t.R,mt(t.L,r)),Z1(t.R,Rt(t.L,r))),!i0(t.L,P)&&!i0(t.L,r)&&gt(V(J(h0(t.L,P),h0(t.L,r)),Pe),0)&&$1(t,-8),t.o[P]?(v.a=t.o[P].a,v.c=t.o[P].b):(v.a=W1(t.R,mt(t.L,P)),v.c=Z1(t.R,Rt(t.L,P))),t.o[r]?(v.b=t.o[r].a,v.d=t.o[r].b):(v.b=W1(t.R,mt(t.L,r)),v.d=Z1(t.R,Rt(t.L,r))),(fe(t.L,e)&d8)!=0){vA(t,v)&&t.rb(v),$1(t,-9);return;}switch(f=c1(t.L,e)==8?0:c1(t.L,e)==16?1:dt(t.L,e),f){case 1:if(D=c1(t.L,e),(t.G&128)!=0&&(D==257||D==129)&&(k=K(t.L,0,e),y=De(t.L,k),y!=0)){for(s=OA(t.L,k),L=0,n=0;n<t.L.g;n++)De(t.L,n)==y&&OA(t.L,n)==s&&++L;L==1&&(D=1);}switch(D){case 1:vA(t,v)&&In(t,v,P,r);break;case 257:Z5(t,v,P,r);break;case 129:for(b=v.b-v.a,j=v.d-v.c,V9(t.L,o1(t.L,P,r))?(Q=-3,o=-3):(Q=t.p[P],o=y5(t,P),Q==wu(t.L,P)&&(Q=o)),l=2;l<17;l+=2)A.a=v.a+l*b/17-l*j/128,A.c=v.c+l*j/17+l*b/128,A.b=v.a+l*b/17+l*j/128,A.d=v.c+l*j/17-l*b/128,vA(t,A)&&($1(t,l<9?Q:o),t.qb(A),$1(t,t.Q));break;case 16:vA(t,v)&&A_(t,v,P,r);}break;case 0:case 2:if((t.s[P]||e0(t.L,P)==2)&&(t.s[r]||e0(t.L,r)==2)&&!LA(t.L,e)&&f==2){if(!vA(t,v))break;Lf(t,v.b-v.a,v.d-v.c,T),b=T.a/2,j=T.b/2,A.a=v.a+b,A.c=v.c+j,A.b=v.b+b,A.d=v.d+j,i.a=v.a-b,i.c=v.c-j,i.b=v.b-b,i.d=v.d-j,c1(t.L,e)==386&&lL(A,i),In(t,A,P,r),f==2?In(t,i,P,r):qQ(t,i,P,r);}else (t.s[r]||e0(t.L,r)==2)&&f==2?Xp(t,v,e,false):(t.s[P]||e0(t.L,P)==2)&&f==2?Xp(t,v,e,true):(g=Q6(t.L,e),g==0&&(g=1),A.a=v.a,A.c=v.c,A.b=v.b,A.d=v.d,L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,S=e.g,!n[H]&&!n[Y])for(ht=C.c.length>S.c.length?C:S,wt=C.c.length>S.c.length?H:Y,n[wt]=true,N=P==null?0:P[wt],a=0;a<ht.d.length;a++)D=ht.e[ht.d[a]],wD(t,D,Z0(ht.b[N],ht.d[a]));if(n[H]?(tt=Y,R=S,s=e.b?1:0):(tt=H,R=C,s=e.b?0:1),L=e.a,bt=K(t.o,s,L),St=K(t.o,1-s,L),x=P==null?0:P[tt],b=R.f[bt],v=R.f[St],et=Z0(R.b[x],R.d[b]),Qt=t.k[bt],W=ri(_8(et,Z0(R.b[x],R.d[v]))),m1=ri(_8(Qt,t.k[St])),i=_b(W,m1),j=c(q2,V2,28,R.d.length,0,1),i<.0010000000474974513)for(a=0;a<R.d.length;a++)D=R.e[R.d[a]],D!=bt&&D!=St&&(j[a]=i>HA?_8(et,Z0(R.b[x],R.d[a])):_8(Z0(R.b[x],R.d[a]),et));else for(i<3.1405926535422957?yt=new Ke(m1.b*W.c-m1.c*W.b,-(m1.a*W.c-m1.c*W.a),m1.a*W.b-m1.b*W.a):w.Math.abs(m1.a)>=w.Math.abs(m1.b)&&w.Math.abs(m1.a)>=w.Math.abs(m1.c)?yt=new Ke(-(m1.b+m1.c)/m1.a,1,1):w.Math.abs(m1.b)>=w.Math.abs(m1.a)&&w.Math.abs(m1.b)>=w.Math.abs(m1.c)?yt=new Ke(1,-(m1.a+m1.c)/m1.b,1):yt=new Ke(1,1,-(m1.a+m1.b)/m1.c),rt=c2(ri(yt),i),a=0;a<R.d.length;a++)D=R.e[R.d[a]],D!=bt&&D!=St&&(j[a]=f2(_8(Z0(R.b[x],R.d[a]),et),rt));for(n[tt]=true,st=0;st<O(t.o,bt);st++)h=_(t.o,bt,st),h!=St&&(k=R.f[h],JI(t,h,new Ke(j[k].a+Qt.a,j[k].b+Qt.b,j[k].c+Qt.c)));for(Jt=FL(t,e.p),T=-1,Q=0,o=0,Q1=0;Q1<t.i[A].length;Q1++){for(T=t.i[A][Q1],rt=c2(m1,l1*T/180-Jt),a=0;a<R.d.length;a++)D=R.e[R.d[a]],D!=bt&&D!=St&&(wD(t,D,j[a]),X8(f2(t.k[D],rt),Qt));if(y=i6(t,e),l0=y,pt=0,y<Q4)A1=y/O4,t.e[A][Q1]=t.d[A][Q1]*(1-A1*A1);else {for(l=t.i[A][Q1],V1=Ge,ct=0;ct<2;ct++)if(T=r[Q1][ct],T!=l){for(rt=c2(m1,l1*T/180-Jt),$=0;$<R.d.length;$++)D=R.e[R.d[$]],D!=bt&&D!=St&&(wD(t,D,j[$]),X8(f2(t.k[D],rt),Qt));Xt=i6(t,e),Xt<y*zf&&Xt<V1&&(t.i[A][Q1]=r[Q1][ct],A1=Xt/.16000000476837162,t.e[A][Q1]=t.d[A][Q1]*(1-A1*A1),l0=Xt,pt=ct+1,V1=Xt);}V1==Ge&&y<O4&&(A1=y/O4,t.e[A][Q1]=t.d[A][Q1]*(1-A1*A1));}t.e[A][t.a[A]]<t.e[A][Q1]&&(t.a[A]=Q1,Q=pt,o=l0);}for(U0=0,Lt=0;Lt<t.i[A].length;Lt++)t.e[A][Lt]>0&&(U0+=t.e[A][Lt]);if(t.e[A][t.a[A]]<=0)for(t.e[A][t.a[A]]=1,f=Q==1?-8:Q==2?8:Hn(t.f)<.5?-8:8,S1=1;S1<=4;S1++){for(T=t.i[A][t.a[A]]+f*S1<<16>>16,rt=c2(m1,l1*T/180-Jt),$=0;$<R.d.length;$++)D=R.e[R.d[$]],D!=bt&&D!=St&&(wD(t,D,j[$]),X8(f2(t.k[D],rt),Qt));if(g=i6(t,e),o-g<.05)break;t.i[A][t.a[A]]=T;}else for(D1=0;D1<t.i[A].length;D1++)t.e[A][D1]/=U0;if(T!=t.i[A][t.a[A]])for(rt=c2(m1,l1*t.i[A][t.a[A]]/180-Jt),$=0;$<R.d.length;$++)D=R.e[R.d[$]],D!=bt&&D!=St&&(wD(t,D,j[$]),X8(f2(t.k[D],rt),Qt));bm(t,L,t.i[A][t.a[A]]);}function eM(){eM=v1,Z4=B(d(Ut,1),Tt,6,15,[0,1.00794,4.0026,6.941,9.0122,10.811,12.011,14.007,15.999,18.998,20.18,22.99,24.305,26.982,28.086,30.974,32.066,35.453,39.948,39.098,40.078,44.956,47.867,50.942,51.996,54.938,55.845,58.933,58.693,63.546,65.39,69.723,72.61,74.922,78.96,79.904,83.8,85.468,87.62,88.906,91.224,92.906,95.94,98.906,101.07,102.91,106.42,107.87,112.41,114.82,118.71,121.76,127.6,126.9,131.29,132.91,137.33,138.91,140.12,140.91,144.24,146.92,150.36,151.96,157.25,158.93,162.5,164.93,167.26,168.93,173.04,174.97,178.49,180.95,183.84,186.21,190.23,192.22,195.08,196.97,200.59,204.38,207.2,208.98,209.98,209.99,222.02,223.02,226.03,227.03,232.04,231.04,238.03,237.05,239.05,241.06,244.06,249.08,252.08,252.08,257.1,258.1,259.1,262.11,267.12,268.13,271.13,270.13,277.15,276.15,Cy,Cy,283.17,285.18,Hy,Hy,293.2,Vy,Vy,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,2.0141,3.016,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71.0787,156.18828,114.10364,115.0877,103.1447,128.13052,129.11458,57.05182,137.14158,113.15934,113.15934,128.17428,131.19846,147.17646,97.11658,87.0777,101.10458,186.2134,163.17546,99.13246]),X4=B(d(Ut,1),Tt,6,15,[0,1.007825,4.0026,7.016003,9.012182,11.009305,12,14.003074,15.994915,18.998403,19.992435,22.989767,23.985042,26.98153,27.976927,30.973762,31.97207,34.968852,39.962384,38.963707,39.962591,44.95591,47.947947,50.943962,51.940509,54.938047,55.934939,58.933198,57.935346,62.939598,63.929145,68.92558,73.921177,74.921594,79.91652,78.918336,83.911507,84.911794,87.905619,88.905849,89.904703,92.906377,97.905406,89.92381,101.904348,102.9055,105.903478,106.905092,113.903357,114.90388,119.9022,120.903821,129.906229,126.904473,131.904144,132.905429,137.905232,138.906346,139.905433,140.907647,141.907719,135.92398,151.919729,152.921225,157.924099,158.925342,163.929171,164.930319,165.93029,168.934212,173.938859,174.94077,179.946545,180.947992,183.950928,186.955744,191.961467,192.962917,194.964766,196.966543,201.970617,204.974401,207.976627,208.980374,193.98818,195.99573,199.9957,201.00411,206.0038,210.00923,232.038054,216.01896,238.050784,229.03623,232.041169,237.05005,238.05302,242.06194,240.06228,243.06947,243.07446,248.08275,251.08887,253.09515,257.10295,257.10777,271.13,270.13,277.15,276.15,Cy,Cy,283.17,285.18,Hy,Hy,291.2,Vy,Vy,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,2.014,3.01605,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,0,0,0,0,0]),z2=B(d(F,1),m,6,15,[6,1,7,8]);}function l1t(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct,Xt,St,A1,Qt,bt,yt,Jt,S1,D1,Q1,Lt,pt,U0,V1,l0,m1,F1,T0,Y0,ZA,M0,B1,Ue,$e,kA;for(Y=0,Q=0,st=0,Jt=c(Pt,it,6,e.r,16,1),Lt=c(Pt,it,6,e.r,16,1),Q1=c(Pt,it,6,e.r,16,1),r=0;r<e.r;r++)A[r]==n&&(Q1[r]=true,Jt[r]=true,++Q,++Y);for(i=0;i<e.r;i++)if(Q1[i])for(St=0;St<e.k[i];St++)C=e.j[i][St],Jt[C]||(Jt[C]=true,++Q,++st);for(f=0;f<e.r;f++)if(Jt[f]&&!Q1[f]&&!Lt[f])for(St=0;St<e.e[f];St++)C=e.j[f][St],Jt[C]||(Lt[C]=true,Jt[C]=true,++Q);for(y=0,s=0;s<e.s;s++)Jt[e.F[0][s]]&&Jt[e.F[1][s]]&&++y;for(wt=new SA(Q,y),L9(e,wt,Jt,false,null),ve(wt,true),et=c(F,m,6,Y,15,1),ct=c(F,m,6,Q,15,1),ht=c(F,m,6,Y+st,15,1),T0=c(F,m,6,e.r,15,1),H=0,rt=0,a=0,D=0;D<e.r;D++)Jt[D]&&(xP(e,D,true)&&w1(wt,rt,d9,true),Q1[D]||(wt.v[rt]|=q0),(Q1[D]||!Lt[D])&&(ht[a]=rt,T0[D]=a,++a),Q1[D]&&(et[H]=rt,++H),ct[rt]=D,wt.D[rt]==1&&(wt.B[rt]=2,wt.U&=wt.D[rt]==1?0:7),++rt);if(R=null,V1=null,T=null,U0=null,D1=false,Ue=!!t.a&&AG(t.a)&&Q<=32,Ue){for(T=new qA(wt,512),P=0;P<wt.g;P++)if(T.db[P]==3){Ue=false;break;}for(L=0;L<wt.i;L++)if(T.o[L]==3){Ue=false;break;}Ue&&l6(T);}if(t.a&&!Ue&&++t.a.d,wt.U|=8,Ue&&(D1=WR(T),U0=Me(T),h=Rv(t.a,U0),h)){for(Xt=(si(T),T.H),R=new n1(),x=h.a,N=0,tt=x.length;N<tt;++N){for(S=x[N],pt=0;pt<wt.r;pt++)l=S[Xt[pt]],de(wt,pt,l.a),Ve(wt,pt,l.b),Yn(wt,pt,D1?-l.c:l.c);Ft(R,new Hu(wt));}V1=h.c;}if(!R){for(M0=new XQ(wt),DU(M0,t.d),q5(M0,t.c,16),R=new n1(),o=pQ(M0),R.a.push(o),j=pQ(M0);j;)R.a.push(j),j=pQ(M0);for(F1=Ge,v=new Zt(R);v.a<v.c.a.length;)g=_t(v),F1=w.Math.min(F1,g.e);for(B1=2*F1,A1=R.a.length-1;A1>=0;A1--)(ee(A1,R.a.length),R.a[A1]).e>B1&&cA(R,A1);for(V1=c(Ut,Tt,6,R.a.length,15,1),l0=0,S1=0,Qt=0;Qt<R.a.length;Qt++)g=(ee(Qt,R.a.length),R.a[Qt]),V1[Qt]=w.Math.pow(10,(F1-g.e)/13.600000000000001),l0+=V1[Qt];for(bt=0;bt<R.a.length;bt++)V1[bt]/=l0;if(t.b){for($e=0,m1=Ge,b=new Zt(R);b.a<b.c.a.length;)g=_t(b),W=ZY(us(g,g.o)),g.n=W,isNaN(W)||(m1=w.Math.min(m1,W),++$e),GG(g,wt);for($=m1+2.72,k=new Zt(R);k.a<k.c.a.length;)g=_t(k),!isNaN(g.n)&&g.n>$&&(g.n=NaN,--$e);if($e!=0){for(Y0=c(Ut,Tt,6,$e,15,1),ZA=0,S1=0,yt=R.a.length-1;yt>=0;yt--)g=(ee(yt,R.a.length),R.a[yt]),isNaN(g.n)?cA(R,yt):(Y0[S1]=w.Math.pow(10,(m1-g.n)/1.36),ZA+=Y0[S1],++S1);for(V1=c(Ut,Tt,6,$e,15,1),St=0;St<$e;St++)V1[St]=Y0[St]/ZA;}}if(Ue){for(Xt=(si(T),T.H),S=j1(q2,[DA,V2],[127,28],0,[R.a.length,Xt.length],2),St=0;St<S.length;St++)for(pt=0;pt<Xt.length;pt++)kA=Z0((ee(St,R.a.length),R.a[St]),pt),S[St][Xt[pt]]=new Ke(kA.a,kA.b,D1?-kA.c:kA.c);pv(t.a,U0,new Sg(S,V1));}}return new wF(et,ct,ht,T0,Qf(R,c(CS,LE,97,0,0,1)),V1);}function AM(t,e){qs();var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W;switch(C=xt(t,e),et=t.K[e].a,W=t.K[e].b,C){case 1:{if(x=t.k[e],x==0?(o=KL(t,true),y=0):(o=et-mt(t,t.j[e][0]),y=W-Rt(t,t.j[e][0])),x==1)v=te(t,et+ic*o+Qc*y,W-Qc*o+ic*y,0);else if(x==2)o=et-.5*(mt(t,t.j[e][0])+mt(t,t.j[e][1])),y=W-.5*(Rt(t,t.j[e][0])+Rt(t,t.j[e][1])),v=te(t,et+o,W+y,0);else if(x==3){for(tt=t.j[e][0],g=1;g<3;g++)f=t.n[e][g],(t.I[f]==129||t.I[f]==257)&&(tt=t.j[e][g]);if(A=w.Math.abs(Ze(pA(t.K[e].a,t.K[e].b,mt(t,t.j[e][0]),Rt(t,t.j[e][0])),pA(t.K[e].a,t.K[e].b,mt(t,t.j[e][1]),Rt(t,t.j[e][1])))),n=w.Math.abs(Ze(pA(t.K[e].a,t.K[e].b,mt(t,t.j[e][0]),Rt(t,t.j[e][0])),pA(t.K[e].a,t.K[e].b,mt(t,t.j[e][2]),Rt(t,t.j[e][2])))),P=w.Math.abs(Ze(pA(t.K[e].a,t.K[e].b,mt(t,t.j[e][1]),Rt(t,t.j[e][1])),pA(t.K[e].a,t.K[e].b,mt(t,t.j[e][2]),Rt(t,t.j[e][2])))),N=true,A>n&&A>P?n+P<l1&&(N=false,o=et-.5*(mt(t,t.j[e][0])+mt(t,t.j[e][1])),y=W-.5*(Rt(t,t.j[e][0])+Rt(t,t.j[e][1]))):n>A&&n>P?A+P<l1&&(N=false,o=et-.5*(mt(t,t.j[e][0])+mt(t,t.j[e][2])),y=W-.5*(Rt(t,t.j[e][0])+Rt(t,t.j[e][2]))):A+n<l1&&(N=false,o=et-.5*(mt(t,t.j[e][1])+mt(t,t.j[e][2])),y=W-.5*(Rt(t,t.j[e][1])+Rt(t,t.j[e][2]))),N){for(H=t.j[e][0],Q=Ge,T=0;T<3;T++)r=t.j[e][T],r!=tt&&(D=w.Math.pow(t.K[e].a-t.K[r].a,2)+w.Math.pow(t.K[e].b-t.K[r].b,2),D<Q&&(H=r,Q=D,q1()));v=te(t,(t.K[tt].a+t.K[H].a)/2,(t.K[tt].b+t.K[H].b)/2,0);}else v=te(t,et+o,W+y,0);}else v=te(t,et+o,W+y,0);$0(t,v,1),J0(t,e,v,1);}break;case 2:if(S=t.k[e],S==1)o=et-mt(t,t.j[e][0]),y=W-Rt(t,t.j[e][0]),v=te(t,et+(Co*o-Ho*y)*.7,W+(Ho*o+Co*y)*.7,0),$0(t,v,1),J0(t,e,v,1),v=te(t,et+(Pc*o-Dc*y)*.7,W+(Dc*o+Pc*y)*.7,0),$0(t,v,1),J0(t,e,v,1);else if(S==2)L=et-mt(t,t.j[e][0]),l=W-Rt(t,t.j[e][0]),s=et-mt(t,t.j[e][1]),h=W-Rt(t,t.j[e][1]),j=w.Math.sqrt(L*L+l*l)*.7,R=w.Math.sqrt(s*s+h*h)*.7,o=L+s,y=l+h,b=w.Math.sqrt(o*o+y*y),i=(j+R)/2,o=o/b*i,y=y/b*i,Y=xQ(t,e),v=te(t,et+nc*o-fc*y,W+fc*o+nc*y,0),$0(t,v,1),Y>-1?J0(t,e,v,1):J0(t,e,v,257),v=te(t,et+rc*o-uc*y,W+uc*o+rc*y,0),$0(t,v,1),J0(t,e,v,1);else for(k=0;k<C;k++)v=te(t,et,W,0),$0(t,v,1),J0(t,e,v,1);break;case 3:t.j[e][0]>0?(o=(et-mt(t,t.j[e][0]))*.7,y=(W-Rt(t,t.j[e][0]))*.7,v=te(t,et+o,W+y,0),$0(t,v,1),J0(t,e,v,1),v=te(t,et-y,W+o,0),$0(t,v,1),J0(t,e,v,1),v=te(t,et+y,W-o,0),$0(t,v,1),J0(t,e,v,1)):(o=KL(t,true),y=KL(t,true),v=te(t,et+o,W+y,0),$0(t,v,1),J0(t,e,v,1),v=te(t,et-y*Co,W+o*Ho,0),$0(t,v,1),J0(t,e,v,1),v=te(t,et-y*Co,W-o*Ho,0),$0(t,v,1),J0(t,e,v,1));break;default:{for(k=0;k<C;k++)v=te(t,et,W,0),$0(t,v,1),J0(t,e,v,1);break;}}}function h1t(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct;if((t.fb!=ND(t.k)||t.N!=Y9(t.k))&&(t.fb=ND(t.k),t.N=Y9(t.k),t.eb<3&&(t.eb=3)),P=v3(e),f=xB(e),nA(e,P),q3(e,0,0,t.fb,t.N),(t.U&4)!=0&&t.I.a.length==0&&(y=.5*t.fb,l=.5*t.N,r=.03999999910593033*t.fb,A=new _D(),x3(A,y-r,l,y+r,l),A.j=true,Ft(t.I,A)),o=false,t.eb!=0){switch((t.U&1)!=0&&t.eb!=5&&Dm(t),t.G=(t.U&4)!=0?new zj(new OT(t.L,t.Y),t.I):(t.U&2)!=0?new Qv(t.L,t.Y,t.I):(t.U&1)!=0?new kB(t.L,t.I):new HF(t.V,t.I),oY(t.G,f,P),lI(t.G,t.T),TI(t.G,(t.U&1)==0?0:(L=Al,L.startsWith(nl)||L.startsWith(Pl)||L.startsWith(rl)?E5(P,To):(ni(),P&On|Bt(w.Math.round(To*((P&QP)>>16)))<<16|Bt(w.Math.round(To*((P&DP)>>8)))<<8|Bt(w.Math.round(To*(P&255)))))),xq(t.G,t.$),hI(t.G,t.H|8|(t.w==19?80:0)),t.eb){case 6:case 4:case 5:sK(t,e);break;case 3:j=_5(t.G,e,new lA(0,0,t.fb,t.N),0),j&&(t.U&1)!=0&&_h(j,t.V);break;case 2:R=$R(t.G,e,new lA(0,0,t.fb,t.N),0),o=!!R&&!(R.c==1&&R.a==0&&R.b==0);}t.eb=0;}switch(t.G&&k$(t.G,e),o||PZ(t,e),t.G&&(tX(t.G,e),Az(t.G,e)),t.t!=-1&&t.i.a.length!=0&&(x=Bt(mt(t.V,t.t)),W=Bt(Rt(t.V,t.t)),T=t.i.a,C=Wz(t,T),nA(e,C==1?f:C==2?-16776961:hy),C==1?T=(J1(),a0)[zA(T,t.c)]:C==2&&(T=hA(t.j,0,T.length)),i=3*(rt=e.Lc(),rt.getFontSize())/2|0,oL(e,i,false,false),C3(e,x,W,T),C==4&&(nA(e,GP),z3(e,x+aL(e,T).b/2,W+i,"<unknown>")),C==2&&(nA(e,hy),C3(e,x+aL(e,T).b,W,GD(t.j,T.length)))),nA(e,f),t.X){case 1:switch(N=Bt(t.hb),$=Bt(t.kb),t.t==-1||t.t==t.e?(tt=Bt(t.ib),a=Bt(t.lb)):(tt=Bt(mt(t.V,t.t)),a=Bt(Rt(t.V,t.t))),t.w){case 5:Z9(e,N,$,tt,a);break;case 6:H=($-a)/9|0,st=(tt-N)/9|0,h=new WD(3),Ie(h,N,$),Ie(h,tt+H,a+st),Ie(h,tt-H,a-st),AL(e,new uD(h));break;case 23:for(H=tt-N,st=a-$,Q=2;Q<17;Q+=2)Y=N+(Q*H/17|0)-(Q*st/128|0),ht=$+(Q*st/17|0)+(Q*H/128|0),et=N+(Q*H/17|0)+(Q*st/128|0),wt=$+(Q*st/17|0)-(Q*H/128|0),Z9(e,Y,ht,et,wt);}break;case 2:if(t.q>0&&Z9(e,Bt(t.hb),Bt(t.kb),Bt(t.o[0]),Bt(t.p[0])),t.q>1)for(Q=1;Q<t.q;Q++)Z9(e,Bt(t.o[Q-1]),Bt(t.p[Q-1]),Bt(t.o[Q]),Bt(t.p[Q]));break;case 5:nA(e,(k=(v=KD(e),v!=0?v:el),v5(k,(s=Al,s.startsWith(nl)||s.startsWith(Pl)||s.startsWith(rl)?eE:AE)))),gG(e,new uD(t.R)),nA(e,f);break;case 6:x=t.hb<t.ib?Bt(t.hb):Bt(t.ib),W=t.kb<t.lb?Bt(t.kb):Bt(t.lb),S=Bt(w.Math.abs(t.ib-t.hb)),D=Bt(w.Math.abs(t.lb-t.kb)),nA(e,(b=(g=KD(e),g!=0?g:el),v5(b,(L=Al,L.startsWith(nl)||L.startsWith(Pl)||L.startsWith(rl)?eE:AE)))),ct=e.Lc(),ct.drawRectangle(x,W,S,D),nA(e,f);break;case 8:N=Bt(t.hb),$=Bt(t.kb),t.t==-1||t.t==t.e?(tt=Bt(t.ib),a=Bt(t.lb)):(tt=Bt(mt(t.V,t.t)),a=Bt(Rt(t.V,t.t))),nA(e,(n=v3(e),$s(-8388608,n))),Z9(e,N,$,tt,a),nA(e,f);}}function nM(t,e,A){var n,P,r,i,f,D;for(r=0,$A(t.b)?(r=J(r,1),gf(t.A,e,A,true)):gf(t.A,e,A,false),F0(t.g)==2?oN(t.A,e)||(r=J(r,t4)):mn(t.A,e)||(F0(t.g)==1?r=J(r,2):F0(t.g)==3&&(r=J(r,4))),f=0,P=0;P<O(t.A,e);P++)gt(V(h0(t.A,_(t.A,e,P)),Pe),0)&&LA(t.A,Nt(t.A,e,P))&&++f;switch(F0(t.s)){case 1:f==0&&(r=J(r,112));break;case 2:f<=2&&(r=J(r,96));break;case 3:r=J(r,8);break;case 4:f<3&&(r=J(r,104));break;case 5:f<4&&(r=J(r,88));break;case 6:r=J(r,56);}switch(F0(t.t)!=0&&(r=J(r,Wt(F0(t.t)+2,22))),D=F0(t.r),D==di.length?r=J(r,t.C):D!=0&&(r=J(r,di[D])),F0(t.i)){case 1:r=J(r,Po);break;case 2:r=J(r,Sf);break;case 3:r=J(r,Ef);}switch(i=$x(t.A,e),F0(t.n)){case 1:i==1?r=J(r,O1):i<1&&(r=J(r,ro));break;case 2:i==2?r=J(r,O1):i<2&&(r=J(r,j2));break;case 3:i==3?r=J(r,O1):i<3&&(r=J(r,R2));break;case 4:i==2?r=J(r,O1):i<2&&(r=J(r,io));break;case 5:i==3?r=J(r,O1):i<3&&(r=J(r,KA));break;case 6:i==0&&(r=J(r,S0));break;case 7:i==1?r=J(r,S0):i<1&&(r=J(r,Ti));break;case 8:i==2?r=J(r,S0):i<2&&(r=J(r,NP));break;case 9:i==3?r=J(r,S0):i<3&&(r=J(r,If));break;case 10:i==0?r=J(r,3276800):r=J(r,io);break;case 11:i==0?r=J(r,2228224):r=J(r,KA);break;case 12:i<=1?r=J(r,2490368):i<=3&&(r=J(r,KA));}switch(n=TT(t.A,e),F0(t.j)){case 1:n==0&&(r=J(r,Ty));break;case 2:n<=1&&(r=J(r,cy));break;case 3:n<=2&&(r=J(r,wy));break;case 4:n<=3&&(r=J(r,gy));break;case 5:n<2&&(r=J(r,x6));break;case 6:n<3&&(r=J(r,N6));break;case 7:n<4&&(r=J(r,fo));break;case 8:n==0&&(r=J(r,p2));break;case 9:n<2&&(r=J(r,dy));break;case 10:n<3&&(r=J(r,By));break;case 11:n<4&&(r=J(r,Do));break;case 12:n<2&&(r=J(r,G6));break;case 13:n<3&&(r=J(r,O6));break;case 14:n<3&&(r=J(r,q6));}switch(F0(t.k)){case 1:r=J(r,1792);break;case 2:r=J(r,1664);break;case 3:r=J(r,1408);break;case 4:r=J(r,128);break;case 5:r=J(r,384);break;case 6:r=J(r,896);break;case 7:r=J(r,1536);break;case 8:r=J(r,Qe);break;case 9:r=J(r,1152);}switch(F0(t.p)){case 1:r=J(r,98304);break;case 2:r=J(r,81920);break;case 3:r=J(r,49152);break;case 4:r=J(r,Gn);}switch(F0(t.o)!=0&&(r=J(r,Wt(F0(t.o),47))),$A(t.c)&&(_i(t.A,e)>0||R1(t.A,e)==0&&(X(t.A,e)==5||b3(t.A,e)||W3(t.A,e)))&&(r=J(r,O1)),$A(t.f)&&(_i(t.A,e)>0||R1(t.A,e)==0&&(X(t.A,e)==5||b3(t.A,e)||W3(t.A,e)))&&(r=J(r,S0)),F0(t.u)){case 1:r=J(r,eo);break;case 2:r=J(r,Ao);}if($A(t.e)&&(r=J(r,je)),$A(t.d)&&(r=J(r,Pe)),t.q)switch(F0(t.q)){case 1:r=J(r,dn);break;case 2:r=J(r,Fo);break;case 3:r=J(r,k8);}w1(t.A,e,-1,false),w1(t.A,e,r,true);}function T1t(t,e,A,n,P,r){var i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a;for(o=e.a[A],L=e.a[n],s=e.a[P],y=e.a[r],W=JZ(t.a,e,A,n,P,r),$=W>10?W/10|0:W,a=W>10?W-$*10:0,S=-1,x=0,C=0,N=0,j=$,Y=5;(x<Y&&(S==-1||Y==4)||x==4&&$==5&&a>0)&&(Y==5&&x==4&&(Y=4,x=0,j=a),x==1?(C=1,N=3):x==2?(C=3,N=1):(C=x,N=x),g=t.a.g.a[o-1][w.Math.min(C+1,4)],k=L,v=s,b=t.a.g.a[y-1][w.Math.min(N+1,4)],k>v?(v=(H=U1(k),U1(k=v),H).a,b=(tt=U1(g),U1(g=b),tt).a):k==v&&g>b&&(b=(tt=U1(g),U1(g=b),tt).a),S=f9(B(d(F,1),m,6,15,[2,3,1,4,0]),B(d(F,1),m,6,15,[k,v,g,b,j]),t),!(S!=-1&&Y==4));)++x;if(S>=0)return new gF(t,S);for(T=o1(e,n,P),f=B(d(Ut,1),Tt,6,15,[0,0]),D=B(d(Ut,1),Tt,6,15,[0,0]),Q=B(d(Ut,1),Tt,6,15,[0,0]),l=B(d(F,1),m,6,15,[e.D[n],e.D[P]]),i=(Rn(t.a.b,L)-1)*(Rn(t.a.b,s)-1),R=0;R<2;R++)switch(l[R]){case 6:f[R]=2,D[R]=2.12;break;case 7:f[R]=2,D[R]=1.5;break;case 8:f[R]=2,D[R]=.2,Q[R]=2;break;case 14:f[R]=1.25,D[R]=1.22;break;case 15:f[R]=1.25,D[R]=2.4;break;case 16:f[R]=1.25,D[R]=.49,Q[R]=8;}return ZD(t.a.b,L)||ZD(t.a.b,s)?new Xn(0,0):LL(t.a.b,L)&&LL(t.a.b,s)&&T<e.i&&Ee(e.q,T)?(h=u8(t.a.b,L)==3&&u8(t.a.b,s)==4||u8(t.a.b,L)==4&&u8(t.a.b,s)==3?3:6,et=X9(t.a.b,L)==0&&X9(t.a.b,s)==0?.5:.3,new Xn(h*et*w.Math.sqrt(f[0]*f[1]),0)):dt(e,T)==2?(et=NA(t.a.b,L)==2&&NA(t.a.b,s)==2?1:.4,new Xn(6*et*w.Math.sqrt(f[0]*f[1]),0)):Rn(t.a.b,L)==4&&Rn(t.a.b,s)==4?new Xn(0,w.Math.sqrt(D[0]*D[1])/i):Rn(t.a.b,L)==4&&Rn(t.a.b,s)!=4?Rn(t.a.b,s)==3&&(u8(t.a.b,s)==4||u8(t.a.b,s)==34||NA(t.a.b,s)>0)||Rn(t.a.b,s)==2&&(u8(t.a.b,s)==3||NA(t.a.b,s)>0)?new IU():new Xn(0,w.Math.sqrt(D[0]*D[1])/i):Rn(t.a.b,s)==4&&Rn(t.a.b,L)!=4?Rn(t.a.b,L)==3&&(u8(t.a.b,L)==4||u8(t.a.b,L)==34||NA(t.a.b,L)>0)||Rn(t.a.b,L)==2&&(u8(t.a.b,L)==3||NA(t.a.b,L)>0)?new IU():new Xn(0,w.Math.sqrt(D[0]*D[1])/i):dt(e,T)==1&&NA(t.a.b,L)>0&&NA(t.a.b,s)>0||NA(t.a.b,L)>0&&X9(t.a.b,s)>0||X9(t.a.b,L)>0&&NA(t.a.b,s)>0?X9(t.a.b,L)>0&&X9(t.a.b,s)>0?new IU():X9(t.a.b,L)>0&&NA(t.a.b,s)>0?(et=0,NA(t.a.b,L)==1?et=.5:nP(l[0])==2&&nP(l[1])==2?et=.3:(nP(l[0])!=2||nP(l[1])!=2)&&(et=.15),new Xn(6*et*w.Math.sqrt(f[0]*f[1]),0)):X9(t.a.b,s)>0&&NA(t.a.b,L)>0?(et=0,NA(t.a.b,s)==1?et=.5:nP(l[0])==2&&nP(l[1])==2?et=.3:(nP(l[0])!=2||nP(l[1])!=2)&&(et=.15),new Xn(6*et*w.Math.sqrt(f[0]*f[1]),0)):(NA(t.a.b,L)==1||NA(t.a.b,s)==1)&&(l[0]!=6||l[1]!=6)?new Xn(2.4000000000000004*w.Math.sqrt(f[0]*f[1]),0):new Xn(.8999999999999999*w.Math.sqrt(f[0]*f[1]),0):(l[0]==8||l[0]==16)&&(l[1]==8||l[1]==16)?new Xn(-w.Math.sqrt(Q[0]*Q[1]),0):new Xn(0,w.Math.sqrt(D[0]*D[1])/i);}function c1t(t,e){var A,n,P,r,i,f,D,Q,o,L;if(!t.W){if(Q=e.b,e.j==1)if(Q==-3)t.Z=true,or(t);else if(Q==-2)t.d=true,or(t);else if(Q==-1)or(t);else if(e.a)Q==122?(Ov(t),t.eb=w.Math.max(t.eb,2),P1(t.k),N1(t,new x1(t,1,true))):Q==99?$5(t,true):Q==118&&((t.U&4)!=0&&t.r&&nF(),Wv(t));else if(Q==-4)t.w!=19&&(K1(t),RW(t)||UQ(t.V)&&(t.eb=w.Math.max(t.eb,1),P1(t.k),N1(t,new x1(t,1,true))));else if(Q==-6||t.t==-1&&Q==63){H3(t._,aV,tE);return;}else if(Q==-8)t.i.a.length!=0&&(Dy(t,t.i.a),Ln(t.i,0));else if(t.u!=-1)Q==113&&t.V.L?Jv(t,t.u):Q==118?_Q(t.V,t.u,3,false,Qn(t.V,24*t.ab))&&(t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true))):Q>=52&&Q<=55?_Q(t.V,t.u,Q-48,false,Qn(t.V,24*t.ab))&&(t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true))):Q==97||Q==98?_Q(t.V,t.u,6,true,Qn(t.V,24*t.ab))&&(t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true))):(P=Q==48?(K1(t),h8(t.V,t.u,16)):Q==49?(K1(t),h8(t.V,t.u,1)):Q==50?(K1(t),h8(t.V,t.u,2)):Q==51?(K1(t),h8(t.V,t.u,4)):Q==117?(K1(t),h8(t.V,t.u,257)):Q==100?(K1(t),h8(t.V,t.u,129)):Q==99?(K1(t),h8(t.V,t.u,386)):Q==109&&(K1(t),h8(t.V,t.u,16)),P&&(t.eb=w.Math.max(t.eb,1),P1(t.k),N1(t,new x1(t,1,true))));else if(t.t!=-1){if(D=t.i.a.length==0,D?t.K=Q:(t.K==108&&(Ln(t.i,0),Ye(t.i,76)),t.K=-1),D&&Q==108)q(t.i,"Cl"),t.eb=w.Math.max(t.eb,1),P1(t.k);else if(D&&(Q==43||Q==45))K1(t),RT(t.V,t.t,Q==43)&&(t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true)));else if(D&&Q==46)K1(t),L=jA(t.V,t.t)==32?0:32,Je(t.V,t.t,L),t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true));else if(D&&Q==58)K1(t),L=jA(t.V,t.t)==48?16:jA(t.V,t.t)==16?0:48,Je(t.V,t.t,L),t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true));else if(D&&Q==113&&t.V.L)GF(t,t.t);else if(D&&t.V.L&&(Q==120||Q==88))o=B(d(F,1),m,6,15,[9,17,35,53]),MT(t.V,t.t,o),t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true));else if(D&&Q==63)K1(t),mf(t.V,t.t,0,0,-1,0)&&(t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true)));else if(D&&Q>48&&Q<=57){if(_i(t.V,t.t)>0){for(K1(t),r=Q-47,A=t.t,i=t.V.r-t.V.g,f=1;f<r&&(L6(t,A),n=te(t.V,t.ib,t.lb,0),n!=-1);f++)uL(t.V,A,n),A=n-i,ut(t.V,1);t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true));}}else !D&&Q==-7?(Ln(t.i,0),t.eb=w.Math.max(t.eb,1),P1(t.k)):!D&&Q==-5?(Ln(t.i,t.i.a.length-1),t.eb=w.Math.max(t.eb,1),P1(t.k)):Q>=65&&Q<=90||Q>=97&&Q<=122||Q>=48&&Q<=57||Q==45?(Ye(t.i,Q&d1),t.eb=w.Math.max(t.eb,1),P1(t.k)):(Q==10||Q==13)&&Dy(t,t.i.a);}else Q==104||Q==118?(t.U&7)==0&&K5(t,Q==104):t.db&&s6(t.db,e);e.j==2&&(Q==-3?(t.Z=false,or(t)):Q==-2?(t.d=false,or(t)):Q==-1?or(t):t.db&&s6(t.db,e));}}function w1t(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st;for(n=0;n<t.f.g;n++)if(Ct(t.f,n)>4){for(s=new VP(t.f,1+Ct(t.f,n),false),s.a[Ct(t.f,n)]=0,s.b[Ct(t.f,n)]=0,s.k[Ct(t.f,n)]=32,s.e[Ct(t.f,n)]=n,t.b[n]=true,l=0;l<Ct(t.f,n);l++)Q=_(t.f,n,l),s.a[l]=w.Math.sin(fA*l-I2),s.b[l]=w.Math.cos(fA*l-I2),s.k[l]=32,s.e[l]=Q,t.b[Q]=true,t.c[Nt(t.f,n,l)]=true;CP(t.d,s);}for(et=kn(t.f),Y=0;Y<et.j.a.length;Y++){if(W=G(et.k,Y).length,tt=G(et.j,Y),$=false,(t.e&12)!=0){for($=true,l=0;l<W;l++)if(!W0(t.f,tt[l])){$=false;break;}}if(!$){for(g=false,h=0;h<W;h++)if(Or(t.f,tt[h])==W){g=true;break;}if(g)for(H=G(et.k,Y),Xm(t,tt,H),l=0;l<W;l++)t.b[tt[l]]=true,t.c[H[l]]=true;}}for(f=0;f<t.f.i;f++)if(LA(t.f,f)&&!t.c[f])for(st=x$(t,f),tt=st.a,H=st.b,Xm(t,tt,H),l=0;l<st.a.length;l++)t.b[tt[l]]=true,t.c[H[l]]=true;for(D=0;D<t.f.s;D++)if(!t.c[D]&&dt(t.f,D)==3&&(P=K(t.f,0,D),r=K(t.f,1,D),R=Ct(t.f,P)+Ct(t.f,r),R>2)){for(s=new VP(t.f,R,false),o=0,h=0;h<Ct(t.f,P);h++)Q=_(t.f,P,h),Q!=r&&(s.e[o++]=Q,t.b[Q]=true,t.c[Nt(t.f,P,h)]=true);for(s.e[o++]=P,s.e[o++]=r,T=0;T<Ct(t.f,r);T++)Q=_(t.f,r,T),Q!=P&&(s.e[o++]=Q,t.b[Q]=true,t.c[Nt(t.f,r,T)]=true);for(l=0;l<R;l++)s.a[l]=l,s.b[l]=0,s.k[l]=1;t.b[P]=true,t.b[r]=true,t.c[D]=true,CP(t.d,s);}for(i=0;i<t.f.s;i++)if(!t.c[i]&&dt(t.f,i)==2){for(e=c(F,m,6,t.f.r,15,1),l=0;l<2;l++)if(e[0]=K(t.f,l,i),e[1]=K(t.f,1-l,i),e0(t.f,e[0])==1&&e0(t.f,e[1])==2&&Ct(t.f,e[1])==2){t.b[e[0]]=true,t.b[e[1]]=true,t.c[i]=true,j=1;do{if(C=_(t.f,e[j],0)==e[j-1]?1:0,e[j+1]=_(t.f,e[j],C),e0(t.f,e[j+1])==2&&Ct(t.f,e[j+1])>2)break;t.b[e[j+1]]=true,t.c[Nt(t.f,e[j],C)]=true,++j;}while(e0(t.f,e[j])==2&&Ct(t.f,e[j])==2);for(R=Ct(t.f,e[0])+Ct(t.f,e[j])+j-1,s=new VP(t.f,R,false),v=0;v<=j;v++)s.a[v]=v,s.b[v]=0,s.k[v]=64,s.e[v]=e[v];for(L=j+1,y=false,b=0;b<Ct(t.f,e[0]);b++)Q=_(t.f,e[0],b),Q!=e[1]&&(s.a[L]=-0.5,s.b[L]=y?w.Math.sin(fA):-w.Math.sin(fA),s.k[L]=64,s.e[L]=Q,++L,y=true);for(y=false,k=0;k<Ct(t.f,e[j]);k++)Q=_(t.f,e[j],k),Q!=e[j-1]&&(s.a[L]=j+.5,s.b[L]=y?-w.Math.sin(fA):w.Math.sin(fA),s.k[L]=64,s.e[L]=Q,++L,y=true);CP(t.d,s);}}for(A=0;A<t.f.r;A++)if(Ct(t.f,A)==4){for(S=c(F,m,6,4,15,1),x=c(F,m,6,4,15,1),N=0,h=0;h<4;h++)S[N]=_(t.f,A,h),x[N]=Nt(t.f,A,h),Ct(t.f,S[N])==1&&!t.c[x[N]]&&++N;if(N==2){for(s=new VP(t.f,3,false),l=0;l<2;l++)t.b[S[l]]=true,t.c[x[l]]=true,s.e[l]=S[l],s.k[l]=32;s.a[0]=-0.5,s.b[0]=.866,s.a[1]=.5,s.b[1]=.866,s.a[2]=0,s.b[2]=0,s.k[2]=32,s.e[2]=A,CP(t.d,s);}if(N==3){for(T=0;T<2;T++)dt(t.f,x[T])==1&&(a=S[T],S[T]=S[2],S[2]=a,a=x[T],x[T]=x[2],x[2]=a);for(s=new VP(t.f,4,false),l=0;l<3;l++)t.b[S[l]]=true,t.c[x[l]]=true,s.e[l]=S[l],s.k[l]=32;s.a[0]=-1,s.b[0]=0,s.a[1]=1,s.b[1]=0,s.a[2]=0,s.b[2]=1,s.a[3]=0,s.b[3]=0,s.k[3]=32,s.e[3]=A,CP(t.d,s);}}}function g1t(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct,Xt,St,A1,Qt,bt;if(Ri(t.c),t.d=null,ut(e,63),dt(e,A)!=1||A<e.i&&Ee(e.q,A)||X(e,e.F[0][A])==1||X(e,e.F[1][A])==1||(et=(e.G[A]&128)!=0,et&&(e.q&&A<e.i?TP(e.q,A):0)<6))return  false;for(P=c(Pt,it,6,e.g,16,1),t.a=0,C=0;C<2;C++){for(t.b[C]=e.F[C][A],t.e[C]=e.F[1-C][A];e0(e,t.b[C])==2&&P0(e,t.b[C])==2&&X(e,t.b[C])<10;)for(W=0;W<O(e,t.b[C]);W++)if(i=_(e,t.b[C],W),i!=t.e[C]&&e.D[i]!=1){if(e.k[i]==1||t.a==16)return  false;P[t.b[C]]=true,t.e[C]=t.b[C],t.b[C]=i,++t.a;break;}if($=P0(e,t.b[C]),$>4||$==1)return  false;P[t.b[C]]=true;}for(S=0;S<2;S++)for(W=0;W<O(e,t.b[S]);W++)i=_(e,t.b[S],W),e.D[i]!=1&&(P[i]=true);for(t.g=c(F,m,6,e.g,15,1),L9(e,t.c,P,true,t.g),x=0;x<t.g.length;x++)t.g[x]!=-1&&(t.i[t.g[x]]=x);if(ve(t.c,true),et&&(r=o1(t.c,t.g[t.b[0]],t.g[t.b[1]]),r!=-1)){for(Xe(t.c,r,256,true),Xt=(ut(e,7),e.q),ct=0;ct<Xt.j.a.length;ct++)if(Pf(Xt,ct,A)){for(N=0;N<2;N++)for(W=0;W<O(e,t.b[N]);W++)if(i=_(e,t.b[N],W),i!=t.e[N]&&wA(Xt,ct,i)&&e.D[i]!=1){Xe(t.c,o1(t.c,t.g[t.b[N]],t.g[i]),256,true);break;}}}for(tt=0;tt<2;tt++){for(xP(e,t.b[tt],true)&&w1(t.c,t.g[t.b[tt]],d9,true),D=false,W=0;W<O(e,t.b[tt]);W++)i=_(e,t.b[tt],W),i!=t.e[tt]&&e.D[i]!=1&&(g=o1(t.c,t.g[t.b[tt]],t.g[i]),c1(t.c,g)==8?D=true:e.D[i]==6&&!mn(e,t.b[tt])&&(T=i<e.g&&f0(e.q,i)?2:4,w1(t.c,t.g[i],T,true)),f=Nt(e,t.b[tt],W),St=e.q&&f<e.i?TP(e.q,f):0,(St==3||St==4)&&Xe(t.c,g,St<<17,true),(f<e.i&&Ee(e.q,f)||EA(e,t.b[tt],W)==2)&&($=P0(e,i),j=$==3,!j&&$==2&&(e.v[i]&gn)==0&&(j=ER(e,t.b[1-tt],f)!=-1),j?w1(t.c,t.g[i],R2,true):f<e.i&&Ee(e.q,f)&&w1(t.c,t.g[i],j2,true)),EA(e,t.b[tt],W)==1&&(P0(e,i)==4?w1(t.c,t.g[i],If,true):e.D[i]==6&&w1(t.c,t.g[i],KA,true)));D||(mn(e,t.b[tt])?w1(t.c,t.g[t.b[tt]],2,true):w1(t.c,t.g[t.b[tt]],4,true));}for(ut(t.c,191),R=0;R<2;R++)if(k=t.g[t.b[R]],v0(t.c,k)==3){if(v0(e,t.b[R])==3)return  false;a=lF(t.c,k),g0(t.c,a,257),K(t.c,0,a)!=k&&(mD(t.c,1,a,K(t.c,0,a)),mD(t.c,0,a,k)),ut(t.c,191);}if(s=t.g[t.b[0]],y=t.g[t.b[1]],wt=t.g[t.e[0]],rt=t.g[t.e[1]],Q=De(t.c,s),o=De(t.c,y),O8(t.c,s)&&O8(t.c,y)&&(Q!=0||o!=0)&&(Q!=o||OA(t.c,s)!=OA(t.c,y)))return  false;if(L=false,O8(t.c,s)&&Q!=0&&(Ne(t.c,s,0,-1),L=true),O8(t.c,y)&&o!=0&&(Ne(t.c,y,0,-1),L=true),L&&ut(t.c,191),st=H0(t.c,s),ht=H0(t.c,y),st<ht&&(bt=t.b[0],t.b[0]=t.b[1],t.b[1]=bt,bt=t.e[0],t.e[0]=t.e[1],t.e[1]=bt,bt=s,s=y,y=bt,bt=wt,wt=rt,rt=bt),Y=false,(O8(t.c,s)||O8(t.c,y))&&(O8(t.c,s)?Y=Rh(t.c,s)==1:O8(t.c,y)&&(Y=Rh(t.c,y)==1),Y)){for(n=0;n<t.c.r;n++)de(t.c,n,-mt(t.c,n));ut(t.c,191);}return l=sR(t,s,wt),h=sR(t,y,rt),t.f[0]=l==-1?-1:t.i[l],t.f[1]=h==-1?-1:t.i[h],H=ik(t.c),H==null?false:(v=PR(t,s,wt),b=PR(t,y,rt),v==0&&b==0&&(t.c.J&GP)==q0?Qt=2:Qt=FE[v][b],A1=Qt==0?Y?"<":">":Qt==1?Y?"-":"+":Qt==3?"=":"",t.d=H+A1,true);}function d1t(t,e){var A,n,P;s8();var r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct,Xt,St,A1,Qt,bt,yt,Jt,S1,D1;for(v=new rp(e),T=new PM(e,v),D1=c(MS,DA,477,e.r,0,2),wt=1;wt<e.r;wt++)D1[wt]=c(MS,{4:1,5:1,8:1,478:1,477:1},84,wt,0,1);for(h=0;h<e.s;h++)Q=t9(e.F[0][h],e.F[1][h]),GQ(D1,Q,Q,v.a[h],10);for(s=0;s<e.g;s++)for(rt=1;rt<e.e[s];rt++)for(S=e.j[s][rt],tt=e.n[s][rt],g=v.a[tt],Qt=0;Qt<rt;Qt++)x=e.j[s][Qt],H=e.n[s][Qt],r=rt<Qt?T.a[s][Qt][rt]:T.a[s][rt][Qt],k=v.a[H],et=w.Math.sqrt(g*g+k*k-2*g*k*w.Math.cos(r)),yt=c(F,m,6,1,15,1),yt[0]=s,GQ(D1,t9(S,x),yt,et,5);for(l=0;l<e.s;l++)if(!(l<e.i&&Ee(e.q,l)||(e.G[l]&64)!=0&&(e.q&&l<e.i?TP(e.q,l):0)<=5)){for(Q=c(F,m,6,2,15,1),rt=0;rt<2;rt++)Q[rt]=e.F[rt][l];if(e.e[Q[0]]>1&&e.e[Q[1]]>1){if(dt(e,l)==3){for(et=v.a[l],S1=c(F,m,6,2,15,1),ct=0;ct<2;ct++)for(Qt=0;Qt<e.e[Q[ct]];Qt++)if(N=e.n[Q[ct]][Qt],N!=l){et+=v.a[N],S1[ct]=e.j[Q[ct]][Qt];break;}yt=c(F,m,6,2,15,1),yt[0]=Q[0],yt[1]=Q[1],GQ(D1,t9(S1[0],S1[1]),yt,et,3);}else if(dt(e,l)==2&&e.p[Q[0]]==1&&e.p[Q[1]]==1&&(e.G[l]&3)!=3){for(C=c(F,u0,7,2,0,2),N=c(F,u0,7,2,0,2),R=c(Ut,c0,15,2,0,2),ct=0;ct<2;ct++){for(C[ct]=c(F,m,6,e.e[Q[ct]]-1,15,1),N[ct]=c(F,m,6,e.e[Q[ct]]-1,15,1),R[ct]=c(Ut,Tt,6,e.e[Q[ct]]-1,15,1),W=-1,Qt=0;Qt<e.e[Q[ct]];Qt++)if(e.j[Q[ct]][Qt]==Q[1-ct]){W=Qt;break;}for(Y=0,bt=0;bt<e.e[Q[ct]];bt++)bt!=W&&(C[ct][Y]=e.j[Q[ct]][bt],N[ct][Y]=e.n[Q[ct]][bt],R[ct][Y]=Nu(T,Q[ct],W,bt),++Y);}for(Xt=0;Xt<C[0].length;Xt++)for(Qt=0;Qt<C[1].length;Qt++)St=(e.G[l]&3)==1,C[0].length==2&&C[0][Xt]>C[0][1-Xt]&&(St=!St),C[1].length==2&&C[1][Qt]>C[1][1-Qt]&&(St=!St),A=v.a[l]-v.a[N[0][Xt]]*w.Math.cos(R[0][Xt])-v.a[N[1][Qt]]*w.Math.cos(R[1][Qt]),n=v.a[N[0][Xt]]*w.Math.sin(R[0][Xt]),St?n+=v.a[N[1][Qt]]*w.Math.sin(R[1][Qt]):n-=v.a[N[1][Qt]]*w.Math.sin(R[1][Qt]),P=c(F,m,6,2,15,1),P[0]=e.F[0][l],P[1]=e.F[1][l],GQ(D1,t9(C[0][Xt],C[1][Qt]),P,w.Math.sqrt(A*A+n*n),3);}else if(dt(e,l)!=0){for(Jt=c(F,m,6,2,15,1),ct=0;ct<2;ct++)for(Qt=0;Qt<e.e[Q[ct]];Qt++)if(e.j[Q[ct]][Qt]==Q[1-ct]){Jt[ct]=Qt;break;}for(Xt=0;Xt<e.e[Q[0]];Xt++)if(Xt!=Jt[0])for(Qt=0;Qt<e.e[Q[1]];Qt++)Qt!=Jt[1]&&(e.p[Q[0]]==0&&e.p[Q[1]]==0?ya(e.j[Q[0]][Xt],e.j[Q[1]][Qt],e.n[Q[0]][Xt],e.n[Q[1]][Qt],Nu(T,Q[0],Jt[0],Xt),Nu(T,Q[1],Jt[1],Qt),l,v,D1,e):b$(e.j[Q[0]][Xt],e.j[Q[1]][Qt],e.n[Q[0]][Xt],e.n[Q[1]][Qt],Nu(T,Q[0],Jt[0],Xt),Nu(T,Q[1],Jt[1],Qt),l,v,D1,e));}}}for(y=0;y<e.g;y++)if(e.p[y]==2&&e.k[y]==2&&e.o[y][0]==2&&e.o[y][1]==2){for(o=e.j[y][0],L=e.j[y][1],rt=0;rt<e.e[o];rt++)if(b=e.j[o][rt],b!=y)for(Qt=0;Qt<e.e[L];Qt++)j=e.j[L][Qt],j!=y&&(i=zm(T,o,y,b),f=zm(T,L,y,j),g=pr(v,e.n[o][rt]),k=pr(v,e.n[L][Qt]),$=pr(v,e.n[y][0])+pr(v,e.n[y][1])-g*w.Math.cos(i)-k*w.Math.cos(f),a=g*w.Math.sin(i),st=k*w.Math.sin(f),yt=c(F,m,6,2,15,1),yt[0]=o,yt[1]=L,GQ(D1,t9(b,j),yt,w.Math.sqrt($*$+a*a+st*st),3));}for(D=0;D<e.r;D++)J$(D1,D,e,v);for(RY(D1,e),ht=1;ht<e.r;ht++)for(A1=0;A1<ht;A1++)D1[ht][A1].a!=null&&t.a.push(D1[ht][A1]);}function k6(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$;Y=null,Q=null;try{if(t.f=null,t.j&&(Ri(t.j),ve(t.j,!1)),v=T=X1(e),v==null||(T=X1(e))==null||(T=X1(e))==null||(t.k=T.includes("From CSD data. Using bond type 'Any'"),t.e=T.includes("From CSD data."),(T=X1(e))==null))return !1;t.g=!1,t.d=t.a;try{b=L1(k1((Mt(0,3,T.length),T.substr(0,3))),f1,Et),j=L1(k1((Mt(3,6,T.length),T.substr(3,3))),f1,Et),R=qr(k1((Mt(6,9,T.length),T.substr(6,3)))),t.d=t.d|qr(k1((Mt(12,15,T.length),T.substr(12,3))))==1,t.g=T.length>=39&&T.startsWith("V3000",34);}catch(a){if(a=_1(a),Yt(a,19))return !1;throw At(a);}if(t.g)return S=Za(t,e),iu(t.j,v),S;if(!t.j&&(t.j=new SA(b,j)),iu(t.j,v),t.d||(t.j.M=!0),b==0){for(;T!=null&&!(e1(T,hr)||e1(T,Uo)||e1((zt(1,T.length+1),T.substr(1)),"$"));)T=X1(e);return !0;}for(y=0;y<b;y++){if((T=X1(e))==null)return !1;A=(et=sn(k1((Mt(0,10,T.length),T.substr(0,10)))),W=sn(k1((Mt(10,20,T.length),T.substr(10,10)))),$=sn(k1((Mt(20,30,T.length),T.substr(20,10)))),te(t.j,et,-W,-$)),RX(t,A,T),k=qr(k1((Mt(34,36,T.length),T.substr(34,2)))),k!=0&&O9(t.j,A,(J1(),wr)[X(t.j,A)]+k),i=qr(k1((Mt(36,39,T.length),T.substr(36,3)))),i!=0&&(i==4?Je(t.j,A,32):b0(t.j,A,4-i)),g=T.length<63?0:qr(k1((Mt(60,63,T.length),T.substr(60,3)))),tA(t.j,A,g,!1),vW(t,A,T),H=T.length<51?0:qr(k1((Mt(48,51,T.length),T.substr(48,3)))),H!=0&&(Y==null&&(Y=c(F,m,6,b,15,1)),Y[A]=H);}for(l=0;l<j;l++){if((T=X1(e))==null)return !1;n=L1(k1((Mt(0,3,T.length),T.substr(0,3))),f1,Et)-1,P=L1(k1((Mt(3,6,T.length),T.substr(3,3))),f1,Et)-1,r=L1(k1((Mt(6,9,T.length),T.substr(6,3))),f1,Et),N=T.length<12?0:qr(k1((Mt(9,12,T.length),T.substr(9,3)))),tt=T.length<18?0:qr(k1((Mt(15,18,T.length),T.substr(15,3)))),r==8&&(t.k||Ae(t.j,n)||Ae(t.j,P))&&(r=9),bR(t,n,P,r,N,tt);}for(s=0;s<R;s++)if((T=X1(e))==null)return !1;if((T=X1(e))==null)return (t.i&1)!=0&&(t.f=Tu(t.j)),Db(t,Y),t.d||ut(t.j,15),!0;for(;T!=null&&!(e1(T,hr)||e1(T,Uo));)yW(t,T),lW(t,T),l_(t,T),D$(t,T),Q_(t,T),K_(t,T),HW(t,T),(T.startsWith("M  SAL")&&T.length>=17||T.startsWith("M  SDT")&&T.length>=12||T.startsWith("M  SED")&&T.length>=12)&&(!Q&&(Q=new cP()),x=(Mt(7,10,T.length),T.substr(7,3)),f=(h=x,t8(e9(Q,h))),f||(f=new tu(),We(Q,x,f)),T.startsWith("M  SAL")&&T.startsWith("  1",10)?f.a=L1(k1((Mt(13,17,T.length),T.substr(13,4))),f1,Et):T.startsWith("M  SDT")?f.b=(zt(11,T.length+1),T.substr(11)).startsWith(Sy):T.startsWith("M  SED")&&(f.c=k1((zt(11,T.length+1),T.substr(11))))),T=X1(e);}catch(a){if(a=_1(a),Yt(a,19))return o=a,ur(o,(q1(),k9)),false;throw At(a);}if(Q)for(D=(C=new oD(Q).a.ad().Tb(),new UD(C));D.a.cd();)f=(L=D.a.dd(),L.jd()),f.b&&f.a!=0&&f.c!=null&&IP(t.j,f.a-1,f.c);return t.e&&(t_(t),y$(t)),(t.i&1)!=0&&(t.f=Tu(t.j)),Db(t,Y),ut(t.j,15),true;}function PM(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C;for(this.b=e,this.e=t,this.a=c(Oe,DA,480,this.e.g,0,3),P=0;P<this.e.g;P++)for(this.a[P]=c(Oe,{480:1,4:1,9:1,5:1,8:1},46,Ct(this.e,P),0,2),D=1;D<Ct(this.e,P);D++)this.a[P][D]=c(Oe,uA,6,D,15,1);for(this.c=c(F,m,6,this.e.g,15,1),this.d=c(Oe,uA,6,this.e.g,15,1),this.f=c(F,m,6,this.e.i,15,1),R=kn(this.e),s=c(Pt,it,6,R.j.a.length,16,1),Py(R,s,c(Pt,it,6,R.j.a.length,16,1),c(F,m,6,R.j.a.length,15,1),true),f=3;f<=7;f++)for(g=0;g<R.j.a.length;g++)C=G(R.k,g).length,C==f&&(s[g]?Ett(this,g):C<=4&&_Z(this,g));for(L=c(Pt,it,6,this.e.g,16,1),T=0;T<R.j.a.length;T++)if(s[T])for(v=G(R.j,T),b=0,j=v.length;b<j;++b)k=v[b],L[k]=true;for(r=B(d(F,1),m,6,15,[0,0,1,3,6,10,15,21]),n=0;n<this.e.g;n++){if(i=Ct(this.e,n),i>4){for(D=1;D<i;D++)for(l=0;l<D;l++)this.a[n][D][l]=D4;this.c[n]=r[i];continue;}if(this.c[n]!=r[i])if(pU(this.e,n)&&(L[n]||Or(this.e,n)<=4&&e0(this.e,n)>0)){if(i>2){if(this.c[n]==1)X(this.e,n)<=14?A=(CM-this.d[n])/2:A=HM+(HM-this.d[n])*.18000000715255737;else if(A=CM-this.d[n],i>3){if(this.c[n]==2){for(y=c(Pt,it,6,Ct(this.e,n),16,1),Q=1;Q<i;Q++)for(h=0;h<Q;h++)this.a[n][Q][h]!=0&&(y[Q]=!y[Q],y[h]=!y[h]);for(o=0;o<i;o++)if(y[o]){for(h=o+1;h<i;h++)if(y[h]){this.a[n][h][o]=A;break;}break;}}A=D4;}for(D=1;D<i;D++)for(l=0;l<D;l++)this.a[n][D][l]==0&&(this.a[n][D][l]=A);}}else if(pU(this.e,n)&&Or(this.e,n)<=4)switch(XX(this,n)){case 771:y0(this,n,0,3,2.0653998851776123),y0(this,n,0,0,1.9814722631346626);break;case 1028:y0(this,n,0,4,1.9797999858856201),y0(this,n,0,0,1.94691481878138);break;case 393987:y0(this,n,0,3,VM),y0(this,n,0,6,VM),y0(this,n,3,3,1.7229016938441077);break;case 459779:y0(this,n,0,3,u4),y0(this,n,0,4,u4),y0(this,n,0,7,u4),y0(this,n,3,4,1.9322539839360076);break;case 525316:y0(this,n,0,4,EM),y0(this,n,0,8,EM),y0(this,n,4,4,1.99944913298566);case 394758:y0(this,n,0,6,2.526099920272827);break;case 460550:y0(this,n,0,6,SM),y0(this,n,0,7,SM);break;case 526087:y0(this,n,0,7,IM),y0(this,n,0,8,IM);break;case 526344:y0(this,n,0,8,2.186300039291382);break;case 50529027:y0(this,n,3,3,2.4189000129699707);break;case 67371779:y0(this,n,3,4,2.2298998832702637);break;case 67372036:y0(this,n,4,4,2.094399929046631);break;case 101057283:y0(this,n,3,6,1.839926051241747),y0(this,n,3,3,2.9061476191098734);break;case 117834755:y0(this,n,3,4,2.812249087174905),y0(this,n,3,7,1.7910569124592968),y0(this,n,4,6,2.1224948975613245);break;case 134677507:y0(this,n,3,4,2.642428360523752),y0(this,n,3,8,2.027723514585844),y0(this,n,4,7,2.251474717631936);break;case 117900035:y0(this,n,3,7,2.109753935530918),y0(this,n,3,3,3.1052897491356646);break;case 117900292:y0(this,n,4,7,2.090729910747413),y0(this,n,4,4,2.551671293386306);break;case 134743044:y0(this,n,4,8,2.139250042271712),y0(this,n,4,4,2.3520055858942612);}else for(A=X(this.e,n)>10?xM:e0(this.e,n)==2?S2:xP(this.e,n,true)?NM:e0(this.e,n)==0?xM:NM,D=1;D<i;D++)for(l=0;l<D;l++)this.a[n][D][l]=A;}}function B1t(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j;for(t.A=e,t.a=A,L=Bt(w.Math.round((Re==-1&&(Re=globalThis.devicePixelRatio||1),Re*8))),s=B(d(F,1),m,6,15,[L,L/2|0,L*3/2|0,L/2|0,L/2|0,L/2|0,L/2|0,L/2|0,L/2|0,L/2|0,L/2|0,L/2|0,L*3/2|0,L/4|0,L/2|0,L/2|0,L/4|0]),y=B(d(F,1),m,6,15,[L*3/2|0,L/2|0]),l=B(d(F,1),m,6,15,[L,-2,L,-2,L]),j=c(F,m,6,1+2*s.length+(n?2*y.length:0),15,1),T=0,i=s,D=0,o=i.length;D<o;++D)P=i[D],j[T++]=P,j[T++]=-2;if(n)for(r=y,f=0,Q=r.length;f<Q;++f)P=r[f],j[T++]=P,j[T++]=-2;for(j[T++]=L,iL(t.v,l,j),t.b=Un(t.v,"Any atomic number"),YP(t.b,t),ke(t.v,t.b,1,1,3,1),t.w=he(t.v,k4),t.D=$u(t.v,16,1),D0(t.v,t.w,1,3),D0(t.v,t.D,3,3),t.g=TA(t.v),Gt(t.g,j8),Gt(t.g,"is aromatic"),Gt(t.g,"is hetero-aromatic"),Gt(t.g,"is not aromatic"),D0(t.v,he(t.v,"Aromaticity:"),1,5),D0(t.v,t.g,3,5),t.s=TA(t.v),Gt(t.s,j8),Gt(t.s,"0 (not in a ring)"),Gt(t.s,"0 or 2 (0 or 1 ring)"),Gt(t.s,">=2 (any ring count)"),Gt(t.s,"2 (in 1 ring)"),Gt(t.s,"3 (bridge head; 2 rings)"),Gt(t.s,">3 (in more than 2 rings)"),D0(t.v,he(t.v,"Ring bonds:"),1,7),D0(t.v,t.s,3,7),t.t=TA(t.v),Gt(t.t,j8),Gt(t.t,"3 members"),Gt(t.t,"4 members"),Gt(t.t,"5 members"),Gt(t.t,"6 members"),Gt(t.t,"7 members"),D0(t.v,he(t.v,"Smallest ring size:"),1,9),D0(t.v,t.t,3,9),t.r=TA(t.v),k=HE,v=0,b=k.length;v<b;++v)g=k[v],Gt(t.r,g);for(D0(t.v,he(t.v,"Any ring size:"),1,11),D0(t.v,t.r,3,11),t.i=TA(t.v),Gt(t.i,j8),Gt(t.i,"not charged"),Gt(t.i,"has negative charge"),Gt(t.i,"has positive charge"),D0(t.v,he(t.v,"Charge:"),1,13),D0(t.v,t.i,3,13),t.n=TA(t.v),Gt(t.n,j8),Gt(t.n,$y),Gt(t.n,ay),Gt(t.n,"exactly 3"),Gt(t.n,m4),Gt(t.n,XV),Gt(t.n,tl),Gt(t.n,b4),Gt(t.n,j4),Gt(t.n,ZV),Gt(t.n,R4),Gt(t.n,"1,2, or 3"),Gt(t.n,"2 or 3"),D0(t.v,he(t.v,"Non-H neighbours:"),1,15),D0(t.v,t.n,3,15),t.j=TA(t.v),Gt(t.j,j8),Gt(t.j,"exactly 0"),Gt(t.j,$y),Gt(t.j,ay),Gt(t.j,"exactly 3"),Gt(t.j,WV),Gt(t.j,m4),Gt(t.j,XV),Gt(t.j,tl),Gt(t.j,b4),Gt(t.j,j4),Gt(t.j,ZV),Gt(t.j,R4),Gt(t.j,"1,2, or 3"),Gt(t.j,"2 or 3"),D0(t.v,he(t.v,"Electroneg. neighbours:"),1,17),D0(t.v,t.j,3,17),t.k=TA(t.v),Gt(t.k,j8),Gt(t.k,"none"),Gt(t.k,$y),Gt(t.k,ay),Gt(t.k,tl),Gt(t.k,b4),Gt(t.k,j4),Gt(t.k,WV),Gt(t.k,m4),Gt(t.k,R4),D0(t.v,he(t.v,"Hydrogen count:"),1,19),D0(t.v,t.k,3,19),t.p=TA(t.v),Gt(t.p,j8),Gt(t.p,"none"),Gt(t.p,$y),Gt(t.p,ay),Gt(t.p,tl),D0(t.v,he(t.v,"Pi-electron count:"),1,21),D0(t.v,t.p,3,21),t.o=TA(t.v),Gt(t.o,j8),h=1;h<15;h++)Gt(t.o,""+(h-7));D0(t.v,he(t.v,"Oxidation state:"),1,23),D0(t.v,t.o,3,23),t.c=Un(t.v,"prohibit further substitution"),YP(t.c,t),ke(t.v,t.c,1,25,3,25),t.f=Un(t.v,"require further substitution"),YP(t.f,t),ke(t.v,t.f,1,27,3,27),t.u=TA(t.v),Gt(t.u,j8),Gt(t.u,"is a stereo center"),Gt(t.u,"is not a stereo center"),D0(t.v,he(t.v,"Stereo center:"),1,29),D0(t.v,t.u,3,29),t.e=Un(t.v,"match stereo center"),ke(t.v,t.e,1,31,3,31),t.d=Un(t.v,"is part of exclude group"),ke(t.v,t.d,1,33,3,33),n&&(ke(t.v,he(t.v,"Stereo center hint for product:"),1,35,3,35),t.q=TA(t.v),Gt(t.q,"Copy from generic product"),Gt(t.q,"Keep reactant configuration"),Gt(t.q,"Invert reactant configuration"),Gt(t.q,"Racemise configuration"),ke(t.v,t.q,1,37,3,37)),ut(t.A,31),s1t(t);}function rM(){var t,e,A,n;for(this.b=c(wE,A0,18,120,0,1),this.c=new Jn(),this.d=new Jn(),_4=B(d(wE,1),A0,18,0,[new It(1,"Hydrogen","H",2.2),new It(2,"Helium","He",0),new It(3,"Lithium","Li",.98),new It(4,"Beryllium","Be",1.57),new It(5,"Boron","B",2.04),new It(6,"Carbon","C",2.55),new It(7,"Nitrogen","N",3.04),new It(8,"Oxygen","O",3.44),new It(9,"Fluorine","F",3.98),new It(10,"Neon","Ne",0),new It(11,"Sodium","Na",.93),new It(12,"Magnesium","Mg",1.31),new It(13,"Aluminum","Al",1.61),new It(14,"Silicon","Si",1.9),new It(15,"Phosphorus","P",2.19),new It(16,"Sulfur","S",2.58),new It(17,"Chlorine","Cl",3.16),new It(18,"Argon","Ar",0),new It(19,"Potassium","K",1),new It(20,"Calcium","Ca",1.36),new It(21,"Scandium","Sc",1.54),new It(22,"Titanium","Ti",1.63),new It(23,"Vanadium","V",1.66),new It(24,"Chromium","Cr",1.55),new It(25,"Manganese","Mn",1.83),new It(26,"Iron","Fe",1.88),new It(27,"Cobalt","Co",1.91),new It(28,"Nickel","Ni",1.9),new It(29,"Copper","Cu",1.65),new It(30,"Zinc","Zn",1.81),new It(31,"Gallium","Ga",2.01),new It(32,"Germanium","Ge",0),new It(33,"Arsenic","As",2.18),new It(34,"Selenium","Se",2.55),new It(35,"Bromine","Br",0),new It(36,"Krypton","Kr",2.96),new It(37,"Rubidium","Rb",0),new It(38,"Strontium","Sr",.82),new It(39,"Yttrium","Y",.95),new It(40,"Zirconium","Zr",1.22),new It(41,"Niobium","Nb",1.33),new It(42,"Molybdenum","Mo",1.6),new It(43,"Technetium","Tc",2.16),new It(44,"Ruthenium","Ru",1.9),new It(45,"Rhodium","Rh",2.2),new It(46,"Palladium","Pd",2.28),new It(47,"Silver","Ag",2.2),new It(48,"Cadmium","Cd",1.93),new It(49,"Indium","In",1.69),new It(50,"Tin","Sn",1.78),new It(51,"Antimony","Sb",1.96),new It(52,"Tellurium","Te",0),new It(53,"Iodine","I",2.05),new It(54,"Xenon","Xe",2.1),new It(55,"Cesium","Cs",2.66),new It(56,"Barium","Ba",2.6),new It(57,"Lanthanum","La",.79),new It(58,"Cerium","Ce",.89),new It(59,"Praesodymium","Pr",1.1),new It(60,"Neodymium","Nd",1.12),new It(61,"Promethium","Pm",1.13),new It(62,"Samarium","Sm",1.14),new It(63,"Europium","Eu",0),new It(64,"Gadolinium","Gd",1.17),new It(65,"Terbium","Tb",0),new It(66,"Dyprosium","Dy",1.2),new It(67,"Holmium","Ho",0),new It(68,"Erbium","Er",1.22),new It(69,"Thulium","Tm",1.23),new It(70,"Ytterbium","Yb",1.24),new It(71,"Lutetium","Lu",1.25),new It(72,"Hafnium","Hf",0),new It(73,"Tantalium","Ta",1.27),new It(74,"Wolfram","W",1.3),new It(75,"Rhenium","Re",1.5),new It(76,"Osmium","Os",2.36),new It(77,"Iridium","Ir",1.9),new It(78,"Platinum","Pt",2.2),new It(79,"Gold","Au",2.2),new It(80,"Mercury","Hg",2.28),new It(81,"Thallium","Tl",2.54),new It(82,"Lead","Pb",2),new It(83,"Bismuth","Bi",1.62),new It(84,"Polonium","Po",2.33),new It(85,"Astatine","At",2.02),new It(86,"Radon","Rn",2),new It(87,"Francium","Fr",2.2),new It(88,"Radium","Ra",0),new It(89,"Actinium","Ac",.7),new It(90,"Thorium","Th",.89),new It(91,"Protactinium","Pa",1.1),new It(92,"Uranium","U",1.3),new It(93,"Neptunium","Np",1.5),new It(94,"Plutonium","Pu",1.38),new It(95,"Americium","Am",1.36),new It(96,"Curium","Cm",1.28),new It(97,"Berkelium","Bk",1.3),new It(98,"Californium","Cf",1.3),new It(99,"Einsteinium","E",1.3),new It(100,"Fermium","Fm",1.3),new It(101,"Mendelevium","Mv",1.3)]),e=_4,A=0,n=e.length;A<n;++A)t=e[A],this.b[t.c]=t,qD(this.c,t.b,t),qD(this.d,t.d.toLowerCase(),t);this.a=c(Pt,it,6,_4.length,16,1),this.a[3]=true,this.a[11]=true,this.a[19]=true,this.a[37]=true,this.a[55]=true,this.a[87]=true;}function v1t(t,e,A,n){var P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct,Xt,St,A1,Qt,bt,yt,Jt,S1,D1,Q1,Lt,pt,U0,V1,l0,m1,F1,T0,Y0,ZA,M0,B1,Ue,$e,kA,kr,M8,sP,yP,rn,mr,Kn,fn;for(S=ph(t.c,n),B1=new _A(),h=0,T=0,Kn=null,ht=0;ht<t.o.length;ht++){for(x=C9(t.c,ht),ut(t.o[ht],1),m1=G(e[ht],A[ht]),l0=c(F,m,6,t.o[ht].g,15,1),v=c(Pt,it,6,t.o[ht].g,16,1),b=c(Pt,it,6,t.o[ht].i,16,1),Qt=0;Qt<x.g;Qt++)if(m1[Qt]!=-1)if(w.Math.abs(x.A[Qt])==0){for(j=m1[Qt],v[j]=true,pt=0;pt<O(t.o[ht],j);pt++)b[Nt(t.o[ht],j,pt)]=true;for(Lt=Ct(t.o[ht],j);Lt<Le(t.o[ht],j);Lt++)b[Nt(t.o[ht],j,Lt)]=true;}else l0[m1[Qt]]=w.Math.abs(x.A[Qt]);for(bt=0;bt<x.i;bt++)if(L=x.F[0][bt],s=x.F[1][bt],w.Math.abs(x.A[L])!=0&&w.Math.abs(x.A[s])!=0&&(f=m1[L],D=m1[s],f!=-1&&D!=-1)){for(Lt=0;Lt<t.o[ht].i;Lt++)if(K(t.o[ht],0,Lt)==f&&K(t.o[ht],1,Lt)==D||K(t.o[ht],0,Lt)==D&&K(t.o[ht],1,Lt)==f){b[Lt]=true;break;}}for(Y0=c(F,m,6,t.o[ht].g,15,1),yt=0;yt<t.o[ht].g;yt++)if(!v[yt]&&(Y0[yt]=Nn(t.o[ht],B1,yt,h,T),t.b&&tA(B1,Y0[yt],t.p[ht][A[ht]][yt],false),l0[yt]!=0)){for(tA(B1,Y0[yt],l0[yt],false),Lt=0;Lt<S.g;Lt++)if(w.Math.abs(S.A[Lt])==l0[yt]){if(b0(B1,Y0[yt],S.t[Lt]),Je(B1,Y0[yt],S.v[Lt]&48),t.f[n][Lt])if(M0=v0(t.o[ht],yt),$e=V(S.C[Lt],k8),z($e,0)==0)me(B1,Y0[yt],3,false);else if(z($e,k8)==0)!Kn&&(Kn=new n1()),Ft(Kn,U1(Y0[yt]));else if(M0==1||M0==2){for(rt=z($e,Fo)==0,U0=0;U0<O(t.o[ht],yt);U0++)if(y=_(t.o[ht],yt,U0),v[y])for(V1=0;V1<O(t.o[ht],yt);V1++)ZA=_(t.o[ht],yt,V1),!v[ZA]&&ZA>y&&(rt=!rt);rt&&(M0=M0==1?2:1),me(B1,Y0[yt],M0,false);}else me(B1,Y0[yt],0,false);break;}}for(Jt=0;Jt<t.o[ht].i;Jt++)b[Jt]||yQ(t.o[ht],B1,Jt,h,T,Y0,true);h=ne(B1,1),T=ne(B1,2);}for(T0=c(F,m,6,S.g,15,1),S1=0;S1<S.g;S1++)if(l0=w.Math.abs(S.A[S1]),l0==0)T0[S1]=Nn(S,B1,S1,h,T);else for(Lt=0;Lt<B1.r;Lt++)if(w.Math.abs(B1.A[Lt])==l0){T0[S1]=Lt;break;}if(t.r)for(Qt=0;Qt<S.g;Qt++)Wn(B1,T0[Qt],true),de(B1,T0[Qt],S.K[Qt].a),Ve(B1,T0[Qt],S.K[Qt].b);for(N=0;N<S.i;N++)if((S.H[N]&d8)==0&&(Ue=o9(S,B1,N,h,T,T0[S.F[0][N]],T0[S.F[1][N]],false),kA=S.H[N]&31,kA!=0))for(C=false,Xe(B1,Ue,31,false),tt=M1(S,S.F[0][N]),H=M1(S,S.F[1][N]),st=0;!C&&st<t.c.g.a.length;st++)for(x=C9(t.c,st),W=0;!C&&W<x.i;W++)Y=x.F[0][W],et=x.F[1][W],$=w.Math.abs(x.A[Y]),a=w.Math.abs(x.A[et]),$!=0&&a!=0&&($==tt&&a==H||$==H&&a==tt)&&(C=true,fn=x.H[W]&31,fn!=0&&(m1=G(e[st],A[st]),M8=m1[Y],sP=m1[et],yP=o1(t.o[st],M8,sP),mr=c1(t.o[st],yP),rn=dt(t.o[st],yP),fn&=7,kA&=7,fn==3&&kA==6?(B1.I[Ue]=rn<=1?2:4,B1.U=0):fn==6&&kA==3?(B1.I[Ue]=rn==3?2:1,B1.U=0):(B1.I[Ue]=mr,B1.U=0)));for(ut(B1,1),g=false,D1=0;D1<S.g;D1++)w.Math.abs(S.A[D1])==0?(M0=A6(S,D1,T0),me(B1,T0[D1],M0,false)):t.f[n][D1]&&u_(t,S,D1,B1,T0[D1])&&(M0=A6(S,D1,T0),me(B1,T0[D1],M0,false),(M0==1||M0==2)&&(k=(S.v[D1]&b1)>>18,l=(S.v[D1]&b1)>>18!=1&&(S.v[D1]&b1)>>18!=2?-1:(S.v[D1]&VA)>>20,k==1?l+=h:k==2&&(l+=T),Ne(B1,T0[D1],k,l),g=true));for(g&&(h=ne(B1,1),T=ne(B1,2)),kr=c(Pt,it,6,S.r,16,1),Q1=0;Q1<S.g;Q1++)t.f[n][Q1]&&!kr[Q1]&&(S.v[Q1]&4)!=0&&n0(V(S.C[Q1],k8),0)&&S.k[Q1]==B1.k[T0[Q1]]&&H_(S,Q1,B1,T0);for(wt=c(Pt,it,6,B1.r,16,1),Xt=T0,St=0,A1=Xt.length;St<A1;++St)ct=Xt[St],wt[ct]=true;for(R=true;R;)for(R=false,o=0;o<B1.s;o++)f=B1.F[0][o],D=B1.F[1][o],wt[f]&&!wt[D]?(wt[D]=true,R=true):wt[D]&&!wt[f]&&(wt[f]=true,R=true);for(i=0;i<B1.r;i++)vP(B1,i,!wt[i]);if(UQ(B1),!t.b)for(Q=0;Q<B1.r;Q++)B1.A[Q]=0;if(jf(new p9(B1),null,false),B1.U|=8,F1=2|(t.r?8:0),U9(new a8(F1),B1),Kn)for(ut(B1,15),r=new Zt(Kn);r.a<r.c.a.length;)P=_t(r).a,(B1.v[P]&wn)!=0&&(me(B1,P,1,false),Ne(B1,P,1,h++));return B1;}function F1t(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l;switch(t.hb=e.g,t.kb=e.i,t.w){case 18:if(y=t.hb,l=t.kb,t.e=tn(t.V,t.hb,t.kb),t.e!=-1&&(t.hb=mt(t.V,t.e),t.kb=Rt(t.V,t.e)),Nb(t.V,y,l),t.I)for(f=new Zt(t.I);f.a<f.c.a.length;)i=_t(f),i.Qb(y,l);K1(t),t.X=7;break;case 2:if(t.X=0,t.e=tn(t.V,t.hb,t.kb),t.e!=-1&&(t.f=-1,t.hb=mt(t.V,t.e),t.kb=Rt(t.V,t.e),i0(t.V,t.e)?t.X=t.Z?9:4:t.X=3),t.X==0&&(P=kf(t.V,t.hb,t.kb),P!=-1&&(t.e=K(t.V,0,P),t.f=K(t.V,1,P),bP(t.V,P)?t.X=t.Z?9:4:t.X=3)),t.X==0&&t.v&&(t.v.g?t.X=t.Z?9:4:t.X=t.Z&&!Yt(t.v,64)?11:10),t.X!=0){for(t.gb=c(Ut,Tt,6,t.V.r,15,1),t.jb=c(Ut,Tt,6,t.V.r,15,1),D=0;D<t.V.r;D++)t.gb[D]=mt(t.V,D),t.jb[D]=Rt(t.V,D);if(t.I)for(f=new Zt(t.I);f.a<f.c.a.length;)i=_t(f),QY(i,t.hb,t.kb);K1(t);break;}if(e.a?t.X=6:(t.R=new QF(),Ie(t.R,t.hb,t.kb),Ie(t.R,t.hb,t.kb),t.X=5),t.P=c(Pt,it,6,t.V.r,16,1),t.I&&(t.Q=c(Pt,it,6,t.I.a.length,16,1)),t.O=e.f,t.O){for(Q=0;Q<t.V.r;Q++)t.P[Q]=i0(t.V,Q);if(t.I)for(D=0;D<t.I.a.length;D++)t.Q[D]=G(t.I,D).g;}else {for(L=false,Q=0;Q<t.V.r;Q++)i0(t.V,Q)&&(vP(t.V,Q,false),L=true);if(t.I)for(D=0;D<t.I.a.length;D++)G(t.I,D).g&&(G(t.I,D).g=false,L=true);L&&(t.eb=1,P1(t.k));}break;case 4:K1(t),FX(t,t.hb,t.kb);break;case 3:s=tn(t.V,t.hb,t.kb),s!=-1&&(K1(t),rL(t.V,s,!E9(t.V,s)),t.eb=w.Math.max(t.eb,1),P1(t.k),N1(t,new x1(t,1,true)));break;case 101:case 103:case 102:t.u!=-1&&tO(t,t.u)&&(K1(t),Qtt(t,t.u,t.w==101?0:t.w==103?1:2),t.eb=w.Math.max(t.eb,1),P1(t.k),N1(t,new x1(t,1,true)));break;case 5:case 6:case 23:if(t.e=tn(t.V,t.hb,t.kb),t.e==-1){if(n=kf(t.V,t.hb,t.kb),n!=-1){K1(t),r=511,t.w==6?r=257:t.w==23&&(r=129),h8(t.V,n,r)&&(t.eb=w.Math.max(t.eb,1),P1(t.k),N1(t,new x1(t,1,true)));break;}}else {if(Le(t.V,t.e)==8)return;t.hb=mt(t.V,t.e),t.kb=Rt(t.V,t.e);}t.X=1,L6(t,t.e),P1(t.k);break;case 22:if(t.e=tn(t.V,t.hb,t.kb),t.e!=-1){if(Le(t.V,t.e)==8)return;t.hb=mt(t.V,t.e),t.kb=Rt(t.V,t.e);}t.X=2,t.q=0;break;case 7:K1(t),wf(t.V,t.hb,t.kb,3,false,Qn(t.V,24*t.ab))&&(t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true)));break;case 24:K1(t),wf(t.V,t.hb,t.kb,4,false,Qn(t.V,24*t.ab))&&(t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true)));break;case 8:K1(t),wf(t.V,t.hb,t.kb,5,false,Qn(t.V,24*t.ab))&&(t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true)));break;case 25:K1(t),wf(t.V,t.hb,t.kb,6,false,Qn(t.V,24*t.ab))&&(t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true)));break;case 9:K1(t),wf(t.V,t.hb,t.kb,7,false,Qn(t.V,24*t.ab))&&(t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true)));break;case 26:K1(t),wf(t.V,t.hb,t.kb,6,true,Qn(t.V,24*t.ab))&&(t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true)));break;case 10:K1(t),Pv(t.V,t.hb,t.kb,true)&&(t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true)));break;case 27:K1(t),Pv(t.V,t.hb,t.kb,false)&&(t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true)));break;case 16:y8(t,1);break;case 11:y8(t,6);break;case 12:y8(t,7);break;case 13:y8(t,8);break;case 28:y8(t,14);break;case 29:y8(t,15);break;case 30:y8(t,16);break;case 14:y8(t,9);break;case 31:y8(t,17);break;case 15:y8(t,35);break;case 32:y8(t,53);break;case 33:e.d||e.a?(A=tn(t.V,t.hb,t.kb),A!=-1&&Hk(t,A,new AU())):(K1(t),o5(t.V,t.hb,t.kb,t.F,t.B,t.D,t.C,t.A)&&(t.t=-1,t.eb=w.Math.max(t.eb,3),P1(t.k),N1(t,new x1(t,1,true))));break;case 19:t.e=tn(t.V,t.hb,t.kb),t.e!=-1&&t.e<t.V.g&&(!t.V.L||!ye(t.V,t.e))&&(t.hb=mt(t.V,t.e),t.kb=Rt(t.V,t.e),t.X=8);break;case 21:o=null,t.v?Yt(t.v,95)&&(o=t.v):(o=new dU(),ld(o,t.hb,t.kb),Ft(t.I,o)),rG(t,o,new n7(t));}}function sy(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct;for(this.c=t.length,this.d=t[0].length,H=w.Math.min(this.c,this.d),this.e=c(Ut,Tt,6,w.Math.min(this.c+1,this.d),15,1),this.a=j1(Ut,[c0,Tt],[15,6],15,[this.c,H],2),this.b=j1(Ut,[c0,Tt],[15,6],15,[this.d,this.d],2),P=c(Ut,Tt,6,this.d,15,1),ct=c(Ut,Tt,6,this.c,15,1),N=w.Math.min(this.c-1,this.d),tt=w.Math.max(0,w.Math.min(this.d-2,this.c)),j=0;j<w.Math.max(N,tt);j++){if(j<N){for(this.e[j]=0,L=j;L<this.c;L++)this.e[j]=Q2(this.e[j],t[L][j]);if(this.e[j]!=0){for(t[j][j]<0&&(this.e[j]=-this.e[j]),o=j;o<this.c;o++)t[o][j]/=this.e[j];t[j][j]+=1;}this.e[j]=-this.e[j];}for(T=j+1;T<this.d;T++){if(j<N&this.e[j]!=0){for(rt=0,L=j;L<this.c;L++)rt+=t[L][j]*t[L][T];for(rt=-rt/t[j][j],o=j;o<this.c;o++)t[o][T]+=rt*t[o][j];}P[T]=t[j][T];}if(true&j<N)for(o=j;o<this.c;o++)this.a[o][j]=t[o][j];if(j<tt){for(P[j]=0,L=j+1;L<this.d;L++)P[j]=Q2(P[j],P[L]);if(P[j]!=0){for(P[j+1]<0&&(P[j]=-P[j]),s=j+1;s<this.d;s++)P[s]/=P[j];P[j+1]+=1;}if(P[j]=-P[j],j+1<this.c&P[j]!=0){for(s=j+1;s<this.c;s++)ct[s]=0;for(g=j+1;g<this.d;g++)for(y=j+1;y<this.c;y++)ct[y]+=P[g]*t[y][g];for(k=j+1;k<this.d;k++)for(rt=-P[k]/P[j+1],y=j+1;y<this.c;y++)t[y][k]+=rt*ct[y];}for(o=j+1;o<this.d;o++)this.b[o][j]=P[o];}}for(Y=w.Math.min(this.d,this.c+1),N<this.d&&(this.e[N]=t[N][N]),this.c<Y&&(this.e[Y-1]=0),tt+1<Y&&(P[tt]=t[tt][Y-1]),P[Y-1]=0,v=N;v<H;v++){for(o=0;o<this.c;o++)this.a[o][v]=0;this.a[v][v]=1;}for(R=N-1;R>=0;R--)if(this.e[R]!=0){for(h=R+1;h<H;h++){for(rt=0,L=R;L<this.c;L++)rt+=this.a[L][R]*this.a[L][h];for(rt=-rt/this.a[R][R],s=R;s<this.c;s++)this.a[s][h]+=rt*this.a[s][R];}for(y=R;y<this.c;y++)this.a[y][R]=-this.a[y][R];for(this.a[R][R]=1+this.a[R][R],o=0;o<R-1;o++)this.a[o][R]=0;}else {for(o=0;o<this.c;o++)this.a[o][R]=0;this.a[R][R]=1;}for(C=this.d-1;C>=0;C--){if(C<tt&P[C]!=0)for(h=C+1;h<H;h++){for(rt=0,L=C+1;L<this.d;L++)rt+=this.b[L][C]*this.b[L][h];for(rt=-rt/this.b[C+1][C],s=C+1;s<this.d;s++)this.b[s][h]+=rt*this.b[s][C];}for(o=0;o<this.d;o++)this.b[o][C]=0;this.b[C][C]=1;}for(et=Y-1,f=w.Math.pow(2,-52);Y>0;){for(b=Y-2;b>=-1&&b!=-1;b--)if(w.Math.abs(P[b])<=f*(w.Math.abs(this.e[b])+w.Math.abs(this.e[b+1]))){P[b]=0;break;}if(b==Y-2)S=4;else {for(x=Y-1;x>=b&&x!=b;x--)if(rt=(x!=Y?w.Math.abs(P[x]):0)+(x!=b+1?w.Math.abs(P[x-1]):0),w.Math.abs(this.e[x])<=f*rt){this.e[x]=0;break;}x==b?S=3:x==Y-1?S=1:(S=2,b=x);}switch(++b,S){case 1:for(D=P[Y-2],P[Y-2]=0,h=Y-2;h>=b;h--)for(rt=Q2(this.e[h],D),n=this.e[h]/rt,st=D/rt,this.e[h]=rt,h!=b&&(D=-st*P[h-1],P[h-1]=n*P[h-1]),o=0;o<this.d;o++)rt=n*this.b[o][h]+st*this.b[o][Y-1],this.b[o][Y-1]=-st*this.b[o][h]+n*this.b[o][Y-1],this.b[o][h]=rt;break;case 2:for(D=P[b-1],P[b-1]=0,h=b;h<Y;h++)for(rt=Q2(this.e[h],D),n=this.e[h]/rt,st=D/rt,this.e[h]=rt,D=-st*P[h],P[h]=n*P[h],o=0;o<this.c;o++)rt=n*this.a[o][h]+st*this.a[o][b-1],this.a[o][b-1]=-st*this.a[o][h]+n*this.a[o][b-1],this.a[o][h]=rt;break;case 3:{for(W=w.Math.max(w.Math.max(w.Math.max(w.Math.max(w.Math.abs(this.e[Y-1]),w.Math.abs(this.e[Y-2])),w.Math.abs(P[Y-2])),w.Math.abs(this.e[b])),w.Math.abs(P[b])),ht=this.e[Y-1]/W,wt=this.e[Y-2]/W,i=P[Y-2]/W,a=this.e[b]/W,r=P[b]/W,e=((wt+ht)*(wt-ht)+i*i)/2,A=ht*i*(ht*i),$=0,e!=0|A!=0&&($=w.Math.sqrt(e*e+A),e<0&&($=-$),$=A/(e+$)),D=(a+ht)*(a-ht)+$,Q=a*r,h=b;h<Y-1;h++){for(rt=Q2(D,Q),n=D/rt,st=Q/rt,h!=b&&(P[h-1]=rt),D=n*this.e[h]+st*P[h],P[h]=n*P[h]-st*this.e[h],Q=st*this.e[h+1],this.e[h+1]=n*this.e[h+1],L=0;L<this.d;L++)rt=n*this.b[L][h]+st*this.b[L][h+1],this.b[L][h+1]=-st*this.b[L][h]+n*this.b[L][h+1],this.b[L][h]=rt;if(rt=Q2(D,Q),n=D/rt,st=Q/rt,this.e[h]=rt,D=n*P[h]+st*this.e[h+1],this.e[h+1]=-st*P[h]+n*this.e[h+1],Q=st*P[h+1],P[h+1]=n*P[h+1],h<this.c-1)for(o=0;o<this.c;o++)rt=n*this.a[o][h]+st*this.a[o][h+1],this.a[o][h+1]=-st*this.a[o][h]+n*this.a[o][h+1],this.a[o][h]=rt;}P[Y-2]=D;}break;case 4:{if(this.e[b]<=0)for(this.e[b]=this.e[b]<0?-this.e[b]:0,o=0;o<=et;o++)this.b[o][b]=-this.b[o][b];for(;b<et&&!(this.e[b]>=this.e[b+1]);){if(rt=this.e[b],this.e[b]=this.e[b+1],this.e[b+1]=rt,b<this.d-1)for(o=0;o<this.d;o++)rt=this.b[o][b+1],this.b[o][b+1]=this.b[o][b],this.b[o][b]=rt;if(b<this.c-1)for(o=0;o<this.c;o++)rt=this.a[o][b+1],this.a[o][b+1]=this.a[o][b],this.a[o][b]=rt;++b;}--Y;}}}}function m6(t,e,A,n,P,r){var i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R;if(e[A-1]==36){if(t.r=true,t.q=new n1(),A+=VR(t,e,A-1,t.q)-1,e[A++]!=93){if(!r)throw At(new H1("SmilesParser: A positive recursive SMARTS followed by another one or by atom query features is not supported. Position:"+(A-1)));(t.k&128)==0&&(A=_Y(e,A));}return A;}if(e[A-1]==42)t.d=6,t.c=J(t.c,1);else if(e[A-1]==63)t.d=0;else if(Q=e[A-1]==33,Q&&(t.r=true,t.c=J(t.c,1),++A),e[A-1]==82&&P&&(an(e[A]&d1)||t.j&&e[A]==123))t.d=6,t.c=J(t.c,1),--A,Q&&--A;else {if(o=new U7(),!mp(t,e,A-1,n,o))throw At(new H1("SmilesParser: Unexpected character in atom definition:'"+String.fromCharCode(e[A-1]&d1)+vM+(A-1)));if(t.d=o.a,A+=o.b-1,(t.k&3)!=2&&(t.g=9),P&&(e[A]==44||Q)){for(y=o.d,s=o.c,v=A-o.b;v<n;){if(!mp(t,e,v,n,o)){if(!Q)throw At(new H1("SmilesParser: Unexpected character in atom list:'"+String.fromCharCode(e[v]&d1)+FM+v));break;}if(o.a==1){if(!Q)throw At(new H1("SmilesParser: Hydrogen is not supported in positive atom lists:'"+QO((SD(v<=n,v+" > "+n),R=e.length,Vk(v,v,R),pP(e,c(E,I,6,n-v,15,1),v,n)))+FM+v));}else iG(t,o.a),y=y|o.d,s=s|o.c;if(v+=o.b,Q&&e[v]!=59&&e[v]!=38||!Q&&e[v]!=44||Q&&e[v+1]!=33)break;++v,e[v]==33&&++v;}t.b&&t.b.d.a.length>1&&(t.g=-1,s?y||(t.c=J(t.c,4)):t.c=J(t.c,2)),A=v;}}for(h=new aw(e),g=c(F,m,6,1,15,1),k=true;k;){if(e[A]==64){++A,e[A]==64&&(t.i=true,++A),t.p=true;continue;}if(e[A]==58){for(++A;an(e[A]&d1);)t.o=10*t.o+e[A]-48,++A;continue;}if(e[A]==91)throw At(new H1("SmilesParser: nested square brackets found. Position:"+A));if(e[A]==93){++A,k=false;continue;}if(t.e=gb(e,A,g),g[0]!=0){A+=g[0],t.e==0&&(t.c=J(t.c,Po));continue;}if(D=e[A]==33,D&&++A,e[A]==72){++A,A+=bf(h,A,1),i=0,h.c<=0&&h.b>=0&&(i=J(i,128)),h.c<=1&&h.b>=1&&(i=J(i,256)),h.c<=2&&h.b>=2&&(i=J(i,512)),h.c<=3&&h.b>=3&&(i=J(i,Qe)),D?(t.c=J(t.c,i),t.g=-1):h.b==h.c?t.g=h.c:(t.c=J(t.c,V(uP,Zn(i))),t.g=-1);continue;}if(e[A]==68||e[A]==100){++A,A+=bf(h,A,1),i=0,h.c<=0&&h.b>=0&&(i=J(i,q0)),h.c<=1&&h.b>=1&&(i=J(i,v8)),h.c<=2&&h.b>=2&&(i=J(i,B8)),h.c<=3&&h.b>=3&&(i=J(i,F8)),h.c<=4&&h.b>=4&&(i=J(i,KA)),z(i,0)!=0&&(D?t.c=J(t.c,i):gt(V(t.c,hi),0)?t.c=V(t.c,Zn(i)):(i=d0(i,hi),t.c=J(t.c,i)));continue;}if(e[A]==122&&t.j){++A,A+=bf(h,A,4),i=0,h.c<=0&&h.b>=0&&(i=J(i,p2)),h.c<=1&&h.b>=1&&(i=J(i,kM)),h.c<=2&&h.b>=2&&(i=J(i,mM)),h.c<=3&&h.b>=3&&(i=J(i,bM)),h.c<=4&&h.b>=4&&(i=J(i,fo)),z(i,0)!=0&&(D?t.c=J(t.c,i):gt(V(t.c,xf),0)?t.c=V(t.c,Zn(i)):(i=d0(i,xf),t.c=J(t.c,i)));continue;}if(e[A]==88){if(++A,A+=bf(h,A,1),j=(J1(),v9)[t.d],j==null)continue;b=j[0],L=gb(e,A,g),g[0]!=0&&(Pi(t.d)?b+=L:t.d==6?b-=w.Math.abs(L):b-=L),i=0,b-h.c<=0&&b-h.b>=0&&(i=J(i,Gn)),b-h.c<=1&&b-h.b>=1&&(i=J(i,g8)),b-h.c<=2&&b-h.b>=2&&(i=J(i,o0)),z(i,0)!=0&&(D?t.c=J(t.c,i):gt(V(t.c,li),0)?t.c=V(t.c,Zn(i)):(i=d0(i,li),t.c=J(t.c,i)));continue;}if(e[A]==65||e[A]==97){t.c=J(t.c,D^e[A]==65?4:2),++A;continue;}if(e[A]==82){++A,A+=bf(h,A,3),i=0,h.c<=0&&h.b>=0&&(i=J(i,8)),h.c<=1&&h.b>=1&&(i=J(i,16)),h.c<=2&&h.b>=2&&(i=J(i,32)),h.c<=3&&h.b>=3&&(i=J(i,64)),h.b>3&&Zu(t.n,(D?"!R":"R")+h.b),z(i,0)!=0&&(D?t.c=J(t.c,i):gt(V(t.c,120),0)?t.c=V(t.c,Zn(i)):(i=d0(i,120),t.c=J(t.c,i)));continue;}if(e[A]==114){if(++A,A+=bf(h,A,1),h.a){D?t.c=J(t.c,384):t.c=J(t.c,8);continue;}T=h.c,h.b>h.c&&Zu(t.n,(D?"!r":"r")+("{"+h.c+"-"+h.b+"}")),!D&&T>=3&&T<=7?t.c=J(t.c,T<<22):h.b>h.c||Zu(t.n,(D?"!r":"r")+T);continue;}if(e[A]==118){++A,A+=bf(h,A,1),b=h.c,h.b>h.c&&Zu(t.n,(D?"!v":"v")+("{"+h.c+"-"+h.b+"}")),!D&&b<=14?t.a=b:h.b>h.c||Zu(t.n,(D?"!v":"v")+b);continue;}if(e[A]==94){if(++A,f=e[A++]-48,f<1||f>3)throw At(new H1("SmilesParser: Unsupported hybridization. Position:"+A));l=f==1?o0:f==2?g8:Gn,D||(l=V(li,Zn(l))),t.c=J(t.c,l);continue;}if(e[A]==36){if(!D)throw At(new H1("SmilesParser: non-negated recursive SMARTS relating to preceding atom are not supported yet. Position:"+A));!t.f&&(t.f=new n1()),t.r=true,A+=VR(t,e,A,t.f);continue;}if(P&&(e[A]==59||e[A]==38)){t.r=true,++A;continue;}if(P&&e[A]==44&&LW(e,A,g)){t.r=true,A+=g[0]+1;continue;}if(P&&e[A]==44&&(t.k&128)!=0){t.r=true,A+=1;break;}throw e[A]==44?At(new H1("SmilesParser: alternative atom definitions not supported. (Tip: enumerate SMARTS): '"+String.fromCharCode(e[A]&d1)+P4+A)):At(new H1("SmilesParser: unexpected character inside brackets: '"+String.fromCharCode(e[A]&d1)+P4+A));}return A;}function yy(){yy=v1,W4=B(d(ft,2),DA,13,0,[B(d(ft,1),Dt,2,6,["Acyl","gCaHA`AIf`@"]),B(d(ft,1),Dt,2,6,["Alloc","gNph@l@ILzuR@@"]),B(d(ft,1),Dt,2,6,["Allyl","Al"]),B(d(ft,1),Dt,2,6,["Benzyl;Bn","daD@`F@DjUZxHH@@"]),B(d(ft,1),Dt,2,6,["Boc","daxD`@S@AIgijj@@"]),B(d(ft,1),Dt,2,6,["BOM;BzOM","deTH`@H@Re[TYj`@@@"]),B(d(ft,1),Dt,2,6,["Bs","dmtDpAdLS`aPAIe]jf`@e`@@"]),B(d(ft,1),Dt,2,6,["Bt","dew@`@aJ@DiY]paej`@@@"]),B(d(ft,1),Dt,2,6,["Btm","did@P@BJ@Die_ahH@@@"]),B(d(ft,1),Dt,2,6,["Butyl;nButyl","gJPHB@IRuP@"]),B(d(ft,1),Dt,2,6,["Benzoyl;Bz","didH`@p@RYm^Eh@@@@"]),B(d(ft,1),Dt,2,6,["Bzh","dg|@`N@LdbRbtJUB]aAP@@@@"]),B(d(ft,1),Dt,2,6,["Cbz","dmtD`@S@AIgYVUZh@@@@"]),B(d(ft,1),Dt,2,6,["cButyl","gKPHL@IThuT@@"]),B(d(ft,1),Dt,2,6,["cHeptyl","daD@`L@DjWVzjj`@"]),B(d(ft,1),Dt,2,6,["cHexyl","gOpHL@IToWUU@@"]),B(d(ft,1),Dt,2,6,["cOctyl","did@`L@DjWWajjj@@"]),B(d(ft,1),Dt,2,6,["cPentyl","gFpHL@ITimUP@"]),B(d(ft,1),Dt,2,6,["cPropyl","gBPHL@Qxjh@"]),B(d(ft,1),Dt,2,6,["COOH","gC`h@l@ILt@@ !Bb@K~@Hc}"]),B(d(ft,1),Dt,2,6,["DEAE","daz@`@x@RiUj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dim]ifuWYrI\\uh@Jh@@@@@@"]),B(d(ft,1),Dt,2,6,["MOM","gCaHA`AJZ`@"]),B(d(ft,1),Dt,2,6,["MPM;PMB","deTH`@d@Rfuunh@J@@"]),B(d(ft,1),Dt,2,6,["Ms","gJPdH`DD@cuh@"]),B(d(ft,1),Dt,2,6,["MTM","gC`D@DX@Rfh@"]),B(d(ft,1),Dt,2,6,["mTolyl","daD@`N@DjWjXHB@@"]),B(d(ft,1),Dt,2,6,["N3","gClHaE`@RnReX@"]),B(d(ft,1),Dt,2,6,["nAmyl;Amyl","gGPHJ@IRmU@@"]),B(d(ft,1),Dt,2,6,["neoAm","gGPHJ@IUMU@@"]),B(d(ft,1),Dt,2,6,["NO2,Nitro","gChhhE`BRnRYh@"]),B(d(ft,1),Dt,2,6,["Np","deVDaHAI@HeNR[e_aZ@B@@"]),B(d(ft,1),Dt,2,6,["nPropyl;Propyl","gC`HL@IST@@"]),B(d(ft,1),Dt,2,6,["oTolyl","daD@`J@DjYvxH`@@"]),B(d(ft,1),Dt,2,6,["Phenyl","gOpHL@IToVD@@@"]),B(d(ft,1),Dt,2,6,["Pht","dcLL`@RU@Dfyed]ZBA`@@"]),B(d(ft,1),Dt,2,6,["Piv;Pv","gNqHA`AIffj`@"]),B(d(ft,1),Dt,2,6,["PMBM","dcLD`@T`AJUm]FZh@J@@"]),B(d(ft,1),Dt,2,6,["PNB","dcNLaHAEt@bTyInUvxV`@f@@"]),B(d(ft,1),Dt,2,6,["Poc","didD`@S@AIgexVjj`@"]),B(d(ft,1),Dt,2,6,["PPi","diDFsHSB[`|J|A@Lxn{lddqdZih@@"]),B(d(ft,1),Dt,2,6,["pTolyl","daD@`N@DjWzXHB@@"]),B(d(ft,1),Dt,2,6,["sAmyl","gGPHL@YIDZj@@"]),B(d(ft,1),Dt,2,6,["sButyl","gJPHL@ITuP@"]),B(d(ft,1),Dt,2,6,["SEM","diDHPFApD@rRQUJjj`@"]),B(d(ft,1),Dt,2,6,["SES","dedDpHP@``AgCIICeHmUT@@"]),B(d(ft,1),Dt,2,6,["SO3H","gJQdHl@``D^m@@"]),B(d(ft,1),Dt,2,6,["tAmyl","gGPHB@IUMU@@"]),B(d(ft,1),Dt,2,6,["TBDMS;TBS","dax@P@\\B@Djfjjh@@"]),B(d(ft,1),Dt,2,6,["TBDPS","fdy@A@@NA@CIIEEEIde]XOhuPAT@@@@@"]),B(d(ft,1),Dt,2,6,["TBMPS","dg\\HPHApH@rRQJJPjg]UAT@@@"]),B(d(ft,1),Dt,2,6,["tButyl,tBu","gJPHB@Q}T@@"]),B(d(ft,1),Dt,2,6,["TDS","ded@P@\\B@LddTeeUUP@@"]),B(d(ft,1),Dt,2,6,["Tf","daxDhHP@``BiAiCiCIICHmU@@"]),B(d(ft,1),Dt,2,6,["TFA","gNqBJIARFdF@YEHYUL@@"]),B(d(ft,1),Dt,2,6,["Thexyl","gNpHB@IUMUT@@"]),B(d(ft,1),Dt,2,6,["THF","gFqH@PAJYujj@@"]),B(d(ft,1),Dt,2,6,["THP","gOqH@PAJYZzjh@"]),B(d(ft,1),Dt,2,6,["TIPS","dmT@P@\\B@DjfYjjjh@@"]),B(d(ft,1),Dt,2,6,["TMS","gJPD@xD@czh@"]),B(d(ft,1),Dt,2,6,["Tosyl;Ts","dmtDPHP@``CIICLeaeZ@B@@"]),B(d(ft,1),Dt,2,6,["Troc","diDDHJxHaHcH`PCHiBeJjf@@"]),B(d(ft,1),Dt,2,6,["Trt","fbm@B@A@FRQIRKQPiIZdoIcdHJ`@@@@@@"]),B(d(ft,1),Dt,2,6,["Xyl","did@`J@DjYynBHH@@"])]);}function b6(t,e){var A,n,P,r;A=e[1],n=e[2],P=t.k[A]-1,r=t.k[n]-1,P>3||r>3?(this.b=c(Kt,t1,6,4,15,1),this.b[0]=45,this.b[1]=135,this.b[2]=225,this.b[2]=315,this.c=j1(Kt,[ie,t1],[16,6],15,[4,2],2),this.c[0][0]=30,this.c[0][1]=60,this.c[1][0]=120,this.c[1][1]=150,this.c[2][0]=210,this.c[2][1]=240,this.c[2][0]=300,this.c[2][1]=330,this.a=c(Kt,t1,6,4,15,1),this.a[0]=25,this.a[1]=25,this.a[2]=25,this.a[3]=25):(t.p[A]==0||t.D[A]>9)&&(t.p[n]==0||t.D[n]>9)?P==3&&r==3||P==3&&r==2||P==3&&r==1||P==2&&r==3||P==1&&r==3||P==2&&r==2&&(e[0]!=-1||e[3]!=-1)?(this.b=c(Kt,t1,6,3,15,1),this.b[0]=60,this.b[1]=180,this.b[2]=300,this.c=j1(Kt,[ie,t1],[16,6],15,[3,2],2),this.c[0][0]=45,this.c[0][1]=75,this.c[1][0]=165,this.c[1][1]=195,this.c[2][0]=285,this.c[2][1]=315,this.a=c(Kt,t1,6,3,15,1),this.a[0]=33,this.a[1]=33,this.a[2]=33):P==1&&r==2&&e[3]==-1||P==2&&r==1&&e[0]==-1?(this.b=c(Kt,t1,6,3,15,1),this.b[0]=60,this.b[1]=180,this.b[2]=300,this.c=j1(Kt,[ie,t1],[16,6],15,[3,2],2),this.c[0][0]=45,this.c[0][1]=75,this.c[1][0]=165,this.c[1][1]=195,this.c[2][0]=285,this.c[2][1]=315,this.a=c(Kt,t1,6,3,15,1),this.a[0]=40,this.a[1]=20,this.a[2]=40):(P==1&&r==1||P==1&&r==2&&e[3]!=-1||P==2&&r==1&&e[0]!=-1||P==2&&r==2&&e[0]==-1&&e[3]==-1)&&(this.b=c(Kt,t1,6,3,15,1),this.b[0]=60,this.b[1]=180,this.b[2]=300,this.c=j1(Kt,[ie,t1],[16,6],15,[3,2],2),this.c[0][0]=45,this.c[0][1]=75,this.c[1][0]=165,this.c[1][1]=195,this.c[2][0]=285,this.c[2][1]=315,this.a=c(Kt,t1,6,3,15,1),this.a[0]=25,this.a[1]=50,this.a[2]=25):(t.p[A]==0||t.D[A]>9)&&t.p[n]==1||(t.p[n]==0||t.D[n]>9)&&t.p[A]==1?P==3||r==3?(this.b=c(Kt,t1,6,6,15,1),this.b[0]=0,this.b[1]=60,this.b[2]=120,this.b[3]=180,this.b[4]=240,this.b[5]=300,this.c=j1(Kt,[ie,t1],[16,6],15,[6,2],2),this.c[0][0]=-15,this.c[0][1]=15,this.c[1][0]=45,this.c[1][1]=75,this.c[2][0]=105,this.c[2][1]=135,this.c[3][0]=165,this.c[3][1]=195,this.c[4][0]=225,this.c[4][1]=255,this.c[5][0]=285,this.c[5][1]=315,this.a=c(Kt,t1,6,6,15,1),this.a[0]=16,this.a[1]=16,this.a[2]=16,this.a[3]=16,this.a[4]=16,this.a[5]=16):P==1&&r==1?(this.b=c(Kt,t1,6,2,15,1),this.b[0]=120,this.b[1]=240,this.c=j1(Kt,[ie,t1],[16,6],15,[2,2],2),this.c[0][0]=105,this.c[0][1]=135,this.c[1][0]=225,this.c[1][1]=255,this.a=c(Kt,t1,6,2,15,1),this.a[0]=50,this.a[1]=50):t.p[A]==1&&P==2&&r==1||t.p[n]==1&&r==2&&P==1?(this.b=c(Kt,t1,6,2,15,1),this.b[0]=90,this.b[1]=270,this.c=j1(Kt,[ie,t1],[16,6],15,[2,2],2),this.c[0][0]=75,this.c[0][1]=105,this.c[1][0]=255,this.c[1][1]=285,this.a=c(Kt,t1,6,2,15,1),this.a[0]=50,this.a[1]=50):t.p[A]==1&&P==1&&r==2&&e[3]==-1||t.p[n]==1&&r==1&&P==2&&e[0]==-1?(this.b=c(Kt,t1,6,3,15,1),this.b[0]=0,this.b[1]=120,this.b[2]=240,this.c=j1(Kt,[ie,t1],[16,6],15,[3,2],2),this.c[0][0]=-15,this.c[0][1]=15,this.c[1][0]=105,this.c[1][1]=135,this.c[2][0]=225,this.c[2][1]=255,this.a=c(Kt,t1,6,3,15,1),this.a[0]=60,this.a[1]=20,this.a[2]=20):t.p[A]==1&&P==1&&r==2&&e[3]!=-1||t.p[n]==1&&r==1&&P==2&&e[0]!=-1?(this.b=c(Kt,t1,6,3,15,1),this.b[0]=0,this.b[1]=120,this.b[2]=240,this.c=j1(Kt,[ie,t1],[16,6],15,[3,2],2),this.c[0][0]=-15,this.c[0][1]=15,this.c[1][0]=105,this.c[1][1]=135,this.c[2][0]=225,this.c[2][1]=255,this.a=c(Kt,t1,6,3,15,1),this.a[0]=20,this.a[1]=40,this.a[2]=40):P==2&&r==2&&(e[0]==-1||e[3]==-1?(this.b=c(Kt,t1,6,2,15,1),this.b[0]=0,this.b[1]=180,this.c=j1(Kt,[ie,t1],[16,6],15,[2,2],2),this.c[0][0]=-15,this.c[0][1]=15,this.c[1][0]=165,this.c[1][1]=195,this.a=c(Kt,t1,6,2,15,1),this.a[0]=50,this.a[1]=50):(this.b=c(Kt,t1,6,2,15,1),this.b[0]=90,this.b[1]=270,this.c=j1(Kt,[ie,t1],[16,6],15,[2,2],2),this.c[0][0]=75,this.c[0][1]=105,this.c[1][0]=255,this.c[1][1]=285,this.a=c(Kt,t1,6,2,15,1),this.a[0]=50,this.a[1]=50)):t.p[A]==1&&t.p[n]==1?P==1&&r==1?(this.b=c(Kt,t1,6,2,15,1),this.b[0]=0,this.b[1]=180,this.c=j1(Kt,[ie,t1],[16,6],15,[2,2],2),this.c[0][0]=-15,this.c[0][1]=15,this.c[1][0]=165,this.c[1][1]=195,this.a=c(Kt,t1,6,2,15,1),this.a[0]=10,this.a[1]=90):(this.b=c(Kt,t1,6,6,15,1),this.b[0]=0,this.b[1]=50,this.b[2]=130,this.b[3]=180,this.b[4]=230,this.b[5]=310,this.c=j1(Kt,[ie,t1],[16,6],15,[6,2],2),this.c[0][0]=-15,this.c[0][1]=15,this.c[1][0]=35,this.c[1][1]=65,this.c[2][0]=115,this.c[2][1]=145,this.c[3][0]=165,this.c[3][1]=195,this.c[4][0]=215,this.c[4][1]=245,this.c[5][0]=295,this.c[5][1]=325,this.a=c(Kt,t1,6,6,15,1),this.a[0]=40,this.a[1]=5,this.a[2]=5,this.a[3]=40,this.a[4]=5,this.a[5]=5):(this.b=c(Kt,t1,6,1,15,1),this.b[0]=180,this.c=j1(Kt,[ie,t1],[16,6],15,[1,2],2),this.c[0][0]=165,this.c[0][1]=195,this.a=c(Kt,t1,6,1,15,1),this.a[0]=100);}function iM(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct;for(N=(q1(),nn),q(t.b,"M  V30 BEGIN CTAB"+N),q(t.b,hM+e.r+" "+e.s+" 0 0 0"+N),q(t.b,"M  V30 BEGIN ATOM"+N),D=0;D<e.r;D++){if(q(t.b,Lo+(D+1)),(e.w==null?null:e.w[D])!=null){for(s=e.w==null?null:e.w[D],tt=gt(V(e.C[D],1),0),q(t.b,tt?" NOT[":" ["),R=0;R<s.length;R++)switch(R>0&&q(t.b,","),C=(J1(),a0)[s[R]],C.length){case 2:case 3:case 1:q(t.b,C);break;default:q(t.b,"?");}q(t.b,"]");}else gt(V(e.C[D],1),0)?q(t.b," A"):e.D[D]>=129&&e.D[D]<=144||e.D[D]==154?q(t.b," R#"):q(t.b," "+(J1(),a0)[e.D[D]]);if(A?(q(t.b," "+Bt(fP*t.c*e.K[D].a)/fP),q(t.b," "+Bt(fP*t.c*-e.K[D].b)/fP),q(t.b," "+Bt(fP*t.c*-e.K[D].c)/fP)):q(t.b," 0 0 0"),q(t.b," "+w.Math.abs(e.A[D])),e.t[D]!=0&&q(t.b," CHG="+e.t[D]),(e.v[D]&48)!=0)switch(q(t.b," RAD="),e.v[D]&48){case 16:q(t.b,"1");break;case 32:q(t.b,"2");break;case 48:q(t.b,"3");}((e.v[D]&3)==1||(e.v[D]&3)==2)&&(q(t.b," CFG="),(e.v[D]&3)==1?q(t.b,"1"):q(t.b,"2")),e.B[D]!=0&&q(t.b," MASS="+e.B[D]),ct=((e.v[D]&b8)>>>27)-1,ct!=-1&&q(t.b," VAL="+(ct==0?"-1":U1(ct))),y=e.D[D],(y>=129&&y<=144||y==154)&&q(t.b," RGROUPS=(1 "+(y==154?0:y>=142?y-141:y-125)+")"),j=V(uP,e.C[D]),z(j,384)==0?q(t.b," HCOUNT=2"):z(j,128)==0?q(t.b," HCOUNT=1"):z(j,1792)==0?q(t.b," HCOUNT=-1"):z(j,1664)==0&&q(t.b," HCOUNT=1"),ht=V(e.C[D],6144),z(ht,0)!=0&&(gt(V(ht,S0),0)?q(t.b," SUBST="+(e.e[D]+1)):q(t.b," SUBST=-1")),$=V(e.C[D],120),z($,0)!=0&&(z($,112)==0?q(t.b," RBCNT=-1"):z($,8)==0||z($,104)==0?q(t.b," RBCNT=2"):z($,88)==0?q(t.b," RBCNT=3"):z($,56)==0&&q(t.b," RBCNT=4")),q(t.b,N);}for(q(t.b,"M  V30 END ATOM"+N),q(t.b,"M  V30 BEGIN BOND"+N),h=0;h<e.s;h++){switch(q(t.b,Lo+(h+1)),e.I[h]){case 1:et=1,st=0;break;case 2:et=2,st=0;break;case 4:et=3,st=0;break;case 129:et=1,st=3;break;case 257:et=1,st=1;break;case 386:et=2,st=2;break;case 8:et=4,st=0;break;case 16:et=9,st=0;break;default:et=1,st=0;}g=e.H[h]&31,g!=0&&(g==8?et=4:g==3?et=5:g==9?et=6:g==10?et=7:et=8),q(t.b," "+et+" "+(e.F[0][h]+1)+" "+(e.F[1][h]+1)),st!=0&&q(t.b," CFG="+st),a=e.H[h]&384,wt=a==0?0:a==256?1:2,wt!=0&&q(t.b," TOPO="+wt),q(t.b,N);}for(q(t.b,"M  V30 END BOND"+N),v=false,Q=0;Q<e.r;Q++)if((e.u==null||e.u[Q]==null?null:on((S=e.u[Q],w0(),S)))!=null){v=true;break;}if(v){for(q(t.b,"M  V30 BEGIN SGROUP"+N),k=0,o=0;o<e.r;o++)(e.u==null||e.u[o]==null?null:on((x=e.u[o],w0(),x)))!=null&&(++k,q(t.b,Lo+k+" DAT "+k+" ATOMS=(1 "+(o+1)+') FIELDNAME="'+Sy+'" -'+N),q(t.b,'M  V30 FIELDDISP="'),FF(t,A?t.c*e.K[o].a:0),FF(t,A?t.c*e.K[o].b:0),q(t.b,'    DA    ALL  1       5" FIELDDATA="'+(e.u==null||e.u[o]==null?null:on((S=e.u[o],w0(),S)))+'"'+N));q(t.b,"M  V30 END SGROUP"+N);}for(W=false,n=0,H=c(F,m,6,32,15,1),r=c(F,m,6,32,15,1),L=0;L<e.g;L++)((e.v[L]&3)==1||(e.v[L]&3)==2)&&(W=true,rt=(e.v[L]&b1)>>18,rt==1?++r[(e.v[L]&b1)>>18!=1&&(e.v[L]&b1)>>18!=2?-1:(e.v[L]&VA)>>20]:rt==2?++H[(e.v[L]&b1)>>18!=1&&(e.v[L]&b1)>>18!=2?-1:(e.v[L]&VA)>>20]:++n);for(P=0,Y=c(F,m,6,32,15,1),i=c(F,m,6,32,15,1),T=0;T<e.i;T++)dt(e,T)!=2&&((e.G[T]&3)==1||(e.G[T]&3)==2)&&(W=true,rt=(e.G[T]&768)>>8,rt==1?++i[(e.G[T]&768)>>8!=1&&(e.G[T]&768)>>8!=2?-1:(e.G[T]&cn)>>10]:rt==2?++Y[(e.G[T]&768)>>8!=1&&(e.G[T]&768)>>8!=2?-1:(e.G[T]&cn)>>10]:++P);if(W){if(q(t.b,"M  V30 BEGIN COLLECTION"+N),n!=0){for(q(t.b,"M  V30 MDLV30/STEABS ATOMS=("+n),f=0;f<e.g;f++)((e.v[f]&3)==1||(e.v[f]&3)==2)&&(e.v[f]&b1)>>18==0&&q(t.b," "+(f+1));q(t.b,")"+N);}if(P!=0){for(q(t.b,"M  V30 MDLV30/STEABS BONDS=("+P),l=0;l<e.i;l++)dt(e,l)!=2&&((e.G[l]&3)==1||(e.G[l]&3)==2)&&(e.G[l]&768)>>8==0&&q(t.b," "+(l+1));q(t.b,")"+N);}for(b=0;b<32;b++){if(H[b]!=0){for(q(t.b,TM+(b+1)+" ATOMS=("+H[b]),f=0;f<e.g;f++)((e.v[f]&3)==1||(e.v[f]&3)==2)&&(e.v[f]&b1)>>18==2&&((e.v[f]&b1)>>18!=1&&(e.v[f]&b1)>>18!=2?-1:(e.v[f]&VA)>>20)==b&&q(t.b," "+(f+1));q(t.b,")"+N);}if(r[b]!=0){for(q(t.b,cM+(b+1)+" ATOMS=("+r[b]),f=0;f<e.g;f++)((e.v[f]&3)==1||(e.v[f]&3)==2)&&(e.v[f]&b1)>>18==1&&((e.v[f]&b1)>>18!=1&&(e.v[f]&b1)>>18!=2?-1:(e.v[f]&VA)>>20)==b&&q(t.b," "+(f+1));q(t.b,")"+N);}if(Y[b]!=0){for(q(t.b,TM+(b+1)+" BONDS=("+Y[b]),l=0;l<e.i;l++)dt(e,l)!=2&&((e.G[l]&3)==1||(e.G[l]&3)==2)&&(e.G[l]&768)>>8==2&&((e.G[l]&768)>>8!=1&&(e.G[l]&768)>>8!=2?-1:(e.G[l]&cn)>>10)==b&&q(t.b," "+(l+1));q(t.b,")"+N);}if(i[b]!=0){for(q(t.b,cM+(b+1)+" BONDS=("+i[b]),l=0;l<e.i;l++)dt(e,l)!=2&&((e.G[l]&3)==1||(e.G[l]&3)==2)&&(e.G[l]&768)>>8==1&&((e.G[l]&768)>>8!=1&&(e.G[l]&768)>>8!=2?-1:(e.G[l]&cn)>>10)==b&&q(t.b," "+(l+1));q(t.b,")"+N);}}q(t.b,"M  V30 END COLLECTION"+N);}q(t.b,a6+N);}function k1t(t){var e,A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct,Xt,St,A1,Qt,bt,yt,Jt,S1,D1,Q1,Lt,pt,U0,V1,l0,m1;if(Q3(t,false),qt(t,9,4),pt=w.Math.max(W8(t.R.g),W8(t.R.i)),qt(t,pt,4),pt==0){qt(t,t.R.L?1:0,1),qt(t,0,1),t.J=OL(t);return;}for(U0=l0=V1=Y=0,D=0;D<t.R.g;D++)if(n0(V(h0(t.R,D),1),0)){switch(X(t.R,D)){case 6:break;case 7:++U0;break;case 8:++l0;break;default:++V1;}R1(t.R,D)!=0&&++Y;}for(qt(t,t.R.g,pt),qt(t,t.R.i,pt),qt(t,U0,pt),qt(t,l0,pt),qt(t,V1,pt),qt(t,Y,pt),Q=0;Q<t.R.g;Q++)X(t.R,t.B[Q])==7&&n0(V(h0(t.R,t.B[Q]),1),0)&&qt(t,Q,pt);for(s=0;s<t.R.g;s++)X(t.R,t.B[s])==8&&n0(V(h0(t.R,t.B[s]),1),0)&&qt(t,s,pt);for(y=0;y<t.R.g;y++)X(t.R,t.B[y])!=6&&X(t.R,t.B[y])!=7&&X(t.R,t.B[y])!=8&&n0(V(h0(t.R,t.B[y]),1),0)&&(qt(t,y,pt),qt(t,X(t.R,t.B[y]),8));for(l=0;l<t.R.g;l++)R1(t.R,t.B[l])!=0&&n0(V(h0(t.R,t.B[l]),1),0)&&(qt(t,l,pt),qt(t,8+R1(t.R,t.B[l]),4));for(Q1=0,j=0,h=1;h<t.R.g;h++)t.F[h]==-1?st=0:(st=1+t.F[h]-j,j=t.F[h]),Q1<st&&(Q1=st);for(a=W8(Q1),qt(t,a,4),j=0,T=1;T<t.R.g;T++)t.F[T]==-1?st=0:(st=1+t.F[T]-j,j=t.F[T]),qt(t,st,a);for(St=0;St<2*t.I;St++)qt(t,t.D[St],pt);for(C=0;C<t.R.i;C++)H=(fe(t.R,t.C[C])&d8)!=0||c1(t.R,t.C[C])==16?1:Z8(t.R,t.C[C])?0:w.Math.min(3,dt(t.R,t.C[C])),qt(t,H,2);if(A=0,(t.Q&O1)==0)for(g=0;g<t.R.g;g++)t._[t.B[g]]!=0&&t._[t.B[g]]!=3&&++A;if(qt(t,A,pt),(t.Q&O1)==0)for(g=0;g<t.R.g;g++)t._[t.B[g]]!=0&&t._[t.B[g]]!=3&&(qt(t,g,pt),t.bb[t.B[g]]==0?qt(t,t._[t.B[g]],3):(m1=t._[t.B[g]]==1?t.bb[t.B[g]]==1?4:6:t.bb[t.B[g]]==1?5:7,qt(t,m1,3),qt(t,t.ab[t.B[g]],3)));if(e=0,(t.Q&O1)==0)for(S=0;S<t.R.i;S++)t.j[t.C[S]]!=0&&t.j[t.C[S]]!=3&&(!A8(t.R,t.C[S])||c1(t.R,t.C[S])==1)&&++e;if(qt(t,e,pt),(t.Q&O1)==0)for(S=0;S<t.R.i;S++)t.j[t.C[S]]!=0&&t.j[t.C[S]]!=3&&(!A8(t.R,t.C[S])||c1(t.R,t.C[S])==1)&&(qt(t,S,pt),c1(t.R,t.C[S])==1?t.n[t.C[S]]==0?qt(t,t.j[t.C[S]],3):(m1=t.j[t.C[S]]==1?t.n[t.C[S]]==1?4:6:t.n[t.C[S]]==1?5:7,qt(t,m1,3),qt(t,t.k[t.C[S]],3)):qt(t,t.j[t.C[S]],2));for(qt(t,t.R.L?1:0,1),$=0,k=0;k<t.R.g;k++)ge(t.R,t.B[k])!=0&&++$;if($!=0)for(rP(t,1),qt(t,$,pt),g=0;g<t.R.g;g++)ge(t.R,t.B[g])!=0&&(qt(t,g,pt),qt(t,ge(t.R,t.B[g]),8));if(t.w=0,t.R.L){for(dA(t,0,pt,O1,1,-1),dA(t,3,pt,S0,1,-1),dA(t,4,pt,120,4,3),dA(t,5,pt,ky,2,1),dA(t,6,pt,1,1,-1),dA(t,7,pt,uP,4,7),$=0,g=0;g<t.R.g;g++)IA(t.R,t.B[g])!=null&&++$;if($>0){for(rP(t,8),qt(t,$,pt),v=0;v<t.R.g;v++)if(b=IA(t.R,t.B[v]),b!=null)for(qt(t,v,pt),qt(t,b.length,4),P=b,r=0,i=P.length;r<i;++r)n=P[r],qt(t,n,8);}Di(t,9,pt,384,2,7),Di(t,10,pt,31,5,0),dA(t,11,pt,je,1,-1),Di(t,12,pt,d8,8,9),dA(t,13,pt,li,3,14),dA(t,14,pt,hi,5,17),dA(t,16,pt,lr,3,22);}for($=0,o=0;o<t.R.g;o++)t.a!=null&&t.a[t.B[o]]!=-1&&++$;if($!=0)for(rP(t,17),qt(t,$,pt),g=0;g<t.R.g;g++)t.a!=null&&t.a[t.B[g]]!=-1&&(qt(t,g,pt),qt(t,t.a[t.B[g]],4));if(rt=0,wt=0,ht=0,(t.Q&8)!=0||(t.Q&Qe)!=0){for($=0,D1=0,g=0;g<t.R.g;g++)if(bt=eP(t.R,t.B[g]),bt!=null){if(S1=xT(bt),bt.length>15||S1>127){rt<bt.length&&(rt=w.Math.min(63,bt.length)),wt<S1&&(wt=S1),++ht;continue;}++$,D1=w.Math.max(D1,bt.length);}if($!=0){for(yt=W8(D1),rP(t,18),qt(t,$,pt),qt(t,yt,4),v=0;v<t.R.g;v++)if(bt=eP(t.R,t.B[v]),bt!=null&&bt.length<=15&&xT(bt)<=127)for(qt(t,v,pt),qt(t,bt.length,yt),Xt=0;Xt<bt.length;Xt++)qt(t,(zt(Xt,bt.length),bt.charCodeAt(Xt)),7);}}for(t.R.L&&(dA(t,19,pt,yr,3,25),Di(t,20,pt,NP,3,17)),$=0,L=0;L<t.R.g;L++)jA(t.R,t.B[L])!=0&&++$;if($!=0)for(rP(t,21),qt(t,$,pt),f=0;f<t.R.g;f++)jA(t.R,t.B[f])!=0&&(qt(t,f,pt),qt(t,jA(t.R,t.B[f])>>4,2));if(t.R.L&&(dA(t,22,pt,d9,1,-1),Di(t,23,pt,F8,1,-1),Di(t,24,pt,Qo,2,21)),(t.Q&16)!=0){for(f=0;f<t.R.g;f++)if(i0(t.R,t.B[f])){for(rP(t,25),n=0;n<t.R.g;n++)qt(t,i0(t.R,t.B[n])?1:0,1);break;}}if(A1=Z$(t),A1!=null){for($=0,S=0;S<t.R.i;S++)A1[t.C[S]]&&++$;for(rP(t,26),qt(t,$,pt),x=0;x<t.R.i;x++)A1[t.C[x]]&&qt(t,x,pt);}for(t.R.L&&dA(t,27,pt,Pe,1,-1),$=0,N=0;N<t.R.i;N++)c1(t.R,t.C[N])==16&&++$;if($!=0)for(rP(t,28),qt(t,$,pt),S=0;S<t.R.i;S++)c1(t.R,t.C[S])==16&&qt(t,S,pt);for(t.R.L&&(dA(t,29,pt,k8,2,30),dA(t,30,pt,l9,7,32),dA(t,32,pt,X6,2,44),dA(t,33,pt,xf,5,39),dA(t,34,pt,no,1,-1),Di(t,35,pt,Nf,1,-1),Di(t,36,pt,96,2,5)),$=0,tt=0;tt<t.R.i;tt++)(c1(t.R,t.C[tt])==32||c1(t.R,t.C[tt])==64)&&++$;if($!=0)for(rP(t,37),qt(t,$,pt),R=0;R<t.R.i;R++)(c1(t.R,t.C[R])==32||c1(t.R,t.C[R])==64)&&(qt(t,R,pt),qt(t,c1(t.R,t.C[R])==32?0:1,1));if(t.b&&(t.Q&16)!=0){for($=0,et=0,g=0;g<t.R.g;g++){for(W=0,Qt=O(t.R,t.B[g]);Qt<Ct(t.R,t.B[g]);Qt++)i0(t.R,_(t.R,t.B[g],Qt))&&(ct=Qt-O(t.R,t.B[g]),W|=1<<ct,et=w.Math.max(et,ct+1));W!=0&&++$;}if($!=0)for(rP(t,38),qt(t,$,pt),qt(t,et,3),f=0;f<t.R.g;f++){for(W=0,Qt=O(t.R,t.B[f]);Qt<Ct(t.R,t.B[f]);Qt++)i0(t.R,_(t.R,t.B[f],Qt))&&(ct=Qt-O(t.R,t.B[f]),W|=1<<ct);W!=0&&(qt(t,f,pt),qt(t,W,et));}}if(t.R.L&&dA(t,39,pt,M2,4,47),ht!=0){for(yt=W8(rt),Lt=W8(wt),rP(t,40),qt(t,ht,pt),qt(t,yt,6),qt(t,Lt,16),f=0;f<t.R.g;f++)if(bt=eP(t.R,t.B[f]),bt!=null&&(bt.length>15||xT(bt)>127))for(qt(t,f,pt),Jt=w.Math.min(63,bt.length),qt(t,Jt,yt),Xt=0;Xt<Jt;Xt++)qt(t,(zt(Xt,bt.length),bt.charCodeAt(Xt)),Lt);}qt(t,0,1),t.J=OL(t);}function j6(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct,Xt,St,A1,Qt,bt,yt,Jt,S1,D1,Q1,Lt,pt,U0,V1;for(this.b=new Fh((rt=Ey,rt)),bt=(q1(),nn),ut(t,15),st=true,P=0;P<t.g;P++)if((t.v[P]&3)!=0&&(t.v[P]&3)!=3&&(t.v[P]&b1)>>18!=1){st=false;break;}if(Xt=-1,st){for(H=c(F,m,6,32,15,1),St=0,r=0;r<t.g;r++)if((t.v[r]&3)!=0&&(t.v[r]&3)!=3&&(t.v[r]&b1)>>18==1){et=(t.v[r]&b1)>>18!=1&&(t.v[r]&b1)>>18!=2?-1:(t.v[r]&VA)>>20,++H[et],St<H[et]&&(St=H[et],Xt=et);break;}}for(this.a=A||new C0(),Qt=t.Q!=null?t.Q:"",q(this.a,Qt+bt),q(this.a,"Actelion Java MolfileCreator 1.0"+bt+bt),B0(this,t.r),B0(this,t.s),q(this.a,"  0  0"),B0(this,st?0:1),q(this.a,"  0  0  0  0  0999 V2000"+bt),W=t.r==1,Q=1;Q<t.r;Q++)if(t.K[Q].a!=t.K[0].a||t.K[Q].b!=t.K[0].b||t.K[Q].c!=t.K[0].c){W=true;break;}if(Y=1,W)if(e!=0)Y=e;else if(v=dP(t,t.r,t.s,(J1(),Bn)),v!=0)(v<1||v>3)&&(Y=1.5/v);else {for(A1=Ge,r=1;r<t.r;r++)for(D=0;D<r;D++)x=t.K[D].a-t.K[r].a,N=t.K[D].b-t.K[r].b,tt=t.K[D].c-t.K[r].c,S=x*x+N*N+tt*tt,A1>S&&(A1=S);Y=3/A1;}for(o=0;o<t.r;o++)W?(tQ(this,Y*t.K[o].a),tQ(this,Y*-t.K[o].b),tQ(this,Y*-t.K[o].c)):q(this.a,"    0.0000    0.0000    0.0000"),(t.w==null?null:t.w[o])!=null?q(this.a," L  "):gt(V(t.C[o],1),0)?q(this.a," A  "):t.D[o]>=129&&t.D[o]<=144||t.D[o]==154?q(this.a," R# "):(T=(J1(),a0)[t.D[o]],q(this.a," "+T),T.length==1?q(this.a,"  "):T.length==2&&q(this.a," ")),q(this.a," 0  0  0"),$=V(uP,t.C[o]),z($,0)==0?q(this.a,"  0"):z($,384)==0?q(this.a,"  3"):z($,128)==0?q(this.a,"  2"):z($,1792)==0?q(this.a,"  1"):z($,1664)==0&&q(this.a,"  2"),q(this.a,gt(V(t.C[o],je),0)?"  1":"  0"),V1=((t.v[o]&b8)>>>27)-1,V1==-1?q(this.a,"  0"):V1==0?q(this.a," 15"):B0(this,V1),q(this.a,"  0  0  0"),B0(this,w.Math.abs(t.A[o])),q(this.a,"  0  0"+bt);for(b=0;b<t.s;b++){switch(t.I[b]){case 1:Jt=1,Lt=0;break;case 2:Jt=2,Lt=0;break;case 4:Jt=3,Lt=0;break;case 129:Jt=1,Lt=6;break;case 257:Jt=1,Lt=1;break;case 386:Jt=2,Lt=3;break;case 8:Jt=4,Lt=0;break;case 16:Jt=8,Lt=0;break;default:Jt=1,Lt=0;}st&&(Lt==1||Lt==6)&&(r=t.F[0][b],(t.v[r]&b1)>>18==2?Lt=0:(t.v[r]&b1)>>18==1&&((t.v[r]&b1)>>18!=1&&(t.v[r]&b1)>>18!=2?-1:(t.v[r]&VA)>>20)!=Xt&&(Lt=4)),j=t.H[b]&31,j!=0&&(j==8?Jt=4:j==3?Jt=5:j==9?Jt=6:j==10?Jt=7:Jt=8),D1=t.H[b]&384,U0=D1==0?0:D1==256?1:2,B0(this,1+t.F[0][b]),B0(this,1+t.F[1][b]),B0(this,Jt),B0(this,Lt),q(this.a,"  0"),B0(this,U0),q(this.a,"  0"+bt);}for(yt=0,L=0;L<t.r;L++)t.t[L]!=0&&++yt;if(yt!=0)for(C=0,r=0;r<t.r;r++)t.t[r]!=0&&(C==0&&(q(this.a,"M  CHG"),B0(this,w.Math.min(8,yt))),q(this.a," "),B0(this,r+1),R=t.t[r],R<0?(q(this.a,"  -"),R=-R):q(this.a,"   "),Ye(this.a,48+R&d1),--yt,(++C==8||yt==0)&&(C=0,q(this.a,bt)));for(yt=0,s=0;s<t.r;s++)t.B[s]==0||++yt;if(yt!=0)for(C=0,r=0;r<t.r;r++)t.B[r]!=0&&(C==0&&(q(this.a,"M  ISO"),B0(this,w.Math.min(8,yt))),q(this.a," "),B0(this,r+1),q(this.a," "),B0(this,t.B[r]),--yt,(++C==8||yt==0)&&(C=0,q(this.a,bt)));for(yt=0,y=0;y<t.r;y++)(t.v[y]&48)!=0&&++yt;if(yt!=0){for(C=0,r=0;r<t.r;r++)if((t.v[r]&48)!=0){switch(C==0&&(q(this.a,"M  RAD"),B0(this,w.Math.min(8,yt))),q(this.a," "),B0(this,r+1),t.v[r]&48){case 16:q(this.a,"   1");break;case 32:q(this.a,"   2");break;case 48:q(this.a,"   3");}--yt,(++C==8||yt==0)&&(C=0,q(this.a,bt));}}for(yt=0,l=0;l<t.r;l++)(t.D[l]>=129&&t.D[l]<=144||t.D[l]==154)&&++yt;if(yt!=0)for(C=0,r=0;r<t.r;r++)k=t.D[r],(k>=129&&k<=144||k==154)&&(C==0&&(q(this.a,"M  RGP"),B0(this,w.Math.min(8,yt))),q(this.a," "),B0(this,r+1),q(this.a," "),B0(this,k==154?0:k>=142?k-141:k-125),--yt,(++C==8||yt==0)&&(C=0,q(this.a,bt)));if(t.L){for(yt=0,r=0;r<t.r;r++)gt(V(t.C[r],120),0)&&++yt;if(yt!=0)for(C=0,D=0;D<t.r;D++)S1=V(t.C[D],120),z(S1,0)!=0&&(C==0&&(q(this.a,"M  RBC"),B0(this,w.Math.min(8,yt))),q(this.a," "),B0(this,D+1),z(S1,112)==0?q(this.a,"  -1"):z(S1,8)==0?q(this.a,"   1"):z(S1,104)==0?q(this.a,"   2"):z(S1,88)==0?q(this.a,"   3"):z(S1,56)==0&&q(this.a,"   4"),--yt,(++C==8||yt==0)&&(C=0,q(this.a,bt)));for(h=0;h<t.r;h++)if(g=t.w==null?null:t.w[h],g!=null){for(q(this.a,"M  ALS "),B0(this,h+1),B0(this,g.length),q(this.a,gt(V(t.C[h],1),0)?" T ":" F "),a=0;a<g.length;a++)switch(ht=(J1(),a0)[g[a]],ht.length){case 1:q(this.a,ht+"   ");break;case 2:q(this.a,ht+"  ");break;case 3:q(this.a,ht+" ");break;default:q(this.a,"   ?");}q(this.a,bt);}for(yt=0,i=0;i<t.r;i++)gt(V(t.C[i],6144),0)&&++yt;if(yt!=0)for(C=0,D=0;D<t.r;D++)pt=V(t.C[D],6144),z(pt,0)!=0&&(C==0&&(q(this.a,"M  SUB"),B0(this,w.Math.min(8,yt))),q(this.a," "),B0(this,D+1),gt(V(pt,S0),0)?q(this.a,"   "+(t.e[D]+1)):q(this.a,"  -2"),--yt,(++C==8||yt==0)&&(C=0,q(this.a,bt)));}for(yt=0,f=0;f<t.r;f++)(t.u==null||t.u[f]==null?null:on((ct=t.u[f],w0(),ct)))!=null&&++yt;if(yt!=0)for(Q1=0,n=0;n<t.r;n++)ht=t.u==null||t.u[n]==null?null:on((wt=t.u[n],w0(),wt)),ht!=null&&(++Q1,q(this.a,"M  STY  1 "),B0(this,Q1),q(this.a," DAT"),q(this.a,bt),q(this.a,"M  SLB  1 "),B0(this,Q1),q(this.a," "),B0(this,Q1),q(this.a,bt),q(this.a,"M  SAL "),B0(this,Q1),q(this.a,"  1 "),B0(this,n+1),q(this.a,bt),q(this.a,"M  SDT "),B0(this,Q1),q(this.a," "),q(this.a,Sy),q(this.a,bt),q(this.a,"M  SDD "),B0(this,Q1),q(this.a," "),tQ(this,t.K[n].a),tQ(this,t.K[n].b),q(this.a,"    DA    ALL  1       5"),q(this.a,bt),q(this.a,"M  SED "),B0(this,Q1),q(this.a," "),q(this.a,ht),q(this.a,bt));q(this.a,hr+bt);}function R6(t,e,A,n,P,r,i){var f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct,Xt,St,A1,Qt,bt,yt,Jt,S1,D1,Q1,Lt,pt,U0,V1,l0,m1,F1,T0;for(t.k=e,Ri(t.k),t.s=new Jn(),t.a=new vd(),t.r&&Ln(t.r,0),t.b=0,t.p=false,Q=t.q!=0,bt=null,l=c(F,m,6,32,15,1),l[0]=-1,yt=c(F,m,6,16,15,1),D1=c(F,m,6,16,15,1),S1=c(F,m,6,16,15,1),Jt=c(F,m,6,16,15,1),W=0;W<16;W++)yt[W]=-1;for(s=0,x=-1,Q1=false,ht=false,H=false,v=0,g=1,T=0;A[n]<=32;)++n;for(;n<P;){if(Lt=A[n++]&d1,ev(Lt)||Lt==42||Lt==63||Lt==33&&Q&&Q1||Lt==35&&Q&&Q1||Lt==36&&Q&&Q1){if(y=new Ck(t,t.j|t.q),Q1){if((t.j&128)!=0){if(R=new eg(n-1),n=m6(y,A,n,P,true,true),A[n-1]!=93){for(;A[n-1]!=93;)n=m6(y,A,n+1,P,true,true),++R.a;t.f.add(R);}}else n=m6(y,A,n,P,Q,false);}else n=j$(y,A,n,P,Q);if(Q1=false,y.q&&G(y.q,0)){x=l[v],l[v]=e.r,CD(e,y.q?G(y.q,0):null),x!=-1&&g!=512&&(h=J0(t.k,x,x,g),T!=0&&(t.p=true,Xe(t.k,h,T,true),Os(t.k,h))),g=1,T=0;continue;}if(y.d==-1&&Lt!=63)throw At(new H1("SmilesParser: unknown element label found. Position:"+(n-1)));y.r&&(t.p=true),L=xa(y,t.k,Lt,n),W0(t.k,L)&&++t.b,x=l[v],x!=-1&&g!=512&&(h=J0(t.k,x,L,g),T!=0&&(t.p=true,Xe(t.k,h,T,true),Os(t.k,h))),g=1,T=0,l[v]=L,s!=0&&(O9(t.k,L,s),s=0),i&&(A1=bt?Be(bt,U1(x)):null,A1&&AQ(A1,L,(wt=n,y.d==1&&ge(t.k,L)==0,wt)),y.p&&(!bt&&(bt=new cP()),Y=y.g==9?0:y.g,We(bt,U1(L),new Ab(t,L,n-2,x,Y,y.i))));continue;}if(Lt==46){l[v]=-1,g=512;continue;}if(Lt==45||Lt==61||Lt==35||Lt==36||Lt==58||Lt==47||Lt==92||Lt==60||Lt==126||Lt==33||Lt==64){if(Q1)throw At(new H1("SmilesParser: unexpected bond symbol inside square brackets: '"+String.fromCharCode(Lt)+P4+(n-1)));for(C=0;Lt==45||Lt==61||Lt==35||Lt==36||Lt==58||Lt==47||Lt==92||Lt==60||Lt==126||Lt==33||Lt==64;){if(Lt==33){if(Lt=A[n++]&d1,Lt==64)T|=128;else if(Lt==45&&A[n]==62||Lt==60&&A[n]==45)C|=16,++n;else if(Lt==45)C|=1;else if(Lt==61)C|=2;else if(Lt==35)C|=4;else if(Lt==36)C|=32;else if(Lt==58)C|=8;else throw At(new H1("SmilesParser: bond symbol '"+String.fromCharCode(Lt)+"' not allowed after '!'. Position:"+(n-1)));}else if(Lt==64?T|=256:Lt==61?g=2:Lt==35?g=4:Lt==36?g=32:Lt==58?g=8:Lt==126?T|=15:Lt==47?i&&(g=257):Lt==92?i&&(g=129):(Lt==45&&A[n]==62||Lt==60&&A[n]==45)&&(g=16,++n),A[n]==44)for(T|=(g==16?62:Lt)==61?2:(g==16?62:Lt)==35?4:(g==16?62:Lt)==36?32:(g==16?62:Lt)==58?8:(g==16?62:Lt)==62?16:(g==16?62:Lt)==126?127:1;A[n]==44;)A[n+1]==60&&A[n+2]==45||A[n+1]==45&&A[n+2]==62?(T|=16,n+=3):(T|=(A[n+1]&d1)==61?2:(A[n+1]&d1)==35?4:(A[n+1]&d1)==36?32:(A[n+1]&d1)==58?8:(A[n+1]&d1)==62?16:(A[n+1]&d1)==126?127:1,n+=2);if(A[n]==59){++n,Lt=A[n++]&d1;continue;}C!=0&&(T|=127&~C);break;}continue;}if(Lt<=32){n=P;continue;}if(an(Lt)){if(ct=Lt-48,Q1){for(;n<P&&an(A[n]&d1);)ct=10*ct+A[n]-48,++n;s=ct;}else {if(k=ht?n-3:n-2,tt=A[k]==45||A[k]==47||A[k]==92||A[k]==61||A[k]==35||A[k]==36||A[k]==58||A[k]==62||A[k]==126,ht&&n<P&&an(A[n]&d1)&&(ct=10*ct+A[n]-48,ht=false,++n),ct>=yt.length){if(ct>=100)throw At(new H1("SmilesParser: ringClosureAtom number out of range: "+ct));for(Xt=yt.length,rt=yt.length;rt<=ct;)rt=w.Math.min(100,rt+16);for(yt=(o8(rt),pP(yt,c(F,m,6,rt,15,1),0,rt)),D1=(o8(rt),pP(D1,c(F,m,6,rt,15,1),0,rt)),S1=(o8(rt),pP(S1,c(F,m,6,rt,15,1),0,rt)),Jt=(o8(rt),pP(Jt,c(F,m,6,rt,15,1),0,rt)),$=Xt;$<rt;$++)yt[$]=-1;}if(yt[ct]==-1)yt[ct]=l[v],D1[ct]=n-1,S1[ct]=tt?g:-1,Jt[ct]=tt?T:0;else {if(yt[ct]==l[v])throw At(new H1("SmilesParser: ring closure to same atom"));i&&bt&&(A1=Be(bt,U1(yt[ct])),A1&&AQ(A1,l[v],D1[ct]),A1=Be(bt,U1(l[v])),A1&&AQ(A1,yt[ct],n-1)),S1[ct]!=-1?g=S1[ct]:g==257?g=129:g==129&&(g=257),f=yt[ct],D=l[v],h=(T0=J0(t.k,f,D,g),qD(t.s,f+"_"+D,B(d(F,1),m,6,15,[D1[ct],n-1])),qD(t.s,D+"_"+f,B(d(F,1),m,6,15,[D1[ct],n-1])),av(t.a,f),av(t.a,D),T0),Jt[ct]!=0&&(T=Jt[ct]),T!=0&&(t.p=true,Xe(t.k,h,Jt[ct],true),Os(t.k,h)),yt[ct]=-1;}g=1,T=0;}continue;}if(Lt==43)throw At(new H1("SmilesParser: '+' found outside brackets. Position:"+(n-1)));if(Lt==40){if(l[v]==-1){H=true;continue;}++v,l.length==v&&(l=Mn(l,l.length+32)),l[v]=l[v-1];continue;}if(Lt==41){if(v==0){if(!H)throw At(new H1("SmilesParser: Closing ')' without opening counterpart. Position:"+(n-1)));l[0]=-1,H=false;continue;}--v;continue;}if(Lt==91){Q1=true;continue;}if(Lt==93)throw At(new H1("SmilesParser: closing bracket at unexpected position:"+(n-1)));if(Lt==37){ht=true;continue;}throw At(new H1("SmilesParser: unexpected character outside brackets: '"+String.fromCharCode(Lt)+vM+(n-1)));}if(g!=1)throw At(new H1("SmilesParser: dangling open bond; position:"+n));for(a=0;a<yt.length;a++)if(yt[a]!=-1)throw At(new H1("SmilesParser: dangling ring closure: "+a+"; position:"+n));for(N=Tu(t.k),t.k.T=true,ut(t.k,1),o=0;o<t.k.r;o++)if(eP(t.k,o)!=null){if(S=u3(t.k,o)[0],t.p||t.q==2){if(S!=9)if(t.i)for(et=0;et<S;et++)J0(t.k,o,i9(t.k,1),1);else S==0&&w1(t.k,o,1792,true),S==1&&w1(t.k,o,1664,true),S==2&&w1(t.k,o,1408,true),S==3&&w1(t.k,o,896,true);}else {if(S==9&&(S=0),!Ae(t.k,o)&&(!W0(t.k,o)||X(t.k,o)==6&&R1(t.k,o)==0)){for(F1=eQ(X(t.k,o)),b=false,pt=G1(t.k,o),pt-=Cu(t.k,o,pt),pt+=S,W0(t.k,o)&&++pt,V1=F1,l0=0,m1=V1.length;l0<m1;++l0)if(U0=V1[l0],pt<=U0){b=true,U0==pt+2?Je(t.k,o,48):U0==pt+1?Je(t.k,o,32):(U0!=pt||U0!=F1[0])&&aA(t.k,o,pt);break;}b||aA(t.k,o,pt);}if(t.i||!fs(t.k,o))for(et=0;et<S;et++)J0(t.k,o,i9(t.k,1),1);}}else !t.i&&(t.p||t.q==2)&&(S=Gh(t.k,o),S>=1&&w1(t.k,o,128,true),S>=2&&w1(t.k,o,256,true),S>=3&&w1(t.k,o,512,true),S>=4&&w1(t.k,o,Qe,true));if(!t.i&&(t.p||t.q==2)&&O5(t.k,false),ut(t.k,1),rW(t),f1t(t,Q,t.p),t.k.u=null,t.k.T=false,i&&(Ba(t),bt)){for(Qt=(St=new oD(bt).a.ad().Tb(),new UD(St));Qt.a.cd();)A1=(j=Qt.a.dd(),j.jd()),me(t.k,N[A1.a],mW(A1,N),false);TD(t.k,0);}TD(t.k,0),r&&(st=new a8(t.d),gt(t.n,0)&&Z7(st,t.n),U9(st,t.k),i&&Kh(t.k)),(t.p||t.q==2)&&(ve(t.k,true),up(t.k),Ej(t.k));}function fM(){fM=v1,Io=B(d(ft,2),DA,13,0,[B(d(ft,1),Dt,2,6,["e","daXJ@@PjyITuiX@`!dahJ@@SJYIMMfPB#IaLJfxP IaAhl[`#!BDpAl@AL@[@Be}aL@[@@ !B|Osp?Q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gFQ@@`rrpdlHHpipBEXf@#qYEbp q^aU#!B{ZRRqA?AQfyA@L_C !B}QFw@h`B_tnH_P##"]),B(d(ft,1),Dt,2,6,["Acetal-Aldol-Addition","dmdB@@serQS@sJjfd@p`Xir\\@`j\\@aUJXK@!daxL@@[df[ZjT@qQdxACdxABjTqf@#qB@`OuX qBtM{#!B_]]}rHKWw?y}uy[~GJbBu{wWqG| !BfJK~TIa]fJJghg{`pP@##"]),B(d(ft,1),Dt,2,6,["Acetal-Aldol-Condensation","dmdB@@serQS@sJjfd@p`Xir\\@`j\\@aUJXK@!gNp`CTjUiV@qQS`DJg@HUVXV@#qB@`OuX qqj{`#!B?[_}b@Jw_?{}m~[~[N@Bm?vwkN| !BfsK~yzPrw}m?rzQM##"]),B(d(ft,1),Dt,2,6,["Acetal-Aldol-Condensation-Cyclization","dkLB@@ZURYUvUjljh@paHpr\\@`!didD@@yIfUXXHL@CFNS`D@#IXljNPY@@@ IXljIyA#!BbOw~_x`Bm?vH?[_}b@JH?_y?b@Jw?Xc} !BbOvH?Oy??`BH?Xa}?`C~_p##"]),B(d(ft,1),Dt,2,6,["Enolester-Cleavage","gOQ`@fdscT`_Qp!gOQ`@cdTASS@P#q}Kr` q}cNP#!B@k]}mpC~@k]}mqdY !Bb@K~@Hc}BfzH@hc}##"]),B(d(ft,1),Dt,2,6,["propargylEnone","gCa@@dmXFD@!gCa@@dkHD#qNT qLV#!BbOw~_?y? !B@AL@[@@S##"]),B(d(ft,1),Dt,2,6,["Arndt-Eistert","daiDaJYBBHj^{HhAYMpAaA@!daiD`FzLBHPVsZl@p`@#IyHHZ[@ IzDGBi`#!B?`Bw?H`Bn]{~\\g?~@Ox !B@rzH?_y?b@JH?_n~bOt##"]),B(d(ft,1),Dt,2,6,["Curtius","gO]IcVaDF[s{HhCIe@`!gN]HMWADHJfm`XP@#q~Jk` qytUX#!B@O{|b@Jw\\o{~_?x@ !Bj]y??g?~?[^G_hc}##"]),B(d(ft,1),Dt,2,6,["diazom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#!BDpAl@IkqDpAl@AL@[@@ !BFaFw@h`BbOw~@H`BbOt##"]),B(d(ft,1),Dt,2,6,["didehydroCopeWithAromatisation","gNp@Di]ejDcjcr|wK`!gOp@DjWkB@@H#qrLkx q\\oQp#!B?g~H?K_}bGvH?H`B !Bm?w~@Hc}mpJw@ox@##"]),B(d(ft,1),Dt,2,6,["symAldolNitrogenRing","dovJ@GBfttf\\v\\qjViPCADGbDodnGp!doNJ@JCSmtefWTCaYjje@H#IlZXi]]yL~C IqMVCzaIim?#!BQtl_riY?Qtl_rfuvNCQ`uZd@NCQ`uVVu}?sA]P !B?`BH@ox@bGvH@k\\Bb@JH_Xa}b@K~_rYltUr|W@##"]),B(d(ft,1),Dt,2,6,["Diels-Alder","gFP@LdPLjA@!gFp@DiTujhB#qiZf qMSf#!B?_C}}?spIPFV@@ !B?g~w@k_}m?vw@`##"]),B(d(ft,1),Dt,2,6,["Claisen-RA","gGQ@@eKtRA@!gGQ@@djqRA@#qMsT qM\\V#!B_qL@Dw}l@Fp@Dp !B@AL@[@@S@Fp@Dp##"]),B(d(ft,1),Dt,2,6,["Cope","gGQ@DeZmRAbhcApIF@P@!gGQ@HeZmRAbhc@HIFC`@#qkNT qi\\V#!B_vp@[@@S@Fp@Dp !B_vp@[@@S@Fp@Dp##"]),B(d(ft,1),Dt,2,6,["OxyCope","gNq@@dr}SHFD@!gNq@@djkUHD#qynZ` qykbp#!B?g~w?Xc}mpJH@hc} !B@Fp@DpAl@AL@[@@S##"]),B(d(ft,1),Dt,2,6,["Vinylcyclopropane","gKP@DklVj@`!gKP@Di\\Vj@`#qaVh qTqh#!Bm?vH?PC~?K\\ !B?g|_Fa}eTv\\##"]),B(d(ft,1),Dt,2,6,["Furan-CH2-OH-Rearrangement","gOp`@tiguif`H!gOp`@tfWMZZ`H#qZna@ qZtM@#!BTLtk^sE?BOs|]pc} !BBOuPtdy?UGm@V]Ho##"]),B(d(ft,1),Dt,2,6,["rearrangement1032","gOp`ATieMji`H!gOp`ATeekZj`H#qaSnx qa]~P#!BTLtk^pc|LW?|]pc} !BBOpH?UCRSg}T^tAY##"]),B(d(ft,1),Dt,2,6,["Pinacol-Rearrangement","gNp`ATffjj@pPh!gOP`@tfXZhCAA`#qb^ix qb^oH#!B@k^H@k_}@k_~@Hc} !BbOvH@oy??`BH?PFf##"]),B(d(ft,1),Dt,2,6,["1,3-WaterEliminationWith12Shift","gJQ@@dmU@_SP!gKa@@`vtA}A@#qiTp qjap#!BbOvH@ox@bOt !BJdE?[@Al@AL##"]),B(d(ft,1),Dt,2,6,["Epoxydation","gB``ADcdCB@!gC``AhtUPGtt@#qqb qtQ#!BjW}Y\\YX@ !B?g~w?^Va##"]),B(d(ft,1),Dt,2,6,["oxydativePropargylAmine13Shift","gKi@HDEZpLHOQP!gJY@BDeVXB#qMr` qNTh#!BqiXTy{U?mW| !B@Fp@DpAl@AL##"]),B(d(ft,1),Dt,2,6,["Baeyer-Villiger","gFQ`@[dTAZ`LHP!gFQ`@jdrMPGtl@#qrak qrlK#!B_?{}mwvHs^FVP@ !BbOvH@oy?bOuQzP##"]),B(d(ft,1),Dt,2,6,[KV,"gGa@@dYs@XHFJIBDQbUeHPbLRl@!gFQ@@eNUPFJIBDQbUeHPbLRls@`#qbq] qfQk#!B@AOIDW}l@tD@Dp !B_qL@Dw}l_qNcDP##"]),B(d(ft,1),Dt,2,6,[KV,"gBa@@d\\`XP@!gJQ@@eOU@XpdHQFIVY`P#qbq qfQ@#!B@AOIDW}l !B_qL@Dw}l_qL##"]),B(d(ft,1),Dt,2,6,["Hantzsch Thiazol","daZHPDp@chaIMefh@ppDzTD~hYmC^bhbcPp]dQbUg~pp!gKXHL@aJWFe`H#qNPe@ qNj`#!BvuK[KUxv_yS[k_zhvuH !BTqa`FbpX?`@##"]),B(d(ft,1),Dt,2,6,["Oxadiazole","gOX`BEdTASW@XQ@!gOu@HPeKNMKTA@#qrDMX qpULX#!BmpK~@K_}Mlx@?`C~ !BZ?`C}v|m_rYR[z?\\##"]),B(d(ft,1),Dt,2,6,["Imidazole","dmeHPNg@qJqLbTtATijZ@LLJnuDmhWtSDXUFC`?rIoTAP!gOt@ATieuej`H#qDPpM_@ q~ZM`#!BqvKGg_yOqvKGg_xphrGkLcz@_sD !BTMHkACD@BOw|B@QT##"]),B(d(ft,1),Dt,2,6,["1,2,3-Triazole","gB`HAbIGXFDWiM@!gF|@ADeKXmT`P#QIp Q@v#!B_vpU?g}l !BTv]`YRqg?g|XK@##"]),B(d(ft,1),Dt,2,6,["1,2,4-Triazole","deFD@NALbbfASUW@FD]YJZLUCAVJ}?nES@!gO|@ABeKNLuRA@#qDB@FM q@LuP#!BY?r~@F_]jDJW`j`}Iaxx[UC] !BTv]@IPqgog|hCBT_##"])]);}function An(){An=v1,aE=new iD(),ZE=B(d(ft,1),Dt,2,6,["?","H","He","Li","Be","B","C","N","O","F","Ne","Na","Mg","Al","Si","P","S","Cl","Ar","K","Ca","Sc","Ti","V","Cr","Mn","Fe","Co","Ni","Cu","Zn","Ga","Ge","As","Se","Br","Kr","Rb","Sr","Y","Zr","Nb","Mo","Tc","Ru","Rh","Pd","Ag","Cd","In","Sn","Sb","Te","I","Xe","Cs","Ba","La","Ce","Pr","Nd","Pm","Sm","Eu","Gd","Tb","Dy","Ho","Er","Tm","Yb","Lu","Hf","Ta","W","Re","Os","Ir","Pt","Au","Hg","Tl","Pb","Bi","Po","At","Rn","Fr","Ra","Ac","Th","Pa","U","Np","Pu","Am","Cm","Bk","Cf","Es","Fm","Md","No","Lr","Rf","Db","Sg","Bh","Hs","Mt","Ds","Rg","Cn","Nh","Fl","Mc","Lv","Ts","Og",t0,t0,t0,t0,t0,t0,t0,t0,t0,t0,"R4","R5","R6","R7","R8","R9","R10","R11","R12","R13","R14","R15","R16","R1","R2","R3","A","A1","A2","A3",t0,t0,"D","T","X","R","H2","H+","Nnn","HYD","Pol",t0,t0,t0,t0,t0,t0,t0,t0,t0,t0,t0,"Ala","Arg","Asn","Asp","Cys","Gln","Glu","Gly","His","Ile","Leu","Lys","Met","Phe","Pro","Ser","Thr","Trp","Tyr","Val"]),$E=B(d(Kt,1),t1,6,15,[0,1,4,7,9,11,12,14,16,19,20,23,24,27,28,31,32,35,40,39,40,45,48,51,52,55,56,59,58,63,64,69,74,75,80,79,84,85,88,89,90,93,98,0,102,103,106,107,114,115,120,121,130,127,132,133,138,139,140,141,142,0,152,153,158,159,164,165,166,169,174,175,180,181,184,187,192,193,195,197,202,205,208,209,209,210,222,223,226,227,232,231,238,237,244,243,247,247,251,252,257,258,259,262,267,268,271,270,277,276,281,281,283,285,289,289,293,294,294,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,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,156,114,115,103,128,129,57,137,113,113,128,131,147,97,87,101,186,163,99]),WE=B(d(E,2),m8,10,0,[null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[0]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[4]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[0]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[4]),B(d(E,1),I,6,15,[3,5]),B(d(E,1),I,6,15,[2,4,6]),B(d(E,1),I,6,15,[1,3,5,7]),B(d(E,1),I,6,15,[0]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),null,null,null,null,null,null,null,null,null,null,B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[3,5]),B(d(E,1),I,6,15,[2,4,6]),B(d(E,1),I,6,15,[1,3,5,7]),B(d(E,1),I,6,15,[0,2]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),null,null,null,null,null,null,null,null,null,null,B(d(E,1),I,6,15,[1,2,3]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[3,5]),B(d(E,1),I,6,15,[2,4,6]),B(d(E,1),I,6,15,[1,3,5,7]),B(d(E,1),I,6,15,[0,2,4,6]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2])]),_E=B(d(E,2),m8,10,0,[null,B(d(E,1),I,6,15,[1]),null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),null,null,B(d(E,1),I,6,15,[-3]),B(d(E,1),I,6,15,[-2]),B(d(E,1),I,6,15,[-1]),null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),null,B(d(E,1),I,6,15,[-3]),B(d(E,1),I,6,15,[-2]),B(d(E,1),I,6,15,[-1]),null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,3,4]),B(d(E,1),I,6,15,[2,3,4,5]),B(d(E,1),I,6,15,[2,3,6]),B(d(E,1),I,6,15,[2,3,4,7]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[1,2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[-3,3,5]),B(d(E,1),I,6,15,[-2]),B(d(E,1),I,6,15,[-1]),null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[4]),B(d(E,1),I,6,15,[3,5]),B(d(E,1),I,6,15,[6]),B(d(E,1),I,6,15,[4,6,7]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[-3,3,5]),B(d(E,1),I,6,15,[-2,4,6]),B(d(E,1),I,6,15,[-1]),null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3,4]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[4]),B(d(E,1),I,6,15,[5]),B(d(E,1),I,6,15,[6]),B(d(E,1),I,6,15,[4,6,7]),B(d(E,1),I,6,15,[3,4]),B(d(E,1),I,6,15,[3,4]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[1,3]),B(d(E,1),I,6,15,[1,2]),B(d(E,1),I,6,15,[1,3]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[3,5]),B(d(E,1),I,6,15,[-2,2,4]),B(d(E,1),I,6,15,[-1,1]),null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[4]),B(d(E,1),I,6,15,[4,5]),B(d(E,1),I,6,15,[3,4,5,6]),B(d(E,1),I,6,15,[3,4,5,6]),B(d(E,1),I,6,15,[3,4,5,6]),B(d(E,1),I,6,15,[3,4,5,6]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3,4]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[3])]),XE=B(d(ft,1),Dt,2,6,[r4,i4,f4]);}function J1(){J1=v1,a0=B(d(ft,1),Dt,2,6,["?","H","He","Li","Be","B","C","N","O","F","Ne","Na","Mg","Al","Si","P","S","Cl","Ar","K","Ca","Sc","Ti","V","Cr","Mn","Fe","Co","Ni","Cu","Zn","Ga","Ge","As","Se","Br","Kr","Rb","Sr","Y","Zr","Nb","Mo","Tc","Ru","Rh","Pd","Ag","Cd","In","Sn","Sb","Te","I","Xe","Cs","Ba","La","Ce","Pr","Nd","Pm","Sm","Eu","Gd","Tb","Dy","Ho","Er","Tm","Yb","Lu","Hf","Ta","W","Re","Os","Ir","Pt","Au","Hg","Tl","Pb","Bi","Po","At","Rn","Fr","Ra","Ac","Th","Pa","U","Np","Pu","Am","Cm","Bk","Cf","Es","Fm","Md","No","Lr","Rf","Db","Sg","Bh","Hs","Mt","Ds","Rg","Cn","Nh","Fl","Mc","Lv","Ts","Og",t0,t0,t0,t0,t0,t0,t0,t0,t0,t0,"R4","R5","R6","R7","R8","R9","R10","R11","R12","R13","R14","R15","R16","R1","R2","R3","A","A1","A2","A3",t0,t0,"D","T","X","R","H2","H+","Nnn","HYD","Pol",t0,t0,t0,t0,t0,t0,t0,t0,t0,t0,t0,"Ala","Arg","Asn","Asp","Cys","Gln","Glu","Gly","His","Ile","Leu","Lys","Met","Phe","Pro","Ser","Thr","Trp","Tyr","Val"]),wr=B(d(Kt,1),t1,6,15,[0,1,4,7,9,11,12,14,16,19,20,23,24,27,28,31,32,35,40,39,40,45,48,51,52,55,56,59,58,63,64,69,74,75,80,79,84,85,88,89,90,93,98,0,102,103,106,107,114,115,120,121,130,127,132,133,138,139,140,141,142,0,152,153,158,159,164,165,166,169,174,175,180,181,184,187,192,193,195,197,202,205,208,209,209,210,222,223,226,227,232,231,238,237,244,243,247,247,251,252,257,258,259,262,267,268,271,270,277,276,281,281,283,285,289,289,293,294,294,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,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,156,114,115,103,128,129,57,137,113,113,128,131,147,97,87,101,186,163,99]),dE=B(d(E,1),I,6,15,[6]),gE=B(d(E,1),I,6,15,[2]),v9=B(d(E,2),m8,10,0,[null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[0]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[4]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[0]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[4]),B(d(E,1),I,6,15,[3,5]),B(d(E,1),I,6,15,[2,4,6]),B(d(E,1),I,6,15,[1,3,5,7]),B(d(E,1),I,6,15,[0]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),null,null,null,null,null,null,null,null,null,null,B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[3,5]),B(d(E,1),I,6,15,[2,4,6]),B(d(E,1),I,6,15,[1,3,5,7]),B(d(E,1),I,6,15,[0,2]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),null,null,null,null,null,null,null,null,null,null,B(d(E,1),I,6,15,[1,2,3]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[3,5]),B(d(E,1),I,6,15,[2,4,6]),B(d(E,1),I,6,15,[1,3,5,7]),B(d(E,1),I,6,15,[0,2,4,6]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[2])]),Y4=B(d(E,2),m8,10,0,[null,B(d(E,1),I,6,15,[1]),null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),null,null,B(d(E,1),I,6,15,[-3]),B(d(E,1),I,6,15,[-2]),B(d(E,1),I,6,15,[-1]),null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),null,B(d(E,1),I,6,15,[-3]),B(d(E,1),I,6,15,[-2]),B(d(E,1),I,6,15,[-1]),null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,3,4]),B(d(E,1),I,6,15,[2,3,4,5]),B(d(E,1),I,6,15,[2,3,6]),B(d(E,1),I,6,15,[2,3,4,7]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[1,2]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[-3,3,5]),B(d(E,1),I,6,15,[-2]),B(d(E,1),I,6,15,[-1]),null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[4]),B(d(E,1),I,6,15,[3,5]),B(d(E,1),I,6,15,[6]),B(d(E,1),I,6,15,[4,6,7]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[-3,3,5]),B(d(E,1),I,6,15,[-2,4,6]),B(d(E,1),I,6,15,[-1]),null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3,4]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[4]),B(d(E,1),I,6,15,[5]),B(d(E,1),I,6,15,[6]),B(d(E,1),I,6,15,[4,6,7]),B(d(E,1),I,6,15,[3,4]),B(d(E,1),I,6,15,[3,4]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[1,3]),B(d(E,1),I,6,15,[1,2]),B(d(E,1),I,6,15,[1,3]),B(d(E,1),I,6,15,[2,4]),B(d(E,1),I,6,15,[3,5]),B(d(E,1),I,6,15,[-2,2,4]),B(d(E,1),I,6,15,[-1,1]),null,B(d(E,1),I,6,15,[1]),B(d(E,1),I,6,15,[2]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[4]),B(d(E,1),I,6,15,[4,5]),B(d(E,1),I,6,15,[3,4,5,6]),B(d(E,1),I,6,15,[3,4,5,6]),B(d(E,1),I,6,15,[3,4,5,6]),B(d(E,1),I,6,15,[3,4,5,6]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3,4]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[2,3]),B(d(E,1),I,6,15,[3])]);}function aQ(t,e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct,Xt,St,A1,Qt,bt,yt,Jt;if(t.K||t.yb(e,Vi(t.L,e),W1(t.R,mt(t.L,e)),Z1(t.R,Rt(t.L,e))),ht=null,R1(t.L,e)!=0&&(A1=w.Math.abs(R1(t.L,e))==1?"":""+w.Math.abs(R1(t.L,e)),ht=R1(t.L,e)<0?A1+"-":A1+"+"),H=null,wt=h0(t.L,e),z(wt,0)!=0&&(gt(V(wt,eo),0)&&(H=H==null?"*":H+",*"),gt(V(wt,Ao),0)&&(H=H==null?"!*":H+",!*"),gt(V(wt,no),0)?H=H==null?"ha":H+",ha":gt(V(wt,2),0)?H=H==null?"a":H+",a":gt(V(wt,4),0)&&(H=H==null?"!a":H+",!a"),gt(V(wt,S0),0)&&(H=H==null?"s":H+",s"),gt(V(wt,uP),0)&&(R=V(wt,uP),z(R,1792)==0?H=H==null?"h0":H+",h0":z(R,1664)==0?H=H==null?"h1":H+",h1":z(R,1408)==0?H=H==null?"h2":H+",h2":z(R,128)==0?H=H==null?"h>0":H+",h>0":z(R,384)==0?H=H==null?"h>1":H+",h>1":z(R,896)==0?H=H==null?"h>2":H+",h>2":z(R,Qe)==0?H=H==null?"h<3":H+",h<3":z(R,1536)==0?H=H==null?"h<2":H+",h<2":z(R,1152)==0&&(H=H==null?"h1-2":H+",h1-2")),gt(V(wt,yr),0)&&(D=V(wt,yr),z(D,Po)==0?H=H==null?"c0":H+",c0":z(D,Ef)==0?H=H==null?"c+":H+",c+":z(D,Sf)==0&&(H=H==null?"c-":H+",c-")),gt(V(wt,li),0)&&(st=V(wt,li),z(st,98304)==0?H=H==null?"pi0":H+",pi0":z(st,81920)==0?H=H==null?"pi1":H+",pi1":z(st,49152)==0?H=H==null?"pi2":H+",pi2":z(st,Gn)==0&&(H=H==null?"pi>0":H+",pi>0")),gt(V(wt,hi),0)&&(a=V(wt,hi),z(a,ro)==0?H=H==null?"n1":H+",n1":z(a,j2)==0?H=H==null?"n2":H+",n2":z(a,R2)==0?H=H==null?"n3":H+",n3":z(a,io)==0?H=H==null?"n<3":H+",n<3":z(a,KA)==0?H=H==null?"n<4":H+",n<4":z(a,Ti)==0?H=H==null?"n>1":H+",n>1":z(a,NP)==0?H=H==null?"n>2":H+",n>2":z(a,If)==0?H=H==null?"n>3":H+",n>3":z(a,3276800)==0?H=H==null?"n1-2":H+",n1-2":z(a,2228224)==0?H=H==null?"n1-3":H+",n1-3":z(a,2490368)==0&&(H=H==null?"n2-3":H+",n2-3")),gt(V(wt,xf),0)&&(l=V(wt,xf),z(l,Ty)==0?H=H==null?"e0":H+",e0":z(l,cy)==0?H=H==null?"e1":H+",e1":z(l,wy)==0?H=H==null?"e2":H+",e2":z(l,gy)==0?H=H==null?"e3":H+",e3":z(l,x6)==0?H=H==null?"e<2":H+",e<2":z(l,N6)==0?H=H==null?"e<3":H+",e<3":z(l,fo)==0?H=H==null?"e<4":H+",e<4":z(l,p2)==0?H=H==null?"e>0":H+",e>0":z(l,dy)==0?H=H==null?"e>1":H+",e>1":z(l,By)==0?H=H==null?"e>2":H+",e>2":z(l,Do)==0?H=H==null?"e>3":H+",e>3":z(l,G6)==0?H=H==null?"e1-2":H+",e1-2":z(l,O6)==0?H=H==null?"e1-3":H+",e1-3":z(l,q6)==0&&(H=H==null?"e2-3":H+",e2-3")),gt(V(wt,120),0)&&(rt=V(wt,120),z(rt,112)==0?H=H==null?"!r":H+",!r":z(rt,8)==0?H=H==null?"r":H+",r":z(rt,96)==0?H=H==null?"rb<3":H+",rb<3":z(rt,104)==0?H=H==null?"rb2":H+",rb2":z(rt,88)==0?H=H==null?"rb3":H+",rb3":z(rt,56)==0&&(H=H==null?"rb4":H+",rb4")),gt(V(wt,lr),0)&&(H=H==null?"r"+Fe(O0(V(wt,lr),22)):H+","+("r"+Fe(O0(V(wt,lr),22)))),gt(V(wt,l9),0)&&(H=eL(H,ZW(wt))),gt(V(wt,M2),0)&&(H=H==null?"ox"+Fe(Y1(O0(V(wt,M2),47),7)):H+","+("ox"+Fe(Y1(O0(V(wt,M2),47),7)))),gt(V(wt,d9),0)&&(H=H==null?"f":H+",f")),ge(t.L,e)!=0&&(H=eL(H,""+ge(t.L,e))),St=0,jA(t.L,e)!=0)switch(jA(t.L,e)){case 16:ht=ht==null?"|":ht+",|";break;case 32:St=1;break;case 48:St=2;}if(L=null,(t.G&64)==0){if(E9(t.L,e))L="?";else if(OU(t.L,e)!=0&&(De(t.L,e)==0||A==null||A[De(t.L,e)][OA(t.L,e)]>1))if(O(t.L,e)==2)switch(OU(t.L,e)){case 2:L=xi(t.L,e)?"p":"P";break;case 1:L=xi(t.L,e)?"m":"M";break;default:L="*";}else switch(OU(t.L,e)){case 1:L=xi(t.L,e)?"r":"R";break;case 2:L=xi(t.L,e)?"s":"S";break;default:L="*";}}if((t.G&768)!=0&&(L=eL(L,""+H0(t.L,e))),W=null,(t.G&16)!=0&&M1(t.L,e)!=0&&(W=""+M1(t.L,e)),T=null,xQ(t.L,e)!=-1&&(h=e5(t,e),h!=-1&&(T=h==0?"abs":((h&255)==1?"&":"or")+(1+(h>>8)))),C=0,(t.G&je)==0&&(t.L.L?gt(V(h0(t.L,e),O1),0)&&(C=xt(t.L,e)):(X(t.L,e)!=6||ge(t.L,e)!=0||!t.q[e]||jA(t.L,e)!=0)&&(C=xt(t.L,e))),tt=false,N=false,r=(t.G&o0)!=0?null:eP(t.L,e),r!=null&&r.startsWith("]")&&(tt=H==null,N=true,H=eL((zt(1,r.length+1),r.substr(1)),H),r=null),r!=null?C=0:IA(t.L,e)!=null?(P=gt(V(h0(t.L,e),1),0)?"[!":"[",r=P+L5(t.L,e)+"]",r.length>5&&(r=P+IA(t.L,e).length+"]")):gt(V(h0(t.L,e),1),0)?r="?":(X(t.L,e)!=6||ht!=null||H!=null&&(!tt||(t.G&g8)==0)||C>0||!t.q[e])&&(r=Vi(t.L,e)),gt(V(h0(t.L,e),O1),0)&&C==0&&(H=H==null?"!s":H+",!s"),et=0,!i0(t.L,e)&ye(t.L,e)&&$1(t,-8),r!=null?(et=t.vb(r),EP(t,W1(t.R,mt(t.L,e)),Z1(t.R,Rt(t.L,e)),r,true),t.s[e]=true):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<uo?(b[0]-=ct+HA,b[3]+=ct+l1):ct<0?(b[2]+=ct+HA,b[3]-=ct):ct<HA?(b[1]+=ct,b[2]+=HA-ct):(b[0]+=ct-HA,b[1]+=l1-ct));if(O(t.L,e)==0?rA(t.L,e)?b[3]-=.2:b[1]-=.2:b[1]-=.1,(ht!=null||W!=null)&&(b[1]+=10),(H!=null||L!=null)&&(b[3]+=10),k="",C!=0&&(j=t.vb("H"),v=0,g=t.wb(),C>1&&(k=""+C,t.Cb((t.X*2+1)/3|0),v=t.vb(k)),b[1]<.6||b[3]<.6?(o=Z1(t.R,Rt(t.L,e)),b[1]<=b[3]?(b[1]+=10,Q=W1(t.R,mt(t.L,e))+(et+j)/2):(b[3]+=10,Q=W1(t.R,mt(t.L,e))-(et+j)/2-v)):(Q=W1(t.R,mt(t.L,e)),b[0]<b[2]?(b[0]+=10,o=Z1(t.R,Rt(t.L,e))-g):(b[2]+=10,o=Z1(t.R,Rt(t.L,e))+g)),v>0&&(Qt=Q+(j+v)/2,yt=o+((t.wb()*4+4)/8|0),EP(t,Qt,yt,k,true),t.Cb(t.X)),EP(t,Q,o,"H",true)),i=0,St!=0){for($=50,s=0,S=0;S<4;S++)y=S>1?S-2:S+2,b[S]<$?(i=S,$=b[S],s=b[y]):b[S]==$&&b[y]>s&&(i=S,s=b[y]);switch(i){case 0:Q=W1(t.R,mt(t.L,e)),o=Z1(t.R,Rt(t.L,e))-t.V-et/2;break;case 1:Q=W1(t.R,mt(t.L,e))+t.V+et/2,o=Z1(t.R,Rt(t.L,e));break;case 2:Q=W1(t.R,mt(t.L,e)),o=Z1(t.R,Rt(t.L,e))+t.V+et/2;break;default:Q=W1(t.R,mt(t.L,e))-t.V-et/2,o=Z1(t.R,Rt(t.L,e));}if(St==1)Ft(t.$,new lA(Q-t.V,o-t.V,2*t.V,2*t.V)),t.K||Ft(t.U,new Vu(Q,o,wQ(t,e)?-3:t.p[e]));else {switch(i){case 2:case 0:bt=2*t.V,Jt=0,Q-=t.V;break;case 1:bt=0,Jt=2*t.V,o-=t.V;break;default:bt=0,Jt=2*t.V,o-=t.V;}Ft(t.$,new lA(Q-t.V,o-t.V,2*t.V,2*t.V)),t.K||Ft(t.U,new Vu(Q,o,wQ(t,e)?-3:t.p[e])),Ft(t.$,new lA(Q+bt-t.V,o+Jt-t.V,2*t.V,2*t.V)),t.K||Ft(t.U,new Vu(Q+bt,o+Jt,wQ(t,e)?-3:t.p[e]));}}t.C==-8&&$1(t,-9);}function p6(t,e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct,Xt,St,A1,Qt,bt,yt,Jt,S1,D1,Q1,Lt,pt,U0,V1,l0,m1,F1,T0,Y0,ZA,M0,B1,Ue,$e,kA,kr,M8,sP,yP,rn,mr,Kn,fn,b9,eD,lt,r1,C8,AD,nD,PD;if(e<t.g&&f0(t.q,e)){if(lf(t,e,5)){if(h=new pL(t.r),k=new pL(t.r),l=false,N=false,tt=false,t.D[e]==6||t.D[e]==7){for(C=0;C<t.e[e];C++)if(lt=t.j[e][C],!!lf(t,lt,5))for(js(t,e,lt)&&(t.D[lt]==8||t.D[lt]==16||t.D[lt]==7&&t.e[lt]+xt(t,lt)==3&&!i2(t,lt))&&Ft(h,U1(lt)),T0=0;T0<t.e[lt];T0++)r1=t.j[lt][T0],r1!=e&&lf(t,r1,5)&&js(t,e,r1)&&(t.D[r1]==8||t.D[r1]==16||t.D[r1]==7&&t.e[r1]+xt(t,r1)==3&&!i2(t,r1))&&Ft(k,U1(r1));for(y=new Zt(h);y.a<y.c.a.length;)if(s=_t(y).a,t.D[s]==8||t.D[s]==16){N=true;break;}for(g=new Zt(k);g.a<g.c.a.length;)if(T=_t(g).a,t.D[T]==8||t.D[T]==16){tt=true;break;}for(R=0;R<h.a.length;R++)for(F1=R;F1<k.a.length;F1++)if(js(t,(ee(R,h.a.length),h.a[R]).a,(ee(F1,k.a.length),k.a[F1]).a)){l=true;break;}}switch(t.D[e]){case 6:if(k.a.length==0){for($e=0,ZA=0,B1=0,Ue=0,R=0;R<t.e[e];R++)lt=t.j[e][R],t.D[lt]==7&&t.e[lt]+xt(t,lt)==3&&(++$e,t.t[lt]>0&&!i2(t,lt)&&++ZA,lf(t,lt,5)&&++B1,lf(t,lt,6)&&++Ue);if(($e==2&&B1>0||$e==3&&B1==2)&&ZA>0&&Ue==0)return 80;}if(!(h.a.length==0^k.a.length==0)){for(PD=true,nD=true,R=0;R<t.e[e];R++)lt=t.j[e][R],(t.D[lt]!=6||!jJ(t,lt))&&(PD=false),js(t,e,lt)&&!(lt<t.g&&f0(t.q,lt))&&(nD=false);if(h.a.length==0&&k.a.length==0&&!PD&&nD||h.a.length!=0&&h.a.length!=0&&(!l||!N&&!tt))return 78;}if(h.a.length!=0&&(k.a.length==0||N))return 63;if(k.a.length!=0&&(h.a.length==0||tt))return 64;break;case 7:if(i2(t,e))return 82;if(h.a.length==0&&k.a.length==0)return t.e[e]+xt(t,e)==3?39:76;if(t.e[e]+xt(t,e)==3&&h.a.length==0^k.a.length==0)return 81;if(h.a.length!=0&&(k.a.length==0||N))return 65;if(k.a.length!=0&&(h.a.length==0||tt))return 66;if(h.a.length!=0&&k.a.length!=0)return 79;break;case 8:return 59;case 16:return 44;}}if(lf(t,e,6))switch(t.D[e]){case 6:return 37;case 7:return i2(t,e)?69:t.e[e]+xt(t,e)==3?58:38;}}switch(t.D[e]){case 3:if(t.k[e]==0)return 92;break;case 6:if(t.e[e]+xt(t,e)==4)return (t.q&&e<t.g?UA(t.q,e):0)==3?22:(t.q&&e<t.g?UA(t.q,e):0)==4?20:1;if(t.e[e]+xt(t,e)==3){for(kA=0,kr=0,sP=0,Kn=0,b=0,C=0;C<t.e[e];C++)lt=t.j[e][C],dt(t,o1(t,e,lt))==2&&(b=t.D[lt]),t.e[lt]+xt(t,lt)==1?(t.D[lt]==8&&++sP,t.D[lt]==16&&++Kn):t.D[lt]==7&&(t.e[lt]+xt(t,lt)==3?++kr:t.e[lt]+xt(t,lt)==2&&dt(t,o1(t,e,lt))==2&&++kA);return kr>=2&&kA==0&&b==7?57:sP==2||Kn==2?41:(t.q&&e<t.g?UA(t.q,e):0)==4&&b==6?30:b==7||b==8||b==15||b==16?3:2;}if(t.e[e]+xt(t,e)==2)return 4;if(t.e[e]+xt(t,e)==1)return 60;break;case 7:for(b9=0,V1=false,S=0;S<t.e[e];S++)if(lt=t.j[e][S],t.D[lt]==8&&t.e[lt]+xt(t,lt)==1&&++b9,G1(t,e)+xt(t,e)>=3&&(t.D[lt]==15||t.D[lt]==16)){for(mr=0,F1=0;F1<t.e[lt];F1++)r1=t.j[lt][F1],t.D[r1]==8&&t.e[r1]+xt(t,r1)==1&&++mr;V1||(V1=mr>=2);}if(t.e[e]+xt(t,e)==4)return i2(t,e)?68:34;if(t.e[e]+xt(t,e)==3){if(G1(t,e)+xt(t,e)>=4){for(j=false,R=0;R<t.e[e];R++)if(lt=t.j[e][R],dt(t,o1(t,e,lt))==2&&(j=t.D[lt]==7||t.D[lt]==6,t.D[lt]==6))for(F1=0;j&&F1<t.e[lt];F1++)r1=t.j[lt][F1],r1!=e&&(j=!(t.D[r1]==7&&t.e[r1]+xt(t,r1)==3));if(b9==1)return 67;if(b9>=2)return 45;if(j)return 54;}if(G1(t,e)+xt(t,e)>=3){for(ht=false,st=false,wt=false,rt=false,Qt=false,A1=false,A=0,n=0,P=0,r=0,f=0,o=0,R=0;R<t.e[e];R++)if(lt=t.j[e][R],t.D[lt]==6){for(Qt=true,lt<t.g&&f0(t.q,lt)&&(t.q&&lt<t.g?UA(t.q,lt):0)==6&&(A1=true),P=0,r=0,f=0,o=0,ZA=0,x=0,F1=0;F1<t.e[lt];F1++){if(r1=t.j[lt][F1],v=o1(t,lt,r1),dt(t,v)==2&&(t.D[r1]==8||t.D[r1]==16)&&(ht=true),(dt(t,v)==2||v<t.i&&Ee(t.q,v)&&(t.D[r1]==6||t.D[r1]==7&&Tz(t,r1)==1))&&(A=t.D[r1]),dt(t,v)==3&&(n=t.D[r1]),t.D[r1]==7&&t.e[r1]+xt(t,r1)==3){for(t.t[r1]==1&&++ZA,lf(t,lt,6)&&++x,Q=0,Y0=0;Y0<t.e[r1];Y0++)C8=t.j[r1][Y0],t.D[C8]==8&&++Q;Q<2&&++r;}t.D[r1]==7&&t.e[r1]+xt(t,r1)==2&&(dt(t,v)==2||v<t.i&&Ee(t.q,v))&&++P,r1<t.g&&f0(t.q,r1)&&(t.D[r1]==8&&++f,t.D[r1]==16&&++o);}A==7&&(r==2&&P==0&&ZA>0&&x==0&&t.e[lt]+xt(t,lt)<4&&(st=true),r==3&&(wt=true));}else if(t.D[lt]==7){for(i=0,D=0,L=0,F1=0;F1<t.e[lt];F1++)if(r1=t.j[lt][F1],v=o1(t,lt,r1),dt(t,v)==2){if(t.D[r1]==6){for(Y0=0;Y0<t.e[r1];Y0++)C8=t.j[r1][Y0],C8!=e&&(t.D[C8]==7?++i:t.D[C8]==8?++D:t.D[C8]==16&&++L);i==0&&D==0&&L==0&&!A1&&(rt=true);}t.D[r1]==7&&!A1&&(rt=true);}}if(Qt){if(n==7&&(V1=true),st)return 55;if(wt)return 56;if(!ht&&!V1&&(f==0&&o==0&&A1||A==6||A==7||A==15||n==6))return 40;}if(!V1&&(ht||rt))return 10;}}if(t.e[e]+xt(t,e)==2){if(G1(t,e)+xt(t,e)==4){for($=false,R=0;!$&&R<t.e[e];R++)lt=t.j[e][R],$=dt(t,o1(t,e,lt))==3;return $?61:53;}if(G1(t,e)+xt(t,e)==3){for(yt=false,W=false,R=0;R<t.e[e];R++)lt=t.j[e][R],dt(t,o1(t,e,lt))==2&&(yt=t.D[lt]==8&&b9==1,W=t.D[lt]==6||t.D[lt]==7);if(yt&&!W)return 46;if(W)return 9;}if(G1(t,e)+xt(t,e)>=2){for(Xt=false,R=0;R<t.e[e];R++)if(lt=t.j[e][R],t.D[lt]==16){for(eD=0,F1=0;F1<t.e[lt];F1++)r1=t.j[lt][F1],t.D[r1]==8&&t.e[r1]+xt(t,r1)==1&&++eD;Xt=eD==1;}if(Xt)return 48;if(!V1)return 62;}}if(V1)return 43;if(t.e[e]+xt(t,e)==1){for(St=false,a=false,R=0;!St&&!a&&R<t.e[e];R++)if(lt=t.j[e][R],St=dt(t,o1(t,e,lt))==3,t.D[lt]==7&&t.e[lt]+xt(t,lt)==2)for(F1=0;!a&&F1<t.e[lt];F1++)r1=t.j[lt][F1],a=t.D[r1]==7&&t.e[r1]+xt(t,r1)==2||t.D[r1]==6&&t.e[r1]+xt(t,r1)==3;if(St)return 42;if(a)return 47;}return 8;case 8:if(t.e[e]+xt(t,e)==3)return 49;if(t.e[e]+xt(t,e)==2){if(G1(t,e)+xt(t,e)==3)return 51;for(M0=0,R=0;R<t.e[e];R++)lt=t.j[e][R],t.D[lt]==1&&++M0;return M0+xt(t,e)==2?70:6;}if(t.k[e]<=1){for(M8=0,rn=0,fn=0,Q1=t.e[e]-t.k[e]+xt(t,e)>0,Y=false,H=false,D1=false,Jt=false,Lt=false,ct=false,bt=false,m1=false,U0=false,l0=false,pt=false,R=0;R<t.e[e]&&!(Q1||Y||H||D1||Jt||Lt||ct||bt||m1||U0||l0||pt);R++){if(lt=t.j[e][R],t.D[lt]==6||t.D[lt]==7||t.D[lt]==16)for(F1=0;F1<t.e[lt];F1++)r1=t.j[lt][F1],t.D[r1]==7&&t.e[r1]+xt(t,r1)==2&&++M8,t.D[r1]==8&&t.e[r1]+xt(t,r1)==1&&++rn,t.D[r1]==16&&t.e[r1]+xt(t,r1)==1&&++fn;Q1=t.D[lt]==1,t.D[lt]==6&&(Y=rn==2,H=dt(t,o1(t,e,lt))==2,D1=dt(t,o1(t,e,lt))==1&&rn==1),t.D[lt]==7&&(Jt=dt(t,o1(t,e,lt))==2,dt(t,o1(t,e,lt))==1&&rn==1&&(Lt=t.e[lt]+xt(t,lt)==2||G1(t,lt)+xt(t,lt)==3,ct=G1(t,lt)+xt(t,lt)==4),bt=rn>=2),t.D[lt]==16&&(m1=fn==1,U0=dt(t,o1(t,e,lt))==1||dt(t,o1(t,e,lt))==2&&rn+M8>1,l0=dt(t,o1(t,e,lt))==2&&rn+M8==1),pt=t.D[lt]==15||t.D[lt]==17;}if(D1||Lt||Q1)return 35;if(Y||bt||ct||m1||U0||pt)return 32;if(H||Jt||l0)return 7;}break;case 9:if(t.k[e]==1)return 11;if(t.k[e]==0)return 89;break;case 11:if(t.k[e]==0)return 93;break;case 12:if(t.k[e]==0)return 99;break;case 14:return 19;case 15:if(t.e[e]+xt(t,e)==4)return 25;if(t.e[e]+xt(t,e)==3)return 26;if(t.e[e]+xt(t,e)==2)return 75;break;case 16:if(t.e[e]+xt(t,e)==3||t.e[e]+xt(t,e)==4){for(yP=0,fn=0,et=false,R=0;R<t.e[e];R++)lt=t.j[e][R],t.D[lt]==6&&dt(t,o1(t,e,lt))==2&&(et=true),(t.k[lt]==1&&t.D[lt]==8||t.e[lt]+xt(t,lt)==2&&t.D[lt]==7)&&++yP,t.k[lt]==1&&t.D[lt]==16&&++fn;return t.e[e]+xt(t,e)==3&&yP==2&&et||t.e[e]+xt(t,e)==4?18:yP>0&&fn>0||yP==2&&!et?73:17;}if(t.e[e]+xt(t,e)==2){for(S1=false,R=0;R<t.e[e];R++)lt=t.j[e][R],t.D[lt]==8&&dt(t,o1(t,e,lt))==2&&(S1=true);return S1?74:15;}if(t.e[e]+xt(t,e)==1){for(AD=0,et=false,R=0;R<t.e[e];R++){for(lt=t.j[e][R],F1=0;F1<t.e[lt];F1++)r1=t.j[lt][F1],t.D[r1]==16&&t.e[r1]+xt(t,r1)==1&&++AD;t.D[lt]==6&&dt(t,o1(t,e,lt))==2&&(et=true);}return et&&AD!=2?16:72;}break;case 17:if(t.k[e]==4){for(sP=0,R=0;R<t.e[e];R++)lt=t.j[e][R],t.D[lt]==8&&++sP;if(sP==4)return 77;}if(t.k[e]==1)return 12;if(t.k[e]==0)return 90;break;case 19:if(t.k[e]==0)return 94;break;case 20:if(t.k[e]==0)return 96;break;case 26:if(t.k[e]==0){if(t.t[e]==2)return 87;if(t.t[e]==3)return 88;}break;case 29:if(t.k[e]==0){if(t.t[e]==1)return 97;if(t.t[e]==2)return 98;}break;case 30:if(t.k[e]==0)return 95;break;case 35:if(t.k[e]==1)return 13;if(t.k[e]==0)return 91;break;case 53:if(t.k[e]==1)return 14;}return 0;}function M6(){M6=v1,gl=B(d(XA,1),re,6,14,[524290,524292,524297,524301,589826,589827,589828,589829,589832,589833,589837,589838,688130,688131,688132,688137,688141,819202,819203,819204,819205,819208,819209,1114114,1114115,1114116,1114120,1212420,1343492,1343496,1638402,1638403,17367042,17367043,17367044,17367045,17367048,17367049,17367053,17367054,17465346,1074266116,1208483842,1208483844,1208549378,1208549379,1208549380,1208549384,1208549388,1409810434,1409875970,1409875971,1409875972,1409875976,1409974274,1409974280,1409974284,1678311426,1678311427,1678311428,1678311432,1678311436,1678409730,1678409731,1678409732,1678540802,1678540803,1678540804,1678540808,2282291202,2282291203,2282389506,2282389507,2282520578,2282520579,2483617794,2483617795,2483716098,2483716099,2752675842,3356033026,3557359618,3557457922,3557588994,34510798850,34510798851,34510798852,34510798856,34712125442,34712125443,34712125444,34712125448,34712223746,34712223747,34712223748,34980560898,34980560899,34980659202,35568287746,35568287747,35568287748,35568287752,35568386050,35568386051,35568386052,35568517122,35568517123,35568517124,35568517128,35568812034,35568812035,35568910338,35568910339,35568910350,35569336322,35585064962,35585064963,35585064964,35585064968,35769548802,35769614338,35769712642,35769843714,35786391554,ZC,WC,_C,$C,aC,tH,eH,AH,nH,PH,rH,iH,fH,3437652377603,DH,uH,4674334294019,QH,oH,4674602827778,UH,LH,sH,yH,5086651154435,lH,5086651252739,hH,5086651252744,TH,5086919589896,cH,5086919819266,wH,gH,dH,5636675633154,{l:589826,m:73760,h:4},{l:589827,m:73760,h:4},{l:688130,m:73760,h:4},{l:819202,m:73760,h:4},{l:65538,m:73764,h:4},{l:65539,m:73764,h:4},{l:589826,m:172064,h:4},{l:589827,m:172064,h:4},{l:688130,m:172064,h:4},{l:819202,m:172064,h:4},{l:819203,m:172064,h:4},{l:65538,m:172068,h:4},{l:65539,m:172068,h:4},{l:589826,m:172112,h:4},{l:589827,m:172112,h:4},{l:688130,m:172112,h:4},{l:819202,m:172112,h:4},{l:65538,m:172116,h:4},{l:163842,m:172116,h:4},{l:589826,m:303136,h:4},{l:688130,m:303136,h:4},{l:819202,m:303136,h:4},{l:65538,m:303140,h:4},{l:589826,m:303184,h:4},{l:688130,m:303184,h:4},{l:819202,m:303184,h:4},{l:65538,m:303188,h:4},BH,vH,FH,kH,mH,bH,jH,{l:688130,m:590224,h:4},{l:819202,m:590224,h:4},RH,pH,MH,CH,HH,VH,EH,SH,{l:688135,m:590416,h:4},IH,{l:1212430,m:590416,h:4},{l:65538,m:598052,h:4},{l:65538,m:598100,h:4},{l:65539,m:598100,h:4},{l:163842,m:598100,h:4},{l:163843,m:598100,h:4},xH,NH,GH,{l:688131,m:598304,h:4},OH,qH,zH,KH,JH,{l:589826,m:688672,h:4},YH,XH,ZH,WH,{l:589827,m:590112,h:336},_H,$H,aH,tV,eV,AV,nV,PV,rV,{l:688130,m:819536,h:400},iV,fV,DV,{l:589831,m:590112,h:592},uV,QV,oV,UV,LV,sV,{l:819207,m:819600,h:592},yV,lV,hV,{l:589832,m:1212816,h:592},{l:688136,m:1212816,h:592},TV,cV,wV,gV,dV,{l:589826,m:819488,h:8480},BV,vV,FV,kV,{l:819208,m:1213008,h:8480},mV,bV,{l:688130,m:590160,h:8484},{l:589826,m:598304,h:8484},jV,{l:819202,m:598304,h:8484}]),_f=B(d(Oe,1),uA,6,15,[-0.1899999976158142,1.2699999809265137,-0.7009999752044678,2.690999984741211,-0.22699999809265137,MM,.10599999874830246,-0.47600001096725464,-0.44699999690055847,-0.19099999964237213,-0.3330000042915344,.0860000029206276,.24699999392032623,-0.06199999898672104,.01600000075995922,.3869999945163727,.23499999940395355,-0.4320000112056732,-0.902999997138977,.38999998569488525,.5809999704360962,4.52400016784668,-0.6349999904632568,-0.2800000011920929,.7699999809265137,-0.05000000074505806,1.0870000123977661,.19200000166893005,.19599999487400055,-0.5199999809265137,.5419999957084656,.3630000054836273,.7919999957084656,.5920000076293945,.9639999866485596,CV,-0.6850000023841858,-0.3149999976158142,-0.4129999876022339,-0.5950000286102295,.2199999988079071,-1.4320000410079956,-2.253999948501587,.4399999976158142,-0.27000001072883606,-0.13300000131130219,-0.26899999380111694,.2669999897480011,.5720000267028809,-0.5680000185966492,.17399999499320984,-0.1850000023841858,-0.23499999940395355,GV,OV,-0.34200000762939453,-0.3479999899864197,-0.43700000643730164,-0.8040000200271606,-0.41200000047683716,-0.2150000035762787,-0.625,-0.8309999704360962,.4970000088214874,-0.4309999942779541,-1.3309999704360962,.5070000290870667,-0.6320000290870667,-0.5989999771118164,-0.15600000321865082,-0.3529999852180481,-0.164000004529953,-0.4410000145435333,-0.4970000088214874,-1.059999942779541,.11500000208616257,-0.22499999403953552,-0.15399999916553497,-0.03099999949336052,-1.5740000009536743,-1.093000054359436,SV,-0.44999998807907104,-0.5559999942779541,OV,2.384000062942505,1.75,-1.6660000085830688,-1.065999984741211,1.3270000219345093,.8029999732971191,-1.5049999952316284,-2.5369999408721924,GV,.14900000393390656,.5210000276565552,2.9049999713897705,-0.25200000405311584,.8600000143051147,.3610000014305115,.40299999713897705,.004999999888241291,1.1460000276565552,.9359999895095825,-0.30000001192092896,.20900000631809235,-0.5830000042915344,-0.024000000208616257,-0.009999999776482582,.6110000014305115,.4860000014305115,.8619999885559082,-0.03500000014901161,-0.5960000157356262,1.1610000133514404,1.6469999551773071,.843999981880188,.125,.1420000046491623,-0.17100000381469727,.44200000166893005,.08799999952316284,3.065999984741211,1.6519999504089355,qV,-0.017999999225139618,.023000000044703484,.0729999989271164,.2540000081062317,.5540000200271606,.5950000286102295,-0.4059999883174896,-0.6370000243186951,-0.17399999499320984,-0.10100000351667404,-0.5429999828338623,-2.4059998989105225,-3.2920000553131104,-0.05299999937415123,-0.19300000369548798,g4,-1.2610000371932983,-0.656000018119812,-0.7300000190734863,-0.9380000233650208,.12800000607967377,1.1540000438690186,.24199999868869781,-0.5289999842643738,-0.27799999713897705,-0.8019999861717224,.9120000004768372,-1.38100004196167,.46299999952316284,1.0740000009536743,-0.628000020980835,-0.9620000123977661,-1.8320000171661377,-1.4989999532699585,-2.115999937057495,-2.2070000171661377,-1.3170000314712524,2.500999927520752,-0.8489999771118164,VV,-0.621999979019165,2.121999979019165,-2.2260000705718994,.9129999876022339,-2.259000062942505,-1.25,1.3940000534057617,-1.4019999504089355,2.072999954223633,-2.9570000171661377,.29100000858306885,-3.4760000705718994,-2.7269999980926514,-3.131999969482422,-2.119999885559082,-0.7250000238418579,-0.296999990940094,.08299999684095383,.34700000286102295,-1.4249999523162842,-1.659999966621399,-1.281999945640564,-1.2649999856948853,.718999981880188,.1379999965429306,1.3020000457763672,.859000027179718,1.3589999675750732,.6589999794960022,-0.9399999976158142,.8999999761581421,.3190000057220459,-2.571000099182129,1.1089999675750732,.972000002861023,1.652999997138977,2.6019999980926514,.7289999723434448,1.065999984741211,1.0670000314712524,-0.3109999895095825,.03099999949336052,qV,-0.6809999942779541,-1.2580000162124634,iC,-3.0959999561309814,-0.2280000001192093,1.9329999685287476,.11900000274181366,2.1080000400543213,.11299999803304672,1.628000020980835,1.3079999685287476,3.3359999656677246,.7540000081062317,-0.4650000035762787,-0.3970000147819519,.07699999958276749,-0.4790000021457672,-0.15299999713897705,.14100000262260437,2.134999990463257,.23399999737739563,.460999995470047,.6700000166893005,-0.3610000014305115,-1.0390000343322754,-0.4830000102519989,.13699999451637268,-0.7680000066757202,-0.5109999775886536,3.4240000247955322,-0.8550000190734863,-0.5849999785423279,-1.5670000314712524,3.3429999351501465,1.840000033378601,.3889999985694885,1.121999979019165,d4,1.3350000381469727,.3659999966621399,-0.5569999814033508,.4320000112056732,.20399999618530273,.8820000290870667,.4659999907016754,-0.4580000042915344,.40400001406669617,.6570000052452087,1.1150000095367432,1.9759999513626099,1.7860000133514404,-0.035999998450279236,-1.0499999523162842,1.0449999570846558,.04399999976158142,1.0329999923706055,-1.0800000429153442,2.5390000343322754,2.234999895095825,l4,3.121000051498413,3.931999921798706,2.75]);}function DM(t,e,A,n,P){var r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N,tt,H,Y,et,W,$,a,st,ht,wt,rt,ct,Xt,St,A1,Qt,bt,yt,Jt,S1,D1,Q1,Lt,pt,U0,V1,l0,m1,F1,T0,Y0,ZA,M0,B1,Ue,$e,kA,kr,M8,sP,yP,rn,mr,Kn,fn,b9,eD,lt,r1,C8,AD,nD,PD,Sc,Ic,xc,Nc,Gc,Oc,qc,zc,Il,xl,Kc,Jc,Yc,Xc,Zc,Wc,Dn,_c,$c,ac,tw,ew,Aw,nw,Pw,rw,iw,fw,zP,Dw,H8,Z2,W2,ES,Nl,SS,IS,xS,NS,i1,uw,GS,OS,qS,j9,zS,KP,_2,Gl,Zo,KS,lP,Ol,JS,Wo,YS,_o,XS,$o;if(zL(e),e.d=null,!(A==null||0>=A.length)){if(t.g=e,Ol=8,n!=null&&(P<0||P>=n.length)&&(n=null),DL(t,A,0),f=nt(t,4),C=nt(t,4),f>8&&(Ol=f,f=C),f==0){ve(t.g,nt(t,1)==1);return;}for(D=nt(t,f),Q=nt(t,C),NS=nt(t,f),qS=nt(t,f),GS=nt(t,f),ht=nt(t,f),y=0;y<D;y++)i9(t.g,6);for($e=0;$e<NS;$e++)$0(t.g,nt(t,f),7);for(kA=0;kA<qS;kA++)$0(t.g,nt(t,f),8);for(lt=0;lt<GS;lt++)$0(t.g,nt(t,f),nt(t,8));for(Oc=0;Oc<ht;Oc++)b0(t.g,nt(t,f),nt(t,4)-8);for(wt=1+Q-D,yt=nt(t,4),R=0,de(t.g,0,0),Ve(t.g,0,0),Yn(t.g,0,0),Jt=n!=null&&n[P]>=39,lP=0,Wo=0,_o=0,$o=0,St=false,A1=false,Jt&&(n.length>2*D-2&&n[2*D-2]==39||n.length>3*D-3&&n[3*D-3]==39?(A1=true,St=n.length==3*D-3+9,zP=St?3*D-3:2*D-2,j=86*(n[zP+1]-40)+n[zP+2]-40,lP=w.Math.pow(10,j/2e3-1),zP+=2,JS=86*(n[zP+1]-40)+n[zP+2]-40,Wo=w.Math.pow(10,JS/1500-1),zP+=2,YS=86*(n[zP+1]-40)+n[zP+2]-40,_o=w.Math.pow(10,YS/1500-1),St&&(zP+=2,XS=86*(n[zP+1]-40)+n[zP+2]-40,$o=w.Math.pow(10,XS/1500-1))):St=n.length==3*D-3),t.ac()&&St&&(n=null,Jt=false),Dn=1;Dn<D;Dn++){if(Q1=nt(t,yt),Q1==0){Jt&&(de(t.g,Dn,t.g.K[0].a+8*(n[Dn*2-2]-83)),Ve(t.g,Dn,t.g.K[0].b+8*(n[Dn*2-1]-83)),St&&Yn(t.g,Dn,t.g.K[0].c+8*(n[2*D-3+Dn]-83))),++wt;continue;}R+=Q1-1,Jt&&(de(t.g,Dn,mt(t.g,R)+n[Dn*2-2]-83),Ve(t.g,Dn,Rt(t.g,R)+n[Dn*2-1]-83),St&&Yn(t.g,Dn,oA(t.g,R)+(n[2*D-3+Dn]-83))),J0(t.g,R,Dn,1);}for(nw=0;nw<wt;nw++)J0(t.g,nt(t,f),nt(t,f),1);for(Dw=c(Pt,it,6,Q,16,1),Y=0;Y<Q;Y++)switch(et=nt(t,2),et){case 0:Dw[Y]=true;break;case 2:g0(t.g,Y,2);break;case 3:g0(t.g,Y,4);}for(i=nt(t,f),Pw=0;Pw<i;Pw++)if(s=nt(t,f),Ol==8)j9=nt(t,2),j9==3?(Ne(t.g,s,1,0),me(t.g,s,1,false)):me(t.g,s,j9,false);else switch(j9=nt(t,3),j9){case 4:me(t.g,s,1,false),Ne(t.g,s,1,nt(t,3));break;case 5:me(t.g,s,2,false),Ne(t.g,s,1,nt(t,3));break;case 6:me(t.g,s,1,false),Ne(t.g,s,2,nt(t,3));break;case 7:me(t.g,s,2,false),Ne(t.g,s,2,nt(t,3));break;default:me(t.g,s,j9,false);}for(Ol==8&&nt(t,1)==0&&(t.g.M=true),r=nt(t,C),rw=0;rw<r;rw++)if(x=nt(t,C),c1(t.g,x)==1)switch(j9=nt(t,3),j9){case 4:Q8(t.g,x,1,false),T8(t.g,x,1,nt(t,3));break;case 5:Q8(t.g,x,2,false),T8(t.g,x,1,nt(t,3));break;case 6:Q8(t.g,x,1,false),T8(t.g,x,2,nt(t,3));break;case 7:Q8(t.g,x,2,false),T8(t.g,x,2,nt(t,3));break;default:Q8(t.g,x,j9,false);}else Q8(t.g,x,nt(t,2),false);for(ve(t.g,nt(t,1)==1),L=null,Zo=null,uw=0;nt(t,1)==1;)switch(bt=uw+nt(t,4),bt){case 0:for(i1=nt(t,f),iw=0;iw<i1;iw++)s=nt(t,f),w1(t.g,s,O1,true);break;case 1:for(i1=nt(t,f),fw=0;fw<i1;fw++)s=nt(t,f),SS=nt(t,8),O9(t.g,s,SS);break;case 2:for(i1=nt(t,C),kr=0;kr<i1;kr++)nt(t,C);break;case 3:for(i1=nt(t,f),M8=0;M8<i1;M8++)s=nt(t,f),w1(t.g,s,S0,true);break;case 4:for(i1=nt(t,f),sP=0;sP<i1;sP++)s=nt(t,f),Gl=Wt(nt(t,4),3),w1(t.g,s,Gl,true);break;case 5:for(i1=nt(t,f),yP=0;yP<i1;yP++)s=nt(t,f),o=Wt(nt(t,2),1),w1(t.g,s,o,true);break;case 6:for(i1=nt(t,f),rn=0;rn<i1;rn++)s=nt(t,f),w1(t.g,s,1,true);break;case 7:for(i1=nt(t,f),mr=0;mr<i1;mr++)s=nt(t,f),M0=Wt(nt(t,4),7),w1(t.g,s,M0,true);break;case 8:for(i1=nt(t,f),Kn=0;Kn<i1;Kn++){for(s=nt(t,f),k=nt(t,4),T=c(F,m,6,k,15,1),H8=0;H8<k;H8++)g=nt(t,8),T[H8]=g;MT(t.g,s,T);}break;case 9:for(i1=nt(t,C),fn=0;fn<i1;fn++)x=nt(t,C),Gl=nt(t,2)<<7,Xe(t.g,x,Gl,true);break;case 10:for(i1=nt(t,C),b9=0;b9<i1;b9++)x=nt(t,C),$=nt(t,5),Xe(t.g,x,$,true);break;case 11:for(i1=nt(t,f),eD=0;eD<i1;eD++)s=nt(t,f),w1(t.g,s,je,true);break;case 12:for(i1=nt(t,C),r1=0;r1<i1;r1++)x=nt(t,C),a=nt(t,8)<<9,Xe(t.g,x,a,true);break;case 13:for(i1=nt(t,f),C8=0;C8<i1;C8++)s=nt(t,f),zS=Wt(nt(t,3),14),w1(t.g,s,zS,true);break;case 14:for(i1=nt(t,f),AD=0;AD<i1;AD++)s=nt(t,f),xS=Wt(nt(t,5),17),w1(t.g,s,xS,true);break;case 15:case 31:uw+=16;break;case 16:for(i1=nt(t,f),nD=0;nD<i1;nD++)s=nt(t,f),_2=Wt(nt(t,3),22),w1(t.g,s,_2,true);break;case 17:for(i1=nt(t,f),PD=0;PD<i1;PD++)s=nt(t,f),aA(t.g,s,nt(t,4));break;case 18:for(i1=nt(t,f),Nl=nt(t,4),Sc=0;Sc<i1;Sc++){for(s=nt(t,f),Qt=nt(t,Nl),Z2=c(E,I,6,Qt,15,1),H8=0;H8<Qt;H8++)Z2[H8]=nt(t,7)<<24>>24;IP(t.g,s,on((W2=Z2,w0(),W2)));}break;case 19:for(i1=nt(t,f),Ic=0;Ic<i1;Ic++)s=nt(t,f),st=Wt(nt(t,3),25),w1(t.g,s,st,true);break;case 20:for(i1=nt(t,C),xc=0;xc<i1;xc++)x=nt(t,C),_2=nt(t,3)<<17,Xe(t.g,x,_2,true);break;case 21:for(i1=nt(t,f),Nc=0;Nc<i1;Nc++)s=nt(t,f),Je(t.g,s,nt(t,2)<<4);break;case 22:for(i1=nt(t,f),Gc=0;Gc<i1;Gc++)s=nt(t,f),w1(t.g,s,d9,true);break;case 23:for(i1=nt(t,C),qc=0;qc<i1;qc++)x=nt(t,C),Xe(t.g,x,F8,true);break;case 24:for(i1=nt(t,C),zc=0;zc<i1;zc++)x=nt(t,C),o=nt(t,2)<<21,Xe(t.g,x,o,true);break;case 25:for(Il=0;Il<D;Il++)nt(t,1)==1&&vP(t.g,Il,true);break;case 26:for(i1=nt(t,C),L=c(F,m,6,i1,15,1),xl=0;xl<i1;xl++)L[xl]=nt(t,C);break;case 27:for(i1=nt(t,f),Kc=0;Kc<i1;Kc++)s=nt(t,f),w1(t.g,s,Pe,true);break;case 28:for(i1=nt(t,C),Jc=0;Jc<i1;Jc++)g0(t.g,nt(t,C),16);break;case 29:for(i1=nt(t,f),Yc=0;Yc<i1;Yc++)s=nt(t,f),ZA=Wt(nt(t,2),30),w1(t.g,s,ZA,true);break;case 30:for(i1=nt(t,f),Xc=0;Xc<i1;Xc++)s=nt(t,f),_2=Wt(nt(t,7),32),w1(t.g,s,_2,true);break;case 32:for(i1=nt(t,f),Zc=0;Zc<i1;Zc++)s=nt(t,f),KS=Wt(nt(t,2),44),w1(t.g,s,KS,true);break;case 33:for(i1=nt(t,f),Wc=0;Wc<i1;Wc++)s=nt(t,f),l0=Wt(nt(t,5),39),w1(t.g,s,l0,true);break;case 34:for(i1=nt(t,f),_c=0;_c<i1;_c++)s=nt(t,f),w1(t.g,s,no,true);break;case 35:for(i1=nt(t,C),$c=0;$c<i1;$c++)x=nt(t,C),Xe(t.g,x,Nf,true);break;case 36:for(i1=nt(t,C),ac=0;ac<i1;ac++)x=nt(t,C),W=nt(t,2)<<5,Xe(t.g,x,W,true);break;case 37:for(i1=nt(t,C),tw=0;tw<i1;tw++)x=nt(t,C),W=nt(t,1)==0?32:64,g0(t.g,x,W);break;case 38:for(i1=nt(t,f),rt=nt(t,3),Zo=c(F,m,6,D,15,1),ew=0;ew<i1;ew++)s=nt(t,f),ct=nt(t,rt),Zo[s]=ct;break;case 39:for(i1=nt(t,f),Aw=0;Aw<i1;Aw++)s=nt(t,f),OS=Wt(nt(t,4),47),w1(t.g,s,OS,true);break;case 40:for(i1=nt(t,f),Nl=nt(t,6),IS=nt(t,16),Ue=0;Ue<i1;Ue++){for(s=nt(t,f),Qt=nt(t,Nl),Z2=new C0(),H8=0;H8<Qt;H8++)Ye(Z2,nt(t,IS)&d1);IP(t.g,s,Z2.a);}}if(jf(new p9(t.g),Dw,false),L!=null)for(N=L,tt=0,H=N.length;tt<H;++tt)x=N[tt],g0(t.g,x,c1(t.g,x)==2?4:2);if(n==null&&!t.i&&A.length>t.e+1&&(A[t.e+1]==32||A[t.e+1]==9)&&(n=A,P=t.e+2),n!=null)try{if(n[P]==33||n[P]==35){for(DL(t,n,P+1),St=nt(t,1)==1,A1=nt(t,1)==1,KP=2*nt(t,4),S=1<<KP,T0=0,x=0,l=1;l<D;l++)x<Q&&K(t.g,1,x)==l?(T0=K(t.g,0,x++),F1=1):(T0=0,F1=8),S1=F1*(nt(t,KP)+1-(S>>1)),D1=F1*(nt(t,KP)+1-(S>>1)),de(t.g,l,mt(t.g,T0)+S1),Ve(t.g,l,Rt(t.g,T0)+D1),St&&Yn(t.g,l,oA(t.g,T0)+F1*(nt(t,KP)+1-(S>>1)));if(n[P]==35){for(B1=0,Y0=c(F,m,6,D,15,1),h=0;h<D;h++)B1+=Y0[h]=xt(t.g,h);for(s=0;s<D;s++)for(Ue=0;Ue<Y0[s];Ue++)M0=i9(t.g,1),J0(t.g,s,M0,1),de(t.g,M0,mt(t.g,s)+(nt(t,KP)+1-(S>>1))),Ve(t.g,M0,Rt(t.g,s)+(nt(t,KP)+1-(S>>1))),St&&Yn(t.g,M0,oA(t.g,s)+(nt(t,KP)+1-(S>>1))),Zo!=null&&(Zo[s]&1<<Ue)!=0&&vP(t.g,M0,!0);D+=B1,Q+=B1;}if(b=St?1.5:(J1(),J1(),Bn),v=dP(t.g,D,Q,b),A1)for(lP=OO(nt(t,KP),S),Wo=lP*sT(nt(t,KP),S),_o=lP*sT(nt(t,KP),S),St&&($o=lP*sT(nt(t,KP),S)),F1=lP/v,s=0;s<D;s++)de(t.g,s,Wo+F1*mt(t.g,s)),Ve(t.g,s,_o+F1*Rt(t.g,s)),St&&Yn(t.g,s,$o+F1*oA(t.g,s));else for(lP=1.5,F1=lP/v,s=0;s<D;s++)de(t.g,s,F1*mt(t.g,s)),Ve(t.g,s,F1*Rt(t.g,s)),St&&Yn(t.g,s,F1*oA(t.g,s));}else if(St&&!A1&&lP==0&&(lP=1.5),lP!=0&&t.g.s!=0){for(v=0,x=0;x<t.g.s;x++)Lt=mt(t.g,K(t.g,0,x))-mt(t.g,K(t.g,1,x)),pt=Rt(t.g,K(t.g,0,x))-Rt(t.g,K(t.g,1,x)),U0=St?oA(t.g,K(t.g,0,x))-oA(t.g,K(t.g,1,x)):0,v+=w.Math.sqrt(Lt*Lt+pt*pt+U0*U0);for(v/=t.g.s,m1=lP/v,s=0;s<t.g.r;s++)de(t.g,s,mt(t.g,s)*m1+Wo),Ve(t.g,s,Rt(t.g,s)*m1+_o),St&&Yn(t.g,s,oA(t.g,s)*m1+$o);}}catch(V8){if(V8=_1(V8),Yt(V8,19))V1=V8,ur(V1,(q1(),k9)),""+V1+on((ES=A,w0(),ES))+on((W2=n,W2)),n=null,St=false;else throw At(V8);}if(Xt=n!=null&&!St,BW(t),Xt||t.ac())for(ut(t.g,7),x=0;x<t.g.i;x++)dt(t.g,x)==2&&!A8(t.g,x)&&ze(t.g,x)==0&&yh(t.g,x);if(TD(t.g,0),!Xt&&t.ac())try{t.bc(t.g),Xt=!0;}catch(V8){if(V8=_1(V8),Yt(V8,19))V1=V8,ur(V1,(q1(),k9)),""+V1+on((W2=A,w0(),W2));else throw At(V8);}Xt?(hf(t.g),Kh(t.g)):St||TD(t.g,0);}}function pf(){pf=v1,F9=B(d(ft,1),Dt,2,6,["QM@HzAmdqjF@","RF@Q``","qC`@ISTAlQE`","`J@H","QM@HzAmdqbF@","qC`@ISTAlQEhqPp@","sJP@DiZhAmQEb","RF@QPvR@","QM@HzA@","qC`@ISTAlQEhpPp@","qC`@Qz`MbHl","sJP@DiZhAmQEcFZF@","RFPDXH","qC`@IVtAlQE`","QM@HvAmdqfF@","sGP@DiVj`FsDVM@","`L@H","sJP@DizhAmQEcFBF@","sJP@DjvhAmQEb","sFp@DiTt@@AlqEcP","sGP@LdbMU@MfHlZ","QMHAIhD","QM@HzAy@","sJP@DkVhAmQEb","sNp@DiUjj@[\\QXu`","sJP@DiZhAmQEcFBF@","sGP@DjVj`FsDVM@","RFPDTH","RG@DXOH@","sGP@Divj`FsDVMcAC@","sGP@Dj}j`FsDVM@","qC`@Qz`MbHmFRF@","sNp@LdbJjj@[\\QXu`","QMHAIhGe@","QM@HzAyd`","QM`AIhD","qC`@ISTA@","sGP@DkUj`FsDVM@","qC`@IVtAlQEhqPp@","sNp@DiUjj@[\\QXuqea`@","KAx@@IRjuUPAlHPfES\\","QM`BN`P","sJP@DjZhAmQEcFJF@","Hid@@DjU^nBBH@FtaBXUMp`","sNp@Diujj@[\\QXuq`a`@","sJP@DjvhAmQEcFZF@","sJP@DjZhAmQEcFFF@","sOp@DjWkB@@FwDVM\\YhX@","sNp@Dj}Zj@[\\QXu`","sNp@DiWjj@[\\QXuq`a`@","sOp@DjWkB@@D","KAx@@ITouUPAlHPfES\\","KAx@@YIDTjjh@vDHSBin@","sNp@DkUZj@[\\QXu`","RFPDXOH@","QM`BN`^L`","qC`@ISTAy@","sGP@LdbMU@MfHl[FVF@","qCb@AIZ`H","KAx@@IRjuUPAlHPfES]FFa`@","KAx@@ITnuUPAlHPfES\\","HiD@@DiUVjj`AmHPfES\\H","sNp@DjUjj@[\\QXu`","sJP@DkVhAmQEcFJF@","sGP@DjVj`FsDVMcCC@","qC`@Qz`MbHmFBF@","sJP@DkfhAmQEb","qC`@IVtAlQEhsPp@","sGP@Djuj`FsDVM@","sGP@Dj}j`FsDVMcMC@","sJP@DiZhA@","KAx@@ISjuUPAlHPfES]F@a`@","sJP@DjZhAmQEcFRF@","KAx@@IRnuUPAlHPfES]F@a`@","HiD@@DjWvjj`AmHPfES\\H","QMHAIhGd@","sNp@DiUjj@[\\QXuq`a`@","KAx@@IVjmUPAlHPfES\\","sGP@DjVj`FsDVMcMC@","QM`AIhGe@","HiD@@LdbJRjjh@[RDIaTwB","qCp@AIZ`H","sGP@LdbMU@MfHl[FFF@","QMDARVA@","sNp@LdbJjj@[\\QXuqba`@","sNp@LdbJjj@[\\QXuqca`@","sGP@Dkej`FsDVM@","qCb@AIZ`OI@","HaD@@DjUZxHH@AlHPfES]FLa`@","sGP@DkYj`FsDVM@","qCb@AIV`H","sNp@LdbJjj@[\\QXuqea`@","sGP@DkUj`FsDVMcEC@","sFp@DiTt@@Axa@","Hmt@@DjU_ZxHHj@AmhPfES\\Lj","QM`BN`^P","qCb@AIZ`OH`","sFp@DiTt@@AxaP","sGP@Djuj`FsDVMcEC@","sGP@Djuj`FsDVMcIC@","sGP@DkUj`FsDVMcKC@","sJP@DkfhAmQEcFRF@","sGP@DjVj`FsDVMcIC@","HaD@@DjUZxHH@AlHPfES]FFa`@","qC`@IRtDVqDV@","sNp@Dj}Zj@[\\QXuqfa`@","KAx@@ITnuUPAlHPfES]FFa`@","HiD@@DkUUjj`AmHPfES\\H","sJQ@@dkU@H","qC`@Qz`H","KAx@@IUkmUPAlHPfES\\","KAx@@ITouUPAlHPfES]FJa`@","sJP@H~j@[TQX`","sGP@DjZj`FsDVM@","sJP@DkVhAmQEcFFF@","sJX@@eKU@H","sJP@DizhAy@","QMHAIhGbP","KAx@@ITouUPAlHPfES]FNa`@","HaD@@DjUZxHD@AlHPfES\\","HaD@@DjUZxHH@A@","sNp@LdbJjj@[\\QXuqaa`@","Hed@@LdbRQUUUP@vTHSBinFP","KAx@@ITouUPAlHPfES]FLa`@","sNp@DkUZj@[\\QXuqba`@","KAx@@ITjuUPAlHPfES]FNa`@","KAx@@YIDTjjh@vDHSBincGPp@","HaD@@DjYvxH`@AlHPfES]FLa`@","RF@QP`","qCb@AIj`H","sNp@DjUjj@[\\QXuqaa`@","sNp@DkVZj@[\\QXu`","KAx@@YIDUJjh@vDHSBin@","sGP@DkYj`FsDVMcIC@","sGP@DjVj`FsDVMcAC@","sGP@DiVj`D","sJP@DkVhAmQEcFZF@","sNp@LdbLjj@[\\QXu`","QM@HvAmdqbF@","HaD@@DjWjXHB@AlHPfES\\","sNp@DjwZj@[\\QXuqba`@","sNp@LdbJjj@[\\QXuqda`@","sFp@DiTt@@Axa`","HiD@@Djuujj`AmHPfES\\H","sNp@DkUZj@[\\QXuqca`@","sJP@DiZhAy@","KAx@@YIDTjjh@vDHSBincCPp@","KAx@@IWNmUPAlHPfES\\","KAx@@IVkMUPAlHPfES\\","sJQ@@dju@H","qCb@AIZ`OH@","qC`@ISTAxa@","sNp@DjyZj@[\\QXu`","Hid@@DjUfaBB`@FtaBXUMp`","HiD@@DiUVjj`AmHPfES\\LXBF@","KAx@@IUjmUPAlHPfES\\","HiD@@DjWvjj`AmHPfES\\LXjF@","sJP@DjVhAmQEb","qCb@AIV`OH`","HiD@@LdbJRjjh@[RDIaTwCFDa`@","KAx@@YIDTjjh@vDHSBinc@Pp@","sNp@DjUjj@[\\QXuqda`@","qC`@Qz`OED","sJP@DkfhAmQEcFZF@","KAx@@YIDbjjh@vDHSBincDPp@","sGP@Djyj`FsDVMcMC@","KAx@@IVrmUPAlHPfES\\","qCp@AIZ`OI@","sJX@@dkU@H","sJQ@@dkU@OH`","sNp@Di]ZjBBvxbqk@","Hkl@@DjU_Uk``bj`@[VDIaTwCJzX","sGP@DjZj`FsDVMcEC@","Hid@@DjU^nBBH@FtaBXUMpqcHX@","sNp@DkeZj@[\\QXu`","sNp@DjYjj@[\\QXuqca`@","sGQ@@djuT@`","HiD@@LdbJTjjh@[RDIaTwB","sOp@DjWkB@@Gd`","HeT@@LdbbRKBDQD@CYPaLJfxY@","qCr@XIKTA@","HiD@@DjW^jj`AmHPfES\\LXJF@","HeT@@DjU]k``b`@[JDIaTwCH","sGP@Djuj`FsDVMcCC@","`IH`B","sOp@DjWkB@@GdX","sJQ@@eKU@H","KAx@@YIDUJjh@vDHSBincBPp@","sJX@@eKU@OH@","KAx@@YIDTjjh@vDHSBincAPp@","sOq@@drm\\@@@`","KAx@@IUkMUPAlHPfES\\","qCp@AIj`H","Hed@@DjUUjjj@FraBXUMpr","sGX@@eJuT@`","sGP@DkUj`FsDVMcCC@","HiD@@Dj}Ujj`AmHPfES\\LXrF@","KAx@@ITouUPAlHPfES]FHa`@","Hed@@DjWujjj@FraBXUMpsFIa`@","sGP@DiUj``mfHlZ","sFp@DiTvjhAlqEcP","Hid@@DjU^nBBH@FtaBXUMpq`XX@","sJP@DkVdAmQEb","qCp@AIZ`OH`","QMhDRVA@","qC`@ISJAlQE`","qCp@BOTAyhl","sJX@@eOU@ODB","sFp@DiTt@@AyaB","sGP@DkUj`FsDVMcMC@","Hid@@DjYUaBH`@FtaBXUMpqcHX@","qC`@Qz`OH@","HiD@@DjUVjj`AmHPfES\\LXZF@","sJP@H~j@[TQXqda`@","sJX@@eKU@OI@","sNp@Djejj@[\\QXu`","sJQ@@dsU@H","sJQ@@dkU@OI`","KAx@@YIMDVjh@vDHSBin@","Hid@@DjU^nBBD@FtaBXUMp`","sNp@DkgZj@[\\QXuqca`@","qC`@IRtDVqDVcEC@","Hed@@LdbRQeUUP@vTHSBinFP","sNp@DiUjj@P","qC`@IRtDT","sNp@DkYZj@[\\QXuqca`@","KAx@@IUkmUPAlHPfES]FDa`@","KAx@@IVjmUPAlHPfES]FNa`@","sOx@@drm\\@@@`","KAx@@ITjuUPAlHPfES]FBa`@","QMDARVAyH","sJP`@dfvhA@","HeT@@DjU_k``b`@[JDIaTwCLXfF@","KAx@@IToUUPAlHPfES]FJa`@","sGP@DkYj`FsDVMcEC@","qCb@AIZ`ODH","`I@`B","KAx@@IUzmUPAlHPfES]FFa`@","sNp@DkfZj@[\\QXu`","KAx@@ITnuUPAlHPfES]F@a`@","HiD@@LddURjjh@[RDIaTwB","sNp@Dj~Zj@[\\QXuqfa`@","Hed@@Dj{uZjj@FraBXUMpr","KAx@@ITsUUPAlHPfES\\","Hid@@LdbRQk``b@AmHPfES\\LXrF@","sOp@DjWkB@@GdH","sJQ@@dkU@OH@","Hid@@DjU^nBBH@FtaBXUMpqahX@","sGP@DiYj``mfHlZ","KAx@@IToUUPAlHPfES]FLa`@","qCp@AJZ`ODH","Hmt@@DjU]ZxHHj@AmhPfES\\Lj","sGP@DkUjPFsDVM@","qC`@IVtA@","Hed@@LdbJReUUP@vTHSBinFP","sNp@DjuZj@[\\QXuqea`@","KAx@@IUkmUPAlHPfES]FNa`@","HiD@@DkVUjj`AmHPfES\\H","Hed@@DkUeZjj@FraBXUMpr","sNp@DkVZj@[\\QXuqea`@","sJP@DiVhHKZbKFLLL@","HiD@@Djuyjj`AmHPfES\\H","sNp@DjUjj@[\\QXuq`a`@","HeT@@DjYUXPbH`@[JDIaTwCH","HiD@@DjwUjj`AmHPfES\\LXRF@","sNq@@djmUPB","KAx@@YIEEZjh@vDHSBincCPp@","sGP@Di^V`dmfHlZ","Hid@@DjYUaBHP@FtaBXUMp`","sNp@DjYjj@[\\QXuqba`@","sGP@Dkej`FsDVMcKC@","HeT@@DjU^k``b`@[JDIaTwCH","qC`@Qv`MbHmFBF@","sGQ@@djmT@`","qCr@XIKTAyH","qC`@IVtAlQEhpPp@","Hid@@LdbbQxXF@@AmHPfES\\LXjF@","sGP@DkYj`FsDVMcCC@","KAx@@IVsMUPAlHPfES\\","qCp@AIj`ODl","HiD@@DkeUjj`AmHPfES\\H","deT@@DjU[k``b`@vTHSBinFP","sJP@DkVdAmQEcFRF@","HiD@@LdbJTjjh@[RDIaTwCFDa`@","HiD@@DkYyjj`AmHPfES\\H","sJP@DjZhAyH","KAx@@IVkMUPAlHPfES]FDa`@","sJX@@dkU@OI@","Hed@@LdbRQUUUP@vTHSBinFXpLL@","Hed@@DjuUZjj@FraBXUMpr","sGP@Djfj`FsDVMcKC@","sNp@DkVZj@[\\QXuqba`@","sNp@DjyZj@[\\QXuqfa`@","qCb@AIj`OH@","sNp@DjUZj@[\\QXu`","KAx@@IWOMUPAlHPfES\\","Hid@@DjU^nBBH@D","Hed@@DjuvZjj@FraBXUMpr","sJP@DiVhHKZbKFLtL@","dmt@@DjU_ZxHHj@C[PaLJfxYVLKC@","sNp@DjuZj@[\\QXuqca`@","sJP@DkfhAmQEcFJF@","sNp@LdbJZj@[\\QXu`","HeT@@DjU_k``b`@[JDIaTwCLXFF@","KAx@@IVlmUPAlHPfES]FNa`@","HeT@@LdbbRKBDQD@CYPaLJfxYcEPp@","Hid@@DjUZnBBH@FtaBXUMpqcHX@","qCa@CIKTA@","HiD@@Dj~]jj`AmHPfES\\LXFF@","sKP@Di\\Zj@[TQX`","sGP@Djfj`FsDVMcEC@","HiD@@DkgYjj`AmHPfES\\H","sNp@DjuZj@[\\QXuqaa`@","KAx@@YIMDVjh@vDHSBincDPp@","sJP@DjVhHKZbKFLTL@","Hid@@LdbRQk``b@AmHPfES\\LXZF@","HiD@@Dj}Ujj`AmHPfES\\LXzF@","HeT@@DjU_k``bP@[JDIaTwCH","sNp@DkUZi@[\\QXu`","HiD@@DjYfjj`AmHPfES\\H","sGP@DjZj`FsDVMcAC@","Hmt@@DjU_jxHHj@AmhPfES\\Lj","Hid@@LdbRQk``R@AmHPfES\\H","KAx@@YIDUJjh@vDHSBincDPp@","qCr@XIKTAyD","sOq@@drm\\@@@|`@","Hed@@DjW^jjj@FraBXUMpsFBa`@","HeT@@DjY]zXFB@@[JDIaTwCH","Hkl@@DjU_Vk``bj`@[VDIaTwCJzX","Hid@@DjY}nBHH@FtaBXUMpqcHX@","sGX@@eKuT@|d@","sGP@Dj^Y`FsDVM@","HcL@@DjU_ZnBBJh@FqaBXUMprn`","sJP@DkVdAmQEcFJF@","sOq@@drm\\@@@|b@","sNp@DjyZj@[\\QXuqaa`@","HaD@@DjUZxHH@AyD@","qC`@Qv`H","dmt@@DjU_ZxHHj@C[PaLJfxYVLYC@","sGP@Dkej`FsDVMcMC@","Hed@@DjUUjjj@FraBXUMpsFHa`@","HeT@@LdbbRkBDQD@CYPaLJfxY@","KAx@@IU{MUPAlHPfES]FLa`@","RG@DTH","sJY@DDeVhA@","KAx@@YIDUJjh@vDHSBinc@Pp@","sJX@@dkU@OI`","sJQ@@dju@OI`","HeT@@LdbbRKBDQD@CYPaLJfxYcFPp@","sFp@DiTvjhAlqEcXpPp@","HaD@@DjUZxHH@AyG@","sNx@@eJ}UPB","sNp@LddUjj@[\\QXuqca`@","HaDH@@RVU[j@@@D","sNp@DkgZi@[\\QXu`","sGY@LDeVj`D","sNp@LdbJfZBZvxbqk@","sJP`@dfvhAyL","sGX@AddQjhAxe`","Hmt@@DjU_ZxHHj@AmhPfES\\LkFIa`@","qCh@CIKTA@","sNp@LdbLjj@[\\QXuq`a`@","sOq@@drm\\@@@|a@","KAx@@IUzmUPAlHPfES]FJa`@","sNx@AddQUUPB","sGP@Di]jP`mfHlZ","sJP`@TeZhA@","KAx@@IRjmUPHKXPaLJfx","HeT@@LdbRTM\\DDT@CYPaLJfxY@","HaF@@@Rfu[j@@@D","Hid@@DjYUaBH`@FtaBXUMpqchX@","KAx@@IUjmTpAlHPfES\\","Hid@@DjU^nBBD@FtaBXUMpqcHX@","sGP@DiUj``mfHl[FFF@","KAx@@IUvmUPAlHPfES]FLa`@","Hed@@LdbQTUUUP@vTHSBinFXqDL@","sJP@DkVhA@","sOx@@drm\\@@@|b@","KAx@@IUkMUPAlHPfES]FDa`@","HeT@@LdbRQU\\DDT@CYPaLJfxY@","HiD@@Dj}Yjj`AmHPfES\\LXrF@","HiD@@Dj{ujj`AmHPfES\\LXFF@","KAx@@IWNmUPAlHPfES]FFa`@","KAx@@IRkMUPHKXPaLJfx","sJP@DjYdAmQEcFZF@","sJY@LDeZhAyL","HaDH@@RVU[f@@@D","sJP`@deVhAyB","HaD@@DjWjZjj`AlHPfES\\","sGP@DkYj`FsDVMcMC@","sNp@DkgZj@[\\QXuqea`@","sJQ@@dlu@H","HeT@@DjU]k``b`@[JDIaTwCLXrF@","sJX@@dkU@OH`","RFDDQFCr`","sJP@DiYXIKZbKFLLL@","KAx@@YIHjjjh@vDHSBincGPp@","Hk\\@@DjU^ukmLHH@@@AmXPfES\\Lki`","sGQ@@djmT@|b@","Hid@@DjUfaBB`@FtaBXUMpqahX@","sNx@@eRmUPB","Hmt@@LdbRVak``ah@FvaBXUMprh","qCr@XIJtA@","KAx@@IWMmUPAlHPfES]FNa`@","HeT@@DjYYZPbJ@@[JDIaTwCH","sNp@DkfZj@[\\QXuqea`@","Hid@@DjU^nBAHAEVtaBXUMp`","dmt@@DjUgZDHJJ@C[PaLJfxYT","sGP@DkejPFsDVM@","sNx@@eJmUPB","qCb@AIf`H","HcL@@DjU_VnBBJh@FqaBXUMprnqcXX@","Hid@@DjUZnBBH@FtaBXUMpqahX@","sNp@LdbQZjBBvxbqkcGC@","sOx@@drm\\@@@|c@","sJP@H~j@^R@","KAx@@YIDcFjhDElHPfES\\","Hid@@DjUZnBAH@FtaBXUMp`","sNp@LddUji@[\\QXu`","sGP@DjfjPFsDVM@","HeT@@DjYUXPbD`@[JDIaTwCH","KAx@@IUoMUPAlHPfES]FDa`@","sFp@DiTt@@AyaD","Hed@@DjuuZjj@FraBXUMpsFIa`@","HeT@@DjUghP`h`@[JDIaTwCLXfF@","sOp@DjWkjj`FwDVM\\YhX@","sGP@Djfj`FsDVMcIC@","KAx@@IRkmUPHKXPaLJfzL]C@","sNx@@djmUPB","QM`AIdD","sOp@DjWkB@@Gbe@","sNp@DjyZj@[\\QXuqca`@","QM@HuAmd`","sNp@LddUjj@[\\QXuqea`@","daD@@DjUZxHD@CXPaLJfzLYC@","qCb@AIZPH","HiD@@LdbJTjjh@[RDIaTwCF@a`@","Hmt@@DjU_ZxHHi@AmhPfES\\Lj","HaDH@@RYWih@H@D","HiD@@LdbJTjjh@[RDIaTwCFHa`@","sGX@@djuT@|a@","sNp@DkfZj@[\\QXuqaa`@","Hid@@DjU^nBBH@GdL","KAx@@IVkMUPAlHPfES]FJa`@","qCr@XIKTAy@","HmT@@Dj{uVjjh@[ZDIaTwCJqaXX@","dmt@@DjYWVDHbJ@C[PaLJfxYT","Hif@@@RUe^Fh@@@P","HaDH@@Rfu[j@@@GdH","KAx@@IVsMUPAlHPfES]FDa`@","sKP@Di\\Zj@[TQXq`a`@","sJX@@eMU@OH@","HeT@@DjU^k``b`@[JDIaTwCLXFF@","Hmt@@LdbbRJXPbHh@FvaBXUMprh","sJP@DjvhAmQEcFBF@","dmt@@LdbbRNXPbHh@MmBDpj[aeXplL@","sJP`@dfvhAyD","sGP@Di^V`dmfHl[FVF@","KAx@@IVsmUPAlHPfES]FBa`@","sOq@@drm\\@@@|PP","sJY@BDeZhA@","HeT@@LdbRbmBDED@CYPaLJfxY@","Hed@@Djy[Zjj@FraBXUMpr","HeT@@DjU]k``b`@[JDIaTwCLXFF@","Hid@@DjUfaBB`@D","qCa@CIJtA@","QMPARVA@","Hid@@DjUfaBB`@FtaBXUMpqcHX@","sJY@BDfZhA@","HeT@@DjUghP`hP@[JDIaTwCH","Hed@@Dj{uZjj@FraBXUMpsFIa`@","dmt@@DjYUvDHbJ@C[PaLJfxYVLUC@","sNp`@dfuZj@P","sJQ@@dmU@OH@","sJX@@dmU@H","HeT@@DjU]k``b`@[JDIaTwCLXZF@","HiD@@LdfbJZjh@[RDIaTwCFAa`@","sOx@@drm\\@@@|a@","deT@@DjUfhP`h`@vTHSBinFP","dmt@@DjU]ZxHHj@C[PaLJfxYVLKC@","sOp@DjWkjj`FwDVM\\XHX@","HcL@@LdbbRNSBDQEP@McBDpj[ae]cFpp@","HiD@@Dj}Yji`AmHPfES\\H","HaDH@@RYe[hB@@D","Hid@@DjU^njjj@FtaBXUMpq`XX@","deT@@LdbbRKBDQB@FraBXUMpr","QMPARZA@","sOq@@drm\\@@@|QX","HaD@@DjYvxH`@A@","HcL@@LdbbRNcBDQEP@McBDpj[ae]@","QMhDRZA@","RG@DXLHmP","QM`BN`XQYd","RG@DTLHmP","QMHAIXFEVd","QMDARVAaH","RFPDXLHmP","RF@Q`vRbdLEC@","RF@QpvR@","QO@HyjAmd`","`II@B","`II@CFspqJp","`II@CF[@hM@prB`","`H@[T[|B`XN@PdM@p|@bHrBcDk@","RG@DXMj}F@","QM`BN`[L~b@","RG@DTMj}D@","QMHAIXFt~j@","QMDARVA}L@","RFPDXMj}D@","sKP@Di\\YZ@[TQXqaa`@","eF`BHD"]);}function uM(){uM=v1,pE=B(d(XA,1),re,6,14,[524290,524292,589826,589827,589828,589829,589832,589833,589837,589838,598019,598020,598024,606211,688130,688131,688132,688137,688142,696324,819202,819203,819204,819205,819214,827396,1048580,1114114,1114115,1114116,1114120,1212420,1220611,1343492,1343496,1638402,1638403,17367042,17367043,17367044,17367045,17367048,17367049,17367053,17367054,17375236,17465346,17465348,17465353,17473540,1208483842,1208483848,1208483912,1208549378,1208549379,1208549380,1208549384,1208549388,1208549442,1208549443,1208549444,1208549448,1208557571,1208565763,1208565827,1409875970,1409875971,1409875972,1409875976,1409876034,1409876035,1409876036,1409876040,1409884163,1409974274,1409974280,1409974338,1678245892,1678311426,1678311427,1678311428,1678311432,1678311490,1678311491,1678311492,1678311496,1678409730,1678409731,1678409732,1678409794,1678540802,1678540808,1678540810,1678540866,2282291202,2282291203,2282291266,2282291267,2282389506,2282389507,2282389570,2282389571,2282389572,2282520578,2282520579,2282520642,2282520643,2282537027,2483617794,2483617795,2483617858,2483617859,2483617860,2483617864,2483716098,2483716099,2483716162,2483716163,2484150275,2484248579,2752675842,3356033026,3356139523,3557359618,3557457922,3557588994,34510798914,34510798915,34510798916,34510798920,34510807107,34510815299,34712125506,34712125507,34712125508,34712125512,34712223810,34712223811,34712223812,34712223816,34980560962,34980560963,34980659266,34980659267,34980659268,35568287746,35568287747,35568287748,35568287752,35568287756,35568287810,35568287811,35568287812,35568287816,35568287820,35568386050,35568386051,35568386052,35568386114,35568386120,35568517122,35568517123,35568517124,35568517128,35568517186,35568517187,35568517188,35568517192,35568812034,35568812035,35568812098,35568812099,35568910338,35568910339,35568910403,35569336322,35569434626,35585064962,35585064963,35585064964,35585064968,35585065026,35585065027,35585065028,35585065032,35769614338,35769614340,35769614402,35769712642,35770138626,35770236930,35786391554,35786391555,2475109646403,ZC,WC,2475109711938,2475109711939,2475109720067,2475109720131,2475109728259,2475109728323,_C,$C,2887426572354,2887426572355,aC,tH,2887627898946,eH,2887627997250,AH,nH,3437182386242,3437182386243,PH,3437383712771,3437383712834,rH,iH,fH,DH,4674132967490,4674132967491,4674132975619,uH,4674334294082,4674334294083,4674334302211,4674334302275,QH,4674334392386,oH,4674602729538,4674602827842,UH,4674602958914,LH,sH,5086449827906,5086449827907,5086449827912,yH,5086651154498,5086651162627,lH,hH,5086651252802,5086651252808,5086651260931,TH,5086919589954,cH,5086919688258,5086919819330,5636205641794,wH,5636406968386,gH,5636407066690,5636675403842,dH,5636675502146,{l:589890,m:73760,h:4},{l:589891,m:73760,h:4},{l:598083,m:73760,h:4},{l:688194,m:73760,h:4},{l:688195,m:73760,h:4},{l:696387,m:73760,h:4},{l:819266,m:73760,h:4},{l:65602,m:73764,h:4},{l:65603,m:73764,h:4},{l:589890,m:172064,h:4},{l:589891,m:172064,h:4},{l:598083,m:172064,h:4},{l:688194,m:172064,h:4},{l:688195,m:172064,h:4},{l:696387,m:172064,h:4},{l:819266,m:172064,h:4},{l:65602,m:172068,h:4},{l:65603,m:172068,h:4},{l:589890,m:172112,h:4},{l:589891,m:172112,h:4},{l:688194,m:172112,h:4},{l:819266,m:172112,h:4},{l:65602,m:172116,h:4},{l:65608,m:172116,h:4},{l:163906,m:172116,h:4},{l:589890,m:303136,h:4},{l:688194,m:303136,h:4},{l:819266,m:303136,h:4},{l:65602,m:303140,h:4},{l:589890,m:303184,h:4},{l:688194,m:303184,h:4},{l:819266,m:303184,h:4},{l:65602,m:303188,h:4},{l:65602,m:303252,h:4},BH,vH,{l:589890,m:590112,h:4},{l:589891,m:590112,h:4},FH,kH,{l:589890,m:590160,h:4},{l:589891,m:590160,h:4},mH,{l:688194,m:590160,h:4},bH,jH,{l:589890,m:590224,h:4},{l:589891,m:590224,h:4},{l:688131,m:590224,h:4},{l:688194,m:590224,h:4},RH,pH,{l:589890,m:590368,h:4},MH,{l:688194,m:590368,h:4},{l:696323,m:590368,h:4},CH,HH,{l:819266,m:590368,h:4},VH,EH,{l:589890,m:590416,h:4},{l:589891,m:590416,h:4},{l:589896,m:590416,h:4},SH,{l:688136,m:590416,h:4},{l:688194,m:590416,h:4},{l:696323,m:590416,h:4},IH,{l:819266,m:590416,h:4},{l:688130,m:590480,h:4},{l:688194,m:590480,h:4},{l:65602,m:598052,h:4},{l:65603,m:598052,h:4},{l:65602,m:598100,h:4},{l:65603,m:598100,h:4},{l:73795,m:598100,h:4},{l:163906,m:598100,h:4},{l:163907,m:598100,h:4},{l:65602,m:598164,h:4},{l:163906,m:598164,h:4},xH,NH,{l:589890,m:598304,h:4},{l:589891,m:598304,h:4},GH,{l:688194,m:598304,h:4},OH,{l:1114178,m:598304,h:4},qH,{l:1212424,m:598304,h:4},{l:1212482,m:598304,h:4},zH,KH,{l:589890,m:688416,h:4},JH,{l:589890,m:688464,h:4},{l:589890,m:688528,h:4},YH,XH,{l:688130,m:688784,h:4},{l:65602,m:696356,h:4},{l:65602,m:696404,h:4},{l:163906,m:696404,h:4},{l:589826,m:696608,h:4},{l:1114178,m:696608,h:4},{l:1212418,m:696608,h:4},{l:589826,m:696612,h:4},{l:524355,m:590112,h:288},{l:589825,m:590112,h:288},ZH,{l:589890,m:590112,h:288},{l:598019,m:590112,h:288},{l:598083,m:590112,h:288},WH,{l:589890,m:590112,h:336},{l:598019,m:590112,h:336},{l:598083,m:590112,h:336},_H,{l:589890,m:688416,h:336},$H,{l:589890,m:688464,h:336},aH,tV,{l:589827,m:590112,h:400},{l:589890,m:590112,h:400},{l:589891,m:590112,h:400},eV,AV,nV,PV,{l:589890,m:819488,h:400},rV,iV,fV,DV,{l:589827,m:819488,h:544},uV,QV,oV,{l:688199,m:688464,h:592},UV,LV,sV,{l:688202,m:819600,h:592},yV,{l:589896,m:1212704,h:592},lV,hV,{l:688200,m:1212752,h:592},TV,{l:688135,m:688464,h:656},{l:688135,m:819536,h:656},{l:589891,m:65936,h:8228},cV,{l:589890,m:590112,h:8480},{l:598019,m:590112,h:8480},wV,{l:589890,m:688416,h:8480},gV,{l:589890,m:688464,h:8480},dV,BV,vV,FV,{l:589896,m:1213008,h:8480},kV,{l:688200,m:1213008,h:8480},{l:688135,m:1343824,h:8480},mV,{l:589890,m:590112,h:8484},bV,{l:589890,m:590160,h:8484},{l:1212424,m:590416,h:8484},{l:1212488,m:590416,h:8484},jV,{l:688194,m:598304,h:8484},{l:589826,m:590112,h:8528},{l:589890,m:590112,h:8528}]),yc=B(d(Oe,1),uA,6,15,[.6966999769210815,0,.4885999858379364,-0.47269999980926514,-0.07490000128746033,RV,.273499995470047,.5699999928474426,.7009999752044678,.9534000158309937,-3.6435000896453857,-2.150899887084961,.4975000023841858,-2.19950008392334,-0.2809000015258789,-0.8259999752044678,-0.1784999966621399,-1.620300054550171,-1.0959999561309814,-0.3619999885559082,.13950000703334808,-0.29750001430511475,-1.2907999753952026,1.0161999464035034,pV,-2.5383999347686768,Xy,.4291999936103821,-0.5824000239372253,-0.1834000051021576,.1306000053882599,-0.5015000104904175,RV,-0.5257999897003174,.4244000017642975,-0.16099999845027924,-0.2777999937534332,.5110999941825867,-0.435699999332428,-0.10409999638795853,.3424000144004822,-0.061500001698732376,.6035000085830688,.7226999998092651,.43459999561309814,-1.6821000576019287,-0.3310000002384186,-0.49799999594688416,MV,-0.3650999963283539,.45969998836517334,.3384000062942505,.6632999777793884,.4544000029563904,.15970000624656677,.633899986743927,.35040000081062317,.04490000009536743,.34200000762939453,.26109999418258667,.40459999442100525,.5218999981880188,-1.065000057220459,-1.2314000129699707,-1.802299976348877,-0.36320000886917114,-0.4108000099658966,.30570000410079956,-0.14560000598430634,-0.27129998803138733,-0.5192999839782715,.45260000228881836,.5539000034332275,.8374000191688538,-0.7070000171661377,-0.48809999227523804,-0.4099999964237213,0,.14790000021457672,.3447999954223633,.42980000376701355,.5579000115394592,-0.1264999955892563,-0.042500000447034836,.07670000195503235,.6635000109672546,-0.38119998574256897,-0.8367999792098999,1.0286999940872192,-0.10209999978542328,.3587000072002411,-0.5945000052452087,.16920000314712524,-0.121799997985363,.32829999923706055,.22390000522136688,.20430000126361847,.05900000035762787,-0.48350000381469727,.6165000200271606,-0.4011000096797943,.5577999949455261,-0.21639999747276306,-0.017500000074505806,.29809999465942383,.10999999940395355,.27149999141693115,-0.2994999885559082,-0.46700000762939453,.1565999984741211,.046799998730421066,-0.13210000097751617,1.3686000108718872,0,-0.4115999937057495,1.0185999870300293,-0.3935000002384186,.5223000049591064,.3684999942779541,.25769999623298645,1.5192999839782715,.2705000042915344,.3790999948978424,.012000000104308128,-0.33970001339912415,.14830000698566437,.2766000032424927,.35929998755455017,.7714999914169312,.3149999976158142,-1.618499994277954,.18889999389648438,-0.2651999890804291,-0.09650000184774399,.420199990272522,.18709999322891235,-0.3684000074863434,-0.07779999822378159,.8942999839782715,.3693999946117401,.28790000081062317,.4489000141620636,-0.26010000705718994,.4771000146865845,.1923000067472458,.43810001015663147,.16949999332427979,.45249998569488525,.3352000117301941,.1582999974489212,.4036000072956085,-0.04800000041723251,.5023000240325928,-0.26489999890327454,.76910001039505,-0.35519999265670776,1.0300999879837036,-0.11410000175237656,-0.5932000279426575,.17489999532699585,.13130000233650208,-0.18039999902248383,.399399995803833,.22910000383853912,.31690001487731934,.35989999771118164,-0.0038999998942017555,-0.2955999970436096,.4408999979496002,-0.16089999675750732,.3774999976158142,-0.13459999859333038,.2838999927043915,.5128999948501587,.1265999972820282,.4293999969959259,.28060001134872437,.49070000648498535,CV,.219200000166893,.15649999678134918,.6934999823570251,.3617999851703644,.6735000014305115,.5777999758720398,-0.5636000037193298,.5569000244140625,.30379998683929443,-0.32760000228881836,-0.6991999745368958,.010300000198185444,-0.4659000039100647,HV,Xy,.18410000205039978,.707099974155426,.12269999831914902,.7949000000953674,-0.6592000126838684,-1.3148000240325928,-0.4066999852657318,-0.1316000074148178,-0.4925000071525574,-0.09290000051259995,-0.4352000057697296,-0.2206999957561493,-0.9959999918937683,-0.723800003528595,-0.5468999743461609,-1.2939000129699707,-0.01360000018030405,.065700002014637,.7189000248908997,.05700000002980232,.661899983882904,-0.6381000280380249,-0.8072999715805054,.23549999296665192,.30480000376701355,-0.019899999722838402,-0.07519999891519547,.44609999656677246,.1559000015258789,1.1167999505996704,-1.8039000034332275,.23649999499320984,-0.22059999406337738,.4480000138282776,-1.1339999437332153,-0.5652999877929688,-0.40529999136924744,-0.13609999418258667,.2198999971151352,.053599998354911804,-0.020999999716877937,.6984999775886536,.9642999768257141,-0.41519999504089355,-1.0369000434875488,-0.18299999833106995,.5882999897003174,-0.29179999232292175,-0.5293999910354614,-0.6541000008583069,.9473000168800354,-0.19059999287128448,-0.8483999967575073,-0.3456999957561493,.9541000127792358,1.4230999946594238,-0.7924000024795532,VV,EV,-0.2596000134944916,.8381999731063843,-0.4415999948978424,-0.37040001153945923,-0.7487000226974487,-0.10790000110864639,-0.29919999837875366,-0.3276999890804291,.025100000202655792,-0.9187999963760376,.10939999669790268,.8230999708175659,-3.233299970626831,.03500000014901161,HV,SV,.2791000008583069,.3206000030040741,.5662000179290771,-0.3783999979496002,.4032000005245209,-1.794800043106079,-0.15539999306201935,.3785000145435333,.05339999869465828,-0.16529999673366547,-0.09870000183582306,-0.10050000250339508,-0.6460999846458435,.8034999966621399,-0.24050000309944153,-0.12380000203847885,-0.35760000348091125,.09610000252723694,-0.6401000022888184,.2029000073671341,.23589999973773956,.4950999915599823,.19210000336170197,-0.37450000643730164,.34630000591278076,.289900004863739,-0.15330000221729279,-0.4169999957084656,.37700000405311584,.6998000144958496,.593999981880188,.5911999940872192,-0.5570999979972839,.023800000548362732,-0.2475000023841858,.030700000002980232,-0.38749998807907104,-0.7437000274658203,.5144000053405762,.00570000009611249,.765500009059906,.1720000058412552,-2.5624001026153564,-0.30660000443458557,.36469998955726624,.17270000278949738,-0.03290000185370445,-0.18930000066757202,.07020000368356705,-1.2453999519348145,.14959999918937683,pV,.4146000146865845,-0.2667999863624573,-0.11060000211000443,.03620000183582306,-0.3188999891281128,-0.7278000116348267,-0.08940000087022781,-0.22769999504089355,-0.2393999993801117,1.011199951171875,-0.2962000072002411,.7775999903678894,.2944999933242798,-0.22339999675750732,.27639999985694885,.8011000156402588,-0.17440000176429749,.15809999406337738,-1.7552000284194946,-0.384799987077713,.5993000268936157,.5267999768257141,-0.04170000180602074,.4733000099658966,-0.3400999903678894,-0.14499999582767487,.7088000178337097,-0.13179999589920044,.04259999841451645,-0.5027999877929688,.3831999897956848,-0.011800000444054604,-0.4357999861240387,.3749000132083893,-0.12030000239610672,-0.5648000240325928,-0.1972000002861023,-0.8769000172615051,-0.3675000071525574,-0.2003999948501587,-0.6069999933242798,-0.18569999933242798,.3467999994754791,-0.36239999532699585,.5357999801635742,-0.3700999915599823,.13359999656677246,.9545000195503235,.11389999836683273,-0.16990000009536743,Xy,.2890999913215637,.2612999975681305,-0.03440000116825104,-1.9498000144958496,-2.024899959564209,-0.6004999876022339,-0.6258000135421753,-1.2348999977111816,.328000009059906,-0.54339998960495,-0.7712000012397766,-0.9057000279426575,-0.16680000722408295,-0.9904999732971191,-0.03720000013709068,-1.1638000011444092,.12620000541210175,-0.5248000025749207,-0.15379999577999115,-0.36820000410079956,.3249000012874603,.06499999761581421,.051100000739097595,-0.46070000529289246,.22310000658035278,.28220000863075256,.1396999955177307,-0.49380001425743103,.39480000734329224,-0.4074999988079071,-0.6410999894142151,-0.009100000374019146,-0.13330000638961792,-0.5192000269889832,-0.16609999537467957,Xy,-0.07069999724626541,.4805999994277954,.38280001282691956,.22290000319480896,.6159999966621399,.33709999918937683,.188400000333786,.13809999823570251,MV,.2833000123500824,-0.1225999966263771,-3.9189000129699707,-0.459199994802475,-0.3434999883174896,-0.6654000282287598,-0.5055999755859375,-0.863099992275238,.15360000729560852,-0.6427000164985657,-0.08839999884366989,-0.0471000000834465,.11060000211000443,.382099986076355,-0.23919999599456787,-0.4050999879837036,.08910000324249268,-0.6972000002861023,-0.4699000120162964,.09220000356435776,.08060000091791153,-0.6773999929428101,-0.062199998646974564,-0.9300000071525574,.13369999825954437]);}function QM(){QM=v1,yl=B(d(Ht,2),DA,17,0,[null,B(d(Ht,1),Vt,3,0,[new u(0,1.007825032),new u(1,2.014101778),new u(2,3.016049268),new u(3,4.027834627),new u(4,5.039542911),new u(5,6.044942608)]),B(d(Ht,1),Vt,3,0,[new u(1,3.01602931),new u(2,4.00260325),new u(3,5.012223628),new u(4,6.018888072),new u(5,7.028030527),new u(6,8.033921838),new u(7,9.043820323),new u(8,10.052399713)]),B(d(Ht,1),Vt,3,0,[new u(1,4.027182329),new u(2,5.012537796),new u(3,6.015122281),new u(4,7.016004049),new u(5,8.02248667),new u(6,9.026789122),new u(7,10.035480884),new u(8,11.043796166),new u(9,12.05378)]),B(d(Ht,1),Vt,3,0,[new u(1,5.04079),new u(2,6.019725804),new u(3,7.016929246),new u(4,8.005305094),new u(5,9.012182135),new u(6,10.01353372),new u(7,11.021657653),new u(8,12.026920631),new u(9,13.036133834),new u(10,14.042815522)]),B(d(Ht,1),Vt,3,0,[new u(2,7.029917389),new u(3,8.024606713),new u(4,9.013328806),new u(5,10.012937027),new u(6,11.009305466),new u(7,12.014352109),new u(8,13.017780267),new u(9,14.025404064),new u(10,15.031097291),new u(11,16.039808836),new u(12,17.046931399),new u(13,18.05617),new u(14,19.06373)]),B(d(Ht,1),Vt,3,0,[new u(2,8.037675026),new u(3,9.031040087),new u(4,10.01685311),new u(5,11.011433818),new u(6,12),new u(7,13.003354838),new u(8,14.003241988),new u(9,15.010599258),new u(10,16.014701243),new u(11,17.022583712),new u(12,18.026757058),new u(13,19.035248094),new u(14,20.040322395),new u(15,21.04934),new u(16,22.05645)]),B(d(Ht,1),Vt,3,0,[new u(3,10.042618),new u(4,11.026796226),new u(5,12.018613202),new u(6,13.005738584),new u(7,14.003074005),new u(8,15.000108898),new u(9,16.006101417),new u(10,17.008449673),new u(11,18.014081827),new u(12,19.017026896),new u(13,20.023367295),new u(14,21.027087574),new u(15,22.034440259),new u(16,23.04051),new u(17,24.0505)]),B(d(Ht,1),Vt,3,0,[new u(4,12.034404776),new u(5,13.0248104),new u(6,14.008595285),new u(7,15.003065386),new u(8,15.994914622),new u(9,16.999131501),new u(10,17.999160419),new u(11,19.00357873),new u(12,20.00407615),new u(13,21.008654631),new u(14,22.009967157),new u(15,23.015691325),new u(16,24.020369922),new u(17,25.02914),new u(18,26.03775)]),B(d(Ht,1),Vt,3,0,[new u(5,14.03608),new u(6,15.018010856),new u(7,16.01146573),new u(8,17.002095238),new u(9,18.000937667),new u(10,18.998403205),new u(11,19.999981324),new u(12,20.999948921),new u(13,22.00299925),new u(14,23.003574385),new u(15,24.008099371),new u(16,25.012094963),new u(17,26.019633157),new u(18,27.026892316),new u(19,28.03567),new u(20,29.04326)]),B(d(Ht,1),Vt,3,0,[new u(6,16.025756907),new u(7,17.017697565),new u(8,18.005697066),new u(9,19.001879839),new u(10,19.992440176),new u(11,20.993846744),new u(12,21.99138551),new u(13,22.994467337),new u(14,23.993615074),new u(15,24.997789899),new u(16,26.000461498),new u(17,27.0076152),new u(18,28.012108072),new u(19,29.019345902),new u(20,30.023872),new u(21,31.03311),new u(22,32.03991)]),B(d(Ht,1),Vt,3,0,[new u(7,18.02718),new u(8,19.01387945),new u(9,20.00734826),new u(10,20.997655099),new u(11,21.994436782),new u(12,22.989769675),new u(13,23.990963332),new u(14,24.989954352),new u(15,25.992589898),new u(16,26.994008702),new u(17,27.99889041),new u(18,29.002811301),new u(19,30.009226487),new u(20,31.013595108),new u(21,32.019649792),new u(22,33.027386),new u(23,34.0349),new u(24,35.04418)]),B(d(Ht,1),Vt,3,0,[new u(8,20.018862744),new u(9,21.011714174),new u(10,21.999574055),new u(11,22.99412485),new u(12,23.985041898),new u(13,24.985837023),new u(14,25.98259304),new u(15,26.984340742),new u(16,27.983876703),new u(17,28.988554743),new u(18,29.990464529),new u(19,30.996548459),new u(20,31.999145889),new u(21,33.005586975),new u(22,34.00907244),new u(23,35.018669),new u(24,36.02245),new u(25,37.03124)]),B(d(Ht,1),Vt,3,0,[new u(8,21.02804),new u(9,22.01952),new u(10,23.0072649),new u(11,23.999940911),new u(12,24.990428555),new u(13,25.986891659),new u(14,26.981538441),new u(15,27.981910184),new u(16,28.980444848),new u(17,29.982960304),new u(18,30.983946023),new u(19,31.988124379),new u(20,32.990869587),new u(21,33.996927255),new u(22,34.99993765),new u(23,36.006351501),new u(24,37.01031),new u(25,38.0169),new u(26,39.0219)]),B(d(Ht,1),Vt,3,0,[new u(8,22.03453),new u(9,23.02552),new u(10,24.011545711),new u(11,25.00410664),new u(12,25.992329935),new u(13,26.986704764),new u(14,27.976926533),new u(15,28.976494719),new u(16,29.973770218),new u(17,30.975363275),new u(18,31.974148129),new u(19,32.97800052),new u(20,33.978575745),new u(21,34.984584158),new u(22,35.986687363),new u(23,36.99299599),new u(24,37.99598),new u(25,39.0023),new u(26,40.0058),new u(27,41.0127),new u(28,42.0161)]),B(d(Ht,1),Vt,3,0,[new u(9,24.03435),new u(10,25.02026),new u(11,26.01178),new u(12,26.999191645),new u(13,27.99231233),new u(14,28.981801376),new u(15,29.978313807),new u(16,30.973761512),new u(17,31.973907163),new u(18,32.971725281),new u(19,33.973636381),new u(20,34.973314249),new u(21,35.978259824),new u(22,36.979608338),new u(23,37.98447),new u(24,38.98642),new u(25,39.99105),new u(26,40.9948),new u(27,42.00009),new u(28,43.00331),new u(29,44.00988),new u(30,45.01514),new u(31,46.02383)]),B(d(Ht,1),Vt,3,0,[new u(10,26.02788),new u(11,27.018795),new u(12,28.004372661),new u(13,28.996608805),new u(14,29.984902954),new u(15,30.979554421),new u(16,31.97207069),new u(17,32.971458497),new u(18,33.967866831),new u(19,34.96903214),new u(20,35.96708088),new u(21,36.971125716),new u(22,37.971163443),new u(23,38.975135275),new u(24,39.97547),new u(25,40.98003),new u(26,41.98149),new u(27,42.9866),new u(28,43.98832),new u(29,44.99482),new u(30,45.99957),new u(31,47.00762),new u(32,48.01299),new u(33,49.02201)]),B(d(Ht,1),Vt,3,0,[new u(11,28.02851),new u(12,29.01411),new u(13,30.00477),new u(14,30.992416014),new u(15,31.985688908),new u(16,32.977451798),new u(17,33.973761967),new u(18,34.968852707),new u(19,35.968306945),new u(20,36.9659026),new u(21,37.96801055),new u(22,38.968007677),new u(23,39.970415555),new u(24,40.970650212),new u(25,41.973174994),new u(26,42.974203385),new u(27,43.978538712),new u(28,44.9797),new u(29,45.98412),new u(30,46.98795),new u(31,47.99485),new u(32,48.99989),new u(33,50.00773),new u(34,51.01353)]),B(d(Ht,1),Vt,3,0,[new u(12,30.02156),new u(13,31.012126),new u(14,31.99766066),new u(15,32.989928719),new u(16,33.980270118),new u(17,34.975256726),new u(18,35.967546282),new u(19,36.966775912),new u(20,37.962732161),new u(21,38.964313413),new u(22,39.962383123),new u(23,40.964500828),new u(24,41.963046386),new u(25,42.965670701),new u(26,43.965365269),new u(27,44.968094979),new u(28,45.968093467),new u(29,46.972186238),new u(30,47.97507),new u(31,48.98218),new u(32,49.98594),new u(33,50.99324),new u(34,51.99817),new u(35,53.006227)]),B(d(Ht,1),Vt,3,0,[new u(13,32.02192),new u(14,33.00726),new u(15,33.99841),new u(16,34.988011615),new u(17,35.981293405),new u(18,36.973376915),new u(19,37.969080107),new u(20,38.963706861),new u(21,39.963998672),new u(22,40.961825972),new u(23,41.962403059),new u(24,42.960715746),new u(25,43.961556146),new u(26,44.960699658),new u(27,45.961976203),new u(28,46.961677807),new u(29,47.965512946),new u(30,48.967450084),new u(31,49.972782832),new u(32,50.97638),new u(33,51.98261),new u(34,52.98712),new u(35,53.99399),new u(36,54.999388)]),B(d(Ht,1),Vt,3,0,[new u(14,34.01412),new u(15,35.004765),new u(16,35.993087234),new u(17,36.985871505),new u(18,37.976318637),new u(19,38.970717729),new u(20,39.962591155),new u(21,40.962278349),new u(22,41.958618337),new u(23,42.958766833),new u(24,43.955481094),new u(25,44.956185938),new u(26,45.953692759),new u(27,46.954546459),new u(28,47.952533512),new u(29,48.955673302),new u(30,49.957518286),new u(31,50.961474238),new u(32,51.9651),new u(33,52.97005),new u(34,53.97468),new u(35,54.98055),new u(36,55.98579),new u(37,56.992356)]),B(d(Ht,1),Vt,3,0,[new u(15,36.01492),new u(16,37.00305),new u(17,37.9947),new u(18,38.984790009),new u(19,39.977964014),new u(20,40.969251316),new u(21,41.965516761),new u(22,42.96115098),new u(23,43.959403048),new u(24,44.955910243),new u(25,45.95517025),new u(26,46.952408027),new u(27,47.952234991),new u(28,48.950024065),new u(29,49.952187008),new u(30,50.9536027),new u(31,51.95665),new u(32,52.95817),new u(33,53.963),new u(34,54.9694),new u(35,55.97266),new u(36,56.97704),new u(37,57.98307),new u(38,58.988041)]),B(d(Ht,1),Vt,3,0,[new u(16,38.00977),new u(17,39.001323),new u(18,39.990498907),new u(19,40.983131),new u(20,41.973031622),new u(21,42.968523342),new u(22,43.959690235),new u(23,44.958124349),new u(24,45.952629491),new u(25,46.951763792),new u(26,47.947947053),new u(27,48.947870789),new u(28,49.944792069),new u(29,50.946616017),new u(30,51.946898175),new u(31,52.949731709),new u(32,53.95087),new u(33,54.95512),new u(34,55.95799),new u(35,56.9643),new u(36,57.96611),new u(37,58.97196),new u(38,59.97564),new u(39,60.982018)]),B(d(Ht,1),Vt,3,0,[new u(17,40.01109),new u(18,40.99974),new u(19,41.99123),new u(20,42.98065),new u(21,43.9744),new u(22,44.965782286),new u(23,45.960199491),new u(24,46.954906918),new u(25,47.95225448),new u(26,48.948516914),new u(27,49.947162792),new u(28,50.943963675),new u(29,51.944779658),new u(30,52.944342517),new u(31,53.946444381),new u(32,54.947238194),new u(33,55.95036),new u(34,56.95236),new u(35,57.95665),new u(36,58.9593),new u(37,59.9645),new u(38,60.96741),new u(39,61.97314),new u(40,62.97675)]),B(d(Ht,1),Vt,3,0,[new u(18,42.00643),new u(19,42.997707),new u(20,43.98547),new u(21,44.97916),new u(22,45.968361649),new u(23,46.962906512),new u(24,47.954035861),new u(25,48.951341135),new u(26,49.946049607),new u(27,50.944771767),new u(28,51.940511904),new u(29,52.940653781),new u(30,53.938884921),new u(31,54.940844164),new u(32,55.940645238),new u(33,56.9437538),new u(34,57.94425),new u(35,58.94863),new u(36,59.94973),new u(37,60.95409),new u(38,61.9558),new u(39,62.96186),new u(40,63.9642),new u(41,64.97037)]),B(d(Ht,1),Vt,3,0,[new u(19,44.00687),new u(20,44.99451),new u(21,45.98672),new u(22,46.9761),new u(23,47.96887),new u(24,48.959623415),new u(25,49.95424396),new u(26,50.948215487),new u(27,51.945570079),new u(28,52.941294702),new u(29,53.940363247),new u(30,54.938049636),new u(31,55.938909366),new u(32,56.938287458),new u(33,57.939986451),new u(34,58.940447166),new u(35,59.943193998),new u(36,60.94446),new u(37,61.94797),new u(38,62.94981),new u(39,63.95373),new u(40,64.9561),new u(41,65.96082),new u(42,66.96382)]),B(d(Ht,1),Vt,3,0,[new u(19,45.01456),new u(20,46.00081),new u(21,46.99289),new u(22,47.98056),new u(23,48.97361),new u(24,49.962993316),new u(25,50.956824936),new u(26,51.948116526),new u(27,52.945312282),new u(28,53.939614836),new u(29,54.938298029),new u(30,55.934942133),new u(31,56.935398707),new u(32,57.933280458),new u(33,58.934880493),new u(34,59.934076943),new u(35,60.936749461),new u(36,61.936770495),new u(37,62.940118442),new u(38,63.94087),new u(39,64.94494),new u(40,65.94598),new u(41,66.95),new u(42,67.95251),new u(43,68.9577)]),B(d(Ht,1),Vt,3,0,[new u(21,48.00176),new u(22,48.98972),new u(23,49.98154),new u(24,50.97072),new u(25,51.96359),new u(26,52.954224985),new u(27,53.948464147),new u(28,54.942003149),new u(29,55.939843937),new u(30,56.936296235),new u(31,57.935757571),new u(32,58.933200194),new u(33,59.933822196),new u(34,60.932479381),new u(35,61.934054212),new u(36,62.933615218),new u(37,63.935813523),new u(38,64.936484581),new u(39,65.939825412),new u(40,66.94061),new u(41,67.94436),new u(42,68.9452),new u(43,69.94981),new u(44,70.95173),new u(45,71.95641)]),B(d(Ht,1),Vt,3,0,[new u(22,49.99593),new u(23,50.98772),new u(24,51.97568),new u(25,52.96846),new u(26,53.957910508),new u(27,54.951336329),new u(28,55.942136339),new u(29,56.939800489),new u(30,57.935347922),new u(31,58.934351553),new u(32,59.930790633),new u(33,60.931060442),new u(34,61.928348763),new u(35,62.929672948),new u(36,63.927969574),new u(37,64.930088013),new u(38,65.929115232),new u(39,66.931569638),new u(40,67.931844932),new u(41,68.935181837),new u(42,69.93614),new u(43,70.94),new u(44,71.9413),new u(45,72.94608),new u(46,73.94791),new u(47,74.95297),new u(48,75.95533),new u(49,76.96083),new u(50,77.9638)]),B(d(Ht,1),Vt,3,0,[new u(23,51.99718),new u(24,52.98555),new u(25,53.97671),new u(26,54.96605),new u(27,55.95856),new u(28,56.949215695),new u(29,57.944540734),new u(30,58.939504114),new u(31,59.937368123),new u(32,60.933462181),new u(33,61.932587299),new u(34,62.929601079),new u(35,63.929767865),new u(36,64.927793707),new u(37,65.928873041),new u(38,66.927750294),new u(39,67.929637875),new u(40,68.929425281),new u(41,69.932409287),new u(42,70.932619818),new u(43,71.93552),new u(44,72.93649),new u(45,73.9402),new u(46,74.9417),new u(47,75.94599),new u(48,76.94795),new u(49,77.95281),new u(50,78.95528),new u(51,79.96189)]),B(d(Ht,1),Vt,3,0,[new u(24,53.99295),new u(25,54.98398),new u(26,55.97238),new u(27,56.96491),new u(28,57.954596465),new u(29,58.949267074),new u(30,59.941832031),new u(31,60.939513907),new u(32,61.934334132),new u(33,62.933215563),new u(34,63.929146578),new u(35,64.929245079),new u(36,65.926036763),new u(37,66.927130859),new u(38,67.924847566),new u(39,68.926553538),new u(40,69.92532487),new u(41,70.927727195),new u(42,71.926861122),new u(43,72.929779469),new u(44,73.929458261),new u(45,74.932937379),new u(46,75.933394207),new u(47,76.937085857),new u(48,77.938569576),new u(49,78.942095175),new u(50,79.944414722),new u(51,80.95048),new u(52,81.95484)]),B(d(Ht,1),Vt,3,0,[new u(25,55.99491),new u(26,56.98293),new u(27,57.97425),new u(28,58.96337),new u(29,59.95706),new u(30,60.94917),new u(31,61.944179608),new u(32,62.939141527),new u(33,63.936838307),new u(34,64.932739322),new u(35,65.931592355),new u(36,66.928204915),new u(37,67.927983497),new u(38,68.925580912),new u(39,69.926027741),new u(40,70.92470501),new u(41,71.92636935),new u(42,72.925169832),new u(43,73.926940999),new u(44,74.926500645),new u(45,75.928928262),new u(46,76.929281189),new u(47,77.93165595),new u(48,78.932916371),new u(49,79.936588154),new u(50,80.937752955),new u(51,81.94316),new u(52,82.94687),new u(53,83.95234)]),B(d(Ht,1),Vt,3,0,[new u(26,57.99101),new u(27,58.98175),new u(28,59.97019),new u(29,60.96379),new u(30,61.95465),new u(31,62.94964),new u(32,63.941572638),new u(33,64.939440762),new u(34,65.933846798),new u(35,66.932738415),new u(36,67.928097266),new u(37,68.927972002),new u(38,69.924250365),new u(39,70.924953991),new u(40,71.922076184),new u(41,72.923459361),new u(42,73.921178213),new u(43,74.922859494),new u(44,75.921402716),new u(45,76.923548462),new u(46,77.922852886),new u(47,78.92540156),new u(48,79.925444764),new u(49,80.928821065),new u(50,81.929550326),new u(51,82.93451),new u(52,83.93731),new u(53,84.94269),new u(54,85.94627)]),B(d(Ht,1),Vt,3,0,[new u(27,59.99313),new u(28,60.98062),new u(29,61.9732),new u(30,62.96369),new u(31,63.957572),new u(32,64.949484),new u(33,65.944099147),new u(34,66.939190417),new u(35,67.936792976),new u(36,68.932280154),new u(37,69.930927811),new u(38,70.927114724),new u(39,71.926752647),new u(40,72.923825288),new u(41,73.923929076),new u(42,74.921596417),new u(43,75.922393933),new u(44,76.920647703),new u(45,77.921828577),new u(46,78.920948498),new u(47,79.922578162),new u(48,80.922132884),new u(49,81.924504668),new u(50,82.924980625),new u(51,83.92906),new u(52,84.93181),new u(53,85.93623),new u(54,86.93958),new u(55,87.94456),new u(56,88.94923)]),B(d(Ht,1),Vt,3,0,[new u(31,64.96466),new u(32,65.95521),new u(33,66.95009),new u(34,67.94187),new u(35,68.939562155),new u(36,69.933504),new u(37,70.931868378),new u(38,71.927112313),new u(39,72.9267668),new u(40,73.922476561),new u(41,74.922523571),new u(42,75.919214107),new u(43,76.91991461),new u(44,77.917309522),new u(45,78.918499802),new u(46,79.916521828),new u(47,80.917992931),new u(48,81.9167),new u(49,82.919119072),new u(50,83.918464523),new u(51,84.922244678),new u(52,85.924271165),new u(53,86.928520749),new u(54,87.931423982),new u(55,88.93602),new u(56,89.93942),new u(57,90.94537),new u(58,91.94933)]),B(d(Ht,1),Vt,3,0,[new u(32,66.96479),new u(33,67.958248),new u(34,68.950178),new u(35,69.944208),new u(36,70.939246),new u(37,71.936496876),new u(38,72.931794889),new u(39,73.929891152),new u(40,74.92577641),new u(41,75.924541974),new u(42,76.921380123),new u(43,77.92114613),new u(44,78.918337647),new u(45,79.918529952),new u(46,80.91629106),new u(47,81.916804666),new u(48,82.915180219),new u(49,83.916503685),new u(50,84.915608027),new u(51,85.918797162),new u(52,86.920710713),new u(53,87.924065908),new u(54,88.92638726),new u(55,89.930634988),new u(56,90.9339653),new u(57,91.939255258),new u(58,92.9431),new u(59,93.94868)]),B(d(Ht,1),Vt,3,0,[new u(33,68.96532),new u(34,69.95601),new u(35,70.95051),new u(36,71.94190754),new u(37,72.938931115),new u(38,73.933258225),new u(39,74.931033794),new u(40,75.925948304),new u(41,76.92466788),new u(42,77.920386271),new u(43,78.920082992),new u(44,79.91637804),new u(45,80.916592419),new u(46,81.913484601),new u(47,82.914135952),new u(48,83.911506627),new u(49,84.912526954),new u(50,85.910610313),new u(51,86.913354251),new u(52,87.914446951),new u(53,88.917632505),new u(54,89.919523803),new u(55,90.923442418),new u(56,91.926152752),new u(57,92.931265246),new u(58,93.934362),new u(59,94.93984),new u(60,95.94307),new u(61,96.94856)]),B(d(Ht,1),Vt,3,0,[new u(34,70.96532),new u(35,71.95908),new u(36,72.950366),new u(37,73.944470376),new u(38,74.938569199),new u(39,75.935071448),new u(40,76.930406599),new u(41,77.928141485),new u(42,78.923996719),new u(43,79.922519322),new u(44,80.918994165),new u(45,81.918207691),new u(46,82.915111951),new u(47,83.914384676),new u(48,84.911789341),new u(49,85.91116708),new u(50,86.909183465),new u(51,87.911318556),new u(52,88.912279939),new u(53,89.914808941),new u(54,90.91653416),new u(55,91.919725442),new u(56,92.922032765),new u(57,93.926407326),new u(58,94.92931926),new u(59,95.934283962),new u(60,96.937342863),new u(61,97.941703557),new u(62,98.945420616),new u(63,99.94987),new u(64,100.953195994),new u(65,101.95921)]),B(d(Ht,1),Vt,3,0,[new u(35,72.96597),new u(36,73.95631),new u(37,74.94992),new u(38,75.94161),new u(39,76.937761511),new u(40,77.932179362),new u(41,78.929707076),new u(42,79.924524588),new u(43,80.923213095),new u(44,81.918401258),new u(45,82.917555029),new u(46,83.913424778),new u(47,84.912932689),new u(48,85.909262351),new u(49,86.908879316),new u(50,87.905614339),new u(51,88.907452906),new u(52,89.907737596),new u(53,90.910209845),new u(54,91.911029895),new u(55,92.91402241),new u(56,93.915359856),new u(57,94.919358213),new u(58,95.921680473),new u(59,96.926148757),new u(60,97.928471177),new u(61,98.933315038),new u(62,99.935351729),new u(63,100.940517434),new u(64,101.943018795),new u(65,102.94895),new u(66,103.95233)]),B(d(Ht,1),Vt,3,0,[new u(38,76.94962),new u(39,77.9435),new u(40,78.937350712),new u(41,79.931982402),new u(42,80.929128719),new u(43,81.926792071),new u(44,82.922352572),new u(45,83.920387768),new u(46,84.916427076),new u(47,85.914887724),new u(48,86.910877833),new u(49,87.909503361),new u(50,88.905847902),new u(51,89.907151443),new u(52,90.907303415),new u(53,91.908946832),new u(54,92.909581582),new u(55,93.911594008),new u(56,94.912823709),new u(57,95.915897787),new u(58,96.918131017),new u(59,97.922219525),new u(60,98.924634736),new u(61,99.927756402),new u(62,100.930313395),new u(63,101.933555501),new u(64,102.93694),new u(65,103.94145),new u(66,104.94509),new u(67,105.95022)]),B(d(Ht,1),Vt,3,0,[new u(39,78.94916),new u(40,79.94055),new u(41,80.936815296),new u(42,81.931086249),new u(43,82.92865213),new u(44,83.92325),new u(45,84.92146522),new u(46,85.916472851),new u(47,86.914816578),new u(48,87.910226179),new u(49,88.908888916),new u(50,89.904703679),new u(51,90.905644968),new u(52,91.905040106),new u(53,92.906475627),new u(54,93.906315765),new u(55,94.908042739),new u(56,95.908275675),new u(57,96.910950716),new u(58,97.912746366),new u(59,98.916511084),new u(60,99.917761704),new u(61,100.921139958),new u(62,101.922981089),new u(63,102.926597062),new u(64,103.92878),new u(65,104.93305),new u(66,105.93591),new u(67,106.94086),new u(68,107.94428)]),B(d(Ht,1),Vt,3,0,[new u(40,80.94905),new u(41,81.94313),new u(42,82.936703713),new u(43,83.93357),new u(44,84.927906486),new u(45,85.925037588),new u(46,86.920361435),new u(47,87.91833144),new u(48,88.913495503),new u(49,89.911264109),new u(50,90.906990538),new u(51,91.907193214),new u(52,92.906377543),new u(53,93.907283457),new u(54,94.906835178),new u(55,95.908100076),new u(56,96.908097144),new u(57,97.91033069),new u(58,98.911617864),new u(59,99.914181434),new u(60,100.915251567),new u(61,101.918037417),new u(62,102.919141297),new u(63,103.922459464),new u(64,104.923934023),new u(65,105.92819),new u(66,106.93031),new u(67,107.93501),new u(68,108.93763),new u(69,109.94268)]),B(d(Ht,1),Vt,3,0,[new u(41,82.94874),new u(42,83.94009),new u(43,84.93659),new u(44,85.930695167),new u(45,86.92732683),new u(46,87.921952728),new u(47,88.919480562),new u(48,89.913936161),new u(49,90.911750754),new u(50,91.90681048),new u(51,92.906812213),new u(52,93.905087578),new u(53,94.905841487),new u(54,95.904678904),new u(55,96.906021033),new u(56,97.905407846),new u(57,98.907711598),new u(58,99.907477149),new u(59,100.910346543),new u(60,101.910297162),new u(61,102.913204596),new u(62,103.913758387),new u(63,104.916972087),new u(64,105.918134284),new u(65,106.921694724),new u(66,107.923973837),new u(67,108.92781),new u(68,109.92973),new u(69,110.93451),new u(70,111.93684),new u(71,112.94203)]),B(d(Ht,1),Vt,3,0,[new u(42,84.94894),new u(43,85.94288),new u(44,86.93653),new u(45,87.93283),new u(46,88.92754288),new u(47,89.92355583),new u(48,90.9184282),new u(49,91.915259655),new u(50,92.910248473),new u(51,93.909656309),new u(52,94.907656454),new u(53,95.907870803),new u(54,96.906364843),new u(55,97.907215692),new u(56,98.906254554),new u(57,99.907657594),new u(58,100.90731438),new u(59,101.909212938),new u(60,102.909178805),new u(61,103.911444898),new u(62,104.911658043),new u(63,105.914355408),new u(64,106.915081691),new u(65,107.918479973),new u(66,108.919980998),new u(67,109.92339),new u(68,110.92505),new u(69,111.92924),new u(70,112.93133),new u(71,113.93588),new u(72,114.93828)]),B(d(Ht,1),Vt,3,0,[new u(43,86.94918),new u(44,87.94042),new u(45,88.93611),new u(46,89.92978),new u(47,90.926377434),new u(48,91.92012),new u(49,92.917051523),new u(50,93.911359569),new u(51,94.910412729),new u(52,95.907597681),new u(53,96.907554546),new u(54,97.905287111),new u(55,98.905939307),new u(56,99.904219664),new u(57,100.905582219),new u(58,101.904349503),new u(59,102.906323677),new u(60,103.905430145),new u(61,104.907750341),new u(62,105.907326913),new u(63,106.909907207),new u(64,107.910192211),new u(65,108.913201565),new u(66,109.913966185),new u(67,110.91756),new u(68,111.918821673),new u(69,112.92254),new u(70,113.923891981),new u(71,114.92831),new u(72,115.93016),new u(73,116.93479),new u(74,117.93703)]),B(d(Ht,1),Vt,3,0,[new u(44,88.94938),new u(45,89.94287),new u(46,90.93655),new u(47,91.93198),new u(48,92.92574),new u(49,93.921698),new u(50,94.915898541),new u(51,95.914518212),new u(52,96.911336643),new u(53,97.910716431),new u(54,98.908132101),new u(55,99.90811663),new u(56,100.906163526),new u(57,101.906842845),new u(58,102.905504182),new u(59,103.906655315),new u(60,104.905692444),new u(61,105.907284615),new u(62,106.90675054),new u(63,107.908730768),new u(64,108.908735621),new u(65,109.910949525),new u(66,110.91166),new u(67,111.913969253),new u(68,112.91542),new u(69,113.91734336),new u(70,114.920124676),new u(71,115.922746643),new u(72,116.92535),new u(73,117.92943),new u(74,118.93136),new u(75,119.93578),new u(76,120.93808)]),B(d(Ht,1),Vt,3,0,[new u(45,90.94948),new u(46,91.94042),new u(47,92.93591),new u(48,93.92877),new u(49,94.92469),new u(50,95.91822194),new u(51,96.916478921),new u(52,97.912720751),new u(53,98.911767757),new u(54,99.908504596),new u(55,100.908289144),new u(56,101.905607716),new u(57,102.906087204),new u(58,103.904034912),new u(59,104.905084046),new u(60,105.903483087),new u(61,106.905128453),new u(62,107.903894451),new u(63,108.905953535),new u(64,109.905152385),new u(65,110.907643952),new u(66,111.907313277),new u(67,112.910151346),new u(68,113.910365322),new u(69,114.91368341),new u(70,115.914158288),new u(71,116.91784),new u(72,117.918983915),new u(73,118.92268),new u(74,119.92403),new u(75,120.92818),new u(76,121.9298),new u(77,122.93426)]),B(d(Ht,1),Vt,3,0,[new u(47,93.94278),new u(48,94.93548),new u(49,95.93068),new u(50,96.924),new u(51,97.921759995),new u(52,98.917597103),new u(53,99.916069387),new u(54,100.912802135),new u(55,101.911999996),new u(56,102.908972453),new u(57,103.908628228),new u(58,104.906528234),new u(59,105.906666431),new u(60,106.90509302),new u(61,107.905953705),new u(62,108.904755514),new u(63,109.90611046),new u(64,110.905294679),new u(65,111.907004132),new u(66,112.906565708),new u(67,113.908807907),new u(68,114.908762282),new u(69,115.911359558),new u(70,116.911684187),new u(71,117.914582383),new u(72,118.915666045),new u(73,119.918788609),new u(74,120.919851074),new u(75,121.92332),new u(76,122.9249),new u(77,123.92853),new u(78,124.93054),new u(79,125.9345),new u(80,126.93688)]),B(d(Ht,1),Vt,3,0,[new u(48,95.93977),new u(49,96.93494),new u(50,97.927579),new u(51,98.92501),new u(52,99.920230232),new u(53,100.918681442),new u(54,101.914777255),new u(55,102.913418952),new u(56,103.909848091),new u(57,104.909467818),new u(58,105.906458007),new u(59,106.906614232),new u(60,107.904183403),new u(61,108.904985569),new u(62,109.903005578),new u(63,110.904181628),new u(64,111.902757226),new u(65,112.904400947),new u(66,113.903358121),new u(67,114.905430553),new u(68,115.904755434),new u(69,116.907218242),new u(70,117.906914144),new u(71,118.909922582),new u(72,119.909851352),new u(73,120.91298039),new u(74,121.9135),new u(75,122.917003675),new u(76,123.917648302),new u(77,124.92124717),new u(78,125.922353996),new u(79,126.926434822),new u(80,127.927760617),new u(81,128.93226),new u(82,129.93398)]),B(d(Ht,1),Vt,3,0,[new u(49,97.94224),new u(50,98.93461),new u(51,99.931149033),new u(52,100.92656),new u(53,101.924707541),new u(54,102.919913896),new u(55,103.918338416),new u(56,104.914673434),new u(57,105.913461134),new u(58,106.910292195),new u(59,107.909719683),new u(60,108.907154078),new u(61,109.907168783),new u(62,110.905110677),new u(63,111.905533338),new u(64,112.904061223),new u(65,113.904916758),new u(66,114.903878328),new u(67,115.905259995),new u(68,116.904515731),new u(69,117.906354623),new u(70,118.905846334),new u(71,119.907961505),new u(72,120.907848847),new u(73,121.910277103),new u(74,122.910438951),new u(75,123.913175916),new u(76,124.913601387),new u(77,125.916464532),new u(78,126.917344048),new u(79,127.920170658),new u(80,128.921657958),new u(81,129.924854941),new u(82,130.926767408),new u(83,131.932919005),new u(84,132.93834),new u(85,133.94466)]),B(d(Ht,1),Vt,3,0,[new u(50,99.938954),new u(51,100.93606),new u(52,101.93049),new u(53,102.92813),new u(54,103.923185469),new u(55,104.921390409),new u(56,105.916880472),new u(57,106.915666702),new u(58,107.911965339),new u(59,108.911286879),new u(60,109.907852688),new u(61,110.907735404),new u(62,111.90482081),new u(63,112.905173373),new u(64,113.902781816),new u(65,114.903345973),new u(66,115.901744149),new u(67,116.902953765),new u(68,117.901606328),new u(69,118.90330888),new u(70,119.902196571),new u(71,120.904236867),new u(72,121.903440138),new u(73,122.905721901),new u(74,123.90527463),new u(75,124.907784924),new u(76,125.907653953),new u(77,126.91035098),new u(78,127.910534953),new u(79,128.913439976),new u(80,129.913852185),new u(81,130.916919144),new u(82,131.917744455),new u(83,132.923814085),new u(84,133.928463576),new u(85,134.93473),new u(86,135.93934),new u(87,136.94579)]),B(d(Ht,1),Vt,3,0,[new u(52,102.94012),new u(53,103.936287),new u(54,104.931528593),new u(55,105.928183134),new u(56,106.92415),new u(57,107.92216),new u(58,108.918136092),new u(59,109.917533911),new u(60,110.912534147),new u(61,111.91239464),new u(62,112.909377941),new u(63,113.909095876),new u(64,114.906598812),new u(65,115.906797235),new u(66,116.90483959),new u(67,117.905531885),new u(68,118.90394646),new u(69,119.905074315),new u(70,120.903818044),new u(71,121.905175415),new u(72,122.904215696),new u(73,123.905937525),new u(74,124.905247804),new u(75,125.907248153),new u(76,126.906914564),new u(77,127.90916733),new u(78,128.909150092),new u(79,129.911546459),new u(80,130.911946487),new u(81,131.914413247),new u(82,132.915236466),new u(83,133.920551554),new u(84,134.925167962),new u(85,135.93066),new u(86,136.93531),new u(87,137.94096),new u(88,138.94571)]),B(d(Ht,1),Vt,3,0,[new u(54,105.937702),new u(55,106.935036),new u(56,107.929486838),new u(57,108.927456483),new u(58,109.922407164),new u(59,110.921120589),new u(60,111.917061617),new u(61,112.915452551),new u(62,113.912498025),new u(63,114.911578627),new u(64,115.908420253),new u(65,116.90863418),new u(66,117.905825187),new u(67,118.90640811),new u(68,119.904019891),new u(69,120.904929815),new u(70,121.903047064),new u(71,122.904272951),new u(72,123.902819466),new u(73,124.904424718),new u(74,125.903305543),new u(75,126.90521729),new u(76,127.904461383),new u(77,128.906595593),new u(78,129.906222753),new u(79,130.90852188),new u(80,131.908523782),new u(81,132.910939068),new u(82,133.911540546),new u(83,134.916450782),new u(84,135.920103155),new u(85,136.925324769),new u(86,137.92922),new u(87,138.93473),new u(88,139.9387),new u(89,140.94439),new u(90,141.9485)]),B(d(Ht,1),Vt,3,0,[new u(55,107.943291),new u(56,108.938191658),new u(57,109.934634181),new u(58,110.930276),new u(59,111.92797),new u(60,112.923644245),new u(61,113.92185),new u(62,114.918272),new u(63,115.916735014),new u(64,116.913647692),new u(65,117.91337523),new u(66,118.910180837),new u(67,119.910047843),new u(68,120.907366063),new u(69,121.907592451),new u(70,122.905597944),new u(71,123.906211423),new u(72,124.90462415),new u(73,125.905619387),new u(74,126.90446842),new u(75,127.905805254),new u(76,128.904987487),new u(77,129.906674018),new u(78,130.906124168),new u(79,131.907994525),new u(80,132.907806465),new u(81,133.909876552),new u(82,134.91005031),new u(83,135.914655105),new u(84,136.917872653),new u(85,137.922383666),new u(86,138.926093402),new u(87,139.93121),new u(88,140.93483),new u(89,141.94018),new u(90,142.94407),new u(91,143.94961)]),B(d(Ht,1),Vt,3,0,[new u(56,109.944476),new u(57,110.941632),new u(58,111.93566535),new u(59,112.933382836),new u(60,113.928145),new u(61,114.926979032),new u(62,115.921394197),new u(63,116.920564355),new u(64,117.91657092),new u(65,118.915554295),new u(66,119.91215199),new u(67,120.911386497),new u(68,121.908548396),new u(69,122.908470748),new u(70,123.905895774),new u(71,124.906398236),new u(72,125.904268868),new u(73,126.905179581),new u(74,127.903530436),new u(75,128.904779458),new u(76,129.903507903),new u(77,130.90508192),new u(78,131.904154457),new u(79,132.90590566),new u(80,133.905394504),new u(81,134.907207499),new u(82,135.907219526),new u(83,136.911562939),new u(84,137.913988549),new u(85,138.918786859),new u(86,139.921635665),new u(87,140.926646282),new u(88,141.929702981),new u(89,142.93489),new u(90,143.93823),new u(91,144.94367),new u(92,145.9473),new u(93,146.95301)]),B(d(Ht,1),Vt,3,0,[new u(57,111.950331),new u(58,112.944535512),new u(59,113.940841319),new u(60,114.935939),new u(61,115.932914152),new u(62,116.928639484),new u(63,117.926554883),new u(64,118.922370879),new u(65,119.920678219),new u(66,120.917183637),new u(67,121.916121946),new u(68,122.912990168),new u(69,123.912245731),new u(70,124.909724871),new u(71,125.909447953),new u(72,126.9074176),new u(73,127.907747919),new u(74,128.906063369),new u(75,129.906706163),new u(76,130.905460232),new u(77,131.906429799),new u(78,132.90544687),new u(79,133.906713419),new u(80,134.905971903),new u(81,135.907305741),new u(82,136.907083505),new u(83,137.911010537),new u(84,138.913357921),new u(85,139.917277075),new u(86,140.920043984),new u(87,141.924292317),new u(88,142.927330292),new u(89,143.932027373),new u(90,144.935388226),new u(91,145.940162028),new u(92,146.943864435),new u(93,147.948899539),new u(94,148.95272),new u(95,149.95797),new u(96,150.962)]),B(d(Ht,1),Vt,3,0,[new u(58,113.950941),new u(59,114.94771),new u(60,115.94168),new u(61,116.937700229),new u(62,117.93344),new u(63,118.931051927),new u(64,119.926045941),new u(65,120.924485908),new u(66,121.92026),new u(67,122.91885),new u(68,123.915088437),new u(69,124.914620234),new u(70,125.911244146),new u(71,126.911121328),new u(72,127.90830887),new u(73,128.908673749),new u(74,129.906310478),new u(75,130.906930798),new u(76,131.905056152),new u(77,132.906002368),new u(78,133.904503347),new u(79,134.905682749),new u(80,135.904570109),new u(81,136.905821414),new u(82,137.905241273),new u(83,138.908835384),new u(84,139.910599485),new u(85,140.914406439),new u(86,141.916448175),new u(87,142.920617184),new u(88,143.922940468),new u(89,144.926923807),new u(90,145.930106645),new u(91,146.933992519),new u(92,147.937682377),new u(93,148.94246),new u(94,149.94562),new u(95,150.9507),new u(96,151.95416),new u(97,152.95961)]),B(d(Ht,1),Vt,3,0,[new u(60,116.95001),new u(61,117.94657),new u(62,118.94099),new u(63,119.93807),new u(64,120.93301),new u(65,121.93071),new u(66,122.92624),new u(67,123.92453),new u(68,124.92067),new u(69,125.91937),new u(70,126.91616),new u(71,127.91544794),new u(72,128.912667334),new u(73,129.91232),new u(74,130.910108489),new u(75,131.910110399),new u(76,132.908396372),new u(77,133.908489607),new u(78,134.906971003),new u(79,135.907651181),new u(80,136.906465656),new u(81,137.907106826),new u(82,138.90634816),new u(83,139.909472552),new u(84,140.910957016),new u(85,141.914074489),new u(86,142.916058646),new u(87,143.919591666),new u(88,144.92163837),new u(89,145.925700146),new u(90,146.927819639),new u(91,147.932191197),new u(92,148.93437),new u(93,149.93857),new u(94,150.94156),new u(95,151.94611),new u(96,152.94945),new u(97,153.9544),new u(98,154.95813)]),B(d(Ht,1),Vt,3,0,[new u(61,118.95276),new u(62,119.94664),new u(63,120.94367),new u(64,121.93801),new u(65,122.93551),new u(66,123.93052),new u(67,124.92854),new u(68,125.9241),new u(69,126.92275),new u(70,127.91887),new u(71,128.918679183),new u(72,129.914339361),new u(73,130.914424137),new u(74,131.91149),new u(75,132.91155),new u(76,133.909026379),new u(77,134.909145555),new u(78,135.907143574),new u(79,136.907777634),new u(80,137.905985574),new u(81,138.906646605),new u(82,139.905434035),new u(83,140.908271103),new u(84,141.909239733),new u(85,142.912381158),new u(86,143.913642686),new u(87,144.917227871),new u(88,145.918689722),new u(89,146.922510962),new u(90,147.924394738),new u(91,148.928289207),new u(92,149.930226399),new u(93,150.93404),new u(94,151.93638),new u(95,152.94058),new u(96,153.94332),new u(97,154.94804),new u(98,155.95126),new u(99,156.95634)]),B(d(Ht,1),Vt,3,0,[new u(62,120.955364),new u(63,121.95165),new u(64,122.94596),new u(65,123.94296),new u(66,124.93783),new u(67,125.93531),new u(68,126.93083),new u(69,127.9288),new u(70,128.92486),new u(71,129.92338),new u(72,130.920060245),new u(73,131.91912),new u(74,132.9162),new u(75,133.915672),new u(76,134.91313914),new u(77,135.912646935),new u(78,136.910678351),new u(79,137.910748891),new u(80,138.908932181),new u(81,139.909071204),new u(82,140.907647726),new u(83,141.910039865),new u(84,142.910812233),new u(85,143.913300595),new u(86,144.914506897),new u(87,145.917588016),new u(88,146.918979001),new u(89,147.922183237),new u(90,148.923791056),new u(91,149.926995031),new u(92,150.928227869),new u(93,151.9316),new u(94,152.93365),new u(95,153.93739),new u(96,154.93999),new u(97,155.94412),new u(98,156.94717),new u(99,157.95178),new u(100,158.95523)]),B(d(Ht,1),Vt,3,0,[new u(66,125.94307),new u(67,126.9405),new u(68,127.93539),new u(69,128.932385),new u(70,129.92878),new u(71,130.927102697),new u(72,131.92312),new u(73,132.92221),new u(74,133.918645),new u(75,134.91824),new u(76,135.915020542),new u(77,136.91463973),new u(78,137.91291745),new u(79,138.91192415),new u(80,139.909309824),new u(81,140.9096048),new u(82,141.907718643),new u(83,142.909809626),new u(84,143.910082629),new u(85,144.912568847),new u(86,145.913112139),new u(87,146.916095794),new u(88,147.916888516),new u(89,148.92014419),new u(90,149.920886563),new u(91,150.923824739),new u(92,151.924682428),new u(93,152.927694534),new u(94,153.929483295),new u(95,154.932629551),new u(96,155.9352),new u(97,156.93927),new u(98,157.94187),new u(99,158.94639),new u(100,159.94939),new u(101,160.95433)]),B(d(Ht,1),Vt,3,0,[new u(67,127.94826),new u(68,128.94316),new u(69,129.94045),new u(70,130.9358),new u(71,131.93375),new u(72,132.92972),new u(73,133.92849),new u(74,134.924617),new u(75,135.923447865),new u(76,136.920713),new u(77,137.920432261),new u(78,138.916759814),new u(79,139.915801649),new u(80,140.913606636),new u(81,141.912950738),new u(82,142.910927571),new u(83,143.912585768),new u(84,144.912743879),new u(85,145.914692165),new u(86,146.915133898),new u(87,147.917467786),new u(88,148.918329195),new u(89,149.920979477),new u(90,150.921202693),new u(91,151.923490557),new u(92,152.924113189),new u(93,153.926547019),new u(94,154.928097047),new u(95,155.931060357),new u(96,156.9332),new u(97,157.93669),new u(98,158.93913),new u(99,159.94299),new u(100,160.94586),new u(101,161.95029),new u(102,162.95352)]),B(d(Ht,1),Vt,3,0,[new u(68,129.94863),new u(69,130.94589),new u(70,131.94082),new u(71,132.93873),new u(72,133.93402),new u(73,134.93235),new u(74,135.9283),new u(75,136.927046709),new u(76,137.92354),new u(77,138.922302),new u(78,139.918991),new u(79,140.918468512),new u(80,141.915193274),new u(81,142.914623555),new u(82,143.91199473),new u(83,144.913405611),new u(84,145.91303676),new u(85,146.914893275),new u(86,147.914817914),new u(87,148.917179521),new u(88,149.917271454),new u(89,150.919928351),new u(90,151.919728244),new u(91,152.922093907),new u(92,153.922205303),new u(93,154.92463594),new u(94,155.925526236),new u(95,156.928354506),new u(96,157.929987938),new u(97,158.9332),new u(98,159.93514),new u(99,160.93883),new u(100,161.94122),new u(101,162.94536),new u(102,163.94828),new u(103,164.95298)]),B(d(Ht,1),Vt,3,0,[new u(69,131.95416),new u(70,132.9489),new u(71,133.94632),new u(72,134.94172),new u(73,135.9395),new u(74,136.93521),new u(75,137.93345),new u(76,138.92882915),new u(77,139.928083921),new u(78,140.924885867),new u(79,141.923400033),new u(80,142.920286634),new u(81,143.918774116),new u(82,144.916261285),new u(83,145.917199714),new u(84,146.916741206),new u(85,147.918153775),new u(86,148.917925922),new u(87,149.919698294),new u(88,150.919846022),new u(89,151.921740399),new u(90,152.921226219),new u(91,153.922975386),new u(92,154.922889429),new u(93,155.924750855),new u(94,156.925419435),new u(95,157.927841923),new u(96,158.9290845),new u(97,159.931460406),new u(98,160.93368),new u(99,161.93704),new u(100,162.93921),new u(101,163.94299),new u(102,164.94572),new u(103,165.94997),new u(104,166.95305)]),B(d(Ht,1),Vt,3,0,[new u(72,135.94707),new u(73,136.94465),new u(74,137.93997),new u(75,138.93808),new u(76,139.933236934),new u(77,140.93221),new u(78,141.927908919),new u(79,142.926738636),new u(80,143.923390357),new u(81,144.921687498),new u(82,145.918305344),new u(83,146.919089446),new u(84,147.918109771),new u(85,148.919336427),new u(86,149.918655455),new u(87,150.920344273),new u(88,151.919787882),new u(89,152.921746283),new u(90,153.920862271),new u(91,154.922618801),new u(92,155.922119552),new u(93,156.923956686),new u(94,157.924100533),new u(95,158.926385075),new u(96,159.927050616),new u(97,160.929665688),new u(98,161.930981211),new u(99,162.93399),new u(100,163.93586),new u(101,164.93938),new u(102,165.9416),new u(103,166.94557),new u(104,167.94836),new u(105,168.95287)]),B(d(Ht,1),Vt,3,0,[new u(73,137.95287),new u(74,138.94803),new u(75,139.945367985),new u(76,140.94116),new u(77,141.939073781),new u(78,142.93475),new u(79,143.93253),new u(80,144.92888),new u(81,145.927180629),new u(82,146.924037176),new u(83,147.924298636),new u(84,148.92324163),new u(85,149.923654158),new u(86,150.923098169),new u(87,151.924071324),new u(88,152.923430858),new u(89,153.924686236),new u(90,154.923500411),new u(91,155.924743749),new u(92,156.924021155),new u(93,157.92541026),new u(94,158.925343135),new u(95,159.927164021),new u(96,160.927566289),new u(97,161.929484803),new u(98,162.930643942),new u(99,163.933347253),new u(100,164.93488),new u(101,165.93805),new u(102,166.94005),new u(103,167.94364),new u(104,168.94622),new u(105,169.95025),new u(106,170.9533)]),B(d(Ht,1),Vt,3,0,[new u(74,139.95379),new u(75,140.95119),new u(76,141.946695946),new u(77,142.94383),new u(78,143.93907),new u(79,144.936717),new u(80,145.932720118),new u(81,146.930878496),new u(82,147.927177882),new u(83,148.927333981),new u(84,149.925579728),new u(85,150.92617963),new u(86,151.924713874),new u(87,152.925760865),new u(88,153.924422046),new u(89,154.92574895),new u(90,155.924278273),new u(91,156.925461256),new u(92,157.924404637),new u(93,158.92573566),new u(94,159.925193718),new u(95,160.926929595),new u(96,161.926794731),new u(97,162.928727532),new u(98,163.929171165),new u(99,164.931699828),new u(100,165.932803241),new u(101,166.935649025),new u(102,167.93723),new u(103,168.940303648),new u(104,169.94267),new u(105,170.94648),new u(106,171.94911),new u(107,172.95344)]),B(d(Ht,1),Vt,3,0,[new u(75,141.95986),new u(76,142.95469),new u(77,143.95164),new u(78,144.94688),new u(79,145.9441),new u(80,146.93984),new u(81,147.937269),new u(82,148.933789944),new u(83,149.932760914),new u(84,150.931680791),new u(85,151.931740598),new u(86,152.930194506),new u(87,153.930596268),new u(88,154.929079084),new u(89,155.929001869),new u(90,156.928188059),new u(91,157.92894573),new u(92,158.927708537),new u(93,159.928725679),new u(94,160.927851662),new u(95,161.92909242),new u(96,162.928730286),new u(97,163.930230577),new u(98,164.930319169),new u(99,165.932281267),new u(100,166.933126195),new u(101,167.935496424),new u(102,168.936868306),new u(103,169.939614951),new u(104,170.941461227),new u(105,171.94482),new u(106,172.94729),new u(107,173.95115),new u(108,174.95405)]),B(d(Ht,1),Vt,3,0,[new u(76,143.96059),new u(77,144.95746),new u(78,145.95212),new u(79,146.94931),new u(80,147.94444),new u(81,148.942780527),new u(82,149.937171034),new u(83,150.93746),new u(84,151.935078452),new u(85,152.935093125),new u(86,153.932777294),new u(87,154.933204273),new u(88,155.931015001),new u(89,156.931945517),new u(90,157.929912),new u(91,158.930680718),new u(92,159.929078924),new u(93,160.930001348),new u(94,161.928774923),new u(95,162.930029273),new u(96,163.929196996),new u(97,164.9307228),new u(98,165.93028997),new u(99,166.932045448),new u(100,167.932367781),new u(101,168.934588082),new u(102,169.935460334),new u(103,170.938025885),new u(104,171.939352149),new u(105,172.9424),new u(106,173.94434),new u(107,174.94793),new u(108,175.95029),new u(109,176.95437)]),B(d(Ht,1),Vt,3,0,[new u(77,145.966495),new u(78,146.961081),new u(79,147.95755),new u(80,148.95265),new u(81,149.94967),new u(82,150.944842),new u(83,151.9443),new u(84,152.942027631),new u(85,153.940832325),new u(86,154.939191562),new u(87,155.939006895),new u(88,156.936756069),new u(89,157.936996),new u(90,158.934808966),new u(91,159.935090772),new u(92,160.933398042),new u(93,161.933970147),new u(94,162.932647648),new u(95,163.933450972),new u(96,164.932432463),new u(97,165.933553133),new u(98,166.932848844),new u(99,167.934170375),new u(100,168.934211117),new u(101,169.935797877),new u(102,170.936425817),new u(103,171.938396118),new u(104,172.939600336),new u(105,173.942164618),new u(106,174.943832897),new u(107,175.946991412),new u(108,176.94904),new u(109,177.95264),new u(110,178.95534)]),B(d(Ht,1),Vt,3,0,[new u(78,147.96676),new u(79,148.96348),new u(80,149.95799),new u(81,150.954657965),new u(82,151.950167),new u(83,152.94921),new u(84,153.945651145),new u(85,154.945792),new u(86,155.942847109),new u(87,156.94265865),new u(88,157.939857897),new u(89,158.940153735),new u(90,159.93756),new u(91,160.937357719),new u(92,161.93575),new u(93,162.936265492),new u(94,163.93452),new u(95,164.935397592),new u(96,165.933879623),new u(97,166.934946862),new u(98,167.933894465),new u(99,168.93518712),new u(100,169.934758652),new u(101,170.936322297),new u(102,171.936377696),new u(103,172.938206756),new u(104,173.938858101),new u(105,174.941272494),new u(106,175.942568409),new u(107,176.945257126),new u(108,177.946643396),new u(109,178.95017),new u(110,179.95233),new u(111,180.95615)]),B(d(Ht,1),Vt,3,0,[new u(79,149.972668),new u(80,150.967147),new u(81,151.96361),new u(82,152.95869),new u(83,153.9571),new u(84,154.953641324),new u(85,155.952907),new u(86,156.950101536),new u(87,157.948577981),new u(88,158.946615113),new u(89,159.945383),new u(90,160.943047504),new u(91,161.943222),new u(92,162.941203796),new u(93,163.941215),new u(94,164.939605886),new u(95,165.939762646),new u(96,166.938307056),new u(97,167.938698576),new u(98,168.937648757),new u(99,169.93847219),new u(100,170.937909903),new u(101,171.939082239),new u(102,172.938926901),new u(103,173.940333522),new u(104,174.940767904),new u(105,175.942682399),new u(106,176.943754987),new u(107,177.945951366),new u(108,178.947324216),new u(109,179.949879968),new u(110,180.95197),new u(111,181.95521),new u(112,182.95757),new u(113,183.96117)]),B(d(Ht,1),Vt,3,0,[new u(82,153.96425),new u(83,154.96276),new u(84,155.959247),new u(85,156.958127),new u(86,157.95405528),new u(87,158.954003),new u(88,159.950713588),new u(89,160.950330852),new u(90,161.947202977),new u(91,162.947057),new u(92,163.944422),new u(93,164.94454),new u(94,165.94225),new u(95,166.9426),new u(96,167.94063),new u(97,168.941158567),new u(98,169.93965),new u(99,170.94049),new u(100,171.93945798),new u(101,172.94065),new u(102,173.940040159),new u(103,174.941502991),new u(104,175.941401828),new u(105,176.943220013),new u(106,177.943697732),new u(107,178.945815073),new u(108,179.94654876),new u(109,180.949099124),new u(110,181.950552893),new u(111,182.953531012),new u(112,183.95544788),new u(113,184.95878),new u(114,185.96092)]),B(d(Ht,1),Vt,3,0,[new u(83,155.971689),new u(84,156.968145),new u(85,157.966368),new u(86,158.96232309),new u(87,159.961358),new u(88,160.958372992),new u(89,161.956556553),new u(90,162.95431665),new u(91,163.95357),new u(92,164.950817),new u(93,165.95047),new u(94,166.948639),new u(95,167.947787),new u(96,168.94592),new u(97,169.94609),new u(98,170.94446),new u(99,171.944739818),new u(100,172.94459),new u(101,173.944167937),new u(102,174.94365),new u(103,175.944740551),new u(104,176.944471766),new u(105,177.945750349),new u(106,178.945934113),new u(107,179.947465655),new u(108,180.947996346),new u(109,181.950152414),new u(110,182.951373188),new u(111,183.954009331),new u(112,184.955559086),new u(113,185.9585501),new u(114,186.96041),new u(115,187.96371)]),B(d(Ht,1),Vt,3,0,[new u(84,157.973939),new u(85,158.97228),new u(86,159.968369),new u(87,160.967089),new u(88,161.962750303),new u(89,162.962532),new u(90,163.95898381),new u(91,164.958335962),new u(92,165.955019896),new u(93,166.954672),new u(94,167.951863),new u(95,168.951759),new u(96,169.948473988),new u(97,170.94946),new u(98,171.948228837),new u(99,172.948884),new u(100,173.94616),new u(101,174.94677),new u(102,175.94559),new u(103,176.94662),new u(104,177.945848364),new u(105,178.947071733),new u(106,179.946705734),new u(107,180.948198054),new u(108,181.948205519),new u(109,182.950224458),new u(110,183.950932553),new u(111,184.953420586),new u(112,185.954362204),new u(113,186.957158365),new u(114,187.958486954),new u(115,188.96191222),new u(116,189.963179541)]),B(d(Ht,1),Vt,3,0,[new u(85,159.981485),new u(86,160.977661),new u(87,161.975707),new u(88,162.971375872),new u(89,163.970319),new u(90,164.967050268),new u(91,165.965211372),new u(92,166.962564),new u(93,167.961609),new u(94,168.95883),new u(95,169.958163),new u(96,170.955547),new u(97,171.955285),new u(98,172.953062),new u(99,173.952114),new u(100,174.951393),new u(101,175.95157),new u(102,176.95027),new u(103,177.950851081),new u(104,178.949981038),new u(105,179.95078768),new u(106,180.950064596),new u(107,181.951211444),new u(108,182.950821349),new u(109,183.952524289),new u(110,184.952955747),new u(111,185.954986529),new u(112,186.955750787),new u(113,187.958112287),new u(114,188.959228359),new u(115,189.961816139),new u(116,190.963123592),new u(117,191.96596)]),B(d(Ht,1),Vt,3,0,[new u(86,161.983819),new u(87,162.982048),new u(88,163.977927),new u(89,164.976475),new u(90,165.971934911),new u(91,166.971554),new u(92,167.967832911),new u(93,168.967076205),new u(94,169.963569716),new u(95,170.96304),new u(96,171.960078),new u(97,172.959791),new u(98,173.956307704),new u(99,174.95708),new u(100,175.953757941),new u(101,176.955045),new u(102,177.953348225),new u(103,178.953951),new u(104,179.952308241),new u(105,180.953274494),new u(106,181.952186222),new u(107,182.95311),new u(108,183.952490808),new u(109,184.954043023),new u(110,185.953838355),new u(111,186.955747928),new u(112,187.955835993),new u(113,188.958144866),new u(114,189.95844521),new u(115,190.960927951),new u(116,191.961479047),new u(117,192.964148083),new u(118,193.965179314),new u(119,194.968123889),new u(120,195.96962255)]),B(d(Ht,1),Vt,3,0,[new u(88,164.98758),new u(89,165.985506),new u(90,166.980951577),new u(91,167.979966),new u(92,168.976390868),new u(93,169.974441697),new u(94,170.971779),new u(95,171.970643),new u(96,172.967707),new u(97,173.966804),new u(98,174.964279),new u(99,175.963511),new u(100,176.96117),new u(101,177.960084944),new u(102,178.95915),new u(103,179.958555615),new u(104,180.957642156),new u(105,181.958127689),new u(106,182.956814),new u(107,183.957388318),new u(108,184.95659),new u(109,185.957951104),new u(110,186.95736083),new u(111,187.958851962),new u(112,188.958716473),new u(113,189.960592299),new u(114,190.960591191),new u(115,191.962602198),new u(116,192.9629237),new u(117,193.96507561),new u(118,194.9659768),new u(119,195.968379906),new u(120,196.969636496),new u(121,197.97228),new u(122,198.973787159)]),B(d(Ht,1),Vt,3,0,[new u(90,167.988035),new u(91,168.986421),new u(92,169.981734918),new u(93,170.981251),new u(94,171.977376138),new u(95,172.976499642),new u(96,173.972811276),new u(97,174.972276),new u(98,175.969),new u(99,176.968453),new u(100,177.964894223),new u(101,178.965475),new u(102,179.962023729),new u(103,180.963177),new u(104,181.961267637),new u(105,182.961729),new u(106,183.959851685),new u(107,184.960753782),new u(108,185.959432346),new u(109,186.960697),new u(110,187.959395697),new u(111,188.9608319),new u(112,189.959930073),new u(113,190.961684653),new u(114,191.961035158),new u(115,192.962984504),new u(116,193.962663581),new u(117,194.964774449),new u(118,195.964934884),new u(119,196.967323401),new u(120,197.967876009),new u(121,198.970576213),new u(122,199.971423885),new u(123,200.974496467),new u(124,201.97574)]),B(d(Ht,1),Vt,3,0,[new u(92,170.991183),new u(93,171.990109),new u(94,172.986398138),new u(95,173.984325861),new u(96,174.981552),new u(97,175.980269),new u(98,176.977215),new u(99,177.975975),new u(100,178.973412),new u(101,179.972396),new u(102,180.969948),new u(103,181.968621416),new u(104,182.96762),new u(105,183.966776046),new u(106,184.965806956),new u(107,185.965997671),new u(108,186.964562),new u(109,187.965321662),new u(110,188.9642243),new u(111,189.964698757),new u(112,190.963649239),new u(113,191.964810107),new u(114,192.964131745),new u(115,193.96533889),new u(116,194.965017928),new u(117,195.966551315),new u(118,196.966551609),new u(119,197.968225244),new u(120,198.968748016),new u(121,199.970717886),new u(122,200.971640839),new u(123,201.973788431),new u(124,202.975137256),new u(125,203.977705),new u(126,204.97961)]),B(d(Ht,1),Vt,3,0,[new u(95,174.991411),new u(96,175.987413248),new u(97,176.986336874),new u(98,177.982476325),new u(99,178.981783),new u(100,179.978322),new u(101,180.977806),new u(102,181.97393546),new u(103,182.974561),new u(104,183.970705219),new u(105,184.971983),new u(106,185.969460021),new u(107,186.969785),new u(108,187.967511693),new u(109,188.968733187),new u(110,189.966958568),new u(111,190.96706311),new u(112,191.965921572),new u(113,192.966644169),new u(114,193.965381832),new u(115,194.966638981),new u(116,195.965814846),new u(117,196.967195333),new u(118,197.96675183),new u(119,198.968262489),new u(120,199.968308726),new u(121,200.970285275),new u(122,201.970625604),new u(123,202.972857096),new u(124,203.97347564),new u(125,204.976056104),new u(126,205.977498672),new u(127,206.982577025),new u(128,207.98594)]),B(d(Ht,1),Vt,3,0,[new u(96,176.996881),new u(97,177.994637),new u(98,178.991466),new u(99,179.990194),new u(100,180.986904),new u(101,181.98561),new u(102,182.982697),new u(103,183.98176),new u(104,184.9791),new u(105,185.977549881),new u(106,186.97617),new u(107,187.97592),new u(108,188.974290451),new u(109,189.974473379),new u(110,190.972261952),new u(111,191.972770785),new u(112,192.970548),new u(113,193.971053),new u(114,194.96965),new u(115,195.970515),new u(116,196.9695362),new u(117,197.970466294),new u(118,198.969813837),new u(119,199.970945394),new u(120,200.97080377),new u(121,201.972090569),new u(122,202.972329088),new u(123,203.973848646),new u(124,204.97441227),new u(125,205.976095321),new u(126,206.977407908),new u(127,207.982004653),new u(128,208.985349125),new u(129,209.990065574)]),B(d(Ht,1),Vt,3,0,[new u(99,180.996714),new u(100,181.992676101),new u(101,182.99193),new u(102,183.988198),new u(103,184.98758),new u(104,185.983485388),new u(105,186.98403),new u(106,187.979869108),new u(107,188.98088),new u(108,189.978180008),new u(109,190.9782),new u(110,191.975719811),new u(111,192.97608),new u(112,193.974648056),new u(113,194.975920279),new u(114,195.97271),new u(115,196.97338),new u(116,197.97198),new u(117,198.972909384),new u(118,199.97181556),new u(119,200.972846589),new u(120,201.972143786),new u(121,202.973375491),new u(122,203.973028761),new u(123,204.974467112),new u(124,205.974449002),new u(125,206.975880605),new u(126,207.97663585),new u(127,208.981074801),new u(128,209.984173129),new u(129,210.988731474),new u(130,211.991887495),new u(131,212.9965),new u(132,213.999798147)]),B(d(Ht,1),Vt,3,0,[new u(102,184.997708),new u(103,185.99648),new u(104,186.993458),new u(105,187.992173),new u(106,188.989505),new u(107,189.987520007),new u(108,190.986053),new u(109,191.985368),new u(110,192.983662229),new u(111,193.983430186),new u(112,194.98112697),new u(113,195.981236107),new u(114,196.978934287),new u(115,197.979024396),new u(116,198.977576953),new u(117,199.978141983),new u(118,200.976970721),new u(119,201.977674504),new u(120,202.976868118),new u(121,203.977805161),new u(122,204.977374688),new u(123,205.978482854),new u(124,206.978455217),new u(125,207.979726699),new u(126,208.980383241),new u(127,209.984104944),new u(128,210.987258139),new u(129,211.991271542),new u(130,212.994374836),new u(131,213.998698664),new u(132,215.001832349),new u(133,216.006199)]),B(d(Ht,1),Vt,3,0,[new u(106,189.994293888),new u(107,190.994653),new u(108,191.99033039),new u(109,192.991102),new u(110,193.988284107),new u(111,194.988045),new u(112,195.985469432),new u(113,196.985567),new u(114,197.984024384),new u(115,198.985044507),new u(116,199.981735),new u(117,200.982209),new u(118,201.980704),new u(119,202.981412863),new u(120,203.980307113),new u(121,204.981165396),new u(122,205.980465241),new u(123,206.981578228),new u(124,207.981231059),new u(125,208.982415788),new u(126,209.982857396),new u(127,210.986636869),new u(128,211.988851755),new u(129,212.992842522),new u(130,213.995185949),new u(131,214.999414609),new u(132,216.001905198),new u(133,217.006253),new u(134,218.008965773)]),B(d(Ht,1),Vt,3,0,[new u(108,193.000188),new u(109,193.997973),new u(110,194.996554),new u(111,195.995702),new u(112,196.993891293),new u(113,197.99343368),new u(114,198.991008569),new u(115,199.990920883),new u(116,200.988486908),new u(117,201.988448629),new u(118,202.986847216),new u(119,203.987261559),new u(120,204.986036352),new u(121,205.986599242),new u(122,206.985775861),new u(123,207.986582508),new u(124,208.986158678),new u(125,209.987131308),new u(126,210.987480806),new u(127,211.990734657),new u(128,212.99292115),new u(129,213.996356412),new u(130,214.998641245),new u(131,216.002408839),new u(132,217.004709619),new u(133,218.008681458),new u(134,219.011296478),new u(135,220.015301),new u(136,221.01814),new u(137,222.02233),new u(138,223.02534)]),B(d(Ht,1),Vt,3,0,[new u(110,196.001117268),new u(111,197.001661),new u(112,197.998779978),new u(113,198.998309),new u(114,199.995634148),new u(115,200.995535),new u(116,201.993899382),new u(117,202.994765192),new u(118,203.991365),new u(119,204.991668),new u(120,205.99016),new u(121,206.990726826),new u(122,207.989631237),new u(123,208.990376634),new u(124,209.989679862),new u(125,210.99058541),new u(126,211.990688899),new u(127,212.993868354),new u(128,213.995346275),new u(129,214.998729195),new u(130,216.000258153),new u(131,217.003914555),new u(132,218.005586315),new u(133,219.009474831),new u(134,220.011384149),new u(135,221.015455),new u(136,222.017570472),new u(137,223.02179),new u(138,224.02409),new u(139,225.02844),new u(140,226.03089),new u(141,227.035407),new u(142,228.038084)]),B(d(Ht,1),Vt,3,0,[new u(113,200.006499),new u(114,201.00458692),new u(115,202.00396885),new u(116,203.001423829),new u(117,204.001221209),new u(118,204.998663961),new u(119,205.998486886),new u(120,206.996859385),new u(121,207.997133849),new u(122,208.995915421),new u(123,209.996398327),new u(124,210.995529332),new u(125,211.996194988),new u(126,212.996174845),new u(127,213.99895474),new u(128,215.000326029),new u(129,216.003187873),new u(130,217.004616452),new u(131,218.007563326),new u(132,219.009240843),new u(133,220.012312978),new u(134,221.014245654),new u(135,222.017543957),new u(136,223.019730712),new u(137,224.023235513),new u(138,225.025606914),new u(139,226.029343423),new u(140,227.031833167),new u(141,228.034776087),new u(142,229.038426),new u(143,230.04251),new u(144,231.045407),new u(145,232.049654)]),B(d(Ht,1),Vt,3,0,[new u(115,203.00921),new u(116,204.006434513),new u(117,205.006187),new u(118,206.004463814),new u(119,207.005176607),new u(120,208.001776),new u(121,209.001944),new u(122,210.000446),new u(123,211.000893996),new u(124,211.999783492),new u(125,213.000345847),new u(126,214.000091141),new u(127,215.002704195),new u(128,216.003518402),new u(129,217.00630601),new u(130,218.007123948),new u(131,219.010068787),new u(132,220.011014669),new u(133,221.013907762),new u(134,222.01536182),new u(135,223.01849714),new u(136,224.020202004),new u(137,225.023604463),new u(138,226.025402555),new u(139,227.029170677),new u(140,228.031064101),new u(141,229.034820309),new u(142,230.037084774),new u(143,231.04122),new u(144,232.043693),new u(145,233.047995),new u(146,234.050547)]),B(d(Ht,1),Vt,3,0,[new u(118,207.012469754),new u(119,208.012112949),new u(120,209.009568736),new u(121,210.009256802),new u(122,211.007648196),new u(123,212.007811441),new u(124,213.006573689),new u(125,214.006893072),new u(126,215.006450832),new u(127,216.008721268),new u(128,217.009332676),new u(129,218.011625045),new u(130,219.012404918),new u(131,220.014752105),new u(132,221.015575746),new u(133,222.017828852),new u(134,223.01912603),new u(135,224.021708435),new u(136,225.023220576),new u(137,226.026089848),new u(138,227.027746979),new u(139,228.031014825),new u(140,229.032930871),new u(141,230.036025144),new u(142,231.038551503),new u(143,232.042022474),new u(144,233.04455),new u(145,234.04842),new u(146,235.051102),new u(147,236.055178)]),B(d(Ht,1),Vt,3,0,[new u(120,210.015711883),new u(121,211.016306912),new u(122,212.012916),new u(123,213.012962),new u(124,214.011451),new u(125,215.011726597),new u(126,216.011050963),new u(127,217.013066169),new u(128,218.013267744),new u(129,219.015521253),new u(130,220.015733126),new u(131,221.018171499),new u(132,222.018454131),new u(133,223.020795153),new u(134,224.02145925),new u(135,225.023941441),new u(136,226.024890681),new u(137,227.027698859),new u(138,228.028731348),new u(139,229.03175534),new u(140,230.033126574),new u(141,231.03629706),new u(142,232.03805036),new u(143,233.041576923),new u(144,234.043595497),new u(145,235.04750442),new u(146,236.04971),new u(147,237.053894),new u(148,238.056243)]),B(d(Ht,1),Vt,3,0,[new u(122,213.021183209),new u(123,214.02073923),new u(124,215.019097612),new u(125,216.019109649),new u(126,217.018288571),new u(127,218.020007906),new u(128,219.019880348),new u(129,220.021876493),new u(130,221.021863742),new u(131,222.023726),new u(132,223.023963748),new u(133,224.025614854),new u(134,225.026115172),new u(135,226.02793275),new u(136,227.028793151),new u(137,228.031036942),new u(138,229.032088601),new u(139,230.034532562),new u(140,231.035878898),new u(141,232.03858172),new u(142,233.040240235),new u(143,234.043302325),new u(144,235.045436759),new u(145,236.048675176),new u(146,237.05113943),new u(147,238.054497046),new u(148,239.05713),new u(149,240.06098)]),B(d(Ht,1),Vt,3,0,[new u(126,218.023487),new u(127,219.024915423),new u(128,220.024712),new u(129,221.026351),new u(130,222.02607),new u(131,223.027722956),new u(132,224.027590139),new u(133,225.029384369),new u(134,226.02933975),new u(135,227.031140069),new u(136,228.031366357),new u(137,229.033496137),new u(138,230.033927392),new u(139,231.036289158),new u(140,232.03714628),new u(141,233.039628196),new u(142,234.040945606),new u(143,235.043923062),new u(144,236.045561897),new u(145,237.048723955),new u(146,238.050782583),new u(147,239.054287777),new u(148,240.056585734),new u(149,241.06033),new u(150,242.062925)]),B(d(Ht,1),Vt,3,0,[new u(132,225.033899689),new u(133,226.035129),new u(134,227.034958261),new u(135,228.03618),new u(136,229.036246866),new u(137,230.037812591),new u(138,231.038233161),new u(139,232.040099),new u(140,233.04073235),new u(141,234.042888556),new u(142,235.044055876),new u(143,236.046559724),new u(144,237.048167253),new u(145,238.050940464),new u(146,239.052931399),new u(147,240.056168828),new u(148,241.058246266),new u(149,242.061635),new u(150,243.064273),new u(151,244.06785)]),B(d(Ht,1),Vt,3,0,[new u(134,228.038727686),new u(135,229.040138934),new u(136,230.039645603),new u(137,231.041258),new u(138,232.041179445),new u(139,233.04298757),new u(140,234.043304681),new u(141,235.0452815),new u(142,236.046048088),new u(143,237.048403774),new u(144,238.0495534),new u(145,239.052156519),new u(146,240.05380746),new u(147,241.056845291),new u(148,242.058736847),new u(149,243.061997013),new u(150,244.06419765),new u(151,245.067738657),new u(152,246.070198429),new u(153,247.07407)]),B(d(Ht,1),Vt,3,0,[new u(136,231.04556),new u(137,232.04659),new u(138,233.046472),new u(139,234.047794),new u(140,235.048029),new u(141,236.049569),new u(142,237.049970748),new u(143,238.051977839),new u(144,239.053018481),new u(145,240.055287826),new u(146,241.056822944),new u(147,242.059543039),new u(148,243.061372686),new u(149,244.064279429),new u(150,245.066445398),new u(151,246.069768438),new u(152,247.072086),new u(153,248.075745),new u(154,249.07848)]),B(d(Ht,1),Vt,3,0,[new u(137,233.0508),new u(138,234.05024),new u(139,235.051591),new u(140,236.051405),new u(141,237.052891),new u(142,238.053016298),new u(143,239.054951),new u(144,240.055519046),new u(145,241.057646736),new u(146,242.058829326),new u(147,243.061382249),new u(148,244.062746349),new u(149,245.065485586),new u(150,246.067217551),new u(151,247.070346811),new u(152,248.072342247),new u(153,249.075947062),new u(154,250.078350687),new u(155,251.082277873),new u(156,252.08487)]),B(d(Ht,1),Vt,3,0,[new u(138,235.05658),new u(139,236.05733),new u(140,237.057127),new u(141,238.058266),new u(142,239.058362),new u(143,240.059749),new u(144,241.060223),new u(145,242.06205),new u(146,243.06300157),new u(147,244.065167882),new u(148,245.066355386),new u(149,246.068666836),new u(150,247.070298533),new u(151,248.07308),new u(152,249.074979937),new u(153,250.078310529),new u(154,251.08075344),new u(155,252.084303),new u(156,253.08688),new u(157,254.0906)]),B(d(Ht,1),Vt,3,0,[new u(139,237.06207),new u(140,238.06141),new u(141,239.062579),new u(142,240.062295),new u(143,241.063716),new u(144,242.063688713),new u(145,243.065421),new u(146,244.06599039),new u(147,245.068039),new u(148,246.068798807),new u(149,247.070992043),new u(150,248.07217808),new u(151,249.074846818),new u(152,250.076399951),new u(153,251.079580056),new u(154,252.081619582),new u(155,253.085126791),new u(156,254.087316198),new u(157,255.091039),new u(158,256.09344)]),B(d(Ht,1),Vt,3,0,[new u(141,240.06892),new u(142,241.068662),new u(143,242.069699),new u(144,243.069631),new u(145,244.070969),new u(146,245.071317),new u(147,246.072965),new u(148,247.07365),new u(149,248.075458),new u(150,249.076405),new u(151,250.078654),new u(152,251.079983592),new u(153,252.082972247),new u(154,253.084817974),new u(155,254.088016026),new u(156,255.090266386),new u(157,256.093592),new u(158,257.095979)]),B(d(Ht,1),Vt,3,0,[new u(142,242.07343),new u(143,243.07451),new u(144,244.074077),new u(145,245.075375),new u(146,246.075281634),new u(147,247.076819),new u(148,248.077184411),new u(149,249.079024),new u(150,250.079514759),new u(151,251.081566467),new u(152,252.082460071),new u(153,253.085176259),new u(154,254.086847795),new u(155,255.089955466),new u(156,256.091766522),new u(157,257.095098635),new u(158,258.097069),new u(159,259.100588)]),B(d(Ht,1),Vt,3,0,[new u(144,245.081017),new u(145,246.081933),new u(146,247.081804),new u(147,248.082909),new u(148,249.083002),new u(149,250.084488),new u(150,251.084919),new u(151,252.08663),new u(152,253.08728),new u(153,254.089725),new u(154,255.091075196),new u(155,256.094052757),new u(156,257.095534643),new u(157,258.098425321),new u(158,259.100503),new u(159,260.103645)]),B(d(Ht,1),Vt,3,0,[new u(147,249.087823),new u(148,250.087493),new u(149,251.08896),new u(150,252.088965909),new u(151,253.090649),new u(152,254.090948746),new u(153,255.093232449),new u(154,256.094275879),new u(155,257.096852778),new u(156,258.0982),new u(157,259.101024),new u(158,260.102636),new u(159,261.105743),new u(160,262.10752)]),B(d(Ht,1),Vt,3,0,[new u(148,251.09436),new u(149,252.09533),new u(150,253.095258),new u(151,254.096587),new u(152,255.096769),new u(153,256.098763),new u(154,257.099606),new u(155,258.101883),new u(156,259.10299),new u(157,260.105572),new u(158,261.106941),new u(159,262.109692),new u(160,263.111394)]),B(d(Ht,1),Vt,3,0,[new u(149,253.100679),new u(150,254.100166),new u(151,255.101492),new u(152,256.101179573),new u(153,257.103072),new u(154,258.103568),new u(155,259.105628),new u(156,260.106434),new u(157,261.108752),new u(158,262.109918),new u(159,263.11254),new u(160,264.113978)]),B(d(Ht,1),Vt,3,0,[new u(150,255.107398),new u(151,256.10811),new u(152,257.107858),new u(153,258.109438),new u(154,259.109721),new u(155,260.111427),new u(156,261.112106),new u(157,262.114153),new u(158,263.115078),new u(159,264.117473),new u(160,265.118659)]),B(d(Ht,1),Vt,3,0,[new u(152,258.113151),new u(153,259.114652),new u(154,260.114435447),new u(155,261.116199),new u(156,262.116477),new u(157,263.118313),new u(158,264.118924),new u(159,265.121066),new u(160,266.121928)]),B(d(Ht,1),Vt,3,0,[new u(153,260.121803),new u(154,261.1218),new u(155,262.123009),new u(156,263.123146),new u(157,264.12473),new u(158,265.125198),new u(159,266.127009),new u(160,267.12774)]),B(d(Ht,1),Vt,3,0,[new u(155,263.12871),new u(156,264.128408258),new u(157,265.130001),new u(158,266.130042),new u(159,267.131774),new u(160,268.132156),new u(161,269.134114)]),B(d(Ht,1),Vt,3,0,[new u(156,265.136567),new u(157,266.13794),new u(158,267.137526),new u(159,268.138816),new u(160,269.139106),new u(161,270.140723),new u(162,271.141229)])]);}function C6(t,e){return e1(e,p4)?new iU(xv(t,168,1428,"%5968%UDy0ClA8tJ9QPLT6UDy08FA8tJVQPLQK%858%BQPLQdUDy0yVA8tP9QPLT/UDy0/1A8tP9QPLSW%362%D4BwYC+AYGAvgHBgE%303%D/AAAB/wAAAQ%159%FA8tC1QPLThUDy0/1A8tP9QPLT/UDy0/1A8tP9QPLTl%330%D5BgcB+AcGBPkHBhX5BwdN+QYHefgHB2/5Bwc8+AYGFfgGBgj5BgcF+AYGAvkHBgE%245%/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1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT+UDu0sFA6tiM%15%BMObMbUDy08FA8tP9QPLT/UDy0/1A8tP9QPLT/UDyz6VVAqgw%26%FUrqgZQPLTeUDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT0Uzy0Ig%20%BVRLsPUDy0zFA8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP%64%D/AAAu/wAA6/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAcQ%10%UDy0HFA8tNxQPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tO9QPLQ0%330%BON7EXUD20aVE9tLFPPLTXUD207FA8tPBQPLTeTzy0t1A8tXxQOrYj%176%SUm2B1E8tWtQO7O9Tzy051A8tPRQPLPpUDy00E88s5E%69%/wAAL/8AAOv/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAG8%10%FA8tBxQPLTdUDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy071A8tC8%682%P8AADD/AADs/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AABu%10%BQPLQdUDy03lA8tP9QPLT/UDy0/1A8tP9QPLTwUDy0Ng%692%D/AAAx/wAA7f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAb%11%UDy0HlA8tN9QPLT/UDy0/1A8tOxQPLQ3%704%/wAAMv8AAO7/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAGo%10%FA8tB9QPLSzUDy0v1A8tC0%714%P8AADP/AADu/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AABp%746%D/AAA0/wAA7/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD+/wAAZ%747%/wAANf8AAPD/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA8v8AAB%747%P8AADb/AADw/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AACU%751%D/AAA4/wAA8f8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAxQ%762%/wAAOf8AAPH/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADW/wAAFw%767%P8AADr/AADy/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AANf/AAAY%778%D/AAA7/wAA8/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA2P8AABg%789%/wAAPP8AAPP/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADZ/wAAGQ%799%P8AAD3/AAD0/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AANr/AAAa%810%D/AAA//wAA9P8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA2/8AABs%821%/wAAQP8AAOT/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAC8/wAAGw%24986%UDy0GFA8tI5QPLTHUDy0tVA8tFFQPLQB%858%BQPLQWUDy021A8tP9QPLT/UDy0/1A8tP1QPLRz%858%BQPLSFUDy0/1A8tP9QPLT/UDy0/1A8tP9QPLTzUDy0K%853%BQPLS3UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy071A8tD0%847%BQPLShUDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tPJQPLQ9%842%BQPLQ9UDy0+VA8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLTzUDy0Pg%842%UDy0aVA8tPVQPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy081A8tD4%842%FA8tIxQPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tPNQPLQ/%842%BQPLSLUDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLTzUDy0Pw%431%FA8tANQPLRvUDy0cFA8tAM%229%UDy0D1A8tH9QPLRY%144%UDy0i1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy09FA8tE%422%UDy0BFA8tK1QPLT/UDy0/1A8tLBQ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zaFA8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9RO7No%20656%")):e1(e,nE)?new iU(xv(t,84,252,"%2549%P8AAO7/AAD/%432%/wAA3P8AAP//AAD//wAA/w%420%D/AACt/wAA//8AAP//AAD//wAA//8AAP8%163%D/%250%D/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/%158%D/%4%/w%239%P8AAPz/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/w%152%D/%4%/wAAAP8%229%/wAA6/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8%147%D/%4%/wAAAP8AAAD/%218%D/AAC9/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/%142%D/%4%/wAAAP8AAAD/%4%/w%207%P8AAI//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/w%136%D/%4%/wAAAP8AAAD/%4%/wAAAP8%202%P8AAPz/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8%131%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%192%/wAA7P8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/%126%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/w%180%D/AADN/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/w%120%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8%170%P8AAJ7/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8%115%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%165%P8AAP7/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/%110%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/w%154%/wAA7v8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/w%104%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8%143%D/AADc/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8%99%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%133%P8AAK3/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/%94%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/w%127%P8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/w%88%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%128%/wAA/P8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP8%83%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8%127%D/AADr/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/%78%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/w%127%P8AAL3/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/w%72%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%133%P8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA6w%72%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8%133%/wAA/P8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP7/AACt%78%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/w%132%D/AADs/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA3%89%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%133%P8AAM3/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAPw%99%D/%4%/wAAAP8AAAD/%4%/wAAAP8%138%P8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA3%105%D/%4%/wAAAP8AAAD/%4%/w%138%/wAA/v8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAPs%115%D/%4%/wAAAP8AAAD/%138%D/AADu/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAzQ%120%D/%4%/wAAAP8%138%P8AANz/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAPs%131%D/%4%/w%138%/wAArf8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAvg%136%D/%144%/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAO4%287%D/AAD8/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAAvQ%287%P8AAOv/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAOs%293%/wAAvf8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD+%304%/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAOs%303%D/AAD8/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD8%309%P8AAOz/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AANw%309%/wAAzf8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD7%320%/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAM0%319%D/AAD+/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD7%325%P8AAO7/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAL4%325%/wAA3P8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADu%336%/wAA//8AAP//AAD//wAA//8AAP//AAD/UDy0/1A8tP9QPLT/UDy0/1A8tP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAL0%335%D/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/UDy0/1A8tP9QPLT/UDy0/1A8tP//AAD//wAA//8AAP//AAD//wAA//8AAP//AADr%341%P8AAPz/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/UDy0/1A8tP9QPLT/UDy0/1A8tP//AAD//wAA//8AAP//AAD//wAA/g%346%/wAA6/8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/UDy0/1A8tP9QPLT/UDy0/1A8tP//AAD//wAA//8AAP//AADr%352%/wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/UDy0/1A8tP9QPLT/UDy0/1A8tP//AAD//wAA/%357%D/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/UDy0/1A8tP9QPLT/UDy0/1A8tP//AADc%357%P8AAPz/AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/UDy0/1A8tP9QPLT/UDy0/1A8tP8%325%UDy0/1A8tP9QPLT/UDy0/1A8tP9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/%4%/wAAAP8AAAD/%221%P//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%142%D/%4%/wAAAP8AAAD/%4%/w%210%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%136%D/%4%/wAAAP8AAAD/%4%/wAAAP8%205%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%131%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%194%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%126%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/w%183%P//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%120%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8%173%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%115%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%168%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%110%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/w%156%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%104%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8%146%P//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%99%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%136%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%94%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/w%130%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%88%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%130%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%83%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8%130%P//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%78%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/w%130%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%72%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%136%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%72%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/wAAAP8%135%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%78%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%4%/w%135%P//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%88%D/%4%/wAAAP8AAAD/%4%/wAAAP8AAAD/%136%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%99%D/%4%/wAAAP8AAAD/%4%/wAAAP8%141%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%104%D/%4%/wAAAP8AAAD/%4%/w%140%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%115%D/%4%/wAAAP8AAAD/%141%P//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%120%D/%4%/wAAAP8%141%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%131%D/%4%/w%140%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%136%D/%146%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%290%P//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%290%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%295%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%306%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%306%P//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%312%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%311%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%322%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%322%P//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%328%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%327%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%338%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8%338%P//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%344%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%348%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%354%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%359%P//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%360%//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%364%D//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%48%UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/w%63%FA8tP9QPLT/UDy0/1A8tP9QPLT/%21%FA8tP9QPLT/UDy0/w%151%P//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//w%42%UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/%53%FA8tP9QPLT/UDy0/1A8tP9QPLT/%10%BQPLT/UDy0/1A8tP9QPLT/UDy0/w%151%P//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//%42%BQPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/w%47%FA8tP9QPLT/UDy0/1A8tP9QPLT/%5%FA8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/w%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37%FA8tP9QPLT/UDy0/1A8tP9QPLT/%293%FA8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP8%42%FA8tP9QPLT/UDy0/1A8tP9QPLT/%298%BQPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/w%47%FA8tP9QPLT/UDy0/1A8tP9QPLT/%304%UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/%53%FA8tP9QPLT/UDy0/1A8tP9QPLT/%320%UDy0/1A8tP9QPLT/UDy0/1A8tP9QPLT/UDy0/w%3754%")):null;}var ly="object",nn=`
`,m2="boolean",s9="number",Mf="string",Et=2147483647,b2='For input string: "',y9="null",c0={4:1,9:1,5:1,8:1},oM="__noinit__",A0={4:1,5:1,8:1},Tn={4:1,19:1,33:1,27:1},Dt={4:1,9:1,14:1,5:1,11:1,8:1,13:1},o0=65536,d1=65535,fP=1e4,to="fromIndex: ",UM=" > toIndex: ",H6=", toIndex: ",LM=", length: ",V6="Index: ",E6=", Size: ",Tt={15:1,4:1,5:1},Cf={4:1},m={7:1,4:1,5:1},yi=16777215,DP=65280,Hf=.30000001192092896,l9=545460846592,w8=4294967296,h9=8589934592,T9=17179869184,c9=34359738368,w9=68719476736,g9=137438953472,Vf=274877906944,it={12:1,4:1,5:1},Pe=536870912,je=8192,S6=2.617993878,I6=3.665191429,m0=6.283185307179586,l1=3.141592653589793,HA=1.5707963267948966,Gn=16384,hy=-8355712,S0=4096,eo={l:0,m:0,h:1},Ao={l:0,m:0,h:2},no={l:0,m:0,h:4},uP=1920,Qe=1024,yr=234881024,Po=167772160,Ef=100663296,Sf=201326592,li=114688,hi=4063232,ro=3801088,j2=3538944,R2=3014656,io=3145728,KA=2097152,Ti=393216,NP=917504,If=1966080,xf=0xf8000000000,Ty=0xf0000000000,cy=0xe8000000000,wy=0xd8000000000,gy=0xb8000000000,x6=0xe0000000000,N6=0xc0000000000,fo=8796093022208,p2=549755813888,dy=1649267441664,By=3848290697216,Do=8246337208320,G6=0xc8000000000,O6=9345848836096,q6=0x98000000000,lr=29360128,M2={l:0,m:0,h:120},d9=268435456,O1=2048,g8=32768,uo=-1.5707963267948966,d8=130560,Qo=6291456,z6=-2.0943951023931953,fA=1.0471975511965976,C2=.5235987755982988,b1=786432,B8=524288,v8=262144,On=-16777216,GP=-65536,QP=16711680,vy=-32768,K6='<DrawingObject type="',J6="></DrawingObject>",t1={4:1,5:1,16:1},re={4:1,5:1},Y6="unsupported atomicNo:",sM=2.8415926535897933,u0={29:1,4:1,9:1,5:1,8:1},H2={4:1,5:1,11:1,8:1},I={10:1,4:1,5:1},DA={4:1,9:1,5:1,8:1,30:1},q0=131072,Fy=196608,ky={l:6,m:0,h:4},F8=1048576,k8=3221225472,X6={l:0,m:0,h:3},Nf=8388608,my={35:1,41:1,37:1},_e={4:1,9:1,5:1,11:1,8:1},Z6={35:1,41:1,74:1,37:1,70:1},by={4:1,5:1,35:1,41:1,74:1,20:1,37:1,70:1,125:1},Ge=17976931348623157e292,W6=-17976931348623157e292,B9={89:1,77:1,78:1,4:1,9:1,5:1,8:1},t0="??",m8={58:1,4:1,9:1,5:1,8:1},b8=2013265920,VA=32505856,cn=31744,jy=122880,V2={127:1,4:1,9:1,5:1,11:1,8:1},oo=33554432,wn=67108864,Ry=-131073,py=-33554433,My=-33292289,_6=-3.141592653589793,z0=4194303,gn=3072,uA={46:1,4:1,5:1},$6=.7853981633974483,yM=3.061592653589793,dn=1073741824,lM=541165879296,Vt={17:1,4:1,5:1,8:1},Cy=281.17,Hy=289.19,Vy=294.21,Ey="0.0000",Sy="NOSEARCH_OCL_CUSTOM_LABEL",hr="M  END",f1=-2147483648,E2="ATOMS",Uo="$$$$",Lo="M  V30 ",hM="M  V30 COUNTS ",TM="M  V30 MDLV30/STEREL",cM="M  V30 MDLV30/STERAC",a6="M  V30 END CTAB",wM=34028234663852886e22,t4={l:2,m:0,h:4},oP=4194304,e4={l:4179966,m:4063288,h:7},gM={l:4194302,m:4193343,h:127},I0='" ',A4='stroke="',n4='stroke-width="',Iy='" />',dM='class="event" ',BM='opacity="0" />',vM="' position:",FM="'. Position:",kM=1099511627776,mM=2199023255552,bM=4398046511104,P4="', position:",jM="Assignment of aromatic double bonds failed",so=2147483646,RM={102:1,4:1},r4="Members of ESR groups must only be stereo centers with known configuration.",i4="Over- or under-specified stereo feature or more than one racemic type bond",f4="Ambiguous configuration at stereo center because of 2 parallel bonds",pM={114:1,90:1,26:1,4:1},xy=1e5,yo=1.399999976158142,S2=3.1415927410125732,D4=1.5707963705062866,MM=.029999999329447746,CM=6.2831854820251465,HM=1.9106119871139526,VM=2.2639999389648438,u4=2.16759991645813,EM=2.0662999153137207,SM=2.3561999797821045,IM=2.2844998836517334,xM=1.9106120066311025,NM=2.094395160675049,lo=.6000000238418579,Ny=1.7999999523162842,Q4=.05000000074505806,ie={4:1,9:1,5:1,8:1,38:1},Gy=.2617993950843811,I2=2.0943951023931953,ho=1.2000000476837158,o4=1.4299999475479126,Oy=1.659999966621399,U4=1.4600000381469727,L4=1.899999976158142,GM=1.8200000524520874,OM=2.4600000381469727,qM=2.4200000762939453,qy=2.450000047683716,s4=2.440000057220459,zM=2.4000000953674316,y4=2.319999933242798,l4=2.2899999618530273,KM=1.8600000143051147,JM=2.5299999713897705,YM=2.490000009536743,XM=2.4700000286102295,ZM=2.880000114440918,WM=2.9200000762939453,_M=2.869999885559082,h4=2.8299999237060547,$M=2.7899999618530273,aM=2.809999942779541,tC=2.799999952316284,eC=3.049999952316284,T4=.3199999928474426,AC=1.3300000429153442,To=.8500000238418579,nC=1.600000023841858,PC=1.3899999856948853,c4=1.159999966621399,rC=1.1100000143051147,iC=1.0700000524520874,fC=1.9600000381469727,DC=1.7100000381469727,w4=1.3600000143051147,uC=1.340000033378601,QC=1.2200000286102295,oC=1.2400000095367432,zy=1.2100000381469727,UC=2.0999999046325684,g4=1.850000023841858,d4=1.6299999952316284,LC=1.4700000286102295,sC=1.2799999713897705,yC=1.440000057220459,lC=1.7599999904632568,hC=1.7300000190734863,TC=1.7200000286102295,Ky=1.6799999475479126,cC=1.690000057220459,wC=1.6699999570846558,B4=1.649999976158142,co=1.7000000476837158,gC=1.6200000047683716,dC=1.3700000047683716,BC=1.2899999618530273,vC=1.4500000476837158,FC=1.5700000524520874,v4=-0.5235987755982988,wo=-1.0471975511965976,kC=-0.7853981633974483,mC=.017453292519943295,bC=.17453292519943295,go=1e-4,Gf={150:1},Of=57.29577951308232,jC=.021922173386725217,Bo=1e-8,OP=2.5120960256267386,vo=1e-5,Jy="MMFF94s+",RC="nonbonded cutoff",pC="dielectric constant",MC="dielectric model",CC="angle bend",HC="bond stretch",VC="electrostatic",EC="out of plane",SC="stretch bend",IC="torsion angle",xC="van der waals",NC=.07000000000000006,GC=.1200000000000001,OC=-7.840000000000001,Yy="OCL_RXN_V1.0:",qC="$RXN V3000",zC="'$MOL' tag not found",KC="'M  END' not found",JC="M  V30 BEGIN REACTANT",YC=`
Actelion Java MolfileCreator 2.0

  0  0  0  0  0  0              0 V3000
`,XC="M  V30 BEGIN PRODUCT",ZC=2475109711874,WC=2475109711875,_C=2887426572290,$C=2887426572291,aC=2887627898882,tH=2887627898883,eH=2887627997186,AH=3437182386178,nH=3437182386179,PH=3437383712770,rH=3437383811074,iH=3437652148226,fH=3437652377602,DH=4674132967426,uH=4674334294018,QH=4674334392322,oH=4674602729474,UH=4674602958850,LH=5086449827842,sH=5086449827848,yH=5086651154434,lH=5086651252738,hH=5086651252743,TH=5086919589890,cH=5086919688194,wH=5636406968322,gH=5636407066626,dH=5636675502082,BH={l:589826,m:590112,h:4},vH={l:589827,m:590112,h:4},FH={l:589826,m:590160,h:4},kH={l:589827,m:590160,h:4},mH={l:688130,m:590160,h:4},bH={l:589826,m:590224,h:4},jH={l:589827,m:590224,h:4},RH={l:819203,m:590224,h:4},pH={l:589826,m:590368,h:4},MH={l:688130,m:590368,h:4},CH={l:819202,m:590368,h:4},HH={l:819208,m:590368,h:4},VH={l:589826,m:590416,h:4},EH={l:589832,m:590416,h:4},SH={l:688130,m:590416,h:4},IH={l:819202,m:590416,h:4},xH={l:589826,m:598304,h:4},NH={l:589827,m:598304,h:4},GH={l:688130,m:598304,h:4},OH={l:1114114,m:598304,h:4},qH={l:1212418,m:598304,h:4},zH={l:589826,m:598308,h:4},KH={l:589826,m:688416,h:4},JH={l:589826,m:688464,h:4},YH={l:589826,m:688720,h:4},XH={l:688130,m:688720,h:4},ZH={l:589826,m:590112,h:288},WH={l:589826,m:590112,h:336},_H={l:589826,m:688416,h:336},$H={l:589826,m:688464,h:336},aH={l:688130,m:688464,h:336},tV={l:589826,m:590112,h:400},eV={l:589826,m:688416,h:400},AV={l:589826,m:688464,h:400},nV={l:688130,m:688464,h:400},PV={l:589826,m:819488,h:400},rV={l:589826,m:819536,h:400},iV={l:589826,m:819600,h:400},fV={l:688130,m:819600,h:400},DV={l:819202,m:819600,h:400},uV={l:589831,m:688416,h:592},QV={l:589831,m:688464,h:592},oV={l:688135,m:688464,h:592},UV={l:589831,m:819536,h:592},LV={l:688135,m:819536,h:592},sV={l:688135,m:819600,h:592},yV={l:589832,m:1212704,h:592},lV={l:589832,m:1212752,h:592},hV={l:688136,m:1212752,h:592},TV={l:589831,m:688464,h:656},cV={l:589826,m:590112,h:8480},wV={l:589826,m:688416,h:8480},gV={l:589826,m:688464,h:8480},dV={l:688130,m:688464,h:8480},BV={l:819202,m:819600,h:8480},vV={l:688135,m:1212752,h:8480},FV={l:589832,m:1213008,h:8480},kV={l:688136,m:1213008,h:8480},mV={l:589826,m:590112,h:8484},bV={l:589826,m:590160,h:8484},jV={l:688130,m:598304,h:8484},RV=.6262000203132629,pV=-1.3825000524520874,Xy=.33169999718666077,MV=-1.4915000200271606,CV=.3540000021457672,HV=.38179999589920044,VV=-0.6019999980926514,EV=.07999999821186066,SV=-0.7379999756813049,IV="Atom-types are 64-bit numbers describing atoms and their near surrounding.",F4="Recognized atom types and their contributions are:",xV="Druglikeness predictor not properly initialized.",NV=3.009999990463257,GV=-0.17000000178813934,OV=-0.1809999942779541,qV=-0.2029999941587448,Fo=2147483648,zV="ene-Metathesis",KV="Halogenation ring closure",JV=" (rootPairSets:",Zy=-1e10,Wy={208:1,4:1,9:1,5:1,8:1,30:1},_y=-99999,j8="any",YV="is not in a ring",k4="Excluded atoms:",$y="exactly 1",ay="exactly 2",m4="less than 3",XV="less than 4",tl="at least 1",b4="at least 2",j4="at least 3",ZV="at least 4",R4="1 or 2",WV="less than 2",_V="Allowed atoms:",qf={138:1},$V="Atom Properties",el=-8346432,aV="/html/editor/editor.html",tE="Structure Editor Help",Al="Dummy look and feel",nl="Substance Graphite",Pl="Radiance Graphite",rl="Radiance Night",eE=.6499999761581421,AE=.3499999940395355,zf=.800000011920929,p4="editorButtons.png",nE="esrButtons.png",M4=-1774190527,C4=-1438646166,x2=-1433403286,il=-1431655766,fl=-1448432982,Tr=1073741866,Kf=1073741930,H4="MMFF94",V4="MMFF94s",PE="/resources/forcefield/mmff94/94s/outofplane.csv",rE="cleaveRings",Dl={152:1,4:1,5:1,8:1},ko="undefined",iE=.08726646502812703,fE="overlapping",E4=.003921568859368563,S4="anonymous",I4="Unknown",Pn=1048575,UP=17592186044416,Jf=1e9,N2=-17592186044416,FA=5.56,oe=11.12,cr=13.34,Yf=14.44,mo=.3010299956639812,DE="BigInteger divide by zero",g1=4294967295,uE={l:0,m:0,h:524288},ul={32:1,115:1},x4={107:1,111:1},G2={35:1,41:1,37:1,87:1},Ql=16777619,QE={35:1,37:1,87:1},ol=15525485,oE=5960464477539063e-23,N4=16777216,Ul={4:1,32:1,55:1,83:1},G4="Invalid UTF8 sequence",O4=.20000000298023224,UE=" distance:",LE={4:1,5:1,11:1,8:1,475:1},O2={50:1},U,bo,Ll;w.goog=w.goog||{},w.goog.global=w.goog.global||w,bo={},p(1,null,{},u1),U.mb=function(e){return zg(this,e);},U.nb=function(){return this.wd;},U.ob=function(){return jD(this);},U.pb=function(){var e;return yu(Qs(this))+"@"+(e=fr(this)>>>0,e.toString(16));},U.equals=function(t){return this.mb(t);},U.hashCode=function(){return this.ob();},U.toString=function(){return this.pb();};var sE,yE,lE;sE={4:1,315:1,32:1};var jo;p(211,1,{},jT),U.Tc=function(e){var A;return A=new jT(),A.f=4,e>1?A.c=uv(this,e-1):A.c=this,A;},U.Uc=function(){return qU(this),this.b;},U.Vc=function(){return yu(this);},U.Wc=function(){return qU(this),this.j;},U.Xc=function(){return (this.f&4)!=0;},U.Yc=function(){return (this.f&1)!=0;},U.pb=function(){return ((this.f&2)!=0?"interface ":(this.f&1)!=0?"":"class ")+(qU(this),this.n);},U.f=0,U.i=0;var b1t=1;p(121,1,{4:1,121:1});var q4;yE={4:1,32:1,316:1,121:1},p(27,1,{4:1,27:1}),U.fc=function(e){return new Error(e);},U.gc=function(){return this.backingJsObject;},U.hc=function(){var e,A,n;for(n=(this.i==null&&(this.i=c(cE,c0,27,0,0,1)),this.i),A=c(qn,A0,1,n.length,5,1),e=0;e<n.length;e++)A[e]=n[e].backingJsObject;return A;},U.ic=function(){return this.e;},U.jc=function(){return this.f;},U.kc=function(){RN(this,pO(this.fc(_B(this,this.f))));},U.pb=function(){return _B(this,this.jc());},U.backingJsObject=oM,U.j=true,p(19,27,{4:1,19:1,27:1},H1),p(33,19,Tn),p(65,33,Tn,sh,XP),p(128,33,Tn,ts),p(71,128,Tn,Rr,X7,Y7),U.fc=function(e){return new TypeError(e);},lE={4:1,210:1,32:1,2:1},p(236,65,Tn,vh),p(527,1,{}),p(458,1,{},vw);var hE=0;p(459,1,{});var qn=M(1),TE=M(0),j1t=M(315);M(211);M(121);var R1t=M(316),cE=M(27);M(19);M(33);M(65);M(128);M(71);var ft=M(2);M(236);M(458);M(459);p(204,1,Cf,sy),U.c=0,U.d=0;M(204);p(122,1,{122:1}),U.xb=function(){Jk(this);},U.yb=function(e,A,n,P){},U.zb=function(e,A,n,P,r){},U.Db=function(e,A){return cb(this,e,A);},U.r=0,U.t=0,U.u=0,U.A=0,U.C=0,U.D=0,U.F=0,U.G=0,U.H=0,U.I=0,U.J=0,U.K=false,U.M=0,U.N=0,U.O=0,U.P=0,U.Q=0,U.S=0,U.T=0,U.V=0,U.W=0,U.X=0,U.Y=0,U.Z=0;var sl,p1t=.15,M1t=.06,C1t=.6;M(122);p(144,1,{144:1},Vu),U.a=0,U.b=0,U.c=0;M(144);p(69,1,{},h1),U.a=0,U.b=0,U.c=0,U.d=0;M(69);p(197,1,{197:1}),U.Jb=function(e){var A,n;if(this.i==null)return null;for(A=new lA(this.i[0].a,this.i[0].b,0,0),n=1;n<this.i.length;n++)A.c>this.i[n].a?(A.b+=A.c-this.i[n].a,A.c=this.i[n].a):A.b<this.i[n].a-A.c&&(A.b=this.i[n].a-A.c),A.d>this.i[n].b?(A.a+=A.d-this.i[n].b,A.d=this.i[n].b):A.a<this.i[n].b-A.d&&(A.a=this.i[n].b-A.d);return A;},U.Nb=function(e){pF(this,e);},U.pb=function(){var e;return e=new gD(),Ni(e,K6+this.Lb()+'"'+this.Kb()+J6),e.a;},U.Ob=function(e,A){bk(this,e,A);},U.Pb=function(e,A){$m(this,e,A);},U.Qb=function(e,A){nj(this,e,A);},U.g=false,U.j=false,U.k=0,U.n=0;M(197);p(91,1,{},p9),U.a=false,U.b=0,U.c=0,U.k=0;M(91);var Ro,z4;p(34,1,{},bA,qA),U.b=false,U.c=0,U.d=false,U.r=false,U.t=0,U.v=0,U.w=0,U.G=false,U.I=0,U.K=false,U.L=false,U.O=0,U.Q=0,U.T=0,U.U=0,U.Z=false,U.jb=false;M(34);p(273,1,{},s1),U.Rb=function(e,A){return Uj(e,A);},U.mb=function(e){return this===e;};M(273);p(176,1,{176:1},r0),U.b=0,U.c=0,U.d=0;var H1t=M(176);p(274,1,{},K0),U.Rb=function(e,A){return KB(e,A);},U.mb=function(e){return this===e;};M(274);p(177,1,{177:1},x0),U.a=0,U.b=0,U.c=0;var V1t=M(177);p(101,1,{101:1,32:1},xU),U.Sb=function(e){return gs(this,e);},U.a=0,U.b=0,U.c=0;var K4=M(101);p(175,1,{175:1,32:1},oF),U.Sb=function(e){return NF(this,e);},U.a=0,U.b=0,U.c=0;var E1t=M(175);p(212,1,{212:1},Gk);M(212);p(272,1,{},dm);M(272);p(373,1,{},Zp),U.a=0,U.b=0,U.f=0,U.g=0,U.i=0;M(373);p(374,1,{},qe),U.Rb=function(e,A){return m5(e,A);},U.mb=function(e){return this===e;};M(374);p(28,1,{28:1,4:1,32:1},N0,Ke,pu),U.Sb=function(e){return mK(this,e);},U.mb=function(e){return hs(this,e);},U.pb=function(){var e;return e=new sD("0.00"),"["+Bu(e,this.a)+", "+Bu(e,this.b)+", "+Bu(e,this.c)+"]";},U.a=0,U.b=0,U.c=0;var q2=M(28);p(82,1,{},Qu,P3,ry),U.pb=function(){return "DepictorTransformation Offset: "+this.a+","+this.b+" Scaling: "+this.c;},U.a=0,U.b=0,U.c=0;M(82);p(41,1,my),U.Ub=function(){return new x8(this);},U.Vb=function(){return new dh(this.Ub());},U.add=function(e){throw At(new cD("Add not supported on this collection"));},U.addAll=function(e){return cT(this,e);},U.clear=function(){var e;for(e=this.Tb();e.cd();)e.dd(),e.ed();},U.contains=function(e){return sm(this,e,false);},U.containsAll=function(e){return oQ(this,e);},U.isEmpty=function(){return this.size()==0;},U.remove=function(e){return sm(this,e,true);},U.removeAll=function(e){return Ds(this,e);},U.retainAll=function(e){return Ok(this,e);},U.toArray=function(){return this.Wb(c(qn,A0,1,this.size(),5,1));},U.Wb=function(e){return JT(this,e);},U.pb=function(){return Rb(this);};M(41);p(74,41,Z6),U.Ub=function(){return new x8(this);},U.addAtIndex=function(e,A){throw At(new cD("Add not supported on this list"));},U.add=function(e){return this.addAtIndex(this.size(),e),true;},U.addAllAtIndex=function(e,A){var n,P,r;for(y1(A),n=false,r=A.Tb();r.cd();)P=r.dd(),this.addAtIndex(e++,P),n=true;return n;},U.clear=function(){this.Yb(0,this.size());},U.mb=function(e){var A,n,P,r,i;if(e===this)return  true;if(!Yt(e,70)||(i=e,this.size()!=i.size()))return  false;for(r=i.Tb(),n=this.Tb();n.cd();)if(A=n.dd(),P=r.dd(),!(z1(A)===z1(P)||A!=null&&SP(A,P)))return  false;return  true;},U.ob=function(){return cz(this);},U.indexOf=function(e){return Pk(this,e);},U.Tb=function(){return new rh(this);},U.lastIndexOf=function(e){var A;for(A=this.size()-1;A>-1;--A)if($8(e,this.getAtIndex(A)))return A;return  -1;},U.Xb=function(e){return new J3(this,e);},U.removeAtIndex=function(e){throw At(new cD("Remove not supported on this list"));},U.Yb=function(e,A){var n,P;for(P=this.Xb(e),n=e;n<A;++n)P.dd(),P.ed();},U.setAtIndex=function(e,A){throw At(new cD("Set not supported on this list"));},U.subList=function(e,A){return new JD(this,e,A);};M(74);p(20,74,by,n1,pL,Wu),U.addAtIndex=function(e,A){f8(this,e,A);},U.add=function(e){return Ft(this,e);},U.addAllAtIndex=function(e,A){return Kk(this,e,A);},U.addAll=function(e){return MP(this,e);},U.clear=function(){this.a.length=0;},U.contains=function(e){return $r(this,e,0)!=-1;},U.getAtIndex=function(e){return G(this,e);},U.indexOf=function(e){return $r(this,e,0);},U.isEmpty=function(){return this.a.length==0;},U.Tb=function(){return new Zt(this);},U.lastIndexOf=function(e){return Vd(this,e);},U.removeAtIndex=function(e){return cA(this,e);},U.remove=function(e){return er(this,e);},U.Yb=function(e,A){gv(this,e,A);},U.setAtIndex=function(e,A){return Zr(this,e,A);},U.size=function(){return this.a.length;},U.toArray=function(){return U3(this.a);},U.Wb=function(e){return Qf(this,e);};var J4=M(20);p(103,20,by,QU,Ts,Ib),U.pb=function(){return Tm(this);};M(103);p(109,1,{109:1},Zi),U.a=0,U.b=0,U.c=0,U.d=0;M(109);p(117,1,{},Ff),U.a=0,U.b=0,U.c=false,U.d=0,U.f=false,U.g=0,U.i=false,U.j=0;M(117);p(18,1,{18:1},It),U.pb=function(){return this.d;},U.a=0,U.c=0;var wE=M(18);p(161,1,{},HF,zj,Qv,kB),U.c=0,U.d=0,U.f=0,U.i=0,U.j=0,U.n=0,U.o=false;M(161);p(371,1,{},S8),U.Rb=function(e,A){return y1(e),e>(y1(A),A)?-1:(y1(e),e<(y1(A),A)?1:0);},U.mb=function(e){return this===e;};M(371);p(90,1,{90:1,4:1},i3),U.Zb=function(e){gL(this,e);},U.$b=function(e){return this.I[e]==8;},U.r=0,U.s=0,U.J=0,U.L=false,U.M=false,U.N=0,U.O=0,U.P=0,U.T=false,U.U=0,U.V=0,U.W=0;var gE,a0,v9,Y4,dE,wr,Bn=24;M(90);p(114,90,{114:1,90:1,4:1}),U._b=function(e){Fp(this,e);},U.$b=function(e){return Z8(this,e);},U.f=0,U.g=0,U.i=0;M(114);p(340,1,{},JP),U.ac=function(){return  false;},U.bc=function(e){throw At(new H1("Unexpected request to invent coordinates. Check source code logic!"));},U.d=0,U.e=0,U.f=0,U.i=false;M(340);p(52,340,{},WA),U.ac=function(){return this.b;},U.bc=function(e){var A;A=new a8(this.a),A.g=new $i(78187493520),U9(A,e);},U.a=2,U.b=false;M(52);p(112,1,{},tg,dD),U.j=0;M(112);p(3,1,{3:1},u),U.a=0,U.b=0;var Ht=M(3),yl;p(245,1,{245:1,32:1},Md),U.Sb=function(e){return eY(this,e);};M(245);p(155,1,{155:1}),U.mb=function(e){var A;if(e===this)return  true;if(!Yt(e,155))return  false;for(A=0;A<this.b.length;A++)if(this.b[A]!=e.b[A])return  false;return  true;},U.a=0,U.d=0;var X4,z2,Z4;M(155);p(113,1,{},zh,j6);M(113);p(126,1,{},Du,o7),U.a=false,U.d=false,U.e=false,U.g=false,U.i=0,U.k=false;M(126);p(230,1,{230:1},tu),U.a=0,U.b=false;M(230);p(151,1,{},M7,Qd),U.c=1;M(151);var W4,ll=null;p(411,1,{},rM),U.pb=function(){return "";};var _4,$4;M(411);p(153,1,{},gU),U.g=0;M(153);p(59,1,{},Gr,VD),U.c=0,U.d=0,U.p=0,U.q=0,U.r=false,U.w=0,U.A=0,U.L=false,U.N=0,U.P=false;M(59);p(220,1,{220:1},eU),U.a=0,U.b=0,U.c=0,U.d=0;M(220);p(182,1,{},MU);var F9,K2;M(182);p(264,122,{122:1},vb),U.qb=function(e){var A;A='<line x1="'+Te(He(iA(new xe(e.a),(Qr(),ce))))+I0+'y1="'+Te(He(iA(new xe(e.c),ce)))+I0+'x2="'+Te(He(iA(new xe(e.b),ce)))+I0+'y2="'+Te(He(iA(new xe(e.d),ce)))+I0+A4+this.d+I0+n4+this.j+Iy,J9(this,A);},U.rb=function(e){var A,n;A=Te(He(iA(new xe(3*this.j),(Qr(),ce)))),n='<line stroke-dasharray="'+A+","+A+I0+'x1="'+Te(He(iA(new xe(e.a),ce)))+I0+'y1="'+Te(He(iA(new xe(e.c),ce)))+I0+'x2="'+Te(He(iA(new xe(e.b),ce)))+I0+'y2="'+Te(He(iA(new xe(e.d),ce)))+I0+A4+this.d+I0+"stroke-width:"+this.j+Iy,J9(this,n);},U.sb=function(e){var A,n;for(n=new bn('<polygon points="'),A=0;A<e.a;A++)rd(n,E1(w.Math.round(e.b[A]))),n.a+=",",rd(n,E1(w.Math.round(e.c[A]))),n.a+=" ";q(n,'" fill="'+this.d+I0+A4+this.d+I0+n4+this.j+Iy),J9(this,n.a);},U.tb=function(e,A,n){var P,r,i,f;i=(P=(f=Hb(this.e,e),new w3(f)).b,P),r='<text x="'+Te(He(iA(new xe(A-i/2),(Qr(),ce))))+I0+'y="'+Te(He(iA(new xe(n+this.k/3),ce)))+I0+'stroke="none" font-size="'+this.e.b+I0+'fill="'+df(this.d)+'">'+df(e)+"</text>",J9(this,r);},U.ub=function(e,A,n){var P;P='<circle cx="'+Te(He(iA(new xe(e+n/2),(Qr(),ce))))+I0+'cy="'+Te(He(iA(new xe(A+n/2),ce)))+I0+'r="'+Te(He(iA(new xe(n/2),ce)))+I0+'fill="'+this.d+Iy,J9(this,P);},U.vb=function(e){var A;return (A=Hb(this.e,e),new w3(A)).b;},U.wb=function(){return this.k;},U.yb=function(e,A,n,P){var r,i;r=M1(this.L,e),i='<circle id="'+df(this.g!=null?this.g:"mol"+J2)+":Atom:"+e+I0+dM+(r==0?"":'data-atom-map-no="'+r+I0)+'cx="'+Te(He(iA(new xe(n),(Qr(),ce))))+I0+'cy="'+Te(He(iA(new xe(P),ce)))+I0+'r="8'+I0+BM,Ft(this.a,i);},U.zb=function(e,A,n,P,r){var i;i='<line id="'+df(this.g!=null?this.g:"mol"+J2)+":Bond:"+e+I0+dM+'x1="'+Te(He(iA(new xe(A),(Qr(),ce))))+I0+'y1="'+Te(He(iA(new xe(n),ce)))+I0+'x2="'+Te(He(iA(new xe(P),ce)))+I0+'y2="'+Te(He(iA(new xe(r),ce)))+I0+n4+8+I0+BM,Ft(this.b,i);},U.Ab=function(e){this.j=$9(E1(w.Math.round(100*w.Math.max(e,1))))/100;},U.Bb=function(e){this.d="rgb("+((e&QP)>>16)+","+((e&DP)>>8)+","+(e&255)+")";},U.Cb=function(e){this.k!=e&&(this.k=e,this.e=new h3(e));},U.Db=function(e,A){return this.n=Ot(E1(w.Math.round(e.b))),this.f=Ot(E1(w.Math.round(e.a))),cb(this,e,A);},U.pb=function(){return pp(this);},U.f=0,U.i=false,U.j=0,U.k=0,U.n=0;var J2=0;M(264);p(186,1,{186:1},K3),U.a=0,U.b=0,U.e=false,U.f=false,U.g=0;M(186);p(291,1,{},Ck),U.a=0,U.c=0,U.d=0,U.e=0,U.g=0,U.i=false,U.j=false,U.k=0,U.o=0,U.p=false,U.r=false;M(291);p(384,1,{},U7),U.a=0,U.b=0,U.c=false,U.d=false;M(384);p(385,1,{},aw),U.pb=function(){return "{"+this.c+"-"+this.b+"}";},U.a=false,U.b=0,U.c=0,U.d=0;M(385);p(132,1,{},p7,dQ),U.b=0,U.c=0,U.d=0,U.e=false,U.i=false,U.j=0,U.n=0,U.o=false,U.p=false,U.q=0;M(132);p(221,1,{221:1,32:1},eg),U.Sb=function(e){return Zh(e.b,this.b);},U.a=0,U.b=0;M(221);p(222,1,{222:1},Ab),U.a=0,U.b=0,U.c=false,U.d=false;M(222);p(184,1,{184:1},f3),U.pb=function(){return "["+(this.a==so?"h":this.a==Et?"lp":Vi(this.c.f.k,this.a))+this.b+"]";},U.a=0,U.b=0;M(184);p(102,1,RM,ou),U.cc=function(e){return T5(this,e);};var S1t=M(102);p(26,114,pM,_A,SA,Wr),U.Zb=function(e){EU(this,e);},U._b=function(e){ut(this,e);},U.c=false;var gr=M(26);p(246,1,{},k5),U.j=0;var I1t=xy;M(246);p(170,1,{170:1,32:1},ls),U.Sb=function(e){return ms(this.a,e.a);};M(170);p(95,197,{197:1,95:1},dU,uR),U.Eb=function(e,A){return this.a=!!this.b&&W9(this.b,e,A),this.a;},U.Fb=function(){this.a=false;},U.Gb=function(){var e;return e=new dU(),Ad(e,this.e,this.c,this.d),ld(e,this.i[0].a,this.i[0].b),e.g=this.g,e;},U.Hb=function(e,A){return !!this.b&&W9(this.b,e,A);},U.Ib=function(e,A){var n,P,r,i;for(P=A?A.c*this.c:this.c,oL(e,Bt(w.Math.round(P)),(this.d&1)!=0,(this.d&2)!=0),nA(e,this.g?GP:(i=e.Lc(),i.isDarkBackground()?-1:On)),r=$T(this),this.b=u5(this,e,r),A&&Yu(A,this.b),n=0;n<r.a.length;n++)C3(e,this.b.c,this.b.d+1+P*5/6+P*yo*n,(ee(n,r.a.length),r.a[n]));},U.Jb=function(e){var A;return A=$T(this),u5(this,e,A);},U.Kb=function(){var e;return e=new C0(),q(e,' text="'+mZ(this.e)+'"'),q(e,' x="'+this.i[0].a+'"'),q(e,' y="'+this.i[0].b+'"'),this.c!=9&&q(e,' size="'+He(new mB(this.c,new hB()))+'"'),this.d!=0&&q(e,' style="'+this.d+'"'),e.a;},U.Lb=function(){return "text";},U.Mb=function(e){var A,n;A=(n=$T(this),u5(this,e,n)),nA(e,KD(e)),q3(e,A.c,A.d,A.b,A.a);},U.Nb=function(e){pF(this,e),this.c*=e;},U.Pb=function(e,A){$m(this,e,A),this.c=this.f*e;},U.Qb=function(e,A){nj(this,e,A),this.f=this.c;},U.a=false,U.c=0,U.d=0,U.f=0;M(95);p(290,102,RM,qB),U.cc=function(e){var A;return A=T5(this,e),A==-1?-1:G(this.a,A).a;};M(290);p(267,1,{},$w);M(267);p(388,1,{},PM);M(388);p(387,1,{},rp);var BE,po,a4,tc,Mo,ec=false;M(387);p(67,1,{67:1,32:1},BD),U.Sb=function(e){return KF(this,e),Ym(this.q,e.q);},U.n=0;M(67);p(376,1,{},Yg),U.a=0,U.b=0;var hl,LP;M(376);p(261,1,{261:1,32:1},lg),U.Sb=function(e){return Ym(this,e);},U.pb=function(){var e,A;for(A=new C0(),e=0;e<this.b.length;e++)A.a+=e==0?"Torsions: ":", ",q(A,(A9(),Q9(this.b[e],3)+"("+Bt(w.Math.round(this.a[e]+.5))+")"));return A.a;};M(261);p(259,1,{},ov,fv);var vE,Tl;M(259);p(255,1,{},YT),U.a=0;var FE;M(255);p(198,1,{198:1},t7,tp),U.e=0;M(198);p(256,1,{},b6);M(256);var Xf,JA,Ac=0,nc=0,Pc=0,rc=0,ic=0,Co=0,fc=0,Dc=0,uc=0,Qc=0,Ho=0;p(76,1,{},a8),U.a=false,U.e=0;var Vo;M(76);p(336,20,by,v7),U.add=function(e){return CP(this,e);};M(336);p(338,1,{},Au),U.Rb=function(e,A){var n;return JO((n=e,n));},U.mb=function(e){return this===e;};M(338);p(339,1,{},nu),U.Rb=function(e,A){var n;return YO((n=e,n));},U.mb=function(e){return this===e;};M(339);p(337,1,{},Pu),U.Rb=function(e,A){var n,P;return n=w.Math.abs(e.b),P=w.Math.abs(A.b),n<P?-1:n>P?1:0;},U.mb=function(e){return this===e;};M(337);p(106,1,{106:1},Mj,OQ);var kE=M(106);p(43,1,{43:1},$P,rQ),U.a=0,U.b=0;var ci=M(43);p(252,1,{},Z3);M(252);p(201,1,{201:1},D3),U.a=0,U.b=0;M(201);p(372,20,by,ub);var mE;M(372);p(48,1,{48:1},VP,f6),U.c=0,U.i=false;var oc=M(48);p(251,1,{251:1},Gg),U.a=0,U.c=false;M(251);p(282,1,{}),U.d=0,U.f=false,U.j=0,U.k=0;M(282);p(366,1,Gf,Qm),U.dc=function(e,A,n,P){var r,i,f;return P&&(X(this.f,this.a)==1||X(this.f,this.c)==1)?0:(f=Jm(new k0(e,this.b,this.a),new k0(e,this.b,this.c)),r=f*Of-this.g,i=this.d?143.9325*this.e*(1+w.Math.cos(f)):jC*this.e*r*r*(1+-6981317e-9*r),i);},U.ec=function(e,A){var n,P,r,i,f,D,Q,o,L,s;Q=xn(new k0(e,this.b,this.a)),o=xn(new k0(e,this.b,this.c)),f=pn(new k0(e,this.b,this.a)),D=pn(new k0(e,this.b,this.c)),P=(Q.a*o.a+Q.b*o.b+Q.c*o.c)/(w.Math.sqrt(Q.a*Q.a+Q.b*Q.b+Q.c*Q.c)*w.Math.sqrt(o.a*o.a+o.b*o.b+o.c*o.c)),s=1-P*P,L=Bo,s>0&&(L=w.Math.sqrt(s)),n=Of*w.Math.acos(P)-this.g,i=OP*this.e*n*(1+-0.0104719755*n),this.d&&(i=-143.9325*this.e*L),r=B(d(Ut,1),Tt,6,15,[1/f*(o.a-P*Q.a),1/f*(o.b-P*Q.b),1/f*(o.c-P*Q.c),1/D*(Q.a-P*o.a),1/D*(Q.b-P*o.b),1/D*(Q.c-P*o.c)]),A[3*this.a]+=i*r[0]/-L,A[3*this.a+1]+=i*r[1]/-L,A[3*this.a+2]+=i*r[2]/-L,A[3*this.b]+=i*(-r[0]-r[3])/-L,A[3*this.b+1]+=i*(-r[1]-r[4])/-L,A[3*this.b+2]+=i*(-r[2]-r[5])/-L,A[3*this.c]+=i*r[3]/-L,A[3*this.c+1]+=i*r[4]/-L,A[3*this.c+2]+=i*r[5]/-L;},U.a=0,U.b=0,U.c=0,U.d=false,U.e=0,U.g=0;M(366);p(188,33,{188:1,4:1,19:1,33:1,27:1},N7);M(188);p(342,33,Tn,F7);M(342);p(242,1,Gf,zB),U.dc=function(e,A,n,P){var r,i,f;return P&&(X(this.d,this.a)==1||X(this.d,this.b)==1)?0:(i=uk(new Wi(e,this.a),new Wi(e,this.b)),r=(i-this.e)*(i-this.e),f=71.96625*this.c*r*(1+-2*(i-this.e)+2.3333333333333335*r),f);},U.ec=function(e,A){var n,P,r,i;if(P=uk(new Wi(e,this.a),new Wi(e,this.b)),r=P-this.e,n=143.9325*this.c*r*(1+-3*r+4.666666666666667*r*r),P>0)for(i=0;i<3;i++)A[3*this.a+i]+=n*(e[3*this.a+i]-e[3*this.b+i])/P,A[3*this.b+i]-=n*(e[3*this.a+i]-e[3*this.b+i])/P;},U.a=0,U.b=0,U.c=0,U.e=0;M(242);p(367,1,Gf,VF),U.dc=function(e,A,n,P){var r,i,f;return P&&(X(this.e,this.a)==1||X(this.e,this.b)==1)?0:(i=pn(new k0(e,this.a,this.b)),r=i+.05,this.d&&(r*=r),f=332.0716*this.c/r*(this.f==(P9(),wi)?.75:1),f);},U.ec=function(e,A){var n,P,r,i,f;for(i=pn(new k0(e,this.a,this.b)),n=i+.05,n*=this.d?n*n:n,P=-332.0716*(this.d?2:1)*this.c/n*(this.f==(P9(),wi)?.75:1),f=0;f<3;f++)r=.02,i>0&&(r=P*(e[3*this.a+f]-e[3*this.b+f])/i),A[3*this.a+f]+=r,A[3*this.b+f]-=r;},U.a=0,U.b=0,U.c=0,U.d=false;M(367);p(180,282,{},iB,y6);var cl;M(180);p(283,26,pM,zR);M(283);p(196,1,Gf,es),U.dc=function(e,A,n,P){var r,i,f,D,Q,o;return P&&(X(this.f,this.a)==1||X(this.f,this.b)==1||X(this.f,this.c)==1)?0:(D=xn(new k0(e,this.d,this.a)),Q=xn(new k0(e,this.d,this.b)),o=xn(new k0(e,this.d,this.c)),f=xn(new BP(D.b*Q.c-D.c*Q.b,D.c*Q.a-D.a*Q.c,D.a*Q.b-D.b*Q.a)),r=Of*w.Math.asin(f.a*o.a+f.b*o.b+f.c*o.c),i=jC*this.e*r*r,i);},U.ec=function(e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x,N;for(y=new k0(e,this.d,this.a),l=new k0(e,this.d,this.b),h=new k0(e,this.d,this.c),D=w.Math.sqrt(y.a*y.a+y.b*y.b+y.c*y.c),Q=w.Math.sqrt(l.a*l.a+l.b*l.b+l.c*l.c),o=w.Math.sqrt(h.a*h.a+h.b*h.b+h.c*h.c),y=xn(y),l=xn(l),h=xn(h),s=xn(fT(new BP(-y.a,-y.b,-y.c),l)),T=h.a*s.a+h.b*s.b+h.c*s.c,r=1-T*T,P=w.Math.max(r>0?w.Math.sqrt(r):0,Bo),n=Of*w.Math.asin(T),i=y.a*l.a+y.b*l.b+y.c*l.c,k=w.Math.max(1-i*i,Bo),g=w.Math.max(k>0?w.Math.sqrt(k):0,Bo),f=OP*this.e*n,v=new BP(h.b*l.c-h.c*l.b,h.c*l.a-h.a*l.c,h.a*l.b-h.b*l.a),b=new BP(y.b*h.c-y.c*h.b,y.c*h.a-y.a*h.c,y.a*h.b-y.b*h.a),j=new BP(l.b*y.c-l.c*y.b,l.c*y.a-l.a*y.c,l.a*y.b-l.b*y.a),R=P*g,C=T/(P*k),S=B(d(Ut,1),Tt,6,15,[(v.a/R-(y.a-l.a*i)*C)/D,(v.b/R-(y.b-l.b*i)*C)/D,(v.c/R-(y.c-l.c*i)*C)/D]),x=B(d(Ut,1),Tt,6,15,[(b.a/R-(l.a-y.a*i)*C)/Q,(b.b/R-(l.b-y.b*i)*C)/Q,(b.c/R-(l.c-y.c*i)*C)/Q]),N=B(d(Ut,1),Tt,6,15,[(j.a/R-h.a*T/P)/o,(j.b/R-h.b*T/P)/o,(j.c/R-h.c*T/P)/o]),L=0;L<3;L++)A[3*this.a+L]+=f*S[L],A[3*this.d+L]+=-f*(S[L]+x[L]+N[L]),A[3*this.b+L]+=f*x[L],A[3*this.c+L]+=f*N[L];},U.a=0,U.b=0,U.c=0,U.d=0,U.e=0;M(196);p(55,1,{4:1,32:1,55:1}),U.Sb=function(e){return this.b-e.b;},U.compareTo=function(e){return this.b-e.b;},U.equals=function(e){return this===e;},U.mb=function(t){return this.equals(t);},U.hashCode=function(){return jD(this);},U.ob=function(){return this.hashCode();},U.name=function(){return this.a!=null?this.a:""+this.b;},U.ordinal=function(){return this.b;},U.toString=function(){return this.a!=null?this.a:""+this.b;},U.pb=function(){return this.toString();},U.b=0;M(55);var bE=Yr(null,DG);p(284,1,{},rR);M(284);p(108,55,{108:1,4:1,32:1,55:1},vD);var wi,Uc,Lc,sc,Y2,x1t=Yr(108,bO);p(99,1,{99:1,32:1},zi),U.Sb=function(e){return Xz(this,e);},U.mb=function(e){var A;return e===this?true:Yt(e,99)?(A=e,this.a==A.a&&this.b==A.b):false;},U.ob=function(){return this.a^this.b;},U.pb=function(){return this.a+","+this.b;},U.a=0,U.b=0;M(99);p(368,1,Gf,ob),U.dc=function(e,A,n,P){var r,i,f,D,Q;return P&&(X(this.f,this.a)==1||X(this.f,this.c)==1)?0:(r=pn(new k0(e,this.b,this.a)),i=pn(new k0(e,this.b,this.c)),Q=Jm(new k0(e,this.b,this.a),new k0(e,this.b,this.c)),D=OP*(Q*Of-this.j),f=D*(r-this.g)*this.d+D*(i-this.i)*this.e,f);},U.ec=function(e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g;L=pn(new k0(e,this.b,this.a)),s=pn(new k0(e,this.b,this.c)),l=xn(new k0(e,this.b,this.a)),h=xn(new k0(e,this.b,this.c)),P=l.a*h.a+l.b*h.b+l.c*h.c,g=1-P*P,T=w.Math.max(g>0?w.Math.sqrt(g):0,Bo),n=Of*w.Math.acos(P)-this.j,y=Of*(this.d*(L-this.g)+this.e*(s-this.i)),r=1/L*(h.a-P*l.a),i=1/L*(h.b-P*l.b),f=1/L*(h.c-P*l.c),D=1/s*(l.a-P*h.a),Q=1/s*(l.b-P*h.b),o=1/s*(l.c-P*h.c),A[3*this.a]+=OP*(l.a*this.d*n+r/-T*y),A[3*this.a+1]+=OP*(l.b*this.d*n+i/-T*y),A[3*this.a+2]+=OP*(l.c*this.d*n+f/-T*y),A[3*this.b]+=OP*((-l.a*this.d-h.a*this.e)*n+(-r-D)/-T*y),A[3*this.b+1]+=OP*((-l.b*this.d-h.b*this.e)*n+(-i-Q)/-T*y),A[3*this.b+2]+=OP*((-l.c*this.d-h.c*this.e)*n+(-f-o)/-T*y),A[3*this.c]+=OP*(h.a*this.e*n+D/-T*y),A[3*this.c+1]+=OP*(h.b*this.e*n+Q/-T*y),A[3*this.c+2]+=OP*(h.c*this.e*n+o/-T*y);},U.a=0,U.b=0,U.c=0,U.d=0,U.e=0,U.g=0,U.i=0,U.j=0;M(368);p(157,1,{157:1},Ss);M(157);p(369,1,Gf,Zk),U.dc=function(e,A,n,P){var r,i,f,D,Q,o,L,s,y,l;return Q=new k0(e,this.a,this.b),o=new k0(e,this.c,this.b),L=new k0(e,this.b,this.c),s=new k0(e,this.d,this.c),y=new BP(Q.b*o.c-Q.c*o.b,Q.c*o.a-Q.a*o.c,Q.a*o.b-Q.b*o.a),l=new BP(L.b*s.c-L.c*s.b,L.c*s.a-L.a*s.c,L.a*s.b-L.b*s.a),f=(y.a*l.a+y.b*l.b+y.c*l.c)/(w.Math.sqrt(y.a*y.a+y.b*y.b+y.c*y.c)*w.Math.sqrt(l.a*l.a+l.b*l.b+l.c*l.c)),r=2*f*f-1,i=f*(2*r-1),D=.5*(this.e*(1+f)+this.f*(1-r)+this.g*(1+i)),D;},U.ec=function(e,A){var n,P,r,i,f,D,Q,o,L,s,y;f=B(d(jE,1),A0,22,0,[new k0(e,this.b,this.a),new k0(e,this.b,this.c),new k0(e,this.c,this.b),new k0(e,this.c,this.d)]),y=B(d(jE,1),A0,22,0,[fT(f[0],f[1]),fT(f[2],f[3])]),P=B(d(Ut,1),Tt,6,15,[pn(y[0]),pn(y[1])]),!(w.Math.abs(P[0])<vo||w.Math.abs(P[1])<vo)&&(y[0]=xn(y[0]),y[1]=xn(y[1]),n=y[0].a*y[1].a+y[0].b*y[1].b+y[0].c*y[1].c,L=1-n*n,o=L>0?w.Math.sqrt(L):0,D=2*o*n,Q=3*o-4*o*L,i=.5*(-this.e*o+2*this.f*D-3*this.g*Q),s=-i*(w.Math.abs(o)<vo?1/n:1/o),r=B(d(Ut,1),Tt,6,15,[1/P[0]*(y[1].a-n*y[0].a),1/P[0]*(y[1].b-n*y[0].b),1/P[0]*(y[1].c-n*y[0].c),1/P[1]*(y[0].a-n*y[1].a),1/P[1]*(y[0].b-n*y[1].b),1/P[1]*(y[0].c-n*y[1].c)]),A[3*this.a]+=s*(r[2]*f[1].b-r[1]*f[1].c),A[3*this.a+1]+=s*(r[0]*f[1].c-r[2]*f[1].a),A[3*this.a+2]+=s*(r[1]*f[1].a-r[0]*f[1].b),A[3*this.b]+=s*(r[1]*(f[1].c-f[0].c)+r[2]*(f[0].b-f[1].b)+r[4]*-f[3].c+r[5]*f[3].b),A[3*this.b+1]+=s*(r[0]*(f[0].c-f[1].c)+r[2]*(f[1].a-f[0].a)+r[3]*f[3].c+r[5]*-f[3].a),A[3*this.b+2]+=s*(r[0]*(f[1].b-f[0].b)+r[1]*(f[0].a-f[1].a)+r[3]*-f[3].b+r[4]*f[3].a),A[3*this.c]+=s*(r[1]*f[0].c+r[2]*-f[0].b+r[4]*(f[3].c-f[2].c)+r[5]*(f[2].b-f[3].b)),A[3*this.c+1]+=s*(r[0]*-f[0].c+r[2]*f[0].a+r[3]*(f[2].c-f[3].c)+r[5]*(f[3].a-f[2].a)),A[3*this.c+2]+=s*(r[0]*f[0].b+r[1]*-f[0].a+r[3]*(f[3].b-f[2].b)+r[4]*(f[2].a-f[3].a)),A[3*this.d]+=s*(r[4]*f[2].c-r[5]*f[2].b),A[3*this.d+1]+=s*(r[5]*f[2].a-r[3]*f[2].c),A[3*this.d+2]+=s*(r[3]*f[2].b-r[4]*f[2].a));},U.a=0,U.b=0,U.c=0,U.d=0,U.e=0,U.f=0,U.g=0;M(369);p(370,1,Gf,ZR),U.dc=function(e,A,n,P){var r,i,f,D,Q,o,L,s,y,l;return P&&(X(this.g,this.a)==1||X(this.g,this.c)==1)?0:(Q=pn(new k0(e,this.a,this.c)),o=Q*Q,L=o*o*o*Q,r=1.07*this.i/(Q+NC*this.i),i=r*r,f=i*i*i*r,y=this.i*this.i,l=y*y*y*this.i,D=1.12*l/(L+GC*l)-2,s=f*D*this.j,s);},U.ec=function(e,A){var n,P,r,i,f,D,Q,o,L,s,y,l;for(r=pn(new k0(e,this.a,this.c)),f=r/this.i,D=f*f,Q=D*D*D,o=Q*f,L=o+GC,s=1.07/(f+1.07-1),y=s*s,l=y*y*y*s,n=this.j/this.i*l*(OC*Q/(L*L)+(OC/L+14)/(f+NC)),i=0;i<3;i++)P=.01*this.i,r>0&&(P=n*(e[3*this.a+i]-e[3*this.c+i])/r),A[3*this.a+i]+=P,A[3*this.c+i]-=P;},U.a=0,U.b=0,U.c=0,U.d=0,U.e=0,U.f=0,U.i=0,U.j=0;M(370);p(22,1,{22:1},BP,I3,p3,Wi,k0),U.mb=function(e){var A;return e===this?true:Yt(e,22)?(A=e,w.Math.abs(this.a-A.a)<.01&&w.Math.abs(this.b-A.b)<.01&&w.Math.abs(this.c-A.c)<.01):false;},U.ob=function(){return Bt(this.a)+Bt(this.b)+Bt(this.c);},U.a=0,U.b=0,U.c=0;var jE=M(22);p(391,1,{},AF),U.lc=function(e,A){return _n(this.b[e][A]);},U.mc=function(){return this.b.length;};M(391);p(383,1,{},Lv),U.lc=function(e,A){return this.a[e][A];},U.mc=function(){return this.a.length;};M(383);p(398,1,{},sv),U.lc=function(e,A){return _n(this.a[e][A]);},U.mc=function(){return this.a.length;};M(398);p(394,1,{},eF),U.lc=function(e,A){return _n(this.b[e][A]);},U.mc=function(){return this.b.length;};M(394);p(392,1,{},Pm);M(392);p(200,1,{},rU),U.lc=function(e,A){return _n(this.a.a[e][A]);},U.mc=function(){return this.a.a.length;};M(200);p(399,1,{},bv),U.lc=function(e,A){return _n(this.a[e][A]);},U.mc=function(){return this.a.length;};M(399);p(401,1,{},Uv);M(401);p(400,1,{},yv),U.lc=function(e,A){return _n(this.a[e][A]);},U.mc=function(){return this.a.length;};M(400);p(402,1,{},vF),U.lc=function(e,A){return _n(this.a[e][A]);},U.mc=function(){return this.a.length;};M(402);p(393,1,{},nd),U.lc=function(e,A){return _n(this.b[e][A]);},U.mc=function(){return this.b.length;};M(393);p(395,1,{},tF),U.lc=function(e,A){return _n(this.b[e][A]);},U.mc=function(){return this.b.length;};M(395);p(396,1,{},Pd),U.lc=function(e,A){return _n(this.b[e][A]);},U.mc=function(){return this.b.length;};M(396);p(51,1,{},IU,Xn,gF),U.pb=function(){return this.a+","+this.b+","+this.c;},U.a=0,U.b=0,U.c=0;M(51);p(397,1,{},Gv),U.lc=function(e,A){return _n(this.a[e][A]);},U.mc=function(){return this.a.length;};M(397);p(439,1,{});M(439);p(287,1,{},vR),U.a=null;var Zf;M(287);p(288,1,{},JR),U.a=null;var R8;M(288);p(289,439,{},uF),U.a=false,U.e=0;var RE;M(289);p(217,1,{},G7),U.b=false,U.c=false;M(217);p(285,1,{},ru),U.Rb=function(e,A){return Nq(e,A);},U.mb=function(e){return this===e;};M(285);p(218,1,{},pT);var pE,yc,Wf;M(218);p(280,1,{},nm);var gi,wl=false;M(280);p(281,1,{},$j);M(281);p(241,1,{241:1},hg),U.b=0;M(241);p(45,1,{45:1},ae),U.b=0;M(45);p(131,1,{},LD);M(131);var ME,qP;p(286,1,{});M(286);var gl,_f;p(292,1,{},lp);var CE,Eo,dr,dl=false,Br,$f;M(292);p(49,1,Cf,U8,Ks,qh,OT),U.c=false,U.d=0;M(49);p(64,197,{197:1,64:1,4:1},_D,np),U.Eb=function(e,A){return this.a=Zj(this,e,A),this.a!=0;},U.Fb=function(){this.a=0;},U.Gb=function(){var e;return e=new _D(),e.i[0].a=this.i[0].a,e.i[0].b=this.i[0].b,e.i[1].a=this.i[1].a,e.i[1].b=this.i[1].b,e.g=this.g,e;},U.Hb=function(e,A){return Zj(this,e,A)!=0;},U.Ib=function(e,A){var n,P,r,i,f,D,Q;nA(e,this.g?$s(QP,v3(e)):xB(e)),i=A?W1(A,this.i[0].a):this.i[0].a,D=A?Z1(A,this.i[0].b):this.i[0].b,f=A?W1(A,this.i[1].a):this.i[1].a,Q=A?Z1(A,this.i[1].b):this.i[1].b,n=f-i,P=Q-D,nL(e,w.Math.max(1,.019999999552965164*w.Math.sqrt(n*n+P*P))),Z9(e,i,D,f,Q),r=new WD(4),Ie(r,f+n/40,Q+P/40),Ie(r,f-n/5+P/10,Q-P/5-n/10),Ie(r,f-n/20,Q-P/20),Ie(r,f-n/5-P/10,Q-P/5+n/10),AL(e,new uD(r));},U.Jb=function(e){var A,n,P,r,i,f;return f=FT(this),i=w.Math.max(f/8,3),A=pA(this.i[0].a,this.i[0].b,this.i[1].a,this.i[1].b),P=w.Math.abs(i*w.Math.cos(A)),r=w.Math.abs(i*w.Math.sin(A)),n=new iD(),this.i[0].a<this.i[1].a?(n.c=this.i[0].a-P,n.b=this.i[1].a-this.i[0].a+2*P):(n.c=this.i[1].a-P,n.b=this.i[0].a-this.i[1].a+2*P),this.i[0].b<this.i[1].b?(n.d=this.i[0].b-r,n.a=this.i[1].b-this.i[0].b+2*r):(n.d=this.i[1].b-r,n.a=this.i[0].b-this.i[1].b+2*r),n;},U.Kb=function(){var e;return e=new C0(),q(e,' x1="'+this.i[0].a+'"'),q(e,' y1="'+this.i[0].b+'"'),q(e,' x2="'+this.i[1].a+'"'),q(e,' y2="'+this.i[1].b+'"'),e.a;},U.Lb=function(){return "arrow";},U.Mb=function(e){var A,n,P,r,i,f;switch(nA(e,KD(e)),this.a){case 1:yL(e,this.i[0].a-8,this.i[0].b-8,16);break;case 2:yL(e,this.i[1].a-8,this.i[1].b-8,16);break;case 3:i=FT(this),r=w.Math.max(i/8,3),A=pA(this.i[0].a,this.i[0].b,this.i[1].a,this.i[1].b),n=r*w.Math.cos(A),P=-r*w.Math.sin(A),f=new WD(4),Ie(f,this.i[0].a+n,this.i[0].b+P),Ie(f,this.i[1].a+n,this.i[1].b+P),Ie(f,this.i[1].a-n,this.i[1].b-P),Ie(f,this.i[0].a-n,this.i[0].b-P),AL(e,new uD(f));}},U.Ob=function(e,A){switch(this.a){case 1:this.i[0].a=this.o[0]+e-this.k,this.i[0].b=this.p[0]+A-this.n;break;case 2:this.i[1].a=this.o[1]+e-this.k,this.i[1].b=this.p[1]+A-this.n;break;default:bk(this,e,A);}},U.a=0;M(64);p(219,1,{},O7),U.a=false,U.b=false,U.i=0,U.j=0,U.q=0,U.r=false,U.t=false;M(219);p(293,1,{},ep);M(293);p(185,1,{185:1,32:1},p5),U.Sb=function(e){return Kq(this,e);},U.mb=function(e){return this.d==e.d&&this.e==e.e;},U.a=0,U.b=0,U.c=0,U.d=0,U.e=0,U.f=0,U.g=0;M(185);p(98,55,{98:1,4:1,32:1,55:1},Ei);var Bl,vl,Fl,So,kl,ml,N1t=Yr(98,jO);p(203,1,{203:1},$p),U.b=false,U.e=0;var G1t=M(203);p(149,1,{149:1,32:1},os),U.Sb=function(e){return Zz(this,e);},U.a=0,U.b=0,U.c=0,U.d=0,U.e=0;var O1t=M(149);p(307,1,{},V7),U.b=0,U.c=0;var Io,bl;M(307);p(206,1,{},BU);M(206);p(422,1,{},YR),U.b=0,U.g=0;M(422);p(205,1,{205:1},nT),U.a=0;M(205);p(124,1,{124:1,32:1},FD),U.Sb=function(e){return this.b<e.b?-1:this.b>e.b?1:this.a<e.a?-1:this.a>e.a?1:0;},U.a=0,U.b=0;M(124);p(421,1,{},Fd);M(421);p(173,1,{173:1},eh),U.b=0,U.c=0,U.d=false;var q1t=M(173);p(420,1,{},_R),U.a=0,U.c=0,U.d=0,U.e=0,U.f=0,U.g=0,U.n=0,U.o=0,U.p=false,U.q=0,U.r=0,U.s=0,U.K=0;M(420);p(418,1,{},lj);M(418);p(417,1,{},eu),U.a=0,U.b=0,U.c=0,U.q=0;M(417);p(300,1,qf,gm),U.nc=function(e){OZ(this,e);},U.a=0,U.B=false,U.C=0;var HE,VE,di;M(300);p(386,1,{},Tg),U.oc=function(){VI(this.a,this.b);};M(386);p(302,1,qf,pm),U.nc=function(e){RZ(this,e);},U.a=0,U.t=0,U.v=false;M(302);p(412,1,{},cg),U.oc=function(){EI(this.a,this.b);};M(412);p(225,1,qf,om,Bb),U.nc=function(e){WJ(this,e);},U.a=0,U.f=false,U.g=0,U.i=0,U.j=0,U.k=0;var EE;M(225);p(413,1,{},wg),U.oc=function(){SI(this.a,this.b);};M(413);p(346,1,{});M(346);p(165,346,{}),U.j=0;M(165);p(24,165,{24:1},x1),U.a=false;M(24);p(294,1,qf,pR),U.nc=function(e){var A;Yt(e,140)?Dtt((A=this,A)):Yt(e,159)?c1t(this,e):Yt(e,137)&&o1t(this,e);},U.a=false,U.b=false,U.c=0,U.d=false,U.e=0,U.f=0,U.g=false,U.q=0,U.s=0,U.t=0,U.u=0,U.w=0,U.B=0,U.C=0,U.D=0,U.F=0,U.H=0,U.J=0,U.K=0,U.N=0,U.O=false,U.T=0,U.U=0,U.W=false,U.X=0,U.Y=0,U.Z=false,U.$=0,U.ab=0,U.eb=0,U.fb=0,U.hb=0,U.ib=0,U.kb=0,U.lb=0;var xo=true;M(294);p(301,1,{},e7);M(301);p(303,1,{},A7);M(303);p(304,1,{},Kd),U.b=0;M(304);p(305,1,{},AU),U.oc=function(){};M(305);p(306,1,{},n7),U.oc=function(){NB(this.a);};M(306);p(309,1,{},Jd);M(309);p(310,1,{268:1},Yd),U.pc=function(){Xq(this.a,this.c,this.b);},U.c=0;M(310);p(311,1,{},gg),U.Rb=function(e,A){return pK(this.a,this.b,e,A);},U.mb=function(e){return this===e;};M(311);p(312,1,qf,Hj),U.nc=function(e){s6(this,e);},U.b=0,U.d=0,U.e=0,U.f=0,U.j=0,U.k=0,U.o=0;var p8=0,vn=0;M(312);p(314,1,{},dg),U.oc=function(){NI(this.a,this.b);},U.b=0;M(314);p(308,1,qf,Ev),U.nc=function(e){VX(this,e);};var SE,jl,IE;M(308);p(419,1,{},P7),U.oc=function(){ox(this.a);};M(419);p(140,165,{140:1},KU),U.a=0;M(140);var xE,NE,af,GE;p(105,122,{122:1,105:1},mu),U.qb=function(e){Z9(this.B,e.a,e.c,e.b,e.d);},U.rb=function(e){mO(this.B,e.a,e.c,e.b,e.d);},U.sb=function(e){AL(this.B,new uD(e));},U.tb=function(e,A,n){z3(this.B,A,n,e);},U.ub=function(e,A,n){yL(this.B,e,A,n);},U.vb=function(e){return aL(this.B,e).b;},U.wb=function(){return this.b;},U.xb=function(){Jk(this),this.a=1;},U.Ab=function(e){this.a=e,nL(this.B,this.a);},U.Bb=function(e){nA(this.B,e);},U.Cb=function(e){this.b=e,this.B&&oL(this.B,e,false,false);},U.a=0,U.b=0;var OE=M(105);p(226,1,{});M(226);p(159,165,{159:1},OB),U.a=false,U.b=0;M(159);p(137,165,{137:1},ST),U.pb=function(){return qE[this.j]+" x:"+this.g+" y:"+this.i+" button:"+this.b+" clicks:"+this.c+(this.f?" shift":"")+(this.d?" ctrl":"")+(this.a?" alt":"")+" isPopup:"+(this.e?"y":"n");},U.a=false,U.b=0,U.c=0,U.d=false,U.e=false,U.f=false,U.g=0,U.i=0;var qE;M(137);p(56,1,{56:1},we,Hh),U.pb=function(){return "x:"+this.a+" y:"+this.b;},U.a=0,U.b=0;var lc=M(56);p(119,1,{427:1},QF,WD),U.Hb=function(e,A){var n,P,r;for(r=false,P=this.a-1,n=0;n<this.a;n++)this.c[n]>A!=this.c[P]>A&&e<(this.b[P]-this.b[n])*(A-this.c[n])/(this.c[P]-this.c[n])+this.b[n]&&(r=!r),P=n;return r;},U.a=0;M(119);p(36,1,{36:1,427:1},iD,lA),U.Hb=function(e,A){return W9(this,e,A);},U.pb=function(){return "x:"+this.c+" y:"+this.d+" w:"+this.b+" h:"+this.a;},U.a=0,U.b=0,U.c=0,U.d=0;var Rl=M(36),Re=-1,zE,hc;p(424,1,{},cd),U.getCanMolecule=function(e){var A;return A=wa(this.a,e),new sA(A);},U.getEncodedCoordinates=function(e){return zu(this.a,e);},U.getEncodedMapping=function(){return cB(this.a);},U.getFinalRank=function(){return this.a.f;},U.getGraphAtoms=function(){return sx(this.a);},U.getGraphIndexes=function(){return yx(this.a);},U.getIDCode=function(){return Me(this.a);},U.getSymmetryRank=function(e){return zU(this.a,e);},U.getSymmetryRanks=function(){return this.a.g;},U.hasCIPParityDistinctionProblem=function(){return this.a.d;},U.invalidateCoordinates=function(){this.a.s=null;},U.normalizeEnantiomer=function(){return WR(this.a);},U.setParities=function(){l6(this.a);};M(424);p(428,1,{},Tw);var z1t=2,K1t=0,J1t=1,Y1t=4,X1t=3;M(428);p(429,1,{},gd),U.getConformerCount=function(){return this.a.p;},U.getNextConformerAsMolecule=function(e){var A,n;return A=e?e.a:null,n=CG(this.a,A),n?n==A?e:new sA(n):null;},U.getOneConformerAsMolecule=function(e){var A;return A=xG(this.a,e.a),A?e:null;},U.getPotentialConformerCount=function(){return zx(this.a);},U.rc=function(e,A,n,P){return cW(this.a,e.a,A,n,P);},U.initializeConformers=function(e,A){A===void 0&&(A={});var n=A.strategy;n===void 0&&(n=3);var P=A.maxTorsionSets;P===void 0&&(P=xy);var r=A.use60degreeSteps;return r===void 0&&(r=false),this.rc(e,n,P,r);};var Z1t=4,W1t=3,_1t=1,$1t=2;M(429);p(430,1,{},cw);M(430);p(431,1,{},Og),U.assessDruglikeness=function(e){var A;return O$(this.a,(A=e.a,A));},U.getDetail=function(){var e;return e=this.a.a,!e&&MO(),lQ(e);},U.getDruglikenessString=function(e){return uZ(e.a);};var a1t=-999;M(431);p(432,1,{},Dv),U._minimise=function(e,A,n){return Fj(this.a,e,A);},U.getTotalEnergy=function(){return lx(this.a);},U.size=function(){return this.a.b.r;};var t0t=H4,e0t=V4,A0t=Jy,KE=false,JE=false,YE=false;M(432);p(433,1,{},Wd),U.getAllCommonSubstructures=function(){var e,A,n,P,r;if(A=NY(this.a),!A)return null;for(n=c(pl,Dl,39,A.b,0,1),e=0,r=BQ(A,0);r.b!=r.d.c;)P=dL(r),n[e++]=new sA(P);return n;},U.getMCS=function(){var e;return e=Sz(this.a),e?new sA(e):null;},U.getScore=function(){return jq(this.a);},U.set=function(e,A){WK(this.a,e.a,A.a);};M(433);p(39,1,{39:1},Zd,UL,sA),U.addAtom=function(e){return i9(this.a,e);},U.addBond=function(e,A){return uL(this.a,e,A);},U.addFragment=function(e,A,n){mR(this.a,e.a,A,n);},U.sc=function(){FO(this.a);},U.tc=function(e){AM(this.a,e);},U.addImplicitHydrogens=function(e){e===void 0?this.sc():this.tc(e);},U.uc=function(){CU(),x5(this.a,1);},U.vc=function(e){x5(this.a,e);},U.addMissingChirality=function(e){e===void 0?this.uc():this.vc(e);},U.addMolecule=function(e){return CD(this.a,e.a);},U.addOrChangeAtom=function(e,A,n,P,r,i,f){return o5(this.a,e,A,n,P,r,i,f);},U.addOrChangeBond=function(e,A,n){return rj(this.a,e,A,n);},U.addRing=function(e,A,n,P,r){return wf(this.a,e,A,n,P,r);},U.addRingToAtom=function(e,A,n,P){return UR(this.a,e,A,n,P);},U.addRingToBond=function(e,A,n,P){return _Q(this.a,e,A,n,P);},U.addSubstituent=function(e,A){return as(this.a,e.a,A);},U.calculateTorsion=function(e){return JQ(this.a,e);},U.canonizeCharge=function(e){return Kp(this.a,e,false);},U.center=function(){Yz(this.a);},U.changeAtom=function(e,A,n,P,r){return mf(this.a,e,A,n,P,r);},U.changeAtomCharge=function(e,A){return RT(this.a,e,A);},U.changeBond=function(e,A){return h8(this.a,e,A);},U.clear=function(){Ri(this.a);},U.convertStereoBondsToSingleBonds=function(e){Y5(this.a,e);},U.copyAtom=function(e,A,n,P){return Nn(this.a,e.a,A,n,P);},U.copyBond=function(e,A,n,P,r,i){return yQ(this.a,e.a,A,n,P,r,i);},U.copyMolecule=function(e){Uf(this.a,e.a);},U.copyMoleculeByAtoms=function(e,A,n,P){L9(this.a,e.a,A,n,P);},U.copyMoleculeByBonds=function(e,A,n,P){return wp(this.a,e.a,A,n,P);},U.copyMoleculeProperties=function(e){EU(this.a,e.a);},U.deleteAtom=function(e){jQ(this.a,e);},U.deleteAtomOrBond=function(e,A){return xb(this.a,e,A);},U.deleteAtoms=function(e){return wK(this.a,e);},U.deleteBond=function(e){fN(this.a,e);},U.deleteBondAndSurrounding=function(e){l5(this.a,e);},U.deleteMarkedAtomsAndBonds=function(){return ui(this.a);},U.deleteMolecule=function(){Ri(this.a);},U.deleteSelectedAtoms=function(){return UQ(this.a);},U.ensureHelperArrays=function(e){ut(this.a,e);},U.findAlleneCenterAtom=function(e){return Ob(this.a,e);},U.findAlleneEndAtom=function(e,A){return tm(this.a,e,A);},U.findAtom=function(e,A){return tn(this.a,e,A);},U.findBINAPChiralityBond=function(e){return ws(this.a,e);},U.findBond=function(e,A){return kf(this.a,e,A);},U.findRingSystem=function(e,A,n,P){Oj(this.a,e,A,n,P);},U.getAbsoluteAtomParity=function(e){return Rh(this.a,e);},U.getAbsoluteBondParity=function(e){return jx(this.a,e);},U.getAllAtoms=function(){return this.a.r;},U.getAllBonds=function(){return this.a.s;},U.getAllConnAtoms=function(e){return Ct(this.a,e);},U.getAllConnAtomsPlusMetalBonds=function(e){return Le(this.a,e);},U.getAllHydrogens=function(e){return $d(this.a,e);},U.getAromaticRingCount=function(){return pq(this.a);},U.getAtomAbnormalValence=function(e){return G9(this.a,e);},U.getAtomCIPParity=function(e){return OU(this.a,e);},U.getAtomCharge=function(e){return R1(this.a,e);},U.getAtomColor=function(e){return wu(this.a,e);},U.getAtomCustomLabel=function(e){return eP(this.a,e);},U.getAtomESRGroup=function(e){return OA(this.a,e);},U.getAtomESRType=function(e){return De(this.a,e);},U.getAtomLabel=function(e){return Vi(this.a,e);},U.getAtomList=function(e){return IA(this.a,e);},U.getAtomListString=function(e){return L5(this.a,e);},U.getAtomMapNo=function(e){return M1(this.a,e);},U.getAtomMass=function(e){return ge(this.a,e);},U.getAtomParity=function(e){return v0(this.a,e);},U.getAtomPi=function(e){return e0(this.a,e);},U.getAtomPreferredStereoBond=function(e){return lF(this.a,e);},U.getAtomQueryFeaturesObject=function(e){return Ott(this.a,e);},U.getAtomRadical=function(e){return jA(this.a,e);},U.getAtomRingBondCount=function(e){return X3(this.a,e);},U.getAtomRingCount=function(e,A){return P6(this.a,e,A);},U.getAtomRingSize=function(e){return Or(this.a,e);},U.getAtomX=function(e){return mt(this.a,e);},U.getAtomY=function(e){return Rt(this.a,e);},U.getAtomZ=function(e){return oA(this.a,e);},U.getAtomicNo=function(e){return X(this.a,e);},U.getAtoms=function(){return this.a.g;},U.getAverageBondLength=function(e){return KL(this.a,e);},U.getAverageTopologicalAtomDistance=function(){return XZ(this.a);},U.getBond=function(e,A){return o1(this.a,e,A);},U.getBondAngle=function(e,A){return _0(this.a,e,A);},U.getBondAtom=function(e,A){return K(this.a,e,A);},U.getBondBridgeMaxSize=function(e){return M3(this.a,e);},U.getBondBridgeMinSize=function(e){return $h(this.a,e);},U.getBondCIPParity=function(e){return bu(this.a,e);},U.getBondESRGroup=function(e){return ef(this.a,e);},U.getBondESRType=function(e){return gP(this.a,e);},U.getBondLength=function(e){return ET(this.a,e);},U.getBondOrder=function(e){return dt(this.a,e);},U.getBondParity=function(e){return ze(this.a,e);},U.getBondPreferredStereoBond=function(e){return bY(this.a,e);},U.getBondQueryFeatures=function(e){return fe(this.a,e);},U.getBondQueryFeaturesObject=function(e){return C$(this.a,e);},U.getBondRingSize=function(e){return z9(this.a,e);},U.getBondType=function(e){return c1(this.a,e);},U.getBondTypeSimple=function(e){return cu(this.a,e);},U.getBonds=function(){return this.a.i;},U.getBounds=function(){var e;return e=vj(this.a,aE),e?RG(e.c,e.d,e.b,e.a):null;},U.getCanonizedIDCode=function(e){var A;return A=new qA(this.a,e),Me(A);},U.getCenterOfGravity=function(){var e;return e=jz(this.a),e?Wh(e.a,e.b,e.c):Wh(0,0,0);},U.getChiralText=function(){return QR(this.a);},U.getChirality=function(){return this.a.J;},U.getCompactCopy=function(){return new sA($n(this.a));},U.getConnAtom=function(e,A){return _(this.a,e,A);},U.getConnAtoms=function(e){return O(this.a,e);},U.getConnBond=function(e,A){return Nt(this.a,e,A);},U.getConnBondOrder=function(e,A){return EA(this.a,e,A);},U.getCoordinates=function(e){return Wh(mt(this.a,e),Rt(this.a,e),oA(this.a,e));},U.getDefaultMaxValenceUncharged=function(e){return Eq(this.a,e);},U.getDiastereotopicAtomIDs=function(){return eX(this.a);},U.getElectronValenceCorrection=function(e,A){return Cu(this.a,e,A);},U.getExcludedNeighbourCount=function(e){return JL(this.a,e);},U.getExplicitHydrogens=function(e){return Gh(this.a,e);},U.getFinalRanks=function(e){var A;return A=new qA(this.a,e),A.f;},U.getFisherProjectionParity=function(e,A,n,P){return W5(this.a,e,A,n,P);},U.getFragmentAtoms=function(e,A){return xm(this.a,e,A);},U.getFragmentNumbers=function(e,A,n){return Ur(this.a,e,A,n);},U.getFragments=function(){var e,A,n;for(e=Fq(this.a),n=c(pl,Dl,39,e.length,0,1),A=0;A<e.length;A++)n[A]=new sA(e[A]);return n;},U.getFreeValence=function(e){return _i(this.a,e);},U.getHandleHydrogenMap=function(){return Tu(this.a);},U.getHelperArrayStatus=function(){return this.a.U;},U.getHoseCodes=function(e){e=e||{};var A=(typeof e.maxSphereSize===ko?5:e.maxSphereSize)|0,n=(typeof e.type===ko?0:e.type)|0;return vK(this.a,A,n);},U.getIDCode=function(){var e;return e=ik(this.a),e==null&&(e=Me(new bA(this.a))),e;},U.getIDCodeAndCoordinates=function(){return {idCode:this.getIDCode(),coordinates:this.getIDCoordinates()};},U.getIDCoordinates=function(){var e;return e=yz(this.a),e==null&&(e=a7(new bA(this.a))),e;},U.getImplicitHigherValence=function(e,A){return sf(this.a,e,A);},U.getImplicitHydrogens=function(e){return xt(this.a,e);},U.getIndex=function(){return _N(this.a);},U.getLowestFreeValence=function(e){return yf(this.a,e);},U.getMaxAtoms=function(){return this.a.N;},U.getMaxBonds=function(){return this.a.O;},U.getMaxValence=function(e){return j3(this.a,e);},U.getMaxValenceUncharged=function(e){return En(this.a,e);},U.getMetalBondedConnAtoms=function(e){return qi(this.a,e);},U.getMolecularFormula=function(){return new Mg(this.a);},U.getMoleculeColor=function(){return this.a.P;},U.getMolweight=function(){return mY(this.a);},U.getName=function(){return this.a.Q;},U.getNonHydrogenNeighbourCount=function(e){return P0(this.a,e);},U.getNumberOfHydrogens=function(){return $z(this.a);},U.getOccupiedValence=function(e){return G1(this.a,e);},U.getPath=function(e,A,n,P,r){return B2(this.a,e,A,n,P,null,r);},U.getPathBonds=function(e,A,n){cm(this.a,e,A,n);},U.getPathLength=function(e,A){return C5(this.a,e,A);},U.getRingSet=function(){return new r7(kn(this.a));},U.getRotatableBondCount=function(){return nR(this.a);},U.getStereoBond=function(e){return xQ(this.a,e);},U.getStereoCenterCount=function(){return WF(this.a);},U.wc=function(){return this.a;},U.getStereoProblem=function(e){return Ud(this.a,e);},U.getSubstituent=function(e,A,n,P,r){return KQ(this.a,e,A,n,P.a,r);},U.getSubstituentSize=function(e,A){return H5(this.a,e,A);},U.getSymmetryRank=function(e){return H0(this.a,e);},U.getZNeighbour=function(e,A){return ER(this.a,e,A);},U.invalidateHelperArrays=function(e){CI(this.a,e);},U.xc=function(e,A){var n;n=new a8(e),A>=0&&Z7(n,A),U9(n,this.a),hf(this.a);},U.inventCoordinates=function(e){e=e||{};var A=0;e.skipDefaultTemplates&&(A|=1),e.keepHydrogens!==true&&(A|=2),e.keepMarkedAtomCoordinates&&(A|=4),e.preferMarkedAtomCoordinates&&(A|=8);var n=e.seed||0;this.xc(A,n);},U.is3D=function(){return rT(this.a);},U.isAlkaliMetal=function(e){return eq(this.a,e);},U.isAllylicAtom=function(e){return AN(this.a,e);},U.isAmideTypeBond=function(e){return OX(this.a,e);},U.isAromaticAtom=function(e){return mn(this.a,e);},U.isAromaticBond=function(e){return eA(this.a,e);},U.isAtomConfigurationUnknown=function(e){return E9(this.a,e);},U.isAtomMarkedForDeletion=function(e){return Hx(this.a,e);},U.isAtomParityPseudo=function(e){return xi(this.a,e);},U.isAtomStereoCenter=function(e){return O8(this.a,e);},U.isAutoMappedAtom=function(e){return Fn(this.a,e);},U.isBINAPChiralityBond=function(e){return oi(this.a,e);},U.isBondBackgroundHilited=function(e){return Jh(this.a,e);},U.isBondBridge=function(e){return Ru(this.a,e);},U.isBondForegroundHilited=function(e){return V9(this.a,e);},U.isBondMarkedForDeletion=function(e){return Nx(this.a,e);},U.isBondParityPseudo=function(e){return RU(this.a,e);},U.isBondParityUnknownOrNone=function(e){return Yh(this.a,e);},U.isChalcogene=function(e){return W3(this.a,e);},U.isDelocalizedBond=function(e){return Z8(this.a,e);},U.isEarthAlkaliMetal=function(e){return Aq(this.a,e);},U.isElectronegative=function(e){return rA(this.a,e);},U.isElectropositive=function(e){return zY(this.a,e);},U.isFlatNitrogen=function(e){return xP(this.a,e,true);},U.isFragment=function(){return this.a.L;},U.isHalogene=function(e){return IO(this.a,e);},U.isMarkedAtom=function(e){return W0(this.a,e);},U.isMetalAtom=function(e){return Ae(this.a,e);},U.isNaturalAbundance=function(e){return hu(this.a,e);},U.isNitrogenFamily=function(e){return b3(this.a,e);},U.isOrganicAtom=function(e){return Lj(this.a,e);},U.isPseudoRotatableBond=function(e){return Sj(this.a,e);},U.isPurelyOrganic=function(){return pX(this.a);},U.isRingAtom=function(e){return Gi(this.a,e);},U.isRingBond=function(e){return LA(this.a,e);},U.isSelectedAtom=function(e){return i0(this.a,e);},U.isSelectedBond=function(e){return bP(this.a,e);},U.isSimpleHydrogen=function(e){return Lz(this.a,e);},U.isSmallRingAtom=function(e){return pU(this.a,e);},U.isSmallRingBond=function(e){return A8(this.a,e);},U.isStabilizedAtom=function(e){return nN(this.a,e);},U.isStereoBond=function(e){return q9(this.a,e);},U.markAtomForDeletion=function(e){B7(this.a,e);},U.markBondForDeletion=function(e){KI(this.a,e);},U.normalizeAmbiguousBonds=function(){return Li(this.a);},U.removeAtomColors=function(){dB(this.a);},U.removeAtomCustomLabels=function(){this.a.u=null;},U.removeAtomMarkers=function(){s3(this.a);},U.removeAtomSelection=function(){LG(this.a);},U.removeBondHiliting=function(){VB(this.a);},U.removeExplicitHydrogens=function(){O5(this.a,true);},U.removeQueryFeatures=function(){return pj(this.a);},U.renumberESRGroups=function(e){return ne(this.a,e);},U.rotate=function(e){bG(new $w(e),this.a);},U.scaleCoords=function(e){wv(this.a,e);},U.setAllAtoms=function(e){YI(this.a,e);},U.setAllBonds=function(e){XI(this.a,e);},U.setAssignParitiesToNitrogen=function(e){vx(this.a,e);},U.setAtomAbnormalValence=function(e,A){aA(this.a,e,A);},U.setAtomCIPParity=function(e,A){eB(this.a,e,A);},U.setAtomCharge=function(e,A){b0(this.a,e,A);},U.setAtomColor=function(e,A){RD(this.a,e,A);},U.setAtomConfigurationUnknown=function(e,A){rL(this.a,e,A);},U.setAtomCustomLabel=function(e,A){IP(this.a,e,A);},U.setAtomESR=function(e,A,n){Ne(this.a,e,A,n);},U.setAtomList=function(e,A,n){gf(this.a,e,A,n);},U.setAtomMapNo=function(e,A,n){tA(this.a,e,A,n);},U.setAtomMarker=function(e,A){Wn(this.a,e,A);},U.setAtomMass=function(e,A){O9(this.a,e,A);},U.setAtomParity=function(e,A,n){me(this.a,e,A,n);},U.setAtomQueryFeature=function(e,A,n){w1(this.a,e,A,n);},U.setAtomRadical=function(e,A){Je(this.a,e,A);},U.setAtomSelection=function(e,A){vP(this.a,e,A);},U.setAtomX=function(e,A){de(this.a,e,A);},U.setAtomY=function(e,A){Ve(this.a,e,A);},U.setAtomZ=function(e,A){Yn(this.a,e,A);},U.setAtomicNo=function(e,A){$0(this.a,e,A);},U.setBondAtom=function(e,A,n){mD(this.a,e,A,n);},U.setBondBackgroundHiliting=function(e,A){oG(this.a,e,A);},U.setBondCIPParity=function(e,A){Gd(this.a,e,A);},U.setBondESR=function(e,A,n){T8(this.a,e,A,n);},U.setBondForegroundHiliting=function(e,A){UG(this.a,e,A);},U.setBondOrder=function(e,A){B3(this.a,e,A);},U.setBondParity=function(e,A,n){Q8(this.a,e,A,n);},U.setBondParityUnknownOrNone=function(e){yh(this.a,e);},U.setBondQueryFeature=function(e,A,n){Xe(this.a,e,A,n);},U.setBondType=function(e,A){g0(this.a,e,A);},U.setChirality=function(e){th(this.a,e);},U.setCoordinates=function(e,A){de(this.a,e,A.x),Ve(this.a,e,A.y),Yn(this.a,e,A.z);},U.setFragment=function(e){ve(this.a,e);},U.setHelperValidity=function(e){wI(this.a,e);},U.setHydrogenProtection=function(e){gI(this.a,e);},U.setMaxAtoms=function(e){VQ(this.a,e);},U.setMaxBonds=function(e){QQ(this.a,e);},U.setMoleculeColor=function(e){dI(this.a,e);},U.setName=function(e){iu(this.a,e);},U.setParitiesValid=function(e){TD(this.a,e);},U.setStereoBondFromAtomParity=function(e){oy(this.a,e);},U.setStereoBondFromBondParity=function(e){bp(this.a,e);},U.setStereoBondsFromParity=function(){hf(this.a);},U.setToRacemate=function(){this.a.M=true;},U.setUnknownParitiesToExplicitlyUnknown=function(){Kh(this.a);},U.shareSameFragment=function(e,A){return C5(this.a,e,A)!=-1;},U.stripIsotopInfo=function(){return qK(this.a);},U.stripSmallFragments=function(e){return e6(this.a,e);},U.stripStereoInformation=function(){ps(this.a);},U.suggestBondType=function(e,A){return KN(this.a,e,A);},U.supportsImplicitHydrogen=function(e){return fs(this.a,e);},U.swapAtoms=function(e,A){r6(this.a,e,A);},U.swapBonds=function(e,A){g5(this.a,e,A);},U.toIsomericSmiles=function(e){e=e||{};var A=e.createSmarts===true,n=e.includeMapping===true,P=e.kekulizedOutput===true;return this.yc(A,n,P);},U.yc=function(e,A,n){return mF(this,e,A,n);},U.toMolfile=function(){var e;return e=new zh(this.a),e.a.a;},U.toMolfileV3=function(){var e;return e=new Qd(this.a),e.b.a;},U.toSVG=function(e,A,n,P,r,i,f){var D,Q,o,L,s,y,l,h,T,g,k,v;for(o=true,s=0;s<this.a.r-1;s++)if(mt(this.a,s)!=mt(this.a,s+1)||Rt(this.a,s)!=Rt(this.a,s+1)){o=false;break;}return y=o?$n(this.a):this.a,o&&U9(new a8(0),y),ut(y,95),v=d$(f),L=la(f),Q=new vb(y,L,i),Q.J=n,w2(Q,null,new lA(0,0,e,A),v),D=Q.v,h6(Q,null),k=pp(Q),P?(h=Ot(E1(w.Math.round(D.b+r*2))),l=Ot(E1(w.Math.round(D.a+r*2))),T=Ot(E1(w.Math.round(D.c-r))),g=Ot(E1(w.Math.round(D.d-r))),O3(k,'width="\\d+px" height="\\d+px" viewBox="0 0 \\d+ \\d+"','width="'+h+'px" height="'+l+'px" viewBox="'+T+" "+g+" "+h+" "+l+'"')):k;},U.toSmarts=function(){return Eu(new dD(this.a,1));},U.toSmiles=function(){return mF(this,false,false,true);},U.translate=function(e){AO(this.a,e.x,e.y,e.z);},U.translateCoords=function(e,A){GL(this.a,e,A);},U.validate=function(){v$(this.a);},U.zoomAndRotate=function(e,A,n){sb(this.a,e,A,n);},U.zoomAndRotateInit=function(e,A){Nb(this.a,e,A);};var n0t=32,P0t=2,r0t=4,i0t=6,f0t=64,D0t=128,u0t=1,Q0t=256,o0t=8,U0t=Qe,L0t=16,s0t=O1,y0t=512,l0t=iE,h0t=24,T0t=iE,XE,c0t=f4,w0t=r4,g0t=i4,d0t=0,B0t=3,v0t=1,F0t=2,k0t=64,m0t=384,b0t=448,j0t=192,R0t=256,p0t=0,M0t=320,C0t=128,ZE,H0t=1,V0t=2,E0t=4,S0t=0,I0t=3,x0t=1,N0t=ky,G0t=2,O0t=1,q0t=2,z0t=yr,K0t=3,J0t=25,Y0t={l:4186111,m:4193407,h:127},X0t=5,Z0t=39,W0t=xf,_0t=Pe,$0t=d9,a0t=no,tet=uP,eet=4,Aet=7,net=Ao,Pet=eo,ret=je,iet=S0,fet={l:4194302,m:4193343,h:7},Det=5,uet=17,Qet=hi,oet=l9,Uet=7,Let=32,set=O1,yet=46,het=p2,Tet=128,cet=q0,wet=Gn,get=kM,det=256,Bet=v8,vet=g8,Fet=mM,ket=512,met=B8,bet=o0,jet=16,Ret=bM,pet=Qe,Met=F8,Cet=32,Het=fo,Vet=KA,Eet=64,Iet=4,xet=8,Net=wn,Get=oo,Oet=134217728,qet=3,zet=14,Ket=li,Jet=w8,Yet=h9,Xet=T9,Zet=c9,Wet=w9,_et=g9,$et=Vf,aet=120,tAt=4,eAt=3,AAt=2,nAt=k8,PAt=Fo,rAt=k8,iAt=dn,fAt=30,DAt=e4,uAt=lr,QAt=3,oAt=22,UAt=X6,LAt=2,sAt=44,yAt=48,lAt=32,hAt=0,TAt=16,cAt=4,wAt=48,WE,gAt=1,dAt=0,BAt=3,vAt=2,FAt=1,kAt=0,mAt=3,bAt=2,jAt=yi,RAt=Qo,pAt=2,MAt=21,CAt=KA,HAt=31,VAt=5,EAt=0,SAt=d8,IAt=8,xAt=7680,NAt=4,GAt=9,OAt=9,qAt=jy,zAt=4,KAt=13,JAt=8,YAt=8388480,XAt=2,ZAt=Nf,WAt=F8,_At=16,$At=6291840,aAt=23,tnt=oP,ent=128,Ant=32,nnt=64,Pnt=96,rnt=2,int=5,fnt=256,Dnt=NP,unt=3,Qnt=17,ont=384,Unt=2,Lnt=7,snt=6291967,ynt=1,lnt=4,hnt=386,Tnt=512,cnt=8,wnt=2,gnt=129,dnt=511,Bnt=127,vnt=384,Fnt=16,knt=32,mnt=64,bnt=1,jnt=4,Rnt=257,pnt=458752,Mnt=Ti,Cnt=d1,Hnt=v8,Vnt=q0,Ent=o0,Snt=Fy,Int=0,xnt=327680,_E,Nnt=24,Gnt=321,Ont=6,qnt=5,znt=32,Knt=0,Jnt=1,Ynt=2,Xnt=255,Znt=16,Wnt=128,_nt=1,$nt=8,ant=4,tPt=2,ePt=32,APt=64,nPt=248,PPt=31,rPt=1,iPt=0,fPt=15,DPt=7,uPt=3,QPt=63,oPt=95,UPt=190,LPt=16,sPt=0,yPt=1,lPt=16,hPt=256,TPt=128,cPt=8,wPt=32,gPt=4,dPt=511,BPt=64,vPt=1,FPt=2,$E,aE,pl=M(39);p(434,286,{},Ag),AP(U,{acceptorCount:{get:function(){return Oq(this);}}}),AP(U,{donorCount:{get:function(){return Rz(this);}}}),AP(U,{logP:{get:function(){return eJ(this);}}}),AP(U,{logPString:{get:function(){return lQ(utt((new pT(),this.a)));}}}),AP(U,{logS:{get:function(){return SX((M6(),this.a));}}}),AP(U,{logSString:{get:function(){return lQ(na((M6(),this.a)));}}}),AP(U,{polarSurfaceArea:{get:function(){return wq((B6(),this.a));}}}),AP(U,{polarSurfaceAreaString:{get:function(){return lQ(DW((B6(),this.a)));}}}),AP(U,{rotatableBondCount:{get:function(){return nR(this.a);}}}),AP(U,{stereoCenterCount:{get:function(){return WF(this.a);}}});M(434);p(68,1,{},P8,uB),U.addCatalyst=function(e){oh(this.a,e.a);},U.addCatalystAt=function(e,A){Qx(this.a,e.a,A);},U.addProduct=function(e){Ug(this.a,e.a);},U.addProductAt=function(e,A){Zx(this.a,e.a,A);},U.addReactant=function(e){Lg(this.a,e.a);},U.addReactantAt=function(e,A){Wx(this.a,e.a,A);},U.clear=function(){Sv(this.a);},U.clone=function(){return new P8(new Ks(this.a));},U.getAverageBondLength=function(){return Jb(this.a);},U.getCatalyst=function(e){return new sA(Rx(this.a,e));},U.getCatalysts=function(){return this.a.a.a.length;},U.getHighestMapNo=function(){return Es(this.a);},U.getMergedCopy=function(){return new P8(QZ(this.a));},U.getMolecule=function(e){return new sA(Nv(this.a,e));},U.getMolecules=function(){return JN(this.a);},U.getName=function(){return eN(this.a);},U.getProduct=function(e){return new sA(ph(this.a,e));},U.getProducts=function(){return this.a.f.a.length;},U.getReactant=function(e){return new sA(C9(this.a,e));},U.getReactants=function(){return this.a.g.a.length;},U.getReactionCenterMapNos=function(){return Ctt(this.a);},U.isEmpty=function(){return lZ(this.a);},U.isFragment=function(){return Fx(this.a);},U.isPerfectlyMapped=function(){return aa(this.a);},U.isReactionLayoutRequired=function(){return S$(this.a);},U.removeCatalysts=function(){bi(this.a.a.a,0);},U.setFragment=function(e){dJ(this.a,e);},U.setName=function(e){kI(this.a,e);},U.toRxn=function(e){var A;return A=new vR(this.a,e),A.a?A.a.a:null;},U.toRxnV3=function(e){var A;return A=new JR(this.a,e),A.a?A.a.a:null;},U.toSmiles=function(){return TW(this.a);},U.validateMapping=function(){Oa(this.a);};M(68);p(435,1,{},ww);var kPt="+",mPt=15,bPt=8,jPt=2,RPt=3,pPt=4,MPt=1,CPt=0,HPt=" ",VPt="#",EPt="!",SPt=16;M(435);p(436,1,{},sg),U.getProducts=function(){var e,A,n,P;if(P=xK(this.a),P.length==0)return j1(pl,[DA,Dl],[152,39],0,[0,0],2);for(n=j1(pl,[DA,Dl],[152,39],0,[P.length,P[0].length],2),e=0;e<P.length;e++)for(A=0;A<P[0].length;A++)n[e][A]=new sA(P[e][A]);return n;},U.setReactant=function(e,A){return g$(this.a,e,A.a);};M(436);p(437,1,{},gw);var No=false;M(437);p(266,1,{},r7),U.determineAromaticity=function(e,A,n,P){Py(this.a,e,A,n,P);},U.getAtomIndex=function(e,A){return qF(this.a,e,A);},U.getAtomRingSize=function(e){return UA(this.a,e);},U.getBondIndex=function(e,A){return Wq(this.a,e,A);},U.getBondRingSize=function(e){return TP(this.a,e);},U.getHeteroPosition=function(e){return fx(this.a,e);},U.getRingAtoms=function(e){return jh(this.a,e);},U.getRingBonds=function(e){return Qg(this.a,e);},U.getRingSize=function(e){return ah(this.a,e);},U.getSharedRing=function(e,A){return As(this.a,e,A);},U.getSize=function(){return this.a.j.a.length;},U.isAromatic=function(e){return wh(this.a,e);},U.isAtomMember=function(e,A){return wA(this.a,e,A);},U.isBondMember=function(e,A){return Pf(this.a,e,A);},U.isDelocalized=function(e){return Dx(this.a,e);},U.qualifiesAsAmideTypeBond=function(e){return Gs(this.a,e);},U.validateMemberIndex=function(e,A){return UT(this.a,e,A);};var IPt=7,xPt=3,NPt=7,GPt=5,OPt=1;M(266);p(438,1,{},zd),U.getField=function(e){var A,n;for(n=eG(this.a),A=0;A<n.length;A++)if(e1(n[A],e))return IB(this.a,A);return null;},U.getFieldData=function(e){return IB(this.a,e);},U.getFieldNames=function(e){return qN(this.a,e);},U.getMolecule=function(){return new sA(WY(this.a));},U.getNextFieldData=function(){var e;return e=this.a.b.a,e;},U.getNextMolFile=function(){var e;return e=this.a.g.a,e;},U.next=function(){return _a(this.a);};M(438);p(440,1,{},CB),U.findFragmentInMolecule=function(e){var A;return A=dZ(e),CA(this.b,A,this.a);},U.getMatchList=function(){return yK(this.b.F);},U.isFragmentInMolecule=function(){return Rg(this.b);},U.setFragment=function(e){MA(this.b,e.a);},U.setMol=function(e,A){GA(this.b,A.a),MA(this.b,e.a);},U.setMolecule=function(e){GA(this.b,e.a);},U.a=0;M(440);p(441,1,{},m7),U.createIndex=function(e){return ks(this.a,e.a);},U.isFragmentInMolecule=function(){return qX(this.a);},U.setFragment=function(e,A){fO(this.a,e.a,A);},U.setMolecule=function(e,A){DO(this.a,e.a,A);};M(441);p(442,1,{},Uh),U.getSmartsWarning=function(){return yO(this.a);},U.zc=function(e,A,n,P,r,i){var f;switch(f=0,e){case "smarts":f=2;break;case "guess":f=1;}n&&(f|=8),A&&(f|=4),P&&(f|=16),r&&(f|=32),i&&(f|=64),this.a=new dQ(f);},U.Ac=function(e,A,n,P){var r;return zN(this.a,e.a,ln((r=A,_u(),r)),n,P),e;},U.parseMolecule=function(e,A){A=A||{};var n=A.molecule||new Zd(),P=!A.noCoordinates,r=!A.noStereo;return this.Ac(n,e,P,r);},U.parseReaction=function(e){return new P8(gO(this.a,e));},U.setRandomSeed=function(e){vI(this.a,e);};M(442);p(443,1,{},pg),U.assessRisk=function(e,A){var n;return IW(e.a,(n=A,n));},U.getDetail=function(e,A){return lQ(Va(e.a,A));};var qPt=3,zPt=2,tS,KPt=1,JPt=0,YPt=2,XPt=0,ZPt=3,WPt=1;M(443);p(444,1,{},wd),U.applyTransformation=function(e,A){Gz(this.a,e.a,A);},U.setMolecule=function(e,A){return hZ(this.a,e.a);};M(444);p(445,1,{},dw);M(445);p(265,155,{155:1},Mg),AP(U,{absoluteWeight:{get:function(){return Tq(this);}}}),AP(U,{formula:{get:function(){return dK(this);}}}),AP(U,{relativeWeight:{get:function(){return cq(this);}}});M(265);p(446,1,{},fj),U.addPastedOrDropped=function(e,A,n){RR(this.a,e.a);},U.clearAll=function(){ab(this.a);},U.fireKeyEvent=function(e,A,n,P,r,i){var f;f=new OB(e,A,i,this.a),DT(this.d,f);},U.fireMouseEvent=function(e,A,n,P,r,i,f,D,Q){var o;o=new ST(e,A,n,P,r,i,f,D,Q,this.a),DT(this.e,o);},U.getGenericEditorArea=function(){return this.a;},U.Bc=function(){return this.c;},U.getMode=function(){return this.a.U;},U.getMolecule=function(){return new sA(this.a.V);},U.getReaction=function(){return new P8(GT(this.a));},U.moleculeChanged=function(){qO(this.a);},U.repaint=function(){P1(this);},U.setMolecule=function(e){kK(this.a,e.a);},U.setReaction=function(e){gR(this.a,e.a);},U.toolChanged=function(e){DQ(this.a,e);},U.b=false;var _Pt=4,$Pt=8,aPt=1,t8t=2,eS,AS,nS,PS,e8t=-2,A8t=-5,n8t=-1,P8t=-4,r8t=-8,i8t=-7,f8t=1,D8t=2,u8t=-6,Q8t=-3,o8t=8,U8t=2,L8t=1,s8t=4,y8t=3,l8t=7,h8t=4,T8t=5,c8t=6,w8t=1,g8t=2,d8t=-1,B8t=-2,v8t=0,F8t=1,k8t=4,m8t=2,b8t=3,j8t=10,R8t=5,p8t=6,M8t=13,C8t=11,H8t=7,V8t=8,E8t=12,S8t=9;M(446);p(295,1,qf,i7),U.nc=function(e){kG(this.a,e.j,e.a);};M(295);p(298,1,{268:1},f7),U.pc=function(){ON(this.a);};M(298);p(448,1,{},Um),U.fireMouseEvent=function(e,A,n,P,r,i,f,D,Q){var o;o=new ST(e,A,n,P,r,i,f,D,Q,this.b),DT(this.d,o);},U.getHeight=function(){return this.b.e;},U.Cc=function(){return this.c;},U.getWidth=function(){return this.b.o;},U.setDimensions=function(e,A){WB(this,e,A);},U.a=false;M(448);p(313,1,{268:1},D7),U.pc=function(){OF(this.a);};M(313);p(447,1,{},ZB),U.build16x16CursorImage=function(e){var A;return A=Yv(this,16,16),WX(A,e),A.a;},U.createDialog=function(e,A){return OD(this,e,A);},U.createImage=function(e,A){return Yv(this,e,A);},U.createNativeDialog=function(e){return HB(this,e);},U.createPopupMenu=function(e){return null;},U.Dc=function(){return this.a;},U.grabFocus=function(){oB(this);},U.openChemistryFile=function(e){return null;},U.runLater=function(e){BL(this,e);},U.Ec=function(e){e.pc();},U.setCursor=function(e){BB(this,e);},U.setEditorArea=function(e){},U.showHelpDialog=function(e,A){H3(this,e,A);},U.showMessage=function(e){};M(447);p(174,1,{}),U.Fc=function(e,A){Qq(this,new KU(this,e,A));},U.Gc=function(){return this.b;};M(174);p(470,174,{},q7);M(470);p(297,1,{},u7),U.Hc=function(){return this.a;};M(297);p(471,174,{},z7);M(471);p(299,1,{},Q7),U.Ic=function(){this.a&&this.a.nc(new KU(this,1,0));},U.Jc=function(){this.a&&this.a.nc(new KU(this,0,0));},U.Kc=function(){return this.b;};M(299);p(160,1,{},fu),U.Lc=function(){return this.a;};M(160);p(224,1,{},iU),U.qc=function(){var e=this.Mc();return e;},U.Mc=function(){return this.a;};M(224);p(296,226,{},b7);M(296);p(469,174,{},K7);M(469);p(223,226,{},Lh);M(223);p(139,1,{},uD),U.getSize=function(){return this.a.a;},U.getX=function(e){return I7(this.a,e);},U.getY=function(e){return x7(this.a,e);};M(139);p(472,174,{},J7);M(472);p(216,1,{},Wl);M(216);var Tc=null,p1;p(410,1,{},Td),U.a=0,U.b=0,U.c=0;M(410);p(262,1,Cf,_l),U.Rb=function(e,A){return bs(e,A);},U.mb=function(e){return this===e;};M(262);var YA,Bi;p(130,1,Cf,fD),U.Rb=function(e,A){return ms(e,A);},U.mb=function(e){return this===e;};M(130);p(94,1,{},Ci,Oh);M(94);p(390,94,Cf,dd);M(390);p(158,1,{158:1,32:1},T3,Nm),U.Sb=function(e){return SK(this,e);},U.mb=function(e){return Hm(this,e);},U.ob=function(){return this.b==-1&&(this.a.length==1?this.b=this.a[0]:this.b=Mu(this.a)),this.b;},U.pb=function(){var e,A,n;for(n=new C0(),A=new sD("0"),e=0;e<this.a.length;e++)q(n,Sh(A,this.a[e])),e<this.a.length-1&&(n.a+=" ");return n.a;},U.b=0;M(158);p(352,128,Tn);M(352);p(166,352,{166:1,4:1,19:1,33:1,27:1},dv),U.jc=function(){return LX(this),this.c;},U.Nc=function(){return z1(this.b)===z1(cc)?null:this.b;};var cc;M(166);p(423,1,{});M(423);var Go=0,rS=0,Oo=-1;p(404,423,{},Bw);var wc;M(404);var zn,gc,iS,dc,Bc;p(57,1,{},FP,xL),U.a=0;M(57);p(244,1,{},h3),U.b=0;var fS=null,DS;M(244);p(163,1,{163:1}),U.mb=function(e){return Ek(this,e);},U.ob=function(){var e;return e=this.Oc()+this.Pc(),Bt(e)*37;};M(163);p(171,163,{171:1,163:1},yg),U.mb=function(e){var A;return Yt(e,171)?(A=e,this.a==A.a&&this.b==A.b):Ek(this,e);},U.Oc=function(){return this.a;},U.Pc=function(){return this.b;},U.a=0,U.b=0;M(171);p(162,163,{163:1,162:1,4:1},Fw,Hg),U.Oc=function(){return this.a;},U.Pc=function(){return this.b;},U.a=0,U.b=0;var I8t=M(162);p(467,1,{});M(467);p(253,467,{253:1}),U.mb=function(e){var A;return e===this?true:Yt(e,172)?(A=e,this.c==A.c&&this.d==A.d&&this.b==A.b&&this.a==A.a):false;},U.ob=function(){var e;return e=Bs(this.c),e=at(e,yn(Bs(this.d),37)),e=at(e,yn(Bs(this.b),43)),e=at(e,yn(Bs(this.a),47)),Ot(e)^Ot(O0(e,32));};M(253);p(172,253,{253:1,172:1},w3),U.a=0,U.b=0,U.c=0,U.d=0;M(172);p(463,1,{}),U.Qc=function(){var e;return e=c(Fr,re,6,1,15,1),this.Rc(e)==-1?-1:e[0];},U.Rc=function(e){return this.Sc(e,0,e.length);};M(463);p(53,463,{},un),U.Qc=function(){return SL(this);},U.Sc=function(e,A,n){return this.b.Sc(e,A,n);},U.a=0;M(53);p(426,1,{});M(426);p(425,426,{});M(425);p(462,1,{});M(462);p(104,463,{},mi),U.Qc=function(){return SG(this.a);},U.Rc=function(e){return kk(this,e,0,e.length);},U.Sc=function(e,A,n){return kk(this,e,A,n);};M(104);p(271,425,{},kw);M(271);p(88,463,{},Sr),U.Qc=function(){return this.a==this.b.length?-1:Xi(this.b,this.a++);},U.Sc=function(e,A,n){var P;return this.a>=this.b.length?-1:(P=w.Math.min(this.b.length-this.a,n),Pq(this.b,this.a,this.a+P,e,A),this.a+=P,P);},U.a=0;M(88);p(464,1,{});M(464);p(243,464,{},Th),U.pb=function(){return this.a.a;};M(243);p(129,1,{210:1}),U.pb=function(){return this.a;};M(129);p(85,33,Tn,I8);M(85);p(260,65,Tn,E7,ng);M(260);p(141,1,{4:1,141:1,32:1},Ah),U.Sb=function(e){return this.a-e.a;},U.mb=function(e){return Yt(e,141)&&e.a==this.a;},U.ob=function(){return this.a;},U.pb=function(){return String.fromCharCode(this.a);},U.a=0;var x8t=M(141),vc;p(63,33,Tn,lh,ZP);M(63);p(167,33,Tn,j7,yU);M(167);p(142,121,{4:1,32:1,142:1,121:1},nh),U.Sb=function(e){return Zh(this.a,e.a);},U.Zc=function(){return this.a;},U.mb=function(e){return Yt(e,142)&&e.a==this.a;},U.ob=function(){return this.a;},U.$c=function(){return this.a;},U.pb=function(){return ""+this.a;},U.a=0;var N8t=M(142),Fc;p(143,121,{4:1,32:1,143:1,121:1},Ph),U.Sb=function(e){return FG(this.a,e.a);},U.Zc=function(){return $9(this.a);},U.mb=function(e){return Yt(e,143)&&n0(e.a,this.a);},U.ob=function(){return VN(this.a);},U.$c=function(){return Ot(this.a);},U.pb=function(){return ""+Fe(this.a);},U.a=0;var G8t=M(143),kc;p(530,1,{}),p(408,33,Tn,W7);M(408);p(42,63,{4:1,19:1,42:1,33:1,27:1},_P);M(42);p(116,1,{4:1,116:1},k3),U.mb=function(e){var A;return Yt(e,116)?(A=e,this.c==A.c&&this.d==A.d&&this.a==A.a&&this.b==A.b):false;},U.ob=function(){return iK(B(d(qn,1),A0,1,5,[U1(this.c),this.a,this.d,this.b]));},U.pb=function(){return this.a+"."+this.d+"("+(this.b!=null?this.b:"Unknown Source")+(this.c>=0?":"+this.c:"")+")";},U.c=0;var uS=M(116);p(80,129,{210:1},gD,su);M(80);p(25,129,{210:1},C0,Vr,bn);M(25);p(532,1,{});var k9;p(40,33,Tn,mA,cD);M(40);p(31,121,{4:1,32:1,121:1,31:1},xe,L3,mB,ff,Fg,ID),U.Sb=function(e){return BR(this,e);},U.Zc=function(){return Te(He(this));},U.mb=function(e){var A;return this===e?true:Yt(e,31)?(A=e,this.e==A.e&&BR(this,A)==0):false;},U.ob=function(){var e;return this.b!=0?this.b:this.a<54?(e=E1(this.f),this.b=Ot(V(e,-1)),this.b=33*this.b+Ot(V(O0(e,32),-1)),this.b=17*this.b+Bt(this.e),this.b):(this.b=17*zk(this.c)+Bt(this.e),this.b);},U.$c=function(){return this.e<=-32||this.e>(this.d>0?this.d:w.Math.floor((this.a-1)*mo)+1)?0:TB(this.e==0||this.a==0&&this.f!=-1?(!this.c&&(this.c=jP(E1(this.f))),this.c):this.e<0?RP((!this.c&&(this.c=jP(E1(this.f))),this.c),Qi(-this.e)):D6((!this.c&&(this.c=jP(E1(this.f))),this.c),Qi(this.e)));},U.pb=function(){return He(this);},U.a=0,U.b=0,U.d=0,U.e=0,U.f=0;var QS,qo,mc,bc,vi,Cl,zo,jc,oS=M(31);p(23,121,{4:1,32:1,121:1,23:1},RA,lv,le,Mm,id),U.Sb=function(e){return ss(this,e);},U.Zc=function(){return Te(d6(this,0));},U.mb=function(e){return VT(this,e);},U.ob=function(){return zk(this);},U.$c=function(){return TB(this);},U.pb=function(){return d6(this,0);},U.b=-2,U.c=0,U.d=0,U.e=0;var Rc,X2,US,Ko,Jo,vr,Fi=M(23),LS,sS;p(100,1,{4:1,100:1},hB,$D),U.mb=function(e){return Yt(e,100)&&e.a==this.a&&e.b==this.b;},U.ob=function(){return this.a<<3|this.b.b;},U.pb=function(){return "precision="+this.a+" roundingMode="+this.b;},U.a=0;M(100);var m9,tD,pc;p(75,55,{4:1,32:1,55:1,75:1},Ir);var yS,lS,hS,TS,ce,Hl,cS,wS,O8t=Yr(75,Vq);p(115,1,ul),U.Sb=function(e){return $G(this.a,e.a);},U.mb=function(e){var A;return e===this?true:Yt(e,115)?(A=e,e1(this.a,A.a)):false;},U.ob=function(){return mT(this.a);},U.pb=function(){return this.a;};M(115);p(466,1,{});M(466);p(110,466,{},sD,Fh),U.a=0;M(110);p(107,1,x4),U.getOrDefault=function(e,A){var n;return n=this.get(e),n==null&&!this.containsKey(e)?A:n;},U.putIfAbsent=function(e,A){var n;return n=this.get(e),n??this.put(e,A);},U.replace=function(e,A){return this.containsKey(e)?this.put(e,A):null;},U.clear=function(){this.ad().clear();},U._c=function(e){return ib(this,e);},U.containsKey=function(e){return !!aT(this,e,false);},U.containsValue=function(e){var A,n,P;for(n=this.ad().Tb();n.cd();)if(A=n.dd(),P=A.jd(),z1(e)===z1(P)||e!=null&&SP(e,P))return  true;return  false;},U.mb=function(e){var A,n,P;if(e===this)return  true;if(!Yt(e,111)||(P=e,this.size()!=P.size()))return  false;for(n=P.ad().Tb();n.cd();)if(A=n.dd(),!this._c(A))return  false;return  true;},U.get=function(e){return t8(aT(this,e,false));},U.ob=function(){return Ak(this.ad());},U.isEmpty=function(){return this.size()==0;},U.keySet=function(){return new ih(this);},U.put=function(e,A){throw At(new cD("Put not supported on this map"));},U.putAll=function(e){var A,n;for(y1(e),n=e.ad().Tb();n.cd();)A=n.dd(),this.put(A.hd(),A.jd());},U.remove=function(e){return t8(aT(this,e,true));},U.size=function(){return this.ad().size();},U.pb=function(){var e,A,n;for(n=new RL(", ","{","}"),A=this.ad().Tb();A.cd();)e=A.dd(),$v(n,iv(this,e.hd())+"="+iv(this,e.jd()));return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c;},U.values=function(){return new oD(this);};M(107);p(187,107,x4),U.clear=function(){i8(this);},U.containsKey=function(e){return Kr(this,e);},U.containsValue=function(e){return PB(this,e);},U.ad=function(){return new QD(this);},U.get=function(e){return D8(this,e);},U.put=function(e,A){return Jr(this,e,A);},U.remove=function(e){return jL(this,e);},U.size=function(){return aP(this);},U.b=0;M(187);p(460,41,G2),U.Ub=function(){return new x8(this);},U.mb=function(e){var A;return e===this?true:!Yt(e,87)||(A=e,A.size()!=this.size())?false:oQ(this,A);},U.ob=function(){return Ak(this);},U.removeAll=function(e){var A,n,P,r;if(y1(e),r=this.size(),r<e.size())for(A=this.Tb();A.cd();)n=A.dd(),e.contains(n)&&A.ed();else for(P=e.Tb();P.cd();)n=P.dd(),this.remove(n);return r!=this.size();};M(460);p(145,460,G2,QD),U.clear=function(){i8(this.a);},U.contains=function(e){return rv(this,e);},U.Tb=function(){return new aF(this.a);},U.remove=function(e){var A;return rv(this,e)?(A=e.hd(),jL(this.a,A),true):false;},U.size=function(){return aP(this.a);};M(145);p(341,1,{},aF),U.bd=function(e){jn(this,e);},U.dd=function(){var e;return fB(this.f.b,this.d),MD(this.b),this.c=this.a,e=this.a.dd(),this.b=vT(this),e;},U.cd=function(){return this.b;},U.ed=function(){x9(!!this.c),fB(this.f.b,this.d),this.c.ed(),this.c=null,this.b=vT(this),this.d=this.f.b;},U.b=false,U.d=0;M(341);p(231,1,{},rh),U.bd=function(e){jn(this,e);},U.cd=function(){return Nr(this);},U.dd=function(){return Cv(this);},U.ed=function(){N3(this);},U.b=0,U.c=-1;M(231);p(232,231,{},J3),U.ed=function(){N3(this);},U.fd=function(e){this.a.addAtIndex(this.b,e),++this.b,this.c=-1;},U.gd=function(e){x9(this.c!=-1),this.a.setAtIndex(this.c,e);};M(232);p(133,74,Z6,JD),U.addAtIndex=function(e,A){Ju(e,this.b),this.c.addAtIndex(this.a+e,A),++this.b;},U.getAtIndex=function(e){return ee(e,this.b),this.c.getAtIndex(this.a+e);},U.removeAtIndex=function(e){var A;return ee(e,this.b),A=this.c.removeAtIndex(this.a+e),--this.b,A;},U.setAtIndex=function(e,A){return ee(e,this.b),this.c.setAtIndex(this.a+e,A);},U.size=function(){return this.b;},U.a=0,U.b=0;M(133);p(233,460,G2,ih),U.clear=function(){this.a.clear();},U.contains=function(e){return this.a.containsKey(e);},U.Tb=function(){var e;return e=this.a.ad().Tb(),new fh(e);},U.remove=function(e){return this.a.containsKey(e)?(this.a.remove(e),true):false;},U.size=function(){return this.a.size();};M(233);p(234,1,{},fh),U.bd=function(e){jn(this,e);},U.cd=function(){return this.a.cd();},U.dd=function(){var e;return e=this.a.dd(),e.hd();},U.ed=function(){this.a.ed();};M(234);p(135,41,my,oD),U.clear=function(){this.a.clear();},U.contains=function(e){return this.a.containsValue(e);},U.Tb=function(){var e;return e=this.a.ad().Tb(),new UD(e);},U.size=function(){return this.a.size();};M(135);p(136,1,{},UD),U.bd=function(e){jn(this,e);},U.cd=function(){return this.a.cd();},U.dd=function(){var e;return e=this.a.dd(),e.jd();},U.ed=function(){this.a.ed();};M(136);YN();p(164,1,{164:1,86:1}),U.mb=function(e){var A;return Yt(e,86)?(A=e,$8(this.c,A.hd())&&$8(this.d,A.jd())):false;},U.hd=function(){return this.c;},U.jd=function(){return this.d;},U.ob=function(){return VU(this.c)^VU(this.d);},U.kd=function(e){return Sd(this,e);},U.pb=function(){return this.c+"="+this.d;};M(164);p(146,164,{164:1,146:1,86:1},jU);M(146);p(465,1,{86:1}),U.mb=function(e){var A;return Yt(e,86)?(A=e,$8(this.b.value[0],A.hd())&&$8(NL(this),A.jd())):false;},U.ob=function(){return VU(this.b.value[0])^VU(NL(this));},U.pb=function(){return this.b.value[0]+"="+NL(this);};M(465);p(238,107,{107:1,238:1,111:1,476:1,474:1}),U._c=function(e){return Zv(this,e);},U.containsKey=function(e){return JU(this,e);},U.ad=function(){return new Dh(this);},U.get=function(e){return Be(this,e);},U.keySet=function(){return new br(this);};M(238);p(239,460,G2,Dh),U.contains=function(e){return Yt(e,86)&&Zv(this.b,e);},U.Tb=function(){return new J8(this.b);},U.remove=function(e){var A;return Yt(e,86)?(A=e,fF(this.b,A)):false;},U.size=function(){return this.b.c;};M(239);p(92,460,G2,br),U.Ub=function(){return new kh(this);},U.clear=function(){Mi(this.a);},U.contains=function(e){return JU(this.a,e);},U.Tb=function(){var e;return e=new J8(new K8(this.a).b),new jr(e);},U.remove=function(e){return JU(this.a,e)?(V3(this.a,e),true):false;},U.size=function(){return this.a.c;};M(92);p(93,1,{},jr),U.bd=function(e){jn(this,e);},U.cd=function(){return Nr(this.a.a);},U.dd=function(){var e;return e=H9(this.a),e.hd();},U.ed=function(){AB(this.a);};M(93);p(468,41,my),U.add=function(e){return _O(Fs(this,e)),true;},U.addAll=function(e){return y1(e),SD(e!=this,"Can't add a queue to itself"),cT(this,e);},U.clear=function(){for(;uT(this)!=null;);};M(468);p(461,74,Z6),U.addAtIndex=function(e,A){var n;n=this.Xb(e),n.fd(A);},U.addAllAtIndex=function(e,A){var n,P,r,i;for(y1(A),i=false,r=this.Xb(e),P=A.Tb();P.cd();)n=P.dd(),r.fd(n),i=true;return i;},U.getAtIndex=function(e){return KT(this,e);},U.Tb=function(){return BQ(this,0);},U.removeAtIndex=function(e){return rb(this,e);},U.setAtIndex=function(e,A){var n,P;n=this.Xb(e);try{return P=n.dd(),n.gd(A),P;}catch(r){throw r=_1(r),Yt(r,147)?At(new XP("Can't set element "+e)):At(r);}};M(461);p(409,41,{5:1,35:1,41:1,37:1},Bd),U.add=function(e){return TL(this,e),true;},U.clear=function(){this.b!=this.c&&(this.a=c(qn,A0,1,8,5,1),this.b=0,this.c=0);},U.contains=function(e){return ok(new fL(this),e);},U.isEmpty=function(){return $7(this);},U.Tb=function(){return new fL(this);},U.remove=function(e){return rO(new fL(this),e);},U.size=function(){return this.c-this.b&this.a.length-1;},U.Ub=function(){return new x8(this);},U.Wb=function(e){var A;return A=this.c-this.b&this.a.length-1,e.length<A&&(e=lu(new Array(A),e)),SF(this,e,A),e.length>A&&(e[A]=null),e;},U.b=0,U.c=0;M(409);p(202,1,{},fL),U.bd=function(e){jn(this,e);},U.cd=function(){return this.a!=this.b;},U.dd=function(){return qk(this);},U.ed=function(){EF(this);},U.a=0,U.b=0,U.c=-1;M(202);p(21,1,{},Zt),U.bd=function(e){jn(this,e);},U.cd=function(){return this.a<this.c.a.length;},U.dd=function(){return _t(this);},U.ed=function(){x9(this.b!=-1),cA(this.c,this.a=this.b),this.b=-1;},U.a=0,U.b=-1;M(21);p(275,w.Function,{},ki),U.ld=function(e,A){return rr(e,A);},p(482,w.Function,{},$l),U.md=function(e,A){return z(e,A)<0?-1:z(e,A)>0?1:0;},p(181,74,{4:1,35:1,41:1,74:1,37:1,70:1,125:1},lU),U.contains=function(e){return Pk(this,e)!=-1;},U.getAtIndex=function(e){return ee(e,this.a.length),this.a[e];},U.setAtIndex=function(e,A){var n;return n=(ee(e,this.a.length),this.a[e]),this.a[e]=A,n;},U.size=function(){return this.a.length;},U.toArray=function(){return jm(this,c(qn,A0,1,this.a.length,5,1));},U.Wb=function(e){return jm(this,e);};M(181);p(47,w.Function,{},Q0),U.ld=function(e,A){return e-A;},p(183,1,{183:1},vd),U.mb=function(e){var A,n,P;if(this===e)return  true;if(!Yt(e,183)||(P=e,n=vL(this.a),n!=vL(P.a)))return  false;for(A=0;A<=n;A++)if((this.a[A]|0)!=(P.a[A]|0))return  false;return  true;},U.ob=function(){var e,A,n,P;for(n=vL(this.a),e=-2128831035^n,A=0;A<=n;A++)P=this.a[A]|0,e=e*Ql&-1^P&255,e=e*Ql&-1^P>>>8&255,e=e*Ql&-1^P>>>16&255,e=e*Ql&-1^P>>>24;return e;},U.pb=function(){var e,A;if(Gq(this)==0)return "{}";for(A=new bn("{"),e=Pb(this,0),A.a+=e;(e=Pb(this,e+1))!=-1;)A.a+=", ",A.a+=e;return A.a+="}",A.a;};M(183);p(190,1,{35:1,37:1},fU),U.Ub=function(){return new x8(this);},U.Vb=function(){return new dh(this.Ub());},U.add=function(e){throw At(new mA());},U.addAll=function(e){throw At(new mA());},U.clear=function(){throw At(new mA());},U.contains=function(e){return this.b.contains(e);},U.containsAll=function(e){return this.b.containsAll(e);},U.isEmpty=function(){return this.b.isEmpty();},U.Tb=function(){return new L7(this.b.Tb());},U.remove=function(e){throw At(new mA());},U.removeAll=function(e){throw At(new mA());},U.retainAll=function(e){throw At(new mA());},U.size=function(){return this.b.size();},U.toArray=function(){return this.b.toArray();},U.pb=function(){return P2(this.b);};M(190);p(350,1,{},L7),U.bd=function(e){jn(this,e);},U.cd=function(){return this.a.cd();},U.dd=function(){return this.a.dd();},U.ed=function(){Sx();};M(350);p(191,190,{35:1,37:1,70:1},NU),U.Ub=function(){return new x8(this);},U.addAtIndex=function(e,A){throw At(new mA());},U.addAllAtIndex=function(e,A){throw At(new mA());},U.mb=function(e){return SP(this.a,e);},U.getAtIndex=function(e){return this.a.getAtIndex(e);},U.ob=function(){return fr(this.a);},U.indexOf=function(e){return this.a.indexOf(e);},U.isEmpty=function(){return this.a.isEmpty();},U.lastIndexOf=function(e){return this.a.lastIndexOf(e);},U.removeAtIndex=function(e){throw At(new mA());},U.setAtIndex=function(e,A){throw At(new mA());},U.subList=function(e,A){return new NU(this.a.subList(e,A));};M(191);p(347,1,{111:1},s7),U.getOrDefault=function(e,A){var n;return n=this.c.get(e),n==null&&!this.c.containsKey(e)?A:n;},U.putIfAbsent=function(e,A){var n;return n=this.c.get(e),n??Vh();},U.replace=function(e,A){return this.c.containsKey(e)?Vh():null;},U.clear=function(){throw At(new mA());},U.containsKey=function(e){return this.c.containsKey(e);},U.containsValue=function(e){return this.c.containsValue(e);},U.ad=function(){return !this.a&&(this.a=new rg(this.c.ad())),this.a;},U.mb=function(e){return SP(this.c,e);},U.get=function(e){return this.c.get(e);},U.ob=function(){return fr(this.c);},U.isEmpty=function(){return this.c.isEmpty();},U.keySet=function(){return !this.b&&(this.b=new TU(this.c.keySet())),this.b;},U.put=function(e,A){return Vh();},U.putAll=function(e){throw At(new mA());},U.remove=function(e){throw At(new mA());},U.size=function(){return this.c.size();},U.pb=function(){return P2(this.c);},U.values=function(){return !this.d&&(this.d=new fU(this.c.values())),this.d;};M(347);p(192,190,QE,TU),U.Ub=function(){return new x8(this);},U.mb=function(e){return SP(this.b,e);},U.ob=function(){return fr(this.b);};M(192);p(348,192,QE,rg),U.contains=function(e){return this.b.contains(e);},U.containsAll=function(e){return this.b.containsAll(e);},U.Tb=function(){var e;return e=this.b.Tb(),new y7(e);},U.toArray=function(){var e;return e=this.b.toArray(),_G(e,e.length),e;};M(348);p(351,1,{},y7),U.bd=function(e){jn(this,e);},U.dd=function(){return new uh(this.a.dd());},U.cd=function(){return this.a.cd();},U.ed=function(){throw At(new mA());};M(351);p(235,1,{86:1},uh),U.mb=function(e){return this.a.mb(e);},U.hd=function(){return this.a.hd();},U.jd=function(){return this.a.jd();},U.ob=function(){return this.a.ob();},U.kd=function(e){throw At(new mA());},U.pb=function(){return P2(this.a);};M(235);p(349,191,{35:1,37:1,70:1,125:1},Pg);M(349);p(269,1,Cf,mw),U.Rb=function(e,A){return rr(e.b,A.b);},U.mb=function(e){return this===e;};M(269);var Vl;p(379,1,Cf,bw),U.Rb=function(e,A){return y1(e),Yk(e,(y1(A),A));},U.mb=function(e){return this===e;};M(379);p(263,33,Tn,hh);M(263);p(60,187,{4:1,5:1,107:1,111:1},Jn,gk);M(60);p(72,460,{4:1,5:1,35:1,41:1,37:1,72:1,87:1},ji,oU),U.add=function(e){return xA(this,e);},U.clear=function(){i8(this.a);},U.contains=function(e){return du(this,e);},U.isEmpty=function(){return aP(this.a)==0;},U.Tb=function(){var e;return e=new ih(this.a).a.ad().Tb(),new fh(e);},U.remove=function(e){return n3(this,e);},U.size=function(){return aP(this.a);};M(72);p(382,1,{35:1},Od),U.Tb=function(){return new PT(this);},U.c=0;M(382);p(250,1,{},PT),U.bd=function(e){jn(this,e);},U.dd=function(){return this.d=this.a[this.c++],this.d;},U.cd=function(){var e;return this.c<this.a.length?true:(e=this.b.next(),e.done?false:(this.a=e.value[1],this.c=0,true));},U.ed=function(){b5(this.e,this.d.hd()),this.c!=0&&--this.c;},U.c=0,U.d=null;M(250);p(380,1,{35:1},qd),U.Tb=function(){return new $3(this);},U.c=0,U.d=0;M(380);p(249,1,{},$3),U.bd=function(e){jn(this,e);},U.dd=function(){return this.c=this.a,this.a=this.b.next(),new ad(this.d,this.c,this.d.d);},U.cd=function(){return !this.a.done;},U.ed=function(){yk(this.d,this.c.value[0]);};M(249);p(381,465,{86:1},ad),U.hd=function(){return this.b.value[0];},U.jd=function(){return NL(this);},U.kd=function(e){return ak(this.a,this.b.value[0],e);},U.c=0;M(381);p(343,461,{4:1,5:1,35:1,41:1,74:1,37:1,70:1},Bv),U.add=function(e){return zv(this,e,this.c.b,this.c),true;},U.clear=function(){Av(this);},U.Xb=function(e){return BQ(this,e);},U.size=function(){return this.b;},U.b=0;M(343);p(344,1,{},tB),U.bd=function(e){jn(this,e);},U.fd=function(e){zv(this.d,e,this.b.b,this.b),++this.a,this.c=null;},U.cd=function(){return this.b!=this.d.c;},U.dd=function(){return dL(this);},U.ed=function(){jF(this);},U.gd=function(e){x9(!!this.c),this.c.c=e;},U.a=0,U.c=null;M(344);p(189,1,{},nU);M(189);p(317,1,{},jw),U.nd=function(e){return Id(this,e);},U.od=function(e){return e.hd();};M(317);p(318,1,{},Rw),U.nd=function(e){return xd(this,e);},U.od=function(e){return e.jd();};M(318);p(147,33,{4:1,19:1,33:1,27:1,147:1},R7);M(147);p(148,468,my,kg,ig),U.addAll=function(e){var A,n,P;for(y1(e),bd(e!=this),P=this.b.a.length,n=e.Tb();n.cd();)A=n.dd(),Ft(this.b,y1(A));return P!=this.b.a.length?(LQ(this,0),true):false;},U.clear=function(){bi(this.b.a,0);},U.contains=function(e){return (e==null?-1:$r(this.b,e,0))!=-1;},U.Tb=function(){return new l7(this);},U.remove=function(e){var A;return A=e==null?-1:$r(this.b,e,0),A<0?false:(yT(this,A),true);},U.removeAll=function(e){return Ds(this.b,e)?(LQ(this,0),true):false;},U.retainAll=function(e){return Ok(this.b,e)?(LQ(this,0),true):false;},U.size=function(){return this.b.a.length;},U.Ub=function(){return new x8(this);},U.toArray=function(){return U3(this.b.a);},U.Wb=function(e){return Qf(this.b,e);};M(148);p(403,1,{},l7),U.bd=function(e){jn(this,e);},U.cd=function(){return this.a<this.c.b.a.length;},U.dd=function(){return MD(this.a<this.c.b.a.length),this.b=this.a++,G(this.c.b,this.b);},U.ed=function(){x9(this.b!=-1),yT(this.c,this.a=this.b),this.b=-1;},U.a=0,U.b=-1;M(403);p(66,1,{},n2,$i),U.a=0,U.b=0;var Mc,Cc,q8t=0;M(66);p(61,1,{},x8);M(61);p(193,61,{},kh);M(193);p(154,1,{},Ld,RL),U.pb=function(){return this.a?this.e.length==0?this.a.a:this.a.a+(""+this.e):this.c;};M(154);p(44,238,{4:1,5:1,107:1,238:1,111:1,476:1,474:1,44:1},cP,Ji),U.clear=function(){Mi(this);},U.ad=function(){return new K8(this);},U.put=function(e,A){return We(this,e,A);},U.remove=function(e){return V3(this,e);},U.size=function(){return this.c;},U.c=0;var gS=M(44);p(73,1,{},J8),U.bd=function(e){jn(this,e);},U.dd=function(){return H9(this);},U.cd=function(){return Nr(this.a);},U.ed=function(){AB(this);};M(73);p(81,239,G2,K8),U.clear=function(){Mi(this.a);};M(81);p(123,146,{164:1,146:1,86:1,123:1},IL),U.b=false;var z8t=M(123);p(195,1,{},PU),U.pb=function(){return "State: mv="+this.c+" value="+this.d+" done="+this.a+" found="+this.b;},U.a=false,U.b=false,U.c=false;M(195);p(83,55,Ul,vu),U.pd=function(){return  false;},U.qd=function(){return  false;};var Hc,dS,BS,vS,K8t=Yr(83,RO);p(362,83,Ul,fd),U.qd=function(){return  true;};Yr(362,null);p(363,83,Ul,sd),U.pd=function(){return  true;},U.qd=function(){return  true;};Yr(363,null);p(364,83,Ul,Dd),U.pd=function(){return  true;};Yr(364,null);p(134,460,{4:1,5:1,35:1,41:1,37:1,87:1},ch,wU),U.Ub=function(){return new kh(this);},U.add=function(e){return Yi(this,e);},U.clear=function(){Mi(this.a);},U.contains=function(e){return kU(this,e);},U.Tb=function(){var e;return e=new J8(new K8(new br(this.a).a).b),new jr(e);},U.remove=function(e){return V3(this.a,e)!=null;},U.size=function(){return this.a.c;};M(134);p(375,74,{4:1,5:1,35:1,41:1,74:1,37:1,70:1,125:1},C7),U.addAtIndex=function(e,A){Iu(e,this.a.a.length+1),f8(this.a,e,A);},U.add=function(e){return mg(this,e);},U.addAllAtIndex=function(e,A){return Iu(e,this.a.a.length+1),Kk(this.a,e,A);},U.addAll=function(e){return MP(this.a,e);},U.clear=function(){bi(this.a.a,0);},U.contains=function(e){return $r(this.a,e,0)!=-1;},U.containsAll=function(e){return oQ(this.a,e);},U.getAtIndex=function(e){return Iu(e,this.a.a.length),G(this.a,e);},U.indexOf=function(e){return $r(this.a,e,0);},U.isEmpty=function(){return this.a.a.length==0;},U.Tb=function(){return new Zt(this.a);},U.lastIndexOf=function(e){return Vd(this.a,e);},U.removeAtIndex=function(e){return Iu(e,this.a.a.length),cA(this.a,e);},U.removeAll=function(e){return Ds(this.a,e);},U.Yb=function(e,A){gv(this.a,e,A);},U.setAtIndex=function(e,A){return Iu(e,this.a.a.length),Zr(this.a,e,A);},U.size=function(){return this.a.a.length;},U.subList=function(e,A){return new JD(this.a,e,A);},U.toArray=function(){return U3(this.a.a);},U.Wb=function(e){return bg(this,e);},U.pb=function(){return Rb(this.a);};M(375);p(358,107,x4),U.containsKey=function(e){return G3(this,e);},U.containsValue=function(e){if(e==null)throw At(new Rr());return PB(this.e,e);},U.ad=function(){return new QD(this.e);},U.get=function(e){return vv(this,e);},U.put=function(e,A){return sF(this,e,A);},U.putIfAbsent=function(e,A){return G3(this,e)?this.get(e):this.put(e,A);},U.remove=function(e){if(e==null)throw At(new Rr());return jL(this.e,e);},U.replace=function(e,A){if(A==null)throw At(new Rr());return G3(this,e)?this.put(e,A):null;};M(358);p(270,1,{},Kw),U.nd=function(e){return y1(e),new wP(this,e);},U.od=function(e){return e;};M(270);p(62,1,{},wP),U.nd=function(e){return y1(e),new wP(this,e);},U.od=function(e){return t3(this.a,this.b,e);};M(62);p(406,1,{},h7),U.b=null,U.c=false;M(406);p(405,1,{},T7);M(405);p(407,63,Tn,BF);M(407);p(96,55,{4:1,32:1,55:1,96:1},bU);var FS,Yo,Vc,El=Yr(96,hO);p(169,1,{},Ou);M(169);p(321,1,{},pw),U.rd=function(e,A){e.add(A);};M(321);p(323,1,{},Mw),U.qc=function(){return new n1();};M(323);p(324,1,{},Cw),U.nd=function(e){return y1(e),new wP(this,e);},U.od=function(e){return QL(e);};M(324);p(325,1,{},Hw),U.nd=function(e){return y1(e),new wP(this,e);},U.od=function(e){return Yt(e,125)?new Pg(e):new NU(e);};M(325);p(326,1,{},Vw),U.qc=function(){return new Jn();};M(326);p(327,1,{},Ew),U.nd=function(e){return y1(e),new wP(this,e);},U.od=function(e){return new s7(e);};M(327);p(229,1,{},al),U.nd=function(e){return y1(e),new wP(this,e);},U.od=function(e){return QL(e);};M(229);p(330,1,{},Sw),U.qc=function(){return new ji();};M(330);p(331,1,{},Iw),U.rd=function(e,A){xA(e,A);};M(331);p(334,1,{},xw),U.nd=function(e){return y1(e),new wP(this,e);},U.od=function(e){return QL(e);};M(334);p(335,1,{},Nw),U.nd=function(e){return y1(e),new wP(this,e);},U.od=function(e){return new TU(e);};M(335);p(320,1,{},Eg),U.rd=function(e,A){QN(this.a,this.b,e,A);};M(320);p(322,1,{},Gw);M(322);p(328,1,{},DB),U.rd=function(e,A){IY(this.a,this.c,this.b,e,A);},U.b=false;M(328);p(329,1,{},Ow);M(329);p(332,1,{},qw);M(332);p(333,1,{},zw),U.nd=function(e){return y1(e),new wP(this,e);},U.od=function(e){return e;};M(333);p(353,1,{}),U.b=false;M(353);p(194,353,{},dh);M(194);p(354,1,{},Jw);M(354);p(355,1,{},c7);M(355);p(356,1,{},Ig);M(356);p(227,115,ul);M(227);p(228,227,ul,mh);M(228);p(319,227,ul,Wg);M(319);p(345,462,{},hd),U.a=0,U.b=0;var kS=null;M(345);p(416,1,{},g7);M(416);p(415,1,{},xg);M(415);p(414,1,{},d7);M(414);p(215,67,{67:1,32:1,215:1},Pp),U.b=0;M(215);p(254,1,{254:1},Rd);M(254);p(213,1,{},ud),U.a=0,U.d=0,U.i=false,U.j=false,U.o=0,U.p=0,U.v=0,U.w=0,U.C=false;M(213);p(277,1,{},Yw),U.Rb=function(e,A){return Zh(A.o.length,e.o.length);},U.mb=function(e){return this===e;};M(277);p(278,1,{},H7);M(278);p(179,1,{179:1},wF);var J8t=M(179);p(359,358,{4:1,107:1,111:1},pd),U.get=function(e){return Rv(this,e);},U.put=function(e,A){return pv(this,e,A);},U.clear=function(){i8(new QD(this.e).a);},U.a=0,U.b=0,U.c=0,U.d=0;var Xo;M(359);p(237,1,{32:1,237:1},Sg),U.Sb=function(e){return JG(this,e);},U.b=0;M(237);p(276,1,{},UB),U.b=false,U.c=0,U.d=0;M(276);p(178,1,{178:1},GR),U.a=0,U.b=false,U.i=0,U.j=0,U.n=0;var mS,bS,jS,Y8t=M(178);p(168,1,{32:1,168:1},GB),U.Sb=function(e){return jk(this,e);},U.mb=function(e){return jk(this,e)==0;},U.pb=function(){var e,A,n,P,r,i,f,D;for(D=new C0(),n=this.i,r=0,f=n.length;r<f;++r)e=n[r],D.a+=e,D.a+=",";for(this.i.length!=0&&Ln(D,D.a.length-1),D.a+=";",A=this.d,P=0,i=A.length;P<i;++P)e=A[P],D.a+=e,D.a+=",";return this.d.length!=0&&Ln(D,D.a.length-1),D.a;},U.b=0,U.e=0,U.g=false;var RS=M(168);p(257,1,{257:1},Nk),U.a=0;M(257);p(389,1,{},xR),U.c=0;var Ec;M(389);p(240,1,{}),U.g=0,U.r=0,U.s=0,U.t=0,U.B=0,U.F=false;M(240);p(360,1,{},Xw);M(360);p(118,240,{118:1},qL),U.sd=function(e){return ZQ(this,this.b);},U.b=false;M(118);p(214,118,{118:1},d3),U.sd=function(e){var A,n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v;if(!e)return ZQ(this,this.a);if(e.b==0)return ZQ(this,this.b);for(P=zX(this,e),n=e.i,A=e.d,L=c(Pt,it,6,P.length,16,1),i=0;i<64;i++){for((L[0]||this.v[0].d.length==1)&&(P[0]=0),o=1,D=1;D<this.v.length;D++)L[o]||this.v[D].d.length==1?P[o]=P[o-1]:P[o]+=P[o-1],++o;for(h=this.u,T=0,g=h.length;T<g;++T)l=h[T],L[o]||l.b.length==1?P[o]=P[o-1]:P[o]+=P[o-1],++o;if(P[P.length-1]==0)return ZQ(this,this.b);for(y=Hn(this.c)*P[P.length-1],f=0;f<P.length;f++)if(y<P[f]){if(k=Mn(n,n.length),r=Mn(A,A.length),f<this.v.length){for(s=1;s<this.v[f].d.length;s++)if(++k[f],k[f]==this.v[f].d.length&&(k[f]=0),v=Xu(this,k,r),Q=u9(this.D,v),(Q<0?-1:Q)==-1)return v;}else for(f-=this.v.length,s=1;s<this.u[f].b.length;s++)if(++r[f],r[f]==this.u[f].b.length&&(r[f]=0),v=Xu(this,k,r),Q=u9(this.D,v),(Q<0?-1:Q)==-1)return v;L[f]=true;break;}}return ZQ(this,this.b);},U.a=false;M(214);p(279,240,{},Dj),U.sd=function(e){return this.a==null||(this.b+1==this.a.length&&ftt(this),this.a==null)?null:(++this.b,this.a[this.b]);},U.b=0;M(279);p(365,1,{},Zw),U.Rb=function(e,A){return rr(A.e,e.e);},U.mb=function(e){return this===e;};M(365);p(258,1,{32:1,258:1},Ng),U.Sb=function(e){return this.a<e.a?-1:this.a>e.a?1:0;},U.a=0;M(258);p(50,1,O2),U.g=false;var Sl;M(50);p(248,50,O2,eT),U.td=function(e,A){var n,P,r,i,f;if(f=YQ(e,this.f)<0?1:0,A!=null)for(P=this.f,r=0,i=P.length;r<i;++r)n=P[r],A[n]+=f/4;return f;},U.ud=function(e,A){var n,P,r,i,f,D,Q;if(D=YQ(e,this.f),D==0||this.b==D>0)return  false;for(Q=_8(Z0(e,this.f[2]),Z0(e,this.f[1])),ri(Q),f=w.Math.abs(D)<HA?-2*D:2*(l1-D),this.a&&(f=-f),P=this.c,r=0,i=P.length;r<i;++r)n=P[r],vf(e,n,Z0(e,this.f[1]),Q,f);return  true;},U.vd=function(){return 5;},U.pb=function(){var e;return e=new bn("binap rule ("+(this.b?"positive":"negative")+" torsion):"),r2(this,e),e.a;},U.a=false,U.b=false;M(248);p(156,1,{},XQ),U.b=0,U.e=false,U.n=0;var pS;M(156);p(361,1,{},Ww),U.Rb=function(e,A){return Y3(),rr(e.e,A.e);},U.mb=function(e){return this===e;};M(361);p(84,50,{50:1,84:1},Cg,nk,is,hT),U.td=function(e,A){var n;return n=V_(this,e),A!=null&&n>0&&(A[this.f[0]]+=n/2,A[this.f[1]]+=n/2),n;},U.ud=function(e,A){var n,P,r,i,f,D,Q;if(r=Mr(e,this.f[1])-Mr(e,this.f[0]),i=Cr(e,this.f[1])-Cr(e,this.f[0]),f=Hr(e,this.f[1])-Hr(e,this.f[0]),n=w.Math.sqrt(r*r+i*i+f*f),P=0,this.a.length==2?n<this.a[0]?P=(n-this.a[0])/n:n>this.a[1]&&(P=(n-this.a[1])/n):n<this.a[0]?P=(n-this.a[0])/n:n>this.a[0]&&(P=(n-this.a[0])/n),w.Math.abs(P)<.001)return  false;if(D=A*P,Q=e.o,this.c==10){if(Ct(Q,this.f[0])==1&&Ct(Q,this.f[1])!=1)return n8(Z0(e,this.f[0]),r*D,i*D,f*D),true;if(Ct(Q,this.f[0])!=1&&Ct(Q,this.f[1])==1)return n8(Z0(e,this.f[1]),-r*D,-i*D,-f*D),true;}return D/=2,V5(e,this.f[0],this.b,r*D,i*D,f*D),V5(e,this.f[1],this.b,-r*D,-i*D,-f*D),true;},U.vd=function(){return 0;},U.pb=function(){var e,A;if(A=new bn("distance rule:"),r2(this,A),this.a.length==1?q(A,(A9(),UE+Q9(this.a[0],5))):q(A,(A9()," min:"+Q9(this.a[0],5)+" max:"+Q9(this.a[1],5))),this.b!=null)for(q(A," not:"+this.b[0]),e=1;e<this.b.length;e++)q(A,","+this.b[e]);return A.a;},U.c=0;var MS=M(84);p(247,50,O2,U5),U.td=function(e,A){var n,P,r,i,f,D,Q;for(n=new N0(),f=new N0(),P=j1(Ut,[c0,Tt],[15,6],15,[this.f.length,3],2),n6(e,this.f,n,f,P),Q=0,i=0;i<this.f.length;i++)r=-(f.a*P[i][0]+f.b*P[i][1]+f.c*P[i][2]),D=20*r*r,A!=null&&(A[this.f[i]]+=D),Q+=D;return Q;},U.ud=function(e,A){var n,P,r,i,f;for(n=new N0(),f=new N0(),P=j1(Ut,[c0,Tt],[15,6],15,[this.a.length,3],2),n6(e,this.a,n,f,P),i=0;i<this.f.length;i++)r=-(f.a*(Mr(e,this.f[i])-n.a)+f.b*(Cr(e,this.f[i])-n.b)+f.c*(Hr(e,this.f[i])-n.c)),V5(e,this.f[i],this.f,.5*r*A*f.a,.5*r*A*f.b,.5*r*A*f.c);return  true;},U.vd=function(){return 1;},U.pb=function(){var e;return e=new bn("plane rule:"),r2(this,e),e.a;};M(247);p(97,67,{67:1,32:1,97:1},Hu,Xd),U.b=false,U.c=0,U.e=0;var CS=M(97);p(377,50,O2,fg),U.td=function(e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S,x;for(i=c(Ut,Tt,6,3,15,1),L=0;L<this.f.length;L++)i[0]+=Mr(e,this.f[L]),i[1]+=Cr(e,this.f[L]),i[2]+=Hr(e,this.f[L]);for(g=0;g<3;g++)i[g]/=this.f.length;for(n=j1(Ut,[c0,Tt],[15,6],15,[this.f.length,3],2),s=0;s<this.f.length;s++)n[s][0]=Mr(e,this.f[s])-i[0],n[s][1]=Cr(e,this.f[s])-i[1],n[s][2]=Hr(e,this.f[s])-i[2];for(R=j1(Ut,[c0,Tt],[15,6],15,[3,3],2),y=0;y<this.f.length;y++)for(T=0;T<3;T++)for(k=0;k<3;k++)R[T][k]+=n[y][T]*n[y][k];for(S=new sy(R),P=S.e,b=0,l=1;l<3;l++)P[l]>P[b]&&(b=l);for(r=S.a,j=c(Ut,Tt,6,3,15,1),h=0;h<3;h++)j[h]=r[h][b];for(x=0,o=0;o<this.f.length;o++)v=j[0]*n[o][0]+j[1]*n[o][1]+j[2]*n[o][2],f=v*j[0]-n[o][0],D=v*j[1]-n[o][1],Q=v*j[2]-n[o][2],C=10*f*f+D*D+Q*Q,A!=null&&(A[this.f[o]]+=C),x+=C;return x;},U.ud=function(e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j,R,C,S;for(i=c(Ut,Tt,6,3,15,1),D=0;D<this.f.length;D++)i[0]+=Mr(e,this.f[D]),i[1]+=Cr(e,this.f[D]),i[2]+=Hr(e,this.f[D]);for(k=0;k<3;k++)i[k]/=this.f.length;for(n=j1(Ut,[c0,Tt],[15,6],15,[this.f.length,3],2),Q=0;Q<this.f.length;Q++)n[Q][0]=Mr(e,this.f[Q])-i[0],n[Q][1]=Cr(e,this.f[Q])-i[1],n[Q][2]=Hr(e,this.f[Q])-i[2];for(C=j1(Ut,[c0,Tt],[15,6],15,[3,3],2),o=0;o<this.f.length;o++)for(g=0;g<3;g++)for(v=0;v<3;v++)C[g][v]+=n[o][g]*n[o][v];for(S=new sy(C),P=S.e,j=0,L=1;L<3;L++)P[L]>P[j]&&(j=L);for(r=S.a,R=c(Ut,Tt,6,3,15,1),s=0;s<3;s++)R[s]=r[s][j];for(b=c(Ut,Tt,6,this.f.length,15,1),y=0;y<this.f.length;y++)b[y]=R[0]*n[y][0]+R[1]*n[y][1]+R[2]*n[y][2];if(A==1){for(h=false,T=b[0]<b[1],l=2;l<this.f.length;l++)if(T!=b[l-1]<b[l]){h=true;break;}if(h)return  false;}for(f=0;f<this.f.length;f++)n8(Z0(e,this.f[f]),A*(b[f]*R[0]-n[f][0]),A*(b[f]*R[1]-n[f][1]),A*(b[f]*R[2]-n[f][2]));return  true;},U.vd=function(){return 2;},U.pb=function(){var e;return e=new bn("line rule:"),r2(this,e),e.a;};M(377);p(378,50,O2,bB),U.td=function(e,A){var n,P,r,i,f;if(i=0,P=Xj(this,e),f=0,this.f[3]==-1?D2(e,P,this.f[4],this.f[2])||++f:(D2(e,P,this.f[4],this.f[2])||++f,D2(e,P,this.f[4],this.f[3])&&++f),f!=0)for(n=0;n<this.f.length;n++)this.f[n]!=-1&&(r=.68*f,A!=null&&(A[this.f[n]]+=r),i+=r);return i;},U.ud=function(e,A){var n,P,r,i,f,D,Q;if(D=Xj(this,e),f=this.f[3]==-1&&!D2(e,D,this.f[4],this.f[2])||this.f[3]!=-1&&!D2(e,D,this.f[4],this.f[2])&&D2(e,D,this.f[4],this.f[3]),!f)return  false;for(Q=nY(this,e),P=this.a,r=0,i=P.length;r<i;++r)n=P[r],vf(e,n,Z0(e,this.f[4]),Q,l1);return  true;},U.vd=function(){return 4;},U.pb=function(){var e,A,n,P,r;for(r=new bn("stereo rule:"),r2(this,r),r.a+=" rotatable:",A=this.a,n=0,P=A.length;n<P;++n)e=A[n],r.a+=e+" ";return r.a;};M(378);p(199,50,O2,ZL),U.td=function(e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h;if(n=FL(e,this.f),isNaN(n))return 0;if(n<0&&(n+=m0),l=180*n/l1,f=db(this,n),f==-1)for(q1(),L=this.e,s=0,y=L.length;s<y;++s);if(Q=Vb(this,n,f),Q==0)return 0;for(P=w.Math.abs(l-this.e[f]),P>180&&(P=360-P),P>60&&(P=60),D=e.o,o=3*Q*P*P/3600,h=0,i=0;i<Ct(D,this.f[1]);i++)_(D,this.f[1],i)!=this.f[2]&&(A!=null&&(A[_(D,this.f[1],i)]+=o),h+=o);for(r=0;r<Ct(D,this.f[2]);r++)_(D,this.f[2],r)!=this.f[1]&&(A!=null&&(A[_(D,this.f[2],r)]+=o),h+=o);return h;},U.ud=function(e,A){var n,P,r,i,f,D,Q,o,L,s,y,l,h,T,g,k,v,b,j;if(Q=FL(e,this.f),isNaN(Q)||(Q<0&&(Q+=m0),y=db(this,Q),b=Vb(this,Q,y),b==0)||(f=l1*this.e[y]/180-Q,w.Math.abs(f)>l1&&(f=f<0?m0+f:f-m0),w.Math.abs(f)<.0031415926535897933))return  false;if(j=_8(Z0(e,this.f[2]),Z0(e,this.f[1])),ri(j),f*=A*b,g=e.o,this.a!=null)for(k=this.d==0?-f:f,P=this.a,r=0,i=P.length;r<i;++r)n=P[r],vf(e,n,Z0(e,this.f[1]),j,k);else for(D=o1(g,this.f[1],this.f[2]),l=D!=-1&&(g.q&&D<g.i?TP(g.q,D):0)<=5,s=1;s<=2;s++)for(o=(s==1?-2:2)*X3(g,this.f[s]),h=0;h<Ct(g,this.f[s]);h++)if(L=_(g,this.f[s],h),L!=this.f[3-s]&&(um(e,L,this.f[s],j,f/o),!l))for(T=0;T<g.k[L];T++)v=g.j[L][T],v!=L&&g.e[v]!=1&&um(e,v,this.f[s],j,f/(4*o));return  true;},U.vd=function(){return 3;},U.pb=function(){var e,A;for(A=new bn("torsion rule:"),r2(this,A),A.a+=" torsions:",e=0;e<this.e.length;e++)e!=0&&(A.a+=","),q(A,this.e[e]+"("+this.b[e]+")");return A.a;},U.d=0;M(199);var Kt=K9("S"),E=K9("B"),F=K9("I"),Pt=K9("Z"),Ut=K9("D"),Oe=K9("F"),XA=K9("J"),Fr=K9("C");U=s0("OCL.Canonizer",cd),U=s0("OCL.CanonizerUtil",Tw),U.BACKBONE=z1t,U.NORMAL=K1t,U.NOSTEREO=J1t,U.NOSTEREO_TAUTOMER=Y1t,U.TAUTOMER=X1t,U.getIDCode=qJ,U=s0("OCL.ConformerGenerator",gd),U.STRATEGY_ADAPTIVE_RANDOM=Z1t,U.STRATEGY_LIKELY_RANDOM=W1t,U.STRATEGY_LIKELY_SYSTEMATIC=_1t,U.STRATEGY_PURE_RANDOM=$1t,U=s0("OCL.DrugScoreCalculator",cw),U.calculate=jN,U=s0("OCL.DruglikenessPredictor",Og),U.DRUGLIKENESS_UNKNOWN=a1t,U=s0("OCL.ForceFieldMMFF94",Dv),U.MMFF94=t0t,U.MMFF94S=e0t,U.MMFF94SPLUS=A0t,R3(),U=s0("OCL.GenericEditorArea",fj),U.EDITOR_EVENT_HIGHLIGHT_ATOM_CHANGED=_Pt,U.EDITOR_EVENT_HIGHLIGHT_BOND_CHANGED=$Pt,U.EDITOR_EVENT_MOLECULE_CHANGED=aPt,U.EDITOR_EVENT_SELECTION_CHANGED=t8t,U.HOTSPOT_16=eS,U.HOTSPOT_32=AS,U.IMAGE_DATA_16=nS,U.IMAGE_NAME_32=PS,U.KEY_ALT=e8t,U.KEY_BACK_SPACE=A8t,U.KEY_CTRL=n8t,U.KEY_DELETE=P8t,U.KEY_ENTER=r8t,U.KEY_ESCAPE=i8t,U.KEY_EVENT_PRESSED=f8t,U.KEY_EVENT_RELEASED=D8t,U.KEY_HELP=u8t,U.KEY_SHIFT=Q8t,U.MODE_DRAWING_OBJECTS=o8t,U.MODE_MARKUSH_STRUCTURE=U8t,U.MODE_MULTIPLE_FRAGMENTS=L8t,U.MODE_REACTION=s8t,U.MOUSE_EVENT_CLICKED=y8t,U.MOUSE_EVENT_DRAGGED=l8t,U.MOUSE_EVENT_ENTERED=h8t,U.MOUSE_EVENT_EXITED=T8t,U.MOUSE_EVENT_MOVED=c8t,U.MOUSE_EVENT_PRESSED=w8t,U.MOUSE_EVENT_RELEASED=g8t,U.TableLayoutFill=d8t,U.TableLayoutPreferred=B8t,U.cChainCursor=v8t,U.cDeleteCursor=F8t,U.cFistCursor=k8t,U.cHandCursor=m8t,U.cHandPlusCursor=b8t,U.cInvisibleCursor=j8t,U.cLassoCursor=R8t,U.cLassoPlusCursor=p8t,U.cPointedHandCursor=M8t,U.cPointerCursor=C8t,U.cSelectRectCursor=H8t,U.cSelectRectPlusCursor=V8t,U.cTextCursor=E8t,U.cZoomCursor=S8t,U=s0("OCL.GenericEditorToolbar",Um),U=s0("OCL.GenericUIHelper",ZB),U=s0("OCL.MCS",Wd),An(),U=s0("OCL.Molecule",UL),U.CANONIZER_ASSIGN_PARITIES_TO_TETRAHEDRAL_N=n0t,U.CANONIZER_CONSIDER_DIASTEREOTOPICITY=P0t,U.CANONIZER_CONSIDER_ENANTIOTOPICITY=r0t,U.CANONIZER_CONSIDER_STEREOHETEROTOPICITY=i0t,U.CANONIZER_COORDS_ARE_3D=f0t,U.CANONIZER_CREATE_PSEUDO_STEREO_GROUPS=D0t,U.CANONIZER_CREATE_SYMMETRY_RANK=u0t,U.CANONIZER_DISTINGUISH_RACEMIC_OR_GROUPS=Q0t,U.CANONIZER_ENCODE_ATOM_CUSTOM_LABELS=o0t,U.CANONIZER_ENCODE_ATOM_CUSTOM_LABELS_WITHOUT_RANKING=U0t,U.CANONIZER_ENCODE_ATOM_SELECTION=L0t,U.CANONIZER_NEGLECT_ANY_STEREO_INFORMATION=s0t,U.CANONIZER_TIE_BREAK_FREE_VALENCE_ATOMS=y0t,U.FISCHER_PROJECTION_LIMIT=l0t,U.FISCHER_PROJECTION_RING_LIMIT=h0t,U.STEREO_ANGLE_LIMIT=T0t,U.VALIDATION_ERRORS_STEREO=XE,U.VALIDATION_ERROR_AMBIGUOUS_CONFIGURATION=c0t,U.VALIDATION_ERROR_ESR_CENTER_UNKNOWN=w0t,U.VALIDATION_ERROR_OVER_UNDER_SPECIFIED=g0t,U.cAtomCIPParityNone=d0t,U.cAtomCIPParityProblem=B0t,U.cAtomCIPParityRorM=v0t,U.cAtomCIPParitySorP=F0t,U.cAtomColorBlue=k0t,U.cAtomColorDarkGreen=m0t,U.cAtomColorDarkRed=b0t,U.cAtomColorGreen=j0t,U.cAtomColorMagenta=R0t,U.cAtomColorNone=p0t,U.cAtomColorOrange=M0t,U.cAtomColorRed=C0t,U.cAtomLabel=ZE,U.cAtomParity1=H0t,U.cAtomParity2=V0t,U.cAtomParityIsPseudo=E0t,U.cAtomParityNone=S0t,U.cAtomParityUnknown=I0t,U.cAtomQFAny=x0t,U.cAtomQFAromState=N0t,U.cAtomQFAromStateBits=G0t,U.cAtomQFAromStateShift=O0t,U.cAtomQFAromatic=q0t,U.cAtomQFCharge=z0t,U.cAtomQFChargeBits=K0t,U.cAtomQFChargeShift=J0t,U.cAtomQFDepictedFeatures=Y0t,U.cAtomQFENeighbourBits=X0t,U.cAtomQFENeighbourShift=Z0t,U.cAtomQFENeighbours=W0t,U.cAtomQFExcludeGroup=_0t,U.cAtomQFFlatNitrogen=$0t,U.cAtomQFHeteroAromatic=a0t,U.cAtomQFHydrogen=tet,U.cAtomQFHydrogenBits=eet,U.cAtomQFHydrogenShift=Aet,U.cAtomQFIsNotStereo=net,U.cAtomQFIsStereo=Pet,U.cAtomQFMatchStereo=ret,U.cAtomQFMoreNeighbours=iet,U.cAtomQFNarrowing=fet,U.cAtomQFNeighbourBits=Det,U.cAtomQFNeighbourShift=uet,U.cAtomQFNeighbours=Qet,U.cAtomQFNewRingSize=oet,U.cAtomQFNewRingSizeBits=Uet,U.cAtomQFNewRingSizeShift=Let,U.cAtomQFNoMoreNeighbours=set,U.cAtomQFNoOfBits=yet,U.cAtomQFNot0ENeighbours=het,U.cAtomQFNot0Hydrogen=Tet,U.cAtomQFNot0Neighbours=cet,U.cAtomQFNot0PiElectrons=wet,U.cAtomQFNot1ENeighbour=get,U.cAtomQFNot1Hydrogen=det,U.cAtomQFNot1Neighbour=Bet,U.cAtomQFNot1PiElectron=vet,U.cAtomQFNot2ENeighbours=Fet,U.cAtomQFNot2Hydrogen=ket,U.cAtomQFNot2Neighbours=met,U.cAtomQFNot2PiElectrons=bet,U.cAtomQFNot2RingBonds=jet,U.cAtomQFNot3ENeighbours=Ret,U.cAtomQFNot3Hydrogen=pet,U.cAtomQFNot3Neighbours=Met,U.cAtomQFNot3RingBonds=Cet,U.cAtomQFNot4ENeighbours=Het,U.cAtomQFNot4Neighbours=Vet,U.cAtomQFNot4RingBonds=Eet,U.cAtomQFNotAromatic=Iet,U.cAtomQFNotChain=xet,U.cAtomQFNotCharge0=Net,U.cAtomQFNotChargeNeg=Get,U.cAtomQFNotChargePos=Oet,U.cAtomQFPiElectronBits=qet,U.cAtomQFPiElectronShift=zet,U.cAtomQFPiElectrons=Ket,U.cAtomQFRingSize0=Jet,U.cAtomQFRingSize3=Yet,U.cAtomQFRingSize4=Xet,U.cAtomQFRingSize5=Zet,U.cAtomQFRingSize6=Wet,U.cAtomQFRingSize7=_et,U.cAtomQFRingSizeLarge=$et,U.cAtomQFRingState=aet,U.cAtomQFRingStateBits=tAt,U.cAtomQFRingStateShift=eAt,U.cAtomQFRxnParityBits=AAt,U.cAtomQFRxnParityHint=nAt,U.cAtomQFRxnParityInvert=PAt,U.cAtomQFRxnParityRacemize=rAt,U.cAtomQFRxnParityRetain=iAt,U.cAtomQFRxnParityShift=fAt,U.cAtomQFSimpleFeatures=DAt,U.cAtomQFSmallRingSize=uAt,U.cAtomQFSmallRingSizeBits=QAt,U.cAtomQFSmallRingSizeShift=oAt,U.cAtomQFStereoState=UAt,U.cAtomQFStereoStateBits=LAt,U.cAtomQFStereoStateShift=sAt,U.cAtomRadicalState=yAt,U.cAtomRadicalStateD=lAt,U.cAtomRadicalStateNone=hAt,U.cAtomRadicalStateS=TAt,U.cAtomRadicalStateShift=cAt,U.cAtomRadicalStateT=wAt,U.cAtomValence=WE,U.cBondCIPParityEorP=gAt,U.cBondCIPParityNone=dAt,U.cBondCIPParityProblem=BAt,U.cBondCIPParityZorM=vAt,U.cBondParityEor1=FAt,U.cBondParityNone=kAt,U.cBondParityUnknown=mAt,U.cBondParityZor2=bAt,U.cBondQFAllFeatures=jAt,U.cBondQFAromState=RAt,U.cBondQFAromStateBits=pAt,U.cBondQFAromStateShift=MAt,U.cBondQFAromatic=CAt,U.cBondQFBondTypes=HAt,U.cBondQFBondTypesBits=VAt,U.cBondQFBondTypesShift=EAt,U.cBondQFBridge=SAt,U.cBondQFBridgeBits=IAt,U.cBondQFBridgeMin=xAt,U.cBondQFBridgeMinBits=NAt,U.cBondQFBridgeMinShift=GAt,U.cBondQFBridgeShift=OAt,U.cBondQFBridgeSpan=qAt,U.cBondQFBridgeSpanBits=zAt,U.cBondQFBridgeSpanShift=KAt,U.cBondQFDelocalized=JAt,U.cBondQFDepictedFeatures=YAt,U.cBondQFDouble=XAt,U.cBondQFMatchFormalOrder=ZAt,U.cBondQFMatchStereo=WAt,U.cBondQFMetalLigand=_At,U.cBondQFNarrowing=$At,U.cBondQFNoOfBits=aAt,U.cBondQFNotAromatic=tnt,U.cBondQFNotRing=ent,U.cBondQFQuadruple=Ant,U.cBondQFQuintuple=nnt,U.cBondQFRareBondTypes=Pnt,U.cBondQFRareBondTypesBits=rnt,U.cBondQFRareBondTypesShift=int,U.cBondQFRing=fnt,U.cBondQFRingSize=Dnt,U.cBondQFRingSizeBits=unt,U.cBondQFRingSizeShift=Qnt,U.cBondQFRingState=ont,U.cBondQFRingStateBits=Unt,U.cBondQFRingStateShift=Lnt,U.cBondQFSimpleFeatures=snt,U.cBondQFSingle=ynt,U.cBondQFTriple=lnt,U.cBondTypeCross=hnt,U.cBondTypeDeleted=Tnt,U.cBondTypeDelocalized=cnt,U.cBondTypeDouble=wnt,U.cBondTypeDown=gnt,U.cBondTypeIncreaseOrder=dnt,U.cBondTypeMaskSimple=Bnt,U.cBondTypeMaskStereo=vnt,U.cBondTypeMetalLigand=Fnt,U.cBondTypeQuadruple=knt,U.cBondTypeQuintuple=mnt,U.cBondTypeSingle=bnt,U.cBondTypeTriple=jnt,U.cBondTypeUp=Rnt,U.cChiralityDiastereomers=pnt,U.cChiralityEpimers=Mnt,U.cChiralityIsomerCountMask=Cnt,U.cChiralityKnownEnantiomer=Hnt,U.cChiralityMeso=Vnt,U.cChiralityNotChiral=Ent,U.cChiralityRacemic=Snt,U.cChiralityUnknown=Int,U.cChiralityUnknownEnantiomer=xnt,U.cCommonOxidationState=_E,U.cDefaultAVBL=Nnt,U.cDefaultAllowedPseudoAtoms=Gnt,U.cDefaultAtomValence=Ont,U.cESRGroupBits=qnt,U.cESRMaxGroups=znt,U.cESRTypeAbs=Knt,U.cESRTypeAnd=Jnt,U.cESRTypeOr=Ynt,U.cHelperAll=Xnt,U.cHelperBitCIP=Znt,U.cHelperBitIncludeNitrogenParities=Wnt,U.cHelperBitNeighbours=_nt,U.cHelperBitParities=$nt,U.cHelperBitRings=ant,U.cHelperBitRingsSimple=tPt,U.cHelperBitSymmetrySimple=ePt,U.cHelperBitSymmetryStereoHeterotopicity=APt,U.cHelperBitsStereo=nPt,U.cHelperCIP=PPt,U.cHelperNeighbours=rPt,U.cHelperNone=iPt,U.cHelperParities=fPt,U.cHelperRings=DPt,U.cHelperRingsSimple=uPt,U.cHelperSymmetrySimple=QPt,U.cHelperSymmetryStereoHeterotopicity=oPt,U.cMaxAtomicNo=UPt,U.cMaxConnAtoms=LPt,U.cMoleculeColorDefault=sPt,U.cMoleculeColorNeutral=yPt,U.cPseudoAtomA=lPt,U.cPseudoAtomAttachmentPoint=hPt,U.cPseudoAtomPolymer=TPt,U.cPseudoAtomR=cPt,U.cPseudoAtomX=wPt,U.cPseudoAtomsAGroups=gPt,U.cPseudoAtomsAll=dPt,U.cPseudoAtomsAminoAcids=BPt,U.cPseudoAtomsHydrogenIsotops=vPt,U.cPseudoAtomsRGroups=FPt,U.cRoundedMass=$E,U.fromIDCode=xJ,U.fromMolfile=ZN,U.fromMolfileWithAtomMap=$K,U.fromSmiles=zO,U.getAngle=CN,U.getAngleDif=Yx,U.getAtomicNoFromLabel=Xx,U.getDefaultAverageBondLength=lN,U.isAtomicNoElectronegative=mx,U.isAtomicNoElectropositive=kx,U.setDefaultAverageBondLength=Ax,U=s0("OCL.MoleculeProperties",Ag),U=s0("OCL.Reaction",uB),U.create=Ox,U.fromMolecules=lK,U.fromRxn=rq,U.fromSmiles=EO,U=s0("OCL.ReactionEncoder",ww),U.CATALYST_DELIMITER=kPt,U.INCLUDE_ALL=mPt,U.INCLUDE_CATALYSTS=bPt,U.INCLUDE_COORDS=jPt,U.INCLUDE_DEFAULT=RPt,U.INCLUDE_DRAWING_OBJECTS=pPt,U.INCLUDE_MAPPING=MPt,U.INCLUDE_RXN_CODE_ONLY=CPt,U.MOLECULE_DELIMITER=HPt,U.OBJECT_DELIMITER=VPt,U.PRODUCT_IDENTIFIER=EPt,U.RETAIN_REACTANT_AND_PRODUCT_ORDER=SPt,U.decode=UZ,U.encode=y_,U=s0("OCL.Reactor",sg),U=s0("OCL.Resources",gw),U._register=ex,U=s0("OCL.RingCollection"),U.MAX_SMALL_RING_SIZE=IPt,U.MODE_SMALL_AND_LARGE_RINGS=xPt,U.MODE_SMALL_AND_LARGE_RINGS_AND_AROMATICITY=NPt,U.MODE_SMALL_RINGS_AND_AROMATICITY=GPt,U.MODE_SMALL_RINGS_ONLY=OPt,U=s0("OCL.SDFileParser",zd),U=s0("OCL.SSSearcher",CB),U=s0("OCL.SSSearcherWithIndex",m7),U.bitCount=_I,U.getHexStringFromIndex=OI,U.getIndexFromHexString=qI,U.getKeyIDCode=aI,U.getSimilarityAngleCosine=hx,U.getSimilarityTanimoto=Tx,U=s0("OCL.SmilesParser",Uh),Ch(),U=s0("OCL.ToxicityPredictor",pg),U.RISK_HIGH=qPt,U.RISK_LOW=zPt,U.RISK_NAMES=tS,U.RISK_NO=KPt,U.RISK_UNKNOWN=JPt,U.TYPE_IRRITANT=YPt,U.TYPE_MUTAGENIC=XPt,U.TYPE_REPRODUCTIVE_EFFECTIVE=ZPt,U.TYPE_TUMORIGENIC=WPt,U=s0("OCL.Transformer",wd),U=s0("OCL.Util",dw),U.getHoseCodesFromDiastereotopicID=rJ,U=s0("java.io.Serializable"),U.$isInstance=NJ,Er(),U=s0("java.lang.Boolean"),U.$isInstance=XN,U=s0("java.lang.CharSequence"),U.$isInstance=Cz,U=s0("java.lang.Cloneable"),U.$isInstance=vz,U=s0("java.lang.Comparable"),U.$isInstance=aK,U=s0("java.lang.Double"),U.$isInstance=TN,U=s0("java.lang.Number"),U.$isInstance=$O,U=s0("java.lang.String"),U.$isInstance=cN,U=s0("java.lang.Throwable"),U.of=LK,U=s0("java.util.List"),U.copyOf=fJ,U=s0("java.util.Map"),U.copyOf=ZG,U=s0("java.util.Set"),U.copyOf=HJ,U=s0("javaemul.internal.HashCodes",vw),U.getIdentityHashCode=zJ,U.getNextHash=zI,U.getObjectIdentityHashCode=jD,U=s0("javaemul.internal.JsUtils"),U.toDoubleFromUnsignedInt=$I;var HS=CO,X8t=vY;Hq(sI),dz("permProps",[[]]),X8t(kt.__errFn,kt.__moduleName,kt.__moduleBase,kt.__softPermutationId,kt.__computePropValue),vt&&vt.permProps&&kt.__moduleStartupDone(vt.permProps);let VS=w.OCL;return VS.version="9.24.0",VS;}var E8;E8={document:{compatMode:"CSS1Compat"}},E8.setTimeout=globalThis.setTimeout?globalThis.setTimeout.bind(globalThis):rD,E8.clearTimeout=globalThis.clearTimeout?globalThis.clearTimeout.bind(globalThis):rD,E8.setInterval=globalThis.setInterval?globalThis.setInterval.bind(globalThis):rD,E8.clearInterval=globalThis.clearInterval?globalThis.clearInterval.bind(globalThis):rD,E8.Error=globalThis.Error,E8.Map=globalThis.Map,E8.Math=globalThis.Math,E8.RegExp=globalThis.RegExp,E8.TypeError=globalThis.TypeError;var Art=trt(E8),X0=Art;function LI(w){let Z=w.Resources._register.bind(w.Resources);if(delete w.Resources._register,w.Resources.register=function(kt){typeof kt=="string"&&(kt=JSON.parse(kt));let C1=new TextEncoder();if(typeof kt!="object"||kt===null)throw new TypeError("resources must be an object");let jt={};for(let[T1,u1]of Object.entries(kt)){if(typeof u1!="string")throw new TypeError(`resource ${T1} must be a string`);jt[T1]=C1.encode(u1);}Z(jt);},w.Resources.registerFromUrl=async function(kt=nrt()){let jt=await(await fetch(kt)).json(),T1=new TextEncoder(),u1=Object.fromEntries(Object.entries(jt).map(([h1,s1])=>[h1,T1.encode(s1)]));Z(u1);},typeof process<"u"){let ot=function(){let kt=process.getBuiltinModule("node:path"),C1=kt.join(import.meta.dirname,"resources.json");return import.meta.filename.endsWith("register_resources.js")&&(C1=kt.join(import.meta.dirname,"../dist/resources.json")),C1;};w.Resources.registerFromNodejs=function(C1=ot()){let T1=process.getBuiltinModule("node:fs").readFileSync(C1,"ascii");w.Resources.register(T1);};}else w.Resources.registerFromNodejs=function(){throw new Error("Resources.registerFromNodejs can only be called from Node.js");};}function nrt(){return new URL("resources.json",import.meta.url).href;}hw(X0);UI(X0);LI(X0);var eot=X0,Aot=X0.CanvasEditor,not=X0.registerCustomElement,Pot=X0.Canonizer,rot=X0.CanonizerUtil,iot=X0.ConformerGenerator,fot=X0.DrugScoreCalculator,Dot=X0.DruglikenessPredictor,uot=X0.ForceFieldMMFF94,Qot=X0.MCS,oot=X0.Molecule,Uot=X0.MoleculeProperties,Lot=X0.Reaction,sot=X0.ReactionEncoder,yot=X0.Reactor,lot=X0.Resources,hot=X0.RingCollection,Tot=X0.SDFileParser,cot=X0.SSSearcher,wot=X0.SSSearcherWithIndex,got=X0.SmilesParser,dot=X0.ToxicityPredictor,Bot=X0.Transformer,vot=X0.Util,Fot=X0.version;/**
 * openchemlib - Manipulate molecules
 * @version v9.24.0
 * @date 2026-07-01T12:46:44.684Z
 * @link https://github.com/cheminfo/openchemlib-js
 * @license BSD-3-Clause
*/

var openchemlib = /*#__PURE__*/Object.freeze({
	__proto__: null,
	Canonizer: Pot,
	CanonizerUtil: rot,
	CanvasEditor: Aot,
	ConformerGenerator: iot,
	DrugScoreCalculator: fot,
	DruglikenessPredictor: Dot,
	ForceFieldMMFF94: uot,
	MCS: Qot,
	Molecule: oot,
	MoleculeProperties: Uot,
	Reaction: Lot,
	ReactionEncoder: sot,
	Reactor: yot,
	Resources: lot,
	RingCollection: hot,
	SDFileParser: Tot,
	SSSearcher: cot,
	SSSearcherWithIndex: wot,
	SmilesParser: got,
	ToxicityPredictor: dot,
	Transformer: Bot,
	Util: vot,
	default: eot,
	registerCustomElement: not,
	version: Fot
});

var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(openchemlib);

var getDatabase$1 = {};

var defaultDatabase = {};

Object.defineProperty(defaultDatabase, "__esModule", {
  value: true
});
defaultDatabase.defaultDatabase = void 0;
defaultDatabase.defaultDatabase = [{
  label: 'alpha cleavage',
  rxnCode: 'eM``eIhOh`!fH@Oj@ eF``fJD#Qg Qp Qd#!RPNp@@qtJ_@ !RGUi| !R_P@]nop',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1149/1945-7111/abdde7',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Water elimination',
  rxnCode: 'eMHJN`pksPqFdD@`!fI@GudYA@H@ eF@HhP#Q^ Qp Qd#!RWrL@@qvrO@ !RG]i| !R@@L]~kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.7',
  description: 'Fig. 18 b.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Water elimination',
  rxnCode: 'eFH`fLGtX!fI@Gu` fHT`P#QX QP a`#!R@AL]|gp !RGUi| !RG[i|',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '7',
  description: 'Fig. 32 c.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Water elimination',
  rxnCode: 'gCiALAJRu@_HYlgHE@!fI@Gu` eO``fNZ`~cIrE@#qNT qH Qg#!R@BL@[@@cGPj| !RG]i| !Rog~w?Qwzo@',
  ionization: 'esi',
  reaction: 'CMF',
  doi: '',
  section: '7.4.3.',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: 'ISBN: 978-0-470-03310-4',
  software: ''
}, {
  label: 'Water elimination',
  rxnCode: 'eMH`eIXOda`!fI@Gu` eF@bXhP#Qy Qp Qd#!R@Fp@XqtJ_@ !RG]i| !R@FL]^gp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: '',
  section: '7.4.3.',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: 'ISBN: 978-0-470-03310-4',
  software: ''
}, {
  label: 'Ureas fragmentation',
  rxnCode: 'gGTAAaJTwTpGrDZHpypB@P!gCh@@eKHFLv\\@`D@ eF``fLGtX#qn\\J qfQ qk#!R|Gvw__A|_g?p_Qurw@ !R_wy||G}~GYk| !R@FL]~gp',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 23',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ureas fragmentation',
  rxnCode: 'gGTAAaJTwTpGrDZHpypB@P!gCh@@eKHFLv\\@`D@ eF``fLGtX#qbu_ qj{ Ql#!RlKvwo[@|og~poQurw@ !R_{x|lG~~GYk| !R@BL]~gp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 24',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ureas fragmentation',
  rxnCode: 'gGTAAaJTwTpGtDQas`D@`!gJT@AdijdCzZHpypB@P fHT`P#qbqo qJ|h Qp#!R|Gvw__A|_g?p_Qurw@ !Rb@KW@gx@bGt]vhH !RG_i|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 25',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ureas fragmentation',
  rxnCode: 'gGTAAaJTwTpGtFQas`D@`!gChAAIRfdCF[N@PB@ eF`BLGtX#qj|^ qbs qo#!Rm?wp?[]|_g~w?QvRw@ !R@Fp?[@AcG]k| !R@FL]~gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 26',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ureas fragmentation',
  rxnCode: 'day@B@HIRigjf`Cy@`hcEYpB@P!gGTAAaJTwTpGrFZHpypB@P eF@HhP#IaLJfxP IaBia q~#!RbGwW_Wx@bOq~O}_|bGt]lcp !R|Gvw__A|_g?p_Qtzw@ !R@FL]Akp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 27',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Tropylium rearragement',
  rxnCode: 'gOpAMJUKua@@Gtt@!gOpAGJTju`@@Gt\\@#qgVMX qYoTp#!Ri}w^@Hc]i?rg?Mx@GPhB !Rwg}GED]sw~g_~dvOG]h|',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: 'ISBN: 978-0-470-03310-4',
  software: ''
}, {
  label: 'Tropylium fragmentation',
  rxnCode: 'gOpAGJTju`@@D!gKPACJTnLE@P eF@HxP#qqUcx qMsx Qd#!RkpXxCLvpO`BblClLG[KB !RS|T~@BLXSzh]FhH !R@DL]^kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  // eslint-disable-next-line unicorn/prefer-https -- this host serves http only
  web: 'http://people.whitman.edu/~dunnivfm/C_MS_Ebook/CH6/6_9_5.html',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Tropylium fragmentation',
  rxnCode: 'gFpAAJTjZ@@A@!gBPAAJTkRpD eF@HxP#qbqk qbu qY#!RdMvww]y?wg~wwQurW@ !R@M{^[}yoGUj| !R@@L]^kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: 'https://en.wikipedia.org/wiki/Fragmentation_%28mass_spectrometry%29',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Thiophosphonates fragmentation',
  rxnCode: 'gJPeE`DSpTiMMPGtT@!gC`eE`DSpdiLtA@ fH@Oj@#qbNh qbN qh#!Rb@I~Owx@bGt]|`H !Ru?sW_Wx@GQjB !RGWi|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 60',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Thiophosphate B fragmentation',
  rxnCode: 'gGQeLZ@b^@eJZihCzB@!gJQdEb@b^BSTtA}A@ fHT`P#qbqk qbMX Qp#!ROvL@Xvp?OvMc@AtrO@ !RbOq~@Gx?bGt]v`H !RGWi|',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 49',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Thiophosphate B fragmentation',
  rxnCode: 'gNqeLZ@b^@eJZZZ`OhH@!gJQeEb@b^@eIjZ@~`p eF@HhP#qbqkx qbMX q~#!ROvp@[FL?Ovql@@AcGSHB !RbOq~@Gx?bGt]N`H !R@FL]~kp',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 50',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Thiophosphate B fragmentation',
  rxnCode: 'gGQeLZ@b^@eJZihCzB@!gCaiHlO@SGZ@` eFB@HcA}D@#qbqk qQ] Ql#!ROvL@Xvp?OvMc@AwRO@ !Ruwu~@Ha}GUk| !R@FL]~gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 51',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Thiophosphate A fragmentation',
  rxnCode: 'gGQeEb@b^BeIiZhCzJ@!gC`eE`DSpdiLtA@ eFHBLGtP#qbqk qbM qs#!RXp@@[C}cXp@@XqtrP` !RbOq~@Ha}G]jB !R@FL]~gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 45',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Thiophosphate A fragmentation',
  rxnCode: 'gNqeEb@b^BgHiDVj`Ohh@!gJQeEb@b^BeIij@~bp eF@HhP#qbqkx qbqh q_#!R[@@@Xs}l[@@@[@AcGPiB !RbOq~@Gx?bGt]N`H !R@FL]~kp',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 46',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Thiophosphate A fragmentation',
  rxnCode: 'daxLRDp`BH|DgHiDbuU@GtI@!gGPdE`DSpRYvi@~d` eFH`fLGtX#IaLJfxP IaBka qs#!R[C|?XpAc[@@?[@Al@FL]lmp !RbOrH_Wx@b@JH_Qvz`` !R@FL]Agp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 47',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Thiophosphate A fragmentation',
  rxnCode: 'gGQeEb@b^BeIiZhCzJ@!gC`eE`DSpdiLtA@ eFHBLGtP#qbqk qbM qs#!RXp@@[C}cXp@@XqtrP` !RbOq~@Ha}G]jB !R@FL]~gp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 48',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Thiocarbamates fragmentation',
  rxnCode: 'gJYIC`DBTijXCzB@!eMhdiRVB eFB@HcA}D@#qbqh qJh Ql#!Rb@KW@gx@bGt]\\hH !R@Fp@XqwZ?@ !R@FL]~gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 19',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Thiocarbamates fragmentation',
  rxnCode: 'gGYIC`DBTiff`OhH@!gCiIL`DBTff@~`p eF@HhP#IaLJa qbM IG@#!RupJH@m]}_`BH_Qtr`` !RbOq~@Ha}GSjB !R@FL]~kp',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 20',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Thiocarbamates fragmentation',
  rxnCode: 'gNyIC`DF\\dTJij@~a`!gJYHC`DISTpGtL@ eF@bXpP#IaLJnD qbqh IxP#!Rb@KW@gx@bGvH?Ha}GWJB !Rb@KW@gx@bGt]NhH !R@FL]Agp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 21',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Thiocarbamates fragmentation',
  rxnCode: 'gGYIC`DB\\dTMM@_PP!gCaHL@aJZPH eF``fJGtP#qbqo qbq qo#!R|Gvw_Wy?|Gsp_Qvrw@ !R@Fp?[@AcG]i| !R@FL]~gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 22',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Sulfoxides fragmentation',
  rxnCode: 'eMJhBBXvCyH\\@!fHT`P eFJHBHh_Q@#Qg Qp Qd#!ROvL@Xqwro@ !RGUi| !R@FL]^kp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 65',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Sulfones fragmentation',
  rxnCode: 'gC`iH`DRXzpGrdZ@!fHT`P eMFI@bM`~f@#qbq qH Qm#!Re{v~@Hb}G[K| !RGYi| !RWrL@Hquzo@',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 66',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Sulfones fragmentation',
  rxnCode: 'gC`iH`DRXzpGtd@!fHT`P eMFI@bMP~b@#qfQ qH Qm#!R_`CW_Xa}G[K| !RGQi| !R@Gx?_avz_@',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 67',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Sulfites fragmentation',
  rxnCode: 'gJQiHl@aReVu@_QP!gCahHl@bNtA}E@ fHT`P#qbqh qbq qh#!Rmwsp_Gy?|Ot]lkp !RuwvH_Wx@G]k| !RG_i|',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 68',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Sulfides fragmentation',
  rxnCode: 'eMB`HIchOh`!fHT`P eFB@HcA}D@#Q[ a` Q\\#!ROvL@Xqur_@ !RGYi| !R@FL]ngp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 61',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Sulfides fragmentation',
  rxnCode: 'gC`I@DBTij@~``!eFB`HIcA}F@ eF@HhP#qrL qq Qd#!RGtL@Pq}lG[I| !R_pp]Vop !R_pp]nop',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 62',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Simple inductive cleavage',
  rxnCode: 'eM@bXzCKGgW@!fHT`P eF@HpP#Q[ a` Q\\#!R_qL@Dqwro@ !RGUi| !R@AL]^kp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '4.1',
  description: 'Fig. 7.1.1',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Sigmatropic rearrangement',
  rxnCode: 'eM@HvCzX@!eM@HvB#Q^ Q[#!ROvL@XquJO@ !ROvL@Xqtzo@',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.7',
  description: 'Fig. 18 a.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Retro-heteroene (McLafferty-type rearrangement)',
  rxnCode: 'gJP@DkVhCzFHrEpBG`D@!eM@HvCzXcI\\@axA@ eF@HhP#qTqh Q^ qM#!ROvL@XpAl@FL]Bcp !R@FL?XqwZO@ !R@FL]Akp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '3',
  description: 'Fig. 4.3',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Retro-heteroene (Claisen rearrangement)',
  rxnCode: String.raw`daxH@JrRHiMUHAcEHHA@!daxH@NrSRHmUHAcGHHA@#IZaxla@ IhfP^c@#!Ru{vHo[x@u?sWoY_|e{t]Dop !R@BL?Xs|\[E|cWs}cOqp]vcp`,
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.4',
  description: 'Fig. 12 b.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Retro-heteroene',
  rxnCode: 'daxDBDqIRiubJ`CZN|bPtQqDD@cDD@chXO}c`!gJQ@DeNl`XqHHA@ eFH`fLGtYFDD@`#qqj\\x qqkx QX#!RbCtAHN\\}b@Kg@cx@yst]xop !R@DL?W@Al@DL]Nop !R@DL]agp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.5',
  description: 'Fig. 13 a.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Retro-heteroene',
  rxnCode: 'gGY@DDf]j`Odkl@!gCi@DDff@~`l eF@HhP#qrLk qrL qk#!RbOrH_Wx@b@JH_QuJ@` !RbOq~@Ha}GSjB !R@FL]Akp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.5',
  description: 'Fig. 13 b.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Retro-heteroene',
  rxnCode: 'daDLBHSdeJmVfZjh@~QHzHyBB@PbB@QrB@P!gCaAIiRmhCFQA@H@ gC``Eh{PGrTZHiHHAFPPB@#Ikb[HPP I`Tp qky#!R}{rpwKy?lGvpO[y?og|]dep !ROqp@[@@cGUk| !RbKwW_[x@G_k|',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.4',
  description: 'Fig. 14 b.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Retro-heteroene',
  rxnCode: 'gGP`MTj}jPOihbl``DUA@H@!eMHJMPqiA@H@ eMHFM`~fHr``D@#qStM qTX qNh#!RbKwWo[x@upKW_QtR?@ !R@Ox?oawZ_@ !R@BL?XqwzO@',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.4',
  description: 'Fig. 14 c.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Retro-ene',
  rxnCode: 'gJQ@DeZu@_PqFIA@HFB@!eMHJM`qiA@H@ eF@HhP#qeVH qbh qq#!RWrM@XpAl@BL]Bcp !ROvL@HqwZO@ !R@BL]Akp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.3',
  description: 'Fig. 11 b.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Retro-ene',
  rxnCode: 'gJP@DkVhCzF@!eM@HvCzX@ eF@HhP#qbqh Qm qM#!ROvL@XpAl@FL]bcp !R@FL?XqwZO@ !R@FL]~kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '3',
  description: 'Fig. 4.3',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Retro-Diels–Alder ',
  rxnCode: 'daDD@DqJg^ffZh@qQDD@cDD@`!gGQ@BeJmJHGFEA@H@ eFHBJFLHHA@#IGmdehp IxakS IeP#!Rog?w_KC\\lCvp?[@|lOt]tkp !R|Gw~@OA|mpKp_QwZ`` !R@BL]Agp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.2',
  description: 'Fig. 10 a.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Retro-Diels–Alder ',
  rxnCode: 'gFp@DiTujhB!gC`@Die@` eF@HhP#q]aV q]a Q\\#!R_g~w_K_}mwvw_AuRO@ !R@Fp?[@AcGUk| !R@FL]^kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.2',
  description: 'Fig. 10 b.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Retro-Diels–Alder ',
  rxnCode: 'gFx@@eJfuS@P!gC`@Die@` eF`BJD#q]aV qqU q\\#!R_g~w_K_}mwvw_AuRO@ !R@Fp?[@AcGUk| !R@FL]^gp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.2',
  description: 'Fig. 10 c.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Retro-Diels–Alder ',
  rxnCode: 'gOu@AReLm]SLAcB``D@!gJY@@TeVTCFEA@H@ eF`BJD#IKJRV` IZDrP qM#!R}xNp?[y?}{r~_{@}GQI\\ !R_vq?Dw}l_vp]z`H !R@BL]Agp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.2',
  description: 'Fig. 10 d.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Retro-Diels–Alder ',
  rxnCode: String.raw`didDB@{iRYefxijh@zRhX!gNpaAQJRs\uBIzQg@ eF@HhP#IwlDdeZ IwlIEh IFP#!RbMvH?Cx_bMt~@Hc]Oa~H?AtJo@ !Rm{vwoSy?musPO[\}GYh\ !R@DL]Akp`,
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.2',
  description: 'Fig. 9 a.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Retro-Diels–Alder ',
  rxnCode: 'fdeA`D@\\brTfYY_m]gIZ|DhJB@@h@@~aF@!didHB@BTfUvfZVV@OhB@ didD@@iIYgxUie`B#iup`jXdibCPcXKoI iSxKhvMHP IwbkEYH#!RbCvH?Ky_bCv~@H`}oe~H?Hc|oe~~@H`}esv~W{y_e{v~WquRs@ !RlKvpwKy?lKvpO[y?lKvpOQwZg@ !Rmwvw_[y?msrpo[^}mwvwOAuzG@',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.2',
  description: 'Fig. 9 b.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Retro-Diels–Alder ',
  rxnCode: 'deTDB@{iRYemnJXj`CiJaoQt@!gGPa@QJRmsPbX gC`@DiPDCteZ@#IaLJfxYT IaBxU IriX#!RbGvH?Gx?bGu~@Hb}_c~H?Gx?G[I\\ !RbGvH_X`B_`BH_Qtz_@ !R|Gq~_?C}GXX|',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.2',
  description: 'Fig. 9 c.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Remote Hydrogen rearrangment',
  rxnCode: 'gC`AEJTu@P!fH@Oj@ eM@fXvB#qVa qH Q^#!R@Fq?[@@SG_HB !RGWi| !R@AM?DqtZO@',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Remote Hydrogen rearrangement',
  rxnCode: 'eM@HzCzhcO\\@axADQbU`!fH@OjHw\\@axADQbU` eF@HhP#Q[ Qp Qd#!ROvL@XqurO@ !RGUi| !R@FL]^kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.1',
  description: 'Fig. 4.1. a',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Remote Hydrogen rearrangement',
  rxnCode: 'eM@HzCzhcW\\@axADQbU`!fH@Oj@ eF@HhXqw@H^@QDXeX#Q^ a` Qt#!R@FL?XqwrO@ !RGUi| !R_rp]ngp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '3',
  description: 'Fig. 4.1. b',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Rearrangment d',
  rxnCode: 'gOpAIJUKua@@Gtt@!gOpAMJUKua@@D#q]gJp q\\oQp#!Ro`BWoXb}e?rW?I^}GPhB !Resv~@H`}epJW@kx@GShB',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.comptc.2016.07.018',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Rearrangment a',
  rxnCode: 'dnD@BLeJV|jfZih@`!gOpAGJTju`@@D#qTuYx qigSp#!RSF\\_iUMg_wy~_wy?G_I\\ !RgtXxCJvp_`Cbl@\\LG]kB',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.comptc.2016.07.018',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Radical resonance',
  rxnCode: 'gCaA@IRVXROtD_u@`!gCa@@dkPGtD_uD`#qbq qbq#!R_`BH@ha}GXhB !R@FL@[@AcG[i|',
  ionization: 'esi',
  reaction: 'Reaction',
  doi: '',
  section: '',
  description: '',
  kind: 'resonance',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Radical resonance',
  rxnCode: 'gCaA@IRVdCzCOzdP!gCaA@IRVXROtF_uL`#qbq qbq#!R@FL@[@AcGTj| !R_`BH?Ha}G[hB',
  ionization: 'esi',
  reaction: 'Reaction',
  doi: '',
  section: '',
  description: '',
  kind: 'resonance',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Radical H Rearrangment',
  rxnCode: 'eM@jXzCzXcV\\@`DSc@jd!eM@jXzCFlxA@HgFATh#Qg Qg#!ROvL@XqtJO@ !ROvL@XqtzO@',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Phosphonic acid fragmentation',
  rxnCode: 'gGPiHaxJ\\ddKU@_QYFEF@P@!gC`iHaxJX{PGrDKHsHpB@ eF@HhP#qqZl qq] Qd#!R[C|?XpAlXp@@Xqvr_@ !Ruwu~@Ha}G]k| !R@FL]~kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 41&42',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Phosphonic acid fragmentation',
  rxnCode: 'gGQiHlOASddeZhCyKM@!gCahHlOBNtA}aBcP eF@bXpP#qVLk qVa qk#!RPpAlGq}C@Fp@Pqvr_@ !RO^\\@OcvHG]i| !RY`@]^op',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 43',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Phosphonic acid fragmentation',
  rxnCode: 'gJQiHlOASGmPGrVZ@!gC`iHaxBX{PGtT@ fI@Gu`#qbqh qbM Qp#!Re{v~@Ky_bKt]Lgp !Re{v~@Hb}GYk| !RGWi|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 44',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Phosphonates fragmentation',
  rxnCode: 'gJQiHlOBSGmPGtd@!gCahHlOBOTA}I@ fHT`P#qbqh qbq qh#!Ruwu~@Gx?bGt]Lgp !Ruwu~@Ha}GUk| !RGWi|',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 59',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Phosphates fragmentation',
  rxnCode: String.raw`gNpYHlQxR\ddqZj@~Tap!gJPYHlQxRX}j@~TaP eF@HhP#qbuKx qbqh q{#!RXs|@Xs}l[@@@[@AcGPi| !Ruwu~@Gx?bGt]vgp !R@FL]Akp`,
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 37A&B',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Phosphates fragmentation',
  rxnCode: 'gGPYHlQxJTjmj`Ohh@!gCaiHlO@SGZ@` eFHBLGtP#IaLJa qbi IpP#!R[C|@[C}cXp@@Xqvr_@ !Ruwu~@Ha}GUk| !R@FL]~gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 38',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Phosphates fragmentation',
  rxnCode: 'gGPYHlQxJTjmj`OlhtF@!gJPXHlQxQ{TA}eF`p fHT`P#qqU\\ qqUX a`#!R[C|@[C}cXp@@Xqvr_@ !Ruwu~@Gx?bGt]vgp !RG_i|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 40',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Oxonium Resonance',
  rxnCode: 'eFH`fJGtQFDD@`!eFHhfLGuQFdD@`#QX Qd#!R@BL]bgp !R_vp]vop',
  ionization: 'esi',
  reaction: 'Reaction',
  doi: '',
  section: '',
  description: '',
  kind: 'resonance',
  web: 'https://en.wikipedia.org/wiki/Oxonium_ion',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Oxime-ethers fragmentation',
  rxnCode: 'gCiAHIJTt`_JPh@!eF``fJGtX eFHBJD#qbq qQ Ql#!R@Fp?[@AcGWK| !R@FL]Vgp !R@FL]^gp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 36',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ketones fragmentation',
  rxnCode: 'eMH`eIXOh`!fH@Oj@ eFHbfJD#Qg Qp Qd#!R@Fp@Xqwr_@ !RGUi| !R@FL]^kp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 31',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ketones fragmentation',
  rxnCode: 'eMH`eIXOh`!fHT`P eMHAIXOj`#qNP QP qN@#!R@Fp@Xqwr_@ !RGQi| !R@Fp@Xquz?@',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 32',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ionization',
  rxnCode: 'eFBCDcAcBQFIdT!eFBcDIcA}EqaHcD@#QX QX#!R@FL]bgp !R@FL]vgp',
  ionization: 'esi',
  reaction: 'ionization',
  doi: '',
  section: '5',
  description: 'Fig. 10',
  kind: 'ionization',
  web: 'https://www.orgchemboulder.com/Spectroscopy/MS/fragmech.shtml',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ionization',
  rxnCode: 'eF@HhP!eF@bXp_zi@#Qd Qd#!R@FL]Rkp !R@FL]vkp',
  ionization: 'esi',
  reaction: 'ionization',
  doi: '',
  section: '',
  description: '',
  kind: 'ionization',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Ionization',
  rxnCode: 'gC`@DkZ@qds`D@`!fH@H eM@fXvCFlxA@H@#qbq qH Qg#!RWvp@[@@cGWHB !RGYi| !RWrL@HqvzO@',
  ionization: 'esi',
  reaction: 'ionization',
  doi: '',
  section: '',
  description: '',
  kind: 'ionization',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Ionization',
  rxnCode: 'eF@H`Zp`!eF@bXp_U@#Qd QX#!R@FL]Rkp !R_rp]Vop',
  ionization: 'esi',
  reaction: 'ionization',
  doi: '',
  section: '',
  description: '',
  kind: 'ionization',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Ionization',
  rxnCode: 'fI@FL``D@!fIRPLYA@HjP#a` a`#!RGPi| !RG]i|',
  ionization: 'esi',
  reaction: 'ionization',
  doi: '',
  section: '',
  description: '',
  kind: 'ionization',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Ionization',
  rxnCode: 'eF@HpXp``D@!eF@bXpXt``D@#Qd QX#!R@FL]bgp !R_rp]Vop',
  ionization: 'esi',
  reaction: 'ionization',
  doi: '',
  section: '',
  description: '',
  kind: 'ionization',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Ionization',
  rxnCode: 'eFHBLGtP!gChaHDiRUhCzJ@#Qd QBP#!R@FL]Bgp !R@FL@[@AcGSj|',
  ionization: 'esi',
  reaction: 'ionization',
  doi: '',
  section: '',
  description: '',
  kind: 'ionization',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Ionization',
  rxnCode: 'fI@FMg@HAG~U@!eFJhrJXpXug@HA@#a` aP#!RGXi| !R@FL]Nkp',
  ionization: 'esi',
  reaction: 'Ionisation ',
  doi: 'https://doi.org/10.1186/1477-5956-10-S1-S8',
  section: '',
  description: '',
  kind: 'ionization',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ionization',
  rxnCode: 'fI@FMg@HAG~U@!eFJhtJXpXug@HA@#a` aP#!RGXi| !R_rp]Vop',
  ionization: 'esi',
  reaction: 'Ionisation ',
  doi: 'https://doi.org/10.1186/1477-5956-10-S1-S8',
  section: '',
  description: '',
  kind: 'ionization',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ionization',
  rxnCode: 'fI@FMg@HAG~U@!fIRPOjHv\\@`D@#a` a`#!RG\\i| !RGUi|',
  ionization: 'esi',
  reaction: 'ionization',
  doi: 'https://doi.org/10.1186/1477-5956-10-S1-S8',
  section: '',
  description: '',
  kind: 'ionization',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ionization',
  rxnCode: 'fI@GuD[N@PBO|j!fIS`L[N@PB@#a` a`#!RGZi| !RGUi|',
  ionization: 'esi',
  reaction: 'ionization',
  doi: 'https://doi.org/10.1186/1477-5956-10-S1-S8',
  section: '',
  description: '',
  kind: 'ionization',
  web: '',
  mode: 'negative',
  isbn: '',
  software: ''
}, {
  label: 'Ionization',
  rxnCode: 'fI@FMg@HAG~U@!eMjrX@fezN`~SjHug@HA@#a` aP#!RGPi| !R_qL@DquZo@',
  ionization: 'esi',
  reaction: 'ionization',
  doi: '',
  section: '',
  description: '',
  kind: 'ionization',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Inductive cleavages assisted by adjacent heteroatoms',
  rxnCode: 'gCaALIRfhCJAxsEpBG`D@!eFH`fJFLEpBG`D@ eF@Hp_Q@#qbq qJ Ql#!R[pL@@v}lGSI| !R@@L]Vgp !R@@L]^gp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '4.1',
  description: 'Fig. 7.1.2',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Inductive cleavages assisted by β-hydrogen removal',
  rxnCode: 'dayHBDxDeIYtjj@LhQHdU@!gCi@DDeZ@~b` gChA@IRVdCzB@#IyjH\\R@ IyjD qbq#!RtEsP_]A\\Og?P_]A\\tGt]|kp !R@DL@[@ACGSi| !R@DL@[@ACGXY|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '6.1.4',
  description: 'Fig 23 c.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Inductive cleavages assisted by β-hydrogen removal',
  rxnCode: 'gJPAMJTmTAeLhHcBW@H^@QNRO@!gC`AMJUm@_SQFXn@P|@b\\d^ fH@H#quQ` quT qH#!R@Fq_[@@cWrL]Lgp !R@BM_Hu}lGUi| !RGPY|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '4.1',
  description: 'Fig. 7.1.4',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Inductive cleavage',
  rxnCode: 'gChA@Icu@YPOYQ^`bNB\\GaHXECAjb@!fJ@FLgAx@ fHT`P#Q`P a` QP#!Rwg~PO[\\}G_H| !RGUi| !RGWi|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '6.1.1',
  description: 'Fig 22 a.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Inductive cleavage',
  rxnCode: 'eFH`fLFTOzLcBB@P!fI@GudYA@H@ fHT`P#Qd a` QP#!R@DL]\\gp !RG]i| !RGWi|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '6.1.1',
  description: 'Fig 22 a.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Inductive cleavage',
  rxnCode: 'eMhdYRRCJW}N@!fJ@D eFH`fND#Qg Qp Qd#!R@Fp@PquJ_@ !RGUi| !R@DL]^gp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '6.1.1',
  description: 'Fig 22 b.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Inductive cleavage',
  rxnCode: 'eMDaYRRCJW}LQeA@H@!fI@FL``D@ eFH`fND#Qg Qp Qd#!R@Fp@@qvJ_@ !RGUi| !R@@L]^gp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '6.1.1',
  description: 'Fig 22 b.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Inductive cleavage',
  rxnCode: 'diD@b@|@gIIETjji@NlRrJ@!gC`HAxQz`H eM@fXvB eF@HhP#IaLJfxY qan IF^ qS#!R@FMl@C}lXs|@[@Ac@Fp@Xqvr_@ !Ruwu~@Ha}GYk| !ROvL@XquzO@ !R@FL]Qkp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '7',
  description: 'Fig. 31',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Inductive cleavage',
  rxnCode: 'gGYALMJT}TpGRdX!gJY@DDefXB fHT`P#qnZa qnTH qX#!RbGwW_X`B_`BH_Qur?@ !RbGvH@gx@bGt]Nop !RG_i|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '7',
  description: 'Fig. 32 a.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Inductive cleavage',
  rxnCode: 'gCaA@IRmhCzZHpHHA@!eFH`fJGtQFDD@` eF@HhP#qqT qq Qd#!RWvp@[@@cG_I| !R@BL]vgp !R@BL]~kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '7.4.1.3.',
  description: 'Fig. 7.7',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: 'ISBN: 978-0-470-03310-4',
  software: ''
}, {
  label: 'Inductive cleavage',
  rxnCode: 'gGPiH`DZ\\ddJu@XsHp\\@!gC`iH`DBXzpD eF@HhXpcAp@#qVLk qVM qc#!R[C}c@@AlOvL@Xqvr_@ !Ruwu~@Ha}GYk| !R_rp]^gp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1002/rcm.9131',
  section: 'conclusion',
  description: 'scheme 1',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Inductive cleavage',
  rxnCode: 'eFH`fLG~hP!fI@G~i@ fHT`P#QX QP a`#!R_rp]\\gp !RGYi| !RGSi|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Inductive cleavage',
  rxnCode: 'eM@jXzCKGgW@!fHT`P eF@HhP#Q[ Qp Qd#!ROvL@Xqwro@ !RGUi| !R@FL]^kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Inductive cleavage',
  rxnCode: 'gBPAML^Jj@sfb`!gC`AMJUm@YqQP#qVL qTN#!R@GxBu}\\BG_I| !ROvp@[@AcGSi|',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Inductive cleavage',
  rxnCode: 'eM@jXzCfh!fHT`P eF@HhP#Q[ Qp Qd#!RGtL@Pqwro@ !RGUi| !R@DL]^kp',
  ionization: 'esi',
  reaction: 'ionization',
  doi: '',
  section: '',
  description: '',
  kind: 'ionization',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Inductive cleavage',
  rxnCode: 'eM@bXzCzhsT!fHT`P eF@HhP#Q^ a` Q\\#!R_qL@Dquro@ !RGYi| !R@AL]nkp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1093/chromsci/43.2.92',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Hydrogen rearrangment',
  rxnCode: 'gCaA@IRUhCzB@!eFHbfLGtP eF@HhP#qtQ Qx qQ#!R@FL@[@AcGPi| !R@FL]vkp !R@FL]^kp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Hydrogen rearrangment',
  rxnCode: 'eMH`eIhOhp!fH@H eFH`fJGtP#Qg Qp Qd#!R@Fp@XqtJ_@ !RGYi| !R@FL]ngp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Hydrogen rearrangment',
  rxnCode: 'gJQA@IRUZ`OhH@!eMH`eIdOhp eF@HhP#qTqh Q[ qM#!R@Fp@XpAl@FL]Bgp !R@Fp@Xqtz_@ !R@FL]~kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Hydrogen rearrangment',
  rxnCode: 'gCaA@IRVhCzC@!eFH`fJGtP eF@HhP#qTq QX qq#!R@FL@[@AcGPi| !R@FL]vgp !R@FL]~kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Hydrogen rearrangment',
  rxnCode: 'gJPaAaJTtlA@!eMHAITH eFH`fJGtP#qfUH qnH Qd#!Rb@KW@ha}_`@]lhH !R@Gx@_awZ_@ !R@FL]^gp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Hydrogen rearrangment',
  rxnCode: 'gJQAAIRgjPH!gJQA@IRgeaDp#qTnH qTnH#!ROvL@Xs}lOvL]\\kp !RbGwW_X`B_`@]nop',
  ionization: 'esi',
  reaction: 'CMF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Hydrogen rearrangment',
  rxnCode: 'gCaA@iRZhCzB@!fI@Gu` eM@fXvB#qJt qH Q[#!Ru?q~@M]}GSJB !RGUi| !ROvL@XquzO@',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Hydrogen rearrangment',
  rxnCode: 'eM@jXzB!fHT`P eF@HhP#Qg QP Qx#!R_qL@DqtJO@ !RGSi| !R@AL]fkp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Hydrogen rearrangment',
  rxnCode: 'gJPAEJUkTA@!eM@bXvB eF@HhP#qVah Q[ qi#!R_qL@DpAl@AL]bcp !R_qL@Dqvz_@ !R@AL]Vkp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Hydrogen rearrangment',
  rxnCode: 'eM@jXzCKGgW@!fHT`P eF@HhP#Q[ Qp Qd#!R_qL@Dqwro@ !RGUi| !R@AL]^kp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Hydrogen lost',
  rxnCode: 'eM@jXzCVd@!eO@bXyjCVT@#Q[ Qg#!R_qL@DquJO@ !R?`Bw@auZ?@',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Hydrogen elimination',
  rxnCode: 'gFpACJTj[ATA}C`!gFpAAJTjZ@@A@#qbqk qn\\J#!Rog~wOK_}m{vwOAurO@ !Rog~wOK_}m{vwOAuZO@',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '7.4.3.',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: 'ISBN: 978-0-470-03310-4',
  software: ''
}, {
  label: 'Halide Elimination',
  rxnCode: 'eMBGDchOjbLiDX`!fHfHA}QFRHq@ eF@HhP#Q[ Qp Qd#!ROvL@DqurO@ !RGUi| !R@BL]^kp',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 1',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'H Radical Lost',
  rxnCode: 'eF@bXp_QDXs`D@c~hP!fHd@AjP eF@bXhXqg@HA@#QX  QX#!R_rp]|gp !RGYi| !R_rp]ngp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Grob-Wharton',
  rxnCode: 'gNpaIYJU_MU@_JQXbh``DUA@H@!gCa@IGj@~dbLbB@P eMHjfM`~jHt``D@#qqWeX qqW qeX#!Ru{vHo[x@b@J~@Hb}GSK| !Ruwv~@Hb}GUi| !ROvL@HqwzO@',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '6.1.5',
  description: 'Fig. 24 a.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Grob-Wharton',
  rxnCode: 'gNxaLJIRU[jXCzZ@!eMH`eIxH eF`BJGtP eFHBND#q{iV` Qv qM q{#!R_c}~Oxa}b@I~@Ha}G]H\\ !R_wy?_awj_@ !R@FL]ngp !R@FL]Agp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '6.1.5',
  description: 'Fig. 24 b.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Grob-Wharton',
  rxnCode: 'gGPACJTkUPFtlUlxA@HlLG~r`!eN@HdH eF@HhXqg@HA@#qrLh qqh Qd#!R@FL?XpAlOvp@Xquro@ !RJW}yXQuZO@ !R@FL]Agp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '4.1',
  description: 'Fig. 7.1.5',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Formation of stabilized cations',
  rxnCode: 'daF@B@BTeeVz`@@B!gOpAMJUKua@@D fJRPH#IGfbdK@ q\\oQp ID#!Rmwrw_Wy?mwrw_[_}mwp]Dcp !Ru{u~@Hb}upKW@gx@GUhB !RG_i|',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 2',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Formation of stabilized cations',
  rxnCode: 'did@BLeJeWk``b@CzAbLMcApB@!gOpAMJUKua@@D eF@HhXqcApB@#IZJyBGI q\\oQp IFP#!Rquu^@Ha]q?sG?H`BW`BHWQur@` !Rquu^@Ha]q?sG?Ex@G]hB !R@Gt]Agp',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 2',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Formation of stabilized cations',
  rxnCode: 'dif@B@BTeYWaz@@@OhB@!gOpAMJUKua@@D eF`BND#Id^ZJPl q\\oQp IdP#!R_`A~@M\\Bu{u~@M\\BupI~@AuRh` !Ru{u~@Hb}upKW@gx@GUhB !R@FL]~gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 2',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Formation of stabilized cations',
  rxnCode: 'didHB@BTiyWaj@@@OhB@!gOpAMJUKua@@D eFHBLGtP#IGiZJPl q\\oQp IFP#!RuwvH_]_|uwu~@M_|u?q~@Awb@` !Ru{u~@Hb}upKW@gx@GUhB !R_rp]~gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 2',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Formation of stabilized cations',
  rxnCode: 'dmtDB@PIRY^UeVj@@@OhB@!gOpAMJUKua@@D gC``@deZ@`#IaLJfxYWP I[aJUt qbu#!R_`CW?Hc|uwvH_Xc|_c~H_Xb}_c|]LhH !Ruwu~@Ha}u?sW?Gx@GUhB !R@FL@[@AcGXY|',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 2',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ethers fragmentation',
  rxnCode: 'eMH`fN`~b@!fHT`P eFHBLGtP#Qg QP Ql#!ROvL@Xqur_@ !RGYi| !R@FL]ngp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 33',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ethers fragmentation',
  rxnCode: 'gCaA@IRfhCiQs{BIF`!eFH`fLGtX eF@HhP#qVa QX qN#!R@Fp?[@AcGPk| !R@FL]vgp !R@FL]~kp',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 34',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ethers fragmentation',
  rxnCode: 'eMH`fN`~RJ@!fH@Oj@ eFH`fJGtP#Q[ Qp QX#!ROvL@Xqvro@ !RGUi| !R@FL]ngp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 35',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ether/water elimination',
  rxnCode: 'gCa@@eMPFtWihb```DJFCX`!fI@GuDYA@H@ eF@HhP#Qdp a` Q\\#!R@Fq?[@@SG_K| !RG]i| !R@AL]~kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.3390%2Ftoxins6082580',
  section: '2.2',
  description: 'Fig. 3',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Ether/water elimination',
  rxnCode: 'gCaAHiRfhCZ[tTQTPPBMCAlp!fI@GuDYA@H@ eF@bXhP#Q[@ a` Qt#!R_qL@Xs}lG[J| !RG]i| !R_qp]^op',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.3390%2Ftoxins6082580',
  section: '2.2',
  description: 'Fig. 3',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Esters fragmentation',
  rxnCode: 'gC`a@aJRm@_PP!eMHAIhOh` eFH`fND#qbq qq@ Qd#!R@FL@[@AcG_I| !R@Fp@XqwZ_@ !R@FL]^gp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://dx.doi.org/10.1088/1468-6996/10/3/034602',
  section: 'Results',
  description: 'Fig. 5',
  kind: 'reaction',
  web: 'https://www.researchgate.net/figure/a-Chemical-structure-of-oxidative-reserpine-MW-6077-b-Post-source-decay_fig4_26637371',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Esters fragmentation',
  rxnCode: 'gJPa@eJSKTA}E@!eMHbeIXH eFHBLGtX#qrLh Qv qM#!R@W~GKVQuazH]Lep !R@W|LEQvZw@ !R_tP]^op',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 11',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Esters fragmentation',
  rxnCode: 'gGPa@eJSNuPGtT@!gC`a@eJSM@_QX eF@HhP#satpj satp qi#!RbOrHo[x@b@JHoQtJ`` !RbOrHo[x@GSjB !R_tp]~op',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 12',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Esters fragmentation',
  rxnCode: 'gGPa@eJSNuPGtT@!gC``@dfZ@~b` eF@bXpP#qbqk qbq qk#!RbOrHo[x@b@JHoQwr`` !RbOrHo[x@GSjB !R@BL]~gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 13',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Esters fragmentation',
  rxnCode: 'gGPa@eJSJuPGtT@!gC``@deZ@` eF@bXpP#qbqk qbu qK#!Ro`BW?Hc|e{vHoQtr`` !R@BL@[@@cGSi| !R_tp]^gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 14',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Esters fragmentation',
  rxnCode: 'gJPa@eJSKTA}E@!eMHAITH eFH`fLGtX#qbqh qbH qu#!R|Gwp_Gy?|Gt]|cp !R_wy?_atZ_@ !R@FL]~gp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 15',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Elimination (missing source)',
  rxnCode: 'eM`AIhOdq`!fJ@Gup eF@HhP#Qv Qp Qd#!R_rq?Dqvr_@ !RG]i| !R@FL]^kp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'To check',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Elimination',
  rxnCode: 'eMHAIhOdm`!fI@Guh eF@HhP#Qg a` Qt#!R@Fp@HqvJ_@ !RG]i| !R@BL]^kp',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 1',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Elimination',
  rxnCode: 'gC`@Dij@~b`!eF@Hp_Q@ eF@HhP#qVa qq Qd#!R@Fp?[@AcG_HB !R@FL]vgp !R@FL]^kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.jpha.2016.04.008',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Electron Sharing',
  rxnCode: 'gCaAAIRVdCzB@!gCaA@IRUdCzB@#qbq qbq#!R@FL@[@AcGTj| !R@FL@[@AcG[i|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Double cleavage',
  rxnCode: 'gJPaAaJTkTHGyZCDTDD@cHHA@!eMDiicXOfabKHHAB``D@ eF@HhP#qbqh qTH qu#!RepJH@kx@bKt]LhH !ROvL@HqwZO@ !R@BL]Akp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '7.4.3.',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: 'ISBN: 978-0-470-03310-4',
  software: ''
}, {
  label: 'Double cleavage',
  rxnCode: 'gChA@IRmhCzB@!eF``fJGtX eF@HhP#qTq QX qq#!ROvp@[@AcG_I| !R@FL]Vgp !R@FL]^kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '7.4.3.',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: 'ISBN: 978-0-470-03310-4',
  software: ''
}, {
  label: 'Double cleavage',
  rxnCode: 'gJXA@IRmZ`OdHL@!eM`bfN`~b@ eF@HhP#qTqh Q^ qi#!ROvL@XpAl@FL]Bkp !ROvL@XqwZo@ !R@FL]Akp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: '',
  section: '7.4.3.',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: 'ISBN: 978-0-470-03310-4',
  software: ''
}, {
  label: 'Double cleavage',
  rxnCode: 'gChA@Icu@_PP!fH@H eM``fM`~b@#qTq qH Q[#!Ruwu~@Ha}GWK| !RGYi| !ROvL@Xqvz_@',
  ionization: 'esi',
  reaction: 'CMF',
  doi: '',
  section: '7.4.3.',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: 'ISBN: 978-0-470-03310-4',
  software: ''
}, {
  label: 'Dithiophosphates fragmentation',
  rxnCode: 'gGPmLPDSpPPiRZVj@~b`!gJPlLPDSpPPdtu@_QP fHT`P#qbqk qbqh qX#!RXp@@[C}cXp@@XqvrP` !RbOq~@Gx?bGt]v`H !RGWi|',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 52',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Dithiophosphates fragmentation',
  rxnCode: 'gGPmLPDSpPPiRZVj@~b`!gC`eE`DSpdiLtA@ eFB@HcA}D@#qbqk qbM qs#!RXp@@[C}cXp@@XqtrP` !RbOq~@Ha}G]jB !R@FL]~gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 53',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Dithiophosphates fragmentation',
  rxnCode: 'gGPmLPDSpPPiRZVj@~b`!gJPmLPDSpPQIRZV`H fH@Oj@#q`qk qpeH qX#!RXp@@[C}cXp@@XqtrP` !RbOq~@Gx?bGt]v`H !RG_i|',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 54',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Displacement reaction ',
  rxnCode: 'gCaALiRfhCJIxsHHADxH\\!fH@H eOH`fNZ`qaA@HgLN#qbq Qp qJ`#!R@Fq_[@@cG_K| !RGUi| !Rog~w?Quzo@',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '4.1',
  description: 'Fig. 7.1.3 a.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Displacement reaction ',
  rxnCode: 'gJXA@YRgj`LhWmEFJFB\\TOlP!fH@H eO`BNZ`sfG@#qJDp Qp qJ`#!RWrL@Hu}lWrL]lkp !RG]i| !Rog~w?QuzO@',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '4.1',
  description: 'Fig. 7.1.3 a.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Displacement reaction ',
  rxnCode: 'gJPACJUkTAeB|YBXN@PBIqQx!gBPAML^Jj@qfI`xA@HgMG` fH@H#qTnH qVl qH#!RWrL@HpAl@BL]|cp !R@K{|ey\\BG]i| !RG_i|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '4.1',
  description: 'Fig. 7.1.3 b.',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Displacement Reaction b.',
  rxnCode: 'gJXA@IRUjPH!eM@fXvB eF`BLGtP#qlVH qrH ql#!R@Fp@XpAl@FL]Bgp !ROvL@XqwZO@ !R@FL]~gp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '4.1',
  description: 'Fig. 7',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Displacement Reaction b.',
  rxnCode: 'gJQABYRmZ`LXTD@`!eM@fXvB eFH`fLGtQFDD@`#qMr` qNh Qd#!R@BL?Xs|\\OvL]xcp !RWrL@HquZO@ !R@BL]~gp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '4.1',
  description: 'Fig. 7',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Displacement Reaction a.',
  rxnCode: 'gGYADEJSLuPGtT_nlK|!gChA@Icu@_PP eFHBND#qtSi qQ] Qx#!RbGvH@gx?_`BH_QtJo@ !Ruwu~@Ha}GUk| !R@FL]^gp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '7.1.3',
  description: 'Fig. 22 c. ',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Dioxolane fragmentation',
  rxnCode: 'dclDB@iYRfUw\\kahHBj@CzI`!eFHBJD deTHB@RTfU]ih@I`Hz~`H@#IzAQirbWS IdP IzD[JI]L#!RIm~?ck^}|KuMswy?_g?po_B}|GspoQwR{@ !R@FL]fgp !RbOq~@Ha}b@JH@ha}bGvH?Ha}GXZB',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1002/jms.1963',
  section: '',
  description: 'Fig. 4',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Dioxolane fragmentation',
  rxnCode: 'detDB@jYRfUwJxZB@h@H!eFHBJD daDHB@RTfUVyiZPB#IaLJfxYT Ql IXdziEP#!RIm~?ck^}|KuMswy?_g?po_B}GSKl !R@FL]fgp !RBGvh[AF?HBVDj?Jo@MX]Aep',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C3AY40543E',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'DB rearrangement',
  rxnCode: 'eM@HvCzX@!eM@HvCzX@#Q[ Q^#!ROvL@XqvJO@ !R@FL?XqtzO@',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.jpha.2016.04.008',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Cycloreversion',
  rxnCode: 'gFp@DiTvjhB!eF@HhP eF@HhP eF@HhP#qbqk qn qY Qd#!R_g~w_K_}mwvw_AvRO@ !R@FL]Fkp !R@FL]Nkp !R@FL]~kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '3',
  description: 'Fig. 4.7',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Cyclization',
  rxnCode: 'eM@jXzCNhh!eO@bXyjCNXh#Q[ Qg#!R_qL@DquJO@ !R?g~w?QuZo@',
  ionization: 'esi',
  reaction: 'CRF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Charge Stabilization',
  rxnCode: 'gCaAAIRVdCzB@!gCaAAiRVXROtD@#qbq qbq#!R@AL@[@@SGRj| !R?`BH@hc}GShB',
  ionization: 'esi',
  reaction: 'CMF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Charge Remote Fragmentation',
  rxnCode: 'gC`@Dij@~RcP!eF@HhP eF@HhP#qqb Ql qJ#!R@Fp?[@AcGXk| !R@FL]vkp !R@FL]^kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '3',
  description: 'Fig. 4.5',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Carbamates fragmentation',
  rxnCode: 'gJXaLDiRYZ`Ohh@!eMhdiRVB eFHBLGtP#qbqh qbH qu#!R|Owp_Gy?|Gt]|mp !R@Fp@XqwZ?@ !R@FL]~gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 16A & B',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Carbamates fragmentation',
  rxnCode: 'gJXaLDiRYZ`Ohh@!eMhDRUB eFH`fLGtX#qbqh qbH qu#!R|Gwp_Gy?|Gt]|mp !R_wy?_atZ_@ !R@FL]~gp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 17',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Carbamates fragmentation',
  rxnCode: 'gGXaLDiRYvj@~b`!gChaLDiRYhCzK@ eF@HhP#IaLJa qbq IF`#!Rwg~Pw[_]dArP_Qwrw@ !RdKw^_yA\\GSk\\ !R_wP]^op',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 18',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'COOH loss',
  rxnCode: 'gOxaBDYR[fmjj@pb}C@!gBXA@IReYj@` eMDARVCzX@#qbqkx qi{ Qg#!RbOp~@H`}HMkZK}hoGPhB !RO`@@O`@~GUhB !R_pq?Dqvz?@',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1038/s41598-019-42777-8',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'CO loss',
  rxnCode: 'gOxaBDYR[fmjj@pb}C@!gJYABCJRkTA}C@ eFHPfzND#qbqkx qq_h Qd#!RypKgOSx@iJSKiLndG^KB !R_pq?Dw|L_qL]zop !R_pp]~op',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1038/s41598-019-42777-8',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'CO elimination',
  rxnCode: 'gCa@@dsPFRTZ@!eFHPfzND eF@HpYIE@#qJf qJ Ql#!RbOq~@Ha}G_JB !R@FL]Vkp !R@FL]^kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '3',
  description: 'Fig. 4.8',
  kind: 'reaction',
  web: '',
  mode: 'negative',
  isbn: '',
  software: ''
}, {
  label: 'CO elimination',
  rxnCode: 'gOq@@drm[UTA@!gKP@Di\\Zj@` eFHBND#qbqkx qY~h Qd#!RbOvH?Oy?bOvH__y?GPi\\ !R?g|_Fa}eTv\\]fcp !R@AL]^gp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '3',
  description: 'Fig. 4.8',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'CO Elimination',
  rxnCode: 'gCaA@IRWhCZZLtLG~s@!fHT`P eFHPfzND#Qg@ Qp Qd#!R_g}~_?A}G_H\\ !RGYi| !R@FL]nkp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Beta Remote Hydrogen rearrangment ',
  rxnCode: 'gGPACJTkUPD!gJPACJUkTA@ fH@Oj@#qrLk qTqh qX#!R@AM?DpAl_vp@Dqtr_@ !R_qL@DpAl@AL]~cp !RGYi|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: '',
  section: '',
  description: '',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: 'Mass-Frontier'
}, {
  label: 'Aromatic elimination',
  rxnCode: 'ded@@DiUUeiZ@hTZfh!gFp@DiTt@@B gC`@DiZDC@#IpdjFGiT qcUq IGiT#!RbGvw_X`B?g?~@K]}b@K~_?x@GWJ| !R?g~w@k_}m?vw@avZO@ !Rb@K~_xc}GPZ|',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.6',
  description: 'Fig. 16',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'Aminothiophosphates fragmentation',
  rxnCode: 'gGXiMDOCSddajXCFEA@H@!gC`iHaxBX}HFLrB@P eF`BLD#qbqk qbu qK#!RXp@?XpAl[C|@Xqvr_@ !Ruwu~@Ha}GUk| !R@FL]~gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 55',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Aminothiophosphates fragmentation',
  rxnCode: 'dazDbLa@|LeJi~ij@OdrNbLD``D@!gC`hHaxQvPOhHcL``D@ eF``fLGtX eF@HxP#IaLJnXP qbu qK IxP#!R@FMc@C}c[@@@[C}l@FL]top !Ruwu~@Ha}GUk| !R@FL]~gp !R@FL]Qkp',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 56',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Aminothiophosphates fragmentation',
  rxnCode: 'gNxiMDOCSddauSPGrtNHphHA@!gJXiMDOCSGuHGtvQaPPB@ eF@HhP#qbqkx qbqh q_#!R[@@?[@AcXs|@[@AcG_I| !Ruwu~@Gx?bGt]Ngp !R@FL]Akp',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 57',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Aminosulphate fragmentation',
  rxnCode: 'gGXiMD@cSddaVhCz[@!gC`iH`DBXzpD eF`BLGtX#qqj\\ qqk QX#!R[@ACGq}l@DL_PqwR_@ !RysvHOSx@GYk| !R_pp]^op',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 63',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Aminosulphate fragmentation',
  rxnCode: 'gGXiMD@cSddaVhCy[C@!gC`hH`DQuPH eF``fLGt\\#qbqk qbu qK#!R[C}c@@AlOvL@Xqvr_@ !Ruwu~@Ha}GYk| !R@FL]^gp',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 64',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Aminodithiophosphate fragmentation',
  rxnCode: 'gGYMC`DSphPIRfji@~`bLjB@P!gCiEEAxXHDqzPLYdD@` eFB@HcA}D@#qrYl qQl qs#!ROvL@Xs}cXpAlOqwRO@ !R_`BH_]]}GUk| !R@FL]~gp',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 58',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Amines fragmentation',
  rxnCode: 'gChA@IRfhB!eF`BLD eF@bXpP#qLZ qK Qd#!RpDp^_|B]GPj| !R@Kt]Vgp !R_qP]nop',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 3',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Amines fragmentation',
  rxnCode: 'gChA@IRfhCyBM@!eF``fLGtX eF@HhP#qbq Ql qQ#!R@Fp?[@AcGPi| !R@FL]vgp !R@FL]~kp',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 4 ',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Amines fragmentation',
  rxnCode: 'gJXA@IRij`OhH@!gChA@Icm@P fH@Oj@#qrM` qri a`#!Ruwu~@Ha}upH]Lop !Ruwu~@Ha}GUk| !RGWi|',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 5',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Amides fragmentation',
  rxnCode: 'gGYADEJSNuPD!gCiADEJSM@_QP eF@HhP#qbq_ qbq q{#!RbOrH_Wx@b@JH_QvJ@` !RbOq~@Ha}GSjB !R@FL]~kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 10',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Amides fragmentation',
  rxnCode: 'gJYADEJSKTAkLh!eMHbeIXH eF`BLFlJ@#qbqh qbH qu#!RxCw`[Ey?xEt]Bcp !R@Fp@?QwZ?@ !R@Gt]^gp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 6',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Amides fragmentation',
  rxnCode: 'gJYADEJSKTAkLh!eMHAITH eF``fLGtQVE@#qbqh qbH qu#!R|Gwp_Gy?|Gt]|cp !R_wy?_atZ_@ !R@FL]^gp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 7',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Amides fragmentation',
  rxnCode: 'gCiADEJSM@P!fHT`P eMhDRVB#qbq qH Qg#!RbOq~@Ha}G_JB !RGQi| !R@Fp@Xquz_@',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 8',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Amides fragmentation',
  rxnCode: 'gJYADEJSKTA@!gCi@DDfZ@` fHT`P#qbsH qbs qH#!R|Owp_Gy?|Gt]Bcp !RbOq~@Ha}G]jB !RGWi|',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 9',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Acyl urea fragmentation',
  rxnCode: 'dayDBDpFRTfUfjX@~QLr@!gJU@E`dru@_SX eMHbeIXH#IZbyAr@ IZnHP Qv#!Ro`BW?Hc|e{vHo[y_e?p]ThH !Ro`BH?I_|bKt]vhH !R_tq?Dqwz?@',
  ionization: 'esi,ei',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 28',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Acyl urea fragmentation',
  rxnCode: 'gGTaEaUJSNuHGrVZ@!eMhdYRVCz^@ eMhDRUB#qyuS qZp qyh#!RbOrH_Wx@b@JH_Qur`` !R@Fp@XqwZ_@ !R_wy?_auz_@',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 29',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: 'Acyl urea fragmentation',
  rxnCode: 'dayDBDpFRTf[VjX@~QHr@!gGTaEaUJSNuHGrVZ@ eF@HhP#IaLJfEP IaLJa IU`#!Rb@JH_Wx@_c~H@m]}bGt]|gp !RbOrH_Wx@b@JH_Qvz`` !R@FL]Akp',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 30',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}, {
  label: '1,5-shift',
  rxnCode: 'gJP@DiYXRWtL@!gJP@DiYXRWtL@#qbqh qfUH#!ROvp@[C}c@FL]Bop !R@Fp?[@AcOvL]nop',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '3',
  description: 'Fig. 4.7',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: '1,4-elimination',
  rxnCode: 'gC`@Dij@~RcP!eF@HhP eF@HhP#qVa Qd qq#!R@Fp?[@AcGXk| !R@FL]vkp !R@FL]^kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.5',
  description: 'Fig 15 a.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: '1,4-elimination',
  rxnCode: 'gC``Adej@~PcP!eFHBJD eFHBJD#qtQ qJ Qx#!R@FL@[@AcGTj| !R@FL]vgp !R@FL]^gp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.5',
  description: 'Fig 15 c.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: '1,4-elimination',
  rxnCode: 'gCa@@dmPGrDZ@!eFHBJD eF@HhP#qNT qN Qd#!R_rq?Dw|lGSK| !R@FL]vgp !R@FL]~kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.5',
  description: 'Fig 15 d.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: '1,3-shift',
  rxnCode: 'gJP@DiYXRWtL@!gJP@DkVdCzJ@#qqU` qTqh#!R@Fp?[@AcOvL]\\op !ROvL@XpAl@FL]ncp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '3',
  description: 'Fig. 4.7',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: '1,3-elimination',
  rxnCode: 'gCa@@dmPGrDZ@!eFHBJD eF@HhP#qTq QX qq#!R@FL@[@AcGTj| !R@FL]vgp !R@FL]~kp',
  ionization: 'esi',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '5.5',
  description: 'Fig 15 b.',
  kind: 'reaction',
  web: '',
  mode: 'positive,negative',
  isbn: '',
  software: ''
}, {
  label: 'α-Elimination',
  rxnCode: 'eM@ghzCFZXN@P|@`!fHW@P eF@HhXqSApBG`D@#Q^ Qp Qd#!R_qL@DqwrO@ !RG[i| !R@AL]Vgp',
  ionization: 'esi',
  reaction: 'CMF',
  doi: 'https://doi.org/10.1039/C5NP00073D',
  section: '4.1',
  description: 'Fig. 7.1.4',
  kind: 'reaction',
  web: '',
  mode: 'negative',
  isbn: '',
  software: ''
}, {
  label: 'Aminosulphate fragmentation',
  rxnCode: 'dcMDbLvD@Hr\\ddJfRtjmP@P@_If[@!eF``fLGt\\ deVD`Ia@BLdabRwBkRs@D#IaLJf{QVS qK IaLkmEYL#!R@m]}ux`BupJH_]]}_`CW?M\\B_`CW?Avb`` !R@FL]fgp !Ruwu~@Ha}bOq~Oxa}bKu~Oxa}GXX|',
  ionization: 'esi,ei',
  reaction: 'CRF',
  doi: 'https://doi.org/10.1016/j.ijms.2010.10.024',
  section: 'Table 1',
  description: 'Rule 64',
  kind: 'reaction',
  web: '',
  mode: 'positive',
  isbn: '',
  software: ''
}];

Object.defineProperty(getDatabase$1, "__esModule", {
  value: true
});
getDatabase$1.getDatabase = getDatabase;
const openchemlib_utils_1$1 = require$$2;
const defaultDatabase_js_1 = defaultDatabase;
/**
 * @description Get the default databases of reactions for positive and negative mode
 * @param {Object} options - Options for database selection
 * @param {('ionization'|'resonance'|'reaction')[]} [options.kind=['ionization','resonance','reaction']] - The kind of database to be used
 * @param {('esi'|'ei')[]} [options.ionizations=['esi','ei']] - The ionization technique to be used
 * @param {('positive'|'negative')[]} [options.modes=['positive','negative']] - The ionization mode to be used
 * @param {string} [options.dwar] - The dwar file to use. Default will use an included mass fragmentation database
 * @returns
 */
function getDatabase(options = {}) {
  const {
    kind = ['ionization', 'resonance', 'reaction'],
    ionizations = ['esi', 'ei'],
    modes = ['positive', 'negative'],
    dwar
  } = options;
  const fullDatabase = dwar ? (0, openchemlib_utils_1$1.parseDwar)(dwar).data : defaultDatabase_js_1.defaultDatabase;
  const database = fullDatabase.filter(entry => kind.some(k => entry.kind.includes(k)) && ionizations.some(ik => entry.ionization.split(',').includes(ik)) && modes.some(m => entry.mode.split(',').includes(m)));
  return database;
}

var getMasses$1 = {};

Object.defineProperty(getMasses$1, "__esModule", {
  value: true
});
getMasses$1.getMasses = getMasses;
/**
 * @description get array of mz from fragmentation nodes
 * @param {Array} nodes valid nodes of fragmentation process
 * @returns {Array}  array of unique mz values

 */
function getMasses(nodes) {
  let masses = {};
  for (const node of nodes) {
    for (let molecule of node.molecules) {
      if (molecule.info.mz) {
        if (!masses[molecule.info.mz]) {
          masses[molecule.info.mz] = {
            ...molecule.info,
            molecules: [],
            minDepth: node.depth
          };
        }
        masses[molecule.info.mz].molecules.push({
          idCode: molecule.idCode,
          molfile: molecule.molfile,
          depth: node.depth
        });
        if (masses[molecule.info.mz].minDepth > node.depth) {
          masses[molecule.info.mz].minDepth = node.depth;
        }
      }
    }
  }
  return Object.values(masses);
}

var __importDefault$3 = reactionFragmentation$1 && reactionFragmentation$1.__importDefault || function (mod) {
  return mod && mod.__esModule ? mod : {
    "default": mod
  };
};
Object.defineProperty(reactionFragmentation$1, "__esModule", {
  value: true
});
reactionFragmentation$1.reactionFragmentation = reactionFragmentation;
const mf_parser_1$7 = src$h;
const openchemlib_1 = __importDefault$3(require$$1$1);
const openchemlib_utils_1 = require$$2;
const getDatabase_1 = getDatabase$1;
const getMasses_1 = getMasses$1;
/**
 * @description Fragment a molecule by applying reactions from a custom database of reactions
 * @param {import('openchemlib').Molecule} oclMolecule - The OCL molecule to be fragmented
 * @param {Object}  [options={}]
 * @param {('esi'|'ei')[]}  [options.ionizations=['esi']] - The ionization technique to be used
 * @param {('positive'|'negative')[]}  [options.modes=['positive']] - The ionization mode to be used
 * @param {number}  [options.maxDepth=5] - The maximum depth of the overall fragmentation tree
 * @param {number}  [options.limitReactions=200] - The maximum number of reactions to be applied to each branch
 * @param {string}  [options.dwar] - The dwar entry to be used, if not provided, the default one will be used
 * @param {number}  [options.maxIonizations=1] - The maximum depth of the ionization tree
 * @param {number}  [options.minIonizations=1] - The minimum depth of the ionization tree
 * @param {number}  [options.minReactions=0] - The minimum depth of the reaction tree
 * @param {number}  [options.maxReactions=3] - The maximum depth of the reaction tree
 * @returns {object} In-Silico fragmentation results with the following properties:
 * - masses: array of monoisotopic masses
 * - trees: array of fragmentation trees
 * - validNodes: nodes without dead branches
 */
function reactionFragmentation(oclMolecule, options = {}) {
  const {
    ionizations = ['esi'],
    modes = ['positive'],
    dwar,
    maxDepth = 5,
    limitReactions = 200,
    minIonizations = 1,
    maxIonizations = 1,
    minReactions = 0,
    maxReactions = 3
  } = options;
  const reactions = new openchemlib_utils_1.Reactions(openchemlib_1.default, {
    moleculeInfoCallback: molecule => {
      // @ts-ignore
      const mf = (0, openchemlib_utils_1.getMF)(molecule).mf;
      const mfInfo = new mf_parser_1$7.MF(mf).getInfo();
      return {
        mf,
        mw: mfInfo.mass,
        em: mfInfo.monoisotopicMass,
        mz: mfInfo.observedMonoisotopicMass,
        charge: mfInfo.charge
      };
    },
    maxDepth,
    limitReactions,
    skipProcessed: true
  });
  reactions.appendHead([oclMolecule]);
  reactions.applyOneReactantReactions((0, getDatabase_1.getDatabase)({
    kind: ['ionization'],
    ionizations,
    modes,
    dwar
  }), {
    min: minIonizations,
    max: maxIonizations
  });
  const reactionDb = (0, getDatabase_1.getDatabase)({
    kind: ['reaction'],
    ionizations,
    modes,
    dwar
  });
  for (let i = 1; i <= maxReactions; i++) {
    let min = 1;
    if (minReactions < i + 1) {
      min = 0;
    }
    reactions.applyOneReactantReactions(reactionDb, {
      min,
      max: 1
    });
  }
  const trees = reactions.trees;
  const validNodes = reactions.getValidNodes();
  const masses = (0, getMasses_1.getMasses)(validNodes);
  return {
    trees,
    validNodes,
    masses,
    reactions
  };
}

var getFragmentationSVG$1 = {};

var jsxRuntime = {exports: {}};

var reactJsxRuntime_production = {};

/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var REACT_ELEMENT_TYPE$2 = Symbol.for("react.transitional.element"),
  REACT_FRAGMENT_TYPE$2 = Symbol.for("react.fragment");
function jsxProd(type, config, maybeKey) {
  var key = null;
  void 0 !== maybeKey && (key = "" + maybeKey);
  void 0 !== config.key && (key = "" + config.key);
  if ("key" in config) {
    maybeKey = {};
    for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
  } else maybeKey = config;
  config = maybeKey.ref;
  return {
    $$typeof: REACT_ELEMENT_TYPE$2,
    type: type,
    key: key,
    ref: void 0 !== config ? config : null,
    props: maybeKey
  };
}
reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE$2;
reactJsxRuntime_production.jsx = jsxProd;
reactJsxRuntime_production.jsxs = jsxProd;

{
  jsxRuntime.exports = reactJsxRuntime_production;
}
var jsxRuntimeExports = jsxRuntime.exports;

var reactDom = {exports: {}};

var reactDom_production = {};

var react = {exports: {}};

var react_production = {};

/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var REACT_ELEMENT_TYPE$1 = Symbol.for("react.transitional.element"),
  REACT_PORTAL_TYPE$2 = Symbol.for("react.portal"),
  REACT_FRAGMENT_TYPE$1 = Symbol.for("react.fragment"),
  REACT_STRICT_MODE_TYPE$1 = Symbol.for("react.strict_mode"),
  REACT_PROFILER_TYPE$1 = Symbol.for("react.profiler"),
  REACT_CONSUMER_TYPE$1 = Symbol.for("react.consumer"),
  REACT_CONTEXT_TYPE$1 = Symbol.for("react.context"),
  REACT_FORWARD_REF_TYPE$1 = Symbol.for("react.forward_ref"),
  REACT_SUSPENSE_TYPE$1 = Symbol.for("react.suspense"),
  REACT_MEMO_TYPE$1 = Symbol.for("react.memo"),
  REACT_LAZY_TYPE$1 = Symbol.for("react.lazy"),
  REACT_ACTIVITY_TYPE$1 = Symbol.for("react.activity"),
  MAYBE_ITERATOR_SYMBOL$1 = Symbol.iterator;
function getIteratorFn$1(maybeIterable) {
  if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
  maybeIterable = MAYBE_ITERATOR_SYMBOL$1 && maybeIterable[MAYBE_ITERATOR_SYMBOL$1] || maybeIterable["@@iterator"];
  return "function" === typeof maybeIterable ? maybeIterable : null;
}
var ReactNoopUpdateQueue = {
    isMounted: function () {
      return false;
    },
    enqueueForceUpdate: function () {},
    enqueueReplaceState: function () {},
    enqueueSetState: function () {}
  },
  assign$1 = Object.assign,
  emptyObject = {};
function Component(props, context, updater) {
  this.props = props;
  this.context = context;
  this.refs = emptyObject;
  this.updater = updater || ReactNoopUpdateQueue;
}
Component.prototype.isReactComponent = {};
Component.prototype.setState = function (partialState, callback) {
  if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
  this.updater.enqueueSetState(this, partialState, callback, "setState");
};
Component.prototype.forceUpdate = function (callback) {
  this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
};
function ComponentDummy() {}
ComponentDummy.prototype = Component.prototype;
function PureComponent(props, context, updater) {
  this.props = props;
  this.context = context;
  this.refs = emptyObject;
  this.updater = updater || ReactNoopUpdateQueue;
}
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
pureComponentPrototype.constructor = PureComponent;
assign$1(pureComponentPrototype, Component.prototype);
pureComponentPrototype.isPureReactComponent = true;
var isArrayImpl$1 = Array.isArray;
function noop$4() {}
var ReactSharedInternals$2 = {
    H: null,
    A: null,
    T: null,
    S: null
  },
  hasOwnProperty$1 = Object.prototype.hasOwnProperty;
function ReactElement(type, key, props) {
  var refProp = props.ref;
  return {
    $$typeof: REACT_ELEMENT_TYPE$1,
    type: type,
    key: key,
    ref: void 0 !== refProp ? refProp : null,
    props: props
  };
}
function cloneAndReplaceKey(oldElement, newKey) {
  return ReactElement(oldElement.type, newKey, oldElement.props);
}
function isValidElement(object) {
  return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE$1;
}
function escape(key) {
  var escaperLookup = {
    "=": "=0",
    ":": "=2"
  };
  return "$" + key.replace(/[=:]/g, function (match) {
    return escaperLookup[match];
  });
}
var userProvidedKeyEscapeRegex = /\/+/g;
function getElementKey(element, index) {
  return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
}
function resolveThenable(thenable) {
  switch (thenable.status) {
    case "fulfilled":
      return thenable.value;
    case "rejected":
      throw thenable.reason;
    default:
      switch ("string" === typeof thenable.status ? thenable.then(noop$4, noop$4) : (thenable.status = "pending", thenable.then(function (fulfilledValue) {
        "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
      }, function (error) {
        "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
      })), thenable.status) {
        case "fulfilled":
          return thenable.value;
        case "rejected":
          throw thenable.reason;
      }
  }
  throw thenable;
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
  var type = typeof children;
  if ("undefined" === type || "boolean" === type) children = null;
  var invokeCallback = false;
  if (null === children) invokeCallback = true;else switch (type) {
    case "bigint":
    case "string":
    case "number":
      invokeCallback = true;
      break;
    case "object":
      switch (children.$$typeof) {
        case REACT_ELEMENT_TYPE$1:
        case REACT_PORTAL_TYPE$2:
          invokeCallback = true;
          break;
        case REACT_LAZY_TYPE$1:
          return invokeCallback = children._init, mapIntoArray(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback);
      }
  }
  if (invokeCallback) return callback = callback(children), invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl$1(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function (c) {
    return c;
  })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(callback, escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex, "$&/") + "/") + invokeCallback)), array.push(callback)), 1;
  invokeCallback = 0;
  var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
  if (isArrayImpl$1(children)) for (var i = 0; i < children.length; i++) nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);else if (i = getIteratorFn$1(children), "function" === typeof i) for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done;) nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);else if ("object" === type) {
    if ("function" === typeof children.then) return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback);
    array = String(children);
    throw Error("Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead.");
  }
  return invokeCallback;
}
function mapChildren(children, func, context) {
  if (null == children) return children;
  var result = [],
    count = 0;
  mapIntoArray(children, result, "", "", function (child) {
    return func.call(context, child, count++);
  });
  return result;
}
function lazyInitializer(payload) {
  if (-1 === payload._status) {
    var ctor = payload._result;
    ctor = ctor();
    ctor.then(function (moduleObject) {
      if (0 === payload._status || -1 === payload._status) payload._status = 1, payload._result = moduleObject;
    }, function (error) {
      if (0 === payload._status || -1 === payload._status) payload._status = 2, payload._result = error;
    });
    -1 === payload._status && (payload._status = 0, payload._result = ctor);
  }
  if (1 === payload._status) return payload._result.default;
  throw payload._result;
}
var reportGlobalError$1 = "function" === typeof reportError ? reportError : function (error) {
    if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
      var event = new window.ErrorEvent("error", {
        bubbles: true,
        cancelable: true,
        message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
        error: error
      });
      if (!window.dispatchEvent(event)) return;
    } else if ("object" === typeof process && "function" === typeof process.emit) {
      process.emit("uncaughtException", error);
      return;
    }
    console.error(error);
  },
  Children = {
    map: mapChildren,
    forEach: function (children, forEachFunc, forEachContext) {
      mapChildren(children, function () {
        forEachFunc.apply(this, arguments);
      }, forEachContext);
    },
    count: function (children) {
      var n = 0;
      mapChildren(children, function () {
        n++;
      });
      return n;
    },
    toArray: function (children) {
      return mapChildren(children, function (child) {
        return child;
      }) || [];
    },
    only: function (children) {
      if (!isValidElement(children)) throw Error("React.Children.only expected to receive a single React element child.");
      return children;
    }
  };
react_production.Activity = REACT_ACTIVITY_TYPE$1;
react_production.Children = Children;
react_production.Component = Component;
react_production.Fragment = REACT_FRAGMENT_TYPE$1;
react_production.Profiler = REACT_PROFILER_TYPE$1;
react_production.PureComponent = PureComponent;
react_production.StrictMode = REACT_STRICT_MODE_TYPE$1;
react_production.Suspense = REACT_SUSPENSE_TYPE$1;
react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals$2;
react_production.__COMPILER_RUNTIME = {
  __proto__: null,
  c: function (size) {
    return ReactSharedInternals$2.H.useMemoCache(size);
  }
};
react_production.cache = function (fn) {
  return function () {
    return fn.apply(null, arguments);
  };
};
react_production.cacheSignal = function () {
  return null;
};
react_production.cloneElement = function (element, config, children) {
  if (null === element || void 0 === element) throw Error("The argument must be a React element, but you passed " + element + ".");
  var props = assign$1({}, element.props),
    key = element.key;
  if (null != config) for (propName in void 0 !== config.key && (key = "" + config.key), config) !hasOwnProperty$1.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
  var propName = arguments.length - 2;
  if (1 === propName) props.children = children;else if (1 < propName) {
    for (var childArray = Array(propName), i = 0; i < propName; i++) childArray[i] = arguments[i + 2];
    props.children = childArray;
  }
  return ReactElement(element.type, key, props);
};
react_production.createContext = function (defaultValue) {
  defaultValue = {
    $$typeof: REACT_CONTEXT_TYPE$1,
    _currentValue: defaultValue,
    _currentValue2: defaultValue,
    _threadCount: 0,
    Provider: null,
    Consumer: null
  };
  defaultValue.Provider = defaultValue;
  defaultValue.Consumer = {
    $$typeof: REACT_CONSUMER_TYPE$1,
    _context: defaultValue
  };
  return defaultValue;
};
react_production.createElement = function (type, config, children) {
  var propName,
    props = {},
    key = null;
  if (null != config) for (propName in void 0 !== config.key && (key = "" + config.key), config) hasOwnProperty$1.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]);
  var childrenLength = arguments.length - 2;
  if (1 === childrenLength) props.children = children;else if (1 < childrenLength) {
    for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2];
    props.children = childArray;
  }
  if (type && type.defaultProps) for (propName in childrenLength = type.defaultProps, childrenLength) void 0 === props[propName] && (props[propName] = childrenLength[propName]);
  return ReactElement(type, key, props);
};
react_production.createRef = function () {
  return {
    current: null
  };
};
react_production.forwardRef = function (render) {
  return {
    $$typeof: REACT_FORWARD_REF_TYPE$1,
    render: render
  };
};
react_production.isValidElement = isValidElement;
react_production.lazy = function (ctor) {
  return {
    $$typeof: REACT_LAZY_TYPE$1,
    _payload: {
      _status: -1,
      _result: ctor
    },
    _init: lazyInitializer
  };
};
react_production.memo = function (type, compare) {
  return {
    $$typeof: REACT_MEMO_TYPE$1,
    type: type,
    compare: void 0 === compare ? null : compare
  };
};
react_production.startTransition = function (scope) {
  var prevTransition = ReactSharedInternals$2.T,
    currentTransition = {};
  ReactSharedInternals$2.T = currentTransition;
  try {
    var returnValue = scope(),
      onStartTransitionFinish = ReactSharedInternals$2.S;
    null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
    "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop$4, reportGlobalError$1);
  } catch (error) {
    reportGlobalError$1(error);
  } finally {
    null !== prevTransition && null !== currentTransition.types && (prevTransition.types = currentTransition.types), ReactSharedInternals$2.T = prevTransition;
  }
};
react_production.unstable_useCacheRefresh = function () {
  return ReactSharedInternals$2.H.useCacheRefresh();
};
react_production.use = function (usable) {
  return ReactSharedInternals$2.H.use(usable);
};
react_production.useActionState = function (action, initialState, permalink) {
  return ReactSharedInternals$2.H.useActionState(action, initialState, permalink);
};
react_production.useCallback = function (callback, deps) {
  return ReactSharedInternals$2.H.useCallback(callback, deps);
};
react_production.useContext = function (Context) {
  return ReactSharedInternals$2.H.useContext(Context);
};
react_production.useDebugValue = function () {};
react_production.useDeferredValue = function (value, initialValue) {
  return ReactSharedInternals$2.H.useDeferredValue(value, initialValue);
};
react_production.useEffect = function (create, deps) {
  return ReactSharedInternals$2.H.useEffect(create, deps);
};
react_production.useEffectEvent = function (callback) {
  return ReactSharedInternals$2.H.useEffectEvent(callback);
};
react_production.useId = function () {
  return ReactSharedInternals$2.H.useId();
};
react_production.useImperativeHandle = function (ref, create, deps) {
  return ReactSharedInternals$2.H.useImperativeHandle(ref, create, deps);
};
react_production.useInsertionEffect = function (create, deps) {
  return ReactSharedInternals$2.H.useInsertionEffect(create, deps);
};
react_production.useLayoutEffect = function (create, deps) {
  return ReactSharedInternals$2.H.useLayoutEffect(create, deps);
};
react_production.useMemo = function (create, deps) {
  return ReactSharedInternals$2.H.useMemo(create, deps);
};
react_production.useOptimistic = function (passthrough, reducer) {
  return ReactSharedInternals$2.H.useOptimistic(passthrough, reducer);
};
react_production.useReducer = function (reducer, initialArg, init) {
  return ReactSharedInternals$2.H.useReducer(reducer, initialArg, init);
};
react_production.useRef = function (initialValue) {
  return ReactSharedInternals$2.H.useRef(initialValue);
};
react_production.useState = function (initialState) {
  return ReactSharedInternals$2.H.useState(initialState);
};
react_production.useSyncExternalStore = function (subscribe, getSnapshot, getServerSnapshot) {
  return ReactSharedInternals$2.H.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
};
react_production.useTransition = function () {
  return ReactSharedInternals$2.H.useTransition();
};
react_production.version = "19.2.8";

{
  react.exports = react_production;
}
var reactExports = react.exports;

/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var React$1 = reactExports;
function formatProdErrorMessage$1(code) {
  var url = "https://react.dev/errors/" + code;
  if (1 < arguments.length) {
    url += "?args[]=" + encodeURIComponent(arguments[1]);
    for (var i = 2; i < arguments.length; i++) url += "&args[]=" + encodeURIComponent(arguments[i]);
  }
  return "Minified React error #" + code + "; visit " + url + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
}
function noop$3() {}
var Internals = {
    d: {
      f: noop$3,
      r: function () {
        throw Error(formatProdErrorMessage$1(522));
      },
      D: noop$3,
      C: noop$3,
      L: noop$3,
      m: noop$3,
      X: noop$3,
      S: noop$3,
      M: noop$3
    },
    p: 0,
    findDOMNode: null
  },
  REACT_PORTAL_TYPE$1 = Symbol.for("react.portal");
function createPortal$1(children, containerInfo, implementation) {
  var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
  return {
    $$typeof: REACT_PORTAL_TYPE$1,
    key: null == key ? null : "" + key,
    children: children,
    containerInfo: containerInfo,
    implementation: implementation
  };
}
var ReactSharedInternals$1 = React$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
function getCrossOriginStringAs(as, input) {
  if ("font" === as) return "";
  if ("string" === typeof input) return "use-credentials" === input ? input : "";
}
reactDom_production.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
reactDom_production.createPortal = function (children, container) {
  var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
  if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType) throw Error(formatProdErrorMessage$1(299));
  return createPortal$1(children, container, null, key);
};
reactDom_production.flushSync = function (fn) {
  var previousTransition = ReactSharedInternals$1.T,
    previousUpdatePriority = Internals.p;
  try {
    if (ReactSharedInternals$1.T = null, Internals.p = 2, fn) return fn();
  } finally {
    ReactSharedInternals$1.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f();
  }
};
reactDom_production.preconnect = function (href, options) {
  "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
};
reactDom_production.prefetchDNS = function (href) {
  "string" === typeof href && Internals.d.D(href);
};
reactDom_production.preinit = function (href, options) {
  if ("string" === typeof href && options && "string" === typeof options.as) {
    var as = options.as,
      crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
      integrity = "string" === typeof options.integrity ? options.integrity : void 0,
      fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
    "style" === as ? Internals.d.S(href, "string" === typeof options.precedence ? options.precedence : void 0, {
      crossOrigin: crossOrigin,
      integrity: integrity,
      fetchPriority: fetchPriority
    }) : "script" === as && Internals.d.X(href, {
      crossOrigin: crossOrigin,
      integrity: integrity,
      fetchPriority: fetchPriority,
      nonce: "string" === typeof options.nonce ? options.nonce : void 0
    });
  }
};
reactDom_production.preinitModule = function (href, options) {
  if ("string" === typeof href) if ("object" === typeof options && null !== options) {
    if (null == options.as || "script" === options.as) {
      var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
      Internals.d.M(href, {
        crossOrigin: crossOrigin,
        integrity: "string" === typeof options.integrity ? options.integrity : void 0,
        nonce: "string" === typeof options.nonce ? options.nonce : void 0
      });
    }
  } else null == options && Internals.d.M(href);
};
reactDom_production.preload = function (href, options) {
  if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
    var as = options.as,
      crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
    Internals.d.L(href, as, {
      crossOrigin: crossOrigin,
      integrity: "string" === typeof options.integrity ? options.integrity : void 0,
      nonce: "string" === typeof options.nonce ? options.nonce : void 0,
      type: "string" === typeof options.type ? options.type : void 0,
      fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
      referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
      imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
      imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
      media: "string" === typeof options.media ? options.media : void 0
    });
  }
};
reactDom_production.preloadModule = function (href, options) {
  if ("string" === typeof href) if (options) {
    var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
    Internals.d.m(href, {
      as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
      crossOrigin: crossOrigin,
      integrity: "string" === typeof options.integrity ? options.integrity : void 0
    });
  } else Internals.d.m(href);
};
reactDom_production.requestFormReset = function (form) {
  Internals.d.r(form);
};
reactDom_production.unstable_batchedUpdates = function (fn, a) {
  return fn(a);
};
reactDom_production.useFormState = function (action, initialState, permalink) {
  return ReactSharedInternals$1.H.useFormState(action, initialState, permalink);
};
reactDom_production.useFormStatus = function () {
  return ReactSharedInternals$1.H.useHostTransitionStatus();
};
reactDom_production.version = "19.2.8";

function checkDCE$1() {
  /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function') {
    return;
  }
  try {
    // Verify that the code above has been dead code eliminated (DCE'd).
    __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE$1);
  } catch (err) {
    // DevTools shouldn't crash React, no matter what.
    // We should still report in case we break this code.
    console.error(err);
  }
}
{
  // DCE check should happen before ReactDOM bundle executes so that
  // DevTools can report bad minification during injection.
  checkDCE$1();
  reactDom.exports = reactDom_production;
}
var reactDomExports = reactDom.exports;

var client = {exports: {}};

var reactDomClient_production = {};

var scheduler = {exports: {}};

var scheduler_production = {};

/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
(function (exports) {

  function push(heap, node) {
    var index = heap.length;
    heap.push(node);
    a: for (; 0 < index;) {
      var parentIndex = index - 1 >>> 1,
        parent = heap[parentIndex];
      if (0 < compare(parent, node)) heap[parentIndex] = node, heap[index] = parent, index = parentIndex;else break a;
    }
  }
  function peek(heap) {
    return 0 === heap.length ? null : heap[0];
  }
  function pop(heap) {
    if (0 === heap.length) return null;
    var first = heap[0],
      last = heap.pop();
    if (last !== first) {
      heap[0] = last;
      a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength;) {
        var leftIndex = 2 * (index + 1) - 1,
          left = heap[leftIndex],
          rightIndex = leftIndex + 1,
          right = heap[rightIndex];
        if (0 > compare(left, last)) rightIndex < length && 0 > compare(right, left) ? (heap[index] = right, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left, heap[leftIndex] = last, index = leftIndex);else if (rightIndex < length && 0 > compare(right, last)) heap[index] = right, heap[rightIndex] = last, index = rightIndex;else break a;
      }
    }
    return first;
  }
  function compare(a, b) {
    var diff = a.sortIndex - b.sortIndex;
    return 0 !== diff ? diff : a.id - b.id;
  }
  exports.unstable_now = void 0;
  if ("object" === typeof performance && "function" === typeof performance.now) {
    var localPerformance = performance;
    exports.unstable_now = function () {
      return localPerformance.now();
    };
  } else {
    var localDate = Date,
      initialTime = localDate.now();
    exports.unstable_now = function () {
      return localDate.now() - initialTime;
    };
  }
  var taskQueue = [],
    timerQueue = [],
    taskIdCounter = 1,
    currentTask = null,
    currentPriorityLevel = 3,
    isPerformingWork = false,
    isHostCallbackScheduled = false,
    isHostTimeoutScheduled = false,
    needsPaint = false,
    localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
    localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
    localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
  function advanceTimers(currentTime) {
    for (var timer = peek(timerQueue); null !== timer;) {
      if (null === timer.callback) pop(timerQueue);else if (timer.startTime <= currentTime) pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer);else break;
      timer = peek(timerQueue);
    }
  }
  function handleTimeout(currentTime) {
    isHostTimeoutScheduled = false;
    advanceTimers(currentTime);
    if (!isHostCallbackScheduled) if (null !== peek(taskQueue)) isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline());else {
      var firstTimer = peek(timerQueue);
      null !== firstTimer && requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
    }
  }
  var isMessageLoopRunning = false,
    taskTimeoutID = -1,
    frameInterval = 5,
    startTime = -1;
  function shouldYieldToHost() {
    return needsPaint ? true : exports.unstable_now() - startTime < frameInterval ? false : true;
  }
  function performWorkUntilDeadline() {
    needsPaint = false;
    if (isMessageLoopRunning) {
      var currentTime = exports.unstable_now();
      startTime = currentTime;
      var hasMoreWork = true;
      try {
        a: {
          isHostCallbackScheduled = !1;
          isHostTimeoutScheduled && (isHostTimeoutScheduled = !1, localClearTimeout(taskTimeoutID), taskTimeoutID = -1);
          isPerformingWork = !0;
          var previousPriorityLevel = currentPriorityLevel;
          try {
            b: {
              advanceTimers(currentTime);
              for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost());) {
                var callback = currentTask.callback;
                if ("function" === typeof callback) {
                  currentTask.callback = null;
                  currentPriorityLevel = currentTask.priorityLevel;
                  var continuationCallback = callback(currentTask.expirationTime <= currentTime);
                  currentTime = exports.unstable_now();
                  if ("function" === typeof continuationCallback) {
                    currentTask.callback = continuationCallback;
                    advanceTimers(currentTime);
                    hasMoreWork = !0;
                    break b;
                  }
                  currentTask === peek(taskQueue) && pop(taskQueue);
                  advanceTimers(currentTime);
                } else pop(taskQueue);
                currentTask = peek(taskQueue);
              }
              if (null !== currentTask) hasMoreWork = !0;else {
                var firstTimer = peek(timerQueue);
                null !== firstTimer && requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
                hasMoreWork = !1;
              }
            }
            break a;
          } finally {
            currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = !1;
          }
          hasMoreWork = void 0;
        }
      } finally {
        hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = false;
      }
    }
  }
  var schedulePerformWorkUntilDeadline;
  if ("function" === typeof localSetImmediate) schedulePerformWorkUntilDeadline = function () {
    localSetImmediate(performWorkUntilDeadline);
  };else if ("undefined" !== typeof MessageChannel) {
    var channel = new MessageChannel(),
      port = channel.port2;
    channel.port1.onmessage = performWorkUntilDeadline;
    schedulePerformWorkUntilDeadline = function () {
      port.postMessage(null);
    };
  } else schedulePerformWorkUntilDeadline = function () {
    localSetTimeout(performWorkUntilDeadline, 0);
  };
  function requestHostTimeout(callback, ms) {
    taskTimeoutID = localSetTimeout(function () {
      callback(exports.unstable_now());
    }, ms);
  }
  exports.unstable_IdlePriority = 5;
  exports.unstable_ImmediatePriority = 1;
  exports.unstable_LowPriority = 4;
  exports.unstable_NormalPriority = 3;
  exports.unstable_Profiling = null;
  exports.unstable_UserBlockingPriority = 2;
  exports.unstable_cancelCallback = function (task) {
    task.callback = null;
  };
  exports.unstable_forceFrameRate = function (fps) {
    0 > fps || 125 < fps ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5;
  };
  exports.unstable_getCurrentPriorityLevel = function () {
    return currentPriorityLevel;
  };
  exports.unstable_next = function (eventHandler) {
    switch (currentPriorityLevel) {
      case 1:
      case 2:
      case 3:
        var priorityLevel = 3;
        break;
      default:
        priorityLevel = currentPriorityLevel;
    }
    var previousPriorityLevel = currentPriorityLevel;
    currentPriorityLevel = priorityLevel;
    try {
      return eventHandler();
    } finally {
      currentPriorityLevel = previousPriorityLevel;
    }
  };
  exports.unstable_requestPaint = function () {
    needsPaint = true;
  };
  exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
    switch (priorityLevel) {
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        break;
      default:
        priorityLevel = 3;
    }
    var previousPriorityLevel = currentPriorityLevel;
    currentPriorityLevel = priorityLevel;
    try {
      return eventHandler();
    } finally {
      currentPriorityLevel = previousPriorityLevel;
    }
  };
  exports.unstable_scheduleCallback = function (priorityLevel, callback, options) {
    var currentTime = exports.unstable_now();
    "object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
    switch (priorityLevel) {
      case 1:
        var timeout = -1;
        break;
      case 2:
        timeout = 250;
        break;
      case 5:
        timeout = 1073741823;
        break;
      case 4:
        timeout = 1e4;
        break;
      default:
        timeout = 5e3;
    }
    timeout = options + timeout;
    priorityLevel = {
      id: taskIdCounter++,
      callback: callback,
      priorityLevel: priorityLevel,
      startTime: options,
      expirationTime: timeout,
      sortIndex: -1
    };
    options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), null === peek(taskQueue) && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = true, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline())));
    return priorityLevel;
  };
  exports.unstable_shouldYield = shouldYieldToHost;
  exports.unstable_wrapCallback = function (callback) {
    var parentPriorityLevel = currentPriorityLevel;
    return function () {
      var previousPriorityLevel = currentPriorityLevel;
      currentPriorityLevel = parentPriorityLevel;
      try {
        return callback.apply(this, arguments);
      } finally {
        currentPriorityLevel = previousPriorityLevel;
      }
    };
  };
})(scheduler_production);

{
  scheduler.exports = scheduler_production;
}
var schedulerExports = scheduler.exports;

var Scheduler=schedulerExports,React=reactExports,ReactDOM=reactDomExports;function formatProdErrorMessage(code){var url="https://react.dev/errors/"+code;if(1<arguments.length){url+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)url+="&args[]="+encodeURIComponent(arguments[i]);}return "Minified React error #"+code+"; visit "+url+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";}function isValidContainer(node){return !(!node||1!==node.nodeType&&9!==node.nodeType&&11!==node.nodeType);}function getNearestMountedFiber(fiber){var node=fiber,nearestMounted=fiber;if(fiber.alternate)for(;node.return;)node=node.return;else {fiber=node;do node=fiber,0!==(node.flags&4098)&&(nearestMounted=node.return),fiber=node.return;while(fiber);}return 3===node.tag?nearestMounted:null;}function getSuspenseInstanceFromFiber(fiber){if(13===fiber.tag){var suspenseState=fiber.memoizedState;null===suspenseState&&(fiber=fiber.alternate,null!==fiber&&(suspenseState=fiber.memoizedState));if(null!==suspenseState)return suspenseState.dehydrated;}return null;}function getActivityInstanceFromFiber(fiber){if(31===fiber.tag){var activityState=fiber.memoizedState;null===activityState&&(fiber=fiber.alternate,null!==fiber&&(activityState=fiber.memoizedState));if(null!==activityState)return activityState.dehydrated;}return null;}function assertIsMounted(fiber){if(getNearestMountedFiber(fiber)!==fiber)throw Error(formatProdErrorMessage(188));}function findCurrentFiberUsingSlowPath(fiber){var alternate=fiber.alternate;if(!alternate){alternate=getNearestMountedFiber(fiber);if(null===alternate)throw Error(formatProdErrorMessage(188));return alternate!==fiber?null:fiber;}for(var a=fiber,b=alternate;;){var parentA=a.return;if(null===parentA)break;var parentB=parentA.alternate;if(null===parentB){b=parentA.return;if(null!==b){a=b;continue;}break;}if(parentA.child===parentB.child){for(parentB=parentA.child;parentB;){if(parentB===a)return assertIsMounted(parentA),fiber;if(parentB===b)return assertIsMounted(parentA),alternate;parentB=parentB.sibling;}throw Error(formatProdErrorMessage(188));}if(a.return!==b.return)a=parentA,b=parentB;else {for(var didFindChild=false,child$0=parentA.child;child$0;){if(child$0===a){didFindChild=true;a=parentA;b=parentB;break;}if(child$0===b){didFindChild=true;b=parentA;a=parentB;break;}child$0=child$0.sibling;}if(!didFindChild){for(child$0=parentB.child;child$0;){if(child$0===a){didFindChild=true;a=parentB;b=parentA;break;}if(child$0===b){didFindChild=true;b=parentB;a=parentA;break;}child$0=child$0.sibling;}if(!didFindChild)throw Error(formatProdErrorMessage(189));}}if(a.alternate!==b)throw Error(formatProdErrorMessage(190));}if(3!==a.tag)throw Error(formatProdErrorMessage(188));return a.stateNode.current===a?fiber:alternate;}function findCurrentHostFiberImpl(node){var tag=node.tag;if(5===tag||26===tag||27===tag||6===tag)return node;for(node=node.child;null!==node;){tag=findCurrentHostFiberImpl(node);if(null!==tag)return tag;node=node.sibling;}return null;}var assign=Object.assign,REACT_LEGACY_ELEMENT_TYPE=Symbol.for("react.element"),REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_CONSUMER_TYPE=Symbol.for("react.consumer"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy");var REACT_ACTIVITY_TYPE=Symbol.for("react.activity");var REACT_MEMO_CACHE_SENTINEL=Symbol.for("react.memo_cache_sentinel");var MAYBE_ITERATOR_SYMBOL=Symbol.iterator;function getIteratorFn(maybeIterable){if(null===maybeIterable||"object"!==typeof maybeIterable)return null;maybeIterable=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable["@@iterator"];return "function"===typeof maybeIterable?maybeIterable:null;}var REACT_CLIENT_REFERENCE=Symbol.for("react.client.reference");function getComponentNameFromType(type){if(null==type)return null;if("function"===typeof type)return type.$$typeof===REACT_CLIENT_REFERENCE?null:type.displayName||type.name||null;if("string"===typeof type)return type;switch(type){case REACT_FRAGMENT_TYPE:return "Fragment";case REACT_PROFILER_TYPE:return "Profiler";case REACT_STRICT_MODE_TYPE:return "StrictMode";case REACT_SUSPENSE_TYPE:return "Suspense";case REACT_SUSPENSE_LIST_TYPE:return "SuspenseList";case REACT_ACTIVITY_TYPE:return "Activity";}if("object"===typeof type)switch(type.$$typeof){case REACT_PORTAL_TYPE:return "Portal";case REACT_CONTEXT_TYPE:return type.displayName||"Context";case REACT_CONSUMER_TYPE:return (type._context.displayName||"Context")+".Consumer";case REACT_FORWARD_REF_TYPE:var innerType=type.render;type=type.displayName;type||(type=innerType.displayName||innerType.name||"",type=""!==type?"ForwardRef("+type+")":"ForwardRef");return type;case REACT_MEMO_TYPE:return innerType=type.displayName||null,null!==innerType?innerType:getComponentNameFromType(type.type)||"Memo";case REACT_LAZY_TYPE:innerType=type._payload;type=type._init;try{return getComponentNameFromType(type(innerType));}catch(x){}}return null;}var isArrayImpl=Array.isArray,ReactSharedInternals=React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ReactDOMSharedInternals=ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,sharedNotPendingObject={pending:false,data:null,method:null,action:null},valueStack=[],index$c=-1;function createCursor(defaultValue){return {current:defaultValue};}function pop(cursor){0>index$c||(cursor.current=valueStack[index$c],valueStack[index$c]=null,index$c--);}function push(cursor,value){index$c++;valueStack[index$c]=cursor.current;cursor.current=value;}var contextStackCursor=createCursor(null),contextFiberStackCursor=createCursor(null),rootInstanceStackCursor=createCursor(null),hostTransitionProviderCursor=createCursor(null);function pushHostContainer(fiber,nextRootInstance){push(rootInstanceStackCursor,nextRootInstance);push(contextFiberStackCursor,fiber);push(contextStackCursor,null);switch(nextRootInstance.nodeType){case 9:case 11:fiber=(fiber=nextRootInstance.documentElement)?(fiber=fiber.namespaceURI)?getOwnHostContext(fiber):0:0;break;default:if(fiber=nextRootInstance.tagName,nextRootInstance=nextRootInstance.namespaceURI)nextRootInstance=getOwnHostContext(nextRootInstance),fiber=getChildHostContextProd(nextRootInstance,fiber);else switch(fiber){case "svg":fiber=1;break;case "math":fiber=2;break;default:fiber=0;}}pop(contextStackCursor);push(contextStackCursor,fiber);}function popHostContainer(){pop(contextStackCursor);pop(contextFiberStackCursor);pop(rootInstanceStackCursor);}function pushHostContext(fiber){null!==fiber.memoizedState&&push(hostTransitionProviderCursor,fiber);var context=contextStackCursor.current;var JSCompiler_inline_result=getChildHostContextProd(context,fiber.type);context!==JSCompiler_inline_result&&(push(contextFiberStackCursor,fiber),push(contextStackCursor,JSCompiler_inline_result));}function popHostContext(fiber){contextFiberStackCursor.current===fiber&&(pop(contextStackCursor),pop(contextFiberStackCursor));hostTransitionProviderCursor.current===fiber&&(pop(hostTransitionProviderCursor),HostTransitionContext._currentValue=sharedNotPendingObject);}var prefix,suffix;function describeBuiltInComponentFrame(name){if(void 0===prefix)try{throw Error();}catch(x){var match=x.stack.trim().match(/\n( *(at )?)/);prefix=match&&match[1]||"";suffix=-1<x.stack.indexOf("\n    at")?" (<anonymous>)":-1<x.stack.indexOf("@")?"@unknown:0:0":"";}return "\n"+prefix+name+suffix;}var reentry=false;function describeNativeComponentFrame(fn,construct){if(!fn||reentry)return "";reentry=true;var previousPrepareStackTrace=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var RunInRootFrame={DetermineComponentFrameRoot:function(){try{if(construct){var Fake=function(){throw Error();};Object.defineProperty(Fake.prototype,"props",{set:function(){throw Error();}});if("object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(Fake,[]);}catch(x){var control=x;}Reflect.construct(fn,[],Fake);}else {try{Fake.call();}catch(x$1){control=x$1;}fn.call(Fake.prototype);}}else {try{throw Error();}catch(x$2){control=x$2;}(Fake=fn())&&"function"===typeof Fake.catch&&Fake.catch(function(){});}}catch(sample){if(sample&&control&&"string"===typeof sample.stack)return [sample.stack,control.stack];}return [null,null];}};RunInRootFrame.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var namePropDescriptor=Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot,"name");namePropDescriptor&&namePropDescriptor.configurable&&Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _RunInRootFrame$Deter=RunInRootFrame.DetermineComponentFrameRoot(),sampleStack=_RunInRootFrame$Deter[0],controlStack=_RunInRootFrame$Deter[1];if(sampleStack&&controlStack){var sampleLines=sampleStack.split("\n"),controlLines=controlStack.split("\n");for(namePropDescriptor=RunInRootFrame=0;RunInRootFrame<sampleLines.length&&!sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot");)RunInRootFrame++;for(;namePropDescriptor<controlLines.length&&!controlLines[namePropDescriptor].includes("DetermineComponentFrameRoot");)namePropDescriptor++;if(RunInRootFrame===sampleLines.length||namePropDescriptor===controlLines.length)for(RunInRootFrame=sampleLines.length-1,namePropDescriptor=controlLines.length-1;1<=RunInRootFrame&&0<=namePropDescriptor&&sampleLines[RunInRootFrame]!==controlLines[namePropDescriptor];)namePropDescriptor--;for(;1<=RunInRootFrame&&0<=namePropDescriptor;RunInRootFrame--,namePropDescriptor--)if(sampleLines[RunInRootFrame]!==controlLines[namePropDescriptor]){if(1!==RunInRootFrame||1!==namePropDescriptor){do if(RunInRootFrame--,namePropDescriptor--,0>namePropDescriptor||sampleLines[RunInRootFrame]!==controlLines[namePropDescriptor]){var frame="\n"+sampleLines[RunInRootFrame].replace(" at new "," at ");fn.displayName&&frame.includes("<anonymous>")&&(frame=frame.replace("<anonymous>",fn.displayName));return frame;}while(1<=RunInRootFrame&&0<=namePropDescriptor);}break;}}}finally{reentry=false,Error.prepareStackTrace=previousPrepareStackTrace;}return (previousPrepareStackTrace=fn?fn.displayName||fn.name:"")?describeBuiltInComponentFrame(previousPrepareStackTrace):"";}function describeFiber(fiber,childFiber){switch(fiber.tag){case 26:case 27:case 5:return describeBuiltInComponentFrame(fiber.type);case 16:return describeBuiltInComponentFrame("Lazy");case 13:return fiber.child!==childFiber&&null!==childFiber?describeBuiltInComponentFrame("Suspense Fallback"):describeBuiltInComponentFrame("Suspense");case 19:return describeBuiltInComponentFrame("SuspenseList");case 0:case 15:return describeNativeComponentFrame(fiber.type,false);case 11:return describeNativeComponentFrame(fiber.type.render,false);case 1:return describeNativeComponentFrame(fiber.type,true);case 31:return describeBuiltInComponentFrame("Activity");default:return "";}}function getStackByFiberInDevAndProd(workInProgress){try{var info="",previous=null;do info+=describeFiber(workInProgress,previous),previous=workInProgress,workInProgress=workInProgress.return;while(workInProgress);return info;}catch(x){return "\nError generating stack: "+x.message+"\n"+x.stack;}}var hasOwnProperty=Object.prototype.hasOwnProperty,scheduleCallback$3=Scheduler.unstable_scheduleCallback,cancelCallback$1=Scheduler.unstable_cancelCallback,shouldYield=Scheduler.unstable_shouldYield,requestPaint=Scheduler.unstable_requestPaint,now=Scheduler.unstable_now,getCurrentPriorityLevel=Scheduler.unstable_getCurrentPriorityLevel,ImmediatePriority=Scheduler.unstable_ImmediatePriority,UserBlockingPriority=Scheduler.unstable_UserBlockingPriority,NormalPriority$1=Scheduler.unstable_NormalPriority,LowPriority=Scheduler.unstable_LowPriority,IdlePriority=Scheduler.unstable_IdlePriority,log$1=Scheduler.log,unstable_setDisableYieldValue=Scheduler.unstable_setDisableYieldValue,rendererID=null,injectedHook=null;function setIsStrictModeForDevtools(newIsStrictMode){"function"===typeof log$1&&unstable_setDisableYieldValue(newIsStrictMode);if(injectedHook&&"function"===typeof injectedHook.setStrictMode)try{injectedHook.setStrictMode(rendererID,newIsStrictMode);}catch(err){}}var clz32=Math.clz32?Math.clz32:clz32Fallback,log=Math.log,LN2=Math.LN2;function clz32Fallback(x){x>>>=0;return 0===x?32:31-(log(x)/LN2|0)|0;}var nextTransitionUpdateLane=256,nextTransitionDeferredLane=262144,nextRetryLane=4194304;function getHighestPriorityLanes(lanes){var pendingSyncLanes=lanes&42;if(0!==pendingSyncLanes)return pendingSyncLanes;switch(lanes&-lanes){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return lanes&261888;case 262144:case 524288:case 1048576:case 2097152:return lanes&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return lanes&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return lanes;}}function getNextLanes(root,wipLanes,rootHasPendingCommit){var pendingLanes=root.pendingLanes;if(0===pendingLanes)return 0;var nextLanes=0,suspendedLanes=root.suspendedLanes,pingedLanes=root.pingedLanes;root=root.warmLanes;var nonIdlePendingLanes=pendingLanes&134217727;0!==nonIdlePendingLanes?(pendingLanes=nonIdlePendingLanes&~suspendedLanes,0!==pendingLanes?nextLanes=getHighestPriorityLanes(pendingLanes):(pingedLanes&=nonIdlePendingLanes,0!==pingedLanes?nextLanes=getHighestPriorityLanes(pingedLanes):rootHasPendingCommit||(rootHasPendingCommit=nonIdlePendingLanes&~root,0!==rootHasPendingCommit&&(nextLanes=getHighestPriorityLanes(rootHasPendingCommit))))):(nonIdlePendingLanes=pendingLanes&~suspendedLanes,0!==nonIdlePendingLanes?nextLanes=getHighestPriorityLanes(nonIdlePendingLanes):0!==pingedLanes?nextLanes=getHighestPriorityLanes(pingedLanes):rootHasPendingCommit||(rootHasPendingCommit=pendingLanes&~root,0!==rootHasPendingCommit&&(nextLanes=getHighestPriorityLanes(rootHasPendingCommit))));return 0===nextLanes?0:0!==wipLanes&&wipLanes!==nextLanes&&0===(wipLanes&suspendedLanes)&&(suspendedLanes=nextLanes&-nextLanes,rootHasPendingCommit=wipLanes&-wipLanes,suspendedLanes>=rootHasPendingCommit||32===suspendedLanes&&0!==(rootHasPendingCommit&4194048))?wipLanes:nextLanes;}function checkIfRootIsPrerendering(root,renderLanes){return 0===(root.pendingLanes&~(root.suspendedLanes&~root.pingedLanes)&renderLanes);}function computeExpirationTime(lane,currentTime){switch(lane){case 1:case 2:case 4:case 8:case 64:return currentTime+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return currentTime+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return  -1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return  -1;default:return  -1;}}function claimNextRetryLane(){var lane=nextRetryLane;nextRetryLane<<=1;0===(nextRetryLane&62914560)&&(nextRetryLane=4194304);return lane;}function createLaneMap(initial){for(var laneMap=[],i=0;31>i;i++)laneMap.push(initial);return laneMap;}function markRootUpdated$1(root,updateLane){root.pendingLanes|=updateLane;268435456!==updateLane&&(root.suspendedLanes=0,root.pingedLanes=0,root.warmLanes=0);}function markRootFinished(root,finishedLanes,remainingLanes,spawnedLane,updatedLanes,suspendedRetryLanes){var previouslyPendingLanes=root.pendingLanes;root.pendingLanes=remainingLanes;root.suspendedLanes=0;root.pingedLanes=0;root.warmLanes=0;root.expiredLanes&=remainingLanes;root.entangledLanes&=remainingLanes;root.errorRecoveryDisabledLanes&=remainingLanes;root.shellSuspendCounter=0;var entanglements=root.entanglements,expirationTimes=root.expirationTimes,hiddenUpdates=root.hiddenUpdates;for(remainingLanes=previouslyPendingLanes&~remainingLanes;0<remainingLanes;){var index$7=31-clz32(remainingLanes),lane=1<<index$7;entanglements[index$7]=0;expirationTimes[index$7]=-1;var hiddenUpdatesForLane=hiddenUpdates[index$7];if(null!==hiddenUpdatesForLane)for(hiddenUpdates[index$7]=null,index$7=0;index$7<hiddenUpdatesForLane.length;index$7++){var update=hiddenUpdatesForLane[index$7];null!==update&&(update.lane&=-536870913);}remainingLanes&=~lane;}0!==spawnedLane&&markSpawnedDeferredLane(root,spawnedLane,0);0!==suspendedRetryLanes&&0===updatedLanes&&0!==root.tag&&(root.suspendedLanes|=suspendedRetryLanes&~(previouslyPendingLanes&~finishedLanes));}function markSpawnedDeferredLane(root,spawnedLane,entangledLanes){root.pendingLanes|=spawnedLane;root.suspendedLanes&=~spawnedLane;var spawnedLaneIndex=31-clz32(spawnedLane);root.entangledLanes|=spawnedLane;root.entanglements[spawnedLaneIndex]=root.entanglements[spawnedLaneIndex]|1073741824|entangledLanes&261930;}function markRootEntangled(root,entangledLanes){var rootEntangledLanes=root.entangledLanes|=entangledLanes;for(root=root.entanglements;rootEntangledLanes;){var index$8=31-clz32(rootEntangledLanes),lane=1<<index$8;lane&entangledLanes|root[index$8]&entangledLanes&&(root[index$8]|=entangledLanes);rootEntangledLanes&=~lane;}}function getBumpedLaneForHydration(root,renderLanes){var renderLane=renderLanes&-renderLanes;renderLane=0!==(renderLane&42)?1:getBumpedLaneForHydrationByLane(renderLane);return 0!==(renderLane&(root.suspendedLanes|renderLanes))?0:renderLane;}function getBumpedLaneForHydrationByLane(lane){switch(lane){case 2:lane=1;break;case 8:lane=4;break;case 32:lane=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:lane=128;break;case 268435456:lane=134217728;break;default:lane=0;}return lane;}function lanesToEventPriority(lanes){lanes&=-lanes;return 2<lanes?8<lanes?0!==(lanes&134217727)?32:268435456:8:2;}function resolveUpdatePriority(){var updatePriority=ReactDOMSharedInternals.p;if(0!==updatePriority)return updatePriority;updatePriority=window.event;return void 0===updatePriority?32:getEventPriority(updatePriority.type);}function runWithPriority(priority,fn){var previousPriority=ReactDOMSharedInternals.p;try{return ReactDOMSharedInternals.p=priority,fn();}finally{ReactDOMSharedInternals.p=previousPriority;}}var randomKey=Math.random().toString(36).slice(2),internalInstanceKey="__reactFiber$"+randomKey,internalPropsKey="__reactProps$"+randomKey,internalContainerInstanceKey="__reactContainer$"+randomKey,internalEventHandlersKey="__reactEvents$"+randomKey,internalEventHandlerListenersKey="__reactListeners$"+randomKey,internalEventHandlesSetKey="__reactHandles$"+randomKey,internalRootNodeResourcesKey="__reactResources$"+randomKey,internalHoistableMarker="__reactMarker$"+randomKey;function detachDeletedInstance(node){delete node[internalInstanceKey];delete node[internalPropsKey];delete node[internalEventHandlersKey];delete node[internalEventHandlerListenersKey];delete node[internalEventHandlesSetKey];}function getClosestInstanceFromNode(targetNode){var targetInst=targetNode[internalInstanceKey];if(targetInst)return targetInst;for(var parentNode=targetNode.parentNode;parentNode;){if(targetInst=parentNode[internalContainerInstanceKey]||parentNode[internalInstanceKey]){parentNode=targetInst.alternate;if(null!==targetInst.child||null!==parentNode&&null!==parentNode.child)for(targetNode=getParentHydrationBoundary(targetNode);null!==targetNode;){if(parentNode=targetNode[internalInstanceKey])return parentNode;targetNode=getParentHydrationBoundary(targetNode);}return targetInst;}targetNode=parentNode;parentNode=targetNode.parentNode;}return null;}function getInstanceFromNode(node){if(node=node[internalInstanceKey]||node[internalContainerInstanceKey]){var tag=node.tag;if(5===tag||6===tag||13===tag||31===tag||26===tag||27===tag||3===tag)return node;}return null;}function getNodeFromInstance(inst){var tag=inst.tag;if(5===tag||26===tag||27===tag||6===tag)return inst.stateNode;throw Error(formatProdErrorMessage(33));}function getResourcesFromRoot(root){var resources=root[internalRootNodeResourcesKey];resources||(resources=root[internalRootNodeResourcesKey]={hoistableStyles:new Map(),hoistableScripts:new Map()});return resources;}function markNodeAsHoistable(node){node[internalHoistableMarker]=true;}var allNativeEvents=new Set(),registrationNameDependencies={};function registerTwoPhaseEvent(registrationName,dependencies){registerDirectEvent(registrationName,dependencies);registerDirectEvent(registrationName+"Capture",dependencies);}function registerDirectEvent(registrationName,dependencies){registrationNameDependencies[registrationName]=dependencies;for(registrationName=0;registrationName<dependencies.length;registrationName++)allNativeEvents.add(dependencies[registrationName]);}var VALID_ATTRIBUTE_NAME_REGEX=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),illegalAttributeNameCache={},validatedAttributeNameCache={};function isAttributeNameSafe(attributeName){if(hasOwnProperty.call(validatedAttributeNameCache,attributeName))return  true;if(hasOwnProperty.call(illegalAttributeNameCache,attributeName))return  false;if(VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))return validatedAttributeNameCache[attributeName]=true;illegalAttributeNameCache[attributeName]=true;return  false;}function setValueForAttribute(node,name,value){if(isAttributeNameSafe(name))if(null===value)node.removeAttribute(name);else {switch(typeof value){case "undefined":case "function":case "symbol":node.removeAttribute(name);return;case "boolean":var prefix$10=name.toLowerCase().slice(0,5);if("data-"!==prefix$10&&"aria-"!==prefix$10){node.removeAttribute(name);return;}}node.setAttribute(name,""+value);}}function setValueForKnownAttribute(node,name,value){if(null===value)node.removeAttribute(name);else {switch(typeof value){case "undefined":case "function":case "symbol":case "boolean":node.removeAttribute(name);return;}node.setAttribute(name,""+value);}}function setValueForNamespacedAttribute(node,namespace,name,value){if(null===value)node.removeAttribute(name);else {switch(typeof value){case "undefined":case "function":case "symbol":case "boolean":node.removeAttribute(name);return;}node.setAttributeNS(namespace,name,""+value);}}function getToStringValue(value){switch(typeof value){case "bigint":case "boolean":case "number":case "string":case "undefined":return value;case "object":return value;default:return "";}}function isCheckable(elem){var type=elem.type;return (elem=elem.nodeName)&&"input"===elem.toLowerCase()&&("checkbox"===type||"radio"===type);}function trackValueOnNode(node,valueField,currentValue){var descriptor=Object.getOwnPropertyDescriptor(node.constructor.prototype,valueField);if(!node.hasOwnProperty(valueField)&&"undefined"!==typeof descriptor&&"function"===typeof descriptor.get&&"function"===typeof descriptor.set){var get=descriptor.get,set=descriptor.set;Object.defineProperty(node,valueField,{configurable:true,get:function(){return get.call(this);},set:function(value){currentValue=""+value;set.call(this,value);}});Object.defineProperty(node,valueField,{enumerable:descriptor.enumerable});return {getValue:function(){return currentValue;},setValue:function(value){currentValue=""+value;},stopTracking:function(){node._valueTracker=null;delete node[valueField];}};}}function track(node){if(!node._valueTracker){var valueField=isCheckable(node)?"checked":"value";node._valueTracker=trackValueOnNode(node,valueField,""+node[valueField]);}}function updateValueIfChanged(node){if(!node)return  false;var tracker=node._valueTracker;if(!tracker)return  true;var lastValue=tracker.getValue();var value="";node&&(value=isCheckable(node)?node.checked?"true":"false":node.value);node=value;return node!==lastValue?(tracker.setValue(node),true):false;}function getActiveElement(doc){doc=doc||("undefined"!==typeof document?document:void 0);if("undefined"===typeof doc)return null;try{return doc.activeElement||doc.body;}catch(e){return doc.body;}}var escapeSelectorAttributeValueInsideDoubleQuotesRegex=/[\n"\\]/g;function escapeSelectorAttributeValueInsideDoubleQuotes(value){return value.replace(escapeSelectorAttributeValueInsideDoubleQuotesRegex,function(ch){return "\\"+ch.charCodeAt(0).toString(16)+" ";});}function updateInput(element,value,defaultValue,lastDefaultValue,checked,defaultChecked,type,name){element.name="";null!=type&&"function"!==typeof type&&"symbol"!==typeof type&&"boolean"!==typeof type?element.type=type:element.removeAttribute("type");if(null!=value){if("number"===type){if(0===value&&""===element.value||element.value!=value)element.value=""+getToStringValue(value);}else element.value!==""+getToStringValue(value)&&(element.value=""+getToStringValue(value));}else "submit"!==type&&"reset"!==type||element.removeAttribute("value");null!=value?setDefaultValue(element,type,getToStringValue(value)):null!=defaultValue?setDefaultValue(element,type,getToStringValue(defaultValue)):null!=lastDefaultValue&&element.removeAttribute("value");null==checked&&null!=defaultChecked&&(element.defaultChecked=!!defaultChecked);null!=checked&&(element.checked=checked&&"function"!==typeof checked&&"symbol"!==typeof checked);null!=name&&"function"!==typeof name&&"symbol"!==typeof name&&"boolean"!==typeof name?element.name=""+getToStringValue(name):element.removeAttribute("name");}function initInput(element,value,defaultValue,checked,defaultChecked,type,name,isHydrating){null!=type&&"function"!==typeof type&&"symbol"!==typeof type&&"boolean"!==typeof type&&(element.type=type);if(null!=value||null!=defaultValue){if(!("submit"!==type&&"reset"!==type||void 0!==value&&null!==value)){track(element);return;}defaultValue=null!=defaultValue?""+getToStringValue(defaultValue):"";value=null!=value?""+getToStringValue(value):defaultValue;isHydrating||value===element.value||(element.value=value);element.defaultValue=value;}checked=null!=checked?checked:defaultChecked;checked="function"!==typeof checked&&"symbol"!==typeof checked&&!!checked;element.checked=isHydrating?element.checked:!!checked;element.defaultChecked=!!checked;null!=name&&"function"!==typeof name&&"symbol"!==typeof name&&"boolean"!==typeof name&&(element.name=name);track(element);}function setDefaultValue(node,type,value){"number"===type&&getActiveElement(node.ownerDocument)===node||node.defaultValue===""+value||(node.defaultValue=""+value);}function updateOptions(node,multiple,propValue,setDefaultSelected){node=node.options;if(multiple){multiple={};for(var i=0;i<propValue.length;i++)multiple["$"+propValue[i]]=true;for(propValue=0;propValue<node.length;propValue++)i=multiple.hasOwnProperty("$"+node[propValue].value),node[propValue].selected!==i&&(node[propValue].selected=i),i&&setDefaultSelected&&(node[propValue].defaultSelected=true);}else {propValue=""+getToStringValue(propValue);multiple=null;for(i=0;i<node.length;i++){if(node[i].value===propValue){node[i].selected=true;setDefaultSelected&&(node[i].defaultSelected=true);return;}null!==multiple||node[i].disabled||(multiple=node[i]);}null!==multiple&&(multiple.selected=true);}}function updateTextarea(element,value,defaultValue){if(null!=value&&(value=""+getToStringValue(value),value!==element.value&&(element.value=value),null==defaultValue)){element.defaultValue!==value&&(element.defaultValue=value);return;}element.defaultValue=null!=defaultValue?""+getToStringValue(defaultValue):"";}function initTextarea(element,value,defaultValue,children){if(null==value){if(null!=children){if(null!=defaultValue)throw Error(formatProdErrorMessage(92));if(isArrayImpl(children)){if(1<children.length)throw Error(formatProdErrorMessage(93));children=children[0];}defaultValue=children;}null==defaultValue&&(defaultValue="");value=defaultValue;}defaultValue=getToStringValue(value);element.defaultValue=defaultValue;children=element.textContent;children===defaultValue&&""!==children&&null!==children&&(element.value=children);track(element);}function setTextContent(node,text){if(text){var firstChild=node.firstChild;if(firstChild&&firstChild===node.lastChild&&3===firstChild.nodeType){firstChild.nodeValue=text;return;}}node.textContent=text;}var unitlessNumbers=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function setValueForStyle(style,styleName,value){var isCustomProperty=0===styleName.indexOf("--");null==value||"boolean"===typeof value||""===value?isCustomProperty?style.setProperty(styleName,""):"float"===styleName?style.cssFloat="":style[styleName]="":isCustomProperty?style.setProperty(styleName,value):"number"!==typeof value||0===value||unitlessNumbers.has(styleName)?"float"===styleName?style.cssFloat=value:style[styleName]=(""+value).trim():style[styleName]=value+"px";}function setValueForStyles(node,styles,prevStyles){if(null!=styles&&"object"!==typeof styles)throw Error(formatProdErrorMessage(62));node=node.style;if(null!=prevStyles){for(var styleName in prevStyles)!prevStyles.hasOwnProperty(styleName)||null!=styles&&styles.hasOwnProperty(styleName)||(0===styleName.indexOf("--")?node.setProperty(styleName,""):"float"===styleName?node.cssFloat="":node[styleName]="");for(var styleName$16 in styles)styleName=styles[styleName$16],styles.hasOwnProperty(styleName$16)&&prevStyles[styleName$16]!==styleName&&setValueForStyle(node,styleName$16,styleName);}else for(var styleName$17 in styles)styles.hasOwnProperty(styleName$17)&&setValueForStyle(node,styleName$17,styles[styleName$17]);}function isCustomElement(tagName){if(-1===tagName.indexOf("-"))return  false;switch(tagName){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return  false;default:return  true;}}var aliases=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),isJavaScriptProtocol=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function sanitizeURL(url){return isJavaScriptProtocol.test(""+url)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":url;}function noop$1(){}var currentReplayingEvent=null;function getEventTarget$1(nativeEvent){nativeEvent=nativeEvent.target||nativeEvent.srcElement||window;nativeEvent.correspondingUseElement&&(nativeEvent=nativeEvent.correspondingUseElement);return 3===nativeEvent.nodeType?nativeEvent.parentNode:nativeEvent;}var restoreTarget=null,restoreQueue=null;function restoreStateOfTarget(target){var internalInstance=getInstanceFromNode(target);if(internalInstance&&(target=internalInstance.stateNode)){var props=target[internalPropsKey]||null;a:switch(target=internalInstance.stateNode,internalInstance.type){case "input":updateInput(target,props.value,props.defaultValue,props.defaultValue,props.checked,props.defaultChecked,props.type,props.name);internalInstance=props.name;if("radio"===props.type&&null!=internalInstance){for(props=target;props.parentNode;)props=props.parentNode;props=props.querySelectorAll('input[name="'+escapeSelectorAttributeValueInsideDoubleQuotes(""+internalInstance)+'"][type="radio"]');for(internalInstance=0;internalInstance<props.length;internalInstance++){var otherNode=props[internalInstance];if(otherNode!==target&&otherNode.form===target.form){var otherProps=otherNode[internalPropsKey]||null;if(!otherProps)throw Error(formatProdErrorMessage(90));updateInput(otherNode,otherProps.value,otherProps.defaultValue,otherProps.defaultValue,otherProps.checked,otherProps.defaultChecked,otherProps.type,otherProps.name);}}for(internalInstance=0;internalInstance<props.length;internalInstance++)otherNode=props[internalInstance],otherNode.form===target.form&&updateValueIfChanged(otherNode);}break a;case "textarea":updateTextarea(target,props.value,props.defaultValue);break a;case "select":internalInstance=props.value,null!=internalInstance&&updateOptions(target,!!props.multiple,internalInstance,false);}}}var isInsideEventHandler=false;function batchedUpdates$1(fn,a,b){if(isInsideEventHandler)return fn(a,b);isInsideEventHandler=true;try{var JSCompiler_inline_result=fn(a);return JSCompiler_inline_result;}finally{if(isInsideEventHandler=false,null!==restoreTarget||null!==restoreQueue)if(flushSyncWork$1(),restoreTarget&&(a=restoreTarget,fn=restoreQueue,restoreQueue=restoreTarget=null,restoreStateOfTarget(a),fn))for(a=0;a<fn.length;a++)restoreStateOfTarget(fn[a]);}}function getListener(inst,registrationName){var stateNode=inst.stateNode;if(null===stateNode)return null;var props=stateNode[internalPropsKey]||null;if(null===props)return null;stateNode=props[registrationName];a:switch(registrationName){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(props=!props.disabled)||(inst=inst.type,props=!("button"===inst||"input"===inst||"select"===inst||"textarea"===inst));inst=!props;break a;default:inst=false;}if(inst)return null;if(stateNode&&"function"!==typeof stateNode)throw Error(formatProdErrorMessage(231,registrationName,typeof stateNode));return stateNode;}var canUseDOM=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),passiveBrowserEventsSupported=false;if(canUseDOM)try{var options={};Object.defineProperty(options,"passive",{get:function(){passiveBrowserEventsSupported=!0;}});window.addEventListener("test",options,options);window.removeEventListener("test",options,options);}catch(e){passiveBrowserEventsSupported=false;}var root$1=null,startText=null,fallbackText=null;function getData(){if(fallbackText)return fallbackText;var start,startValue=startText,startLength=startValue.length,end,endValue="value"in root$1?root$1.value:root$1.textContent,endLength=endValue.length;for(start=0;start<startLength&&startValue[start]===endValue[start];start++);var minEnd=startLength-start;for(end=1;end<=minEnd&&startValue[startLength-end]===endValue[endLength-end];end++);return fallbackText=endValue.slice(start,1<end?1-end:void 0);}function getEventCharCode(nativeEvent){var keyCode=nativeEvent.keyCode;"charCode"in nativeEvent?(nativeEvent=nativeEvent.charCode,0===nativeEvent&&13===keyCode&&(nativeEvent=13)):nativeEvent=keyCode;10===nativeEvent&&(nativeEvent=13);return 32<=nativeEvent||13===nativeEvent?nativeEvent:0;}function functionThatReturnsTrue(){return  true;}function functionThatReturnsFalse(){return  false;}function createSyntheticEvent(Interface){function SyntheticBaseEvent(reactName,reactEventType,targetInst,nativeEvent,nativeEventTarget){this._reactName=reactName;this._targetInst=targetInst;this.type=reactEventType;this.nativeEvent=nativeEvent;this.target=nativeEventTarget;this.currentTarget=null;for(var propName in Interface)Interface.hasOwnProperty(propName)&&(reactName=Interface[propName],this[propName]=reactName?reactName(nativeEvent):nativeEvent[propName]);this.isDefaultPrevented=(null!=nativeEvent.defaultPrevented?nativeEvent.defaultPrevented:false===nativeEvent.returnValue)?functionThatReturnsTrue:functionThatReturnsFalse;this.isPropagationStopped=functionThatReturnsFalse;return this;}assign(SyntheticBaseEvent.prototype,{preventDefault:function(){this.defaultPrevented=true;var event=this.nativeEvent;event&&(event.preventDefault?event.preventDefault():"unknown"!==typeof event.returnValue&&(event.returnValue=false),this.isDefaultPrevented=functionThatReturnsTrue);},stopPropagation:function(){var event=this.nativeEvent;event&&(event.stopPropagation?event.stopPropagation():"unknown"!==typeof event.cancelBubble&&(event.cancelBubble=true),this.isPropagationStopped=functionThatReturnsTrue);},persist:function(){},isPersistent:functionThatReturnsTrue});return SyntheticBaseEvent;}var EventInterface={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(event){return event.timeStamp||Date.now();},defaultPrevented:0,isTrusted:0},SyntheticEvent=createSyntheticEvent(EventInterface),UIEventInterface=assign({},EventInterface,{view:0,detail:0}),SyntheticUIEvent=createSyntheticEvent(UIEventInterface),lastMovementX,lastMovementY,lastMouseEvent,MouseEventInterface=assign({},UIEventInterface,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:getEventModifierState,button:0,buttons:0,relatedTarget:function(event){return void 0===event.relatedTarget?event.fromElement===event.srcElement?event.toElement:event.fromElement:event.relatedTarget;},movementX:function(event){if("movementX"in event)return event.movementX;event!==lastMouseEvent&&(lastMouseEvent&&"mousemove"===event.type?(lastMovementX=event.screenX-lastMouseEvent.screenX,lastMovementY=event.screenY-lastMouseEvent.screenY):lastMovementY=lastMovementX=0,lastMouseEvent=event);return lastMovementX;},movementY:function(event){return "movementY"in event?event.movementY:lastMovementY;}}),SyntheticMouseEvent=createSyntheticEvent(MouseEventInterface),DragEventInterface=assign({},MouseEventInterface,{dataTransfer:0}),SyntheticDragEvent=createSyntheticEvent(DragEventInterface),FocusEventInterface=assign({},UIEventInterface,{relatedTarget:0}),SyntheticFocusEvent=createSyntheticEvent(FocusEventInterface),AnimationEventInterface=assign({},EventInterface,{animationName:0,elapsedTime:0,pseudoElement:0}),SyntheticAnimationEvent=createSyntheticEvent(AnimationEventInterface),ClipboardEventInterface=assign({},EventInterface,{clipboardData:function(event){return "clipboardData"in event?event.clipboardData:window.clipboardData;}}),SyntheticClipboardEvent=createSyntheticEvent(ClipboardEventInterface),CompositionEventInterface=assign({},EventInterface,{data:0}),SyntheticCompositionEvent=createSyntheticEvent(CompositionEventInterface),normalizeKey={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},translateToKey={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},modifierKeyToProp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function modifierStateGetter(keyArg){var nativeEvent=this.nativeEvent;return nativeEvent.getModifierState?nativeEvent.getModifierState(keyArg):(keyArg=modifierKeyToProp[keyArg])?!!nativeEvent[keyArg]:false;}function getEventModifierState(){return modifierStateGetter;}var KeyboardEventInterface=assign({},UIEventInterface,{key:function(nativeEvent){if(nativeEvent.key){var key=normalizeKey[nativeEvent.key]||nativeEvent.key;if("Unidentified"!==key)return key;}return "keypress"===nativeEvent.type?(nativeEvent=getEventCharCode(nativeEvent),13===nativeEvent?"Enter":String.fromCharCode(nativeEvent)):"keydown"===nativeEvent.type||"keyup"===nativeEvent.type?translateToKey[nativeEvent.keyCode]||"Unidentified":"";},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:getEventModifierState,charCode:function(event){return "keypress"===event.type?getEventCharCode(event):0;},keyCode:function(event){return "keydown"===event.type||"keyup"===event.type?event.keyCode:0;},which:function(event){return "keypress"===event.type?getEventCharCode(event):"keydown"===event.type||"keyup"===event.type?event.keyCode:0;}}),SyntheticKeyboardEvent=createSyntheticEvent(KeyboardEventInterface),PointerEventInterface=assign({},MouseEventInterface,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),SyntheticPointerEvent=createSyntheticEvent(PointerEventInterface),TouchEventInterface=assign({},UIEventInterface,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:getEventModifierState}),SyntheticTouchEvent=createSyntheticEvent(TouchEventInterface),TransitionEventInterface=assign({},EventInterface,{propertyName:0,elapsedTime:0,pseudoElement:0}),SyntheticTransitionEvent=createSyntheticEvent(TransitionEventInterface),WheelEventInterface=assign({},MouseEventInterface,{deltaX:function(event){return "deltaX"in event?event.deltaX:"wheelDeltaX"in event?-event.wheelDeltaX:0;},deltaY:function(event){return "deltaY"in event?event.deltaY:"wheelDeltaY"in event?-event.wheelDeltaY:"wheelDelta"in event?-event.wheelDelta:0;},deltaZ:0,deltaMode:0}),SyntheticWheelEvent=createSyntheticEvent(WheelEventInterface),ToggleEventInterface=assign({},EventInterface,{newState:0,oldState:0}),SyntheticToggleEvent=createSyntheticEvent(ToggleEventInterface),END_KEYCODES=[9,13,27,32],canUseCompositionEvent=canUseDOM&&"CompositionEvent"in window,documentMode=null;canUseDOM&&"documentMode"in document&&(documentMode=document.documentMode);var canUseTextInputEvent=canUseDOM&&"TextEvent"in window&&!documentMode,useFallbackCompositionData=canUseDOM&&(!canUseCompositionEvent||documentMode&&8<documentMode&&11>=documentMode),SPACEBAR_CHAR=String.fromCharCode(32),hasSpaceKeypress=false;function isFallbackCompositionEnd(domEventName,nativeEvent){switch(domEventName){case "keyup":return  -1!==END_KEYCODES.indexOf(nativeEvent.keyCode);case "keydown":return 229!==nativeEvent.keyCode;case "keypress":case "mousedown":case "focusout":return  true;default:return  false;}}function getDataFromCustomEvent(nativeEvent){nativeEvent=nativeEvent.detail;return "object"===typeof nativeEvent&&"data"in nativeEvent?nativeEvent.data:null;}var isComposing=false;function getNativeBeforeInputChars(domEventName,nativeEvent){switch(domEventName){case "compositionend":return getDataFromCustomEvent(nativeEvent);case "keypress":if(32!==nativeEvent.which)return null;hasSpaceKeypress=true;return SPACEBAR_CHAR;case "textInput":return domEventName=nativeEvent.data,domEventName===SPACEBAR_CHAR&&hasSpaceKeypress?null:domEventName;default:return null;}}function getFallbackBeforeInputChars(domEventName,nativeEvent){if(isComposing)return "compositionend"===domEventName||!canUseCompositionEvent&&isFallbackCompositionEnd(domEventName,nativeEvent)?(domEventName=getData(),fallbackText=startText=root$1=null,isComposing=false,domEventName):null;switch(domEventName){case "paste":return null;case "keypress":if(!(nativeEvent.ctrlKey||nativeEvent.altKey||nativeEvent.metaKey)||nativeEvent.ctrlKey&&nativeEvent.altKey){if(nativeEvent.char&&1<nativeEvent.char.length)return nativeEvent.char;if(nativeEvent.which)return String.fromCharCode(nativeEvent.which);}return null;case "compositionend":return useFallbackCompositionData&&"ko"!==nativeEvent.locale?null:nativeEvent.data;default:return null;}}var supportedInputTypes={color:true,date:true,datetime:true,"datetime-local":true,email:true,month:true,number:true,password:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true};function isTextInputElement(elem){var nodeName=elem&&elem.nodeName&&elem.nodeName.toLowerCase();return "input"===nodeName?!!supportedInputTypes[elem.type]:"textarea"===nodeName?true:false;}function createAndAccumulateChangeEvent(dispatchQueue,inst,nativeEvent,target){restoreTarget?restoreQueue?restoreQueue.push(target):restoreQueue=[target]:restoreTarget=target;inst=accumulateTwoPhaseListeners(inst,"onChange");0<inst.length&&(nativeEvent=new SyntheticEvent("onChange","change",null,nativeEvent,target),dispatchQueue.push({event:nativeEvent,listeners:inst}));}var activeElement$1=null,activeElementInst$1=null;function runEventInBatch(dispatchQueue){processDispatchQueue(dispatchQueue,0);}function getInstIfValueChanged(targetInst){var targetNode=getNodeFromInstance(targetInst);if(updateValueIfChanged(targetNode))return targetInst;}function getTargetInstForChangeEvent(domEventName,targetInst){if("change"===domEventName)return targetInst;}var isInputEventSupported=false;if(canUseDOM){var JSCompiler_inline_result$jscomp$286;if(canUseDOM){var isSupported$jscomp$inline_427="oninput"in document;if(!isSupported$jscomp$inline_427){var element$jscomp$inline_428=document.createElement("div");element$jscomp$inline_428.setAttribute("oninput","return;");isSupported$jscomp$inline_427="function"===typeof element$jscomp$inline_428.oninput;}JSCompiler_inline_result$jscomp$286=isSupported$jscomp$inline_427;}else JSCompiler_inline_result$jscomp$286=false;isInputEventSupported=JSCompiler_inline_result$jscomp$286&&(!document.documentMode||9<document.documentMode);}function stopWatchingForValueChange(){activeElement$1&&(activeElement$1.detachEvent("onpropertychange",handlePropertyChange),activeElementInst$1=activeElement$1=null);}function handlePropertyChange(nativeEvent){if("value"===nativeEvent.propertyName&&getInstIfValueChanged(activeElementInst$1)){var dispatchQueue=[];createAndAccumulateChangeEvent(dispatchQueue,activeElementInst$1,nativeEvent,getEventTarget$1(nativeEvent));batchedUpdates$1(runEventInBatch,dispatchQueue);}}function handleEventsForInputEventPolyfill(domEventName,target,targetInst){"focusin"===domEventName?(stopWatchingForValueChange(),activeElement$1=target,activeElementInst$1=targetInst,activeElement$1.attachEvent("onpropertychange",handlePropertyChange)):"focusout"===domEventName&&stopWatchingForValueChange();}function getTargetInstForInputEventPolyfill(domEventName){if("selectionchange"===domEventName||"keyup"===domEventName||"keydown"===domEventName)return getInstIfValueChanged(activeElementInst$1);}function getTargetInstForClickEvent(domEventName,targetInst){if("click"===domEventName)return getInstIfValueChanged(targetInst);}function getTargetInstForInputOrChangeEvent(domEventName,targetInst){if("input"===domEventName||"change"===domEventName)return getInstIfValueChanged(targetInst);}function is$1(x,y){return x===y&&(0!==x||1/x===1/y)||x!==x&&y!==y;}var objectIs="function"===typeof Object.is?Object.is:is$1;function shallowEqual(objA,objB){if(objectIs(objA,objB))return  true;if("object"!==typeof objA||null===objA||"object"!==typeof objB||null===objB)return  false;var keysA=Object.keys(objA),keysB=Object.keys(objB);if(keysA.length!==keysB.length)return  false;for(keysB=0;keysB<keysA.length;keysB++){var currentKey=keysA[keysB];if(!hasOwnProperty.call(objB,currentKey)||!objectIs(objA[currentKey],objB[currentKey]))return  false;}return  true;}function getLeafNode(node){for(;node&&node.firstChild;)node=node.firstChild;return node;}function getNodeForCharacterOffset(root,offset){var node=getLeafNode(root);root=0;for(var nodeEnd;node;){if(3===node.nodeType){nodeEnd=root+node.textContent.length;if(root<=offset&&nodeEnd>=offset)return {node:node,offset:offset-root};root=nodeEnd;}a:{for(;node;){if(node.nextSibling){node=node.nextSibling;break a;}node=node.parentNode;}node=void 0;}node=getLeafNode(node);}}function containsNode(outerNode,innerNode){return outerNode&&innerNode?outerNode===innerNode?true:outerNode&&3===outerNode.nodeType?false:innerNode&&3===innerNode.nodeType?containsNode(outerNode,innerNode.parentNode):"contains"in outerNode?outerNode.contains(innerNode):outerNode.compareDocumentPosition?!!(outerNode.compareDocumentPosition(innerNode)&16):false:false;}function getActiveElementDeep(containerInfo){containerInfo=null!=containerInfo&&null!=containerInfo.ownerDocument&&null!=containerInfo.ownerDocument.defaultView?containerInfo.ownerDocument.defaultView:window;for(var element=getActiveElement(containerInfo.document);element instanceof containerInfo.HTMLIFrameElement;){try{var JSCompiler_inline_result="string"===typeof element.contentWindow.location.href;}catch(err){JSCompiler_inline_result=false;}if(JSCompiler_inline_result)containerInfo=element.contentWindow;else break;element=getActiveElement(containerInfo.document);}return element;}function hasSelectionCapabilities(elem){var nodeName=elem&&elem.nodeName&&elem.nodeName.toLowerCase();return nodeName&&("input"===nodeName&&("text"===elem.type||"search"===elem.type||"tel"===elem.type||"url"===elem.type||"password"===elem.type)||"textarea"===nodeName||"true"===elem.contentEditable);}var skipSelectionChangeEvent=canUseDOM&&"documentMode"in document&&11>=document.documentMode,activeElement=null,activeElementInst=null,lastSelection=null,mouseDown=false;function constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget){var doc=nativeEventTarget.window===nativeEventTarget?nativeEventTarget.document:9===nativeEventTarget.nodeType?nativeEventTarget:nativeEventTarget.ownerDocument;mouseDown||null==activeElement||activeElement!==getActiveElement(doc)||(doc=activeElement,"selectionStart"in doc&&hasSelectionCapabilities(doc)?doc={start:doc.selectionStart,end:doc.selectionEnd}:(doc=(doc.ownerDocument&&doc.ownerDocument.defaultView||window).getSelection(),doc={anchorNode:doc.anchorNode,anchorOffset:doc.anchorOffset,focusNode:doc.focusNode,focusOffset:doc.focusOffset}),lastSelection&&shallowEqual(lastSelection,doc)||(lastSelection=doc,doc=accumulateTwoPhaseListeners(activeElementInst,"onSelect"),0<doc.length&&(nativeEvent=new SyntheticEvent("onSelect","select",null,nativeEvent,nativeEventTarget),dispatchQueue.push({event:nativeEvent,listeners:doc}),nativeEvent.target=activeElement)));}function makePrefixMap(styleProp,eventName){var prefixes={};prefixes[styleProp.toLowerCase()]=eventName.toLowerCase();prefixes["Webkit"+styleProp]="webkit"+eventName;prefixes["Moz"+styleProp]="moz"+eventName;return prefixes;}var vendorPrefixes={animationend:makePrefixMap("Animation","AnimationEnd"),animationiteration:makePrefixMap("Animation","AnimationIteration"),animationstart:makePrefixMap("Animation","AnimationStart"),transitionrun:makePrefixMap("Transition","TransitionRun"),transitionstart:makePrefixMap("Transition","TransitionStart"),transitioncancel:makePrefixMap("Transition","TransitionCancel"),transitionend:makePrefixMap("Transition","TransitionEnd")},prefixedEventNames={},style={};canUseDOM&&(style=document.createElement("div").style,"AnimationEvent"in window||(delete vendorPrefixes.animationend.animation,delete vendorPrefixes.animationiteration.animation,delete vendorPrefixes.animationstart.animation),"TransitionEvent"in window||delete vendorPrefixes.transitionend.transition);function getVendorPrefixedEventName(eventName){if(prefixedEventNames[eventName])return prefixedEventNames[eventName];if(!vendorPrefixes[eventName])return eventName;var prefixMap=vendorPrefixes[eventName],styleProp;for(styleProp in prefixMap)if(prefixMap.hasOwnProperty(styleProp)&&styleProp in style)return prefixedEventNames[eventName]=prefixMap[styleProp];return eventName;}var ANIMATION_END=getVendorPrefixedEventName("animationend"),ANIMATION_ITERATION=getVendorPrefixedEventName("animationiteration"),ANIMATION_START=getVendorPrefixedEventName("animationstart"),TRANSITION_RUN=getVendorPrefixedEventName("transitionrun"),TRANSITION_START=getVendorPrefixedEventName("transitionstart"),TRANSITION_CANCEL=getVendorPrefixedEventName("transitioncancel"),TRANSITION_END=getVendorPrefixedEventName("transitionend"),topLevelEventsToReactNames=new Map(),simpleEventPluginEvents="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");simpleEventPluginEvents.push("scrollEnd");function registerSimpleEvent(domEventName,reactName){topLevelEventsToReactNames.set(domEventName,reactName);registerTwoPhaseEvent(reactName,[domEventName]);}var reportGlobalError="function"===typeof reportError?reportError:function(error){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var event=new window.ErrorEvent("error",{bubbles:true,cancelable:true,message:"object"===typeof error&&null!==error&&"string"===typeof error.message?String(error.message):String(error),error:error});if(!window.dispatchEvent(event))return;}else if("object"===typeof process&&"function"===typeof process.emit){process.emit("uncaughtException",error);return;}console.error(error);},concurrentQueues=[],concurrentQueuesIndex=0,concurrentlyUpdatedLanes=0;function finishQueueingConcurrentUpdates(){for(var endIndex=concurrentQueuesIndex,i=concurrentlyUpdatedLanes=concurrentQueuesIndex=0;i<endIndex;){var fiber=concurrentQueues[i];concurrentQueues[i++]=null;var queue=concurrentQueues[i];concurrentQueues[i++]=null;var update=concurrentQueues[i];concurrentQueues[i++]=null;var lane=concurrentQueues[i];concurrentQueues[i++]=null;if(null!==queue&&null!==update){var pending=queue.pending;null===pending?update.next=update:(update.next=pending.next,pending.next=update);queue.pending=update;}0!==lane&&markUpdateLaneFromFiberToRoot(fiber,update,lane);}}function enqueueUpdate$1(fiber,queue,update,lane){concurrentQueues[concurrentQueuesIndex++]=fiber;concurrentQueues[concurrentQueuesIndex++]=queue;concurrentQueues[concurrentQueuesIndex++]=update;concurrentQueues[concurrentQueuesIndex++]=lane;concurrentlyUpdatedLanes|=lane;fiber.lanes|=lane;fiber=fiber.alternate;null!==fiber&&(fiber.lanes|=lane);}function enqueueConcurrentHookUpdate(fiber,queue,update,lane){enqueueUpdate$1(fiber,queue,update,lane);return getRootForUpdatedFiber(fiber);}function enqueueConcurrentRenderForLane(fiber,lane){enqueueUpdate$1(fiber,null,null,lane);return getRootForUpdatedFiber(fiber);}function markUpdateLaneFromFiberToRoot(sourceFiber,update,lane){sourceFiber.lanes|=lane;var alternate=sourceFiber.alternate;null!==alternate&&(alternate.lanes|=lane);for(var isHidden=false,parent=sourceFiber.return;null!==parent;)parent.childLanes|=lane,alternate=parent.alternate,null!==alternate&&(alternate.childLanes|=lane),22===parent.tag&&(sourceFiber=parent.stateNode,null===sourceFiber||sourceFiber._visibility&1||(isHidden=true)),sourceFiber=parent,parent=parent.return;return 3===sourceFiber.tag?(parent=sourceFiber.stateNode,isHidden&&null!==update&&(isHidden=31-clz32(lane),sourceFiber=parent.hiddenUpdates,alternate=sourceFiber[isHidden],null===alternate?sourceFiber[isHidden]=[update]:alternate.push(update),update.lane=lane|536870912),parent):null;}function getRootForUpdatedFiber(sourceFiber){if(50<nestedUpdateCount)throw nestedUpdateCount=0,rootWithNestedUpdates=null,Error(formatProdErrorMessage(185));for(var parent=sourceFiber.return;null!==parent;)sourceFiber=parent,parent=sourceFiber.return;return 3===sourceFiber.tag?sourceFiber.stateNode:null;}var emptyContextObject={};function FiberNode(tag,pendingProps,key,mode){this.tag=tag;this.key=key;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.refCleanup=this.ref=null;this.pendingProps=pendingProps;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=mode;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null;}function createFiberImplClass(tag,pendingProps,key,mode){return new FiberNode(tag,pendingProps,key,mode);}function shouldConstruct(Component){Component=Component.prototype;return !(!Component||!Component.isReactComponent);}function createWorkInProgress(current,pendingProps){var workInProgress=current.alternate;null===workInProgress?(workInProgress=createFiberImplClass(current.tag,pendingProps,current.key,current.mode),workInProgress.elementType=current.elementType,workInProgress.type=current.type,workInProgress.stateNode=current.stateNode,workInProgress.alternate=current,current.alternate=workInProgress):(workInProgress.pendingProps=pendingProps,workInProgress.type=current.type,workInProgress.flags=0,workInProgress.subtreeFlags=0,workInProgress.deletions=null);workInProgress.flags=current.flags&65011712;workInProgress.childLanes=current.childLanes;workInProgress.lanes=current.lanes;workInProgress.child=current.child;workInProgress.memoizedProps=current.memoizedProps;workInProgress.memoizedState=current.memoizedState;workInProgress.updateQueue=current.updateQueue;pendingProps=current.dependencies;workInProgress.dependencies=null===pendingProps?null:{lanes:pendingProps.lanes,firstContext:pendingProps.firstContext};workInProgress.sibling=current.sibling;workInProgress.index=current.index;workInProgress.ref=current.ref;workInProgress.refCleanup=current.refCleanup;return workInProgress;}function resetWorkInProgress(workInProgress,renderLanes){workInProgress.flags&=65011714;var current=workInProgress.alternate;null===current?(workInProgress.childLanes=0,workInProgress.lanes=renderLanes,workInProgress.child=null,workInProgress.subtreeFlags=0,workInProgress.memoizedProps=null,workInProgress.memoizedState=null,workInProgress.updateQueue=null,workInProgress.dependencies=null,workInProgress.stateNode=null):(workInProgress.childLanes=current.childLanes,workInProgress.lanes=current.lanes,workInProgress.child=current.child,workInProgress.subtreeFlags=0,workInProgress.deletions=null,workInProgress.memoizedProps=current.memoizedProps,workInProgress.memoizedState=current.memoizedState,workInProgress.updateQueue=current.updateQueue,workInProgress.type=current.type,renderLanes=current.dependencies,workInProgress.dependencies=null===renderLanes?null:{lanes:renderLanes.lanes,firstContext:renderLanes.firstContext});return workInProgress;}function createFiberFromTypeAndProps(type,key,pendingProps,owner,mode,lanes){var fiberTag=0;owner=type;if("function"===typeof type)shouldConstruct(type)&&(fiberTag=1);else if("string"===typeof type)fiberTag=isHostHoistableType(type,pendingProps,contextStackCursor.current)?26:"html"===type||"head"===type||"body"===type?27:5;else a:switch(type){case REACT_ACTIVITY_TYPE:return type=createFiberImplClass(31,pendingProps,key,mode),type.elementType=REACT_ACTIVITY_TYPE,type.lanes=lanes,type;case REACT_FRAGMENT_TYPE:return createFiberFromFragment(pendingProps.children,mode,lanes,key);case REACT_STRICT_MODE_TYPE:fiberTag=8;mode|=24;break;case REACT_PROFILER_TYPE:return type=createFiberImplClass(12,pendingProps,key,mode|2),type.elementType=REACT_PROFILER_TYPE,type.lanes=lanes,type;case REACT_SUSPENSE_TYPE:return type=createFiberImplClass(13,pendingProps,key,mode),type.elementType=REACT_SUSPENSE_TYPE,type.lanes=lanes,type;case REACT_SUSPENSE_LIST_TYPE:return type=createFiberImplClass(19,pendingProps,key,mode),type.elementType=REACT_SUSPENSE_LIST_TYPE,type.lanes=lanes,type;default:if("object"===typeof type&&null!==type)switch(type.$$typeof){case REACT_CONTEXT_TYPE:fiberTag=10;break a;case REACT_CONSUMER_TYPE:fiberTag=9;break a;case REACT_FORWARD_REF_TYPE:fiberTag=11;break a;case REACT_MEMO_TYPE:fiberTag=14;break a;case REACT_LAZY_TYPE:fiberTag=16;owner=null;break a;}fiberTag=29;pendingProps=Error(formatProdErrorMessage(130,null===type?"null":typeof type,""));owner=null;}key=createFiberImplClass(fiberTag,pendingProps,key,mode);key.elementType=type;key.type=owner;key.lanes=lanes;return key;}function createFiberFromFragment(elements,mode,lanes,key){elements=createFiberImplClass(7,elements,key,mode);elements.lanes=lanes;return elements;}function createFiberFromText(content,mode,lanes){content=createFiberImplClass(6,content,null,mode);content.lanes=lanes;return content;}function createFiberFromDehydratedFragment(dehydratedNode){var fiber=createFiberImplClass(18,null,null,0);fiber.stateNode=dehydratedNode;return fiber;}function createFiberFromPortal(portal,mode,lanes){mode=createFiberImplClass(4,null!==portal.children?portal.children:[],portal.key,mode);mode.lanes=lanes;mode.stateNode={containerInfo:portal.containerInfo,pendingChildren:null,implementation:portal.implementation};return mode;}var CapturedStacks=new WeakMap();function createCapturedValueAtFiber(value,source){if("object"===typeof value&&null!==value){var existing=CapturedStacks.get(value);if(void 0!==existing)return existing;source={value:value,source:source,stack:getStackByFiberInDevAndProd(source)};CapturedStacks.set(value,source);return source;}return {value:value,source:source,stack:getStackByFiberInDevAndProd(source)};}var forkStack=[],forkStackIndex=0,treeForkProvider=null,treeForkCount=0,idStack=[],idStackIndex=0,treeContextProvider=null,treeContextId=1,treeContextOverflow="";function pushTreeFork(workInProgress,totalChildren){forkStack[forkStackIndex++]=treeForkCount;forkStack[forkStackIndex++]=treeForkProvider;treeForkProvider=workInProgress;treeForkCount=totalChildren;}function pushTreeId(workInProgress,totalChildren,index){idStack[idStackIndex++]=treeContextId;idStack[idStackIndex++]=treeContextOverflow;idStack[idStackIndex++]=treeContextProvider;treeContextProvider=workInProgress;var baseIdWithLeadingBit=treeContextId;workInProgress=treeContextOverflow;var baseLength=32-clz32(baseIdWithLeadingBit)-1;baseIdWithLeadingBit&=~(1<<baseLength);index+=1;var length=32-clz32(totalChildren)+baseLength;if(30<length){var numberOfOverflowBits=baseLength-baseLength%5;length=(baseIdWithLeadingBit&(1<<numberOfOverflowBits)-1).toString(32);baseIdWithLeadingBit>>=numberOfOverflowBits;baseLength-=numberOfOverflowBits;treeContextId=1<<32-clz32(totalChildren)+baseLength|index<<baseLength|baseIdWithLeadingBit;treeContextOverflow=length+workInProgress;}else treeContextId=1<<length|index<<baseLength|baseIdWithLeadingBit,treeContextOverflow=workInProgress;}function pushMaterializedTreeId(workInProgress){null!==workInProgress.return&&(pushTreeFork(workInProgress,1),pushTreeId(workInProgress,1,0));}function popTreeContext(workInProgress){for(;workInProgress===treeForkProvider;)treeForkProvider=forkStack[--forkStackIndex],forkStack[forkStackIndex]=null,treeForkCount=forkStack[--forkStackIndex],forkStack[forkStackIndex]=null;for(;workInProgress===treeContextProvider;)treeContextProvider=idStack[--idStackIndex],idStack[idStackIndex]=null,treeContextOverflow=idStack[--idStackIndex],idStack[idStackIndex]=null,treeContextId=idStack[--idStackIndex],idStack[idStackIndex]=null;}function restoreSuspendedTreeContext(workInProgress,suspendedContext){idStack[idStackIndex++]=treeContextId;idStack[idStackIndex++]=treeContextOverflow;idStack[idStackIndex++]=treeContextProvider;treeContextId=suspendedContext.id;treeContextOverflow=suspendedContext.overflow;treeContextProvider=workInProgress;}var hydrationParentFiber=null,nextHydratableInstance=null,isHydrating=false,hydrationErrors=null,rootOrSingletonContext=false,HydrationMismatchException=Error(formatProdErrorMessage(519));function throwOnHydrationMismatch(fiber){var error=Error(formatProdErrorMessage(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML",""));queueHydrationError(createCapturedValueAtFiber(error,fiber));throw HydrationMismatchException;}function prepareToHydrateHostInstance(fiber){var instance=fiber.stateNode,type=fiber.type,props=fiber.memoizedProps;instance[internalInstanceKey]=fiber;instance[internalPropsKey]=props;switch(type){case "dialog":listenToNonDelegatedEvent("cancel",instance);listenToNonDelegatedEvent("close",instance);break;case "iframe":case "object":case "embed":listenToNonDelegatedEvent("load",instance);break;case "video":case "audio":for(type=0;type<mediaEventTypes.length;type++)listenToNonDelegatedEvent(mediaEventTypes[type],instance);break;case "source":listenToNonDelegatedEvent("error",instance);break;case "img":case "image":case "link":listenToNonDelegatedEvent("error",instance);listenToNonDelegatedEvent("load",instance);break;case "details":listenToNonDelegatedEvent("toggle",instance);break;case "input":listenToNonDelegatedEvent("invalid",instance);initInput(instance,props.value,props.defaultValue,props.checked,props.defaultChecked,props.type,props.name,true);break;case "select":listenToNonDelegatedEvent("invalid",instance);break;case "textarea":listenToNonDelegatedEvent("invalid",instance),initTextarea(instance,props.value,props.defaultValue,props.children);}type=props.children;"string"!==typeof type&&"number"!==typeof type&&"bigint"!==typeof type||instance.textContent===""+type||true===props.suppressHydrationWarning||checkForUnmatchedText(instance.textContent,type)?(null!=props.popover&&(listenToNonDelegatedEvent("beforetoggle",instance),listenToNonDelegatedEvent("toggle",instance)),null!=props.onScroll&&listenToNonDelegatedEvent("scroll",instance),null!=props.onScrollEnd&&listenToNonDelegatedEvent("scrollend",instance),null!=props.onClick&&(instance.onclick=noop$1),instance=true):instance=false;instance||throwOnHydrationMismatch(fiber,true);}function popToNextHostParent(fiber){for(hydrationParentFiber=fiber.return;hydrationParentFiber;)switch(hydrationParentFiber.tag){case 5:case 31:case 13:rootOrSingletonContext=false;return;case 27:case 3:rootOrSingletonContext=true;return;default:hydrationParentFiber=hydrationParentFiber.return;}}function popHydrationState(fiber){if(fiber!==hydrationParentFiber)return  false;if(!isHydrating)return popToNextHostParent(fiber),isHydrating=true,false;var tag=fiber.tag,JSCompiler_temp;if(JSCompiler_temp=3!==tag&&27!==tag){if(JSCompiler_temp=5===tag)JSCompiler_temp=fiber.type,JSCompiler_temp=!("form"!==JSCompiler_temp&&"button"!==JSCompiler_temp)||shouldSetTextContent(fiber.type,fiber.memoizedProps);JSCompiler_temp=!JSCompiler_temp;}JSCompiler_temp&&nextHydratableInstance&&throwOnHydrationMismatch(fiber);popToNextHostParent(fiber);if(13===tag){fiber=fiber.memoizedState;fiber=null!==fiber?fiber.dehydrated:null;if(!fiber)throw Error(formatProdErrorMessage(317));nextHydratableInstance=getNextHydratableInstanceAfterHydrationBoundary(fiber);}else if(31===tag){fiber=fiber.memoizedState;fiber=null!==fiber?fiber.dehydrated:null;if(!fiber)throw Error(formatProdErrorMessage(317));nextHydratableInstance=getNextHydratableInstanceAfterHydrationBoundary(fiber);}else 27===tag?(tag=nextHydratableInstance,isSingletonScope(fiber.type)?(fiber=previousHydratableOnEnteringScopedSingleton,previousHydratableOnEnteringScopedSingleton=null,nextHydratableInstance=fiber):nextHydratableInstance=tag):nextHydratableInstance=hydrationParentFiber?getNextHydratable(fiber.stateNode.nextSibling):null;return  true;}function resetHydrationState(){nextHydratableInstance=hydrationParentFiber=null;isHydrating=false;}function upgradeHydrationErrorsToRecoverable(){var queuedErrors=hydrationErrors;null!==queuedErrors&&(null===workInProgressRootRecoverableErrors?workInProgressRootRecoverableErrors=queuedErrors:workInProgressRootRecoverableErrors.push.apply(workInProgressRootRecoverableErrors,queuedErrors),hydrationErrors=null);return queuedErrors;}function queueHydrationError(error){null===hydrationErrors?hydrationErrors=[error]:hydrationErrors.push(error);}var valueCursor=createCursor(null),currentlyRenderingFiber$1=null,lastContextDependency=null;function pushProvider(providerFiber,context,nextValue){push(valueCursor,context._currentValue);context._currentValue=nextValue;}function popProvider(context){context._currentValue=valueCursor.current;pop(valueCursor);}function scheduleContextWorkOnParentPath(parent,renderLanes,propagationRoot){for(;null!==parent;){var alternate=parent.alternate;(parent.childLanes&renderLanes)!==renderLanes?(parent.childLanes|=renderLanes,null!==alternate&&(alternate.childLanes|=renderLanes)):null!==alternate&&(alternate.childLanes&renderLanes)!==renderLanes&&(alternate.childLanes|=renderLanes);if(parent===propagationRoot)break;parent=parent.return;}}function propagateContextChanges(workInProgress,contexts,renderLanes,forcePropagateEntireTree){var fiber=workInProgress.child;null!==fiber&&(fiber.return=workInProgress);for(;null!==fiber;){var list=fiber.dependencies;if(null!==list){var nextFiber=fiber.child;list=list.firstContext;a:for(;null!==list;){var dependency=list;list=fiber;for(var i=0;i<contexts.length;i++)if(dependency.context===contexts[i]){list.lanes|=renderLanes;dependency=list.alternate;null!==dependency&&(dependency.lanes|=renderLanes);scheduleContextWorkOnParentPath(list.return,renderLanes,workInProgress);forcePropagateEntireTree||(nextFiber=null);break a;}list=dependency.next;}}else if(18===fiber.tag){nextFiber=fiber.return;if(null===nextFiber)throw Error(formatProdErrorMessage(341));nextFiber.lanes|=renderLanes;list=nextFiber.alternate;null!==list&&(list.lanes|=renderLanes);scheduleContextWorkOnParentPath(nextFiber,renderLanes,workInProgress);nextFiber=null;}else nextFiber=fiber.child;if(null!==nextFiber)nextFiber.return=fiber;else for(nextFiber=fiber;null!==nextFiber;){if(nextFiber===workInProgress){nextFiber=null;break;}fiber=nextFiber.sibling;if(null!==fiber){fiber.return=nextFiber.return;nextFiber=fiber;break;}nextFiber=nextFiber.return;}fiber=nextFiber;}}function propagateParentContextChanges(current,workInProgress,renderLanes,forcePropagateEntireTree){current=null;for(var parent=workInProgress,isInsidePropagationBailout=false;null!==parent;){if(!isInsidePropagationBailout)if(0!==(parent.flags&524288))isInsidePropagationBailout=true;else if(0!==(parent.flags&262144))break;if(10===parent.tag){var currentParent=parent.alternate;if(null===currentParent)throw Error(formatProdErrorMessage(387));currentParent=currentParent.memoizedProps;if(null!==currentParent){var context=parent.type;objectIs(parent.pendingProps.value,currentParent.value)||(null!==current?current.push(context):current=[context]);}}else if(parent===hostTransitionProviderCursor.current){currentParent=parent.alternate;if(null===currentParent)throw Error(formatProdErrorMessage(387));currentParent.memoizedState.memoizedState!==parent.memoizedState.memoizedState&&(null!==current?current.push(HostTransitionContext):current=[HostTransitionContext]);}parent=parent.return;}null!==current&&propagateContextChanges(workInProgress,current,renderLanes,forcePropagateEntireTree);workInProgress.flags|=262144;}function checkIfContextChanged(currentDependencies){for(currentDependencies=currentDependencies.firstContext;null!==currentDependencies;){if(!objectIs(currentDependencies.context._currentValue,currentDependencies.memoizedValue))return  true;currentDependencies=currentDependencies.next;}return  false;}function prepareToReadContext(workInProgress){currentlyRenderingFiber$1=workInProgress;lastContextDependency=null;workInProgress=workInProgress.dependencies;null!==workInProgress&&(workInProgress.firstContext=null);}function readContext(context){return readContextForConsumer(currentlyRenderingFiber$1,context);}function readContextDuringReconciliation(consumer,context){null===currentlyRenderingFiber$1&&prepareToReadContext(consumer);return readContextForConsumer(consumer,context);}function readContextForConsumer(consumer,context){var value=context._currentValue;context={context:context,memoizedValue:value,next:null};if(null===lastContextDependency){if(null===consumer)throw Error(formatProdErrorMessage(308));lastContextDependency=context;consumer.dependencies={lanes:0,firstContext:context};consumer.flags|=524288;}else lastContextDependency=lastContextDependency.next=context;return value;}var AbortControllerLocal="undefined"!==typeof AbortController?AbortController:function(){var listeners=[],signal=this.signal={aborted:false,addEventListener:function(type,listener){listeners.push(listener);}};this.abort=function(){signal.aborted=true;listeners.forEach(function(listener){return listener();});};},scheduleCallback$2=Scheduler.unstable_scheduleCallback,NormalPriority=Scheduler.unstable_NormalPriority,CacheContext={$$typeof:REACT_CONTEXT_TYPE,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function createCache(){return {controller:new AbortControllerLocal(),data:new Map(),refCount:0};}function releaseCache(cache){cache.refCount--;0===cache.refCount&&scheduleCallback$2(NormalPriority,function(){cache.controller.abort();});}var currentEntangledListeners=null,currentEntangledPendingCount=0,currentEntangledLane=0,currentEntangledActionThenable=null;function entangleAsyncAction(transition,thenable){if(null===currentEntangledListeners){var entangledListeners=currentEntangledListeners=[];currentEntangledPendingCount=0;currentEntangledLane=requestTransitionLane();currentEntangledActionThenable={status:"pending",value:void 0,then:function(resolve){entangledListeners.push(resolve);}};}currentEntangledPendingCount++;thenable.then(pingEngtangledActionScope,pingEngtangledActionScope);return thenable;}function pingEngtangledActionScope(){if(0===--currentEntangledPendingCount&&null!==currentEntangledListeners){null!==currentEntangledActionThenable&&(currentEntangledActionThenable.status="fulfilled");var listeners=currentEntangledListeners;currentEntangledListeners=null;currentEntangledLane=0;currentEntangledActionThenable=null;for(var i=0;i<listeners.length;i++)(0, listeners[i])();}}function chainThenableValue(thenable,result){var listeners=[],thenableWithOverride={status:"pending",value:null,reason:null,then:function(resolve){listeners.push(resolve);}};thenable.then(function(){thenableWithOverride.status="fulfilled";thenableWithOverride.value=result;for(var i=0;i<listeners.length;i++)(0, listeners[i])(result);},function(error){thenableWithOverride.status="rejected";thenableWithOverride.reason=error;for(error=0;error<listeners.length;error++)(0, listeners[error])(void 0);});return thenableWithOverride;}var prevOnStartTransitionFinish=ReactSharedInternals.S;ReactSharedInternals.S=function(transition,returnValue){globalMostRecentTransitionTime=now();"object"===typeof returnValue&&null!==returnValue&&"function"===typeof returnValue.then&&entangleAsyncAction(transition,returnValue);null!==prevOnStartTransitionFinish&&prevOnStartTransitionFinish(transition,returnValue);};var resumedCache=createCursor(null);function peekCacheFromPool(){var cacheResumedFromPreviousRender=resumedCache.current;return null!==cacheResumedFromPreviousRender?cacheResumedFromPreviousRender:workInProgressRoot.pooledCache;}function pushTransition(offscreenWorkInProgress,prevCachePool){null===prevCachePool?push(resumedCache,resumedCache.current):push(resumedCache,prevCachePool.pool);}function getSuspendedCache(){var cacheFromPool=peekCacheFromPool();return null===cacheFromPool?null:{parent:CacheContext._currentValue,pool:cacheFromPool};}var SuspenseException=Error(formatProdErrorMessage(460)),SuspenseyCommitException=Error(formatProdErrorMessage(474)),SuspenseActionException=Error(formatProdErrorMessage(542)),noopSuspenseyCommitThenable={then:function(){}};function isThenableResolved(thenable){thenable=thenable.status;return "fulfilled"===thenable||"rejected"===thenable;}function trackUsedThenable(thenableState,thenable,index){index=thenableState[index];void 0===index?thenableState.push(thenable):index!==thenable&&(thenable.then(noop$1,noop$1),thenable=index);switch(thenable.status){case "fulfilled":return thenable.value;case "rejected":throw thenableState=thenable.reason,checkIfUseWrappedInAsyncCatch(thenableState),thenableState;default:if("string"===typeof thenable.status)thenable.then(noop$1,noop$1);else {thenableState=workInProgressRoot;if(null!==thenableState&&100<thenableState.shellSuspendCounter)throw Error(formatProdErrorMessage(482));thenableState=thenable;thenableState.status="pending";thenableState.then(function(fulfilledValue){if("pending"===thenable.status){var fulfilledThenable=thenable;fulfilledThenable.status="fulfilled";fulfilledThenable.value=fulfilledValue;}},function(error){if("pending"===thenable.status){var rejectedThenable=thenable;rejectedThenable.status="rejected";rejectedThenable.reason=error;}});}switch(thenable.status){case "fulfilled":return thenable.value;case "rejected":throw thenableState=thenable.reason,checkIfUseWrappedInAsyncCatch(thenableState),thenableState;}suspendedThenable=thenable;throw SuspenseException;}}function resolveLazy(lazyType){try{var init=lazyType._init;return init(lazyType._payload);}catch(x){if(null!==x&&"object"===typeof x&&"function"===typeof x.then)throw suspendedThenable=x,SuspenseException;throw x;}}var suspendedThenable=null;function getSuspendedThenable(){if(null===suspendedThenable)throw Error(formatProdErrorMessage(459));var thenable=suspendedThenable;suspendedThenable=null;return thenable;}function checkIfUseWrappedInAsyncCatch(rejectedReason){if(rejectedReason===SuspenseException||rejectedReason===SuspenseActionException)throw Error(formatProdErrorMessage(483));}var thenableState$1=null,thenableIndexCounter$1=0;function unwrapThenable(thenable){var index=thenableIndexCounter$1;thenableIndexCounter$1+=1;null===thenableState$1&&(thenableState$1=[]);return trackUsedThenable(thenableState$1,thenable,index);}function coerceRef(workInProgress,element){element=element.props.ref;workInProgress.ref=void 0!==element?element:null;}function throwOnInvalidObjectTypeImpl(returnFiber,newChild){if(newChild.$$typeof===REACT_LEGACY_ELEMENT_TYPE)throw Error(formatProdErrorMessage(525));returnFiber=Object.prototype.toString.call(newChild);throw Error(formatProdErrorMessage(31,"[object Object]"===returnFiber?"object with keys {"+Object.keys(newChild).join(", ")+"}":returnFiber));}function createChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(shouldTrackSideEffects){var deletions=returnFiber.deletions;null===deletions?(returnFiber.deletions=[childToDelete],returnFiber.flags|=16):deletions.push(childToDelete);}}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects)return null;for(;null!==currentFirstChild;)deleteChild(returnFiber,currentFirstChild),currentFirstChild=currentFirstChild.sibling;return null;}function mapRemainingChildren(currentFirstChild){for(var existingChildren=new Map();null!==currentFirstChild;)null!==currentFirstChild.key?existingChildren.set(currentFirstChild.key,currentFirstChild):existingChildren.set(currentFirstChild.index,currentFirstChild),currentFirstChild=currentFirstChild.sibling;return existingChildren;}function useFiber(fiber,pendingProps){fiber=createWorkInProgress(fiber,pendingProps);fiber.index=0;fiber.sibling=null;return fiber;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects)return newFiber.flags|=1048576,lastPlacedIndex;newIndex=newFiber.alternate;if(null!==newIndex)return newIndex=newIndex.index,newIndex<lastPlacedIndex?(newFiber.flags|=67108866,lastPlacedIndex):newIndex;newFiber.flags|=67108866;return lastPlacedIndex;}function placeSingleChild(newFiber){shouldTrackSideEffects&&null===newFiber.alternate&&(newFiber.flags|=67108866);return newFiber;}function updateTextNode(returnFiber,current,textContent,lanes){if(null===current||6!==current.tag)return current=createFiberFromText(textContent,returnFiber.mode,lanes),current.return=returnFiber,current;current=useFiber(current,textContent);current.return=returnFiber;return current;}function updateElement(returnFiber,current,element,lanes){var elementType=element.type;if(elementType===REACT_FRAGMENT_TYPE)return updateFragment(returnFiber,current,element.props.children,lanes,element.key);if(null!==current&&(current.elementType===elementType||"object"===typeof elementType&&null!==elementType&&elementType.$$typeof===REACT_LAZY_TYPE&&resolveLazy(elementType)===current.type))return current=useFiber(current,element.props),coerceRef(current,element),current.return=returnFiber,current;current=createFiberFromTypeAndProps(element.type,element.key,element.props,null,returnFiber.mode,lanes);coerceRef(current,element);current.return=returnFiber;return current;}function updatePortal(returnFiber,current,portal,lanes){if(null===current||4!==current.tag||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation)return current=createFiberFromPortal(portal,returnFiber.mode,lanes),current.return=returnFiber,current;current=useFiber(current,portal.children||[]);current.return=returnFiber;return current;}function updateFragment(returnFiber,current,fragment,lanes,key){if(null===current||7!==current.tag)return current=createFiberFromFragment(fragment,returnFiber.mode,lanes,key),current.return=returnFiber,current;current=useFiber(current,fragment);current.return=returnFiber;return current;}function createChild(returnFiber,newChild,lanes){if("string"===typeof newChild&&""!==newChild||"number"===typeof newChild||"bigint"===typeof newChild)return newChild=createFiberFromText(""+newChild,returnFiber.mode,lanes),newChild.return=returnFiber,newChild;if("object"===typeof newChild&&null!==newChild){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return lanes=createFiberFromTypeAndProps(newChild.type,newChild.key,newChild.props,null,returnFiber.mode,lanes),coerceRef(lanes,newChild),lanes.return=returnFiber,lanes;case REACT_PORTAL_TYPE:return newChild=createFiberFromPortal(newChild,returnFiber.mode,lanes),newChild.return=returnFiber,newChild;case REACT_LAZY_TYPE:return newChild=resolveLazy(newChild),createChild(returnFiber,newChild,lanes);}if(isArrayImpl(newChild)||getIteratorFn(newChild))return newChild=createFiberFromFragment(newChild,returnFiber.mode,lanes,null),newChild.return=returnFiber,newChild;if("function"===typeof newChild.then)return createChild(returnFiber,unwrapThenable(newChild),lanes);if(newChild.$$typeof===REACT_CONTEXT_TYPE)return createChild(returnFiber,readContextDuringReconciliation(returnFiber,newChild),lanes);throwOnInvalidObjectTypeImpl(returnFiber,newChild);}return null;}function updateSlot(returnFiber,oldFiber,newChild,lanes){var key=null!==oldFiber?oldFiber.key:null;if("string"===typeof newChild&&""!==newChild||"number"===typeof newChild||"bigint"===typeof newChild)return null!==key?null:updateTextNode(returnFiber,oldFiber,""+newChild,lanes);if("object"===typeof newChild&&null!==newChild){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return newChild.key===key?updateElement(returnFiber,oldFiber,newChild,lanes):null;case REACT_PORTAL_TYPE:return newChild.key===key?updatePortal(returnFiber,oldFiber,newChild,lanes):null;case REACT_LAZY_TYPE:return newChild=resolveLazy(newChild),updateSlot(returnFiber,oldFiber,newChild,lanes);}if(isArrayImpl(newChild)||getIteratorFn(newChild))return null!==key?null:updateFragment(returnFiber,oldFiber,newChild,lanes,null);if("function"===typeof newChild.then)return updateSlot(returnFiber,oldFiber,unwrapThenable(newChild),lanes);if(newChild.$$typeof===REACT_CONTEXT_TYPE)return updateSlot(returnFiber,oldFiber,readContextDuringReconciliation(returnFiber,newChild),lanes);throwOnInvalidObjectTypeImpl(returnFiber,newChild);}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,lanes){if("string"===typeof newChild&&""!==newChild||"number"===typeof newChild||"bigint"===typeof newChild)return existingChildren=existingChildren.get(newIdx)||null,updateTextNode(returnFiber,existingChildren,""+newChild,lanes);if("object"===typeof newChild&&null!==newChild){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return existingChildren=existingChildren.get(null===newChild.key?newIdx:newChild.key)||null,updateElement(returnFiber,existingChildren,newChild,lanes);case REACT_PORTAL_TYPE:return existingChildren=existingChildren.get(null===newChild.key?newIdx:newChild.key)||null,updatePortal(returnFiber,existingChildren,newChild,lanes);case REACT_LAZY_TYPE:return newChild=resolveLazy(newChild),updateFromMap(existingChildren,returnFiber,newIdx,newChild,lanes);}if(isArrayImpl(newChild)||getIteratorFn(newChild))return existingChildren=existingChildren.get(newIdx)||null,updateFragment(returnFiber,existingChildren,newChild,lanes,null);if("function"===typeof newChild.then)return updateFromMap(existingChildren,returnFiber,newIdx,unwrapThenable(newChild),lanes);if(newChild.$$typeof===REACT_CONTEXT_TYPE)return updateFromMap(existingChildren,returnFiber,newIdx,readContextDuringReconciliation(returnFiber,newChild),lanes);throwOnInvalidObjectTypeImpl(returnFiber,newChild);}return null;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,lanes){for(var resultingFirstChild=null,previousNewFiber=null,oldFiber=currentFirstChild,newIdx=currentFirstChild=0,nextOldFiber=null;null!==oldFiber&&newIdx<newChildren.length;newIdx++){oldFiber.index>newIdx?(nextOldFiber=oldFiber,oldFiber=null):nextOldFiber=oldFiber.sibling;var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],lanes);if(null===newFiber){null===oldFiber&&(oldFiber=nextOldFiber);break;}shouldTrackSideEffects&&oldFiber&&null===newFiber.alternate&&deleteChild(returnFiber,oldFiber);currentFirstChild=placeChild(newFiber,currentFirstChild,newIdx);null===previousNewFiber?resultingFirstChild=newFiber:previousNewFiber.sibling=newFiber;previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length)return deleteRemainingChildren(returnFiber,oldFiber),isHydrating&&pushTreeFork(returnFiber,newIdx),resultingFirstChild;if(null===oldFiber){for(;newIdx<newChildren.length;newIdx++)oldFiber=createChild(returnFiber,newChildren[newIdx],lanes),null!==oldFiber&&(currentFirstChild=placeChild(oldFiber,currentFirstChild,newIdx),null===previousNewFiber?resultingFirstChild=oldFiber:previousNewFiber.sibling=oldFiber,previousNewFiber=oldFiber);isHydrating&&pushTreeFork(returnFiber,newIdx);return resultingFirstChild;}for(oldFiber=mapRemainingChildren(oldFiber);newIdx<newChildren.length;newIdx++)nextOldFiber=updateFromMap(oldFiber,returnFiber,newIdx,newChildren[newIdx],lanes),null!==nextOldFiber&&(shouldTrackSideEffects&&null!==nextOldFiber.alternate&&oldFiber.delete(null===nextOldFiber.key?newIdx:nextOldFiber.key),currentFirstChild=placeChild(nextOldFiber,currentFirstChild,newIdx),null===previousNewFiber?resultingFirstChild=nextOldFiber:previousNewFiber.sibling=nextOldFiber,previousNewFiber=nextOldFiber);shouldTrackSideEffects&&oldFiber.forEach(function(child){return deleteChild(returnFiber,child);});isHydrating&&pushTreeFork(returnFiber,newIdx);return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildren,lanes){if(null==newChildren)throw Error(formatProdErrorMessage(151));for(var resultingFirstChild=null,previousNewFiber=null,oldFiber=currentFirstChild,newIdx=currentFirstChild=0,nextOldFiber=null,step=newChildren.next();null!==oldFiber&&!step.done;newIdx++,step=newChildren.next()){oldFiber.index>newIdx?(nextOldFiber=oldFiber,oldFiber=null):nextOldFiber=oldFiber.sibling;var newFiber=updateSlot(returnFiber,oldFiber,step.value,lanes);if(null===newFiber){null===oldFiber&&(oldFiber=nextOldFiber);break;}shouldTrackSideEffects&&oldFiber&&null===newFiber.alternate&&deleteChild(returnFiber,oldFiber);currentFirstChild=placeChild(newFiber,currentFirstChild,newIdx);null===previousNewFiber?resultingFirstChild=newFiber:previousNewFiber.sibling=newFiber;previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done)return deleteRemainingChildren(returnFiber,oldFiber),isHydrating&&pushTreeFork(returnFiber,newIdx),resultingFirstChild;if(null===oldFiber){for(;!step.done;newIdx++,step=newChildren.next())step=createChild(returnFiber,step.value,lanes),null!==step&&(currentFirstChild=placeChild(step,currentFirstChild,newIdx),null===previousNewFiber?resultingFirstChild=step:previousNewFiber.sibling=step,previousNewFiber=step);isHydrating&&pushTreeFork(returnFiber,newIdx);return resultingFirstChild;}for(oldFiber=mapRemainingChildren(oldFiber);!step.done;newIdx++,step=newChildren.next())step=updateFromMap(oldFiber,returnFiber,newIdx,step.value,lanes),null!==step&&(shouldTrackSideEffects&&null!==step.alternate&&oldFiber.delete(null===step.key?newIdx:step.key),currentFirstChild=placeChild(step,currentFirstChild,newIdx),null===previousNewFiber?resultingFirstChild=step:previousNewFiber.sibling=step,previousNewFiber=step);shouldTrackSideEffects&&oldFiber.forEach(function(child){return deleteChild(returnFiber,child);});isHydrating&&pushTreeFork(returnFiber,newIdx);return resultingFirstChild;}function reconcileChildFibersImpl(returnFiber,currentFirstChild,newChild,lanes){"object"===typeof newChild&&null!==newChild&&newChild.type===REACT_FRAGMENT_TYPE&&null===newChild.key&&(newChild=newChild.props.children);if("object"===typeof newChild&&null!==newChild){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:a:{for(var key=newChild.key;null!==currentFirstChild;){if(currentFirstChild.key===key){key=newChild.type;if(key===REACT_FRAGMENT_TYPE){if(7===currentFirstChild.tag){deleteRemainingChildren(returnFiber,currentFirstChild.sibling);lanes=useFiber(currentFirstChild,newChild.props.children);lanes.return=returnFiber;returnFiber=lanes;break a;}}else if(currentFirstChild.elementType===key||"object"===typeof key&&null!==key&&key.$$typeof===REACT_LAZY_TYPE&&resolveLazy(key)===currentFirstChild.type){deleteRemainingChildren(returnFiber,currentFirstChild.sibling);lanes=useFiber(currentFirstChild,newChild.props);coerceRef(lanes,newChild);lanes.return=returnFiber;returnFiber=lanes;break a;}deleteRemainingChildren(returnFiber,currentFirstChild);break;}else deleteChild(returnFiber,currentFirstChild);currentFirstChild=currentFirstChild.sibling;}newChild.type===REACT_FRAGMENT_TYPE?(lanes=createFiberFromFragment(newChild.props.children,returnFiber.mode,lanes,newChild.key),lanes.return=returnFiber,returnFiber=lanes):(lanes=createFiberFromTypeAndProps(newChild.type,newChild.key,newChild.props,null,returnFiber.mode,lanes),coerceRef(lanes,newChild),lanes.return=returnFiber,returnFiber=lanes);}return placeSingleChild(returnFiber);case REACT_PORTAL_TYPE:a:{for(key=newChild.key;null!==currentFirstChild;){if(currentFirstChild.key===key){if(4===currentFirstChild.tag&&currentFirstChild.stateNode.containerInfo===newChild.containerInfo&&currentFirstChild.stateNode.implementation===newChild.implementation){deleteRemainingChildren(returnFiber,currentFirstChild.sibling);lanes=useFiber(currentFirstChild,newChild.children||[]);lanes.return=returnFiber;returnFiber=lanes;break a;}else {deleteRemainingChildren(returnFiber,currentFirstChild);break;}}else deleteChild(returnFiber,currentFirstChild);currentFirstChild=currentFirstChild.sibling;}lanes=createFiberFromPortal(newChild,returnFiber.mode,lanes);lanes.return=returnFiber;returnFiber=lanes;}return placeSingleChild(returnFiber);case REACT_LAZY_TYPE:return newChild=resolveLazy(newChild),reconcileChildFibersImpl(returnFiber,currentFirstChild,newChild,lanes);}if(isArrayImpl(newChild))return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,lanes);if(getIteratorFn(newChild)){key=getIteratorFn(newChild);if("function"!==typeof key)throw Error(formatProdErrorMessage(150));newChild=key.call(newChild);return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,lanes);}if("function"===typeof newChild.then)return reconcileChildFibersImpl(returnFiber,currentFirstChild,unwrapThenable(newChild),lanes);if(newChild.$$typeof===REACT_CONTEXT_TYPE)return reconcileChildFibersImpl(returnFiber,currentFirstChild,readContextDuringReconciliation(returnFiber,newChild),lanes);throwOnInvalidObjectTypeImpl(returnFiber,newChild);}return "string"===typeof newChild&&""!==newChild||"number"===typeof newChild||"bigint"===typeof newChild?(newChild=""+newChild,null!==currentFirstChild&&6===currentFirstChild.tag?(deleteRemainingChildren(returnFiber,currentFirstChild.sibling),lanes=useFiber(currentFirstChild,newChild),lanes.return=returnFiber,returnFiber=lanes):(deleteRemainingChildren(returnFiber,currentFirstChild),lanes=createFiberFromText(newChild,returnFiber.mode,lanes),lanes.return=returnFiber,returnFiber=lanes),placeSingleChild(returnFiber)):deleteRemainingChildren(returnFiber,currentFirstChild);}return function(returnFiber,currentFirstChild,newChild,lanes){try{thenableIndexCounter$1=0;var firstChildFiber=reconcileChildFibersImpl(returnFiber,currentFirstChild,newChild,lanes);thenableState$1=null;return firstChildFiber;}catch(x){if(x===SuspenseException||x===SuspenseActionException)throw x;var fiber=createFiberImplClass(29,x,null,returnFiber.mode);fiber.lanes=lanes;fiber.return=returnFiber;return fiber;}finally{}};}var reconcileChildFibers=createChildReconciler(true),mountChildFibers=createChildReconciler(false),hasForceUpdate=false;function initializeUpdateQueue(fiber){fiber.updateQueue={baseState:fiber.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null};}function cloneUpdateQueue(current,workInProgress){current=current.updateQueue;workInProgress.updateQueue===current&&(workInProgress.updateQueue={baseState:current.baseState,firstBaseUpdate:current.firstBaseUpdate,lastBaseUpdate:current.lastBaseUpdate,shared:current.shared,callbacks:null});}function createUpdate(lane){return {lane:lane,tag:0,payload:null,callback:null,next:null};}function enqueueUpdate(fiber,update,lane){var updateQueue=fiber.updateQueue;if(null===updateQueue)return null;updateQueue=updateQueue.shared;if(0!==(executionContext&2)){var pending=updateQueue.pending;null===pending?update.next=update:(update.next=pending.next,pending.next=update);updateQueue.pending=update;update=getRootForUpdatedFiber(fiber);markUpdateLaneFromFiberToRoot(fiber,null,lane);return update;}enqueueUpdate$1(fiber,updateQueue,update,lane);return getRootForUpdatedFiber(fiber);}function entangleTransitions(root,fiber,lane){fiber=fiber.updateQueue;if(null!==fiber&&(fiber=fiber.shared,0!==(lane&4194048))){var queueLanes=fiber.lanes;queueLanes&=root.pendingLanes;lane|=queueLanes;fiber.lanes=lane;markRootEntangled(root,lane);}}function enqueueCapturedUpdate(workInProgress,capturedUpdate){var queue=workInProgress.updateQueue,current=workInProgress.alternate;if(null!==current&&(current=current.updateQueue,queue===current)){var newFirst=null,newLast=null;queue=queue.firstBaseUpdate;if(null!==queue){do{var clone={lane:queue.lane,tag:queue.tag,payload:queue.payload,callback:null,next:null};null===newLast?newFirst=newLast=clone:newLast=newLast.next=clone;queue=queue.next;}while(null!==queue);null===newLast?newFirst=newLast=capturedUpdate:newLast=newLast.next=capturedUpdate;}else newFirst=newLast=capturedUpdate;queue={baseState:current.baseState,firstBaseUpdate:newFirst,lastBaseUpdate:newLast,shared:current.shared,callbacks:current.callbacks};workInProgress.updateQueue=queue;return;}workInProgress=queue.lastBaseUpdate;null===workInProgress?queue.firstBaseUpdate=capturedUpdate:workInProgress.next=capturedUpdate;queue.lastBaseUpdate=capturedUpdate;}var didReadFromEntangledAsyncAction=false;function suspendIfUpdateReadFromEntangledAsyncAction(){if(didReadFromEntangledAsyncAction){var entangledActionThenable=currentEntangledActionThenable;if(null!==entangledActionThenable)throw entangledActionThenable;}}function processUpdateQueue(workInProgress$jscomp$0,props,instance$jscomp$0,renderLanes){didReadFromEntangledAsyncAction=false;var queue=workInProgress$jscomp$0.updateQueue;hasForceUpdate=false;var firstBaseUpdate=queue.firstBaseUpdate,lastBaseUpdate=queue.lastBaseUpdate,pendingQueue=queue.shared.pending;if(null!==pendingQueue){queue.shared.pending=null;var lastPendingUpdate=pendingQueue,firstPendingUpdate=lastPendingUpdate.next;lastPendingUpdate.next=null;null===lastBaseUpdate?firstBaseUpdate=firstPendingUpdate:lastBaseUpdate.next=firstPendingUpdate;lastBaseUpdate=lastPendingUpdate;var current=workInProgress$jscomp$0.alternate;null!==current&&(current=current.updateQueue,pendingQueue=current.lastBaseUpdate,pendingQueue!==lastBaseUpdate&&(null===pendingQueue?current.firstBaseUpdate=firstPendingUpdate:pendingQueue.next=firstPendingUpdate,current.lastBaseUpdate=lastPendingUpdate));}if(null!==firstBaseUpdate){var newState=queue.baseState;lastBaseUpdate=0;current=firstPendingUpdate=lastPendingUpdate=null;pendingQueue=firstBaseUpdate;do{var updateLane=pendingQueue.lane&-536870913,isHiddenUpdate=updateLane!==pendingQueue.lane;if(isHiddenUpdate?(workInProgressRootRenderLanes&updateLane)===updateLane:(renderLanes&updateLane)===updateLane){0!==updateLane&&updateLane===currentEntangledLane&&(didReadFromEntangledAsyncAction=true);null!==current&&(current=current.next={lane:0,tag:pendingQueue.tag,payload:pendingQueue.payload,callback:null,next:null});a:{var workInProgress=workInProgress$jscomp$0,update=pendingQueue;updateLane=props;var instance=instance$jscomp$0;switch(update.tag){case 1:workInProgress=update.payload;if("function"===typeof workInProgress){newState=workInProgress.call(instance,newState,updateLane);break a;}newState=workInProgress;break a;case 3:workInProgress.flags=workInProgress.flags&-65537|128;case 0:workInProgress=update.payload;updateLane="function"===typeof workInProgress?workInProgress.call(instance,newState,updateLane):workInProgress;if(null===updateLane||void 0===updateLane)break a;newState=assign({},newState,updateLane);break a;case 2:hasForceUpdate=true;}}updateLane=pendingQueue.callback;null!==updateLane&&(workInProgress$jscomp$0.flags|=64,isHiddenUpdate&&(workInProgress$jscomp$0.flags|=8192),isHiddenUpdate=queue.callbacks,null===isHiddenUpdate?queue.callbacks=[updateLane]:isHiddenUpdate.push(updateLane));}else isHiddenUpdate={lane:updateLane,tag:pendingQueue.tag,payload:pendingQueue.payload,callback:pendingQueue.callback,next:null},null===current?(firstPendingUpdate=current=isHiddenUpdate,lastPendingUpdate=newState):current=current.next=isHiddenUpdate,lastBaseUpdate|=updateLane;pendingQueue=pendingQueue.next;if(null===pendingQueue)if(pendingQueue=queue.shared.pending,null===pendingQueue)break;else isHiddenUpdate=pendingQueue,pendingQueue=isHiddenUpdate.next,isHiddenUpdate.next=null,queue.lastBaseUpdate=isHiddenUpdate,queue.shared.pending=null;}while(1);null===current&&(lastPendingUpdate=newState);queue.baseState=lastPendingUpdate;queue.firstBaseUpdate=firstPendingUpdate;queue.lastBaseUpdate=current;null===firstBaseUpdate&&(queue.shared.lanes=0);workInProgressRootSkippedLanes|=lastBaseUpdate;workInProgress$jscomp$0.lanes=lastBaseUpdate;workInProgress$jscomp$0.memoizedState=newState;}}function callCallback(callback,context){if("function"!==typeof callback)throw Error(formatProdErrorMessage(191,callback));callback.call(context);}function commitCallbacks(updateQueue,context){var callbacks=updateQueue.callbacks;if(null!==callbacks)for(updateQueue.callbacks=null,updateQueue=0;updateQueue<callbacks.length;updateQueue++)callCallback(callbacks[updateQueue],context);}var currentTreeHiddenStackCursor=createCursor(null),prevEntangledRenderLanesCursor=createCursor(0);function pushHiddenContext(fiber,context){fiber=entangledRenderLanes;push(prevEntangledRenderLanesCursor,fiber);push(currentTreeHiddenStackCursor,context);entangledRenderLanes=fiber|context.baseLanes;}function reuseHiddenContextOnStack(){push(prevEntangledRenderLanesCursor,entangledRenderLanes);push(currentTreeHiddenStackCursor,currentTreeHiddenStackCursor.current);}function popHiddenContext(){entangledRenderLanes=prevEntangledRenderLanesCursor.current;pop(currentTreeHiddenStackCursor);pop(prevEntangledRenderLanesCursor);}var suspenseHandlerStackCursor=createCursor(null),shellBoundary=null;function pushPrimaryTreeSuspenseHandler(handler){var current=handler.alternate;push(suspenseStackCursor,suspenseStackCursor.current&1);push(suspenseHandlerStackCursor,handler);null===shellBoundary&&(null===current||null!==currentTreeHiddenStackCursor.current?shellBoundary=handler:null!==current.memoizedState&&(shellBoundary=handler));}function pushDehydratedActivitySuspenseHandler(fiber){push(suspenseStackCursor,suspenseStackCursor.current);push(suspenseHandlerStackCursor,fiber);null===shellBoundary&&(shellBoundary=fiber);}function pushOffscreenSuspenseHandler(fiber){22===fiber.tag?(push(suspenseStackCursor,suspenseStackCursor.current),push(suspenseHandlerStackCursor,fiber),null===shellBoundary&&(shellBoundary=fiber)):reuseSuspenseHandlerOnStack();}function reuseSuspenseHandlerOnStack(){push(suspenseStackCursor,suspenseStackCursor.current);push(suspenseHandlerStackCursor,suspenseHandlerStackCursor.current);}function popSuspenseHandler(fiber){pop(suspenseHandlerStackCursor);shellBoundary===fiber&&(shellBoundary=null);pop(suspenseStackCursor);}var suspenseStackCursor=createCursor(0);function findFirstSuspended(row){for(var node=row;null!==node;){if(13===node.tag){var state=node.memoizedState;if(null!==state&&(state=state.dehydrated,null===state||isSuspenseInstancePending(state)||isSuspenseInstanceFallback(state)))return node;}else if(19===node.tag&&("forwards"===node.memoizedProps.revealOrder||"backwards"===node.memoizedProps.revealOrder||"unstable_legacy-backwards"===node.memoizedProps.revealOrder||"together"===node.memoizedProps.revealOrder)){if(0!==(node.flags&128))return node;}else if(null!==node.child){node.child.return=node;node=node.child;continue;}if(node===row)break;for(;null===node.sibling;){if(null===node.return||node.return===row)return null;node=node.return;}node.sibling.return=node.return;node=node.sibling;}return null;}var renderLanes=0,currentlyRenderingFiber=null,currentHook=null,workInProgressHook=null,didScheduleRenderPhaseUpdate=false,didScheduleRenderPhaseUpdateDuringThisPass=false,shouldDoubleInvokeUserFnsInHooksDEV=false,localIdCounter=0,thenableIndexCounter=0,thenableState=null,globalClientIdCounter=0;function throwInvalidHookError(){throw Error(formatProdErrorMessage(321));}function areHookInputsEqual(nextDeps,prevDeps){if(null===prevDeps)return  false;for(var i=0;i<prevDeps.length&&i<nextDeps.length;i++)if(!objectIs(nextDeps[i],prevDeps[i]))return  false;return  true;}function renderWithHooks(current,workInProgress,Component,props,secondArg,nextRenderLanes){renderLanes=nextRenderLanes;currentlyRenderingFiber=workInProgress;workInProgress.memoizedState=null;workInProgress.updateQueue=null;workInProgress.lanes=0;ReactSharedInternals.H=null===current||null===current.memoizedState?HooksDispatcherOnMount:HooksDispatcherOnUpdate;shouldDoubleInvokeUserFnsInHooksDEV=false;nextRenderLanes=Component(props,secondArg);shouldDoubleInvokeUserFnsInHooksDEV=false;didScheduleRenderPhaseUpdateDuringThisPass&&(nextRenderLanes=renderWithHooksAgain(workInProgress,Component,props,secondArg));finishRenderingHooks(current);return nextRenderLanes;}function finishRenderingHooks(current){ReactSharedInternals.H=ContextOnlyDispatcher;var didRenderTooFewHooks=null!==currentHook&&null!==currentHook.next;renderLanes=0;workInProgressHook=currentHook=currentlyRenderingFiber=null;didScheduleRenderPhaseUpdate=false;thenableIndexCounter=0;thenableState=null;if(didRenderTooFewHooks)throw Error(formatProdErrorMessage(300));null===current||didReceiveUpdate||(current=current.dependencies,null!==current&&checkIfContextChanged(current)&&(didReceiveUpdate=true));}function renderWithHooksAgain(workInProgress,Component,props,secondArg){currentlyRenderingFiber=workInProgress;var numberOfReRenders=0;do{didScheduleRenderPhaseUpdateDuringThisPass&&(thenableState=null);thenableIndexCounter=0;didScheduleRenderPhaseUpdateDuringThisPass=false;if(25<=numberOfReRenders)throw Error(formatProdErrorMessage(301));numberOfReRenders+=1;workInProgressHook=currentHook=null;if(null!=workInProgress.updateQueue){var children=workInProgress.updateQueue;children.lastEffect=null;children.events=null;children.stores=null;null!=children.memoCache&&(children.memoCache.index=0);}ReactSharedInternals.H=HooksDispatcherOnRerender;children=Component(props,secondArg);}while(didScheduleRenderPhaseUpdateDuringThisPass);return children;}function TransitionAwareHostComponent(){var dispatcher=ReactSharedInternals.H,maybeThenable=dispatcher.useState()[0];maybeThenable="function"===typeof maybeThenable.then?useThenable(maybeThenable):maybeThenable;dispatcher=dispatcher.useState()[0];(null!==currentHook?currentHook.memoizedState:null)!==dispatcher&&(currentlyRenderingFiber.flags|=1024);return maybeThenable;}function checkDidRenderIdHook(){var didRenderIdHook=0!==localIdCounter;localIdCounter=0;return didRenderIdHook;}function bailoutHooks(current,workInProgress,lanes){workInProgress.updateQueue=current.updateQueue;workInProgress.flags&=-2053;current.lanes&=~lanes;}function resetHooksOnUnwind(workInProgress){if(didScheduleRenderPhaseUpdate){for(workInProgress=workInProgress.memoizedState;null!==workInProgress;){var queue=workInProgress.queue;null!==queue&&(queue.pending=null);workInProgress=workInProgress.next;}didScheduleRenderPhaseUpdate=false;}renderLanes=0;workInProgressHook=currentHook=currentlyRenderingFiber=null;didScheduleRenderPhaseUpdateDuringThisPass=false;thenableIndexCounter=localIdCounter=0;thenableState=null;}function mountWorkInProgressHook(){var hook={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===workInProgressHook?currentlyRenderingFiber.memoizedState=workInProgressHook=hook:workInProgressHook=workInProgressHook.next=hook;return workInProgressHook;}function updateWorkInProgressHook(){if(null===currentHook){var nextCurrentHook=currentlyRenderingFiber.alternate;nextCurrentHook=null!==nextCurrentHook?nextCurrentHook.memoizedState:null;}else nextCurrentHook=currentHook.next;var nextWorkInProgressHook=null===workInProgressHook?currentlyRenderingFiber.memoizedState:workInProgressHook.next;if(null!==nextWorkInProgressHook)workInProgressHook=nextWorkInProgressHook,currentHook=nextCurrentHook;else {if(null===nextCurrentHook){if(null===currentlyRenderingFiber.alternate)throw Error(formatProdErrorMessage(467));throw Error(formatProdErrorMessage(310));}currentHook=nextCurrentHook;nextCurrentHook={memoizedState:currentHook.memoizedState,baseState:currentHook.baseState,baseQueue:currentHook.baseQueue,queue:currentHook.queue,next:null};null===workInProgressHook?currentlyRenderingFiber.memoizedState=workInProgressHook=nextCurrentHook:workInProgressHook=workInProgressHook.next=nextCurrentHook;}return workInProgressHook;}function createFunctionComponentUpdateQueue(){return {lastEffect:null,events:null,stores:null,memoCache:null};}function useThenable(thenable){var index=thenableIndexCounter;thenableIndexCounter+=1;null===thenableState&&(thenableState=[]);thenable=trackUsedThenable(thenableState,thenable,index);index=currentlyRenderingFiber;null===(null===workInProgressHook?index.memoizedState:workInProgressHook.next)&&(index=index.alternate,ReactSharedInternals.H=null===index||null===index.memoizedState?HooksDispatcherOnMount:HooksDispatcherOnUpdate);return thenable;}function use(usable){if(null!==usable&&"object"===typeof usable){if("function"===typeof usable.then)return useThenable(usable);if(usable.$$typeof===REACT_CONTEXT_TYPE)return readContext(usable);}throw Error(formatProdErrorMessage(438,String(usable)));}function useMemoCache(size){var memoCache=null,updateQueue=currentlyRenderingFiber.updateQueue;null!==updateQueue&&(memoCache=updateQueue.memoCache);if(null==memoCache){var current=currentlyRenderingFiber.alternate;null!==current&&(current=current.updateQueue,null!==current&&(current=current.memoCache,null!=current&&(memoCache={data:current.data.map(function(array){return array.slice();}),index:0})));}null==memoCache&&(memoCache={data:[],index:0});null===updateQueue&&(updateQueue=createFunctionComponentUpdateQueue(),currentlyRenderingFiber.updateQueue=updateQueue);updateQueue.memoCache=memoCache;updateQueue=memoCache.data[memoCache.index];if(void 0===updateQueue)for(updateQueue=memoCache.data[memoCache.index]=Array(size),current=0;current<size;current++)updateQueue[current]=REACT_MEMO_CACHE_SENTINEL;memoCache.index++;return updateQueue;}function basicStateReducer(state,action){return "function"===typeof action?action(state):action;}function updateReducer(reducer){var hook=updateWorkInProgressHook();return updateReducerImpl(hook,currentHook,reducer);}function updateReducerImpl(hook,current,reducer){var queue=hook.queue;if(null===queue)throw Error(formatProdErrorMessage(311));queue.lastRenderedReducer=reducer;var baseQueue=hook.baseQueue,pendingQueue=queue.pending;if(null!==pendingQueue){if(null!==baseQueue){var baseFirst=baseQueue.next;baseQueue.next=pendingQueue.next;pendingQueue.next=baseFirst;}current.baseQueue=baseQueue=pendingQueue;queue.pending=null;}pendingQueue=hook.baseState;if(null===baseQueue)hook.memoizedState=pendingQueue;else {current=baseQueue.next;var newBaseQueueFirst=baseFirst=null,newBaseQueueLast=null,update=current,didReadFromEntangledAsyncAction$60=false;do{var updateLane=update.lane&-536870913;if(updateLane!==update.lane?(workInProgressRootRenderLanes&updateLane)===updateLane:(renderLanes&updateLane)===updateLane){var revertLane=update.revertLane;if(0===revertLane)null!==newBaseQueueLast&&(newBaseQueueLast=newBaseQueueLast.next={lane:0,revertLane:0,gesture:null,action:update.action,hasEagerState:update.hasEagerState,eagerState:update.eagerState,next:null}),updateLane===currentEntangledLane&&(didReadFromEntangledAsyncAction$60=true);else if((renderLanes&revertLane)===revertLane){update=update.next;revertLane===currentEntangledLane&&(didReadFromEntangledAsyncAction$60=true);continue;}else updateLane={lane:0,revertLane:update.revertLane,gesture:null,action:update.action,hasEagerState:update.hasEagerState,eagerState:update.eagerState,next:null},null===newBaseQueueLast?(newBaseQueueFirst=newBaseQueueLast=updateLane,baseFirst=pendingQueue):newBaseQueueLast=newBaseQueueLast.next=updateLane,currentlyRenderingFiber.lanes|=revertLane,workInProgressRootSkippedLanes|=revertLane;updateLane=update.action;shouldDoubleInvokeUserFnsInHooksDEV&&reducer(pendingQueue,updateLane);pendingQueue=update.hasEagerState?update.eagerState:reducer(pendingQueue,updateLane);}else revertLane={lane:updateLane,revertLane:update.revertLane,gesture:update.gesture,action:update.action,hasEagerState:update.hasEagerState,eagerState:update.eagerState,next:null},null===newBaseQueueLast?(newBaseQueueFirst=newBaseQueueLast=revertLane,baseFirst=pendingQueue):newBaseQueueLast=newBaseQueueLast.next=revertLane,currentlyRenderingFiber.lanes|=updateLane,workInProgressRootSkippedLanes|=updateLane;update=update.next;}while(null!==update&&update!==current);null===newBaseQueueLast?baseFirst=pendingQueue:newBaseQueueLast.next=newBaseQueueFirst;if(!objectIs(pendingQueue,hook.memoizedState)&&(didReceiveUpdate=true,didReadFromEntangledAsyncAction$60&&(reducer=currentEntangledActionThenable,null!==reducer)))throw reducer;hook.memoizedState=pendingQueue;hook.baseState=baseFirst;hook.baseQueue=newBaseQueueLast;queue.lastRenderedState=pendingQueue;}null===baseQueue&&(queue.lanes=0);return [hook.memoizedState,queue.dispatch];}function rerenderReducer(reducer){var hook=updateWorkInProgressHook(),queue=hook.queue;if(null===queue)throw Error(formatProdErrorMessage(311));queue.lastRenderedReducer=reducer;var dispatch=queue.dispatch,lastRenderPhaseUpdate=queue.pending,newState=hook.memoizedState;if(null!==lastRenderPhaseUpdate){queue.pending=null;var update=lastRenderPhaseUpdate=lastRenderPhaseUpdate.next;do newState=reducer(newState,update.action),update=update.next;while(update!==lastRenderPhaseUpdate);objectIs(newState,hook.memoizedState)||(didReceiveUpdate=true);hook.memoizedState=newState;null===hook.baseQueue&&(hook.baseState=newState);queue.lastRenderedState=newState;}return [newState,dispatch];}function updateSyncExternalStore(subscribe,getSnapshot,getServerSnapshot){var fiber=currentlyRenderingFiber,hook=updateWorkInProgressHook(),isHydrating$jscomp$0=isHydrating;if(isHydrating$jscomp$0){if(void 0===getServerSnapshot)throw Error(formatProdErrorMessage(407));getServerSnapshot=getServerSnapshot();}else getServerSnapshot=getSnapshot();var snapshotChanged=!objectIs((currentHook||hook).memoizedState,getServerSnapshot);snapshotChanged&&(hook.memoizedState=getServerSnapshot,didReceiveUpdate=true);hook=hook.queue;updateEffect(subscribeToStore.bind(null,fiber,hook,subscribe),[subscribe]);if(hook.getSnapshot!==getSnapshot||snapshotChanged||null!==workInProgressHook&&workInProgressHook.memoizedState.tag&1){fiber.flags|=2048;pushSimpleEffect(9,{destroy:void 0},updateStoreInstance.bind(null,fiber,hook,getServerSnapshot,getSnapshot),null);if(null===workInProgressRoot)throw Error(formatProdErrorMessage(349));isHydrating$jscomp$0||0!==(renderLanes&127)||pushStoreConsistencyCheck(fiber,getSnapshot,getServerSnapshot);}return getServerSnapshot;}function pushStoreConsistencyCheck(fiber,getSnapshot,renderedSnapshot){fiber.flags|=16384;fiber={getSnapshot:getSnapshot,value:renderedSnapshot};getSnapshot=currentlyRenderingFiber.updateQueue;null===getSnapshot?(getSnapshot=createFunctionComponentUpdateQueue(),currentlyRenderingFiber.updateQueue=getSnapshot,getSnapshot.stores=[fiber]):(renderedSnapshot=getSnapshot.stores,null===renderedSnapshot?getSnapshot.stores=[fiber]:renderedSnapshot.push(fiber));}function updateStoreInstance(fiber,inst,nextSnapshot,getSnapshot){inst.value=nextSnapshot;inst.getSnapshot=getSnapshot;checkIfSnapshotChanged(inst)&&forceStoreRerender(fiber);}function subscribeToStore(fiber,inst,subscribe){return subscribe(function(){checkIfSnapshotChanged(inst)&&forceStoreRerender(fiber);});}function checkIfSnapshotChanged(inst){var latestGetSnapshot=inst.getSnapshot;inst=inst.value;try{var nextValue=latestGetSnapshot();return !objectIs(inst,nextValue);}catch(error){return  true;}}function forceStoreRerender(fiber){var root=enqueueConcurrentRenderForLane(fiber,2);null!==root&&scheduleUpdateOnFiber(root,fiber,2);}function mountStateImpl(initialState){var hook=mountWorkInProgressHook();if("function"===typeof initialState){var initialStateInitializer=initialState;initialState=initialStateInitializer();if(shouldDoubleInvokeUserFnsInHooksDEV){setIsStrictModeForDevtools(true);try{initialStateInitializer();}finally{setIsStrictModeForDevtools(false);}}}hook.memoizedState=hook.baseState=initialState;hook.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:basicStateReducer,lastRenderedState:initialState};return hook;}function updateOptimisticImpl(hook,current,passthrough,reducer){hook.baseState=passthrough;return updateReducerImpl(hook,currentHook,"function"===typeof reducer?reducer:basicStateReducer);}function dispatchActionState(fiber,actionQueue,setPendingState,setState,payload){if(isRenderPhaseUpdate(fiber))throw Error(formatProdErrorMessage(485));fiber=actionQueue.action;if(null!==fiber){var actionNode={payload:payload,action:fiber,next:null,isTransition:true,status:"pending",value:null,reason:null,listeners:[],then:function(listener){actionNode.listeners.push(listener);}};null!==ReactSharedInternals.T?setPendingState(true):actionNode.isTransition=false;setState(actionNode);setPendingState=actionQueue.pending;null===setPendingState?(actionNode.next=actionQueue.pending=actionNode,runActionStateAction(actionQueue,actionNode)):(actionNode.next=setPendingState.next,actionQueue.pending=setPendingState.next=actionNode);}}function runActionStateAction(actionQueue,node){var action=node.action,payload=node.payload,prevState=actionQueue.state;if(node.isTransition){var prevTransition=ReactSharedInternals.T,currentTransition={};ReactSharedInternals.T=currentTransition;try{var returnValue=action(prevState,payload),onStartTransitionFinish=ReactSharedInternals.S;null!==onStartTransitionFinish&&onStartTransitionFinish(currentTransition,returnValue);handleActionReturnValue(actionQueue,node,returnValue);}catch(error){onActionError(actionQueue,node,error);}finally{null!==prevTransition&&null!==currentTransition.types&&(prevTransition.types=currentTransition.types),ReactSharedInternals.T=prevTransition;}}else try{prevTransition=action(prevState,payload),handleActionReturnValue(actionQueue,node,prevTransition);}catch(error$66){onActionError(actionQueue,node,error$66);}}function handleActionReturnValue(actionQueue,node,returnValue){null!==returnValue&&"object"===typeof returnValue&&"function"===typeof returnValue.then?returnValue.then(function(nextState){onActionSuccess(actionQueue,node,nextState);},function(error){return onActionError(actionQueue,node,error);}):onActionSuccess(actionQueue,node,returnValue);}function onActionSuccess(actionQueue,actionNode,nextState){actionNode.status="fulfilled";actionNode.value=nextState;notifyActionListeners(actionNode);actionQueue.state=nextState;actionNode=actionQueue.pending;null!==actionNode&&(nextState=actionNode.next,nextState===actionNode?actionQueue.pending=null:(nextState=nextState.next,actionNode.next=nextState,runActionStateAction(actionQueue,nextState)));}function onActionError(actionQueue,actionNode,error){var last=actionQueue.pending;actionQueue.pending=null;if(null!==last){last=last.next;do actionNode.status="rejected",actionNode.reason=error,notifyActionListeners(actionNode),actionNode=actionNode.next;while(actionNode!==last);}actionQueue.action=null;}function notifyActionListeners(actionNode){actionNode=actionNode.listeners;for(var i=0;i<actionNode.length;i++)(0, actionNode[i])();}function actionStateReducer(oldState,newState){return newState;}function mountActionState(action,initialStateProp){if(isHydrating){var ssrFormState=workInProgressRoot.formState;if(null!==ssrFormState){a:{var JSCompiler_inline_result=currentlyRenderingFiber;if(isHydrating){if(nextHydratableInstance){b:{var JSCompiler_inline_result$jscomp$0=nextHydratableInstance;for(var inRootOrSingleton=rootOrSingletonContext;8!==JSCompiler_inline_result$jscomp$0.nodeType;){if(!inRootOrSingleton){JSCompiler_inline_result$jscomp$0=null;break b;}JSCompiler_inline_result$jscomp$0=getNextHydratable(JSCompiler_inline_result$jscomp$0.nextSibling);if(null===JSCompiler_inline_result$jscomp$0){JSCompiler_inline_result$jscomp$0=null;break b;}}inRootOrSingleton=JSCompiler_inline_result$jscomp$0.data;JSCompiler_inline_result$jscomp$0="F!"===inRootOrSingleton||"F"===inRootOrSingleton?JSCompiler_inline_result$jscomp$0:null;}if(JSCompiler_inline_result$jscomp$0){nextHydratableInstance=getNextHydratable(JSCompiler_inline_result$jscomp$0.nextSibling);JSCompiler_inline_result="F!"===JSCompiler_inline_result$jscomp$0.data;break a;}}throwOnHydrationMismatch(JSCompiler_inline_result);}JSCompiler_inline_result=false;}JSCompiler_inline_result&&(initialStateProp=ssrFormState[0]);}}ssrFormState=mountWorkInProgressHook();ssrFormState.memoizedState=ssrFormState.baseState=initialStateProp;JSCompiler_inline_result={pending:null,lanes:0,dispatch:null,lastRenderedReducer:actionStateReducer,lastRenderedState:initialStateProp};ssrFormState.queue=JSCompiler_inline_result;ssrFormState=dispatchSetState.bind(null,currentlyRenderingFiber,JSCompiler_inline_result);JSCompiler_inline_result.dispatch=ssrFormState;JSCompiler_inline_result=mountStateImpl(false);inRootOrSingleton=dispatchOptimisticSetState.bind(null,currentlyRenderingFiber,false,JSCompiler_inline_result.queue);JSCompiler_inline_result=mountWorkInProgressHook();JSCompiler_inline_result$jscomp$0={state:initialStateProp,dispatch:null,action:action,pending:null};JSCompiler_inline_result.queue=JSCompiler_inline_result$jscomp$0;ssrFormState=dispatchActionState.bind(null,currentlyRenderingFiber,JSCompiler_inline_result$jscomp$0,inRootOrSingleton,ssrFormState);JSCompiler_inline_result$jscomp$0.dispatch=ssrFormState;JSCompiler_inline_result.memoizedState=action;return [initialStateProp,ssrFormState,false];}function updateActionState(action){var stateHook=updateWorkInProgressHook();return updateActionStateImpl(stateHook,currentHook,action);}function updateActionStateImpl(stateHook,currentStateHook,action){currentStateHook=updateReducerImpl(stateHook,currentStateHook,actionStateReducer)[0];stateHook=updateReducer(basicStateReducer)[0];if("object"===typeof currentStateHook&&null!==currentStateHook&&"function"===typeof currentStateHook.then)try{var state=useThenable(currentStateHook);}catch(x){if(x===SuspenseException)throw SuspenseActionException;throw x;}else state=currentStateHook;currentStateHook=updateWorkInProgressHook();var actionQueue=currentStateHook.queue,dispatch=actionQueue.dispatch;action!==currentStateHook.memoizedState&&(currentlyRenderingFiber.flags|=2048,pushSimpleEffect(9,{destroy:void 0},actionStateActionEffect.bind(null,actionQueue,action),null));return [state,dispatch,stateHook];}function actionStateActionEffect(actionQueue,action){actionQueue.action=action;}function rerenderActionState(action){var stateHook=updateWorkInProgressHook(),currentStateHook=currentHook;if(null!==currentStateHook)return updateActionStateImpl(stateHook,currentStateHook,action);updateWorkInProgressHook();stateHook=stateHook.memoizedState;currentStateHook=updateWorkInProgressHook();var dispatch=currentStateHook.queue.dispatch;currentStateHook.memoizedState=action;return [stateHook,dispatch,false];}function pushSimpleEffect(tag,inst,create,deps){tag={tag:tag,create:create,deps:deps,inst:inst,next:null};inst=currentlyRenderingFiber.updateQueue;null===inst&&(inst=createFunctionComponentUpdateQueue(),currentlyRenderingFiber.updateQueue=inst);create=inst.lastEffect;null===create?inst.lastEffect=tag.next=tag:(deps=create.next,create.next=tag,tag.next=deps,inst.lastEffect=tag);return tag;}function updateRef(){return updateWorkInProgressHook().memoizedState;}function mountEffectImpl(fiberFlags,hookFlags,create,deps){var hook=mountWorkInProgressHook();currentlyRenderingFiber.flags|=fiberFlags;hook.memoizedState=pushSimpleEffect(1|hookFlags,{destroy:void 0},create,void 0===deps?null:deps);}function updateEffectImpl(fiberFlags,hookFlags,create,deps){var hook=updateWorkInProgressHook();deps=void 0===deps?null:deps;var inst=hook.memoizedState.inst;null!==currentHook&&null!==deps&&areHookInputsEqual(deps,currentHook.memoizedState.deps)?hook.memoizedState=pushSimpleEffect(hookFlags,inst,create,deps):(currentlyRenderingFiber.flags|=fiberFlags,hook.memoizedState=pushSimpleEffect(1|hookFlags,inst,create,deps));}function mountEffect(create,deps){mountEffectImpl(8390656,8,create,deps);}function updateEffect(create,deps){updateEffectImpl(2048,8,create,deps);}function useEffectEventImpl(payload){currentlyRenderingFiber.flags|=4;var componentUpdateQueue=currentlyRenderingFiber.updateQueue;if(null===componentUpdateQueue)componentUpdateQueue=createFunctionComponentUpdateQueue(),currentlyRenderingFiber.updateQueue=componentUpdateQueue,componentUpdateQueue.events=[payload];else {var events=componentUpdateQueue.events;null===events?componentUpdateQueue.events=[payload]:events.push(payload);}}function updateEvent(callback){var ref=updateWorkInProgressHook().memoizedState;useEffectEventImpl({ref:ref,nextImpl:callback});return function(){if(0!==(executionContext&2))throw Error(formatProdErrorMessage(440));return ref.impl.apply(void 0,arguments);};}function updateInsertionEffect(create,deps){return updateEffectImpl(4,2,create,deps);}function updateLayoutEffect(create,deps){return updateEffectImpl(4,4,create,deps);}function imperativeHandleEffect(create,ref){if("function"===typeof ref){create=create();var refCleanup=ref(create);return function(){"function"===typeof refCleanup?refCleanup():ref(null);};}if(null!==ref&&void 0!==ref)return create=create(),ref.current=create,function(){ref.current=null;};}function updateImperativeHandle(ref,create,deps){deps=null!==deps&&void 0!==deps?deps.concat([ref]):null;updateEffectImpl(4,4,imperativeHandleEffect.bind(null,create,ref),deps);}function mountDebugValue(){}function updateCallback(callback,deps){var hook=updateWorkInProgressHook();deps=void 0===deps?null:deps;var prevState=hook.memoizedState;if(null!==deps&&areHookInputsEqual(deps,prevState[1]))return prevState[0];hook.memoizedState=[callback,deps];return callback;}function updateMemo(nextCreate,deps){var hook=updateWorkInProgressHook();deps=void 0===deps?null:deps;var prevState=hook.memoizedState;if(null!==deps&&areHookInputsEqual(deps,prevState[1]))return prevState[0];prevState=nextCreate();if(shouldDoubleInvokeUserFnsInHooksDEV){setIsStrictModeForDevtools(true);try{nextCreate();}finally{setIsStrictModeForDevtools(false);}}hook.memoizedState=[prevState,deps];return prevState;}function mountDeferredValueImpl(hook,value,initialValue){if(void 0===initialValue||0!==(renderLanes&1073741824)&&0===(workInProgressRootRenderLanes&261930))return hook.memoizedState=value;hook.memoizedState=initialValue;hook=requestDeferredLane();currentlyRenderingFiber.lanes|=hook;workInProgressRootSkippedLanes|=hook;return initialValue;}function updateDeferredValueImpl(hook,prevValue,value,initialValue){if(objectIs(value,prevValue))return value;if(null!==currentTreeHiddenStackCursor.current)return hook=mountDeferredValueImpl(hook,value,initialValue),objectIs(hook,prevValue)||(didReceiveUpdate=true),hook;if(0===(renderLanes&42)||0!==(renderLanes&1073741824)&&0===(workInProgressRootRenderLanes&261930))return didReceiveUpdate=true,hook.memoizedState=value;hook=requestDeferredLane();currentlyRenderingFiber.lanes|=hook;workInProgressRootSkippedLanes|=hook;return prevValue;}function startTransition(fiber,queue,pendingState,finishedState,callback){var previousPriority=ReactDOMSharedInternals.p;ReactDOMSharedInternals.p=0!==previousPriority&&8>previousPriority?previousPriority:8;var prevTransition=ReactSharedInternals.T,currentTransition={};ReactSharedInternals.T=currentTransition;dispatchOptimisticSetState(fiber,false,queue,pendingState);try{var returnValue=callback(),onStartTransitionFinish=ReactSharedInternals.S;null!==onStartTransitionFinish&&onStartTransitionFinish(currentTransition,returnValue);if(null!==returnValue&&"object"===typeof returnValue&&"function"===typeof returnValue.then){var thenableForFinishedState=chainThenableValue(returnValue,finishedState);dispatchSetStateInternal(fiber,queue,thenableForFinishedState,requestUpdateLane(fiber));}else dispatchSetStateInternal(fiber,queue,finishedState,requestUpdateLane(fiber));}catch(error){dispatchSetStateInternal(fiber,queue,{then:function(){},status:"rejected",reason:error},requestUpdateLane());}finally{ReactDOMSharedInternals.p=previousPriority,null!==prevTransition&&null!==currentTransition.types&&(prevTransition.types=currentTransition.types),ReactSharedInternals.T=prevTransition;}}function noop$2(){}function startHostTransition(formFiber,pendingState,action,formData){if(5!==formFiber.tag)throw Error(formatProdErrorMessage(476));var queue=ensureFormComponentIsStateful(formFiber).queue;startTransition(formFiber,queue,pendingState,sharedNotPendingObject,null===action?noop$2:function(){requestFormReset$1(formFiber);return action(formData);});}function ensureFormComponentIsStateful(formFiber){var existingStateHook=formFiber.memoizedState;if(null!==existingStateHook)return existingStateHook;existingStateHook={memoizedState:sharedNotPendingObject,baseState:sharedNotPendingObject,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:basicStateReducer,lastRenderedState:sharedNotPendingObject},next:null};var initialResetState={};existingStateHook.next={memoizedState:initialResetState,baseState:initialResetState,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:basicStateReducer,lastRenderedState:initialResetState},next:null};formFiber.memoizedState=existingStateHook;formFiber=formFiber.alternate;null!==formFiber&&(formFiber.memoizedState=existingStateHook);return existingStateHook;}function requestFormReset$1(formFiber){var stateHook=ensureFormComponentIsStateful(formFiber);null===stateHook.next&&(stateHook=formFiber.alternate.memoizedState);dispatchSetStateInternal(formFiber,stateHook.next.queue,{},requestUpdateLane());}function useHostTransitionStatus(){return readContext(HostTransitionContext);}function updateId(){return updateWorkInProgressHook().memoizedState;}function updateRefresh(){return updateWorkInProgressHook().memoizedState;}function refreshCache(fiber){for(var provider=fiber.return;null!==provider;){switch(provider.tag){case 24:case 3:var lane=requestUpdateLane();fiber=createUpdate(lane);var root$69=enqueueUpdate(provider,fiber,lane);null!==root$69&&(scheduleUpdateOnFiber(root$69,provider,lane),entangleTransitions(root$69,provider,lane));provider={cache:createCache()};fiber.payload=provider;return;}provider=provider.return;}}function dispatchReducerAction(fiber,queue,action){var lane=requestUpdateLane();action={lane:lane,revertLane:0,gesture:null,action:action,hasEagerState:false,eagerState:null,next:null};isRenderPhaseUpdate(fiber)?enqueueRenderPhaseUpdate(queue,action):(action=enqueueConcurrentHookUpdate(fiber,queue,action,lane),null!==action&&(scheduleUpdateOnFiber(action,fiber,lane),entangleTransitionUpdate(action,queue,lane)));}function dispatchSetState(fiber,queue,action){var lane=requestUpdateLane();dispatchSetStateInternal(fiber,queue,action,lane);}function dispatchSetStateInternal(fiber,queue,action,lane){var update={lane:lane,revertLane:0,gesture:null,action:action,hasEagerState:false,eagerState:null,next:null};if(isRenderPhaseUpdate(fiber))enqueueRenderPhaseUpdate(queue,update);else {var alternate=fiber.alternate;if(0===fiber.lanes&&(null===alternate||0===alternate.lanes)&&(alternate=queue.lastRenderedReducer,null!==alternate))try{var currentState=queue.lastRenderedState,eagerState=alternate(currentState,action);update.hasEagerState=!0;update.eagerState=eagerState;if(objectIs(eagerState,currentState))return enqueueUpdate$1(fiber,queue,update,0),null===workInProgressRoot&&finishQueueingConcurrentUpdates(),!1;}catch(error){}finally{}action=enqueueConcurrentHookUpdate(fiber,queue,update,lane);if(null!==action)return scheduleUpdateOnFiber(action,fiber,lane),entangleTransitionUpdate(action,queue,lane),true;}return  false;}function dispatchOptimisticSetState(fiber,throwIfDuringRender,queue,action){action={lane:2,revertLane:requestTransitionLane(),gesture:null,action:action,hasEagerState:false,eagerState:null,next:null};if(isRenderPhaseUpdate(fiber)){if(throwIfDuringRender)throw Error(formatProdErrorMessage(479));}else throwIfDuringRender=enqueueConcurrentHookUpdate(fiber,queue,action,2),null!==throwIfDuringRender&&scheduleUpdateOnFiber(throwIfDuringRender,fiber,2);}function isRenderPhaseUpdate(fiber){var alternate=fiber.alternate;return fiber===currentlyRenderingFiber||null!==alternate&&alternate===currentlyRenderingFiber;}function enqueueRenderPhaseUpdate(queue,update){didScheduleRenderPhaseUpdateDuringThisPass=didScheduleRenderPhaseUpdate=true;var pending=queue.pending;null===pending?update.next=update:(update.next=pending.next,pending.next=update);queue.pending=update;}function entangleTransitionUpdate(root,queue,lane){if(0!==(lane&4194048)){var queueLanes=queue.lanes;queueLanes&=root.pendingLanes;lane|=queueLanes;queue.lanes=lane;markRootEntangled(root,lane);}}var ContextOnlyDispatcher={readContext:readContext,use:use,useCallback:throwInvalidHookError,useContext:throwInvalidHookError,useEffect:throwInvalidHookError,useImperativeHandle:throwInvalidHookError,useLayoutEffect:throwInvalidHookError,useInsertionEffect:throwInvalidHookError,useMemo:throwInvalidHookError,useReducer:throwInvalidHookError,useRef:throwInvalidHookError,useState:throwInvalidHookError,useDebugValue:throwInvalidHookError,useDeferredValue:throwInvalidHookError,useTransition:throwInvalidHookError,useSyncExternalStore:throwInvalidHookError,useId:throwInvalidHookError,useHostTransitionStatus:throwInvalidHookError,useFormState:throwInvalidHookError,useActionState:throwInvalidHookError,useOptimistic:throwInvalidHookError,useMemoCache:throwInvalidHookError,useCacheRefresh:throwInvalidHookError};ContextOnlyDispatcher.useEffectEvent=throwInvalidHookError;var HooksDispatcherOnMount={readContext:readContext,use:use,useCallback:function(callback,deps){mountWorkInProgressHook().memoizedState=[callback,void 0===deps?null:deps];return callback;},useContext:readContext,useEffect:mountEffect,useImperativeHandle:function(ref,create,deps){deps=null!==deps&&void 0!==deps?deps.concat([ref]):null;mountEffectImpl(4194308,4,imperativeHandleEffect.bind(null,create,ref),deps);},useLayoutEffect:function(create,deps){return mountEffectImpl(4194308,4,create,deps);},useInsertionEffect:function(create,deps){mountEffectImpl(4,2,create,deps);},useMemo:function(nextCreate,deps){var hook=mountWorkInProgressHook();deps=void 0===deps?null:deps;var nextValue=nextCreate();if(shouldDoubleInvokeUserFnsInHooksDEV){setIsStrictModeForDevtools(true);try{nextCreate();}finally{setIsStrictModeForDevtools(false);}}hook.memoizedState=[nextValue,deps];return nextValue;},useReducer:function(reducer,initialArg,init){var hook=mountWorkInProgressHook();if(void 0!==init){var initialState=init(initialArg);if(shouldDoubleInvokeUserFnsInHooksDEV){setIsStrictModeForDevtools(true);try{init(initialArg);}finally{setIsStrictModeForDevtools(false);}}}else initialState=initialArg;hook.memoizedState=hook.baseState=initialState;reducer={pending:null,lanes:0,dispatch:null,lastRenderedReducer:reducer,lastRenderedState:initialState};hook.queue=reducer;reducer=reducer.dispatch=dispatchReducerAction.bind(null,currentlyRenderingFiber,reducer);return [hook.memoizedState,reducer];},useRef:function(initialValue){var hook=mountWorkInProgressHook();initialValue={current:initialValue};return hook.memoizedState=initialValue;},useState:function(initialState){initialState=mountStateImpl(initialState);var queue=initialState.queue,dispatch=dispatchSetState.bind(null,currentlyRenderingFiber,queue);queue.dispatch=dispatch;return [initialState.memoizedState,dispatch];},useDebugValue:mountDebugValue,useDeferredValue:function(value,initialValue){var hook=mountWorkInProgressHook();return mountDeferredValueImpl(hook,value,initialValue);},useTransition:function(){var stateHook=mountStateImpl(false);stateHook=startTransition.bind(null,currentlyRenderingFiber,stateHook.queue,true,false);mountWorkInProgressHook().memoizedState=stateHook;return [false,stateHook];},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){var fiber=currentlyRenderingFiber,hook=mountWorkInProgressHook();if(isHydrating){if(void 0===getServerSnapshot)throw Error(formatProdErrorMessage(407));getServerSnapshot=getServerSnapshot();}else {getServerSnapshot=getSnapshot();if(null===workInProgressRoot)throw Error(formatProdErrorMessage(349));0!==(workInProgressRootRenderLanes&127)||pushStoreConsistencyCheck(fiber,getSnapshot,getServerSnapshot);}hook.memoizedState=getServerSnapshot;var inst={value:getServerSnapshot,getSnapshot:getSnapshot};hook.queue=inst;mountEffect(subscribeToStore.bind(null,fiber,inst,subscribe),[subscribe]);fiber.flags|=2048;pushSimpleEffect(9,{destroy:void 0},updateStoreInstance.bind(null,fiber,inst,getServerSnapshot,getSnapshot),null);return getServerSnapshot;},useId:function(){var hook=mountWorkInProgressHook(),identifierPrefix=workInProgressRoot.identifierPrefix;if(isHydrating){var JSCompiler_inline_result=treeContextOverflow;var idWithLeadingBit=treeContextId;JSCompiler_inline_result=(idWithLeadingBit&~(1<<32-clz32(idWithLeadingBit)-1)).toString(32)+JSCompiler_inline_result;identifierPrefix="_"+identifierPrefix+"R_"+JSCompiler_inline_result;JSCompiler_inline_result=localIdCounter++;0<JSCompiler_inline_result&&(identifierPrefix+="H"+JSCompiler_inline_result.toString(32));identifierPrefix+="_";}else JSCompiler_inline_result=globalClientIdCounter++,identifierPrefix="_"+identifierPrefix+"r_"+JSCompiler_inline_result.toString(32)+"_";return hook.memoizedState=identifierPrefix;},useHostTransitionStatus:useHostTransitionStatus,useFormState:mountActionState,useActionState:mountActionState,useOptimistic:function(passthrough){var hook=mountWorkInProgressHook();hook.memoizedState=hook.baseState=passthrough;var queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};hook.queue=queue;hook=dispatchOptimisticSetState.bind(null,currentlyRenderingFiber,true,queue);queue.dispatch=hook;return [passthrough,hook];},useMemoCache:useMemoCache,useCacheRefresh:function(){return mountWorkInProgressHook().memoizedState=refreshCache.bind(null,currentlyRenderingFiber);},useEffectEvent:function(callback){var hook=mountWorkInProgressHook(),ref={impl:callback};hook.memoizedState=ref;return function(){if(0!==(executionContext&2))throw Error(formatProdErrorMessage(440));return ref.impl.apply(void 0,arguments);};}},HooksDispatcherOnUpdate={readContext:readContext,use:use,useCallback:updateCallback,useContext:readContext,useEffect:updateEffect,useImperativeHandle:updateImperativeHandle,useInsertionEffect:updateInsertionEffect,useLayoutEffect:updateLayoutEffect,useMemo:updateMemo,useReducer:updateReducer,useRef:updateRef,useState:function(){return updateReducer(basicStateReducer);},useDebugValue:mountDebugValue,useDeferredValue:function(value,initialValue){var hook=updateWorkInProgressHook();return updateDeferredValueImpl(hook,currentHook.memoizedState,value,initialValue);},useTransition:function(){var booleanOrThenable=updateReducer(basicStateReducer)[0],start=updateWorkInProgressHook().memoizedState;return ["boolean"===typeof booleanOrThenable?booleanOrThenable:useThenable(booleanOrThenable),start];},useSyncExternalStore:updateSyncExternalStore,useId:updateId,useHostTransitionStatus:useHostTransitionStatus,useFormState:updateActionState,useActionState:updateActionState,useOptimistic:function(passthrough,reducer){var hook=updateWorkInProgressHook();return updateOptimisticImpl(hook,currentHook,passthrough,reducer);},useMemoCache:useMemoCache,useCacheRefresh:updateRefresh};HooksDispatcherOnUpdate.useEffectEvent=updateEvent;var HooksDispatcherOnRerender={readContext:readContext,use:use,useCallback:updateCallback,useContext:readContext,useEffect:updateEffect,useImperativeHandle:updateImperativeHandle,useInsertionEffect:updateInsertionEffect,useLayoutEffect:updateLayoutEffect,useMemo:updateMemo,useReducer:rerenderReducer,useRef:updateRef,useState:function(){return rerenderReducer(basicStateReducer);},useDebugValue:mountDebugValue,useDeferredValue:function(value,initialValue){var hook=updateWorkInProgressHook();return null===currentHook?mountDeferredValueImpl(hook,value,initialValue):updateDeferredValueImpl(hook,currentHook.memoizedState,value,initialValue);},useTransition:function(){var booleanOrThenable=rerenderReducer(basicStateReducer)[0],start=updateWorkInProgressHook().memoizedState;return ["boolean"===typeof booleanOrThenable?booleanOrThenable:useThenable(booleanOrThenable),start];},useSyncExternalStore:updateSyncExternalStore,useId:updateId,useHostTransitionStatus:useHostTransitionStatus,useFormState:rerenderActionState,useActionState:rerenderActionState,useOptimistic:function(passthrough,reducer){var hook=updateWorkInProgressHook();if(null!==currentHook)return updateOptimisticImpl(hook,currentHook,passthrough,reducer);hook.baseState=passthrough;return [passthrough,hook.queue.dispatch];},useMemoCache:useMemoCache,useCacheRefresh:updateRefresh};HooksDispatcherOnRerender.useEffectEvent=updateEvent;function applyDerivedStateFromProps(workInProgress,ctor,getDerivedStateFromProps,nextProps){ctor=workInProgress.memoizedState;getDerivedStateFromProps=getDerivedStateFromProps(nextProps,ctor);getDerivedStateFromProps=null===getDerivedStateFromProps||void 0===getDerivedStateFromProps?ctor:assign({},ctor,getDerivedStateFromProps);workInProgress.memoizedState=getDerivedStateFromProps;0===workInProgress.lanes&&(workInProgress.updateQueue.baseState=getDerivedStateFromProps);}var classComponentUpdater={enqueueSetState:function(inst,payload,callback){inst=inst._reactInternals;var lane=requestUpdateLane(),update=createUpdate(lane);update.payload=payload;void 0!==callback&&null!==callback&&(update.callback=callback);payload=enqueueUpdate(inst,update,lane);null!==payload&&(scheduleUpdateOnFiber(payload,inst,lane),entangleTransitions(payload,inst,lane));},enqueueReplaceState:function(inst,payload,callback){inst=inst._reactInternals;var lane=requestUpdateLane(),update=createUpdate(lane);update.tag=1;update.payload=payload;void 0!==callback&&null!==callback&&(update.callback=callback);payload=enqueueUpdate(inst,update,lane);null!==payload&&(scheduleUpdateOnFiber(payload,inst,lane),entangleTransitions(payload,inst,lane));},enqueueForceUpdate:function(inst,callback){inst=inst._reactInternals;var lane=requestUpdateLane(),update=createUpdate(lane);update.tag=2;void 0!==callback&&null!==callback&&(update.callback=callback);callback=enqueueUpdate(inst,update,lane);null!==callback&&(scheduleUpdateOnFiber(callback,inst,lane),entangleTransitions(callback,inst,lane));}};function checkShouldComponentUpdate(workInProgress,ctor,oldProps,newProps,oldState,newState,nextContext){workInProgress=workInProgress.stateNode;return "function"===typeof workInProgress.shouldComponentUpdate?workInProgress.shouldComponentUpdate(newProps,newState,nextContext):ctor.prototype&&ctor.prototype.isPureReactComponent?!shallowEqual(oldProps,newProps)||!shallowEqual(oldState,newState):true;}function callComponentWillReceiveProps(workInProgress,instance,newProps,nextContext){workInProgress=instance.state;"function"===typeof instance.componentWillReceiveProps&&instance.componentWillReceiveProps(newProps,nextContext);"function"===typeof instance.UNSAFE_componentWillReceiveProps&&instance.UNSAFE_componentWillReceiveProps(newProps,nextContext);instance.state!==workInProgress&&classComponentUpdater.enqueueReplaceState(instance,instance.state,null);}function resolveClassComponentProps(Component,baseProps){var newProps=baseProps;if("ref"in baseProps){newProps={};for(var propName in baseProps)"ref"!==propName&&(newProps[propName]=baseProps[propName]);}if(Component=Component.defaultProps){newProps===baseProps&&(newProps=assign({},newProps));for(var propName$73 in Component) void 0===newProps[propName$73]&&(newProps[propName$73]=Component[propName$73]);}return newProps;}function defaultOnUncaughtError(error){reportGlobalError(error);}function defaultOnCaughtError(error){console.error(error);}function defaultOnRecoverableError(error){reportGlobalError(error);}function logUncaughtError(root,errorInfo){try{var onUncaughtError=root.onUncaughtError;onUncaughtError(errorInfo.value,{componentStack:errorInfo.stack});}catch(e$74){setTimeout(function(){throw e$74;});}}function logCaughtError(root,boundary,errorInfo){try{var onCaughtError=root.onCaughtError;onCaughtError(errorInfo.value,{componentStack:errorInfo.stack,errorBoundary:1===boundary.tag?boundary.stateNode:null});}catch(e$75){setTimeout(function(){throw e$75;});}}function createRootErrorUpdate(root,errorInfo,lane){lane=createUpdate(lane);lane.tag=3;lane.payload={element:null};lane.callback=function(){logUncaughtError(root,errorInfo);};return lane;}function createClassErrorUpdate(lane){lane=createUpdate(lane);lane.tag=3;return lane;}function initializeClassErrorUpdate(update,root,fiber,errorInfo){var getDerivedStateFromError=fiber.type.getDerivedStateFromError;if("function"===typeof getDerivedStateFromError){var error=errorInfo.value;update.payload=function(){return getDerivedStateFromError(error);};update.callback=function(){logCaughtError(root,fiber,errorInfo);};}var inst=fiber.stateNode;null!==inst&&"function"===typeof inst.componentDidCatch&&(update.callback=function(){logCaughtError(root,fiber,errorInfo);"function"!==typeof getDerivedStateFromError&&(null===legacyErrorBoundariesThatAlreadyFailed?legacyErrorBoundariesThatAlreadyFailed=new Set([this]):legacyErrorBoundariesThatAlreadyFailed.add(this));var stack=errorInfo.stack;this.componentDidCatch(errorInfo.value,{componentStack:null!==stack?stack:""});});}function throwException(root,returnFiber,sourceFiber,value,rootRenderLanes){sourceFiber.flags|=32768;if(null!==value&&"object"===typeof value&&"function"===typeof value.then){returnFiber=sourceFiber.alternate;null!==returnFiber&&propagateParentContextChanges(returnFiber,sourceFiber,rootRenderLanes,true);sourceFiber=suspenseHandlerStackCursor.current;if(null!==sourceFiber){switch(sourceFiber.tag){case 31:case 13:return null===shellBoundary?renderDidSuspendDelayIfPossible():null===sourceFiber.alternate&&0===workInProgressRootExitStatus&&(workInProgressRootExitStatus=3),sourceFiber.flags&=-257,sourceFiber.flags|=65536,sourceFiber.lanes=rootRenderLanes,value===noopSuspenseyCommitThenable?sourceFiber.flags|=16384:(returnFiber=sourceFiber.updateQueue,null===returnFiber?sourceFiber.updateQueue=new Set([value]):returnFiber.add(value),attachPingListener(root,value,rootRenderLanes)),false;case 22:return sourceFiber.flags|=65536,value===noopSuspenseyCommitThenable?sourceFiber.flags|=16384:(returnFiber=sourceFiber.updateQueue,null===returnFiber?(returnFiber={transitions:null,markerInstances:null,retryQueue:new Set([value])},sourceFiber.updateQueue=returnFiber):(sourceFiber=returnFiber.retryQueue,null===sourceFiber?returnFiber.retryQueue=new Set([value]):sourceFiber.add(value)),attachPingListener(root,value,rootRenderLanes)),false;}throw Error(formatProdErrorMessage(435,sourceFiber.tag));}attachPingListener(root,value,rootRenderLanes);renderDidSuspendDelayIfPossible();return  false;}if(isHydrating)return returnFiber=suspenseHandlerStackCursor.current,null!==returnFiber?(0===(returnFiber.flags&65536)&&(returnFiber.flags|=256),returnFiber.flags|=65536,returnFiber.lanes=rootRenderLanes,value!==HydrationMismatchException&&(root=Error(formatProdErrorMessage(422),{cause:value}),queueHydrationError(createCapturedValueAtFiber(root,sourceFiber)))):(value!==HydrationMismatchException&&(returnFiber=Error(formatProdErrorMessage(423),{cause:value}),queueHydrationError(createCapturedValueAtFiber(returnFiber,sourceFiber))),root=root.current.alternate,root.flags|=65536,rootRenderLanes&=-rootRenderLanes,root.lanes|=rootRenderLanes,value=createCapturedValueAtFiber(value,sourceFiber),rootRenderLanes=createRootErrorUpdate(root.stateNode,value,rootRenderLanes),enqueueCapturedUpdate(root,rootRenderLanes),4!==workInProgressRootExitStatus&&(workInProgressRootExitStatus=2)),false;var wrapperError=Error(formatProdErrorMessage(520),{cause:value});wrapperError=createCapturedValueAtFiber(wrapperError,sourceFiber);null===workInProgressRootConcurrentErrors?workInProgressRootConcurrentErrors=[wrapperError]:workInProgressRootConcurrentErrors.push(wrapperError);4!==workInProgressRootExitStatus&&(workInProgressRootExitStatus=2);if(null===returnFiber)return  true;value=createCapturedValueAtFiber(value,sourceFiber);sourceFiber=returnFiber;do{switch(sourceFiber.tag){case 3:return sourceFiber.flags|=65536,root=rootRenderLanes&-rootRenderLanes,sourceFiber.lanes|=root,root=createRootErrorUpdate(sourceFiber.stateNode,value,root),enqueueCapturedUpdate(sourceFiber,root),false;case 1:if(returnFiber=sourceFiber.type,wrapperError=sourceFiber.stateNode,0===(sourceFiber.flags&128)&&("function"===typeof returnFiber.getDerivedStateFromError||null!==wrapperError&&"function"===typeof wrapperError.componentDidCatch&&(null===legacyErrorBoundariesThatAlreadyFailed||!legacyErrorBoundariesThatAlreadyFailed.has(wrapperError))))return sourceFiber.flags|=65536,rootRenderLanes&=-rootRenderLanes,sourceFiber.lanes|=rootRenderLanes,rootRenderLanes=createClassErrorUpdate(rootRenderLanes),initializeClassErrorUpdate(rootRenderLanes,root,sourceFiber,value),enqueueCapturedUpdate(sourceFiber,rootRenderLanes),false;}sourceFiber=sourceFiber.return;}while(null!==sourceFiber);return  false;}var SelectiveHydrationException=Error(formatProdErrorMessage(461)),didReceiveUpdate=false;function reconcileChildren(current,workInProgress,nextChildren,renderLanes){workInProgress.child=null===current?mountChildFibers(workInProgress,null,nextChildren,renderLanes):reconcileChildFibers(workInProgress,current.child,nextChildren,renderLanes);}function updateForwardRef(current,workInProgress,Component,nextProps,renderLanes){Component=Component.render;var ref=workInProgress.ref;if("ref"in nextProps){var propsWithoutRef={};for(var key in nextProps)"ref"!==key&&(propsWithoutRef[key]=nextProps[key]);}else propsWithoutRef=nextProps;prepareToReadContext(workInProgress);nextProps=renderWithHooks(current,workInProgress,Component,propsWithoutRef,ref,renderLanes);key=checkDidRenderIdHook();if(null!==current&&!didReceiveUpdate)return bailoutHooks(current,workInProgress,renderLanes),bailoutOnAlreadyFinishedWork(current,workInProgress,renderLanes);isHydrating&&key&&pushMaterializedTreeId(workInProgress);workInProgress.flags|=1;reconcileChildren(current,workInProgress,nextProps,renderLanes);return workInProgress.child;}function updateMemoComponent(current,workInProgress,Component,nextProps,renderLanes){if(null===current){var type=Component.type;if("function"===typeof type&&!shouldConstruct(type)&&void 0===type.defaultProps&&null===Component.compare)return workInProgress.tag=15,workInProgress.type=type,updateSimpleMemoComponent(current,workInProgress,type,nextProps,renderLanes);current=createFiberFromTypeAndProps(Component.type,null,nextProps,workInProgress,workInProgress.mode,renderLanes);current.ref=workInProgress.ref;current.return=workInProgress;return workInProgress.child=current;}type=current.child;if(!checkScheduledUpdateOrContext(current,renderLanes)){var prevProps=type.memoizedProps;Component=Component.compare;Component=null!==Component?Component:shallowEqual;if(Component(prevProps,nextProps)&&current.ref===workInProgress.ref)return bailoutOnAlreadyFinishedWork(current,workInProgress,renderLanes);}workInProgress.flags|=1;current=createWorkInProgress(type,nextProps);current.ref=workInProgress.ref;current.return=workInProgress;return workInProgress.child=current;}function updateSimpleMemoComponent(current,workInProgress,Component,nextProps,renderLanes){if(null!==current){var prevProps=current.memoizedProps;if(shallowEqual(prevProps,nextProps)&&current.ref===workInProgress.ref)if(didReceiveUpdate=false,workInProgress.pendingProps=nextProps=prevProps,checkScheduledUpdateOrContext(current,renderLanes))0!==(current.flags&131072)&&(didReceiveUpdate=true);else return workInProgress.lanes=current.lanes,bailoutOnAlreadyFinishedWork(current,workInProgress,renderLanes);}return updateFunctionComponent(current,workInProgress,Component,nextProps,renderLanes);}function updateOffscreenComponent(current,workInProgress,renderLanes,nextProps){var nextChildren=nextProps.children,prevState=null!==current?current.memoizedState:null;null===current&&null===workInProgress.stateNode&&(workInProgress.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null});if("hidden"===nextProps.mode){if(0!==(workInProgress.flags&128)){prevState=null!==prevState?prevState.baseLanes|renderLanes:renderLanes;if(null!==current){nextProps=workInProgress.child=current.child;for(nextChildren=0;null!==nextProps;)nextChildren=nextChildren|nextProps.lanes|nextProps.childLanes,nextProps=nextProps.sibling;nextProps=nextChildren&~prevState;}else nextProps=0,workInProgress.child=null;return deferHiddenOffscreenComponent(current,workInProgress,prevState,renderLanes,nextProps);}if(0!==(renderLanes&536870912))workInProgress.memoizedState={baseLanes:0,cachePool:null},null!==current&&pushTransition(workInProgress,null!==prevState?prevState.cachePool:null),null!==prevState?pushHiddenContext(workInProgress,prevState):reuseHiddenContextOnStack(),pushOffscreenSuspenseHandler(workInProgress);else return nextProps=workInProgress.lanes=536870912,deferHiddenOffscreenComponent(current,workInProgress,null!==prevState?prevState.baseLanes|renderLanes:renderLanes,renderLanes,nextProps);}else null!==prevState?(pushTransition(workInProgress,prevState.cachePool),pushHiddenContext(workInProgress,prevState),reuseSuspenseHandlerOnStack(),workInProgress.memoizedState=null):(null!==current&&pushTransition(workInProgress,null),reuseHiddenContextOnStack(),reuseSuspenseHandlerOnStack());reconcileChildren(current,workInProgress,nextChildren,renderLanes);return workInProgress.child;}function bailoutOffscreenComponent(current,workInProgress){null!==current&&22===current.tag||null!==workInProgress.stateNode||(workInProgress.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null});return workInProgress.sibling;}function deferHiddenOffscreenComponent(current,workInProgress,nextBaseLanes,renderLanes,remainingChildLanes){var JSCompiler_inline_result=peekCacheFromPool();JSCompiler_inline_result=null===JSCompiler_inline_result?null:{parent:CacheContext._currentValue,pool:JSCompiler_inline_result};workInProgress.memoizedState={baseLanes:nextBaseLanes,cachePool:JSCompiler_inline_result};null!==current&&pushTransition(workInProgress,null);reuseHiddenContextOnStack();pushOffscreenSuspenseHandler(workInProgress);null!==current&&propagateParentContextChanges(current,workInProgress,renderLanes,true);workInProgress.childLanes=remainingChildLanes;return null;}function mountActivityChildren(workInProgress,nextProps){nextProps=mountWorkInProgressOffscreenFiber({mode:nextProps.mode,children:nextProps.children},workInProgress.mode);nextProps.ref=workInProgress.ref;workInProgress.child=nextProps;nextProps.return=workInProgress;return nextProps;}function retryActivityComponentWithoutHydrating(current,workInProgress,renderLanes){reconcileChildFibers(workInProgress,current.child,null,renderLanes);current=mountActivityChildren(workInProgress,workInProgress.pendingProps);current.flags|=2;popSuspenseHandler(workInProgress);workInProgress.memoizedState=null;return current;}function updateActivityComponent(current,workInProgress,renderLanes){var nextProps=workInProgress.pendingProps,didSuspend=0!==(workInProgress.flags&128);workInProgress.flags&=-129;if(null===current){if(isHydrating){if("hidden"===nextProps.mode)return current=mountActivityChildren(workInProgress,nextProps),workInProgress.lanes=536870912,bailoutOffscreenComponent(null,current);pushDehydratedActivitySuspenseHandler(workInProgress);(current=nextHydratableInstance)?(current=canHydrateHydrationBoundary(current,rootOrSingletonContext),current=null!==current&&"&"===current.data?current:null,null!==current&&(workInProgress.memoizedState={dehydrated:current,treeContext:null!==treeContextProvider?{id:treeContextId,overflow:treeContextOverflow}:null,retryLane:536870912,hydrationErrors:null},renderLanes=createFiberFromDehydratedFragment(current),renderLanes.return=workInProgress,workInProgress.child=renderLanes,hydrationParentFiber=workInProgress,nextHydratableInstance=null)):current=null;if(null===current)throw throwOnHydrationMismatch(workInProgress);workInProgress.lanes=536870912;return null;}return mountActivityChildren(workInProgress,nextProps);}var prevState=current.memoizedState;if(null!==prevState){var dehydrated=prevState.dehydrated;pushDehydratedActivitySuspenseHandler(workInProgress);if(didSuspend){if(workInProgress.flags&256)workInProgress.flags&=-257,workInProgress=retryActivityComponentWithoutHydrating(current,workInProgress,renderLanes);else if(null!==workInProgress.memoizedState)workInProgress.child=current.child,workInProgress.flags|=128,workInProgress=null;else throw Error(formatProdErrorMessage(558));}else if(didReceiveUpdate||propagateParentContextChanges(current,workInProgress,renderLanes,false),didSuspend=0!==(renderLanes&current.childLanes),didReceiveUpdate||didSuspend){nextProps=workInProgressRoot;if(null!==nextProps&&(dehydrated=getBumpedLaneForHydration(nextProps,renderLanes),0!==dehydrated&&dehydrated!==prevState.retryLane))throw prevState.retryLane=dehydrated,enqueueConcurrentRenderForLane(current,dehydrated),scheduleUpdateOnFiber(nextProps,current,dehydrated),SelectiveHydrationException;renderDidSuspendDelayIfPossible();workInProgress=retryActivityComponentWithoutHydrating(current,workInProgress,renderLanes);}else current=prevState.treeContext,nextHydratableInstance=getNextHydratable(dehydrated.nextSibling),hydrationParentFiber=workInProgress,isHydrating=true,hydrationErrors=null,rootOrSingletonContext=false,null!==current&&restoreSuspendedTreeContext(workInProgress,current),workInProgress=mountActivityChildren(workInProgress,nextProps),workInProgress.flags|=4096;return workInProgress;}current=createWorkInProgress(current.child,{mode:nextProps.mode,children:nextProps.children});current.ref=workInProgress.ref;workInProgress.child=current;current.return=workInProgress;return current;}function markRef(current,workInProgress){var ref=workInProgress.ref;if(null===ref)null!==current&&null!==current.ref&&(workInProgress.flags|=4194816);else {if("function"!==typeof ref&&"object"!==typeof ref)throw Error(formatProdErrorMessage(284));if(null===current||current.ref!==ref)workInProgress.flags|=4194816;}}function updateFunctionComponent(current,workInProgress,Component,nextProps,renderLanes){prepareToReadContext(workInProgress);Component=renderWithHooks(current,workInProgress,Component,nextProps,void 0,renderLanes);nextProps=checkDidRenderIdHook();if(null!==current&&!didReceiveUpdate)return bailoutHooks(current,workInProgress,renderLanes),bailoutOnAlreadyFinishedWork(current,workInProgress,renderLanes);isHydrating&&nextProps&&pushMaterializedTreeId(workInProgress);workInProgress.flags|=1;reconcileChildren(current,workInProgress,Component,renderLanes);return workInProgress.child;}function replayFunctionComponent(current,workInProgress,nextProps,Component,secondArg,renderLanes){prepareToReadContext(workInProgress);workInProgress.updateQueue=null;nextProps=renderWithHooksAgain(workInProgress,Component,nextProps,secondArg);finishRenderingHooks(current);Component=checkDidRenderIdHook();if(null!==current&&!didReceiveUpdate)return bailoutHooks(current,workInProgress,renderLanes),bailoutOnAlreadyFinishedWork(current,workInProgress,renderLanes);isHydrating&&Component&&pushMaterializedTreeId(workInProgress);workInProgress.flags|=1;reconcileChildren(current,workInProgress,nextProps,renderLanes);return workInProgress.child;}function updateClassComponent(current,workInProgress,Component,nextProps,renderLanes){prepareToReadContext(workInProgress);if(null===workInProgress.stateNode){var context=emptyContextObject,contextType=Component.contextType;"object"===typeof contextType&&null!==contextType&&(context=readContext(contextType));context=new Component(nextProps,context);workInProgress.memoizedState=null!==context.state&&void 0!==context.state?context.state:null;context.updater=classComponentUpdater;workInProgress.stateNode=context;context._reactInternals=workInProgress;context=workInProgress.stateNode;context.props=nextProps;context.state=workInProgress.memoizedState;context.refs={};initializeUpdateQueue(workInProgress);contextType=Component.contextType;context.context="object"===typeof contextType&&null!==contextType?readContext(contextType):emptyContextObject;context.state=workInProgress.memoizedState;contextType=Component.getDerivedStateFromProps;"function"===typeof contextType&&(applyDerivedStateFromProps(workInProgress,Component,contextType,nextProps),context.state=workInProgress.memoizedState);"function"===typeof Component.getDerivedStateFromProps||"function"===typeof context.getSnapshotBeforeUpdate||"function"!==typeof context.UNSAFE_componentWillMount&&"function"!==typeof context.componentWillMount||(contextType=context.state,"function"===typeof context.componentWillMount&&context.componentWillMount(),"function"===typeof context.UNSAFE_componentWillMount&&context.UNSAFE_componentWillMount(),contextType!==context.state&&classComponentUpdater.enqueueReplaceState(context,context.state,null),processUpdateQueue(workInProgress,nextProps,context,renderLanes),suspendIfUpdateReadFromEntangledAsyncAction(),context.state=workInProgress.memoizedState);"function"===typeof context.componentDidMount&&(workInProgress.flags|=4194308);nextProps=true;}else if(null===current){context=workInProgress.stateNode;var unresolvedOldProps=workInProgress.memoizedProps,oldProps=resolveClassComponentProps(Component,unresolvedOldProps);context.props=oldProps;var oldContext=context.context,contextType$jscomp$0=Component.contextType;contextType=emptyContextObject;"object"===typeof contextType$jscomp$0&&null!==contextType$jscomp$0&&(contextType=readContext(contextType$jscomp$0));var getDerivedStateFromProps=Component.getDerivedStateFromProps;contextType$jscomp$0="function"===typeof getDerivedStateFromProps||"function"===typeof context.getSnapshotBeforeUpdate;unresolvedOldProps=workInProgress.pendingProps!==unresolvedOldProps;contextType$jscomp$0||"function"!==typeof context.UNSAFE_componentWillReceiveProps&&"function"!==typeof context.componentWillReceiveProps||(unresolvedOldProps||oldContext!==contextType)&&callComponentWillReceiveProps(workInProgress,context,nextProps,contextType);hasForceUpdate=false;var oldState=workInProgress.memoizedState;context.state=oldState;processUpdateQueue(workInProgress,nextProps,context,renderLanes);suspendIfUpdateReadFromEntangledAsyncAction();oldContext=workInProgress.memoizedState;unresolvedOldProps||oldState!==oldContext||hasForceUpdate?("function"===typeof getDerivedStateFromProps&&(applyDerivedStateFromProps(workInProgress,Component,getDerivedStateFromProps,nextProps),oldContext=workInProgress.memoizedState),(oldProps=hasForceUpdate||checkShouldComponentUpdate(workInProgress,Component,oldProps,nextProps,oldState,oldContext,contextType))?(contextType$jscomp$0||"function"!==typeof context.UNSAFE_componentWillMount&&"function"!==typeof context.componentWillMount||("function"===typeof context.componentWillMount&&context.componentWillMount(),"function"===typeof context.UNSAFE_componentWillMount&&context.UNSAFE_componentWillMount()),"function"===typeof context.componentDidMount&&(workInProgress.flags|=4194308)):("function"===typeof context.componentDidMount&&(workInProgress.flags|=4194308),workInProgress.memoizedProps=nextProps,workInProgress.memoizedState=oldContext),context.props=nextProps,context.state=oldContext,context.context=contextType,nextProps=oldProps):("function"===typeof context.componentDidMount&&(workInProgress.flags|=4194308),nextProps=false);}else {context=workInProgress.stateNode;cloneUpdateQueue(current,workInProgress);contextType=workInProgress.memoizedProps;contextType$jscomp$0=resolveClassComponentProps(Component,contextType);context.props=contextType$jscomp$0;getDerivedStateFromProps=workInProgress.pendingProps;oldState=context.context;oldContext=Component.contextType;oldProps=emptyContextObject;"object"===typeof oldContext&&null!==oldContext&&(oldProps=readContext(oldContext));unresolvedOldProps=Component.getDerivedStateFromProps;(oldContext="function"===typeof unresolvedOldProps||"function"===typeof context.getSnapshotBeforeUpdate)||"function"!==typeof context.UNSAFE_componentWillReceiveProps&&"function"!==typeof context.componentWillReceiveProps||(contextType!==getDerivedStateFromProps||oldState!==oldProps)&&callComponentWillReceiveProps(workInProgress,context,nextProps,oldProps);hasForceUpdate=false;oldState=workInProgress.memoizedState;context.state=oldState;processUpdateQueue(workInProgress,nextProps,context,renderLanes);suspendIfUpdateReadFromEntangledAsyncAction();var newState=workInProgress.memoizedState;contextType!==getDerivedStateFromProps||oldState!==newState||hasForceUpdate||null!==current&&null!==current.dependencies&&checkIfContextChanged(current.dependencies)?("function"===typeof unresolvedOldProps&&(applyDerivedStateFromProps(workInProgress,Component,unresolvedOldProps,nextProps),newState=workInProgress.memoizedState),(contextType$jscomp$0=hasForceUpdate||checkShouldComponentUpdate(workInProgress,Component,contextType$jscomp$0,nextProps,oldState,newState,oldProps)||null!==current&&null!==current.dependencies&&checkIfContextChanged(current.dependencies))?(oldContext||"function"!==typeof context.UNSAFE_componentWillUpdate&&"function"!==typeof context.componentWillUpdate||("function"===typeof context.componentWillUpdate&&context.componentWillUpdate(nextProps,newState,oldProps),"function"===typeof context.UNSAFE_componentWillUpdate&&context.UNSAFE_componentWillUpdate(nextProps,newState,oldProps)),"function"===typeof context.componentDidUpdate&&(workInProgress.flags|=4),"function"===typeof context.getSnapshotBeforeUpdate&&(workInProgress.flags|=1024)):("function"!==typeof context.componentDidUpdate||contextType===current.memoizedProps&&oldState===current.memoizedState||(workInProgress.flags|=4),"function"!==typeof context.getSnapshotBeforeUpdate||contextType===current.memoizedProps&&oldState===current.memoizedState||(workInProgress.flags|=1024),workInProgress.memoizedProps=nextProps,workInProgress.memoizedState=newState),context.props=nextProps,context.state=newState,context.context=oldProps,nextProps=contextType$jscomp$0):("function"!==typeof context.componentDidUpdate||contextType===current.memoizedProps&&oldState===current.memoizedState||(workInProgress.flags|=4),"function"!==typeof context.getSnapshotBeforeUpdate||contextType===current.memoizedProps&&oldState===current.memoizedState||(workInProgress.flags|=1024),nextProps=false);}context=nextProps;markRef(current,workInProgress);nextProps=0!==(workInProgress.flags&128);context||nextProps?(context=workInProgress.stateNode,Component=nextProps&&"function"!==typeof Component.getDerivedStateFromError?null:context.render(),workInProgress.flags|=1,null!==current&&nextProps?(workInProgress.child=reconcileChildFibers(workInProgress,current.child,null,renderLanes),workInProgress.child=reconcileChildFibers(workInProgress,null,Component,renderLanes)):reconcileChildren(current,workInProgress,Component,renderLanes),workInProgress.memoizedState=context.state,current=workInProgress.child):current=bailoutOnAlreadyFinishedWork(current,workInProgress,renderLanes);return current;}function mountHostRootWithoutHydrating(current,workInProgress,nextChildren,renderLanes){resetHydrationState();workInProgress.flags|=256;reconcileChildren(current,workInProgress,nextChildren,renderLanes);return workInProgress.child;}var SUSPENDED_MARKER={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mountSuspenseOffscreenState(renderLanes){return {baseLanes:renderLanes,cachePool:getSuspendedCache()};}function getRemainingWorkInPrimaryTree(current,primaryTreeDidDefer,renderLanes){current=null!==current?current.childLanes&~renderLanes:0;primaryTreeDidDefer&&(current|=workInProgressDeferredLane);return current;}function updateSuspenseComponent(current,workInProgress,renderLanes){var nextProps=workInProgress.pendingProps,showFallback=false,didSuspend=0!==(workInProgress.flags&128),JSCompiler_temp;(JSCompiler_temp=didSuspend)||(JSCompiler_temp=null!==current&&null===current.memoizedState?false:0!==(suspenseStackCursor.current&2));JSCompiler_temp&&(showFallback=true,workInProgress.flags&=-129);JSCompiler_temp=0!==(workInProgress.flags&32);workInProgress.flags&=-33;if(null===current){if(isHydrating){showFallback?pushPrimaryTreeSuspenseHandler(workInProgress):reuseSuspenseHandlerOnStack();(current=nextHydratableInstance)?(current=canHydrateHydrationBoundary(current,rootOrSingletonContext),current=null!==current&&"&"!==current.data?current:null,null!==current&&(workInProgress.memoizedState={dehydrated:current,treeContext:null!==treeContextProvider?{id:treeContextId,overflow:treeContextOverflow}:null,retryLane:536870912,hydrationErrors:null},renderLanes=createFiberFromDehydratedFragment(current),renderLanes.return=workInProgress,workInProgress.child=renderLanes,hydrationParentFiber=workInProgress,nextHydratableInstance=null)):current=null;if(null===current)throw throwOnHydrationMismatch(workInProgress);isSuspenseInstanceFallback(current)?workInProgress.lanes=32:workInProgress.lanes=536870912;return null;}var nextPrimaryChildren=nextProps.children;nextProps=nextProps.fallback;if(showFallback)return reuseSuspenseHandlerOnStack(),showFallback=workInProgress.mode,nextPrimaryChildren=mountWorkInProgressOffscreenFiber({mode:"hidden",children:nextPrimaryChildren},showFallback),nextProps=createFiberFromFragment(nextProps,showFallback,renderLanes,null),nextPrimaryChildren.return=workInProgress,nextProps.return=workInProgress,nextPrimaryChildren.sibling=nextProps,workInProgress.child=nextPrimaryChildren,nextProps=workInProgress.child,nextProps.memoizedState=mountSuspenseOffscreenState(renderLanes),nextProps.childLanes=getRemainingWorkInPrimaryTree(current,JSCompiler_temp,renderLanes),workInProgress.memoizedState=SUSPENDED_MARKER,bailoutOffscreenComponent(null,nextProps);pushPrimaryTreeSuspenseHandler(workInProgress);return mountSuspensePrimaryChildren(workInProgress,nextPrimaryChildren);}var prevState=current.memoizedState;if(null!==prevState&&(nextPrimaryChildren=prevState.dehydrated,null!==nextPrimaryChildren)){if(didSuspend)workInProgress.flags&256?(pushPrimaryTreeSuspenseHandler(workInProgress),workInProgress.flags&=-257,workInProgress=retrySuspenseComponentWithoutHydrating(current,workInProgress,renderLanes)):null!==workInProgress.memoizedState?(reuseSuspenseHandlerOnStack(),workInProgress.child=current.child,workInProgress.flags|=128,workInProgress=null):(reuseSuspenseHandlerOnStack(),nextPrimaryChildren=nextProps.fallback,showFallback=workInProgress.mode,nextProps=mountWorkInProgressOffscreenFiber({mode:"visible",children:nextProps.children},showFallback),nextPrimaryChildren=createFiberFromFragment(nextPrimaryChildren,showFallback,renderLanes,null),nextPrimaryChildren.flags|=2,nextProps.return=workInProgress,nextPrimaryChildren.return=workInProgress,nextProps.sibling=nextPrimaryChildren,workInProgress.child=nextProps,reconcileChildFibers(workInProgress,current.child,null,renderLanes),nextProps=workInProgress.child,nextProps.memoizedState=mountSuspenseOffscreenState(renderLanes),nextProps.childLanes=getRemainingWorkInPrimaryTree(current,JSCompiler_temp,renderLanes),workInProgress.memoizedState=SUSPENDED_MARKER,workInProgress=bailoutOffscreenComponent(null,nextProps));else if(pushPrimaryTreeSuspenseHandler(workInProgress),isSuspenseInstanceFallback(nextPrimaryChildren)){JSCompiler_temp=nextPrimaryChildren.nextSibling&&nextPrimaryChildren.nextSibling.dataset;if(JSCompiler_temp)var digest=JSCompiler_temp.dgst;JSCompiler_temp=digest;nextProps=Error(formatProdErrorMessage(419));nextProps.stack="";nextProps.digest=JSCompiler_temp;queueHydrationError({value:nextProps,source:null,stack:null});workInProgress=retrySuspenseComponentWithoutHydrating(current,workInProgress,renderLanes);}else if(didReceiveUpdate||propagateParentContextChanges(current,workInProgress,renderLanes,false),JSCompiler_temp=0!==(renderLanes&current.childLanes),didReceiveUpdate||JSCompiler_temp){JSCompiler_temp=workInProgressRoot;if(null!==JSCompiler_temp&&(nextProps=getBumpedLaneForHydration(JSCompiler_temp,renderLanes),0!==nextProps&&nextProps!==prevState.retryLane))throw prevState.retryLane=nextProps,enqueueConcurrentRenderForLane(current,nextProps),scheduleUpdateOnFiber(JSCompiler_temp,current,nextProps),SelectiveHydrationException;isSuspenseInstancePending(nextPrimaryChildren)||renderDidSuspendDelayIfPossible();workInProgress=retrySuspenseComponentWithoutHydrating(current,workInProgress,renderLanes);}else isSuspenseInstancePending(nextPrimaryChildren)?(workInProgress.flags|=192,workInProgress.child=current.child,workInProgress=null):(current=prevState.treeContext,nextHydratableInstance=getNextHydratable(nextPrimaryChildren.nextSibling),hydrationParentFiber=workInProgress,isHydrating=true,hydrationErrors=null,rootOrSingletonContext=false,null!==current&&restoreSuspendedTreeContext(workInProgress,current),workInProgress=mountSuspensePrimaryChildren(workInProgress,nextProps.children),workInProgress.flags|=4096);return workInProgress;}if(showFallback)return reuseSuspenseHandlerOnStack(),nextPrimaryChildren=nextProps.fallback,showFallback=workInProgress.mode,prevState=current.child,digest=prevState.sibling,nextProps=createWorkInProgress(prevState,{mode:"hidden",children:nextProps.children}),nextProps.subtreeFlags=prevState.subtreeFlags&65011712,null!==digest?nextPrimaryChildren=createWorkInProgress(digest,nextPrimaryChildren):(nextPrimaryChildren=createFiberFromFragment(nextPrimaryChildren,showFallback,renderLanes,null),nextPrimaryChildren.flags|=2),nextPrimaryChildren.return=workInProgress,nextProps.return=workInProgress,nextProps.sibling=nextPrimaryChildren,workInProgress.child=nextProps,bailoutOffscreenComponent(null,nextProps),nextProps=workInProgress.child,nextPrimaryChildren=current.child.memoizedState,null===nextPrimaryChildren?nextPrimaryChildren=mountSuspenseOffscreenState(renderLanes):(showFallback=nextPrimaryChildren.cachePool,null!==showFallback?(prevState=CacheContext._currentValue,showFallback=showFallback.parent!==prevState?{parent:prevState,pool:prevState}:showFallback):showFallback=getSuspendedCache(),nextPrimaryChildren={baseLanes:nextPrimaryChildren.baseLanes|renderLanes,cachePool:showFallback}),nextProps.memoizedState=nextPrimaryChildren,nextProps.childLanes=getRemainingWorkInPrimaryTree(current,JSCompiler_temp,renderLanes),workInProgress.memoizedState=SUSPENDED_MARKER,bailoutOffscreenComponent(current.child,nextProps);pushPrimaryTreeSuspenseHandler(workInProgress);renderLanes=current.child;current=renderLanes.sibling;renderLanes=createWorkInProgress(renderLanes,{mode:"visible",children:nextProps.children});renderLanes.return=workInProgress;renderLanes.sibling=null;null!==current&&(JSCompiler_temp=workInProgress.deletions,null===JSCompiler_temp?(workInProgress.deletions=[current],workInProgress.flags|=16):JSCompiler_temp.push(current));workInProgress.child=renderLanes;workInProgress.memoizedState=null;return renderLanes;}function mountSuspensePrimaryChildren(workInProgress,primaryChildren){primaryChildren=mountWorkInProgressOffscreenFiber({mode:"visible",children:primaryChildren},workInProgress.mode);primaryChildren.return=workInProgress;return workInProgress.child=primaryChildren;}function mountWorkInProgressOffscreenFiber(offscreenProps,mode){offscreenProps=createFiberImplClass(22,offscreenProps,null,mode);offscreenProps.lanes=0;return offscreenProps;}function retrySuspenseComponentWithoutHydrating(current,workInProgress,renderLanes){reconcileChildFibers(workInProgress,current.child,null,renderLanes);current=mountSuspensePrimaryChildren(workInProgress,workInProgress.pendingProps.children);current.flags|=2;workInProgress.memoizedState=null;return current;}function scheduleSuspenseWorkOnFiber(fiber,renderLanes,propagationRoot){fiber.lanes|=renderLanes;var alternate=fiber.alternate;null!==alternate&&(alternate.lanes|=renderLanes);scheduleContextWorkOnParentPath(fiber.return,renderLanes,propagationRoot);}function initSuspenseListRenderState(workInProgress,isBackwards,tail,lastContentRow,tailMode,treeForkCount){var renderState=workInProgress.memoizedState;null===renderState?workInProgress.memoizedState={isBackwards:isBackwards,rendering:null,renderingStartTime:0,last:lastContentRow,tail:tail,tailMode:tailMode,treeForkCount:treeForkCount}:(renderState.isBackwards=isBackwards,renderState.rendering=null,renderState.renderingStartTime=0,renderState.last=lastContentRow,renderState.tail=tail,renderState.tailMode=tailMode,renderState.treeForkCount=treeForkCount);}function updateSuspenseListComponent(current,workInProgress,renderLanes){var nextProps=workInProgress.pendingProps,revealOrder=nextProps.revealOrder,tailMode=nextProps.tail;nextProps=nextProps.children;var suspenseContext=suspenseStackCursor.current,shouldForceFallback=0!==(suspenseContext&2);shouldForceFallback?(suspenseContext=suspenseContext&1|2,workInProgress.flags|=128):suspenseContext&=1;push(suspenseStackCursor,suspenseContext);reconcileChildren(current,workInProgress,nextProps,renderLanes);nextProps=isHydrating?treeForkCount:0;if(!shouldForceFallback&&null!==current&&0!==(current.flags&128))a:for(current=workInProgress.child;null!==current;){if(13===current.tag)null!==current.memoizedState&&scheduleSuspenseWorkOnFiber(current,renderLanes,workInProgress);else if(19===current.tag)scheduleSuspenseWorkOnFiber(current,renderLanes,workInProgress);else if(null!==current.child){current.child.return=current;current=current.child;continue;}if(current===workInProgress)break a;for(;null===current.sibling;){if(null===current.return||current.return===workInProgress)break a;current=current.return;}current.sibling.return=current.return;current=current.sibling;}switch(revealOrder){case "forwards":renderLanes=workInProgress.child;for(revealOrder=null;null!==renderLanes;)current=renderLanes.alternate,null!==current&&null===findFirstSuspended(current)&&(revealOrder=renderLanes),renderLanes=renderLanes.sibling;renderLanes=revealOrder;null===renderLanes?(revealOrder=workInProgress.child,workInProgress.child=null):(revealOrder=renderLanes.sibling,renderLanes.sibling=null);initSuspenseListRenderState(workInProgress,false,revealOrder,renderLanes,tailMode,nextProps);break;case "backwards":case "unstable_legacy-backwards":renderLanes=null;revealOrder=workInProgress.child;for(workInProgress.child=null;null!==revealOrder;){current=revealOrder.alternate;if(null!==current&&null===findFirstSuspended(current)){workInProgress.child=revealOrder;break;}current=revealOrder.sibling;revealOrder.sibling=renderLanes;renderLanes=revealOrder;revealOrder=current;}initSuspenseListRenderState(workInProgress,true,renderLanes,null,tailMode,nextProps);break;case "together":initSuspenseListRenderState(workInProgress,false,null,null,void 0,nextProps);break;default:workInProgress.memoizedState=null;}return workInProgress.child;}function bailoutOnAlreadyFinishedWork(current,workInProgress,renderLanes){null!==current&&(workInProgress.dependencies=current.dependencies);workInProgressRootSkippedLanes|=workInProgress.lanes;if(0===(renderLanes&workInProgress.childLanes))if(null!==current){if(propagateParentContextChanges(current,workInProgress,renderLanes,false),0===(renderLanes&workInProgress.childLanes))return null;}else return null;if(null!==current&&workInProgress.child!==current.child)throw Error(formatProdErrorMessage(153));if(null!==workInProgress.child){current=workInProgress.child;renderLanes=createWorkInProgress(current,current.pendingProps);workInProgress.child=renderLanes;for(renderLanes.return=workInProgress;null!==current.sibling;)current=current.sibling,renderLanes=renderLanes.sibling=createWorkInProgress(current,current.pendingProps),renderLanes.return=workInProgress;renderLanes.sibling=null;}return workInProgress.child;}function checkScheduledUpdateOrContext(current,renderLanes){if(0!==(current.lanes&renderLanes))return  true;current=current.dependencies;return null!==current&&checkIfContextChanged(current)?true:false;}function attemptEarlyBailoutIfNoScheduledUpdate(current,workInProgress,renderLanes){switch(workInProgress.tag){case 3:pushHostContainer(workInProgress,workInProgress.stateNode.containerInfo);pushProvider(workInProgress,CacheContext,current.memoizedState.cache);resetHydrationState();break;case 27:case 5:pushHostContext(workInProgress);break;case 4:pushHostContainer(workInProgress,workInProgress.stateNode.containerInfo);break;case 10:pushProvider(workInProgress,workInProgress.type,workInProgress.memoizedProps.value);break;case 31:if(null!==workInProgress.memoizedState)return workInProgress.flags|=128,pushDehydratedActivitySuspenseHandler(workInProgress),null;break;case 13:var state$102=workInProgress.memoizedState;if(null!==state$102){if(null!==state$102.dehydrated)return pushPrimaryTreeSuspenseHandler(workInProgress),workInProgress.flags|=128,null;if(0!==(renderLanes&workInProgress.child.childLanes))return updateSuspenseComponent(current,workInProgress,renderLanes);pushPrimaryTreeSuspenseHandler(workInProgress);current=bailoutOnAlreadyFinishedWork(current,workInProgress,renderLanes);return null!==current?current.sibling:null;}pushPrimaryTreeSuspenseHandler(workInProgress);break;case 19:var didSuspendBefore=0!==(current.flags&128);state$102=0!==(renderLanes&workInProgress.childLanes);state$102||(propagateParentContextChanges(current,workInProgress,renderLanes,false),state$102=0!==(renderLanes&workInProgress.childLanes));if(didSuspendBefore){if(state$102)return updateSuspenseListComponent(current,workInProgress,renderLanes);workInProgress.flags|=128;}didSuspendBefore=workInProgress.memoizedState;null!==didSuspendBefore&&(didSuspendBefore.rendering=null,didSuspendBefore.tail=null,didSuspendBefore.lastEffect=null);push(suspenseStackCursor,suspenseStackCursor.current);if(state$102)break;else return null;case 22:return workInProgress.lanes=0,updateOffscreenComponent(current,workInProgress,renderLanes,workInProgress.pendingProps);case 24:pushProvider(workInProgress,CacheContext,current.memoizedState.cache);}return bailoutOnAlreadyFinishedWork(current,workInProgress,renderLanes);}function beginWork(current,workInProgress,renderLanes){if(null!==current){if(current.memoizedProps!==workInProgress.pendingProps)didReceiveUpdate=true;else {if(!checkScheduledUpdateOrContext(current,renderLanes)&&0===(workInProgress.flags&128))return didReceiveUpdate=false,attemptEarlyBailoutIfNoScheduledUpdate(current,workInProgress,renderLanes);didReceiveUpdate=0!==(current.flags&131072)?true:false;}}else didReceiveUpdate=false,isHydrating&&0!==(workInProgress.flags&1048576)&&pushTreeId(workInProgress,treeForkCount,workInProgress.index);workInProgress.lanes=0;switch(workInProgress.tag){case 16:a:{var props=workInProgress.pendingProps;current=resolveLazy(workInProgress.elementType);workInProgress.type=current;if("function"===typeof current)shouldConstruct(current)?(props=resolveClassComponentProps(current,props),workInProgress.tag=1,workInProgress=updateClassComponent(null,workInProgress,current,props,renderLanes)):(workInProgress.tag=0,workInProgress=updateFunctionComponent(null,workInProgress,current,props,renderLanes));else {if(void 0!==current&&null!==current){var $$typeof=current.$$typeof;if($$typeof===REACT_FORWARD_REF_TYPE){workInProgress.tag=11;workInProgress=updateForwardRef(null,workInProgress,current,props,renderLanes);break a;}else if($$typeof===REACT_MEMO_TYPE){workInProgress.tag=14;workInProgress=updateMemoComponent(null,workInProgress,current,props,renderLanes);break a;}}workInProgress=getComponentNameFromType(current)||current;throw Error(formatProdErrorMessage(306,workInProgress,""));}}return workInProgress;case 0:return updateFunctionComponent(current,workInProgress,workInProgress.type,workInProgress.pendingProps,renderLanes);case 1:return props=workInProgress.type,$$typeof=resolveClassComponentProps(props,workInProgress.pendingProps),updateClassComponent(current,workInProgress,props,$$typeof,renderLanes);case 3:a:{pushHostContainer(workInProgress,workInProgress.stateNode.containerInfo);if(null===current)throw Error(formatProdErrorMessage(387));props=workInProgress.pendingProps;var prevState=workInProgress.memoizedState;$$typeof=prevState.element;cloneUpdateQueue(current,workInProgress);processUpdateQueue(workInProgress,props,null,renderLanes);var nextState=workInProgress.memoizedState;props=nextState.cache;pushProvider(workInProgress,CacheContext,props);props!==prevState.cache&&propagateContextChanges(workInProgress,[CacheContext],renderLanes,true);suspendIfUpdateReadFromEntangledAsyncAction();props=nextState.element;if(prevState.isDehydrated){if(prevState={element:props,isDehydrated:false,cache:nextState.cache},workInProgress.updateQueue.baseState=prevState,workInProgress.memoizedState=prevState,workInProgress.flags&256){workInProgress=mountHostRootWithoutHydrating(current,workInProgress,props,renderLanes);break a;}else if(props!==$$typeof){$$typeof=createCapturedValueAtFiber(Error(formatProdErrorMessage(424)),workInProgress);queueHydrationError($$typeof);workInProgress=mountHostRootWithoutHydrating(current,workInProgress,props,renderLanes);break a;}else {current=workInProgress.stateNode.containerInfo;switch(current.nodeType){case 9:current=current.body;break;default:current="HTML"===current.nodeName?current.ownerDocument.body:current;}nextHydratableInstance=getNextHydratable(current.firstChild);hydrationParentFiber=workInProgress;isHydrating=true;hydrationErrors=null;rootOrSingletonContext=true;renderLanes=mountChildFibers(workInProgress,null,props,renderLanes);for(workInProgress.child=renderLanes;renderLanes;)renderLanes.flags=renderLanes.flags&-3|4096,renderLanes=renderLanes.sibling;}}else {resetHydrationState();if(props===$$typeof){workInProgress=bailoutOnAlreadyFinishedWork(current,workInProgress,renderLanes);break a;}reconcileChildren(current,workInProgress,props,renderLanes);}workInProgress=workInProgress.child;}return workInProgress;case 26:return markRef(current,workInProgress),null===current?(renderLanes=getResource(workInProgress.type,null,workInProgress.pendingProps,null))?workInProgress.memoizedState=renderLanes:isHydrating||(renderLanes=workInProgress.type,current=workInProgress.pendingProps,props=getOwnerDocumentFromRootContainer(rootInstanceStackCursor.current).createElement(renderLanes),props[internalInstanceKey]=workInProgress,props[internalPropsKey]=current,setInitialProperties(props,renderLanes,current),markNodeAsHoistable(props),workInProgress.stateNode=props):workInProgress.memoizedState=getResource(workInProgress.type,current.memoizedProps,workInProgress.pendingProps,current.memoizedState),null;case 27:return pushHostContext(workInProgress),null===current&&isHydrating&&(props=workInProgress.stateNode=resolveSingletonInstance(workInProgress.type,workInProgress.pendingProps,rootInstanceStackCursor.current),hydrationParentFiber=workInProgress,rootOrSingletonContext=true,$$typeof=nextHydratableInstance,isSingletonScope(workInProgress.type)?(previousHydratableOnEnteringScopedSingleton=$$typeof,nextHydratableInstance=getNextHydratable(props.firstChild)):nextHydratableInstance=$$typeof),reconcileChildren(current,workInProgress,workInProgress.pendingProps.children,renderLanes),markRef(current,workInProgress),null===current&&(workInProgress.flags|=4194304),workInProgress.child;case 5:if(null===current&&isHydrating){if($$typeof=props=nextHydratableInstance)props=canHydrateInstance(props,workInProgress.type,workInProgress.pendingProps,rootOrSingletonContext),null!==props?(workInProgress.stateNode=props,hydrationParentFiber=workInProgress,nextHydratableInstance=getNextHydratable(props.firstChild),rootOrSingletonContext=false,$$typeof=true):$$typeof=false;$$typeof||throwOnHydrationMismatch(workInProgress);}pushHostContext(workInProgress);$$typeof=workInProgress.type;prevState=workInProgress.pendingProps;nextState=null!==current?current.memoizedProps:null;props=prevState.children;shouldSetTextContent($$typeof,prevState)?props=null:null!==nextState&&shouldSetTextContent($$typeof,nextState)&&(workInProgress.flags|=32);null!==workInProgress.memoizedState&&($$typeof=renderWithHooks(current,workInProgress,TransitionAwareHostComponent,null,null,renderLanes),HostTransitionContext._currentValue=$$typeof);markRef(current,workInProgress);reconcileChildren(current,workInProgress,props,renderLanes);return workInProgress.child;case 6:if(null===current&&isHydrating){if(current=renderLanes=nextHydratableInstance)renderLanes=canHydrateTextInstance(renderLanes,workInProgress.pendingProps,rootOrSingletonContext),null!==renderLanes?(workInProgress.stateNode=renderLanes,hydrationParentFiber=workInProgress,nextHydratableInstance=null,current=true):current=false;current||throwOnHydrationMismatch(workInProgress);}return null;case 13:return updateSuspenseComponent(current,workInProgress,renderLanes);case 4:return pushHostContainer(workInProgress,workInProgress.stateNode.containerInfo),props=workInProgress.pendingProps,null===current?workInProgress.child=reconcileChildFibers(workInProgress,null,props,renderLanes):reconcileChildren(current,workInProgress,props,renderLanes),workInProgress.child;case 11:return updateForwardRef(current,workInProgress,workInProgress.type,workInProgress.pendingProps,renderLanes);case 7:return reconcileChildren(current,workInProgress,workInProgress.pendingProps,renderLanes),workInProgress.child;case 8:return reconcileChildren(current,workInProgress,workInProgress.pendingProps.children,renderLanes),workInProgress.child;case 12:return reconcileChildren(current,workInProgress,workInProgress.pendingProps.children,renderLanes),workInProgress.child;case 10:return props=workInProgress.pendingProps,pushProvider(workInProgress,workInProgress.type,props.value),reconcileChildren(current,workInProgress,props.children,renderLanes),workInProgress.child;case 9:return $$typeof=workInProgress.type._context,props=workInProgress.pendingProps.children,prepareToReadContext(workInProgress),$$typeof=readContext($$typeof),props=props($$typeof),workInProgress.flags|=1,reconcileChildren(current,workInProgress,props,renderLanes),workInProgress.child;case 14:return updateMemoComponent(current,workInProgress,workInProgress.type,workInProgress.pendingProps,renderLanes);case 15:return updateSimpleMemoComponent(current,workInProgress,workInProgress.type,workInProgress.pendingProps,renderLanes);case 19:return updateSuspenseListComponent(current,workInProgress,renderLanes);case 31:return updateActivityComponent(current,workInProgress,renderLanes);case 22:return updateOffscreenComponent(current,workInProgress,renderLanes,workInProgress.pendingProps);case 24:return prepareToReadContext(workInProgress),props=readContext(CacheContext),null===current?($$typeof=peekCacheFromPool(),null===$$typeof&&($$typeof=workInProgressRoot,prevState=createCache(),$$typeof.pooledCache=prevState,prevState.refCount++,null!==prevState&&($$typeof.pooledCacheLanes|=renderLanes),$$typeof=prevState),workInProgress.memoizedState={parent:props,cache:$$typeof},initializeUpdateQueue(workInProgress),pushProvider(workInProgress,CacheContext,$$typeof)):(0!==(current.lanes&renderLanes)&&(cloneUpdateQueue(current,workInProgress),processUpdateQueue(workInProgress,null,null,renderLanes),suspendIfUpdateReadFromEntangledAsyncAction()),$$typeof=current.memoizedState,prevState=workInProgress.memoizedState,$$typeof.parent!==props?($$typeof={parent:props,cache:props},workInProgress.memoizedState=$$typeof,0===workInProgress.lanes&&(workInProgress.memoizedState=workInProgress.updateQueue.baseState=$$typeof),pushProvider(workInProgress,CacheContext,props)):(props=prevState.cache,pushProvider(workInProgress,CacheContext,props),props!==$$typeof.cache&&propagateContextChanges(workInProgress,[CacheContext],renderLanes,true))),reconcileChildren(current,workInProgress,workInProgress.pendingProps.children,renderLanes),workInProgress.child;case 29:throw workInProgress.pendingProps;}throw Error(formatProdErrorMessage(156,workInProgress.tag));}function markUpdate(workInProgress){workInProgress.flags|=4;}function preloadInstanceAndSuspendIfNeeded(workInProgress,type,oldProps,newProps,renderLanes){if(type=0!==(workInProgress.mode&32))type=false;if(type){if(workInProgress.flags|=16777216,(renderLanes&335544128)===renderLanes)if(workInProgress.stateNode.complete)workInProgress.flags|=8192;else if(shouldRemainOnPreviousScreen())workInProgress.flags|=8192;else throw suspendedThenable=noopSuspenseyCommitThenable,SuspenseyCommitException;}else workInProgress.flags&=-16777217;}function preloadResourceAndSuspendIfNeeded(workInProgress,resource){if("stylesheet"!==resource.type||0!==(resource.state.loading&4))workInProgress.flags&=-16777217;else if(workInProgress.flags|=16777216,!preloadResource(resource))if(shouldRemainOnPreviousScreen())workInProgress.flags|=8192;else throw suspendedThenable=noopSuspenseyCommitThenable,SuspenseyCommitException;}function scheduleRetryEffect(workInProgress,retryQueue){null!==retryQueue&&(workInProgress.flags|=4);workInProgress.flags&16384&&(retryQueue=22!==workInProgress.tag?claimNextRetryLane():536870912,workInProgress.lanes|=retryQueue,workInProgressSuspendedRetryLanes|=retryQueue);}function cutOffTailIfNeeded(renderState,hasRenderedATailFallback){if(!isHydrating)switch(renderState.tailMode){case "hidden":hasRenderedATailFallback=renderState.tail;for(var lastTailNode=null;null!==hasRenderedATailFallback;)null!==hasRenderedATailFallback.alternate&&(lastTailNode=hasRenderedATailFallback),hasRenderedATailFallback=hasRenderedATailFallback.sibling;null===lastTailNode?renderState.tail=null:lastTailNode.sibling=null;break;case "collapsed":lastTailNode=renderState.tail;for(var lastTailNode$106=null;null!==lastTailNode;)null!==lastTailNode.alternate&&(lastTailNode$106=lastTailNode),lastTailNode=lastTailNode.sibling;null===lastTailNode$106?hasRenderedATailFallback||null===renderState.tail?renderState.tail=null:renderState.tail.sibling=null:lastTailNode$106.sibling=null;}}function bubbleProperties(completedWork){var didBailout=null!==completedWork.alternate&&completedWork.alternate.child===completedWork.child,newChildLanes=0,subtreeFlags=0;if(didBailout)for(var child$107=completedWork.child;null!==child$107;)newChildLanes|=child$107.lanes|child$107.childLanes,subtreeFlags|=child$107.subtreeFlags&65011712,subtreeFlags|=child$107.flags&65011712,child$107.return=completedWork,child$107=child$107.sibling;else for(child$107=completedWork.child;null!==child$107;)newChildLanes|=child$107.lanes|child$107.childLanes,subtreeFlags|=child$107.subtreeFlags,subtreeFlags|=child$107.flags,child$107.return=completedWork,child$107=child$107.sibling;completedWork.subtreeFlags|=subtreeFlags;completedWork.childLanes=newChildLanes;return didBailout;}function completeWork(current,workInProgress,renderLanes){var newProps=workInProgress.pendingProps;popTreeContext(workInProgress);switch(workInProgress.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bubbleProperties(workInProgress),null;case 1:return bubbleProperties(workInProgress),null;case 3:renderLanes=workInProgress.stateNode;newProps=null;null!==current&&(newProps=current.memoizedState.cache);workInProgress.memoizedState.cache!==newProps&&(workInProgress.flags|=2048);popProvider(CacheContext);popHostContainer();renderLanes.pendingContext&&(renderLanes.context=renderLanes.pendingContext,renderLanes.pendingContext=null);if(null===current||null===current.child)popHydrationState(workInProgress)?markUpdate(workInProgress):null===current||current.memoizedState.isDehydrated&&0===(workInProgress.flags&256)||(workInProgress.flags|=1024,upgradeHydrationErrorsToRecoverable());bubbleProperties(workInProgress);return null;case 26:var type=workInProgress.type,nextResource=workInProgress.memoizedState;null===current?(markUpdate(workInProgress),null!==nextResource?(bubbleProperties(workInProgress),preloadResourceAndSuspendIfNeeded(workInProgress,nextResource)):(bubbleProperties(workInProgress),preloadInstanceAndSuspendIfNeeded(workInProgress,type,null,newProps,renderLanes))):nextResource?nextResource!==current.memoizedState?(markUpdate(workInProgress),bubbleProperties(workInProgress),preloadResourceAndSuspendIfNeeded(workInProgress,nextResource)):(bubbleProperties(workInProgress),workInProgress.flags&=-16777217):(current=current.memoizedProps,current!==newProps&&markUpdate(workInProgress),bubbleProperties(workInProgress),preloadInstanceAndSuspendIfNeeded(workInProgress,type,current,newProps,renderLanes));return null;case 27:popHostContext(workInProgress);renderLanes=rootInstanceStackCursor.current;type=workInProgress.type;if(null!==current&&null!=workInProgress.stateNode)current.memoizedProps!==newProps&&markUpdate(workInProgress);else {if(!newProps){if(null===workInProgress.stateNode)throw Error(formatProdErrorMessage(166));bubbleProperties(workInProgress);return null;}current=contextStackCursor.current;popHydrationState(workInProgress)?prepareToHydrateHostInstance(workInProgress):(current=resolveSingletonInstance(type,newProps,renderLanes),workInProgress.stateNode=current,markUpdate(workInProgress));}bubbleProperties(workInProgress);return null;case 5:popHostContext(workInProgress);type=workInProgress.type;if(null!==current&&null!=workInProgress.stateNode)current.memoizedProps!==newProps&&markUpdate(workInProgress);else {if(!newProps){if(null===workInProgress.stateNode)throw Error(formatProdErrorMessage(166));bubbleProperties(workInProgress);return null;}nextResource=contextStackCursor.current;if(popHydrationState(workInProgress))prepareToHydrateHostInstance(workInProgress);else {var ownerDocument=getOwnerDocumentFromRootContainer(rootInstanceStackCursor.current);switch(nextResource){case 1:nextResource=ownerDocument.createElementNS("http://www.w3.org/2000/svg",type);break;case 2:nextResource=ownerDocument.createElementNS("http://www.w3.org/1998/Math/MathML",type);break;default:switch(type){case "svg":nextResource=ownerDocument.createElementNS("http://www.w3.org/2000/svg",type);break;case "math":nextResource=ownerDocument.createElementNS("http://www.w3.org/1998/Math/MathML",type);break;case "script":nextResource=ownerDocument.createElement("div");nextResource.innerHTML="<script>\x3c/script>";nextResource=nextResource.removeChild(nextResource.firstChild);break;case "select":nextResource="string"===typeof newProps.is?ownerDocument.createElement("select",{is:newProps.is}):ownerDocument.createElement("select");newProps.multiple?nextResource.multiple=true:newProps.size&&(nextResource.size=newProps.size);break;default:nextResource="string"===typeof newProps.is?ownerDocument.createElement(type,{is:newProps.is}):ownerDocument.createElement(type);}}nextResource[internalInstanceKey]=workInProgress;nextResource[internalPropsKey]=newProps;a:for(ownerDocument=workInProgress.child;null!==ownerDocument;){if(5===ownerDocument.tag||6===ownerDocument.tag)nextResource.appendChild(ownerDocument.stateNode);else if(4!==ownerDocument.tag&&27!==ownerDocument.tag&&null!==ownerDocument.child){ownerDocument.child.return=ownerDocument;ownerDocument=ownerDocument.child;continue;}if(ownerDocument===workInProgress)break a;for(;null===ownerDocument.sibling;){if(null===ownerDocument.return||ownerDocument.return===workInProgress)break a;ownerDocument=ownerDocument.return;}ownerDocument.sibling.return=ownerDocument.return;ownerDocument=ownerDocument.sibling;}workInProgress.stateNode=nextResource;a:switch(setInitialProperties(nextResource,type,newProps),type){case "button":case "input":case "select":case "textarea":newProps=!!newProps.autoFocus;break a;case "img":newProps=true;break a;default:newProps=false;}newProps&&markUpdate(workInProgress);}}bubbleProperties(workInProgress);preloadInstanceAndSuspendIfNeeded(workInProgress,workInProgress.type,null===current?null:current.memoizedProps,workInProgress.pendingProps,renderLanes);return null;case 6:if(current&&null!=workInProgress.stateNode)current.memoizedProps!==newProps&&markUpdate(workInProgress);else {if("string"!==typeof newProps&&null===workInProgress.stateNode)throw Error(formatProdErrorMessage(166));current=rootInstanceStackCursor.current;if(popHydrationState(workInProgress)){current=workInProgress.stateNode;renderLanes=workInProgress.memoizedProps;newProps=null;type=hydrationParentFiber;if(null!==type)switch(type.tag){case 27:case 5:newProps=type.memoizedProps;}current[internalInstanceKey]=workInProgress;current=current.nodeValue===renderLanes||null!==newProps&&true===newProps.suppressHydrationWarning||checkForUnmatchedText(current.nodeValue,renderLanes)?true:false;current||throwOnHydrationMismatch(workInProgress,true);}else current=getOwnerDocumentFromRootContainer(current).createTextNode(newProps),current[internalInstanceKey]=workInProgress,workInProgress.stateNode=current;}bubbleProperties(workInProgress);return null;case 31:renderLanes=workInProgress.memoizedState;if(null===current||null!==current.memoizedState){newProps=popHydrationState(workInProgress);if(null!==renderLanes){if(null===current){if(!newProps)throw Error(formatProdErrorMessage(318));current=workInProgress.memoizedState;current=null!==current?current.dehydrated:null;if(!current)throw Error(formatProdErrorMessage(557));current[internalInstanceKey]=workInProgress;}else resetHydrationState(),0===(workInProgress.flags&128)&&(workInProgress.memoizedState=null),workInProgress.flags|=4;bubbleProperties(workInProgress);current=false;}else renderLanes=upgradeHydrationErrorsToRecoverable(),null!==current&&null!==current.memoizedState&&(current.memoizedState.hydrationErrors=renderLanes),current=true;if(!current){if(workInProgress.flags&256)return popSuspenseHandler(workInProgress),workInProgress;popSuspenseHandler(workInProgress);return null;}if(0!==(workInProgress.flags&128))throw Error(formatProdErrorMessage(558));}bubbleProperties(workInProgress);return null;case 13:newProps=workInProgress.memoizedState;if(null===current||null!==current.memoizedState&&null!==current.memoizedState.dehydrated){type=popHydrationState(workInProgress);if(null!==newProps&&null!==newProps.dehydrated){if(null===current){if(!type)throw Error(formatProdErrorMessage(318));type=workInProgress.memoizedState;type=null!==type?type.dehydrated:null;if(!type)throw Error(formatProdErrorMessage(317));type[internalInstanceKey]=workInProgress;}else resetHydrationState(),0===(workInProgress.flags&128)&&(workInProgress.memoizedState=null),workInProgress.flags|=4;bubbleProperties(workInProgress);type=false;}else type=upgradeHydrationErrorsToRecoverable(),null!==current&&null!==current.memoizedState&&(current.memoizedState.hydrationErrors=type),type=true;if(!type){if(workInProgress.flags&256)return popSuspenseHandler(workInProgress),workInProgress;popSuspenseHandler(workInProgress);return null;}}popSuspenseHandler(workInProgress);if(0!==(workInProgress.flags&128))return workInProgress.lanes=renderLanes,workInProgress;renderLanes=null!==newProps;current=null!==current&&null!==current.memoizedState;renderLanes&&(newProps=workInProgress.child,type=null,null!==newProps.alternate&&null!==newProps.alternate.memoizedState&&null!==newProps.alternate.memoizedState.cachePool&&(type=newProps.alternate.memoizedState.cachePool.pool),nextResource=null,null!==newProps.memoizedState&&null!==newProps.memoizedState.cachePool&&(nextResource=newProps.memoizedState.cachePool.pool),nextResource!==type&&(newProps.flags|=2048));renderLanes!==current&&renderLanes&&(workInProgress.child.flags|=8192);scheduleRetryEffect(workInProgress,workInProgress.updateQueue);bubbleProperties(workInProgress);return null;case 4:return popHostContainer(),null===current&&listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),bubbleProperties(workInProgress),null;case 10:return popProvider(workInProgress.type),bubbleProperties(workInProgress),null;case 19:pop(suspenseStackCursor);newProps=workInProgress.memoizedState;if(null===newProps)return bubbleProperties(workInProgress),null;type=0!==(workInProgress.flags&128);nextResource=newProps.rendering;if(null===nextResource){if(type)cutOffTailIfNeeded(newProps,false);else {if(0!==workInProgressRootExitStatus||null!==current&&0!==(current.flags&128))for(current=workInProgress.child;null!==current;){nextResource=findFirstSuspended(current);if(null!==nextResource){workInProgress.flags|=128;cutOffTailIfNeeded(newProps,false);current=nextResource.updateQueue;workInProgress.updateQueue=current;scheduleRetryEffect(workInProgress,current);workInProgress.subtreeFlags=0;current=renderLanes;for(renderLanes=workInProgress.child;null!==renderLanes;)resetWorkInProgress(renderLanes,current),renderLanes=renderLanes.sibling;push(suspenseStackCursor,suspenseStackCursor.current&1|2);isHydrating&&pushTreeFork(workInProgress,newProps.treeForkCount);return workInProgress.child;}current=current.sibling;}null!==newProps.tail&&now()>workInProgressRootRenderTargetTime&&(workInProgress.flags|=128,type=true,cutOffTailIfNeeded(newProps,false),workInProgress.lanes=4194304);}}else {if(!type)if(current=findFirstSuspended(nextResource),null!==current){if(workInProgress.flags|=128,type=true,current=current.updateQueue,workInProgress.updateQueue=current,scheduleRetryEffect(workInProgress,current),cutOffTailIfNeeded(newProps,true),null===newProps.tail&&"hidden"===newProps.tailMode&&!nextResource.alternate&&!isHydrating)return bubbleProperties(workInProgress),null;}else 2*now()-newProps.renderingStartTime>workInProgressRootRenderTargetTime&&536870912!==renderLanes&&(workInProgress.flags|=128,type=true,cutOffTailIfNeeded(newProps,false),workInProgress.lanes=4194304);newProps.isBackwards?(nextResource.sibling=workInProgress.child,workInProgress.child=nextResource):(current=newProps.last,null!==current?current.sibling=nextResource:workInProgress.child=nextResource,newProps.last=nextResource);}if(null!==newProps.tail)return current=newProps.tail,newProps.rendering=current,newProps.tail=current.sibling,newProps.renderingStartTime=now(),current.sibling=null,renderLanes=suspenseStackCursor.current,push(suspenseStackCursor,type?renderLanes&1|2:renderLanes&1),isHydrating&&pushTreeFork(workInProgress,newProps.treeForkCount),current;bubbleProperties(workInProgress);return null;case 22:case 23:return popSuspenseHandler(workInProgress),popHiddenContext(),newProps=null!==workInProgress.memoizedState,null!==current?null!==current.memoizedState!==newProps&&(workInProgress.flags|=8192):newProps&&(workInProgress.flags|=8192),newProps?0!==(renderLanes&536870912)&&0===(workInProgress.flags&128)&&(bubbleProperties(workInProgress),workInProgress.subtreeFlags&6&&(workInProgress.flags|=8192)):bubbleProperties(workInProgress),renderLanes=workInProgress.updateQueue,null!==renderLanes&&scheduleRetryEffect(workInProgress,renderLanes.retryQueue),renderLanes=null,null!==current&&null!==current.memoizedState&&null!==current.memoizedState.cachePool&&(renderLanes=current.memoizedState.cachePool.pool),newProps=null,null!==workInProgress.memoizedState&&null!==workInProgress.memoizedState.cachePool&&(newProps=workInProgress.memoizedState.cachePool.pool),newProps!==renderLanes&&(workInProgress.flags|=2048),null!==current&&pop(resumedCache),null;case 24:return renderLanes=null,null!==current&&(renderLanes=current.memoizedState.cache),workInProgress.memoizedState.cache!==renderLanes&&(workInProgress.flags|=2048),popProvider(CacheContext),bubbleProperties(workInProgress),null;case 25:return null;case 30:return null;}throw Error(formatProdErrorMessage(156,workInProgress.tag));}function unwindWork(current,workInProgress){popTreeContext(workInProgress);switch(workInProgress.tag){case 1:return current=workInProgress.flags,current&65536?(workInProgress.flags=current&-65537|128,workInProgress):null;case 3:return popProvider(CacheContext),popHostContainer(),current=workInProgress.flags,0!==(current&65536)&&0===(current&128)?(workInProgress.flags=current&-65537|128,workInProgress):null;case 26:case 27:case 5:return popHostContext(workInProgress),null;case 31:if(null!==workInProgress.memoizedState){popSuspenseHandler(workInProgress);if(null===workInProgress.alternate)throw Error(formatProdErrorMessage(340));resetHydrationState();}current=workInProgress.flags;return current&65536?(workInProgress.flags=current&-65537|128,workInProgress):null;case 13:popSuspenseHandler(workInProgress);current=workInProgress.memoizedState;if(null!==current&&null!==current.dehydrated){if(null===workInProgress.alternate)throw Error(formatProdErrorMessage(340));resetHydrationState();}current=workInProgress.flags;return current&65536?(workInProgress.flags=current&-65537|128,workInProgress):null;case 19:return pop(suspenseStackCursor),null;case 4:return popHostContainer(),null;case 10:return popProvider(workInProgress.type),null;case 22:case 23:return popSuspenseHandler(workInProgress),popHiddenContext(),null!==current&&pop(resumedCache),current=workInProgress.flags,current&65536?(workInProgress.flags=current&-65537|128,workInProgress):null;case 24:return popProvider(CacheContext),null;case 25:return null;default:return null;}}function unwindInterruptedWork(current,interruptedWork){popTreeContext(interruptedWork);switch(interruptedWork.tag){case 3:popProvider(CacheContext);popHostContainer();break;case 26:case 27:case 5:popHostContext(interruptedWork);break;case 4:popHostContainer();break;case 31:null!==interruptedWork.memoizedState&&popSuspenseHandler(interruptedWork);break;case 13:popSuspenseHandler(interruptedWork);break;case 19:pop(suspenseStackCursor);break;case 10:popProvider(interruptedWork.type);break;case 22:case 23:popSuspenseHandler(interruptedWork);popHiddenContext();null!==current&&pop(resumedCache);break;case 24:popProvider(CacheContext);}}function commitHookEffectListMount(flags,finishedWork){try{var updateQueue=finishedWork.updateQueue,lastEffect=null!==updateQueue?updateQueue.lastEffect:null;if(null!==lastEffect){var firstEffect=lastEffect.next;updateQueue=firstEffect;do{if((updateQueue.tag&flags)===flags){lastEffect=void 0;var create=updateQueue.create,inst=updateQueue.inst;lastEffect=create();inst.destroy=lastEffect;}updateQueue=updateQueue.next;}while(updateQueue!==firstEffect);}}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}}function commitHookEffectListUnmount(flags,finishedWork,nearestMountedAncestor$jscomp$0){try{var updateQueue=finishedWork.updateQueue,lastEffect=null!==updateQueue?updateQueue.lastEffect:null;if(null!==lastEffect){var firstEffect=lastEffect.next;updateQueue=firstEffect;do{if((updateQueue.tag&flags)===flags){var inst=updateQueue.inst,destroy=inst.destroy;if(void 0!==destroy){inst.destroy=void 0;lastEffect=finishedWork;var nearestMountedAncestor=nearestMountedAncestor$jscomp$0,destroy_=destroy;try{destroy_();}catch(error){captureCommitPhaseError(lastEffect,nearestMountedAncestor,error);}}}updateQueue=updateQueue.next;}while(updateQueue!==firstEffect);}}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}}function commitClassCallbacks(finishedWork){var updateQueue=finishedWork.updateQueue;if(null!==updateQueue){var instance=finishedWork.stateNode;try{commitCallbacks(updateQueue,instance);}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}}}function safelyCallComponentWillUnmount(current,nearestMountedAncestor,instance){instance.props=resolveClassComponentProps(current.type,current.memoizedProps);instance.state=current.memoizedState;try{instance.componentWillUnmount();}catch(error){captureCommitPhaseError(current,nearestMountedAncestor,error);}}function safelyAttachRef(current,nearestMountedAncestor){try{var ref=current.ref;if(null!==ref){switch(current.tag){case 26:case 27:case 5:var instanceToUse=current.stateNode;break;case 30:instanceToUse=current.stateNode;break;default:instanceToUse=current.stateNode;}"function"===typeof ref?current.refCleanup=ref(instanceToUse):ref.current=instanceToUse;}}catch(error){captureCommitPhaseError(current,nearestMountedAncestor,error);}}function safelyDetachRef(current,nearestMountedAncestor){var ref=current.ref,refCleanup=current.refCleanup;if(null!==ref)if("function"===typeof refCleanup)try{refCleanup();}catch(error){captureCommitPhaseError(current,nearestMountedAncestor,error);}finally{current.refCleanup=null,current=current.alternate,null!=current&&(current.refCleanup=null);}else if("function"===typeof ref)try{ref(null);}catch(error$140){captureCommitPhaseError(current,nearestMountedAncestor,error$140);}else ref.current=null;}function commitHostMount(finishedWork){var type=finishedWork.type,props=finishedWork.memoizedProps,instance=finishedWork.stateNode;try{a:switch(type){case "button":case "input":case "select":case "textarea":props.autoFocus&&instance.focus();break a;case "img":props.src?instance.src=props.src:props.srcSet&&(instance.srcset=props.srcSet);}}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}}function commitHostUpdate(finishedWork,newProps,oldProps){try{var domElement=finishedWork.stateNode;updateProperties(domElement,finishedWork.type,oldProps,newProps);domElement[internalPropsKey]=newProps;}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}}function isHostParent(fiber){return 5===fiber.tag||3===fiber.tag||26===fiber.tag||27===fiber.tag&&isSingletonScope(fiber.type)||4===fiber.tag;}function getHostSibling(fiber){a:for(;;){for(;null===fiber.sibling;){if(null===fiber.return||isHostParent(fiber.return))return null;fiber=fiber.return;}fiber.sibling.return=fiber.return;for(fiber=fiber.sibling;5!==fiber.tag&&6!==fiber.tag&&18!==fiber.tag;){if(27===fiber.tag&&isSingletonScope(fiber.type))continue a;if(fiber.flags&2)continue a;if(null===fiber.child||4===fiber.tag)continue a;else fiber.child.return=fiber,fiber=fiber.child;}if(!(fiber.flags&2))return fiber.stateNode;}}function insertOrAppendPlacementNodeIntoContainer(node,before,parent){var tag=node.tag;if(5===tag||6===tag)node=node.stateNode,before?(9===parent.nodeType?parent.body:"HTML"===parent.nodeName?parent.ownerDocument.body:parent).insertBefore(node,before):(before=9===parent.nodeType?parent.body:"HTML"===parent.nodeName?parent.ownerDocument.body:parent,before.appendChild(node),parent=parent._reactRootContainer,null!==parent&&void 0!==parent||null!==before.onclick||(before.onclick=noop$1));else if(4!==tag&&(27===tag&&isSingletonScope(node.type)&&(parent=node.stateNode,before=null),node=node.child,null!==node))for(insertOrAppendPlacementNodeIntoContainer(node,before,parent),node=node.sibling;null!==node;)insertOrAppendPlacementNodeIntoContainer(node,before,parent),node=node.sibling;}function insertOrAppendPlacementNode(node,before,parent){var tag=node.tag;if(5===tag||6===tag)node=node.stateNode,before?parent.insertBefore(node,before):parent.appendChild(node);else if(4!==tag&&(27===tag&&isSingletonScope(node.type)&&(parent=node.stateNode),node=node.child,null!==node))for(insertOrAppendPlacementNode(node,before,parent),node=node.sibling;null!==node;)insertOrAppendPlacementNode(node,before,parent),node=node.sibling;}function commitHostSingletonAcquisition(finishedWork){var singleton=finishedWork.stateNode,props=finishedWork.memoizedProps;try{for(var type=finishedWork.type,attributes=singleton.attributes;attributes.length;)singleton.removeAttributeNode(attributes[0]);setInitialProperties(singleton,type,props);singleton[internalInstanceKey]=finishedWork;singleton[internalPropsKey]=props;}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}}var offscreenSubtreeIsHidden=false,offscreenSubtreeWasHidden=false,needsFormReset=false,PossiblyWeakSet="function"===typeof WeakSet?WeakSet:Set,nextEffect=null;function commitBeforeMutationEffects(root,firstChild){root=root.containerInfo;eventsEnabled=_enabled;root=getActiveElementDeep(root);if(hasSelectionCapabilities(root)){if("selectionStart"in root)var JSCompiler_temp={start:root.selectionStart,end:root.selectionEnd};else a:{JSCompiler_temp=(JSCompiler_temp=root.ownerDocument)&&JSCompiler_temp.defaultView||window;var selection=JSCompiler_temp.getSelection&&JSCompiler_temp.getSelection();if(selection&&0!==selection.rangeCount){JSCompiler_temp=selection.anchorNode;var anchorOffset=selection.anchorOffset,focusNode=selection.focusNode;selection=selection.focusOffset;try{JSCompiler_temp.nodeType,focusNode.nodeType;}catch(e$20){JSCompiler_temp=null;break a;}var length=0,start=-1,end=-1,indexWithinAnchor=0,indexWithinFocus=0,node=root,parentNode=null;b:for(;;){for(var next;;){node!==JSCompiler_temp||0!==anchorOffset&&3!==node.nodeType||(start=length+anchorOffset);node!==focusNode||0!==selection&&3!==node.nodeType||(end=length+selection);3===node.nodeType&&(length+=node.nodeValue.length);if(null===(next=node.firstChild))break;parentNode=node;node=next;}for(;;){if(node===root)break b;parentNode===JSCompiler_temp&&++indexWithinAnchor===anchorOffset&&(start=length);parentNode===focusNode&&++indexWithinFocus===selection&&(end=length);if(null!==(next=node.nextSibling))break;node=parentNode;parentNode=node.parentNode;}node=next;}JSCompiler_temp=-1===start||-1===end?null:{start:start,end:end};}else JSCompiler_temp=null;}JSCompiler_temp=JSCompiler_temp||{start:0,end:0};}else JSCompiler_temp=null;selectionInformation={focusedElem:root,selectionRange:JSCompiler_temp};_enabled=false;for(nextEffect=firstChild;null!==nextEffect;)if(firstChild=nextEffect,root=firstChild.child,0!==(firstChild.subtreeFlags&1028)&&null!==root)root.return=firstChild,nextEffect=root;else for(;null!==nextEffect;){firstChild=nextEffect;focusNode=firstChild.alternate;root=firstChild.flags;switch(firstChild.tag){case 0:if(0!==(root&4)&&(root=firstChild.updateQueue,root=null!==root?root.events:null,null!==root))for(JSCompiler_temp=0;JSCompiler_temp<root.length;JSCompiler_temp++)anchorOffset=root[JSCompiler_temp],anchorOffset.ref.impl=anchorOffset.nextImpl;break;case 11:case 15:break;case 1:if(0!==(root&1024)&&null!==focusNode){root=void 0;JSCompiler_temp=firstChild;anchorOffset=focusNode.memoizedProps;focusNode=focusNode.memoizedState;selection=JSCompiler_temp.stateNode;try{var resolvedPrevProps=resolveClassComponentProps(JSCompiler_temp.type,anchorOffset);root=selection.getSnapshotBeforeUpdate(resolvedPrevProps,focusNode);selection.__reactInternalSnapshotBeforeUpdate=root;}catch(error){captureCommitPhaseError(JSCompiler_temp,JSCompiler_temp.return,error);}}break;case 3:if(0!==(root&1024))if(root=firstChild.stateNode.containerInfo,JSCompiler_temp=root.nodeType,9===JSCompiler_temp)clearContainerSparingly(root);else if(1===JSCompiler_temp)switch(root.nodeName){case "HEAD":case "HTML":case "BODY":clearContainerSparingly(root);break;default:root.textContent="";}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(0!==(root&1024))throw Error(formatProdErrorMessage(163));}root=firstChild.sibling;if(null!==root){root.return=firstChild.return;nextEffect=root;break;}nextEffect=firstChild.return;}}function commitLayoutEffectOnFiber(finishedRoot,current,finishedWork){var flags=finishedWork.flags;switch(finishedWork.tag){case 0:case 11:case 15:recursivelyTraverseLayoutEffects(finishedRoot,finishedWork);flags&4&&commitHookEffectListMount(5,finishedWork);break;case 1:recursivelyTraverseLayoutEffects(finishedRoot,finishedWork);if(flags&4)if(finishedRoot=finishedWork.stateNode,null===current)try{finishedRoot.componentDidMount();}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}else {var prevProps=resolveClassComponentProps(finishedWork.type,current.memoizedProps);current=current.memoizedState;try{finishedRoot.componentDidUpdate(prevProps,current,finishedRoot.__reactInternalSnapshotBeforeUpdate);}catch(error$139){captureCommitPhaseError(finishedWork,finishedWork.return,error$139);}}flags&64&&commitClassCallbacks(finishedWork);flags&512&&safelyAttachRef(finishedWork,finishedWork.return);break;case 3:recursivelyTraverseLayoutEffects(finishedRoot,finishedWork);if(flags&64&&(finishedRoot=finishedWork.updateQueue,null!==finishedRoot)){current=null;if(null!==finishedWork.child)switch(finishedWork.child.tag){case 27:case 5:current=finishedWork.child.stateNode;break;case 1:current=finishedWork.child.stateNode;}try{commitCallbacks(finishedRoot,current);}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}}break;case 27:null===current&&flags&4&&commitHostSingletonAcquisition(finishedWork);case 26:case 5:recursivelyTraverseLayoutEffects(finishedRoot,finishedWork);null===current&&flags&4&&commitHostMount(finishedWork);flags&512&&safelyAttachRef(finishedWork,finishedWork.return);break;case 12:recursivelyTraverseLayoutEffects(finishedRoot,finishedWork);break;case 31:recursivelyTraverseLayoutEffects(finishedRoot,finishedWork);flags&4&&commitActivityHydrationCallbacks(finishedRoot,finishedWork);break;case 13:recursivelyTraverseLayoutEffects(finishedRoot,finishedWork);flags&4&&commitSuspenseHydrationCallbacks(finishedRoot,finishedWork);flags&64&&(finishedRoot=finishedWork.memoizedState,null!==finishedRoot&&(finishedRoot=finishedRoot.dehydrated,null!==finishedRoot&&(finishedWork=retryDehydratedSuspenseBoundary.bind(null,finishedWork),registerSuspenseInstanceRetry(finishedRoot,finishedWork))));break;case 22:flags=null!==finishedWork.memoizedState||offscreenSubtreeIsHidden;if(!flags){current=null!==current&&null!==current.memoizedState||offscreenSubtreeWasHidden;prevProps=offscreenSubtreeIsHidden;var prevOffscreenSubtreeWasHidden=offscreenSubtreeWasHidden;offscreenSubtreeIsHidden=flags;(offscreenSubtreeWasHidden=current)&&!prevOffscreenSubtreeWasHidden?recursivelyTraverseReappearLayoutEffects(finishedRoot,finishedWork,0!==(finishedWork.subtreeFlags&8772)):recursivelyTraverseLayoutEffects(finishedRoot,finishedWork);offscreenSubtreeIsHidden=prevProps;offscreenSubtreeWasHidden=prevOffscreenSubtreeWasHidden;}break;case 30:break;default:recursivelyTraverseLayoutEffects(finishedRoot,finishedWork);}}function detachFiberAfterEffects(fiber){var alternate=fiber.alternate;null!==alternate&&(fiber.alternate=null,detachFiberAfterEffects(alternate));fiber.child=null;fiber.deletions=null;fiber.sibling=null;5===fiber.tag&&(alternate=fiber.stateNode,null!==alternate&&detachDeletedInstance(alternate));fiber.stateNode=null;fiber.return=null;fiber.dependencies=null;fiber.memoizedProps=null;fiber.memoizedState=null;fiber.pendingProps=null;fiber.stateNode=null;fiber.updateQueue=null;}var hostParent=null,hostParentIsContainer=false;function recursivelyTraverseDeletionEffects(finishedRoot,nearestMountedAncestor,parent){for(parent=parent.child;null!==parent;)commitDeletionEffectsOnFiber(finishedRoot,nearestMountedAncestor,parent),parent=parent.sibling;}function commitDeletionEffectsOnFiber(finishedRoot,nearestMountedAncestor,deletedFiber){if(injectedHook&&"function"===typeof injectedHook.onCommitFiberUnmount)try{injectedHook.onCommitFiberUnmount(rendererID,deletedFiber);}catch(err){}switch(deletedFiber.tag){case 26:offscreenSubtreeWasHidden||safelyDetachRef(deletedFiber,nearestMountedAncestor);recursivelyTraverseDeletionEffects(finishedRoot,nearestMountedAncestor,deletedFiber);deletedFiber.memoizedState?deletedFiber.memoizedState.count--:deletedFiber.stateNode&&(deletedFiber=deletedFiber.stateNode,deletedFiber.parentNode.removeChild(deletedFiber));break;case 27:offscreenSubtreeWasHidden||safelyDetachRef(deletedFiber,nearestMountedAncestor);var prevHostParent=hostParent,prevHostParentIsContainer=hostParentIsContainer;isSingletonScope(deletedFiber.type)&&(hostParent=deletedFiber.stateNode,hostParentIsContainer=false);recursivelyTraverseDeletionEffects(finishedRoot,nearestMountedAncestor,deletedFiber);releaseSingletonInstance(deletedFiber.stateNode);hostParent=prevHostParent;hostParentIsContainer=prevHostParentIsContainer;break;case 5:offscreenSubtreeWasHidden||safelyDetachRef(deletedFiber,nearestMountedAncestor);case 6:prevHostParent=hostParent;prevHostParentIsContainer=hostParentIsContainer;hostParent=null;recursivelyTraverseDeletionEffects(finishedRoot,nearestMountedAncestor,deletedFiber);hostParent=prevHostParent;hostParentIsContainer=prevHostParentIsContainer;if(null!==hostParent)if(hostParentIsContainer)try{(9===hostParent.nodeType?hostParent.body:"HTML"===hostParent.nodeName?hostParent.ownerDocument.body:hostParent).removeChild(deletedFiber.stateNode);}catch(error){captureCommitPhaseError(deletedFiber,nearestMountedAncestor,error);}else try{hostParent.removeChild(deletedFiber.stateNode);}catch(error){captureCommitPhaseError(deletedFiber,nearestMountedAncestor,error);}break;case 18:null!==hostParent&&(hostParentIsContainer?(finishedRoot=hostParent,clearHydrationBoundary(9===finishedRoot.nodeType?finishedRoot.body:"HTML"===finishedRoot.nodeName?finishedRoot.ownerDocument.body:finishedRoot,deletedFiber.stateNode),retryIfBlockedOn(finishedRoot)):clearHydrationBoundary(hostParent,deletedFiber.stateNode));break;case 4:prevHostParent=hostParent;prevHostParentIsContainer=hostParentIsContainer;hostParent=deletedFiber.stateNode.containerInfo;hostParentIsContainer=true;recursivelyTraverseDeletionEffects(finishedRoot,nearestMountedAncestor,deletedFiber);hostParent=prevHostParent;hostParentIsContainer=prevHostParentIsContainer;break;case 0:case 11:case 14:case 15:commitHookEffectListUnmount(2,deletedFiber,nearestMountedAncestor);offscreenSubtreeWasHidden||commitHookEffectListUnmount(4,deletedFiber,nearestMountedAncestor);recursivelyTraverseDeletionEffects(finishedRoot,nearestMountedAncestor,deletedFiber);break;case 1:offscreenSubtreeWasHidden||(safelyDetachRef(deletedFiber,nearestMountedAncestor),prevHostParent=deletedFiber.stateNode,"function"===typeof prevHostParent.componentWillUnmount&&safelyCallComponentWillUnmount(deletedFiber,nearestMountedAncestor,prevHostParent));recursivelyTraverseDeletionEffects(finishedRoot,nearestMountedAncestor,deletedFiber);break;case 21:recursivelyTraverseDeletionEffects(finishedRoot,nearestMountedAncestor,deletedFiber);break;case 22:offscreenSubtreeWasHidden=(prevHostParent=offscreenSubtreeWasHidden)||null!==deletedFiber.memoizedState;recursivelyTraverseDeletionEffects(finishedRoot,nearestMountedAncestor,deletedFiber);offscreenSubtreeWasHidden=prevHostParent;break;default:recursivelyTraverseDeletionEffects(finishedRoot,nearestMountedAncestor,deletedFiber);}}function commitActivityHydrationCallbacks(finishedRoot,finishedWork){if(null===finishedWork.memoizedState&&(finishedRoot=finishedWork.alternate,null!==finishedRoot&&(finishedRoot=finishedRoot.memoizedState,null!==finishedRoot))){finishedRoot=finishedRoot.dehydrated;try{retryIfBlockedOn(finishedRoot);}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}}}function commitSuspenseHydrationCallbacks(finishedRoot,finishedWork){if(null===finishedWork.memoizedState&&(finishedRoot=finishedWork.alternate,null!==finishedRoot&&(finishedRoot=finishedRoot.memoizedState,null!==finishedRoot&&(finishedRoot=finishedRoot.dehydrated,null!==finishedRoot))))try{retryIfBlockedOn(finishedRoot);}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}}function getRetryCache(finishedWork){switch(finishedWork.tag){case 31:case 13:case 19:var retryCache=finishedWork.stateNode;null===retryCache&&(retryCache=finishedWork.stateNode=new PossiblyWeakSet());return retryCache;case 22:return finishedWork=finishedWork.stateNode,retryCache=finishedWork._retryCache,null===retryCache&&(retryCache=finishedWork._retryCache=new PossiblyWeakSet()),retryCache;default:throw Error(formatProdErrorMessage(435,finishedWork.tag));}}function attachSuspenseRetryListeners(finishedWork,wakeables){var retryCache=getRetryCache(finishedWork);wakeables.forEach(function(wakeable){if(!retryCache.has(wakeable)){retryCache.add(wakeable);var retry=resolveRetryWakeable.bind(null,finishedWork,wakeable);wakeable.then(retry,retry);}});}function recursivelyTraverseMutationEffects(root$jscomp$0,parentFiber){var deletions=parentFiber.deletions;if(null!==deletions)for(var i=0;i<deletions.length;i++){var childToDelete=deletions[i],root=root$jscomp$0,returnFiber=parentFiber,parent=returnFiber;a:for(;null!==parent;){switch(parent.tag){case 27:if(isSingletonScope(parent.type)){hostParent=parent.stateNode;hostParentIsContainer=false;break a;}break;case 5:hostParent=parent.stateNode;hostParentIsContainer=false;break a;case 3:case 4:hostParent=parent.stateNode.containerInfo;hostParentIsContainer=true;break a;}parent=parent.return;}if(null===hostParent)throw Error(formatProdErrorMessage(160));commitDeletionEffectsOnFiber(root,returnFiber,childToDelete);hostParent=null;hostParentIsContainer=false;root=childToDelete.alternate;null!==root&&(root.return=null);childToDelete.return=null;}if(parentFiber.subtreeFlags&13886)for(parentFiber=parentFiber.child;null!==parentFiber;)commitMutationEffectsOnFiber(parentFiber,root$jscomp$0),parentFiber=parentFiber.sibling;}var currentHoistableRoot=null;function commitMutationEffectsOnFiber(finishedWork,root){var current=finishedWork.alternate,flags=finishedWork.flags;switch(finishedWork.tag){case 0:case 11:case 14:case 15:recursivelyTraverseMutationEffects(root,finishedWork);commitReconciliationEffects(finishedWork);flags&4&&(commitHookEffectListUnmount(3,finishedWork,finishedWork.return),commitHookEffectListMount(3,finishedWork),commitHookEffectListUnmount(5,finishedWork,finishedWork.return));break;case 1:recursivelyTraverseMutationEffects(root,finishedWork);commitReconciliationEffects(finishedWork);flags&512&&(offscreenSubtreeWasHidden||null===current||safelyDetachRef(current,current.return));flags&64&&offscreenSubtreeIsHidden&&(finishedWork=finishedWork.updateQueue,null!==finishedWork&&(flags=finishedWork.callbacks,null!==flags&&(current=finishedWork.shared.hiddenCallbacks,finishedWork.shared.hiddenCallbacks=null===current?flags:current.concat(flags))));break;case 26:var hoistableRoot=currentHoistableRoot;recursivelyTraverseMutationEffects(root,finishedWork);commitReconciliationEffects(finishedWork);flags&512&&(offscreenSubtreeWasHidden||null===current||safelyDetachRef(current,current.return));if(flags&4){var currentResource=null!==current?current.memoizedState:null;flags=finishedWork.memoizedState;if(null===current){if(null===flags){if(null===finishedWork.stateNode){a:{flags=finishedWork.type;current=finishedWork.memoizedProps;hoistableRoot=hoistableRoot.ownerDocument||hoistableRoot;b:switch(flags){case "title":currentResource=hoistableRoot.getElementsByTagName("title")[0];if(!currentResource||currentResource[internalHoistableMarker]||currentResource[internalInstanceKey]||"http://www.w3.org/2000/svg"===currentResource.namespaceURI||currentResource.hasAttribute("itemprop"))currentResource=hoistableRoot.createElement(flags),hoistableRoot.head.insertBefore(currentResource,hoistableRoot.querySelector("head > title"));setInitialProperties(currentResource,flags,current);currentResource[internalInstanceKey]=finishedWork;markNodeAsHoistable(currentResource);flags=currentResource;break a;case "link":var maybeNodes=getHydratableHoistableCache("link","href",hoistableRoot).get(flags+(current.href||""));if(maybeNodes)for(var i=0;i<maybeNodes.length;i++)if(currentResource=maybeNodes[i],currentResource.getAttribute("href")===(null==current.href||""===current.href?null:current.href)&&currentResource.getAttribute("rel")===(null==current.rel?null:current.rel)&&currentResource.getAttribute("title")===(null==current.title?null:current.title)&&currentResource.getAttribute("crossorigin")===(null==current.crossOrigin?null:current.crossOrigin)){maybeNodes.splice(i,1);break b;}currentResource=hoistableRoot.createElement(flags);setInitialProperties(currentResource,flags,current);hoistableRoot.head.appendChild(currentResource);break;case "meta":if(maybeNodes=getHydratableHoistableCache("meta","content",hoistableRoot).get(flags+(current.content||"")))for(i=0;i<maybeNodes.length;i++)if(currentResource=maybeNodes[i],currentResource.getAttribute("content")===(null==current.content?null:""+current.content)&&currentResource.getAttribute("name")===(null==current.name?null:current.name)&&currentResource.getAttribute("property")===(null==current.property?null:current.property)&&currentResource.getAttribute("http-equiv")===(null==current.httpEquiv?null:current.httpEquiv)&&currentResource.getAttribute("charset")===(null==current.charSet?null:current.charSet)){maybeNodes.splice(i,1);break b;}currentResource=hoistableRoot.createElement(flags);setInitialProperties(currentResource,flags,current);hoistableRoot.head.appendChild(currentResource);break;default:throw Error(formatProdErrorMessage(468,flags));}currentResource[internalInstanceKey]=finishedWork;markNodeAsHoistable(currentResource);flags=currentResource;}finishedWork.stateNode=flags;}else mountHoistable(hoistableRoot,finishedWork.type,finishedWork.stateNode);}else finishedWork.stateNode=acquireResource(hoistableRoot,flags,finishedWork.memoizedProps);}else currentResource!==flags?(null===currentResource?null!==current.stateNode&&(current=current.stateNode,current.parentNode.removeChild(current)):currentResource.count--,null===flags?mountHoistable(hoistableRoot,finishedWork.type,finishedWork.stateNode):acquireResource(hoistableRoot,flags,finishedWork.memoizedProps)):null===flags&&null!==finishedWork.stateNode&&commitHostUpdate(finishedWork,finishedWork.memoizedProps,current.memoizedProps);}break;case 27:recursivelyTraverseMutationEffects(root,finishedWork);commitReconciliationEffects(finishedWork);flags&512&&(offscreenSubtreeWasHidden||null===current||safelyDetachRef(current,current.return));null!==current&&flags&4&&commitHostUpdate(finishedWork,finishedWork.memoizedProps,current.memoizedProps);break;case 5:recursivelyTraverseMutationEffects(root,finishedWork);commitReconciliationEffects(finishedWork);flags&512&&(offscreenSubtreeWasHidden||null===current||safelyDetachRef(current,current.return));if(finishedWork.flags&32){hoistableRoot=finishedWork.stateNode;try{setTextContent(hoistableRoot,"");}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}}flags&4&&null!=finishedWork.stateNode&&(hoistableRoot=finishedWork.memoizedProps,commitHostUpdate(finishedWork,hoistableRoot,null!==current?current.memoizedProps:hoistableRoot));flags&1024&&(needsFormReset=true);break;case 6:recursivelyTraverseMutationEffects(root,finishedWork);commitReconciliationEffects(finishedWork);if(flags&4){if(null===finishedWork.stateNode)throw Error(formatProdErrorMessage(162));flags=finishedWork.memoizedProps;current=finishedWork.stateNode;try{current.nodeValue=flags;}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}}break;case 3:tagCaches=null;hoistableRoot=currentHoistableRoot;currentHoistableRoot=getHoistableRoot(root.containerInfo);recursivelyTraverseMutationEffects(root,finishedWork);currentHoistableRoot=hoistableRoot;commitReconciliationEffects(finishedWork);if(flags&4&&null!==current&&current.memoizedState.isDehydrated)try{retryIfBlockedOn(root.containerInfo);}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}needsFormReset&&(needsFormReset=false,recursivelyResetForms(finishedWork));break;case 4:flags=currentHoistableRoot;currentHoistableRoot=getHoistableRoot(finishedWork.stateNode.containerInfo);recursivelyTraverseMutationEffects(root,finishedWork);commitReconciliationEffects(finishedWork);currentHoistableRoot=flags;break;case 12:recursivelyTraverseMutationEffects(root,finishedWork);commitReconciliationEffects(finishedWork);break;case 31:recursivelyTraverseMutationEffects(root,finishedWork);commitReconciliationEffects(finishedWork);flags&4&&(flags=finishedWork.updateQueue,null!==flags&&(finishedWork.updateQueue=null,attachSuspenseRetryListeners(finishedWork,flags)));break;case 13:recursivelyTraverseMutationEffects(root,finishedWork);commitReconciliationEffects(finishedWork);finishedWork.child.flags&8192&&null!==finishedWork.memoizedState!==(null!==current&&null!==current.memoizedState)&&(globalMostRecentFallbackTime=now());flags&4&&(flags=finishedWork.updateQueue,null!==flags&&(finishedWork.updateQueue=null,attachSuspenseRetryListeners(finishedWork,flags)));break;case 22:hoistableRoot=null!==finishedWork.memoizedState;var wasHidden=null!==current&&null!==current.memoizedState,prevOffscreenSubtreeIsHidden=offscreenSubtreeIsHidden,prevOffscreenSubtreeWasHidden=offscreenSubtreeWasHidden;offscreenSubtreeIsHidden=prevOffscreenSubtreeIsHidden||hoistableRoot;offscreenSubtreeWasHidden=prevOffscreenSubtreeWasHidden||wasHidden;recursivelyTraverseMutationEffects(root,finishedWork);offscreenSubtreeWasHidden=prevOffscreenSubtreeWasHidden;offscreenSubtreeIsHidden=prevOffscreenSubtreeIsHidden;commitReconciliationEffects(finishedWork);if(flags&8192)a:for(root=finishedWork.stateNode,root._visibility=hoistableRoot?root._visibility&-2:root._visibility|1,hoistableRoot&&(null===current||wasHidden||offscreenSubtreeIsHidden||offscreenSubtreeWasHidden||recursivelyTraverseDisappearLayoutEffects(finishedWork)),current=null,root=finishedWork;;){if(5===root.tag||26===root.tag){if(null===current){wasHidden=current=root;try{if(currentResource=wasHidden.stateNode,hoistableRoot)maybeNodes=currentResource.style,"function"===typeof maybeNodes.setProperty?maybeNodes.setProperty("display","none","important"):maybeNodes.display="none";else {i=wasHidden.stateNode;var styleProp=wasHidden.memoizedProps.style,display=void 0!==styleProp&&null!==styleProp&&styleProp.hasOwnProperty("display")?styleProp.display:null;i.style.display=null==display||"boolean"===typeof display?"":(""+display).trim();}}catch(error){captureCommitPhaseError(wasHidden,wasHidden.return,error);}}}else if(6===root.tag){if(null===current){wasHidden=root;try{wasHidden.stateNode.nodeValue=hoistableRoot?"":wasHidden.memoizedProps;}catch(error){captureCommitPhaseError(wasHidden,wasHidden.return,error);}}}else if(18===root.tag){if(null===current){wasHidden=root;try{var instance=wasHidden.stateNode;hoistableRoot?hideOrUnhideDehydratedBoundary(instance,!0):hideOrUnhideDehydratedBoundary(wasHidden.stateNode,!1);}catch(error){captureCommitPhaseError(wasHidden,wasHidden.return,error);}}}else if((22!==root.tag&&23!==root.tag||null===root.memoizedState||root===finishedWork)&&null!==root.child){root.child.return=root;root=root.child;continue;}if(root===finishedWork)break a;for(;null===root.sibling;){if(null===root.return||root.return===finishedWork)break a;current===root&&(current=null);root=root.return;}current===root&&(current=null);root.sibling.return=root.return;root=root.sibling;}flags&4&&(flags=finishedWork.updateQueue,null!==flags&&(current=flags.retryQueue,null!==current&&(flags.retryQueue=null,attachSuspenseRetryListeners(finishedWork,current))));break;case 19:recursivelyTraverseMutationEffects(root,finishedWork);commitReconciliationEffects(finishedWork);flags&4&&(flags=finishedWork.updateQueue,null!==flags&&(finishedWork.updateQueue=null,attachSuspenseRetryListeners(finishedWork,flags)));break;case 30:break;case 21:break;default:recursivelyTraverseMutationEffects(root,finishedWork),commitReconciliationEffects(finishedWork);}}function commitReconciliationEffects(finishedWork){var flags=finishedWork.flags;if(flags&2){try{for(var hostParentFiber,parentFiber=finishedWork.return;null!==parentFiber;){if(isHostParent(parentFiber)){hostParentFiber=parentFiber;break;}parentFiber=parentFiber.return;}if(null==hostParentFiber)throw Error(formatProdErrorMessage(160));switch(hostParentFiber.tag){case 27:var parent=hostParentFiber.stateNode,before=getHostSibling(finishedWork);insertOrAppendPlacementNode(finishedWork,before,parent);break;case 5:var parent$141=hostParentFiber.stateNode;hostParentFiber.flags&32&&(setTextContent(parent$141,""),hostParentFiber.flags&=-33);var before$142=getHostSibling(finishedWork);insertOrAppendPlacementNode(finishedWork,before$142,parent$141);break;case 3:case 4:var parent$143=hostParentFiber.stateNode.containerInfo,before$144=getHostSibling(finishedWork);insertOrAppendPlacementNodeIntoContainer(finishedWork,before$144,parent$143);break;default:throw Error(formatProdErrorMessage(161));}}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}finishedWork.flags&=-3;}flags&4096&&(finishedWork.flags&=-4097);}function recursivelyResetForms(parentFiber){if(parentFiber.subtreeFlags&1024)for(parentFiber=parentFiber.child;null!==parentFiber;){var fiber=parentFiber;recursivelyResetForms(fiber);5===fiber.tag&&fiber.flags&1024&&fiber.stateNode.reset();parentFiber=parentFiber.sibling;}}function recursivelyTraverseLayoutEffects(root,parentFiber){if(parentFiber.subtreeFlags&8772)for(parentFiber=parentFiber.child;null!==parentFiber;)commitLayoutEffectOnFiber(root,parentFiber.alternate,parentFiber),parentFiber=parentFiber.sibling;}function recursivelyTraverseDisappearLayoutEffects(parentFiber){for(parentFiber=parentFiber.child;null!==parentFiber;){var finishedWork=parentFiber;switch(finishedWork.tag){case 0:case 11:case 14:case 15:commitHookEffectListUnmount(4,finishedWork,finishedWork.return);recursivelyTraverseDisappearLayoutEffects(finishedWork);break;case 1:safelyDetachRef(finishedWork,finishedWork.return);var instance=finishedWork.stateNode;"function"===typeof instance.componentWillUnmount&&safelyCallComponentWillUnmount(finishedWork,finishedWork.return,instance);recursivelyTraverseDisappearLayoutEffects(finishedWork);break;case 27:releaseSingletonInstance(finishedWork.stateNode);case 26:case 5:safelyDetachRef(finishedWork,finishedWork.return);recursivelyTraverseDisappearLayoutEffects(finishedWork);break;case 22:null===finishedWork.memoizedState&&recursivelyTraverseDisappearLayoutEffects(finishedWork);break;case 30:recursivelyTraverseDisappearLayoutEffects(finishedWork);break;default:recursivelyTraverseDisappearLayoutEffects(finishedWork);}parentFiber=parentFiber.sibling;}}function recursivelyTraverseReappearLayoutEffects(finishedRoot$jscomp$0,parentFiber,includeWorkInProgressEffects){includeWorkInProgressEffects=includeWorkInProgressEffects&&0!==(parentFiber.subtreeFlags&8772);for(parentFiber=parentFiber.child;null!==parentFiber;){var current=parentFiber.alternate,finishedRoot=finishedRoot$jscomp$0,finishedWork=parentFiber,flags=finishedWork.flags;switch(finishedWork.tag){case 0:case 11:case 15:recursivelyTraverseReappearLayoutEffects(finishedRoot,finishedWork,includeWorkInProgressEffects);commitHookEffectListMount(4,finishedWork);break;case 1:recursivelyTraverseReappearLayoutEffects(finishedRoot,finishedWork,includeWorkInProgressEffects);current=finishedWork;finishedRoot=current.stateNode;if("function"===typeof finishedRoot.componentDidMount)try{finishedRoot.componentDidMount();}catch(error){captureCommitPhaseError(current,current.return,error);}current=finishedWork;finishedRoot=current.updateQueue;if(null!==finishedRoot){var instance=current.stateNode;try{var hiddenCallbacks=finishedRoot.shared.hiddenCallbacks;if(null!==hiddenCallbacks)for(finishedRoot.shared.hiddenCallbacks=null,finishedRoot=0;finishedRoot<hiddenCallbacks.length;finishedRoot++)callCallback(hiddenCallbacks[finishedRoot],instance);}catch(error){captureCommitPhaseError(current,current.return,error);}}includeWorkInProgressEffects&&flags&64&&commitClassCallbacks(finishedWork);safelyAttachRef(finishedWork,finishedWork.return);break;case 27:commitHostSingletonAcquisition(finishedWork);case 26:case 5:recursivelyTraverseReappearLayoutEffects(finishedRoot,finishedWork,includeWorkInProgressEffects);includeWorkInProgressEffects&&null===current&&flags&4&&commitHostMount(finishedWork);safelyAttachRef(finishedWork,finishedWork.return);break;case 12:recursivelyTraverseReappearLayoutEffects(finishedRoot,finishedWork,includeWorkInProgressEffects);break;case 31:recursivelyTraverseReappearLayoutEffects(finishedRoot,finishedWork,includeWorkInProgressEffects);includeWorkInProgressEffects&&flags&4&&commitActivityHydrationCallbacks(finishedRoot,finishedWork);break;case 13:recursivelyTraverseReappearLayoutEffects(finishedRoot,finishedWork,includeWorkInProgressEffects);includeWorkInProgressEffects&&flags&4&&commitSuspenseHydrationCallbacks(finishedRoot,finishedWork);break;case 22:null===finishedWork.memoizedState&&recursivelyTraverseReappearLayoutEffects(finishedRoot,finishedWork,includeWorkInProgressEffects);safelyAttachRef(finishedWork,finishedWork.return);break;case 30:break;default:recursivelyTraverseReappearLayoutEffects(finishedRoot,finishedWork,includeWorkInProgressEffects);}parentFiber=parentFiber.sibling;}}function commitOffscreenPassiveMountEffects(current,finishedWork){var previousCache=null;null!==current&&null!==current.memoizedState&&null!==current.memoizedState.cachePool&&(previousCache=current.memoizedState.cachePool.pool);current=null;null!==finishedWork.memoizedState&&null!==finishedWork.memoizedState.cachePool&&(current=finishedWork.memoizedState.cachePool.pool);current!==previousCache&&(null!=current&&current.refCount++,null!=previousCache&&releaseCache(previousCache));}function commitCachePassiveMountEffect(current,finishedWork){current=null;null!==finishedWork.alternate&&(current=finishedWork.alternate.memoizedState.cache);finishedWork=finishedWork.memoizedState.cache;finishedWork!==current&&(finishedWork.refCount++,null!=current&&releaseCache(current));}function recursivelyTraversePassiveMountEffects(root,parentFiber,committedLanes,committedTransitions){if(parentFiber.subtreeFlags&10256)for(parentFiber=parentFiber.child;null!==parentFiber;)commitPassiveMountOnFiber(root,parentFiber,committedLanes,committedTransitions),parentFiber=parentFiber.sibling;}function commitPassiveMountOnFiber(finishedRoot,finishedWork,committedLanes,committedTransitions){var flags=finishedWork.flags;switch(finishedWork.tag){case 0:case 11:case 15:recursivelyTraversePassiveMountEffects(finishedRoot,finishedWork,committedLanes,committedTransitions);flags&2048&&commitHookEffectListMount(9,finishedWork);break;case 1:recursivelyTraversePassiveMountEffects(finishedRoot,finishedWork,committedLanes,committedTransitions);break;case 3:recursivelyTraversePassiveMountEffects(finishedRoot,finishedWork,committedLanes,committedTransitions);flags&2048&&(finishedRoot=null,null!==finishedWork.alternate&&(finishedRoot=finishedWork.alternate.memoizedState.cache),finishedWork=finishedWork.memoizedState.cache,finishedWork!==finishedRoot&&(finishedWork.refCount++,null!=finishedRoot&&releaseCache(finishedRoot)));break;case 12:if(flags&2048){recursivelyTraversePassiveMountEffects(finishedRoot,finishedWork,committedLanes,committedTransitions);finishedRoot=finishedWork.stateNode;try{var _finishedWork$memoize2=finishedWork.memoizedProps,id=_finishedWork$memoize2.id,onPostCommit=_finishedWork$memoize2.onPostCommit;"function"===typeof onPostCommit&&onPostCommit(id,null===finishedWork.alternate?"mount":"update",finishedRoot.passiveEffectDuration,-0);}catch(error){captureCommitPhaseError(finishedWork,finishedWork.return,error);}}else recursivelyTraversePassiveMountEffects(finishedRoot,finishedWork,committedLanes,committedTransitions);break;case 31:recursivelyTraversePassiveMountEffects(finishedRoot,finishedWork,committedLanes,committedTransitions);break;case 13:recursivelyTraversePassiveMountEffects(finishedRoot,finishedWork,committedLanes,committedTransitions);break;case 23:break;case 22:_finishedWork$memoize2=finishedWork.stateNode;id=finishedWork.alternate;null!==finishedWork.memoizedState?_finishedWork$memoize2._visibility&2?recursivelyTraversePassiveMountEffects(finishedRoot,finishedWork,committedLanes,committedTransitions):recursivelyTraverseAtomicPassiveEffects(finishedRoot,finishedWork):_finishedWork$memoize2._visibility&2?recursivelyTraversePassiveMountEffects(finishedRoot,finishedWork,committedLanes,committedTransitions):(_finishedWork$memoize2._visibility|=2,recursivelyTraverseReconnectPassiveEffects(finishedRoot,finishedWork,committedLanes,committedTransitions,0!==(finishedWork.subtreeFlags&10256)||false));flags&2048&&commitOffscreenPassiveMountEffects(id,finishedWork);break;case 24:recursivelyTraversePassiveMountEffects(finishedRoot,finishedWork,committedLanes,committedTransitions);flags&2048&&commitCachePassiveMountEffect(finishedWork.alternate,finishedWork);break;default:recursivelyTraversePassiveMountEffects(finishedRoot,finishedWork,committedLanes,committedTransitions);}}function recursivelyTraverseReconnectPassiveEffects(finishedRoot$jscomp$0,parentFiber,committedLanes$jscomp$0,committedTransitions$jscomp$0,includeWorkInProgressEffects){includeWorkInProgressEffects=includeWorkInProgressEffects&&(0!==(parentFiber.subtreeFlags&10256)||false);for(parentFiber=parentFiber.child;null!==parentFiber;){var finishedRoot=finishedRoot$jscomp$0,finishedWork=parentFiber,committedLanes=committedLanes$jscomp$0,committedTransitions=committedTransitions$jscomp$0,flags=finishedWork.flags;switch(finishedWork.tag){case 0:case 11:case 15:recursivelyTraverseReconnectPassiveEffects(finishedRoot,finishedWork,committedLanes,committedTransitions,includeWorkInProgressEffects);commitHookEffectListMount(8,finishedWork);break;case 23:break;case 22:var instance=finishedWork.stateNode;null!==finishedWork.memoizedState?instance._visibility&2?recursivelyTraverseReconnectPassiveEffects(finishedRoot,finishedWork,committedLanes,committedTransitions,includeWorkInProgressEffects):recursivelyTraverseAtomicPassiveEffects(finishedRoot,finishedWork):(instance._visibility|=2,recursivelyTraverseReconnectPassiveEffects(finishedRoot,finishedWork,committedLanes,committedTransitions,includeWorkInProgressEffects));includeWorkInProgressEffects&&flags&2048&&commitOffscreenPassiveMountEffects(finishedWork.alternate,finishedWork);break;case 24:recursivelyTraverseReconnectPassiveEffects(finishedRoot,finishedWork,committedLanes,committedTransitions,includeWorkInProgressEffects);includeWorkInProgressEffects&&flags&2048&&commitCachePassiveMountEffect(finishedWork.alternate,finishedWork);break;default:recursivelyTraverseReconnectPassiveEffects(finishedRoot,finishedWork,committedLanes,committedTransitions,includeWorkInProgressEffects);}parentFiber=parentFiber.sibling;}}function recursivelyTraverseAtomicPassiveEffects(finishedRoot$jscomp$0,parentFiber){if(parentFiber.subtreeFlags&10256)for(parentFiber=parentFiber.child;null!==parentFiber;){var finishedRoot=finishedRoot$jscomp$0,finishedWork=parentFiber,flags=finishedWork.flags;switch(finishedWork.tag){case 22:recursivelyTraverseAtomicPassiveEffects(finishedRoot,finishedWork);flags&2048&&commitOffscreenPassiveMountEffects(finishedWork.alternate,finishedWork);break;case 24:recursivelyTraverseAtomicPassiveEffects(finishedRoot,finishedWork);flags&2048&&commitCachePassiveMountEffect(finishedWork.alternate,finishedWork);break;default:recursivelyTraverseAtomicPassiveEffects(finishedRoot,finishedWork);}parentFiber=parentFiber.sibling;}}var suspenseyCommitFlag=8192;function recursivelyAccumulateSuspenseyCommit(parentFiber,committedLanes,suspendedState){if(parentFiber.subtreeFlags&suspenseyCommitFlag)for(parentFiber=parentFiber.child;null!==parentFiber;)accumulateSuspenseyCommitOnFiber(parentFiber,committedLanes,suspendedState),parentFiber=parentFiber.sibling;}function accumulateSuspenseyCommitOnFiber(fiber,committedLanes,suspendedState){switch(fiber.tag){case 26:recursivelyAccumulateSuspenseyCommit(fiber,committedLanes,suspendedState);fiber.flags&suspenseyCommitFlag&&null!==fiber.memoizedState&&suspendResource(suspendedState,currentHoistableRoot,fiber.memoizedState,fiber.memoizedProps);break;case 5:recursivelyAccumulateSuspenseyCommit(fiber,committedLanes,suspendedState);break;case 3:case 4:var previousHoistableRoot=currentHoistableRoot;currentHoistableRoot=getHoistableRoot(fiber.stateNode.containerInfo);recursivelyAccumulateSuspenseyCommit(fiber,committedLanes,suspendedState);currentHoistableRoot=previousHoistableRoot;break;case 22:null===fiber.memoizedState&&(previousHoistableRoot=fiber.alternate,null!==previousHoistableRoot&&null!==previousHoistableRoot.memoizedState?(previousHoistableRoot=suspenseyCommitFlag,suspenseyCommitFlag=16777216,recursivelyAccumulateSuspenseyCommit(fiber,committedLanes,suspendedState),suspenseyCommitFlag=previousHoistableRoot):recursivelyAccumulateSuspenseyCommit(fiber,committedLanes,suspendedState));break;default:recursivelyAccumulateSuspenseyCommit(fiber,committedLanes,suspendedState);}}function detachAlternateSiblings(parentFiber){var previousFiber=parentFiber.alternate;if(null!==previousFiber&&(parentFiber=previousFiber.child,null!==parentFiber)){previousFiber.child=null;do previousFiber=parentFiber.sibling,parentFiber.sibling=null,parentFiber=previousFiber;while(null!==parentFiber);}}function recursivelyTraversePassiveUnmountEffects(parentFiber){var deletions=parentFiber.deletions;if(0!==(parentFiber.flags&16)){if(null!==deletions)for(var i=0;i<deletions.length;i++){var childToDelete=deletions[i];nextEffect=childToDelete;commitPassiveUnmountEffectsInsideOfDeletedTree_begin(childToDelete,parentFiber);}detachAlternateSiblings(parentFiber);}if(parentFiber.subtreeFlags&10256)for(parentFiber=parentFiber.child;null!==parentFiber;)commitPassiveUnmountOnFiber(parentFiber),parentFiber=parentFiber.sibling;}function commitPassiveUnmountOnFiber(finishedWork){switch(finishedWork.tag){case 0:case 11:case 15:recursivelyTraversePassiveUnmountEffects(finishedWork);finishedWork.flags&2048&&commitHookEffectListUnmount(9,finishedWork,finishedWork.return);break;case 3:recursivelyTraversePassiveUnmountEffects(finishedWork);break;case 12:recursivelyTraversePassiveUnmountEffects(finishedWork);break;case 22:var instance=finishedWork.stateNode;null!==finishedWork.memoizedState&&instance._visibility&2&&(null===finishedWork.return||13!==finishedWork.return.tag)?(instance._visibility&=-3,recursivelyTraverseDisconnectPassiveEffects(finishedWork)):recursivelyTraversePassiveUnmountEffects(finishedWork);break;default:recursivelyTraversePassiveUnmountEffects(finishedWork);}}function recursivelyTraverseDisconnectPassiveEffects(parentFiber){var deletions=parentFiber.deletions;if(0!==(parentFiber.flags&16)){if(null!==deletions)for(var i=0;i<deletions.length;i++){var childToDelete=deletions[i];nextEffect=childToDelete;commitPassiveUnmountEffectsInsideOfDeletedTree_begin(childToDelete,parentFiber);}detachAlternateSiblings(parentFiber);}for(parentFiber=parentFiber.child;null!==parentFiber;){deletions=parentFiber;switch(deletions.tag){case 0:case 11:case 15:commitHookEffectListUnmount(8,deletions,deletions.return);recursivelyTraverseDisconnectPassiveEffects(deletions);break;case 22:i=deletions.stateNode;i._visibility&2&&(i._visibility&=-3,recursivelyTraverseDisconnectPassiveEffects(deletions));break;default:recursivelyTraverseDisconnectPassiveEffects(deletions);}parentFiber=parentFiber.sibling;}}function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot,nearestMountedAncestor){for(;null!==nextEffect;){var fiber=nextEffect;switch(fiber.tag){case 0:case 11:case 15:commitHookEffectListUnmount(8,fiber,nearestMountedAncestor);break;case 23:case 22:if(null!==fiber.memoizedState&&null!==fiber.memoizedState.cachePool){var cache=fiber.memoizedState.cachePool.pool;null!=cache&&cache.refCount++;}break;case 24:releaseCache(fiber.memoizedState.cache);}cache=fiber.child;if(null!==cache)cache.return=fiber,nextEffect=cache;else a:for(fiber=deletedSubtreeRoot;null!==nextEffect;){cache=nextEffect;var sibling=cache.sibling,returnFiber=cache.return;detachFiberAfterEffects(cache);if(cache===fiber){nextEffect=null;break a;}if(null!==sibling){sibling.return=returnFiber;nextEffect=sibling;break a;}nextEffect=returnFiber;}}}var DefaultAsyncDispatcher={getCacheForType:function(resourceType){var cache=readContext(CacheContext),cacheForType=cache.data.get(resourceType);void 0===cacheForType&&(cacheForType=resourceType(),cache.data.set(resourceType,cacheForType));return cacheForType;},cacheSignal:function(){return readContext(CacheContext).controller.signal;}},PossiblyWeakMap="function"===typeof WeakMap?WeakMap:Map,executionContext=0,workInProgressRoot=null,workInProgress=null,workInProgressRootRenderLanes=0,workInProgressSuspendedReason=0,workInProgressThrownValue=null,workInProgressRootDidSkipSuspendedSiblings=false,workInProgressRootIsPrerendering=false,workInProgressRootDidAttachPingListener=false,entangledRenderLanes=0,workInProgressRootExitStatus=0,workInProgressRootSkippedLanes=0,workInProgressRootInterleavedUpdatedLanes=0,workInProgressRootPingedLanes=0,workInProgressDeferredLane=0,workInProgressSuspendedRetryLanes=0,workInProgressRootConcurrentErrors=null,workInProgressRootRecoverableErrors=null,workInProgressRootDidIncludeRecursiveRenderUpdate=false,globalMostRecentFallbackTime=0,globalMostRecentTransitionTime=0,workInProgressRootRenderTargetTime=Infinity,workInProgressTransitions=null,legacyErrorBoundariesThatAlreadyFailed=null,pendingEffectsStatus=0,pendingEffectsRoot=null,pendingFinishedWork=null,pendingEffectsLanes=0,pendingEffectsRemainingLanes=0,pendingPassiveTransitions=null,pendingRecoverableErrors=null,nestedUpdateCount=0,rootWithNestedUpdates=null;function requestUpdateLane(){return 0!==(executionContext&2)&&0!==workInProgressRootRenderLanes?workInProgressRootRenderLanes&-workInProgressRootRenderLanes:null!==ReactSharedInternals.T?requestTransitionLane():resolveUpdatePriority();}function requestDeferredLane(){if(0===workInProgressDeferredLane)if(0===(workInProgressRootRenderLanes&536870912)||isHydrating){var lane=nextTransitionDeferredLane;nextTransitionDeferredLane<<=1;0===(nextTransitionDeferredLane&3932160)&&(nextTransitionDeferredLane=262144);workInProgressDeferredLane=lane;}else workInProgressDeferredLane=536870912;lane=suspenseHandlerStackCursor.current;null!==lane&&(lane.flags|=32);return workInProgressDeferredLane;}function scheduleUpdateOnFiber(root,fiber,lane){if(root===workInProgressRoot&&(2===workInProgressSuspendedReason||9===workInProgressSuspendedReason)||null!==root.cancelPendingCommit)prepareFreshStack(root,0),markRootSuspended(root,workInProgressRootRenderLanes,workInProgressDeferredLane,false);markRootUpdated$1(root,lane);if(0===(executionContext&2)||root!==workInProgressRoot)root===workInProgressRoot&&(0===(executionContext&2)&&(workInProgressRootInterleavedUpdatedLanes|=lane),4===workInProgressRootExitStatus&&markRootSuspended(root,workInProgressRootRenderLanes,workInProgressDeferredLane,false)),ensureRootIsScheduled(root);}function performWorkOnRoot(root$jscomp$0,lanes,forceSync){if(0!==(executionContext&6))throw Error(formatProdErrorMessage(327));var shouldTimeSlice=!forceSync&&0===(lanes&127)&&0===(lanes&root$jscomp$0.expiredLanes)||checkIfRootIsPrerendering(root$jscomp$0,lanes),exitStatus=shouldTimeSlice?renderRootConcurrent(root$jscomp$0,lanes):renderRootSync(root$jscomp$0,lanes,true),renderWasConcurrent=shouldTimeSlice;do{if(0===exitStatus){workInProgressRootIsPrerendering&&!shouldTimeSlice&&markRootSuspended(root$jscomp$0,lanes,0,false);break;}else {forceSync=root$jscomp$0.current.alternate;if(renderWasConcurrent&&!isRenderConsistentWithExternalStores(forceSync)){exitStatus=renderRootSync(root$jscomp$0,lanes,false);renderWasConcurrent=false;continue;}if(2===exitStatus){renderWasConcurrent=lanes;if(root$jscomp$0.errorRecoveryDisabledLanes&renderWasConcurrent)var JSCompiler_inline_result=0;else JSCompiler_inline_result=root$jscomp$0.pendingLanes&-536870913,JSCompiler_inline_result=0!==JSCompiler_inline_result?JSCompiler_inline_result:JSCompiler_inline_result&536870912?536870912:0;if(0!==JSCompiler_inline_result){lanes=JSCompiler_inline_result;a:{var root=root$jscomp$0;exitStatus=workInProgressRootConcurrentErrors;var wasRootDehydrated=root.current.memoizedState.isDehydrated;wasRootDehydrated&&(prepareFreshStack(root,JSCompiler_inline_result).flags|=256);JSCompiler_inline_result=renderRootSync(root,JSCompiler_inline_result,false);if(2!==JSCompiler_inline_result){if(workInProgressRootDidAttachPingListener&&!wasRootDehydrated){root.errorRecoveryDisabledLanes|=renderWasConcurrent;workInProgressRootInterleavedUpdatedLanes|=renderWasConcurrent;exitStatus=4;break a;}renderWasConcurrent=workInProgressRootRecoverableErrors;workInProgressRootRecoverableErrors=exitStatus;null!==renderWasConcurrent&&(null===workInProgressRootRecoverableErrors?workInProgressRootRecoverableErrors=renderWasConcurrent:workInProgressRootRecoverableErrors.push.apply(workInProgressRootRecoverableErrors,renderWasConcurrent));}exitStatus=JSCompiler_inline_result;}renderWasConcurrent=false;if(2!==exitStatus)continue;}}if(1===exitStatus){prepareFreshStack(root$jscomp$0,0);markRootSuspended(root$jscomp$0,lanes,0,true);break;}a:{shouldTimeSlice=root$jscomp$0;renderWasConcurrent=exitStatus;switch(renderWasConcurrent){case 0:case 1:throw Error(formatProdErrorMessage(345));case 4:if((lanes&4194048)!==lanes)break;case 6:markRootSuspended(shouldTimeSlice,lanes,workInProgressDeferredLane,!workInProgressRootDidSkipSuspendedSiblings);break a;case 2:workInProgressRootRecoverableErrors=null;break;case 3:case 5:break;default:throw Error(formatProdErrorMessage(329));}if((lanes&62914560)===lanes&&(exitStatus=globalMostRecentFallbackTime+300-now(),10<exitStatus)){markRootSuspended(shouldTimeSlice,lanes,workInProgressDeferredLane,!workInProgressRootDidSkipSuspendedSiblings);if(0!==getNextLanes(shouldTimeSlice,0,true))break a;pendingEffectsLanes=lanes;shouldTimeSlice.timeoutHandle=scheduleTimeout(commitRootWhenReady.bind(null,shouldTimeSlice,forceSync,workInProgressRootRecoverableErrors,workInProgressTransitions,workInProgressRootDidIncludeRecursiveRenderUpdate,lanes,workInProgressDeferredLane,workInProgressRootInterleavedUpdatedLanes,workInProgressSuspendedRetryLanes,workInProgressRootDidSkipSuspendedSiblings,renderWasConcurrent,"Throttled",-0,0),exitStatus);break a;}commitRootWhenReady(shouldTimeSlice,forceSync,workInProgressRootRecoverableErrors,workInProgressTransitions,workInProgressRootDidIncludeRecursiveRenderUpdate,lanes,workInProgressDeferredLane,workInProgressRootInterleavedUpdatedLanes,workInProgressSuspendedRetryLanes,workInProgressRootDidSkipSuspendedSiblings,renderWasConcurrent,null,-0,0);}}break;}while(1);ensureRootIsScheduled(root$jscomp$0);}function commitRootWhenReady(root,finishedWork,recoverableErrors,transitions,didIncludeRenderPhaseUpdate,lanes,spawnedLane,updatedLanes,suspendedRetryLanes,didSkipSuspendedSiblings,exitStatus,suspendedCommitReason,completedRenderStartTime,completedRenderEndTime){root.timeoutHandle=-1;suspendedCommitReason=finishedWork.subtreeFlags;if(suspendedCommitReason&8192||16785408===(suspendedCommitReason&16785408)){suspendedCommitReason={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:true,waitingForViewTransition:false,unsuspend:noop$1};accumulateSuspenseyCommitOnFiber(finishedWork,lanes,suspendedCommitReason);var timeoutOffset=(lanes&62914560)===lanes?globalMostRecentFallbackTime-now():(lanes&4194048)===lanes?globalMostRecentTransitionTime-now():0;timeoutOffset=waitForCommitToBeReady(suspendedCommitReason,timeoutOffset);if(null!==timeoutOffset){pendingEffectsLanes=lanes;root.cancelPendingCommit=timeoutOffset(commitRoot.bind(null,root,finishedWork,lanes,recoverableErrors,transitions,didIncludeRenderPhaseUpdate,spawnedLane,updatedLanes,suspendedRetryLanes,exitStatus,suspendedCommitReason,null,completedRenderStartTime,completedRenderEndTime));markRootSuspended(root,lanes,spawnedLane,!didSkipSuspendedSiblings);return;}}commitRoot(root,finishedWork,lanes,recoverableErrors,transitions,didIncludeRenderPhaseUpdate,spawnedLane,updatedLanes,suspendedRetryLanes);}function isRenderConsistentWithExternalStores(finishedWork){for(var node=finishedWork;;){var tag=node.tag;if((0===tag||11===tag||15===tag)&&node.flags&16384&&(tag=node.updateQueue,null!==tag&&(tag=tag.stores,null!==tag)))for(var i=0;i<tag.length;i++){var check=tag[i],getSnapshot=check.getSnapshot;check=check.value;try{if(!objectIs(getSnapshot(),check))return !1;}catch(error){return  false;}}tag=node.child;if(node.subtreeFlags&16384&&null!==tag)tag.return=node,node=tag;else {if(node===finishedWork)break;for(;null===node.sibling;){if(null===node.return||node.return===finishedWork)return  true;node=node.return;}node.sibling.return=node.return;node=node.sibling;}}return  true;}function markRootSuspended(root,suspendedLanes,spawnedLane,didAttemptEntireTree){suspendedLanes&=~workInProgressRootPingedLanes;suspendedLanes&=~workInProgressRootInterleavedUpdatedLanes;root.suspendedLanes|=suspendedLanes;root.pingedLanes&=~suspendedLanes;didAttemptEntireTree&&(root.warmLanes|=suspendedLanes);didAttemptEntireTree=root.expirationTimes;for(var lanes=suspendedLanes;0<lanes;){var index$6=31-clz32(lanes),lane=1<<index$6;didAttemptEntireTree[index$6]=-1;lanes&=~lane;}0!==spawnedLane&&markSpawnedDeferredLane(root,spawnedLane,suspendedLanes);}function flushSyncWork$1(){return 0===(executionContext&6)?(flushSyncWorkAcrossRoots_impl(0),false):true;}function resetWorkInProgressStack(){if(null!==workInProgress){if(0===workInProgressSuspendedReason)var interruptedWork=workInProgress.return;else interruptedWork=workInProgress,lastContextDependency=currentlyRenderingFiber$1=null,resetHooksOnUnwind(interruptedWork),thenableState$1=null,thenableIndexCounter$1=0,interruptedWork=workInProgress;for(;null!==interruptedWork;)unwindInterruptedWork(interruptedWork.alternate,interruptedWork),interruptedWork=interruptedWork.return;workInProgress=null;}}function prepareFreshStack(root,lanes){var timeoutHandle=root.timeoutHandle;-1!==timeoutHandle&&(root.timeoutHandle=-1,cancelTimeout(timeoutHandle));timeoutHandle=root.cancelPendingCommit;null!==timeoutHandle&&(root.cancelPendingCommit=null,timeoutHandle());pendingEffectsLanes=0;resetWorkInProgressStack();workInProgressRoot=root;workInProgress=timeoutHandle=createWorkInProgress(root.current,null);workInProgressRootRenderLanes=lanes;workInProgressSuspendedReason=0;workInProgressThrownValue=null;workInProgressRootDidSkipSuspendedSiblings=false;workInProgressRootIsPrerendering=checkIfRootIsPrerendering(root,lanes);workInProgressRootDidAttachPingListener=false;workInProgressSuspendedRetryLanes=workInProgressDeferredLane=workInProgressRootPingedLanes=workInProgressRootInterleavedUpdatedLanes=workInProgressRootSkippedLanes=workInProgressRootExitStatus=0;workInProgressRootRecoverableErrors=workInProgressRootConcurrentErrors=null;workInProgressRootDidIncludeRecursiveRenderUpdate=false;0!==(lanes&8)&&(lanes|=lanes&32);var allEntangledLanes=root.entangledLanes;if(0!==allEntangledLanes)for(root=root.entanglements,allEntangledLanes&=lanes;0<allEntangledLanes;){var index$4=31-clz32(allEntangledLanes),lane=1<<index$4;lanes|=root[index$4];allEntangledLanes&=~lane;}entangledRenderLanes=lanes;finishQueueingConcurrentUpdates();return timeoutHandle;}function handleThrow(root,thrownValue){currentlyRenderingFiber=null;ReactSharedInternals.H=ContextOnlyDispatcher;thrownValue===SuspenseException||thrownValue===SuspenseActionException?(thrownValue=getSuspendedThenable(),workInProgressSuspendedReason=3):thrownValue===SuspenseyCommitException?(thrownValue=getSuspendedThenable(),workInProgressSuspendedReason=4):workInProgressSuspendedReason=thrownValue===SelectiveHydrationException?8:null!==thrownValue&&"object"===typeof thrownValue&&"function"===typeof thrownValue.then?6:1;workInProgressThrownValue=thrownValue;null===workInProgress&&(workInProgressRootExitStatus=1,logUncaughtError(root,createCapturedValueAtFiber(thrownValue,root.current)));}function shouldRemainOnPreviousScreen(){var handler=suspenseHandlerStackCursor.current;return null===handler?true:(workInProgressRootRenderLanes&4194048)===workInProgressRootRenderLanes?null===shellBoundary?true:false:(workInProgressRootRenderLanes&62914560)===workInProgressRootRenderLanes||0!==(workInProgressRootRenderLanes&536870912)?handler===shellBoundary:false;}function pushDispatcher(){var prevDispatcher=ReactSharedInternals.H;ReactSharedInternals.H=ContextOnlyDispatcher;return null===prevDispatcher?ContextOnlyDispatcher:prevDispatcher;}function pushAsyncDispatcher(){var prevAsyncDispatcher=ReactSharedInternals.A;ReactSharedInternals.A=DefaultAsyncDispatcher;return prevAsyncDispatcher;}function renderDidSuspendDelayIfPossible(){workInProgressRootExitStatus=4;workInProgressRootDidSkipSuspendedSiblings||(workInProgressRootRenderLanes&4194048)!==workInProgressRootRenderLanes&&null!==suspenseHandlerStackCursor.current||(workInProgressRootIsPrerendering=true);0===(workInProgressRootSkippedLanes&134217727)&&0===(workInProgressRootInterleavedUpdatedLanes&134217727)||null===workInProgressRoot||markRootSuspended(workInProgressRoot,workInProgressRootRenderLanes,workInProgressDeferredLane,false);}function renderRootSync(root,lanes,shouldYieldForPrerendering){var prevExecutionContext=executionContext;executionContext|=2;var prevDispatcher=pushDispatcher(),prevAsyncDispatcher=pushAsyncDispatcher();if(workInProgressRoot!==root||workInProgressRootRenderLanes!==lanes)workInProgressTransitions=null,prepareFreshStack(root,lanes);lanes=false;var exitStatus=workInProgressRootExitStatus;a:do try{if(0!==workInProgressSuspendedReason&&null!==workInProgress){var unitOfWork=workInProgress,thrownValue=workInProgressThrownValue;switch(workInProgressSuspendedReason){case 8:resetWorkInProgressStack();exitStatus=6;break a;case 3:case 2:case 9:case 6:null===suspenseHandlerStackCursor.current&&(lanes=!0);var reason=workInProgressSuspendedReason;workInProgressSuspendedReason=0;workInProgressThrownValue=null;throwAndUnwindWorkLoop(root,unitOfWork,thrownValue,reason);if(shouldYieldForPrerendering&&workInProgressRootIsPrerendering){exitStatus=0;break a;}break;default:reason=workInProgressSuspendedReason,workInProgressSuspendedReason=0,workInProgressThrownValue=null,throwAndUnwindWorkLoop(root,unitOfWork,thrownValue,reason);}}workLoopSync();exitStatus=workInProgressRootExitStatus;break;}catch(thrownValue$165){handleThrow(root,thrownValue$165);}while(1);lanes&&root.shellSuspendCounter++;lastContextDependency=currentlyRenderingFiber$1=null;executionContext=prevExecutionContext;ReactSharedInternals.H=prevDispatcher;ReactSharedInternals.A=prevAsyncDispatcher;null===workInProgress&&(workInProgressRoot=null,workInProgressRootRenderLanes=0,finishQueueingConcurrentUpdates());return exitStatus;}function workLoopSync(){for(;null!==workInProgress;)performUnitOfWork(workInProgress);}function renderRootConcurrent(root,lanes){var prevExecutionContext=executionContext;executionContext|=2;var prevDispatcher=pushDispatcher(),prevAsyncDispatcher=pushAsyncDispatcher();workInProgressRoot!==root||workInProgressRootRenderLanes!==lanes?(workInProgressTransitions=null,workInProgressRootRenderTargetTime=now()+500,prepareFreshStack(root,lanes)):workInProgressRootIsPrerendering=checkIfRootIsPrerendering(root,lanes);a:do try{if(0!==workInProgressSuspendedReason&&null!==workInProgress){lanes=workInProgress;var thrownValue=workInProgressThrownValue;b:switch(workInProgressSuspendedReason){case 1:workInProgressSuspendedReason=0;workInProgressThrownValue=null;throwAndUnwindWorkLoop(root,lanes,thrownValue,1);break;case 2:case 9:if(isThenableResolved(thrownValue)){workInProgressSuspendedReason=0;workInProgressThrownValue=null;replaySuspendedUnitOfWork(lanes);break;}lanes=function(){2!==workInProgressSuspendedReason&&9!==workInProgressSuspendedReason||workInProgressRoot!==root||(workInProgressSuspendedReason=7);ensureRootIsScheduled(root);};thrownValue.then(lanes,lanes);break a;case 3:workInProgressSuspendedReason=7;break a;case 4:workInProgressSuspendedReason=5;break a;case 7:isThenableResolved(thrownValue)?(workInProgressSuspendedReason=0,workInProgressThrownValue=null,replaySuspendedUnitOfWork(lanes)):(workInProgressSuspendedReason=0,workInProgressThrownValue=null,throwAndUnwindWorkLoop(root,lanes,thrownValue,7));break;case 5:var resource=null;switch(workInProgress.tag){case 26:resource=workInProgress.memoizedState;case 5:case 27:var hostFiber=workInProgress;if(resource?preloadResource(resource):hostFiber.stateNode.complete){workInProgressSuspendedReason=0;workInProgressThrownValue=null;var sibling=hostFiber.sibling;if(null!==sibling)workInProgress=sibling;else {var returnFiber=hostFiber.return;null!==returnFiber?(workInProgress=returnFiber,completeUnitOfWork(returnFiber)):workInProgress=null;}break b;}}workInProgressSuspendedReason=0;workInProgressThrownValue=null;throwAndUnwindWorkLoop(root,lanes,thrownValue,5);break;case 6:workInProgressSuspendedReason=0;workInProgressThrownValue=null;throwAndUnwindWorkLoop(root,lanes,thrownValue,6);break;case 8:resetWorkInProgressStack();workInProgressRootExitStatus=6;break a;default:throw Error(formatProdErrorMessage(462));}}workLoopConcurrentByScheduler();break;}catch(thrownValue$167){handleThrow(root,thrownValue$167);}while(1);lastContextDependency=currentlyRenderingFiber$1=null;ReactSharedInternals.H=prevDispatcher;ReactSharedInternals.A=prevAsyncDispatcher;executionContext=prevExecutionContext;if(null!==workInProgress)return 0;workInProgressRoot=null;workInProgressRootRenderLanes=0;finishQueueingConcurrentUpdates();return workInProgressRootExitStatus;}function workLoopConcurrentByScheduler(){for(;null!==workInProgress&&!shouldYield();)performUnitOfWork(workInProgress);}function performUnitOfWork(unitOfWork){var next=beginWork(unitOfWork.alternate,unitOfWork,entangledRenderLanes);unitOfWork.memoizedProps=unitOfWork.pendingProps;null===next?completeUnitOfWork(unitOfWork):workInProgress=next;}function replaySuspendedUnitOfWork(unitOfWork){var next=unitOfWork;var current=next.alternate;switch(next.tag){case 15:case 0:next=replayFunctionComponent(current,next,next.pendingProps,next.type,void 0,workInProgressRootRenderLanes);break;case 11:next=replayFunctionComponent(current,next,next.pendingProps,next.type.render,next.ref,workInProgressRootRenderLanes);break;case 5:resetHooksOnUnwind(next);default:unwindInterruptedWork(current,next),next=workInProgress=resetWorkInProgress(next,entangledRenderLanes),next=beginWork(current,next,entangledRenderLanes);}unitOfWork.memoizedProps=unitOfWork.pendingProps;null===next?completeUnitOfWork(unitOfWork):workInProgress=next;}function throwAndUnwindWorkLoop(root,unitOfWork,thrownValue,suspendedReason){lastContextDependency=currentlyRenderingFiber$1=null;resetHooksOnUnwind(unitOfWork);thenableState$1=null;thenableIndexCounter$1=0;var returnFiber=unitOfWork.return;try{if(throwException(root,returnFiber,unitOfWork,thrownValue,workInProgressRootRenderLanes)){workInProgressRootExitStatus=1;logUncaughtError(root,createCapturedValueAtFiber(thrownValue,root.current));workInProgress=null;return;}}catch(error){if(null!==returnFiber)throw workInProgress=returnFiber,error;workInProgressRootExitStatus=1;logUncaughtError(root,createCapturedValueAtFiber(thrownValue,root.current));workInProgress=null;return;}if(unitOfWork.flags&32768){if(isHydrating||1===suspendedReason)root=true;else if(workInProgressRootIsPrerendering||0!==(workInProgressRootRenderLanes&536870912))root=false;else if(workInProgressRootDidSkipSuspendedSiblings=root=true,2===suspendedReason||9===suspendedReason||3===suspendedReason||6===suspendedReason)suspendedReason=suspenseHandlerStackCursor.current,null!==suspendedReason&&13===suspendedReason.tag&&(suspendedReason.flags|=16384);unwindUnitOfWork(unitOfWork,root);}else completeUnitOfWork(unitOfWork);}function completeUnitOfWork(unitOfWork){var completedWork=unitOfWork;do{if(0!==(completedWork.flags&32768)){unwindUnitOfWork(completedWork,workInProgressRootDidSkipSuspendedSiblings);return;}unitOfWork=completedWork.return;var next=completeWork(completedWork.alternate,completedWork,entangledRenderLanes);if(null!==next){workInProgress=next;return;}completedWork=completedWork.sibling;if(null!==completedWork){workInProgress=completedWork;return;}workInProgress=completedWork=unitOfWork;}while(null!==completedWork);0===workInProgressRootExitStatus&&(workInProgressRootExitStatus=5);}function unwindUnitOfWork(unitOfWork,skipSiblings){do{var next=unwindWork(unitOfWork.alternate,unitOfWork);if(null!==next){next.flags&=32767;workInProgress=next;return;}next=unitOfWork.return;null!==next&&(next.flags|=32768,next.subtreeFlags=0,next.deletions=null);if(!skipSiblings&&(unitOfWork=unitOfWork.sibling,null!==unitOfWork)){workInProgress=unitOfWork;return;}workInProgress=unitOfWork=next;}while(null!==unitOfWork);workInProgressRootExitStatus=6;workInProgress=null;}function commitRoot(root,finishedWork,lanes,recoverableErrors,transitions,didIncludeRenderPhaseUpdate,spawnedLane,updatedLanes,suspendedRetryLanes){root.cancelPendingCommit=null;do flushPendingEffects();while(0!==pendingEffectsStatus);if(0!==(executionContext&6))throw Error(formatProdErrorMessage(327));if(null!==finishedWork){if(finishedWork===root.current)throw Error(formatProdErrorMessage(177));didIncludeRenderPhaseUpdate=finishedWork.lanes|finishedWork.childLanes;didIncludeRenderPhaseUpdate|=concurrentlyUpdatedLanes;markRootFinished(root,lanes,didIncludeRenderPhaseUpdate,spawnedLane,updatedLanes,suspendedRetryLanes);root===workInProgressRoot&&(workInProgress=workInProgressRoot=null,workInProgressRootRenderLanes=0);pendingFinishedWork=finishedWork;pendingEffectsRoot=root;pendingEffectsLanes=lanes;pendingEffectsRemainingLanes=didIncludeRenderPhaseUpdate;pendingPassiveTransitions=transitions;pendingRecoverableErrors=recoverableErrors;0!==(finishedWork.subtreeFlags&10256)||0!==(finishedWork.flags&10256)?(root.callbackNode=null,root.callbackPriority=0,scheduleCallback$1(NormalPriority$1,function(){flushPassiveEffects();return null;})):(root.callbackNode=null,root.callbackPriority=0);recoverableErrors=0!==(finishedWork.flags&13878);if(0!==(finishedWork.subtreeFlags&13878)||recoverableErrors){recoverableErrors=ReactSharedInternals.T;ReactSharedInternals.T=null;transitions=ReactDOMSharedInternals.p;ReactDOMSharedInternals.p=2;spawnedLane=executionContext;executionContext|=4;try{commitBeforeMutationEffects(root,finishedWork,lanes);}finally{executionContext=spawnedLane,ReactDOMSharedInternals.p=transitions,ReactSharedInternals.T=recoverableErrors;}}pendingEffectsStatus=1;flushMutationEffects();flushLayoutEffects();flushSpawnedWork();}}function flushMutationEffects(){if(1===pendingEffectsStatus){pendingEffectsStatus=0;var root=pendingEffectsRoot,finishedWork=pendingFinishedWork,rootMutationHasEffect=0!==(finishedWork.flags&13878);if(0!==(finishedWork.subtreeFlags&13878)||rootMutationHasEffect){rootMutationHasEffect=ReactSharedInternals.T;ReactSharedInternals.T=null;var previousPriority=ReactDOMSharedInternals.p;ReactDOMSharedInternals.p=2;var prevExecutionContext=executionContext;executionContext|=4;try{commitMutationEffectsOnFiber(finishedWork,root);var priorSelectionInformation=selectionInformation,curFocusedElem=getActiveElementDeep(root.containerInfo),priorFocusedElem=priorSelectionInformation.focusedElem,priorSelectionRange=priorSelectionInformation.selectionRange;if(curFocusedElem!==priorFocusedElem&&priorFocusedElem&&priorFocusedElem.ownerDocument&&containsNode(priorFocusedElem.ownerDocument.documentElement,priorFocusedElem)){if(null!==priorSelectionRange&&hasSelectionCapabilities(priorFocusedElem)){var start=priorSelectionRange.start,end=priorSelectionRange.end;void 0===end&&(end=start);if("selectionStart"in priorFocusedElem)priorFocusedElem.selectionStart=start,priorFocusedElem.selectionEnd=Math.min(end,priorFocusedElem.value.length);else {var doc=priorFocusedElem.ownerDocument||document,win=doc&&doc.defaultView||window;if(win.getSelection){var selection=win.getSelection(),length=priorFocusedElem.textContent.length,start$jscomp$0=Math.min(priorSelectionRange.start,length),end$jscomp$0=void 0===priorSelectionRange.end?start$jscomp$0:Math.min(priorSelectionRange.end,length);!selection.extend&&start$jscomp$0>end$jscomp$0&&(curFocusedElem=end$jscomp$0,end$jscomp$0=start$jscomp$0,start$jscomp$0=curFocusedElem);var startMarker=getNodeForCharacterOffset(priorFocusedElem,start$jscomp$0),endMarker=getNodeForCharacterOffset(priorFocusedElem,end$jscomp$0);if(startMarker&&endMarker&&(1!==selection.rangeCount||selection.anchorNode!==startMarker.node||selection.anchorOffset!==startMarker.offset||selection.focusNode!==endMarker.node||selection.focusOffset!==endMarker.offset)){var range=doc.createRange();range.setStart(startMarker.node,startMarker.offset);selection.removeAllRanges();start$jscomp$0>end$jscomp$0?(selection.addRange(range),selection.extend(endMarker.node,endMarker.offset)):(range.setEnd(endMarker.node,endMarker.offset),selection.addRange(range));}}}}doc=[];for(selection=priorFocusedElem;selection=selection.parentNode;)1===selection.nodeType&&doc.push({element:selection,left:selection.scrollLeft,top:selection.scrollTop});"function"===typeof priorFocusedElem.focus&&priorFocusedElem.focus();for(priorFocusedElem=0;priorFocusedElem<doc.length;priorFocusedElem++){var info=doc[priorFocusedElem];info.element.scrollLeft=info.left;info.element.scrollTop=info.top;}}_enabled=!!eventsEnabled;selectionInformation=eventsEnabled=null;}finally{executionContext=prevExecutionContext,ReactDOMSharedInternals.p=previousPriority,ReactSharedInternals.T=rootMutationHasEffect;}}root.current=finishedWork;pendingEffectsStatus=2;}}function flushLayoutEffects(){if(2===pendingEffectsStatus){pendingEffectsStatus=0;var root=pendingEffectsRoot,finishedWork=pendingFinishedWork,rootHasLayoutEffect=0!==(finishedWork.flags&8772);if(0!==(finishedWork.subtreeFlags&8772)||rootHasLayoutEffect){rootHasLayoutEffect=ReactSharedInternals.T;ReactSharedInternals.T=null;var previousPriority=ReactDOMSharedInternals.p;ReactDOMSharedInternals.p=2;var prevExecutionContext=executionContext;executionContext|=4;try{commitLayoutEffectOnFiber(root,finishedWork.alternate,finishedWork);}finally{executionContext=prevExecutionContext,ReactDOMSharedInternals.p=previousPriority,ReactSharedInternals.T=rootHasLayoutEffect;}}pendingEffectsStatus=3;}}function flushSpawnedWork(){if(4===pendingEffectsStatus||3===pendingEffectsStatus){pendingEffectsStatus=0;requestPaint();var root=pendingEffectsRoot,finishedWork=pendingFinishedWork,lanes=pendingEffectsLanes,recoverableErrors=pendingRecoverableErrors;0!==(finishedWork.subtreeFlags&10256)||0!==(finishedWork.flags&10256)?pendingEffectsStatus=5:(pendingEffectsStatus=0,pendingFinishedWork=pendingEffectsRoot=null,releaseRootPooledCache(root,root.pendingLanes));var remainingLanes=root.pendingLanes;0===remainingLanes&&(legacyErrorBoundariesThatAlreadyFailed=null);lanesToEventPriority(lanes);finishedWork=finishedWork.stateNode;if(injectedHook&&"function"===typeof injectedHook.onCommitFiberRoot)try{injectedHook.onCommitFiberRoot(rendererID,finishedWork,void 0,128===(finishedWork.current.flags&128));}catch(err){}if(null!==recoverableErrors){finishedWork=ReactSharedInternals.T;remainingLanes=ReactDOMSharedInternals.p;ReactDOMSharedInternals.p=2;ReactSharedInternals.T=null;try{for(var onRecoverableError=root.onRecoverableError,i=0;i<recoverableErrors.length;i++){var recoverableError=recoverableErrors[i];onRecoverableError(recoverableError.value,{componentStack:recoverableError.stack});}}finally{ReactSharedInternals.T=finishedWork,ReactDOMSharedInternals.p=remainingLanes;}}0!==(pendingEffectsLanes&3)&&flushPendingEffects();ensureRootIsScheduled(root);remainingLanes=root.pendingLanes;0!==(lanes&261930)&&0!==(remainingLanes&42)?root===rootWithNestedUpdates?nestedUpdateCount++:(nestedUpdateCount=0,rootWithNestedUpdates=root):nestedUpdateCount=0;flushSyncWorkAcrossRoots_impl(0);}}function releaseRootPooledCache(root,remainingLanes){0===(root.pooledCacheLanes&=remainingLanes)&&(remainingLanes=root.pooledCache,null!=remainingLanes&&(root.pooledCache=null,releaseCache(remainingLanes)));}function flushPendingEffects(){flushMutationEffects();flushLayoutEffects();flushSpawnedWork();return flushPassiveEffects();}function flushPassiveEffects(){if(5!==pendingEffectsStatus)return  false;var root=pendingEffectsRoot,remainingLanes=pendingEffectsRemainingLanes;pendingEffectsRemainingLanes=0;var renderPriority=lanesToEventPriority(pendingEffectsLanes),prevTransition=ReactSharedInternals.T,previousPriority=ReactDOMSharedInternals.p;try{ReactDOMSharedInternals.p=32>renderPriority?32:renderPriority;ReactSharedInternals.T=null;renderPriority=pendingPassiveTransitions;pendingPassiveTransitions=null;var root$jscomp$0=pendingEffectsRoot,lanes=pendingEffectsLanes;pendingEffectsStatus=0;pendingFinishedWork=pendingEffectsRoot=null;pendingEffectsLanes=0;if(0!==(executionContext&6))throw Error(formatProdErrorMessage(331));var prevExecutionContext=executionContext;executionContext|=4;commitPassiveUnmountOnFiber(root$jscomp$0.current);commitPassiveMountOnFiber(root$jscomp$0,root$jscomp$0.current,lanes,renderPriority);executionContext=prevExecutionContext;flushSyncWorkAcrossRoots_impl(0,!1);if(injectedHook&&"function"===typeof injectedHook.onPostCommitFiberRoot)try{injectedHook.onPostCommitFiberRoot(rendererID,root$jscomp$0);}catch(err){}return !0;}finally{ReactDOMSharedInternals.p=previousPriority,ReactSharedInternals.T=prevTransition,releaseRootPooledCache(root,remainingLanes);}}function captureCommitPhaseErrorOnRoot(rootFiber,sourceFiber,error){sourceFiber=createCapturedValueAtFiber(error,sourceFiber);sourceFiber=createRootErrorUpdate(rootFiber.stateNode,sourceFiber,2);rootFiber=enqueueUpdate(rootFiber,sourceFiber,2);null!==rootFiber&&(markRootUpdated$1(rootFiber,2),ensureRootIsScheduled(rootFiber));}function captureCommitPhaseError(sourceFiber,nearestMountedAncestor,error){if(3===sourceFiber.tag)captureCommitPhaseErrorOnRoot(sourceFiber,sourceFiber,error);else for(;null!==nearestMountedAncestor;){if(3===nearestMountedAncestor.tag){captureCommitPhaseErrorOnRoot(nearestMountedAncestor,sourceFiber,error);break;}else if(1===nearestMountedAncestor.tag){var instance=nearestMountedAncestor.stateNode;if("function"===typeof nearestMountedAncestor.type.getDerivedStateFromError||"function"===typeof instance.componentDidCatch&&(null===legacyErrorBoundariesThatAlreadyFailed||!legacyErrorBoundariesThatAlreadyFailed.has(instance))){sourceFiber=createCapturedValueAtFiber(error,sourceFiber);error=createClassErrorUpdate(2);instance=enqueueUpdate(nearestMountedAncestor,error,2);null!==instance&&(initializeClassErrorUpdate(error,instance,nearestMountedAncestor,sourceFiber),markRootUpdated$1(instance,2),ensureRootIsScheduled(instance));break;}}nearestMountedAncestor=nearestMountedAncestor.return;}}function attachPingListener(root,wakeable,lanes){var pingCache=root.pingCache;if(null===pingCache){pingCache=root.pingCache=new PossiblyWeakMap();var threadIDs=new Set();pingCache.set(wakeable,threadIDs);}else threadIDs=pingCache.get(wakeable),void 0===threadIDs&&(threadIDs=new Set(),pingCache.set(wakeable,threadIDs));threadIDs.has(lanes)||(workInProgressRootDidAttachPingListener=true,threadIDs.add(lanes),root=pingSuspendedRoot.bind(null,root,wakeable,lanes),wakeable.then(root,root));}function pingSuspendedRoot(root,wakeable,pingedLanes){var pingCache=root.pingCache;null!==pingCache&&pingCache.delete(wakeable);root.pingedLanes|=root.suspendedLanes&pingedLanes;root.warmLanes&=~pingedLanes;workInProgressRoot===root&&(workInProgressRootRenderLanes&pingedLanes)===pingedLanes&&(4===workInProgressRootExitStatus||3===workInProgressRootExitStatus&&(workInProgressRootRenderLanes&62914560)===workInProgressRootRenderLanes&&300>now()-globalMostRecentFallbackTime?0===(executionContext&2)&&prepareFreshStack(root,0):workInProgressRootPingedLanes|=pingedLanes,workInProgressSuspendedRetryLanes===workInProgressRootRenderLanes&&(workInProgressSuspendedRetryLanes=0));ensureRootIsScheduled(root);}function retryTimedOutBoundary(boundaryFiber,retryLane){0===retryLane&&(retryLane=claimNextRetryLane());boundaryFiber=enqueueConcurrentRenderForLane(boundaryFiber,retryLane);null!==boundaryFiber&&(markRootUpdated$1(boundaryFiber,retryLane),ensureRootIsScheduled(boundaryFiber));}function retryDehydratedSuspenseBoundary(boundaryFiber){var suspenseState=boundaryFiber.memoizedState,retryLane=0;null!==suspenseState&&(retryLane=suspenseState.retryLane);retryTimedOutBoundary(boundaryFiber,retryLane);}function resolveRetryWakeable(boundaryFiber,wakeable){var retryLane=0;switch(boundaryFiber.tag){case 31:case 13:var retryCache=boundaryFiber.stateNode;var suspenseState=boundaryFiber.memoizedState;null!==suspenseState&&(retryLane=suspenseState.retryLane);break;case 19:retryCache=boundaryFiber.stateNode;break;case 22:retryCache=boundaryFiber.stateNode._retryCache;break;default:throw Error(formatProdErrorMessage(314));}null!==retryCache&&retryCache.delete(wakeable);retryTimedOutBoundary(boundaryFiber,retryLane);}function scheduleCallback$1(priorityLevel,callback){return scheduleCallback$3(priorityLevel,callback);}var firstScheduledRoot=null,lastScheduledRoot=null,didScheduleMicrotask=false,mightHavePendingSyncWork=false,isFlushingWork=false,currentEventTransitionLane=0;function ensureRootIsScheduled(root){root!==lastScheduledRoot&&null===root.next&&(null===lastScheduledRoot?firstScheduledRoot=lastScheduledRoot=root:lastScheduledRoot=lastScheduledRoot.next=root);mightHavePendingSyncWork=true;didScheduleMicrotask||(didScheduleMicrotask=true,scheduleImmediateRootScheduleTask());}function flushSyncWorkAcrossRoots_impl(syncTransitionLanes,onlyLegacy){if(!isFlushingWork&&mightHavePendingSyncWork){isFlushingWork=true;do{var didPerformSomeWork=false;for(var root$170=firstScheduledRoot;null!==root$170;){if(0!==syncTransitionLanes){var pendingLanes=root$170.pendingLanes;if(0===pendingLanes)var JSCompiler_inline_result=0;else {var suspendedLanes=root$170.suspendedLanes,pingedLanes=root$170.pingedLanes;JSCompiler_inline_result=(1<<31-clz32(42|syncTransitionLanes)+1)-1;JSCompiler_inline_result&=pendingLanes&~(suspendedLanes&~pingedLanes);JSCompiler_inline_result=JSCompiler_inline_result&201326741?JSCompiler_inline_result&201326741|1:JSCompiler_inline_result?JSCompiler_inline_result|2:0;}0!==JSCompiler_inline_result&&(didPerformSomeWork=true,performSyncWorkOnRoot(root$170,JSCompiler_inline_result));}else JSCompiler_inline_result=workInProgressRootRenderLanes,JSCompiler_inline_result=getNextLanes(root$170,root$170===workInProgressRoot?JSCompiler_inline_result:0,null!==root$170.cancelPendingCommit||-1!==root$170.timeoutHandle),0===(JSCompiler_inline_result&3)||checkIfRootIsPrerendering(root$170,JSCompiler_inline_result)||(didPerformSomeWork=true,performSyncWorkOnRoot(root$170,JSCompiler_inline_result));root$170=root$170.next;}}while(didPerformSomeWork);isFlushingWork=false;}}function processRootScheduleInImmediateTask(){processRootScheduleInMicrotask();}function processRootScheduleInMicrotask(){mightHavePendingSyncWork=didScheduleMicrotask=false;var syncTransitionLanes=0;0!==currentEventTransitionLane&&shouldAttemptEagerTransition()&&(syncTransitionLanes=currentEventTransitionLane);for(var currentTime=now(),prev=null,root=firstScheduledRoot;null!==root;){var next=root.next,nextLanes=scheduleTaskForRootDuringMicrotask(root,currentTime);if(0===nextLanes)root.next=null,null===prev?firstScheduledRoot=next:prev.next=next,null===next&&(lastScheduledRoot=prev);else if(prev=root,0!==syncTransitionLanes||0!==(nextLanes&3))mightHavePendingSyncWork=true;root=next;}0!==pendingEffectsStatus&&5!==pendingEffectsStatus||flushSyncWorkAcrossRoots_impl(syncTransitionLanes);0!==currentEventTransitionLane&&(currentEventTransitionLane=0);}function scheduleTaskForRootDuringMicrotask(root,currentTime){for(var suspendedLanes=root.suspendedLanes,pingedLanes=root.pingedLanes,expirationTimes=root.expirationTimes,lanes=root.pendingLanes&-62914561;0<lanes;){var index$5=31-clz32(lanes),lane=1<<index$5,expirationTime=expirationTimes[index$5];if(-1===expirationTime){if(0===(lane&suspendedLanes)||0!==(lane&pingedLanes))expirationTimes[index$5]=computeExpirationTime(lane,currentTime);}else expirationTime<=currentTime&&(root.expiredLanes|=lane);lanes&=~lane;}currentTime=workInProgressRoot;suspendedLanes=workInProgressRootRenderLanes;suspendedLanes=getNextLanes(root,root===currentTime?suspendedLanes:0,null!==root.cancelPendingCommit||-1!==root.timeoutHandle);pingedLanes=root.callbackNode;if(0===suspendedLanes||root===currentTime&&(2===workInProgressSuspendedReason||9===workInProgressSuspendedReason)||null!==root.cancelPendingCommit)return null!==pingedLanes&&null!==pingedLanes&&cancelCallback$1(pingedLanes),root.callbackNode=null,root.callbackPriority=0;if(0===(suspendedLanes&3)||checkIfRootIsPrerendering(root,suspendedLanes)){currentTime=suspendedLanes&-suspendedLanes;if(currentTime===root.callbackPriority)return currentTime;null!==pingedLanes&&cancelCallback$1(pingedLanes);switch(lanesToEventPriority(suspendedLanes)){case 2:case 8:suspendedLanes=UserBlockingPriority;break;case 32:suspendedLanes=NormalPriority$1;break;case 268435456:suspendedLanes=IdlePriority;break;default:suspendedLanes=NormalPriority$1;}pingedLanes=performWorkOnRootViaSchedulerTask.bind(null,root);suspendedLanes=scheduleCallback$3(suspendedLanes,pingedLanes);root.callbackPriority=currentTime;root.callbackNode=suspendedLanes;return currentTime;}null!==pingedLanes&&null!==pingedLanes&&cancelCallback$1(pingedLanes);root.callbackPriority=2;root.callbackNode=null;return 2;}function performWorkOnRootViaSchedulerTask(root,didTimeout){if(0!==pendingEffectsStatus&&5!==pendingEffectsStatus)return root.callbackNode=null,root.callbackPriority=0,null;var originalCallbackNode=root.callbackNode;if(flushPendingEffects()&&root.callbackNode!==originalCallbackNode)return null;var workInProgressRootRenderLanes$jscomp$0=workInProgressRootRenderLanes;workInProgressRootRenderLanes$jscomp$0=getNextLanes(root,root===workInProgressRoot?workInProgressRootRenderLanes$jscomp$0:0,null!==root.cancelPendingCommit||-1!==root.timeoutHandle);if(0===workInProgressRootRenderLanes$jscomp$0)return null;performWorkOnRoot(root,workInProgressRootRenderLanes$jscomp$0,didTimeout);scheduleTaskForRootDuringMicrotask(root,now());return null!=root.callbackNode&&root.callbackNode===originalCallbackNode?performWorkOnRootViaSchedulerTask.bind(null,root):null;}function performSyncWorkOnRoot(root,lanes){if(flushPendingEffects())return null;performWorkOnRoot(root,lanes,true);}function scheduleImmediateRootScheduleTask(){scheduleMicrotask(function(){0!==(executionContext&6)?scheduleCallback$3(ImmediatePriority,processRootScheduleInImmediateTask):processRootScheduleInMicrotask();});}function requestTransitionLane(){if(0===currentEventTransitionLane){var actionScopeLane=currentEntangledLane;0===actionScopeLane&&(actionScopeLane=nextTransitionUpdateLane,nextTransitionUpdateLane<<=1,0===(nextTransitionUpdateLane&261888)&&(nextTransitionUpdateLane=256));currentEventTransitionLane=actionScopeLane;}return currentEventTransitionLane;}function coerceFormActionProp(actionProp){return null==actionProp||"symbol"===typeof actionProp||"boolean"===typeof actionProp?null:"function"===typeof actionProp?actionProp:sanitizeURL(""+actionProp);}function createFormDataWithSubmitter(form,submitter){var temp=submitter.ownerDocument.createElement("input");temp.name=submitter.name;temp.value=submitter.value;form.id&&temp.setAttribute("form",form.id);submitter.parentNode.insertBefore(temp,submitter);form=new FormData(form);temp.parentNode.removeChild(temp);return form;}function extractEvents$1(dispatchQueue,domEventName,maybeTargetInst,nativeEvent,nativeEventTarget){if("submit"===domEventName&&maybeTargetInst&&maybeTargetInst.stateNode===nativeEventTarget){var action=coerceFormActionProp((nativeEventTarget[internalPropsKey]||null).action),submitter=nativeEvent.submitter;submitter&&(domEventName=(domEventName=submitter[internalPropsKey]||null)?coerceFormActionProp(domEventName.formAction):submitter.getAttribute("formAction"),null!==domEventName&&(action=domEventName,submitter=null));var event=new SyntheticEvent("action","action",null,nativeEvent,nativeEventTarget);dispatchQueue.push({event:event,listeners:[{instance:null,listener:function(){if(nativeEvent.defaultPrevented){if(0!==currentEventTransitionLane){var formData=submitter?createFormDataWithSubmitter(nativeEventTarget,submitter):new FormData(nativeEventTarget);startHostTransition(maybeTargetInst,{pending:true,data:formData,method:nativeEventTarget.method,action:action},null,formData);}}else "function"===typeof action&&(event.preventDefault(),formData=submitter?createFormDataWithSubmitter(nativeEventTarget,submitter):new FormData(nativeEventTarget),startHostTransition(maybeTargetInst,{pending:true,data:formData,method:nativeEventTarget.method,action:action},action,formData));},currentTarget:nativeEventTarget}]});}}for(var i$jscomp$inline_1577=0;i$jscomp$inline_1577<simpleEventPluginEvents.length;i$jscomp$inline_1577++){var eventName$jscomp$inline_1578=simpleEventPluginEvents[i$jscomp$inline_1577],domEventName$jscomp$inline_1579=eventName$jscomp$inline_1578.toLowerCase(),capitalizedEvent$jscomp$inline_1580=eventName$jscomp$inline_1578[0].toUpperCase()+eventName$jscomp$inline_1578.slice(1);registerSimpleEvent(domEventName$jscomp$inline_1579,"on"+capitalizedEvent$jscomp$inline_1580);}registerSimpleEvent(ANIMATION_END,"onAnimationEnd");registerSimpleEvent(ANIMATION_ITERATION,"onAnimationIteration");registerSimpleEvent(ANIMATION_START,"onAnimationStart");registerSimpleEvent("dblclick","onDoubleClick");registerSimpleEvent("focusin","onFocus");registerSimpleEvent("focusout","onBlur");registerSimpleEvent(TRANSITION_RUN,"onTransitionRun");registerSimpleEvent(TRANSITION_START,"onTransitionStart");registerSimpleEvent(TRANSITION_CANCEL,"onTransitionCancel");registerSimpleEvent(TRANSITION_END,"onTransitionEnd");registerDirectEvent("onMouseEnter",["mouseout","mouseover"]);registerDirectEvent("onMouseLeave",["mouseout","mouseover"]);registerDirectEvent("onPointerEnter",["pointerout","pointerover"]);registerDirectEvent("onPointerLeave",["pointerout","pointerover"]);registerTwoPhaseEvent("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));registerTwoPhaseEvent("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));registerTwoPhaseEvent("onBeforeInput",["compositionend","keypress","textInput","paste"]);registerTwoPhaseEvent("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));registerTwoPhaseEvent("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));registerTwoPhaseEvent("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mediaEventTypes="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),nonDelegatedEvents=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(mediaEventTypes));function processDispatchQueue(dispatchQueue,eventSystemFlags){eventSystemFlags=0!==(eventSystemFlags&4);for(var i=0;i<dispatchQueue.length;i++){var _dispatchQueue$i=dispatchQueue[i],event=_dispatchQueue$i.event;_dispatchQueue$i=_dispatchQueue$i.listeners;a:{var previousInstance=void 0;if(eventSystemFlags)for(var i$jscomp$0=_dispatchQueue$i.length-1;0<=i$jscomp$0;i$jscomp$0--){var _dispatchListeners$i=_dispatchQueue$i[i$jscomp$0],instance=_dispatchListeners$i.instance,currentTarget=_dispatchListeners$i.currentTarget;_dispatchListeners$i=_dispatchListeners$i.listener;if(instance!==previousInstance&&event.isPropagationStopped())break a;previousInstance=_dispatchListeners$i;event.currentTarget=currentTarget;try{previousInstance(event);}catch(error){reportGlobalError(error);}event.currentTarget=null;previousInstance=instance;}else for(i$jscomp$0=0;i$jscomp$0<_dispatchQueue$i.length;i$jscomp$0++){_dispatchListeners$i=_dispatchQueue$i[i$jscomp$0];instance=_dispatchListeners$i.instance;currentTarget=_dispatchListeners$i.currentTarget;_dispatchListeners$i=_dispatchListeners$i.listener;if(instance!==previousInstance&&event.isPropagationStopped())break a;previousInstance=_dispatchListeners$i;event.currentTarget=currentTarget;try{previousInstance(event);}catch(error){reportGlobalError(error);}event.currentTarget=null;previousInstance=instance;}}}}function listenToNonDelegatedEvent(domEventName,targetElement){var JSCompiler_inline_result=targetElement[internalEventHandlersKey];void 0===JSCompiler_inline_result&&(JSCompiler_inline_result=targetElement[internalEventHandlersKey]=new Set());var listenerSetKey=domEventName+"__bubble";JSCompiler_inline_result.has(listenerSetKey)||(addTrappedEventListener(targetElement,domEventName,2,false),JSCompiler_inline_result.add(listenerSetKey));}function listenToNativeEvent(domEventName,isCapturePhaseListener,target){var eventSystemFlags=0;isCapturePhaseListener&&(eventSystemFlags|=4);addTrappedEventListener(target,domEventName,eventSystemFlags,isCapturePhaseListener);}var listeningMarker="_reactListening"+Math.random().toString(36).slice(2);function listenToAllSupportedEvents(rootContainerElement){if(!rootContainerElement[listeningMarker]){rootContainerElement[listeningMarker]=true;allNativeEvents.forEach(function(domEventName){"selectionchange"!==domEventName&&(nonDelegatedEvents.has(domEventName)||listenToNativeEvent(domEventName,false,rootContainerElement),listenToNativeEvent(domEventName,true,rootContainerElement));});var ownerDocument=9===rootContainerElement.nodeType?rootContainerElement:rootContainerElement.ownerDocument;null===ownerDocument||ownerDocument[listeningMarker]||(ownerDocument[listeningMarker]=true,listenToNativeEvent("selectionchange",false,ownerDocument));}}function addTrappedEventListener(targetContainer,domEventName,eventSystemFlags,isCapturePhaseListener){switch(getEventPriority(domEventName)){case 2:var listenerWrapper=dispatchDiscreteEvent;break;case 8:listenerWrapper=dispatchContinuousEvent;break;default:listenerWrapper=dispatchEvent;}eventSystemFlags=listenerWrapper.bind(null,domEventName,eventSystemFlags,targetContainer);listenerWrapper=void 0;!passiveBrowserEventsSupported||"touchstart"!==domEventName&&"touchmove"!==domEventName&&"wheel"!==domEventName||(listenerWrapper=true);isCapturePhaseListener?void 0!==listenerWrapper?targetContainer.addEventListener(domEventName,eventSystemFlags,{capture:true,passive:listenerWrapper}):targetContainer.addEventListener(domEventName,eventSystemFlags,true):void 0!==listenerWrapper?targetContainer.addEventListener(domEventName,eventSystemFlags,{passive:listenerWrapper}):targetContainer.addEventListener(domEventName,eventSystemFlags,false);}function dispatchEventForPluginEventSystem(domEventName,eventSystemFlags,nativeEvent,targetInst$jscomp$0,targetContainer){var ancestorInst=targetInst$jscomp$0;if(0===(eventSystemFlags&1)&&0===(eventSystemFlags&2)&&null!==targetInst$jscomp$0)a:for(;;){if(null===targetInst$jscomp$0)return;var nodeTag=targetInst$jscomp$0.tag;if(3===nodeTag||4===nodeTag){var container=targetInst$jscomp$0.stateNode.containerInfo;if(container===targetContainer)break;if(4===nodeTag)for(nodeTag=targetInst$jscomp$0.return;null!==nodeTag;){var grandTag=nodeTag.tag;if((3===grandTag||4===grandTag)&&nodeTag.stateNode.containerInfo===targetContainer)return;nodeTag=nodeTag.return;}for(;null!==container;){nodeTag=getClosestInstanceFromNode(container);if(null===nodeTag)return;grandTag=nodeTag.tag;if(5===grandTag||6===grandTag||26===grandTag||27===grandTag){targetInst$jscomp$0=ancestorInst=nodeTag;continue a;}container=container.parentNode;}}targetInst$jscomp$0=targetInst$jscomp$0.return;}batchedUpdates$1(function(){var targetInst=ancestorInst,nativeEventTarget=getEventTarget$1(nativeEvent),dispatchQueue=[];a:{var reactName=topLevelEventsToReactNames.get(domEventName);if(void 0!==reactName){var SyntheticEventCtor=SyntheticEvent,reactEventType=domEventName;switch(domEventName){case "keypress":if(0===getEventCharCode(nativeEvent))break a;case "keydown":case "keyup":SyntheticEventCtor=SyntheticKeyboardEvent;break;case "focusin":reactEventType="focus";SyntheticEventCtor=SyntheticFocusEvent;break;case "focusout":reactEventType="blur";SyntheticEventCtor=SyntheticFocusEvent;break;case "beforeblur":case "afterblur":SyntheticEventCtor=SyntheticFocusEvent;break;case "click":if(2===nativeEvent.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":SyntheticEventCtor=SyntheticMouseEvent;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":SyntheticEventCtor=SyntheticDragEvent;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":SyntheticEventCtor=SyntheticTouchEvent;break;case ANIMATION_END:case ANIMATION_ITERATION:case ANIMATION_START:SyntheticEventCtor=SyntheticAnimationEvent;break;case TRANSITION_END:SyntheticEventCtor=SyntheticTransitionEvent;break;case "scroll":case "scrollend":SyntheticEventCtor=SyntheticUIEvent;break;case "wheel":SyntheticEventCtor=SyntheticWheelEvent;break;case "copy":case "cut":case "paste":SyntheticEventCtor=SyntheticClipboardEvent;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":SyntheticEventCtor=SyntheticPointerEvent;break;case "toggle":case "beforetoggle":SyntheticEventCtor=SyntheticToggleEvent;}var inCapturePhase=0!==(eventSystemFlags&4),accumulateTargetOnly=!inCapturePhase&&("scroll"===domEventName||"scrollend"===domEventName),reactEventName=inCapturePhase?null!==reactName?reactName+"Capture":null:reactName;inCapturePhase=[];for(var instance=targetInst,lastHostComponent;null!==instance;){var _instance=instance;lastHostComponent=_instance.stateNode;_instance=_instance.tag;5!==_instance&&26!==_instance&&27!==_instance||null===lastHostComponent||null===reactEventName||(_instance=getListener(instance,reactEventName),null!=_instance&&inCapturePhase.push(createDispatchListener(instance,_instance,lastHostComponent)));if(accumulateTargetOnly)break;instance=instance.return;}0<inCapturePhase.length&&(reactName=new SyntheticEventCtor(reactName,reactEventType,null,nativeEvent,nativeEventTarget),dispatchQueue.push({event:reactName,listeners:inCapturePhase}));}}if(0===(eventSystemFlags&7)){a:{reactName="mouseover"===domEventName||"pointerover"===domEventName;SyntheticEventCtor="mouseout"===domEventName||"pointerout"===domEventName;if(reactName&&nativeEvent!==currentReplayingEvent&&(reactEventType=nativeEvent.relatedTarget||nativeEvent.fromElement)&&(getClosestInstanceFromNode(reactEventType)||reactEventType[internalContainerInstanceKey]))break a;if(SyntheticEventCtor||reactName){reactName=nativeEventTarget.window===nativeEventTarget?nativeEventTarget:(reactName=nativeEventTarget.ownerDocument)?reactName.defaultView||reactName.parentWindow:window;if(SyntheticEventCtor){if(reactEventType=nativeEvent.relatedTarget||nativeEvent.toElement,SyntheticEventCtor=targetInst,reactEventType=reactEventType?getClosestInstanceFromNode(reactEventType):null,null!==reactEventType&&(accumulateTargetOnly=getNearestMountedFiber(reactEventType),inCapturePhase=reactEventType.tag,reactEventType!==accumulateTargetOnly||5!==inCapturePhase&&27!==inCapturePhase&&6!==inCapturePhase))reactEventType=null;}else SyntheticEventCtor=null,reactEventType=targetInst;if(SyntheticEventCtor!==reactEventType){inCapturePhase=SyntheticMouseEvent;_instance="onMouseLeave";reactEventName="onMouseEnter";instance="mouse";if("pointerout"===domEventName||"pointerover"===domEventName)inCapturePhase=SyntheticPointerEvent,_instance="onPointerLeave",reactEventName="onPointerEnter",instance="pointer";accumulateTargetOnly=null==SyntheticEventCtor?reactName:getNodeFromInstance(SyntheticEventCtor);lastHostComponent=null==reactEventType?reactName:getNodeFromInstance(reactEventType);reactName=new inCapturePhase(_instance,instance+"leave",SyntheticEventCtor,nativeEvent,nativeEventTarget);reactName.target=accumulateTargetOnly;reactName.relatedTarget=lastHostComponent;_instance=null;getClosestInstanceFromNode(nativeEventTarget)===targetInst&&(inCapturePhase=new inCapturePhase(reactEventName,instance+"enter",reactEventType,nativeEvent,nativeEventTarget),inCapturePhase.target=lastHostComponent,inCapturePhase.relatedTarget=accumulateTargetOnly,_instance=inCapturePhase);accumulateTargetOnly=_instance;if(SyntheticEventCtor&&reactEventType)b:{inCapturePhase=getParent;reactEventName=SyntheticEventCtor;instance=reactEventType;lastHostComponent=0;for(_instance=reactEventName;_instance;_instance=inCapturePhase(_instance))lastHostComponent++;_instance=0;for(var tempB=instance;tempB;tempB=inCapturePhase(tempB))_instance++;for(;0<lastHostComponent-_instance;)reactEventName=inCapturePhase(reactEventName),lastHostComponent--;for(;0<_instance-lastHostComponent;)instance=inCapturePhase(instance),_instance--;for(;lastHostComponent--;){if(reactEventName===instance||null!==instance&&reactEventName===instance.alternate){inCapturePhase=reactEventName;break b;}reactEventName=inCapturePhase(reactEventName);instance=inCapturePhase(instance);}inCapturePhase=null;}else inCapturePhase=null;null!==SyntheticEventCtor&&accumulateEnterLeaveListenersForEvent(dispatchQueue,reactName,SyntheticEventCtor,inCapturePhase,!1);null!==reactEventType&&null!==accumulateTargetOnly&&accumulateEnterLeaveListenersForEvent(dispatchQueue,accumulateTargetOnly,reactEventType,inCapturePhase,!0);}}}a:{reactName=targetInst?getNodeFromInstance(targetInst):window;SyntheticEventCtor=reactName.nodeName&&reactName.nodeName.toLowerCase();if("select"===SyntheticEventCtor||"input"===SyntheticEventCtor&&"file"===reactName.type)var getTargetInstFunc=getTargetInstForChangeEvent;else if(isTextInputElement(reactName)){if(isInputEventSupported)getTargetInstFunc=getTargetInstForInputOrChangeEvent;else {getTargetInstFunc=getTargetInstForInputEventPolyfill;var handleEventFunc=handleEventsForInputEventPolyfill;}}else SyntheticEventCtor=reactName.nodeName,!SyntheticEventCtor||"input"!==SyntheticEventCtor.toLowerCase()||"checkbox"!==reactName.type&&"radio"!==reactName.type?targetInst&&isCustomElement(targetInst.elementType)&&(getTargetInstFunc=getTargetInstForChangeEvent):getTargetInstFunc=getTargetInstForClickEvent;if(getTargetInstFunc&&(getTargetInstFunc=getTargetInstFunc(domEventName,targetInst))){createAndAccumulateChangeEvent(dispatchQueue,getTargetInstFunc,nativeEvent,nativeEventTarget);break a;}handleEventFunc&&handleEventFunc(domEventName,reactName,targetInst);"focusout"===domEventName&&targetInst&&"number"===reactName.type&&null!=targetInst.memoizedProps.value&&setDefaultValue(reactName,"number",reactName.value);}handleEventFunc=targetInst?getNodeFromInstance(targetInst):window;switch(domEventName){case "focusin":if(isTextInputElement(handleEventFunc)||"true"===handleEventFunc.contentEditable)activeElement=handleEventFunc,activeElementInst=targetInst,lastSelection=null;break;case "focusout":lastSelection=activeElementInst=activeElement=null;break;case "mousedown":mouseDown=!0;break;case "contextmenu":case "mouseup":case "dragend":mouseDown=!1;constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);break;case "selectionchange":if(skipSelectionChangeEvent)break;case "keydown":case "keyup":constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);}var fallbackData;if(canUseCompositionEvent)b:{switch(domEventName){case "compositionstart":var eventType="onCompositionStart";break b;case "compositionend":eventType="onCompositionEnd";break b;case "compositionupdate":eventType="onCompositionUpdate";break b;}eventType=void 0;}else isComposing?isFallbackCompositionEnd(domEventName,nativeEvent)&&(eventType="onCompositionEnd"):"keydown"===domEventName&&229===nativeEvent.keyCode&&(eventType="onCompositionStart");eventType&&(useFallbackCompositionData&&"ko"!==nativeEvent.locale&&(isComposing||"onCompositionStart"!==eventType?"onCompositionEnd"===eventType&&isComposing&&(fallbackData=getData()):(root$1=nativeEventTarget,startText="value"in root$1?root$1.value:root$1.textContent,isComposing=!0)),handleEventFunc=accumulateTwoPhaseListeners(targetInst,eventType),0<handleEventFunc.length&&(eventType=new SyntheticCompositionEvent(eventType,domEventName,null,nativeEvent,nativeEventTarget),dispatchQueue.push({event:eventType,listeners:handleEventFunc}),fallbackData?eventType.data=fallbackData:(fallbackData=getDataFromCustomEvent(nativeEvent),null!==fallbackData&&(eventType.data=fallbackData))));if(fallbackData=canUseTextInputEvent?getNativeBeforeInputChars(domEventName,nativeEvent):getFallbackBeforeInputChars(domEventName,nativeEvent))eventType=accumulateTwoPhaseListeners(targetInst,"onBeforeInput"),0<eventType.length&&(handleEventFunc=new SyntheticCompositionEvent("onBeforeInput","beforeinput",null,nativeEvent,nativeEventTarget),dispatchQueue.push({event:handleEventFunc,listeners:eventType}),handleEventFunc.data=fallbackData);extractEvents$1(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);}processDispatchQueue(dispatchQueue,eventSystemFlags);});}function createDispatchListener(instance,listener,currentTarget){return {instance:instance,listener:listener,currentTarget:currentTarget};}function accumulateTwoPhaseListeners(targetFiber,reactName){for(var captureName=reactName+"Capture",listeners=[];null!==targetFiber;){var _instance2=targetFiber,stateNode=_instance2.stateNode;_instance2=_instance2.tag;5!==_instance2&&26!==_instance2&&27!==_instance2||null===stateNode||(_instance2=getListener(targetFiber,captureName),null!=_instance2&&listeners.unshift(createDispatchListener(targetFiber,_instance2,stateNode)),_instance2=getListener(targetFiber,reactName),null!=_instance2&&listeners.push(createDispatchListener(targetFiber,_instance2,stateNode)));if(3===targetFiber.tag)return listeners;targetFiber=targetFiber.return;}return [];}function getParent(inst){if(null===inst)return null;do inst=inst.return;while(inst&&5!==inst.tag&&27!==inst.tag);return inst?inst:null;}function accumulateEnterLeaveListenersForEvent(dispatchQueue,event,target,common,inCapturePhase){for(var registrationName=event._reactName,listeners=[];null!==target&&target!==common;){var _instance3=target,alternate=_instance3.alternate,stateNode=_instance3.stateNode;_instance3=_instance3.tag;if(null!==alternate&&alternate===common)break;5!==_instance3&&26!==_instance3&&27!==_instance3||null===stateNode||(alternate=stateNode,inCapturePhase?(stateNode=getListener(target,registrationName),null!=stateNode&&listeners.unshift(createDispatchListener(target,stateNode,alternate))):inCapturePhase||(stateNode=getListener(target,registrationName),null!=stateNode&&listeners.push(createDispatchListener(target,stateNode,alternate))));target=target.return;}0!==listeners.length&&dispatchQueue.push({event:event,listeners:listeners});}var NORMALIZE_NEWLINES_REGEX=/\r\n?/g,NORMALIZE_NULL_AND_REPLACEMENT_REGEX=/\u0000|\uFFFD/g;function normalizeMarkupForTextOrAttribute(markup){return ("string"===typeof markup?markup:""+markup).replace(NORMALIZE_NEWLINES_REGEX,"\n").replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX,"");}function checkForUnmatchedText(serverText,clientText){clientText=normalizeMarkupForTextOrAttribute(clientText);return normalizeMarkupForTextOrAttribute(serverText)===clientText?true:false;}function setProp(domElement,tag,key,value,props,prevValue){switch(key){case "children":"string"===typeof value?"body"===tag||"textarea"===tag&&""===value||setTextContent(domElement,value):("number"===typeof value||"bigint"===typeof value)&&"body"!==tag&&setTextContent(domElement,""+value);break;case "className":setValueForKnownAttribute(domElement,"class",value);break;case "tabIndex":setValueForKnownAttribute(domElement,"tabindex",value);break;case "dir":case "role":case "viewBox":case "width":case "height":setValueForKnownAttribute(domElement,key,value);break;case "style":setValueForStyles(domElement,value,prevValue);break;case "data":if("object"!==tag){setValueForKnownAttribute(domElement,"data",value);break;}case "src":case "href":if(""===value&&("a"!==tag||"href"!==key)){domElement.removeAttribute(key);break;}if(null==value||"function"===typeof value||"symbol"===typeof value||"boolean"===typeof value){domElement.removeAttribute(key);break;}value=sanitizeURL(""+value);domElement.setAttribute(key,value);break;case "action":case "formAction":if("function"===typeof value){domElement.setAttribute(key,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break;}else "function"===typeof prevValue&&("formAction"===key?("input"!==tag&&setProp(domElement,tag,"name",props.name,props,null),setProp(domElement,tag,"formEncType",props.formEncType,props,null),setProp(domElement,tag,"formMethod",props.formMethod,props,null),setProp(domElement,tag,"formTarget",props.formTarget,props,null)):(setProp(domElement,tag,"encType",props.encType,props,null),setProp(domElement,tag,"method",props.method,props,null),setProp(domElement,tag,"target",props.target,props,null)));if(null==value||"symbol"===typeof value||"boolean"===typeof value){domElement.removeAttribute(key);break;}value=sanitizeURL(""+value);domElement.setAttribute(key,value);break;case "onClick":null!=value&&(domElement.onclick=noop$1);break;case "onScroll":null!=value&&listenToNonDelegatedEvent("scroll",domElement);break;case "onScrollEnd":null!=value&&listenToNonDelegatedEvent("scrollend",domElement);break;case "dangerouslySetInnerHTML":if(null!=value){if("object"!==typeof value||!("__html"in value))throw Error(formatProdErrorMessage(61));key=value.__html;if(null!=key){if(null!=props.children)throw Error(formatProdErrorMessage(60));domElement.innerHTML=key;}}break;case "multiple":domElement.multiple=value&&"function"!==typeof value&&"symbol"!==typeof value;break;case "muted":domElement.muted=value&&"function"!==typeof value&&"symbol"!==typeof value;break;case "suppressContentEditableWarning":case "suppressHydrationWarning":case "defaultValue":case "defaultChecked":case "innerHTML":case "ref":break;case "autoFocus":break;case "xlinkHref":if(null==value||"function"===typeof value||"boolean"===typeof value||"symbol"===typeof value){domElement.removeAttribute("xlink:href");break;}key=sanitizeURL(""+value);domElement.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",key);break;case "contentEditable":case "spellCheck":case "draggable":case "value":case "autoReverse":case "externalResourcesRequired":case "focusable":case "preserveAlpha":null!=value&&"function"!==typeof value&&"symbol"!==typeof value?domElement.setAttribute(key,""+value):domElement.removeAttribute(key);break;case "inert":case "allowFullScreen":case "async":case "autoPlay":case "controls":case "default":case "defer":case "disabled":case "disablePictureInPicture":case "disableRemotePlayback":case "formNoValidate":case "hidden":case "loop":case "noModule":case "noValidate":case "open":case "playsInline":case "readOnly":case "required":case "reversed":case "scoped":case "seamless":case "itemScope":value&&"function"!==typeof value&&"symbol"!==typeof value?domElement.setAttribute(key,""):domElement.removeAttribute(key);break;case "capture":case "download":true===value?domElement.setAttribute(key,""):false!==value&&null!=value&&"function"!==typeof value&&"symbol"!==typeof value?domElement.setAttribute(key,value):domElement.removeAttribute(key);break;case "cols":case "rows":case "size":case "span":null!=value&&"function"!==typeof value&&"symbol"!==typeof value&&!isNaN(value)&&1<=value?domElement.setAttribute(key,value):domElement.removeAttribute(key);break;case "rowSpan":case "start":null==value||"function"===typeof value||"symbol"===typeof value||isNaN(value)?domElement.removeAttribute(key):domElement.setAttribute(key,value);break;case "popover":listenToNonDelegatedEvent("beforetoggle",domElement);listenToNonDelegatedEvent("toggle",domElement);setValueForAttribute(domElement,"popover",value);break;case "xlinkActuate":setValueForNamespacedAttribute(domElement,"http://www.w3.org/1999/xlink","xlink:actuate",value);break;case "xlinkArcrole":setValueForNamespacedAttribute(domElement,"http://www.w3.org/1999/xlink","xlink:arcrole",value);break;case "xlinkRole":setValueForNamespacedAttribute(domElement,"http://www.w3.org/1999/xlink","xlink:role",value);break;case "xlinkShow":setValueForNamespacedAttribute(domElement,"http://www.w3.org/1999/xlink","xlink:show",value);break;case "xlinkTitle":setValueForNamespacedAttribute(domElement,"http://www.w3.org/1999/xlink","xlink:title",value);break;case "xlinkType":setValueForNamespacedAttribute(domElement,"http://www.w3.org/1999/xlink","xlink:type",value);break;case "xmlBase":setValueForNamespacedAttribute(domElement,"http://www.w3.org/XML/1998/namespace","xml:base",value);break;case "xmlLang":setValueForNamespacedAttribute(domElement,"http://www.w3.org/XML/1998/namespace","xml:lang",value);break;case "xmlSpace":setValueForNamespacedAttribute(domElement,"http://www.w3.org/XML/1998/namespace","xml:space",value);break;case "is":setValueForAttribute(domElement,"is",value);break;case "innerText":case "textContent":break;default:if(!(2<key.length)||"o"!==key[0]&&"O"!==key[0]||"n"!==key[1]&&"N"!==key[1])key=aliases.get(key)||key,setValueForAttribute(domElement,key,value);}}function setPropOnCustomElement(domElement,tag,key,value,props,prevValue){switch(key){case "style":setValueForStyles(domElement,value,prevValue);break;case "dangerouslySetInnerHTML":if(null!=value){if("object"!==typeof value||!("__html"in value))throw Error(formatProdErrorMessage(61));key=value.__html;if(null!=key){if(null!=props.children)throw Error(formatProdErrorMessage(60));domElement.innerHTML=key;}}break;case "children":"string"===typeof value?setTextContent(domElement,value):("number"===typeof value||"bigint"===typeof value)&&setTextContent(domElement,""+value);break;case "onScroll":null!=value&&listenToNonDelegatedEvent("scroll",domElement);break;case "onScrollEnd":null!=value&&listenToNonDelegatedEvent("scrollend",domElement);break;case "onClick":null!=value&&(domElement.onclick=noop$1);break;case "suppressContentEditableWarning":case "suppressHydrationWarning":case "innerHTML":case "ref":break;case "innerText":case "textContent":break;default:if(!registrationNameDependencies.hasOwnProperty(key))a:{if("o"===key[0]&&"n"===key[1]&&(props=key.endsWith("Capture"),tag=key.slice(2,props?key.length-7:void 0),prevValue=domElement[internalPropsKey]||null,prevValue=null!=prevValue?prevValue[key]:null,"function"===typeof prevValue&&domElement.removeEventListener(tag,prevValue,props),"function"===typeof value)){"function"!==typeof prevValue&&null!==prevValue&&(key in domElement?domElement[key]=null:domElement.hasAttribute(key)&&domElement.removeAttribute(key));domElement.addEventListener(tag,value,props);break a;}key in domElement?domElement[key]=value:true===value?domElement.setAttribute(key,""):setValueForAttribute(domElement,key,value);}}}function setInitialProperties(domElement,tag,props){switch(tag){case "div":case "span":case "svg":case "path":case "a":case "g":case "p":case "li":break;case "img":listenToNonDelegatedEvent("error",domElement);listenToNonDelegatedEvent("load",domElement);var hasSrc=false,hasSrcSet=false,propKey;for(propKey in props)if(props.hasOwnProperty(propKey)){var propValue=props[propKey];if(null!=propValue)switch(propKey){case "src":hasSrc=true;break;case "srcSet":hasSrcSet=true;break;case "children":case "dangerouslySetInnerHTML":throw Error(formatProdErrorMessage(137,tag));default:setProp(domElement,tag,propKey,propValue,props,null);}}hasSrcSet&&setProp(domElement,tag,"srcSet",props.srcSet,props,null);hasSrc&&setProp(domElement,tag,"src",props.src,props,null);return;case "input":listenToNonDelegatedEvent("invalid",domElement);var defaultValue=propKey=propValue=hasSrcSet=null,checked=null,defaultChecked=null;for(hasSrc in props)if(props.hasOwnProperty(hasSrc)){var propValue$184=props[hasSrc];if(null!=propValue$184)switch(hasSrc){case "name":hasSrcSet=propValue$184;break;case "type":propValue=propValue$184;break;case "checked":checked=propValue$184;break;case "defaultChecked":defaultChecked=propValue$184;break;case "value":propKey=propValue$184;break;case "defaultValue":defaultValue=propValue$184;break;case "children":case "dangerouslySetInnerHTML":if(null!=propValue$184)throw Error(formatProdErrorMessage(137,tag));break;default:setProp(domElement,tag,hasSrc,propValue$184,props,null);}}initInput(domElement,propKey,defaultValue,checked,defaultChecked,propValue,hasSrcSet,false);return;case "select":listenToNonDelegatedEvent("invalid",domElement);hasSrc=propValue=propKey=null;for(hasSrcSet in props)if(props.hasOwnProperty(hasSrcSet)&&(defaultValue=props[hasSrcSet],null!=defaultValue))switch(hasSrcSet){case "value":propKey=defaultValue;break;case "defaultValue":propValue=defaultValue;break;case "multiple":hasSrc=defaultValue;default:setProp(domElement,tag,hasSrcSet,defaultValue,props,null);}tag=propKey;props=propValue;domElement.multiple=!!hasSrc;null!=tag?updateOptions(domElement,!!hasSrc,tag,false):null!=props&&updateOptions(domElement,!!hasSrc,props,true);return;case "textarea":listenToNonDelegatedEvent("invalid",domElement);propKey=hasSrcSet=hasSrc=null;for(propValue in props)if(props.hasOwnProperty(propValue)&&(defaultValue=props[propValue],null!=defaultValue))switch(propValue){case "value":hasSrc=defaultValue;break;case "defaultValue":hasSrcSet=defaultValue;break;case "children":propKey=defaultValue;break;case "dangerouslySetInnerHTML":if(null!=defaultValue)throw Error(formatProdErrorMessage(91));break;default:setProp(domElement,tag,propValue,defaultValue,props,null);}initTextarea(domElement,hasSrc,hasSrcSet,propKey);return;case "option":for(checked in props)if(props.hasOwnProperty(checked)&&(hasSrc=props[checked],null!=hasSrc))switch(checked){case "selected":domElement.selected=hasSrc&&"function"!==typeof hasSrc&&"symbol"!==typeof hasSrc;break;default:setProp(domElement,tag,checked,hasSrc,props,null);}return;case "dialog":listenToNonDelegatedEvent("beforetoggle",domElement);listenToNonDelegatedEvent("toggle",domElement);listenToNonDelegatedEvent("cancel",domElement);listenToNonDelegatedEvent("close",domElement);break;case "iframe":case "object":listenToNonDelegatedEvent("load",domElement);break;case "video":case "audio":for(hasSrc=0;hasSrc<mediaEventTypes.length;hasSrc++)listenToNonDelegatedEvent(mediaEventTypes[hasSrc],domElement);break;case "image":listenToNonDelegatedEvent("error",domElement);listenToNonDelegatedEvent("load",domElement);break;case "details":listenToNonDelegatedEvent("toggle",domElement);break;case "embed":case "source":case "link":listenToNonDelegatedEvent("error",domElement),listenToNonDelegatedEvent("load",domElement);case "area":case "base":case "br":case "col":case "hr":case "keygen":case "meta":case "param":case "track":case "wbr":case "menuitem":for(defaultChecked in props)if(props.hasOwnProperty(defaultChecked)&&(hasSrc=props[defaultChecked],null!=hasSrc))switch(defaultChecked){case "children":case "dangerouslySetInnerHTML":throw Error(formatProdErrorMessage(137,tag));default:setProp(domElement,tag,defaultChecked,hasSrc,props,null);}return;default:if(isCustomElement(tag)){for(propValue$184 in props)props.hasOwnProperty(propValue$184)&&(hasSrc=props[propValue$184],void 0!==hasSrc&&setPropOnCustomElement(domElement,tag,propValue$184,hasSrc,props,void 0));return;}}for(defaultValue in props)props.hasOwnProperty(defaultValue)&&(hasSrc=props[defaultValue],null!=hasSrc&&setProp(domElement,tag,defaultValue,hasSrc,props,null));}function updateProperties(domElement,tag,lastProps,nextProps){switch(tag){case "div":case "span":case "svg":case "path":case "a":case "g":case "p":case "li":break;case "input":var name=null,type=null,value=null,defaultValue=null,lastDefaultValue=null,checked=null,defaultChecked=null;for(propKey in lastProps){var lastProp=lastProps[propKey];if(lastProps.hasOwnProperty(propKey)&&null!=lastProp)switch(propKey){case "checked":break;case "value":break;case "defaultValue":lastDefaultValue=lastProp;default:nextProps.hasOwnProperty(propKey)||setProp(domElement,tag,propKey,null,nextProps,lastProp);}}for(var propKey$201 in nextProps){var propKey=nextProps[propKey$201];lastProp=lastProps[propKey$201];if(nextProps.hasOwnProperty(propKey$201)&&(null!=propKey||null!=lastProp))switch(propKey$201){case "type":type=propKey;break;case "name":name=propKey;break;case "checked":checked=propKey;break;case "defaultChecked":defaultChecked=propKey;break;case "value":value=propKey;break;case "defaultValue":defaultValue=propKey;break;case "children":case "dangerouslySetInnerHTML":if(null!=propKey)throw Error(formatProdErrorMessage(137,tag));break;default:propKey!==lastProp&&setProp(domElement,tag,propKey$201,propKey,nextProps,lastProp);}}updateInput(domElement,value,defaultValue,lastDefaultValue,checked,defaultChecked,type,name);return;case "select":propKey=value=defaultValue=propKey$201=null;for(type in lastProps)if(lastDefaultValue=lastProps[type],lastProps.hasOwnProperty(type)&&null!=lastDefaultValue)switch(type){case "value":break;case "multiple":propKey=lastDefaultValue;default:nextProps.hasOwnProperty(type)||setProp(domElement,tag,type,null,nextProps,lastDefaultValue);}for(name in nextProps)if(type=nextProps[name],lastDefaultValue=lastProps[name],nextProps.hasOwnProperty(name)&&(null!=type||null!=lastDefaultValue))switch(name){case "value":propKey$201=type;break;case "defaultValue":defaultValue=type;break;case "multiple":value=type;default:type!==lastDefaultValue&&setProp(domElement,tag,name,type,nextProps,lastDefaultValue);}tag=defaultValue;lastProps=value;nextProps=propKey;null!=propKey$201?updateOptions(domElement,!!lastProps,propKey$201,false):!!nextProps!==!!lastProps&&(null!=tag?updateOptions(domElement,!!lastProps,tag,true):updateOptions(domElement,!!lastProps,lastProps?[]:"",false));return;case "textarea":propKey=propKey$201=null;for(defaultValue in lastProps)if(name=lastProps[defaultValue],lastProps.hasOwnProperty(defaultValue)&&null!=name&&!nextProps.hasOwnProperty(defaultValue))switch(defaultValue){case "value":break;case "children":break;default:setProp(domElement,tag,defaultValue,null,nextProps,name);}for(value in nextProps)if(name=nextProps[value],type=lastProps[value],nextProps.hasOwnProperty(value)&&(null!=name||null!=type))switch(value){case "value":propKey$201=name;break;case "defaultValue":propKey=name;break;case "children":break;case "dangerouslySetInnerHTML":if(null!=name)throw Error(formatProdErrorMessage(91));break;default:name!==type&&setProp(domElement,tag,value,name,nextProps,type);}updateTextarea(domElement,propKey$201,propKey);return;case "option":for(var propKey$217 in lastProps)if(propKey$201=lastProps[propKey$217],lastProps.hasOwnProperty(propKey$217)&&null!=propKey$201&&!nextProps.hasOwnProperty(propKey$217))switch(propKey$217){case "selected":domElement.selected=false;break;default:setProp(domElement,tag,propKey$217,null,nextProps,propKey$201);}for(lastDefaultValue in nextProps)if(propKey$201=nextProps[lastDefaultValue],propKey=lastProps[lastDefaultValue],nextProps.hasOwnProperty(lastDefaultValue)&&propKey$201!==propKey&&(null!=propKey$201||null!=propKey))switch(lastDefaultValue){case "selected":domElement.selected=propKey$201&&"function"!==typeof propKey$201&&"symbol"!==typeof propKey$201;break;default:setProp(domElement,tag,lastDefaultValue,propKey$201,nextProps,propKey);}return;case "img":case "link":case "area":case "base":case "br":case "col":case "embed":case "hr":case "keygen":case "meta":case "param":case "source":case "track":case "wbr":case "menuitem":for(var propKey$222 in lastProps)propKey$201=lastProps[propKey$222],lastProps.hasOwnProperty(propKey$222)&&null!=propKey$201&&!nextProps.hasOwnProperty(propKey$222)&&setProp(domElement,tag,propKey$222,null,nextProps,propKey$201);for(checked in nextProps)if(propKey$201=nextProps[checked],propKey=lastProps[checked],nextProps.hasOwnProperty(checked)&&propKey$201!==propKey&&(null!=propKey$201||null!=propKey))switch(checked){case "children":case "dangerouslySetInnerHTML":if(null!=propKey$201)throw Error(formatProdErrorMessage(137,tag));break;default:setProp(domElement,tag,checked,propKey$201,nextProps,propKey);}return;default:if(isCustomElement(tag)){for(var propKey$227 in lastProps)propKey$201=lastProps[propKey$227],lastProps.hasOwnProperty(propKey$227)&&void 0!==propKey$201&&!nextProps.hasOwnProperty(propKey$227)&&setPropOnCustomElement(domElement,tag,propKey$227,void 0,nextProps,propKey$201);for(defaultChecked in nextProps)propKey$201=nextProps[defaultChecked],propKey=lastProps[defaultChecked],!nextProps.hasOwnProperty(defaultChecked)||propKey$201===propKey||void 0===propKey$201&&void 0===propKey||setPropOnCustomElement(domElement,tag,defaultChecked,propKey$201,nextProps,propKey);return;}}for(var propKey$232 in lastProps)propKey$201=lastProps[propKey$232],lastProps.hasOwnProperty(propKey$232)&&null!=propKey$201&&!nextProps.hasOwnProperty(propKey$232)&&setProp(domElement,tag,propKey$232,null,nextProps,propKey$201);for(lastProp in nextProps)propKey$201=nextProps[lastProp],propKey=lastProps[lastProp],!nextProps.hasOwnProperty(lastProp)||propKey$201===propKey||null==propKey$201&&null==propKey||setProp(domElement,tag,lastProp,propKey$201,nextProps,propKey);}function isLikelyStaticResource(initiatorType){switch(initiatorType){case "css":case "script":case "font":case "img":case "image":case "input":case "link":return  true;default:return  false;}}function estimateBandwidth(){if("function"===typeof performance.getEntriesByType){for(var count=0,bits=0,resourceEntries=performance.getEntriesByType("resource"),i=0;i<resourceEntries.length;i++){var entry=resourceEntries[i],transferSize=entry.transferSize,initiatorType=entry.initiatorType,duration=entry.duration;if(transferSize&&duration&&isLikelyStaticResource(initiatorType)){initiatorType=0;duration=entry.responseEnd;for(i+=1;i<resourceEntries.length;i++){var overlapEntry=resourceEntries[i],overlapStartTime=overlapEntry.startTime;if(overlapStartTime>duration)break;var overlapTransferSize=overlapEntry.transferSize,overlapInitiatorType=overlapEntry.initiatorType;overlapTransferSize&&isLikelyStaticResource(overlapInitiatorType)&&(overlapEntry=overlapEntry.responseEnd,initiatorType+=overlapTransferSize*(overlapEntry<duration?1:(duration-overlapStartTime)/(overlapEntry-overlapStartTime)));}--i;bits+=8*(transferSize+initiatorType)/(entry.duration/1e3);count++;if(10<count)break;}}if(0<count)return bits/count/1e6;}return navigator.connection&&(count=navigator.connection.downlink,"number"===typeof count)?count:5;}var eventsEnabled=null,selectionInformation=null;function getOwnerDocumentFromRootContainer(rootContainerElement){return 9===rootContainerElement.nodeType?rootContainerElement:rootContainerElement.ownerDocument;}function getOwnHostContext(namespaceURI){switch(namespaceURI){case "http://www.w3.org/2000/svg":return 1;case "http://www.w3.org/1998/Math/MathML":return 2;default:return 0;}}function getChildHostContextProd(parentNamespace,type){if(0===parentNamespace)switch(type){case "svg":return 1;case "math":return 2;default:return 0;}return 1===parentNamespace&&"foreignObject"===type?0:parentNamespace;}function shouldSetTextContent(type,props){return "textarea"===type||"noscript"===type||"string"===typeof props.children||"number"===typeof props.children||"bigint"===typeof props.children||"object"===typeof props.dangerouslySetInnerHTML&&null!==props.dangerouslySetInnerHTML&&null!=props.dangerouslySetInnerHTML.__html;}var currentPopstateTransitionEvent=null;function shouldAttemptEagerTransition(){var event=window.event;if(event&&"popstate"===event.type){if(event===currentPopstateTransitionEvent)return  false;currentPopstateTransitionEvent=event;return  true;}currentPopstateTransitionEvent=null;return  false;}var scheduleTimeout="function"===typeof setTimeout?setTimeout:void 0,cancelTimeout="function"===typeof clearTimeout?clearTimeout:void 0,localPromise="function"===typeof Promise?Promise:void 0,scheduleMicrotask="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof localPromise?function(callback){return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);}:scheduleTimeout;function handleErrorInNextTick(error){setTimeout(function(){throw error;});}function isSingletonScope(type){return "head"===type;}function clearHydrationBoundary(parentInstance,hydrationInstance){var node=hydrationInstance,depth=0;do{var nextNode=node.nextSibling;parentInstance.removeChild(node);if(nextNode&&8===nextNode.nodeType)if(node=nextNode.data,"/$"===node||"/&"===node){if(0===depth){parentInstance.removeChild(nextNode);retryIfBlockedOn(hydrationInstance);return;}depth--;}else if("$"===node||"$?"===node||"$~"===node||"$!"===node||"&"===node)depth++;else if("html"===node)releaseSingletonInstance(parentInstance.ownerDocument.documentElement);else if("head"===node){node=parentInstance.ownerDocument.head;releaseSingletonInstance(node);for(var node$jscomp$0=node.firstChild;node$jscomp$0;){var nextNode$jscomp$0=node$jscomp$0.nextSibling,nodeName=node$jscomp$0.nodeName;node$jscomp$0[internalHoistableMarker]||"SCRIPT"===nodeName||"STYLE"===nodeName||"LINK"===nodeName&&"stylesheet"===node$jscomp$0.rel.toLowerCase()||node.removeChild(node$jscomp$0);node$jscomp$0=nextNode$jscomp$0;}}else "body"===node&&releaseSingletonInstance(parentInstance.ownerDocument.body);node=nextNode;}while(node);retryIfBlockedOn(hydrationInstance);}function hideOrUnhideDehydratedBoundary(suspenseInstance,isHidden){var node=suspenseInstance;suspenseInstance=0;do{var nextNode=node.nextSibling;1===node.nodeType?isHidden?(node._stashedDisplay=node.style.display,node.style.display="none"):(node.style.display=node._stashedDisplay||"",""===node.getAttribute("style")&&node.removeAttribute("style")):3===node.nodeType&&(isHidden?(node._stashedText=node.nodeValue,node.nodeValue=""):node.nodeValue=node._stashedText||"");if(nextNode&&8===nextNode.nodeType)if(node=nextNode.data,"/$"===node){if(0===suspenseInstance)break;else suspenseInstance--;}else "$"!==node&&"$?"!==node&&"$~"!==node&&"$!"!==node||suspenseInstance++;node=nextNode;}while(node);}function clearContainerSparingly(container){var nextNode=container.firstChild;nextNode&&10===nextNode.nodeType&&(nextNode=nextNode.nextSibling);for(;nextNode;){var node=nextNode;nextNode=nextNode.nextSibling;switch(node.nodeName){case "HTML":case "HEAD":case "BODY":clearContainerSparingly(node);detachDeletedInstance(node);continue;case "SCRIPT":case "STYLE":continue;case "LINK":if("stylesheet"===node.rel.toLowerCase())continue;}container.removeChild(node);}}function canHydrateInstance(instance,type,props,inRootOrSingleton){for(;1===instance.nodeType;){var anyProps=props;if(instance.nodeName.toLowerCase()!==type.toLowerCase()){if(!inRootOrSingleton&&("INPUT"!==instance.nodeName||"hidden"!==instance.type))break;}else if(!inRootOrSingleton){if("input"===type&&"hidden"===instance.type){var name=null==anyProps.name?null:""+anyProps.name;if("hidden"===anyProps.type&&instance.getAttribute("name")===name)return instance;}else return instance;}else if(!instance[internalHoistableMarker])switch(type){case "meta":if(!instance.hasAttribute("itemprop"))break;return instance;case "link":name=instance.getAttribute("rel");if("stylesheet"===name&&instance.hasAttribute("data-precedence"))break;else if(name!==anyProps.rel||instance.getAttribute("href")!==(null==anyProps.href||""===anyProps.href?null:anyProps.href)||instance.getAttribute("crossorigin")!==(null==anyProps.crossOrigin?null:anyProps.crossOrigin)||instance.getAttribute("title")!==(null==anyProps.title?null:anyProps.title))break;return instance;case "style":if(instance.hasAttribute("data-precedence"))break;return instance;case "script":name=instance.getAttribute("src");if((name!==(null==anyProps.src?null:anyProps.src)||instance.getAttribute("type")!==(null==anyProps.type?null:anyProps.type)||instance.getAttribute("crossorigin")!==(null==anyProps.crossOrigin?null:anyProps.crossOrigin))&&name&&instance.hasAttribute("async")&&!instance.hasAttribute("itemprop"))break;return instance;default:return instance;}instance=getNextHydratable(instance.nextSibling);if(null===instance)break;}return null;}function canHydrateTextInstance(instance,text,inRootOrSingleton){if(""===text)return null;for(;3!==instance.nodeType;){if((1!==instance.nodeType||"INPUT"!==instance.nodeName||"hidden"!==instance.type)&&!inRootOrSingleton)return null;instance=getNextHydratable(instance.nextSibling);if(null===instance)return null;}return instance;}function canHydrateHydrationBoundary(instance,inRootOrSingleton){for(;8!==instance.nodeType;){if((1!==instance.nodeType||"INPUT"!==instance.nodeName||"hidden"!==instance.type)&&!inRootOrSingleton)return null;instance=getNextHydratable(instance.nextSibling);if(null===instance)return null;}return instance;}function isSuspenseInstancePending(instance){return "$?"===instance.data||"$~"===instance.data;}function isSuspenseInstanceFallback(instance){return "$!"===instance.data||"$?"===instance.data&&"loading"!==instance.ownerDocument.readyState;}function registerSuspenseInstanceRetry(instance,callback){var ownerDocument=instance.ownerDocument;if("$~"===instance.data)instance._reactRetry=callback;else if("$?"!==instance.data||"loading"!==ownerDocument.readyState)callback();else {var listener=function(){callback();ownerDocument.removeEventListener("DOMContentLoaded",listener);};ownerDocument.addEventListener("DOMContentLoaded",listener);instance._reactRetry=listener;}}function getNextHydratable(node){for(;null!=node;node=node.nextSibling){var nodeType=node.nodeType;if(1===nodeType||3===nodeType)break;if(8===nodeType){nodeType=node.data;if("$"===nodeType||"$!"===nodeType||"$?"===nodeType||"$~"===nodeType||"&"===nodeType||"F!"===nodeType||"F"===nodeType)break;if("/$"===nodeType||"/&"===nodeType)return null;}}return node;}var previousHydratableOnEnteringScopedSingleton=null;function getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance){hydrationInstance=hydrationInstance.nextSibling;for(var depth=0;hydrationInstance;){if(8===hydrationInstance.nodeType){var data=hydrationInstance.data;if("/$"===data||"/&"===data){if(0===depth)return getNextHydratable(hydrationInstance.nextSibling);depth--;}else "$"!==data&&"$!"!==data&&"$?"!==data&&"$~"!==data&&"&"!==data||depth++;}hydrationInstance=hydrationInstance.nextSibling;}return null;}function getParentHydrationBoundary(targetInstance){targetInstance=targetInstance.previousSibling;for(var depth=0;targetInstance;){if(8===targetInstance.nodeType){var data=targetInstance.data;if("$"===data||"$!"===data||"$?"===data||"$~"===data||"&"===data){if(0===depth)return targetInstance;depth--;}else "/$"!==data&&"/&"!==data||depth++;}targetInstance=targetInstance.previousSibling;}return null;}function resolveSingletonInstance(type,props,rootContainerInstance){props=getOwnerDocumentFromRootContainer(rootContainerInstance);switch(type){case "html":type=props.documentElement;if(!type)throw Error(formatProdErrorMessage(452));return type;case "head":type=props.head;if(!type)throw Error(formatProdErrorMessage(453));return type;case "body":type=props.body;if(!type)throw Error(formatProdErrorMessage(454));return type;default:throw Error(formatProdErrorMessage(451));}}function releaseSingletonInstance(instance){for(var attributes=instance.attributes;attributes.length;)instance.removeAttributeNode(attributes[0]);detachDeletedInstance(instance);}var preloadPropsMap=new Map(),preconnectsSet=new Set();function getHoistableRoot(container){return "function"===typeof container.getRootNode?container.getRootNode():9===container.nodeType?container:container.ownerDocument;}var previousDispatcher=ReactDOMSharedInternals.d;ReactDOMSharedInternals.d={f:flushSyncWork,r:requestFormReset,D:prefetchDNS,C:preconnect,L:preload,m:preloadModule,X:preinitScript,S:preinitStyle,M:preinitModuleScript};function flushSyncWork(){var previousWasRendering=previousDispatcher.f(),wasRendering=flushSyncWork$1();return previousWasRendering||wasRendering;}function requestFormReset(form){var formInst=getInstanceFromNode(form);null!==formInst&&5===formInst.tag&&"form"===formInst.type?requestFormReset$1(formInst):previousDispatcher.r(form);}var globalDocument="undefined"===typeof document?null:document;function preconnectAs(rel,href,crossOrigin){var ownerDocument=globalDocument;if(ownerDocument&&"string"===typeof href&&href){var limitedEscapedHref=escapeSelectorAttributeValueInsideDoubleQuotes(href);limitedEscapedHref='link[rel="'+rel+'"][href="'+limitedEscapedHref+'"]';"string"===typeof crossOrigin&&(limitedEscapedHref+='[crossorigin="'+crossOrigin+'"]');preconnectsSet.has(limitedEscapedHref)||(preconnectsSet.add(limitedEscapedHref),rel={rel:rel,crossOrigin:crossOrigin,href:href},null===ownerDocument.querySelector(limitedEscapedHref)&&(href=ownerDocument.createElement("link"),setInitialProperties(href,"link",rel),markNodeAsHoistable(href),ownerDocument.head.appendChild(href)));}}function prefetchDNS(href){previousDispatcher.D(href);preconnectAs("dns-prefetch",href,null);}function preconnect(href,crossOrigin){previousDispatcher.C(href,crossOrigin);preconnectAs("preconnect",href,crossOrigin);}function preload(href,as,options){previousDispatcher.L(href,as,options);var ownerDocument=globalDocument;if(ownerDocument&&href&&as){var preloadSelector='link[rel="preload"][as="'+escapeSelectorAttributeValueInsideDoubleQuotes(as)+'"]';"image"===as?options&&options.imageSrcSet?(preloadSelector+='[imagesrcset="'+escapeSelectorAttributeValueInsideDoubleQuotes(options.imageSrcSet)+'"]',"string"===typeof options.imageSizes&&(preloadSelector+='[imagesizes="'+escapeSelectorAttributeValueInsideDoubleQuotes(options.imageSizes)+'"]')):preloadSelector+='[href="'+escapeSelectorAttributeValueInsideDoubleQuotes(href)+'"]':preloadSelector+='[href="'+escapeSelectorAttributeValueInsideDoubleQuotes(href)+'"]';var key=preloadSelector;switch(as){case "style":key=getStyleKey(href);break;case "script":key=getScriptKey(href);}preloadPropsMap.has(key)||(href=assign({rel:"preload",href:"image"===as&&options&&options.imageSrcSet?void 0:href,as:as},options),preloadPropsMap.set(key,href),null!==ownerDocument.querySelector(preloadSelector)||"style"===as&&ownerDocument.querySelector(getStylesheetSelectorFromKey(key))||"script"===as&&ownerDocument.querySelector(getScriptSelectorFromKey(key))||(as=ownerDocument.createElement("link"),setInitialProperties(as,"link",href),markNodeAsHoistable(as),ownerDocument.head.appendChild(as)));}}function preloadModule(href,options){previousDispatcher.m(href,options);var ownerDocument=globalDocument;if(ownerDocument&&href){var as=options&&"string"===typeof options.as?options.as:"script",preloadSelector='link[rel="modulepreload"][as="'+escapeSelectorAttributeValueInsideDoubleQuotes(as)+'"][href="'+escapeSelectorAttributeValueInsideDoubleQuotes(href)+'"]',key=preloadSelector;switch(as){case "audioworklet":case "paintworklet":case "serviceworker":case "sharedworker":case "worker":case "script":key=getScriptKey(href);}if(!preloadPropsMap.has(key)&&(href=assign({rel:"modulepreload",href:href},options),preloadPropsMap.set(key,href),null===ownerDocument.querySelector(preloadSelector))){switch(as){case "audioworklet":case "paintworklet":case "serviceworker":case "sharedworker":case "worker":case "script":if(ownerDocument.querySelector(getScriptSelectorFromKey(key)))return;}as=ownerDocument.createElement("link");setInitialProperties(as,"link",href);markNodeAsHoistable(as);ownerDocument.head.appendChild(as);}}}function preinitStyle(href,precedence,options){previousDispatcher.S(href,precedence,options);var ownerDocument=globalDocument;if(ownerDocument&&href){var styles=getResourcesFromRoot(ownerDocument).hoistableStyles,key=getStyleKey(href);precedence=precedence||"default";var resource=styles.get(key);if(!resource){var state={loading:0,preload:null};if(resource=ownerDocument.querySelector(getStylesheetSelectorFromKey(key)))state.loading=5;else {href=assign({rel:"stylesheet",href:href,"data-precedence":precedence},options);(options=preloadPropsMap.get(key))&&adoptPreloadPropsForStylesheet(href,options);var link=resource=ownerDocument.createElement("link");markNodeAsHoistable(link);setInitialProperties(link,"link",href);link._p=new Promise(function(resolve,reject){link.onload=resolve;link.onerror=reject;});link.addEventListener("load",function(){state.loading|=1;});link.addEventListener("error",function(){state.loading|=2;});state.loading|=4;insertStylesheet(resource,precedence,ownerDocument);}resource={type:"stylesheet",instance:resource,count:1,state:state};styles.set(key,resource);}}}function preinitScript(src,options){previousDispatcher.X(src,options);var ownerDocument=globalDocument;if(ownerDocument&&src){var scripts=getResourcesFromRoot(ownerDocument).hoistableScripts,key=getScriptKey(src),resource=scripts.get(key);resource||(resource=ownerDocument.querySelector(getScriptSelectorFromKey(key)),resource||(src=assign({src:src,async:true},options),(options=preloadPropsMap.get(key))&&adoptPreloadPropsForScript(src,options),resource=ownerDocument.createElement("script"),markNodeAsHoistable(resource),setInitialProperties(resource,"link",src),ownerDocument.head.appendChild(resource)),resource={type:"script",instance:resource,count:1,state:null},scripts.set(key,resource));}}function preinitModuleScript(src,options){previousDispatcher.M(src,options);var ownerDocument=globalDocument;if(ownerDocument&&src){var scripts=getResourcesFromRoot(ownerDocument).hoistableScripts,key=getScriptKey(src),resource=scripts.get(key);resource||(resource=ownerDocument.querySelector(getScriptSelectorFromKey(key)),resource||(src=assign({src:src,async:true,type:"module"},options),(options=preloadPropsMap.get(key))&&adoptPreloadPropsForScript(src,options),resource=ownerDocument.createElement("script"),markNodeAsHoistable(resource),setInitialProperties(resource,"link",src),ownerDocument.head.appendChild(resource)),resource={type:"script",instance:resource,count:1,state:null},scripts.set(key,resource));}}function getResource(type,currentProps,pendingProps,currentResource){var JSCompiler_inline_result=(JSCompiler_inline_result=rootInstanceStackCursor.current)?getHoistableRoot(JSCompiler_inline_result):null;if(!JSCompiler_inline_result)throw Error(formatProdErrorMessage(446));switch(type){case "meta":case "title":return null;case "style":return "string"===typeof pendingProps.precedence&&"string"===typeof pendingProps.href?(currentProps=getStyleKey(pendingProps.href),pendingProps=getResourcesFromRoot(JSCompiler_inline_result).hoistableStyles,currentResource=pendingProps.get(currentProps),currentResource||(currentResource={type:"style",instance:null,count:0,state:null},pendingProps.set(currentProps,currentResource)),currentResource):{type:"void",instance:null,count:0,state:null};case "link":if("stylesheet"===pendingProps.rel&&"string"===typeof pendingProps.href&&"string"===typeof pendingProps.precedence){type=getStyleKey(pendingProps.href);var styles$243=getResourcesFromRoot(JSCompiler_inline_result).hoistableStyles,resource$244=styles$243.get(type);resource$244||(JSCompiler_inline_result=JSCompiler_inline_result.ownerDocument||JSCompiler_inline_result,resource$244={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},styles$243.set(type,resource$244),(styles$243=JSCompiler_inline_result.querySelector(getStylesheetSelectorFromKey(type)))&&!styles$243._p&&(resource$244.instance=styles$243,resource$244.state.loading=5),preloadPropsMap.has(type)||(pendingProps={rel:"preload",as:"style",href:pendingProps.href,crossOrigin:pendingProps.crossOrigin,integrity:pendingProps.integrity,media:pendingProps.media,hrefLang:pendingProps.hrefLang,referrerPolicy:pendingProps.referrerPolicy},preloadPropsMap.set(type,pendingProps),styles$243||preloadStylesheet(JSCompiler_inline_result,type,pendingProps,resource$244.state)));if(currentProps&&null===currentResource)throw Error(formatProdErrorMessage(528,""));return resource$244;}if(currentProps&&null!==currentResource)throw Error(formatProdErrorMessage(529,""));return null;case "script":return currentProps=pendingProps.async,pendingProps=pendingProps.src,"string"===typeof pendingProps&&currentProps&&"function"!==typeof currentProps&&"symbol"!==typeof currentProps?(currentProps=getScriptKey(pendingProps),pendingProps=getResourcesFromRoot(JSCompiler_inline_result).hoistableScripts,currentResource=pendingProps.get(currentProps),currentResource||(currentResource={type:"script",instance:null,count:0,state:null},pendingProps.set(currentProps,currentResource)),currentResource):{type:"void",instance:null,count:0,state:null};default:throw Error(formatProdErrorMessage(444,type));}}function getStyleKey(href){return 'href="'+escapeSelectorAttributeValueInsideDoubleQuotes(href)+'"';}function getStylesheetSelectorFromKey(key){return 'link[rel="stylesheet"]['+key+"]";}function stylesheetPropsFromRawProps(rawProps){return assign({},rawProps,{"data-precedence":rawProps.precedence,precedence:null});}function preloadStylesheet(ownerDocument,key,preloadProps,state){ownerDocument.querySelector('link[rel="preload"][as="style"]['+key+"]")?state.loading=1:(key=ownerDocument.createElement("link"),state.preload=key,key.addEventListener("load",function(){return state.loading|=1;}),key.addEventListener("error",function(){return state.loading|=2;}),setInitialProperties(key,"link",preloadProps),markNodeAsHoistable(key),ownerDocument.head.appendChild(key));}function getScriptKey(src){return '[src="'+escapeSelectorAttributeValueInsideDoubleQuotes(src)+'"]';}function getScriptSelectorFromKey(key){return "script[async]"+key;}function acquireResource(hoistableRoot,resource,props){resource.count++;if(null===resource.instance)switch(resource.type){case "style":var instance=hoistableRoot.querySelector('style[data-href~="'+escapeSelectorAttributeValueInsideDoubleQuotes(props.href)+'"]');if(instance)return resource.instance=instance,markNodeAsHoistable(instance),instance;var styleProps=assign({},props,{"data-href":props.href,"data-precedence":props.precedence,href:null,precedence:null});instance=(hoistableRoot.ownerDocument||hoistableRoot).createElement("style");markNodeAsHoistable(instance);setInitialProperties(instance,"style",styleProps);insertStylesheet(instance,props.precedence,hoistableRoot);return resource.instance=instance;case "stylesheet":styleProps=getStyleKey(props.href);var instance$249=hoistableRoot.querySelector(getStylesheetSelectorFromKey(styleProps));if(instance$249)return resource.state.loading|=4,resource.instance=instance$249,markNodeAsHoistable(instance$249),instance$249;instance=stylesheetPropsFromRawProps(props);(styleProps=preloadPropsMap.get(styleProps))&&adoptPreloadPropsForStylesheet(instance,styleProps);instance$249=(hoistableRoot.ownerDocument||hoistableRoot).createElement("link");markNodeAsHoistable(instance$249);var linkInstance=instance$249;linkInstance._p=new Promise(function(resolve,reject){linkInstance.onload=resolve;linkInstance.onerror=reject;});setInitialProperties(instance$249,"link",instance);resource.state.loading|=4;insertStylesheet(instance$249,props.precedence,hoistableRoot);return resource.instance=instance$249;case "script":instance$249=getScriptKey(props.src);if(styleProps=hoistableRoot.querySelector(getScriptSelectorFromKey(instance$249)))return resource.instance=styleProps,markNodeAsHoistable(styleProps),styleProps;instance=props;if(styleProps=preloadPropsMap.get(instance$249))instance=assign({},props),adoptPreloadPropsForScript(instance,styleProps);hoistableRoot=hoistableRoot.ownerDocument||hoistableRoot;styleProps=hoistableRoot.createElement("script");markNodeAsHoistable(styleProps);setInitialProperties(styleProps,"link",instance);hoistableRoot.head.appendChild(styleProps);return resource.instance=styleProps;case "void":return null;default:throw Error(formatProdErrorMessage(443,resource.type));}else "stylesheet"===resource.type&&0===(resource.state.loading&4)&&(instance=resource.instance,resource.state.loading|=4,insertStylesheet(instance,props.precedence,hoistableRoot));return resource.instance;}function insertStylesheet(instance,precedence,root){for(var nodes=root.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),last=nodes.length?nodes[nodes.length-1]:null,prior=last,i=0;i<nodes.length;i++){var node=nodes[i];if(node.dataset.precedence===precedence)prior=node;else if(prior!==last)break;}prior?prior.parentNode.insertBefore(instance,prior.nextSibling):(precedence=9===root.nodeType?root.head:root,precedence.insertBefore(instance,precedence.firstChild));}function adoptPreloadPropsForStylesheet(stylesheetProps,preloadProps){null==stylesheetProps.crossOrigin&&(stylesheetProps.crossOrigin=preloadProps.crossOrigin);null==stylesheetProps.referrerPolicy&&(stylesheetProps.referrerPolicy=preloadProps.referrerPolicy);null==stylesheetProps.title&&(stylesheetProps.title=preloadProps.title);}function adoptPreloadPropsForScript(scriptProps,preloadProps){null==scriptProps.crossOrigin&&(scriptProps.crossOrigin=preloadProps.crossOrigin);null==scriptProps.referrerPolicy&&(scriptProps.referrerPolicy=preloadProps.referrerPolicy);null==scriptProps.integrity&&(scriptProps.integrity=preloadProps.integrity);}var tagCaches=null;function getHydratableHoistableCache(type,keyAttribute,ownerDocument){if(null===tagCaches){var cache=new Map();var caches=tagCaches=new Map();caches.set(ownerDocument,cache);}else caches=tagCaches,cache=caches.get(ownerDocument),cache||(cache=new Map(),caches.set(ownerDocument,cache));if(cache.has(type))return cache;cache.set(type,null);ownerDocument=ownerDocument.getElementsByTagName(type);for(caches=0;caches<ownerDocument.length;caches++){var node=ownerDocument[caches];if(!(node[internalHoistableMarker]||node[internalInstanceKey]||"link"===type&&"stylesheet"===node.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==node.namespaceURI){var nodeKey=node.getAttribute(keyAttribute)||"";nodeKey=type+nodeKey;var existing=cache.get(nodeKey);existing?existing.push(node):cache.set(nodeKey,[node]);}}return cache;}function mountHoistable(hoistableRoot,type,instance){hoistableRoot=hoistableRoot.ownerDocument||hoistableRoot;hoistableRoot.head.insertBefore(instance,"title"===type?hoistableRoot.querySelector("head > title"):null);}function isHostHoistableType(type,props,hostContext){if(1===hostContext||null!=props.itemProp)return  false;switch(type){case "meta":case "title":return  true;case "style":if("string"!==typeof props.precedence||"string"!==typeof props.href||""===props.href)break;return  true;case "link":if("string"!==typeof props.rel||"string"!==typeof props.href||""===props.href||props.onLoad||props.onError)break;switch(props.rel){case "stylesheet":return type=props.disabled,"string"===typeof props.precedence&&null==type;default:return  true;}case "script":if(props.async&&"function"!==typeof props.async&&"symbol"!==typeof props.async&&!props.onLoad&&!props.onError&&props.src&&"string"===typeof props.src)return  true;}return  false;}function preloadResource(resource){return "stylesheet"===resource.type&&0===(resource.state.loading&3)?false:true;}function suspendResource(state,hoistableRoot,resource,props){if("stylesheet"===resource.type&&("string"!==typeof props.media||false!==matchMedia(props.media).matches)&&0===(resource.state.loading&4)){if(null===resource.instance){var key=getStyleKey(props.href),instance=hoistableRoot.querySelector(getStylesheetSelectorFromKey(key));if(instance){hoistableRoot=instance._p;null!==hoistableRoot&&"object"===typeof hoistableRoot&&"function"===typeof hoistableRoot.then&&(state.count++,state=onUnsuspend.bind(state),hoistableRoot.then(state,state));resource.state.loading|=4;resource.instance=instance;markNodeAsHoistable(instance);return;}instance=hoistableRoot.ownerDocument||hoistableRoot;props=stylesheetPropsFromRawProps(props);(key=preloadPropsMap.get(key))&&adoptPreloadPropsForStylesheet(props,key);instance=instance.createElement("link");markNodeAsHoistable(instance);var linkInstance=instance;linkInstance._p=new Promise(function(resolve,reject){linkInstance.onload=resolve;linkInstance.onerror=reject;});setInitialProperties(instance,"link",props);resource.instance=instance;}null===state.stylesheets&&(state.stylesheets=new Map());state.stylesheets.set(resource,hoistableRoot);(hoistableRoot=resource.state.preload)&&0===(resource.state.loading&3)&&(state.count++,resource=onUnsuspend.bind(state),hoistableRoot.addEventListener("load",resource),hoistableRoot.addEventListener("error",resource));}}var estimatedBytesWithinLimit=0;function waitForCommitToBeReady(state,timeoutOffset){state.stylesheets&&0===state.count&&insertSuspendedStylesheets(state,state.stylesheets);return 0<state.count||0<state.imgCount?function(commit){var stylesheetTimer=setTimeout(function(){state.stylesheets&&insertSuspendedStylesheets(state,state.stylesheets);if(state.unsuspend){var unsuspend=state.unsuspend;state.unsuspend=null;unsuspend();}},6e4+timeoutOffset);0<state.imgBytes&&0===estimatedBytesWithinLimit&&(estimatedBytesWithinLimit=62500*estimateBandwidth());var imgTimer=setTimeout(function(){state.waitingForImages=false;if(0===state.count&&(state.stylesheets&&insertSuspendedStylesheets(state,state.stylesheets),state.unsuspend)){var unsuspend=state.unsuspend;state.unsuspend=null;unsuspend();}},(state.imgBytes>estimatedBytesWithinLimit?50:800)+timeoutOffset);state.unsuspend=commit;return function(){state.unsuspend=null;clearTimeout(stylesheetTimer);clearTimeout(imgTimer);};}:null;}function onUnsuspend(){this.count--;if(0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)insertSuspendedStylesheets(this,this.stylesheets);else if(this.unsuspend){var unsuspend=this.unsuspend;this.unsuspend=null;unsuspend();}}var precedencesByRoot=null;function insertSuspendedStylesheets(state,resources){state.stylesheets=null;null!==state.unsuspend&&(state.count++,precedencesByRoot=new Map(),resources.forEach(insertStylesheetIntoRoot,state),precedencesByRoot=null,onUnsuspend.call(state));}function insertStylesheetIntoRoot(root,resource){if(!(resource.state.loading&4)){var precedences=precedencesByRoot.get(root);if(precedences)var last=precedences.get(null);else {precedences=new Map();precedencesByRoot.set(root,precedences);for(var nodes=root.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<nodes.length;i++){var node=nodes[i];if("LINK"===node.nodeName||"not all"!==node.getAttribute("media"))precedences.set(node.dataset.precedence,node),last=node;}last&&precedences.set(null,last);}nodes=resource.instance;node=nodes.getAttribute("data-precedence");i=precedences.get(node)||last;i===last&&precedences.set(null,nodes);precedences.set(node,nodes);this.count++;last=onUnsuspend.bind(this);nodes.addEventListener("load",last);nodes.addEventListener("error",last);i?i.parentNode.insertBefore(nodes,i.nextSibling):(root=9===root.nodeType?root.head:root,root.insertBefore(nodes,root.firstChild));resource.state.loading|=4;}}var HostTransitionContext={$$typeof:REACT_CONTEXT_TYPE,Provider:null,Consumer:null,_currentValue:sharedNotPendingObject,_currentValue2:sharedNotPendingObject,_threadCount:0};function FiberRootNode(containerInfo,tag,hydrate,identifierPrefix,onUncaughtError,onCaughtError,onRecoverableError,onDefaultTransitionIndicator,formState){this.tag=1;this.containerInfo=containerInfo;this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null;this.callbackPriority=0;this.expirationTimes=createLaneMap(-1);this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=createLaneMap(0);this.hiddenUpdates=createLaneMap(null);this.identifierPrefix=identifierPrefix;this.onUncaughtError=onUncaughtError;this.onCaughtError=onCaughtError;this.onRecoverableError=onRecoverableError;this.pooledCache=null;this.pooledCacheLanes=0;this.formState=formState;this.incompleteTransitions=new Map();}function createFiberRoot(containerInfo,tag,hydrate,initialChildren,hydrationCallbacks,isStrictMode,identifierPrefix,formState,onUncaughtError,onCaughtError,onRecoverableError,onDefaultTransitionIndicator){containerInfo=new FiberRootNode(containerInfo,tag,hydrate,identifierPrefix,onUncaughtError,onCaughtError,onRecoverableError,onDefaultTransitionIndicator,formState);tag=1;true===isStrictMode&&(tag|=24);isStrictMode=createFiberImplClass(3,null,null,tag);containerInfo.current=isStrictMode;isStrictMode.stateNode=containerInfo;tag=createCache();tag.refCount++;containerInfo.pooledCache=tag;tag.refCount++;isStrictMode.memoizedState={element:initialChildren,isDehydrated:hydrate,cache:tag};initializeUpdateQueue(isStrictMode);return containerInfo;}function getContextForSubtree(parentComponent){if(!parentComponent)return emptyContextObject;parentComponent=emptyContextObject;return parentComponent;}function updateContainerImpl(rootFiber,lane,element,container,parentComponent,callback){parentComponent=getContextForSubtree(parentComponent);null===container.context?container.context=parentComponent:container.pendingContext=parentComponent;container=createUpdate(lane);container.payload={element:element};callback=void 0===callback?null:callback;null!==callback&&(container.callback=callback);element=enqueueUpdate(rootFiber,container,lane);null!==element&&(scheduleUpdateOnFiber(element,rootFiber,lane),entangleTransitions(element,rootFiber,lane));}function markRetryLaneImpl(fiber,retryLane){fiber=fiber.memoizedState;if(null!==fiber&&null!==fiber.dehydrated){var a=fiber.retryLane;fiber.retryLane=0!==a&&a<retryLane?a:retryLane;}}function markRetryLaneIfNotHydrated(fiber,retryLane){markRetryLaneImpl(fiber,retryLane);(fiber=fiber.alternate)&&markRetryLaneImpl(fiber,retryLane);}function attemptContinuousHydration(fiber){if(13===fiber.tag||31===fiber.tag){var root=enqueueConcurrentRenderForLane(fiber,67108864);null!==root&&scheduleUpdateOnFiber(root,fiber,67108864);markRetryLaneIfNotHydrated(fiber,67108864);}}function attemptHydrationAtCurrentPriority(fiber){if(13===fiber.tag||31===fiber.tag){var lane=requestUpdateLane();lane=getBumpedLaneForHydrationByLane(lane);var root=enqueueConcurrentRenderForLane(fiber,lane);null!==root&&scheduleUpdateOnFiber(root,fiber,lane);markRetryLaneIfNotHydrated(fiber,lane);}}var _enabled=true;function dispatchDiscreteEvent(domEventName,eventSystemFlags,container,nativeEvent){var prevTransition=ReactSharedInternals.T;ReactSharedInternals.T=null;var previousPriority=ReactDOMSharedInternals.p;try{ReactDOMSharedInternals.p=2,dispatchEvent(domEventName,eventSystemFlags,container,nativeEvent);}finally{ReactDOMSharedInternals.p=previousPriority,ReactSharedInternals.T=prevTransition;}}function dispatchContinuousEvent(domEventName,eventSystemFlags,container,nativeEvent){var prevTransition=ReactSharedInternals.T;ReactSharedInternals.T=null;var previousPriority=ReactDOMSharedInternals.p;try{ReactDOMSharedInternals.p=8,dispatchEvent(domEventName,eventSystemFlags,container,nativeEvent);}finally{ReactDOMSharedInternals.p=previousPriority,ReactSharedInternals.T=prevTransition;}}function dispatchEvent(domEventName,eventSystemFlags,targetContainer,nativeEvent){if(_enabled){var blockedOn=findInstanceBlockingEvent(nativeEvent);if(null===blockedOn)dispatchEventForPluginEventSystem(domEventName,eventSystemFlags,nativeEvent,return_targetInst,targetContainer),clearIfContinuousEvent(domEventName,nativeEvent);else if(queueIfContinuousEvent(blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent))nativeEvent.stopPropagation();else if(clearIfContinuousEvent(domEventName,nativeEvent),eventSystemFlags&4&&-1<discreteReplayableEvents.indexOf(domEventName)){for(;null!==blockedOn;){var fiber=getInstanceFromNode(blockedOn);if(null!==fiber)switch(fiber.tag){case 3:fiber=fiber.stateNode;if(fiber.current.memoizedState.isDehydrated){var lanes=getHighestPriorityLanes(fiber.pendingLanes);if(0!==lanes){var root=fiber;root.pendingLanes|=2;for(root.entangledLanes|=2;lanes;){var lane=1<<31-clz32(lanes);root.entanglements[1]|=lane;lanes&=~lane;}ensureRootIsScheduled(fiber);0===(executionContext&6)&&(workInProgressRootRenderTargetTime=now()+500,flushSyncWorkAcrossRoots_impl(0));}}break;case 31:case 13:root=enqueueConcurrentRenderForLane(fiber,2),null!==root&&scheduleUpdateOnFiber(root,fiber,2),flushSyncWork$1(),markRetryLaneIfNotHydrated(fiber,2);}fiber=findInstanceBlockingEvent(nativeEvent);null===fiber&&dispatchEventForPluginEventSystem(domEventName,eventSystemFlags,nativeEvent,return_targetInst,targetContainer);if(fiber===blockedOn)break;blockedOn=fiber;}null!==blockedOn&&nativeEvent.stopPropagation();}else dispatchEventForPluginEventSystem(domEventName,eventSystemFlags,nativeEvent,null,targetContainer);}}function findInstanceBlockingEvent(nativeEvent){nativeEvent=getEventTarget$1(nativeEvent);return findInstanceBlockingTarget(nativeEvent);}var return_targetInst=null;function findInstanceBlockingTarget(targetNode){return_targetInst=null;targetNode=getClosestInstanceFromNode(targetNode);if(null!==targetNode){var nearestMounted=getNearestMountedFiber(targetNode);if(null===nearestMounted)targetNode=null;else {var tag=nearestMounted.tag;if(13===tag){targetNode=getSuspenseInstanceFromFiber(nearestMounted);if(null!==targetNode)return targetNode;targetNode=null;}else if(31===tag){targetNode=getActivityInstanceFromFiber(nearestMounted);if(null!==targetNode)return targetNode;targetNode=null;}else if(3===tag){if(nearestMounted.stateNode.current.memoizedState.isDehydrated)return 3===nearestMounted.tag?nearestMounted.stateNode.containerInfo:null;targetNode=null;}else nearestMounted!==targetNode&&(targetNode=null);}}return_targetInst=targetNode;return null;}function getEventPriority(domEventName){switch(domEventName){case "beforetoggle":case "cancel":case "click":case "close":case "contextmenu":case "copy":case "cut":case "auxclick":case "dblclick":case "dragend":case "dragstart":case "drop":case "focusin":case "focusout":case "input":case "invalid":case "keydown":case "keypress":case "keyup":case "mousedown":case "mouseup":case "paste":case "pause":case "play":case "pointercancel":case "pointerdown":case "pointerup":case "ratechange":case "reset":case "resize":case "seeked":case "submit":case "toggle":case "touchcancel":case "touchend":case "touchstart":case "volumechange":case "change":case "selectionchange":case "textInput":case "compositionstart":case "compositionend":case "compositionupdate":case "beforeblur":case "afterblur":case "beforeinput":case "blur":case "fullscreenchange":case "focus":case "hashchange":case "popstate":case "select":case "selectstart":return 2;case "drag":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "mousemove":case "mouseout":case "mouseover":case "pointermove":case "pointerout":case "pointerover":case "scroll":case "touchmove":case "wheel":case "mouseenter":case "mouseleave":case "pointerenter":case "pointerleave":return 8;case "message":switch(getCurrentPriorityLevel()){case ImmediatePriority:return 2;case UserBlockingPriority:return 8;case NormalPriority$1:case LowPriority:return 32;case IdlePriority:return 268435456;default:return 32;}default:return 32;}}var hasScheduledReplayAttempt=false,queuedFocus=null,queuedDrag=null,queuedMouse=null,queuedPointers=new Map(),queuedPointerCaptures=new Map(),queuedExplicitHydrationTargets=[],discreteReplayableEvents="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function clearIfContinuousEvent(domEventName,nativeEvent){switch(domEventName){case "focusin":case "focusout":queuedFocus=null;break;case "dragenter":case "dragleave":queuedDrag=null;break;case "mouseover":case "mouseout":queuedMouse=null;break;case "pointerover":case "pointerout":queuedPointers.delete(nativeEvent.pointerId);break;case "gotpointercapture":case "lostpointercapture":queuedPointerCaptures.delete(nativeEvent.pointerId);}}function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent,blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent){if(null===existingQueuedEvent||existingQueuedEvent.nativeEvent!==nativeEvent)return existingQueuedEvent={blockedOn:blockedOn,domEventName:domEventName,eventSystemFlags:eventSystemFlags,nativeEvent:nativeEvent,targetContainers:[targetContainer]},null!==blockedOn&&(blockedOn=getInstanceFromNode(blockedOn),null!==blockedOn&&attemptContinuousHydration(blockedOn)),existingQueuedEvent;existingQueuedEvent.eventSystemFlags|=eventSystemFlags;blockedOn=existingQueuedEvent.targetContainers;null!==targetContainer&&-1===blockedOn.indexOf(targetContainer)&&blockedOn.push(targetContainer);return existingQueuedEvent;}function queueIfContinuousEvent(blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent){switch(domEventName){case "focusin":return queuedFocus=accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus,blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent),true;case "dragenter":return queuedDrag=accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag,blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent),true;case "mouseover":return queuedMouse=accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse,blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent),true;case "pointerover":var pointerId=nativeEvent.pointerId;queuedPointers.set(pointerId,accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId)||null,blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent));return  true;case "gotpointercapture":return pointerId=nativeEvent.pointerId,queuedPointerCaptures.set(pointerId,accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(pointerId)||null,blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent)),true;}return  false;}function attemptExplicitHydrationTarget(queuedTarget){var targetInst=getClosestInstanceFromNode(queuedTarget.target);if(null!==targetInst){var nearestMounted=getNearestMountedFiber(targetInst);if(null!==nearestMounted)if(targetInst=nearestMounted.tag,13===targetInst){if(targetInst=getSuspenseInstanceFromFiber(nearestMounted),null!==targetInst){queuedTarget.blockedOn=targetInst;runWithPriority(queuedTarget.priority,function(){attemptHydrationAtCurrentPriority(nearestMounted);});return;}}else if(31===targetInst){if(targetInst=getActivityInstanceFromFiber(nearestMounted),null!==targetInst){queuedTarget.blockedOn=targetInst;runWithPriority(queuedTarget.priority,function(){attemptHydrationAtCurrentPriority(nearestMounted);});return;}}else if(3===targetInst&&nearestMounted.stateNode.current.memoizedState.isDehydrated){queuedTarget.blockedOn=3===nearestMounted.tag?nearestMounted.stateNode.containerInfo:null;return;}}queuedTarget.blockedOn=null;}function attemptReplayContinuousQueuedEvent(queuedEvent){if(null!==queuedEvent.blockedOn)return  false;for(var targetContainers=queuedEvent.targetContainers;0<targetContainers.length;){var nextBlockedOn=findInstanceBlockingEvent(queuedEvent.nativeEvent);if(null===nextBlockedOn){nextBlockedOn=queuedEvent.nativeEvent;var nativeEventClone=new nextBlockedOn.constructor(nextBlockedOn.type,nextBlockedOn);currentReplayingEvent=nativeEventClone;nextBlockedOn.target.dispatchEvent(nativeEventClone);currentReplayingEvent=null;}else return targetContainers=getInstanceFromNode(nextBlockedOn),null!==targetContainers&&attemptContinuousHydration(targetContainers),queuedEvent.blockedOn=nextBlockedOn,false;targetContainers.shift();}return  true;}function attemptReplayContinuousQueuedEventInMap(queuedEvent,key,map){attemptReplayContinuousQueuedEvent(queuedEvent)&&map.delete(key);}function replayUnblockedEvents(){hasScheduledReplayAttempt=false;null!==queuedFocus&&attemptReplayContinuousQueuedEvent(queuedFocus)&&(queuedFocus=null);null!==queuedDrag&&attemptReplayContinuousQueuedEvent(queuedDrag)&&(queuedDrag=null);null!==queuedMouse&&attemptReplayContinuousQueuedEvent(queuedMouse)&&(queuedMouse=null);queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);}function scheduleCallbackIfUnblocked(queuedEvent,unblocked){queuedEvent.blockedOn===unblocked&&(queuedEvent.blockedOn=null,hasScheduledReplayAttempt||(hasScheduledReplayAttempt=true,Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority,replayUnblockedEvents)));}var lastScheduledReplayQueue=null;function scheduleReplayQueueIfNeeded(formReplayingQueue){lastScheduledReplayQueue!==formReplayingQueue&&(lastScheduledReplayQueue=formReplayingQueue,Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority,function(){lastScheduledReplayQueue===formReplayingQueue&&(lastScheduledReplayQueue=null);for(var i=0;i<formReplayingQueue.length;i+=3){var form=formReplayingQueue[i],submitterOrAction=formReplayingQueue[i+1],formData=formReplayingQueue[i+2];if("function"!==typeof submitterOrAction)if(null===findInstanceBlockingTarget(submitterOrAction||form))continue;else break;var formInst=getInstanceFromNode(form);null!==formInst&&(formReplayingQueue.splice(i,3),i-=3,startHostTransition(formInst,{pending:true,data:formData,method:form.method,action:submitterOrAction},submitterOrAction,formData));}}));}function retryIfBlockedOn(unblocked){function unblock(queuedEvent){return scheduleCallbackIfUnblocked(queuedEvent,unblocked);}null!==queuedFocus&&scheduleCallbackIfUnblocked(queuedFocus,unblocked);null!==queuedDrag&&scheduleCallbackIfUnblocked(queuedDrag,unblocked);null!==queuedMouse&&scheduleCallbackIfUnblocked(queuedMouse,unblocked);queuedPointers.forEach(unblock);queuedPointerCaptures.forEach(unblock);for(var i=0;i<queuedExplicitHydrationTargets.length;i++){var queuedTarget=queuedExplicitHydrationTargets[i];queuedTarget.blockedOn===unblocked&&(queuedTarget.blockedOn=null);}for(;0<queuedExplicitHydrationTargets.length&&(i=queuedExplicitHydrationTargets[0],null===i.blockedOn);)attemptExplicitHydrationTarget(i),null===i.blockedOn&&queuedExplicitHydrationTargets.shift();i=(unblocked.ownerDocument||unblocked).$$reactFormReplay;if(null!=i)for(queuedTarget=0;queuedTarget<i.length;queuedTarget+=3){var form=i[queuedTarget],submitterOrAction=i[queuedTarget+1],formProps=form[internalPropsKey]||null;if("function"===typeof submitterOrAction)formProps||scheduleReplayQueueIfNeeded(i);else if(formProps){var action=null;if(submitterOrAction&&submitterOrAction.hasAttribute("formAction")){if(form=submitterOrAction,formProps=submitterOrAction[internalPropsKey]||null)action=formProps.formAction;else {if(null!==findInstanceBlockingTarget(form))continue;}}else action=formProps.action;"function"===typeof action?i[queuedTarget+1]=action:(i.splice(queuedTarget,3),queuedTarget-=3);scheduleReplayQueueIfNeeded(i);}}}function defaultOnDefaultTransitionIndicator(){function handleNavigate(event){event.canIntercept&&"react-transition"===event.info&&event.intercept({handler:function(){return new Promise(function(resolve){return pendingResolve=resolve;});},focusReset:"manual",scroll:"manual"});}function handleNavigateComplete(){null!==pendingResolve&&(pendingResolve(),pendingResolve=null);isCancelled||setTimeout(startFakeNavigation,20);}function startFakeNavigation(){if(!isCancelled&&!navigation.transition){var currentEntry=navigation.currentEntry;currentEntry&&null!=currentEntry.url&&navigation.navigate(currentEntry.url,{state:currentEntry.getState(),info:"react-transition",history:"replace"});}}if("object"===typeof navigation){var isCancelled=false,pendingResolve=null;navigation.addEventListener("navigate",handleNavigate);navigation.addEventListener("navigatesuccess",handleNavigateComplete);navigation.addEventListener("navigateerror",handleNavigateComplete);setTimeout(startFakeNavigation,100);return function(){isCancelled=true;navigation.removeEventListener("navigate",handleNavigate);navigation.removeEventListener("navigatesuccess",handleNavigateComplete);navigation.removeEventListener("navigateerror",handleNavigateComplete);null!==pendingResolve&&(pendingResolve(),pendingResolve=null);};}}function ReactDOMRoot(internalRoot){this._internalRoot=internalRoot;}ReactDOMHydrationRoot.prototype.render=ReactDOMRoot.prototype.render=function(children){var root=this._internalRoot;if(null===root)throw Error(formatProdErrorMessage(409));var current=root.current,lane=requestUpdateLane();updateContainerImpl(current,lane,children,root,null,null);};ReactDOMHydrationRoot.prototype.unmount=ReactDOMRoot.prototype.unmount=function(){var root=this._internalRoot;if(null!==root){this._internalRoot=null;var container=root.containerInfo;updateContainerImpl(root.current,2,null,root,null,null);flushSyncWork$1();container[internalContainerInstanceKey]=null;}};function ReactDOMHydrationRoot(internalRoot){this._internalRoot=internalRoot;}ReactDOMHydrationRoot.prototype.unstable_scheduleHydration=function(target){if(target){var updatePriority=resolveUpdatePriority();target={blockedOn:null,target:target,priority:updatePriority};for(var i=0;i<queuedExplicitHydrationTargets.length&&0!==updatePriority&&updatePriority<queuedExplicitHydrationTargets[i].priority;i++);queuedExplicitHydrationTargets.splice(i,0,target);0===i&&attemptExplicitHydrationTarget(target);}};var isomorphicReactPackageVersion$jscomp$inline_1840=React.version;if("19.2.8"!==isomorphicReactPackageVersion$jscomp$inline_1840)throw Error(formatProdErrorMessage(527,isomorphicReactPackageVersion$jscomp$inline_1840,"19.2.8"));ReactDOMSharedInternals.findDOMNode=function(componentOrElement){var fiber=componentOrElement._reactInternals;if(void 0===fiber){if("function"===typeof componentOrElement.render)throw Error(formatProdErrorMessage(188));componentOrElement=Object.keys(componentOrElement).join(",");throw Error(formatProdErrorMessage(268,componentOrElement));}componentOrElement=findCurrentFiberUsingSlowPath(fiber);componentOrElement=null!==componentOrElement?findCurrentHostFiberImpl(componentOrElement):null;componentOrElement=null===componentOrElement?null:componentOrElement.stateNode;return componentOrElement;};var internals$jscomp$inline_2347={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:ReactSharedInternals,reconcilerVersion:"19.2.8"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var hook$jscomp$inline_2348=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hook$jscomp$inline_2348.isDisabled&&hook$jscomp$inline_2348.supportsFiber)try{rendererID=hook$jscomp$inline_2348.inject(internals$jscomp$inline_2347),injectedHook=hook$jscomp$inline_2348;}catch(err){}}reactDomClient_production.createRoot=function(container,options){if(!isValidContainer(container))throw Error(formatProdErrorMessage(299));var isStrictMode=false,identifierPrefix="",onUncaughtError=defaultOnUncaughtError,onCaughtError=defaultOnCaughtError,onRecoverableError=defaultOnRecoverableError;null!==options&&void 0!==options&&(true===options.unstable_strictMode&&(isStrictMode=true),void 0!==options.identifierPrefix&&(identifierPrefix=options.identifierPrefix),void 0!==options.onUncaughtError&&(onUncaughtError=options.onUncaughtError),void 0!==options.onCaughtError&&(onCaughtError=options.onCaughtError),void 0!==options.onRecoverableError&&(onRecoverableError=options.onRecoverableError));options=createFiberRoot(container,1,false,null,null,isStrictMode,identifierPrefix,null,onUncaughtError,onCaughtError,onRecoverableError,defaultOnDefaultTransitionIndicator);container[internalContainerInstanceKey]=options.current;listenToAllSupportedEvents(container);return new ReactDOMRoot(options);};reactDomClient_production.hydrateRoot=function(container,initialChildren,options){if(!isValidContainer(container))throw Error(formatProdErrorMessage(299));var isStrictMode=false,identifierPrefix="",onUncaughtError=defaultOnUncaughtError,onCaughtError=defaultOnCaughtError,onRecoverableError=defaultOnRecoverableError,formState=null;null!==options&&void 0!==options&&(true===options.unstable_strictMode&&(isStrictMode=true),void 0!==options.identifierPrefix&&(identifierPrefix=options.identifierPrefix),void 0!==options.onUncaughtError&&(onUncaughtError=options.onUncaughtError),void 0!==options.onCaughtError&&(onCaughtError=options.onCaughtError),void 0!==options.onRecoverableError&&(onRecoverableError=options.onRecoverableError),void 0!==options.formState&&(formState=options.formState));initialChildren=createFiberRoot(container,1,true,initialChildren,null!=options?options:null,isStrictMode,identifierPrefix,formState,onUncaughtError,onCaughtError,onRecoverableError,defaultOnDefaultTransitionIndicator);initialChildren.context=getContextForSubtree(null);options=initialChildren.current;isStrictMode=requestUpdateLane();isStrictMode=getBumpedLaneForHydrationByLane(isStrictMode);identifierPrefix=createUpdate(isStrictMode);identifierPrefix.callback=null;enqueueUpdate(options,identifierPrefix,isStrictMode);options=isStrictMode;initialChildren.current.lanes=options;markRootUpdated$1(initialChildren,options);ensureRootIsScheduled(initialChildren);container[internalContainerInstanceKey]=initialChildren.current;listenToAllSupportedEvents(container);return new ReactDOMHydrationRoot(initialChildren);};reactDomClient_production.version="19.2.8";

function checkDCE() {
  /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function') {
    return;
  }
  try {
    // Verify that the code above has been dead code eliminated (DCE'd).
    __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
  } catch (err) {
    // DevTools shouldn't crash React, no matter what.
    // We should still report in case we break this code.
    console.error(err);
  }
}
{
  // DCE check should happen before ReactDOM bundle executes so that
  // DevTools can report bad minification during injection.
  checkDCE();
  client.exports = reactDomClient_production;
}
var clientExports = client.exports;

/**
 * Assign x/y coordinates to every node in place, stacking children vertically
 * and spreading tree depth horizontally.
 * @param data - Nodes to lay out; mutated in place.
 * @param options - Layout origin and spacing between nodes.
 */
function calculatePosition(data, options = {}) {
  const {
    x = 0,
    y = 22,
    spacingVertical = 30,
    spacingHorizontal = 140
  } = options;
  calculateInnerBoxSize(data, {
    spacingVertical,
    spacingHorizontal
  });
  calculatePositionSS(data, {
    x,
    y,
    spacingVertical,
    spacingHorizontal
  });
}
function calculateInnerBoxSize(data, options) {
  for (const datum of data) {
    if (datum.children) {
      calculateInnerBoxSize(datum.children, options);
      datum.childrenBoxSize = {
        width: datum.position.width + options.spacingHorizontal + Math.max(...datum.children.map(d => d.childrenBoxSize.width)),
        height: Math.max(datum.position.height, options.spacingVertical * (datum.children.length - 1) + datum.children.map(d => d.childrenBoxSize.height).reduce((a, b) => a + b, 0))
      };
    } else {
      datum.childrenBoxSize = {
        width: datum.position.width,
        height: datum.position.height
      };
    }
  }
}
function calculatePositionSS(data, options) {
  let y = options.y;
  for (const datum of data) {
    if (datum.children) {
      calculatePositionSS(datum.children, {
        ...options,
        x: options.x + datum.position.width + options.spacingHorizontal,
        y
      });
    }
    datum.position.x = options.x;
    datum.position.y = datum.childrenBoxSize.height / 2 - datum.position.height / 2 + y;
    y += datum.childrenBoxSize.height + options.spacingVertical;
    datum.anchor = {
      left: {
        x: datum.position.x,
        y: datum.position.y + datum.position.height / 2
      },
      right: {
        x: datum.position.x + datum.position.width,
        y: datum.position.y + datum.position.height / 2
      }
    };
    datum.childrenBoxSize.height = datum.childrenBoxSize.height + options.spacingVertical;
  }
}

const refX = 10;

/**
 * Render a label split on newlines as stacked `<tspan>` lines, offset so the
 * block sits above, centered on, or below the baseline.
 * @param props - The multi-line label and its vertical anchoring.
 * @param props.label - Text to draw; each newline starts a new line.
 * @param props.verticalPosition - Anchors the block above, on, or below the baseline.
 * @returns One `<tspan>` per line.
 */
function MultilineText(props) {
  const {
    label,
    verticalPosition
  } = props;
  if (!label) return;
  const lines = label.split(/\r?\n/);
  const firstDX = verticalPosition === 'top' ? 1 : verticalPosition === 'center' ? -lines.length / 2 + 0.5 : -lines.length;
  return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
    children: lines.map((line, index) => jsxRuntimeExports.jsx("tspan", {
      x: "0",
      dy: index === 0 ? `${firstDX}em` : '1em',
      children: line
    }, index))
  });
}

/**
 * Draw a text label at a point, painted twice (a light halo stroke under a solid
 * fill) so it stays readable over arrows and molecules.
 * @param props - Label content and placement.
 * @param props.x - Horizontal anchor coordinate.
 * @param props.y - Vertical anchor coordinate.
 * @param props.label - Text to draw; may contain newlines.
 * @param props.horizontalPosition - Text anchor: start, middle or end.
 * @param props.verticalPosition - Vertical alignment of the text block.
 * @returns The haloed label, as two overlaid `<text>` elements.
 */
function Text$1(props) {
  const {
    x,
    y,
    label,
    verticalPosition,
    horizontalPosition
  } = props;
  const transform = `translate(${x},${y})`;
  let textAnchor;
  switch (horizontalPosition) {
    case 'left':
      textAnchor = 'start';
      break;
    case 'center':
      textAnchor = 'middle';
      break;
    case 'right':
      textAnchor = 'end';
      break;
    default:
      textAnchor = 'middle';
  }
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
    children: [jsxRuntimeExports.jsx("text", {
      textAnchor: textAnchor,
      transform: transform,
      stroke: "rgba(255,255,255,0.5)",
      strokeWidth: "0.5em",
      fill: "none",
      fontSize: "14",
      children: jsxRuntimeExports.jsx(MultilineText, {
        label: label,
        verticalPosition: verticalPosition
      })
    }), jsxRuntimeExports.jsx("text", {
      textAnchor: textAnchor,
      transform: transform,
      stroke: "none",
      fontSize: "14",
      fill: "black",
      children: jsxRuntimeExports.jsx(MultilineText, {
        label: label,
        verticalPosition: verticalPosition
      })
    })]
  });
}

/**
 * Draw a curved arrow between two points, bending at their midpoint.
 * Relies on a marker with id="arrowhead" being defined in the SVG.
 * @param props - Arrow configuration.
 * @param props.id - Optional id set on the arrow's group.
 * @param props.from - Start point (parent's right anchor).
 * @param props.to - End point (child's left anchor).
 * @param props.label - Text drawn next to the arrow.
 * @param props.horizontalPosition - Where the label sits along the arrow. Defaults to `'center'`.
 * @param props.verticalPosition - Vertical alignment of the label.
 * @returns The arrow group: the path and, when a label is given, its text.
 */
function Arrow(props) {
  const {
    id,
    from,
    to,
    label,
    horizontalPosition = 'center',
    verticalPosition = 'center'
  } = props;
  const middle = {
    x: (from.x + to.x) / 2,
    y: (from.y + to.y) / 2
  };
  const headInflectionPoint = {
    x: to.x - refX * 2,
    // refX attribute of the marker element in the Arrow component shifts the arrow head to the left, and that the vertices of the arrow head are set to refX, which means that the beginning of the arrow head is refX * 2 to the left.
    y: to.y
  };
  const d = `M ${from.x} ${from.y} C ${middle.x} ${from.y}  ${middle.x} ${to.y}  ${headInflectionPoint.x} ${to.y} Q ${headInflectionPoint.x} ${to.y}  ${to.x} ${to.y} `;
  return jsxRuntimeExports.jsxs("g", {
    id: id,
    children: [jsxRuntimeExports.jsx("path", {
      d: d,
      style: {
        fill: 'none',
        strokeWidth: '2',
        stroke: 'black',
        markerEnd: 'url(#arrowhead)'
      }
    }), horizontalPosition === 'center' && jsxRuntimeExports.jsx(Text$1, {
      x: middle.x,
      y: middle.y,
      label: label,
      horizontalPosition: horizontalPosition,
      verticalPosition: verticalPosition
    }), horizontalPosition === 'right' && jsxRuntimeExports.jsx(Text$1, {
      x: to.x - 12,
      y: to.y - 8,
      label: label,
      horizontalPosition: "right",
      verticalPosition: verticalPosition
    }), horizontalPosition === 'left' && jsxRuntimeExports.jsx(Text$1, {
      x: from.x + 12,
      y: from.y + 8,
      label: label,
      horizontalPosition: "left",
      verticalPosition: verticalPosition
    })]
  });
}

/**
 * Build the connector arrows that link each parent node to its children.
 * @param nodes - Positioned nodes, each carrying left/right `anchor` points.
 * @param options - Label and id callbacks plus label placement.
 * @returns One arrow element per parent-to-child edge.
 */
function getArrows(nodes, options = {}) {
  const status = {
    level: 0
  };
  const arrows = [];
  getArrowsSS(nodes, arrows, status, options);
  return arrows;
}
function getArrowsSS(nodes, arrows, status, options = {}) {
  const {
    getLabel,
    horizontalPosition,
    getID,
    verticalPosition
  } = options;
  for (const node of nodes) {
    if (node.children) {
      for (const child of node.children) {
        arrows.push(jsxRuntimeExports.jsx(Arrow, {
          id: getID ? getID(node) : undefined,
          from: node.anchor.right,
          to: child.anchor.left,
          label: getLabel?.(child),
          horizontalPosition: horizontalPosition,
          verticalPosition: verticalPosition
        }, arrows.length));
      }
      getArrowsSS(node.children, arrows, {
        ...status,
        level: status.level + 1
      }, options);
    }
  }
}

/**
 * Flatten the positioned tree into one translated SVG group per node.
 * @param nodes - Positioned nodes, each carrying its `position` and rendered `element`.
 * @param options - May provide `getID` to stamp an id on each group.
 * @returns One `<g>` element per node, moved to the node's computed coordinates.
 */
function getBoxes(nodes, options) {
  const boxes = [];
  appendBoxes(nodes, boxes, options);
  return boxes;
}
function appendBoxes(nodes, boxes, options = {}) {
  const {
    getID
  } = options;
  for (const node of nodes) {
    boxes.push(jsxRuntimeExports.jsx("g", {
      id: getID ? getID(node) : undefined,
      transform: `translate(${node.position.x} ${node.position.y})`,
      children: node.element
    }, boxes.length));
    if (node.children) {
      appendBoxes(node.children, boxes, options);
    }
  }
}

/**
 * Deep-clone the tree and attach, to every node, the rendered SVG `element` and
 * its intrinsic `position` size produced by the node renderer.
 * @param data - Root nodes of the tree to render.
 * @param options - Node renderer, its options and the optional branch-skipping callback.
 * @returns The annotated clone, ready to be laid out and drawn.
 */
function prepareTree(data, options) {
  data = structuredClone(data);
  prepareTreeSS(data, options);
  return data;
}
function prepareTreeSS(data, options) {
  const {
    nodeRenderer,
    nodeRendererOptions = {},
    shouldSkipBranch
  } = options;
  for (const datum of data) {
    if (options.parent) {
      datum.parent = options.parent;
    }
    const elementAndSize = nodeRenderer(datum, nodeRendererOptions);
    datum.position = {
      x: 0,
      y: 0,
      width: elementAndSize.width,
      height: elementAndSize.height
    };
    datum.element = elementAndSize.element;
    if (datum.children?.length === 0) {
      delete datum.children;
    }
    if (datum.children) {
      if (shouldSkipBranch) {
        const parents = [datum];
        let parent = datum.parent;
        while (parent) {
          parents.push(parent);
          parent = parent.parent;
        }
        datum.children = datum.children.filter(child => !shouldSkipBranch(child, parents));
      }
      prepareTreeSS(datum.children, {
        ...options,
        parent: datum
      });
    }
  }
}

/**
 * Define the shared "arrowhead" marker reused as the tip of every connector arrow.
 * @returns SVG `<defs>` holding the arrowhead marker.
 */
function MarkerDef() {
  return jsxRuntimeExports.jsx("defs", {
    children: jsxRuntimeExports.jsx("marker", {
      id: "arrowhead",
      markerWidth: "10",
      markerHeight: "7",
      refX: refX,
      refY: "3.5",
      orient: "auto",
      children: jsxRuntimeExports.jsx("polygon", {
        points: "0 0, 10 3.5, 0 7"
      })
    })
  });
}

/**
 * Top-level component: prepare, lay out and draw the whole tree as one SVG,
 * sized to fit its content, with node boxes and the arrows connecting them.
 * @param props - The `tree` plus node, arrow and position option objects.
 * @returns The complete `<svg>` element.
 */
function SVGBoxesTree(props) {
  const {
    tree,
    ...options
  } = props;
  const {
    arrowRendererOptions,
    nodeRendererOptions,
    positionOptions
  } = options;
  const data = prepareTree(tree, options);
  calculatePosition(data, positionOptions);
  const boxes = getBoxes(data, nodeRendererOptions);
  const arrows = getArrows(data, arrowRendererOptions);
  const svgSize = {
    width: 0,
    height: 0
  };
  const width = [];
  for (const datum of data) {
    width.push(datum.childrenBoxSize.width);
    svgSize.height += datum.childrenBoxSize.height;
  }
  svgSize.width = Math.max(...width);
  return jsxRuntimeExports.jsxs("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    viewBox: `0 0 ${svgSize.width} ${svgSize.height}`,
    children: [jsxRuntimeExports.jsx(MarkerDef, {}), boxes, arrows]
  });
}

/**
 * Render a tree to a standalone SVG markup string. `flushSync` forces a
 * synchronous render so the markup is ready right away, which is what makes
 * server-side SVG generation possible.
 * @param tree - Root nodes of the tree to draw.
 * @param options - Node renderer and layout options forwarded to the tree.
 * @returns The SVG document as an HTML string.
 */
function render(tree, options) {
  const element = jsxRuntimeExports.jsx(SVGBoxesTree, {
    tree: tree,
    ...options
  });
  const div = document.createElement('div');
  const root = clientExports.createRoot(div);
  reactDomExports.flushSync(() => {
    root.render(element);
  });
  return div.innerHTML;
}

/**
 * Thin wrapper around the SVG `<rect>` element, forwarding all props.
 * @param props - Any SVG rect attributes (size, position, style…).
 * @returns The `<rect>` element.
 */
function Rectangle(props) {
  return jsxRuntimeExports.jsx("rect", {
    ...props
  });
}

/**
 * Inject an already-rendered SVG fragment (e.g. a molecule) into the tree.
 * @param props - Wrapper for the raw SVG markup.
 * @param props.svg - The SVG fragment to inject; renders nothing when empty.
 * @returns A group holding the injected markup, or null when there is nothing to draw.
 */
function SVG$1(props) {
  if (!props.svg) return null;
  return jsxRuntimeExports.jsx("g", {
    dangerouslySetInnerHTML: {
      __html: props.svg
    }
  });
}

/**
 * Node renderer for reaction/molecule trees: draw a node's molecule(s) and its
 * top label inside a bordered box, and report the box's measured size.
 * @param node - The tree node to render.
 * @param nodeRendererOptions - Callbacks and limits controlling molecule extraction and styling.
 * @returns The node's rendered `element` with its `width` and `height`.
 */
function moleculeRenderer(node, nodeRendererOptions) {
  const molecules = getMolecules(node, nodeRendererOptions);
  const topLabel = getTopLabel(node, nodeRendererOptions);
  const width = Math.max(molecules.width, topLabel.width);
  const height = Math.max(molecules.height, topLabel.height);
  return {
    width,
    height,
    element: jsxRuntimeExports.jsxs("g", {
      children: [jsxRuntimeExports.jsx(Rectangle, {
        width: width,
        height: height,
        style: {
          stroke: 'black',
          fill: 'white',
          ...node.style,
          ...nodeRendererOptions.getBoxStyle?.(node)
        }
      }), molecules.element, topLabel.element]
    })
  };
}
function getTopLabel(node, options = {}) {
  const label = options.getTopLabel?.(node) || node.label;
  if (!label) {
    return {
      width: 0,
      height: 0,
      element: null
    };
  }
  return {
    width: 200,
    height: 20,
    element: jsxRuntimeExports.jsx("text", {
      x: 0,
      y: -6,
      textAnchor: "start",
      stroke: "none",
      fontSize: "14",
      fill: "black",
      children: label
    })
  };
}
/**
 * Lay out every molecule of a node side by side, scaling each to fit the size
 * limits; supports reaction nodes that carry several molecules.
 * @param node - The tree node whose molecules are drawn.
 * @param options - Molecule extraction callbacks and per-molecule size limits.
 * @returns The combined drawing with its overall `width` and `height`.
 */
function getMolecules(node, options) {
  const {
    maxWidth = 200,
    maxHeight = 150,
    getMolecules,
    getMoleculeStyle
  } = options;
  if (!getMolecules) {
    throw new Error('getMolecules is not defined');
  }
  const molecules = getMolecules(node);
  if (!molecules) {
    return {
      width: 0,
      height: 0,
      element: undefined
    };
  }
  const svgs = molecules.filter(Boolean).map((molecule, index) => {
    const svg = molecule.toSVG(maxWidth, maxHeight, undefined, {
      autoCrop: true,
      autoCropMargin: 10,
      suppressChiralText: true
    });
    if (getMoleculeStyle) {
      return addStyleToSVG(svg, getMoleculeStyle(molecule, node, index));
    }
    return svg;
  });
  const {
    svg,
    width,
    height
  } = joinSVGs(svgs);
  return {
    width,
    height,
    element: jsxRuntimeExports.jsx(SVG$1, {
      svg: svg
    })
  };
}
function getPlus(options = {}) {
  const {
    size = 11,
    padding = 5,
    strokeWidth = 2
  } = options;
  const x1 = padding + size / 2;
  const y1 = padding;
  const x2 = padding + size / 2;
  const y2 = padding + size;
  return {
    svg: `<line x1="${x1}" y1="${y1}" x2="${x2}" y2="${y2}" stroke="rgb(0,0,0)" stroke-width="${strokeWidth}"></line>` + `<line x1="${y1}" y1="${x1}" x2="${y2}" y2="${x2}" stroke="rgb(0,0,0)" stroke-width="${strokeWidth}"></line>`,
    width: size + padding * 2,
    height: size + padding * 2
  };
}
function joinSVGs(svgs) {
  const results = [];
  let maxHeight = 0;
  for (const svg of svgs) {
    const size = getSVGViewBox(svg);
    if (results.length > 0) {
      results.push(getPlus());
    }
    results.push({
      svg,
      width: size.width,
      height: size.height
    });
    maxHeight = Math.max(maxHeight, size.height);
  }
  let currentWidth = 0;
  for (const result of results) {
    const shiftX = currentWidth;
    const shiftY = (maxHeight - result.height) / 2;
    result.shiftedSVG = `<g transform="translate(${shiftX},${shiftY})">${result.svg}</g>`;
    currentWidth += result.width;
  }
  return {
    width: currentWidth,
    height: maxHeight,
    svg: results.map(result => result.shiftedSVG).join('\n')
  };
}
function getSVGViewBox(svg) {
  const match = svg.match(/.*viewBox="(?<minX>-?\d+) (?<minY>-?\d+) (?<width>\d+) (?<height>\d+)".*/);
  if (!match?.groups) {
    throw new Error('ViewBox not found');
  }
  // convert to numbers and return the object
  return {
    minX: Number(match.groups.minX),
    minY: Number(match.groups.minY),
    width: Number(match.groups.width),
    height: Number(match.groups.height)
  };
}
function styleObjectToString(style) {
  const styleArray = [];
  for (const property in style) {
    if (Object.hasOwn(style, property)) {
      const kebabCaseProperty = property.replaceAll(/([A-Z])/g, '-$1').toLowerCase();
      styleArray.push(`${kebabCaseProperty}: ${style[property]}`);
    }
  }
  return styleArray.join('; ');
}
function addStyleToSVG(svg, style) {
  if (!style) return svg;
  const size = getSVGViewBox(svg);
  const match = svg.match(/<svg.*>/);
  if (!match) {
    throw new Error('SVG tag not found');
  }
  const svgTag = match[0];
  const styleString = styleObjectToString(style);
  const styleRectange = `<rect x="${size.minX}" y="${size.minY}" width="${size.width}" height="${size.height}" style="${styleString}"></rect>`;
  return svg.replace(svgTag, `${svgTag}${styleRectange}`);
}

/**
 * Node renderer for taxonomy trees: draw the taxon name, its rank and the count
 * of taxonomies inside a box, and report the box's measured size.
 * @param node - The taxonomy node to render.
 * @returns The node's rendered `element` with its `width` and `height`.
 */
function taxonomyRenderer(node) {
  const minSize = {
    width: 120,
    height: 20
  };
  const taxonomy = getTaxonomy(node, minSize);
  const label = getLabel(node, minSize);
  const width = Math.max(taxonomy.width, label.width);
  const height = Math.max(taxonomy.height, label.height);
  const nbTaxonomies = getNbTaxonomies(node, width, minSize);
  return {
    width,
    height,
    element: jsxRuntimeExports.jsxs("g", {
      children: [jsxRuntimeExports.jsx(Rectangle, {
        width: width,
        height: height,
        style: {
          stroke: 'black',
          fill: 'white',
          ...node.style
        }
      }), label.element, taxonomy.element, nbTaxonomies.element]
    })
  };
}
function getNbTaxonomies(node, width, minSize) {
  return {
    width: minSize.width,
    height: minSize.height,
    element: jsxRuntimeExports.jsx("text", {
      x: width,
      y: -5,
      textAnchor: "end",
      stroke: "none",
      fontSize: "14",
      fill: "#00008B" // dark blue
      ,
      fontStyle: 'bold',
      fontFamily: "Arial, Helvetica, sans-serif",
      children: node.nbTaxonomies
    })
  };
}
function getLabel(node, minSize, options = {}) {
  const {
    spacingHorizontal
  } = {
    spacingHorizontal: 8,
    ...options
  };
  if (node.rank === '') {
    return {
      width: 0,
      height: 0,
      element: null
    };
  }
  return {
    width: minSize.width,
    height: minSize.height,
    element: jsxRuntimeExports.jsx("text", {
      x: spacingHorizontal / 2,
      y: -6,
      textAnchor: "start",
      stroke: "none",
      fontSize: "14",
      fill: "grey",
      fontStyle: 'italic',
      fontFamily: "Arial, Helvetica, sans-serif",
      children: node.rank
    })
  };
}
function getTaxonomy(node, minSize, options = {}) {
  const {
    font,
    fontSize,
    spacingHorizontal
  } = {
    font: 'Arial, Helvetica, sans-serif',
    fontSize: 16,
    spacingHorizontal: 8,
    ...options
  };
  if (node.name === '') {
    return {
      width: 0,
      height: 0,
      element: null
    };
  }
  let {
    width,
    height
  } = getStringSize(node.name, {
    font,
    fontSize,
    spacingHorizontal
  });
  const textWith = width;
  let positionX = spacingHorizontal / 2;
  if (height <= minSize.height) {
    height = minSize.height;
  }
  if (width <= minSize.width) {
    width = minSize.width;
    positionX = (width - textWith + spacingHorizontal) / 2;
  }
  return {
    width,
    height,
    element: jsxRuntimeExports.jsx("g", {
      height: height,
      width: width,
      dominantBaseline: "central",
      children: jsxRuntimeExports.jsx("text", {
        x: positionX,
        y: height / 2,
        stroke: "none",
        fontSize: fontSize,
        fill: "black",
        ...(node.url ? {
          'data-url': node.url
        } : {}),
        fontFamily: font,
        children: node.name
      })
    })
  };
}
function getStringSize(text, options) {
  const {
    font = 'Arial, Helvetica, sans-serif',
    fontSize = 16,
    spacingHorizontal = 8
  } = options;
  const tempElement = document.createElement('span');
  tempElement.style.font = `${fontSize}px ${font}`;
  tempElement.style.visibility = 'hidden';
  tempElement.style.position = 'absolute';
  tempElement.style.top = '-9999px';
  tempElement.style.left = '-9999px';
  tempElement.textContent = text;
  document.body.append(tempElement);
  const {
    height,
    width
  } = tempElement.getBoundingClientRect();
  tempElement.remove();
  return {
    width: width + spacingHorizontal,
    height
  };
}

var lib$1 = /*#__PURE__*/Object.freeze({
	__proto__: null,
	moleculeRenderer: moleculeRenderer,
	render: render,
	taxonomyRenderer: taxonomyRenderer
});

var require$$0$4 = /*@__PURE__*/getAugmentedNamespace(lib$1);

Object.defineProperty(getFragmentationSVG$1, "__esModule", {
  value: true
});
getFragmentationSVG$1.getFragmentationSVG = getFragmentationSVG;
const react_tree_svg_1 = require$$0$4;
/**
 * @typedef {object} MassPeak
 * @property {number} mass
 * @property {number} intensity
 */
/**
 * @param {object[]} trees
 * @param {object} [options={}]
 * @param {object} [options.OCL]
 * @param {number} [options.accuracy]
 * @param {MassPeak[]} [options.peaks]
 * @returns
 */
function getFragmentationSVG(trees, options = {}) {
  const {
    OCL,
    accuracy,
    peaks = []
  } = options;
  const maxIntensity = peaks?.length > 0 ? Math.log(Math.max(...peaks.map(peak => peak.intensity)) + 1) : 0;
  const rendererOptions = {
    nodeRenderer: react_tree_svg_1.moleculeRenderer,
    arrowRendererOptions: {
      getLabel: node => {
        return node?.reaction?.label;
      },
      horizontalPosition: 'center'
    },
    nodeRendererOptions: {
      getTopLabel: node => {
        const mz = node?.molecules[0]?.info?.mz;
        if (mz === undefined) return;
        return `${mz.toFixed(4)} m/z`;
      },
      getBoxStyle: node => {
        for (const molecule of node.molecules) {
          const peak = getPeakInRange(peaks, molecule?.info?.mz, accuracy);
          if (peak) {
            return {
              fillOpacity: maxIntensity ? 0.2 * Math.log(peak.intensity + 1) / maxIntensity : 0.2,
              fill: 'red'
            };
          }
        }
      },
      getMolecules: node => {
        return node.molecules.map(molecule => OCL.Molecule.fromIDCode(molecule.idCode));
      }
    },
    positionOptions: {
      spacingHorizontal: 150
    }
  };
  return (0, react_tree_svg_1.render)(trees, rendererOptions);
}
function getPeakInRange(peaks, mass, accuracy) {
  if (!mass || !Array.isArray(peaks)) {
    return undefined;
  }
  const massAccuracy = accuracy * mass / 1e6;
  for (const peak of peaks) {
    if (Math.abs(peak.mass - mass) <= massAccuracy) {
      return peak;
    }
  }
  return undefined;
}

(function (exports) {

  var __createBinding = src$a && src$a.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$a && src$a.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(fragment$3, exports);
  __exportStar(reactionFragmentation$1, exports);
  __exportStar(getFragmentationSVG$1, exports);
  __exportStar(getDatabase$1, exports);
})(src$a);
var index$a = /*@__PURE__*/getDefaultExportFromCjs(src$a);

var index$b = /*#__PURE__*/_mergeNamespaces({
	__proto__: null,
	default: index$a
}, [src$a]);

Object.defineProperty(fromMolecules$1, "__esModule", {
  value: true
});
fromMolecules$1.fromMolecules = fromMolecules;
const mass_fragmentation_1 = src$a;
const mf_matcher_1$2 = src$d;
const mf_parser_1$6 = src$h;
const mf_utilities_1$7 = src$i;
/** * Generates a database 'monoisotopic' from a monoisotopic mass and various options
 * @param {{smiles?:string,molecule?:string,idCode?:string}[]}    entries - Array of object containing a property to recreate the molecule
 * @param {typeof import('openchemlib')} OCL - The OCL library
 * @param {object}    [options={}]
 * @param {function}  [options.onStep] - Callback to do after each step
 * @param {boolean}   [options.allowNeutral=true]
 * @param {string}    [options.ionizations=''] - string containing a comma separated list of modifications
 * @param {number}    [options.precision=100] - Allowed mass range based on precision
 * @param {boolean}   [options.groupResults=false] - Should we group the results if they have the same monoisotopic mass and experimental mass
 * @param {object}    [options.fragmentation={}]
 * @param {object}    [options.fragmentation.acyclic=false]
 * @param {object}    [options.fragmentation.cyclic=false]
 * @param {object}    [options.fragmentation.full=true]
 * @param {import('mf-matcher').MSEMFilterOptions}        [options.filter={}]
 * @returns {Promise}
 */
async function fromMolecules(entries, OCL, options = {}) {
  let {
    onStep,
    ionizations,
    filter,
    fragmentation = {
      acyclic: false,
      cyclic: false,
      full: true
    },
    groupResults = false
  } = options;
  ionizations = (0, mf_utilities_1$7.preprocessIonizations)(ionizations);
  let results = [];
  for (let i = 0; i < entries.length; i++) {
    const entry = entries[i];
    const molecule = getMolecule(entry, OCL);
    if (!molecule) continue;
    const {
      acyclic = false,
      cyclic = false,
      full = true
    } = fragmentation;
    const allFragments = (0, mass_fragmentation_1.fragment)(molecule, {
      acyclic,
      cyclic,
      full
    });
    for (const oneFragment of allFragments) {
      appendResults$2(results, oneFragment, {
        entry,
        ionizations,
        filter
      });
      if (onStep) onStep(i);
    }
  }
  if (groupResults) {
    results = groupFragmentationResults(results);
  }
  return results.toSorted((a, b) => a.em - b.em);
}
/**
 * We could group the results and replace the property 'fragment' by 'fragments'
 * @param {*} results
 */
function groupFragmentationResults(results) {
  const sortedResults = results.slice().toSorted((a, b) => {
    if (a.em !== b.em) {
      return a.em - b.em;
    }
    if (a.ms.em !== b.ms.em) {
      return a.ms.em - b.ms.em;
    }
    if (a.fragment.idCode < b.fragment.idCode) return -1;
    return 1;
  });
  const groupedResults = [];
  let currentResult = {};
  for (let result of sortedResults) {
    if (result.em !== currentResult.em || result.ms.em !== currentResult.ms.em) {
      currentResult = {
        ...result,
        fragments: [{
          idCode: result.fragment.idCode,
          type: result.fragment.type,
          count: 1,
          parents: [{
            ...result.fragment.parent,
            count: 1
          }]
        }]
      };
      delete currentResult.fragment;
      groupedResults.push(currentResult);
    } else {
      const lastFragment = currentResult.fragments.at(-1);
      if (lastFragment.idCode === result.fragment.idCode) {
        lastFragment.count++;
        if (lastFragment.parents.at(-1).idCode === result.fragment.parent.idCode) {
          lastFragment.parents.at(-1).count++;
        } else {
          lastFragment.parents.push({
            ...result.fragment.parent,
            count: 1
          });
        }
      } else {
        currentResult.fragments.push({
          idCode: result.fragment.idCode,
          type: result.fragment.type,
          count: 1,
          parents: [{
            ...result.fragment.parent,
            count: 1
          }]
        });
      }
    }
  }
  for (let group of groupedResults) {
    group.fragments = group.fragments.toSorted((a, b) => b.count - a.count);
  }
  return groupedResults;
}
/**
 *
 * @param {object} entry
 * @param {typeof import('openchemlib')} OCL - The OCL library
 */
function getMolecule(entry, OCL) {
  if (entry.idCode) {
    return OCL.Molecule.fromIDCode(entry.idCode);
  }
  if (entry.ocl && entry.ocl.idCode) {
    return OCL.Molecule.fromIDCode(entry.ocl.idCode);
  }
  if (entry.smiles) {
    return OCL.Molecule.fromSmiles(entry.smiles);
  }
  if (entry.molfile) {
    return OCL.Molecule.fromMolfile(entry.molfile);
  }
  return undefined;
}
function appendResults$2(results, oneFragment, options) {
  const mf = oneFragment.mfInfo.mf;
  const {
    ionizations,
    filter,
    entry
  } = options;
  const mfInfo = new mf_parser_1$6.MF(mf).getInfo();
  for (let ionization of ionizations) {
    const result = {
      charge: mfInfo.charge,
      em: mfInfo.monoisotopicMass,
      mw: mfInfo.mass,
      mf: mfInfo.mf,
      ionization,
      unsaturation: mfInfo.unsaturation,
      atoms: mfInfo.atoms,
      fragment: {
        parent: {
          ...entry,
          idCode: oneFragment.parentIDCode
        },
        idCode: oneFragment.idCode,
        type: oneFragment.fragmentType
      }
    };
    let match = (0, mf_matcher_1$2.msemMatcher)(result, filter);
    if (!match) continue;
    result.ms = match.ms;
    result.ionization = match.ionization;
    results.push(result);
  }
}

var fromNucleicSequence$1 = {};

var src$9 = {};

var sequenceToMF$3 = {};

Object.defineProperty(sequenceToMF$3, "__esModule", {
  value: true
});
sequenceToMF$3.sequenceToMF = sequenceToMF$2;
const chemical_groups_1$3 = src$f;
const mf_utilities_1$6 = src$i;
/**
 * Convert a nucleic sequence to a MF
 * @param {String} sequence
 * @param {object} [options={}]
 * @param {string} [options.kind] - rna, ds-dna or dna. Default if contains U: rna, otherwise ds-dna
 * @param {string} [options.fivePrime=monophosphate] - alcohol, monophosphate, diphosphate, triphosphate
 * @param {string} [options.circular=false]
 */
function sequenceToMF$2(sequence, options = {}) {
  let fivePrimeTerminal = 'HO';
  let threePrimeTerminal = 'H';
  sequence = sequence.replace(/^HO/, '');
  sequence = sequence.replace(/H$/, '');
  sequence = sequence.trim();
  if (sequence === '') return '';
  sequence = (0, mf_utilities_1$6.ensureUppercaseSequence)(sequence);
  // if the sequence is in lowercase but the parenthesis we should convert it to uppercase
  if (sequence.match(/^[a-z]+$/)) {
    sequence = sequence.toUpperCase();
  }
  let {
    kind,
    circular,
    fivePrime = 'monophosphate'
  } = options;
  fivePrime = fivePrime.replaceAll(/[^A-Za-z]/g, '').toLowerCase();
  if (!kind) {
    if (sequence.includes('U')) {
      kind = 'rna';
    } else {
      kind = 'ds-dna';
    }
  }
  kind = kind.replaceAll(/[^A-Za-z]/g, '').toLowerCase();
  if (sequence.includes('(') && kind === 'dsdna') {
    throw new Error('Nucleotide sequenceToMF: modifications not allowed for ds-DNA');
  }
  let results = [[]];
  if (kind === 'dsdna') results.push([]);
  let parenthesisCounter = 0;
  for (let i = 0; i < sequence.length; i++) {
    let currentSymbol = sequence[i];
    while (sequence[i + 1] && sequence[i + 1].match(/[a-z]/)) {
      i++;
      currentSymbol += sequence[i];
    }
    if (currentSymbol.length > 1) {
      results[0].push(currentSymbol);
      continue;
    }
    if (currentSymbol === '(' || currentSymbol === ')' || parenthesisCounter > 0) {
      if (currentSymbol === '(') {
        parenthesisCounter++;
        if (i === 0) fivePrimeTerminal = '';
      }
      if (currentSymbol === ')') {
        parenthesisCounter--;
        if (i === sequence.length - 1) threePrimeTerminal = '';
      }
      switch (kind) {
        case 'dna':
        case 'rna':
          results[0].push(currentSymbol);
          break;
        default:
          // eslint-disable-next-line no-console
          console.warn(`Nucleotide sequenceToMF with modification: unknown kind: ${kind}`);
      }
      continue;
    }
    let nucleotideType = i === 0 ? fivePrime : 'monophosphate';
    currentSymbol = currentSymbol.replace(/[\t\n\r ]/, '');
    if (!currentSymbol) continue;
    switch (kind) {
      case 'dna':
        results[0].push(desoxyNucleotides[nucleotideType][currentSymbol]);
        break;
      case 'rna':
        results[0].push(oxyNucleotides[nucleotideType][currentSymbol]);
        break;
      case 'dsdna':
        results[0].push(desoxyNucleotides[nucleotideType][currentSymbol]);
        results[1].unshift(desoxyNucleotides[nucleotideType][complementary[currentSymbol]]);
        break;
      default:
        // eslint-disable-next-line no-console
        console.warn(`Nucleotide sequenceToMF: unknown kind: ${kind}`);
    }
  }
  if (!circular) {
    for (const result of results) result.unshift(fivePrimeTerminal);
    for (const result of results) result.push(threePrimeTerminal);
  }
  return results.map(result => result.join('')).join('.');
}
const complementary = {
  A: 'T',
  T: 'A',
  C: 'G',
  G: 'C'
};
const desoxyNucleotides = {
  alcohol: {},
  monophosphate: {},
  diphosphate: {},
  triphosphate: {}
};
for (const group of chemical_groups_1$3.groups.filter(({
  kind
}) => kind === 'DNA')) {
  if (group.oneLetter) {
    desoxyNucleotides.alcohol[group.oneLetter] = group.symbol;
  }
}
for (const group of chemical_groups_1$3.groups.filter(({
  kind
}) => kind === 'DNAp')) {
  if (group.oneLetter) {
    desoxyNucleotides.monophosphate[group.oneLetter] = group.symbol;
  }
}
for (const group of chemical_groups_1$3.groups.filter(({
  kind
}) => kind === 'NucleotideP')) {
  if (group.oneLetter) {
    desoxyNucleotides.monophosphate[group.oneLetter] = group.symbol;
  }
}
for (const group of chemical_groups_1$3.groups.filter(({
  kind
}) => kind === 'DNApp')) {
  if (group.oneLetter) {
    desoxyNucleotides.diphosphate[group.oneLetter] = group.symbol;
  }
}
for (const group of chemical_groups_1$3.groups.filter(({
  kind
}) => kind === 'DNAppp')) {
  if (group.oneLetter) {
    desoxyNucleotides.triphosphate[group.oneLetter] = group.symbol;
  }
}
const oxyNucleotides = {
  alcohol: {},
  monophosphate: {},
  diphosphate: {},
  triphosphate: {}
};
for (const group of chemical_groups_1$3.groups.filter(({
  kind
}) => kind === 'RNA')) {
  if (group.oneLetter) {
    oxyNucleotides.alcohol[group.oneLetter] = group.symbol;
  }
}
for (const group of chemical_groups_1$3.groups.filter(({
  kind
}) => kind === 'RNAp')) {
  if (group.oneLetter) {
    oxyNucleotides.monophosphate[group.oneLetter] = group.symbol;
  }
}
for (const group of chemical_groups_1$3.groups.filter(({
  kind
}) => kind === 'NucleotideP')) {
  if (group.oneLetter) {
    oxyNucleotides.monophosphate[group.oneLetter] = group.symbol;
  }
}
for (const group of chemical_groups_1$3.groups.filter(({
  kind
}) => kind === 'RNApp')) {
  if (group.oneLetter) {
    oxyNucleotides.diphosphate[group.oneLetter] = group.symbol;
  }
}
for (const group of chemical_groups_1$3.groups.filter(({
  kind
}) => kind === 'RNAppp')) {
  if (group.oneLetter) {
    oxyNucleotides.triphosphate[group.oneLetter] = group.symbol;
  }
}

var generateFragments$1 = {};

var addFiveTerm$1 = {};

var furanThreeTerm$1 = {};

Object.defineProperty(furanThreeTerm$1, "__esModule", {
  value: true
});
furanThreeTerm$1.furanThreeTerm = furanThreeTerm;
function furanThreeTerm(nucleotide) {
  // last residue should become a furan
  let parts = nucleotide.replaceAll(' ', '').replaceAll(/([\d)a-z])([A-Z][a-z](?=[a-z]))/g, '$1 $2').split(/ /);
  let last = parts.pop();
  if (!last.match(/D[acgt]mp(.*)$/)) {
    // eslint-disable-next-line no-console
    console.warn(`furanThreeTerm can not remove a non monophosphate nucleic acid: ${last}`);
    return parts.join('') + last;
  }
  return parts.join('') + last.replace(/D[acgt]mp(.*)$/, 'Furp');
}

Object.defineProperty(addFiveTerm$1, "__esModule", {
  value: true
});
addFiveTerm$1.addFiveTerm = addFiveTerm;
const furanThreeTerm_js_1$1 = furanThreeTerm$1;
function addFiveTerm(mfs, fiveTerm, i, options) {
  if (options.a) mfs.push(`${fiveTerm}O-1H-1$a${i}`); // neutral ok
  if (options.ab && i > 1) mfs.push(`${(0, furanThreeTerm_js_1$1.furanThreeTerm)(fiveTerm)}$a${i}-B`); // A minus base
  if (options.b) mfs.push(`${fiveTerm}H$b${i}`); // need to add an hydrogen, see: https://books.google.ch/books?id=B57e37bJjqAC&pg=PA172&lpg=PA172&dq=oligonucleotide+b+fragmentation&source=bl&ots=mRr29Pexx2&sig=1NUQcWV-wuj6o9q81my86AVoRto&hl=fr&sa=X&ved=2ahUKEwjI5M3yn-7fAhUJMewKHQR6Bcs4ChDoATADegQIBhAB#v=onepage&q&f=true
  if (options.c) mfs.push(`${fiveTerm}PO2$c${i}`); // neutral ok
  if (options.d) mfs.push(`${fiveTerm}PO3H2$d${i}`);
  if (options.dh2o) mfs.push(`${fiveTerm}PO2$d${i}-H2O`);
}

var addFiveTermBaseLoss$1 = {};

var baseLoss$1 = {};

Object.defineProperty(baseLoss$1, "__esModule", {
  value: true
});
baseLoss$1.baseLoss = baseLoss;
const mf_utilities_1$5 = src$i;
const mfLosses = {};
for (const nucleotide of ['Amp', 'Tmp', 'Cmp', 'Gmp', 'Ump']) {
  mfLosses[nucleotide] = {
    code: nucleotide.charAt(0),
    diff: (0, mf_utilities_1$5.mfDiff)('Rmp', nucleotide)
  };
}
for (const nucleotide of ['Damp', 'Dtmp', 'Dcmp', 'Dgmp', 'Dump']) {
  mfLosses[nucleotide] = {
    code: nucleotide.charAt(1).toUpperCase(),
    diff: (0, mf_utilities_1$5.mfDiff)('Drmp', nucleotide)
  };
}
function baseLoss(nucleotide) {
  // any residue can loose a base
  let results = [];
  for (let key in mfLosses) {
    const base = mfLosses[key];
    if (nucleotide.includes(key)) {
      results.push(`${nucleotide}(${base.diff})$${base.code}*`);
    }
  }
  return results;
}

Object.defineProperty(addFiveTermBaseLoss$1, "__esModule", {
  value: true
});
addFiveTermBaseLoss$1.addFiveTermBaseLoss = addFiveTermBaseLoss;
const baseLoss_js_1$1 = baseLoss$1;
function addFiveTermBaseLoss(mfs, fiveTerm, i, options) {
  if (!options.abcdBaseLoss) return;
  let loss = (0, baseLoss_js_1$1.baseLoss)(fiveTerm);
  for (const mf of loss) {
    if (options.a) {
      mfs.push(`${mf}`.replace('$', `O-1H-1$a${i} `));
    }
    if (options.b) {
      mfs.push(`${mf}`.replace('$', `H-1$b${i} `));
    }
    if (options.c) {
      mfs.push(`${mf}`.replace('$', `PO2$c${i} `));
    }
    if (options.d) {
      mfs.push(`${mf}`.replace('$', `PO3H2$d${i} `));
    }
  }
}

var addInternalTerm$1 = {};

Object.defineProperty(addInternalTerm$1, "__esModule", {
  value: true
});
addInternalTerm$1.addInternalTerm = addInternalTerm;
const furanThreeTerm_js_1 = furanThreeTerm$1;
// https://books.google.ch/books?id=B57e37bJjqAC&pg=PA172&lpg=PA172&dq=oligonucleotide+b+fragmentation&source=bl&ots=mRr29Pexx2&sig=1NUQcWV-wuj6o9q81my86AVoRto&hl=fr&sa=X&ved=2ahUKEwjI5M3yn-7fAhUJMewKHQR6Bcs4ChDoATADegQIBhAB#v=onepage&q=oligonucleotide%20b%20fragmentation&f=false
function addInternalTerm(mfs, internal, ter3, ter5, options = {}) {
  if (options.aw) {
    // without base loss
    mfs.push(`HO${internal}O-1H-1$w${ter3}:a${ter5}`); // A W
  }
  if (options.bw) {
    // without base loss
    mfs.push(`HO${internal}H$w${ter3}:b${ter5}`); // B W
  }
  if (options.abw) {
    // with base loss
    let fragment = (0, furanThreeTerm_js_1.furanThreeTerm)(internal);
    mfs.push(`HO${fragment}$w${ter3}:a${ter5}-B`); // A minus base - W
  }
  if (options.aby) {
    // with base loss
    let fragment = (0, furanThreeTerm_js_1.furanThreeTerm)(internal);
    mfs.push(`O-2P-1${fragment}$y${ter3}:a${ter5}-B`); // A minus base - Y
  }
}

var addThreeTerm$1 = {};

Object.defineProperty(addThreeTerm$1, "__esModule", {
  value: true
});
addThreeTerm$1.addThreeTerm = addThreeTerm;
function addThreeTerm(mfs, threeTerm, i, options) {
  if (options.w) mfs.push(`HO${threeTerm}$w${i}`); // neutral ok
  if (options.x) mfs.push(`H-1${threeTerm}$x${i}`); // neutral ok
  if (options.y) mfs.push(`O-2P-1${threeTerm}$y${i}`); // neutral ok
  if (options.z) mfs.push(`O-3H-2P-1${threeTerm}$z${i}`); // neutral ok
  if (options.zch2) mfs.push(`O-3H-4C-1P-1${threeTerm}$z${i}-CH2`); // TODO to confirm
}

var addThreeTermBaseLoss$1 = {};

Object.defineProperty(addThreeTermBaseLoss$1, "__esModule", {
  value: true
});
addThreeTermBaseLoss$1.addThreeTermBaseLoss = addThreeTermBaseLoss;
const baseLoss_js_1 = baseLoss$1;
function addThreeTermBaseLoss(mfs, threeTerm, i, options) {
  if (!options.wxyzBaseLoss) return;
  let loss = (0, baseLoss_js_1.baseLoss)(threeTerm);
  for (const mf of loss) {
    if (options.w) {
      mfs.push(`HO${mf}`.replace('$', `$w${i} `));
    }
    if (options.x) {
      mfs.push(`H-1${mf}`.replace('$', `$x${i} `));
    }
    if (options.y) {
      mfs.push(`O-2P-1${mf}`.replace('$', `$y${i} `));
    }
    if (options.z) {
      mfs.push(`O-3H-1P-1(+)${mf}`.replace('$', `$z${i} `));
    }
  }
}

Object.defineProperty(generateFragments$1, "__esModule", {
  value: true
});
generateFragments$1.generateFragments = generateFragments;
const addFiveTerm_1 = addFiveTerm$1;
const addFiveTermBaseLoss_1 = addFiveTermBaseLoss$1;
const addInternalTerm_1 = addInternalTerm$1;
const addThreeTerm_1 = addThreeTerm$1;
const addThreeTermBaseLoss_1 = addThreeTermBaseLoss$1;
function generateFragments(mf, options) {
  if (options === undefined) {
    options = {
      a: false,
      ab: false,
      b: false,
      c: false,
      d: false,
      dh2o: false,
      w: false,
      x: false,
      y: false,
      z: false,
      zch2: false,
      aw: false,
      bw: false,
      abw: false,
      aby: false,
      abcdBaseLoss: false,
      wxyzBaseLoss: false
    };
  }
  let mfs = [];
  // need to allow 0-9 to deal with neutral loss
  let mfparts = mf.replaceAll(/([\d)a-z])([A-Z][a-z](?=[a-z]))/g, '$1 $2').split(/ /);
  let fiveTerm = '';
  let threeTerm = '';
  if (mfparts[0].startsWith('(')) {
    fiveTerm += mfparts[0];
    mfparts = mfparts.splice(1);
  }
  if (mfparts.at(-1).includes('(')) {
    threeTerm += mfparts.at(-1).replace(/^[^()]*/, '');
    mfparts[mfparts.length - 1] = mfparts.at(-1).replace(/\(.*/, '');
  }
  for (let ter5 = 1; ter5 < mfparts.length; ter5++) {
    fiveTerm += mfparts[ter5 - 1];
    threeTerm = mfparts[mfparts.length - ter5] + threeTerm;
    (0, addFiveTerm_1.addFiveTerm)(mfs, fiveTerm, ter5, options);
    (0, addFiveTermBaseLoss_1.addFiveTermBaseLoss)(mfs, fiveTerm, ter5, options);
    (0, addThreeTerm_1.addThreeTerm)(mfs, threeTerm, ter5, options);
    (0, addThreeTermBaseLoss_1.addThreeTermBaseLoss)(mfs, threeTerm, ter5, options);
  }
  for (let i = 1; i < mfparts.length - 1; i++) {
    let internal = '';
    for (let j = i; j < mfparts.length - 1; j++) {
      internal += mfparts[j];
      if (j > i) {
        (0, addInternalTerm_1.addInternalTerm)(mfs, internal, mfparts.length - i, j + 1, options);
      }
    }
  }
  return mfs;
}

(function (exports) {

  var __createBinding = src$9 && src$9.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$9 && src$9.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(sequenceToMF$3, exports);
  __exportStar(generateFragments$1, exports);
  __exportStar(furanThreeTerm$1, exports);
  __exportStar(baseLoss$1, exports);
})(src$9);
var index$8 = /*@__PURE__*/getDefaultExportFromCjs(src$9);

var index$9 = /*#__PURE__*/_mergeNamespaces({
	__proto__: null,
	default: index$8
}, [src$9]);

Object.defineProperty(fromNucleicSequence$1, "__esModule", {
  value: true
});
fromNucleicSequence$1.fromNucleicSequence = fromNucleicSequence;
const chemical_groups_1$2 = src$f;
const mf_generator_1$5 = src$b;
const nucleotide_1 = src$9;
/**
 * Add a database starting from a peptidic sequence
 *
 * @param {string} [sequencesString] Sequence as a string of 1 letter or 3 letters code. Could also be a correct molecular formula respecting uppercase, lowercase
 * @param {object} [options={}]
 * @param {boolean} [options.estimate=false] - estimate the number of MF without filters
 * @param {function} [options.onStep] - Callback to do after each step
 * @param {number} [options.limit=100000]
 * @param {string} [options.ionizations='']
 * @param {object} [options.info={}]
 * @param {string} [options.info.kind] - rna, ds-dna or dna. Default if contains U: rna, otherwise ds-dna
 * @param {string} [options.info.fivePrime=monophosphate] - alcohol, monophosphate, diphosphate, triphosphate
 * @param {string} [options.info.circular=false]
 * @param {array}   [options.mfsArray=[]]
 * @param {object}  [options.fragmentation={}] Object defining options for fragmentation
 * @param {boolean} [options.fragmentation.a=false] If true allow fragments of type 'a'
 * @param {boolean} [options.fragmentation.ab=false] If true allow fragments of type 'a' minus base
 * @param {boolean} [options.fragmentation.b=false] If true allow fragments of type 'b'
 * @param {boolean} [options.fragmentation.c=false] If true allow fragments of type 'c'
 * @param {boolean} [options.fragmentation.d=false] If true allow fragments of type 'd'
 * @param {boolean} [options.fragmentation.dh2o=false] If true allow fragments of type 'd' with water loss
 * @param {boolean} [options.fragmentation.w=false] If true allow fragments of type 'w'
 * @param {boolean} [options.fragmentation.x=false] If true allow fragments of type 'x'
 * @param {boolean} [options.fragmentation.y=false] If true allow fragments of type 'y'
 * @param {boolean} [options.fragmentation.z=false] If true allow fragments of type 'z'
 * @param {boolean} [options.baseLoss=false] If true allow base loss at all the positions
 *
 * @param {object} [options.filter={}] Object defining options for molecular formula filter
 * @param {number} [options.filter.minMass=0] - Minimal monoisotopic mass
 * @param {number} [options.filter.maxMass=+Infinity] - Maximal monoisotopic mass
 * @param {number} [options.filter.minEM=0] - Minimal neutral monoisotopic mass
 * @param {number} [options.filter.maxEM=+Infinity] - Maximal neutral monoisotopic mass
 * @param {number} [options.filter.minMSEM=0] - Minimal observed monoisotopic mass
 * @param {number} [options.filter.maxMSEM=+Infinity] - Maximal observed monoisotopic mass
 * @param {number} [options.filter.minCharge=-Infinity] - Minimal charge
 * @param {number} [options.filter.maxCharge=+Infinity] - Maximal charge
 * @param {boolean}  [options.filter.absoluteCharge=false] - If true, the charge is absolute (so between 0 and +Infinity by default)
 * @param {object} [options.filter.unsaturation={}]
 * @param {number} [options.filter.unsaturation.min=-Infinity] - Minimal unsaturation
 * @param {number} [options.filter.unsaturation.max=+Infinity] - Maximal unsaturation
 * @param {boolean} [options.filter.unsaturation.onlyInteger=false] - Integer unsaturation
 * @param {boolean} [options.filter.unsaturation.onlyNonInteger=false] - Non integer unsaturation
 * @returns {Promise}
 */
async function fromNucleicSequence(sequencesString, options = {}) {
  const {
    mfsArray = [],
    fragmentation = {},
    filter = {},
    ionizations = '',
    info = {},
    estimate = false,
    limit = 100000,
    onStep
  } = options;
  let sequences = (0, nucleotide_1.sequenceToMF)(sequencesString, info).split('.');
  let fragmentsArray = sequences.slice();
  // calculate fragmentation
  for (let i = 0; i < sequences.length; i++) {
    let sequence = sequences[i];
    let fragments = (0, nucleotide_1.generateFragments)(sequence, fragmentation);
    if (i === 1) {
      // complementary sequence
      fragments = fragments.map(fragment => fragment.replaceAll('$', '$cmp-'));
    }
    fragmentsArray = fragmentsArray.concat(fragments);
    if (fragmentation.baseLoss) {
      fragmentsArray = fragmentsArray.concat((0, nucleotide_1.baseLoss)(sequence));
    }
  }
  mfsArray.push(fragmentsArray);
  let combined = await (0, mf_generator_1$5.generateMFs)(mfsArray, {
    ionizations,
    filter,
    uniqueMFs: false,
    estimate,
    onStep,
    limit
  });
  if (Array.isArray(combined)) {
    // not an estimation
    for (const result of combined) {
      result.sequence = (0, chemical_groups_1$2.groupsToSequence)(result.parts.filter(Boolean).join(' '));
    }
  }
  return combined;
}

var fromPeptidicSequence$1 = {};

var fragmentPeptide$1 = {};

var src$8 = {};

var aminoAcids = {};

Object.defineProperty(aminoAcids, "__esModule", {
  value: true
});
aminoAcids.aminoAcids = void 0;
// SOURCE: https://en.wikipedia.org/wiki/Amino_acid
// Link for UTF8 code for modified: https://codepoints.net/search?sc=Grek
aminoAcids.aminoAcids = [
// Standard amino acids
{
  name: 'Alanine',
  aa3: 'Ala',
  aa1: 'A',
  sc: {
    type: 'hydrophobic'
  },
  pKaC: 2.33,
  pKaN: 9.71
}, {
  name: 'Arginine',
  aa3: 'Arg',
  aa1: 'R',
  sc: {
    type: 'positive',
    pKa: 12.1
  },
  pKaC: 2.03,
  pKaN: 9
}, {
  name: 'Asparagine',
  aa3: 'Asn',
  aa1: 'N',
  sc: {
    type: 'polar'
  },
  pKaC: 2.13,
  pKaN: 9.05
}, {
  name: 'Aspartic acid',
  aa3: 'Asp',
  aa1: 'D',
  sc: {
    type: 'negative',
    pKa: 3.71
  },
  pKaC: 1.95,
  pKaN: 9.66
}, {
  name: 'Cysteine',
  aa3: 'Cys',
  aa1: 'C',
  sc: {
    type: 'special',
    pKa: 8.14
  },
  pKaC: 1.91,
  pKaN: 10.28
}, {
  name: 'Glutamic acid',
  aa3: 'Glu',
  aa1: 'E',
  sc: {
    type: 'negative',
    pKa: 4.15
  },
  pKaC: 2.16,
  pKaN: 9.58
}, {
  name: 'Glutamine',
  aa3: 'Gln',
  aa1: 'Q',
  sc: {
    type: 'polar'
  },
  pKaC: 2.18,
  pKaN: 9
}, {
  name: 'Glycine',
  aa3: 'Gly',
  aa1: 'G',
  sc: {
    type: 'special'
  },
  pKaC: 2.34,
  pKaN: 9.58
}, {
  name: 'Histidine',
  aa3: 'His',
  aa1: 'H',
  sc: {
    type: 'positive',
    pKa: 6.04
  },
  pKaC: 1.7,
  pKaN: 9.09
}, {
  name: 'Isoleucine',
  aa3: 'Ile',
  aa1: 'I',
  sc: {
    type: 'hydrophobic'
  },
  pKaC: 2.26,
  pKaN: 9.6
}, {
  name: 'Leucine',
  aa3: 'Leu',
  aa1: 'L',
  sc: {
    type: 'hydrophobic'
  },
  pKaC: 2.32,
  pKaN: 9.58
}, {
  name: 'Lysine',
  aa3: 'Lys',
  aa1: 'K',
  sc: {
    type: 'positive',
    pKa: 10.67
  },
  pKaC: 2.15,
  pKaN: 9.16
}, {
  name: 'Methionine',
  aa3: 'Met',
  aa1: 'M',
  sc: {
    type: 'hydrophobic'
  },
  pKaC: 2.16,
  pKaN: 9.08
}, {
  name: 'Phenylalanine',
  aa3: 'Phe',
  aa1: 'F',
  sc: {
    type: 'hydrophobic'
  },
  pKaC: 2.18,
  pKaN: 9.09
}, {
  name: 'Proline',
  aa3: 'Pro',
  aa1: 'P',
  sc: {
    type: 'special'
  },
  pKaC: 1.95,
  pKaN: 10.47
}, {
  name: 'Serine',
  aa3: 'Ser',
  aa1: 'S',
  sc: {
    type: 'polar'
  },
  pKaC: 2.13,
  pKaN: 9.05
}, {
  name: 'Threonine',
  aa3: 'Thr',
  aa1: 'T',
  sc: {
    type: 'polar'
  },
  pKaC: 2.2,
  pKaN: 8.96
}, {
  name: 'Tryptophan',
  aa3: 'Trp',
  aa1: 'W',
  sc: {
    type: 'hydrophobic'
  },
  pKaC: 2.38,
  pKaN: 9.34
}, {
  name: 'Tyrosine',
  aa3: 'Tyr',
  aa1: 'Y',
  sc: {
    type: 'hydrophobic'
  },
  pKaC: 2.24,
  pKaN: 9.04
}, {
  name: 'Valine',
  aa3: 'Val',
  aa1: 'V',
  sc: {
    type: 'hydrophobic'
  },
  pKaC: 2.27,
  pKaN: 9.52
},
// Additional
{
  name: 'Selenocysteine',
  aa3: 'Sec',
  aa1: 'U'
}, {
  name: 'Pyrrolysine',
  aa3: 'Pyl',
  aa1: 'O'
},
// Ambiguous
{
  name: 'Asparagine or aspartic acid',
  aa3: 'Asx',
  aa1: 'B'
}, {
  name: 'Glutamine or glutamic acid',
  aa3: 'Glx',
  aa1: 'Z'
}, {
  name: 'Leucine or isoleucine',
  aa3: 'Xle',
  aa1: 'J'
}, {
  name: 'Unspecified or unknown',
  aa3: 'Xaa',
  aa1: 'X'
}];

var isoElectricPoint = {};

Object.defineProperty(isoElectricPoint, "__esModule", {
  value: true
});
isoElectricPoint.calculateCharge = calculateCharge;
isoElectricPoint.calculateIEP = calculateIEP;
isoElectricPoint.calculateChart = calculateChart;
isoElectricPoint.getColor = getColor;
const aminoAcids_1$2 = aminoAcids;
// we will convert the data to an object to be much faster
let aaObject = {};
for (let i = 0; i < aminoAcids_1$2.aminoAcids.length; i++) {
  aaObject[aminoAcids_1$2.aminoAcids[i].aa3] = aminoAcids_1$2.aminoAcids[i];
}
function calculateCharge(aas, pH = 7) {
  let combined = combine(aas);
  if (!combined) return;
  let charge = calculateForPh(combined, pH);
  return Math.round(charge * 1000) / 1000;
}
// this methods required an array of aas
function calculateIEP(aas) {
  let combined = combine(aas);
  if (!combined) return;
  let first = 0;
  let last = 14;
  let current = 14;
  let previous = 0;
  let currentCharge;
  while (Math.abs(current - previous) > 0.0001) {
    previous = current;
    current = (last + first) / 2;
    currentCharge = calculateForPh(combined, current);
    if (currentCharge > 0) {
      first = current;
    } else if (currentCharge < 0) {
      last = current;
    } else {
      previous = current;
    }
  }
  return Math.round(current * 1000) / 1000;
}
function calculateChart(aas) {
  let combined = combine(aas);
  if (!combined) return;
  let y = [];
  let x = [];
  let yAbs = [];
  for (let i = 0; i <= 14; i = i + 0.01) {
    let charge = calculateForPh(combined, i);
    x.push(i);
    y.push(charge);
    yAbs.push(Math.abs(charge));
  }
  combined.x = x;
  combined.y = y;
  combined.yAbs = yAbs;
  return combined;
}
function calculateForPh(combined, pH) {
  let total = 0;
  total += 1 / (1 + 10 ** (pH - combined.first));
  total += -1 / (1 + 10 ** (combined.last - pH));
  for (let key in combined.acid) {
    total += -combined.acid[key] / (1 + 10 ** (aaObject[key].sc.pKa - pH));
  }
  for (let key in combined.basic) {
    total += combined.basic[key] / (1 + 10 ** (pH - aaObject[key].sc.pKa));
  }
  return total;
}
// we will combine the amino acids
function combine(aas) {
  let combined = {};
  if (aaObject[aas[0]]) {
    combined.first = aaObject[aas[0]].pKaN;
  } else {
    return;
  }
  if (aaObject[aas.at(-1)]) {
    combined.last = aaObject[aas.at(-1)].pKaC;
  } else {
    return;
  }
  combined.basic = {};
  combined.acid = {};
  for (let i = 0; i < aas.length; i++) {
    let currentAA = aas[i];
    if (!aaObject[currentAA]) return;
    if (aaObject[currentAA].sc && aaObject[currentAA].sc.type) {
      if (aaObject[currentAA].sc.type === 'positive') {
        if (!combined.basic[currentAA]) {
          combined.basic[currentAA] = 0;
        }
        combined.basic[currentAA]++;
      } else if (aaObject[currentAA].sc.type === 'negative') {
        if (!combined.acid[currentAA]) {
          combined.acid[currentAA] = 0;
        }
        combined.acid[currentAA]++;
      }
    }
  }
  return combined;
}
/*
 We can generate a color based on iep
 0 -> 7 means that at pH 7 it is charged negatively (blue)
 7 -> 14 means that at pH7 it is charged positively (red)
 */
function getColor(iep) {
  if (iep < 7) {
    if (iep < 3) iep = 3;
    let white = Math.round(255 - (7 - iep) * (200 / 4));
    return `rgb(${white},${white},255)`;
  } else if (iep > 7) {
    if (iep > 11) iep = 11;
    let white = Math.round(255 - (iep - 7) * (200 / 4));
    return `rgb(255,${white},${white})`;
  }
  return 'rgb(255,255,255)';
}

var splitPeptide$1 = {};

Object.defineProperty(splitPeptide$1, "__esModule", {
  value: true
});
splitPeptide$1.splitPeptide = splitPeptide;
function splitPeptide(sequence) {
  let aas = sequence.replaceAll(/([A-Z])/g, ' $1').split(/ /);
  let begin = 0;
  while (aas[begin] === '' || aas[begin] === 'H') {
    begin++;
  }
  let end = aas.length - 1;
  while (aas[end] === 'O' || aas[end] === 'H') {
    end--;
  }
  aas = aas.slice(begin, end + 1);
  return aas;
}

var allowNeutralLoss$1 = {};

Object.defineProperty(allowNeutralLoss$1, "__esModule", {
  value: true
});
allowNeutralLoss$1.allowNeutralLoss = allowNeutralLoss;
/**
 * Add neutral loss on natural amino acids
 * @param {*} mf
 * @returns
 */
function allowNeutralLoss(mf) {
  if (Array.isArray(mf)) {
    for (let i = 0; i < mf.length; i++) {
      mf[i] = allowOneNeutralLoss(mf[i]);
    }
    return mf;
  } else {
    return allowOneNeutralLoss(mf);
  }
}
function allowOneNeutralLoss(mf) {
  mf = mf.replaceAll(/(Ser|Thr|Asp|Glu)(?!\()/g, '$1(H-2O-1)0-1');
  mf = mf.replaceAll(/(Arg|Lys|Asn|Gln)(?!\()/g, '$1(N-1H-3)0-1');
  return mf;
}

var chargePeptide$1 = {};

var getAA$1 = {};

Object.defineProperty(getAA$1, "__esModule", {
  value: true
});
getAA$1.getAA = getAA;
const aminoAcids_1$1 = aminoAcids;
function getAA(code) {
  if (code.length === 1) {
    for (let i = 0; i < aminoAcids_1$1.aminoAcids.length; i++) {
      if (aminoAcids_1$1.aminoAcids[i].aa1 === code) {
        return aminoAcids_1$1.aminoAcids[i];
      }
    }
  }
  if (code.length === 3) {
    for (let i = 0; i < aminoAcids_1$1.aminoAcids.length; i++) {
      if (aminoAcids_1$1.aminoAcids[i].aa3 === code) {
        return aminoAcids_1$1.aminoAcids[i];
      }
    }
  }
}

Object.defineProperty(chargePeptide$1, "__esModule", {
  value: true
});
chargePeptide$1.chargePeptide = chargePeptide;
const getAA_1 = getAA$1;
// SOURCE: https://en.wikipedia.org/wiki/Amino_acid
function chargePeptide(mf, options = {}) {
  if (Array.isArray(mf)) {
    for (let i = 0; i < mf.length; i++) {
      mf[i] = chargeOnePeptide(mf[i], options);
    }
    return mf;
  } else {
    return chargeOnePeptide(mf, options);
  }
}
function chargeOnePeptide(mf, options) {
  const {
    pH = 0
  } = options;
  // we will allow to charge the peptide at a specific pH
  // first amino acids (N-terminal)
  if (mf.match(/^H[A-Z][a-z]{2}/)) {
    let firstAA = mf.replace(/^H([A-Z][a-z]{2}).*/, '$1');
    if ((0, getAA_1.getAA)(firstAA) && pH < (0, getAA_1.getAA)(firstAA).pKaN) {
      mf = mf.replace(/^H([^+])/, 'H+H$1');
    }
  }
  // last amino acids (C-terminal)
  if (mf.match(/[A-Z][a-z]{2}OH$/)) {
    let lastAA = mf.replace(/.*([A-Z][a-z]{2})OH$/, '$1');
    if ((0, getAA_1.getAA)(lastAA) && pH > (0, getAA_1.getAA)(lastAA).pKaC) {
      mf = mf.replace(/OH$/, 'O-');
    }
  }
  // basic AA
  if (pH < (0, getAA_1.getAA)('Arg').sc.pKa) mf = mf.replaceAll(/(Arg)(?!\()/g, '$1(H+)');
  if (pH < (0, getAA_1.getAA)('His').sc.pKa) mf = mf.replaceAll(/(His)(?!\()/g, '$1(H+)');
  if (pH < (0, getAA_1.getAA)('Lys').sc.pKa) mf = mf.replaceAll(/(Lys)(?!\()/g, '$1(H+)');
  // acid AA
  if (pH > (0, getAA_1.getAA)('Asp').sc.pKa) mf = mf.replaceAll(/(Asp)(?!\()/g, '$1(H-1-)');
  if (pH > (0, getAA_1.getAA)('Glu').sc.pKa) mf = mf.replaceAll(/(Glu)(?!\()/g, '$1(H-1-)');
  if (pH > (0, getAA_1.getAA)('Cys').sc.pKa) mf = mf.replaceAll(/(Cys)(?!\()/g, '$1(H-1-)');
  return mf;
}

var sequenceToMF$1 = {};

Object.defineProperty(sequenceToMF$1, "__esModule", {
  value: true
});
sequenceToMF$1.sequenceToMF = sequenceToMF;
const mf_utilities_1$4 = src$i;
const aminoAcids_1 = aminoAcids;
function sequenceToMF(mf) {
  if (mf === '') return '';
  mf = (0, mf_utilities_1$4.ensureUppercaseSequence)(mf);
  // this function will check if it is a sequence of aa in 1 letter or 3 letters and convert them if it is the case
  // it could be a multiline mf !
  // if it is a multiline we could make some "tricks" ...
  let newMF = mf;
  // SEQRES   1 B  256  MET PRO VAL GLU ILE THR VAL LYS GLU LEU LEU GLU ALA
  // SEQRES   2 B  256  GLY VAL HIS PHE GLY HIS GLU ARG LYS ARG TRP ASN PRO
  // or
  // MET PRO VAL GLU ILE THR VAL LYS GLU LEU LEU GLU ALA
  // GLY VAL HIS PHE GLY HIS GLU ARG LYS ARG TRP ASN PRO
  if (mf.search(/(?:[A-Z]{3} ){2}[A-Z]{3}/) > -1) {
    // this is a PDB !
    let tmpmf = mf.replaceAll(/[\n\r]+/g, ' ');
    tmpmf = tmpmf.replaceAll(/(SEQRES|\d+| [A-Z] | [\dA-Z]{4-50})/g, '');
    // we need to correct the uppercase / lowercase
    let parts = tmpmf.split(' ');
    newMF = 'H';
    for (let i = 0; i < parts.length; i++) {
      newMF += parts[i].slice(0, 1) + parts[i].slice(1).toLowerCase();
    }
    newMF += 'OH';
  } else if (mf.includes('(') && isOneLetterCode(mf)) {
    // we expect one-letter code with modification
    newMF = '';
    let nTerminal = 'H';
    let cTerminal = 'OH';
    let parenthesisCounter = 0;
    for (let i = 0; i < mf.length; i++) {
      let currentSymbol = mf[i];
      if (currentSymbol === '(' || currentSymbol === ')' || parenthesisCounter > 0) {
        if (currentSymbol === '(') {
          parenthesisCounter++;
          if (i === 0) nTerminal = '';
        }
        if (currentSymbol === ')') {
          parenthesisCounter--;
          if (i === mf.length - 1) cTerminal = '';
        }
        newMF += currentSymbol;
        continue;
      }
      newMF += convertAA1To3(currentSymbol);
    }
    newMF = nTerminal + newMF + cTerminal;
  } else if (mf.search(/[A-Za-z][\da-z]/) === -1) {
    // UNIPROT
    //   370        380        390        400        410        420
    //GFKPNLRKTF VSGLFRESCG AHFYRGVDVK PFYIKKPVDN LFALMLILNR LRGWGVVGGM
    //
    //    430        440        450        460        470        480
    //SDPRLYKVWV RLSSQVPSMF FGGTDLAADY YVVSPPTAVS VYTKTPYGRL LADTRTSGFR
    // We remove all the number, all the spaces, etc
    newMF = `H${convertAA1To3(newMF.replaceAll(/[^A-Z]/g, ''))}OH`;
  }
  return newMF;
}
function convertAA1To3(mf) {
  let newmf = '';
  for (let i = 0; i < mf.length; i++) {
    newmf += aa1To3(mf.charAt(i));
  }
  return newmf;
}
function aa1To3(code) {
  for (let i = 0; i < aminoAcids_1.aminoAcids.length; i++) {
    if (aminoAcids_1.aminoAcids[i].aa1 === code) {
      return aminoAcids_1.aminoAcids[i].aa3;
    }
  }
  throw new Error(`Invalid 1 letter code: ${code}`);
}
// mf can contain as well parenthesis. We need to check if it is not yet a correct molecular formula
function isOneLetterCode(mf) {
  let parenthesisLevel = 0;
  for (let char of mf) {
    if (parenthesisLevel === 0 && char.match(/[a-z]/)) return false;
    if (char === '(') parenthesisLevel++;
    if (char === ')') parenthesisLevel--;
  }
  return true;
}

var generatePeptideFragments$1 = {};

Object.defineProperty(generatePeptideFragments$1, "__esModule", {
  value: true
});
generatePeptideFragments$1.generatePeptideFragments = generatePeptideFragments;
/**
 * Generate peptide fragments from a molecular formula.
 * @param {string} mf - The molecular formula to fragment.
 * @param {object} [options] - Fragmentation options.
 * @param {boolean} [options.a=false] - Generate a-type fragments.
 * @param {boolean} [options.b] - Generate b-type fragments. Defaults to `true` if no options are specified, otherwise `false`.
 * @param {boolean} [options.c=false] - Generate c-type fragments.
 * @param {boolean} [options.x=false] - Generate x-type fragments.
 * @param {boolean} [options.y] - Generate y-type fragments. Defaults to `true` if no options are specified, otherwise `false`.
 * @param {boolean} [options.z=false] - Generate z-type fragments.
 * @param {boolean} [options.i=false] - Generate internal fragments.
 * @param {boolean} [options.ya=false] - Generate ya-type double fragmentation.
 * @param {boolean} [options.yb=false] - Generate yb-type double fragmentation.
 * @param {boolean} [options.yc=false] - Generate yc-type double fragmentation.
 * @param {boolean} [options.zc=false] - Generate zc-type double fragmentation.
 * @param {number} [options.maxInternal=Infinity] - Maximum number of residues for internal fragments.
 * @param {number} [options.minInternal=0] - Minimum number of residues for internal fragments.
 * @returns {string[]} Array of fragment molecular formulas.
 */
function generatePeptideFragments(mf, options) {
  const isDefaultCall = options === undefined;
  if (isDefaultCall) {
    options = {};
  }
  const {
    a = false,
    b = isDefaultCall,
    c = false,
    x = false,
    y = isDefaultCall,
    z = false,
    i: internal = false,
    ya = false,
    yb = false,
    yc = false,
    zc = false,
    maxInternal = Number.MAX_VALUE,
    minInternal = 0
  } = options;
  let mfs = [];
  // need to allow 0-9 to deal with neutral loss
  let mfparts = mf.replaceAll(/([\d)a-z])([A-Z][a-z](?=[a-z]))/g, '$1 $2').split(/ /);
  let nTerm = '';
  let cTerm = '';
  if (mfparts[0].startsWith('(')) {
    nTerm += mfparts[0];
    mfparts = mfparts.splice(1);
  }
  if (mfparts.at(-1).includes('(')) {
    cTerm += mfparts.at(-1).replace(/^[^()]*/, '');
    mfparts[mfparts.length - 1] = mfparts.at(-1).replace(/\(.*/, '');
  }
  for (let i = 1; i < mfparts.length; i++) {
    nTerm += mfparts[i - 1];
    cTerm = mfparts[mfparts.length - i] + cTerm;
    addNTerm(mfs, nTerm, i, a, b, c);
    addCTerm(mfs, cTerm, i, x, y, z);
    if (internal) mfs.push(`${mfparts[i]}HC-1O-1(+1)$i:${mfparts[i]}`);
    if (ya || yb || yc || zc) {
      // we have double fragmentations
      for (let j = i + 1; j < Math.min(mfparts.length, maxInternal + i + 1); j++) {
        let iTerm = '';
        if (j - i >= minInternal) {
          for (let k = i; k < j; k++) {
            iTerm += mfparts[k];
          }
          addITerm(mfs, iTerm, mfparts.length - i, j, ya, yb, yc, zc);
        }
      }
    }
  }
  // todo does this make sense ??? I think we should remote those 3 lines
  if (mfs.length === 0) {
    mfs = mfs.concat([mf]);
  }
  return mfs;
}
function addNTerm(mfs, nTerm, i, a, b, c) {
  if (a) mfs.push(`${nTerm}C-1O-1(+1)$a${i}`);
  if (b) mfs.push(`${nTerm}(+1)$b${i}`);
  if (c) mfs.push(`${nTerm}NH3(+1)$c${i}`);
}
function addITerm(mfs, iTerm, i, j, ya, yb, yc, zc) {
  if (ya) mfs.push(`H${iTerm}C-1O-1(+1)$a${j}y${i}`);
  if (yb) mfs.push(`H${iTerm}(+1)$b${j}y${i}`);
  if (yc) mfs.push(`H${iTerm}NH3(+1)$c${j}y${i}`);
  if (zc) mfs.push(`N-1${iTerm}NH3(+1)$c${j}z${i}`);
}
function addCTerm(mfs, cTerm, i, x, y, z) {
  if (x) mfs.push(`CO(+1)${cTerm}$x${i}`);
  if (y) mfs.push(`H2(+1)${cTerm}$y${i}`);
  if (z) mfs.push(`N-1H-1(+1)${cTerm}$z${i}`);
}

var digestPeptide$1 = {};

Object.defineProperty(digestPeptide$1, "__esModule", {
  value: true
});
digestPeptide$1.digestPeptide = digestPeptide;
const ml_spectra_processing_1$4 = require$$0$7;
/**
 * Digest a peptide sequence using a specified enzyme.
 * @param {string} sequence - The peptide sequence to digest.
 * @param {object} [options={}] - Digestion options.
 * @param {string} options.enzyme - The enzyme to use for digestion. Required. Supported values: 'chymotrypsin', 'trypsin', 'lysc', 'glucph4', 'glucph8', 'thermolysin', 'cyanogenbromide', 'any'.
 * @param {number} [options.minMissed=0] - Minimum number of missed cleavages.
 * @param {number} [options.maxMissed=0] - Maximum number of missed cleavages.
 * @param {number} [options.minResidue=0] - Minimum number of residues in a fragment.
 * @param {number} [options.maxResidue=Infinity] - Maximum number of residues in a fragment.
 * @param {number} [options.minDigestions=0] - Minimum number of cleavage sites to use. Generates all combinations with at least this many cleavages. Defaults to `0`.
 * @param {number} [options.maxDigestions=Infinity] - Maximum number of cleavage sites to use. Generates all combinations with at most this many cleavages. Defaults to `Infinity`.
 * @returns {string[]} Array of digested peptide fragments.
 */
function digestPeptide(sequence, options = {}) {
  const {
    enzyme,
    minMissed = 0,
    maxMissed = 0,
    minResidue = 0,
    maxResidue = Number.MAX_VALUE,
    minDigestions = 0,
    maxDigestions = Number.MAX_VALUE
  } = options;
  if (!enzyme) {
    return [];
  }
  sequence = sequence.replace(/^H([^a-z])/, '$1').replace(/OH$/, '');
  let regexp = getRegexp(enzyme);
  let allFragments = sequence.replace(regexp, '$1 ').split(/ /).filter(Boolean);
  const numCleavages = allFragments.length - 1;
  // Return empty if minDigestions is impossible to achieve
  if (minDigestions > numCleavages) {
    return [];
  }
  const effectiveMaxDigestions = Math.min(maxDigestions, numCleavages);
  const effectiveMinDigestions = minDigestions;
  if (effectiveMinDigestions > effectiveMaxDigestions) {
    return [];
  }
  // Determine if we need combinatorial approach
  // Use combinatorial logic when maxDigestions explicitly limits cleavages OR minDigestions > 0
  const useCombinatorial = maxDigestions < numCleavages || minDigestions > 0;
  // When using combinatorial due to maxDigestions limit, ensure at least 1 cleavage
  const startDigestions = useCombinatorial ? Math.max(1, effectiveMinDigestions) : effectiveMinDigestions;
  if (!useCombinatorial) {
    // Default behavior: use all available cleavage sites
    const results = [];
    const fragments = [];
    let fragmentStart = 0;
    for (let i = 0; i < allFragments.length; i++) {
      let nbResidue = allFragments[i].replaceAll(/([A-Z][a-z]{2})/g, ' $1').split(/ /).filter(Boolean).length;
      fragments.push({
        sequence: allFragments[i],
        nbResidue,
        from: fragmentStart,
        to: fragmentStart + nbResidue - 1
      });
      fragmentStart += nbResidue;
    }
    for (let i = 0; i < fragments.length - minMissed; i++) {
      for (let j = minMissed; j <= Math.min(maxMissed, fragments.length - i - 1); j++) {
        let fragment = '';
        let nbResidue = 0;
        for (let k = i; k <= i + j; k++) {
          fragment += fragments[k].sequence;
          nbResidue += fragments[k].nbResidue;
        }
        let from = fragments[i].from + 1;
        let to = fragments[i + j].to + 1;
        if (fragment && nbResidue >= minResidue && nbResidue <= maxResidue) {
          results.push(`H${fragment}OH$D${from}>${to}`);
        }
      }
    }
    return results;
  }
  // Combinatorial approach: generate all combinations of cleavage sites
  const allResults = new Set();
  for (let numDigestions = startDigestions; numDigestions <= effectiveMaxDigestions; numDigestions++) {
    const combinations = (0, ml_spectra_processing_1$4.getCombinationsIterator)(numCleavages, numDigestions);
    for (const cleavageSites of combinations) {
      // Create fragments based on selected cleavage sites
      const fragments = createFragmentsFromCleavages(allFragments, cleavageSites);
      // Generate results with missed cleavages
      for (let i = 0; i < fragments.length - minMissed; i++) {
        for (let j = minMissed; j <= Math.min(maxMissed, fragments.length - i - 1); j++) {
          let fragment = '';
          let nbResidue = 0;
          for (let k = i; k <= i + j; k++) {
            fragment += fragments[k].sequence;
            nbResidue += fragments[k].nbResidue;
          }
          let from = fragments[i].from + 1;
          let to = fragments[i + j].to + 1;
          if (fragment && nbResidue >= minResidue && nbResidue <= maxResidue) {
            allResults.add(`H${fragment}OH$D${from}>${to}`);
          }
        }
      }
    }
  }
  return [...allResults];
}
/**
 * Create fragments from selected cleavage sites.
 * @param {string[]} allFragments - All possible fragments if all sites were cleaved.
 * @param {number[]} cleavageSites - Indices of cleavage sites to use.
 * @returns {Array<{sequence: string, nbResidue: number, from: number, to: number}>} Fragment objects.
 */
function createFragmentsFromCleavages(allFragments, cleavageSites) {
  const fragments = [];
  const cleavageSet = new Set(cleavageSites);
  let currentFragment = '';
  let fragmentStartIndex = 0;
  for (let i = 0; i < allFragments.length; i++) {
    currentFragment += allFragments[i];
    // If this is a cleavage site or the last fragment, close the current fragment
    if (cleavageSet.has(i) || i === allFragments.length - 1) {
      const nbResidue = currentFragment.replaceAll(/([A-Z][a-z]{2})/g, ' $1').split(/ /).filter(Boolean).length;
      const from = fragmentStartIndex;
      const to = from + nbResidue - 1;
      fragments.push({
        sequence: currentFragment,
        nbResidue,
        from,
        to
      });
      fragmentStartIndex = to + 1;
      currentFragment = '';
    }
  }
  return fragments;
}
function getRegexp(enzyme) {
  switch (enzyme.toLowerCase().replaceAll(/[^\da-z]/g, '')) {
    case 'chymotrypsin':
      return /(Phe|Tyr|Trp)(?!Pro)/g;
    case 'trypsin':
      return /(Lys|Arg)(?!Pro)/g;
    case 'lysc':
      return /(Lys)(?!Pro)/g;
    case 'glucph4':
      return /(Glu)(?!Pro|Glu)/g;
    case 'glucph8':
      return /(Asp|Glu)(?!Pro|Glu)/g;
    case 'thermolysin':
      // N-term of  Leu, Phe, Val, Ile, Ala, Met
      return /()(?=Ile|Leu|Val|Ala|Met|Phe)/g;
    case 'cyanogenbromide':
      return /(Met)/g;
    case 'any':
      return /()(?=[A-Z][a-z]{2})/g;
    default:
      throw new Error(`Digestion enzyme: ${enzyme} is unknown`);
  }
}

(function (exports) {

  var __createBinding = src$8 && src$8.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __setModuleDefault = src$8 && src$8.__setModuleDefault || (Object.create ? function (o, v) {
    Object.defineProperty(o, "default", {
      enumerable: true,
      value: v
    });
  } : function (o, v) {
    o["default"] = v;
  });
  var __importStar = src$8 && src$8.__importStar || function () {
    var ownKeys = function (o) {
      ownKeys = Object.getOwnPropertyNames || function (o) {
        var ar = [];
        for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
        return ar;
      };
      return ownKeys(o);
    };
    return function (mod) {
      if (mod && mod.__esModule) return mod;
      var result = {};
      if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
      __setModuleDefault(result, mod);
      return result;
    };
  }();
  var __exportStar = src$8 && src$8.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.getInfo = getInfo;
  exports.calculateIEP = calculateIEP;
  exports.calculateIEPChart = calculateIEPChart;
  exports.getColorForIEP = getColorForIEP;
  exports.calculateCharge = calculateCharge;
  const aminoAcids_1 = aminoAcids;
  const IEP = __importStar(isoElectricPoint);
  const splitPeptide_js_1 = splitPeptide$1;
  __exportStar(allowNeutralLoss$1, exports);
  __exportStar(chargePeptide$1, exports);
  __exportStar(sequenceToMF$1, exports);
  __exportStar(generatePeptideFragments$1, exports);
  __exportStar(digestPeptide$1, exports);
  __exportStar(splitPeptide$1, exports);
  function getInfo() {
    return aminoAcids_1.aminoAcids;
  }
  // sequence should be in the "right" format like HAlaGlyProOH
  function calculateIEP(sequence) {
    let aas = (0, splitPeptide_js_1.splitPeptide)(sequence);
    let result = IEP.calculateIEP(aas);
    return result;
  }
  function calculateIEPChart(sequence) {
    let aas = (0, splitPeptide_js_1.splitPeptide)(sequence);
    let result = IEP.calculateChart(aas);
    return result;
  }
  function getColorForIEP(iep) {
    return IEP.getColor(iep);
  }
  function calculateCharge(sequence, ph) {
    let aas = (0, splitPeptide_js_1.splitPeptide)(sequence);
    return IEP.calculateCharge(aas, ph);
  }
})(src$8);
var index$6 = /*@__PURE__*/getDefaultExportFromCjs(src$8);

var index$7 = /*#__PURE__*/_mergeNamespaces({
	__proto__: null,
	default: index$6
}, [src$8]);

Object.defineProperty(fragmentPeptide$1, "__esModule", {
  value: true
});
fragmentPeptide$1.fragmentPeptide = fragmentPeptide;
const peptide_1 = src$8;
function fragmentPeptide(sequence, options = {}) {
  const {
    digestion = {},
    protonation,
    fragmentation,
    protonationPH
  } = options;
  sequence = (0, peptide_1.sequenceToMF)(sequence);
  let fragmentsArray = [sequence];
  // do we also have some digest fragments ?
  if (digestion.enzyme) {
    let digests = (0, peptide_1.digestPeptide)(sequence, digestion);
    if (protonation) {
      digests = (0, peptide_1.chargePeptide)(digests, {
        pH: protonationPH
      });
    }
    fragmentsArray = fragmentsArray.concat(digests);
  }
  // allow neutral loss
  if (options.allowNeutralLoss) {
    sequence = (0, peptide_1.allowNeutralLoss)(sequence);
  }
  // apply protonation
  if (protonation) {
    sequence = (0, peptide_1.chargePeptide)(sequence, {
      pH: protonationPH
    });
  }
  // calculate fragmentation
  let fragments = (0, peptide_1.generatePeptideFragments)(sequence, fragmentation);
  fragmentsArray = fragmentsArray.concat(fragments);
  return fragmentsArray;
}

Object.defineProperty(fromPeptidicSequence$1, "__esModule", {
  value: true
});
fromPeptidicSequence$1.fromPeptidicSequence = fromPeptidicSequence;
const chemical_groups_1$1 = src$f;
const mf_generator_1$4 = src$b;
const fragmentPeptide_1 = fragmentPeptide$1;
/**
 * Add a database starting from a peptidic sequence
 *
 * @param {string}         [sequences] Sequence as a string of 1 letter or 3 letters code. Could also be a correct molecular formula respecting uppercase, lowercase. It can be comma separated if you have many peptide sequences
 * @param {object}         [options={}]
 * @param {boolean}        [options.estimate=false] - estimate the number of MF without filters
 * @param {string}         [options.ionizations='']
 * @param {function}       [options.onStep] - Callback to do after each step
 * @param {array}          [options.mfsArray=[]]
 * @param {boolean}        [options.protonation=false]
 * @param {number}         [options.protonationPH=7]
 * @param {boolean}        [options.allowNeutralLoss=false]
 * @param {number}         [options.limit=100000]
 *
 * @param {object}         [options.digestion={}] Object defining options for digestion
 * @param {number}         [options.digestion.minMissed=0] Minimal number of allowed missed cleavage
 * @param {number}         [options.digestion.maxMissed=0] Maximal number of allowed missed cleavage
 * @param {number}         [options.digestion.minResidue=0] Minimal number of residues
 * @param {number}         [options.digestion.maxResidue=+Infinity] Maximal number of residues
 * @param {string}         [options.digestion.enzyme] Mandatory field containing the name of the enzyme among: chymotrypsin, trypsin, glucph4, glucph8, thermolysin, cyanogenbromide
 *
 * @param {object}         [options.fragmentation={}] Object defining options for fragmentation
 * @param {boolean}        [options.fragmentation.a=false] If true allow fragments of type 'a'
 * @param {boolean}        [options.fragmentation.b=false] If true allow fragments of type 'b'
 * @param {boolean}        [options.fragmentation.c=false] If true allow fragments of type 'c'
 * @param {boolean}        [options.fragmentation.x=false] If true allow fragments of type 'x'
 * @param {boolean}        [options.fragmentation.y=false] If true allow fragments of type 'y'
 * @param {boolean}        [options.fragmentation.z=false] If true allow fragments of type 'z'
 * @param {boolean}        [options.fragmentation.ya=false] If true allow fragments of type 'ya'
 * @param {boolean}        [options.fragmentation.yb=false] If true allow fragments of type 'yb'
 * @param {boolean}        [options.fragmentation.yc=false] If true allow fragments of type 'yc'
 * @param {boolean}        [options.fragmentation.zc=false] If true allow fragments of type 'zc'
 * @param {number}         [options.fragmentation.minInternal=0] Minimal internal fragment length
 * @param {number}         [options.fragmentation.maxInternal=+Infinity] Maximal internal fragment length
 *
 * @param {object}         [options.filter={}] Object defining options for molecular formula filter
 * @param {number}         [options.filter.precision=1000] - The precision on the experimental mass
 * @param {number}         [options.filter.targetMass] - Target mass, allows to calculate error and filter results
 * @param {number[]}       [options.filter.targetMasses] - Target masses: SORTED array of numbers
 * @param {number[]}       [options.filter.targetIntensities] - Target intensities: SORTED array of numbers
 * @param {number}         [options.filter.minEM=0] - Minimal neutral monoisotopic mass
 * @param {number}         [options.filter.maxEM=+Infinity] - Maximal neutral monoisotopic mass
 * @param {number}         [options.filter.minMSEM=0] - Minimal observed monoisotopic mass
 * @param {number}         [options.filter.maxMSEM=+Infinity] - Maximal observed monoisotopic mass
 * @param {number}         [options.filter.minCharge=-Infinity] - Minimal charge
 * @param {number}         [options.filter.maxCharge=+Infinity] - Maximal charge
 * @param {boolean}        [options.filter.absoluteCharge=false] - If true, the charge is absolute (so between 0 and +Infinity by default)
 * @param {object}         [options.filter.unsaturation={}]
 * @param {number}         [options.filter.unsaturation.min=-Infinity] - Minimal unsaturation
 * @param {number}         [options.filter.unsaturation.max=+Infinity] - Maximal unsaturation
 * @param {boolean}        [options.filter.unsaturation.onlyInteger=false] - Integer unsaturation
 * @param {boolean}        [options.filter.unsaturation.onlyNonInteger=false] - Non integer unsaturation
 * @param {function}       [options.filter.callback] - a function to filter the MF
 * @returns {Promise}
 */
async function fromPeptidicSequence(sequences, options = {}) {
  const {
    digestion = {},
    mfsArray: originalMFsArray = [],
    allowNeutralLoss = false,
    protonation = false,
    protonationPH = 7,
    fragmentation = {},
    filter = {},
    ionizations = '',
    limit = 100000,
    estimate = false,
    onStep,
    links = {}
  } = options;
  const hasLinked = sequences.includes('#');
  const mfsArrayLinked = structuredClone(originalMFsArray);
  const mfsArrayUnlinked = structuredClone(originalMFsArray);
  const unlinked = [];
  mfsArrayUnlinked.push(unlinked);
  for (const sequence of sequences.split(/[,:]/)) {
    let fragmentsArray = (0, fragmentPeptide_1.fragmentPeptide)(sequence, {
      digestion,
      protonation,
      fragmentation,
      protonationPH,
      allowNeutralLoss
    });
    mfsArrayLinked.push(fragmentsArray.filter(fragment => fragment.includes('#')));
    unlinked.push(...fragmentsArray.filter(fragment => !fragment.includes('#')));
  }
  let combined = await (0, mf_generator_1$4.generateMFs)(mfsArrayUnlinked, {
    ionizations,
    filter,
    estimate,
    limit,
    onStep,
    links
  });
  if (hasLinked) {
    combined.push(...(await (0, mf_generator_1$4.generateMFs)(mfsArrayLinked, {
      ionizations,
      filter,
      estimate,
      limit,
      onStep,
      links
    })));
  }
  if (!estimate) {
    for (const result of combined) {
      result.sequence = (0, chemical_groups_1$1.groupsToSequence)(result.parts.filter(Boolean).join(' '));
    }
  }
  return combined;
}

var fromRange$1 = {};

Object.defineProperty(fromRange$1, "__esModule", {
  value: true
});
fromRange$1.fromRange = fromRange;
const mf_generator_1$3 = src$b;
/**
 * Generates a database 'generated' from an array of molecular formula
 * @param {string} rangesString - a string representing the range to search
 * @param {object} [options={}]
 * @param {boolean} [options.estimate=false] - estimate the number of MF without filters
 * @param {function} [options.onStep] - Callback to do after each step
 * @param {string} [options.databaseName='generated']
 * @param {number} [options.limit=100000] - Maximum number of results
 * @param {boolean} [options.canonizeMF=true] - Canonize molecular formula
 * @param {boolean} [options.uniqueMFs=true] - Force canonization and make MF unique
 * @param {string} [options.ionizations=''] - Comma separated list of ionizations (to charge the molecule)
 * @param {object} [options.filter={}]
 * @param {number} [options.filter.minMass=0] - Minimal monoisotopic mass
 * @param {number} [options.filter.maxMass=+Infinity] - Maximal monoisotopic mass
 * @param {number} [options.filter.minEM=0] - Minimal neutral monoisotopic mass
 * @param {number} [options.filter.maxEM=+Infinity] - Maximal neutral monoisotopic mass
 * @param {number} [options.filter.minMSEM=0] - Minimal observed monoisotopic mass
 * @param {number} [options.filter.maxMSEM=+Infinity] - Maximal observed monoisotopic mass
 * @param {number} [options.filter.minCharge=-Infinity] - Minimal charge
 * @param {number} [options.filter.maxCharge=+Infinity] - Maximal charge
 * @param {boolean}   [options.filter.absoluteCharge=false] - If true, the charge is absolute (so between 0 and +Infinity by default)
 * @param {object} [options.filter.unsaturation={}]
 * @param {number} [options.filter.unsaturation.min=-Infinity] - Minimal unsaturation
 * @param {number} [options.filter.unsaturation.max=+Infinity] - Maximal unsaturation
 * @param {boolean} [options.filter.unsaturation.onlyInteger=false] - Integer unsaturation
 * @param {boolean} [options.filter.unsaturation.onlyNonInteger=false] - Non integer unsaturation
 * @param {function} [options.filter.callback] - a function to filter the MF
 * @param {object} [options.filter.atoms] - object of atom:{min, max}
 *
 * @returns {Promise} - list of possible molecular formula
 *
 * @example
 * const {EMDB} = require('emdb');
 * let emdb = new EMDB();
 * // semi-columns separated for combination, comma for 'or'
 * emdb.fromRange('C1-10, H1-10; Cl0-1 Br0-1'); // create a database 'generated' combining all possibilies
 * console.log(emdb.get('generated').length); // 80
 */
async function fromRange(rangesString, options = {}) {
  let ranges = rangesString.split(/ *[\n\r;] */);
  for (let i = 0; i < ranges.length; i++) {
    let range = ranges[i];
    if (range.includes(',')) {
      ranges[i] = range.split(/ *, */);
    }
  }
  return (0, mf_generator_1$3.generateMFs)(ranges, options);
}

var loadCommercials$1 = {};

function commonjsRequire(path) {
	throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}

var jszip_min = {exports: {}};

/*!

JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>

(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.

JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/
(function (module, exports) {
  !function (e) {
    module.exports = e();
  }(function () {
    return function s(a, o, h) {
      function u(r, e) {
        if (!o[r]) {
          if (!a[r]) {
            var t = "function" == typeof commonjsRequire && commonjsRequire;
            if (!e && t) return t(r, true);
            if (l) return l(r, true);
            var n = new Error("Cannot find module '" + r + "'");
            throw n.code = "MODULE_NOT_FOUND", n;
          }
          var i = o[r] = {
            exports: {}
          };
          a[r][0].call(i.exports, function (e) {
            var t = a[r][1][e];
            return u(t || e);
          }, i, i.exports, s, a, o, h);
        }
        return o[r].exports;
      }
      for (var l = "function" == typeof commonjsRequire && commonjsRequire, e = 0; e < h.length; e++) u(h[e]);
      return u;
    }({
      1: [function (e, t, r) {

        var d = e("./utils"),
          c = e("./support"),
          p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
        r.encode = function (e) {
          for (var t, r, n, i, s, a, o, h = [], u = 0, l = e.length, f = l, c = "string" !== d.getTypeOf(e); u < e.length;) f = l - u, n = c ? (t = e[u++], r = u < l ? e[u++] : 0, u < l ? e[u++] : 0) : (t = e.charCodeAt(u++), r = u < l ? e.charCodeAt(u++) : 0, u < l ? e.charCodeAt(u++) : 0), i = t >> 2, s = (3 & t) << 4 | r >> 4, a = 1 < f ? (15 & r) << 2 | n >> 6 : 64, o = 2 < f ? 63 & n : 64, h.push(p.charAt(i) + p.charAt(s) + p.charAt(a) + p.charAt(o));
          return h.join("");
        }, r.decode = function (e) {
          var t,
            r,
            n,
            i,
            s,
            a,
            o = 0,
            h = 0,
            u = "data:";
          if (e.substr(0, u.length) === u) throw new Error("Invalid base64 input, it looks like a data url.");
          var l,
            f = 3 * (e = e.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
          if (e.charAt(e.length - 1) === p.charAt(64) && f--, e.charAt(e.length - 2) === p.charAt(64) && f--, f % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
          for (l = c.uint8array ? new Uint8Array(0 | f) : new Array(0 | f); o < e.length;) t = p.indexOf(e.charAt(o++)) << 2 | (i = p.indexOf(e.charAt(o++))) >> 4, r = (15 & i) << 4 | (s = p.indexOf(e.charAt(o++))) >> 2, n = (3 & s) << 6 | (a = p.indexOf(e.charAt(o++))), l[h++] = t, 64 !== s && (l[h++] = r), 64 !== a && (l[h++] = n);
          return l;
        };
      }, {
        "./support": 30,
        "./utils": 32
      }],
      2: [function (e, t, r) {

        var n = e("./external"),
          i = e("./stream/DataWorker"),
          s = e("./stream/Crc32Probe"),
          a = e("./stream/DataLengthProbe");
        function o(e, t, r, n, i) {
          this.compressedSize = e, this.uncompressedSize = t, this.crc32 = r, this.compression = n, this.compressedContent = i;
        }
        o.prototype = {
          getContentWorker: function () {
            var e = new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),
              t = this;
            return e.on("end", function () {
              if (this.streamInfo.data_length !== t.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
            }), e;
          },
          getCompressedWorker: function () {
            return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
          }
        }, o.createWorkerFrom = function (e, t, r) {
          return e.pipe(new s()).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression", t);
        }, t.exports = o;
      }, {
        "./external": 6,
        "./stream/Crc32Probe": 25,
        "./stream/DataLengthProbe": 26,
        "./stream/DataWorker": 27
      }],
      3: [function (e, t, r) {

        var n = e("./stream/GenericWorker");
        r.STORE = {
          magic: "\0\0",
          compressWorker: function () {
            return new n("STORE compression");
          },
          uncompressWorker: function () {
            return new n("STORE decompression");
          }
        }, r.DEFLATE = e("./flate");
      }, {
        "./flate": 7,
        "./stream/GenericWorker": 28
      }],
      4: [function (e, t, r) {

        var n = e("./utils");
        var o = function () {
          for (var e, t = [], r = 0; r < 256; r++) {
            e = r;
            for (var n = 0; n < 8; n++) e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> 1;
            t[r] = e;
          }
          return t;
        }();
        t.exports = function (e, t) {
          return void 0 !== e && e.length ? "string" !== n.getTypeOf(e) ? function (e, t, r, n) {
            var i = o,
              s = n + r;
            e ^= -1;
            for (var a = n; a < s; a++) e = e >>> 8 ^ i[255 & (e ^ t[a])];
            return -1 ^ e;
          }(0 | t, e, e.length, 0) : function (e, t, r, n) {
            var i = o,
              s = n + r;
            e ^= -1;
            for (var a = n; a < s; a++) e = e >>> 8 ^ i[255 & (e ^ t.charCodeAt(a))];
            return -1 ^ e;
          }(0 | t, e, e.length, 0) : 0;
        };
      }, {
        "./utils": 32
      }],
      5: [function (e, t, r) {

        r.base64 = false, r.binary = false, r.dir = false, r.createFolders = true, r.date = null, r.compression = null, r.compressionOptions = null, r.comment = null, r.unixPermissions = null, r.dosPermissions = null;
      }, {}],
      6: [function (e, t, r) {

        var n = null;
        n = "undefined" != typeof Promise ? Promise : e("lie"), t.exports = {
          Promise: n
        };
      }, {
        lie: 37
      }],
      7: [function (e, t, r) {

        var n = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Uint32Array,
          i = e("pako"),
          s = e("./utils"),
          a = e("./stream/GenericWorker"),
          o = n ? "uint8array" : "array";
        function h(e, t) {
          a.call(this, "FlateWorker/" + e), this._pako = null, this._pakoAction = e, this._pakoOptions = t, this.meta = {};
        }
        r.magic = "\b\0", s.inherits(h, a), h.prototype.processChunk = function (e) {
          this.meta = e.meta, null === this._pako && this._createPako(), this._pako.push(s.transformTo(o, e.data), false);
        }, h.prototype.flush = function () {
          a.prototype.flush.call(this), null === this._pako && this._createPako(), this._pako.push([], true);
        }, h.prototype.cleanUp = function () {
          a.prototype.cleanUp.call(this), this._pako = null;
        }, h.prototype._createPako = function () {
          this._pako = new i[this._pakoAction]({
            raw: true,
            level: this._pakoOptions.level || -1
          });
          var t = this;
          this._pako.onData = function (e) {
            t.push({
              data: e,
              meta: t.meta
            });
          };
        }, r.compressWorker = function (e) {
          return new h("Deflate", e);
        }, r.uncompressWorker = function () {
          return new h("Inflate", {});
        };
      }, {
        "./stream/GenericWorker": 28,
        "./utils": 32,
        pako: 38
      }],
      8: [function (e, t, r) {

        function A(e, t) {
          var r,
            n = "";
          for (r = 0; r < t; r++) n += String.fromCharCode(255 & e), e >>>= 8;
          return n;
        }
        function n(e, t, r, n, i, s) {
          var a,
            o,
            h = e.file,
            u = e.compression,
            l = s !== O.utf8encode,
            f = I.transformTo("string", s(h.name)),
            c = I.transformTo("string", O.utf8encode(h.name)),
            d = h.comment,
            p = I.transformTo("string", s(d)),
            m = I.transformTo("string", O.utf8encode(d)),
            _ = c.length !== h.name.length,
            g = m.length !== d.length,
            b = "",
            v = "",
            y = "",
            w = h.dir,
            k = h.date,
            x = {
              crc32: 0,
              compressedSize: 0,
              uncompressedSize: 0
            };
          t && !r || (x.crc32 = e.crc32, x.compressedSize = e.compressedSize, x.uncompressedSize = e.uncompressedSize);
          var S = 0;
          t && (S |= 8), l || !_ && !g || (S |= 2048);
          var z = 0,
            C = 0;
          w && (z |= 16), "UNIX" === i ? (C = 798, z |= function (e, t) {
            var r = e;
            return e || (r = t ? 16893 : 33204), (65535 & r) << 16;
          }(h.unixPermissions, w)) : (C = 20, z |= function (e) {
            return 63 & (e || 0);
          }(h.dosPermissions)), a = k.getUTCHours(), a <<= 6, a |= k.getUTCMinutes(), a <<= 5, a |= k.getUTCSeconds() / 2, o = k.getUTCFullYear() - 1980, o <<= 4, o |= k.getUTCMonth() + 1, o <<= 5, o |= k.getUTCDate(), _ && (v = A(1, 1) + A(B(f), 4) + c, b += "up" + A(v.length, 2) + v), g && (y = A(1, 1) + A(B(p), 4) + m, b += "uc" + A(y.length, 2) + y);
          var E = "";
          return E += "\n\0", E += A(S, 2), E += u.magic, E += A(a, 2), E += A(o, 2), E += A(x.crc32, 4), E += A(x.compressedSize, 4), E += A(x.uncompressedSize, 4), E += A(f.length, 2), E += A(b.length, 2), {
            fileRecord: R.LOCAL_FILE_HEADER + E + f + b,
            dirRecord: R.CENTRAL_FILE_HEADER + A(C, 2) + E + A(p.length, 2) + "\0\0\0\0" + A(z, 4) + A(n, 4) + f + b + p
          };
        }
        var I = e("../utils"),
          i = e("../stream/GenericWorker"),
          O = e("../utf8"),
          B = e("../crc32"),
          R = e("../signature");
        function s(e, t, r, n) {
          i.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = t, this.zipPlatform = r, this.encodeFileName = n, this.streamFiles = e, this.accumulate = false, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
        }
        I.inherits(s, i), s.prototype.push = function (e) {
          var t = e.meta.percent || 0,
            r = this.entriesCount,
            n = this._sources.length;
          this.accumulate ? this.contentBuffer.push(e) : (this.bytesWritten += e.data.length, i.prototype.push.call(this, {
            data: e.data,
            meta: {
              currentFile: this.currentFile,
              percent: r ? (t + 100 * (r - n - 1)) / r : 100
            }
          }));
        }, s.prototype.openedSource = function (e) {
          this.currentSourceOffset = this.bytesWritten, this.currentFile = e.file.name;
          var t = this.streamFiles && !e.file.dir;
          if (t) {
            var r = n(e, t, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
            this.push({
              data: r.fileRecord,
              meta: {
                percent: 0
              }
            });
          } else this.accumulate = true;
        }, s.prototype.closedSource = function (e) {
          this.accumulate = false;
          var t = this.streamFiles && !e.file.dir,
            r = n(e, t, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
          if (this.dirRecords.push(r.dirRecord), t) this.push({
            data: function (e) {
              return R.DATA_DESCRIPTOR + A(e.crc32, 4) + A(e.compressedSize, 4) + A(e.uncompressedSize, 4);
            }(e),
            meta: {
              percent: 100
            }
          });else for (this.push({
            data: r.fileRecord,
            meta: {
              percent: 0
            }
          }); this.contentBuffer.length;) this.push(this.contentBuffer.shift());
          this.currentFile = null;
        }, s.prototype.flush = function () {
          for (var e = this.bytesWritten, t = 0; t < this.dirRecords.length; t++) this.push({
            data: this.dirRecords[t],
            meta: {
              percent: 100
            }
          });
          var r = this.bytesWritten - e,
            n = function (e, t, r, n, i) {
              var s = I.transformTo("string", i(n));
              return R.CENTRAL_DIRECTORY_END + "\0\0\0\0" + A(e, 2) + A(e, 2) + A(t, 4) + A(r, 4) + A(s.length, 2) + s;
            }(this.dirRecords.length, r, e, this.zipComment, this.encodeFileName);
          this.push({
            data: n,
            meta: {
              percent: 100
            }
          });
        }, s.prototype.prepareNextSource = function () {
          this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
        }, s.prototype.registerPrevious = function (e) {
          this._sources.push(e);
          var t = this;
          return e.on("data", function (e) {
            t.processChunk(e);
          }), e.on("end", function () {
            t.closedSource(t.previous.streamInfo), t._sources.length ? t.prepareNextSource() : t.end();
          }), e.on("error", function (e) {
            t.error(e);
          }), this;
        }, s.prototype.resume = function () {
          return !!i.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), true) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), true));
        }, s.prototype.error = function (e) {
          var t = this._sources;
          if (!i.prototype.error.call(this, e)) return false;
          for (var r = 0; r < t.length; r++) try {
            t[r].error(e);
          } catch (e) {}
          return true;
        }, s.prototype.lock = function () {
          i.prototype.lock.call(this);
          for (var e = this._sources, t = 0; t < e.length; t++) e[t].lock();
        }, t.exports = s;
      }, {
        "../crc32": 4,
        "../signature": 23,
        "../stream/GenericWorker": 28,
        "../utf8": 31,
        "../utils": 32
      }],
      9: [function (e, t, r) {

        var u = e("../compressions"),
          n = e("./ZipFileWorker");
        r.generateWorker = function (e, a, t) {
          var o = new n(a.streamFiles, t, a.platform, a.encodeFileName),
            h = 0;
          try {
            e.forEach(function (e, t) {
              h++;
              var r = function (e, t) {
                  var r = e || t,
                    n = u[r];
                  if (!n) throw new Error(r + " is not a valid compression method !");
                  return n;
                }(t.options.compression, a.compression),
                n = t.options.compressionOptions || a.compressionOptions || {},
                i = t.dir,
                s = t.date;
              t._compressWorker(r, n).withStreamInfo("file", {
                name: e,
                dir: i,
                date: s,
                comment: t.comment || "",
                unixPermissions: t.unixPermissions,
                dosPermissions: t.dosPermissions
              }).pipe(o);
            }), o.entriesCount = h;
          } catch (e) {
            o.error(e);
          }
          return o;
        };
      }, {
        "../compressions": 3,
        "./ZipFileWorker": 8
      }],
      10: [function (e, t, r) {

        function n() {
          if (!(this instanceof n)) return new n();
          if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
          this.files = Object.create(null), this.comment = null, this.root = "", this.clone = function () {
            var e = new n();
            for (var t in this) "function" != typeof this[t] && (e[t] = this[t]);
            return e;
          };
        }
        (n.prototype = e("./object")).loadAsync = e("./load"), n.support = e("./support"), n.defaults = e("./defaults"), n.version = "3.10.1", n.loadAsync = function (e, t) {
          return new n().loadAsync(e, t);
        }, n.external = e("./external"), t.exports = n;
      }, {
        "./defaults": 5,
        "./external": 6,
        "./load": 11,
        "./object": 15,
        "./support": 30
      }],
      11: [function (e, t, r) {

        var u = e("./utils"),
          i = e("./external"),
          n = e("./utf8"),
          s = e("./zipEntries"),
          a = e("./stream/Crc32Probe"),
          l = e("./nodejsUtils");
        function f(n) {
          return new i.Promise(function (e, t) {
            var r = n.decompressed.getContentWorker().pipe(new a());
            r.on("error", function (e) {
              t(e);
            }).on("end", function () {
              r.streamInfo.crc32 !== n.decompressed.crc32 ? t(new Error("Corrupted zip : CRC32 mismatch")) : e();
            }).resume();
          });
        }
        t.exports = function (e, o) {
          var h = this;
          return o = u.extend(o || {}, {
            base64: false,
            checkCRC32: false,
            optimizedBinaryString: false,
            createFolders: false,
            decodeFileName: n.utf8decode
          }), l.isNode && l.isStream(e) ? i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : u.prepareContent("the loaded zip file", e, true, o.optimizedBinaryString, o.base64).then(function (e) {
            var t = new s(o);
            return t.load(e), t;
          }).then(function (e) {
            var t = [i.Promise.resolve(e)],
              r = e.files;
            if (o.checkCRC32) for (var n = 0; n < r.length; n++) t.push(f(r[n]));
            return i.Promise.all(t);
          }).then(function (e) {
            for (var t = e.shift(), r = t.files, n = 0; n < r.length; n++) {
              var i = r[n],
                s = i.fileNameStr,
                a = u.resolve(i.fileNameStr);
              h.file(a, i.decompressed, {
                binary: true,
                optimizedBinaryString: true,
                date: i.date,
                dir: i.dir,
                comment: i.fileCommentStr.length ? i.fileCommentStr : null,
                unixPermissions: i.unixPermissions,
                dosPermissions: i.dosPermissions,
                createFolders: o.createFolders
              }), i.dir || (h.file(a).unsafeOriginalName = s);
            }
            return t.zipComment.length && (h.comment = t.zipComment), h;
          });
        };
      }, {
        "./external": 6,
        "./nodejsUtils": 14,
        "./stream/Crc32Probe": 25,
        "./utf8": 31,
        "./utils": 32,
        "./zipEntries": 33
      }],
      12: [function (e, t, r) {

        var n = e("../utils"),
          i = e("../stream/GenericWorker");
        function s(e, t) {
          i.call(this, "Nodejs stream input adapter for " + e), this._upstreamEnded = false, this._bindStream(t);
        }
        n.inherits(s, i), s.prototype._bindStream = function (e) {
          var t = this;
          (this._stream = e).pause(), e.on("data", function (e) {
            t.push({
              data: e,
              meta: {
                percent: 0
              }
            });
          }).on("error", function (e) {
            t.isPaused ? this.generatedError = e : t.error(e);
          }).on("end", function () {
            t.isPaused ? t._upstreamEnded = true : t.end();
          });
        }, s.prototype.pause = function () {
          return !!i.prototype.pause.call(this) && (this._stream.pause(), true);
        }, s.prototype.resume = function () {
          return !!i.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), true);
        }, t.exports = s;
      }, {
        "../stream/GenericWorker": 28,
        "../utils": 32
      }],
      13: [function (e, t, r) {

        var i = e("readable-stream").Readable;
        function n(e, t, r) {
          i.call(this, t), this._helper = e;
          var n = this;
          e.on("data", function (e, t) {
            n.push(e) || n._helper.pause(), r && r(t);
          }).on("error", function (e) {
            n.emit("error", e);
          }).on("end", function () {
            n.push(null);
          });
        }
        e("../utils").inherits(n, i), n.prototype._read = function () {
          this._helper.resume();
        }, t.exports = n;
      }, {
        "../utils": 32,
        "readable-stream": 16
      }],
      14: [function (e, t, r) {

        t.exports = {
          isNode: "undefined" != typeof Buffer,
          newBufferFrom: function (e, t) {
            if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(e, t);
            if ("number" == typeof e) throw new Error('The "data" argument must not be a number');
            return new Buffer(e, t);
          },
          allocBuffer: function (e) {
            if (Buffer.alloc) return Buffer.alloc(e);
            var t = new Buffer(e);
            return t.fill(0), t;
          },
          isBuffer: function (e) {
            return Buffer.isBuffer(e);
          },
          isStream: function (e) {
            return e && "function" == typeof e.on && "function" == typeof e.pause && "function" == typeof e.resume;
          }
        };
      }, {}],
      15: [function (e, t, r) {

        function s(e, t, r) {
          var n,
            i = u.getTypeOf(t),
            s = u.extend(r || {}, f);
          s.date = s.date || new Date(), null !== s.compression && (s.compression = s.compression.toUpperCase()), "string" == typeof s.unixPermissions && (s.unixPermissions = parseInt(s.unixPermissions, 8)), s.unixPermissions && 16384 & s.unixPermissions && (s.dir = true), s.dosPermissions && 16 & s.dosPermissions && (s.dir = true), s.dir && (e = g(e)), s.createFolders && (n = _(e)) && b.call(this, n, true);
          var a = "string" === i && false === s.binary && false === s.base64;
          r && void 0 !== r.binary || (s.binary = !a), (t instanceof c && 0 === t.uncompressedSize || s.dir || !t || 0 === t.length) && (s.base64 = false, s.binary = true, t = "", s.compression = "STORE", i = "string");
          var o = null;
          o = t instanceof c || t instanceof l ? t : p.isNode && p.isStream(t) ? new m(e, t) : u.prepareContent(e, t, s.binary, s.optimizedBinaryString, s.base64);
          var h = new d(e, o, s);
          this.files[e] = h;
        }
        var i = e("./utf8"),
          u = e("./utils"),
          l = e("./stream/GenericWorker"),
          a = e("./stream/StreamHelper"),
          f = e("./defaults"),
          c = e("./compressedObject"),
          d = e("./zipObject"),
          o = e("./generate"),
          p = e("./nodejsUtils"),
          m = e("./nodejs/NodejsStreamInputAdapter"),
          _ = function (e) {
            "/" === e.slice(-1) && (e = e.substring(0, e.length - 1));
            var t = e.lastIndexOf("/");
            return 0 < t ? e.substring(0, t) : "";
          },
          g = function (e) {
            return "/" !== e.slice(-1) && (e += "/"), e;
          },
          b = function (e, t) {
            return t = void 0 !== t ? t : f.createFolders, e = g(e), this.files[e] || s.call(this, e, null, {
              dir: true,
              createFolders: t
            }), this.files[e];
          };
        function h(e) {
          return "[object RegExp]" === Object.prototype.toString.call(e);
        }
        var n = {
          load: function () {
            throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
          },
          forEach: function (e) {
            var t, r, n;
            for (t in this.files) n = this.files[t], (r = t.slice(this.root.length, t.length)) && t.slice(0, this.root.length) === this.root && e(r, n);
          },
          filter: function (r) {
            var n = [];
            return this.forEach(function (e, t) {
              r(e, t) && n.push(t);
            }), n;
          },
          file: function (e, t, r) {
            if (1 !== arguments.length) return e = this.root + e, s.call(this, e, t, r), this;
            if (h(e)) {
              var n = e;
              return this.filter(function (e, t) {
                return !t.dir && n.test(e);
              });
            }
            var i = this.files[this.root + e];
            return i && !i.dir ? i : null;
          },
          folder: function (r) {
            if (!r) return this;
            if (h(r)) return this.filter(function (e, t) {
              return t.dir && r.test(e);
            });
            var e = this.root + r,
              t = b.call(this, e),
              n = this.clone();
            return n.root = t.name, n;
          },
          remove: function (r) {
            r = this.root + r;
            var e = this.files[r];
            if (e || ("/" !== r.slice(-1) && (r += "/"), e = this.files[r]), e && !e.dir) delete this.files[r];else for (var t = this.filter(function (e, t) {
                return t.name.slice(0, r.length) === r;
              }), n = 0; n < t.length; n++) delete this.files[t[n].name];
            return this;
          },
          generate: function () {
            throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
          },
          generateInternalStream: function (e) {
            var t,
              r = {};
            try {
              if ((r = u.extend(e || {}, {
                streamFiles: !1,
                compression: "STORE",
                compressionOptions: null,
                type: "",
                platform: "DOS",
                comment: null,
                mimeType: "application/zip",
                encodeFileName: i.utf8encode
              })).type = r.type.toLowerCase(), r.compression = r.compression.toUpperCase(), "binarystring" === r.type && (r.type = "string"), !r.type) throw new Error("No output type specified.");
              u.checkSupport(r.type), "darwin" !== r.platform && "freebsd" !== r.platform && "linux" !== r.platform && "sunos" !== r.platform || (r.platform = "UNIX"), "win32" === r.platform && (r.platform = "DOS");
              var n = r.comment || this.comment || "";
              t = o.generateWorker(this, r, n);
            } catch (e) {
              (t = new l("error")).error(e);
            }
            return new a(t, r.type || "string", r.mimeType);
          },
          generateAsync: function (e, t) {
            return this.generateInternalStream(e).accumulate(t);
          },
          generateNodeStream: function (e, t) {
            return (e = e || {}).type || (e.type = "nodebuffer"), this.generateInternalStream(e).toNodejsStream(t);
          }
        };
        t.exports = n;
      }, {
        "./compressedObject": 2,
        "./defaults": 5,
        "./generate": 9,
        "./nodejs/NodejsStreamInputAdapter": 12,
        "./nodejsUtils": 14,
        "./stream/GenericWorker": 28,
        "./stream/StreamHelper": 29,
        "./utf8": 31,
        "./utils": 32,
        "./zipObject": 35
      }],
      16: [function (e, t, r) {

        t.exports = e("stream");
      }, {
        stream: void 0
      }],
      17: [function (e, t, r) {

        var n = e("./DataReader");
        function i(e) {
          n.call(this, e);
          for (var t = 0; t < this.data.length; t++) e[t] = 255 & e[t];
        }
        e("../utils").inherits(i, n), i.prototype.byteAt = function (e) {
          return this.data[this.zero + e];
        }, i.prototype.lastIndexOfSignature = function (e) {
          for (var t = e.charCodeAt(0), r = e.charCodeAt(1), n = e.charCodeAt(2), i = e.charCodeAt(3), s = this.length - 4; 0 <= s; --s) if (this.data[s] === t && this.data[s + 1] === r && this.data[s + 2] === n && this.data[s + 3] === i) return s - this.zero;
          return -1;
        }, i.prototype.readAndCheckSignature = function (e) {
          var t = e.charCodeAt(0),
            r = e.charCodeAt(1),
            n = e.charCodeAt(2),
            i = e.charCodeAt(3),
            s = this.readData(4);
          return t === s[0] && r === s[1] && n === s[2] && i === s[3];
        }, i.prototype.readData = function (e) {
          if (this.checkOffset(e), 0 === e) return [];
          var t = this.data.slice(this.zero + this.index, this.zero + this.index + e);
          return this.index += e, t;
        }, t.exports = i;
      }, {
        "../utils": 32,
        "./DataReader": 18
      }],
      18: [function (e, t, r) {

        var n = e("../utils");
        function i(e) {
          this.data = e, this.length = e.length, this.index = 0, this.zero = 0;
        }
        i.prototype = {
          checkOffset: function (e) {
            this.checkIndex(this.index + e);
          },
          checkIndex: function (e) {
            if (this.length < this.zero + e || e < 0) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + e + "). Corrupted zip ?");
          },
          setIndex: function (e) {
            this.checkIndex(e), this.index = e;
          },
          skip: function (e) {
            this.setIndex(this.index + e);
          },
          byteAt: function () {},
          readInt: function (e) {
            var t,
              r = 0;
            for (this.checkOffset(e), t = this.index + e - 1; t >= this.index; t--) r = (r << 8) + this.byteAt(t);
            return this.index += e, r;
          },
          readString: function (e) {
            return n.transformTo("string", this.readData(e));
          },
          readData: function () {},
          lastIndexOfSignature: function () {},
          readAndCheckSignature: function () {},
          readDate: function () {
            var e = this.readInt(4);
            return new Date(Date.UTC(1980 + (e >> 25 & 127), (e >> 21 & 15) - 1, e >> 16 & 31, e >> 11 & 31, e >> 5 & 63, (31 & e) << 1));
          }
        }, t.exports = i;
      }, {
        "../utils": 32
      }],
      19: [function (e, t, r) {

        var n = e("./Uint8ArrayReader");
        function i(e) {
          n.call(this, e);
        }
        e("../utils").inherits(i, n), i.prototype.readData = function (e) {
          this.checkOffset(e);
          var t = this.data.slice(this.zero + this.index, this.zero + this.index + e);
          return this.index += e, t;
        }, t.exports = i;
      }, {
        "../utils": 32,
        "./Uint8ArrayReader": 21
      }],
      20: [function (e, t, r) {

        var n = e("./DataReader");
        function i(e) {
          n.call(this, e);
        }
        e("../utils").inherits(i, n), i.prototype.byteAt = function (e) {
          return this.data.charCodeAt(this.zero + e);
        }, i.prototype.lastIndexOfSignature = function (e) {
          return this.data.lastIndexOf(e) - this.zero;
        }, i.prototype.readAndCheckSignature = function (e) {
          return e === this.readData(4);
        }, i.prototype.readData = function (e) {
          this.checkOffset(e);
          var t = this.data.slice(this.zero + this.index, this.zero + this.index + e);
          return this.index += e, t;
        }, t.exports = i;
      }, {
        "../utils": 32,
        "./DataReader": 18
      }],
      21: [function (e, t, r) {

        var n = e("./ArrayReader");
        function i(e) {
          n.call(this, e);
        }
        e("../utils").inherits(i, n), i.prototype.readData = function (e) {
          if (this.checkOffset(e), 0 === e) return new Uint8Array(0);
          var t = this.data.subarray(this.zero + this.index, this.zero + this.index + e);
          return this.index += e, t;
        }, t.exports = i;
      }, {
        "../utils": 32,
        "./ArrayReader": 17
      }],
      22: [function (e, t, r) {

        var n = e("../utils"),
          i = e("../support"),
          s = e("./ArrayReader"),
          a = e("./StringReader"),
          o = e("./NodeBufferReader"),
          h = e("./Uint8ArrayReader");
        t.exports = function (e) {
          var t = n.getTypeOf(e);
          return n.checkSupport(t), "string" !== t || i.uint8array ? "nodebuffer" === t ? new o(e) : i.uint8array ? new h(n.transformTo("uint8array", e)) : new s(n.transformTo("array", e)) : new a(e);
        };
      }, {
        "../support": 30,
        "../utils": 32,
        "./ArrayReader": 17,
        "./NodeBufferReader": 19,
        "./StringReader": 20,
        "./Uint8ArrayReader": 21
      }],
      23: [function (e, t, r) {

        r.LOCAL_FILE_HEADER = "PK", r.CENTRAL_FILE_HEADER = "PK", r.CENTRAL_DIRECTORY_END = "PK", r.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK", r.ZIP64_CENTRAL_DIRECTORY_END = "PK", r.DATA_DESCRIPTOR = "PK\b";
      }, {}],
      24: [function (e, t, r) {

        var n = e("./GenericWorker"),
          i = e("../utils");
        function s(e) {
          n.call(this, "ConvertWorker to " + e), this.destType = e;
        }
        i.inherits(s, n), s.prototype.processChunk = function (e) {
          this.push({
            data: i.transformTo(this.destType, e.data),
            meta: e.meta
          });
        }, t.exports = s;
      }, {
        "../utils": 32,
        "./GenericWorker": 28
      }],
      25: [function (e, t, r) {

        var n = e("./GenericWorker"),
          i = e("../crc32");
        function s() {
          n.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
        }
        e("../utils").inherits(s, n), s.prototype.processChunk = function (e) {
          this.streamInfo.crc32 = i(e.data, this.streamInfo.crc32 || 0), this.push(e);
        }, t.exports = s;
      }, {
        "../crc32": 4,
        "../utils": 32,
        "./GenericWorker": 28
      }],
      26: [function (e, t, r) {

        var n = e("../utils"),
          i = e("./GenericWorker");
        function s(e) {
          i.call(this, "DataLengthProbe for " + e), this.propName = e, this.withStreamInfo(e, 0);
        }
        n.inherits(s, i), s.prototype.processChunk = function (e) {
          if (e) {
            var t = this.streamInfo[this.propName] || 0;
            this.streamInfo[this.propName] = t + e.data.length;
          }
          i.prototype.processChunk.call(this, e);
        }, t.exports = s;
      }, {
        "../utils": 32,
        "./GenericWorker": 28
      }],
      27: [function (e, t, r) {

        var n = e("../utils"),
          i = e("./GenericWorker");
        function s(e) {
          i.call(this, "DataWorker");
          var t = this;
          this.dataIsReady = false, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = false, e.then(function (e) {
            t.dataIsReady = true, t.data = e, t.max = e && e.length || 0, t.type = n.getTypeOf(e), t.isPaused || t._tickAndRepeat();
          }, function (e) {
            t.error(e);
          });
        }
        n.inherits(s, i), s.prototype.cleanUp = function () {
          i.prototype.cleanUp.call(this), this.data = null;
        }, s.prototype.resume = function () {
          return !!i.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = true, n.delay(this._tickAndRepeat, [], this)), true);
        }, s.prototype._tickAndRepeat = function () {
          this._tickScheduled = false, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (n.delay(this._tickAndRepeat, [], this), this._tickScheduled = true));
        }, s.prototype._tick = function () {
          if (this.isPaused || this.isFinished) return false;
          var e = null,
            t = Math.min(this.max, this.index + 16384);
          if (this.index >= this.max) return this.end();
          switch (this.type) {
            case "string":
              e = this.data.substring(this.index, t);
              break;
            case "uint8array":
              e = this.data.subarray(this.index, t);
              break;
            case "array":
            case "nodebuffer":
              e = this.data.slice(this.index, t);
          }
          return this.index = t, this.push({
            data: e,
            meta: {
              percent: this.max ? this.index / this.max * 100 : 0
            }
          });
        }, t.exports = s;
      }, {
        "../utils": 32,
        "./GenericWorker": 28
      }],
      28: [function (e, t, r) {

        function n(e) {
          this.name = e || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = true, this.isFinished = false, this.isLocked = false, this._listeners = {
            data: [],
            end: [],
            error: []
          }, this.previous = null;
        }
        n.prototype = {
          push: function (e) {
            this.emit("data", e);
          },
          end: function () {
            if (this.isFinished) return false;
            this.flush();
            try {
              this.emit("end"), this.cleanUp(), this.isFinished = !0;
            } catch (e) {
              this.emit("error", e);
            }
            return true;
          },
          error: function (e) {
            return !this.isFinished && (this.isPaused ? this.generatedError = e : (this.isFinished = true, this.emit("error", e), this.previous && this.previous.error(e), this.cleanUp()), true);
          },
          on: function (e, t) {
            return this._listeners[e].push(t), this;
          },
          cleanUp: function () {
            this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
          },
          emit: function (e, t) {
            if (this._listeners[e]) for (var r = 0; r < this._listeners[e].length; r++) this._listeners[e][r].call(this, t);
          },
          pipe: function (e) {
            return e.registerPrevious(this);
          },
          registerPrevious: function (e) {
            if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
            this.streamInfo = e.streamInfo, this.mergeStreamInfo(), this.previous = e;
            var t = this;
            return e.on("data", function (e) {
              t.processChunk(e);
            }), e.on("end", function () {
              t.end();
            }), e.on("error", function (e) {
              t.error(e);
            }), this;
          },
          pause: function () {
            return !this.isPaused && !this.isFinished && (this.isPaused = true, this.previous && this.previous.pause(), true);
          },
          resume: function () {
            if (!this.isPaused || this.isFinished) return false;
            var e = this.isPaused = false;
            return this.generatedError && (this.error(this.generatedError), e = true), this.previous && this.previous.resume(), !e;
          },
          flush: function () {},
          processChunk: function (e) {
            this.push(e);
          },
          withStreamInfo: function (e, t) {
            return this.extraStreamInfo[e] = t, this.mergeStreamInfo(), this;
          },
          mergeStreamInfo: function () {
            for (var e in this.extraStreamInfo) Object.prototype.hasOwnProperty.call(this.extraStreamInfo, e) && (this.streamInfo[e] = this.extraStreamInfo[e]);
          },
          lock: function () {
            if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
            this.isLocked = true, this.previous && this.previous.lock();
          },
          toString: function () {
            var e = "Worker " + this.name;
            return this.previous ? this.previous + " -> " + e : e;
          }
        }, t.exports = n;
      }, {}],
      29: [function (e, t, r) {

        var h = e("../utils"),
          i = e("./ConvertWorker"),
          s = e("./GenericWorker"),
          u = e("../base64"),
          n = e("../support"),
          a = e("../external"),
          o = null;
        if (n.nodestream) try {
          o = e("../nodejs/NodejsStreamOutputAdapter");
        } catch (e) {}
        function l(e, o) {
          return new a.Promise(function (t, r) {
            var n = [],
              i = e._internalType,
              s = e._outputType,
              a = e._mimeType;
            e.on("data", function (e, t) {
              n.push(e), o && o(t);
            }).on("error", function (e) {
              n = [], r(e);
            }).on("end", function () {
              try {
                var e = function (e, t, r) {
                  switch (e) {
                    case "blob":
                      return h.newBlob(h.transformTo("arraybuffer", t), r);
                    case "base64":
                      return u.encode(t);
                    default:
                      return h.transformTo(e, t);
                  }
                }(s, function (e, t) {
                  var r,
                    n = 0,
                    i = null,
                    s = 0;
                  for (r = 0; r < t.length; r++) s += t[r].length;
                  switch (e) {
                    case "string":
                      return t.join("");
                    case "array":
                      return Array.prototype.concat.apply([], t);
                    case "uint8array":
                      for (i = new Uint8Array(s), r = 0; r < t.length; r++) i.set(t[r], n), n += t[r].length;
                      return i;
                    case "nodebuffer":
                      return Buffer.concat(t);
                    default:
                      throw new Error("concat : unsupported type '" + e + "'");
                  }
                }(i, n), a);
                t(e);
              } catch (e) {
                r(e);
              }
              n = [];
            }).resume();
          });
        }
        function f(e, t, r) {
          var n = t;
          switch (t) {
            case "blob":
            case "arraybuffer":
              n = "uint8array";
              break;
            case "base64":
              n = "string";
          }
          try {
            this._internalType = n, this._outputType = t, this._mimeType = r, h.checkSupport(n), this._worker = e.pipe(new i(n)), e.lock();
          } catch (e) {
            this._worker = new s("error"), this._worker.error(e);
          }
        }
        f.prototype = {
          accumulate: function (e) {
            return l(this, e);
          },
          on: function (e, t) {
            var r = this;
            return "data" === e ? this._worker.on(e, function (e) {
              t.call(r, e.data, e.meta);
            }) : this._worker.on(e, function () {
              h.delay(t, arguments, r);
            }), this;
          },
          resume: function () {
            return h.delay(this._worker.resume, [], this._worker), this;
          },
          pause: function () {
            return this._worker.pause(), this;
          },
          toNodejsStream: function (e) {
            if (h.checkSupport("nodestream"), "nodebuffer" !== this._outputType) throw new Error(this._outputType + " is not supported by this method");
            return new o(this, {
              objectMode: "nodebuffer" !== this._outputType
            }, e);
          }
        }, t.exports = f;
      }, {
        "../base64": 1,
        "../external": 6,
        "../nodejs/NodejsStreamOutputAdapter": 13,
        "../support": 30,
        "../utils": 32,
        "./ConvertWorker": 24,
        "./GenericWorker": 28
      }],
      30: [function (e, t, r) {

        if (r.base64 = true, r.array = true, r.string = true, r.arraybuffer = "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array, r.nodebuffer = "undefined" != typeof Buffer, r.uint8array = "undefined" != typeof Uint8Array, "undefined" == typeof ArrayBuffer) r.blob = false;else {
          var n = new ArrayBuffer(0);
          try {
            r.blob = 0 === new Blob([n], {
              type: "application/zip"
            }).size;
          } catch (e) {
            try {
              var i = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
              i.append(n), r.blob = 0 === i.getBlob("application/zip").size;
            } catch (e) {
              r.blob = false;
            }
          }
        }
        try {
          r.nodestream = !!e("readable-stream").Readable;
        } catch (e) {
          r.nodestream = false;
        }
      }, {
        "readable-stream": 16
      }],
      31: [function (e, t, s) {

        for (var o = e("./utils"), h = e("./support"), r = e("./nodejsUtils"), n = e("./stream/GenericWorker"), u = new Array(256), i = 0; i < 256; i++) u[i] = 252 <= i ? 6 : 248 <= i ? 5 : 240 <= i ? 4 : 224 <= i ? 3 : 192 <= i ? 2 : 1;
        u[254] = u[254] = 1;
        function a() {
          n.call(this, "utf-8 decode"), this.leftOver = null;
        }
        function l() {
          n.call(this, "utf-8 encode");
        }
        s.utf8encode = function (e) {
          return h.nodebuffer ? r.newBufferFrom(e, "utf-8") : function (e) {
            var t,
              r,
              n,
              i,
              s,
              a = e.length,
              o = 0;
            for (i = 0; i < a; i++) 55296 == (64512 & (r = e.charCodeAt(i))) && i + 1 < a && 56320 == (64512 & (n = e.charCodeAt(i + 1))) && (r = 65536 + (r - 55296 << 10) + (n - 56320), i++), o += r < 128 ? 1 : r < 2048 ? 2 : r < 65536 ? 3 : 4;
            for (t = h.uint8array ? new Uint8Array(o) : new Array(o), i = s = 0; s < o; i++) 55296 == (64512 & (r = e.charCodeAt(i))) && i + 1 < a && 56320 == (64512 & (n = e.charCodeAt(i + 1))) && (r = 65536 + (r - 55296 << 10) + (n - 56320), i++), r < 128 ? t[s++] = r : (r < 2048 ? t[s++] = 192 | r >>> 6 : (r < 65536 ? t[s++] = 224 | r >>> 12 : (t[s++] = 240 | r >>> 18, t[s++] = 128 | r >>> 12 & 63), t[s++] = 128 | r >>> 6 & 63), t[s++] = 128 | 63 & r);
            return t;
          }(e);
        }, s.utf8decode = function (e) {
          return h.nodebuffer ? o.transformTo("nodebuffer", e).toString("utf-8") : function (e) {
            var t,
              r,
              n,
              i,
              s = e.length,
              a = new Array(2 * s);
            for (t = r = 0; t < s;) if ((n = e[t++]) < 128) a[r++] = n;else if (4 < (i = u[n])) a[r++] = 65533, t += i - 1;else {
              for (n &= 2 === i ? 31 : 3 === i ? 15 : 7; 1 < i && t < s;) n = n << 6 | 63 & e[t++], i--;
              1 < i ? a[r++] = 65533 : n < 65536 ? a[r++] = n : (n -= 65536, a[r++] = 55296 | n >> 10 & 1023, a[r++] = 56320 | 1023 & n);
            }
            return a.length !== r && (a.subarray ? a = a.subarray(0, r) : a.length = r), o.applyFromCharCode(a);
          }(e = o.transformTo(h.uint8array ? "uint8array" : "array", e));
        }, o.inherits(a, n), a.prototype.processChunk = function (e) {
          var t = o.transformTo(h.uint8array ? "uint8array" : "array", e.data);
          if (this.leftOver && this.leftOver.length) {
            if (h.uint8array) {
              var r = t;
              (t = new Uint8Array(r.length + this.leftOver.length)).set(this.leftOver, 0), t.set(r, this.leftOver.length);
            } else t = this.leftOver.concat(t);
            this.leftOver = null;
          }
          var n = function (e, t) {
              var r;
              for ((t = t || e.length) > e.length && (t = e.length), r = t - 1; 0 <= r && 128 == (192 & e[r]);) r--;
              return r < 0 ? t : 0 === r ? t : r + u[e[r]] > t ? r : t;
            }(t),
            i = t;
          n !== t.length && (h.uint8array ? (i = t.subarray(0, n), this.leftOver = t.subarray(n, t.length)) : (i = t.slice(0, n), this.leftOver = t.slice(n, t.length))), this.push({
            data: s.utf8decode(i),
            meta: e.meta
          });
        }, a.prototype.flush = function () {
          this.leftOver && this.leftOver.length && (this.push({
            data: s.utf8decode(this.leftOver),
            meta: {}
          }), this.leftOver = null);
        }, s.Utf8DecodeWorker = a, o.inherits(l, n), l.prototype.processChunk = function (e) {
          this.push({
            data: s.utf8encode(e.data),
            meta: e.meta
          });
        }, s.Utf8EncodeWorker = l;
      }, {
        "./nodejsUtils": 14,
        "./stream/GenericWorker": 28,
        "./support": 30,
        "./utils": 32
      }],
      32: [function (e, t, a) {

        var o = e("./support"),
          h = e("./base64"),
          r = e("./nodejsUtils"),
          u = e("./external");
        function n(e) {
          return e;
        }
        function l(e, t) {
          for (var r = 0; r < e.length; ++r) t[r] = 255 & e.charCodeAt(r);
          return t;
        }
        e("setimmediate"), a.newBlob = function (t, r) {
          a.checkSupport("blob");
          try {
            return new Blob([t], {
              type: r
            });
          } catch (e) {
            try {
              var n = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
              return n.append(t), n.getBlob(r);
            } catch (e) {
              throw new Error("Bug : can't construct the Blob.");
            }
          }
        };
        var i = {
          stringifyByChunk: function (e, t, r) {
            var n = [],
              i = 0,
              s = e.length;
            if (s <= r) return String.fromCharCode.apply(null, e);
            for (; i < s;) "array" === t || "nodebuffer" === t ? n.push(String.fromCharCode.apply(null, e.slice(i, Math.min(i + r, s)))) : n.push(String.fromCharCode.apply(null, e.subarray(i, Math.min(i + r, s)))), i += r;
            return n.join("");
          },
          stringifyByChar: function (e) {
            for (var t = "", r = 0; r < e.length; r++) t += String.fromCharCode(e[r]);
            return t;
          },
          applyCanBeUsed: {
            uint8array: function () {
              try {
                return o.uint8array && 1 === String.fromCharCode.apply(null, new Uint8Array(1)).length;
              } catch (e) {
                return false;
              }
            }(),
            nodebuffer: function () {
              try {
                return o.nodebuffer && 1 === String.fromCharCode.apply(null, r.allocBuffer(1)).length;
              } catch (e) {
                return false;
              }
            }()
          }
        };
        function s(e) {
          var t = 65536,
            r = a.getTypeOf(e),
            n = true;
          if ("uint8array" === r ? n = i.applyCanBeUsed.uint8array : "nodebuffer" === r && (n = i.applyCanBeUsed.nodebuffer), n) for (; 1 < t;) try {
            return i.stringifyByChunk(e, r, t);
          } catch (e) {
            t = Math.floor(t / 2);
          }
          return i.stringifyByChar(e);
        }
        function f(e, t) {
          for (var r = 0; r < e.length; r++) t[r] = e[r];
          return t;
        }
        a.applyFromCharCode = s;
        var c = {};
        c.string = {
          string: n,
          array: function (e) {
            return l(e, new Array(e.length));
          },
          arraybuffer: function (e) {
            return c.string.uint8array(e).buffer;
          },
          uint8array: function (e) {
            return l(e, new Uint8Array(e.length));
          },
          nodebuffer: function (e) {
            return l(e, r.allocBuffer(e.length));
          }
        }, c.array = {
          string: s,
          array: n,
          arraybuffer: function (e) {
            return new Uint8Array(e).buffer;
          },
          uint8array: function (e) {
            return new Uint8Array(e);
          },
          nodebuffer: function (e) {
            return r.newBufferFrom(e);
          }
        }, c.arraybuffer = {
          string: function (e) {
            return s(new Uint8Array(e));
          },
          array: function (e) {
            return f(new Uint8Array(e), new Array(e.byteLength));
          },
          arraybuffer: n,
          uint8array: function (e) {
            return new Uint8Array(e);
          },
          nodebuffer: function (e) {
            return r.newBufferFrom(new Uint8Array(e));
          }
        }, c.uint8array = {
          string: s,
          array: function (e) {
            return f(e, new Array(e.length));
          },
          arraybuffer: function (e) {
            return e.buffer;
          },
          uint8array: n,
          nodebuffer: function (e) {
            return r.newBufferFrom(e);
          }
        }, c.nodebuffer = {
          string: s,
          array: function (e) {
            return f(e, new Array(e.length));
          },
          arraybuffer: function (e) {
            return c.nodebuffer.uint8array(e).buffer;
          },
          uint8array: function (e) {
            return f(e, new Uint8Array(e.length));
          },
          nodebuffer: n
        }, a.transformTo = function (e, t) {
          if (t = t || "", !e) return t;
          a.checkSupport(e);
          var r = a.getTypeOf(t);
          return c[r][e](t);
        }, a.resolve = function (e) {
          for (var t = e.split("/"), r = [], n = 0; n < t.length; n++) {
            var i = t[n];
            "." === i || "" === i && 0 !== n && n !== t.length - 1 || (".." === i ? r.pop() : r.push(i));
          }
          return r.join("/");
        }, a.getTypeOf = function (e) {
          return "string" == typeof e ? "string" : "[object Array]" === Object.prototype.toString.call(e) ? "array" : o.nodebuffer && r.isBuffer(e) ? "nodebuffer" : o.uint8array && e instanceof Uint8Array ? "uint8array" : o.arraybuffer && e instanceof ArrayBuffer ? "arraybuffer" : void 0;
        }, a.checkSupport = function (e) {
          if (!o[e.toLowerCase()]) throw new Error(e + " is not supported by this platform");
        }, a.MAX_VALUE_16BITS = 65535, a.MAX_VALUE_32BITS = -1, a.pretty = function (e) {
          var t,
            r,
            n = "";
          for (r = 0; r < (e || "").length; r++) n += "\\x" + ((t = e.charCodeAt(r)) < 16 ? "0" : "") + t.toString(16).toUpperCase();
          return n;
        }, a.delay = function (e, t, r) {
          setImmediate(function () {
            e.apply(r || null, t || []);
          });
        }, a.inherits = function (e, t) {
          function r() {}
          r.prototype = t.prototype, e.prototype = new r();
        }, a.extend = function () {
          var e,
            t,
            r = {};
          for (e = 0; e < arguments.length; e++) for (t in arguments[e]) Object.prototype.hasOwnProperty.call(arguments[e], t) && void 0 === r[t] && (r[t] = arguments[e][t]);
          return r;
        }, a.prepareContent = function (r, e, n, i, s) {
          return u.Promise.resolve(e).then(function (n) {
            return o.blob && (n instanceof Blob || -1 !== ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(n))) && "undefined" != typeof FileReader ? new u.Promise(function (t, r) {
              var e = new FileReader();
              e.onload = function (e) {
                t(e.target.result);
              }, e.onerror = function (e) {
                r(e.target.error);
              }, e.readAsArrayBuffer(n);
            }) : n;
          }).then(function (e) {
            var t = a.getTypeOf(e);
            return t ? ("arraybuffer" === t ? e = a.transformTo("uint8array", e) : "string" === t && (s ? e = h.decode(e) : n && true !== i && (e = function (e) {
              return l(e, o.uint8array ? new Uint8Array(e.length) : new Array(e.length));
            }(e))), e) : u.Promise.reject(new Error("Can't read the data of '" + r + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
          });
        };
      }, {
        "./base64": 1,
        "./external": 6,
        "./nodejsUtils": 14,
        "./support": 30,
        setimmediate: 54
      }],
      33: [function (e, t, r) {

        var n = e("./reader/readerFor"),
          i = e("./utils"),
          s = e("./signature"),
          a = e("./zipEntry"),
          o = e("./support");
        function h(e) {
          this.files = [], this.loadOptions = e;
        }
        h.prototype = {
          checkSignature: function (e) {
            if (!this.reader.readAndCheckSignature(e)) {
              this.reader.index -= 4;
              var t = this.reader.readString(4);
              throw new Error("Corrupted zip or bug: unexpected signature (" + i.pretty(t) + ", expected " + i.pretty(e) + ")");
            }
          },
          isSignature: function (e, t) {
            var r = this.reader.index;
            this.reader.setIndex(e);
            var n = this.reader.readString(4) === t;
            return this.reader.setIndex(r), n;
          },
          readBlockEndOfCentral: function () {
            this.diskNumber = this.reader.readInt(2), this.diskWithCentralDirStart = this.reader.readInt(2), this.centralDirRecordsOnThisDisk = this.reader.readInt(2), this.centralDirRecords = this.reader.readInt(2), this.centralDirSize = this.reader.readInt(4), this.centralDirOffset = this.reader.readInt(4), this.zipCommentLength = this.reader.readInt(2);
            var e = this.reader.readData(this.zipCommentLength),
              t = o.uint8array ? "uint8array" : "array",
              r = i.transformTo(t, e);
            this.zipComment = this.loadOptions.decodeFileName(r);
          },
          readBlockZip64EndOfCentral: function () {
            this.zip64EndOfCentralSize = this.reader.readInt(8), this.reader.skip(4), this.diskNumber = this.reader.readInt(4), this.diskWithCentralDirStart = this.reader.readInt(4), this.centralDirRecordsOnThisDisk = this.reader.readInt(8), this.centralDirRecords = this.reader.readInt(8), this.centralDirSize = this.reader.readInt(8), this.centralDirOffset = this.reader.readInt(8), this.zip64ExtensibleData = {};
            for (var e, t, r, n = this.zip64EndOfCentralSize - 44; 0 < n;) e = this.reader.readInt(2), t = this.reader.readInt(4), r = this.reader.readData(t), this.zip64ExtensibleData[e] = {
              id: e,
              length: t,
              value: r
            };
          },
          readBlockZip64EndOfCentralLocator: function () {
            if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), 1 < this.disksCount) throw new Error("Multi-volumes zip are not supported");
          },
          readLocalFiles: function () {
            var e, t;
            for (e = 0; e < this.files.length; e++) t = this.files[e], this.reader.setIndex(t.localHeaderOffset), this.checkSignature(s.LOCAL_FILE_HEADER), t.readLocalPart(this.reader), t.handleUTF8(), t.processAttributes();
          },
          readCentralDir: function () {
            var e;
            for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);) (e = new a({
              zip64: this.zip64
            }, this.loadOptions)).readCentralPart(this.reader), this.files.push(e);
            if (this.centralDirRecords !== this.files.length && 0 !== this.centralDirRecords && 0 === this.files.length) throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
          },
          readEndOfCentral: function () {
            var e = this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);
            if (e < 0) throw !this.isSignature(0, s.LOCAL_FILE_HEADER) ? new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html") : new Error("Corrupted zip: can't find end of central directory");
            this.reader.setIndex(e);
            var t = e;
            if (this.checkSignature(s.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === i.MAX_VALUE_16BITS || this.diskWithCentralDirStart === i.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === i.MAX_VALUE_16BITS || this.centralDirRecords === i.MAX_VALUE_16BITS || this.centralDirSize === i.MAX_VALUE_32BITS || this.centralDirOffset === i.MAX_VALUE_32BITS) {
              if (this.zip64 = true, (e = this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
              if (this.reader.setIndex(e), this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, s.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
              this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
            }
            var r = this.centralDirOffset + this.centralDirSize;
            this.zip64 && (r += 20, r += 12 + this.zip64EndOfCentralSize);
            var n = t - r;
            if (0 < n) this.isSignature(t, s.CENTRAL_FILE_HEADER) || (this.reader.zero = n);else if (n < 0) throw new Error("Corrupted zip: missing " + Math.abs(n) + " bytes.");
          },
          prepareReader: function (e) {
            this.reader = n(e);
          },
          load: function (e) {
            this.prepareReader(e), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
          }
        }, t.exports = h;
      }, {
        "./reader/readerFor": 22,
        "./signature": 23,
        "./support": 30,
        "./utils": 32,
        "./zipEntry": 34
      }],
      34: [function (e, t, r) {

        var n = e("./reader/readerFor"),
          s = e("./utils"),
          i = e("./compressedObject"),
          a = e("./crc32"),
          o = e("./utf8"),
          h = e("./compressions"),
          u = e("./support");
        function l(e, t) {
          this.options = e, this.loadOptions = t;
        }
        l.prototype = {
          isEncrypted: function () {
            return 1 == (1 & this.bitFlag);
          },
          useUTF8: function () {
            return 2048 == (2048 & this.bitFlag);
          },
          readLocalPart: function (e) {
            var t, r;
            if (e.skip(22), this.fileNameLength = e.readInt(2), r = e.readInt(2), this.fileName = e.readData(this.fileNameLength), e.skip(r), -1 === this.compressedSize || -1 === this.uncompressedSize) throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");
            if (null === (t = function (e) {
              for (var t in h) if (Object.prototype.hasOwnProperty.call(h, t) && h[t].magic === e) return h[t];
              return null;
            }(this.compressionMethod))) throw new Error("Corrupted zip : compression " + s.pretty(this.compressionMethod) + " unknown (inner file : " + s.transformTo("string", this.fileName) + ")");
            this.decompressed = new i(this.compressedSize, this.uncompressedSize, this.crc32, t, e.readData(this.compressedSize));
          },
          readCentralPart: function (e) {
            this.versionMadeBy = e.readInt(2), e.skip(2), this.bitFlag = e.readInt(2), this.compressionMethod = e.readString(2), this.date = e.readDate(), this.crc32 = e.readInt(4), this.compressedSize = e.readInt(4), this.uncompressedSize = e.readInt(4);
            var t = e.readInt(2);
            if (this.extraFieldsLength = e.readInt(2), this.fileCommentLength = e.readInt(2), this.diskNumberStart = e.readInt(2), this.internalFileAttributes = e.readInt(2), this.externalFileAttributes = e.readInt(4), this.localHeaderOffset = e.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported");
            e.skip(t), this.readExtraFields(e), this.parseZIP64ExtraField(e), this.fileComment = e.readData(this.fileCommentLength);
          },
          processAttributes: function () {
            this.unixPermissions = null, this.dosPermissions = null;
            var e = this.versionMadeBy >> 8;
            this.dir = !!(16 & this.externalFileAttributes), 0 == e && (this.dosPermissions = 63 & this.externalFileAttributes), 3 == e && (this.unixPermissions = this.externalFileAttributes >> 16 & 65535), this.dir || "/" !== this.fileNameStr.slice(-1) || (this.dir = true);
          },
          parseZIP64ExtraField: function () {
            if (this.extraFields[1]) {
              var e = n(this.extraFields[1].value);
              this.uncompressedSize === s.MAX_VALUE_32BITS && (this.uncompressedSize = e.readInt(8)), this.compressedSize === s.MAX_VALUE_32BITS && (this.compressedSize = e.readInt(8)), this.localHeaderOffset === s.MAX_VALUE_32BITS && (this.localHeaderOffset = e.readInt(8)), this.diskNumberStart === s.MAX_VALUE_32BITS && (this.diskNumberStart = e.readInt(4));
            }
          },
          readExtraFields: function (e) {
            var t,
              r,
              n,
              i = e.index + this.extraFieldsLength;
            for (this.extraFields || (this.extraFields = {}); e.index + 4 < i;) t = e.readInt(2), r = e.readInt(2), n = e.readData(r), this.extraFields[t] = {
              id: t,
              length: r,
              value: n
            };
            e.setIndex(i);
          },
          handleUTF8: function () {
            var e = u.uint8array ? "uint8array" : "array";
            if (this.useUTF8()) this.fileNameStr = o.utf8decode(this.fileName), this.fileCommentStr = o.utf8decode(this.fileComment);else {
              var t = this.findExtraFieldUnicodePath();
              if (null !== t) this.fileNameStr = t;else {
                var r = s.transformTo(e, this.fileName);
                this.fileNameStr = this.loadOptions.decodeFileName(r);
              }
              var n = this.findExtraFieldUnicodeComment();
              if (null !== n) this.fileCommentStr = n;else {
                var i = s.transformTo(e, this.fileComment);
                this.fileCommentStr = this.loadOptions.decodeFileName(i);
              }
            }
          },
          findExtraFieldUnicodePath: function () {
            var e = this.extraFields[28789];
            if (e) {
              var t = n(e.value);
              return 1 !== t.readInt(1) ? null : a(this.fileName) !== t.readInt(4) ? null : o.utf8decode(t.readData(e.length - 5));
            }
            return null;
          },
          findExtraFieldUnicodeComment: function () {
            var e = this.extraFields[25461];
            if (e) {
              var t = n(e.value);
              return 1 !== t.readInt(1) ? null : a(this.fileComment) !== t.readInt(4) ? null : o.utf8decode(t.readData(e.length - 5));
            }
            return null;
          }
        }, t.exports = l;
      }, {
        "./compressedObject": 2,
        "./compressions": 3,
        "./crc32": 4,
        "./reader/readerFor": 22,
        "./support": 30,
        "./utf8": 31,
        "./utils": 32
      }],
      35: [function (e, t, r) {

        function n(e, t, r) {
          this.name = e, this.dir = r.dir, this.date = r.date, this.comment = r.comment, this.unixPermissions = r.unixPermissions, this.dosPermissions = r.dosPermissions, this._data = t, this._dataBinary = r.binary, this.options = {
            compression: r.compression,
            compressionOptions: r.compressionOptions
          };
        }
        var s = e("./stream/StreamHelper"),
          i = e("./stream/DataWorker"),
          a = e("./utf8"),
          o = e("./compressedObject"),
          h = e("./stream/GenericWorker");
        n.prototype = {
          internalStream: function (e) {
            var t = null,
              r = "string";
            try {
              if (!e) throw new Error("No output type specified.");
              var n = "string" === (r = e.toLowerCase()) || "text" === r;
              "binarystring" !== r && "text" !== r || (r = "string"), t = this._decompressWorker();
              var i = !this._dataBinary;
              i && !n && (t = t.pipe(new a.Utf8EncodeWorker())), !i && n && (t = t.pipe(new a.Utf8DecodeWorker()));
            } catch (e) {
              (t = new h("error")).error(e);
            }
            return new s(t, r, "");
          },
          async: function (e, t) {
            return this.internalStream(e).accumulate(t);
          },
          nodeStream: function (e, t) {
            return this.internalStream(e || "nodebuffer").toNodejsStream(t);
          },
          _compressWorker: function (e, t) {
            if (this._data instanceof o && this._data.compression.magic === e.magic) return this._data.getCompressedWorker();
            var r = this._decompressWorker();
            return this._dataBinary || (r = r.pipe(new a.Utf8EncodeWorker())), o.createWorkerFrom(r, e, t);
          },
          _decompressWorker: function () {
            return this._data instanceof o ? this._data.getContentWorker() : this._data instanceof h ? this._data : new i(this._data);
          }
        };
        for (var u = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], l = function () {
            throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
          }, f = 0; f < u.length; f++) n.prototype[u[f]] = l;
        t.exports = n;
      }, {
        "./compressedObject": 2,
        "./stream/DataWorker": 27,
        "./stream/GenericWorker": 28,
        "./stream/StreamHelper": 29,
        "./utf8": 31
      }],
      36: [function (e, l, t) {
        (function (t) {

          var r,
            n,
            e = t.MutationObserver || t.WebKitMutationObserver;
          if (e) {
            var i = 0,
              s = new e(u),
              a = t.document.createTextNode("");
            s.observe(a, {
              characterData: true
            }), r = function () {
              a.data = i = ++i % 2;
            };
          } else if (t.setImmediate || void 0 === t.MessageChannel) r = "document" in t && "onreadystatechange" in t.document.createElement("script") ? function () {
            var e = t.document.createElement("script");
            e.onreadystatechange = function () {
              u(), e.onreadystatechange = null, e.parentNode.removeChild(e), e = null;
            }, t.document.documentElement.appendChild(e);
          } : function () {
            setTimeout(u, 0);
          };else {
            var o = new t.MessageChannel();
            o.port1.onmessage = u, r = function () {
              o.port2.postMessage(0);
            };
          }
          var h = [];
          function u() {
            var e, t;
            n = true;
            for (var r = h.length; r;) {
              for (t = h, h = [], e = -1; ++e < r;) t[e]();
              r = h.length;
            }
            n = false;
          }
          l.exports = function (e) {
            1 !== h.push(e) || n || r();
          };
        }).call(this, "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
      }, {}],
      37: [function (e, t, r) {

        var i = e("immediate");
        function u() {}
        var l = {},
          s = ["REJECTED"],
          a = ["FULFILLED"],
          n = ["PENDING"];
        function o(e) {
          if ("function" != typeof e) throw new TypeError("resolver must be a function");
          this.state = n, this.queue = [], this.outcome = void 0, e !== u && d(this, e);
        }
        function h(e, t, r) {
          this.promise = e, "function" == typeof t && (this.onFulfilled = t, this.callFulfilled = this.otherCallFulfilled), "function" == typeof r && (this.onRejected = r, this.callRejected = this.otherCallRejected);
        }
        function f(t, r, n) {
          i(function () {
            var e;
            try {
              e = r(n);
            } catch (e) {
              return l.reject(t, e);
            }
            e === t ? l.reject(t, new TypeError("Cannot resolve promise with itself")) : l.resolve(t, e);
          });
        }
        function c(e) {
          var t = e && e.then;
          if (e && ("object" == typeof e || "function" == typeof e) && "function" == typeof t) return function () {
            t.apply(e, arguments);
          };
        }
        function d(t, e) {
          var r = false;
          function n(e) {
            r || (r = true, l.reject(t, e));
          }
          function i(e) {
            r || (r = true, l.resolve(t, e));
          }
          var s = p(function () {
            e(i, n);
          });
          "error" === s.status && n(s.value);
        }
        function p(e, t) {
          var r = {};
          try {
            r.value = e(t), r.status = "success";
          } catch (e) {
            r.status = "error", r.value = e;
          }
          return r;
        }
        (t.exports = o).prototype.finally = function (t) {
          if ("function" != typeof t) return this;
          var r = this.constructor;
          return this.then(function (e) {
            return r.resolve(t()).then(function () {
              return e;
            });
          }, function (e) {
            return r.resolve(t()).then(function () {
              throw e;
            });
          });
        }, o.prototype.catch = function (e) {
          return this.then(null, e);
        }, o.prototype.then = function (e, t) {
          if ("function" != typeof e && this.state === a || "function" != typeof t && this.state === s) return this;
          var r = new this.constructor(u);
          this.state !== n ? f(r, this.state === a ? e : t, this.outcome) : this.queue.push(new h(r, e, t));
          return r;
        }, h.prototype.callFulfilled = function (e) {
          l.resolve(this.promise, e);
        }, h.prototype.otherCallFulfilled = function (e) {
          f(this.promise, this.onFulfilled, e);
        }, h.prototype.callRejected = function (e) {
          l.reject(this.promise, e);
        }, h.prototype.otherCallRejected = function (e) {
          f(this.promise, this.onRejected, e);
        }, l.resolve = function (e, t) {
          var r = p(c, t);
          if ("error" === r.status) return l.reject(e, r.value);
          var n = r.value;
          if (n) d(e, n);else {
            e.state = a, e.outcome = t;
            for (var i = -1, s = e.queue.length; ++i < s;) e.queue[i].callFulfilled(t);
          }
          return e;
        }, l.reject = function (e, t) {
          e.state = s, e.outcome = t;
          for (var r = -1, n = e.queue.length; ++r < n;) e.queue[r].callRejected(t);
          return e;
        }, o.resolve = function (e) {
          if (e instanceof this) return e;
          return l.resolve(new this(u), e);
        }, o.reject = function (e) {
          var t = new this(u);
          return l.reject(t, e);
        }, o.all = function (e) {
          var r = this;
          if ("[object Array]" !== Object.prototype.toString.call(e)) return this.reject(new TypeError("must be an array"));
          var n = e.length,
            i = false;
          if (!n) return this.resolve([]);
          var s = new Array(n),
            a = 0,
            t = -1,
            o = new this(u);
          for (; ++t < n;) h(e[t], t);
          return o;
          function h(e, t) {
            r.resolve(e).then(function (e) {
              s[t] = e, ++a !== n || i || (i = true, l.resolve(o, s));
            }, function (e) {
              i || (i = true, l.reject(o, e));
            });
          }
        }, o.race = function (e) {
          var t = this;
          if ("[object Array]" !== Object.prototype.toString.call(e)) return this.reject(new TypeError("must be an array"));
          var r = e.length,
            n = false;
          if (!r) return this.resolve([]);
          var i = -1,
            s = new this(u);
          for (; ++i < r;) a = e[i], t.resolve(a).then(function (e) {
            n || (n = true, l.resolve(s, e));
          }, function (e) {
            n || (n = true, l.reject(s, e));
          });
          var a;
          return s;
        };
      }, {
        immediate: 36
      }],
      38: [function (e, t, r) {

        var n = {};
        (0, e("./lib/utils/common").assign)(n, e("./lib/deflate"), e("./lib/inflate"), e("./lib/zlib/constants")), t.exports = n;
      }, {
        "./lib/deflate": 39,
        "./lib/inflate": 40,
        "./lib/utils/common": 41,
        "./lib/zlib/constants": 44
      }],
      39: [function (e, t, r) {

        var a = e("./zlib/deflate"),
          o = e("./utils/common"),
          h = e("./utils/strings"),
          i = e("./zlib/messages"),
          s = e("./zlib/zstream"),
          u = Object.prototype.toString,
          l = 0,
          f = -1,
          c = 0,
          d = 8;
        function p(e) {
          if (!(this instanceof p)) return new p(e);
          this.options = o.assign({
            level: f,
            method: d,
            chunkSize: 16384,
            windowBits: 15,
            memLevel: 8,
            strategy: c,
            to: ""
          }, e || {});
          var t = this.options;
          t.raw && 0 < t.windowBits ? t.windowBits = -t.windowBits : t.gzip && 0 < t.windowBits && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new s(), this.strm.avail_out = 0;
          var r = a.deflateInit2(this.strm, t.level, t.method, t.windowBits, t.memLevel, t.strategy);
          if (r !== l) throw new Error(i[r]);
          if (t.header && a.deflateSetHeader(this.strm, t.header), t.dictionary) {
            var n;
            if (n = "string" == typeof t.dictionary ? h.string2buf(t.dictionary) : "[object ArrayBuffer]" === u.call(t.dictionary) ? new Uint8Array(t.dictionary) : t.dictionary, (r = a.deflateSetDictionary(this.strm, n)) !== l) throw new Error(i[r]);
            this._dict_set = true;
          }
        }
        function n(e, t) {
          var r = new p(t);
          if (r.push(e, true), r.err) throw r.msg || i[r.err];
          return r.result;
        }
        p.prototype.push = function (e, t) {
          var r,
            n,
            i = this.strm,
            s = this.options.chunkSize;
          if (this.ended) return false;
          n = t === ~~t ? t : true === t ? 4 : 0, "string" == typeof e ? i.input = h.string2buf(e) : "[object ArrayBuffer]" === u.call(e) ? i.input = new Uint8Array(e) : i.input = e, i.next_in = 0, i.avail_in = i.input.length;
          do {
            if (0 === i.avail_out && (i.output = new o.Buf8(s), i.next_out = 0, i.avail_out = s), 1 !== (r = a.deflate(i, n)) && r !== l) return this.onEnd(r), !(this.ended = true);
            0 !== i.avail_out && (0 !== i.avail_in || 4 !== n && 2 !== n) || ("string" === this.options.to ? this.onData(h.buf2binstring(o.shrinkBuf(i.output, i.next_out))) : this.onData(o.shrinkBuf(i.output, i.next_out)));
          } while ((0 < i.avail_in || 0 === i.avail_out) && 1 !== r);
          return 4 === n ? (r = a.deflateEnd(this.strm), this.onEnd(r), this.ended = true, r === l) : 2 !== n || (this.onEnd(l), !(i.avail_out = 0));
        }, p.prototype.onData = function (e) {
          this.chunks.push(e);
        }, p.prototype.onEnd = function (e) {
          e === l && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
        }, r.Deflate = p, r.deflate = n, r.deflateRaw = function (e, t) {
          return (t = t || {}).raw = true, n(e, t);
        }, r.gzip = function (e, t) {
          return (t = t || {}).gzip = true, n(e, t);
        };
      }, {
        "./utils/common": 41,
        "./utils/strings": 42,
        "./zlib/deflate": 46,
        "./zlib/messages": 51,
        "./zlib/zstream": 53
      }],
      40: [function (e, t, r) {

        var c = e("./zlib/inflate"),
          d = e("./utils/common"),
          p = e("./utils/strings"),
          m = e("./zlib/constants"),
          n = e("./zlib/messages"),
          i = e("./zlib/zstream"),
          s = e("./zlib/gzheader"),
          _ = Object.prototype.toString;
        function a(e) {
          if (!(this instanceof a)) return new a(e);
          this.options = d.assign({
            chunkSize: 16384,
            windowBits: 0,
            to: ""
          }, e || {});
          var t = this.options;
          t.raw && 0 <= t.windowBits && t.windowBits < 16 && (t.windowBits = -t.windowBits, 0 === t.windowBits && (t.windowBits = -15)), !(0 <= t.windowBits && t.windowBits < 16) || e && e.windowBits || (t.windowBits += 32), 15 < t.windowBits && t.windowBits < 48 && 0 == (15 & t.windowBits) && (t.windowBits |= 15), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new i(), this.strm.avail_out = 0;
          var r = c.inflateInit2(this.strm, t.windowBits);
          if (r !== m.Z_OK) throw new Error(n[r]);
          this.header = new s(), c.inflateGetHeader(this.strm, this.header);
        }
        function o(e, t) {
          var r = new a(t);
          if (r.push(e, true), r.err) throw r.msg || n[r.err];
          return r.result;
        }
        a.prototype.push = function (e, t) {
          var r,
            n,
            i,
            s,
            a,
            o,
            h = this.strm,
            u = this.options.chunkSize,
            l = this.options.dictionary,
            f = false;
          if (this.ended) return false;
          n = t === ~~t ? t : true === t ? m.Z_FINISH : m.Z_NO_FLUSH, "string" == typeof e ? h.input = p.binstring2buf(e) : "[object ArrayBuffer]" === _.call(e) ? h.input = new Uint8Array(e) : h.input = e, h.next_in = 0, h.avail_in = h.input.length;
          do {
            if (0 === h.avail_out && (h.output = new d.Buf8(u), h.next_out = 0, h.avail_out = u), (r = c.inflate(h, m.Z_NO_FLUSH)) === m.Z_NEED_DICT && l && (o = "string" == typeof l ? p.string2buf(l) : "[object ArrayBuffer]" === _.call(l) ? new Uint8Array(l) : l, r = c.inflateSetDictionary(this.strm, o)), r === m.Z_BUF_ERROR && true === f && (r = m.Z_OK, f = false), r !== m.Z_STREAM_END && r !== m.Z_OK) return this.onEnd(r), !(this.ended = true);
            h.next_out && (0 !== h.avail_out && r !== m.Z_STREAM_END && (0 !== h.avail_in || n !== m.Z_FINISH && n !== m.Z_SYNC_FLUSH) || ("string" === this.options.to ? (i = p.utf8border(h.output, h.next_out), s = h.next_out - i, a = p.buf2string(h.output, i), h.next_out = s, h.avail_out = u - s, s && d.arraySet(h.output, h.output, i, s, 0), this.onData(a)) : this.onData(d.shrinkBuf(h.output, h.next_out)))), 0 === h.avail_in && 0 === h.avail_out && (f = true);
          } while ((0 < h.avail_in || 0 === h.avail_out) && r !== m.Z_STREAM_END);
          return r === m.Z_STREAM_END && (n = m.Z_FINISH), n === m.Z_FINISH ? (r = c.inflateEnd(this.strm), this.onEnd(r), this.ended = true, r === m.Z_OK) : n !== m.Z_SYNC_FLUSH || (this.onEnd(m.Z_OK), !(h.avail_out = 0));
        }, a.prototype.onData = function (e) {
          this.chunks.push(e);
        }, a.prototype.onEnd = function (e) {
          e === m.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = d.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg;
        }, r.Inflate = a, r.inflate = o, r.inflateRaw = function (e, t) {
          return (t = t || {}).raw = true, o(e, t);
        }, r.ungzip = o;
      }, {
        "./utils/common": 41,
        "./utils/strings": 42,
        "./zlib/constants": 44,
        "./zlib/gzheader": 47,
        "./zlib/inflate": 49,
        "./zlib/messages": 51,
        "./zlib/zstream": 53
      }],
      41: [function (e, t, r) {

        var n = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array;
        r.assign = function (e) {
          for (var t = Array.prototype.slice.call(arguments, 1); t.length;) {
            var r = t.shift();
            if (r) {
              if ("object" != typeof r) throw new TypeError(r + "must be non-object");
              for (var n in r) r.hasOwnProperty(n) && (e[n] = r[n]);
            }
          }
          return e;
        }, r.shrinkBuf = function (e, t) {
          return e.length === t ? e : e.subarray ? e.subarray(0, t) : (e.length = t, e);
        };
        var i = {
            arraySet: function (e, t, r, n, i) {
              if (t.subarray && e.subarray) e.set(t.subarray(r, r + n), i);else for (var s = 0; s < n; s++) e[i + s] = t[r + s];
            },
            flattenChunks: function (e) {
              var t, r, n, i, s, a;
              for (t = n = 0, r = e.length; t < r; t++) n += e[t].length;
              for (a = new Uint8Array(n), t = i = 0, r = e.length; t < r; t++) s = e[t], a.set(s, i), i += s.length;
              return a;
            }
          },
          s = {
            arraySet: function (e, t, r, n, i) {
              for (var s = 0; s < n; s++) e[i + s] = t[r + s];
            },
            flattenChunks: function (e) {
              return [].concat.apply([], e);
            }
          };
        r.setTyped = function (e) {
          e ? (r.Buf8 = Uint8Array, r.Buf16 = Uint16Array, r.Buf32 = Int32Array, r.assign(r, i)) : (r.Buf8 = Array, r.Buf16 = Array, r.Buf32 = Array, r.assign(r, s));
        }, r.setTyped(n);
      }, {}],
      42: [function (e, t, r) {

        var h = e("./common"),
          i = true,
          s = true;
        try {
          String.fromCharCode.apply(null, [0]);
        } catch (e) {
          i = false;
        }
        try {
          String.fromCharCode.apply(null, new Uint8Array(1));
        } catch (e) {
          s = false;
        }
        for (var u = new h.Buf8(256), n = 0; n < 256; n++) u[n] = 252 <= n ? 6 : 248 <= n ? 5 : 240 <= n ? 4 : 224 <= n ? 3 : 192 <= n ? 2 : 1;
        function l(e, t) {
          if (t < 65537 && (e.subarray && s || !e.subarray && i)) return String.fromCharCode.apply(null, h.shrinkBuf(e, t));
          for (var r = "", n = 0; n < t; n++) r += String.fromCharCode(e[n]);
          return r;
        }
        u[254] = u[254] = 1, r.string2buf = function (e) {
          var t,
            r,
            n,
            i,
            s,
            a = e.length,
            o = 0;
          for (i = 0; i < a; i++) 55296 == (64512 & (r = e.charCodeAt(i))) && i + 1 < a && 56320 == (64512 & (n = e.charCodeAt(i + 1))) && (r = 65536 + (r - 55296 << 10) + (n - 56320), i++), o += r < 128 ? 1 : r < 2048 ? 2 : r < 65536 ? 3 : 4;
          for (t = new h.Buf8(o), i = s = 0; s < o; i++) 55296 == (64512 & (r = e.charCodeAt(i))) && i + 1 < a && 56320 == (64512 & (n = e.charCodeAt(i + 1))) && (r = 65536 + (r - 55296 << 10) + (n - 56320), i++), r < 128 ? t[s++] = r : (r < 2048 ? t[s++] = 192 | r >>> 6 : (r < 65536 ? t[s++] = 224 | r >>> 12 : (t[s++] = 240 | r >>> 18, t[s++] = 128 | r >>> 12 & 63), t[s++] = 128 | r >>> 6 & 63), t[s++] = 128 | 63 & r);
          return t;
        }, r.buf2binstring = function (e) {
          return l(e, e.length);
        }, r.binstring2buf = function (e) {
          for (var t = new h.Buf8(e.length), r = 0, n = t.length; r < n; r++) t[r] = e.charCodeAt(r);
          return t;
        }, r.buf2string = function (e, t) {
          var r,
            n,
            i,
            s,
            a = t || e.length,
            o = new Array(2 * a);
          for (r = n = 0; r < a;) if ((i = e[r++]) < 128) o[n++] = i;else if (4 < (s = u[i])) o[n++] = 65533, r += s - 1;else {
            for (i &= 2 === s ? 31 : 3 === s ? 15 : 7; 1 < s && r < a;) i = i << 6 | 63 & e[r++], s--;
            1 < s ? o[n++] = 65533 : i < 65536 ? o[n++] = i : (i -= 65536, o[n++] = 55296 | i >> 10 & 1023, o[n++] = 56320 | 1023 & i);
          }
          return l(o, n);
        }, r.utf8border = function (e, t) {
          var r;
          for ((t = t || e.length) > e.length && (t = e.length), r = t - 1; 0 <= r && 128 == (192 & e[r]);) r--;
          return r < 0 ? t : 0 === r ? t : r + u[e[r]] > t ? r : t;
        };
      }, {
        "./common": 41
      }],
      43: [function (e, t, r) {

        t.exports = function (e, t, r, n) {
          for (var i = 65535 & e | 0, s = e >>> 16 & 65535 | 0, a = 0; 0 !== r;) {
            for (r -= a = 2e3 < r ? 2e3 : r; s = s + (i = i + t[n++] | 0) | 0, --a;);
            i %= 65521, s %= 65521;
          }
          return i | s << 16 | 0;
        };
      }, {}],
      44: [function (e, t, r) {

        t.exports = {
          Z_NO_FLUSH: 0,
          Z_PARTIAL_FLUSH: 1,
          Z_SYNC_FLUSH: 2,
          Z_FULL_FLUSH: 3,
          Z_FINISH: 4,
          Z_BLOCK: 5,
          Z_TREES: 6,
          Z_OK: 0,
          Z_STREAM_END: 1,
          Z_NEED_DICT: 2,
          Z_ERRNO: -1,
          Z_STREAM_ERROR: -2,
          Z_DATA_ERROR: -3,
          Z_BUF_ERROR: -5,
          Z_NO_COMPRESSION: 0,
          Z_BEST_SPEED: 1,
          Z_BEST_COMPRESSION: 9,
          Z_DEFAULT_COMPRESSION: -1,
          Z_FILTERED: 1,
          Z_HUFFMAN_ONLY: 2,
          Z_RLE: 3,
          Z_FIXED: 4,
          Z_DEFAULT_STRATEGY: 0,
          Z_BINARY: 0,
          Z_TEXT: 1,
          Z_UNKNOWN: 2,
          Z_DEFLATED: 8
        };
      }, {}],
      45: [function (e, t, r) {

        var o = function () {
          for (var e, t = [], r = 0; r < 256; r++) {
            e = r;
            for (var n = 0; n < 8; n++) e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> 1;
            t[r] = e;
          }
          return t;
        }();
        t.exports = function (e, t, r, n) {
          var i = o,
            s = n + r;
          e ^= -1;
          for (var a = n; a < s; a++) e = e >>> 8 ^ i[255 & (e ^ t[a])];
          return -1 ^ e;
        };
      }, {}],
      46: [function (e, t, r) {

        var h,
          c = e("../utils/common"),
          u = e("./trees"),
          d = e("./adler32"),
          p = e("./crc32"),
          n = e("./messages"),
          l = 0,
          f = 4,
          m = 0,
          _ = -2,
          g = -1,
          b = 4,
          i = 2,
          v = 8,
          y = 9,
          s = 286,
          a = 30,
          o = 19,
          w = 2 * s + 1,
          k = 15,
          x = 3,
          S = 258,
          z = S + x + 1,
          C = 42,
          E = 113,
          A = 1,
          I = 2,
          O = 3,
          B = 4;
        function R(e, t) {
          return e.msg = n[t], t;
        }
        function T(e) {
          return (e << 1) - (4 < e ? 9 : 0);
        }
        function D(e) {
          for (var t = e.length; 0 <= --t;) e[t] = 0;
        }
        function F(e) {
          var t = e.state,
            r = t.pending;
          r > e.avail_out && (r = e.avail_out), 0 !== r && (c.arraySet(e.output, t.pending_buf, t.pending_out, r, e.next_out), e.next_out += r, t.pending_out += r, e.total_out += r, e.avail_out -= r, t.pending -= r, 0 === t.pending && (t.pending_out = 0));
        }
        function N(e, t) {
          u._tr_flush_block(e, 0 <= e.block_start ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, F(e.strm);
        }
        function U(e, t) {
          e.pending_buf[e.pending++] = t;
        }
        function P(e, t) {
          e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = 255 & t;
        }
        function L(e, t) {
          var r,
            n,
            i = e.max_chain_length,
            s = e.strstart,
            a = e.prev_length,
            o = e.nice_match,
            h = e.strstart > e.w_size - z ? e.strstart - (e.w_size - z) : 0,
            u = e.window,
            l = e.w_mask,
            f = e.prev,
            c = e.strstart + S,
            d = u[s + a - 1],
            p = u[s + a];
          e.prev_length >= e.good_match && (i >>= 2), o > e.lookahead && (o = e.lookahead);
          do {
            if (u[(r = t) + a] === p && u[r + a - 1] === d && u[r] === u[s] && u[++r] === u[s + 1]) {
              s += 2, r++;
              do {} while (u[++s] === u[++r] && u[++s] === u[++r] && u[++s] === u[++r] && u[++s] === u[++r] && u[++s] === u[++r] && u[++s] === u[++r] && u[++s] === u[++r] && u[++s] === u[++r] && s < c);
              if (n = S - (c - s), s = c - S, a < n) {
                if (e.match_start = t, o <= (a = n)) break;
                d = u[s + a - 1], p = u[s + a];
              }
            }
          } while ((t = f[t & l]) > h && 0 != --i);
          return a <= e.lookahead ? a : e.lookahead;
        }
        function j(e) {
          var t,
            r,
            n,
            i,
            s,
            a,
            o,
            h,
            u,
            l,
            f = e.w_size;
          do {
            if (i = e.window_size - e.lookahead - e.strstart, e.strstart >= f + (f - z)) {
              for (c.arraySet(e.window, e.window, f, f, 0), e.match_start -= f, e.strstart -= f, e.block_start -= f, t = r = e.hash_size; n = e.head[--t], e.head[t] = f <= n ? n - f : 0, --r;);
              for (t = r = f; n = e.prev[--t], e.prev[t] = f <= n ? n - f : 0, --r;);
              i += f;
            }
            if (0 === e.strm.avail_in) break;
            if (a = e.strm, o = e.window, h = e.strstart + e.lookahead, u = i, l = void 0, l = a.avail_in, u < l && (l = u), r = 0 === l ? 0 : (a.avail_in -= l, c.arraySet(o, a.input, a.next_in, l, h), 1 === a.state.wrap ? a.adler = d(a.adler, o, l, h) : 2 === a.state.wrap && (a.adler = p(a.adler, o, l, h)), a.next_in += l, a.total_in += l, l), e.lookahead += r, e.lookahead + e.insert >= x) for (s = e.strstart - e.insert, e.ins_h = e.window[s], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[s + 1]) & e.hash_mask; e.insert && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[s + x - 1]) & e.hash_mask, e.prev[s & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = s, s++, e.insert--, !(e.lookahead + e.insert < x)););
          } while (e.lookahead < z && 0 !== e.strm.avail_in);
        }
        function Z(e, t) {
          for (var r, n;;) {
            if (e.lookahead < z) {
              if (j(e), e.lookahead < z && t === l) return A;
              if (0 === e.lookahead) break;
            }
            if (r = 0, e.lookahead >= x && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + x - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), 0 !== r && e.strstart - r <= e.w_size - z && (e.match_length = L(e, r)), e.match_length >= x) {
              if (n = u._tr_tally(e, e.strstart - e.match_start, e.match_length - x), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= x) {
                for (e.match_length--; e.strstart++, e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + x - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart, 0 != --e.match_length;);
                e.strstart++;
              } else e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + 1]) & e.hash_mask;
            } else n = u._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
            if (n && (N(e, false), 0 === e.strm.avail_out)) return A;
          }
          return e.insert = e.strstart < x - 1 ? e.strstart : x - 1, t === f ? (N(e, true), 0 === e.strm.avail_out ? O : B) : e.last_lit && (N(e, false), 0 === e.strm.avail_out) ? A : I;
        }
        function W(e, t) {
          for (var r, n, i;;) {
            if (e.lookahead < z) {
              if (j(e), e.lookahead < z && t === l) return A;
              if (0 === e.lookahead) break;
            }
            if (r = 0, e.lookahead >= x && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + x - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = x - 1, 0 !== r && e.prev_length < e.max_lazy_match && e.strstart - r <= e.w_size - z && (e.match_length = L(e, r), e.match_length <= 5 && (1 === e.strategy || e.match_length === x && 4096 < e.strstart - e.match_start) && (e.match_length = x - 1)), e.prev_length >= x && e.match_length <= e.prev_length) {
              for (i = e.strstart + e.lookahead - x, n = u._tr_tally(e, e.strstart - 1 - e.prev_match, e.prev_length - x), e.lookahead -= e.prev_length - 1, e.prev_length -= 2; ++e.strstart <= i && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + x - 1]) & e.hash_mask, r = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), 0 != --e.prev_length;);
              if (e.match_available = 0, e.match_length = x - 1, e.strstart++, n && (N(e, false), 0 === e.strm.avail_out)) return A;
            } else if (e.match_available) {
              if ((n = u._tr_tally(e, 0, e.window[e.strstart - 1])) && N(e, false), e.strstart++, e.lookahead--, 0 === e.strm.avail_out) return A;
            } else e.match_available = 1, e.strstart++, e.lookahead--;
          }
          return e.match_available && (n = u._tr_tally(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < x - 1 ? e.strstart : x - 1, t === f ? (N(e, true), 0 === e.strm.avail_out ? O : B) : e.last_lit && (N(e, false), 0 === e.strm.avail_out) ? A : I;
        }
        function M(e, t, r, n, i) {
          this.good_length = e, this.max_lazy = t, this.nice_length = r, this.max_chain = n, this.func = i;
        }
        function H() {
          this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = v, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new c.Buf16(2 * w), this.dyn_dtree = new c.Buf16(2 * (2 * a + 1)), this.bl_tree = new c.Buf16(2 * (2 * o + 1)), D(this.dyn_ltree), D(this.dyn_dtree), D(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new c.Buf16(k + 1), this.heap = new c.Buf16(2 * s + 1), D(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new c.Buf16(2 * s + 1), D(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
        }
        function G(e) {
          var t;
          return e && e.state ? (e.total_in = e.total_out = 0, e.data_type = i, (t = e.state).pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = t.wrap ? C : E, e.adler = 2 === t.wrap ? 0 : 1, t.last_flush = l, u._tr_init(t), m) : R(e, _);
        }
        function K(e) {
          var t = G(e);
          return t === m && function (e) {
            e.window_size = 2 * e.w_size, D(e.head), e.max_lazy_match = h[e.level].max_lazy, e.good_match = h[e.level].good_length, e.nice_match = h[e.level].nice_length, e.max_chain_length = h[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = x - 1, e.match_available = 0, e.ins_h = 0;
          }(e.state), t;
        }
        function Y(e, t, r, n, i, s) {
          if (!e) return _;
          var a = 1;
          if (t === g && (t = 6), n < 0 ? (a = 0, n = -n) : 15 < n && (a = 2, n -= 16), i < 1 || y < i || r !== v || n < 8 || 15 < n || t < 0 || 9 < t || s < 0 || b < s) return R(e, _);
          8 === n && (n = 9);
          var o = new H();
          return (e.state = o).strm = e, o.wrap = a, o.gzhead = null, o.w_bits = n, o.w_size = 1 << o.w_bits, o.w_mask = o.w_size - 1, o.hash_bits = i + 7, o.hash_size = 1 << o.hash_bits, o.hash_mask = o.hash_size - 1, o.hash_shift = ~~((o.hash_bits + x - 1) / x), o.window = new c.Buf8(2 * o.w_size), o.head = new c.Buf16(o.hash_size), o.prev = new c.Buf16(o.w_size), o.lit_bufsize = 1 << i + 6, o.pending_buf_size = 4 * o.lit_bufsize, o.pending_buf = new c.Buf8(o.pending_buf_size), o.d_buf = 1 * o.lit_bufsize, o.l_buf = 3 * o.lit_bufsize, o.level = t, o.strategy = s, o.method = r, K(e);
        }
        h = [new M(0, 0, 0, 0, function (e, t) {
          var r = 65535;
          for (r > e.pending_buf_size - 5 && (r = e.pending_buf_size - 5);;) {
            if (e.lookahead <= 1) {
              if (j(e), 0 === e.lookahead && t === l) return A;
              if (0 === e.lookahead) break;
            }
            e.strstart += e.lookahead, e.lookahead = 0;
            var n = e.block_start + r;
            if ((0 === e.strstart || e.strstart >= n) && (e.lookahead = e.strstart - n, e.strstart = n, N(e, false), 0 === e.strm.avail_out)) return A;
            if (e.strstart - e.block_start >= e.w_size - z && (N(e, false), 0 === e.strm.avail_out)) return A;
          }
          return e.insert = 0, t === f ? (N(e, true), 0 === e.strm.avail_out ? O : B) : (e.strstart > e.block_start && (N(e, false), e.strm.avail_out), A);
        }), new M(4, 4, 8, 4, Z), new M(4, 5, 16, 8, Z), new M(4, 6, 32, 32, Z), new M(4, 4, 16, 16, W), new M(8, 16, 32, 32, W), new M(8, 16, 128, 128, W), new M(8, 32, 128, 256, W), new M(32, 128, 258, 1024, W), new M(32, 258, 258, 4096, W)], r.deflateInit = function (e, t) {
          return Y(e, t, v, 15, 8, 0);
        }, r.deflateInit2 = Y, r.deflateReset = K, r.deflateResetKeep = G, r.deflateSetHeader = function (e, t) {
          return e && e.state ? 2 !== e.state.wrap ? _ : (e.state.gzhead = t, m) : _;
        }, r.deflate = function (e, t) {
          var r, n, i, s;
          if (!e || !e.state || 5 < t || t < 0) return e ? R(e, _) : _;
          if (n = e.state, !e.output || !e.input && 0 !== e.avail_in || 666 === n.status && t !== f) return R(e, 0 === e.avail_out ? -5 : _);
          if (n.strm = e, r = n.last_flush, n.last_flush = t, n.status === C) if (2 === n.wrap) e.adler = 0, U(n, 31), U(n, 139), U(n, 8), n.gzhead ? (U(n, (n.gzhead.text ? 1 : 0) + (n.gzhead.hcrc ? 2 : 0) + (n.gzhead.extra ? 4 : 0) + (n.gzhead.name ? 8 : 0) + (n.gzhead.comment ? 16 : 0)), U(n, 255 & n.gzhead.time), U(n, n.gzhead.time >> 8 & 255), U(n, n.gzhead.time >> 16 & 255), U(n, n.gzhead.time >> 24 & 255), U(n, 9 === n.level ? 2 : 2 <= n.strategy || n.level < 2 ? 4 : 0), U(n, 255 & n.gzhead.os), n.gzhead.extra && n.gzhead.extra.length && (U(n, 255 & n.gzhead.extra.length), U(n, n.gzhead.extra.length >> 8 & 255)), n.gzhead.hcrc && (e.adler = p(e.adler, n.pending_buf, n.pending, 0)), n.gzindex = 0, n.status = 69) : (U(n, 0), U(n, 0), U(n, 0), U(n, 0), U(n, 0), U(n, 9 === n.level ? 2 : 2 <= n.strategy || n.level < 2 ? 4 : 0), U(n, 3), n.status = E);else {
            var a = v + (n.w_bits - 8 << 4) << 8;
            a |= (2 <= n.strategy || n.level < 2 ? 0 : n.level < 6 ? 1 : 6 === n.level ? 2 : 3) << 6, 0 !== n.strstart && (a |= 32), a += 31 - a % 31, n.status = E, P(n, a), 0 !== n.strstart && (P(n, e.adler >>> 16), P(n, 65535 & e.adler)), e.adler = 1;
          }
          if (69 === n.status) if (n.gzhead.extra) {
            for (i = n.pending; n.gzindex < (65535 & n.gzhead.extra.length) && (n.pending !== n.pending_buf_size || (n.gzhead.hcrc && n.pending > i && (e.adler = p(e.adler, n.pending_buf, n.pending - i, i)), F(e), i = n.pending, n.pending !== n.pending_buf_size));) U(n, 255 & n.gzhead.extra[n.gzindex]), n.gzindex++;
            n.gzhead.hcrc && n.pending > i && (e.adler = p(e.adler, n.pending_buf, n.pending - i, i)), n.gzindex === n.gzhead.extra.length && (n.gzindex = 0, n.status = 73);
          } else n.status = 73;
          if (73 === n.status) if (n.gzhead.name) {
            i = n.pending;
            do {
              if (n.pending === n.pending_buf_size && (n.gzhead.hcrc && n.pending > i && (e.adler = p(e.adler, n.pending_buf, n.pending - i, i)), F(e), i = n.pending, n.pending === n.pending_buf_size)) {
                s = 1;
                break;
              }
              s = n.gzindex < n.gzhead.name.length ? 255 & n.gzhead.name.charCodeAt(n.gzindex++) : 0, U(n, s);
            } while (0 !== s);
            n.gzhead.hcrc && n.pending > i && (e.adler = p(e.adler, n.pending_buf, n.pending - i, i)), 0 === s && (n.gzindex = 0, n.status = 91);
          } else n.status = 91;
          if (91 === n.status) if (n.gzhead.comment) {
            i = n.pending;
            do {
              if (n.pending === n.pending_buf_size && (n.gzhead.hcrc && n.pending > i && (e.adler = p(e.adler, n.pending_buf, n.pending - i, i)), F(e), i = n.pending, n.pending === n.pending_buf_size)) {
                s = 1;
                break;
              }
              s = n.gzindex < n.gzhead.comment.length ? 255 & n.gzhead.comment.charCodeAt(n.gzindex++) : 0, U(n, s);
            } while (0 !== s);
            n.gzhead.hcrc && n.pending > i && (e.adler = p(e.adler, n.pending_buf, n.pending - i, i)), 0 === s && (n.status = 103);
          } else n.status = 103;
          if (103 === n.status && (n.gzhead.hcrc ? (n.pending + 2 > n.pending_buf_size && F(e), n.pending + 2 <= n.pending_buf_size && (U(n, 255 & e.adler), U(n, e.adler >> 8 & 255), e.adler = 0, n.status = E)) : n.status = E), 0 !== n.pending) {
            if (F(e), 0 === e.avail_out) return n.last_flush = -1, m;
          } else if (0 === e.avail_in && T(t) <= T(r) && t !== f) return R(e, -5);
          if (666 === n.status && 0 !== e.avail_in) return R(e, -5);
          if (0 !== e.avail_in || 0 !== n.lookahead || t !== l && 666 !== n.status) {
            var o = 2 === n.strategy ? function (e, t) {
              for (var r;;) {
                if (0 === e.lookahead && (j(e), 0 === e.lookahead)) {
                  if (t === l) return A;
                  break;
                }
                if (e.match_length = 0, r = u._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, r && (N(e, false), 0 === e.strm.avail_out)) return A;
              }
              return e.insert = 0, t === f ? (N(e, true), 0 === e.strm.avail_out ? O : B) : e.last_lit && (N(e, false), 0 === e.strm.avail_out) ? A : I;
            }(n, t) : 3 === n.strategy ? function (e, t) {
              for (var r, n, i, s, a = e.window;;) {
                if (e.lookahead <= S) {
                  if (j(e), e.lookahead <= S && t === l) return A;
                  if (0 === e.lookahead) break;
                }
                if (e.match_length = 0, e.lookahead >= x && 0 < e.strstart && (n = a[i = e.strstart - 1]) === a[++i] && n === a[++i] && n === a[++i]) {
                  s = e.strstart + S;
                  do {} while (n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && n === a[++i] && i < s);
                  e.match_length = S - (s - i), e.match_length > e.lookahead && (e.match_length = e.lookahead);
                }
                if (e.match_length >= x ? (r = u._tr_tally(e, 1, e.match_length - x), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (r = u._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), r && (N(e, false), 0 === e.strm.avail_out)) return A;
              }
              return e.insert = 0, t === f ? (N(e, true), 0 === e.strm.avail_out ? O : B) : e.last_lit && (N(e, false), 0 === e.strm.avail_out) ? A : I;
            }(n, t) : h[n.level].func(n, t);
            if (o !== O && o !== B || (n.status = 666), o === A || o === O) return 0 === e.avail_out && (n.last_flush = -1), m;
            if (o === I && (1 === t ? u._tr_align(n) : 5 !== t && (u._tr_stored_block(n, 0, 0, false), 3 === t && (D(n.head), 0 === n.lookahead && (n.strstart = 0, n.block_start = 0, n.insert = 0))), F(e), 0 === e.avail_out)) return n.last_flush = -1, m;
          }
          return t !== f ? m : n.wrap <= 0 ? 1 : (2 === n.wrap ? (U(n, 255 & e.adler), U(n, e.adler >> 8 & 255), U(n, e.adler >> 16 & 255), U(n, e.adler >> 24 & 255), U(n, 255 & e.total_in), U(n, e.total_in >> 8 & 255), U(n, e.total_in >> 16 & 255), U(n, e.total_in >> 24 & 255)) : (P(n, e.adler >>> 16), P(n, 65535 & e.adler)), F(e), 0 < n.wrap && (n.wrap = -n.wrap), 0 !== n.pending ? m : 1);
        }, r.deflateEnd = function (e) {
          var t;
          return e && e.state ? (t = e.state.status) !== C && 69 !== t && 73 !== t && 91 !== t && 103 !== t && t !== E && 666 !== t ? R(e, _) : (e.state = null, t === E ? R(e, -3) : m) : _;
        }, r.deflateSetDictionary = function (e, t) {
          var r,
            n,
            i,
            s,
            a,
            o,
            h,
            u,
            l = t.length;
          if (!e || !e.state) return _;
          if (2 === (s = (r = e.state).wrap) || 1 === s && r.status !== C || r.lookahead) return _;
          for (1 === s && (e.adler = d(e.adler, t, l, 0)), r.wrap = 0, l >= r.w_size && (0 === s && (D(r.head), r.strstart = 0, r.block_start = 0, r.insert = 0), u = new c.Buf8(r.w_size), c.arraySet(u, t, l - r.w_size, r.w_size, 0), t = u, l = r.w_size), a = e.avail_in, o = e.next_in, h = e.input, e.avail_in = l, e.next_in = 0, e.input = t, j(r); r.lookahead >= x;) {
            for (n = r.strstart, i = r.lookahead - (x - 1); r.ins_h = (r.ins_h << r.hash_shift ^ r.window[n + x - 1]) & r.hash_mask, r.prev[n & r.w_mask] = r.head[r.ins_h], r.head[r.ins_h] = n, n++, --i;);
            r.strstart = n, r.lookahead = x - 1, j(r);
          }
          return r.strstart += r.lookahead, r.block_start = r.strstart, r.insert = r.lookahead, r.lookahead = 0, r.match_length = r.prev_length = x - 1, r.match_available = 0, e.next_in = o, e.input = h, e.avail_in = a, r.wrap = s, m;
        }, r.deflateInfo = "pako deflate (from Nodeca project)";
      }, {
        "../utils/common": 41,
        "./adler32": 43,
        "./crc32": 45,
        "./messages": 51,
        "./trees": 52
      }],
      47: [function (e, t, r) {

        t.exports = function () {
          this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = false;
        };
      }, {}],
      48: [function (e, t, r) {

        t.exports = function (e, t) {
          var r, n, i, s, a, o, h, u, l, f, c, d, p, m, _, g, b, v, y, w, k, x, S, z, C;
          r = e.state, n = e.next_in, z = e.input, i = n + (e.avail_in - 5), s = e.next_out, C = e.output, a = s - (t - e.avail_out), o = s + (e.avail_out - 257), h = r.dmax, u = r.wsize, l = r.whave, f = r.wnext, c = r.window, d = r.hold, p = r.bits, m = r.lencode, _ = r.distcode, g = (1 << r.lenbits) - 1, b = (1 << r.distbits) - 1;
          e: do {
            p < 15 && (d += z[n++] << p, p += 8, d += z[n++] << p, p += 8), v = m[d & g];
            t: for (;;) {
              if (d >>>= y = v >>> 24, p -= y, 0 === (y = v >>> 16 & 255)) C[s++] = 65535 & v;else {
                if (!(16 & y)) {
                  if (0 == (64 & y)) {
                    v = m[(65535 & v) + (d & (1 << y) - 1)];
                    continue t;
                  }
                  if (32 & y) {
                    r.mode = 12;
                    break e;
                  }
                  e.msg = "invalid literal/length code", r.mode = 30;
                  break e;
                }
                w = 65535 & v, (y &= 15) && (p < y && (d += z[n++] << p, p += 8), w += d & (1 << y) - 1, d >>>= y, p -= y), p < 15 && (d += z[n++] << p, p += 8, d += z[n++] << p, p += 8), v = _[d & b];
                r: for (;;) {
                  if (d >>>= y = v >>> 24, p -= y, !(16 & (y = v >>> 16 & 255))) {
                    if (0 == (64 & y)) {
                      v = _[(65535 & v) + (d & (1 << y) - 1)];
                      continue r;
                    }
                    e.msg = "invalid distance code", r.mode = 30;
                    break e;
                  }
                  if (k = 65535 & v, p < (y &= 15) && (d += z[n++] << p, (p += 8) < y && (d += z[n++] << p, p += 8)), h < (k += d & (1 << y) - 1)) {
                    e.msg = "invalid distance too far back", r.mode = 30;
                    break e;
                  }
                  if (d >>>= y, p -= y, (y = s - a) < k) {
                    if (l < (y = k - y) && r.sane) {
                      e.msg = "invalid distance too far back", r.mode = 30;
                      break e;
                    }
                    if (S = c, (x = 0) === f) {
                      if (x += u - y, y < w) {
                        for (w -= y; C[s++] = c[x++], --y;);
                        x = s - k, S = C;
                      }
                    } else if (f < y) {
                      if (x += u + f - y, (y -= f) < w) {
                        for (w -= y; C[s++] = c[x++], --y;);
                        if (x = 0, f < w) {
                          for (w -= y = f; C[s++] = c[x++], --y;);
                          x = s - k, S = C;
                        }
                      }
                    } else if (x += f - y, y < w) {
                      for (w -= y; C[s++] = c[x++], --y;);
                      x = s - k, S = C;
                    }
                    for (; 2 < w;) C[s++] = S[x++], C[s++] = S[x++], C[s++] = S[x++], w -= 3;
                    w && (C[s++] = S[x++], 1 < w && (C[s++] = S[x++]));
                  } else {
                    for (x = s - k; C[s++] = C[x++], C[s++] = C[x++], C[s++] = C[x++], 2 < (w -= 3););
                    w && (C[s++] = C[x++], 1 < w && (C[s++] = C[x++]));
                  }
                  break;
                }
              }
              break;
            }
          } while (n < i && s < o);
          n -= w = p >> 3, d &= (1 << (p -= w << 3)) - 1, e.next_in = n, e.next_out = s, e.avail_in = n < i ? i - n + 5 : 5 - (n - i), e.avail_out = s < o ? o - s + 257 : 257 - (s - o), r.hold = d, r.bits = p;
        };
      }, {}],
      49: [function (e, t, r) {

        var I = e("../utils/common"),
          O = e("./adler32"),
          B = e("./crc32"),
          R = e("./inffast"),
          T = e("./inftrees"),
          D = 1,
          F = 2,
          N = 0,
          U = -2,
          P = 1,
          n = 852,
          i = 592;
        function L(e) {
          return (e >>> 24 & 255) + (e >>> 8 & 65280) + ((65280 & e) << 8) + ((255 & e) << 24);
        }
        function s() {
          this.mode = 0, this.last = false, this.wrap = 0, this.havedict = false, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new I.Buf16(320), this.work = new I.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
        }
        function a(e) {
          var t;
          return e && e.state ? (t = e.state, e.total_in = e.total_out = t.total = 0, e.msg = "", t.wrap && (e.adler = 1 & t.wrap), t.mode = P, t.last = 0, t.havedict = 0, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = 0, t.lencode = t.lendyn = new I.Buf32(n), t.distcode = t.distdyn = new I.Buf32(i), t.sane = 1, t.back = -1, N) : U;
        }
        function o(e) {
          var t;
          return e && e.state ? ((t = e.state).wsize = 0, t.whave = 0, t.wnext = 0, a(e)) : U;
        }
        function h(e, t) {
          var r, n;
          return e && e.state ? (n = e.state, t < 0 ? (r = 0, t = -t) : (r = 1 + (t >> 4), t < 48 && (t &= 15)), t && (t < 8 || 15 < t) ? U : (null !== n.window && n.wbits !== t && (n.window = null), n.wrap = r, n.wbits = t, o(e))) : U;
        }
        function u(e, t) {
          var r, n;
          return e ? (n = new s(), (e.state = n).window = null, (r = h(e, t)) !== N && (e.state = null), r) : U;
        }
        var l,
          f,
          c = true;
        function j(e) {
          if (c) {
            var t;
            for (l = new I.Buf32(512), f = new I.Buf32(32), t = 0; t < 144;) e.lens[t++] = 8;
            for (; t < 256;) e.lens[t++] = 9;
            for (; t < 280;) e.lens[t++] = 7;
            for (; t < 288;) e.lens[t++] = 8;
            for (T(D, e.lens, 0, 288, l, 0, e.work, {
              bits: 9
            }), t = 0; t < 32;) e.lens[t++] = 5;
            T(F, e.lens, 0, 32, f, 0, e.work, {
              bits: 5
            }), c = false;
          }
          e.lencode = l, e.lenbits = 9, e.distcode = f, e.distbits = 5;
        }
        function Z(e, t, r, n) {
          var i,
            s = e.state;
          return null === s.window && (s.wsize = 1 << s.wbits, s.wnext = 0, s.whave = 0, s.window = new I.Buf8(s.wsize)), n >= s.wsize ? (I.arraySet(s.window, t, r - s.wsize, s.wsize, 0), s.wnext = 0, s.whave = s.wsize) : (n < (i = s.wsize - s.wnext) && (i = n), I.arraySet(s.window, t, r - n, i, s.wnext), (n -= i) ? (I.arraySet(s.window, t, r - n, n, 0), s.wnext = n, s.whave = s.wsize) : (s.wnext += i, s.wnext === s.wsize && (s.wnext = 0), s.whave < s.wsize && (s.whave += i))), 0;
        }
        r.inflateReset = o, r.inflateReset2 = h, r.inflateResetKeep = a, r.inflateInit = function (e) {
          return u(e, 15);
        }, r.inflateInit2 = u, r.inflate = function (e, t) {
          var r,
            n,
            i,
            s,
            a,
            o,
            h,
            u,
            l,
            f,
            c,
            d,
            p,
            m,
            _,
            g,
            b,
            v,
            y,
            w,
            k,
            x,
            S,
            z,
            C = 0,
            E = new I.Buf8(4),
            A = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
          if (!e || !e.state || !e.output || !e.input && 0 !== e.avail_in) return U;
          12 === (r = e.state).mode && (r.mode = 13), a = e.next_out, i = e.output, h = e.avail_out, s = e.next_in, n = e.input, o = e.avail_in, u = r.hold, l = r.bits, f = o, c = h, x = N;
          e: for (;;) switch (r.mode) {
            case P:
              if (0 === r.wrap) {
                r.mode = 13;
                break;
              }
              for (; l < 16;) {
                if (0 === o) break e;
                o--, u += n[s++] << l, l += 8;
              }
              if (2 & r.wrap && 35615 === u) {
                E[r.check = 0] = 255 & u, E[1] = u >>> 8 & 255, r.check = B(r.check, E, 2, 0), l = u = 0, r.mode = 2;
                break;
              }
              if (r.flags = 0, r.head && (r.head.done = false), !(1 & r.wrap) || (((255 & u) << 8) + (u >> 8)) % 31) {
                e.msg = "incorrect header check", r.mode = 30;
                break;
              }
              if (8 != (15 & u)) {
                e.msg = "unknown compression method", r.mode = 30;
                break;
              }
              if (l -= 4, k = 8 + (15 & (u >>>= 4)), 0 === r.wbits) r.wbits = k;else if (k > r.wbits) {
                e.msg = "invalid window size", r.mode = 30;
                break;
              }
              r.dmax = 1 << k, e.adler = r.check = 1, r.mode = 512 & u ? 10 : 12, l = u = 0;
              break;
            case 2:
              for (; l < 16;) {
                if (0 === o) break e;
                o--, u += n[s++] << l, l += 8;
              }
              if (r.flags = u, 8 != (255 & r.flags)) {
                e.msg = "unknown compression method", r.mode = 30;
                break;
              }
              if (57344 & r.flags) {
                e.msg = "unknown header flags set", r.mode = 30;
                break;
              }
              r.head && (r.head.text = u >> 8 & 1), 512 & r.flags && (E[0] = 255 & u, E[1] = u >>> 8 & 255, r.check = B(r.check, E, 2, 0)), l = u = 0, r.mode = 3;
            case 3:
              for (; l < 32;) {
                if (0 === o) break e;
                o--, u += n[s++] << l, l += 8;
              }
              r.head && (r.head.time = u), 512 & r.flags && (E[0] = 255 & u, E[1] = u >>> 8 & 255, E[2] = u >>> 16 & 255, E[3] = u >>> 24 & 255, r.check = B(r.check, E, 4, 0)), l = u = 0, r.mode = 4;
            case 4:
              for (; l < 16;) {
                if (0 === o) break e;
                o--, u += n[s++] << l, l += 8;
              }
              r.head && (r.head.xflags = 255 & u, r.head.os = u >> 8), 512 & r.flags && (E[0] = 255 & u, E[1] = u >>> 8 & 255, r.check = B(r.check, E, 2, 0)), l = u = 0, r.mode = 5;
            case 5:
              if (1024 & r.flags) {
                for (; l < 16;) {
                  if (0 === o) break e;
                  o--, u += n[s++] << l, l += 8;
                }
                r.length = u, r.head && (r.head.extra_len = u), 512 & r.flags && (E[0] = 255 & u, E[1] = u >>> 8 & 255, r.check = B(r.check, E, 2, 0)), l = u = 0;
              } else r.head && (r.head.extra = null);
              r.mode = 6;
            case 6:
              if (1024 & r.flags && (o < (d = r.length) && (d = o), d && (r.head && (k = r.head.extra_len - r.length, r.head.extra || (r.head.extra = new Array(r.head.extra_len)), I.arraySet(r.head.extra, n, s, d, k)), 512 & r.flags && (r.check = B(r.check, n, d, s)), o -= d, s += d, r.length -= d), r.length)) break e;
              r.length = 0, r.mode = 7;
            case 7:
              if (2048 & r.flags) {
                if (0 === o) break e;
                for (d = 0; k = n[s + d++], r.head && k && r.length < 65536 && (r.head.name += String.fromCharCode(k)), k && d < o;);
                if (512 & r.flags && (r.check = B(r.check, n, d, s)), o -= d, s += d, k) break e;
              } else r.head && (r.head.name = null);
              r.length = 0, r.mode = 8;
            case 8:
              if (4096 & r.flags) {
                if (0 === o) break e;
                for (d = 0; k = n[s + d++], r.head && k && r.length < 65536 && (r.head.comment += String.fromCharCode(k)), k && d < o;);
                if (512 & r.flags && (r.check = B(r.check, n, d, s)), o -= d, s += d, k) break e;
              } else r.head && (r.head.comment = null);
              r.mode = 9;
            case 9:
              if (512 & r.flags) {
                for (; l < 16;) {
                  if (0 === o) break e;
                  o--, u += n[s++] << l, l += 8;
                }
                if (u !== (65535 & r.check)) {
                  e.msg = "header crc mismatch", r.mode = 30;
                  break;
                }
                l = u = 0;
              }
              r.head && (r.head.hcrc = r.flags >> 9 & 1, r.head.done = true), e.adler = r.check = 0, r.mode = 12;
              break;
            case 10:
              for (; l < 32;) {
                if (0 === o) break e;
                o--, u += n[s++] << l, l += 8;
              }
              e.adler = r.check = L(u), l = u = 0, r.mode = 11;
            case 11:
              if (0 === r.havedict) return e.next_out = a, e.avail_out = h, e.next_in = s, e.avail_in = o, r.hold = u, r.bits = l, 2;
              e.adler = r.check = 1, r.mode = 12;
            case 12:
              if (5 === t || 6 === t) break e;
            case 13:
              if (r.last) {
                u >>>= 7 & l, l -= 7 & l, r.mode = 27;
                break;
              }
              for (; l < 3;) {
                if (0 === o) break e;
                o--, u += n[s++] << l, l += 8;
              }
              switch (r.last = 1 & u, l -= 1, 3 & (u >>>= 1)) {
                case 0:
                  r.mode = 14;
                  break;
                case 1:
                  if (j(r), r.mode = 20, 6 !== t) break;
                  u >>>= 2, l -= 2;
                  break e;
                case 2:
                  r.mode = 17;
                  break;
                case 3:
                  e.msg = "invalid block type", r.mode = 30;
              }
              u >>>= 2, l -= 2;
              break;
            case 14:
              for (u >>>= 7 & l, l -= 7 & l; l < 32;) {
                if (0 === o) break e;
                o--, u += n[s++] << l, l += 8;
              }
              if ((65535 & u) != (u >>> 16 ^ 65535)) {
                e.msg = "invalid stored block lengths", r.mode = 30;
                break;
              }
              if (r.length = 65535 & u, l = u = 0, r.mode = 15, 6 === t) break e;
            case 15:
              r.mode = 16;
            case 16:
              if (d = r.length) {
                if (o < d && (d = o), h < d && (d = h), 0 === d) break e;
                I.arraySet(i, n, s, d, a), o -= d, s += d, h -= d, a += d, r.length -= d;
                break;
              }
              r.mode = 12;
              break;
            case 17:
              for (; l < 14;) {
                if (0 === o) break e;
                o--, u += n[s++] << l, l += 8;
              }
              if (r.nlen = 257 + (31 & u), u >>>= 5, l -= 5, r.ndist = 1 + (31 & u), u >>>= 5, l -= 5, r.ncode = 4 + (15 & u), u >>>= 4, l -= 4, 286 < r.nlen || 30 < r.ndist) {
                e.msg = "too many length or distance symbols", r.mode = 30;
                break;
              }
              r.have = 0, r.mode = 18;
            case 18:
              for (; r.have < r.ncode;) {
                for (; l < 3;) {
                  if (0 === o) break e;
                  o--, u += n[s++] << l, l += 8;
                }
                r.lens[A[r.have++]] = 7 & u, u >>>= 3, l -= 3;
              }
              for (; r.have < 19;) r.lens[A[r.have++]] = 0;
              if (r.lencode = r.lendyn, r.lenbits = 7, S = {
                bits: r.lenbits
              }, x = T(0, r.lens, 0, 19, r.lencode, 0, r.work, S), r.lenbits = S.bits, x) {
                e.msg = "invalid code lengths set", r.mode = 30;
                break;
              }
              r.have = 0, r.mode = 19;
            case 19:
              for (; r.have < r.nlen + r.ndist;) {
                for (; g = (C = r.lencode[u & (1 << r.lenbits) - 1]) >>> 16 & 255, b = 65535 & C, !((_ = C >>> 24) <= l);) {
                  if (0 === o) break e;
                  o--, u += n[s++] << l, l += 8;
                }
                if (b < 16) u >>>= _, l -= _, r.lens[r.have++] = b;else {
                  if (16 === b) {
                    for (z = _ + 2; l < z;) {
                      if (0 === o) break e;
                      o--, u += n[s++] << l, l += 8;
                    }
                    if (u >>>= _, l -= _, 0 === r.have) {
                      e.msg = "invalid bit length repeat", r.mode = 30;
                      break;
                    }
                    k = r.lens[r.have - 1], d = 3 + (3 & u), u >>>= 2, l -= 2;
                  } else if (17 === b) {
                    for (z = _ + 3; l < z;) {
                      if (0 === o) break e;
                      o--, u += n[s++] << l, l += 8;
                    }
                    l -= _, k = 0, d = 3 + (7 & (u >>>= _)), u >>>= 3, l -= 3;
                  } else {
                    for (z = _ + 7; l < z;) {
                      if (0 === o) break e;
                      o--, u += n[s++] << l, l += 8;
                    }
                    l -= _, k = 0, d = 11 + (127 & (u >>>= _)), u >>>= 7, l -= 7;
                  }
                  if (r.have + d > r.nlen + r.ndist) {
                    e.msg = "invalid bit length repeat", r.mode = 30;
                    break;
                  }
                  for (; d--;) r.lens[r.have++] = k;
                }
              }
              if (30 === r.mode) break;
              if (0 === r.lens[256]) {
                e.msg = "invalid code -- missing end-of-block", r.mode = 30;
                break;
              }
              if (r.lenbits = 9, S = {
                bits: r.lenbits
              }, x = T(D, r.lens, 0, r.nlen, r.lencode, 0, r.work, S), r.lenbits = S.bits, x) {
                e.msg = "invalid literal/lengths set", r.mode = 30;
                break;
              }
              if (r.distbits = 6, r.distcode = r.distdyn, S = {
                bits: r.distbits
              }, x = T(F, r.lens, r.nlen, r.ndist, r.distcode, 0, r.work, S), r.distbits = S.bits, x) {
                e.msg = "invalid distances set", r.mode = 30;
                break;
              }
              if (r.mode = 20, 6 === t) break e;
            case 20:
              r.mode = 21;
            case 21:
              if (6 <= o && 258 <= h) {
                e.next_out = a, e.avail_out = h, e.next_in = s, e.avail_in = o, r.hold = u, r.bits = l, R(e, c), a = e.next_out, i = e.output, h = e.avail_out, s = e.next_in, n = e.input, o = e.avail_in, u = r.hold, l = r.bits, 12 === r.mode && (r.back = -1);
                break;
              }
              for (r.back = 0; g = (C = r.lencode[u & (1 << r.lenbits) - 1]) >>> 16 & 255, b = 65535 & C, !((_ = C >>> 24) <= l);) {
                if (0 === o) break e;
                o--, u += n[s++] << l, l += 8;
              }
              if (g && 0 == (240 & g)) {
                for (v = _, y = g, w = b; g = (C = r.lencode[w + ((u & (1 << v + y) - 1) >> v)]) >>> 16 & 255, b = 65535 & C, !(v + (_ = C >>> 24) <= l);) {
                  if (0 === o) break e;
                  o--, u += n[s++] << l, l += 8;
                }
                u >>>= v, l -= v, r.back += v;
              }
              if (u >>>= _, l -= _, r.back += _, r.length = b, 0 === g) {
                r.mode = 26;
                break;
              }
              if (32 & g) {
                r.back = -1, r.mode = 12;
                break;
              }
              if (64 & g) {
                e.msg = "invalid literal/length code", r.mode = 30;
                break;
              }
              r.extra = 15 & g, r.mode = 22;
            case 22:
              if (r.extra) {
                for (z = r.extra; l < z;) {
                  if (0 === o) break e;
                  o--, u += n[s++] << l, l += 8;
                }
                r.length += u & (1 << r.extra) - 1, u >>>= r.extra, l -= r.extra, r.back += r.extra;
              }
              r.was = r.length, r.mode = 23;
            case 23:
              for (; g = (C = r.distcode[u & (1 << r.distbits) - 1]) >>> 16 & 255, b = 65535 & C, !((_ = C >>> 24) <= l);) {
                if (0 === o) break e;
                o--, u += n[s++] << l, l += 8;
              }
              if (0 == (240 & g)) {
                for (v = _, y = g, w = b; g = (C = r.distcode[w + ((u & (1 << v + y) - 1) >> v)]) >>> 16 & 255, b = 65535 & C, !(v + (_ = C >>> 24) <= l);) {
                  if (0 === o) break e;
                  o--, u += n[s++] << l, l += 8;
                }
                u >>>= v, l -= v, r.back += v;
              }
              if (u >>>= _, l -= _, r.back += _, 64 & g) {
                e.msg = "invalid distance code", r.mode = 30;
                break;
              }
              r.offset = b, r.extra = 15 & g, r.mode = 24;
            case 24:
              if (r.extra) {
                for (z = r.extra; l < z;) {
                  if (0 === o) break e;
                  o--, u += n[s++] << l, l += 8;
                }
                r.offset += u & (1 << r.extra) - 1, u >>>= r.extra, l -= r.extra, r.back += r.extra;
              }
              if (r.offset > r.dmax) {
                e.msg = "invalid distance too far back", r.mode = 30;
                break;
              }
              r.mode = 25;
            case 25:
              if (0 === h) break e;
              if (d = c - h, r.offset > d) {
                if ((d = r.offset - d) > r.whave && r.sane) {
                  e.msg = "invalid distance too far back", r.mode = 30;
                  break;
                }
                p = d > r.wnext ? (d -= r.wnext, r.wsize - d) : r.wnext - d, d > r.length && (d = r.length), m = r.window;
              } else m = i, p = a - r.offset, d = r.length;
              for (h < d && (d = h), h -= d, r.length -= d; i[a++] = m[p++], --d;);
              0 === r.length && (r.mode = 21);
              break;
            case 26:
              if (0 === h) break e;
              i[a++] = r.length, h--, r.mode = 21;
              break;
            case 27:
              if (r.wrap) {
                for (; l < 32;) {
                  if (0 === o) break e;
                  o--, u |= n[s++] << l, l += 8;
                }
                if (c -= h, e.total_out += c, r.total += c, c && (e.adler = r.check = r.flags ? B(r.check, i, c, a - c) : O(r.check, i, c, a - c)), c = h, (r.flags ? u : L(u)) !== r.check) {
                  e.msg = "incorrect data check", r.mode = 30;
                  break;
                }
                l = u = 0;
              }
              r.mode = 28;
            case 28:
              if (r.wrap && r.flags) {
                for (; l < 32;) {
                  if (0 === o) break e;
                  o--, u += n[s++] << l, l += 8;
                }
                if (u !== (4294967295 & r.total)) {
                  e.msg = "incorrect length check", r.mode = 30;
                  break;
                }
                l = u = 0;
              }
              r.mode = 29;
            case 29:
              x = 1;
              break e;
            case 30:
              x = -3;
              break e;
            case 31:
              return -4;
            case 32:
            default:
              return U;
          }
          return e.next_out = a, e.avail_out = h, e.next_in = s, e.avail_in = o, r.hold = u, r.bits = l, (r.wsize || c !== e.avail_out && r.mode < 30 && (r.mode < 27 || 4 !== t)) && Z(e, e.output, e.next_out, c - e.avail_out) ? (r.mode = 31, -4) : (f -= e.avail_in, c -= e.avail_out, e.total_in += f, e.total_out += c, r.total += c, r.wrap && c && (e.adler = r.check = r.flags ? B(r.check, i, c, e.next_out - c) : O(r.check, i, c, e.next_out - c)), e.data_type = r.bits + (r.last ? 64 : 0) + (12 === r.mode ? 128 : 0) + (20 === r.mode || 15 === r.mode ? 256 : 0), (0 == f && 0 === c || 4 === t) && x === N && (x = -5), x);
        }, r.inflateEnd = function (e) {
          if (!e || !e.state) return U;
          var t = e.state;
          return t.window && (t.window = null), e.state = null, N;
        }, r.inflateGetHeader = function (e, t) {
          var r;
          return e && e.state ? 0 == (2 & (r = e.state).wrap) ? U : ((r.head = t).done = false, N) : U;
        }, r.inflateSetDictionary = function (e, t) {
          var r,
            n = t.length;
          return e && e.state ? 0 !== (r = e.state).wrap && 11 !== r.mode ? U : 11 === r.mode && O(1, t, n, 0) !== r.check ? -3 : Z(e, t, n, n) ? (r.mode = 31, -4) : (r.havedict = 1, N) : U;
        }, r.inflateInfo = "pako inflate (from Nodeca project)";
      }, {
        "../utils/common": 41,
        "./adler32": 43,
        "./crc32": 45,
        "./inffast": 48,
        "./inftrees": 50
      }],
      50: [function (e, t, r) {

        var D = e("../utils/common"),
          F = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0],
          N = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78],
          U = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0],
          P = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
        t.exports = function (e, t, r, n, i, s, a, o) {
          var h,
            u,
            l,
            f,
            c,
            d,
            p,
            m,
            _,
            g = o.bits,
            b = 0,
            v = 0,
            y = 0,
            w = 0,
            k = 0,
            x = 0,
            S = 0,
            z = 0,
            C = 0,
            E = 0,
            A = null,
            I = 0,
            O = new D.Buf16(16),
            B = new D.Buf16(16),
            R = null,
            T = 0;
          for (b = 0; b <= 15; b++) O[b] = 0;
          for (v = 0; v < n; v++) O[t[r + v]]++;
          for (k = g, w = 15; 1 <= w && 0 === O[w]; w--);
          if (w < k && (k = w), 0 === w) return i[s++] = 20971520, i[s++] = 20971520, o.bits = 1, 0;
          for (y = 1; y < w && 0 === O[y]; y++);
          for (k < y && (k = y), b = z = 1; b <= 15; b++) if (z <<= 1, (z -= O[b]) < 0) return -1;
          if (0 < z && (0 === e || 1 !== w)) return -1;
          for (B[1] = 0, b = 1; b < 15; b++) B[b + 1] = B[b] + O[b];
          for (v = 0; v < n; v++) 0 !== t[r + v] && (a[B[t[r + v]]++] = v);
          if (d = 0 === e ? (A = R = a, 19) : 1 === e ? (A = F, I -= 257, R = N, T -= 257, 256) : (A = U, R = P, -1), b = y, c = s, S = v = E = 0, l = -1, f = (C = 1 << (x = k)) - 1, 1 === e && 852 < C || 2 === e && 592 < C) return 1;
          for (;;) {
            for (p = b - S, _ = a[v] < d ? (m = 0, a[v]) : a[v] > d ? (m = R[T + a[v]], A[I + a[v]]) : (m = 96, 0), h = 1 << b - S, y = u = 1 << x; i[c + (E >> S) + (u -= h)] = p << 24 | m << 16 | _ | 0, 0 !== u;);
            for (h = 1 << b - 1; E & h;) h >>= 1;
            if (0 !== h ? (E &= h - 1, E += h) : E = 0, v++, 0 == --O[b]) {
              if (b === w) break;
              b = t[r + a[v]];
            }
            if (k < b && (E & f) !== l) {
              for (0 === S && (S = k), c += y, z = 1 << (x = b - S); x + S < w && !((z -= O[x + S]) <= 0);) x++, z <<= 1;
              if (C += 1 << x, 1 === e && 852 < C || 2 === e && 592 < C) return 1;
              i[l = E & f] = k << 24 | x << 16 | c - s | 0;
            }
          }
          return 0 !== E && (i[c + E] = b - S << 24 | 64 << 16 | 0), o.bits = k, 0;
        };
      }, {
        "../utils/common": 41
      }],
      51: [function (e, t, r) {

        t.exports = {
          2: "need dictionary",
          1: "stream end",
          0: "",
          "-1": "file error",
          "-2": "stream error",
          "-3": "data error",
          "-4": "insufficient memory",
          "-5": "buffer error",
          "-6": "incompatible version"
        };
      }, {}],
      52: [function (e, t, r) {

        var i = e("../utils/common"),
          o = 0,
          h = 1;
        function n(e) {
          for (var t = e.length; 0 <= --t;) e[t] = 0;
        }
        var s = 0,
          a = 29,
          u = 256,
          l = u + 1 + a,
          f = 30,
          c = 19,
          _ = 2 * l + 1,
          g = 15,
          d = 16,
          p = 7,
          m = 256,
          b = 16,
          v = 17,
          y = 18,
          w = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0],
          k = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13],
          x = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7],
          S = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15],
          z = new Array(2 * (l + 2));
        n(z);
        var C = new Array(2 * f);
        n(C);
        var E = new Array(512);
        n(E);
        var A = new Array(256);
        n(A);
        var I = new Array(a);
        n(I);
        var O,
          B,
          R,
          T = new Array(f);
        function D(e, t, r, n, i) {
          this.static_tree = e, this.extra_bits = t, this.extra_base = r, this.elems = n, this.max_length = i, this.has_stree = e && e.length;
        }
        function F(e, t) {
          this.dyn_tree = e, this.max_code = 0, this.stat_desc = t;
        }
        function N(e) {
          return e < 256 ? E[e] : E[256 + (e >>> 7)];
        }
        function U(e, t) {
          e.pending_buf[e.pending++] = 255 & t, e.pending_buf[e.pending++] = t >>> 8 & 255;
        }
        function P(e, t, r) {
          e.bi_valid > d - r ? (e.bi_buf |= t << e.bi_valid & 65535, U(e, e.bi_buf), e.bi_buf = t >> d - e.bi_valid, e.bi_valid += r - d) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += r);
        }
        function L(e, t, r) {
          P(e, r[2 * t], r[2 * t + 1]);
        }
        function j(e, t) {
          for (var r = 0; r |= 1 & e, e >>>= 1, r <<= 1, 0 < --t;);
          return r >>> 1;
        }
        function Z(e, t, r) {
          var n,
            i,
            s = new Array(g + 1),
            a = 0;
          for (n = 1; n <= g; n++) s[n] = a = a + r[n - 1] << 1;
          for (i = 0; i <= t; i++) {
            var o = e[2 * i + 1];
            0 !== o && (e[2 * i] = j(s[o]++, o));
          }
        }
        function W(e) {
          var t;
          for (t = 0; t < l; t++) e.dyn_ltree[2 * t] = 0;
          for (t = 0; t < f; t++) e.dyn_dtree[2 * t] = 0;
          for (t = 0; t < c; t++) e.bl_tree[2 * t] = 0;
          e.dyn_ltree[2 * m] = 1, e.opt_len = e.static_len = 0, e.last_lit = e.matches = 0;
        }
        function M(e) {
          8 < e.bi_valid ? U(e, e.bi_buf) : 0 < e.bi_valid && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
        }
        function H(e, t, r, n) {
          var i = 2 * t,
            s = 2 * r;
          return e[i] < e[s] || e[i] === e[s] && n[t] <= n[r];
        }
        function G(e, t, r) {
          for (var n = e.heap[r], i = r << 1; i <= e.heap_len && (i < e.heap_len && H(t, e.heap[i + 1], e.heap[i], e.depth) && i++, !H(t, n, e.heap[i], e.depth));) e.heap[r] = e.heap[i], r = i, i <<= 1;
          e.heap[r] = n;
        }
        function K(e, t, r) {
          var n,
            i,
            s,
            a,
            o = 0;
          if (0 !== e.last_lit) for (; n = e.pending_buf[e.d_buf + 2 * o] << 8 | e.pending_buf[e.d_buf + 2 * o + 1], i = e.pending_buf[e.l_buf + o], o++, 0 === n ? L(e, i, t) : (L(e, (s = A[i]) + u + 1, t), 0 !== (a = w[s]) && P(e, i -= I[s], a), L(e, s = N(--n), r), 0 !== (a = k[s]) && P(e, n -= T[s], a)), o < e.last_lit;);
          L(e, m, t);
        }
        function Y(e, t) {
          var r,
            n,
            i,
            s = t.dyn_tree,
            a = t.stat_desc.static_tree,
            o = t.stat_desc.has_stree,
            h = t.stat_desc.elems,
            u = -1;
          for (e.heap_len = 0, e.heap_max = _, r = 0; r < h; r++) 0 !== s[2 * r] ? (e.heap[++e.heap_len] = u = r, e.depth[r] = 0) : s[2 * r + 1] = 0;
          for (; e.heap_len < 2;) s[2 * (i = e.heap[++e.heap_len] = u < 2 ? ++u : 0)] = 1, e.depth[i] = 0, e.opt_len--, o && (e.static_len -= a[2 * i + 1]);
          for (t.max_code = u, r = e.heap_len >> 1; 1 <= r; r--) G(e, s, r);
          for (i = h; r = e.heap[1], e.heap[1] = e.heap[e.heap_len--], G(e, s, 1), n = e.heap[1], e.heap[--e.heap_max] = r, e.heap[--e.heap_max] = n, s[2 * i] = s[2 * r] + s[2 * n], e.depth[i] = (e.depth[r] >= e.depth[n] ? e.depth[r] : e.depth[n]) + 1, s[2 * r + 1] = s[2 * n + 1] = i, e.heap[1] = i++, G(e, s, 1), 2 <= e.heap_len;);
          e.heap[--e.heap_max] = e.heap[1], function (e, t) {
            var r,
              n,
              i,
              s,
              a,
              o,
              h = t.dyn_tree,
              u = t.max_code,
              l = t.stat_desc.static_tree,
              f = t.stat_desc.has_stree,
              c = t.stat_desc.extra_bits,
              d = t.stat_desc.extra_base,
              p = t.stat_desc.max_length,
              m = 0;
            for (s = 0; s <= g; s++) e.bl_count[s] = 0;
            for (h[2 * e.heap[e.heap_max] + 1] = 0, r = e.heap_max + 1; r < _; r++) p < (s = h[2 * h[2 * (n = e.heap[r]) + 1] + 1] + 1) && (s = p, m++), h[2 * n + 1] = s, u < n || (e.bl_count[s]++, a = 0, d <= n && (a = c[n - d]), o = h[2 * n], e.opt_len += o * (s + a), f && (e.static_len += o * (l[2 * n + 1] + a)));
            if (0 !== m) {
              do {
                for (s = p - 1; 0 === e.bl_count[s];) s--;
                e.bl_count[s]--, e.bl_count[s + 1] += 2, e.bl_count[p]--, m -= 2;
              } while (0 < m);
              for (s = p; 0 !== s; s--) for (n = e.bl_count[s]; 0 !== n;) u < (i = e.heap[--r]) || (h[2 * i + 1] !== s && (e.opt_len += (s - h[2 * i + 1]) * h[2 * i], h[2 * i + 1] = s), n--);
            }
          }(e, t), Z(s, u, e.bl_count);
        }
        function X(e, t, r) {
          var n,
            i,
            s = -1,
            a = t[1],
            o = 0,
            h = 7,
            u = 4;
          for (0 === a && (h = 138, u = 3), t[2 * (r + 1) + 1] = 65535, n = 0; n <= r; n++) i = a, a = t[2 * (n + 1) + 1], ++o < h && i === a || (o < u ? e.bl_tree[2 * i] += o : 0 !== i ? (i !== s && e.bl_tree[2 * i]++, e.bl_tree[2 * b]++) : o <= 10 ? e.bl_tree[2 * v]++ : e.bl_tree[2 * y]++, s = i, u = (o = 0) === a ? (h = 138, 3) : i === a ? (h = 6, 3) : (h = 7, 4));
        }
        function V(e, t, r) {
          var n,
            i,
            s = -1,
            a = t[1],
            o = 0,
            h = 7,
            u = 4;
          for (0 === a && (h = 138, u = 3), n = 0; n <= r; n++) if (i = a, a = t[2 * (n + 1) + 1], !(++o < h && i === a)) {
            if (o < u) for (; L(e, i, e.bl_tree), 0 != --o;);else 0 !== i ? (i !== s && (L(e, i, e.bl_tree), o--), L(e, b, e.bl_tree), P(e, o - 3, 2)) : o <= 10 ? (L(e, v, e.bl_tree), P(e, o - 3, 3)) : (L(e, y, e.bl_tree), P(e, o - 11, 7));
            s = i, u = (o = 0) === a ? (h = 138, 3) : i === a ? (h = 6, 3) : (h = 7, 4);
          }
        }
        n(T);
        var q = false;
        function J(e, t, r, n) {
          P(e, (s << 1) + (n ? 1 : 0), 3), function (e, t, r, n) {
            M(e), (U(e, r), U(e, ~r)), i.arraySet(e.pending_buf, e.window, t, r, e.pending), e.pending += r;
          }(e, t, r);
        }
        r._tr_init = function (e) {
          q || (function () {
            var e,
              t,
              r,
              n,
              i,
              s = new Array(g + 1);
            for (n = r = 0; n < a - 1; n++) for (I[n] = r, e = 0; e < 1 << w[n]; e++) A[r++] = n;
            for (A[r - 1] = n, n = i = 0; n < 16; n++) for (T[n] = i, e = 0; e < 1 << k[n]; e++) E[i++] = n;
            for (i >>= 7; n < f; n++) for (T[n] = i << 7, e = 0; e < 1 << k[n] - 7; e++) E[256 + i++] = n;
            for (t = 0; t <= g; t++) s[t] = 0;
            for (e = 0; e <= 143;) z[2 * e + 1] = 8, e++, s[8]++;
            for (; e <= 255;) z[2 * e + 1] = 9, e++, s[9]++;
            for (; e <= 279;) z[2 * e + 1] = 7, e++, s[7]++;
            for (; e <= 287;) z[2 * e + 1] = 8, e++, s[8]++;
            for (Z(z, l + 1, s), e = 0; e < f; e++) C[2 * e + 1] = 5, C[2 * e] = j(e, 5);
            O = new D(z, w, u + 1, l, g), B = new D(C, k, 0, f, g), R = new D(new Array(0), x, 0, c, p);
          }(), q = true), e.l_desc = new F(e.dyn_ltree, O), e.d_desc = new F(e.dyn_dtree, B), e.bl_desc = new F(e.bl_tree, R), e.bi_buf = 0, e.bi_valid = 0, W(e);
        }, r._tr_stored_block = J, r._tr_flush_block = function (e, t, r, n) {
          var i,
            s,
            a = 0;
          0 < e.level ? (2 === e.strm.data_type && (e.strm.data_type = function (e) {
            var t,
              r = 4093624447;
            for (t = 0; t <= 31; t++, r >>>= 1) if (1 & r && 0 !== e.dyn_ltree[2 * t]) return o;
            if (0 !== e.dyn_ltree[18] || 0 !== e.dyn_ltree[20] || 0 !== e.dyn_ltree[26]) return h;
            for (t = 32; t < u; t++) if (0 !== e.dyn_ltree[2 * t]) return h;
            return o;
          }(e)), Y(e, e.l_desc), Y(e, e.d_desc), a = function (e) {
            var t;
            for (X(e, e.dyn_ltree, e.l_desc.max_code), X(e, e.dyn_dtree, e.d_desc.max_code), Y(e, e.bl_desc), t = c - 1; 3 <= t && 0 === e.bl_tree[2 * S[t] + 1]; t--);
            return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t;
          }(e), i = e.opt_len + 3 + 7 >>> 3, (s = e.static_len + 3 + 7 >>> 3) <= i && (i = s)) : i = s = r + 5, r + 4 <= i && -1 !== t ? J(e, t, r, n) : 4 === e.strategy || s === i ? (P(e, 2 + (n ? 1 : 0), 3), K(e, z, C)) : (P(e, 4 + (n ? 1 : 0), 3), function (e, t, r, n) {
            var i;
            for (P(e, t - 257, 5), P(e, r - 1, 5), P(e, n - 4, 4), i = 0; i < n; i++) P(e, e.bl_tree[2 * S[i] + 1], 3);
            V(e, e.dyn_ltree, t - 1), V(e, e.dyn_dtree, r - 1);
          }(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, a + 1), K(e, e.dyn_ltree, e.dyn_dtree)), W(e), n && M(e);
        }, r._tr_tally = function (e, t, r) {
          return e.pending_buf[e.d_buf + 2 * e.last_lit] = t >>> 8 & 255, e.pending_buf[e.d_buf + 2 * e.last_lit + 1] = 255 & t, e.pending_buf[e.l_buf + e.last_lit] = 255 & r, e.last_lit++, 0 === t ? e.dyn_ltree[2 * r]++ : (e.matches++, t--, e.dyn_ltree[2 * (A[r] + u + 1)]++, e.dyn_dtree[2 * N(t)]++), e.last_lit === e.lit_bufsize - 1;
        }, r._tr_align = function (e) {
          P(e, 2, 3), L(e, m, z), function (e) {
            16 === e.bi_valid ? (U(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : 8 <= e.bi_valid && (e.pending_buf[e.pending++] = 255 & e.bi_buf, e.bi_buf >>= 8, e.bi_valid -= 8);
          }(e);
        };
      }, {
        "../utils/common": 41
      }],
      53: [function (e, t, r) {

        t.exports = function () {
          this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
        };
      }, {}],
      54: [function (e, t, r) {
        (function (e) {
          !function (r, n) {

            if (!r.setImmediate) {
              var i,
                s,
                t,
                a,
                o = 1,
                h = {},
                u = false,
                l = r.document,
                e = Object.getPrototypeOf && Object.getPrototypeOf(r);
              e = e && e.setTimeout ? e : r, i = "[object process]" === {}.toString.call(r.process) ? function (e) {
                process.nextTick(function () {
                  c(e);
                });
              } : function () {
                if (r.postMessage && !r.importScripts) {
                  var e = true,
                    t = r.onmessage;
                  return r.onmessage = function () {
                    e = false;
                  }, r.postMessage("", "*"), r.onmessage = t, e;
                }
              }() ? (a = "setImmediate$" + Math.random() + "$", r.addEventListener ? r.addEventListener("message", d, false) : r.attachEvent("onmessage", d), function (e) {
                r.postMessage(a + e, "*");
              }) : r.MessageChannel ? ((t = new MessageChannel()).port1.onmessage = function (e) {
                c(e.data);
              }, function (e) {
                t.port2.postMessage(e);
              }) : l && "onreadystatechange" in l.createElement("script") ? (s = l.documentElement, function (e) {
                var t = l.createElement("script");
                t.onreadystatechange = function () {
                  c(e), t.onreadystatechange = null, s.removeChild(t), t = null;
                }, s.appendChild(t);
              }) : function (e) {
                setTimeout(c, 0, e);
              }, e.setImmediate = function (e) {
                "function" != typeof e && (e = new Function("" + e));
                for (var t = new Array(arguments.length - 1), r = 0; r < t.length; r++) t[r] = arguments[r + 1];
                var n = {
                  callback: e,
                  args: t
                };
                return h[o] = n, i(o), o++;
              }, e.clearImmediate = f;
            }
            function f(e) {
              delete h[e];
            }
            function c(e) {
              if (u) setTimeout(c, 0, e);else {
                var t = h[e];
                if (t) {
                  u = true;
                  try {
                    !function (e) {
                      var t = e.callback,
                        r = e.args;
                      switch (r.length) {
                        case 0:
                          t();
                          break;
                        case 1:
                          t(r[0]);
                          break;
                        case 2:
                          t(r[0], r[1]);
                          break;
                        case 3:
                          t(r[0], r[1], r[2]);
                          break;
                        default:
                          t.apply(n, r);
                      }
                    }(t);
                  } finally {
                    f(e), u = false;
                  }
                }
              }
            }
            function d(e) {
              e.source === r && "string" == typeof e.data && 0 === e.data.indexOf(a) && c(+e.data.slice(a.length));
            }
          }("undefined" == typeof self ? void 0 === e ? this : e : self);
        }).call(this, "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
      }, {}]
    }, {}, [10])(10);
  });
})(jszip_min);
var jszip_minExports = jszip_min.exports;

var fetchArrayBuffer$1 = {};

Object.defineProperty(fetchArrayBuffer$1, "__esModule", {
  value: true
});
fetchArrayBuffer$1.fetchArrayBuffer = fetchArrayBuffer;
async function fetchArrayBuffer(url) {
  const result = await fetch(url);
  return result.arrayBuffer();
}

var __importDefault$2 = loadCommercials$1 && loadCommercials$1.__importDefault || function (mod) {
  return mod && mod.__esModule ? mod : {
    "default": mod
  };
};
Object.defineProperty(loadCommercials$1, "__esModule", {
  value: true
});
loadCommercials$1.loadCommercials = loadCommercials;
const jszip_1$1 = __importDefault$2(jszip_minExports);
const fetchArrayBuffer_1$1 = fetchArrayBuffer$1;
const loadingPromises$1 = {};
async function loadCommercials(options = {}) {
  const {
    url = 'https://couch.cheminfo.org/cheminfo-public/d2eb480198c80275a1d05dd3609414f9/upload/commercials.zip'
  } = options;
  if (!loadingPromises$1[url]) {
    loadingPromises$1[url] = (0, fetchArrayBuffer_1$1.fetchArrayBuffer)(url);
  }
  const buffer = await loadingPromises$1[url];
  const jsZip = new jszip_1$1.default();
  let zip = await jsZip.loadAsync(buffer);
  let fileData = await zip.files['commercials.json'].async('string');
  let data = JSON.parse(fileData);
  data.sort((a, b) => a.em - b.em);
  return data;
}

var loadGoogleSheet$1 = {};

var src$7 = {};

var fetchText$1 = {};

Object.defineProperty(fetchText$1, "__esModule", {
  value: true
});
fetchText$1.fetchText = fetchText;
async function fetchText(url) {
  const result = await fetch(url);
  if (result.status !== 200) {
    throw new Error(String(result.status));
  }
  return result.text();
}

var __importDefault$1 = src$7 && src$7.__importDefault || function (mod) {
  return mod && mod.__esModule ? mod : {
    "default": mod
  };
};
Object.defineProperty(src$7, "__esModule", {
  value: true
});
src$7.mfFromGoogleSheet = mfFromGoogleSheet;
const mf_generator_1$2 = src$b;
const mf_parser_1$5 = src$h;
const papaparse_1 = __importDefault$1(papaparse_minExports);
const fetchText_js_1 = fetchText$1;
async function mfFromGoogleSheet(url, options = {}) {
  let {
    urlReferences
  } = options;
  if (urlReferences) {
    let results = await Promise.all([(0, fetchText_js_1.fetchText)(url), (0, fetchText_js_1.fetchText)(urlReferences)]);
    return parse(results[0], results[1]);
  } else {
    let result = await (0, fetchText_js_1.fetchText)(url);
    return parse(result);
  }
}
async function parse(tsv, tsvReferences) {
  let parsed = papaparse_1.default.parse(tsv, {
    delimiter: '\t',
    header: true
  });
  let fields = parsed.meta.fields;
  let infoFields = fields.filter(a => !['mf', 'modif', 'ESI', 'MALDI', 'positive', 'negative'].includes(a));
  let formulas = parsed.data;
  let references = {};
  if (tsvReferences) {
    let referencesArray = papaparse_1.default.parse(tsvReferences, {
      delimiter: '\t',
      header: true
    }).data;
    for (const r of referencesArray) {
      references[r.label] = r;
    }
  }
  let results = [];
  for (let formula of formulas) {
    if (tsvReferences) {
      // we add references
      let refs = formula.references.split(/[ ,]+/);
      formula.references = [];
      for (let ref of refs) {
        formula.references.push(references[ref]);
      }
    }
    // we need to calculate all the possibilities
    try {
      let mfs = await (0, mf_generator_1$2.generateMFs)([formula.mf], {
        ionizations: formula.modif
      });
      for (let mf of mfs) {
        mf.info = {};
        for (let infoField of infoFields) {
          mf.info[infoField] = formula[infoField];
        }
        if (!formula.ESI && !formula.MALDI && !formula.positive && !formula.negative) {
          mf.filter = {
            ESI: true,
            MALDI: true,
            positive: true,
            negative: true
          };
        } else {
          mf.filter = {
            ESI: formula.ESI === 'X',
            MALDI: formula.MALDI === 'X',
            positive: formula.positive === 'X',
            negative: formula.negative === 'X'
          };
        }
        mf.mf = new mf_parser_1$5.MF(mf.mf).toMF();
        results.push(mf);
      }
    } catch (error) {
      // eslint-disable-next-line no-console
      console.warn('Non parsable molecular formula:', formula.mf, formula.modif, error.toString());
    }
  }
  results = results.filter(a => {
    return a.ms.em !== 0;
  });
  results.sort((a, b) => {
    return a.ms.em - b.ms.em;
  });
  let uniqueResults = [results[0]];
  for (let i = 1; i < results.length; i++) {
    if (results[i - 1].ms.em !== results[i].ms.em) {
      uniqueResults.push(results[i]);
    }
  }
  return uniqueResults;
}

Object.defineProperty(loadGoogleSheet$1, "__esModule", {
  value: true
});
loadGoogleSheet$1.loadGoogleSheet = loadGoogleSheet;
const mf_from_google_sheet_1 = src$7;
async function loadGoogleSheet(options = {}) {
  let {
    refUUID = '1C_H9aiJyu9M9in7sHMOaz-d3Sv758rE72oLxEKH9ioA',
    uuid = '1LrJCl9-xSZKhGA9Y8nKVkYwB-mEOHBkTXg5qYXeFpZY'
  } = options;
  if (options.uuid && !options.refUUID) refUUID = '';
  let url = `https://googledocs.cheminfo.org/spreadsheets/d/${uuid}/export?format=tsv`;
  let refURL = refUUID ? `https://googledocs.cheminfo.org/spreadsheets/d/${refUUID}/export?format=tsv` : '';
  let data = await (0, mf_from_google_sheet_1.mfFromGoogleSheet)(url, refURL);
  data.sort((a, b) => a.em - b.em);
  return data;
}

var loadKnapSack$1 = {};

var __importDefault = loadKnapSack$1 && loadKnapSack$1.__importDefault || function (mod) {
  return mod && mod.__esModule ? mod : {
    "default": mod
  };
};
Object.defineProperty(loadKnapSack$1, "__esModule", {
  value: true
});
loadKnapSack$1.loadKnapSack = loadKnapSack;
const jszip_1 = __importDefault(jszip_minExports);
const fetchArrayBuffer_1 = fetchArrayBuffer$1;
const loadingPromises = {};
async function loadKnapSack(options = {}) {
  const {
    url = 'https://couch.cheminfo.org/cheminfo-public/d2eb480198c80275a1d05dd3609414f9/upload/ms.zip'
  } = options;
  if (!loadingPromises[url]) {
    loadingPromises[url] = (0, fetchArrayBuffer_1.fetchArrayBuffer)(url);
  }
  const buffer = await loadingPromises[url];
  const jsZip = new jszip_1.default();
  let zip = await jsZip.loadAsync(buffer);
  let fileData = await zip.files['ms.json'].async('string');
  let data = JSON.parse(fileData);
  for (const d of data) {
    // the database moved away from kanaya.naist.jp, whose host does not answer
    // anymore, to its own domain. Same ids, same `word` parameter.
    d.url = `https://www.knapsackfamily.com/knapsack_core/information.php?word=${d.id}`;
  }
  data.sort((a, b) => a.em - b.em);
  return data;
}

var search$3 = {};

Object.defineProperty(search$3, "__esModule", {
  value: true
});
search$3.search = search$2;
const mf_matcher_1$1 = src$d;
/**
    Searching by various criteria. This mass will not take into account the mass
    of the mass of the electron
* @param {object}   [filter={}]
* @param {number}   [filter.minMW=0] - Minimal molecular weight
* @param {number}   [filter.maxMW=+Infinity] - Maximal molecular weight
* @param {number}   [filter.minEM=0] - Minimal monoisotopic mass
* @param {number}   [filter.maxEM=+Infinity] - Maximal monoisotopic mass
* @param {number}   [filter.minCharge=-Infinity] - Minimal charge
* @param {number}   [filter.maxCharge=+Infinity] - Maximal charge
* @param {boolean}   [filter.absoluteCharge=false] - If true, the charge is absolute (so between 0 and +Infinity by default)
* @param {object}   [filter.unsaturation={}]
* @param {number}   [filter.unsaturation.min=-Infinity] - Minimal unsaturation
* @param {number}   [filter.unsaturation.max=+Infinity] - Maximal unsaturation
* @param {boolean}   [filter.unsaturation.onlyInteger=false] - Integer unsaturation
* @param {boolean}   [filter.unsaturation.onlyNonInteger=false] - Non integer unsaturation
* @param {object}   [filter.atoms] - object of atom:{min, max}

* @param {object}   [options={}]
* @param {array}    [options.databases] - an array containing the name of the databases so search, by default all
* @param {boolean}  [options.flatten=false] - should we return the array as a flat result
*/
function search$2(emdb, filter, options = {}) {
  let {
    databases = Object.keys(emdb.databases),
    flatten = false
  } = options;
  let results = {};
  for (let database of databases) {
    results[database] = emdb.databases[database].filter(entry => (0, mf_matcher_1$1.generalMatcher)(entry, filter));
  }
  if (flatten) {
    let flattenResults = [];
    for (let database of databases) {
      for (let entry of results[database]) {
        entry.database = database;
        flattenResults.push(entry);
      }
    }
    return flattenResults;
  } else {
    return results;
  }
}

var searchMSEM$1 = {};

Object.defineProperty(searchMSEM$1, "__esModule", {
  value: true
});
searchMSEM$1.searchMSEM = searchMSEM;
const mf_matcher_1 = src$d;
const mf_utilities_1$3 = src$i;
/**
Search for an experimental monoisotopic mass
* @param {number}   msem - The observed monoisotopic mass
* @param {object}   [options={}]
* @param {array}    [options.databases] - an array containing the name of the databases so search, by default all
* @param {boolean}  [options.flatten=false] - should we return the array as a flat result
* @param {string}   [options.ionizations] - list the allowed ionizations possibilities
* @param {import('mf-matcher').MSEMFilterOptions}        [options.filter={}]
*/
function searchMSEM(emdb, msem, options = {}) {
  let filter = {
    ...options.filter,
    targetMass: msem
  };
  let {
    databases = Object.keys(emdb.databases),
    flatten = false
  } = options;
  let ionizations = (0, mf_utilities_1$3.preprocessIonizations)(options.ionizations);
  let results = {};
  for (let database of databases) {
    results[database] = [];
  }
  for (let ionization of ionizations) {
    filter.ionization = ionization;
    for (let database of databases) {
      for (let entry of emdb.databases[database]) {
        let match = (0, mf_matcher_1.msemMatcher)(entry, filter);
        if (match) {
          results[database].push({
            ...entry,
            ms: match.ms,
            ionization: match.ionization
          });
        }
      }
    }
  }
  if (flatten) {
    let flattenResults = [];
    for (let database of databases) {
      for (let entry of results[database]) {
        entry.database = database;
        flattenResults.push(entry);
      }
    }
    flattenResults.sort((a, b) => Math.abs(a.ms.ppm) - Math.abs(b.ms.ppm));
    return flattenResults;
  } else {
    for (const k of Object.keys(results)) {
      results[k].sort((a, b) => Math.abs(a.ms.ppm) - Math.abs(b.ms.ppm));
    }
    return results;
  }
}

var searchSimilarity$1 = {};

var src$6 = {};

var IsotopicDistribution$1 = {};

class BaseSpectrumGenerator {
  from;
  to;
  nbPoints;
  interval;
  peakWidthFct;
  shape;
  constructor(options = {}) {
    const {
      from = 0,
      to = 1000,
      nbPoints = 10001,
      peakWidthFct,
      shape = {
        kind: 'gaussian',
        fwhm: 5
      }
    } = options;
    assertNumber$1(from, 'from');
    assertNumber$1(to, 'to');
    assertInteger$1(nbPoints, 'nbPoints');
    if (to <= from) {
      throw new RangeError('to option must be larger than from');
    }
    if (peakWidthFct && typeof peakWidthFct !== 'function') {
      throw new TypeError('peakWidthFct option must be a function');
    }
    this.from = from;
    this.to = to;
    this.nbPoints = nbPoints;
    this.interval = (to - from) / (nbPoints - 1);
    this.peakWidthFct = peakWidthFct;
    this.shape = getShape1D(shape);
  }
  /**
   * Resolves a peak to its canonical parameters, cloning and configuring
   * separate shape instances for the left and right halves.
   */
  resolvePeak(peak, options) {
    let x0;
    let intensity;
    let peakFWHM;
    let peakWidth;
    let peakShapeOptions;
    if (Array.isArray(peak)) {
      [x0, intensity, peakFWHM, peakShapeOptions] = peak;
    } else {
      x0 = peak.x;
      intensity = peak.y;
      peakWidth = peak.width;
      peakShapeOptions = peak.shape;
    }
    let {
      shape: shapeOptions
    } = options;
    if (peakShapeOptions) {
      shapeOptions = shapeOptions ? {
        ...shapeOptions,
        ...peakShapeOptions
      } : peakShapeOptions;
    }
    const shape = shapeOptions ? getShape1D(shapeOptions) : cloneShape(this.shape);
    const {
      width
    } = options;
    let {
      widthLeft,
      widthRight
    } = options;
    const fwhm = peakFWHM !== undefined ? peakFWHM : peakWidth ? shape.widthToFWHM(peakWidth) : this.peakWidthFct ? this.peakWidthFct(x0) : width !== undefined ? width : shape.fwhm;
    if (!widthLeft) widthLeft = fwhm;
    if (!widthRight) widthRight = fwhm;
    if (!widthLeft || !widthRight) {
      throw new Error('Width left or right is undefined or zero');
    }
    const factor = options.factor === undefined ? shape.getFactor() : options.factor;
    const shapeLeft = cloneShape(shape);
    shapeLeft.fwhm = widthLeft;
    const shapeRight = cloneShape(shape);
    shapeRight.fwhm = widthRight;
    return {
      x0,
      intensity,
      shapeLeft,
      shapeRight,
      widthLeft,
      widthRight,
      factor
    };
  }
}
function cloneShape(shape) {
  return Object.assign(Object.create(Object.getPrototypeOf(shape)), shape);
}
function assertInteger$1(value, name) {
  if (!Number.isInteger(value)) {
    throw new TypeError(`${name} option must be an integer`);
  }
}
function assertNumber$1(value, name) {
  if (!Number.isFinite(value)) {
    throw new TypeError(`${name} option must be a number`);
  }
}

/**
 * Adds a baseline to the spectrum data.
 * @param data - The spectrum data to modify.
 * @param baselineFct - Function that generates the baseline value for a given x.
 * @returns The modified spectrum data.
 */
function addBaseline(data, baselineFct) {
  if (!baselineFct) return data;
  const xs = data.x;
  const ys = data.y;
  for (let i = 0; i < xs.length; i++) {
    ys[i] += baselineFct(xs[i]);
  }
  return data;
}

/**
 * Adds noise to the spectrum data.
 * @param data - The spectrum data to modify.
 * @param options - Configuration for noise generation.
 * @returns The modified spectrum data.
 */
function addNoise(data, options = {}) {
  const {
    seed = 0,
    distribution = 'normal',
    percent = 1
  } = options;
  const range = xMaxValue(data.y) * percent / 100;
  const noise = createRandomArray({
    distribution,
    seed,
    mean: 0,
    standardDeviation: range,
    range,
    length: data.x.length
  });
  data.y = xAdd(data.y, noise);
  return data;
}

class SpectrumGenerator extends BaseSpectrumGenerator {
  maxPeakHeight;
  data;
  constructor(options = {}) {
    super(options);
    this.maxPeakHeight = Number.MIN_SAFE_INTEGER;
    this.data = {
      x: new Float64Array(this.nbPoints),
      y: new Float64Array(this.nbPoints)
    };
    this.reset();
  }
  /**
   * Generates a spectrum from a list of peaks and returns it.
   * @param peaks - List of peaks to add.
   * @param options - Options for spectrum generation.
   * @returns The generated spectrum data.
   */
  generateSpectrum(peaks, options = {}) {
    const {
      noise,
      baseline,
      threshold,
      peakOptions
    } = options;
    this.addPeaks(peaks, peakOptions);
    if (baseline) this.addBaseline(baseline);
    if (noise) this.addNoise(noise);
    return this.getSpectrum({
      threshold
    });
  }
  /**
   * Add a series of peaks to the spectrum.
   * @param peaks - Peaks to add.
   * @param options - Options for adding peaks.
   * @returns The generator instance.
   */
  addPeaks(peaks, options) {
    if (!Array.isArray(peaks) && (typeof peaks !== 'object' || peaks.x === undefined || peaks.y === undefined || !Array.isArray(peaks.x) || !Array.isArray(peaks.y) || peaks.x.length !== peaks.y.length)) {
      throw new TypeError('peaks must be an array or an object containing x[] and y[]');
    }
    if (Array.isArray(peaks)) {
      for (const peak of peaks) {
        this.addPeak(peak, options);
      }
    } else {
      for (let i = 0; i < peaks.x.length; i++) {
        this.addPeak([peaks.x[i], peaks.y[i]], options);
      }
    }
    return this;
  }
  /**
   * Add a single peak to the spectrum.
   * A peak may be either defined as [x,y,fwhm,...] or as {x, y, shape}
   * @param peak - The peak to add, defined as array or object.
   * @param options - Options for adding the peak.
   * @returns The generator instance.
   */
  addPeak(peak, options = {}) {
    if (Array.isArray(peak) && peak.length < 2) {
      throw new Error('peak must be an array with two (or three) values or an object with {x,y,width?}');
    }
    if (!Array.isArray(peak) && (peak.x === undefined || peak.y === undefined)) {
      throw new Error('peak must be an array with two (or three) values or an object with {x,y,width?}');
    }
    const {
      x0,
      intensity,
      shapeLeft,
      shapeRight,
      widthLeft,
      widthRight,
      factor
    } = this.resolvePeak(peak, options);
    if (intensity > this.maxPeakHeight) this.maxPeakHeight = intensity;
    const firstValue = x0 - widthLeft / 2 * factor;
    const lastValue = x0 + widthRight / 2 * factor;
    const firstPoint = Math.max(0, Math.floor((firstValue - this.from) / this.interval));
    const lastPoint = Math.min(this.nbPoints - 1, Math.ceil((lastValue - this.from) / this.interval));
    const middlePoint = Math.round((x0 - this.from) / this.interval);
    // PEAK SHAPE MAY BE ASYMMETRIC (widthLeft and widthRight) !
    // we calculate the left part of the shape
    for (let index = firstPoint; index < Math.max(middlePoint, 0); index++) {
      this.data.y[index] += intensity * shapeLeft.fct(this.data.x[index] - x0);
    }
    // we calculate the right part of the gaussian
    for (let index = Math.min(middlePoint, lastPoint); index <= lastPoint; index++) {
      this.data.y[index] += intensity * shapeRight.fct(this.data.x[index] - x0);
    }
    return this;
  }
  /**
   * Add a baseline to the spectrum.
   * @param baselineFct - Mathematical function producing the baseline you want.
   * @returns The generator instance.
   */
  addBaseline(baselineFct) {
    addBaseline(this.data, baselineFct);
    return this;
  }
  /**
   * Add noise to the spectrum.
   * @param options - Configuration for noise generation.
   * @returns The generator instance.
   */
  addNoise(options) {
    addNoise(this.data, options);
    return this;
  }
  /**
   * Get the generated spectrum.
   * @param options - Options for getting the spectrum.
   * @returns The generated spectrum data.
   */
  getSpectrum(options = {}) {
    if (typeof options === 'boolean') {
      options = {
        copy: options
      };
    }
    const {
      copy = true,
      threshold = 0
    } = options;
    if (threshold) {
      const minPeakHeight = this.maxPeakHeight * threshold;
      const x = [];
      const y = [];
      for (let i = 0; i < this.data.x.length; i++) {
        if (this.data.y[i] >= minPeakHeight) {
          x.push(this.data.x[i]);
          y.push(this.data.y[i]);
        }
      }
      return {
        x: Float64Array.from(x),
        y: Float64Array.from(y)
      };
    }
    if (copy) {
      return {
        x: this.data.x.slice(),
        y: this.data.y.slice()
      };
    } else {
      return this.data;
    }
  }
  /**
   * Resets the generator with an empty spectrum.
   * @returns The generator instance.
   */
  reset() {
    if (this.nbPoints === 1) {
      this.data.x[0] = (this.from + this.to) / 2;
    } else {
      for (let i = 0; i < this.nbPoints; i++) {
        this.data.x[i] = this.from + i * this.interval;
      }
    }
    return this;
  }
}

const axis2D = ['x', 'y'];
const peakCoordinates = ['x', 'y', 'z'];
/**
 * Converts a width value to full width at half maximum (FWHM).
 * @param shape - The 2D shape to use for conversion.
 * @param width - The width value to convert.
 * @returns The converted FWHM value as an XYNumber object.
 */
const convertWidthToFWHM = (shape, width) => {
  const widthData = ensureXYNumber(width);
  for (const key of axis2D) {
    widthData[key] = shape.widthToFWHM(widthData[key]);
  }
  return widthData;
};
class Spectrum2DGenerator {
  from;
  to;
  nbPoints;
  interval;
  data;
  maxPeakHeight;
  shape;
  peakWidthFct;
  constructor(options = {}) {
    const {
      peakWidthFct = () => 5,
      shape = {
        kind: 'gaussian'
      }
    } = options;
    let {
      from = 0,
      to = 100,
      nbPoints = 1001
    } = options;
    from = ensureXYNumber(from);
    to = ensureXYNumber(to);
    nbPoints = ensureXYNumber(nbPoints);
    for (const axis of axis2D) {
      assertNumber(from[axis], `from-${axis}`);
      assertNumber(to[axis], `to-${axis}`);
      assertInteger(nbPoints[axis], `nbPoints-${axis}`);
    }
    this.from = from;
    this.to = to;
    this.nbPoints = nbPoints;
    this.interval = calculeIntervals(from, to, nbPoints);
    this.peakWidthFct = peakWidthFct;
    this.maxPeakHeight = Number.MIN_SAFE_INTEGER;
    const shapeGenerator = getShape2D(shape);
    this.shape = shapeGenerator;
    this.data = {
      x: new Float64Array(nbPoints.x),
      y: new Float64Array(nbPoints.y),
      z: matrixCreateEmpty({
        nbRows: this.nbPoints.y,
        nbColumns: this.nbPoints.x
      })
    };
    for (const axis of axis2D) {
      if (this.to[axis] <= this.from[axis]) {
        throw new RangeError('to option must be larger than from');
      }
    }
    if (typeof this.peakWidthFct !== 'function') {
      throw new TypeError('peakWidthFct option must be a function');
    }
    this.reset();
  }
  /**
   * Adds multiple peaks to the 2D spectrum.
   * @param peaks - Array of peaks or peak series to add.
   * @param options - Options for adding peaks.
   * @returns The generator instance.
   */
  addPeaks(peaks, options) {
    if (!Array.isArray(peaks) && (typeof peaks !== 'object' || peaks.x === undefined || peaks.y === undefined || !Array.isArray(peaks.x) || !Array.isArray(peaks.y) || peaks.x.length !== peaks.y.length)) {
      throw new TypeError('peaks must be an array or an object containing x[] and y[]');
    }
    if (Array.isArray(peaks)) {
      for (const peak of peaks) {
        this.addPeak(peak, options);
      }
    } else {
      if (!Array.isArray(peaks.x) || !Array.isArray(peaks.y) || !Array.isArray(peaks.z)) {
        throw new TypeError('x, y, z must all be arrays');
      }
      const nbPeaks = peaks.x.length;
      if (peaks.y.length !== nbPeaks || peaks.z.length !== nbPeaks) {
        throw new Error('x, y, z should have the same length');
      }
      for (let i = 0; i < nbPeaks; i++) {
        this.addPeak([peaks.x[i], peaks.y[i], peaks.z[i]], options);
      }
    }
    return this;
  }
  /**
   * Adds a single peak to the 2D spectrum.
   * @param peak - Peak to add, can be array or object format.
   * @param options - Options for adding the peak.
   * @returns The generator instance.
   */
  addPeak(peak, options = {}) {
    if (Array.isArray(peak) && peak.length < 3) {
      throw new Error('peak must be an array with three (or four) values or an object with {x,y,z,width?}');
    }
    if (!Array.isArray(peak) && peakCoordinates.some(e => peak[e] === undefined)) {
      throw new Error('peak must be an array with three (or four) values or an object with {x,y,z,width?}');
    }
    let xPosition;
    let yPosition;
    let intensity;
    let peakFWHM;
    let peakWidth;
    let peakShapeOptions;
    if (Array.isArray(peak)) {
      [xPosition, yPosition, intensity, peakFWHM, peakShapeOptions] = peak;
    } else {
      xPosition = peak.x;
      yPosition = peak.y;
      intensity = peak.z;
      peakFWHM = peak.fwhm;
      peakWidth = peak.width;
      peakShapeOptions = peak.shape;
    }
    const position = {
      x: xPosition,
      y: yPosition
    };
    if (intensity > this.maxPeakHeight) this.maxPeakHeight = intensity;
    const {
      width
    } = options;
    let {
      shape: shapeOptions
    } = options;
    if (peakShapeOptions) {
      shapeOptions = shapeOptions ? {
        ...shapeOptions,
        ...peakShapeOptions
      } : peakShapeOptions;
    }
    const shape = shapeOptions ? getShape2D(shapeOptions) : Object.assign(Object.create(Object.getPrototypeOf(this.shape)), structuredClone(this.shape));
    let {
      fwhm = peakFWHM !== undefined ? peakFWHM : peakWidth ? convertWidthToFWHM(shape, peakWidth) : width ? convertWidthToFWHM(shape, width) : this.peakWidthFct(xPosition, yPosition)
    } = options;
    fwhm = ensureXYNumber(fwhm);
    let factor = options.factor === undefined ? shape.getFactor() : options.factor;
    factor = ensureXYNumber(factor);
    const firstPoint = {
      x: 0,
      y: 0
    };
    const lastPoint = {
      x: 0,
      y: 0
    };
    for (const axis of axis2D) {
      const first = position[axis] - fwhm[axis] / 2 * factor[axis];
      const last = position[axis] + fwhm[axis] / 2 * factor[axis];
      firstPoint[axis] = Math.max(0, Math.floor((first - this.from[axis]) / this.interval[axis]));
      lastPoint[axis] = Math.min(this.nbPoints[axis], Math.ceil((last - this.from[axis]) / this.interval[axis]));
    }
    shape.fwhm = fwhm;
    for (let xIndex = firstPoint.x; xIndex < lastPoint.x; xIndex++) {
      for (let yIndex = firstPoint.y; yIndex < lastPoint.y; yIndex++) {
        const value = intensity * shape.fct(this.data.x[xIndex] - position.x, this.data.y[yIndex] - position.y);
        if (Math.abs(value) > 1e-6) {
          this.data.z[yIndex][xIndex] += value;
        }
      }
    }
    return this;
  }
  /**
   * Gets the generated 2D spectrum data.
   * @param options - Options for getting the spectrum.
   * @returns The spectrum data object.
   */
  getSpectrum(options = {}) {
    if (typeof options === 'boolean') {
      options = {
        copy: options
      };
    }
    const {
      copy = true
    } = options;
    const minMaxZ = matrixMinMaxZ(this.data.z);
    return {
      minX: this.from.x,
      maxX: this.to.x,
      maxY: this.to.y,
      minY: this.from.y,
      minZ: minMaxZ.min,
      maxZ: minMaxZ.max,
      z: copy ? this.data.z.slice() : this.data.z
    };
  }
  /**
   * Resets the generator to initial state.
   * @returns The generator instance.
   */
  reset() {
    const spectrum = this.data;
    for (const axis of axis2D) {
      for (let i = 0; i < this.nbPoints[axis]; i++) {
        spectrum[axis][i] = this.from[axis] + i * this.interval[axis];
      }
    }
    for (const row of spectrum.z) {
      for (let j = 0; j < row.length; j++) {
        row[j] = 0;
      }
    }
    return this;
  }
}
/**
 * Generates a 2D spectrum with the given peaks.
 * @param peaks - Peaks to include in the spectrum.
 * @param options - Options for spectrum generation.
 * @returns The generated spectrum data.
 */
function generateSpectrum2D(peaks, options = {}) {
  const {
    generator: generatorOptions,
    peaks: addPeaksOptions
  } = options;
  const generator = new Spectrum2DGenerator(generatorOptions);
  generator.addPeaks(peaks, addPeaksOptions);
  return generator.getSpectrum();
}
/**
 * Ensures the input is an XYNumber object.
 * @param input - Number or XYNumber to process.
 * @returns An XYNumber object.
 */
function ensureXYNumber(input) {
  return typeof input !== 'object' ? {
    x: input,
    y: input
  } : {
    ...input
  };
}
/**
 * Calculates the intervals between points for both x and y axes.
 * @param from - Starting point coordinates.
 * @param to - Ending point coordinates.
 * @param nbPoints - Number of points in each dimension.
 * @returns The calculated intervals as an XYNumber object.
 */
function calculeIntervals(from, to, nbPoints) {
  return {
    x: (to.x - from.x) / (nbPoints.x - 1),
    y: (to.y - from.y) / (nbPoints.y - 1)
  };
}
/**
 * Validates if a value is an integer.
 * @param value - Number to validate.
 * @param name - Name of the parameter for error message.
 * @throws {TypeError} If value is not an integer.
 */
function assertInteger(value, name) {
  if (!Number.isInteger(value)) {
    throw new TypeError(`${name} option must be an integer`);
  }
}
/**
 * Validates if a value is a finite number.
 * @param value - Number to validate.
 * @param name - Name of the parameter for error message.
 * @throws {TypeError} If value is not a finite number.
 */
function assertNumber(value, name) {
  if (!Number.isFinite(value)) {
    throw new TypeError(`${name} option must be a number`);
  }
}

/**
 * Generates a spectrum and returns it.
 * @param peaks - List of peaks to put in the spectrum.
 * @param options - Configuration for spectrum generation.
 * @returns The generated spectrum data.
 */
function generateSpectrum(peaks, options = {}) {
  const {
    generator,
    ...rest
  } = options;
  return new SpectrumGenerator(generator).generateSpectrum(peaks, rest);
}

class SparseSpectrumGenerator extends BaseSpectrumGenerator {
  constructor(options = {}) {
    super(options);
  }
  /**
   * Generates a sparse spectrum containing only x values where at least one
   * peak contributes above the threshold. No dense array is allocated:
   * intervals are computed per peak first, then y is evaluated only for the
   * merged set of required x values.
   * @param peaks - List of peaks to include.
   * @param options - Options for sparse spectrum generation.
   * @returns Sparse spectrum data with x and y arrays covering only peak regions.
   */
  generateSparseSpectrum(peaks, options = {}) {
    if ('noise' in options) {
      throw new Error('noise is not supported for sparse spectrum generation');
    }
    const {
      baseline,
      peakOptions = {},
      threshold = 1e-7
    } = options;
    const peakArray = Array.isArray(peaks) ? peaks : Array.from(peaks.x, (x, i) => peaks.fwhm !== undefined ? [x, peaks.y[i], peaks.fwhm[i]] : [x, peaks.y[i]]);
    const resolvedPeaks = peakArray.map(peak => {
      const {
        x0,
        intensity,
        shapeLeft,
        shapeRight
      } = this.resolvePeak(peak, peakOptions);
      return {
        x0,
        intensity,
        shapeLeft,
        shapeRight,
        xFrom: x0 - computeHalfWidth(shapeLeft, threshold),
        xTo: x0 + computeHalfWidth(shapeRight, threshold)
      };
    }).filter(p => p.xFrom < this.to && p.xTo > this.from);
    if (resolvedPeaks.length === 0) {
      return {
        x: Float64Array.from([this.from, this.to]),
        y: baseline ? Float64Array.from([baseline(this.from), baseline(this.to)]) : new Float64Array(2)
      };
    }
    for (const peak of resolvedPeaks) {
      peak.xFrom = Math.max(this.from, peak.xFrom);
      peak.xTo = Math.min(this.to, peak.xTo);
    }
    resolvedPeaks.sort((a, b) => a.xFrom - b.xFrom);
    const mergedIntervals = [];
    for (const peak of resolvedPeaks) {
      const last = mergedIntervals.at(-1);
      if (last !== undefined && peak.xFrom <= last.xTo) {
        last.xTo = Math.max(last.xTo, peak.xTo);
        last.peaks.push(peak);
      } else {
        mergedIntervals.push({
          xFrom: peak.xFrom,
          xTo: peak.xTo,
          peaks: [peak]
        });
      }
    }
    const xResult = [this.from];
    const yResult = [0];
    // tracks the last grid index written to avoid duplicate guard points when
    // two intervals are only one step apart
    let lastWrittenIndex = 0;
    for (const interval of mergedIntervals) {
      const firstIndex = Math.max(0, Math.floor((interval.xFrom - this.from) / this.interval));
      const lastIndex = Math.min(this.nbPoints - 1, Math.ceil((interval.xTo - this.from) / this.interval));
      const guardBefore = firstIndex - 1;
      if (guardBefore >= 0 && guardBefore > lastWrittenIndex) {
        xResult.push(this.from + guardBefore * this.interval);
        yResult.push(0);
        lastWrittenIndex = guardBefore;
      }
      for (let i = firstIndex; i <= lastIndex; i++) {
        const x = this.from + i * this.interval;
        let y = 0;
        for (const peak of interval.peaks) {
          const shape = x < peak.x0 ? peak.shapeLeft : peak.shapeRight;
          y += peak.intensity * shape.fct(x - peak.x0);
        }
        xResult.push(x);
        yResult.push(y);
        lastWrittenIndex = i;
      }
      const guardAfter = lastIndex + 1;
      if (guardAfter < this.nbPoints) {
        xResult.push(this.from + guardAfter * this.interval);
        yResult.push(0);
        lastWrittenIndex = guardAfter;
      }
    }
    if (xResult[0] !== this.from) {
      xResult.unshift(this.from);
      yResult.unshift(0);
    }
    if (xResult[xResult.length - 1] !== this.to) {
      xResult.push(this.to);
      yResult.push(0);
    }
    if (baseline) {
      for (let i = 0; i < yResult.length; i++) {
        yResult[i] += baseline(xResult[i]);
      }
    }
    return {
      x: Float64Array.from(xResult),
      y: Float64Array.from(yResult)
    };
  }
}
/**
 * Finds the half-width d at which shape.fct(d) equals the given threshold via
 * binary search. Works for any monotonically decreasing shape function.
 */
function computeHalfWidth(shape, threshold) {
  if (threshold <= 0) return Infinity;
  if (shape.fct(0) <= threshold) return 0;
  let high = shape.fwhm;
  while (shape.fct(high) > threshold) {
    high *= 2;
  }
  let low = 0;
  for (let i = 0; i < 64; i++) {
    const mid = (low + high) / 2;
    if (shape.fct(mid) > threshold) {
      low = mid;
    } else {
      high = mid;
    }
  }
  return (low + high) / 2;
}

/**
 * Generates a sparse spectrum containing only x values where at least one peak
 * contributes above the threshold. Unlike `generateSpectrum`, no dense array
 * is allocated: intervals are computed per peak first, then y is evaluated only
 * for the merged set of required x values.
 * @param peaks - List of peaks to include.
 * @param options - Configuration for sparse spectrum generation.
 * @returns Sparse spectrum data with x and y arrays covering only peak regions.
 */
function generateSparseSpectrum(peaks, options = {}) {
  const {
    generator,
    ...rest
  } = options;
  return new SparseSpectrumGenerator(generator).generateSparseSpectrum(peaks, rest);
}

var lib = /*#__PURE__*/Object.freeze({
	__proto__: null,
	BaseSpectrumGenerator: BaseSpectrumGenerator,
	SparseSpectrumGenerator: SparseSpectrumGenerator,
	Spectrum2DGenerator: Spectrum2DGenerator,
	SpectrumGenerator: SpectrumGenerator,
	generateSparseSpectrum: generateSparseSpectrum,
	generateSpectrum: generateSpectrum,
	generateSpectrum2D: generateSpectrum2D
});

var require$$4 = /*@__PURE__*/getAugmentedNamespace(lib);

var Distribution$1 = {};

var closestPointX$1 = {};

Object.defineProperty(closestPointX$1, "__esModule", {
  value: true
});
closestPointX$1.closestPointX = closestPointX;
function closestPointX(array, target) {
  let low = 0;
  let high = array.length - 1;
  let middle = 0;
  while (high - low > 1) {
    middle = low + (high - low >> 1);
    if (array[middle].x < target) {
      low = middle;
    } else if (array[middle].x > target) {
      high = middle;
    } else {
      return array[middle];
    }
  }
  if (low < array.length - 1) {
    if (Math.abs(target - array[low].x) < Math.abs(array[low + 1].x - target)) {
      return array[low];
    } else {
      return array[low + 1];
    }
  } else {
    return array[low];
  }
}

var joinX$1 = {};

/**
 * Join x values if there are similar
 */
Object.defineProperty(joinX$1, "__esModule", {
  value: true
});
joinX$1.joinX = joinX;
function joinX(self, threshold = Number.EPSILON) {
  // when we join we will use the center of mass
  if (self.array.length === 0) return [];
  self.sortX();
  let current = self.array[0];
  let result = [current];
  for (let i = 1; i < self.array.length; i++) {
    const item = self.array[i];
    if (item.x - current.x <= threshold) {
      // weighted sum
      current.x = item.y / (current.y + item.y) * (item.x - current.x) + current.x;
      current.y += item.y;
    } else {
      current = {
        ...item
      };
      result.push(current);
    }
  }
  self.array = result;
  self.ySorted = false;
  return self;
}

var multiply$1 = {};

Object.defineProperty(multiply$1, "__esModule", {
  value: true
});
multiply$1.multiply = multiply;
function multiply(a, b, options = {}) {
  const {
    minY = 1e-8,
    maxLines = 5000,
    deltaX = 1e-2
  } = options;
  const result = new a.constructor();
  a.sortY();
  b.sortY();
  for (let entryA of a.array) {
    for (let entryB of b.array) {
      let y = entryA.y * entryB.y;
      if (y > minY) {
        const composition = calculateComposition(entryA, entryB);
        if (composition) {
          result.push({
            x: entryA.x + entryB.x,
            y,
            composition
          });
        } else {
          result.push({
            x: entryA.x + entryB.x,
            y
          });
        }
      }
      if (result.length > maxLines * 2) {
        result.joinX(deltaX);
        result.topY(maxLines);
      }
    }
  }
  result.joinX(deltaX);
  result.topY(maxLines);
  a.move(result);
  return a;
}
function calculateComposition(entryA, entryB) {
  if (!entryA.composition || !entryB.composition) return;
  let toReturn = {};
  const keys = [...new Set(Object.keys(entryA.composition).concat(Object.keys(entryB.composition)))];
  for (let key of keys) {
    toReturn[key] = (entryA.composition[key] || 0) + (entryB.composition[key] || 0);
  }
  return toReturn;
}

var power$1 = {};

// https://en.wikipedia.org/wiki/Exponentiation_by_squaring
Object.defineProperty(power$1, "__esModule", {
  value: true
});
power$1.power = power;
function power(array, p, options = {}) {
  if (p <= 0) throw new Error('power must be larger than 0');
  if (p === 1) return array;
  if (p === 2) {
    return array.square();
  }
  p--;
  let base = array.copy(); // linear time
  while (p !== 0) {
    if ((p & 1) !== 0) {
      array.multiply(base, options); // executed <= log2(p) times
    }
    p >>= 1;
    if (p !== 0) base.square(options); // executed <= log2(p) times
  }
  return array;
}

Object.defineProperty(Distribution$1, "__esModule", {
  value: true
});
Distribution$1.Distribution = void 0;
const closestPointX_js_1 = closestPointX$1;
const joinX_js_1 = joinX$1;
const multiply_js_1 = multiply$1;
const power_js_1 = power$1;
/**
 * Internal class to deal with isotopic distribution calculations
 */
class Distribution {
  constructor(array = []) {
    this.array = array;
    this.cache = getEmptyCache();
  }
  emptyCache() {
    if (this.cache.isEmpty) return;
    this.cache = getEmptyCache();
  }
  get length() {
    return this.array.length;
  }
  get xs() {
    return this.array.map(p => p.x);
  }
  get ys() {
    return this.array.map(p => p.y);
  }
  get sumY() {
    if (!Number.isNaN(this.cache.sumY)) return this.cache.sumY;
    let sumY = 0;
    for (let item of this.array) {
      sumY += item.y;
    }
    this.cache.sumY = sumY;
    this.cache.isEmpty = false;
    return sumY;
  }
  get minX() {
    if (!Number.isNaN(this.cache.minX)) return this.cache.minX;
    let minX = Number.POSITIVE_INFINITY;
    for (let item of this.array) {
      if (item.x < minX) {
        minX = item.x;
      }
    }
    this.cache.minX = minX;
    this.cache.isEmpty = false;
    return minX;
  }
  get maxX() {
    if (!Number.isNaN(this.cache.maxX)) return this.cache.maxX;
    let maxX = Number.NEGATIVE_INFINITY;
    for (let item of this.array) {
      if (item.x > maxX) {
        maxX = item.x;
      }
    }
    this.cache.maxX = maxX;
    this.cache.isEmpty = false;
    return maxX;
  }
  get minY() {
    if (!Number.isNaN(this.cache.minY)) return this.cache.minY;
    let minY = Number.POSITIVE_INFINITY;
    for (let item of this.array) {
      if (item.y < minY) {
        minY = item.y;
      }
    }
    this.cache.minY = minY;
    this.cache.isEmpty = false;
    return minY;
  }
  get maxY() {
    if (!Number.isNaN(this.cache.maxY)) return this.cache.maxY;
    let maxY = Number.NEGATIVE_INFINITY;
    for (let item of this.array) {
      if (item.y > maxY) {
        maxY = item.y;
      }
    }
    this.cache.maxY = maxY;
    this.cache.isEmpty = false;
    return maxY;
  }
  multiplyY(value) {
    for (const item of this.array) {
      item.y *= value;
    }
  }
  setArray(array) {
    this.array = array;
    this.emptyCache();
  }
  move(other) {
    this.array = other.array;
    this.emptyCache();
  }
  push(...points) {
    this.array.push(...points);
    this.emptyCache();
  }
  /**
   * Sort by ASCENDING x values
   * @returns {Distribution}
   */
  sortX() {
    this.cache.ySorted = false;
    if (this.cache.xSorted) return this;
    this.array.sort((a, b) => a.x - b.x);
    this.cache.xSorted = true;
    this.cache.isEmpty = false;
    return this;
  }
  /**
   * Sort by DESCENDING y values
   * @returns {Distribution}
   */
  sortY() {
    this.cache.xSorted = false;
    if (this.cache.ySorted) return this;
    this.array.sort((a, b) => b.y - a.y);
    this.cache.ySorted = true;
    this.cache.isEmpty = false;
    return this;
  }
  normalize() {
    const sum = this.sumY;
    for (let item of this.array) {
      item.y /= sum;
    }
    return this;
  }
  /**
   * Only keep a defined number of peaks
   * @param {number} limit
   * @returns
   */
  topY(limit) {
    if (!limit) return this;
    if (this.array.length <= limit) return this;
    this.sortY();
    this.array.splice(limit);
    return this;
  }
  /**
   * remove all the peaks under a defined relative threshold
   * @param {number} [relativeValue=0] Should be between 0 and 1. 0 means no peak will be removed, 1 means all peaks will be removed
   */
  threshold(relativeValue = 0) {
    if (!relativeValue) return this;
    const maxY = this.maxY;
    const threshold = maxY * relativeValue;
    this.array = this.array.filter(point => point.y >= threshold);
  }
  square(options = {}) {
    return this.multiply(this, options);
  }
  multiply(b, options) {
    return (0, multiply_js_1.multiply)(this, b, options);
  }
  power(p, options) {
    return (0, power_js_1.power)(this, p, options);
  }
  copy() {
    let distCopy = new Distribution();
    distCopy.cache = {
      ...this.cache
    };
    distCopy.array = structuredClone(this.array);
    return distCopy;
  }
  maxToOne() {
    if (this.array.length === 0) return this;
    let currentMax = this.maxY;
    for (let item of this.array) {
      item.y /= currentMax;
    }
    return this;
  }
  joinX(threshold) {
    return (0, joinX_js_1.joinX)(this, threshold);
  }
  append(distribution) {
    for (let item of distribution.array) {
      this.array.push(item);
    }
    this.emptyCache();
  }
  closestPointX(target) {
    this.sortX();
    return (0, closestPointX_js_1.closestPointX)(this.array, target);
  }
}
Distribution$1.Distribution = Distribution;
function getEmptyCache() {
  return {
    isEmpty: true,
    xSorted: false,
    ySorted: false,
    minX: Number.NaN,
    maxX: Number.NaN,
    minY: Number.NaN,
    maxY: Number.NaN,
    sumY: Number.NaN
  };
}

var getDerivedCompositionInfo$1 = {};

Object.defineProperty(getDerivedCompositionInfo$1, "__esModule", {
  value: true
});
getDerivedCompositionInfo$1.getDerivedCompositionInfo = getDerivedCompositionInfo;
const chemical_elements_1$2 = src$j;
const mf_parser_1$4 = src$h;
/**
 * Calcultes informations about the isotopic composition explaining a specific mass
 * @param {Record<string, number>} composition
 * @returns
 */
function getDerivedCompositionInfo(composition) {
  const shortComposition = {};
  let label = '';
  let shortLabel = '';
  let deltaNeutrons = 0;
  for (let key in composition) {
    let isotopeLabel = '';
    for (let i = 0; i < key.length; i++) {
      if (mf_parser_1$4.superscript[key[i]]) {
        isotopeLabel += mf_parser_1$4.superscript[key[i]];
      } else {
        isotopeLabel += key[i];
      }
    }
    if (composition[key] > 1) {
      const number = String(composition[key]);
      for (let i = 0; i < number.length; i++) {
        isotopeLabel += mf_parser_1$4.subscript[number[i]];
      }
    }
    label += isotopeLabel;
    const isotope = chemical_elements_1$2.stableIsotopesObject[key];
    deltaNeutrons += isotope.deltaNeutrons * composition[key];
    if (isotope.mostAbundant) continue;
    shortLabel += isotopeLabel;
    shortComposition[key] = composition[key];
  }
  return {
    label,
    shortComposition,
    shortLabel,
    deltaNeutrons
  };
}

Object.defineProperty(IsotopicDistribution$1, "__esModule", {
  value: true
});
IsotopicDistribution$1.IsotopicDistribution = void 0;
const chemical_elements_1$1 = src$j;
const mf_parser_1$3 = src$h;
const mf_utilities_1$2 = src$i;
const ml_spectra_processing_1$3 = require$$0$7;
const spectrum_generator_1 = require$$4;
const Distribution_1 = Distribution$1;
const getDerivedCompositionInfo_1 = getDerivedCompositionInfo$1;
const MINIMAL_FWHM = 1e-8;
const MINIMAL_Y = 1e-8;
/** @typedef {import('mf-parser').IsotopesInfo} IsotopesInfo */
/** @typedef {import('mf-parser').MFInfo} MFInfo */
/** @typedef {import('./IsotopicDistribution.types').XY} XY */
/** @typedef {import('./IsotopicDistribution.types').IsotopicDistributionPart} IsotopicDistributionPart */
/** @typedef {import('./IsotopicDistribution.types').IsotopicDistributionOptions} IsotopicDistributionOptions */
/**
 * A class that allows to manage isotopic distribution
 */
class IsotopicDistribution {
  /**
   * Class that manages isotopic distribution
   * @param {string|Array<any>} value - Molecular formula or an array of parts.
   * @param {IsotopicDistributionOptions} [options]
   */
  constructor(value, options = {}) {
    this.threshold = options.threshold;
    this.limit = options.limit;
    if (Array.isArray(value)) {
      this.parts = structuredClone(value);
      for (let part of this.parts) {
        part.confidence = 0;
        part.isotopesInfo = new mf_parser_1$3.MF(part.ionization?.mf ? `${part.mf}(${part.ionization.mf})` : part.mf || '').getIsotopesInfo();
      }
    } else {
      let mf = new mf_parser_1$3.MF(value, {
        ensureCase: options.ensureCase
      });
      let mfInfo = mf.getInfo();
      const ionizations = (0, mf_utilities_1$2.preprocessIonizations)(options.ionizations);
      /** @type {MFInfo} */
      const parts = 'parts' in mfInfo ? mfInfo.parts : [mfInfo];
      this.parts = [];
      for (let partOriginal of parts) {
        // we calculate information for each part
        for (const ionization of ionizations) {
          let part = structuredClone(partOriginal);
          part.em = part.monoisotopicMass; // TODO: To remove !!! we change the name !?
          part.isotopesInfo = new mf_parser_1$3.MF(ionization.mf ? `${part.mf}(${ionization.mf})` : part.mf || '').getIsotopesInfo();
          part.confidence = 0;
          let msInfo = (0, mf_utilities_1$2.getMsInfo)(part, {
            ionization
          });
          part.ionization = msInfo.ionization;
          part.ms = msInfo.ms;
          this.parts.push(part);
        }
      }
    }
    this.cachedDistribution = undefined;
    this.fwhm = options.fwhm === undefined ? 0.01 : options.fwhm;
    // if fwhm is under 1e-8 there are some artifacts in the spectra
    if (this.fwhm < MINIMAL_FWHM) this.fwhm = MINIMAL_FWHM;
    this.minY = options.minY === undefined ? MINIMAL_Y : options.minY;
    this.maxLines = options.maxLines || 5000;
    this.allowNeutral = options.allowNeutral === undefined ? true : options.allowNeutral;
  }
  /**
   * @returns {Array<IsotopicDistributionPart>}
   */
  getParts() {
    return this.parts;
  }
  /**
   * @return {Distribution} returns the total distribution (for all parts)
   */
  getDistribution() {
    if (this.cachedDistribution) return this.cachedDistribution;
    let options = {
      maxLines: this.maxLines,
      minY: this.minY,
      deltaX: this.fwhm
    };
    let finalDistribution = new Distribution_1.Distribution();
    this.confidence = 0;
    // TODO need to cache each part without ionization
    // in case of many ionization we don't need to recalculate everything !
    for (let part of this.parts) {
      let totalDistribution = new Distribution_1.Distribution([{
        x: 0,
        y: 1,
        composition: this.fwhm === MINIMAL_FWHM ? {} : undefined // should we calculate composition in isotopes of each peak
      }]);
      let partNaturalDeltaNeutrons = 0;
      for (let isotope of part.isotopesInfo.isotopes) {
        partNaturalDeltaNeutrons += (isotope.naturalDeltaNeutrons ?? 0) * isotope.number;
      }
      let charge = part.ms?.charge || part.isotopesInfo.charge || 0;
      let absoluteCharge = Math.abs(charge);
      if (charge || this.allowNeutral) {
        for (let isotope of part.isotopesInfo.isotopes) {
          if (isotope.number < 0) return {
            array: []
          };
          if (isotope.number > 0) {
            const newDistribution = structuredClone(isotope.distribution);
            if (this.fwhm === MINIMAL_FWHM) {
              // add composition
              for (const entry of newDistribution) {
                entry.composition = {
                  [Math.round(entry.x) + isotope.atom]: 1
                };
              }
            }
            let distribution = new Distribution_1.Distribution(newDistribution);
            distribution.power(isotope.number, options);
            totalDistribution.multiply(distribution, options);
          }
        }
        this.confidence = 0;
        for (const item of totalDistribution.array) {
          this.confidence += item.y;
        }
        // we finally deal with the charge
        if (charge) {
          for (const e of totalDistribution.array) {
            e.x = (e.x - chemical_elements_1$1.ELECTRON_MASS * charge) / absoluteCharge;
          }
        }
        if (totalDistribution.array && totalDistribution.array.length > 0) {
          totalDistribution.sortX();
          part.fromX = totalDistribution.array[0].x;
          part.toX = totalDistribution.array.at(-1).x;
        }
        if (part.ms?.similarity?.factor) {
          totalDistribution.multiplyY(part.ms.similarity.factor);
        } else if (part.ms?.target?.intensity && part.ms?.target?.intensity !== 1) {
          // intensity is the value of the monoisotopic mass !
          // need to find the intensity of the peak corresponding
          // to the monoisotopic mass
          if (part.ms.target.mass) {
            let target = totalDistribution.closestPointX(part.ms.target.mass);
            totalDistribution.multiplyY(part.ms.target.intensity / target.y);
          } else {
            totalDistribution.multiplyY(part.ms.target.intensity);
          }
        } else if (part?.intensity && part?.intensity !== 1) {
          totalDistribution.multiplyY(part.intensity);
        }
        part.isotopicDistribution = totalDistribution.array;
        for (let entry of totalDistribution.array) {
          if (!entry.composition) continue;
          const info = (0, getDerivedCompositionInfo_1.getDerivedCompositionInfo)(entry.composition);
          info.deltaNeutrons -= partNaturalDeltaNeutrons;
          Object.assign(entry, info);
        }
        if (finalDistribution.array.length === 0) {
          finalDistribution = totalDistribution;
        } else {
          finalDistribution.append(totalDistribution);
        }
      }
    }
    if (finalDistribution) finalDistribution.joinX(this.fwhm);
    // if there is a threshold we will deal with it
    // and we will correct the confidence
    if (this.threshold || this.limit) {
      const sumBefore = finalDistribution.sumY;
      if (this.threshold) finalDistribution.threshold(this.threshold);
      if (this.limit) {
        finalDistribution.topY(this.limit);
        finalDistribution.sortX();
      }
      const sumAfter = finalDistribution.sumY;
      this.confidence = this.confidence * sumAfter / sumBefore;
    }
    this.confidence /= this.parts.length;
    this.cachedDistribution = finalDistribution;
    return finalDistribution;
  }
  /**
   *
   * @param {object} options
   * @param {string} [options.delimiter=', ']
   * @param {number} [options.numberXDecimals=4]
   * @param {number} [options.numberYDecimals=4]
   * @returns
   */
  getCSV(options) {
    return this.getText({
      ...options,
      delimiter: ', '
    });
  }
  /**
   *
   * @param {object} options
   * @param {string} [options.delimiter='\t']
   * @param {number} [options.numberXDecimals=4]
   * @param {number} [options.numberYDecimals=4]
   * @returns
   */
  getTSV(options) {
    return this.getText({
      ...options,
      delimiter: '\t'
    });
  }
  getTable(options = {}) {
    const {
      maxValue,
      xLabel = 'x',
      yLabel = 'y'
    } = options;
    let points = this.getDistribution().array;
    if (points.length === 0) return [];
    let factor = 1;
    if (maxValue) {
      let maxY = this.getMaxY(points);
      factor = maxValue / maxY;
    }
    return points.map(point => {
      let newPoint = {
        [xLabel]: point.x,
        [yLabel]: point.y * factor
      };
      return newPoint;
    });
  }
  /**
   *
   * @param {object} options
   * @param {string} [options.delimiter='\t']
   * @param {number} [options.numberXDecimals=4]
   * @param {number} [options.numberYDecimals=4]
   * @returns
   */
  getText(options = {}) {
    const {
      delimiter = '\t',
      numberXDecimals = 5,
      numberYDecimals = 3
    } = options;
    let points = this.getDistribution().array;
    let csv = [];
    for (let point of points) {
      csv.push(`${point.x.toFixed(numberXDecimals)}${delimiter}${(point.y * 100).toFixed(numberYDecimals)}`);
    }
    return csv.join('\n');
  }
  getMaxY(points) {
    let maxY = points[0].y;
    for (let point of points) {
      if (point.y > maxY) maxY = point.y;
    }
    return maxY;
  }
  getSumY(points) {
    let sumY = 0;
    for (let point of points) {
      sumY += point.y;
    }
    return sumY;
  }
  /**
   * Returns the isotopic distribution as an array of peaks
   * @param {object} [options={}]
   * @param {number} [options.maxValue=100]
   * @param {number} [options.sumValue] // if sumValue is defined, maxValue is ignored
   * @return {Array<{x:number,y:number}|{x:number,y:number,label:string,shortComposition:string,shortLabel:string,deltaNeutrons:number}>}
   */
  getPeaks(options = {}) {
    const {
      maxValue = 100,
      sumValue
    } = options;
    let peaks = this.getDistribution().array;
    if (peaks.length === 0) return [];
    let factor = 1;
    if (sumValue) {
      let sumY = this.getSumY(peaks);
      factor = sumY / sumValue;
      if (factor !== 1) {
        peaks = structuredClone(peaks);
        for (const peak of peaks) {
          peak.y = peak.y / factor;
        }
      }
    } else if (maxValue) {
      let maxY = this.getMaxY(peaks);
      if (maxValue !== maxY) {
        // we need to copy the array because we prefer no side effects
        peaks = structuredClone(peaks);
        for (const peak of peaks) {
          // we rescale the Y values by first dividing by maxY and then multiplying by maxValue in order to avoid approximation errors
          peak.y = peak.y / maxY * maxValue;
        }
      }
    }
    return peaks;
  }
  /**
   * Returns the isotopic distirubtion
   * @param {object} [options={}]
   * @param {number} [options.maxValue=100]
   * @param {number} [options.sumValue] // if sumValue is defined, maxValue is ignored
   * @return {{x:number[],y:number[]}|{x:number[],y:number[],label:string[],shortComposition:string[],shortLabel:string[],deltaNeutrons:[]}}
   */
  getXY(options = {}) {
    let peaks = this.getPeaks(options);
    if (peaks.length === 0) {
      return {
        x: [],
        y: []
      };
    }
    const result = {
      x: peaks.map(a => a.x),
      y: peaks.map(a => a.y)
    };
    for (let key of Object.keys(peaks[0]).filter(k => k !== 'x' && k !== 'y')) {
      result[key] = peaks.map(a => a[key]);
    }
    return result;
  }
  /**
   * Returns the isotopic distirubtion
   * @param {object} [options={}]
   * @param {number} [options.maxValue=100]
   * @param {number} [options.sumValue] // if sumValue is defined, maxValue is ignored
   * @return {import('cheminfo-types').MeasurementXYVariables} an object containing at least the 2 properties: x:[] and y:[]
   */
  getVariables(options = {}) {
    const xy = this.getXY(options);
    return {
      x: {
        data: xy.x,
        label: 'm/z',
        units: 'u'
      },
      y: {
        data: xy.y,
        label: 'Relative intensity',
        units: '%'
      }
    };
  }
  /**
   * Returns the isotopic distribution as the sum of gaussian
   * @param {object} [options={}]
   * @param {number} [options.gaussianWidth=10] // how good should look the gaussian ? By default we take 10 times the fwhm as number of points
   * @param {number} [options.threshold=0.00001] // minimal height to return point
   * @param {number} [options.maxLength=1e6] // maximal number of points; ignored when sparse is true
   * @param {number} [options.maxValue] // rescale Y to reach maxValue
   * @param {number} [options.from] // minimal x value, default to the first point - 2
   * @param {number} [options.to] // maximal x value, default to the last point + 2
   * @param {function} [options.peakWidthFct=(mz)=>(this.fwhm)]
   * @param {boolean} [options.sparse=false] // use SparseSpectrumGenerator; only generates points in peak regions, avoids maxLength limit
   * @return {XY} isotopic distribution as an object containing 2 properties: x:[] and y:[]
   */
  getGaussian(options = {}) {
    const {
      peakWidthFct = () => this.fwhm,
      threshold = 0.00001,
      gaussianWidth = 10,
      maxValue,
      maxLength = 1e6,
      sparse = false
    } = options;
    let peaks = this.getTable({
      maxValue
    });
    if (peaks.length === 0) return {
      x: [],
      y: []
    };
    const from = options.from || peaks[0].x - 2;
    const to = options.to || peaks.at(-1).x + 2;
    let spectrum;
    const nbPoints = Math.round((to - from) * gaussianWidth / this.fwhm + 1);
    const generatorOptions = {
      from,
      to,
      peakWidthFct,
      nbPoints
    };
    if (sparse) {
      const generator = new spectrum_generator_1.SparseSpectrumGenerator(generatorOptions);
      spectrum = generator.generateSparseSpectrum(peaks, {
        threshold
      });
    } else {
      if (nbPoints > maxLength) {
        throw new Error(`Number of points is over the maxLength: ${nbPoints}>${maxLength}`);
      }
      const generator = new spectrum_generator_1.SpectrumGenerator(generatorOptions);
      spectrum = generator.generateSpectrum(peaks, {
        threshold
      });
    }
    //TODO not clear why maxValue it can not be directly provided as a parameter in the generateSpectrum function but some tests would fail
    if (maxValue) {
      spectrum.y = (0, ml_spectra_processing_1$3.xNormed)(spectrum.y, {
        algorithm: 'max',
        value: maxValue,
        output: spectrum.y
      });
    }
    return spectrum;
  }
}
IsotopicDistribution$1.IsotopicDistribution = IsotopicDistribution;

(function (exports) {

  var __createBinding = src$6 && src$6.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$6 && src$6.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(IsotopicDistribution$1, exports);
})(src$6);

function calculateOverlapFromDiff(diffs) {
  if (diffs[1].length === 0) return 0;
  let sumPos = 0;
  for (let i = 0; i < diffs[1].length; i++) {
    sumPos += Math.abs(diffs[1][i]);
  }
  return 1 - sumPos;
}

/**
 * This code requires the use of an array like  [[x1,y1],[x2,y2], ...]
 * If it is not the right format, we will just convert it
 * Otherwise we return the correct format
 * @param {Peaks} peaks
 * @returns [number[], number[]]
 */
function checkPeaks(peaks) {
  // if it is already a 2D array of points, we just return them
  if (Array.isArray(peaks) && Array.isArray(peaks[0]) && peaks.length === 2) {
    return peaks;
  }
  if (Array.isArray(peaks.x) && Array.isArray(peaks.y)) {
    return [peaks.x, peaks.y];
  }
  const x = new Array(peaks.length);
  const y = new Array(peaks.length);
  for (let i = 0; i < peaks.length; i++) {
    x[i] = peaks[i][0];
    y[i] = peaks[i][1];
  }
  return [x, y];
}

function extract(array, from, to) {
  const newArray = [[], []];
  let j = 0;
  const length = array[0] ? array[0].length : 0;
  for (let i = 0; i < length; i++) {
    if ((!from || array[0][i] >= from) && (!to || array[0][i] <= to)) {
      newArray[0][j] = array[0][i];
      newArray[1][j] = array[1][i];
      j++;
    }
  }
  return newArray;
}

// returns an new array based on array1 where there is a peak of array2 at a distance under width/2
function getCommonArray(array1, array2, width) {
  const newArray = [[], []];
  let pos2 = 0;
  width /= 2;
  let j = 0;
  const array1Length = array1[0] ? array1[0].length : 0;
  const array2Length = array2[0] ? array2[0].length : 0;
  for (let i = 0; i < array1Length; i++) {
    while (pos2 < array2Length && array1[0][i] > array2[0][pos2] + width) {
      pos2++;
    }
    if (pos2 < array2Length && array1[0][i] > array2[0][pos2] - width) {
      newArray[0][j] = array1[0][i];
      newArray[1][j] = array1[1][i];
      j++;
    }
  }
  return newArray;
}

var array$2 = {};

(function (exports) {

  function compareNumbers(a, b) {
    return a - b;
  }

  /**
   * Computes the sum of the given values
   * @param {Array} values
   * @returns {number}
   */
  exports.sum = function sum(values) {
    var sum = 0;
    for (var i = 0; i < values.length; i++) {
      sum += values[i];
    }
    return sum;
  };

  /**
   * Computes the maximum of the given values
   * @param {Array} values
   * @returns {number}
   */
  exports.max = function max(values) {
    var max = values[0];
    var l = values.length;
    for (var i = 1; i < l; i++) {
      if (values[i] > max) max = values[i];
    }
    return max;
  };

  /**
   * Computes the minimum of the given values
   * @param {Array} values
   * @returns {number}
   */
  exports.min = function min(values) {
    var min = values[0];
    var l = values.length;
    for (var i = 1; i < l; i++) {
      if (values[i] < min) min = values[i];
    }
    return min;
  };

  /**
   * Computes the min and max of the given values
   * @param {Array} values
   * @returns {{min: number, max: number}}
   */
  exports.minMax = function minMax(values) {
    var min = values[0];
    var max = values[0];
    var l = values.length;
    for (var i = 1; i < l; i++) {
      if (values[i] < min) min = values[i];
      if (values[i] > max) max = values[i];
    }
    return {
      min: min,
      max: max
    };
  };

  /**
   * Computes the arithmetic mean of the given values
   * @param {Array} values
   * @returns {number}
   */
  exports.arithmeticMean = function arithmeticMean(values) {
    var sum = 0;
    var l = values.length;
    for (var i = 0; i < l; i++) {
      sum += values[i];
    }
    return sum / l;
  };

  /**
   * {@link arithmeticMean}
   */
  exports.mean = exports.arithmeticMean;

  /**
   * Computes the geometric mean of the given values
   * @param {Array} values
   * @returns {number}
   */
  exports.geometricMean = function geometricMean(values) {
    var mul = 1;
    var l = values.length;
    for (var i = 0; i < l; i++) {
      mul *= values[i];
    }
    return Math.pow(mul, 1 / l);
  };

  /**
   * Computes the mean of the log of the given values
   * If the return value is exponentiated, it gives the same result as the
   * geometric mean.
   * @param {Array} values
   * @returns {number}
   */
  exports.logMean = function logMean(values) {
    var lnsum = 0;
    var l = values.length;
    for (var i = 0; i < l; i++) {
      lnsum += Math.log(values[i]);
    }
    return lnsum / l;
  };

  /**
   * Computes the weighted grand mean for a list of means and sample sizes
   * @param {Array} means - Mean values for each set of samples
   * @param {Array} samples - Number of original values for each set of samples
   * @returns {number}
   */
  exports.grandMean = function grandMean(means, samples) {
    var sum = 0;
    var n = 0;
    var l = means.length;
    for (var i = 0; i < l; i++) {
      sum += samples[i] * means[i];
      n += samples[i];
    }
    return sum / n;
  };

  /**
   * Computes the truncated mean of the given values using a given percentage
   * @param {Array} values
   * @param {number} percent - The percentage of values to keep (range: [0,1])
   * @param {boolean} [alreadySorted=false]
   * @returns {number}
   */
  exports.truncatedMean = function truncatedMean(values, percent, alreadySorted) {
    if (alreadySorted === undefined) alreadySorted = false;
    if (!alreadySorted) {
      values = [].concat(values).sort(compareNumbers);
    }
    var l = values.length;
    var k = Math.floor(l * percent);
    var sum = 0;
    for (var i = k; i < l - k; i++) {
      sum += values[i];
    }
    return sum / (l - 2 * k);
  };

  /**
   * Computes the harmonic mean of the given values
   * @param {Array} values
   * @returns {number}
   */
  exports.harmonicMean = function harmonicMean(values) {
    var sum = 0;
    var l = values.length;
    for (var i = 0; i < l; i++) {
      if (values[i] === 0) {
        throw new RangeError('value at index ' + i + 'is zero');
      }
      sum += 1 / values[i];
    }
    return l / sum;
  };

  /**
   * Computes the contraharmonic mean of the given values
   * @param {Array} values
   * @returns {number}
   */
  exports.contraHarmonicMean = function contraHarmonicMean(values) {
    var r1 = 0;
    var r2 = 0;
    var l = values.length;
    for (var i = 0; i < l; i++) {
      r1 += values[i] * values[i];
      r2 += values[i];
    }
    if (r2 < 0) {
      throw new RangeError('sum of values is negative');
    }
    return r1 / r2;
  };

  /**
   * Computes the median of the given values
   * @param {Array} values
   * @param {boolean} [alreadySorted=false]
   * @returns {number}
   */
  exports.median = function median(values, alreadySorted) {
    if (alreadySorted === undefined) alreadySorted = false;
    if (!alreadySorted) {
      values = [].concat(values).sort(compareNumbers);
    }
    var l = values.length;
    var half = Math.floor(l / 2);
    if (l % 2 === 0) {
      return (values[half - 1] + values[half]) * 0.5;
    } else {
      return values[half];
    }
  };

  /**
   * Computes the variance of the given values
   * @param {Array} values
   * @param {boolean} [unbiased=true] - if true, divide by (n-1); if false, divide by n.
   * @returns {number}
   */
  exports.variance = function variance(values, unbiased) {
    if (unbiased === undefined) unbiased = true;
    var theMean = exports.mean(values);
    var theVariance = 0;
    var l = values.length;
    for (var i = 0; i < l; i++) {
      var x = values[i] - theMean;
      theVariance += x * x;
    }
    if (unbiased) {
      return theVariance / (l - 1);
    } else {
      return theVariance / l;
    }
  };

  /**
   * Computes the standard deviation of the given values
   * @param {Array} values
   * @param {boolean} [unbiased=true] - if true, divide by (n-1); if false, divide by n.
   * @returns {number}
   */
  exports.standardDeviation = function standardDeviation(values, unbiased) {
    return Math.sqrt(exports.variance(values, unbiased));
  };
  exports.standardError = function standardError(values) {
    return exports.standardDeviation(values) / Math.sqrt(values.length);
  };

  /**
   * IEEE Transactions on biomedical engineering, vol. 52, no. 1, january 2005, p. 76-
   * Calculate the standard deviation via the Median of the absolute deviation
   *  The formula for the standard deviation only holds for Gaussian random variables.
   * @returns {{mean: number, stdev: number}}
   */
  exports.robustMeanAndStdev = function robustMeanAndStdev(y) {
    var mean = 0,
      stdev = 0;
    var length = y.length,
      i = 0;
    for (i = 0; i < length; i++) {
      mean += y[i];
    }
    mean /= length;
    var averageDeviations = new Array(length);
    for (i = 0; i < length; i++) averageDeviations[i] = Math.abs(y[i] - mean);
    averageDeviations.sort(compareNumbers);
    if (length % 2 === 1) {
      stdev = averageDeviations[(length - 1) / 2] / 0.6745;
    } else {
      stdev = 0.5 * (averageDeviations[length / 2] + averageDeviations[length / 2 - 1]) / 0.6745;
    }
    return {
      mean: mean,
      stdev: stdev
    };
  };
  exports.quartiles = function quartiles(values, alreadySorted) {
    if (typeof alreadySorted === 'undefined') alreadySorted = false;
    if (!alreadySorted) {
      values = [].concat(values).sort(compareNumbers);
    }
    var quart = values.length / 4;
    var q1 = values[Math.ceil(quart) - 1];
    var q2 = exports.median(values, true);
    var q3 = values[Math.ceil(quart * 3) - 1];
    return {
      q1: q1,
      q2: q2,
      q3: q3
    };
  };
  exports.pooledStandardDeviation = function pooledStandardDeviation(samples, unbiased) {
    return Math.sqrt(exports.pooledVariance(samples, unbiased));
  };
  exports.pooledVariance = function pooledVariance(samples, unbiased) {
    if (typeof unbiased === 'undefined') unbiased = true;
    var sum = 0;
    var length = 0,
      l = samples.length;
    for (var i = 0; i < l; i++) {
      var values = samples[i];
      var vari = exports.variance(values);
      sum += (values.length - 1) * vari;
      if (unbiased) length += values.length - 1;else length += values.length;
    }
    return sum / length;
  };
  exports.mode = function mode(values) {
    var l = values.length,
      itemCount = new Array(l),
      i;
    for (i = 0; i < l; i++) {
      itemCount[i] = 0;
    }
    var itemArray = new Array(l);
    var count = 0;
    for (i = 0; i < l; i++) {
      var index = itemArray.indexOf(values[i]);
      if (index >= 0) itemCount[index]++;else {
        itemArray[count] = values[i];
        itemCount[count] = 1;
        count++;
      }
    }
    var maxValue = 0,
      maxIndex = 0;
    for (i = 0; i < count; i++) {
      if (itemCount[i] > maxValue) {
        maxValue = itemCount[i];
        maxIndex = i;
      }
    }
    return itemArray[maxIndex];
  };
  exports.covariance = function covariance(vector1, vector2, unbiased) {
    if (typeof unbiased === 'undefined') unbiased = true;
    var mean1 = exports.mean(vector1);
    var mean2 = exports.mean(vector2);
    if (vector1.length !== vector2.length) throw 'Vectors do not have the same dimensions';
    var cov = 0,
      l = vector1.length;
    for (var i = 0; i < l; i++) {
      var x = vector1[i] - mean1;
      var y = vector2[i] - mean2;
      cov += x * y;
    }
    if (unbiased) return cov / (l - 1);else return cov / l;
  };
  exports.skewness = function skewness(values, unbiased) {
    if (typeof unbiased === 'undefined') unbiased = true;
    var theMean = exports.mean(values);
    var s2 = 0,
      s3 = 0,
      l = values.length;
    for (var i = 0; i < l; i++) {
      var dev = values[i] - theMean;
      s2 += dev * dev;
      s3 += dev * dev * dev;
    }
    var m2 = s2 / l;
    var m3 = s3 / l;
    var g = m3 / Math.pow(m2, 3 / 2.0);
    if (unbiased) {
      var a = Math.sqrt(l * (l - 1));
      var b = l - 2;
      return a / b * g;
    } else {
      return g;
    }
  };
  exports.kurtosis = function kurtosis(values, unbiased) {
    if (typeof unbiased === 'undefined') unbiased = true;
    var theMean = exports.mean(values);
    var n = values.length,
      s2 = 0,
      s4 = 0;
    for (var i = 0; i < n; i++) {
      var dev = values[i] - theMean;
      s2 += dev * dev;
      s4 += dev * dev * dev * dev;
    }
    var m2 = s2 / n;
    var m4 = s4 / n;
    if (unbiased) {
      var v = s2 / (n - 1);
      var a = n * (n + 1) / ((n - 1) * (n - 2) * (n - 3));
      var b = s4 / (v * v);
      var c = (n - 1) * (n - 1) / ((n - 2) * (n - 3));
      return a * b - 3 * c;
    } else {
      return m4 / (m2 * m2) - 3;
    }
  };
  exports.entropy = function entropy(values, eps) {
    if (typeof eps === 'undefined') eps = 0;
    var sum = 0,
      l = values.length;
    for (var i = 0; i < l; i++) sum += values[i] * Math.log(values[i] + eps);
    return -sum;
  };
  exports.weightedMean = function weightedMean(values, weights) {
    var sum = 0,
      l = values.length;
    for (var i = 0; i < l; i++) sum += values[i] * weights[i];
    return sum;
  };
  exports.weightedStandardDeviation = function weightedStandardDeviation(values, weights) {
    return Math.sqrt(exports.weightedVariance(values, weights));
  };
  exports.weightedVariance = function weightedVariance(values, weights) {
    var theMean = exports.weightedMean(values, weights);
    var vari = 0,
      l = values.length;
    var a = 0,
      b = 0;
    for (var i = 0; i < l; i++) {
      var z = values[i] - theMean;
      var w = weights[i];
      vari += w * (z * z);
      b += w;
      a += w * w;
    }
    return vari * (b / (b * b - a));
  };
  exports.center = function center(values, inPlace) {
    if (typeof inPlace === 'undefined') inPlace = false;
    var result = values;
    if (!inPlace) result = [].concat(values);
    var theMean = exports.mean(result),
      l = result.length;
    for (var i = 0; i < l; i++) result[i] -= theMean;
  };
  exports.standardize = function standardize(values, standardDev, inPlace) {
    if (typeof standardDev === 'undefined') standardDev = exports.standardDeviation(values);
    if (typeof inPlace === 'undefined') inPlace = false;
    var l = values.length;
    var result = inPlace ? values : new Array(l);
    for (var i = 0; i < l; i++) result[i] = values[i] / standardDev;
    return result;
  };
  exports.cumulativeSum = function cumulativeSum(array) {
    var l = array.length;
    var result = new Array(l);
    result[0] = array[0];
    for (var i = 1; i < l; i++) result[i] = result[i - 1] + array[i];
    return result;
  };
})(array$2);

var matrix = {};

(function (exports) {

  var arrayStat = array$2;
  function compareNumbers(a, b) {
    return a - b;
  }
  exports.max = function max(matrix) {
    var max = -Infinity;
    for (var i = 0; i < matrix.length; i++) {
      for (var j = 0; j < matrix[i].length; j++) {
        if (matrix[i][j] > max) max = matrix[i][j];
      }
    }
    return max;
  };
  exports.min = function min(matrix) {
    var min = Infinity;
    for (var i = 0; i < matrix.length; i++) {
      for (var j = 0; j < matrix[i].length; j++) {
        if (matrix[i][j] < min) min = matrix[i][j];
      }
    }
    return min;
  };
  exports.minMax = function minMax(matrix) {
    var min = Infinity;
    var max = -Infinity;
    for (var i = 0; i < matrix.length; i++) {
      for (var j = 0; j < matrix[i].length; j++) {
        if (matrix[i][j] < min) min = matrix[i][j];
        if (matrix[i][j] > max) max = matrix[i][j];
      }
    }
    return {
      min: min,
      max: max
    };
  };
  exports.entropy = function entropy(matrix, eps) {
    if (typeof eps === 'undefined') {
      eps = 0;
    }
    var sum = 0,
      l1 = matrix.length,
      l2 = matrix[0].length;
    for (var i = 0; i < l1; i++) {
      for (var j = 0; j < l2; j++) {
        sum += matrix[i][j] * Math.log(matrix[i][j] + eps);
      }
    }
    return -sum;
  };
  exports.mean = function mean(matrix, dimension) {
    if (typeof dimension === 'undefined') {
      dimension = 0;
    }
    var rows = matrix.length,
      cols = matrix[0].length,
      theMean,
      N,
      i,
      j;
    if (dimension === -1) {
      theMean = [0];
      N = rows * cols;
      for (i = 0; i < rows; i++) {
        for (j = 0; j < cols; j++) {
          theMean[0] += matrix[i][j];
        }
      }
      theMean[0] /= N;
    } else if (dimension === 0) {
      theMean = new Array(cols);
      N = rows;
      for (j = 0; j < cols; j++) {
        theMean[j] = 0;
        for (i = 0; i < rows; i++) {
          theMean[j] += matrix[i][j];
        }
        theMean[j] /= N;
      }
    } else if (dimension === 1) {
      theMean = new Array(rows);
      N = cols;
      for (j = 0; j < rows; j++) {
        theMean[j] = 0;
        for (i = 0; i < cols; i++) {
          theMean[j] += matrix[j][i];
        }
        theMean[j] /= N;
      }
    } else {
      throw new Error('Invalid dimension');
    }
    return theMean;
  };
  exports.sum = function sum(matrix, dimension) {
    if (typeof dimension === 'undefined') {
      dimension = 0;
    }
    var rows = matrix.length,
      cols = matrix[0].length,
      theSum,
      i,
      j;
    if (dimension === -1) {
      theSum = [0];
      for (i = 0; i < rows; i++) {
        for (j = 0; j < cols; j++) {
          theSum[0] += matrix[i][j];
        }
      }
    } else if (dimension === 0) {
      theSum = new Array(cols);
      for (j = 0; j < cols; j++) {
        theSum[j] = 0;
        for (i = 0; i < rows; i++) {
          theSum[j] += matrix[i][j];
        }
      }
    } else if (dimension === 1) {
      theSum = new Array(rows);
      for (j = 0; j < rows; j++) {
        theSum[j] = 0;
        for (i = 0; i < cols; i++) {
          theSum[j] += matrix[j][i];
        }
      }
    } else {
      throw new Error('Invalid dimension');
    }
    return theSum;
  };
  exports.product = function product(matrix, dimension) {
    if (typeof dimension === 'undefined') {
      dimension = 0;
    }
    var rows = matrix.length,
      cols = matrix[0].length,
      theProduct,
      i,
      j;
    if (dimension === -1) {
      theProduct = [1];
      for (i = 0; i < rows; i++) {
        for (j = 0; j < cols; j++) {
          theProduct[0] *= matrix[i][j];
        }
      }
    } else if (dimension === 0) {
      theProduct = new Array(cols);
      for (j = 0; j < cols; j++) {
        theProduct[j] = 1;
        for (i = 0; i < rows; i++) {
          theProduct[j] *= matrix[i][j];
        }
      }
    } else if (dimension === 1) {
      theProduct = new Array(rows);
      for (j = 0; j < rows; j++) {
        theProduct[j] = 1;
        for (i = 0; i < cols; i++) {
          theProduct[j] *= matrix[j][i];
        }
      }
    } else {
      throw new Error('Invalid dimension');
    }
    return theProduct;
  };
  exports.standardDeviation = function standardDeviation(matrix, means, unbiased) {
    var vari = exports.variance(matrix, means, unbiased),
      l = vari.length;
    for (var i = 0; i < l; i++) {
      vari[i] = Math.sqrt(vari[i]);
    }
    return vari;
  };
  exports.variance = function variance(matrix, means, unbiased) {
    if (typeof unbiased === 'undefined') {
      unbiased = true;
    }
    means = means || exports.mean(matrix);
    var rows = matrix.length;
    if (rows === 0) return [];
    var cols = matrix[0].length;
    var vari = new Array(cols);
    for (var j = 0; j < cols; j++) {
      var sum1 = 0,
        sum2 = 0,
        x = 0;
      for (var i = 0; i < rows; i++) {
        x = matrix[i][j] - means[j];
        sum1 += x;
        sum2 += x * x;
      }
      if (unbiased) {
        vari[j] = (sum2 - sum1 * sum1 / rows) / (rows - 1);
      } else {
        vari[j] = (sum2 - sum1 * sum1 / rows) / rows;
      }
    }
    return vari;
  };
  exports.median = function median(matrix) {
    var rows = matrix.length,
      cols = matrix[0].length;
    var medians = new Array(cols);
    for (var i = 0; i < cols; i++) {
      var data = new Array(rows);
      for (var j = 0; j < rows; j++) {
        data[j] = matrix[j][i];
      }
      data.sort(compareNumbers);
      var N = data.length;
      if (N % 2 === 0) {
        medians[i] = (data[N / 2] + data[N / 2 - 1]) * 0.5;
      } else {
        medians[i] = data[Math.floor(N / 2)];
      }
    }
    return medians;
  };
  exports.mode = function mode(matrix) {
    var rows = matrix.length,
      cols = matrix[0].length,
      modes = new Array(cols),
      i,
      j;
    for (i = 0; i < cols; i++) {
      var itemCount = new Array(rows);
      for (var k = 0; k < rows; k++) {
        itemCount[k] = 0;
      }
      var itemArray = new Array(rows);
      var count = 0;
      for (j = 0; j < rows; j++) {
        var index = itemArray.indexOf(matrix[j][i]);
        if (index >= 0) {
          itemCount[index]++;
        } else {
          itemArray[count] = matrix[j][i];
          itemCount[count] = 1;
          count++;
        }
      }
      var maxValue = 0,
        maxIndex = 0;
      for (j = 0; j < count; j++) {
        if (itemCount[j] > maxValue) {
          maxValue = itemCount[j];
          maxIndex = j;
        }
      }
      modes[i] = itemArray[maxIndex];
    }
    return modes;
  };
  exports.skewness = function skewness(matrix, unbiased) {
    if (typeof unbiased === 'undefined') unbiased = true;
    var means = exports.mean(matrix);
    var n = matrix.length,
      l = means.length;
    var skew = new Array(l);
    for (var j = 0; j < l; j++) {
      var s2 = 0,
        s3 = 0;
      for (var i = 0; i < n; i++) {
        var dev = matrix[i][j] - means[j];
        s2 += dev * dev;
        s3 += dev * dev * dev;
      }
      var m2 = s2 / n;
      var m3 = s3 / n;
      var g = m3 / Math.pow(m2, 3 / 2);
      if (unbiased) {
        var a = Math.sqrt(n * (n - 1));
        var b = n - 2;
        skew[j] = a / b * g;
      } else {
        skew[j] = g;
      }
    }
    return skew;
  };
  exports.kurtosis = function kurtosis(matrix, unbiased) {
    if (typeof unbiased === 'undefined') unbiased = true;
    var means = exports.mean(matrix);
    var n = matrix.length,
      m = matrix[0].length;
    var kurt = new Array(m);
    for (var j = 0; j < m; j++) {
      var s2 = 0,
        s4 = 0;
      for (var i = 0; i < n; i++) {
        var dev = matrix[i][j] - means[j];
        s2 += dev * dev;
        s4 += dev * dev * dev * dev;
      }
      var m2 = s2 / n;
      var m4 = s4 / n;
      if (unbiased) {
        var v = s2 / (n - 1);
        var a = n * (n + 1) / ((n - 1) * (n - 2) * (n - 3));
        var b = s4 / (v * v);
        var c = (n - 1) * (n - 1) / ((n - 2) * (n - 3));
        kurt[j] = a * b - 3 * c;
      } else {
        kurt[j] = m4 / (m2 * m2) - 3;
      }
    }
    return kurt;
  };
  exports.standardError = function standardError(matrix) {
    var samples = matrix.length;
    var standardDeviations = exports.standardDeviation(matrix);
    var l = standardDeviations.length;
    var standardErrors = new Array(l);
    var sqrtN = Math.sqrt(samples);
    for (var i = 0; i < l; i++) {
      standardErrors[i] = standardDeviations[i] / sqrtN;
    }
    return standardErrors;
  };
  exports.covariance = function covariance(matrix, dimension) {
    return exports.scatter(matrix, undefined, dimension);
  };
  exports.scatter = function scatter(matrix, divisor, dimension) {
    if (typeof dimension === 'undefined') {
      dimension = 0;
    }
    if (typeof divisor === 'undefined') {
      if (dimension === 0) {
        divisor = matrix.length - 1;
      } else if (dimension === 1) {
        divisor = matrix[0].length - 1;
      }
    }
    var means = exports.mean(matrix, dimension);
    var rows = matrix.length;
    if (rows === 0) {
      return [[]];
    }
    var cols = matrix[0].length,
      cov,
      i,
      j,
      s,
      k;
    if (dimension === 0) {
      cov = new Array(cols);
      for (i = 0; i < cols; i++) {
        cov[i] = new Array(cols);
      }
      for (i = 0; i < cols; i++) {
        for (j = i; j < cols; j++) {
          s = 0;
          for (k = 0; k < rows; k++) {
            s += (matrix[k][j] - means[j]) * (matrix[k][i] - means[i]);
          }
          s /= divisor;
          cov[i][j] = s;
          cov[j][i] = s;
        }
      }
    } else if (dimension === 1) {
      cov = new Array(rows);
      for (i = 0; i < rows; i++) {
        cov[i] = new Array(rows);
      }
      for (i = 0; i < rows; i++) {
        for (j = i; j < rows; j++) {
          s = 0;
          for (k = 0; k < cols; k++) {
            s += (matrix[j][k] - means[j]) * (matrix[i][k] - means[i]);
          }
          s /= divisor;
          cov[i][j] = s;
          cov[j][i] = s;
        }
      }
    } else {
      throw new Error('Invalid dimension');
    }
    return cov;
  };
  exports.correlation = function correlation(matrix) {
    var means = exports.mean(matrix),
      standardDeviations = exports.standardDeviation(matrix, true, means),
      scores = exports.zScores(matrix, means, standardDeviations),
      rows = matrix.length,
      cols = matrix[0].length,
      i,
      j;
    var cor = new Array(cols);
    for (i = 0; i < cols; i++) {
      cor[i] = new Array(cols);
    }
    for (i = 0; i < cols; i++) {
      for (j = i; j < cols; j++) {
        var c = 0;
        for (var k = 0, l = scores.length; k < l; k++) {
          c += scores[k][j] * scores[k][i];
        }
        c /= rows - 1;
        cor[i][j] = c;
        cor[j][i] = c;
      }
    }
    return cor;
  };
  exports.zScores = function zScores(matrix, means, standardDeviations) {
    means = means || exports.mean(matrix);
    if (typeof standardDeviations === 'undefined') standardDeviations = exports.standardDeviation(matrix, true, means);
    return exports.standardize(exports.center(matrix, means, false), standardDeviations, true);
  };
  exports.center = function center(matrix, means, inPlace) {
    means = means || exports.mean(matrix);
    var result = matrix,
      l = matrix.length,
      i,
      j,
      jj;
    if (!inPlace) {
      result = new Array(l);
      for (i = 0; i < l; i++) {
        result[i] = new Array(matrix[i].length);
      }
    }
    for (i = 0; i < l; i++) {
      var row = result[i];
      for (j = 0, jj = row.length; j < jj; j++) {
        row[j] = matrix[i][j] - means[j];
      }
    }
    return result;
  };
  exports.standardize = function standardize(matrix, standardDeviations, inPlace) {
    if (typeof standardDeviations === 'undefined') standardDeviations = exports.standardDeviation(matrix);
    var result = matrix,
      l = matrix.length,
      i,
      j,
      jj;
    if (!inPlace) {
      result = new Array(l);
      for (i = 0; i < l; i++) {
        result[i] = new Array(matrix[i].length);
      }
    }
    for (i = 0; i < l; i++) {
      var resultRow = result[i];
      var sourceRow = matrix[i];
      for (j = 0, jj = resultRow.length; j < jj; j++) {
        if (standardDeviations[j] !== 0 && !isNaN(standardDeviations[j])) {
          resultRow[j] = sourceRow[j] / standardDeviations[j];
        }
      }
    }
    return result;
  };
  exports.weightedVariance = function weightedVariance(matrix, weights) {
    var means = exports.mean(matrix);
    var rows = matrix.length;
    if (rows === 0) return [];
    var cols = matrix[0].length;
    var vari = new Array(cols);
    for (var j = 0; j < cols; j++) {
      var sum = 0;
      var a = 0,
        b = 0;
      for (var i = 0; i < rows; i++) {
        var z = matrix[i][j] - means[j];
        var w = weights[i];
        sum += w * (z * z);
        b += w;
        a += w * w;
      }
      vari[j] = sum * (b / (b * b - a));
    }
    return vari;
  };
  exports.weightedMean = function weightedMean(matrix, weights, dimension) {
    if (typeof dimension === 'undefined') {
      dimension = 0;
    }
    var rows = matrix.length;
    if (rows === 0) return [];
    var cols = matrix[0].length,
      means,
      i,
      ii,
      j,
      w,
      row;
    if (dimension === 0) {
      means = new Array(cols);
      for (i = 0; i < cols; i++) {
        means[i] = 0;
      }
      for (i = 0; i < rows; i++) {
        row = matrix[i];
        w = weights[i];
        for (j = 0; j < cols; j++) {
          means[j] += row[j] * w;
        }
      }
    } else if (dimension === 1) {
      means = new Array(rows);
      for (i = 0; i < rows; i++) {
        means[i] = 0;
      }
      for (j = 0; j < rows; j++) {
        row = matrix[j];
        w = weights[j];
        for (i = 0; i < cols; i++) {
          means[j] += row[i] * w;
        }
      }
    } else {
      throw new Error('Invalid dimension');
    }
    var weightSum = arrayStat.sum(weights);
    if (weightSum !== 0) {
      for (i = 0, ii = means.length; i < ii; i++) {
        means[i] /= weightSum;
      }
    }
    return means;
  };
  exports.weightedCovariance = function weightedCovariance(matrix, weights, means, dimension) {
    dimension = dimension || 0;
    means = means || exports.weightedMean(matrix, weights, dimension);
    var s1 = 0,
      s2 = 0;
    for (var i = 0, ii = weights.length; i < ii; i++) {
      s1 += weights[i];
      s2 += weights[i] * weights[i];
    }
    var factor = s1 / (s1 * s1 - s2);
    return exports.weightedScatter(matrix, weights, means, factor, dimension);
  };
  exports.weightedScatter = function weightedScatter(matrix, weights, means, factor, dimension) {
    dimension = dimension || 0;
    means = means || exports.weightedMean(matrix, weights, dimension);
    if (typeof factor === 'undefined') {
      factor = 1;
    }
    var rows = matrix.length;
    if (rows === 0) {
      return [[]];
    }
    var cols = matrix[0].length,
      cov,
      i,
      j,
      k,
      s;
    if (dimension === 0) {
      cov = new Array(cols);
      for (i = 0; i < cols; i++) {
        cov[i] = new Array(cols);
      }
      for (i = 0; i < cols; i++) {
        for (j = i; j < cols; j++) {
          s = 0;
          for (k = 0; k < rows; k++) {
            s += weights[k] * (matrix[k][j] - means[j]) * (matrix[k][i] - means[i]);
          }
          cov[i][j] = s * factor;
          cov[j][i] = s * factor;
        }
      }
    } else if (dimension === 1) {
      cov = new Array(rows);
      for (i = 0; i < rows; i++) {
        cov[i] = new Array(rows);
      }
      for (i = 0; i < rows; i++) {
        for (j = i; j < rows; j++) {
          s = 0;
          for (k = 0; k < cols; k++) {
            s += weights[k] * (matrix[j][k] - means[j]) * (matrix[i][k] - means[i]);
          }
          cov[i][j] = s * factor;
          cov[j][i] = s * factor;
        }
      }
    } else {
      throw new Error('Invalid dimension');
    }
    return cov;
  };
})(matrix);

var array$1 = array$2;

function normalize(array) {
  const min = array$1.min(array[1]);
  const max = array$1.max(array[1]);
  const sum = array$1.sum(array[1]);
  const length = array[1] ? array[1].length : 0;
  if (sum !== 0) {
    for (let i = 0; i < length; i++) {
      array[1][i] /= sum;
    }
  }
  return {
    sum,
    min,
    max
  };
}

// this method will systematically take care of both array
function commonExtractAndNormalize(array1, array2, width, from, to, common) {
  if (!Array.isArray(array1) || !Array.isArray(array2)) {
    return {
      info: undefined,
      data: undefined
    };
  }
  const extract1 = extract(array1, from, to);
  const extract2 = extract(array2, from, to);
  let common1, common2, info1, info2;
  if (common & COMMON_SECOND) {
    common1 = getCommonArray(extract1, extract2, width);
    info1 = normalize(common1);
  } else {
    common1 = extract1;
    info1 = normalize(common1);
  }
  if (common & COMMON_FIRST) {
    common2 = getCommonArray(extract2, extract1, width);
    info2 = normalize(common2);
  } else {
    common2 = extract2;
    info2 = normalize(common2);
  }
  return {
    info1,
    info2,
    data1: common1,
    data2: common2
  };
}

function extractAndNormalize(array, from, to) {
  if (!Array.isArray(array)) {
    return {
      info: undefined,
      data: undefined
    };
  }
  const newArray = extract(array, from, to);
  const info = normalize(newArray);
  return {
    info,
    data: newArray
  };
}

// Adapted from: http://stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect/1968345#1968345
function getIntersection(segment1, segment2) {
  const p0X = segment1[0][0];
  const p0Y = segment1[0][1];
  const p1X = segment1[1][0];
  const p1Y = segment1[1][1];
  const p2X = segment2[0][0];
  const p2Y = segment2[0][1];
  const p3X = segment2[1][0];
  const p3Y = segment2[1][1];
  const s1X = p1X - p0X;
  const s1Y = p1Y - p0Y;
  const s2X = p3X - p2X;
  const s2Y = p3Y - p2Y;
  const s = (-s1Y * (p0X - p2X) + s1X * (p0Y - p2Y)) / (-s2X * s1Y + s1X * s2Y);
  const t = (s2X * (p0Y - p2Y) - s2Y * (p0X - p2X)) / (-s2X * s1Y + s1X * s2Y);
  if (s >= 0 && s <= 1 && t >= 0 && t <= 1) {
    return {
      x: p0X + t * s1X,
      y: p0Y + t * s1Y
    };
  }
  return null; // No collision
}

const COMMON_NO = 0;
const COMMON_FIRST = 1;
const COMMON_SECOND = 2;
const COMMON_BOTH = 3;
/**
 * A number, or a string containing a number.
 * @typedef {([number[],number[]]|[number,number][]|{x:number[],y:number[]})} Peaks
 */
/**
 * Create a comparator class
 * {object} [options={}]
 * {string} [options.common=''] should we take only common peaks 'first', 'second', 'both', ''
 * {number} [options.widthBottom=2] bottom trapezoid width for similarity evaluation
 * {number} [options.widthTop=1] top trapezoid width for similarity evaluation
 * {number} [options.from] from region used for similarity calculation
 * {number} [options.to] to region used for similarity calculation
 */
class Comparator {
  constructor(options = {}) {
    this.array1 = [];
    this.array2 = [];
    this.setOptions(options);
  }
  /*
     2 formats are allowed:
     [[x1,x2,...],[y1,y2,...]] or [[x1,y1],[x2,y2], ...]
    */
  setOptions(options = {}) {
    if (typeof options.common === 'string') {
      if (options.common.toLowerCase() === 'first') {
        this.common = COMMON_FIRST;
      } else if (options.common.toLowerCase() === 'second') {
        this.common = COMMON_SECOND;
      } else if (options.common.toLowerCase() === 'both') {
        this.common = COMMON_BOTH;
      } else {
        this.common = COMMON_NO;
      }
    } else if (options.common === true) {
      this.common = COMMON_BOTH;
    } else {
      this.common = COMMON_NO;
    }
    this.trapezoid = options.trapezoid;
    this.commonFactor = options.commonFactor || this.commonFactor || 4;
    const {
      widthBottom = this.widthBottom || 2,
      widthTop = this.widthTop || 1,
      from = this.from,
      to = this.to
    } = options;
    this.setTrapezoid(widthBottom, widthTop);
    this.setFromTo(from, to);
  }
  /**
   *
   * @param {Peaks} peaks
   */
  setPeaks1(peaks) {
    this.array1 = checkPeaks(peaks);
    if (this.common) {
      const extracts = commonExtractAndNormalize(this.array1, this.array2, this.widthBottom, this.from, this.to, this.common);
      this.array1Extract = extracts.data1;
      this.array1ExtractInfo = extracts.info1;
      this.array2Extract = extracts.data2;
      this.array2ExtractInfo = extracts.info2;
    } else {
      const extract = extractAndNormalize(this.array1, this.from, this.to);
      this.array1Extract = extract.data;
      this.array1ExtractInfo = extract.info;
    }
  }
  /**
   *
   * @param {Peaks} peaks
   */
  setPeaks2(peaks) {
    this.array2 = checkPeaks(peaks);
    if (this.common) {
      const extracts = commonExtractAndNormalize(this.array1, this.array2, this.widthBottom, this.from, this.to, this.common);
      this.array1Extract = extracts.data1;
      this.array1ExtractInfo = extracts.info1;
      this.array2Extract = extracts.data2;
      this.array2ExtractInfo = extracts.info2;
    } else {
      const extract = extractAndNormalize(this.array2, this.from, this.to);
      this.array2Extract = extract.data;
      this.array2ExtractInfo = extract.info;
    }
  }
  getExtract1() {
    return this.array1Extract;
  }
  getExtract2() {
    return this.array2Extract;
  }
  getExtractInfo1() {
    return this.array1ExtractInfo;
  }
  getExtractInfo2() {
    return this.array2ExtractInfo;
  }
  /**
   * Set the new bottom and top width of the trapezoid
   * @param {number} newWidthBottom
   * @param {number} newWidthTop
   */
  setTrapezoid(newWidthBottom, newWidthTop) {
    this.widthTop = newWidthTop;
    this.widthBottom = newWidthBottom;
    this.widthSlope = (this.widthBottom - this.widthTop) / 2;
    if (this.widthBottom < this.widthTop) {
      throw new Error('widthBottom has to be larger than widthTop');
    }
  }
  /**
   * Set the from / to for comparison
   * @param {number} newFrom - set the new from value
   * @param {number} newTo - set the new to value
   * @returns
   */
  setFromTo(newFrom, newTo) {
    if (newFrom === this.from && newTo === this.to) return;
    this.from = newFrom;
    this.to = newTo;
    if (this.common) {
      const extracts = commonExtractAndNormalize(this.array1, this.array2, this.widthBottom, this.from, this.to, this.common, this.commonFactor);
      this.array1Extract = extracts.data1;
      this.array1ExtractInfo = extracts.info1;
      this.array2Extract = extracts.data2;
      this.array2ExtractInfo = extracts.info2;
    } else {
      let extract1 = extractAndNormalize(this.array1, this.from, this.to);
      this.array1Extract = extract1.data;
      this.array1ExtractInfo = extract1.info;
      let extract2 = extractAndNormalize(this.array2, this.from, this.to);
      this.array2Extract = extract2.data;
      this.array2ExtractInfo = extract2.info;
    }
  }
  /**
   *
   * @param {number} x1
   * @param {number} y1
   * @param {number} x2
   * @param {number} y2
   * @returns
   */
  getOverlap(x1, y1, x2, y2) {
    if (y1 === 0 || y2 === 0) return 0;
    // TAKE CARE !!! We multiply the diff by 2 !!!
    const diff = Math.abs(x1 - x2) * 2;
    if (diff > this.widthBottom) return 0;
    if (diff <= this.widthTop) {
      return Math.min(y1, y2);
    }
    const maxValue = Math.max(y1, y2) * (this.widthBottom - diff) / (this.widthBottom - this.widthTop);
    return Math.min(y1, y2, maxValue);
  }
  /**
   * This is the old trapezoid similarity
   * @param {number} x1
   * @param {number} y1
   * @param {number} x2
   * @param {number} y2
   * @param {number} widthTop
   * @param {number} widthBottom
   * @returns
   */
  getOverlapTrapezoid(x1, y1, x2, y2, widthTop, widthBottom) {
    // eslint-disable-next-line no-console
    console.error('getOverlapTrapezoid should not be used anymore');
    const factor = 2 / (widthTop + widthBottom); // correction for surface=1
    if (y1 === 0 || y2 === 0) return 0;
    if (x1 === x2) {
      // they have the same position
      return Math.min(y1, y2);
    }
    const diff = Math.abs(x1 - x2);
    if (diff >= widthBottom) return 0;
    if (y1 === y2) {
      // do they have the same height ???
      // we need to find the common length
      if (diff <= widthTop) {
        return ((widthTop + widthBottom) / 2 - diff) * y1 * factor;
      } else if (diff <= widthBottom) {
        return (widthBottom - diff) * y1 / 2 * (diff - widthTop) / (widthBottom - widthTop) * factor;
      }
      return 0;
    } else {
      // the height are different and not the same position ...
      // we need to consider only one segment to find its intersection
      const small = Math.min(y1, y2);
      const big = Math.max(y1, y2);
      const targets = [[[0, 0], [this.widthSlope, small]], [[this.widthSlope, small], [this.widthSlope + widthTop, small]], [[widthTop + this.widthSlope, small], [widthBottom, 0]]];
      let segment;
      if (x1 > x2 && y1 > y2 || x1 < x2 && y1 < y2) {
        segment = [[diff, 0], [diff + this.widthSlope, big]];
      } else {
        segment = [[diff + this.widthSlope, big], [diff, 0]];
      }
      for (let i = 0; i < 3; i++) {
        const intersection = getIntersection(targets[i], segment);
        if (intersection) {
          switch (i) {
            case 0:
              return small - diff * intersection.y / 2 * factor;
            case 1:
              // to simplify ...
              //     console.log("           ",widthSlope,small,big,intersection.x)
              return (this.widthSlope * small / (2 * big) * small + (widthTop + this.widthSlope - intersection.x) * small + this.widthSlope * small / 2) * factor;
            case 2:
              return (widthBottom - diff) * intersection.y / 2 * factor;
            default:
              throw new Error(`unexpected intersection value: ${i}`);
          }
        }
      }
    }
    return NaN;
  }
  /**
   * This method calculates the total diff. The sum of positive value will yield to overlap
   * @returns
   */
  calculateDiff() {
    // we need to take 2 pointers
    // and travel progressively between them ...
    const newFirst = [this.array1Extract[0].slice(), this.array1Extract[1].slice()];
    const newSecond = [this.array2Extract[0].slice(), this.array2Extract[1].slice()];
    const array1Length = this.array1Extract[0] ? this.array1Extract[0].length : 0;
    const array2Length = this.array2Extract[0] ? this.array2Extract[0].length : 0;
    let pos1 = 0;
    let pos2 = 0;
    let previous2 = 0;
    while (pos1 < array1Length) {
      const diff = newFirst[0][pos1] - this.array2Extract[0][pos2];
      if (Math.abs(diff) < this.widthBottom) {
        // there is some overlap
        let overlap;
        if (this.trapezoid) {
          // old trapezoid overlap similarity
          overlap = this.getOverlapTrapezoid(newFirst[0][pos1], newFirst[1][pos1], newSecond[0][pos2], newSecond[1][pos2], this.widthTop, this.widthBottom);
        } else {
          overlap = this.getOverlap(newFirst[0][pos1], newFirst[1][pos1], newSecond[0][pos2], newSecond[1][pos2], this.widthTop, this.widthBottom);
        }
        newFirst[1][pos1] -= overlap;
        newSecond[1][pos2] -= overlap;
        if (pos2 < array2Length - 1) {
          pos2++;
        } else {
          pos1++;
          pos2 = previous2;
        }
      } else if (diff > 0 && pos2 < array2Length - 1) {
        pos2++;
        previous2 = pos2;
      } else {
        pos1++;
        pos2 = previous2;
      }
    }
    return newSecond;
  }
  /**
   * Set the new peaks and return info
   * @param {Peaks} newPeaks1
   * @param {Peaks} newPeaks2
   * @returns
   */
  getSimilarity(newPeaks1, newPeaks2) {
    if (newPeaks1) this.setPeaks1(newPeaks1);
    if (newPeaks2) this.setPeaks2(newPeaks2);
    const diff = this.calculateDiff();
    return {
      diff,
      extract1: this.getExtract1(),
      extract2: this.getExtract2(),
      extractInfo1: this.getExtractInfo1(),
      extractInfo2: this.getExtractInfo2(),
      similarity: calculateOverlapFromDiff(diff),
      widthBottom: this.widthBottom,
      widthTop: this.widthTop
    };
  }
  /**
   * This works mainly when you have a array1 that is fixed
   * newPeaks2 have to be normalized ! (sum to 1)
   * @param {Peaks} newPeaks2
   * @param {number} from
   * @param {number} to
   * @returns
   */
  fastSimilarity(newPeaks2, from, to) {
    this.array1Extract = extract(this.array1, from, to);
    this.array2Extract = newPeaks2;
    if (this.common & COMMON_SECOND) {
      this.array1Extract = getCommonArray(this.array1Extract, this.array2Extract, this.widthBottom);
    }
    normalize(this.array1Extract);
    const diff = this.calculateDiff();
    return calculateOverlapFromDiff(diff);
  }
}

var libEsm$1 = /*#__PURE__*/Object.freeze({
	__proto__: null,
	COMMON_BOTH: COMMON_BOTH,
	COMMON_FIRST: COMMON_FIRST,
	COMMON_NO: COMMON_NO,
	COMMON_SECOND: COMMON_SECOND,
	Comparator: Comparator
});

var require$$1 = /*@__PURE__*/getAugmentedNamespace(libEsm$1);

Object.defineProperty(searchSimilarity$1, "__esModule", {
  value: true
});
searchSimilarity$1.searchSimilarity = searchSimilarity;
const isotopic_distribution_1$1 = src$6;
const peaks_similarity_1 = require$$1;
/**
Search for an experimental monoisotopic mass and calculate the similarity
* @param {object}   [options={}]
* @param {array}    [options.databases] - an array containing the name of the databases so search, by default all
* @param {boolean}  [options.flatten] - should we return the array as a flat result
* @param {function} [options.onStep] - Callback to do after each step
* @param {string}   [options.ionizations=''] - Comma separated list of ionizations (to charge the molecule)
* @param {object}   [options.minSimilarity=0.5] - min similarity value

* @param {object}   [options.filter={}]
* @param {boolean}  [options.filter.forceIonization=false] - If true ignore existing ionizations
* @param {number}   [options.filter.msem] - Observed monoisotopic mass in mass spectrometer
* @param {number}   [options.filter.precision=1000] - The precision on the experimental mass
* @param {number}   [options.filter.minCharge=-Infinity] - Minimal charge
* @param {number}   [options.filter.maxCharge=+Infinity] - Maximal charge
* @param {boolean}  [options.filter.absoluteCharge=false] - If true, the charge is absolute (so between 0 and +Infinity by default)
* @param {object}   [options.filter.unsaturation={}]
* @param {number}   [options.filter.unsaturation.min=-Infinity] - Minimal unsaturation
* @param {number}   [options.filter.unsaturation.max=+Infinity] - Maximal unsaturation
* @param {boolean}  [options.filter.unsaturation.onlyInteger=false] - Integer unsaturation
* @param {boolean}  [options.filter.unsaturation.onlyNonInteger=false] - Non integer unsaturation
* @param {object}   [options.filter.atoms] - object of atom:{min, max}
* @param {object}   [options.filter.callback] - a function to filter the MF
* @param {object}   [options.similarity={}]
* @param {number}   [options.similarity.widthBottom]
* @param {number}   [options.similarity.widthTop]
* @param {object}   [options.similarity.widthFunction] - function called with mass that should return an object width containing top and bottom
* @param {object}   [options.similarity.zone={}]
* @param {number}   [options.similarity.zone.low=-0.5] - window shift based on observed monoisotopic mass
* @param {number}   [options.similarity.zone.high=2.5] - to value for the comparison window
* @param {boolean}  [options.similarity.zone.auto=false] - if true, low / high is determined based on the isotopic distribution and the threshold
* @param {string}   [options.similarity.common]
* @param {number}   [options.similarity.threshold=0.001] - when calculating similarity we only use the isotopic distribution with peaks over this relative threshold
* @param {number}   [options.similarity.limit] - We may define the maximum number of peaks to keep
* @returns {Promise}
*/
async function searchSimilarity(emdb, options = {}) {
  const {
    similarity = {},
    minSimilarity = 0.5,
    filter = {},
    onStep,
    flatten
  } = options;
  let width = {
    bottom: similarity.widthBottom,
    top: similarity.widthTop
  };
  if (!emdb.experimentalSpectrum || emdb.experimentalSpectrum.data.x.length === 0) {
    throw new Error('You need to add an experimental spectrum first using setMassSpectrum');
  }
  const experimentalData = emdb.experimentalSpectrum.data;
  let sumY = emdb.experimentalSpectrum.sumY();
  // the result of emdb query will be stored in a property 'ms'
  let results = emdb.searchMSEM(filter.msem, options);
  let flatEntries = [];
  if (!flatten) {
    for (let database of Object.keys(results)) {
      for (let entry of results[database]) {
        flatEntries.push(entry);
      }
    }
  } else {
    flatEntries = results;
  }
  let {
    widthFunction,
    zone = {},
    threshold = 0.001,
    limit
  } = similarity;
  if (widthFunction && typeof widthFunction === 'string') {
    // eslint-disable-next-line no-new-func
    widthFunction = new Function('mass', widthFunction);
    let checkTopBottom = widthFunction(123);
    if (!checkTopBottom.bottom || !checkTopBottom.top) {
      throw new Error('widthFunction should return an object with bottom and top properties');
    }
  }
  const {
    low = -0.5,
    high = 2.5,
    auto
  } = zone;
  // we need to calculate the similarity of the isotopic distribution
  let similarityProcessor = new peaks_similarity_1.Comparator(similarity);
  similarityProcessor.setPeaks1([experimentalData.x, experimentalData.y]);
  for (let i = 0; i < flatEntries.length; i++) {
    const entry = flatEntries[i];
    if (onStep) await onStep(i);
    if (widthFunction) {
      width = widthFunction(entry.ms.em);
    }
    let isotopicDistribution = new isotopic_distribution_1$1.IsotopicDistribution(entry.mf, {
      allowNeutral: false,
      ionizations: [entry.ionization],
      fwhm: width.top / 2,
      threshold,
      limit
    });
    let distribution = isotopicDistribution.getDistribution();
    // we need to define the comparison zone that depends of the charge
    let from, to;
    if (auto) {
      from = distribution.minX - 0.5;
      to = distribution.maxX + 0.5;
      similarityProcessor.setFromTo(from, to);
    } else {
      from = entry.ms.em + low / Math.abs(entry.ms.charge);
      to = entry.ms.em + high / Math.abs(entry.ms.charge);
      similarityProcessor.setFromTo(from, to);
    }
    if (widthFunction) {
      similarityProcessor.setTrapezoid(width.bottom, width.top);
    }
    similarityProcessor.setPeaks2([distribution.xs, distribution.ys]);
    let result = similarityProcessor.getSimilarity();
    result.extractInfo1.from = from;
    result.extractInfo1.to = to;
    if (result.similarity > minSimilarity) {
      entry.ms.similarity = {
        value: result.similarity,
        experimental: result.extract1,
        theoretical: result.extract2,
        difference: result.diff,
        experimentalInfo: result.extractInfo1,
        thereoticalInfo: result.extractInfo2,
        quantity: result.extractInfo1.sum / sumY,
        factor: result.extractInfo1.max / result.extractInfo2.max,
        // by how much we should mulitply the extrat2 to reach the spectrum
        width
      };
    }
  }
  if (!flatten) {
    for (let database of Object.keys(results)) {
      results[database] = results[database].filter(entry => entry.ms.similarity).toSorted((a, b) => b.ms.similarity.value - a.ms.similarity.value);
      for (let entry of results[database]) {
        flatEntries.push(entry);
      }
    }
  } else {
    results = results.filter(entry => entry.ms.similarity).toSorted((a, b) => b.ms.similarity.value - a.ms.similarity.value);
  }
  return results;
}

var massShifts$1 = {};

// eslint-disable-next-line @typescript-eslint/unbound-method
const toString = Object.prototype.toString;
/**
 * Checks if an object is an instance of an Array (array or typed array, except those that contain bigint values).
 *
 * @param value - Object to check.
 * @returns True if the object is an array or a typed array.
 */
function isAnyArray(value) {
  const tag = toString.call(value);
  return tag.endsWith('Array]') && !tag.includes('Big');
}

var medianQuickselect_min = {exports: {}};

(function (module) {
  (function () {
    function a(d) {
      for (var e = 0, f = d.length - 1, g = void 0, h = void 0, i = void 0, j = c(e, f); true;) {
        if (f <= e) return d[j];
        if (f == e + 1) return d[e] > d[f] && b(d, e, f), d[j];
        for (g = c(e, f), d[g] > d[f] && b(d, g, f), d[e] > d[f] && b(d, e, f), d[g] > d[e] && b(d, g, e), b(d, g, e + 1), h = e + 1, i = f; true;) {
          do h++; while (d[e] > d[h]);
          do i--; while (d[i] > d[e]);
          if (i < h) break;
          b(d, h, i);
        }
        b(d, e, i), i <= j && (e = h), i >= j && (f = i - 1);
      }
    }
    var b = function b(d, e, f) {
        var _ref;
        return _ref = [d[f], d[e]], d[e] = _ref[0], d[f] = _ref[1], _ref;
      },
      c = function c(d, e) {
        return ~~((d + e) / 2);
      };
    module.exports ? module.exports = a : window.median = a;
  })();
})(medianQuickselect_min);
var medianQuickselect_minExports = medianQuickselect_min.exports;
var quickSelectMedian = /*@__PURE__*/getDefaultExportFromCjs(medianQuickselect_minExports);

function median(input) {
  if (!isAnyArray(input)) {
    throw new TypeError('input must be an array');
  }
  if (input.length === 0) {
    throw new TypeError('input must not be empty');
  }
  return quickSelectMedian(input.slice());
}

class TheilSenRegression extends BaseRegression {
  /**
   * Theil–Sen estimator
   * https://en.wikipedia.org/wiki/Theil%E2%80%93Sen_estimator
   * @param {Array<number>|boolean} x
   * @param {Array<number>|object} y
   * @constructor
   */
  constructor(x, y) {
    super();
    if (x === true) {
      // loads the model
      this.slope = y.slope;
      this.intercept = y.intercept;
      this.coefficients = y.coefficients;
    } else {
      // creates the model
      checkArrayLength(x, y);
      theilSen(this, x, y);
    }
  }
  toJSON() {
    return {
      name: 'TheilSenRegression',
      slope: this.slope,
      intercept: this.intercept
    };
  }
  _predict(input) {
    return this.slope * input + this.intercept;
  }
  computeX(input) {
    return (input - this.intercept) / this.slope;
  }
  toString(precision) {
    let result = 'f(x) = ';
    if (this.slope) {
      let xFactor = maybeToPrecision(this.slope, precision);
      result += `${Math.abs(xFactor - 1) < 1e-5 ? '' : `${xFactor} * `}x`;
      if (this.intercept) {
        let absIntercept = Math.abs(this.intercept);
        let operator = absIntercept === this.intercept ? '+' : '-';
        result += ` ${operator} ${maybeToPrecision(absIntercept, precision)}`;
      }
    } else {
      result += maybeToPrecision(this.intercept, precision);
    }
    return result;
  }
  toLaTeX(precision) {
    return this.toString(precision);
  }
  static load(json) {
    if (json.name !== 'TheilSenRegression') {
      throw new TypeError('not a Theil-Sen model');
    }
    return new TheilSenRegression(true, json);
  }
}
function theilSen(regression, x, y) {
  let len = x.length;
  let slopes = new Array(len * len);
  let count = 0;
  for (let i = 0; i < len; ++i) {
    for (let j = i + 1; j < len; ++j) {
      if (x[i] !== x[j]) {
        slopes[count++] = (y[j] - y[i]) / (x[j] - x[i]);
      }
    }
  }
  slopes.length = count;
  let medianSlope = median(slopes);
  let cuts = new Array(len);
  for (let i = 0; i < len; ++i) {
    cuts[i] = y[i] - medianSlope * x[i];
  }
  regression.slope = medianSlope;
  regression.intercept = median(cuts);
  regression.coefficients = [regression.intercept, regression.slope];
}

var src$5 = /*#__PURE__*/Object.freeze({
	__proto__: null,
	TheilSenRegression: TheilSenRegression
});

var require$$0$3 = /*@__PURE__*/getAugmentedNamespace(src$5);

Object.defineProperty(massShifts$1, "__esModule", {
  value: true
});
massShifts$1.massShifts = massShifts;
const ml_regression_theil_sen_1 = require$$0$3;
const ml_spectra_processing_1$2 = require$$0$7;
/**
 * Calculates a function that allows post-calibration on mass spectra based on the error in assignment
 * @param {*} similarities
 * @param {object} [options={}]
 * @returns
 */
function massShifts(similarities, options = {}) {
  const {
    minSimilarity = 0.95,
    minLength = 10
  } = options;
  let results = [];
  if (!Array.isArray(similarities)) {
    for (let key of results) {
      for (let entry of results[key]) {
        results.push(entry);
      }
    }
  } else {
    results = similarities;
  }
  results = results.filter(result => result.ms && result.ms.similarity && result.ms.similarity.value > minSimilarity);
  if (results.length < minLength) {
    throw new Error(`X rescale can not be applied. We need at least ${minLength} peaks with over ${Math.round(minSimilarity * 100)}% similarity`);
  }
  const data = results.map(result => {
    return {
      em: result.ms.em,
      delta: result.ms.delta
    };
  }).toSorted((a, b) => a.em - b.em);
  let shifts = {
    x: [],
    y: []
  };
  for (const datum of data) {
    shifts.x.push(Number(datum.em));
    shifts.y.push(Number(datum.delta));
  }
  const regression = new ml_regression_theil_sen_1.TheilSenRegression(shifts.x, shifts.y);
  let minX = (0, ml_spectra_processing_1$2.xMinValue)(shifts.x);
  let maxX = (0, ml_spectra_processing_1$2.xMaxValue)(shifts.x);
  let shiftsPPM = {
    x: shifts.x,
    y: []
  };
  for (const datum of data) {
    shiftsPPM.y.push(Number(datum.delta / datum.em * 1e6));
  }
  let regressionChart = {
    x: [],
    y: []
  };
  for (let i = minX; i < maxX; i += (maxX - minX) / 1000) {
    regressionChart.x.push(i);
    regressionChart.y.push(regression.predict(i));
  }
  return {
    shifts,
    shiftsPPM,
    fit: regressionChart,
    score: regression.score(shifts.x, shifts.y),
    predictFct: regression.predict.bind(regression),
    tex: regression.toLaTeX(3),
    slope: regression.slope,
    intercept: regression.intercept,
    predictFctString: `${regression.slope} * mass + ${regression.intercept}`
  };
}

var fetchJSON$3 = {};

Object.defineProperty(fetchJSON$3, "__esModule", {
  value: true
});
fetchJSON$3.fetchJSON = fetchJSON$2;
async function fetchJSON$2(url) {
  const result = await fetch(url);
  return result.json();
}

(function (exports) {

  var __createBinding = src$l && src$l.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$l && src$l.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.EMDB = void 0;
  const ms_spectrum_1 = src$k;
  const appendFragmentsInfo_js_1 = appendFragmentsInfo$1;
  const fromArray_js_1 = fromArray$1;
  const fromMolecules_js_1 = fromMolecules$1;
  const fromNucleicSequence_js_1 = fromNucleicSequence$1;
  const fromPeptidicSequence_js_1 = fromPeptidicSequence$1;
  const fromRange_js_1 = fromRange$1;
  const loadCommercials_js_1 = loadCommercials$1;
  const loadGoogleSheet_js_1 = loadGoogleSheet$1;
  const loadKnapSack_js_1 = loadKnapSack$1;
  const search_js_1 = search$3;
  const searchMSEM_js_1 = searchMSEM$1;
  const searchSimilarity_js_1 = searchSimilarity$1;
  __exportStar(massShifts$1, exports);
  __exportStar(fetchJSON$3, exports);
  /**
   * A class that deals with database of monoisotopic mass and molecular formula
   */
  class EMDB {
    constructor() {
      this.databases = {};
      this.experimentalSpectrum = undefined;
    }
    /**
     *
     * @param {*} data
     * @param {object} [options={}]
     * @param {boolean} [options.normed=true] Should we normed (sum Y to 1) the experimental spectrum ?
     * @param {number} [options.threshold=0.00025] Threshold used for peak picking
     */
    setExperimentalSpectrum(data, options = {}) {
      const {
        normed = true,
        threshold = 0.00025
      } = options;
      this.experimentalSpectrum = new ms_spectrum_1.Spectrum(data, {
        threshold
      });
      if (normed) {
        this.experimentalSpectrum.normedY();
      }
      return this.experimentalSpectrum;
    }
    /**
     * Add a new database using the KnapSack content
     * @param {*} options
     */
    async loadKnapSack(options = {}) {
      const {
        databaseName = 'knapSack',
        forceReload = false
      } = options;
      if (this.databases[databaseName] && !forceReload) return;
      this.databases[databaseName] = await (0, loadKnapSack_js_1.loadKnapSack)();
    }
    /**
     * Add a new database of 12000 commercial products
     * @param {*} options
     */
    async loadCommercials(options = {}) {
      const {
        databaseName = 'commercials',
        forceReload = false
      } = options;
      if (this.databases[databaseName] && !forceReload) return;
      this.databases[databaseName] = await (0, loadCommercials_js_1.loadCommercials)();
    }
    get(databaseName) {
      return this.databases[databaseName];
    }
    /**
     * Load the contaminants database from a google sheet document
     * @param {object} [options={}]
     * @param {string} [options.databaseName='contaminants']
     * @param {string} [options.forceReload=false]
     */
    async loadContaminants(options = {}) {
      const {
        databaseName = 'contaminants',
        forceReload = false
      } = options;
      if (this.databases[databaseName] && !forceReload) return;
      this.databases[databaseName] = await (0, loadGoogleSheet_js_1.loadGoogleSheet)();
    }
    /**
     * Load a google sheet containing MF information
     * @param {object} [options={}]
     * @param {string} [options.databaseName='sheet']
     * @param {string} [options.forceReload=false]
     */
    async loadGoogleSheet(options = {}) {
      const {
        databaseName = 'sheet',
        forceReload = false
      } = options;
      if (this.databases[databaseName] && !forceReload) return;
      this.databases[databaseName] = await (0, loadGoogleSheet_js_1.loadGoogleSheet)();
    }
    async loadTest() {
      await this.fromArray(['C1-100'], {
        databaseName: 'test',
        ionizations: '+'
      });
    }
    async loadNeutralTest(options = {}) {
      const {
        maxC = 100
      } = options;
      await this.fromArray([`C1-${maxC}`], {
        databaseName: 'test'
      });
    }
    async fromMonoisotopicMass(mass, options = {}) {
      const {
        databaseName = 'monoisotopic',
        append = false
      } = options;
      let result = await (0, ms_spectrum_1.fromMonoisotopicMass)(mass, options);
      replaceOrAppend(this, databaseName, result.mfs, append);
      return result;
    }
    async fromArray(sequence, options = {}) {
      const {
        databaseName = 'generated',
        append = false,
        estimate
      } = options;
      const results = await (0, fromArray_js_1.fromArray)(sequence, options);
      if (estimate) return results;
      replaceOrAppend(this, databaseName, results, append);
    }
    async fromMolecules(entries, ocl, options = {}) {
      const {
        databaseName = 'molecules',
        append = false
      } = options;
      const results = await (0, fromMolecules_js_1.fromMolecules)(entries, ocl, options);
      replaceOrAppend(this, databaseName, results, append);
    }
    async fromRange(sequence, options = {}) {
      const {
        databaseName = 'generated',
        append = false,
        estimate
      } = options;
      const results = await (0, fromRange_js_1.fromRange)(sequence, options);
      if (estimate) return results;
      replaceOrAppend(this, databaseName, results, append);
    }
    async fromPeptidicSequence(sequence, options = {}) {
      const {
        databaseName = 'peptidic',
        append = false,
        estimate
      } = options;
      const results = await (0, fromPeptidicSequence_js_1.fromPeptidicSequence)(sequence, options);
      if (estimate) return results;
      replaceOrAppend(this, databaseName, results, append);
    }
    /**
     *
     * @param {string} databaseName
     * @param {object} [options={}]
     * @param {number} [options.precision=100]
     * @param {string} [options.ionizations='']
     * @returns
     */
    async appendFragmentsInfo(databaseName, options = {}) {
      const database = this.databases[databaseName];
      await (0, appendFragmentsInfo_js_1.appendFragmentsInfo)(this.experimentalSpectrum, database, options);
      return database;
    }
    async fromNucleicSequence(sequence, options = {}) {
      const {
        databaseName = 'nucleic',
        append = false,
        estimate
      } = options;
      const results = await (0, fromNucleicSequence_js_1.fromNucleicSequence)(sequence, options);
      if (estimate) return results;
      replaceOrAppend(this, databaseName, results, append);
    }
    listDatabases() {
      return Object.keys(this.databases).toSorted();
    }
    getInfo() {
      return {
        databases: Object.keys(this.databases).toSorted().map(key => {
          return {
            name: key,
            nbEntries: this.databases[key].length
          };
        })
      };
    }
    search(filter, options = {}) {
      return (0, search_js_1.search)(this, filter, options);
    }
    searchMSEM(filter, options = {}) {
      return (0, searchMSEM_js_1.searchMSEM)(this, filter, options);
    }
    searchSimilarity(options = {}) {
      return (0, searchSimilarity_js_1.searchSimilarity)(this, options);
    }
  }
  exports.EMDB = EMDB;
  function replaceOrAppend(emdb, databaseName, results, append = false) {
    if (!emdb.databases[databaseName] || !append) {
      emdb.databases[databaseName] = results;
      return;
    }
    emdb.databases[databaseName] = emdb.databases[databaseName].concat(results);
  }
})(src$l);

var src$4 = {};

var preprocessEARanges$1 = {};

Object.defineProperty(preprocessEARanges$1, "__esModule", {
  value: true
});
preprocessEARanges$1.preprocessEARanges = preprocessEARanges;
const mf_parser_1$2 = src$h;
function preprocessEARanges(ranges, targetEA) {
  ranges = structuredClone(ranges);
  if (typeof ranges === 'string') {
    // need to convert to ranges
    let parsed = (0, mf_parser_1$2.parse)(ranges.replaceAll(/[\t\n\r ]/g, ''));
    let newRanges = [];
    let current = {
      mf: '',
      min: 1,
      max: 1
    };
    // example ClBr2(CH2)0-2NO
    // the idea is that has long as we don't have a range we don't really care
    // there is a limitation is that the range has to be first level of parenthesis
    let parenthesisLevel = 0;
    let currentMF = ''; // start at an atom first level or a parenthesis
    for (let item of parsed) {
      switch (item.kind) {
        case mf_parser_1$2.Kind.ATOM:
          if (parenthesisLevel === 0 && currentMF) {
            current.mf += currentMF;
            currentMF = '';
          }
          currentMF += item.value;
          break;
        case mf_parser_1$2.Kind.ISOTOPE:
          if (parenthesisLevel === 0 && currentMF) {
            current.mf += currentMF;
            currentMF = '';
          }
          currentMF += `[${item.value.isotope}${item.value.atom}]`;
          break;
        case mf_parser_1$2.Kind.MULTIPLIER:
          if (parenthesisLevel === 0 && currentMF) {
            current.mf += currentMF + item.value;
            currentMF = '';
          } else {
            currentMF += item.value;
          }
          break;
        case mf_parser_1$2.Kind.MULTIPLIER_RANGE:
          if (parenthesisLevel !== 0) {
            throw new Error('Range multiplier can only be at the first level');
          }
          newRanges.push({
            mf: currentMF,
            min: item.value.from,
            max: item.value.to
          });
          currentMF = '';
          break;
        case mf_parser_1$2.Kind.OPENING_PARENTHESIS:
          parenthesisLevel++;
          currentMF += '(';
          break;
        case mf_parser_1$2.Kind.CLOSING_PARENTHESIS:
          parenthesisLevel--;
          currentMF += ')';
          break;
        default:
          throw new Error(`can not preprocess ${ranges}`);
      }
    }
    if (currentMF) {
      current.mf += currentMF;
    }
    if (current.mf) {
      newRanges.push(current);
    }
    ranges = newRanges;
  }
  let possibilities = [];
  for (let i = 0; i < ranges.length; i++) {
    let range = ranges[i];
    let min = range.min === undefined ? 0 : range.min;
    let max = range.max === undefined ? 1 : range.max;
    let possibility = {
      mf: range.mf,
      minCount: min,
      // value defined by the user
      maxCount: max,
      // value defined by the user
      targetEA: targetEA[range.mf],
      mw: 0,
      // mw till this level
      aw: 0,
      // atomic weight (mass * currentCount)
      maxRatio: 0,
      // maximum ratio possible if all next elements are 0
      currentValue: 0,
      currentCount: min - 1,
      currentUnsaturation: 0,
      initialOrder: i
    };
    possibilities.push(possibility);
    let info = new mf_parser_1$2.MF(range.mf).getInfo();
    possibility.mass = info.mass;
    possibility.unsaturation = range.unsaturation === undefined ? (info.unsaturation - 1) * 2 : range.unsaturation;
    if (possibility.mf !== info.mf) possibility.isGroup = true;
  }
  possibilities = possibilities.filter(r => r.minCount !== 0 || r.maxCount !== 0);
  possibilities.sort((a, b) => {
    return b.targetEA - a.targetEA;
  });
  return possibilities;
}

Object.defineProperty(src$4, "__esModule", {
  value: true
});
var mfFromEA_1 = src$4.mfFromEA = mfFromEA;
const atom_sorter_1 = src$g;
const preprocessEARanges_1 = preprocessEARanges$1;
/**
 * Returns possible combinations
 * @param {object} [targetEA]
 * @param {object} [options={}]
 * @param {string} [options.ranges='C0-100 H0-100 O0-100 N0-100'] - range of mfs to search
 * @param {number} [options.maxElementError=0.003]
 * @param {number} [options.maxTotalError=0.01]
 * @param {number} [options.minMW=0] minimal molecular weight
 * @param {number} [options.maxMW=+Infinity] maximal molecular weight
 * @param {object} [options.unsaturation={}]
 * @param {number} [options.unsaturation.min=-Infinity] Minimal unsaturation
 * @param {number} [options.unsaturation.max=+Infinity] Maximal unsaturation
 * @param {boolean} [options.unsaturation.onlyInteger=false] Integer unsaturation
 * @param {boolean} [options.unsaturation.onlyNonInteger=false] Non integer unsaturation
 * @return {Array<object>}
 */
function mfFromEA(targetEA, options = {}) {
  const {
    unsaturation = {},
    maxIterations = 1e8,
    minMW = 0,
    maxMW = +Infinity,
    ranges = [{
      mf: 'C',
      min: 0,
      max: 100
    }, {
      mf: 'H',
      min: 0,
      max: 100
    }, {
      mf: 'O',
      min: 0,
      max: 100
    }, {
      mf: 'N',
      min: 0,
      max: 100
    }],
    maxElementError = 0.003,
    maxTotalError = 0.01
  } = options;
  let filterUnsaturation = !!unsaturation;
  // we calculate not the real unsaturation but the one before dividing by 2 + 1
  let fakeMinUnsaturation = unsaturation.min === undefined ? Number.MIN_SAFE_INTEGER : (unsaturation.min - 1) * 2;
  let fakeMaxUnsaturation = unsaturation.max === undefined ? Number.MAX_SAFE_INTEGER : (unsaturation.max - 1) * 2;
  let results = {
    mfs: [],
    info: {
      numberMFEvaluated: 0,
      numberResults: 0
    }
  };
  let orderMapping = []; // used to sort the atoms
  let possibilities = (0, preprocessEARanges_1.preprocessEARanges)(ranges, targetEA, maxElementError);
  orderMapping = getOrderMapping(possibilities);
  if (possibilities.length === 0) return {
    mfs: []
  };
  let currentPosition = 0;
  let currentAtom;
  //  if (DEBUG) console.log('possibilities', possibilities.map((a) => `${a.mf + a.originalMinCount}-${a.originalMaxCount}`));
  mfWhile: while (true) {
    while (currentPosition < possibilities.length && currentPosition >= 0) {
      let previousAtom = currentPosition === 0 ? {
        mw: 0
      } : possibilities[currentPosition - 1];
      currentAtom = possibilities[currentPosition];
      if (currentAtom.currentCount < currentAtom.maxCount) {
        currentAtom.currentCount++;
        currentAtom.aw = currentAtom.mass * currentAtom.currentCount;
        currentAtom.mw = currentAtom.aw + previousAtom.mw;
        currentAtom.maxRatio = currentAtom.aw / currentAtom.mw;
        // we should check if we can reach the target
        if (currentAtom.targetEA && currentAtom.aw / currentAtom.mw - currentAtom.targetEA < -maxElementError) {
          // we already don't have enough quantity of this element and it can only become worse
          continue;
        }
        if (currentPosition < possibilities.length - 1) {
          currentPosition++;
        } else {
          break;
        }
      } else {
        currentAtom.currentCount = currentAtom.minCount - 1;
        currentPosition--;
      }
    }
    if (currentPosition < 0) {
      break;
    }
    if (results.info.numberMFEvaluated++ > maxIterations) {
      throw new Error(`Iteration number is over the current maximum of: ${maxIterations}`);
    }
    if (filterUnsaturation) {
      let unsaturationValue = 0;
      for (const possibility of possibilities) {
        unsaturationValue += possibility.unsaturation * possibility.currentCount;
      }
      let isOdd = Math.abs(unsaturationValue % 2);
      if (unsaturation.onlyInteger && isOdd === 1 || unsaturation.onlyNonInteger && isOdd === 0 || fakeMinUnsaturation > unsaturationValue || fakeMaxUnsaturation < unsaturationValue) {
        continue;
      }
    }
    let mw = currentAtom.mw;
    if (mw < minMW || mw > maxMW) continue;
    let totalError = 0;
    for (let i = 0; i < possibilities.length; i++) {
      const possibility = possibilities[i];
      let ratio = possibility.mass * possibility.currentCount / mw;
      if (possibility.targetEA !== undefined) {
        let error = Math.abs(possibility.targetEA - ratio);
        if (error > maxElementError) {
          continue mfWhile;
        }
        totalError += error;
      }
      possibility.currentValue = ratio;
    }
    if (Number.isNaN(totalError) || totalError > maxTotalError) continue;
    results.mfs.push(getResult(possibilities, totalError, orderMapping));
    results.info.numberResults++;
  }
  results.mfs.sort((a, b) => Math.abs(a.totalError) - Math.abs(b.totalError));
  return results;
}
function getResult(possibilities, totalError, orderMapping) {
  const result = {
    mf: '',
    totalError
  };
  // we check that the first time we meet the ionization group it does not end
  // in the final result
  for (let i = 0; i < possibilities.length; i++) {
    let possibility = possibilities[orderMapping[i]];
    if (possibility.currentCount !== 0) {
      if (possibility.isGroup) {
        result.mf += `(${possibility.mf})`;
        if (possibility.currentCount !== 1) {
          result.mf += possibility.currentCount;
        }
      } else {
        result.mf += possibility.mf;
        if (possibility.currentCount !== 1) {
          result.mf += possibility.currentCount;
        }
      }
    }
    result.ea = possibilities.map(current => ({
      mf: current.mf,
      value: current.currentValue,
      expected: current.targetEA,
      error: current.targetEA === undefined ? undefined : Math.abs(current.targetEA - current.currentValue)
    }));
  }
  return result;
}
function getOrderMapping(possibilities) {
  let mapping = possibilities.map((p, i) => ({
    atom: p.mf,
    index: i
  }));
  mapping.sort((a, b) => {
    return (0, atom_sorter_1.atomSorter)(a.atom, b.atom);
  });
  return mapping.map(a => a.index);
}

var src$3 = {};

var mfFromAtomicRatio$1 = {};

Object.defineProperty(mfFromAtomicRatio$1, "__esModule", {
  value: true
});
mfFromAtomicRatio$1.mfFromAtomicRatio = mfFromAtomicRatio;
const mf_generator_1$1 = src$b;
const mf_parser_1$1 = src$h;
/**
 * @typedef {object} AtomicRatioMF
 * @property {number} em
 * @property {number} mw
 * @property {string} mf
 * @property {Array<MFAtomicComposition>} mfAtomicComposition
 * @property {Array<AtomicRatio>} atomicRatios
 * @property {number} totalError
 */
/**
 * @typedef {object} MFAtomicComposition
 * @property {string} element
 * @property {number} count
 * @property {number} theoretical
 * @property {number} experimental
 * @property {number} error
 */
/**
 * @typedef {object} AtomicRatio
 * @property {string} element
 * @property {number} count
 * @property {number} theoretical
 */
/**
 * Returns possible combinations
 * @param {object} [ratios]
 * @param {object} [options={}]
 * @param {string} [options.ranges='C0-10 H0-10 O0-10 N0-10'] - range of mfs to search
 * @param {number} [options.maxElementError=0.05]
 * @param {number} [options.maxTotalError=0.1]
 * @param {number} [options.minMW=0] minimal molecular weight
 * @param {number} [options.maxMW=+Infinity] maximal molecular weight
 * @param {object} [options.unsaturation={}]
 * @param {number} [options.unsaturation.min=-Infinity] Minimal unsaturation
 * @param {number} [options.unsaturation.max=+Infinity] Maximal unsaturation
 * @param {boolean} [options.unsaturation.onlyInteger=false] Integer unsaturation
 * @param {boolean} [options.unsaturation.onlyNonInteger=false] Non integer unsaturation
 * @return {Promise<AtomicRatioMF[]>}
 */
async function mfFromAtomicRatio(ratios, options = {}) {
  const {
    unsaturation = {},
    minMW = 0,
    maxMW = +Infinity,
    ranges = 'C0-10 H0-10 O0-10 N0-10',
    maxElementError = 0.05,
    maxTotalError = 0.1
  } = options;
  const elements = Object.keys(ratios);
  const mfs = await (0, mf_generator_1$1.generateMFs)([ranges], {
    limit: 1e7,
    filter: {
      minMW,
      maxMW,
      unsaturation
    }
  });
  let sumComposition = 0;
  for (const element of elements) {
    sumComposition += ratios[element];
  }
  const relativeComposition = {};
  for (const element of elements) {
    relativeComposition[element] = ratios[element] / sumComposition;
  }
  for (const mf of mfs) {
    appendInfo(mf, elements);
  }
  const filteredMFs = [];
  mfFor: for (const mf of mfs) {
    if (mf.nbCompositionAtoms === 0) {
      continue;
    }
    mf.totalError = 0;
    const atomicRatios = [];
    for (const element of elements) {
      const error = mf.atomicRatio[element] - relativeComposition[element];
      let absError = Math.abs(error);
      if (absError > maxElementError) {
        continue mfFor;
      }
      mf.totalError += absError;
      atomicRatios.push({
        element,
        experimental: mf.atomicRatio[element],
        count: mf.atoms[element] || 0,
        theoretical: relativeComposition[element],
        error
      });
    }
    if (mf.totalError > maxTotalError) {
      continue;
    }
    filteredMFs.push({
      em: mf.em,
      mw: mf.mw,
      mf: mf.mf,
      mfAtomicComposition: getMFAtomicComposition(mf.atoms),
      atomicRatios,
      totalError: mf.totalError
    });
  }
  filteredMFs.sort((a, b) => Math.abs(a.totalError) - Math.abs(b.totalError));
  return filteredMFs;
}
function getMFAtomicComposition(atoms) {
  const nbAtoms = Object.values(atoms).reduce((acc, val) => acc + val, 0);
  const composition = [];
  for (const [element, count] of Object.entries(atoms)) {
    composition.push({
      element,
      count,
      theoretical: count / nbAtoms
    });
  }
  return composition;
}
function appendInfo(mf, elements) {
  const mfInfo = new mf_parser_1$1.MF(mf.mf).getInfo();
  let nbCompositionAtoms = 0;
  for (const element of elements) {
    nbCompositionAtoms += mfInfo.atoms[element] || 0;
  }
  mf.nbCompositionAtoms = nbCompositionAtoms;
  mf.atomicRatio = {};
  for (const element of elements) {
    mf.atomicRatio[element] = (mfInfo.atoms[element] || 0) / nbCompositionAtoms;
  }
}

(function (exports) {

  var __createBinding = src$3 && src$3.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$3 && src$3.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(mfFromAtomicRatio$1, exports);
})(src$3);

var src$2 = {};

var OctoChemDB$1 = {};

var activeOrNaturalDetails$1 = {};

var appendURLs$1 = {};

var appendAllDBRefs$1 = {};

Object.defineProperty(appendAllDBRefs$1, "__esModule", {
  value: true
});
appendAllDBRefs$1.appendAllDBRefs = appendAllDBRefs;
function appendAllDBRefs(object, allDBRefs) {
  if (Array.isArray(object)) {
    for (let item of object) {
      appendAllDBRefs(item, allDBRefs);
    }
  } else if (typeof object === 'object' && object !== null) {
    if (object.$ref && object.$id) {
      allDBRefs.push(object);
    }
    for (let key of Object.keys(object)) {
      appendAllDBRefs(object[key], allDBRefs);
    }
  }
}

Object.defineProperty(appendURLs$1, "__esModule", {
  value: true
});
appendURLs$1.appendURLs = appendURLs;
const appendAllDBRefs_js_1$1 = appendAllDBRefs$1;
async function appendURLs(object, options = {}) {
  const {
    collections,
    force = false
  } = options;
  let allDBRefs = [];
  (0, appendAllDBRefs_js_1$1.appendAllDBRefs)(object, allDBRefs);
  if (collections) {
    allDBRefs = allDBRefs.filter(dbRef => collections.includes(dbRef.$ref));
  }
  if (!force) {
    allDBRefs = allDBRefs.filter(dbRef => !dbRef.url);
  }
  const unknowns = {};
  for (const entry of allDBRefs) {
    switch (entry.$ref) {
      case 'compounds':
        entry.url = `https://pubchem.ncbi.nlm.nih.gov/compound/${entry.$id}`;
        break;
      case 'pubmeds':
        entry.url = `https://pubmed.ncbi.nlm.nih.gov/${entry.$id}`;
        break;
      case 'gnps':
        entry.url = `https://gnps.ucsd.edu/ProteoSAFe/gnpslibraryspectrum.jsp?SpectrumID=${entry.$id}`;
        break;
      case 'patents':
        entry.url = `https://pubchem.ncbi.nlm.nih.gov/patent/${entry.$id}`;
        break;
      case 'bioassays':
        entry.url = `https://pubchem.ncbi.nlm.nih.gov/bioassay/${entry.$id.replace(/.*_/, '')}`;
        break;
      case 'npasses':
        entry.url = `https://bidd.group/NPASS/compound.php?compoundID=${entry.$id}`;
        break;
      case 'cmaups':
        entry.url = `https://bidd.group/CMAUP/ingredient.php?ingredient=${entry.$id}`;
        break;
      case 'coconuts':
        entry.url = `https://coconut.naturalproducts.net/compound/coconut_id/${entry.$id}`;
        break;
      case 'lotuses':
        entry.url = `https://lotus.naturalproducts.net/compound/lotus_id/${entry.$id}`;
        break;
      case 'npAtlases':
        entry.url = `https://www.npatlas.org/explore/compounds/${entry.$id}`;
        break;
      case 'massBank':
        entry.url = `https://massbank.eu/MassBank/RecordDisplay?id=${entry.$id}`;
        break;
      default:
        unknowns[entry.$ref] = true;
        break;
    }
  }
  if (Object.keys(unknowns).length > 0) {
    // eslint-disable-next-line no-console
    console.error('Unknown url to original data for the following collections:', unknowns);
  }
}

var fetchJSON$1 = {};

Object.defineProperty(fetchJSON$1, "__esModule", {
  value: true
});
fetchJSON$1.fetchJSON = fetchJSON;
async function fetchJSON(url, data) {
  if (data) {
    try {
      const searchParams = new URLSearchParams(data);
      const result = await fetch(`${url}?${searchParams.toString()}`);
      return result.json();
    } catch {
      const searchParams = new URLSearchParams(data);
      const result = await fetch(`${url}?${searchParams.toString()}`);
      return result.json();
    }
  } else {
    const result = await fetch(url);
    return result.json();
  }
}

var includeDBRefs$1 = {};

var postFetchJSON$1 = {};

Object.defineProperty(postFetchJSON$1, "__esModule", {
  value: true
});
postFetchJSON$1.postFetchJSON = postFetchJSON;
async function postFetchJSON(url, data = {}) {
  const formData = new FormData();
  for (const name in data) {
    formData.append(name, data[name]);
  }
  const result = await fetch(url, {
    method: 'POST',
    body: formData
  });
  return result.json();
}

Object.defineProperty(includeDBRefs$1, "__esModule", {
  value: true
});
includeDBRefs$1.includeDBRefs = includeDBRefs;
const appendAllDBRefs_js_1 = appendAllDBRefs$1;
const postFetchJSON_js_1$1 = postFetchJSON$1;
/**
 * Load the DBrefs and create a new property `data` for each DBRef
 * @param {any} object
 * @param {object} [options={}]
 * @param {string[]} [options.collections] - List of collections to include
 * @param {string[]} [options.excludedCollections] - List of collections to include
 * @param {boolean} [options.force=false] - Force the inclusion of the data even if it is already present
 * @param {string} [options.baseURL='https://octochemdb.cheminfo.org/'] - URL of the webservice
 */
async function includeDBRefs(object, options = {}) {
  const {
    collections,
    excludedCollections,
    force = false,
    baseURL = 'https://octochemdb.cheminfo.org/'
  } = options;
  let allDBRefs = [];
  (0, appendAllDBRefs_js_1.appendAllDBRefs)(object, allDBRefs);
  if (collections) {
    allDBRefs = allDBRefs.filter(dbRef => collections.includes(dbRef.$ref));
  }
  if (excludedCollections) {
    allDBRefs = allDBRefs.filter(dbRef => !excludedCollections.includes(dbRef.$ref));
  }
  if (!force) {
    allDBRefs = allDBRefs.filter(dbRef => !dbRef.data);
  }
  const groups = groupsByCollection(allDBRefs);
  const promises = [];
  for (const [collection, entries] of Object.entries(groups)) {
    promises.push(addDataForOneCollection(collection, baseURL, entries));
  }
  await Promise.allSettled(promises);
}
async function addDataForOneCollection(collection, baseURL, entries) {
  const url = new URL(`${collection}/v1/ids`, baseURL).toString();
  const searchParams = {
    ids: entries.map(entry => entry.$id).join(',')
  };
  const data = {};
  const result = await (0, postFetchJSON_js_1$1.postFetchJSON)(url, searchParams);
  if (!result.data) {
    throw new Error(`No data for ${url}`);
  }
  for (const entry of result.data) {
    data[entry._id] = entry.data;
  }
  for (let datum of entries) {
    datum.data = data[datum.$id];
  }
}
function groupsByCollection(allDBRefs) {
  const groups = {};
  for (let dbRef of allDBRefs) {
    if (!groups[dbRef.$ref]) groups[dbRef.$ref] = [];
    groups[dbRef.$ref].push(dbRef);
  }
  return groups;
}

var normalizeActivities$1 = {};

Object.defineProperty(normalizeActivities$1, "__esModule", {
  value: true
});
normalizeActivities$1.normalizeActivities = normalizeActivities;
/**
 * @description This function normalizes the activities of an entry of ActivesOrNaturals collection.
 * @param {Object} activeOrNatural - an entry of ActivesOrNaturals collection
 * @returns - ActiveOrNatural entry with normalized activities
 */
function normalizeActivities(activeOrNatural) {
  activeOrNatural = {
    ...activeOrNatural
  };
  let activities = [];
  for (let activity of activeOrNatural.data.activities) {
    if (activity?.data?.activities !== undefined) {
      for (let activityEntry of activity.data.activities) {
        let normalizedActivity = {
          $ref: activity.$ref,
          $id: activity.$id,
          data: {
            ...activityEntry,
            ocl: activity.data.ocl
          },
          url: activity.url
        };
        if (activityEntry?.targetTaxonomies !== undefined) {
          normalizedActivity.data.targetTaxonomies = [activityEntry.targetTaxonomies];
        }
        activities.push(normalizedActivity);
      }
    } else {
      activities.push(activity);
    }
  }
  activeOrNatural.data.activities = activities;
  return activeOrNatural;
}

Object.defineProperty(activeOrNaturalDetails$1, "__esModule", {
  value: true
});
activeOrNaturalDetails$1.activeOrNaturalDetails = activeOrNaturalDetails;
const appendURLs_js_1$1 = appendURLs$1;
const fetchJSON_js_1$5 = fetchJSON$1;
const includeDBRefs_js_1$2 = includeDBRefs$1;
const normalizeActivities_js_1 = normalizeActivities$1;
/**
 * Search for a specific natural or active compound using its ID
 * @param {object} [options={}]
 * @param {string} [options.fields='_id,data'] - List of fields to retrieve
 * @param {string} [options.route='activesOrNaturals/v1/id'] - URL of the webservice
 * @param {string} [options.baseURL='https://octochemdb.cheminfo.org/'] - URL of the webservice
 */
async function activeOrNaturalDetails(id, options = {}) {
  const {
    route = 'activesOrNaturals/v1/id',
    baseURL = 'https://octochemdb.cheminfo.org/',
    fields = '_id,data'
  } = options;
  const activeOrNatural = await fetchActiveOrNatural(id, {
    url: new URL(route, baseURL).toString(),
    fields
  });
  await (0, includeDBRefs_js_1$2.includeDBRefs)(activeOrNatural, {
    baseURL
  });
  ensureArray(activeOrNatural);
  (0, appendURLs_js_1$1.appendURLs)(activeOrNatural);
  (0, normalizeActivities_js_1.normalizeActivities)(activeOrNatural);
  return activeOrNatural;
}
function ensureArray(activeOrNatural) {
  if (!activeOrNatural.data.activities) {
    activeOrNatural.data.activities = [];
  }
  if (!activeOrNatural.data.pubmeds) {
    activeOrNatural.data.pubmeds = [];
  }
  if (!activeOrNatural.data.patents) {
    activeOrNatural.data.patents = [];
  }
  if (!activeOrNatural.data.taxonomies) {
    activeOrNatural.data.taxonomies = [];
  }
}
async function fetchActiveOrNatural(id, options) {
  const {
    fields,
    url
  } = options;
  const searchParams = {
    id
  };
  if (fields) {
    searchParams.fields = fields;
  }
  const results = await (0, fetchJSON_js_1$5.fetchJSON)(url, searchParams);
  return results.data;
}

var activesOrNaturals$1 = {};

var parseMasses$1 = {};

Object.defineProperty(parseMasses$1, "__esModule", {
  value: true
});
parseMasses$1.parseMasses = parseMasses;
function parseMasses(masses) {
  if (!masses) return [];
  if (Array.isArray(masses)) return masses;
  if (typeof masses === 'number') {
    return [masses];
  }
  if (typeof masses === 'string') {
    return masses.split(/[\t\n\r ,;]+/).filter(Boolean).map(Number);
  }
  throw new Error('Cannot parse masses');
}

var searchWithIonizations$1 = {};

var getAllowedEMs$1 = {};

Object.defineProperty(getAllowedEMs$1, "__esModule", {
  value: true
});
getAllowedEMs$1.getAllowedEMs = getAllowedEMs;
const mf_finder_1 = src$e;
async function getAllowedEMs(options) {
  const {
    ranges,
    masses,
    precision,
    ionizations
  } = options;
  if (!ranges) return;
  const allowedEMs = [];
  for (let mass of masses) {
    const {
      mfs
    } = await (0, mf_finder_1.findMFs)(mass, {
      ionizations,
      precision,
      ranges,
      limit: 100000
    });
    for (const mf of mfs) {
      allowedEMs.push(mf.em);
    }
  }
  return Float64Array.from(allowedEMs).toSorted();
}

Object.defineProperty(searchWithIonizations$1, "__esModule", {
  value: true
});
searchWithIonizations$1.searchWithIonizations = searchWithIonizations;
const chemical_elements_1 = src$j;
const mf_parser_1 = src$h;
const mf_utilities_1$1 = src$i;
const fetchJSON_js_1$4 = fetchJSON$1;
const getAllowedEMs_js_1 = getAllowedEMs$1;
const parseMasses_js_1$2 = parseMasses$1;
async function searchWithIonizations(options) {
  const {
    realURL,
    fields,
    precision = 100,
    limit = 1000,
    searchParams = {},
    ranges
  } = options;
  searchParams.precision = String(precision);
  searchParams.limit = String(limit);
  if (fields) searchParams.fields = fields;
  let ionizations = (0, mf_utilities_1$1.preprocessIonizations)(options.ionizations);
  const masses = (0, parseMasses_js_1$2.parseMasses)(options.masses || [0]);
  // if we have ranges we need to filter the allowed EMs
  const allowedEMs = await (0, getAllowedEMs_js_1.getAllowedEMs)({
    ranges,
    masses,
    precision,
    ionizations
  });
  const promises = [];
  for (let ionization of ionizations) {
    for (let mass of masses) {
      if (mass !== 0) {
        const realMass = mass * Math.abs(ionization.charge || 1) - ionization.em + chemical_elements_1.ELECTRON_MASS * ionization.charge;
        searchParams.em = String(realMass);
      }
      promises.push((0, fetchJSON_js_1$4.fetchJSON)(realURL, searchParams));
    }
  }
  const results = await Promise.all(promises);
  const entries = [];
  let counter = 0;
  for (const result of results) {
    const ionization = ionizations[Math.floor(counter / masses.length)];
    const targetMass = masses[counter % masses.length];
    counter++;
    for (const entry of result.data) {
      if (allowedEMs && !allowedEMs.some(em => Math.abs(em - entry.data.em) < 0.0000001)) {
        continue;
      }
      try {
        entry.mfInfo = new mf_parser_1.MF(entry.data?.mf || entry._id).getInfo({
          emFieldName: 'em',
          msemFieldName: 'msem'
        });
        entry.ionization = ionization;
        entry.ms = (0, mf_utilities_1$1.getMsInfo)(entry.mfInfo, {
          targetMass,
          ionization
        }).ms;
        entries.push(entry);
      } catch (error) {
        // eslint-disable-next-line no-console
        console.warn(`${error}`);
      }
    }
  }
  if (entries.length > limit) {
    entries.length = limit;
  }
  return entries;
}

Object.defineProperty(activesOrNaturals$1, "__esModule", {
  value: true
});
activesOrNaturals$1.activesOrNaturals = activesOrNaturals;
const appendURLs_js_1 = appendURLs$1;
const includeDBRefs_js_1$1 = includeDBRefs$1;
const parseMasses_js_1$1 = parseMasses$1;
const searchWithIonizations_js_1$2 = searchWithIonizations$1;
/**
 * Search for natural or active compounds using various criteria
 * @param {object} [options={}]
 * @param {number|string|number[]} [options.masses] - Observed monoisotopic mass
 * @param {string} [options.noStereoTautomerID=''] - ID of the compound to search from the results
 * @param {string} [options.ionizations=''] - string containing a comma separated list of modifications
 * @param {string} [options.ranges=''] - Allows to filter by a range of molecular formula
 * @param {string} [options.mf=''] - Search by molecular formula
 * @param {number} [options.precision=1000] - Precision of the monoisotopic mass in ppm
 * @param {string} [options.fields] - List of fields to retrieve
 * @param {string} [options.kwTaxonomies=''] - Comma separated list of taxonomies family, genus or species of the product source
 * @param {string} [options.kwActiveAgainst=''] - Comma separated list of taxonomies family, genus or species of the bioactivity target
 * @param {string} [options.kwBioassays=''] - Comma separated list of keyword from the description of the bioassay
 * @param {string} [options.kwMeshTerms=''] - Comma separated list of keyword from the medline MeshTerms
 * @param {string} [options.kwTitles=''] - Comma separated list of keyword from the compound title
 * @param {string} [options.minNbMassSpectra] - Minimal number of mass spectra
 * @param {number} [options.limit=1000] - Maximal number of entries to return
 * @param {string} [options.route='activesOrNaturals/v1/search'] - Route to this specific webservice
 * @param {string[]|undefined} [options.includes] - Array of DBref collections to include
 * @param {string} [options.baseURL='https://octochemdb.cheminfo.org/'] - Base URL of the webservice
 */
async function activesOrNaturals(options = {}) {
  const {
    route = 'activesOrNaturals/v1/search',
    baseURL = 'https://octochemdb.cheminfo.org/',
    includes
  } = options;
  const realURL = new URL(route, baseURL).toString();
  const searchParams = prepareSearchParams(options);
  const masses = (0, parseMasses_js_1$1.parseMasses)(options.masses || [0]);
  const entries = await (0, searchWithIonizations_js_1$2.searchWithIonizations)({
    ...options,
    masses,
    realURL,
    searchParams
  });
  if (includes) {
    await (0, includeDBRefs_js_1$1.includeDBRefs)(entries, {
      baseURL,
      collections: includes
    });
  }
  (0, appendURLs_js_1.appendURLs)(entries);
  entries.sort((a, b) => {
    if (a.data.nbMassSpectra > b.data.nbMassSpectra) return -1;
    if (a.data.nbMassSpectra < b.data.nbMassSpectra) return 1;
    if (a.data.nbPubmeds > b.data.nbPubmeds) return -1;
    if (a.data.nbPubmeds < b.data.nbPubmeds) return 1;
    if (a.data.nbPatents > b.data.nbPatents) return -1;
    if (a.data.nbPatents < b.data.nbPatents) return 1;
    return 0;
  });
  return entries;
}
function prepareSearchParams(options) {
  const {
    noStereoTautomerID,
    kwTaxonomies,
    kwActiveAgainst,
    kwBioassays,
    kwMeshTerms,
    kwTitles,
    mf,
    minNbMassSpectra
  } = options;
  const searchParams = {};
  if (noStereoTautomerID) {
    searchParams.noStereoTautomerID = noStereoTautomerID;
  }
  if (kwTaxonomies) {
    searchParams.kwTaxonomies = kwTaxonomies;
  }
  if (kwActiveAgainst) {
    searchParams.kwActiveAgainst = kwActiveAgainst;
  }
  if (kwBioassays) {
    searchParams.kwBioassays = kwBioassays;
  }
  if (kwMeshTerms) {
    searchParams.kwMeshTerms = kwMeshTerms;
  }
  if (kwTitles) {
    searchParams.kwTitles = kwTitles;
  }
  if (mf) {
    searchParams.mf = mf;
  }
  if (minNbMassSpectra) {
    searchParams.minNbMassSpectra = minNbMassSpectra;
  }
  return searchParams;
}

var activesOrNaturalsByMF$1 = {};

Object.defineProperty(activesOrNaturalsByMF$1, "__esModule", {
  value: true
});
activesOrNaturalsByMF$1.activesOrNaturalsByMF = activesOrNaturalsByMF;
const activesOrNaturals_js_1$1 = activesOrNaturals$1;
/**
 * Search for natural or active compounds and group them by molecular formula
 * @param {object} [options={}]
 * @param {number|string|number[]} [options.masses] - Observed monoisotopic mass
 * @param {string} [options.ionizations=''] - string containing a comma separated list of modifications
 * @param {string} [options.ranges=''] - Allows to filter by a range of molecular formula
 * @param {number} [options.precision=1000] - Precision (accuracy) of the monoisotopic mass in ppm
 * @param {string} [options.fields='data.noStereoOcl,data.em,data.mf'] - List of fields to retrieve
 * @param {string} [options.kwTaxonomies=''] - Comma separated list of taxonomies family, genus or species of the product source
 * @param {string} [options.kwActiveAgainst=''] - Comma separated list of taxonomies family, genus or species of the bioactivity target
 * @param {string} [options.kwBioassays=''] - Comma separated list of keyword from the description of the bioassay
 * @param {string} [options.kwMeshTerms=''] - Comma separated list of keyword from the medline MeshTerms
 * @param {string} [options.kwTitles=''] - Comma separated list of keyword from compound title
 * @param {number} [options.limit=1000] - Maximal number of entries to return
 * @param {string} [options.route='activesOrNaturals/v1/search'] - URL of the webservice
 * @param {string} [options.baseURL='https://octochemdb.cheminfo.org/'] - URL of the webservice
 */
async function activesOrNaturalsByMF(options = {}) {
  const fields = 'data.noStereoOcl,data.mf,data.em,data.nbPatents,data.nbPubmeds,data.nbActivities,data.bioactive,data.nbMassSpectra,data.naturalProduct'.split(',');
  if (options.fields) fields.push(...options.fields.split(/[ ,]+/));
  const entries = await (0, activesOrNaturals_js_1$1.activesOrNaturals)({
    ...options,
    fields: fields.join(',')
  });
  // we will now group the data per mf
  const grouped = {};
  for (const entry of entries) {
    if (!grouped[entry.data.mf]) {
      grouped[entry.data.mf] = {
        mfInfo: entry.mfInfo,
        ms: entry.ms,
        ionization: entry.ionization,
        nbNaturals: 0,
        nbBioactives: 0,
        nbPatents: 0,
        nbPubmeds: 0,
        nbMassSpectra: 0
      };
    }
    const currentGroup = grouped[entry.data.mf];
    if (entry.data.naturalProduct) currentGroup.nbNaturals++;
    if (entry.data.bioactive) currentGroup.nbBioactives++;
    if (entry.data.nbMassSpectra) {
      currentGroup.nbMassSpectra += entry.data.nbMassSpectra;
    }
    if (entry.data.nbPubmeds) currentGroup.nbPubmeds += entry.data.nbPubmeds;
    if (entry.data.nbPatents) currentGroup.nbPatents += entry.data.nbPatents;
  }
  const groupedArray = Object.keys(grouped).map(key => grouped[key]);
  // because we can combine many ionizations we should resort the data
  groupedArray.sort((a, b) => Math.abs(a.ms.ppm) - Math.abs(b.ms.ppm));
  return groupedArray;
}

var compoundsFromMF$1 = {};

Object.defineProperty(compoundsFromMF$1, "__esModule", {
  value: true
});
compoundsFromMF$1.compoundsFromMF = compoundsFromMF;
const fetchJSON_js_1$3 = fetchJSON$1;
const postFetchJSON_js_1 = postFetchJSON$1;
/**
 * Retrieve a list of molecular formulas from one or many monoisotopic mass that are present in pubchem compound.
 * in the database and a monoisotopic mass.
 * @param {string} mf - Observed monoisotopic mass
 * @param {object} [options={}]
 * @param {string} [options.fields] - Fields to retrieve from the database
 * @param {string} [options.baseURL='https://octochemdb.cheminfo.org/'] - URL of the webservice
 * @param {string} [options.route='mfs/v1/fromMF'] - URL of the webservice
 * @param {string} [options.titleCompoundsURL='titleCompounds/v1/ids'] - URL of the webservice
 * @param {number} [options.limit=50000] - Maximal number of entries to return
 */
async function compoundsFromMF(mf, options = {}) {
  const {
    route = 'compounds/v1/fromMF',
    baseURL = 'https://octochemdb.cheminfo.org/',
    limit = 50000,
    fields = 'data.ocl.idCode,data.ocl.index,data.iupac'
  } = options;
  const searchParams = {
    limit,
    fields,
    mf
  };
  const realURL = new URL(route, baseURL).toString();
  const {
    data
  } = await (0, fetchJSON_js_1$3.fetchJSON)(realURL, searchParams);
  const ids = data.map(datum => datum._id);
  const titles = await getTitles(ids, options);
  for (const datum of data) {
    if (titles[datum._id]) datum.data.title = titles[datum._id];
  }
  data.sort((a, b) => (a.data.title?.length || Number.MAX_SAFE_INTEGER) - (b.data.title?.length || Number.MAX_SAFE_INTEGER));
  return data;
}
async function getTitles(ids, options) {
  let {
    titleCompoundsURL = 'titleCompounds/v1/ids',
    baseURL = 'https://octochemdb.cheminfo.org/'
  } = options;
  const titlesURL = new URL(titleCompoundsURL, baseURL).toString();
  const {
    data: titlesArray
  } = await (0, postFetchJSON_js_1.postFetchJSON)(titlesURL, {
    ids
  });
  const titles = {};
  for (const entry of titlesArray) {
    if (entry.data.title.match(/CID /)) continue;
    titles[entry._id] = entry.data.title;
  }
  return titles;
}

var massSpectra$1 = {};

var searchMasses$1 = {};

Object.defineProperty(searchMasses$1, "__esModule", {
  value: true
});
searchMasses$1.searchMasses = searchMasses;
const mf_utilities_1 = src$i;
const fetchJSON_js_1$2 = fetchJSON$1;
const parseMasses_js_1 = parseMasses$1;
/**
 *
 * @param {object} [options={}]
 * @param {string} [options.baseURL='https://octochemdb.cheminfo.org/'] - URL of the webservice
 * @param {number|string|number[]} [options.masses] - Observed fragment masses
 * @param {string} [options.mf] - Molecular formula of the non ionized molecule (not available for inSilicoFragments)
 * @param {number} [options.precision=100] - Precision (accuracy) of the monoisotopic mass in ppm
 * @param {number} [options.limit=1000] - Maximal number of entries to return
 * @param {string} [options.modifications=''] - Comma separated list of allowed modifications
 * @param {string} [options.route='massBank/v1/search'] - Route to use
 * @param {string} [options.link='https://massbank.eu/MassBank/RecordDisplay?id='] - Link to the database source
 */
async function searchMasses(options = {}) {
  const {
    route = 'massBank/v1/search',
    baseURL = 'https://octochemdb.cheminfo.org/',
    precision = 100,
    limit = 1000,
    mf = '',
    link = ''
  } = options;
  if (route === '') {
    throw new Error('route is mandatory');
  }
  const realURL = new URL(route, baseURL).toString();
  const masses = (0, parseMasses_js_1.parseMasses)(options.masses);
  const modifications = (0, mf_utilities_1.preprocessIonizations)(options.modifications);
  const allResults = [];
  for (let modification of modifications) {
    const massShift = modification.em;
    const searchParams = {
      masses: masses.map(mass => mass + massShift).join(','),
      precision,
      limit,
      mf
    };
    const {
      data: results
    } = await (0, fetchJSON_js_1$2.fetchJSON)(realURL, searchParams);
    for (const result of results) {
      const modifiedResult = {
        ...result,
        modification
      };
      if (link !== '') {
        modifiedResult.url = link + result._id;
      }
      allResults.push(modifiedResult);
    }
  }
  return allResults;
}

/**
 * This method will retrieve similar mass spectra
 * @param {object} [options={}]
 * @param {string} [options.baseURL='https://octochemdb.cheminfo.org/'] - URL of the webservice
 * @param {number|string|number[]} [options.masses] - Observed monoisotopic mass
 * @param {number} [options.precision=1000] - Precision (accuracy) of the monoisotopic mass in ppm
 * @param {number} [options.limit=1000] - Maximal number of entries to return
 * @param {string} [options.modifications=''] - Comma
 * @param {('massBank'|'gnps'|'inSilicoFragments')[]} [options.databases=['massBank','gnps']] - List of databases to search for mass spectra
 * @param {object} [options.routes] - Object that contains the routes to use for each database
 * @param {boolean} [options.uniqueMolecules=true] - If true, only one molecule per entry is returned
 * @param {object} [options.similarity={}]
 * @param {number} [options.similarity.nbPeaks=5] - Number of peaks to use for the similarity
 * @param {number} [options.similarity.massPower=1] - Power to use for the mass
 * @param {number} [options.similarity.minSimilarity=0.2] - Minimal similarity to return
 * @param {number} [options.similarity.intensityPower=0.6] - Power to use for the intensity
 * @param {number} [options.similarity.minNbCommonPeaks=0] - Minimal number of common peaks
 * @param {{x:number[],y:number[]}} [options.similarity.experimental=[]] - Experimental mass spectra to compare to
 *
 */
Object.defineProperty(massSpectra$1, "__esModule", {
  value: true
});
massSpectra$1.massSpectra = massSpectra;
const ms_spectrum_1$2 = src$k;
const searchMasses_js_1$1 = searchMasses$1;
const defaultRoutes = [{
  name: 'massBank',
  url: 'https://octochemdb.cheminfo.org/massBank/v1/search',
  link: 'https://massbank.eu/MassBank/RecordDisplay?id='
}, {
  name: 'gnps',
  url: 'https://octochemdb.cheminfo.org/gnps/v1/search',
  link: 'https://gnps.ucsd.edu/ProteoSAFe/gnpslibraryspectrum.jsp?SpectrumID='
}, {
  name: 'inSilicoFragments',
  url: 'https://octochemdb.cheminfo.org/inSilicoFragments/v1/search'
}];
async function massSpectra(options = {}) {
  const {
    uniqueMolecules = true,
    databases = ['massBank', 'gnps'],
    routes = defaultRoutes
  } = options;
  const promises = [];
  for (const route of routes) {
    if (databases && databases.includes(route.name)) {
      promises.push((0, searchMasses_js_1$1.searchMasses)({
        ...options,
        route: route.url,
        link: route.link
      }).then(entries => entries.map(entry => ({
        ...entry,
        database: route.name
      }))));
    }
  }
  const allResults = await Promise.all(promises);
  let results = allResults.flat();
  results = appendAndFilterSimilarity(results, options);
  if (uniqueMolecules) {
    results = uniqueMol(results);
  }
  return results;
}
function uniqueMol(results) {
  const unique = {};
  for (const result of results) {
    if (!result.data?.ocl?.idCode) continue;
    if (!unique[result.data.ocl.idCode]) {
      unique[result.data.ocl.idCode] = result;
    }
  }
  return Object.values(unique);
}
function appendAndFilterSimilarity(results, options = {}) {
  const {
    similarity
  } = options;
  if (!similarity || !similarity.experimental) return results;
  const {
    experimental,
    nbPeaks = 5,
    massPower = 1,
    minSimilarity = 0.2,
    intensityPower = 0.6,
    minNbCommonPeaks = 0
  } = similarity;
  const precision = Number(options.precision) / 1e6;
  const comparator = new ms_spectrum_1$2.MSComparator({
    nbPeaks,
    massPower,
    intensityPower,
    delta: mass => mass * precision,
    minNbCommonPeaks
  });
  for (const result of results) {
    result.similarity = comparator.getSimilarity(experimental, structuredClone(result.data.spectrum.data));
  }
  results = results.filter(a => a.similarity.cosine >= minSimilarity);
  results.sort((a, b) => b.similarity.cosine - a.similarity.cosine);
  return results;
}

var mfsFromEMs$1 = {};

Object.defineProperty(mfsFromEMs$1, "__esModule", {
  value: true
});
mfsFromEMs$1.mfsFromEMs = mfsFromEMs;
const searchWithIonizations_js_1$1 = searchWithIonizations$1;
/**
 * Retrieve a list of molecular formulas from one or many monoisotopic mass that are present in pubchem compound.
 * in the database and a monoisotopic mass.
 * @param {number|string|number[]} masses - Observed monoisotopic mass
 * @param {object} [options={}]
 * @param {string} [options.ionizations=''] - string containing a comma separated list of modifications
 * @param {number} [options.precision=1000] - Precision (accuracy) of the monoisotopic mass in ppm
 * @param {string} [options.ranges=''] - Range of allowed molecular formula
 * @param {number} [options.limit=1000] - Maximal number of entries to return
 * @param {number} [options.minCount=5] - Minimal number of molecules having a specific MF
 * @param {number} [options.fields] - Fields to retrieve from the database
 * @param {string} [options.baseURL='https://octochemdb.cheminfo.org/'] - URL of the webservice
 * @param {string} [options.route='mfs/v1/fromEM'] - URL of the webservice
 * @param {string} [options.compoundsURL='mfs/v1/fromMF'] - URL to retrieve corresponding compounds
 */
async function mfsFromEMs(masses, options = {}) {
  const {
    route = 'mfs/v1/fromEM',
    compoundsURL = 'compounds/v1/fromMF',
    baseURL = 'https://octochemdb.cheminfo.org/',
    minCount = 5
  } = options;
  const realURL = new URL(route, baseURL).toString();
  const searchParams = {
    minCount: String(minCount)
  };
  const entries = await (0, searchWithIonizations_js_1$1.searchWithIonizations)({
    ...options,
    masses,
    realURL,
    searchParams
  });
  const realCompoundsURL = new URL(compoundsURL, baseURL).toString();
  const searchParamsCompounds = new URLSearchParams();
  for (const entry of entries) {
    searchParamsCompounds.set('mf', String(entry._id));
    entry.compoundsURL = `${realCompoundsURL}?${searchParamsCompounds.toString()}`;
  }
  // because we can combine many ionizations we should resort the data
  entries.sort((a, b) => Math.abs(a.ms.ppm) - Math.abs(b.ms.ppm));
  return entries;
}

var pubmedCompounds$1 = {};

Object.defineProperty(pubmedCompounds$1, "__esModule", {
  value: true
});
pubmedCompounds$1.pubmedCompounds = pubmedCompounds;
const fetchJSON_js_1$1 = fetchJSON$1;
const includeDBRefs_js_1 = includeDBRefs$1;
/**
 * Retrieve the compounds from a pubmedID
 * @param {string} pubmedID
 * @param {object} [options={}]
 * @param {string} [options.route='pubmeds/v1/id'] - relative URL of the webservice
 * @param {string} [options.baseURL='https://octochemdb.cheminfo.org/'] - URL of the webservice
 * @param {number} [options.limit=1000] - Maximal number of entries to return
 * @returns
 */
async function pubmedCompounds(pubmedID, options = {}) {
  const {
    route = 'pubmeds/v1/id',
    baseURL = 'https://octochemdb.cheminfo.org/',
    limit = 1000
  } = options;
  const realURL = new URL(route, baseURL).toString();
  const searchParams = {
    id: pubmedID,
    fields: 'data.compounds',
    limit
  };
  const {
    data: results
  } = await (0, fetchJSON_js_1$1.fetchJSON)(realURL, searchParams);
  await (0, includeDBRefs_js_1.includeDBRefs)(results, {
    baseURL
  });
  return results.data.compounds;
}

var searchInSilicoSpectraByMF$1 = {};

Object.defineProperty(searchInSilicoSpectraByMF$1, "__esModule", {
  value: true
});
searchInSilicoSpectraByMF$1.searchInSilicoSpectraByMF = searchInSilicoSpectraByMF;
const ms_spectrum_1$1 = src$k;
const fetchJSON_js_1 = fetchJSON$1;
/**
 * @param {object} spectrum - The experimental spectrum to compare to
 * @param {string} mf - Molecular formula of the non ionized molecule
 * @param {object} [options={}]
 * @param {string} [options.baseURL='https://octochemdb.cheminfo.org/'] - URL of the webservice
 * @param {string} [options.mf] - Molecular formula of the non ionized molecule (not available for inSilicoFragments)
 * @param {number} [options.precision=100] - Precision (accuracy) of the monoisotopic mass in ppm
 * @param {number} [options.limit=1000] - Maximal number of entries to return
 * @param {number} [options.massPower=1000] - Maximal number of entries to return
 * @param {number} [options.massPower=3] - High power will give more weight to the mass. If you would prefer to observe fragments you should use a number less than 1
 * @param {number} [options.intensityPower=0.6] - How important is the intensity. By default we don't give to much importance to it
 * @param {string} [options.route='inSilicoFragments/v1/search'] - Route to use
 */
async function searchInSilicoSpectraByMF(spectrum, mf, options = {}) {
  const {
    route = 'inSilicoFragments/v1/search',
    baseURL = 'https://octochemdb.cheminfo.org/',
    precision = 100,
    limit = 1000,
    massPower = 3,
    intensityPower = 0.6
  } = options;
  if (!route) {
    throw new Error('route is mandatory');
  }
  if (!mf) {
    throw new Error('mf is mandatory');
  }
  const realURL = new URL(route, baseURL).toString();
  const searchParams = {
    limit,
    mf
  };
  const {
    data: results
  } = await (0, fetchJSON_js_1.fetchJSON)(realURL, searchParams);
  const msComparator = new ms_spectrum_1$1.MSComparator({
    delta: mass => mass * 1e-6 * precision,
    massPower,
    intensityPower
  });
  const finals = [];
  for (const result of results) {
    const similarity = msComparator.getSimilarityToMasses(spectrum, result.data.spectrum.data.x);
    if (similarity.cosine > 0) {
      finals.push({
        ...result,
        similarity
      });
    }
  }
  finals.sort((a, b) => b.similarity.cosine - a.similarity.cosine);
  return finals;
}

var searchInSilicoSpectraByMasses$1 = {};

Object.defineProperty(searchInSilicoSpectraByMasses$1, "__esModule", {
  value: true
});
searchInSilicoSpectraByMasses$1.searchInSilicoSpectraByMasses = searchInSilicoSpectraByMasses;
const ms_spectrum_1 = src$k;
const searchWithIonizations_js_1 = searchWithIonizations$1;
/**
 * @param {object} spectrum - The experimental spectrum to compare to
 * @param {number|string|number[]} [masses] - List of experimental monoisotopic mass
 * @param {object} [options={}]
 * @param {string} [options.baseURL='https://octochemdb.cheminfo.org/'] - URL of the webservice
 * @param {string} [options.mf] - Molecular formula of the non ionized molecule (not available for inSilicoFragments)
 * @param {number} [options.precision=100] - Precision (accuracy) of the monoisotopic mass in ppm
 * @param {string} [options.ionizations="H+"] - Comma separated list of allowed ionizations
 * @param {number} [options.limit=1000] - Maximal number of entries to return
 * @param {number} [options.massPower=1000] - Maximal number of entries to return
 * @param {number} [options.massPower=3] - High power will give more weight to the mass. If you would prefer to observe fragments you should use a number less than 1
 * @param {number} [options.intensityPower=0.6] - How important is the intensity. By default we don't give to much importance to it
 * @param {string} [options.route='inSilicoFragments/v1/search'] - Route to use
 * @param {object} [options.technique={}] - Technique used to generate the spectrum
 * @param {string} [options.technique.mode="positive"] - Mode of the acquisition
 * @param {string} [options.technique.ionization="esi"] - Ionization of the acquisition
 */
async function searchInSilicoSpectraByMasses(spectrum, masses, options = {}) {
  const {
    route = 'inSilicoFragments/v1/search',
    baseURL = 'https://octochemdb.cheminfo.org/',
    precision = 100,
    limit = 10000,
    massPower = 3,
    intensityPower = 0.6,
    ionizations = 'H+',
    technique = {}
  } = options;
  const {
    mode = 'positive',
    ionization = 'esi'
  } = technique;
  if (!route) {
    throw new Error('route is mandatory');
  }
  if (!masses) {
    throw new Error('masses is mandatory');
  }
  const realURL = new URL(route, baseURL).toString();
  let results = await (0, searchWithIonizations_js_1.searchWithIonizations)({
    precision,
    realURL,
    masses,
    limit,
    ionizations,
    searchParams: {
      mode,
      ionization
    }
  });
  const msComparator = new ms_spectrum_1.MSComparator({
    delta: mass => mass * 1e-6 * precision,
    massPower,
    intensityPower
  });
  const finals = [];
  // filter MDMA
  // results = results.filter(result => result.data.ocl.idCode === 'dg~D@MBdie]v\\kahHBjh@@')
  for (const result of results) {
    const similarity = msComparator.getSimilarityToMasses(spectrum, result.data.spectrum.data.x);
    if (similarity.cosine > 0) {
      finals.push({
        ...result,
        similarity
      });
    }
  }
  finals.sort((a, b) => b.similarity.cosine - a.similarity.cosine);
  return finals;
}

Object.defineProperty(OctoChemDB$1, "__esModule", {
  value: true
});
OctoChemDB$1.OctoChemDB = void 0;
const activeOrNaturalDetails_js_1 = activeOrNaturalDetails$1;
const activesOrNaturals_js_1 = activesOrNaturals$1;
const activesOrNaturalsByMF_js_1 = activesOrNaturalsByMF$1;
const compoundsFromMF_js_1 = compoundsFromMF$1;
const massSpectra_js_1 = massSpectra$1;
const mfsFromEMs_js_1 = mfsFromEMs$1;
const pubmedCompounds_js_1 = pubmedCompounds$1;
const searchInSilicoSpectraByMF_js_1 = searchInSilicoSpectraByMF$1;
const searchInSilicoSpectraByMasses_js_1 = searchInSilicoSpectraByMasses$1;
const searchMasses_js_1 = searchMasses$1;
class OctoChemDB {
  /**
   *
   * @param {*} options
   */
  constructor(options = {}) {
    this.baseURL = options.baseURL ?? 'https://octochemdb.cheminfo.org/';
  }
  async mfsFromEMs(masses, options = {}) {
    return (0, mfsFromEMs_js_1.mfsFromEMs)(masses, {
      baseURL: this.baseURL,
      ...options
    });
  }
  async compoundsFromMF(mf, options = {}) {
    return (0, compoundsFromMF_js_1.compoundsFromMF)(mf, {
      baseURL: this.baseURL,
      ...options
    });
  }
  async activesOrNaturals(options = {}) {
    return (0, activesOrNaturals_js_1.activesOrNaturals)({
      baseURL: this.baseURL,
      ...options
    });
  }
  async activesOrNaturalsByMF(options = {}) {
    return (0, activesOrNaturalsByMF_js_1.activesOrNaturalsByMF)({
      baseURL: this.baseURL,
      ...options
    });
  }
  async activeOrNaturalDetails(id, options = {}) {
    return (0, activeOrNaturalDetails_js_1.activeOrNaturalDetails)(id, {
      baseURL: this.baseURL,
      ...options
    });
  }
  async searchMasses(options = {}) {
    return (0, searchMasses_js_1.searchMasses)({
      baseURL: this.baseURL,
      ...options
    });
  }
  async massSpectra(options = {}) {
    return (0, massSpectra_js_1.massSpectra)({
      baseURL: this.baseURL,
      ...options
    });
  }
  async searchInSilicoSpectraByMF(spectrum, mf, options = {}) {
    return (0, searchInSilicoSpectraByMF_js_1.searchInSilicoSpectraByMF)(spectrum, mf, {
      baseURL: this.baseURL,
      ...options
    });
  }
  async searchInSilicoSpectraByMasses(spectrum, masses, options = {}) {
    return (0, searchInSilicoSpectraByMasses_js_1.searchInSilicoSpectraByMasses)(spectrum, masses, {
      baseURL: this.baseURL,
      ...options
    });
  }
  async pubmedCompounds(pubmedID, options = {}) {
    return (0, pubmedCompounds_js_1.pubmedCompounds)(pubmedID, {
      baseURL: this.baseURL,
      ...options
    });
  }
}
OctoChemDB$1.OctoChemDB = OctoChemDB;

var ActiveOrNaturalSummarizer$1 = {};

var getActivitiesDB$1 = {};

const STEMMERS = {
  arabic: 'ar',
  armenian: 'am',
  bulgarian: 'bg',
  czech: 'cz',
  danish: 'dk',
  dutch: 'nl',
  english: 'en',
  finnish: 'fi',
  french: 'fr',
  german: 'de',
  greek: 'gr',
  hungarian: 'hu',
  indian: 'in',
  indonesian: 'id',
  irish: 'ie',
  italian: 'it',
  lithuanian: 'lt',
  nepali: 'np',
  norwegian: 'no',
  portuguese: 'pt',
  romanian: 'ro',
  russian: 'ru',
  serbian: 'rs',
  slovenian: 'ru',
  spanish: 'es',
  swedish: 'se',
  tamil: 'ta',
  turkish: 'tr',
  ukrainian: 'uk',
  sanskrit: 'sk'
};
const SPLITTERS = {
  dutch: /[^A-Za-zàèéìòóù0-9_'-]+/gim,
  english: /[^A-Za-zàèéìòóù0-9_'-]+/gim,
  french: /[^a-z0-9äâàéèëêïîöôùüûœç-]+/gim,
  italian: /[^A-Za-zàèéìòóù0-9_'-]+/gim,
  norwegian: /[^a-z0-9_æøåÆØÅäÄöÖüÜ]+/gim,
  portuguese: /[^a-z0-9à-úÀ-Ú]/gim,
  russian: /[^a-z0-9а-яА-ЯёЁ]+/gim,
  spanish: /[^a-z0-9A-Zá-úÁ-ÚñÑüÜ]+/gim,
  swedish: /[^a-z0-9_åÅäÄöÖüÜ-]+/gim,
  german: /[^a-z0-9A-ZäöüÄÖÜß]+/gim,
  finnish: /[^a-z0-9äöÄÖ]+/gim,
  danish: /[^a-z0-9æøåÆØÅ]+/gim,
  hungarian: /[^a-z0-9áéíóöőúüűÁÉÍÓÖŐÚÜŰ]+/gim,
  romanian: /[^a-z0-9ăâîșțĂÂÎȘȚ]+/gim,
  serbian: /[^a-z0-9čćžšđČĆŽŠĐ]+/gim,
  turkish: /[^a-z0-9çÇğĞıİöÖşŞüÜ]+/gim,
  lithuanian: /[^a-z0-9ąčęėįšųūžĄČĘĖĮŠŲŪŽ]+/gim,
  arabic: /[^a-z0-9أ-ي]+/gim,
  nepali: /[^a-z0-9अ-ह]+/gim,
  irish: /[^a-z0-9áéíóúÁÉÍÓÚ]+/gim,
  indian: /[^a-z0-9अ-ह]+/gim,
  armenian: /[^a-z0-9ա-ֆ]+/gim,
  greek: /[^a-z0-9α-ωά-ώ]+/gim,
  indonesian: /[^a-z0-9]+/gim,
  ukrainian: /[^a-z0-9а-яА-ЯіїєІЇЄ]+/gim,
  slovenian: /[^a-z0-9čžšČŽŠ]+/gim,
  bulgarian: /[^a-z0-9а-яА-Я]+/gim,
  tamil: /[^a-z0-9அ-ஹ]+/gim,
  sanskrit: /[^a-z0-9A-Zāīūṛḷṃṁḥśṣṭḍṇṅñḻḹṝ]+/gim,
  czech: /[^A-Z0-9a-zěščřžýáíéúůóťďĚŠČŘŽÝÁÍÉÓÚŮŤĎ-]+/gim
};
const SUPPORTED_LANGUAGES = Object.keys(STEMMERS);
function getLocale(language) {
  return language !== undefined && SUPPORTED_LANGUAGES.includes(language) ? STEMMERS[language] : undefined;
}

const baseId = Date.now().toString().slice(5);
let lastId = 0;
const k = 1024;
const nano = BigInt(1e3);
const milli = BigInt(1e6);
const second = BigInt(1e9);
/**
 * This value can be increased up to 100_000
 * But i don't know if this value change from nodejs to nodejs
 * So I will keep a safer value here.
 */
const MAX_ARGUMENT_FOR_STACK = 65535;
/**
 * This method is needed to used because of issues like: https://github.com/oramasearch/orama/issues/301
 * that issue is caused because the array that is pushed is huge (>100k)
 *
 * @example
 * ```ts
 * safeArrayPush(myArray, [1, 2])
 * ```
 */
function safeArrayPush(arr, newArr) {
  if (newArr.length < MAX_ARGUMENT_FOR_STACK) {
    Array.prototype.push.apply(arr, newArr);
  } else {
    const newArrLength = newArr.length;
    for (let i = 0; i < newArrLength; i += MAX_ARGUMENT_FOR_STACK) {
      Array.prototype.push.apply(arr, newArr.slice(i, i + MAX_ARGUMENT_FOR_STACK));
    }
  }
}
function sprintf(template, ...args) {
  return template.replace(/%(?:(?<position>\d+)\$)?(?<width>-?\d*\.?\d*)(?<type>[dfs])/g, function (...replaceArgs) {
    const groups = replaceArgs[replaceArgs.length - 1];
    const {
      width: rawWidth,
      type,
      position
    } = groups;
    const replacement = position ? args[Number.parseInt(position) - 1] : args.shift();
    const width = rawWidth === '' ? 0 : Number.parseInt(rawWidth);
    switch (type) {
      case 'd':
        return replacement.toString().padStart(width, '0');
      case 'f':
        {
          let value = replacement;
          const [padding, precision] = rawWidth.split('.').map(w => Number.parseFloat(w));
          if (typeof precision === 'number' && precision >= 0) {
            value = value.toFixed(precision);
          }
          return typeof padding === 'number' && padding >= 0 ? value.toString().padStart(width, '0') : value.toString();
        }
      case 's':
        return width < 0 ? replacement.toString().padEnd(-width, ' ') : replacement.toString().padStart(width, ' ');
      default:
        return replacement;
    }
  });
}
function formatBytes(bytes, decimals = 2) {
  if (bytes === 0) {
    return '0 Bytes';
  }
  const dm = decimals < 0 ? 0 : decimals;
  const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
  const i = Math.floor(Math.log(bytes) / Math.log(k));
  return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
}
function isInsideWebWorker() {
  // @ts-expect-error - WebWorker global scope
  return typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;
}
function isInsideNode() {
  return typeof process !== 'undefined' && process.release && process.release.name === 'node';
}
function getNanosecondTimeViaPerformance() {
  return BigInt(Math.floor(performance.now() * 1e6));
}
function formatNanoseconds(value) {
  if (typeof value === 'number') {
    value = BigInt(value);
  }
  if (value < nano) {
    return `${value}ns`;
  } else if (value < milli) {
    return `${value / nano}μs`;
  } else if (value < second) {
    return `${value / milli}ms`;
  }
  return `${value / second}s`;
}
function getNanosecondsTime() {
  if (isInsideWebWorker()) {
    return getNanosecondTimeViaPerformance();
  }
  if (isInsideNode()) {
    return process.hrtime.bigint();
  }
  if (typeof process !== 'undefined' && typeof process?.hrtime?.bigint === 'function') {
    return process.hrtime.bigint();
  }
  if (typeof performance !== 'undefined') {
    return getNanosecondTimeViaPerformance();
  }
  // @todo: fallback to V8 native method to get microtime
  return BigInt(0);
}
function uniqueId() {
  return `${baseId}-${lastId++}`;
}
function getOwnProperty(object, property) {
  // Checks if `hasOwn` method is defined avoiding errors with older Node.js versions
  if (Object.hasOwn === undefined) {
    return Object.prototype.hasOwnProperty.call(object, property) ? object[property] : undefined;
  }
  return Object.hasOwn(object, property) ? object[property] : undefined;
}
function sortTokenScorePredicate(a, b) {
  if (b[1] === a[1]) {
    return a[0] - b[0];
  }
  return b[1] - a[1];
}
// Intersection function taken from https://github.com/lovasoa/fast_array_intersect.
// MIT Licensed at the time of writing.
function intersect(arrays) {
  if (arrays.length === 0) {
    return [];
  } else if (arrays.length === 1) {
    return arrays[0];
  }
  for (let i = 1; i < arrays.length; i++) {
    if (arrays[i].length < arrays[0].length) {
      const tmp = arrays[0];
      arrays[0] = arrays[i];
      arrays[i] = tmp;
    }
  }
  const set = new Map();
  for (const elem of arrays[0]) {
    set.set(elem, 1);
  }
  for (let i = 1; i < arrays.length; i++) {
    let found = 0;
    for (const elem of arrays[i]) {
      const count = set.get(elem);
      if (count === i) {
        set.set(elem, count + 1);
        found++;
      }
    }
    if (found === 0) return [];
  }
  return arrays[0].filter(e => {
    const count = set.get(e);
    if (count !== undefined) set.set(e, 0);
    return count === arrays.length;
  });
}
function getDocumentProperties(doc, paths) {
  const properties = {};
  const pathsLength = paths.length;
  for (let i = 0; i < pathsLength; i++) {
    const path = paths[i];
    const pathTokens = path.split('.');
    let current = doc;
    const pathTokensLength = pathTokens.length;
    for (let j = 0; j < pathTokensLength; j++) {
      current = current[pathTokens[j]];
      // We found an object but we were supposed to be done
      if (typeof current === 'object') {
        if (current !== null && 'lat' in current && 'lon' in current && typeof current.lat === 'number' && typeof current.lon === 'number') {
          current = properties[path] = current;
          break;
        } else if (!Array.isArray(current) && current !== null && j === pathTokensLength - 1) {
          current = undefined;
          break;
        }
      } else if ((current === null || typeof current !== 'object') && j < pathTokensLength - 1) {
        // We can't recurse anymore but we were supposed to
        current = undefined;
        break;
      }
    }
    if (typeof current !== 'undefined') {
      properties[path] = current;
    }
  }
  return properties;
}
function getNested(obj, path) {
  const props = getDocumentProperties(obj, [path]);
  return props[path];
}
const mapDistanceToMeters = {
  cm: 0.01,
  m: 1,
  km: 1000,
  ft: 0.3048,
  yd: 0.9144,
  mi: 1609.344
};
function convertDistanceToMeters(distance, unit) {
  const ratio = mapDistanceToMeters[unit];
  if (ratio === undefined) {
    throw new Error(createError('INVALID_DISTANCE_SUFFIX', distance).message);
  }
  return distance * ratio;
}
function removeVectorsFromHits(searchResult, vectorProperties) {
  searchResult.hits = searchResult.hits.map(result => ({
    ...result,
    document: {
      ...result.document,
      // Remove embeddings from the result
      ...vectorProperties.reduce((acc, prop) => {
        const path = prop.split('.');
        const lastKey = path.pop();
        let obj = acc;
        for (const key of path) {
          obj[key] = obj[key] ?? {};
          obj = obj[key];
        }
        obj[lastKey] = null;
        return acc;
      }, result.document)
    }
  }));
}
/**
 * Checks if the provided input is an async function or if the input is an array
 * containing at least one async function.
 *
 * @param func - A single function or an array of functions to check.
 *               Non-function values are ignored.
 * @returns `true` if the input is an async function or an array containing at least
 *          one async function, otherwise `false`.
 */
function isAsyncFunction(func) {
  if (Array.isArray(func)) {
    return func.some(item => isAsyncFunction(item));
  }
  return func?.constructor?.name === 'AsyncFunction';
}
const withIntersection = 'intersection' in new Set();
function setIntersection(...sets) {
  // Fast path 1
  if (sets.length === 0) {
    return new Set();
  }
  // Fast path 2
  if (sets.length === 1) {
    return sets[0];
  }
  // Fast path 3
  if (sets.length === 2) {
    const set1 = sets[0];
    const set2 = sets[1];
    if (withIntersection) {
      return set1.intersection(set2);
    }
    const result = new Set();
    const base = set1.size < set2.size ? set1 : set2;
    const other = base === set1 ? set2 : set1;
    for (const value of base) {
      if (other.has(value)) {
        result.add(value);
      }
    }
    return result;
  }
  // Slow path
  // Find the smallest set
  const min = {
    index: 0,
    size: sets[0].size
  };
  for (let i = 1; i < sets.length; i++) {
    if (sets[i].size < min.size) {
      min.index = i;
      min.size = sets[i].size;
    }
  }
  if (withIntersection) {
    let base = sets[min.index];
    for (let i = 0; i < sets.length; i++) {
      if (i === min.index) {
        continue;
      }
      base = base.intersection(sets[i]);
    }
    return base;
  }
  // manual implementation:
  // intersect all sets with the smallest set
  const base = sets[min.index];
  for (let i = 0; i < sets.length; i++) {
    if (i === min.index) {
      continue;
    }
    const other = sets[i];
    for (const value of base) {
      if (!other.has(value)) {
        base.delete(value);
      }
    }
  }
  return base;
}
const withUnion = 'union' in new Set();
function setUnion(set1, set2) {
  if (withUnion) {
    if (set1) {
      return set1.union(set2);
    }
    return set2;
  }
  if (!set1) {
    return new Set(set2);
  }
  return new Set([...set1, ...set2]);
}
function setDifference$1(set1, set2) {
  const result = new Set();
  for (const value of set1) {
    if (!set2.has(value)) {
      result.add(value);
    }
  }
  return result;
}
// This code is taken from https://github.com/davidmarkclements/atomic-sleep, MIT licensed at the time of commit b8149d3ca276c84a54fa8fa1478f9cc79aabc15a.
// All credits go to the original author (David Mark Clements, https://github.com/davidmarkclements).
function sleep(ms) {
  if (typeof SharedArrayBuffer !== 'undefined' && typeof Atomics !== 'undefined') {
    const nil = new Int32Array(new SharedArrayBuffer(4));
    const valid = ms > 0 && ms < Infinity;
    if (valid === false) {
      if (typeof ms !== 'number' && typeof ms !== 'bigint') {
        throw TypeError('sleep: ms must be a number');
      }
      throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity');
    }
    Atomics.wait(nil, 0, 0, Number(ms));
  } else {
    const valid = ms > 0 && ms < Infinity;
    if (valid === false) {
      if (typeof ms !== 'number' && typeof ms !== 'bigint') {
        throw TypeError('sleep: ms must be a number');
      }
      throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity');
    }
  }
}

const allLanguages = SUPPORTED_LANGUAGES.join('\n - ');
const errors = {
  NO_LANGUAGE_WITH_CUSTOM_TOKENIZER: 'Do not pass the language option to create when using a custom tokenizer.',
  LANGUAGE_NOT_SUPPORTED: `Language "%s" is not supported.\nSupported languages are:\n - ${allLanguages}`,
  INVALID_STEMMER_FUNCTION_TYPE: `config.stemmer property must be a function.`,
  MISSING_STEMMER: `As of version 1.0.0 @orama/orama does not ship non English stemmers by default. To solve this, please explicitly import and specify the "%s" stemmer from the package @orama/stemmers. See https://docs.orama.com/docs/orama-js/text-analysis/stemming for more information.`,
  CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY: 'Custom stop words array must only contain strings.',
  UNSUPPORTED_COMPONENT: `Unsupported component "%s".`,
  COMPONENT_MUST_BE_FUNCTION: `The component "%s" must be a function.`,
  COMPONENT_MUST_BE_FUNCTION_OR_ARRAY_FUNCTIONS: `The component "%s" must be a function or an array of functions.`,
  INVALID_SCHEMA_TYPE: `Unsupported schema type "%s" at "%s". Expected "string", "boolean" or "number" or array of them.`,
  DOCUMENT_ID_MUST_BE_STRING: `Document id must be of type "string". Got "%s" instead.`,
  DOCUMENT_ALREADY_EXISTS: `A document with id "%s" already exists.`,
  DOCUMENT_DOES_NOT_EXIST: `A document with id "%s" does not exists.`,
  MISSING_DOCUMENT_PROPERTY: `Missing searchable property "%s".`,
  INVALID_DOCUMENT_PROPERTY: `Invalid document property "%s": expected "%s", got "%s"`,
  UNKNOWN_INDEX: `Invalid property name "%s". Expected a wildcard string ("*") or array containing one of the following properties: %s`,
  INVALID_BOOST_VALUE: `Boost value must be a number greater than, or less than 0.`,
  INVALID_FILTER_OPERATION: `You can only use one operation per filter, you requested %d.`,
  SCHEMA_VALIDATION_FAILURE: `Cannot insert document due schema validation failure on "%s" property.`,
  INVALID_SORT_SCHEMA_TYPE: `Unsupported sort schema type "%s" at "%s". Expected "string" or "number".`,
  CANNOT_SORT_BY_ARRAY: `Cannot configure sort for "%s" because it is an array (%s).`,
  UNABLE_TO_SORT_ON_UNKNOWN_FIELD: `Unable to sort on unknown field "%s". Allowed fields: %s`,
  SORT_DISABLED: `Sort is disabled. Please read the documentation at https://docs.orama.com/docs/orama-js for more information.`,
  UNKNOWN_GROUP_BY_PROPERTY: `Unknown groupBy property "%s".`,
  INVALID_GROUP_BY_PROPERTY: `Invalid groupBy property "%s". Allowed types: "%s", but given "%s".`,
  UNKNOWN_FILTER_PROPERTY: `Unknown filter property "%s".`,
  UNKNOWN_VECTOR_PROPERTY: `Unknown vector property "%s". Make sure the property exists in the schema and is configured as a vector.`,
  INVALID_VECTOR_SIZE: `Vector size must be a number greater than 0. Got "%s" instead.`,
  INVALID_VECTOR_VALUE: `Vector value must be a number greater than 0. Got "%s" instead.`,
  INVALID_INPUT_VECTOR: `Property "%s" was declared as a %s-dimensional vector, but got a %s-dimensional vector instead.\nInput vectors must be of the size declared in the schema, as calculating similarity between vectors of different sizes can lead to unexpected results.`,
  WRONG_SEARCH_PROPERTY_TYPE: `Property "%s" is not searchable. Only "string" properties are searchable.`,
  FACET_NOT_SUPPORTED: `Facet doens't support the type "%s".`,
  INVALID_DISTANCE_SUFFIX: `Invalid distance suffix "%s". Valid suffixes are: cm, m, km, mi, yd, ft.`,
  INVALID_SEARCH_MODE: `Invalid search mode "%s". Valid modes are: "fulltext", "vector", "hybrid".`,
  MISSING_VECTOR_AND_SECURE_PROXY: `No vector was provided and no secure proxy was configured. Please provide a vector or configure an Orama Secure Proxy to perform hybrid search.`,
  MISSING_TERM: `"term" is a required parameter when performing hybrid search. Please provide a search term.`,
  INVALID_VECTOR_INPUT: `Invalid "vector" property. Expected an object with "value" and "property" properties, but got "%s" instead.`,
  PLUGIN_CRASHED: `A plugin crashed during initialization. Please check the error message for more information:`,
  PLUGIN_SECURE_PROXY_NOT_FOUND: `Could not find '@orama/secure-proxy-plugin' installed in your Orama instance.\nPlease install it before proceeding with creating an answer session.\nRead more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy\n`,
  PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL: `Could not find a chat model defined in the secure proxy plugin configuration.\nPlease provide a chat model before proceeding with creating an answer session.\nRead more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy\n`,
  ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT: `The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.`,
  PLUGIN_COMPONENT_CONFLICT: `The component "%s" is already defined. The plugin "%s" is trying to redefine it.`
};
function createError(code, ...args) {
  const error = new Error(sprintf(errors[code] ?? `Unsupported Orama Error code: ${code}`, ...args));
  error.code = code;
  if ('captureStackTrace' in Error.prototype) {
    Error.captureStackTrace(error);
  }
  return error;
}

function formatElapsedTime(n) {
  return {
    raw: Number(n),
    formatted: formatNanoseconds(n)
  };
}
function getDocumentIndexId(doc) {
  if (doc.id) {
    if (typeof doc.id !== 'string') {
      throw createError('DOCUMENT_ID_MUST_BE_STRING', typeof doc.id);
    }
    return doc.id;
  }
  return uniqueId();
}
function validateSchema(doc, schema) {
  for (const [prop, type] of Object.entries(schema)) {
    const value = doc[prop];
    if (typeof value === 'undefined') {
      continue;
    }
    if (type === 'geopoint' && typeof value === 'object' && typeof value.lon === 'number' && typeof value.lat === 'number') {
      continue;
    }
    if (type === 'enum' && (typeof value === 'string' || typeof value === 'number')) {
      continue;
    }
    if (type === 'enum[]' && Array.isArray(value)) {
      const valueLength = value.length;
      for (let i = 0; i < valueLength; i++) {
        if (typeof value[i] !== 'string' && typeof value[i] !== 'number') {
          return prop + '.' + i;
        }
      }
      continue;
    }
    if (isVectorType(type)) {
      const vectorSize = getVectorSize(type);
      if (!Array.isArray(value) || value.length !== vectorSize) {
        throw createError('INVALID_INPUT_VECTOR', prop, vectorSize, value.length);
      }
      continue;
    }
    if (isArrayType(type)) {
      if (!Array.isArray(value)) {
        return prop;
      }
      const expectedType = getInnerType(type);
      const valueLength = value.length;
      for (let i = 0; i < valueLength; i++) {
        if (typeof value[i] !== expectedType) {
          return prop + '.' + i;
        }
      }
      continue;
    }
    if (typeof type === 'object') {
      if (!value || typeof value !== 'object') {
        return prop;
      }
      // using as ResultDocument is not exactly right but trying to be type-safe here is not useful
      const subProp = validateSchema(value, type);
      if (subProp) {
        return prop + '.' + subProp;
      }
      continue;
    }
    if (typeof value !== type) {
      return prop;
    }
  }
  return undefined;
}
const IS_ARRAY_TYPE = {
  string: false,
  number: false,
  boolean: false,
  enum: false,
  geopoint: false,
  'string[]': true,
  'number[]': true,
  'boolean[]': true,
  'enum[]': true
};
const INNER_TYPE = {
  'string[]': 'string',
  'number[]': 'number',
  'boolean[]': 'boolean',
  'enum[]': 'enum'
};
function isGeoPointType(type) {
  return type === 'geopoint';
}
function isVectorType(type) {
  return typeof type === 'string' && /^vector\[\d+\]$/.test(type);
}
function isArrayType(type) {
  return typeof type === 'string' && IS_ARRAY_TYPE[type];
}
function getInnerType(type) {
  return INNER_TYPE[type];
}
function getVectorSize(type) {
  const size = Number(type.slice(7, -1));
  switch (true) {
    case isNaN(size):
      throw createError('INVALID_VECTOR_VALUE', type);
    case size <= 0:
      throw createError('INVALID_VECTOR_SIZE', type);
    default:
      return size;
  }
}

function createInternalDocumentIDStore() {
  return {
    idToInternalId: new Map(),
    internalIdToId: [],
    save: save$5,
    load: load$5
  };
}
function save$5(store) {
  return {
    internalIdToId: store.internalIdToId
  };
}
function load$5(orama, raw) {
  const {
    internalIdToId
  } = raw;
  orama.internalDocumentIDStore.idToInternalId.clear();
  orama.internalDocumentIDStore.internalIdToId = [];
  const internalIdToIdLength = internalIdToId.length;
  for (let i = 0; i < internalIdToIdLength; i++) {
    const internalIdItem = internalIdToId[i];
    orama.internalDocumentIDStore.idToInternalId.set(internalIdItem, i + 1);
    orama.internalDocumentIDStore.internalIdToId.push(internalIdItem);
  }
}
function getInternalDocumentId(store, id) {
  if (typeof id === 'string') {
    const internalId = store.idToInternalId.get(id);
    if (internalId) {
      return internalId;
    }
    const currentId = store.idToInternalId.size + 1;
    store.idToInternalId.set(id, currentId);
    store.internalIdToId.push(id);
    return currentId;
  }
  if (id > store.internalIdToId.length) {
    return getInternalDocumentId(store, id.toString());
  }
  return id;
}
function getDocumentIdFromInternalId(store, internalId) {
  if (store.internalIdToId.length < internalId) {
    throw new Error(`Invalid internalId ${internalId}`);
  }
  return store.internalIdToId[internalId - 1];
}

var internalDocumentIdStore = /*#__PURE__*/Object.freeze({
	__proto__: null,
	createInternalDocumentIDStore: createInternalDocumentIDStore,
	getDocumentIdFromInternalId: getDocumentIdFromInternalId,
	getInternalDocumentId: getInternalDocumentId,
	load: load$5,
	save: save$5
});

function create$5(_, sharedInternalDocumentStore) {
  return {
    sharedInternalDocumentStore,
    docs: {},
    count: 0
  };
}
function get(store, id) {
  const internalId = getInternalDocumentId(store.sharedInternalDocumentStore, id);
  return store.docs[internalId];
}
function getMultiple(store, ids) {
  const idsLength = ids.length;
  const found = Array.from({
    length: idsLength
  });
  for (let i = 0; i < idsLength; i++) {
    const internalId = getInternalDocumentId(store.sharedInternalDocumentStore, ids[i]);
    found[i] = store.docs[internalId];
  }
  return found;
}
function getAll(store) {
  return store.docs;
}
function store(store, id, internalId, doc) {
  if (typeof store.docs[internalId] !== 'undefined') {
    return false;
  }
  store.docs[internalId] = doc;
  store.count++;
  return true;
}
function remove$3(store, id) {
  const internalId = getInternalDocumentId(store.sharedInternalDocumentStore, id);
  if (typeof store.docs[internalId] === 'undefined') {
    return false;
  }
  delete store.docs[internalId];
  store.count--;
  return true;
}
function count$1(store) {
  return store.count;
}
function load$4(sharedInternalDocumentStore, raw) {
  const rawDocument = raw;
  return {
    docs: rawDocument.docs,
    count: rawDocument.count,
    sharedInternalDocumentStore
  };
}
function save$4(store) {
  return {
    docs: store.docs,
    count: store.count
  };
}
function createDocumentsStore() {
  return {
    create: create$5,
    get,
    getMultiple,
    getAll,
    store,
    remove: remove$3,
    count: count$1,
    load: load$4,
    save: save$4
  };
}

var documentsStore = /*#__PURE__*/Object.freeze({
	__proto__: null,
	count: count$1,
	create: create$5,
	createDocumentsStore: createDocumentsStore,
	get: get,
	getAll: getAll,
	getMultiple: getMultiple,
	load: load$4,
	remove: remove$3,
	save: save$4,
	store: store
});

const AVAILABLE_PLUGIN_HOOKS = ['beforeInsert', 'afterInsert', 'beforeRemove', 'afterRemove', 'beforeUpdate', 'afterUpdate', 'beforeUpsert', 'afterUpsert', 'beforeSearch', 'afterSearch', 'beforeInsertMultiple', 'afterInsertMultiple', 'beforeRemoveMultiple', 'afterRemoveMultiple', 'beforeUpdateMultiple', 'afterUpdateMultiple', 'beforeUpsertMultiple', 'afterUpsertMultiple', 'beforeLoad', 'afterLoad', 'afterCreate'];
function getAllPluginsByHook(orama, hook) {
  const pluginsToRun = [];
  const pluginsLength = orama.plugins?.length;
  if (!pluginsLength) {
    return pluginsToRun;
  }
  for (let i = 0; i < pluginsLength; i++) {
    try {
      const plugin = orama.plugins[i];
      if (typeof plugin[hook] === 'function') {
        pluginsToRun.push(plugin[hook]);
      }
    } catch (error) {
      console.error('Caught error in getAllPluginsByHook:', error);
      throw createError('PLUGIN_CRASHED');
    }
  }
  return pluginsToRun;
}

const OBJECT_COMPONENTS = ['tokenizer', 'index', 'documentsStore', 'sorter', 'pinning'];
const FUNCTION_COMPONENTS = ['validateSchema', 'getDocumentIndexId', 'getDocumentProperties', 'formatElapsedTime'];
function runSingleHook(hooks, orama, id, doc) {
  const needAsync = hooks.some(isAsyncFunction);
  if (needAsync) {
    return (async () => {
      for (const hook of hooks) {
        await hook(orama, id, doc);
      }
    })();
  } else {
    for (const hook of hooks) {
      hook(orama, id, doc);
    }
  }
}
function runMultipleHook(hooks, orama, docsOrIds) {
  const needAsync = hooks.some(isAsyncFunction);
  if (needAsync) {
    return (async () => {
      for (const hook of hooks) {
        await hook(orama, docsOrIds);
      }
    })();
  } else {
    for (const hook of hooks) {
      hook(orama, docsOrIds);
    }
  }
}
function runAfterSearch(hooks, db, params, language, results) {
  const needAsync = hooks.some(isAsyncFunction);
  if (needAsync) {
    return (async () => {
      for (const hook of hooks) {
        await hook(db, params, language, results);
      }
    })();
  } else {
    for (const hook of hooks) {
      hook(db, params, language, results);
    }
  }
}
function runBeforeSearch(hooks, db, params, language) {
  const needAsync = hooks.some(isAsyncFunction);
  if (needAsync) {
    return (async () => {
      for (const hook of hooks) {
        await hook(db, params, language);
      }
    })();
  } else {
    for (const hook of hooks) {
      hook(db, params, language);
    }
  }
}
function runAfterCreate(hooks, db) {
  const needAsync = hooks.some(isAsyncFunction);
  if (needAsync) {
    return (async () => {
      for (const hook of hooks) {
        await hook(db);
      }
    })();
  } else {
    for (const hook of hooks) {
      hook(db);
    }
  }
}

class AVLNode {
  k;
  v;
  l = null;
  r = null;
  h = 1;
  constructor(key, value) {
    this.k = key;
    this.v = new Set(value);
  }
  updateHeight() {
    this.h = Math.max(AVLNode.getHeight(this.l), AVLNode.getHeight(this.r)) + 1;
  }
  static getHeight(node) {
    return node ? node.h : 0;
  }
  getBalanceFactor() {
    return AVLNode.getHeight(this.l) - AVLNode.getHeight(this.r);
  }
  rotateLeft() {
    const newRoot = this.r;
    this.r = newRoot.l;
    newRoot.l = this;
    this.updateHeight();
    newRoot.updateHeight();
    return newRoot;
  }
  rotateRight() {
    const newRoot = this.l;
    this.l = newRoot.r;
    newRoot.r = this;
    this.updateHeight();
    newRoot.updateHeight();
    return newRoot;
  }
  toJSON() {
    return {
      k: this.k,
      v: Array.from(this.v),
      l: this.l ? this.l.toJSON() : null,
      r: this.r ? this.r.toJSON() : null,
      h: this.h
    };
  }
  static fromJSON(json) {
    const node = new AVLNode(json.k, json.v);
    node.l = json.l ? AVLNode.fromJSON(json.l) : null;
    node.r = json.r ? AVLNode.fromJSON(json.r) : null;
    node.h = json.h;
    return node;
  }
}
class AVLTree {
  root = null;
  insertCount = 0;
  constructor(key, value) {
    if (key !== undefined && value !== undefined) {
      this.root = new AVLNode(key, value);
    }
  }
  insert(key, value, rebalanceThreshold = 1000) {
    this.root = this.insertNode(this.root, key, value, rebalanceThreshold);
  }
  insertMultiple(key, value, rebalanceThreshold = 1000) {
    for (const v of value) {
      this.insert(key, v, rebalanceThreshold);
    }
  }
  // Rebalance the tree if the insert count reaches the threshold.
  // This will improve insertion performance since we won't be rebalancing the tree on every insert.
  // When inserting docs using `insertMultiple`, the threshold will be set to the number of docs being inserted.
  // We can force rebalancing the tree by setting the threshold to 1 (default).
  rebalance() {
    if (this.root) {
      this.root = this.rebalanceNode(this.root);
    }
  }
  toJSON() {
    return {
      root: this.root ? this.root.toJSON() : null,
      insertCount: this.insertCount
    };
  }
  static fromJSON(json) {
    const tree = new AVLTree();
    tree.root = json.root ? AVLNode.fromJSON(json.root) : null;
    tree.insertCount = json.insertCount || 0;
    return tree;
  }
  insertNode(node, key, value, rebalanceThreshold) {
    if (node === null) {
      return new AVLNode(key, [value]);
    }
    const path = [];
    let current = node;
    let parent = null;
    while (current !== null) {
      path.push({
        parent,
        node: current
      });
      if (key < current.k) {
        if (current.l === null) {
          current.l = new AVLNode(key, [value]);
          path.push({
            parent: current,
            node: current.l
          });
          break;
        } else {
          parent = current;
          current = current.l;
        }
      } else if (key > current.k) {
        if (current.r === null) {
          current.r = new AVLNode(key, [value]);
          path.push({
            parent: current,
            node: current.r
          });
          break;
        } else {
          parent = current;
          current = current.r;
        }
      } else {
        // Key already exists
        current.v.add(value);
        /*
        if (Array.isArray(current.v)) {
          if (Array.isArray(value)) {
            ;(current.v as any[]).push(...(value as V[]))
          } else {
            ;(current.v as any[]).push(value)
          }
        } else {
          current.v = new Set([value])
        }
        */
        return node;
      }
    }
    // Update heights and rebalance if necessary
    let needRebalance = false;
    if (this.insertCount++ % rebalanceThreshold === 0) {
      needRebalance = true;
    }
    for (let i = path.length - 1; i >= 0; i--) {
      const {
        parent,
        node: currentNode
      } = path[i];
      currentNode.updateHeight();
      if (needRebalance) {
        const rebalancedNode = this.rebalanceNode(currentNode);
        if (parent) {
          if (parent.l === currentNode) {
            parent.l = rebalancedNode;
          } else if (parent.r === currentNode) {
            parent.r = rebalancedNode;
          }
        } else {
          // This is the root node
          node = rebalancedNode;
        }
      }
    }
    return node;
  }
  rebalanceNode(node) {
    const balanceFactor = node.getBalanceFactor();
    if (balanceFactor > 1) {
      // Left heavy
      if (node.l && node.l.getBalanceFactor() >= 0) {
        // Left Left Case
        return node.rotateRight();
      } else if (node.l) {
        // Left Right Case
        node.l = node.l.rotateLeft();
        return node.rotateRight();
      }
    }
    if (balanceFactor < -1) {
      // Right heavy
      if (node.r && node.r.getBalanceFactor() <= 0) {
        // Right Right Case
        return node.rotateLeft();
      } else if (node.r) {
        // Right Left Case
        node.r = node.r.rotateRight();
        return node.rotateLeft();
      }
    }
    return node;
  }
  find(key) {
    const node = this.findNodeByKey(key);
    return node ? node.v : null;
  }
  contains(key) {
    return this.find(key) !== null;
  }
  getSize() {
    let count = 0;
    const stack = [];
    let current = this.root;
    while (current || stack.length > 0) {
      while (current) {
        stack.push(current);
        current = current.l;
      }
      current = stack.pop();
      count++;
      current = current.r;
    }
    return count;
  }
  isBalanced() {
    if (!this.root) return true;
    const stack = [this.root];
    while (stack.length > 0) {
      const node = stack.pop();
      const balanceFactor = node.getBalanceFactor();
      if (Math.abs(balanceFactor) > 1) {
        return false;
      }
      if (node.l) stack.push(node.l);
      if (node.r) stack.push(node.r);
    }
    return true;
  }
  remove(key) {
    this.root = this.removeNode(this.root, key);
  }
  removeDocument(key, id) {
    const node = this.findNodeByKey(key);
    if (!node) {
      return;
    }
    if (node.v.size === 1) {
      this.root = this.removeNode(this.root, key);
    } else {
      node.v = new Set([...node.v.values()].filter(v => v !== id));
    }
  }
  findNodeByKey(key) {
    let node = this.root;
    while (node) {
      if (key < node.k) {
        node = node.l;
      } else if (key > node.k) {
        node = node.r;
      } else {
        return node;
      }
    }
    return null;
  }
  removeNode(node, key) {
    if (node === null) return null;
    const path = [];
    let current = node;
    while (current !== null && current.k !== key) {
      path.push(current);
      if (key < current.k) {
        current = current.l;
      } else {
        current = current.r;
      }
    }
    if (current === null) {
      // Key not found
      return node;
    }
    // Node with only one child or no child
    if (current.l === null || current.r === null) {
      const child = current.l ? current.l : current.r;
      if (path.length === 0) {
        // Node to be deleted is root
        node = child;
      } else {
        const parent = path[path.length - 1];
        if (parent.l === current) {
          parent.l = child;
        } else {
          parent.r = child;
        }
      }
    } else {
      // Node with two children: Get the inorder successor
      let successorParent = current;
      let successor = current.r;
      while (successor.l !== null) {
        successorParent = successor;
        successor = successor.l;
      }
      // Copy the successor's content to current node
      current.k = successor.k;
      current.v = successor.v;
      // Delete the successor
      if (successorParent.l === successor) {
        successorParent.l = successor.r;
      } else {
        successorParent.r = successor.r;
      }
      current = successorParent;
    }
    // Update heights and rebalance
    path.push(current);
    for (let i = path.length - 1; i >= 0; i--) {
      const currentNode = path[i];
      currentNode.updateHeight();
      const rebalancedNode = this.rebalanceNode(currentNode);
      if (i > 0) {
        const parent = path[i - 1];
        if (parent.l === currentNode) {
          parent.l = rebalancedNode;
        } else if (parent.r === currentNode) {
          parent.r = rebalancedNode;
        }
      } else {
        // Root node
        node = rebalancedNode;
      }
    }
    return node;
  }
  rangeSearch(min, max) {
    const result = new Set();
    const stack = [];
    let current = this.root;
    while (current || stack.length > 0) {
      while (current) {
        stack.push(current);
        current = current.l;
      }
      current = stack.pop();
      if (current.k >= min && current.k <= max) {
        for (const value of current.v) {
          result.add(value);
        }
      }
      if (current.k > max) {
        break;
      }
      current = current.r;
    }
    return result;
  }
  greaterThan(key, inclusive = false) {
    const result = new Set();
    const stack = [];
    let current = this.root;
    while (current || stack.length > 0) {
      while (current) {
        stack.push(current);
        current = current.r; // Traverse right subtree first
      }
      current = stack.pop();
      if (inclusive && current.k >= key || !inclusive && current.k > key) {
        for (const value of current.v) {
          result.add(value);
        }
      } else if (current.k <= key) {
        break; // Since we're traversing in descending order, we can break early
      }
      current = current.l;
    }
    return result;
  }
  lessThan(key, inclusive = false) {
    const result = new Set();
    const stack = [];
    let current = this.root;
    while (current || stack.length > 0) {
      while (current) {
        stack.push(current);
        current = current.l;
      }
      current = stack.pop();
      if (inclusive && current.k <= key || !inclusive && current.k < key) {
        for (const value of current.v) {
          result.add(value);
        }
      } else if (current.k > key) {
        break; // Since we're traversing in ascending order, we can break early
      }
      current = current.r;
    }
    return result;
  }
}

class FlatTree {
  numberToDocumentId;
  constructor() {
    this.numberToDocumentId = new Map();
  }
  insert(key, value) {
    if (this.numberToDocumentId.has(key)) {
      this.numberToDocumentId.get(key).add(value);
    } else {
      this.numberToDocumentId.set(key, new Set([value]));
    }
  }
  find(key) {
    const idSet = this.numberToDocumentId.get(key);
    return idSet ? Array.from(idSet) : null;
  }
  remove(key) {
    this.numberToDocumentId.delete(key);
  }
  removeDocument(id, key) {
    const idSet = this.numberToDocumentId.get(key);
    if (idSet) {
      idSet.delete(id);
      if (idSet.size === 0) {
        this.numberToDocumentId.delete(key);
      }
    }
  }
  contains(key) {
    return this.numberToDocumentId.has(key);
  }
  getSize() {
    let size = 0;
    for (const idSet of this.numberToDocumentId.values()) {
      size += idSet.size;
    }
    return size;
  }
  filter(operation) {
    const operationKeys = Object.keys(operation);
    if (operationKeys.length !== 1) {
      throw new Error('Invalid operation');
    }
    const operationType = operationKeys[0];
    switch (operationType) {
      case 'eq':
        {
          const value = operation[operationType];
          const idSet = this.numberToDocumentId.get(value);
          return idSet ? Array.from(idSet) : [];
        }
      case 'in':
        {
          const values = operation[operationType];
          const resultSet = new Set();
          for (const value of values) {
            const idSet = this.numberToDocumentId.get(value);
            if (idSet) {
              for (const id of idSet) {
                resultSet.add(id);
              }
            }
          }
          return Array.from(resultSet);
        }
      case 'nin':
        {
          const excludeValues = new Set(operation[operationType]);
          const resultSet = new Set();
          for (const [key, idSet] of this.numberToDocumentId.entries()) {
            if (!excludeValues.has(key)) {
              for (const id of idSet) {
                resultSet.add(id);
              }
            }
          }
          return Array.from(resultSet);
        }
      default:
        throw new Error('Invalid operation');
    }
  }
  filterArr(operation) {
    const operationKeys = Object.keys(operation);
    if (operationKeys.length !== 1) {
      throw new Error('Invalid operation');
    }
    const operationType = operationKeys[0];
    switch (operationType) {
      case 'containsAll':
        {
          const values = operation[operationType];
          const idSets = values.map(value => this.numberToDocumentId.get(value) ?? new Set());
          if (idSets.length === 0) return [];
          const intersection = idSets.reduce((prev, curr) => {
            return new Set([...prev].filter(id => curr.has(id)));
          });
          return Array.from(intersection);
        }
      case 'containsAny':
        {
          const values = operation[operationType];
          const idSets = values.map(value => this.numberToDocumentId.get(value) ?? new Set());
          if (idSets.length === 0) return [];
          const union = idSets.reduce((prev, curr) => {
            return new Set([...prev, ...curr]);
          });
          return Array.from(union);
        }
      default:
        throw new Error('Invalid operation');
    }
  }
  static fromJSON(json) {
    if (!json.numberToDocumentId) {
      throw new Error('Invalid Flat Tree JSON');
    }
    const tree = new FlatTree();
    for (const [key, ids] of json.numberToDocumentId) {
      tree.numberToDocumentId.set(key, new Set(ids));
    }
    return tree;
  }
  toJSON() {
    return {
      numberToDocumentId: Array.from(this.numberToDocumentId.entries()).map(([key, idSet]) => [key, Array.from(idSet)])
    };
  }
}

/**
 * Inspired by:
 * https://github.com/Yomguithereal/talisman/blob/86ae55cbd040ff021d05e282e0e6c71f2dde21f8/src/metrics/levenshtein.js#L218-L340
 */
function _boundedLevenshtein(term, word, tolerance) {
  // Handle base cases
  if (tolerance < 0) return -1;
  if (term === word) return 0;
  const m = term.length;
  const n = word.length;
  // Special case for empty strings
  if (m === 0) return n <= tolerance ? n : -1;
  if (n === 0) return m <= tolerance ? m : -1;
  // term = term.toLowerCase()
  // word = word.toLowerCase()
  const diff = Math.abs(m - n);
  // Special case for prefixes
  // If the searching word starts with the indexed word, return early.
  if (term.startsWith(word)) {
    // We just check if the remaining characters are within the tolerance
    return diff <= tolerance ? diff : -1;
  }
  // If the indexed word starts with the searching word, return early.
  if (word.startsWith(term)) {
    // any prefixed word is within the tolerance
    return 0;
  }
  // If the length difference is greater than the tolerance, return early
  if (diff > tolerance) return -1;
  // Initialize the matrix
  const matrix = [];
  for (let i = 0; i <= m; i++) {
    matrix[i] = [i];
    for (let j = 1; j <= n; j++) {
      matrix[i][j] = i === 0 ? j : 0;
    }
  }
  // Fill the matrix
  for (let i = 1; i <= m; i++) {
    let rowMin = Infinity;
    for (let j = 1; j <= n; j++) {
      if (term[i - 1] === word[j - 1]) {
        matrix[i][j] = matrix[i - 1][j - 1];
      } else {
        matrix[i][j] = Math.min(matrix[i - 1][j] + 1,
        // deletion
        matrix[i][j - 1] + 1,
        // insertion
        matrix[i - 1][j - 1] + 1 // substitution
        );
      }
      rowMin = Math.min(rowMin, matrix[i][j]);
    }
    // Early termination if all values in this row exceed tolerance
    if (rowMin > tolerance) {
      return -1;
    }
  }
  return matrix[m][n] <= tolerance ? matrix[m][n] : -1;
}
/**
 * Computes the Levenshtein distance between two strings (a, b), returning early with -1 if the distance
 * is greater than the given tolerance.
 * It assumes that:
 * - tolerance >= ||a| - |b|| >= 0
 */
function boundedLevenshtein(term, w, tolerance) {
  const distance = _boundedLevenshtein(term, w, tolerance);
  return {
    distance,
    isBounded: distance >= 0
  };
}
// This is only used internally, keep in sync with the previous one
function syncBoundedLevenshtein(term, w, tolerance) {
  const distance = _boundedLevenshtein(term, w, tolerance);
  return {
    distance,
    isBounded: distance >= 0
  };
}

/* eslint-disable @typescript-eslint/no-this-alias */
class RadixNode {
  // Node key
  k;
  // Node subword
  s;
  // Node children
  c = new Map();
  // Node documents
  d = new Set();
  // Node end
  e;
  // Node word
  w = '';
  constructor(key, subWord, end) {
    this.k = key;
    this.s = subWord;
    this.e = end;
  }
  updateParent(parent) {
    this.w = parent.w + this.s;
  }
  addDocument(docID) {
    this.d.add(docID);
  }
  removeDocument(docID) {
    return this.d.delete(docID);
  }
  findAllWords(output, term, exact, tolerance) {
    const stack = [this];
    while (stack.length > 0) {
      const node = stack.pop();
      if (node.e) {
        const {
          w,
          d: docIDs
        } = node;
        if (exact && w !== term) {
          continue;
        }
        // check if _output[w] exists and then add the doc to it
        // always check in own property to prevent access to inherited properties
        // fix https://github.com/oramasearch/orama/issues/137
        if (getOwnProperty(output, w) !== null) {
          if (tolerance) {
            const difference = Math.abs(term.length - w.length);
            if (difference <= tolerance && syncBoundedLevenshtein(term, w, tolerance).isBounded) {
              output[w] = [];
            } else {
              continue;
            }
          } else {
            output[w] = [];
          }
        }
        // check if _output[w] exists and then add the doc to it
        // always check in own property to prevent access to inherited properties
        // fix https://github.com/oramasearch/orama/issues/137
        if (getOwnProperty(output, w) != null && docIDs.size > 0) {
          const docs = output[w];
          for (const docID of docIDs) {
            if (!docs.includes(docID)) {
              docs.push(docID);
            }
          }
        }
      }
      if (node.c.size > 0) {
        stack.push(...node.c.values());
      }
    }
    return output;
  }
  insert(word, docId) {
    let node = this;
    let i = 0;
    const wordLength = word.length;
    while (i < wordLength) {
      const currentCharacter = word[i];
      const childNode = node.c.get(currentCharacter);
      if (childNode) {
        const edgeLabel = childNode.s;
        const edgeLabelLength = edgeLabel.length;
        let j = 0;
        // Find the common prefix length between edgeLabel and the remaining word
        while (j < edgeLabelLength && i + j < wordLength && edgeLabel[j] === word[i + j]) {
          j++;
        }
        if (j === edgeLabelLength) {
          // Edge label fully matches; proceed to the child node
          node = childNode;
          i += j;
          if (i === wordLength) {
            // The word is a prefix of an existing word
            if (!childNode.e) {
              childNode.e = true;
            }
            childNode.addDocument(docId);
            return;
          }
          continue;
        }
        // Split the edgeLabel at the common prefix
        const commonPrefix = edgeLabel.slice(0, j);
        const newEdgeLabel = edgeLabel.slice(j);
        const newWordLabel = word.slice(i + j);
        // Create an intermediate node for the common prefix
        const inbetweenNode = new RadixNode(commonPrefix[0], commonPrefix, false);
        node.c.set(commonPrefix[0], inbetweenNode);
        inbetweenNode.updateParent(node);
        // Update the existing childNode
        childNode.s = newEdgeLabel;
        childNode.k = newEdgeLabel[0];
        inbetweenNode.c.set(newEdgeLabel[0], childNode);
        childNode.updateParent(inbetweenNode);
        if (newWordLabel) {
          // Create a new node for the remaining part of the word
          const newNode = new RadixNode(newWordLabel[0], newWordLabel, true);
          newNode.addDocument(docId);
          inbetweenNode.c.set(newWordLabel[0], newNode);
          newNode.updateParent(inbetweenNode);
        } else {
          // The word ends at the inbetweenNode
          inbetweenNode.e = true;
          inbetweenNode.addDocument(docId);
        }
        return;
      } else {
        // No matching child; create a new node
        const newNode = new RadixNode(currentCharacter, word.slice(i), true);
        newNode.addDocument(docId);
        node.c.set(currentCharacter, newNode);
        newNode.updateParent(node);
        return;
      }
    }
    // If we reach here, the word already exists in the tree
    if (!node.e) {
      node.e = true;
    }
    node.addDocument(docId);
  }
  _findLevenshtein(term, index, tolerance, originalTolerance, output) {
    const stack = [{
      node: this,
      index,
      tolerance
    }];
    while (stack.length > 0) {
      const {
        node,
        index,
        tolerance
      } = stack.pop();
      if (node.w.startsWith(term)) {
        node.findAllWords(output, term, false, 0);
        continue;
      }
      if (tolerance < 0) {
        continue;
      }
      if (node.e) {
        const {
          w,
          d: docIDs
        } = node;
        if (w) {
          if (syncBoundedLevenshtein(term, w, originalTolerance).isBounded) {
            output[w] = [];
          }
          if (getOwnProperty(output, w) !== undefined && docIDs.size > 0) {
            const docs = new Set(output[w]);
            for (const docID of docIDs) {
              docs.add(docID);
            }
            output[w] = Array.from(docs);
          }
        }
      }
      if (index >= term.length) {
        continue;
      }
      const currentChar = term[index];
      // 1. If node has child matching term[index], push { node: childNode, index +1, tolerance }
      if (node.c.has(currentChar)) {
        const childNode = node.c.get(currentChar);
        stack.push({
          node: childNode,
          index: index + 1,
          tolerance
        });
      }
      // 2. Push { node, index +1, tolerance -1 } (Delete operation)
      stack.push({
        node: node,
        index: index + 1,
        tolerance: tolerance - 1
      });
      // 3. For each child:
      for (const [character, childNode] of node.c) {
        // a) Insert operation
        stack.push({
          node: childNode,
          index: index,
          tolerance: tolerance - 1
        });
        // b) Substitute operation
        if (character !== currentChar) {
          stack.push({
            node: childNode,
            index: index + 1,
            tolerance: tolerance - 1
          });
        }
      }
    }
  }
  find(params) {
    const {
      term,
      exact,
      tolerance
    } = params;
    if (tolerance && !exact) {
      const output = {};
      this._findLevenshtein(term, 0, tolerance, tolerance, output);
      return output;
    } else {
      let node = this;
      let i = 0;
      const termLength = term.length;
      while (i < termLength) {
        const character = term[i];
        const childNode = node.c.get(character);
        if (childNode) {
          const edgeLabel = childNode.s;
          const edgeLabelLength = edgeLabel.length;
          let j = 0;
          // Compare edge label with the term starting from position i
          while (j < edgeLabelLength && i + j < termLength && edgeLabel[j] === term[i + j]) {
            j++;
          }
          if (j === edgeLabelLength) {
            // Full match of edge label; proceed to the child node
            node = childNode;
            i += j;
          } else if (i + j === termLength) {
            // The term ends in the middle of the edge label - FIX: this handles prefix matches like 'p' matching 'phone'
            // Check if the term matches from the beginning of the edge label
            if (j === termLength - i) {
              // Term is a prefix of the edge label
              if (exact) {
                // Exact match required but term doesn't end at a node
                return {};
              } else {
                // Partial match; collect words starting from this node
                const output = {};
                // Just call findAllWords on the child node to collect all words in this subtree
                childNode.findAllWords(output, term, exact, tolerance);
                return output;
              }
            } else {
              // Mismatch found
              return {};
            }
          } else {
            // Mismatch found
            return {};
          }
        } else {
          // No matching child node
          return {};
        }
      }
      // Term fully matched; collect words starting from this node
      const output = {};
      node.findAllWords(output, term, exact, tolerance);
      return output;
    }
  }
  contains(term) {
    let node = this;
    let i = 0;
    const termLength = term.length;
    while (i < termLength) {
      const character = term[i];
      const childNode = node.c.get(character);
      if (childNode) {
        const edgeLabel = childNode.s;
        const edgeLabelLength = edgeLabel.length;
        let j = 0;
        while (j < edgeLabelLength && i + j < termLength && edgeLabel[j] === term[i + j]) {
          j++;
        }
        if (j < edgeLabelLength) {
          return false;
        }
        i += edgeLabelLength;
        node = childNode;
      } else {
        return false;
      }
    }
    return true;
  }
  removeWord(term) {
    if (!term) {
      return false;
    }
    let node = this;
    const termLength = term.length;
    const stack = [];
    for (let i = 0; i < termLength; i++) {
      const character = term[i];
      if (node.c.has(character)) {
        const childNode = node.c.get(character);
        stack.push({
          parent: node,
          character
        });
        i += childNode.s.length - 1;
        node = childNode;
      } else {
        return false;
      }
    }
    // Remove documents from the node
    node.d.clear();
    node.e = false;
    // Clean up any nodes that no longer lead to a word
    while (stack.length > 0 && node.c.size === 0 && !node.e && node.d.size === 0) {
      const {
        parent,
        character
      } = stack.pop();
      parent.c.delete(character);
      node = parent;
    }
    return true;
  }
  removeDocumentByWord(term, docID, exact = true) {
    if (!term) {
      return true;
    }
    let node = this;
    const termLength = term.length;
    for (let i = 0; i < termLength; i++) {
      const character = term[i];
      if (node.c.has(character)) {
        const childNode = node.c.get(character);
        i += childNode.s.length - 1;
        node = childNode;
        if (exact && node.w !== term) ; else {
          node.removeDocument(docID);
        }
      } else {
        return false;
      }
    }
    return true;
  }
  static getCommonPrefix(a, b) {
    const len = Math.min(a.length, b.length);
    let i = 0;
    while (i < len && a.charCodeAt(i) === b.charCodeAt(i)) {
      i++;
    }
    return a.slice(0, i);
  }
  toJSON() {
    return {
      w: this.w,
      s: this.s,
      e: this.e,
      k: this.k,
      d: Array.from(this.d),
      c: Array.from(this.c?.entries())?.map(([key, node]) => [key, node.toJSON()])
    };
  }
  static fromJSON(json) {
    const node = new RadixNode(json.k, json.s, json.e);
    node.w = json.w;
    node.d = new Set(json.d);
    node.c = new Map(json?.c?.map(([key, nodeJson]) => [key, RadixNode.fromJSON(nodeJson)]) || []);
    return node;
  }
}
class RadixTree extends RadixNode {
  constructor() {
    super('', '', false);
  }
  static fromJSON(json) {
    const tree = new RadixTree();
    tree.w = json.w;
    tree.s = json.s;
    tree.e = json.e;
    tree.k = json.k;
    tree.d = new Set(json.d);
    tree.c = new Map(json?.c?.map(([key, nodeJson]) => [key, RadixNode.fromJSON(nodeJson)]) || []);
    return tree;
  }
  toJSON() {
    return super.toJSON();
  }
}

const K = 2; // 2D points
const EARTH_RADIUS = 6371e3; // Earth radius in meters
class BKDNode {
  point;
  docIDs;
  left;
  right;
  parent;
  constructor(point, docIDs) {
    this.point = point;
    this.docIDs = new Set(docIDs);
    this.left = null;
    this.right = null;
    this.parent = null;
  }
  toJSON() {
    return {
      point: this.point,
      docIDs: Array.from(this.docIDs),
      left: this.left ? this.left.toJSON() : null,
      right: this.right ? this.right.toJSON() : null
    };
  }
  static fromJSON(json, parent = null) {
    const node = new BKDNode(json.point, json.docIDs);
    node.parent = parent;
    if (json.left) {
      node.left = BKDNode.fromJSON(json.left, node);
    }
    if (json.right) {
      node.right = BKDNode.fromJSON(json.right, node);
    }
    return node;
  }
}
class BKDTree {
  root;
  nodeMap;
  constructor() {
    this.root = null;
    this.nodeMap = new Map();
  }
  getPointKey(point) {
    return `${point.lon},${point.lat}`;
  }
  insert(point, docIDs) {
    const pointKey = this.getPointKey(point);
    const existingNode = this.nodeMap.get(pointKey);
    if (existingNode) {
      docIDs.forEach(id => existingNode.docIDs.add(id));
      return;
    }
    const newNode = new BKDNode(point, docIDs);
    this.nodeMap.set(pointKey, newNode);
    if (this.root == null) {
      this.root = newNode;
      return;
    }
    let node = this.root;
    let depth = 0;
    // eslint-disable-next-line no-constant-condition
    while (true) {
      const axis = depth % K;
      if (axis === 0) {
        if (point.lon < node.point.lon) {
          if (node.left == null) {
            node.left = newNode;
            newNode.parent = node;
            return;
          }
          node = node.left;
        } else {
          if (node.right == null) {
            node.right = newNode;
            newNode.parent = node;
            return;
          }
          node = node.right;
        }
      } else {
        if (point.lat < node.point.lat) {
          if (node.left == null) {
            node.left = newNode;
            newNode.parent = node;
            return;
          }
          node = node.left;
        } else {
          if (node.right == null) {
            node.right = newNode;
            newNode.parent = node;
            return;
          }
          node = node.right;
        }
      }
      depth++;
    }
  }
  contains(point) {
    const pointKey = this.getPointKey(point);
    return this.nodeMap.has(pointKey);
  }
  getDocIDsByCoordinates(point) {
    const pointKey = this.getPointKey(point);
    const node = this.nodeMap.get(pointKey);
    if (node) {
      return Array.from(node.docIDs);
    }
    return null;
  }
  removeDocByID(point, docID) {
    const pointKey = this.getPointKey(point);
    const node = this.nodeMap.get(pointKey);
    if (node) {
      node.docIDs.delete(docID);
      if (node.docIDs.size === 0) {
        this.nodeMap.delete(pointKey);
        this.deleteNode(node);
      }
    }
  }
  deleteNode(node) {
    const parent = node.parent;
    const child = node.left ? node.left : node.right;
    if (child) {
      child.parent = parent;
    }
    if (parent) {
      if (parent.left === node) {
        parent.left = child;
      } else if (parent.right === node) {
        parent.right = child;
      }
    } else {
      this.root = child;
      if (this.root) {
        this.root.parent = null;
      }
    }
  }
  searchByRadius(center, radius, inclusive = true, sort = 'asc', highPrecision = false) {
    const distanceFn = highPrecision ? BKDTree.vincentyDistance : BKDTree.haversineDistance;
    const stack = [{
      node: this.root,
      depth: 0
    }];
    const result = [];
    while (stack.length > 0) {
      const {
        node,
        depth
      } = stack.pop();
      if (node == null) continue;
      const dist = distanceFn(center, node.point);
      if (inclusive ? dist <= radius : dist > radius) {
        result.push({
          point: node.point,
          docIDs: Array.from(node.docIDs)
        });
      }
      if (node.left != null) {
        stack.push({
          node: node.left,
          depth: depth + 1
        });
      }
      if (node.right != null) {
        stack.push({
          node: node.right,
          depth: depth + 1
        });
      }
    }
    if (sort) {
      result.sort((a, b) => {
        const distA = distanceFn(center, a.point);
        const distB = distanceFn(center, b.point);
        return sort.toLowerCase() === 'asc' ? distA - distB : distB - distA;
      });
    }
    return result;
  }
  searchByPolygon(polygon, inclusive = true, sort = null, highPrecision = false) {
    const stack = [{
      node: this.root,
      depth: 0
    }];
    const result = [];
    while (stack.length > 0) {
      const {
        node,
        depth
      } = stack.pop();
      if (node == null) continue;
      if (node.left != null) {
        stack.push({
          node: node.left,
          depth: depth + 1
        });
      }
      if (node.right != null) {
        stack.push({
          node: node.right,
          depth: depth + 1
        });
      }
      const isInsidePolygon = BKDTree.isPointInPolygon(polygon, node.point);
      if (isInsidePolygon && inclusive || !isInsidePolygon && !inclusive) {
        result.push({
          point: node.point,
          docIDs: Array.from(node.docIDs)
        });
      }
    }
    const centroid = BKDTree.calculatePolygonCentroid(polygon);
    if (sort) {
      const distanceFn = highPrecision ? BKDTree.vincentyDistance : BKDTree.haversineDistance;
      result.sort((a, b) => {
        const distA = distanceFn(centroid, a.point);
        const distB = distanceFn(centroid, b.point);
        return sort.toLowerCase() === 'asc' ? distA - distB : distB - distA;
      });
    }
    return result;
  }
  toJSON() {
    return {
      root: this.root ? this.root.toJSON() : null
    };
  }
  static fromJSON(json) {
    const tree = new BKDTree();
    if (json.root) {
      tree.root = BKDNode.fromJSON(json.root);
      tree.buildNodeMap(tree.root);
    }
    return tree;
  }
  buildNodeMap(node) {
    if (node == null) return;
    const pointKey = this.getPointKey(node.point);
    this.nodeMap.set(pointKey, node);
    if (node.left) {
      this.buildNodeMap(node.left);
    }
    if (node.right) {
      this.buildNodeMap(node.right);
    }
  }
  static calculatePolygonCentroid(polygon) {
    let totalArea = 0;
    let centroidX = 0;
    let centroidY = 0;
    const polygonLength = polygon.length;
    for (let i = 0, j = polygonLength - 1; i < polygonLength; j = i++) {
      const xi = polygon[i].lon;
      const yi = polygon[i].lat;
      const xj = polygon[j].lon;
      const yj = polygon[j].lat;
      const areaSegment = xi * yj - xj * yi;
      totalArea += areaSegment;
      centroidX += (xi + xj) * areaSegment;
      centroidY += (yi + yj) * areaSegment;
    }
    totalArea /= 2;
    const centroidCoordinate = 6 * totalArea;
    centroidX /= centroidCoordinate;
    centroidY /= centroidCoordinate;
    return {
      lon: centroidX,
      lat: centroidY
    };
  }
  static isPointInPolygon(polygon, point) {
    let isInside = false;
    const x = point.lon;
    const y = point.lat;
    const polygonLength = polygon.length;
    for (let i = 0, j = polygonLength - 1; i < polygonLength; j = i++) {
      const xi = polygon[i].lon;
      const yi = polygon[i].lat;
      const xj = polygon[j].lon;
      const yj = polygon[j].lat;
      const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
      if (intersect) isInside = !isInside;
    }
    return isInside;
  }
  static haversineDistance(coord1, coord2) {
    const P = Math.PI / 180;
    const lat1 = coord1.lat * P;
    const lat2 = coord2.lat * P;
    const deltaLat = (coord2.lat - coord1.lat) * P;
    const deltaLon = (coord2.lon - coord1.lon) * P;
    const a = Math.sin(deltaLat / 2) * Math.sin(deltaLat / 2) + Math.cos(lat1) * Math.cos(lat2) * Math.sin(deltaLon / 2) * Math.sin(deltaLon / 2);
    const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
    return EARTH_RADIUS * c;
  }
  static vincentyDistance(coord1, coord2) {
    const a = 6378137;
    const f = 1 / 298.257223563;
    const b = (1 - f) * a;
    const P = Math.PI / 180;
    const lat1 = coord1.lat * P;
    const lat2 = coord2.lat * P;
    const deltaLon = (coord2.lon - coord1.lon) * P;
    const U1 = Math.atan((1 - f) * Math.tan(lat1));
    const U2 = Math.atan((1 - f) * Math.tan(lat2));
    const sinU1 = Math.sin(U1);
    const cosU1 = Math.cos(U1);
    const sinU2 = Math.sin(U2);
    const cosU2 = Math.cos(U2);
    let lambda = deltaLon;
    let prevLambda;
    let iterationLimit = 1000;
    let sinSigma;
    let cosSigma;
    let sigma;
    let sinAlpha;
    let cos2Alpha;
    let cos2SigmaM;
    do {
      const sinLambda = Math.sin(lambda);
      const cosLambda = Math.cos(lambda);
      sinSigma = Math.sqrt(cosU2 * sinLambda * (cosU2 * sinLambda) + (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda) * (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));
      if (sinSigma === 0) return 0; // co-incident points
      cosSigma = sinU1 * sinU2 + cosU1 * cosU2 * cosLambda;
      sigma = Math.atan2(sinSigma, cosSigma);
      sinAlpha = cosU1 * cosU2 * sinLambda / sinSigma;
      cos2Alpha = 1 - sinAlpha * sinAlpha;
      cos2SigmaM = cosSigma - 2 * sinU1 * sinU2 / cos2Alpha;
      if (isNaN(cos2SigmaM)) cos2SigmaM = 0;
      const C = f / 16 * cos2Alpha * (4 + f * (4 - 3 * cos2Alpha));
      prevLambda = lambda;
      lambda = deltaLon + (1 - C) * f * sinAlpha * (sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)));
    } while (Math.abs(lambda - prevLambda) > 1e-12 && --iterationLimit > 0);
    if (iterationLimit === 0) {
      return NaN;
    }
    const uSquared = cos2Alpha * (a * a - b * b) / (b * b);
    const A = 1 + uSquared / 16384 * (4096 + uSquared * (-768 + uSquared * (320 - 175 * uSquared)));
    const B = uSquared / 1024 * (256 + uSquared * (-128 + uSquared * (74 - 47 * uSquared)));
    const deltaSigma = B * sinSigma * (cos2SigmaM + B / 4 * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) - B / 6 * cos2SigmaM * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)));
    const s = b * A * (sigma - deltaSigma);
    return s;
  }
}

class BoolNode {
  true;
  false;
  constructor() {
    this.true = new Set();
    this.false = new Set();
  }
  insert(value, bool) {
    if (bool) {
      this.true.add(value);
    } else {
      this.false.add(value);
    }
  }
  delete(value, bool) {
    if (bool) {
      this.true.delete(value);
    } else {
      this.false.delete(value);
    }
  }
  getSize() {
    return this.true.size + this.false.size;
  }
  toJSON() {
    return {
      true: Array.from(this.true),
      false: Array.from(this.false)
    };
  }
  static fromJSON(json) {
    const node = new BoolNode();
    node.true = new Set(json.true);
    node.false = new Set(json.false);
    return node;
  }
}

function BM25(tf, matchingCount, docsCount, fieldLength, averageFieldLength, {
  k,
  b,
  d
}) {
  const idf = Math.log(1 + (docsCount - matchingCount + 0.5) / (matchingCount + 0.5));
  return idf * (d + tf * (k + 1)) / (tf + k * (1 - b + b * fieldLength / averageFieldLength));
}

const DEFAULT_SIMILARITY = 0.8;
class VectorIndex {
  size;
  vectors = new Map();
  constructor(size) {
    this.size = size;
  }
  add(internalDocumentId, value) {
    if (!(value instanceof Float32Array)) {
      value = new Float32Array(value);
    }
    const magnitude = getMagnitude(value, this.size);
    this.vectors.set(internalDocumentId, [magnitude, value]);
  }
  remove(internalDocumentId) {
    this.vectors.delete(internalDocumentId);
  }
  find(vector, similarity, whereFiltersIDs) {
    if (!(vector instanceof Float32Array)) {
      vector = new Float32Array(vector);
    }
    const results = findSimilarVectors(vector, whereFiltersIDs, this.vectors, this.size, similarity);
    return results;
  }
  toJSON() {
    const vectors = [];
    for (const [id, [magnitude, vector]] of this.vectors) {
      vectors.push([id, [magnitude, Array.from(vector)]]);
    }
    return {
      size: this.size,
      vectors
    };
  }
  static fromJSON(json) {
    const raw = json;
    const index = new VectorIndex(raw.size);
    for (const [id, [magnitude, vector]] of raw.vectors) {
      index.vectors.set(id, [magnitude, new Float32Array(vector)]);
    }
    return index;
  }
}
function getMagnitude(vector, vectorLength) {
  let magnitude = 0;
  for (let i = 0; i < vectorLength; i++) {
    magnitude += vector[i] * vector[i];
  }
  return Math.sqrt(magnitude);
}
// @todo: Write plugins for Node and Browsers to use parallel computation for this function
function findSimilarVectors(targetVector, keys, vectors, length, threshold) {
  const targetMagnitude = getMagnitude(targetVector, length);
  const similarVectors = [];
  const base = keys ? keys : vectors.keys();
  for (const vectorId of base) {
    const entry = vectors.get(vectorId);
    if (!entry) {
      continue;
    }
    const magnitude = entry[0];
    const vector = entry[1];
    let dotProduct = 0;
    for (let i = 0; i < length; i++) {
      dotProduct += targetVector[i] * vector[i];
    }
    const similarity = dotProduct / (targetMagnitude * magnitude);
    if (similarity >= threshold) {
      similarVectors.push([vectorId, similarity]);
    }
  }
  return similarVectors;
}

function insertDocumentScoreParameters(index, prop, id, tokens, docsCount) {
  const internalId = getInternalDocumentId(index.sharedInternalDocumentStore, id);
  index.avgFieldLength[prop] = ((index.avgFieldLength[prop] ?? 0) * (docsCount - 1) + tokens.length) / docsCount;
  index.fieldLengths[prop][internalId] = tokens.length;
  index.frequencies[prop][internalId] = {};
}
function insertTokenScoreParameters(index, prop, id, tokens, token) {
  let tokenFrequency = 0;
  for (const t of tokens) {
    if (t === token) {
      tokenFrequency++;
    }
  }
  const internalId = getInternalDocumentId(index.sharedInternalDocumentStore, id);
  const tf = tokenFrequency / tokens.length;
  index.frequencies[prop][internalId][token] = tf;
  if (!(token in index.tokenOccurrences[prop])) {
    index.tokenOccurrences[prop][token] = 0;
  }
  // increase a token counter that may not yet exist
  index.tokenOccurrences[prop][token] = (index.tokenOccurrences[prop][token] ?? 0) + 1;
}
function removeDocumentScoreParameters(index, prop, id, docsCount) {
  const internalId = getInternalDocumentId(index.sharedInternalDocumentStore, id);
  if (docsCount > 1) {
    index.avgFieldLength[prop] = (index.avgFieldLength[prop] * docsCount - index.fieldLengths[prop][internalId]) / (docsCount - 1);
  } else {
    index.avgFieldLength[prop] = undefined;
  }
  index.fieldLengths[prop][internalId] = undefined;
  index.frequencies[prop][internalId] = undefined;
}
function removeTokenScoreParameters(index, prop, token) {
  index.tokenOccurrences[prop][token]--;
}
function create$4(orama, sharedInternalDocumentStore, schema, index, prefix = '') {
  if (!index) {
    index = {
      sharedInternalDocumentStore,
      indexes: {},
      vectorIndexes: {},
      searchableProperties: [],
      searchablePropertiesWithTypes: {},
      frequencies: {},
      tokenOccurrences: {},
      avgFieldLength: {},
      fieldLengths: {}
    };
  }
  for (const [prop, type] of Object.entries(schema)) {
    const path = `${prefix}${prefix ? '.' : ''}${prop}`;
    if (typeof type === 'object' && !Array.isArray(type)) {
      // Nested
      create$4(orama, sharedInternalDocumentStore, type, index, path);
      continue;
    }
    if (isVectorType(type)) {
      index.searchableProperties.push(path);
      index.searchablePropertiesWithTypes[path] = type;
      index.vectorIndexes[path] = {
        type: 'Vector',
        node: new VectorIndex(getVectorSize(type)),
        isArray: false
      };
    } else {
      const isArray = /\[/.test(type);
      switch (type) {
        case 'boolean':
        case 'boolean[]':
          index.indexes[path] = {
            type: 'Bool',
            node: new BoolNode(),
            isArray
          };
          break;
        case 'number':
        case 'number[]':
          index.indexes[path] = {
            type: 'AVL',
            node: new AVLTree(0, []),
            isArray
          };
          break;
        case 'string':
        case 'string[]':
          index.indexes[path] = {
            type: 'Radix',
            node: new RadixTree(),
            isArray
          };
          index.avgFieldLength[path] = 0;
          index.frequencies[path] = {};
          index.tokenOccurrences[path] = {};
          index.fieldLengths[path] = {};
          break;
        case 'enum':
        case 'enum[]':
          index.indexes[path] = {
            type: 'Flat',
            node: new FlatTree(),
            isArray
          };
          break;
        case 'geopoint':
          index.indexes[path] = {
            type: 'BKD',
            node: new BKDTree(),
            isArray
          };
          break;
        default:
          throw createError('INVALID_SCHEMA_TYPE', Array.isArray(type) ? 'array' : type, path);
      }
      index.searchableProperties.push(path);
      index.searchablePropertiesWithTypes[path] = type;
    }
  }
  return index;
}
function insertScalarBuilder(implementation, index, prop, internalId, language, tokenizer, docsCount, options) {
  return value => {
    const {
      type,
      node
    } = index.indexes[prop];
    switch (type) {
      case 'Bool':
        {
          node[value ? 'true' : 'false'].add(internalId);
          break;
        }
      case 'AVL':
        {
          const avlRebalanceThreshold = options?.avlRebalanceThreshold ?? 1;
          node.insert(value, internalId, avlRebalanceThreshold);
          break;
        }
      case 'Radix':
        {
          const tokens = tokenizer.tokenize(value, language, prop, false);
          implementation.insertDocumentScoreParameters(index, prop, internalId, tokens, docsCount);
          for (const token of tokens) {
            implementation.insertTokenScoreParameters(index, prop, internalId, tokens, token);
            node.insert(token, internalId);
          }
          break;
        }
      case 'Flat':
        {
          node.insert(value, internalId);
          break;
        }
      case 'BKD':
        {
          node.insert(value, [internalId]);
          break;
        }
    }
  };
}
function insert$2(implementation, index, prop, id, internalId, value, schemaType, language, tokenizer, docsCount, options) {
  if (isVectorType(schemaType)) {
    return insertVector(index, prop, value, id, internalId);
  }
  const insertScalar = insertScalarBuilder(implementation, index, prop, internalId, language, tokenizer, docsCount, options);
  if (!isArrayType(schemaType)) {
    return insertScalar(value);
  }
  const elements = value;
  const elementsLength = elements.length;
  for (let i = 0; i < elementsLength; i++) {
    insertScalar(elements[i]);
  }
}
function insertVector(index, prop, value, id, internalDocumentId) {
  index.vectorIndexes[prop].node.add(internalDocumentId, value);
}
function removeScalar(implementation, index, prop, id, internalId, value, schemaType, language, tokenizer, docsCount) {
  if (isVectorType(schemaType)) {
    index.vectorIndexes[prop].node.remove(internalId);
    return true;
  }
  const {
    type,
    node
  } = index.indexes[prop];
  switch (type) {
    case 'AVL':
      {
        node.removeDocument(value, internalId);
        return true;
      }
    case 'Bool':
      {
        node[value ? 'true' : 'false'].delete(internalId);
        return true;
      }
    case 'Radix':
      {
        const tokens = tokenizer.tokenize(value, language, prop);
        implementation.removeDocumentScoreParameters(index, prop, id, docsCount);
        for (const token of tokens) {
          implementation.removeTokenScoreParameters(index, prop, token);
          node.removeDocumentByWord(token, internalId);
        }
        return true;
      }
    case 'Flat':
      {
        node.removeDocument(internalId, value);
        return true;
      }
    case 'BKD':
      {
        node.removeDocByID(value, internalId);
        return false;
      }
  }
}
function remove$2(implementation, index, prop, id, internalId, value, schemaType, language, tokenizer, docsCount) {
  if (!isArrayType(schemaType)) {
    return removeScalar(implementation, index, prop, id, internalId, value, schemaType, language, tokenizer, docsCount);
  }
  const innerSchemaType = getInnerType(schemaType);
  const elements = value;
  const elementsLength = elements.length;
  for (let i = 0; i < elementsLength; i++) {
    removeScalar(implementation, index, prop, id, internalId, elements[i], innerSchemaType, language, tokenizer, docsCount);
  }
  return true;
}
function calculateResultScores(index, prop, term, ids, docsCount, bm25Relevance, resultsMap, boostPerProperty, whereFiltersIDs, keywordMatchesMap) {
  const documentIDs = Array.from(ids);
  const avgFieldLength = index.avgFieldLength[prop];
  const fieldLengths = index.fieldLengths[prop];
  const oramaOccurrences = index.tokenOccurrences[prop];
  const oramaFrequencies = index.frequencies[prop];
  // oramaOccurrences[term] can be undefined, 0, string, or { [k: string]: number }
  const termOccurrences = typeof oramaOccurrences[term] === 'number' ? oramaOccurrences[term] ?? 0 : 0;
  // Calculate TF-IDF value for each term, in each document, for each index.
  const documentIDsLength = documentIDs.length;
  for (let k = 0; k < documentIDsLength; k++) {
    const internalId = documentIDs[k];
    if (whereFiltersIDs && !whereFiltersIDs.has(internalId)) {
      continue;
    }
    // Track keyword matches per property
    if (!keywordMatchesMap.has(internalId)) {
      keywordMatchesMap.set(internalId, new Map());
    }
    const propertyMatches = keywordMatchesMap.get(internalId);
    propertyMatches.set(prop, (propertyMatches.get(prop) || 0) + 1);
    const tf = oramaFrequencies?.[internalId]?.[term] ?? 0;
    const bm25 = BM25(tf, termOccurrences, docsCount, fieldLengths[internalId], avgFieldLength, bm25Relevance);
    if (resultsMap.has(internalId)) {
      resultsMap.set(internalId, resultsMap.get(internalId) + bm25 * boostPerProperty);
    } else {
      resultsMap.set(internalId, bm25 * boostPerProperty);
    }
  }
}
function search$1(index, term, tokenizer, language, propertiesToSearch, exact, tolerance, boost, relevance, docsCount, whereFiltersIDs, threshold = 0) {
  const tokens = tokenizer.tokenize(term, language);
  const keywordsCount = tokens.length || 1;
  // Track keyword matches per document and property
  const keywordMatchesMap = new Map();
  // Track which tokens were found in the search
  const tokenFoundMap = new Map();
  const resultsMap = new Map();
  for (const prop of propertiesToSearch) {
    if (!(prop in index.indexes)) {
      continue;
    }
    const tree = index.indexes[prop];
    const {
      type
    } = tree;
    if (type !== 'Radix') {
      throw createError('WRONG_SEARCH_PROPERTY_TYPE', prop);
    }
    const boostPerProperty = boost[prop] ?? 1;
    if (boostPerProperty <= 0) {
      throw createError('INVALID_BOOST_VALUE', boostPerProperty);
    }
    // if the tokenizer returns an empty array, we returns all the documents
    if (tokens.length === 0 && !term) {
      tokens.push('');
    }
    // Process each token in the search term
    const tokenLength = tokens.length;
    for (let i = 0; i < tokenLength; i++) {
      const token = tokens[i];
      const searchResult = tree.node.find({
        term: token,
        exact,
        tolerance
      });
      // See if this token was found (for threshold=0 filtering)
      const termsFound = Object.keys(searchResult);
      if (termsFound.length > 0) {
        tokenFoundMap.set(token, true);
      }
      // Process each matching term
      const termsFoundLength = termsFound.length;
      for (let j = 0; j < termsFoundLength; j++) {
        const word = termsFound[j];
        const ids = searchResult[word];
        calculateResultScores(index, prop, word, ids, docsCount, relevance, resultsMap, boostPerProperty, whereFiltersIDs, keywordMatchesMap);
      }
    }
  }
  // Convert to array and sort by score
  const results = Array.from(resultsMap.entries()).map(([id, score]) => [id, score]).sort((a, b) => b[1] - a[1]);
  if (results.length === 0) {
    return [];
  }
  // If threshold is 1, return all results
  if (threshold === 1) {
    return results;
  }
  // For threshold=0, check if all tokens were found
  if (threshold === 0) {
    // Quick return for single tokens - already validated
    if (keywordsCount === 1) {
      return results;
    }
    // For multiple tokens, verify that ALL tokens were found
    // If any token wasn't found, return an empty result
    for (const token of tokens) {
      if (!tokenFoundMap.get(token)) {
        return [];
      }
    }
    // Find documents that have all keywords in at least one property
    const fullMatches = results.filter(([id]) => {
      const propertyMatches = keywordMatchesMap.get(id);
      if (!propertyMatches) return false;
      // Check if any property has all keywords
      return Array.from(propertyMatches.values()).some(matches => matches === keywordsCount);
    });
    return fullMatches;
  }
  // Find documents that have all keywords in at least one property
  const fullMatches = results.filter(([id]) => {
    const propertyMatches = keywordMatchesMap.get(id);
    if (!propertyMatches) return false;
    // Check if any property has all keywords
    return Array.from(propertyMatches.values()).some(matches => matches === keywordsCount);
  });
  // If we have full matches and threshold < 1, return full matches plus a percentage of partial matches
  if (fullMatches.length > 0) {
    const remainingResults = results.filter(([id]) => !fullMatches.some(([fid]) => fid === id));
    const additionalResults = Math.ceil(remainingResults.length * threshold);
    return [...fullMatches, ...remainingResults.slice(0, additionalResults)];
  }
  // If no full matches, return all results
  return results;
}
function searchByWhereClause(index, tokenizer, filters, language) {
  // Handle logical operators
  if ('and' in filters && filters.and && Array.isArray(filters.and)) {
    const andFilters = filters.and;
    if (andFilters.length === 0) {
      return new Set();
    }
    const results = andFilters.map(filter => searchByWhereClause(index, tokenizer, filter, language));
    return setIntersection(...results);
  }
  if ('or' in filters && filters.or && Array.isArray(filters.or)) {
    const orFilters = filters.or;
    if (orFilters.length === 0) {
      return new Set();
    }
    const results = orFilters.map(filter => searchByWhereClause(index, tokenizer, filter, language));
    // Use reduce to union all sets
    return results.reduce((acc, set) => setUnion(acc, set), new Set());
  }
  if ('not' in filters && filters.not) {
    const notFilter = filters.not;
    // Get all document IDs from the internal document store
    const allDocs = new Set();
    // Get all document IDs from the internal document store
    const docsStore = index.sharedInternalDocumentStore;
    for (let i = 1; i <= docsStore.internalIdToId.length; i++) {
      allDocs.add(i);
    }
    const notResult = searchByWhereClause(index, tokenizer, notFilter, language);
    return setDifference$1(allDocs, notResult);
  }
  // Handle regular property filters (existing logic)
  const filterKeys = Object.keys(filters);
  const filtersMap = filterKeys.reduce((acc, key) => ({
    [key]: new Set(),
    ...acc
  }), {});
  for (const param of filterKeys) {
    const operation = filters[param];
    if (typeof index.indexes[param] === 'undefined') {
      throw createError('UNKNOWN_FILTER_PROPERTY', param);
    }
    const {
      node,
      type,
      isArray
    } = index.indexes[param];
    if (type === 'Bool') {
      const idx = node;
      const filteredIDs = operation ? idx.true : idx.false;
      filtersMap[param] = setUnion(filtersMap[param], filteredIDs);
      continue;
    }
    if (type === 'BKD') {
      let reqOperation;
      if ('radius' in operation) {
        reqOperation = 'radius';
      } else if ('polygon' in operation) {
        reqOperation = 'polygon';
      } else {
        throw new Error(`Invalid operation ${operation}`);
      }
      if (reqOperation === 'radius') {
        const {
          value,
          coordinates,
          unit = 'm',
          inside = true,
          highPrecision = false
        } = operation[reqOperation];
        const distanceInMeters = convertDistanceToMeters(value, unit);
        const ids = node.searchByRadius(coordinates, distanceInMeters, inside, undefined, highPrecision);
        filtersMap[param] = addGeoResult(filtersMap[param], ids);
      } else {
        const {
          coordinates,
          inside = true,
          highPrecision = false
        } = operation[reqOperation];
        const ids = node.searchByPolygon(coordinates, inside, undefined, highPrecision);
        filtersMap[param] = addGeoResult(filtersMap[param], ids);
      }
      continue;
    }
    if (type === 'Radix' && (typeof operation === 'string' || Array.isArray(operation))) {
      for (const raw of [operation].flat()) {
        const term = tokenizer.tokenize(raw, language, param);
        for (const t of term) {
          const filteredIDsResults = node.find({
            term: t,
            exact: true
          });
          filtersMap[param] = addFindResult(filtersMap[param], filteredIDsResults);
        }
      }
      continue;
    }
    const operationKeys = Object.keys(operation);
    if (operationKeys.length > 1) {
      throw createError('INVALID_FILTER_OPERATION', operationKeys.length);
    }
    if (type === 'Flat') {
      const results = new Set(isArray ? node.filterArr(operation) : node.filter(operation));
      filtersMap[param] = setUnion(filtersMap[param], results);
      continue;
    }
    if (type === 'AVL') {
      const operationOpt = operationKeys[0];
      const operationValue = operation[operationOpt];
      let filteredIDs;
      switch (operationOpt) {
        case 'gt':
          {
            filteredIDs = node.greaterThan(operationValue, false);
            break;
          }
        case 'gte':
          {
            filteredIDs = node.greaterThan(operationValue, true);
            break;
          }
        case 'lt':
          {
            filteredIDs = node.lessThan(operationValue, false);
            break;
          }
        case 'lte':
          {
            filteredIDs = node.lessThan(operationValue, true);
            break;
          }
        case 'eq':
          {
            const ret = node.find(operationValue);
            filteredIDs = ret ?? new Set();
            break;
          }
        case 'between':
          {
            const [min, max] = operationValue;
            filteredIDs = node.rangeSearch(min, max);
            break;
          }
        default:
          throw createError('INVALID_FILTER_OPERATION', operationOpt);
      }
      filtersMap[param] = setUnion(filtersMap[param], filteredIDs);
    }
  }
  // AND operation: calculate the intersection between all the IDs in filterMap
  return setIntersection(...Object.values(filtersMap));
}
function getSearchableProperties(index) {
  return index.searchableProperties;
}
function getSearchablePropertiesWithTypes(index) {
  return index.searchablePropertiesWithTypes;
}
function load$3(sharedInternalDocumentStore, raw) {
  const {
    indexes: rawIndexes,
    vectorIndexes: rawVectorIndexes,
    searchableProperties,
    searchablePropertiesWithTypes,
    frequencies,
    tokenOccurrences,
    avgFieldLength,
    fieldLengths
  } = raw;
  const indexes = {};
  const vectorIndexes = {};
  for (const prop of Object.keys(rawIndexes)) {
    const {
      node,
      type,
      isArray
    } = rawIndexes[prop];
    switch (type) {
      case 'Radix':
        indexes[prop] = {
          type: 'Radix',
          node: RadixTree.fromJSON(node),
          isArray
        };
        break;
      case 'Flat':
        indexes[prop] = {
          type: 'Flat',
          node: FlatTree.fromJSON(node),
          isArray
        };
        break;
      case 'AVL':
        indexes[prop] = {
          type: 'AVL',
          node: AVLTree.fromJSON(node),
          isArray
        };
        break;
      case 'BKD':
        indexes[prop] = {
          type: 'BKD',
          node: BKDTree.fromJSON(node),
          isArray
        };
        break;
      case 'Bool':
        indexes[prop] = {
          type: 'Bool',
          node: BoolNode.fromJSON(node),
          isArray
        };
        break;
      default:
        indexes[prop] = rawIndexes[prop];
    }
  }
  for (const idx of Object.keys(rawVectorIndexes)) {
    vectorIndexes[idx] = {
      type: 'Vector',
      isArray: false,
      node: VectorIndex.fromJSON(rawVectorIndexes[idx])
    };
  }
  return {
    sharedInternalDocumentStore,
    indexes,
    vectorIndexes,
    searchableProperties,
    searchablePropertiesWithTypes,
    frequencies,
    tokenOccurrences,
    avgFieldLength,
    fieldLengths
  };
}
function save$3(index) {
  const {
    indexes,
    vectorIndexes,
    searchableProperties,
    searchablePropertiesWithTypes,
    frequencies,
    tokenOccurrences,
    avgFieldLength,
    fieldLengths
  } = index;
  const dumpVectorIndexes = {};
  for (const idx of Object.keys(vectorIndexes)) {
    dumpVectorIndexes[idx] = vectorIndexes[idx].node.toJSON();
  }
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  const savedIndexes = {};
  for (const name of Object.keys(indexes)) {
    const {
      type,
      node,
      isArray
    } = indexes[name];
    if (type === 'Flat' || type === 'Radix' || type === 'AVL' || type === 'BKD' || type === 'Bool') {
      savedIndexes[name] = {
        type,
        node: node.toJSON(),
        isArray
      };
    } else {
      savedIndexes[name] = indexes[name];
      savedIndexes[name].node = savedIndexes[name].node.toJSON();
    }
  }
  return {
    indexes: savedIndexes,
    vectorIndexes: dumpVectorIndexes,
    searchableProperties,
    searchablePropertiesWithTypes,
    frequencies,
    tokenOccurrences,
    avgFieldLength,
    fieldLengths
  };
}
function createIndex() {
  return {
    create: create$4,
    insert: insert$2,
    remove: remove$2,
    insertDocumentScoreParameters,
    insertTokenScoreParameters,
    removeDocumentScoreParameters,
    removeTokenScoreParameters,
    calculateResultScores,
    search: search$1,
    searchByWhereClause,
    getSearchableProperties,
    getSearchablePropertiesWithTypes,
    load: load$3,
    save: save$3
  };
}
function addGeoResult(set, ids) {
  if (!set) {
    set = new Set();
  }
  const idsLength = ids.length;
  for (let i = 0; i < idsLength; i++) {
    const entry = ids[i].docIDs;
    const idsLength = entry.length;
    for (let j = 0; j < idsLength; j++) {
      set.add(entry[j]);
    }
  }
  return set;
}
function createGeoTokenScores(ids, centerPoint, highPrecision = false) {
  const distanceFn = highPrecision ? BKDTree.vincentyDistance : BKDTree.haversineDistance;
  const results = [];
  // Calculate distances for all results to find the maximum
  const distances = [];
  for (const {
    point
  } of ids) {
    distances.push(distanceFn(centerPoint, point));
  }
  const maxDistance = Math.max(...distances);
  // Create results with inverse distance scores (higher score = closer)
  let index = 0;
  for (const {
    docIDs
  } of ids) {
    const distance = distances[index];
    // Use inverse score: closer points get higher scores
    // Add 1 to avoid division by zero for points at exact center
    const score = maxDistance - distance + 1;
    for (const docID of docIDs) {
      results.push([docID, score]);
    }
    index++;
  }
  // Sort by score (higher first - closer points)
  results.sort((a, b) => b[1] - a[1]);
  return results;
}
function isGeosearchOnlyQuery(filters, index) {
  const filterKeys = Object.keys(filters);
  if (filterKeys.length !== 1) {
    return {
      isGeoOnly: false
    };
  }
  const param = filterKeys[0];
  const operation = filters[param];
  if (typeof index.indexes[param] === 'undefined') {
    return {
      isGeoOnly: false
    };
  }
  const {
    type
  } = index.indexes[param];
  if (type === 'BKD' && operation && ('radius' in operation || 'polygon' in operation)) {
    return {
      isGeoOnly: true,
      geoProperty: param,
      geoOperation: operation
    };
  }
  return {
    isGeoOnly: false
  };
}
function searchByGeoWhereClause(index, filters) {
  const indexTyped = index;
  const geoInfo = isGeosearchOnlyQuery(filters, indexTyped);
  if (!geoInfo.isGeoOnly || !geoInfo.geoProperty || !geoInfo.geoOperation) {
    return null;
  }
  const {
    node
  } = indexTyped.indexes[geoInfo.geoProperty];
  const operation = geoInfo.geoOperation;
  // Cast node to BKDTree since we already verified it's type 'BKD'
  const bkdNode = node;
  let results;
  if ('radius' in operation) {
    const {
      value,
      coordinates,
      unit = 'm',
      inside = true,
      highPrecision = false
    } = operation.radius;
    const centerPoint = coordinates;
    const distanceInMeters = convertDistanceToMeters(value, unit);
    results = bkdNode.searchByRadius(centerPoint, distanceInMeters, inside, 'asc', highPrecision);
    return createGeoTokenScores(results, centerPoint, highPrecision);
  } else if ('polygon' in operation) {
    const {
      coordinates,
      inside = true,
      highPrecision = false
    } = operation.polygon;
    results = bkdNode.searchByPolygon(coordinates, inside, 'asc', highPrecision);
    const centroid = BKDTree.calculatePolygonCentroid(coordinates);
    return createGeoTokenScores(results, centroid, highPrecision);
  }
  return null;
}
function addFindResult(set, filteredIDsResults) {
  if (!set) {
    set = new Set();
  }
  const keys = Object.keys(filteredIDsResults);
  const keysLength = keys.length;
  for (let i = 0; i < keysLength; i++) {
    const ids = filteredIDsResults[keys[i]];
    const idsLength = ids.length;
    for (let j = 0; j < idsLength; j++) {
      set.add(ids[j]);
    }
  }
  return set;
}

var index$5 = /*#__PURE__*/Object.freeze({
	__proto__: null,
	calculateResultScores: calculateResultScores,
	create: create$4,
	createIndex: createIndex,
	getSearchableProperties: getSearchableProperties,
	getSearchablePropertiesWithTypes: getSearchablePropertiesWithTypes,
	insert: insert$2,
	insertDocumentScoreParameters: insertDocumentScoreParameters,
	insertTokenScoreParameters: insertTokenScoreParameters,
	insertVector: insertVector,
	load: load$3,
	remove: remove$2,
	removeDocumentScoreParameters: removeDocumentScoreParameters,
	removeTokenScoreParameters: removeTokenScoreParameters,
	save: save$3,
	search: search$1,
	searchByGeoWhereClause: searchByGeoWhereClause,
	searchByWhereClause: searchByWhereClause
});

function innerCreate(orama, sharedInternalDocumentStore, schema, sortableDeniedProperties, prefix) {
  const sorter = {
    language: orama.tokenizer.language,
    sharedInternalDocumentStore,
    enabled: true,
    isSorted: true,
    sortableProperties: [],
    sortablePropertiesWithTypes: {},
    sorts: {}
  };
  for (const [prop, type] of Object.entries(schema)) {
    const path = `${prefix}${prefix ? '.' : ''}${prop}`;
    if (sortableDeniedProperties.includes(path)) {
      continue;
    }
    if (typeof type === 'object' && !Array.isArray(type)) {
      // Nested
      const ret = innerCreate(orama, sharedInternalDocumentStore, type, sortableDeniedProperties, path);
      safeArrayPush(sorter.sortableProperties, ret.sortableProperties);
      sorter.sorts = {
        ...sorter.sorts,
        ...ret.sorts
      };
      sorter.sortablePropertiesWithTypes = {
        ...sorter.sortablePropertiesWithTypes,
        ...ret.sortablePropertiesWithTypes
      };
      continue;
    }
    if (!isVectorType(type)) {
      switch (type) {
        case 'boolean':
        case 'number':
        case 'string':
          sorter.sortableProperties.push(path);
          sorter.sortablePropertiesWithTypes[path] = type;
          sorter.sorts[path] = {
            docs: new Map(),
            orderedDocsToRemove: new Map(),
            orderedDocs: [],
            type: type
          };
          break;
        case 'geopoint':
        case 'enum':
          // We don't allow to sort by enums or geopoints
          continue;
        case 'enum[]':
        case 'boolean[]':
        case 'number[]':
        case 'string[]':
          // We don't allow to sort by arrays
          continue;
        default:
          throw createError('INVALID_SORT_SCHEMA_TYPE', Array.isArray(type) ? 'array' : type, path);
      }
    }
  }
  return sorter;
}
function create$3(orama, sharedInternalDocumentStore, schema, config) {
  const isSortEnabled = config?.enabled !== false;
  if (!isSortEnabled) {
    return {
      disabled: true
    };
  }
  return innerCreate(orama, sharedInternalDocumentStore, schema, (config || {}).unsortableProperties || [], '');
}
function insert$1(sorter, prop, id, value) {
  if (!sorter.enabled) {
    return;
  }
  sorter.isSorted = false;
  const internalId = getInternalDocumentId(sorter.sharedInternalDocumentStore, id);
  const s = sorter.sorts[prop];
  // This happen during a document updating
  // Because we re-use the same internalId
  // We need to clean-up the data structure before re-inserting
  // to avoid duplicates in the orderedDocs array
  // See: https://github.com/oramasearch/orama/issues/629
  if (s.orderedDocsToRemove.has(internalId)) {
    ensureOrderedDocsAreDeletedByProperty(sorter, prop);
  }
  s.docs.set(internalId, s.orderedDocs.length);
  s.orderedDocs.push([internalId, value]);
}
function ensureIsSorted(sorter) {
  if (sorter.isSorted || !sorter.enabled) {
    return;
  }
  const properties = Object.keys(sorter.sorts);
  for (const prop of properties) {
    ensurePropertyIsSorted(sorter, prop);
  }
  sorter.isSorted = true;
}
function stringSort(language, value, d) {
  return value[1].localeCompare(d[1], getLocale(language));
}
function numberSort(value, d) {
  return value[1] - d[1];
}
function booleanSort(value, d) {
  return d[1] ? -1 : 1;
}
function ensurePropertyIsSorted(sorter, prop) {
  const s = sorter.sorts[prop];
  let predicate;
  switch (s.type) {
    case 'string':
      predicate = stringSort.bind(null, sorter.language);
      break;
    case 'number':
      predicate = numberSort.bind(null);
      break;
    case 'boolean':
      predicate = booleanSort.bind(null);
      break;
  }
  s.orderedDocs.sort(predicate);
  // Increment position for the greather documents
  const orderedDocsLength = s.orderedDocs.length;
  for (let i = 0; i < orderedDocsLength; i++) {
    const docId = s.orderedDocs[i][0];
    s.docs.set(docId, i);
  }
}
function ensureOrderedDocsAreDeleted(sorter) {
  const properties = Object.keys(sorter.sorts);
  for (const prop of properties) {
    ensureOrderedDocsAreDeletedByProperty(sorter, prop);
  }
}
function ensureOrderedDocsAreDeletedByProperty(sorter, prop) {
  const s = sorter.sorts[prop];
  if (!s.orderedDocsToRemove.size) return;
  s.orderedDocs = s.orderedDocs.filter(doc => !s.orderedDocsToRemove.has(doc[0]));
  s.orderedDocsToRemove.clear();
}
function remove$1(sorter, prop, id) {
  if (!sorter.enabled) {
    return;
  }
  const s = sorter.sorts[prop];
  const internalId = getInternalDocumentId(sorter.sharedInternalDocumentStore, id);
  const index = s.docs.get(internalId);
  if (!index) return;
  s.docs.delete(internalId);
  s.orderedDocsToRemove.set(internalId, true);
}
function sortBy(sorter, docIds, by) {
  if (!sorter.enabled) {
    throw createError('SORT_DISABLED');
  }
  const property = by.property;
  const isDesc = by.order === 'DESC';
  const s = sorter.sorts[property];
  if (!s) {
    throw createError('UNABLE_TO_SORT_ON_UNKNOWN_FIELD', property, sorter.sortableProperties.join(', '));
  }
  ensureOrderedDocsAreDeletedByProperty(sorter, property);
  ensureIsSorted(sorter);
  docIds.sort((a, b) => {
    // This sort algorithm works leveraging on
    // that s.docs is a map of docId -> position
    // If a document is not indexed, it will be not present in the map
    const indexOfA = s.docs.get(getInternalDocumentId(sorter.sharedInternalDocumentStore, a[0]));
    const indexOfB = s.docs.get(getInternalDocumentId(sorter.sharedInternalDocumentStore, b[0]));
    const isAIndexed = typeof indexOfA !== 'undefined';
    const isBIndexed = typeof indexOfB !== 'undefined';
    if (!isAIndexed && !isBIndexed) {
      return 0;
    }
    // unindexed documents are always at the end
    if (!isAIndexed) {
      return 1;
    }
    if (!isBIndexed) {
      return -1;
    }
    return isDesc ? indexOfB - indexOfA : indexOfA - indexOfB;
  });
  return docIds;
}
function getSortableProperties(sorter) {
  if (!sorter.enabled) {
    return [];
  }
  return sorter.sortableProperties;
}
function getSortablePropertiesWithTypes(sorter) {
  if (!sorter.enabled) {
    return {};
  }
  return sorter.sortablePropertiesWithTypes;
}
function load$2(sharedInternalDocumentStore, raw) {
  const rawDocument = raw;
  if (!rawDocument.enabled) {
    return {
      enabled: false
    };
  }
  const sorts = Object.keys(rawDocument.sorts).reduce((acc, prop) => {
    const {
      docs,
      orderedDocs,
      type
    } = rawDocument.sorts[prop];
    acc[prop] = {
      docs: new Map(Object.entries(docs).map(([k, v]) => [+k, v])),
      orderedDocsToRemove: new Map(),
      orderedDocs,
      type
    };
    return acc;
  }, {});
  return {
    sharedInternalDocumentStore,
    language: rawDocument.language,
    sortableProperties: rawDocument.sortableProperties,
    sortablePropertiesWithTypes: rawDocument.sortablePropertiesWithTypes,
    sorts,
    enabled: true,
    isSorted: rawDocument.isSorted
  };
}
function save$2(sorter) {
  if (!sorter.enabled) {
    return {
      enabled: false
    };
  }
  ensureOrderedDocsAreDeleted(sorter);
  ensureIsSorted(sorter);
  const sorts = Object.keys(sorter.sorts).reduce((acc, prop) => {
    const {
      docs,
      orderedDocs,
      type
    } = sorter.sorts[prop];
    acc[prop] = {
      docs: Object.fromEntries(docs.entries()),
      orderedDocs,
      type
    };
    return acc;
  }, {});
  return {
    language: sorter.language,
    sortableProperties: sorter.sortableProperties,
    sortablePropertiesWithTypes: sorter.sortablePropertiesWithTypes,
    sorts,
    enabled: sorter.enabled,
    isSorted: sorter.isSorted
  };
}
function createSorter() {
  return {
    create: create$3,
    insert: insert$1,
    remove: remove$1,
    save: save$2,
    load: load$2,
    sortBy,
    getSortableProperties,
    getSortablePropertiesWithTypes
  };
}

var sorter = /*#__PURE__*/Object.freeze({
	__proto__: null,
	createSorter: createSorter,
	load: load$2,
	save: save$2
});

const DIACRITICS_CHARCODE_START = 192;
const DIACRITICS_CHARCODE_END = 383;
const CHARCODE_REPLACE_MAPPING = [65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73, 69, 78, 79, 79, 79, 79, 79, null, 79, 85, 85, 85, 85, 89, 80, 115, 97, 97, 97, 97, 97, 97, 97, 99, 101, 101, 101, 101, 105, 105, 105, 105, 101, 110, 111, 111, 111, 111, 111, null, 111, 117, 117, 117, 117, 121, 112, 121, 65, 97, 65, 97, 65, 97, 67, 99, 67, 99, 67, 99, 67, 99, 68, 100, 68, 100, 69, 101, 69, 101, 69, 101, 69, 101, 69, 101, 71, 103, 71, 103, 71, 103, 71, 103, 72, 104, 72, 104, 73, 105, 73, 105, 73, 105, 73, 105, 73, 105, 73, 105, 74, 106, 75, 107, 107, 76, 108, 76, 108, 76, 108, 76, 108, 76, 108, 78, 110, 78, 110, 78, 110, 110, 78, 110, 79, 111, 79, 111, 79, 111, 79, 111, 82, 114, 82, 114, 82, 114, 83, 115, 83, 115, 83, 115, 83, 115, 84, 116, 84, 116, 84, 116, 85, 117, 85, 117, 85, 117, 85, 117, 85, 117, 85, 117, 87, 119, 89, 121, 89, 90, 122, 90, 122, 90, 122, 115];
function replaceChar(charCode) {
  if (charCode < DIACRITICS_CHARCODE_START || charCode > DIACRITICS_CHARCODE_END) return charCode;
  /* c8 ignore next  */
  return CHARCODE_REPLACE_MAPPING[charCode - DIACRITICS_CHARCODE_START] || charCode;
}
function replaceDiacritics(str) {
  const stringCharCode = [];
  for (let idx = 0; idx < str.length; idx++) {
    stringCharCode[idx] = replaceChar(str.charCodeAt(idx));
  }
  return String.fromCharCode(...stringCharCode);
}

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck
const step2List = {
  ational: 'ate',
  tional: 'tion',
  enci: 'ence',
  anci: 'ance',
  izer: 'ize',
  bli: 'ble',
  alli: 'al',
  entli: 'ent',
  eli: 'e',
  ousli: 'ous',
  ization: 'ize',
  ation: 'ate',
  ator: 'ate',
  alism: 'al',
  iveness: 'ive',
  fulness: 'ful',
  ousness: 'ous',
  aliti: 'al',
  iviti: 'ive',
  biliti: 'ble',
  logi: 'log'
};
const step3List = {
  icate: 'ic',
  ative: '',
  alize: 'al',
  iciti: 'ic',
  ical: 'ic',
  ful: '',
  ness: ''
};
// Consonant
const c = '[^aeiou]';
// Vowel
const v = '[aeiouy]';
// Consonant sequence
const C = c + '[^aeiouy]*';
// Vowel sequence
const V = v + '[aeiou]*';
// [C]VC... is m>0
const mgr0 = '^(' + C + ')?' + V + C;
// [C]VC[V] is m=1
const meq1 = '^(' + C + ')?' + V + C + '(' + V + ')?$';
// [C]VCVC... is m>1
const mgr1 = '^(' + C + ')?' + V + C + V + C;
// vowel in stem
const s_v = '^(' + C + ')?' + v;
function stemmer(w) {
  let stem;
  let suffix;
  let re;
  let re2;
  let re3;
  let re4;
  if (w.length < 3) {
    return w;
  }
  const firstch = w.substring(0, 1);
  if (firstch == 'y') {
    w = firstch.toUpperCase() + w.substring(1);
  }
  re = /^(.+?)(ss|i)es$/;
  re2 = /^(.+?)([^s])s$/;
  if (re.test(w)) {
    w = w.replace(re, '$1$2');
  } else if (re2.test(w)) {
    w = w.replace(re2, '$1$2');
  }
  re = /^(.+?)eed$/;
  re2 = /^(.+?)(ed|ing)$/;
  if (re.test(w)) {
    const fp = re.exec(w);
    re = new RegExp(mgr0);
    if (re.test(fp[1])) {
      re = /.$/;
      w = w.replace(re, '');
    }
  } else if (re2.test(w)) {
    const fp = re2.exec(w);
    stem = fp[1];
    re2 = new RegExp(s_v);
    if (re2.test(stem)) {
      w = stem;
      re2 = /(at|bl|iz)$/;
      re3 = new RegExp('([^aeiouylsz])\\1$');
      re4 = new RegExp('^' + C + v + '[^aeiouwxy]$');
      if (re2.test(w)) {
        w = w + 'e';
      } else if (re3.test(w)) {
        re = /.$/;
        w = w.replace(re, '');
      } else if (re4.test(w)) {
        w = w + 'e';
      }
    }
  }
  re = /^(.+?)y$/;
  if (re.test(w)) {
    const fp = re.exec(w);
    stem = fp?.[1];
    re = new RegExp(s_v);
    if (stem && re.test(stem)) {
      w = stem + 'i';
    }
  }
  re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
  if (re.test(w)) {
    const fp = re.exec(w);
    stem = fp?.[1];
    suffix = fp?.[2];
    re = new RegExp(mgr0);
    if (stem && re.test(stem)) {
      // eslint-disable-next-line @typescript-eslint/ban-ts-comment
      // @ts-ignore
      w = stem + step2List[suffix];
    }
  }
  re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
  if (re.test(w)) {
    const fp = re.exec(w);
    stem = fp?.[1];
    suffix = fp?.[2];
    re = new RegExp(mgr0);
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    // @ts-ignore
    if (stem && re.test(stem)) {
      // eslint-disable-next-line @typescript-eslint/ban-ts-comment
      // @ts-ignore
      w = stem + step3List[suffix];
    }
  }
  re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
  re2 = /^(.+?)(s|t)(ion)$/;
  if (re.test(w)) {
    const fp = re.exec(w);
    stem = fp?.[1];
    re = new RegExp(mgr1);
    if (stem && re.test(stem)) {
      w = stem;
    }
  } else if (re2.test(w)) {
    const fp = re2.exec(w);
    stem = fp?.[1] ?? '' + fp?.[2] ?? '';
    re2 = new RegExp(mgr1);
    if (re2.test(stem)) {
      w = stem;
    }
  }
  re = /^(.+?)e$/;
  if (re.test(w)) {
    const fp = re.exec(w);
    stem = fp?.[1];
    re = new RegExp(mgr1);
    re2 = new RegExp(meq1);
    re3 = new RegExp('^' + C + v + '[^aeiouwxy]$');
    if (stem && (re.test(stem) || re2.test(stem) && !re3.test(stem))) {
      w = stem;
    }
  }
  re = /ll$/;
  re2 = new RegExp(mgr1);
  if (re.test(w) && re2.test(w)) {
    re = /.$/;
    w = w.replace(re, '');
  }
  if (firstch == 'y') {
    w = firstch.toLowerCase() + w.substring(1);
  }
  return w;
}

function normalizeToken(prop, token, withCache = true) {
  const key = `${this.language}:${prop}:${token}`;
  if (withCache && this.normalizationCache.has(key)) {
    return this.normalizationCache.get(key);
  }
  // Remove stopwords if enabled
  if (this.stopWords?.includes(token)) {
    if (withCache) {
      this.normalizationCache.set(key, '');
    }
    return '';
  }
  // Apply stemming if enabled
  if (this.stemmer && !this.stemmerSkipProperties.has(prop)) {
    token = this.stemmer(token);
  }
  token = replaceDiacritics(token);
  if (withCache) {
    this.normalizationCache.set(key, token);
  }
  return token;
}
/* c8 ignore next 10 */
function trim(text) {
  while (text[text.length - 1] === '') {
    text.pop();
  }
  while (text[0] === '') {
    text.shift();
  }
  return text;
}
function tokenize(input, language, prop, withCache = true) {
  if (language && language !== this.language) {
    throw createError('LANGUAGE_NOT_SUPPORTED', language);
  }
  /* c8 ignore next 3 */
  if (typeof input !== 'string') {
    return [input];
  }
  const normalizeToken = this.normalizeToken.bind(this, prop ?? '');
  let tokens;
  if (prop && this.tokenizeSkipProperties.has(prop)) {
    tokens = [normalizeToken(input, withCache)];
  } else {
    const splitRule = SPLITTERS[this.language];
    tokens = input.toLowerCase().split(splitRule).map(t => normalizeToken(t, withCache)).filter(Boolean);
  }
  const trimTokens = trim(tokens);
  if (!this.allowDuplicates) {
    return Array.from(new Set(trimTokens));
  }
  return trimTokens;
}
function createTokenizer(config = {}) {
  if (!config.language) {
    config.language = 'english';
  } else if (!SUPPORTED_LANGUAGES.includes(config.language)) {
    throw createError('LANGUAGE_NOT_SUPPORTED', config.language);
  }
  // Handle stemming - It is disabled by default
  let stemmer$1;
  if (config.stemming || config.stemmer && !('stemming' in config)) {
    if (config.stemmer) {
      if (typeof config.stemmer !== 'function') {
        throw createError('INVALID_STEMMER_FUNCTION_TYPE');
      }
      stemmer$1 = config.stemmer;
    } else {
      if (config.language === 'english') {
        stemmer$1 = stemmer;
      } else {
        throw createError('MISSING_STEMMER', config.language);
      }
    }
  }
  // Handle stopwords
  let stopWords;
  if (config.stopWords !== false) {
    stopWords = [];
    if (Array.isArray(config.stopWords)) {
      stopWords = config.stopWords;
    } else if (typeof config.stopWords === 'function') {
      stopWords = config.stopWords(stopWords);
    } else if (config.stopWords) {
      throw createError('CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY');
    }
    // Make sure stopWords is just an array of strings
    if (!Array.isArray(stopWords)) {
      throw createError('CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY');
    }
    for (const s of stopWords) {
      if (typeof s !== 'string') {
        throw createError('CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY');
      }
    }
  }
  // Create the tokenizer
  const tokenizer = {
    tokenize,
    language: config.language,
    stemmer: stemmer$1,
    stemmerSkipProperties: new Set(config.stemmerSkipProperties ? [config.stemmerSkipProperties].flat() : []),
    tokenizeSkipProperties: new Set(config.tokenizeSkipProperties ? [config.tokenizeSkipProperties].flat() : []),
    stopWords,
    allowDuplicates: Boolean(config.allowDuplicates),
    normalizeToken,
    normalizationCache: new Map()
  };
  tokenizer.tokenize = tokenize.bind(tokenizer);
  tokenizer.normalizeToken = normalizeToken;
  return tokenizer;
}

var index$4 = /*#__PURE__*/Object.freeze({
	__proto__: null,
	createTokenizer: createTokenizer,
	normalizeToken: normalizeToken
});

function create$2(sharedInternalDocumentStore) {
  return {
    sharedInternalDocumentStore,
    rules: new Map()
  };
}
function addRule(store, rule) {
  if (store.rules.has(rule.id)) {
    throw new Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${rule.id}" already exists. Use updateRule to modify it.`);
  }
  store.rules.set(rule.id, rule);
}
function updateRule(store, rule) {
  if (!store.rules.has(rule.id)) {
    throw new Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${rule.id}" because it does not exist. Use addRule to create it.`);
  }
  store.rules.set(rule.id, rule);
}
function removeRule(store, ruleId) {
  return store.rules.delete(ruleId);
}
function getRule(store, ruleId) {
  return store.rules.get(ruleId);
}
function getAllRules(store) {
  return Array.from(store.rules.values());
}
function matchesCondition(term, condition) {
  const normalizedTerm = term.toLowerCase().trim();
  const normalizedPattern = condition.pattern.toLowerCase().trim();
  switch (condition.anchoring) {
    case 'is':
      return normalizedTerm === normalizedPattern;
    case 'starts_with':
      return normalizedTerm.startsWith(normalizedPattern);
    case 'contains':
      return normalizedTerm.includes(normalizedPattern);
    default:
      return false;
  }
}
function matchesRule(term, rule) {
  if (!term) {
    return false;
  }
  // All conditions must match (AND logic)
  return rule.conditions.every(condition => matchesCondition(term, condition));
}
function getMatchingRules(store, term) {
  if (!term) {
    return [];
  }
  const matchingRules = [];
  for (const rule of store.rules.values()) {
    if (matchesRule(term, rule)) {
      matchingRules.push(rule);
    }
  }
  return matchingRules;
}
function load$1(sharedInternalDocumentStore, raw) {
  const rawStore = raw;
  return {
    sharedInternalDocumentStore,
    rules: new Map(rawStore?.rules ?? [])
  };
}
function save$1(store) {
  return {
    rules: Array.from(store.rules.entries())
  };
}
function createPinning() {
  return {
    create: create$2,
    addRule,
    updateRule,
    removeRule,
    getRule,
    getAllRules,
    getMatchingRules,
    load: load$1,
    save: save$1
  };
}

function validateComponents(components) {
  const defaultComponents = {
    formatElapsedTime,
    getDocumentIndexId,
    getDocumentProperties,
    validateSchema
  };
  for (const rawKey of FUNCTION_COMPONENTS) {
    const key = rawKey;
    if (components[key]) {
      if (typeof components[key] !== 'function') {
        throw createError('COMPONENT_MUST_BE_FUNCTION', key);
      }
    } else {
      components[key] = defaultComponents[key];
    }
  }
  for (const rawKey of Object.keys(components)) {
    if (!OBJECT_COMPONENTS.includes(rawKey) && !FUNCTION_COMPONENTS.includes(rawKey)) {
      throw createError('UNSUPPORTED_COMPONENT', rawKey);
    }
  }
}
function create$1({
  schema,
  sort,
  language,
  components,
  id,
  plugins
}) {
  if (!components) {
    components = {};
  }
  for (const plugin of plugins ?? []) {
    if (!('getComponents' in plugin)) {
      continue;
    }
    if (typeof plugin.getComponents !== 'function') {
      continue;
    }
    const pluginComponents = plugin.getComponents(schema);
    const keys = Object.keys(pluginComponents);
    for (const key of keys) {
      if (components[key]) {
        throw createError('PLUGIN_COMPONENT_CONFLICT', key, plugin.name);
      }
    }
    components = {
      ...components,
      ...pluginComponents
    };
  }
  if (!id) {
    id = uniqueId();
  }
  let tokenizer = components.tokenizer;
  let index = components.index;
  let documentsStore = components.documentsStore;
  let sorter = components.sorter;
  let pinning = components.pinning;
  if (!tokenizer) {
    // Use the default tokenizer
    tokenizer = createTokenizer({
      language: language ?? 'english'
    });
  } else if (!tokenizer.tokenize) {
    // If there is no tokenizer function, we assume this is a TokenizerConfig
    tokenizer = createTokenizer(tokenizer);
  } else {
    const customTokenizer = tokenizer;
    tokenizer = customTokenizer;
  }
  if (components.tokenizer && language) {
    // Accept language only if a tokenizer is not provided
    throw createError('NO_LANGUAGE_WITH_CUSTOM_TOKENIZER');
  }
  const internalDocumentStore = createInternalDocumentIDStore();
  index ||= createIndex();
  sorter ||= createSorter();
  documentsStore ||= createDocumentsStore();
  pinning ||= createPinning();
  // Validate all other components
  validateComponents(components);
  // Assign only recognized components and hooks
  const {
    getDocumentProperties,
    getDocumentIndexId,
    validateSchema,
    formatElapsedTime
  } = components;
  const orama = {
    data: {},
    caches: {},
    schema,
    tokenizer,
    index,
    sorter,
    documentsStore,
    pinning,
    internalDocumentIDStore: internalDocumentStore,
    getDocumentProperties,
    getDocumentIndexId,
    validateSchema,
    beforeInsert: [],
    afterInsert: [],
    beforeRemove: [],
    afterRemove: [],
    beforeUpdate: [],
    afterUpdate: [],
    beforeUpsert: [],
    afterUpsert: [],
    beforeSearch: [],
    afterSearch: [],
    beforeInsertMultiple: [],
    afterInsertMultiple: [],
    beforeRemoveMultiple: [],
    afterRemoveMultiple: [],
    beforeUpdateMultiple: [],
    afterUpdateMultiple: [],
    beforeUpsertMultiple: [],
    afterUpsertMultiple: [],
    afterCreate: [],
    formatElapsedTime,
    id,
    plugins,
    version: getVersion()
  };
  orama.data = {
    index: orama.index.create(orama, internalDocumentStore, schema),
    docs: orama.documentsStore.create(orama, internalDocumentStore),
    sorting: orama.sorter.create(orama, internalDocumentStore, schema, sort),
    pinning: orama.pinning.create(internalDocumentStore)
  };
  for (const hook of AVAILABLE_PLUGIN_HOOKS) {
    orama[hook] = (orama[hook] ?? []).concat(getAllPluginsByHook(orama, hook));
  }
  const afterCreate = orama['afterCreate'];
  if (afterCreate) {
    runAfterCreate(afterCreate, orama);
  }
  return orama;
}
function getVersion() {
  return '{{VERSION}}';
}

function getByID(db, id) {
  return db.documentsStore.get(db.data.docs, id);
}
function count(db) {
  return db.documentsStore.count(db.data.docs);
}

var components = /*#__PURE__*/Object.freeze({
	__proto__: null,
	documentsStore: documentsStore,
	formatElapsedTime: formatElapsedTime,
	getDocumentIndexId: getDocumentIndexId,
	getDocumentProperties: getDocumentProperties,
	getInnerType: getInnerType,
	getVectorSize: getVectorSize,
	index: index$5,
	internalDocumentIDStore: internalDocumentIdStore,
	isArrayType: isArrayType,
	isGeoPointType: isGeoPointType,
	isVectorType: isVectorType,
	sorter: sorter,
	tokenizer: index$4,
	validateSchema: validateSchema
});

function insert(orama, doc, language, skipHooks, options) {
  const errorProperty = orama.validateSchema(doc, orama.schema);
  if (errorProperty) {
    throw createError('SCHEMA_VALIDATION_FAILURE', errorProperty);
  }
  const asyncNeeded = isAsyncFunction(orama.beforeInsert) || isAsyncFunction(orama.afterInsert) || isAsyncFunction(orama.index.beforeInsert) || isAsyncFunction(orama.index.insert) || isAsyncFunction(orama.index.afterInsert);
  if (asyncNeeded) {
    return innerInsertAsync(orama, doc, language, skipHooks, options);
  }
  return innerInsertSync(orama, doc, language, skipHooks, options);
}
const ENUM_TYPE = new Set(['enum', 'enum[]']);
const STRING_NUMBER_TYPE = new Set(['string', 'number']);
async function innerInsertAsync(orama, doc, language, skipHooks, options) {
  const {
    index,
    docs
  } = orama.data;
  const id = orama.getDocumentIndexId(doc);
  if (typeof id !== 'string') {
    throw createError('DOCUMENT_ID_MUST_BE_STRING', typeof id);
  }
  const internalId = getInternalDocumentId(orama.internalDocumentIDStore, id);
  if (!skipHooks) {
    await runSingleHook(orama.beforeInsert, orama, id, doc);
  }
  if (!orama.documentsStore.store(docs, id, internalId, doc)) {
    throw createError('DOCUMENT_ALREADY_EXISTS', id);
  }
  const docsCount = orama.documentsStore.count(docs);
  const indexableProperties = orama.index.getSearchableProperties(index);
  const indexablePropertiesWithTypes = orama.index.getSearchablePropertiesWithTypes(index);
  const indexableValues = orama.getDocumentProperties(doc, indexableProperties);
  for (const [key, value] of Object.entries(indexableValues)) {
    if (typeof value === 'undefined') continue;
    const actualType = typeof value;
    const expectedType = indexablePropertiesWithTypes[key];
    validateDocumentProperty(actualType, expectedType, key, value);
  }
  await indexAndSortDocument(orama, id, indexableProperties, indexableValues, docsCount, language, doc, options);
  if (!skipHooks) {
    await runSingleHook(orama.afterInsert, orama, id, doc);
  }
  return id;
}
function innerInsertSync(orama, doc, language, skipHooks, options) {
  const {
    index,
    docs
  } = orama.data;
  const id = orama.getDocumentIndexId(doc);
  if (typeof id !== 'string') {
    throw createError('DOCUMENT_ID_MUST_BE_STRING', typeof id);
  }
  const internalId = getInternalDocumentId(orama.internalDocumentIDStore, id);
  if (!skipHooks) {
    runSingleHook(orama.beforeInsert, orama, id, doc);
  }
  if (!orama.documentsStore.store(docs, id, internalId, doc)) {
    throw createError('DOCUMENT_ALREADY_EXISTS', id);
  }
  const docsCount = orama.documentsStore.count(docs);
  const indexableProperties = orama.index.getSearchableProperties(index);
  const indexablePropertiesWithTypes = orama.index.getSearchablePropertiesWithTypes(index);
  const indexableValues = orama.getDocumentProperties(doc, indexableProperties);
  for (const [key, value] of Object.entries(indexableValues)) {
    if (typeof value === 'undefined') continue;
    const actualType = typeof value;
    const expectedType = indexablePropertiesWithTypes[key];
    validateDocumentProperty(actualType, expectedType, key, value);
  }
  indexAndSortDocumentSync(orama, id, indexableProperties, indexableValues, docsCount, language, doc, options);
  if (!skipHooks) {
    runSingleHook(orama.afterInsert, orama, id, doc);
  }
  return id;
}
function validateDocumentProperty(actualType, expectedType, key, value) {
  if (isGeoPointType(expectedType) && typeof value === 'object' && typeof value.lon === 'number' && typeof value.lat === 'number') {
    return;
  }
  if (isVectorType(expectedType) && Array.isArray(value)) return;
  if (isArrayType(expectedType) && Array.isArray(value)) return;
  if (ENUM_TYPE.has(expectedType) && STRING_NUMBER_TYPE.has(actualType)) return;
  if (actualType !== expectedType) {
    throw createError('INVALID_DOCUMENT_PROPERTY', key, expectedType, actualType);
  }
}
async function indexAndSortDocument(orama, id, indexableProperties, indexableValues, docsCount, language, doc, options) {
  for (const prop of indexableProperties) {
    const value = indexableValues[prop];
    if (typeof value === 'undefined') continue;
    const expectedType = orama.index.getSearchablePropertiesWithTypes(orama.data.index)[prop];
    await orama.index.beforeInsert?.(orama.data.index, prop, id, value, expectedType, language, orama.tokenizer, docsCount);
    const internalId = orama.internalDocumentIDStore.idToInternalId.get(id);
    await orama.index.insert(orama.index, orama.data.index, prop, id, internalId, value, expectedType, language, orama.tokenizer, docsCount, options);
    await orama.index.afterInsert?.(orama.data.index, prop, id, value, expectedType, language, orama.tokenizer, docsCount);
  }
  const sortableProperties = orama.sorter.getSortableProperties(orama.data.sorting);
  const sortableValues = orama.getDocumentProperties(doc, sortableProperties);
  for (const prop of sortableProperties) {
    const value = sortableValues[prop];
    if (typeof value === 'undefined') continue;
    const expectedType = orama.sorter.getSortablePropertiesWithTypes(orama.data.sorting)[prop];
    orama.sorter.insert(orama.data.sorting, prop, id, value, expectedType, language);
  }
}
function indexAndSortDocumentSync(orama, id, indexableProperties, indexableValues, docsCount, language, doc, options) {
  for (const prop of indexableProperties) {
    const value = indexableValues[prop];
    if (typeof value === 'undefined') continue;
    const expectedType = orama.index.getSearchablePropertiesWithTypes(orama.data.index)[prop];
    const internalDocumentId = getInternalDocumentId(orama.internalDocumentIDStore, id);
    orama.index.beforeInsert?.(orama.data.index, prop, id, value, expectedType, language, orama.tokenizer, docsCount);
    orama.index.insert(orama.index, orama.data.index, prop, id, internalDocumentId, value, expectedType, language, orama.tokenizer, docsCount, options);
    orama.index.afterInsert?.(orama.data.index, prop, id, value, expectedType, language, orama.tokenizer, docsCount);
  }
  const sortableProperties = orama.sorter.getSortableProperties(orama.data.sorting);
  const sortableValues = orama.getDocumentProperties(doc, sortableProperties);
  for (const prop of sortableProperties) {
    const value = sortableValues[prop];
    if (typeof value === 'undefined') continue;
    const expectedType = orama.sorter.getSortablePropertiesWithTypes(orama.data.sorting)[prop];
    orama.sorter.insert(orama.data.sorting, prop, id, value, expectedType, language);
  }
}
function insertMultiple(orama, docs, batchSize, language, skipHooks, timeout) {
  const asyncNeeded = isAsyncFunction(orama.afterInsertMultiple) || isAsyncFunction(orama.beforeInsertMultiple) || isAsyncFunction(orama.index.beforeInsert) || isAsyncFunction(orama.index.insert) || isAsyncFunction(orama.index.afterInsert);
  if (asyncNeeded) {
    return innerInsertMultipleAsync(orama, docs, batchSize, language, skipHooks, timeout);
  }
  return innerInsertMultipleSync(orama, docs, batchSize, language, skipHooks, timeout);
}
async function innerInsertMultipleAsync(orama, docs, batchSize = 1000, language, skipHooks, timeout = 0) {
  const ids = [];
  const processNextBatch = async startIndex => {
    const endIndex = Math.min(startIndex + batchSize, docs.length);
    const batch = docs.slice(startIndex, endIndex);
    for (const doc of batch) {
      const options = {
        avlRebalanceThreshold: batch.length
      };
      const id = await insert(orama, doc, language, skipHooks, options);
      ids.push(id);
    }
    return endIndex;
  };
  const processAllBatches = async () => {
    let currentIndex = 0;
    while (currentIndex < docs.length) {
      const startTime = Date.now();
      currentIndex = await processNextBatch(currentIndex);
      if (timeout > 0) {
        const elapsedTime = Date.now() - startTime;
        const waitTime = timeout - elapsedTime;
        if (waitTime > 0) {
          sleep(waitTime);
        }
      }
    }
  };
  await processAllBatches();
  if (!skipHooks) {
    await runMultipleHook(orama.afterInsertMultiple, orama, docs);
  }
  return ids;
}
function innerInsertMultipleSync(orama, docs, batchSize = 1000, language, skipHooks, timeout = 0) {
  const ids = [];
  let i = 0;
  function processNextBatch() {
    const batch = docs.slice(i * batchSize, (i + 1) * batchSize);
    if (batch.length === 0) return false;
    for (const doc of batch) {
      const options = {
        avlRebalanceThreshold: batch.length
      };
      const id = insert(orama, doc, language, skipHooks, options);
      ids.push(id);
    }
    i++;
    return true;
  }
  function processAllBatches() {
    const startTime = Date.now();
    // eslint-disable-next-line no-constant-condition
    while (true) {
      const hasMoreBatches = processNextBatch();
      if (!hasMoreBatches) break;
      if (timeout > 0) {
        const elapsedTime = Date.now() - startTime;
        if (elapsedTime >= timeout) {
          const remainingTime = timeout - elapsedTime % timeout;
          if (remainingTime > 0) {
            sleep(remainingTime);
          }
        }
      }
    }
  }
  processAllBatches();
  if (!skipHooks) {
    runMultipleHook(orama.afterInsertMultiple, orama, docs);
  }
  return ids;
}
function innerInsertMultiple(orama, docs, batchSize, language, skipHooks, timeout) {
  const asyncNeeded = isAsyncFunction(orama.beforeInsert) || isAsyncFunction(orama.afterInsert) || isAsyncFunction(orama.index.beforeInsert) || isAsyncFunction(orama.index.insert) || isAsyncFunction(orama.index.afterInsert);
  if (asyncNeeded) {
    return innerInsertMultipleAsync(orama, docs, batchSize, language, skipHooks, timeout);
  }
  return innerInsertMultipleSync(orama, docs, batchSize, language, skipHooks, timeout);
}

/**
 * Insert a new pinning rule into the database.
 * Pinning rules allow you to promote specific documents to specific positions in search results
 * based on conditional matching of the search term.
 *
 * @example
 * ```typescript
 * import { create, insert, insertPin } from '@orama/orama'
 *
 * const db = await create({
 *   schema: {
 *     title: 'string',
 *     description: 'string'
 *   }
 * })
 *
 * await insert(db, { id: '1', title: 'Product A' })
 * await insert(db, { id: '2', title: 'Product B' })
 *
 * // When searching for "featured", pin Product B to position 0
 * insertPin(db, {
 *   id: 'featured-products',
 *   conditions: [
 *     { anchoring: 'contains', pattern: 'featured' }
 *   ],
 *   consequence: {
 *     promote: [
 *       { doc_id: '2', position: 0 }
 *     ]
 *   }
 * })
 * ```
 */
function insertPin(orama, rule) {
  orama.pinning.addRule(orama.data.pinning, rule);
}
/**
 * Update an existing pinning rule in the database.
 * If the rule does not exist, an error will be thrown.
 *
 * @example
 * ```typescript
 * import { updatePin } from '@orama/orama'
 *
 * // Update the rule to pin to a different position
 * updatePin(db, {
 *   id: 'featured-products',
 *   conditions: [
 *     { anchoring: 'contains', pattern: 'featured' }
 *   ],
 *   consequence: {
 *     promote: [
 *       { doc_id: '3', position: 0 }  // Changed doc_id
 *     ]
 *   }
 * })
 * ```
 */
function updatePin(orama, rule) {
  orama.pinning.updateRule(orama.data.pinning, rule);
}
/**
 * Remove a pinning rule from the database by its ID.
 *
 * @example
 * ```typescript
 * deletePin(db, 'featured-products')
 * ```
 */
function deletePin(orama, ruleId) {
  return orama.pinning.removeRule(orama.data.pinning, ruleId);
}
/**
 * Get a specific pinning rule by its ID.
 *
 * @example
 * ```typescript
 * const rule = getPin(db, 'featured-products')
 * console.log(rule)
 * ```
 */
function getPin(orama, ruleId) {
  return orama.pinning.getRule(orama.data.pinning, ruleId);
}
/**
 * Get all pinning rules in the database.
 *
 * @example
 * ```typescript
 * const allRules = getAllPins(db)
 * console.log(`Total rules: ${allRules.length}`)
 * ```
 */
function getAllPins(orama) {
  return orama.pinning.getAllRules(orama.data.pinning);
}

function remove(orama, id, language, skipHooks) {
  const asyncNeeded = isAsyncFunction(orama.index.beforeRemove) || isAsyncFunction(orama.index.remove) || isAsyncFunction(orama.index.afterRemove);
  if (asyncNeeded) {
    return removeAsync(orama, id, language, skipHooks);
  }
  return removeSync(orama, id, language, skipHooks);
}
async function removeAsync(orama, id, language, skipHooks) {
  let result = true;
  const {
    index,
    docs
  } = orama.data;
  const doc = orama.documentsStore.get(docs, id);
  if (!doc) {
    return false;
  }
  const internalId = getInternalDocumentId(orama.internalDocumentIDStore, id);
  const docId = getDocumentIdFromInternalId(orama.internalDocumentIDStore, internalId);
  const docsCount = orama.documentsStore.count(docs);
  if (!skipHooks) {
    await runSingleHook(orama.beforeRemove, orama, docId);
  }
  const indexableProperties = orama.index.getSearchableProperties(index);
  const indexablePropertiesWithTypes = orama.index.getSearchablePropertiesWithTypes(index);
  const values = orama.getDocumentProperties(doc, indexableProperties);
  for (const prop of indexableProperties) {
    const value = values[prop];
    if (typeof value === 'undefined') {
      continue;
    }
    const schemaType = indexablePropertiesWithTypes[prop];
    await orama.index.beforeRemove?.(orama.data.index, prop, docId, value, schemaType, language, orama.tokenizer, docsCount);
    if (!(await orama.index.remove(orama.index, orama.data.index, prop, id, internalId, value, schemaType, language, orama.tokenizer, docsCount))) {
      result = false;
    }
    await orama.index.afterRemove?.(orama.data.index, prop, docId, value, schemaType, language, orama.tokenizer, docsCount);
  }
  const sortableProperties = await orama.sorter.getSortableProperties(orama.data.sorting);
  const sortableValues = await orama.getDocumentProperties(doc, sortableProperties);
  for (const prop of sortableProperties) {
    if (typeof sortableValues[prop] === 'undefined') {
      continue;
    }
    orama.sorter.remove(orama.data.sorting, prop, id);
  }
  if (!skipHooks) {
    await runSingleHook(orama.afterRemove, orama, docId);
  }
  orama.documentsStore.remove(orama.data.docs, id, internalId);
  return result;
}
function removeSync(orama, id, language, skipHooks) {
  let result = true;
  const {
    index,
    docs
  } = orama.data;
  const doc = orama.documentsStore.get(docs, id);
  if (!doc) {
    return false;
  }
  const internalId = getInternalDocumentId(orama.internalDocumentIDStore, id);
  const docId = getDocumentIdFromInternalId(orama.internalDocumentIDStore, internalId);
  const docsCount = orama.documentsStore.count(docs);
  if (!skipHooks) {
    runSingleHook(orama.beforeRemove, orama, docId);
  }
  const indexableProperties = orama.index.getSearchableProperties(index);
  const indexablePropertiesWithTypes = orama.index.getSearchablePropertiesWithTypes(index);
  const values = orama.getDocumentProperties(doc, indexableProperties);
  for (const prop of indexableProperties) {
    const value = values[prop];
    if (typeof value === 'undefined') {
      continue;
    }
    const schemaType = indexablePropertiesWithTypes[prop];
    orama.index.beforeRemove?.(orama.data.index, prop, docId, value, schemaType, language, orama.tokenizer, docsCount);
    if (!orama.index.remove(orama.index, orama.data.index, prop, id, internalId, value, schemaType, language, orama.tokenizer, docsCount)) {
      result = false;
    }
    orama.index.afterRemove?.(orama.data.index, prop, docId, value, schemaType, language, orama.tokenizer, docsCount);
  }
  const sortableProperties = orama.sorter.getSortableProperties(orama.data.sorting);
  const sortableValues = orama.getDocumentProperties(doc, sortableProperties);
  for (const prop of sortableProperties) {
    if (typeof sortableValues[prop] === 'undefined') {
      continue;
    }
    orama.sorter.remove(orama.data.sorting, prop, id);
  }
  if (!skipHooks) {
    runSingleHook(orama.afterRemove, orama, docId);
  }
  orama.documentsStore.remove(orama.data.docs, id, internalId);
  return result;
}
function removeMultiple(orama, ids, batchSize, language, skipHooks) {
  const asyncNeeded = isAsyncFunction(orama.index.beforeRemove) || isAsyncFunction(orama.index.remove) || isAsyncFunction(orama.index.afterRemove) || isAsyncFunction(orama.beforeRemoveMultiple) || isAsyncFunction(orama.afterRemoveMultiple);
  if (asyncNeeded) {
    return removeMultipleAsync(orama, ids, batchSize, language, skipHooks);
  }
  return removeMultipleSync(orama, ids, batchSize, language, skipHooks);
}
async function removeMultipleAsync(orama, ids, batchSize, language, skipHooks) {
  let result = 0;
  if (!batchSize) {
    batchSize = 1000;
  }
  const docIdsForHooks = skipHooks ? [] : ids.map(id => getDocumentIdFromInternalId(orama.internalDocumentIDStore, getInternalDocumentId(orama.internalDocumentIDStore, id)));
  if (!skipHooks) {
    await runMultipleHook(orama.beforeRemoveMultiple, orama, docIdsForHooks);
  }
  await new Promise((resolve, reject) => {
    let i = 0;
    async function _removeMultiple() {
      const batch = ids.slice(i * batchSize, ++i * batchSize);
      if (!batch.length) {
        return resolve();
      }
      for (const doc of batch) {
        try {
          if (await remove(orama, doc, language, skipHooks)) {
            result++;
          }
        } catch (err) {
          reject(err);
        }
      }
      setTimeout(_removeMultiple, 0);
    }
    setTimeout(_removeMultiple, 0);
  });
  if (!skipHooks) {
    await runMultipleHook(orama.afterRemoveMultiple, orama, docIdsForHooks);
  }
  return result;
}
function removeMultipleSync(orama, ids, batchSize, language, skipHooks) {
  let result = 0;
  if (!batchSize) {
    batchSize = 1000;
  }
  const docIdsForHooks = skipHooks ? [] : ids.map(id => getDocumentIdFromInternalId(orama.internalDocumentIDStore, getInternalDocumentId(orama.internalDocumentIDStore, id)));
  if (!skipHooks) {
    runMultipleHook(orama.beforeRemoveMultiple, orama, docIdsForHooks);
  }
  let i = 0;
  function _removeMultipleSync() {
    const batch = ids.slice(i * batchSize, ++i * batchSize);
    if (!batch.length) return;
    for (const doc of batch) {
      if (remove(orama, doc, language, skipHooks)) {
        result++;
      }
    }
    setTimeout(_removeMultipleSync, 0);
  }
  _removeMultipleSync();
  if (!skipHooks) {
    runMultipleHook(orama.afterRemoveMultiple, orama, docIdsForHooks);
  }
  return result;
}

const MODE_FULLTEXT_SEARCH = 'fulltext';
const MODE_HYBRID_SEARCH = 'hybrid';
const MODE_VECTOR_SEARCH = 'vector';

function sortAsc(a, b) {
  return a[1] - b[1];
}
function sortDesc(a, b) {
  return b[1] - a[1];
}
function sortingPredicateBuilder(order = 'desc') {
  return order.toLowerCase() === 'asc' ? sortAsc : sortDesc;
}
function getFacets(orama, results, facetsConfig) {
  const facets = {};
  const allIDs = results.map(([id]) => id);
  const allDocs = orama.documentsStore.getMultiple(orama.data.docs, allIDs);
  const facetKeys = Object.keys(facetsConfig);
  const properties = orama.index.getSearchablePropertiesWithTypes(orama.data.index);
  for (const facet of facetKeys) {
    let values;
    // Hack to guarantee the same order of ranges as specified by the user
    // TODO: Revisit this once components land
    if (properties[facet] === 'number') {
      const {
        ranges
      } = facetsConfig[facet];
      const rangesLength = ranges.length;
      const tmp = Array.from({
        length: rangesLength
      });
      for (let i = 0; i < rangesLength; i++) {
        const range = ranges[i];
        tmp[i] = [`${range.from}-${range.to}`, 0];
      }
      values = Object.fromEntries(tmp);
    }
    facets[facet] = {
      count: 0,
      values: values ?? {}
    };
  }
  const allDocsLength = allDocs.length;
  for (let i = 0; i < allDocsLength; i++) {
    const doc = allDocs[i];
    for (const facet of facetKeys) {
      const facetValue = facet.includes('.') ? getNested(doc, facet) : doc[facet];
      const propertyType = properties[facet];
      const facetValues = facets[facet].values;
      switch (propertyType) {
        case 'number':
          {
            const ranges = facetsConfig[facet].ranges;
            calculateNumberFacetBuilder(ranges, facetValues)(facetValue);
            break;
          }
        case 'number[]':
          {
            const alreadyInsertedValues = new Set();
            const ranges = facetsConfig[facet].ranges;
            const calculateNumberFacet = calculateNumberFacetBuilder(ranges, facetValues, alreadyInsertedValues);
            for (const v of facetValue) {
              calculateNumberFacet(v);
            }
            break;
          }
        case 'boolean':
        case 'enum':
        case 'string':
          {
            calculateBooleanStringOrEnumFacetBuilder(facetValues, propertyType)(facetValue);
            break;
          }
        case 'boolean[]':
        case 'enum[]':
        case 'string[]':
          {
            const alreadyInsertedValues = new Set();
            const innerType = propertyType === 'boolean[]' ? 'boolean' : 'string';
            const calculateBooleanStringOrEnumFacet = calculateBooleanStringOrEnumFacetBuilder(facetValues, innerType, alreadyInsertedValues);
            for (const v of facetValue) {
              calculateBooleanStringOrEnumFacet(v);
            }
            break;
          }
        default:
          throw createError('FACET_NOT_SUPPORTED', propertyType);
      }
    }
  }
  // TODO: We are looping again with the same previous keys, should we creat a single loop instead?
  for (const facet of facetKeys) {
    const currentFacet = facets[facet];
    // Count the number of values for each facet
    currentFacet.count = Object.keys(currentFacet.values).length;
    // Sort only string-based facets
    if (properties[facet] === 'string') {
      const stringFacetDefinition = facetsConfig[facet];
      const sortingPredicate = sortingPredicateBuilder(stringFacetDefinition.sort);
      currentFacet.values = Object.fromEntries(Object.entries(currentFacet.values).sort(sortingPredicate).slice(stringFacetDefinition.offset ?? 0, stringFacetDefinition.limit ?? 10));
    }
  }
  return facets;
}
function calculateNumberFacetBuilder(ranges, values, alreadyInsertedValues) {
  return facetValue => {
    for (const range of ranges) {
      const value = `${range.from}-${range.to}`;
      if (alreadyInsertedValues?.has(value)) {
        continue;
      }
      if (facetValue >= range.from && facetValue <= range.to) {
        if (values[value] === undefined) {
          values[value] = 1;
        } else {
          values[value]++;
          alreadyInsertedValues?.add(value);
        }
      }
    }
  };
}
function calculateBooleanStringOrEnumFacetBuilder(values, propertyType, alreadyInsertedValues) {
  const defaultValue = propertyType === 'boolean' ? 'false' : '';
  return facetValue => {
    // String or boolean based facets
    const value = facetValue?.toString() ?? defaultValue;
    if (alreadyInsertedValues?.has(value)) {
      return;
    }
    values[value] = (values[value] ?? 0) + 1;
    alreadyInsertedValues?.add(value);
  };
}

const DEFAULT_REDUCE = {
  reducer: (_, acc, res, index) => {
    acc[index] = res;
    return acc;
  },
  getInitialValue: length => Array.from({
    length
  })
};
const ALLOWED_TYPES = ['string', 'number', 'boolean'];
function getGroups(orama, results, groupBy) {
  const properties = groupBy.properties;
  const propertiesLength = properties.length;
  const schemaProperties = orama.index.getSearchablePropertiesWithTypes(orama.data.index);
  for (let i = 0; i < propertiesLength; i++) {
    const property = properties[i];
    if (typeof schemaProperties[property] === 'undefined') {
      throw createError('UNKNOWN_GROUP_BY_PROPERTY', property);
    }
    if (!ALLOWED_TYPES.includes(schemaProperties[property])) {
      throw createError('INVALID_GROUP_BY_PROPERTY', property, ALLOWED_TYPES.join(', '), schemaProperties[property]);
    }
  }
  const allIDs = results.map(([id]) => getDocumentIdFromInternalId(orama.internalDocumentIDStore, id));
  // allDocs is already sorted by the sortBy algorithm
  // We leverage on that to limit the number of documents returned
  const allDocs = orama.documentsStore.getMultiple(orama.data.docs, allIDs);
  const allDocsLength = allDocs.length;
  const returnedCount = groupBy.maxResult || Number.MAX_SAFE_INTEGER;
  const listOfValues = [];
  // We want to understand which documents have which values
  // and group them by the property and values
  const g = {};
  for (let i = 0; i < propertiesLength; i++) {
    const groupByKey = properties[i];
    const group = {
      property: groupByKey,
      perValue: {}
    };
    const values = new Set();
    for (let j = 0; j < allDocsLength; j++) {
      const doc = allDocs[j];
      const value = getNested(doc, groupByKey);
      // we don't want to consider undefined values
      if (typeof value === 'undefined') {
        continue;
      }
      const keyValue = typeof value !== 'boolean' ? value : '' + value;
      const perValue = group.perValue[keyValue] ?? {
        indexes: [],
        count: 0
      };
      if (perValue.count >= returnedCount) {
        // We stop early because for this value we react the limit
        continue;
      }
      // We use the index to keep track of the original order
      perValue.indexes.push(j);
      perValue.count++;
      group.perValue[keyValue] = perValue;
      values.add(value);
    }
    listOfValues.push(Array.from(values));
    g[groupByKey] = group;
  }
  const combinations = calculateCombination(listOfValues);
  const combinationsLength = combinations.length;
  const groups = [];
  for (let i = 0; i < combinationsLength; i++) {
    const combination = combinations[i];
    const combinationLength = combination.length;
    const group = {
      values: [],
      indexes: []
    };
    const indexes = [];
    for (let j = 0; j < combinationLength; j++) {
      const value = combination[j];
      const property = properties[j];
      indexes.push(g[property].perValue[typeof value !== 'boolean' ? value : '' + value].indexes);
      group.values.push(value);
    }
    // We leverage on the index to sort the results by the original order
    group.indexes = intersect(indexes).sort((a, b) => a - b);
    // don't generate empty groups
    if (group.indexes.length === 0) {
      continue;
    }
    groups.push(group);
  }
  const groupsLength = groups.length;
  const res = Array.from({
    length: groupsLength
  });
  for (let i = 0; i < groupsLength; i++) {
    const group = groups[i];
    const reduce = groupBy.reduce || DEFAULT_REDUCE;
    const docs = group.indexes.map(index => {
      return {
        id: allIDs[index],
        score: results[index][1],
        document: allDocs[index]
      };
    });
    const func = reduce.reducer.bind(null, group.values);
    const initialValue = reduce.getInitialValue(group.indexes.length);
    const aggregationValue = docs.reduce(func, initialValue);
    res[i] = {
      values: group.values,
      result: aggregationValue
    };
  }
  return res;
}
function calculateCombination(arrs, index = 0) {
  if (index + 1 === arrs.length) return arrs[index].map(item => [item]);
  const head = arrs[index];
  const c = calculateCombination(arrs, index + 1);
  const combinations = [];
  for (const value of head) {
    for (const combination of c) {
      const result = [value];
      safeArrayPush(result, combination);
      combinations.push(result);
    }
  }
  return combinations;
}

/**
 * Apply pinning rules to search results.
 * This function modifies the uniqueDocsArray by:
 * 1. Finding matching pin rules based on the search term
 * 2. Inserting pinned documents at their specified positions
 * 3. Assigning high scores to pinned documents to maintain their positions
 */
function applyPinningRules(orama, pinningStore, uniqueDocsArray, searchTerm) {
  // Get all matching rules for the current search term
  const matchingRules = getMatchingRules(pinningStore, searchTerm);
  if (matchingRules.length === 0) {
    return uniqueDocsArray;
  }
  // Collect all promotions from matching rules
  const allPromotions = matchingRules.flatMap(rule => rule.consequence.promote);
  // Sort promotions by position (lower position = higher priority)
  allPromotions.sort((a, b) => a.position - b.position);
  // Create a Set of pinned internal document IDs for fast lookup
  const pinnedInternalIds = new Set();
  const promotionsMap = new Map(); // Map internal ID to desired position
  const positionsTaken = new Set(); // Track which positions are already claimed
  for (const promotion of allPromotions) {
    const internalId = getInternalDocumentId(orama.internalDocumentIDStore, promotion.doc_id);
    // Skip if document doesn't exist in the database or if this position is already taken
    if (internalId === undefined) {
      continue;
    }
    // If this document is already pinned to a different position, keep the first one (lower position)
    if (promotionsMap.has(internalId)) {
      const existingPosition = promotionsMap.get(internalId);
      if (promotion.position < existingPosition) {
        promotionsMap.set(internalId, promotion.position);
      }
      continue;
    }
    // If this position is already taken, skip this promotion (first wins)
    if (positionsTaken.has(promotion.position)) {
      continue;
    }
    pinnedInternalIds.add(internalId);
    promotionsMap.set(internalId, promotion.position);
    positionsTaken.add(promotion.position);
  }
  // If no valid promotions were found, return original results
  if (promotionsMap.size === 0) {
    return uniqueDocsArray;
  }
  // Remove pinned documents from the original results
  const unpinnedResults = uniqueDocsArray.filter(([id]) => !pinnedInternalIds.has(id));
  // Create pinned results with their scores
  // We assign a very high base score and subtract the position to maintain order
  const BASE_PIN_SCORE = 1000000;
  const pinnedResults = [];
  for (const [internalId, position] of promotionsMap.entries()) {
    // Check if the document exists in the original results
    const existingResult = uniqueDocsArray.find(([id]) => id === internalId);
    if (existingResult) {
      // Document was in original results, use its score but mark it as pinned
      pinnedResults.push([internalId, BASE_PIN_SCORE - position]);
    } else {
      // Document was NOT in original results (promoted from outside the result set)
      // Verify the document actually exists in the database before promoting it
      const doc = orama.documentsStore.get(orama.data.docs, internalId);
      if (doc) {
        // Assign a score of 0 (as per PR #251 behavior)
        pinnedResults.push([internalId, 0]);
      }
    }
  }
  // Sort pinned results by their assigned scores (which correspond to positions)
  pinnedResults.sort((a, b) => {
    const posA = promotionsMap.get(a[0]) ?? Infinity;
    const posB = promotionsMap.get(b[0]) ?? Infinity;
    return posA - posB;
  });
  // Insert pinned results at their specified positions
  const finalResults = [];
  const pinnedByPosition = new Map();
  for (const pinnedResult of pinnedResults) {
    const position = promotionsMap.get(pinnedResult[0]);
    pinnedByPosition.set(position, pinnedResult);
  }
  let unpinnedIndex = 0;
  let currentPosition = 0;
  // Build the final results array by interleaving pinned and unpinned results
  while (currentPosition < unpinnedResults.length + pinnedResults.length) {
    if (pinnedByPosition.has(currentPosition)) {
      // Insert pinned document at this position
      finalResults.push(pinnedByPosition.get(currentPosition));
      currentPosition++;
    } else if (unpinnedIndex < unpinnedResults.length) {
      // Insert next unpinned document
      finalResults.push(unpinnedResults[unpinnedIndex]);
      unpinnedIndex++;
      currentPosition++;
    } else {
      // No more unpinned results, add remaining pinned results
      break;
    }
  }
  // Add any remaining pinned results that have positions beyond the unpinned results length
  for (const [position, pinnedResult] of pinnedByPosition.entries()) {
    if (position >= finalResults.length) {
      finalResults.push(pinnedResult);
    }
  }
  return finalResults;
}

function innerFullTextSearch(orama, params, language) {
  const {
    term,
    properties
  } = params;
  const index = orama.data.index;
  // Get searchable string properties
  let propertiesToSearch = orama.caches['propertiesToSearch'];
  if (!propertiesToSearch) {
    const propertiesToSearchWithTypes = orama.index.getSearchablePropertiesWithTypes(index);
    propertiesToSearch = orama.index.getSearchableProperties(index);
    propertiesToSearch = propertiesToSearch.filter(prop => propertiesToSearchWithTypes[prop].startsWith('string'));
    orama.caches['propertiesToSearch'] = propertiesToSearch;
  }
  if (properties && properties !== '*') {
    for (const prop of properties) {
      if (!propertiesToSearch.includes(prop)) {
        throw createError('UNKNOWN_INDEX', prop, propertiesToSearch.join(', '));
      }
    }
    propertiesToSearch = propertiesToSearch.filter(prop => properties.includes(prop));
  }
  // If filters are enabled, we need to get the IDs of the documents that match the filters.
  const hasFilters = Object.keys(params.where ?? {}).length > 0;
  let whereFiltersIDs;
  if (hasFilters) {
    whereFiltersIDs = orama.index.searchByWhereClause(index, orama.tokenizer, params.where, language);
  }
  let uniqueDocsIDs;
  // We need to perform the search if:
  // - we have a search term
  // - or we have properties to search
  //   in this case, we need to return all the documents that contains at least one of the given properties
  const threshold = params.threshold !== undefined && params.threshold !== null ? params.threshold : 1;
  if (term || properties) {
    const docsCount = count(orama);
    uniqueDocsIDs = orama.index.search(index, term || '', orama.tokenizer, language, propertiesToSearch, params.exact || false, params.tolerance || 0, params.boost || {}, applyDefault(params.relevance), docsCount, whereFiltersIDs, threshold);
    // When exact is true and we have a term, filter results to only include documents
    // where the original text contains the exact search term (case-sensitive).
    // This is a highly requested feature and although Orama is not case-sensitive by design,
    // this is a reasonable compromise.
    if (params.exact && term) {
      const searchTerms = term.trim().split(/\s+/);
      uniqueDocsIDs = uniqueDocsIDs.filter(([docId]) => {
        const doc = orama.documentsStore.get(orama.data.docs, docId);
        if (!doc) return false;
        // Check if any of the specified properties contain the exact search term
        for (const prop of propertiesToSearch) {
          const propValue = getPropValue(doc, prop);
          if (typeof propValue === 'string') {
            // Check if all search terms appear as complete words in the property value
            const hasAllTerms = searchTerms.every(searchTerm => {
              // Create a regex that matches the term as a complete word (case-sensitive)
              const regex = new RegExp(`\\b${escapeRegex(searchTerm)}\\b`);
              return regex.test(propValue);
            });
            if (hasAllTerms) {
              return true;
            }
          }
        }
        return false;
      });
    }
  } else {
    // Check if this is a geosearch-only query first
    if (hasFilters) {
      const geoResults = searchByGeoWhereClause(index, params.where);
      if (geoResults) {
        // This is a geosearch-only query with distance scoring
        uniqueDocsIDs = geoResults;
      } else {
        // Regular filter query without search term
        const docIds = whereFiltersIDs ? Array.from(whereFiltersIDs) : [];
        uniqueDocsIDs = docIds.map(k => [+k, 0]);
      }
    } else {
      // No search term and no filters - return all documents
      const docIds = Object.keys(orama.documentsStore.getAll(orama.data.docs));
      uniqueDocsIDs = docIds.map(k => [+k, 0]);
    }
  }
  return uniqueDocsIDs;
}
// Helper function to escape regex special characters
function escapeRegex(str) {
  return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
// Helper function to get nested property value
function getPropValue(obj, path) {
  const keys = path.split('.');
  let value = obj;
  for (const key of keys) {
    if (value && typeof value === 'object' && key in value) {
      value = value[key];
    } else {
      return undefined;
    }
  }
  return value;
}
function fullTextSearch(orama, params, language) {
  const timeStart = getNanosecondsTime();
  function performSearchLogic() {
    const vectorProperties = Object.keys(orama.data.index.vectorIndexes);
    const shouldCalculateFacets = params.facets && Object.keys(params.facets).length > 0;
    const {
      limit = 10,
      offset = 0,
      distinctOn,
      includeVectors = false
    } = params;
    const isPreflight = params.preflight === true;
    let uniqueDocsArray = innerFullTextSearch(orama, params, language);
    if (params.sortBy) {
      if (typeof params.sortBy === 'function') {
        const ids = uniqueDocsArray.map(([id]) => id);
        const docs = orama.documentsStore.getMultiple(orama.data.docs, ids);
        const docsWithIdAndScore = docs.map((d, i) => [uniqueDocsArray[i][0], uniqueDocsArray[i][1], d]);
        docsWithIdAndScore.sort(params.sortBy);
        uniqueDocsArray = docsWithIdAndScore.map(([id, score]) => [id, score]);
      } else {
        uniqueDocsArray = orama.sorter.sortBy(orama.data.sorting, uniqueDocsArray, params.sortBy).map(([id, score]) => [getInternalDocumentId(orama.internalDocumentIDStore, id), score]);
      }
    } else {
      uniqueDocsArray = uniqueDocsArray.sort(sortTokenScorePredicate);
    }
    // Apply pinning rules after sorting but before pagination
    uniqueDocsArray = applyPinningRules(orama, orama.data.pinning, uniqueDocsArray, params.term);
    let results;
    if (!isPreflight) {
      results = distinctOn ? fetchDocumentsWithDistinct(orama, uniqueDocsArray, offset, limit, distinctOn) : fetchDocuments(orama, uniqueDocsArray, offset, limit);
    }
    const searchResult = {
      elapsed: {
        formatted: '',
        raw: 0
      },
      hits: [],
      count: uniqueDocsArray.length
    };
    if (typeof results !== 'undefined') {
      searchResult.hits = results.filter(Boolean);
      if (!includeVectors) {
        removeVectorsFromHits(searchResult, vectorProperties);
      }
    }
    if (shouldCalculateFacets) {
      const facets = getFacets(orama, uniqueDocsArray, params.facets);
      searchResult.facets = facets;
    }
    if (params.groupBy) {
      searchResult.groups = getGroups(orama, uniqueDocsArray, params.groupBy);
    }
    searchResult.elapsed = orama.formatElapsedTime(getNanosecondsTime() - timeStart);
    return searchResult;
  }
  async function executeSearchAsync() {
    if (orama.beforeSearch) {
      await runBeforeSearch(orama.beforeSearch, orama, params, language);
    }
    const searchResult = performSearchLogic();
    if (orama.afterSearch) {
      await runAfterSearch(orama.afterSearch, orama, params, language, searchResult);
    }
    return searchResult;
  }
  const asyncNeeded = orama.beforeSearch?.length || orama.afterSearch?.length;
  if (asyncNeeded) {
    return executeSearchAsync();
  }
  return performSearchLogic();
}
const defaultBM25Params = {
  k: 1.2,
  b: 0.75,
  d: 0.5
};
function applyDefault(bm25Relevance) {
  const r = bm25Relevance ?? {};
  r.k = r.k ?? defaultBM25Params.k;
  r.b = r.b ?? defaultBM25Params.b;
  r.d = r.d ?? defaultBM25Params.d;
  return r;
}

function innerVectorSearch(orama, params, language) {
  const vector = params.vector;
  if (vector && (!('value' in vector) || !('property' in vector))) {
    throw createError('INVALID_VECTOR_INPUT', Object.keys(vector).join(', '));
  }
  const vectorIndex = orama.data.index.vectorIndexes[vector.property];
  if (!vectorIndex) {
    throw createError('UNKNOWN_VECTOR_PROPERTY', vector.property);
  }
  const vectorSize = vectorIndex.node.size;
  if (vector?.value.length !== vectorSize) {
    if (vector?.property === undefined || vector?.value.length === undefined) {
      throw createError('INVALID_INPUT_VECTOR', 'undefined', vectorSize, 'undefined');
    }
    throw createError('INVALID_INPUT_VECTOR', vector.property, vectorSize, vector.value.length);
  }
  const index = orama.data.index;
  let whereFiltersIDs;
  const hasFilters = Object.keys(params.where ?? {}).length > 0;
  if (hasFilters) {
    whereFiltersIDs = orama.index.searchByWhereClause(index, orama.tokenizer, params.where, language);
  }
  return vectorIndex.node.find(vector.value, params.similarity ?? DEFAULT_SIMILARITY, whereFiltersIDs);
}
function searchVector(orama, params, language = 'english') {
  const timeStart = getNanosecondsTime();
  function performSearchLogic() {
    let results = innerVectorSearch(orama, params, language).sort(sortTokenScorePredicate);
    // Apply pinning rules after sorting but before pagination
    results = applyPinningRules(orama, orama.data.pinning, results, undefined);
    let facetsResults = [];
    const shouldCalculateFacets = params.facets && Object.keys(params.facets).length > 0;
    if (shouldCalculateFacets) {
      const facets = getFacets(orama, results, params.facets);
      facetsResults = facets;
    }
    const vectorProperty = params.vector.property;
    const includeVectors = params.includeVectors ?? false;
    const limit = params.limit ?? 10;
    const offset = params.offset ?? 0;
    const docs = Array.from({
      length: limit
    });
    for (let i = 0; i < limit; i++) {
      const result = results[i + offset];
      if (!result) {
        break;
      }
      const doc = orama.data.docs.docs[result[0]];
      if (doc) {
        if (!includeVectors) {
          doc[vectorProperty] = null;
        }
        const newDoc = {
          id: getDocumentIdFromInternalId(orama.internalDocumentIDStore, result[0]),
          score: result[1],
          document: doc
        };
        docs[i] = newDoc;
      }
    }
    let groups = [];
    if (params.groupBy) {
      groups = getGroups(orama, results, params.groupBy);
    }
    const timeEnd = getNanosecondsTime();
    const elapsedTime = timeEnd - timeStart;
    return {
      count: results.length,
      hits: docs.filter(Boolean),
      elapsed: {
        raw: Number(elapsedTime),
        formatted: formatNanoseconds(elapsedTime)
      },
      ...(facetsResults ? {
        facets: facetsResults
      } : {}),
      ...(groups ? {
        groups
      } : {})
    };
  }
  async function executeSearchAsync() {
    if (orama.beforeSearch) {
      await runBeforeSearch(orama.beforeSearch, orama, params, language);
    }
    const results = performSearchLogic();
    if (orama.afterSearch) {
      await runAfterSearch(orama.afterSearch, orama, params, language, results);
    }
    return results;
  }
  const asyncNeeded = orama.beforeSearch?.length || orama.afterSearch?.length;
  if (asyncNeeded) {
    return executeSearchAsync();
  }
  // Sync path
  return performSearchLogic();
}

function innerHybridSearch(orama, params, language) {
  const fullTextIDs = minMaxScoreNormalization(innerFullTextSearch(orama, params, language));
  const vectorIDs = innerVectorSearch(orama, params, language);
  const hybridWeights = params.hybridWeights;
  return mergeAndRankResults(fullTextIDs, vectorIDs, params.term ?? '', hybridWeights);
}
function hybridSearch(orama, params, language) {
  const timeStart = getNanosecondsTime();
  function performSearchLogic() {
    let uniqueTokenScores = innerHybridSearch(orama, params, language);
    // Apply pinning rules after merging results but before pagination
    uniqueTokenScores = applyPinningRules(orama, orama.data.pinning, uniqueTokenScores, params.term);
    let facetsResults;
    const shouldCalculateFacets = params.facets && Object.keys(params.facets).length > 0;
    if (shouldCalculateFacets) {
      facetsResults = getFacets(orama, uniqueTokenScores, params.facets);
    }
    let groups;
    if (params.groupBy) {
      groups = getGroups(orama, uniqueTokenScores, params.groupBy);
    }
    const offset = params.offset ?? 0;
    const limit = params.limit ?? 10;
    const results = fetchDocuments(orama, uniqueTokenScores, offset, limit).filter(Boolean);
    const timeEnd = getNanosecondsTime();
    const returningResults = {
      count: uniqueTokenScores.length,
      elapsed: {
        raw: Number(timeEnd - timeStart),
        formatted: formatNanoseconds(timeEnd - timeStart)
      },
      hits: results,
      ...(facetsResults ? {
        facets: facetsResults
      } : {}),
      ...(groups ? {
        groups
      } : {})
    };
    const includeVectors = params.includeVectors ?? false;
    if (!includeVectors) {
      const vectorProperties = Object.keys(orama.data.index.vectorIndexes);
      removeVectorsFromHits(returningResults, vectorProperties);
    }
    return returningResults;
  }
  async function executeSearchAsync() {
    if (orama.beforeSearch) {
      await runBeforeSearch(orama.beforeSearch, orama, params, language);
    }
    const results = performSearchLogic();
    if (orama.afterSearch) {
      await runAfterSearch(orama.afterSearch, orama, params, language, results);
    }
    return results;
  }
  const asyncNeeded = orama.beforeSearch?.length || orama.afterSearch?.length;
  if (asyncNeeded) {
    return executeSearchAsync();
  }
  return performSearchLogic();
}
function extractScore(token) {
  return token[1];
}
function minMaxScoreNormalization(results) {
  // In this case I disabled the `prefer-spread` rule because spread seems to be slower
  // eslint-disable-next-line prefer-spread
  const maxScore = Math.max.apply(Math, results.map(extractScore));
  return results.map(([id, score]) => [id, score / maxScore]);
}
function normalizeScore(score, maxScore) {
  return score / maxScore;
}
function hybridScoreBuilder(textWeight, vectorWeight) {
  return (textScore, vectorScore) => textScore * textWeight + vectorScore * vectorWeight;
}
function mergeAndRankResults(textResults, vectorResults, query, hybridWeights) {
  // eslint-disable-next-line prefer-spread
  const maxTextScore = Math.max.apply(Math, textResults.map(extractScore));
  // eslint-disable-next-line prefer-spread
  const maxVectorScore = Math.max.apply(Math, vectorResults.map(extractScore));
  const hasHybridWeights = hybridWeights && hybridWeights.text && hybridWeights.vector;
  const {
    text: textWeight,
    vector: vectorWeight
  } = hasHybridWeights ? hybridWeights : getQueryWeights();
  const mergedResults = new Map();
  const textResultsLength = textResults.length;
  const hybridScore = hybridScoreBuilder(textWeight, vectorWeight);
  for (let i = 0; i < textResultsLength; i++) {
    const [id, score] = textResults[i];
    const normalizedScore = normalizeScore(score, maxTextScore);
    const hybridScoreValue = hybridScore(normalizedScore, 0);
    mergedResults.set(id, hybridScoreValue);
  }
  const vectorResultsLength = vectorResults.length;
  for (let i = 0; i < vectorResultsLength; i++) {
    const [resultId, score] = vectorResults[i];
    const normalizedScore = normalizeScore(score, maxVectorScore);
    const existingRes = mergedResults.get(resultId) ?? 0;
    mergedResults.set(resultId, existingRes + hybridScore(0, normalizedScore));
  }
  return [...mergedResults].sort((a, b) => b[1] - a[1]);
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function getQueryWeights(query) {
  // In the next versions of Orama, we will ship a plugin containing a ML model to adjust the weights
  // based on whether the query is keyword-focused, conceptual, etc.
  // For now, we just return a fixed value.
  return {
    text: 0.5,
    vector: 0.5
  };
}

function search(orama, params, language) {
  const mode = params.mode ?? MODE_FULLTEXT_SEARCH;
  if (mode === MODE_FULLTEXT_SEARCH) {
    return fullTextSearch(orama, params, language);
  }
  if (mode === MODE_VECTOR_SEARCH) {
    return searchVector(orama, params);
  }
  if (mode === MODE_HYBRID_SEARCH) {
    return hybridSearch(orama, params);
  }
  throw createError('INVALID_SEARCH_MODE', mode);
}
function fetchDocumentsWithDistinct(orama, uniqueDocsArray, offset, limit, distinctOn) {
  const docs = orama.data.docs;
  // Keep track which values we already seen
  const values = new Map();
  // We cannot know how many results we will have in the end,
  // so we need cannot pre-allocate the array.
  const results = [];
  const resultIDs = new Set();
  const uniqueDocsArrayLength = uniqueDocsArray.length;
  let count = 0;
  for (let i = 0; i < uniqueDocsArrayLength; i++) {
    const idAndScore = uniqueDocsArray[i];
    // If there are no more results, just break the loop
    if (typeof idAndScore === 'undefined') {
      continue;
    }
    const [id, score] = idAndScore;
    if (resultIDs.has(id)) {
      continue;
    }
    const doc = orama.documentsStore.get(docs, id);
    const value = getNested(doc, distinctOn);
    if (typeof value === 'undefined' || values.has(value)) {
      continue;
    }
    values.set(value, true);
    count++;
    // We shouldn't consider the document if it's not in the offset range
    if (count <= offset) {
      continue;
    }
    results.push({
      id: getDocumentIdFromInternalId(orama.internalDocumentIDStore, id),
      score,
      document: doc
    });
    resultIDs.add(id);
    // reached the limit, break the loop
    if (count >= offset + limit) {
      break;
    }
  }
  return results;
}
function fetchDocuments(orama, uniqueDocsArray, offset, limit) {
  const docs = orama.data.docs;
  const results = Array.from({
    length: limit
  });
  const resultIDs = new Set();
  // We already have the list of ALL the document IDs containing the search terms.
  // We loop over them starting from a positional value "offset" and ending at "offset + limit"
  // to provide pagination capabilities to the search.
  for (let i = offset; i < limit + offset; i++) {
    const idAndScore = uniqueDocsArray[i];
    // If there are no more results, just break the loop
    if (typeof idAndScore === 'undefined') {
      break;
    }
    const [id, score] = idAndScore;
    if (!resultIDs.has(id)) {
      // We retrieve the full document only AFTER making sure that we really want it.
      // We never retrieve the full document preventively.
      const fullDoc = orama.documentsStore.get(docs, id);
      results[i] = {
        id: getDocumentIdFromInternalId(orama.internalDocumentIDStore, id),
        score,
        document: fullDoc
      };
      resultIDs.add(id);
    }
  }
  return results;
}

function load(orama, raw) {
  orama.internalDocumentIDStore.load(orama, raw.internalDocumentIDStore);
  orama.data.index = orama.index.load(orama.internalDocumentIDStore, raw.index);
  orama.data.docs = orama.documentsStore.load(orama.internalDocumentIDStore, raw.docs);
  orama.data.sorting = orama.sorter.load(orama.internalDocumentIDStore, raw.sorting);
  orama.data.pinning = orama.pinning.load(orama.internalDocumentIDStore, raw.pinning);
  orama.tokenizer.language = raw.language;
}
function save(orama) {
  return {
    internalDocumentIDStore: orama.internalDocumentIDStore.save(orama.internalDocumentIDStore),
    index: orama.index.save(orama.data.index),
    docs: orama.documentsStore.save(orama.data.docs),
    sorting: orama.sorter.save(orama.data.sorting),
    pinning: orama.pinning.save(orama.data.pinning),
    language: orama.tokenizer.language
  };
}

function update(orama, id, doc, language, skipHooks) {
  const asyncNeeded = isAsyncFunction(orama.afterInsert) || isAsyncFunction(orama.beforeInsert) || isAsyncFunction(orama.afterRemove) || isAsyncFunction(orama.beforeRemove) || isAsyncFunction(orama.beforeUpdate) || isAsyncFunction(orama.afterUpdate);
  if (asyncNeeded) {
    return updateAsync(orama, id, doc, language, skipHooks);
  }
  return updateSync(orama, id, doc, language, skipHooks);
}
async function updateAsync(orama, id, doc, language, skipHooks) {
  if (!skipHooks && orama.beforeUpdate) {
    await runSingleHook(orama.beforeUpdate, orama, id);
  }
  await remove(orama, id, language, skipHooks);
  const newId = await insert(orama, doc, language, skipHooks);
  if (!skipHooks && orama.afterUpdate) {
    await runSingleHook(orama.afterUpdate, orama, newId);
  }
  return newId;
}
function updateSync(orama, id, doc, language, skipHooks) {
  if (!skipHooks && orama.beforeUpdate) {
    runSingleHook(orama.beforeUpdate, orama, id);
  }
  remove(orama, id, language, skipHooks);
  const newId = insert(orama, doc, language, skipHooks);
  if (!skipHooks && orama.afterUpdate) {
    runSingleHook(orama.afterUpdate, orama, newId);
  }
  return newId;
}
function updateMultiple(orama, ids, docs, batchSize, language, skipHooks) {
  const asyncNeeded = isAsyncFunction(orama.afterInsert) || isAsyncFunction(orama.beforeInsert) || isAsyncFunction(orama.afterRemove) || isAsyncFunction(orama.beforeRemove) || isAsyncFunction(orama.beforeUpdate) || isAsyncFunction(orama.afterUpdate) || isAsyncFunction(orama.beforeUpdateMultiple) || isAsyncFunction(orama.afterUpdateMultiple) || isAsyncFunction(orama.beforeRemoveMultiple) || isAsyncFunction(orama.afterRemoveMultiple) || isAsyncFunction(orama.beforeInsertMultiple) || isAsyncFunction(orama.afterInsertMultiple);
  if (asyncNeeded) {
    return updateMultipleAsync(orama, ids, docs, batchSize, language, skipHooks);
  }
  return updateMultipleSync(orama, ids, docs, batchSize, language, skipHooks);
}
async function updateMultipleAsync(orama, ids, docs, batchSize, language, skipHooks) {
  if (!skipHooks) {
    await runMultipleHook(orama.beforeUpdateMultiple, orama, ids);
  }
  const docsLength = docs.length;
  for (let i = 0; i < docsLength; i++) {
    const errorProperty = orama.validateSchema(docs[i], orama.schema);
    if (errorProperty) {
      throw createError('SCHEMA_VALIDATION_FAILURE', errorProperty);
    }
  }
  await removeMultiple(orama, ids, batchSize, language, skipHooks);
  const newIds = await innerInsertMultiple(orama, docs, batchSize, language, skipHooks);
  if (!skipHooks) {
    await runMultipleHook(orama.afterUpdateMultiple, orama, newIds);
  }
  return newIds;
}
function updateMultipleSync(orama, ids, docs, batchSize, language, skipHooks) {
  if (!skipHooks) {
    runMultipleHook(orama.beforeUpdateMultiple, orama, ids);
  }
  const docsLength = docs.length;
  for (let i = 0; i < docsLength; i++) {
    const errorProperty = orama.validateSchema(docs[i], orama.schema);
    if (errorProperty) {
      throw createError('SCHEMA_VALIDATION_FAILURE', errorProperty);
    }
  }
  removeMultiple(orama, ids, batchSize, language, skipHooks);
  const newIds = innerInsertMultiple(orama, docs, batchSize, language, skipHooks);
  if (!skipHooks) {
    runMultipleHook(orama.afterUpdateMultiple, orama, newIds);
  }
  return newIds;
}

function upsert(orama, doc, language, skipHooks, options) {
  const asyncNeeded = isAsyncFunction(orama.afterInsert) || isAsyncFunction(orama.beforeInsert) || isAsyncFunction(orama.afterRemove) || isAsyncFunction(orama.beforeRemove) || isAsyncFunction(orama.beforeUpdate) || isAsyncFunction(orama.afterUpdate) || isAsyncFunction(orama.beforeUpsert) || isAsyncFunction(orama.afterUpsert) || isAsyncFunction(orama.index.beforeInsert) || isAsyncFunction(orama.index.insert) || isAsyncFunction(orama.index.afterInsert);
  if (asyncNeeded) {
    return upsertAsync(orama, doc, language, skipHooks, options);
  }
  return upsertSync(orama, doc, language, skipHooks, options);
}
async function upsertAsync(orama, doc, language, skipHooks, options) {
  const id = orama.getDocumentIndexId(doc);
  if (typeof id !== 'string') {
    throw createError('DOCUMENT_ID_MUST_BE_STRING', typeof id);
  }
  if (!skipHooks && orama.beforeUpsert) {
    await runSingleHook(orama.beforeUpsert, orama, id, doc);
  }
  // Check if document exists
  const existingDoc = orama.documentsStore.get(orama.data.docs, id);
  let resultId;
  if (existingDoc) {
    // Document exists, update it
    resultId = await update(orama, id, doc, language, skipHooks);
  } else {
    // Document doesn't exist, insert it
    resultId = await insert(orama, doc, language, skipHooks, options);
  }
  if (!skipHooks && orama.afterUpsert) {
    await runSingleHook(orama.afterUpsert, orama, resultId, doc);
  }
  return resultId;
}
function upsertSync(orama, doc, language, skipHooks, options) {
  const id = orama.getDocumentIndexId(doc);
  if (typeof id !== 'string') {
    throw createError('DOCUMENT_ID_MUST_BE_STRING', typeof id);
  }
  if (!skipHooks && orama.beforeUpsert) {
    runSingleHook(orama.beforeUpsert, orama, id, doc);
  }
  // Check if document exists
  const existingDoc = orama.documentsStore.get(orama.data.docs, id);
  let resultId;
  if (existingDoc) {
    // Document exists, update it
    resultId = update(orama, id, doc, language, skipHooks);
  } else {
    // Document doesn't exist, insert it
    resultId = insert(orama, doc, language, skipHooks, options);
  }
  if (!skipHooks && orama.afterUpsert) {
    runSingleHook(orama.afterUpsert, orama, resultId, doc);
  }
  return resultId;
}
function upsertMultiple(orama, docs, batchSize, language, skipHooks) {
  const asyncNeeded = isAsyncFunction(orama.afterInsert) || isAsyncFunction(orama.beforeInsert) || isAsyncFunction(orama.afterRemove) || isAsyncFunction(orama.beforeRemove) || isAsyncFunction(orama.beforeUpdate) || isAsyncFunction(orama.afterUpdate) || isAsyncFunction(orama.beforeUpsert) || isAsyncFunction(orama.afterUpsert) || isAsyncFunction(orama.beforeUpsertMultiple) || isAsyncFunction(orama.afterUpsertMultiple) || isAsyncFunction(orama.beforeInsertMultiple) || isAsyncFunction(orama.afterInsertMultiple) || isAsyncFunction(orama.beforeUpdateMultiple) || isAsyncFunction(orama.afterUpdateMultiple) || isAsyncFunction(orama.beforeRemoveMultiple) || isAsyncFunction(orama.afterRemoveMultiple) || isAsyncFunction(orama.index.beforeInsert) || isAsyncFunction(orama.index.insert) || isAsyncFunction(orama.index.afterInsert);
  if (asyncNeeded) {
    return upsertMultipleAsync(orama, docs, batchSize, language, skipHooks);
  }
  return upsertMultipleSync(orama, docs, batchSize, language, skipHooks);
}
async function upsertMultipleAsync(orama, docs, batchSize, language, skipHooks) {
  if (!skipHooks && orama.beforeUpsertMultiple) {
    await runMultipleHook(orama.beforeUpsertMultiple, orama, docs);
  }
  // Validate all documents first
  const docsLength = docs.length;
  for (let i = 0; i < docsLength; i++) {
    const errorProperty = orama.validateSchema(docs[i], orama.schema);
    if (errorProperty) {
      throw createError('SCHEMA_VALIDATION_FAILURE', errorProperty);
    }
  }
  // Separate documents into insert and update arrays
  const docsToInsert = [];
  const docsToUpdate = [];
  const idsToUpdate = [];
  for (const doc of docs) {
    const id = orama.getDocumentIndexId(doc);
    if (typeof id !== 'string') {
      throw createError('DOCUMENT_ID_MUST_BE_STRING', typeof id);
    }
    const existingDoc = orama.documentsStore.get(orama.data.docs, id);
    if (existingDoc) {
      docsToUpdate.push(doc);
      idsToUpdate.push(id);
    } else {
      docsToInsert.push(doc);
    }
  }
  // Perform bulk operations
  const results = [];
  if (docsToUpdate.length > 0) {
    const updateResults = await updateMultiple(orama, idsToUpdate, docsToUpdate, batchSize, language, skipHooks);
    results.push(...updateResults);
  }
  if (docsToInsert.length > 0) {
    const insertResults = await innerInsertMultiple(orama, docsToInsert, batchSize, language, skipHooks);
    results.push(...insertResults);
  }
  if (!skipHooks && orama.afterUpsertMultiple) {
    await runMultipleHook(orama.afterUpsertMultiple, orama, results);
  }
  return results;
}
function upsertMultipleSync(orama, docs, batchSize, language, skipHooks) {
  if (!skipHooks && orama.beforeUpsertMultiple) {
    runMultipleHook(orama.beforeUpsertMultiple, orama, docs);
  }
  // Validate all documents first
  const docsLength = docs.length;
  for (let i = 0; i < docsLength; i++) {
    const errorProperty = orama.validateSchema(docs[i], orama.schema);
    if (errorProperty) {
      throw createError('SCHEMA_VALIDATION_FAILURE', errorProperty);
    }
  }
  // Separate documents into insert and update arrays
  const docsToInsert = [];
  const docsToUpdate = [];
  const idsToUpdate = [];
  for (const doc of docs) {
    const id = orama.getDocumentIndexId(doc);
    if (typeof id !== 'string') {
      throw createError('DOCUMENT_ID_MUST_BE_STRING', typeof id);
    }
    const existingDoc = orama.documentsStore.get(orama.data.docs, id);
    if (existingDoc) {
      docsToUpdate.push(doc);
      idsToUpdate.push(id);
    } else {
      docsToInsert.push(doc);
    }
  }
  // Perform bulk operations
  const results = [];
  if (docsToUpdate.length > 0) {
    const updateResults = updateMultiple(orama, idsToUpdate, docsToUpdate, batchSize, language, skipHooks);
    results.push(...updateResults);
  }
  if (docsToInsert.length > 0) {
    const insertResults = innerInsertMultiple(orama, docsToInsert, batchSize, language, skipHooks);
    results.push(...insertResults);
  }
  if (!skipHooks && orama.afterUpsertMultiple) {
    runMultipleHook(orama.afterUpsertMultiple, orama, results);
  }
  return results;
}

const ORAMA_SECURE_PROXY_PLUGIN_NAME = 'orama-secure-proxy';
class AnswerSession {
  db;
  proxy = null;
  config;
  abortController = null;
  lastInteractionParams = null;
  chatModel = null;
  conversationID;
  messages = [];
  events;
  initPromise;
  state = [];
  constructor(db, config) {
    this.db = db;
    this.config = config;
    this.init();
    this.messages = config.initialMessages || [];
    this.events = config.events || {};
    this.conversationID = config.conversationID || this.generateRandomID();
  }
  async ask(query) {
    await this.initPromise;
    let output = '';
    for await (const msg of await this.askStream(query)) {
      output += msg;
    }
    return output;
  }
  async askStream(query) {
    await this.initPromise;
    return this.fetchAnswer(query);
  }
  abortAnswer() {
    this.abortController?.abort();
    this.state[this.state.length - 1].aborted = true;
    this.triggerStateChange();
  }
  getMessages() {
    return this.messages;
  }
  clearSession() {
    this.messages = [];
    this.state = [];
  }
  regenerateLast({
    stream = true
  }) {
    if (this.state.length === 0 || this.messages.length === 0) {
      throw new Error('No messages to regenerate');
    }
    const isLastMessageAssistant = this.messages.at(-1)?.role === 'assistant';
    if (!isLastMessageAssistant) {
      throw createError('ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT');
    }
    this.messages.pop();
    this.state.pop();
    if (stream) {
      return this.askStream(this.lastInteractionParams);
    }
    return this.ask(this.lastInteractionParams);
  }
  async *fetchAnswer(params) {
    if (!this.chatModel) {
      throw createError('PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL');
    }
    this.abortController = new AbortController();
    this.lastInteractionParams = params;
    const interactionId = this.generateRandomID();
    this.messages.push({
      role: 'user',
      content: params.term ?? ''
    });
    this.state.push({
      interactionId,
      aborted: false,
      loading: true,
      query: params.term ?? '',
      response: '',
      sources: null,
      translatedQuery: null,
      error: false,
      errorMessage: null
    });
    const stateIdx = this.state.length - 1;
    this.addEmptyAssistantMessage();
    this.triggerStateChange();
    try {
      const sources = await search(this.db, params);
      this.state[stateIdx].sources = sources;
      this.triggerStateChange();
      for await (const msg of this.proxy.chatStream({
        model: this.chatModel,
        messages: this.messages
      })) {
        yield msg;
        this.state[stateIdx].response += msg;
        this.messages.findLast(msg => msg.role === 'assistant').content += msg;
        this.triggerStateChange();
      }
    } catch (err) {
      if (err.name === 'AbortError') {
        this.state[stateIdx].aborted = true;
      } else {
        this.state[stateIdx].error = true;
        this.state[stateIdx].errorMessage = err.toString();
      }
      this.triggerStateChange();
    }
    this.state[stateIdx].loading = false;
    this.triggerStateChange();
    return this.state[stateIdx].response;
  }
  generateRandomID(length = 24) {
    return Array.from({
      length
    }, () => Math.floor(Math.random() * 36).toString(36)).join('');
  }
  triggerStateChange() {
    if (this.events.onStateChange) {
      this.events.onStateChange(this.state);
    }
  }
  async init() {
    // eslint-disable-next-line @typescript-eslint/no-this-alias
    const self = this;
    async function getPlugin() {
      return await self.db.plugins.find(plugin => plugin.name === ORAMA_SECURE_PROXY_PLUGIN_NAME);
    }
    const plugin = await getPlugin();
    if (!plugin) {
      throw createError('PLUGIN_SECURE_PROXY_NOT_FOUND');
    }
    const pluginExtras = plugin.extra;
    this.proxy = pluginExtras.proxy;
    if (this.config.systemPrompt) {
      this.messages.push({
        role: 'system',
        content: this.config.systemPrompt
      });
    }
    if (pluginExtras?.pluginParams?.chat?.model) {
      this.chatModel = pluginExtras.pluginParams.chat.model;
    } else {
      throw createError('PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL');
    }
  }
  addEmptyAssistantMessage() {
    this.messages.push({
      role: 'assistant',
      content: ''
    });
  }
}

const kInsertions = Symbol('orama.insertions');
const kRemovals = Symbol('orama.removals');

var internals = /*#__PURE__*/Object.freeze({
	__proto__: null,
	boundedLevenshtein: boundedLevenshtein,
	convertDistanceToMeters: convertDistanceToMeters,
	formatBytes: formatBytes,
	formatNanoseconds: formatNanoseconds,
	getNanosecondsTime: getNanosecondsTime,
	normalizeToken: normalizeToken,
	safeArrayPush: safeArrayPush,
	setDifference: setDifference$1,
	setIntersection: setIntersection,
	setUnion: setUnion,
	uniqueId: uniqueId
});

var browser = /*#__PURE__*/Object.freeze({
	__proto__: null,
	AnswerSession: AnswerSession,
	MODE_FULLTEXT_SEARCH: MODE_FULLTEXT_SEARCH,
	MODE_HYBRID_SEARCH: MODE_HYBRID_SEARCH,
	MODE_VECTOR_SEARCH: MODE_VECTOR_SEARCH,
	components: components,
	count: count,
	create: create$1,
	deletePin: deletePin,
	getAllPins: getAllPins,
	getByID: getByID,
	getPin: getPin,
	insert: insert,
	insertMultiple: insertMultiple,
	insertPin: insertPin,
	internals: internals,
	kInsertions: kInsertions,
	kRemovals: kRemovals,
	load: load,
	remove: remove,
	removeMultiple: removeMultiple,
	save: save,
	search: search,
	searchVector: searchVector,
	update: update,
	updateMultiple: updateMultiple,
	updatePin: updatePin,
	upsert: upsert,
	upsertMultiple: upsertMultiple
});

var require$$0$2 = /*@__PURE__*/getAugmentedNamespace(browser);

Object.defineProperty(getActivitiesDB$1, "__esModule", {
  value: true
});
getActivitiesDB$1.getActivitiesDB = getActivitiesDB;
const orama_1$7 = require$$0$2;
async function getActivitiesDB(activities, options = {}) {
  const {
    queryFields = ['assay']
  } = options;
  const activitiesDB = await (0, orama_1$7.create)({
    schema: {
      $id: 'string',
      ...(queryFields.includes('assay') ? {
        assay: 'string'
      } : null)
    }
  });
  for (const activity of activities) {
    let assay = {
      $id: activity.$id,
      assay: activity.data.assay
    };
    await (0, orama_1$7.insert)(activitiesDB, assay);
  }
  return activitiesDB;
}

var getPatentsDB$1 = {};

Object.defineProperty(getPatentsDB$1, "__esModule", {
  value: true
});
getPatentsDB$1.getPatentsDB = getPatentsDB;
const orama_1$6 = require$$0$2;
async function getPatentsDB(patents, options = {}) {
  const {
    queryFields = ['title', 'abstract'],
    abstractsLimit = 1000,
    callback
  } = options;
  if (patents.length > abstractsLimit) {
    queryFields.splice(queryFields.indexOf('abstract'), 1);
  }
  const patentsDB = await (0, orama_1$6.create)({
    schema: {
      $id: 'string',
      ...(queryFields.includes('title') ? {
        title: 'string'
      } : null),
      ...(queryFields.includes('abstract') ? {
        abstract: 'string'
      } : null),
      nbCompounds: 'number'
    }
  });
  let lastCallback = Date.now();
  for (let i = 0; i < patents.length; i++) {
    const patent = patents[i];
    if (callback && Date.now() - lastCallback > 1000) {
      lastCallback = Date.now();
      await callback('Patent DB creation', i, patents.length);
    }
    let article = {
      $id: patent.$id,
      ...(queryFields.includes('title') ? {
        title: patent?.data?.title
      } : null),
      ...(queryFields.includes('abstract') ? {
        abstract: patent?.data?.abstract
      } : null),
      nbCompounds: patent.data?.nbCompounds ? patent.data.nbCompounds + 2 : 2
    };
    await (0, orama_1$6.insert)(patentsDB, article);
  }
  return patentsDB;
}

var getPubmedsDB$1 = {};

Object.defineProperty(getPubmedsDB$1, "__esModule", {
  value: true
});
getPubmedsDB$1.getPubmedsDB = getPubmedsDB;
const orama_1$5 = require$$0$2;
async function getPubmedsDB(pubmeds, options = {}) {
  const {
    queryFields = ['title', 'abstract', 'meshHeadings'],
    abstractsLimit = 1000,
    callback
  } = options;
  if (pubmeds.length > abstractsLimit) {
    queryFields.splice(queryFields.indexOf('abstract'), 1);
  }
  const pubmedsDB = await (0, orama_1$5.create)({
    schema: {
      $ref: 'string',
      $id: 'string',
      ...(queryFields.includes('title') ? {
        title: 'string'
      } : null),
      ...(queryFields.includes('abstract') ? {
        abstract: 'string'
      } : null),
      ...(queryFields.includes('meshHeadings') ? {
        meshHeadings: 'string[]'
      } : null),
      nbCompounds: 'number'
    }
  });
  let lastCallback = Date.now();
  for (let i = 0; i < pubmeds.length; i++) {
    const pubmed = pubmeds[i];
    if (callback && Date.now() - lastCallback > 1000) {
      lastCallback = Date.now();
      await callback('Pubmed DB creation', i, pubmeds.length);
    }
    const meshHeadings = [];
    for (const meshHeading of pubmed.data.meshHeadings) {
      if (meshHeading.descriptorName !== undefined) {
        meshHeadings.push(meshHeading.descriptorName);
      }
    }
    let article = {
      $id: pubmed.$id,
      ...(queryFields.includes('title') ? {
        title: pubmed?.data?.article?.title || ''
      } : null),
      ...(queryFields.includes('abstract') ? {
        abstract: pubmed?.data?.article?.abstract || ''
      } : null),
      ...(queryFields.includes('meshHeadings') ? {
        meshHeadings: meshHeadings || ''
      } : null),
      nbCompounds: pubmed.data.compounds.length + 2 || 2
    };
    await (0, orama_1$5.insert)(pubmedsDB, article);
  }
  return pubmedsDB;
}

var getTaxonomiesDB$1 = {};

Object.defineProperty(getTaxonomiesDB$1, "__esModule", {
  value: true
});
getTaxonomiesDB$1.getTaxonomiesDB = getTaxonomiesDB;
const orama_1$4 = require$$0$2;
async function getTaxonomiesDB(taxonomies, options = {}) {
  const {
    queryFields = ['superkingdom', 'kingdom', 'phylum', 'class', 'order', 'family', 'genus', 'species']
  } = options;
  const taxonomiesDB = await (0, orama_1$4.create)({
    schema: {
      $id: 'string',
      ...(queryFields.includes('superkingdom') ? {
        superkingdom: 'string'
      } : null),
      ...(queryFields.includes('kingdom') ? {
        kingdom: 'string'
      } : null),
      ...(queryFields.includes('phylum') ? {
        phylum: 'string'
      } : null),
      ...(queryFields.includes('class') ? {
        class: 'string'
      } : null),
      ...(queryFields.includes('order') ? {
        order: 'string'
      } : null),
      ...(queryFields.includes('family') ? {
        family: 'string'
      } : null),
      ...(queryFields.includes('genus') ? {
        genus: 'string'
      } : null),
      ...(queryFields.includes('species') ? {
        species: 'string'
      } : null)
    }
  });
  for (const taxonomy of taxonomies) {
    let level = Object.keys(taxonomy);
    let taxonomyEntry = {
      $id: taxonomy.dbRef.$id,
      ...(level.includes('superkingdom') ? {
        superkingdom: taxonomy.superkingdom
      } : null),
      ...(level.includes('kingdom') ? {
        kingdom: taxonomy.kingdom
      } : null),
      ...(level.includes('phylum') ? {
        phylum: taxonomy.phylum
      } : null),
      ...(level.includes('class') ? {
        class: taxonomy.class
      } : null),
      ...(level.includes('order') ? {
        order: taxonomy.order
      } : null),
      ...(level.includes('family') ? {
        family: taxonomy.family
      } : null),
      ...(level.includes('genus') ? {
        genus: taxonomy.genus
      } : null),
      ...(level.includes('species') ? {
        species: taxonomy.species
      } : null)
    };
    await (0, orama_1$4.insert)(taxonomiesDB, taxonomyEntry);
  }
  return taxonomiesDB;
}

var searchActivitiesDB$1 = {};

Object.defineProperty(searchActivitiesDB$1, "__esModule", {
  value: true
});
searchActivitiesDB$1.searchActivitiesDB = searchActivitiesDB;
const orama_1$3 = require$$0$2;
async function searchActivitiesDB(activitiesDB, activities, terms = '', options = {}) {
  const {
    maxNbEntries = 100,
    minScore = 0.5,
    relevance = {
      k: 1.2,
      b: 0.75,
      d: 0.5
    },
    tolerance = 1,
    queryFields = ['assay']
  } = options;
  if (terms === '') {
    throw new Error('terms is empty');
  }
  let queryResult = await (0, orama_1$3.search)(activitiesDB, {
    term: terms,
    relevance,
    properties: queryFields,
    tolerance,
    limit: maxNbEntries
  });
  let results = [];
  for (let result of queryResult.hits) {
    let id = result.document.$id;
    let assay = result.document.assay;
    let activityDocument = activities.find(activity => {
      return activity.$id === id && activity.data.assay === assay;
    });
    results.push({
      ...activityDocument,
      score: result.score
    });
  }
  results = results.filter(result => result.score >= minScore);
  if (results.length > maxNbEntries) {
    results.length = maxNbEntries;
  }
  results.sort((a, b) => b.score - a.score);
  return results;
}

var searchPatentsDB$1 = {};

Object.defineProperty(searchPatentsDB$1, "__esModule", {
  value: true
});
searchPatentsDB$1.searchPatentsDB = searchPatentsDB;
const orama_1$2 = require$$0$2;
async function searchPatentsDB(patentsDB, patents, terms = '', options = {}) {
  const {
    maxNbEntries = 100,
    minScore = 0.5,
    relevance = {
      k: 1.2,
      b: 0.75,
      d: 0.5
    },
    tolerance = 1,
    queryFields = ['title', 'abstract'],
    boostFields = {
      title: 2,
      abstract: 1
    },
    abstractsLimit = 1000
  } = options;
  if (patents.length > abstractsLimit) {
    queryFields.splice(queryFields.indexOf('abstract'), 1);
  }
  if (terms === '') {
    throw new Error('terms is empty');
  }
  let queryResult = await (0, orama_1$2.search)(patentsDB, {
    term: terms,
    properties: queryFields,
    boost: boostFields,
    relevance,
    tolerance,
    limit: maxNbEntries
  });
  queryResult.hits.map(item => {
    let nbCompounds = 2;
    if (item.document.nbCompounds) {
      nbCompounds = +Number(item.document.nbCompounds);
    }
    item.score = item.score / Math.log2(nbCompounds);
    return item;
  });
  let results = [];
  for (let result of queryResult.hits) {
    let id = result.document.$id;
    // to do this could be maybe improved using Map
    let patentsDocument = patents.find(patent => patent.$id === id);
    results.push({
      ...patentsDocument,
      score: result.score
    });
  }
  results = results.filter(result => result.score >= minScore);
  if (results.length > maxNbEntries) {
    results.length = maxNbEntries;
  }
  results.sort((a, b) => b.score - a.score);
  return results;
}

var searchPubmedsDB$1 = {};

Object.defineProperty(searchPubmedsDB$1, "__esModule", {
  value: true
});
searchPubmedsDB$1.searchPubmedsDB = searchPubmedsDB;
const orama_1$1 = require$$0$2;
async function searchPubmedsDB(pubmedsDB, pubmeds, terms = '', options = {}) {
  const {
    maxNbEntries = 100,
    minScore = 0.5,
    relevance = {
      k: 1.2,
      b: 0.75,
      d: 0.5
    },
    tolerance = 1,
    queryFields = ['title', 'abstract', 'meshHeadings'],
    boostFields = {
      title: 2,
      abstract: 1,
      meshHeadings: 1
    },
    abstractsLimit = 1000
  } = options;
  if (terms === '') {
    throw new Error('terms is empty');
  }
  if (pubmeds.length > abstractsLimit) {
    queryFields.splice(queryFields.indexOf('abstract'), 1);
  }
  let queryResult = await (0, orama_1$1.search)(pubmedsDB, {
    term: terms,
    properties: queryFields,
    boost: boostFields,
    relevance,
    limit: maxNbEntries,
    tolerance
  });
  queryResult.hits.map(item => {
    let nbCompounds = 2;
    if (item.document.nbCompounds) {
      nbCompounds = +Number(item.document.nbCompounds);
    }
    item.score = item.score / Math.log2(nbCompounds);
    return item;
  });
  let results = [];
  for (let result of queryResult.hits) {
    let id = result.document.$id;
    let pubmedDocument = pubmeds.find(pubmed => pubmed.$id === id);
    results.push({
      ...pubmedDocument,
      score: result.score
    });
  }
  results = results.filter(result => result.score >= minScore);
  if (results.length > maxNbEntries) {
    results.length = maxNbEntries;
  }
  results.sort((a, b) => b.score - a.score);
  return results;
}

var searchTaxonomiesDB$1 = {};

Object.defineProperty(searchTaxonomiesDB$1, "__esModule", {
  value: true
});
searchTaxonomiesDB$1.searchTaxonomiesDB = searchTaxonomiesDB;
const orama_1 = require$$0$2;
async function searchTaxonomiesDB(taxonomiesDB, taxonomies, terms = '', options = {}) {
  const {
    queryFields = ['superkingdom', 'kingdom', 'phylum', 'class', 'order', 'family', 'genus', 'species'],
    maxNbEntries = 50,
    minScore = 0.5,
    tolerance = 1
  } = options;
  if (terms === '') {
    throw new Error('terms is empty');
  }
  let queryResult = await (0, orama_1.search)(taxonomiesDB, {
    term: terms,
    properties: queryFields,
    tolerance,
    limit: maxNbEntries
  });
  let results = [];
  for (let result of queryResult.hits) {
    let keys = Object.keys(result.document);
    let currentTaxonomy = {};
    for (let key of keys) {
      if (key !== '$id') {
        currentTaxonomy[key] = result.document[key];
      } else {
        currentTaxonomy.dbRef = {
          $id: result.document.$id
        };
      }
    }
    let taxonomiesDocument = taxonomies.filter(taxonomy => Object.keys(currentTaxonomy).every(key => {
      if (key === 'dbRef') {
        return currentTaxonomy[key].$id === taxonomy.dbRef.$id;
      }
      return currentTaxonomy[key] === taxonomy[key];
    }));
    for (let taxonomy of taxonomiesDocument) {
      taxonomy.score = result.score;
      results.push(taxonomy);
    }
  }
  results = results.filter(result => result.score >= minScore);
  if (results.length > maxNbEntries) {
    results.length = maxNbEntries;
  }
  results.sort((a, b) => b.score - a.score);
  return results;
}

var summarizeEmptyTerms$1 = {};

Object.defineProperty(summarizeEmptyTerms$1, "__esModule", {
  value: true
});
summarizeEmptyTerms$1.summarizeEmptyTerms = summarizeEmptyTerms;
function summarizeEmptyTerms(activities, patents, pubmeds, taxonomies, options) {
  activities = activities.slice();
  patents = patents.slice();
  pubmeds = pubmeds.slice();
  taxonomies = taxonomies.slice();
  // PATENTS
  const patentsMaxNbEntries = options?.patents?.maxNbEntries || 100;
  patents.sort((a, b) => {
    const nbCompoundsEntryA = a.data?.nbCompounds ? a.data.nbCompounds + 2 : Number.MAX_VALUE;
    const nbCompoundsEntryB = b.data?.nbCompounds ? b.data.nbCompounds + 2 : Number.MAX_VALUE;
    return 1 / Math.log2(nbCompoundsEntryB) - 1 / Math.log2(nbCompoundsEntryA);
  });
  if (patents.length > patentsMaxNbEntries) {
    patents.length = patentsMaxNbEntries;
  }
  // PUBMEDS
  const pubmedsMaxNbEntries = options?.pubmeds?.maxNbEntries || 100;
  pubmeds.sort((a, b) => {
    const nbCompoundsEntryA = a.data.compounds?.length ? a.data.compounds.length + 2 : Number.MAX_VALUE;
    const nbCompoundsEntryB = b.data.compounds?.length ? b.data.compounds.length + 2 : Number.MAX_VALUE;
    return 1 / Math.log2(nbCompoundsEntryB) - 1 / Math.log2(nbCompoundsEntryA);
  });
  if (pubmeds.length > pubmedsMaxNbEntries) {
    pubmeds.length = pubmedsMaxNbEntries;
  }
  // ACTIVITIES
  const activitiesMaxNbEntries = options?.activities?.maxNbEntries || 100;
  if (activities.length > activitiesMaxNbEntries) {
    activities.length = activitiesMaxNbEntries;
  }
  // TAXONOMIES
  const taxonomiesMaxNbEntries = options?.taxonomies?.maxNbEntries || 50;
  if (taxonomies.length > taxonomiesMaxNbEntries) {
    taxonomies.length = activitiesMaxNbEntries;
  }
  return {
    activities,
    patents,
    pubmeds,
    taxonomies
  };
}

Object.defineProperty(ActiveOrNaturalSummarizer$1, "__esModule", {
  value: true
});
ActiveOrNaturalSummarizer$1.ActiveOrNaturalSummarizer = void 0;
const getActivitiesDB_1 = getActivitiesDB$1;
const getPatentsDB_1 = getPatentsDB$1;
const getPubmedsDB_1 = getPubmedsDB$1;
const getTaxonomiesDB_1 = getTaxonomiesDB$1;
const searchActivitiesDB_1 = searchActivitiesDB$1;
const searchPatentsDB_1 = searchPatentsDB$1;
const searchPubmedsDB_1 = searchPubmedsDB$1;
const searchTaxonomiesDB_1 = searchTaxonomiesDB$1;
const summarizeEmptyTerms_1 = summarizeEmptyTerms$1;
class ActiveOrNaturalSummarizer {
  /**
   * @description Summarize the active or natural details with the given terms
   * @param {Object} activeOrNaturalDetails The active or natural details to summarize
   * @param {Object} [options={}] The options to use for the search
   * @param {Object} [options.activities={}] The options to use for the activities search
   * @param {number} [options.activities.minScore=0.5] - Minimum score for an entry to be returned
   * @param {number} [options.activities.maxNbEntries=100] - Maximum number of entries to return
   * @param {object} [options.activities.relevance={ k: 1.2, b: 0.75, d: 0.5 }] - BM25 algorithm {k: Term frequency saturation parameter, b: Length normalization parameter, d:Frequency normalization lower bound}
   * @param {number} [options.activities.tolerance=1] -Typo Tolerance following the Levenshtein algorithm
   * @param {string[]} [options.activities.queryFields=['assay']] - Fields to query
   * @param {Object} [options.taxonomies={}] The options to use for the activities search
   * @param {number} [options.taxonomies.minScore=0.5] - Minimum score for an entry to be returned
   * @param {number} [options.taxonomies.maxNbEntries=50] - Maximum number of entries to return
   * @param {number} [options.taxonomies.tolerance=1] -Typo Tolerance following the Levenshtein algorithm
   * @param {object} [options.patents={}] - Options for patents
   * @param {number} [options.patents.abstractsLimit=1000] - If more than this number of abstracts, the search will be done on the without abstracts
   * @param {number} [options.patents.maxNbEntries=100] - Maximum number of entries to return
   * @param {number} [options.patents.inScore=0.5] - Minimum score for an entry to be returned
   * @param {object} [options.patents.relevance={ k: 1.2, b: 0.75, d: 0.5 }] - BM25 algorithm {k: Term frequency saturation parameter, b: Length normalization parameter, d:Frequency normalization lower bound}
   * @param {number} [options.patents.tolerance=1] -Typo Tolerance following the Levenshtein algorithm
   * @param {string[]} [options.patents.queryFields=['title', 'abstract']] - Fields to query
   * @param {object} [options.patents.boostFields={ title: 2, abstract: 1 }] - Fields weights, higher weight means higher importance
   * @param {object} [options.pubmeds={}] - Options for pubmeds
   * @param {number} [options.pubmeds.abstractsLimit=1000] - If more than this number of abstracts, the search will be done on the without abstracts
   * @param {number} [options.pubmeds.minScore=0.5] - Minimum score for an entry to be returned
   * @param {number} [options.pubmeds.maxNbEntries=100] - Maximum number of entries to return
   * @param {object} [options.pubmeds.relevance={ k: 1.2, b: 0.75, d: 0.5 }] - BM25 algorithm {k: Term frequency saturation parameter, b: Length normalization parameter, d:Frequency normalization lower bound}
   * @param {number} [options.pubmeds.tolerance=1] -Typo Tolerance following the Levenshtein algorithm
   * @param {object} [options.pubmeds.boostFields={ title: 2, abstract: 1, meshHeadings: 1 }]  - Fields weights, higher weight means higher importance
   * @param {string[]} [options.pubmeds.queryFields=['title', 'abstract', 'meshHeadings']] - Fields to query
   * @param {(action,current,last)=>{}} [options.callback] - Callback function to call during database creation
   * @returns
   */
  constructor(activeOrNaturalDetails, options = {}) {
    this.options = options;
    this.activeOrNaturalDetails = activeOrNaturalDetails;
    this.activities = activeOrNaturalDetails.data.activities;
    this.patents = activeOrNaturalDetails.data.patents;
    this.pubmeds = activeOrNaturalDetails.data.pubmeds;
    this.taxonomies = activeOrNaturalDetails.data.taxonomies;
    this.isInitialized = false;
  }
  /**
   * @description Summarize the active or natural details with the given terms
   * @param {string} terms The terms to search
   * @returns {Promise<Object>} The summarized active or natural details
   */
  async summarize(terms) {
    if (terms === '') {
      const {
        patents,
        pubmeds,
        activities
      } = (0, summarizeEmptyTerms_1.summarizeEmptyTerms)(this.activities, this.patents, this.pubmeds, this.taxonomies, this.options);
      return {
        ...this.activeOrNaturalDetails,
        data: {
          ...this.activeOrNaturalDetails.data,
          activities,
          patents,
          pubmeds
        }
      };
    }
    if (!this.isInitialized) {
      if (!this.creatingDB) {
        this.creatingDB = this.createDB();
      }
      await this.creatingDB;
      this.isInitialized = true;
      this.creatingDB = undefined;
    }
    return {
      ...this.activeOrNaturalDetails,
      data: {
        ...this.activeOrNaturalDetails.data,
        activities: await (0, searchActivitiesDB_1.searchActivitiesDB)(this.activitiesDB, this.activities, terms, this.options?.activities),
        patents: await (0, searchPatentsDB_1.searchPatentsDB)(this.patentsDB, this.patents, terms, this.options?.patents),
        pubmeds: await (0, searchPubmedsDB_1.searchPubmedsDB)(this.pubmedsDB, this.pubmeds, terms, this.options?.pubmeds),
        taxonomies: await (0, searchTaxonomiesDB_1.searchTaxonomiesDB)(this.taxonomiesDB, this.taxonomies, terms, this.options?.taxonomies)
      }
    };
  }
  async createDB() {
    this.pubmedsDB = await (0, getPubmedsDB_1.getPubmedsDB)(this.pubmeds, {
      callback: this.options.callback,
      ...this.options.pubmeds
    });
    this.activitiesDB = await (0, getActivitiesDB_1.getActivitiesDB)(this.activities, this.options.activities);
    this.patentsDB = await (0, getPatentsDB_1.getPatentsDB)(this.patents, {
      callback: this.options.callback,
      ...this.options.patents
    });
    this.taxonomiesDB = await (0, getTaxonomiesDB_1.getTaxonomiesDB)(this.taxonomies, this.options.taxonomies);
  }
}
ActiveOrNaturalSummarizer$1.ActiveOrNaturalSummarizer = ActiveOrNaturalSummarizer;

var taxonomyComparator$1 = {};

var taxonomyRanks = {};

Object.defineProperty(taxonomyRanks, "__esModule", {
  value: true
});
taxonomyRanks.taxonomyRanks = void 0;
taxonomyRanks.taxonomyRanks = ['superkingdom', 'kingdom', 'phylum', 'class', 'order', 'family', 'genus', 'species'];

Object.defineProperty(taxonomyComparator$1, "__esModule", {
  value: true
});
taxonomyComparator$1.taxonomyComparator = taxonomyComparator;
const taxonomyRanks_js_1 = taxonomyRanks;
/**
 * @description sort taxonomies by superkingdom, kingdom, phylum, class, order, family, genus, species
 * @param {import('./Taxonomy.js').Taxonomy} a
 * @param {import('./Taxonomy.js').Taxonomy} b
 * @returns {number}
 */
function taxonomyComparator(a, b) {
  for (const field of taxonomyRanks_js_1.taxonomyRanks) {
    if (a[field] !== b[field]) {
      return (a[field] || '').localeCompare(b[field] || '');
    }
  }
  return 0;
}

var createTaxonomyTree$1 = {};

Object.defineProperty(createTaxonomyTree$1, "__esModule", {
  value: true
});
createTaxonomyTree$1.createTaxonomyTree = createTaxonomyTree;
const taxonomyRanks_1 = taxonomyRanks;
/**
 * @description Creates a tree structure from an array of taxonomies.
 *
 * @param {import('./Taxonomy.js').Taxonomy[]} taxonomies - The array of taxonomies to create a tree from.
 * @returns {Object[]} The tree structure.
 */
function createTaxonomyTree(taxonomies, options = {}) {
  let {
    rankLimit = ''
  } = options;
  rankLimit = rankLimit.toLowerCase();
  const tree = [];
  for (let taxonomy of taxonomies) {
    let reachedRankLimit = false;
    let current = tree;
    for (let rank of taxonomyRanks_1.taxonomyRanks) {
      if (rank === rankLimit) {
        reachedRankLimit = true;
      }
      if (reachedRankLimit && rank !== rankLimit) {
        break;
      }
      const name = taxonomy[rank] || '';
      let existing = current.find(node => node.name === name && node.rank === rank);
      if (!existing) {
        existing = {
          name,
          rank,
          count: 1,
          children: []
        };
        if (rank === 'species' && taxonomy?.dbRef) {
          existing.url = taxonomy.dbRef.url;
        }
        current.push(existing);
      } else {
        existing.count++;
      }
      current = existing.children;
    }
  }
  for (let branch of tree) {
    cleanEmptyBranches(branch);
    nbTaxonomies(branch);
  }
  return tree;
}
function cleanEmptyBranches(branch) {
  for (const child of branch.children) cleanEmptyBranches(child);
  branch.children = branch.children.filter(child => {
    // This part is used empty nodes
    if (child.children.length === 0 && child.name === '') {
      return false;
    }
    // This part is used to remove the children in the lowest rank
    if (child.children.length === 0 && child.name !== '') {
      delete child.children;
    }
    return true;
  });
}
function nbTaxonomies(branch) {
  branch.nbTaxonomies = 0; // count the current node
  if (branch.children) {
    for (let child of branch.children) {
      nbTaxonomies(child);
      branch.nbTaxonomies += child.nbTaxonomies;
    }
  } else {
    branch.nbTaxonomies = 1;
  }
  return branch.nbTaxonomies;
}

(function (exports) {

  var __createBinding = src$2 && src$2.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$2 && src$2.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(OctoChemDB$1, exports);
  __exportStar(ActiveOrNaturalSummarizer$1, exports);
  __exportStar(taxonomyComparator$1, exports);
  __exportStar(createTaxonomyTree$1, exports);
})(src$2);

var src$1 = {};

var sequenceSVG$1 = {};

var appendInternals$1 = {};

Object.defineProperty(appendInternals$1, "__esModule", {
  value: true
});
appendInternals$1.appendInternals = appendInternals;
function appendInternals(data) {
  // for each line (internal fragment) we calculate the vertical position
  // where it should be drawn as well and the maximal number of lines
  let maxNumberLines = 0;
  for (let result of data.results) {
    if (result.internal) {
      result.slot = assignSlot(result.from, result.to, data.residues.residues);
      if (result.slot > maxNumberLines) maxNumberLines = result.slot;
    }
  }
  for (let row of data.rows) {
    row.info.internals = maxNumberLines;
  }
}
// we need to define the height of the line.
// we need to find a height that is not yet used.
function assignSlot(from, to, residues) {
  let used = {};
  if (from > 0) from--; // we ensure that we don't put on the same line to sequences that are consecutive
  for (let i = from; i < to; i++) {
    let residue = residues[i];
    for (const index of residue.paper.usedSlots.keys()) {
      used[index] = true;
    }
  }
  let counter = 0;
  while (true) {
    if (!used[counter]) {
      break;
    }
    counter++;
  }
  for (let i = from; i < to; i++) {
    residues[i].paper.usedSlots[counter] = true;
  }
  return counter;
}

var appendResidues$1 = {};

var __createBinding = appendResidues$1 && appendResidues$1.__createBinding || (Object.create ? function (o, m, k, k2) {
  if (k2 === undefined) 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 === undefined) k2 = k;
  o[k2] = m[k];
});
var __setModuleDefault = appendResidues$1 && appendResidues$1.__setModuleDefault || (Object.create ? function (o, v) {
  Object.defineProperty(o, "default", {
    enumerable: true,
    value: v
  });
} : function (o, v) {
  o["default"] = v;
});
var __importStar = appendResidues$1 && appendResidues$1.__importStar || function () {
  var ownKeys = function (o) {
    ownKeys = Object.getOwnPropertyNames || function (o) {
      var ar = [];
      for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
      return ar;
    };
    return ownKeys(o);
  };
  return function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
    __setModuleDefault(result, mod);
    return result;
  };
}();
Object.defineProperty(appendResidues$1, "__esModule", {
  value: true
});
appendResidues$1.appendResidues = appendResidues;
const chemical_groups_1 = src$f;
const Nucleotide = __importStar(src$9);
const Peptide = __importStar(src$8);
const ALTERNATIVES = ['', '¹', '²', '³', '⁴', '⁵', '⁶', '⁷', '⁸', '⁹'];
const SYMBOLS = ['Θ', 'Δ', 'Λ', 'Φ', 'Ω', 'Γ', 'Χ'];
let currentSymbol = 0;
/**
 * Code that allows to split a sequence of amino acids or nucleotides natural or non natural
 * @param {string} [sequence]
 * @param {object} [options={}]
 * @param {string} [options.kind] - peptide, rna, ds-dna or dna. Default if contains U: rna, otherwise ds-dna
 * @param {string} [options.fivePrime=monophosphate] - alcohol, monophosphate, diphosphate, triphosphate
 * @param {string} [options.circular=false]
 */
function appendResidues(data, sequence, options = {}) {
  const {
    kind = 'peptide'
  } = options;
  currentSymbol = 0;
  // we normalize the sequence to 3 letter codes
  if (kind === 'peptide') {
    sequence = Peptide.sequenceToMF(sequence);
  } else {
    sequence = Nucleotide.sequenceToMF(sequence, options);
  }
  const result = {
    begin: '',
    end: '',
    residues: []
  };
  const STATE_BEGIN = 0;
  const STATE_MIDDLE = 1;
  const STATE_END = 2;
  let parenthesisLevel = 0;
  let state = STATE_BEGIN; // as long as we don't have an uppercase followed by 2 lowercases
  for (let i = 0; i < sequence.length; i++) {
    let currentChar = sequence.charAt(i);
    let nextChar = i < sequence.length - 1 ? sequence.charAt(i + 1) : '';
    let nextNextChar = i < sequence.length - 2 ? sequence.charAt(i + 2) : '';
    if (state === STATE_BEGIN && currentChar.match(/[A-Z]/) && nextChar.match(/[a-z]/) && nextNextChar.match(/[a-z]/) && parenthesisLevel === 0) {
      state = STATE_MIDDLE;
    }
    if (state === STATE_MIDDLE && !sequence.slice(i).match(/[A-Z][a-z]{2}/) && !currentChar.match(/[a-z]/) && parenthesisLevel === 0) {
      state = STATE_END;
    } else if (currentChar.match(/[A-Z]/) && nextChar.match(/[a-z]/) && nextNextChar.match(/[a-z]/) && parenthesisLevel === 0) {
      result.residues.push('');
    }
    switch (state) {
      case STATE_BEGIN:
        result.begin = result.begin + currentChar;
        break;
      case STATE_MIDDLE:
        result.residues[result.residues.length - 1] = result.residues.at(-1) + currentChar;
        break;
      case STATE_END:
        result.end = result.end + currentChar;
        break;
    }
    if (currentChar === '(') {
      parenthesisLevel++;
    } else if (currentChar === ')') {
      parenthesisLevel--;
    }
  }
  // we process all the residues
  let alternatives = {};
  let replacements = {};
  for (let i = 0; i < result.residues.length; i++) {
    let label = result.residues[i];
    let residue = {
      value: label,
      results: {
        begin: [],
        end: []
      },
      fromBegin: i + 1,
      fromEnd: result.residues.length - i,
      kind: 'residue'
    };
    if (label.includes('(')) {
      getModifiedReplacement(label, residue, alternatives, replacements);
    } else if (chemical_groups_1.groupsObject[label] && chemical_groups_1.groupsObject[label].oneLetter) {
      residue.label = chemical_groups_1.groupsObject[label].oneLetter;
    } else {
      getUnknownReplacement(label, residue, replacements);
    }
    result.residues[i] = residue;
  }
  result.begin = removeStartEndParenthesis(result.begin);
  result.end = removeStartEndParenthesis(result.end);
  if (result.begin.length > 2) {
    let label = options.kind === 'peptide' ? 'Nter' : "5'";
    replacements[result.begin] = {
      label
    };
    result.begin = label;
  }
  if (result.end.length > 2) {
    let label = options.kind === 'peptide' ? 'Cter' : "3'";
    replacements[result.end] = {
      label
    };
    result.end = label;
  }
  result.begin = {
    label: result.begin,
    kind: 'begin'
  };
  result.end = {
    label: result.end,
    kind: 'end'
  };
  result.alternatives = alternatives;
  result.replacements = replacements;
  result.all = [result.begin].concat(result.residues, [result.end]);
  for (const entry of result.all) {
    entry.info = {
      nbOver: 0,
      nbUnder: 0
    };
  }
  data.residues = result;
}
function getUnknownReplacement(unknownResidue, residue, replacements) {
  if (!replacements[unknownResidue]) {
    replacements[unknownResidue] = {
      label: SYMBOLS[currentSymbol] || '?',
      id: unknownResidue
    };
  }
  currentSymbol++;
  residue.replaced = true;
  residue.label = replacements[unknownResidue].label;
}
function getModifiedReplacement(modifiedResidue, residue, alternatives, replacements) {
  if (!replacements[modifiedResidue]) {
    let position = modifiedResidue.indexOf('(');
    let residueCode = modifiedResidue.slice(0, position);
    let modification = removeStartEndParenthesis(modifiedResidue.slice(position));
    if (chemical_groups_1.groupsObject[residueCode] && chemical_groups_1.groupsObject[residueCode].alternativeOneLetter) {
      let alternativeOneLetter = chemical_groups_1.groupsObject[residueCode].alternativeOneLetter;
      if (!alternatives[alternativeOneLetter]) {
        alternatives[alternativeOneLetter] = {
          count: 1
        };
      } else {
        alternatives[alternativeOneLetter].count++;
      }
      replacements[modifiedResidue] = {
        label: ALTERNATIVES[alternatives[alternativeOneLetter].count - 1] + alternativeOneLetter,
        residue: residueCode,
        modification
      };
    } else {
      getUnknownReplacement(modifiedResidue, residue, replacements);
    }
  }
  residue.replaced = true;
  residue.label = replacements[modifiedResidue].label;
}
function removeStartEndParenthesis(mf) {
  if (mf[0] === '(' && mf.at(-1) === ')') {
    return mf.slice(1, -1);
  }
  return mf;
}

var appendResiduesPosition$1 = {};

var getPaper_browser = {};

//#region \0rolldown/runtime.js
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = {
  exports: {}
}).exports, mod), cb = null), mod.exports);
var __exportAll = (all, no_symbols) => {
  let target = {};
  for (var name in all) {
    __defProp(target, name, {
      get: all[name],
      enumerable: true
    });
  }
  {
    __defProp(target, Symbol.toStringTag, {
      value: "Module"
    });
  }
  return target;
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
      key = keys[i];
      if (!__hasOwnProp.call(to, key) && key !== except) {
        __defProp(to, key, {
          get: (k => from[k]).bind(null, key),
          enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
        });
      }
    }
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(__defProp(target, "default", {
  value: mod,
  enumerable: true
}) , mod));

//#endregion
//#region src/utils/methods.js
const methods = {};
const names = [];
function registerMethods(name, m) {
  if (Array.isArray(name)) {
    for (const _name of name) registerMethods(_name, m);
    return;
  }
  if (typeof name === "object") {
    for (const _name in name) registerMethods(_name, name[_name]);
    return;
  }
  addMethodNames(Object.getOwnPropertyNames(m));
  methods[name] = Object.assign(methods[name] || {}, m);
}
function getMethodsFor(name) {
  return methods[name] || {};
}
function getMethodNames() {
  return [...new Set(names)];
}
function addMethodNames(_names) {
  names.push(..._names);
}

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/fails.js
var require_fails = /* @__PURE__ */__commonJSMin((exports, module) => {
  module.exports = function (exec) {
    try {
      return !!exec();
    } catch (error) {
      return true;
    }
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/function-bind-native.js
var require_function_bind_native = /* @__PURE__ */__commonJSMin((exports, module) => {
  var fails = require_fails();
  module.exports = !fails(function () {
    var test = function () {}.bind();
    return typeof test != "function" || test.hasOwnProperty("prototype");
  });
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/function-uncurry-this.js
var require_function_uncurry_this = /* @__PURE__ */__commonJSMin((exports, module) => {
  var NATIVE_BIND = require_function_bind_native();
  var FunctionPrototype = Function.prototype;
  var call = FunctionPrototype.call;
  var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
  module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
    return function () {
      return call.apply(fn, arguments);
    };
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/object-is-prototype-of.js
var require_object_is_prototype_of = /* @__PURE__ */__commonJSMin((exports, module) => {
  var uncurryThis = require_function_uncurry_this();
  module.exports = uncurryThis({}.isPrototypeOf);
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/global-this.js
var require_global_this = /* @__PURE__ */__commonJSMin((exports, module) => {
  var check = function (it) {
    return it && it.Math === Math && it;
  };
  module.exports = check(typeof globalThis == "object" && globalThis) || check(typeof window == "object" && window) || check(typeof self == "object" && self) || check(typeof global == "object" && global) || check(typeof exports == "object" && exports) || function () {
    return this;
  }() || Function("return this")();
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/function-apply.js
var require_function_apply = /* @__PURE__ */__commonJSMin((exports, module) => {
  var NATIVE_BIND = require_function_bind_native();
  var FunctionPrototype = Function.prototype;
  var apply = FunctionPrototype.apply;
  var call = FunctionPrototype.call;
  module.exports = typeof Reflect == "object" && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
    return call.apply(apply, arguments);
  });
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/classof-raw.js
var require_classof_raw = /* @__PURE__ */__commonJSMin((exports, module) => {
  var uncurryThis = require_function_uncurry_this();
  var toString = uncurryThis({}.toString);
  var stringSlice = uncurryThis("".slice);
  module.exports = function (it) {
    return stringSlice(toString(it), 8, -1);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/function-uncurry-this-clause.js
var require_function_uncurry_this_clause = /* @__PURE__ */__commonJSMin((exports, module) => {
  var classofRaw = require_classof_raw();
  var uncurryThis = require_function_uncurry_this();
  module.exports = function (fn) {
    if (classofRaw(fn) === "Function") return uncurryThis(fn);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-callable.js
var require_is_callable = /* @__PURE__ */__commonJSMin((exports, module) => {
  var documentAll = typeof document == "object" && document.all;
  module.exports = typeof documentAll == "undefined" && documentAll !== void 0 ? function (argument) {
    return typeof argument == "function" || argument === documentAll;
  } : function (argument) {
    return typeof argument == "function";
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/descriptors.js
var require_descriptors = /* @__PURE__ */__commonJSMin((exports, module) => {
  var fails = require_fails();
  module.exports = !fails(function () {
    return Object.defineProperty({}, 1, {
      get: function () {
        return 7;
      }
    })[1] !== 7;
  });
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/function-call.js
var require_function_call = /* @__PURE__ */__commonJSMin((exports, module) => {
  var NATIVE_BIND = require_function_bind_native();
  var call = Function.prototype.call;
  module.exports = NATIVE_BIND ? call.bind(call) : function () {
    return call.apply(call, arguments);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/object-property-is-enumerable.js
var require_object_property_is_enumerable = /* @__PURE__ */__commonJSMin(exports => {
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({
    1: 2
  }, 1);
  exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
    var descriptor = getOwnPropertyDescriptor(this, V);
    return !!descriptor && descriptor.enumerable;
  } : $propertyIsEnumerable;
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/create-property-descriptor.js
var require_create_property_descriptor = /* @__PURE__ */__commonJSMin((exports, module) => {
  module.exports = function (bitmap, value) {
    return {
      enumerable: !(bitmap & 1),
      configurable: !(bitmap & 2),
      writable: !(bitmap & 4),
      value
    };
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/indexed-object.js
var require_indexed_object = /* @__PURE__ */__commonJSMin((exports, module) => {
  var uncurryThis = require_function_uncurry_this();
  var fails = require_fails();
  var classof = require_classof_raw();
  var $Object = Object;
  var split = uncurryThis("".split);
  module.exports = fails(function () {
    return !$Object("z").propertyIsEnumerable(0);
  }) ? function (it) {
    return classof(it) === "String" ? split(it, "") : $Object(it);
  } : $Object;
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-null-or-undefined.js
var require_is_null_or_undefined = /* @__PURE__ */__commonJSMin((exports, module) => {
  module.exports = function (it) {
    return it === null || it === void 0;
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/require-object-coercible.js
var require_require_object_coercible = /* @__PURE__ */__commonJSMin((exports, module) => {
  var isNullOrUndefined = require_is_null_or_undefined();
  var $TypeError = TypeError;
  module.exports = function (it) {
    if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
    return it;
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-indexed-object.js
var require_to_indexed_object = /* @__PURE__ */__commonJSMin((exports, module) => {
  var IndexedObject = require_indexed_object();
  var requireObjectCoercible = require_require_object_coercible();
  module.exports = function (it) {
    return IndexedObject(requireObjectCoercible(it));
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-object.js
var require_is_object = /* @__PURE__ */__commonJSMin((exports, module) => {
  var isCallable = require_is_callable();
  module.exports = function (it) {
    return typeof it == "object" ? it !== null : isCallable(it);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/path.js
var require_path = /* @__PURE__ */__commonJSMin((exports, module) => {
  module.exports = {};
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/get-built-in.js
var require_get_built_in = /* @__PURE__ */__commonJSMin((exports, module) => {
  var path = require_path();
  var globalThis = require_global_this();
  var isCallable = require_is_callable();
  var aFunction = function (variable) {
    return isCallable(variable) ? variable : void 0;
  };
  module.exports = function (namespace, method) {
    return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(globalThis[namespace]) : path[namespace] && path[namespace][method] || globalThis[namespace] && globalThis[namespace][method];
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/environment-user-agent.js
var require_environment_user_agent = /* @__PURE__ */__commonJSMin((exports, module) => {
  var navigator = require_global_this().navigator;
  var userAgent = navigator && navigator.userAgent;
  module.exports = userAgent ? String(userAgent) : "";
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/environment-v8-version.js
var require_environment_v8_version = /* @__PURE__ */__commonJSMin((exports, module) => {
  var globalThis = require_global_this();
  var userAgent = require_environment_user_agent();
  var process = globalThis.process;
  var Deno = globalThis.Deno;
  var versions = process && process.versions || Deno && Deno.version;
  var v8 = versions && versions.v8;
  var match;
  var version;
  if (v8) {
    match = v8.split(".");
    version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  }
  if (!version && userAgent) {
    match = userAgent.match(/Edge\/(\d+)/);
    if (!match || match[1] >= 74) {
      match = userAgent.match(/Chrome\/(\d+)/);
      if (match) version = +match[1];
    }
  }
  module.exports = version;
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/symbol-constructor-detection.js
var require_symbol_constructor_detection = /* @__PURE__ */__commonJSMin((exports, module) => {
  var V8_VERSION = require_environment_v8_version();
  var fails = require_fails();
  var $String = require_global_this().String;
  module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
    var symbol = Symbol("symbol detection");
    return !$String(symbol) || !(Object(symbol) instanceof Symbol) || !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  });
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/use-symbol-as-uid.js
var require_use_symbol_as_uid = /* @__PURE__ */__commonJSMin((exports, module) => {
  var NATIVE_SYMBOL = require_symbol_constructor_detection();
  module.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == "symbol";
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-symbol.js
var require_is_symbol = /* @__PURE__ */__commonJSMin((exports, module) => {
  var getBuiltIn = require_get_built_in();
  var isCallable = require_is_callable();
  var isPrototypeOf = require_object_is_prototype_of();
  var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
  var $Object = Object;
  module.exports = USE_SYMBOL_AS_UID ? function (it) {
    return typeof it == "symbol";
  } : function (it) {
    var $Symbol = getBuiltIn("Symbol");
    return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/try-to-string.js
var require_try_to_string = /* @__PURE__ */__commonJSMin((exports, module) => {
  var $String = String;
  module.exports = function (argument) {
    try {
      return $String(argument);
    } catch (error) {
      return "Object";
    }
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/a-callable.js
var require_a_callable = /* @__PURE__ */__commonJSMin((exports, module) => {
  var isCallable = require_is_callable();
  var tryToString = require_try_to_string();
  var $TypeError = TypeError;
  module.exports = function (argument) {
    if (isCallable(argument)) return argument;
    throw new $TypeError(tryToString(argument) + " is not a function");
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/get-method.js
var require_get_method = /* @__PURE__ */__commonJSMin((exports, module) => {
  var aCallable = require_a_callable();
  var isNullOrUndefined = require_is_null_or_undefined();
  module.exports = function (V, P) {
    var func = V[P];
    return isNullOrUndefined(func) ? void 0 : aCallable(func);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/ordinary-to-primitive.js
var require_ordinary_to_primitive = /* @__PURE__ */__commonJSMin((exports, module) => {
  var call = require_function_call();
  var isCallable = require_is_callable();
  var isObject = require_is_object();
  var $TypeError = TypeError;
  module.exports = function (input, pref) {
    var fn, val;
    if (pref === "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
    if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
    if (pref !== "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
    throw new $TypeError("Can't convert object to primitive value");
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-pure.js
var require_is_pure = /* @__PURE__ */__commonJSMin((exports, module) => {
  module.exports = true;
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/define-global-property.js
var require_define_global_property = /* @__PURE__ */__commonJSMin((exports, module) => {
  var globalThis = require_global_this();
  var defineProperty = Object.defineProperty;
  module.exports = function (key, value) {
    try {
      defineProperty(globalThis, key, {
        value,
        configurable: true,
        writable: true
      });
    } catch (error) {
      globalThis[key] = value;
    }
    return value;
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/shared-store.js
var require_shared_store = /* @__PURE__ */__commonJSMin((exports, module) => {
  var IS_PURE = require_is_pure();
  var globalThis = require_global_this();
  var defineGlobalProperty = require_define_global_property();
  var SHARED = "__core-js_shared__";
  var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
  (store.versions || (store.versions = [])).push({
    version: "3.49.0",
    mode: IS_PURE ? "pure" : "global",
    copyright: "© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",
    license: "https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",
    source: "https://github.com/zloirock/core-js"
  });
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/shared.js
var require_shared = /* @__PURE__ */__commonJSMin((exports, module) => {
  var store = require_shared_store();
  module.exports = function (key, value) {
    return store[key] || (store[key] = value || {});
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-object.js
var require_to_object = /* @__PURE__ */__commonJSMin((exports, module) => {
  var requireObjectCoercible = require_require_object_coercible();
  var $Object = Object;
  module.exports = function (argument) {
    return $Object(requireObjectCoercible(argument));
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/has-own-property.js
var require_has_own_property = /* @__PURE__ */__commonJSMin((exports, module) => {
  var uncurryThis = require_function_uncurry_this();
  var toObject = require_to_object();
  var hasOwnProperty = uncurryThis({}.hasOwnProperty);
  module.exports = Object.hasOwn || function hasOwn(it, key) {
    return hasOwnProperty(toObject(it), key);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/uid.js
var require_uid = /* @__PURE__ */__commonJSMin((exports, module) => {
  var uncurryThis = require_function_uncurry_this();
  var id = 0;
  var postfix = Math.random();
  var toString = uncurryThis(1.1.toString);
  module.exports = function (key) {
    return "Symbol(" + (key === void 0 ? "" : key) + ")_" + toString(++id + postfix, 36);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/well-known-symbol.js
var require_well_known_symbol = /* @__PURE__ */__commonJSMin((exports, module) => {
  var globalThis = require_global_this();
  var shared = require_shared();
  var hasOwn = require_has_own_property();
  var uid = require_uid();
  var NATIVE_SYMBOL = require_symbol_constructor_detection();
  var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
  var Symbol = globalThis.Symbol;
  var WellKnownSymbolsStore = shared("wks");
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol["for"] || Symbol : Symbol && Symbol.withoutSetter || uid;
  module.exports = function (name) {
    if (!hasOwn(WellKnownSymbolsStore, name)) WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name) ? Symbol[name] : createWellKnownSymbol("Symbol." + name);
    return WellKnownSymbolsStore[name];
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-primitive.js
var require_to_primitive = /* @__PURE__ */__commonJSMin((exports, module) => {
  var call = require_function_call();
  var isObject = require_is_object();
  var isSymbol = require_is_symbol();
  var getMethod = require_get_method();
  var ordinaryToPrimitive = require_ordinary_to_primitive();
  var wellKnownSymbol = require_well_known_symbol();
  var $TypeError = TypeError;
  var TO_PRIMITIVE = wellKnownSymbol("toPrimitive");
  module.exports = function (input, pref) {
    if (!isObject(input) || isSymbol(input)) return input;
    var exoticToPrim = getMethod(input, TO_PRIMITIVE);
    var result;
    if (exoticToPrim) {
      if (pref === void 0) pref = "default";
      result = call(exoticToPrim, input, pref);
      if (!isObject(result) || isSymbol(result)) return result;
      throw new $TypeError("Can't convert object to primitive value");
    }
    if (pref === void 0) pref = "number";
    return ordinaryToPrimitive(input, pref);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-property-key.js
var require_to_property_key = /* @__PURE__ */__commonJSMin((exports, module) => {
  var toPrimitive = require_to_primitive();
  var isSymbol = require_is_symbol();
  module.exports = function (argument) {
    var key = toPrimitive(argument, "string");
    return isSymbol(key) ? key : key + "";
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/document-create-element.js
var require_document_create_element = /* @__PURE__ */__commonJSMin((exports, module) => {
  var globalThis = require_global_this();
  var isObject = require_is_object();
  var document = globalThis.document;
  var EXISTS = isObject(document) && isObject(document.createElement);
  module.exports = function (it) {
    return EXISTS ? document.createElement(it) : {};
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/ie8-dom-define.js
var require_ie8_dom_define = /* @__PURE__ */__commonJSMin((exports, module) => {
  var DESCRIPTORS = require_descriptors();
  var fails = require_fails();
  var createElement = require_document_create_element();
  module.exports = !DESCRIPTORS && !fails(function () {
    return Object.defineProperty(createElement("div"), "a", {
      get: function () {
        return 7;
      }
    }).a !== 7;
  });
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/object-get-own-property-descriptor.js
var require_object_get_own_property_descriptor = /* @__PURE__ */__commonJSMin(exports => {
  var DESCRIPTORS = require_descriptors();
  var call = require_function_call();
  var propertyIsEnumerableModule = require_object_property_is_enumerable();
  var createPropertyDescriptor = require_create_property_descriptor();
  var toIndexedObject = require_to_indexed_object();
  var toPropertyKey = require_to_property_key();
  var hasOwn = require_has_own_property();
  var IE8_DOM_DEFINE = require_ie8_dom_define();
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
    O = toIndexedObject(O);
    P = toPropertyKey(P);
    if (IE8_DOM_DEFINE) try {
      return $getOwnPropertyDescriptor(O, P);
    } catch (error) {}
    if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-forced.js
var require_is_forced = /* @__PURE__ */__commonJSMin((exports, module) => {
  var fails = require_fails();
  var isCallable = require_is_callable();
  var replacement = /#|\.prototype\./;
  var isForced = function (feature, detection) {
    var value = data[normalize(feature)];
    return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
  };
  var normalize = isForced.normalize = function (string) {
    return String(string).replace(replacement, ".").toLowerCase();
  };
  var data = isForced.data = {};
  var NATIVE = isForced.NATIVE = "N";
  var POLYFILL = isForced.POLYFILL = "P";
  module.exports = isForced;
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/function-bind-context.js
var require_function_bind_context = /* @__PURE__ */__commonJSMin((exports, module) => {
  var uncurryThis = require_function_uncurry_this_clause();
  var aCallable = require_a_callable();
  var NATIVE_BIND = require_function_bind_native();
  var bind = uncurryThis(uncurryThis.bind);
  module.exports = function (fn, that) {
    aCallable(fn);
    return that === void 0 ? fn : NATIVE_BIND ? bind(fn, that) : function () {
      return fn.apply(that, arguments);
    };
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/v8-prototype-define-bug.js
var require_v8_prototype_define_bug = /* @__PURE__ */__commonJSMin((exports, module) => {
  var DESCRIPTORS = require_descriptors();
  var fails = require_fails();
  module.exports = DESCRIPTORS && fails(function () {
    return Object.defineProperty(function () {}, "prototype", {
      value: 42,
      writable: false
    }).prototype !== 42;
  });
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/an-object.js
var require_an_object = /* @__PURE__ */__commonJSMin((exports, module) => {
  var isObject = require_is_object();
  var $String = String;
  var $TypeError = TypeError;
  module.exports = function (argument) {
    if (isObject(argument)) return argument;
    throw new $TypeError($String(argument) + " is not an object");
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/object-define-property.js
var require_object_define_property = /* @__PURE__ */__commonJSMin(exports => {
  var DESCRIPTORS = require_descriptors();
  var IE8_DOM_DEFINE = require_ie8_dom_define();
  var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
  var anObject = require_an_object();
  var toPropertyKey = require_to_property_key();
  var $TypeError = TypeError;
  var $defineProperty = Object.defineProperty;
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  var ENUMERABLE = "enumerable";
  var CONFIGURABLE = "configurable";
  var WRITABLE = "writable";
  exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
    anObject(O);
    P = toPropertyKey(P);
    anObject(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) {
    anObject(O);
    P = toPropertyKey(P);
    anObject(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;
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/create-non-enumerable-property.js
var require_create_non_enumerable_property = /* @__PURE__ */__commonJSMin((exports, module) => {
  var DESCRIPTORS = require_descriptors();
  var definePropertyModule = require_object_define_property();
  var createPropertyDescriptor = require_create_property_descriptor();
  module.exports = DESCRIPTORS ? function (object, key, value) {
    return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  } : function (object, key, value) {
    object[key] = value;
    return object;
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/export.js
var require_export = /* @__PURE__ */__commonJSMin((exports, module) => {
  var globalThis = require_global_this();
  var apply = require_function_apply();
  var uncurryThis = require_function_uncurry_this_clause();
  var isCallable = require_is_callable();
  var getOwnPropertyDescriptor = require_object_get_own_property_descriptor().f;
  var isForced = require_is_forced();
  var path = require_path();
  var bind = require_function_bind_context();
  var createNonEnumerableProperty = require_create_non_enumerable_property();
  var hasOwn = require_has_own_property();
  require_shared_store();
  var wrapConstructor = function (NativeConstructor) {
    var Wrapper = function (a, b, c) {
      if (this instanceof Wrapper) {
        switch (arguments.length) {
          case 0:
            return new NativeConstructor();
          case 1:
            return new NativeConstructor(a);
          case 2:
            return new NativeConstructor(a, b);
        }
        return new NativeConstructor(a, b, c);
      }
      return apply(NativeConstructor, this, arguments);
    };
    Wrapper.prototype = NativeConstructor.prototype;
    return Wrapper;
  };
  module.exports = function (options, source) {
    var TARGET = options.target;
    var GLOBAL = options.global;
    var STATIC = options.stat;
    var PROTO = options.proto;
    var nativeSource = GLOBAL ? globalThis : STATIC ? globalThis[TARGET] : globalThis[TARGET] && globalThis[TARGET].prototype;
    var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];
    var targetPrototype = target.prototype;
    var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;
    var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;
    for (key in source) {
      FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced);
      USE_NATIVE = !FORCED && nativeSource && hasOwn(nativeSource, key);
      targetProperty = target[key];
      if (USE_NATIVE) if (options.dontCallGetSet) {
        descriptor = getOwnPropertyDescriptor(nativeSource, key);
        nativeProperty = descriptor && descriptor.value;
      } else nativeProperty = nativeSource[key];
      sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key];
      if (!FORCED && !PROTO && typeof targetProperty == typeof sourceProperty) continue;
      if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, globalThis);else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);else if (PROTO && isCallable(sourceProperty)) resultProperty = uncurryThis(sourceProperty);else resultProperty = sourceProperty;
      if (options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) createNonEnumerableProperty(resultProperty, "sham", true);
      createNonEnumerableProperty(target, key, resultProperty);
      if (PROTO) {
        VIRTUAL_PROTOTYPE = TARGET + "Prototype";
        if (!hasOwn(path, VIRTUAL_PROTOTYPE)) createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});
        createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);
        if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) createNonEnumerableProperty(targetPrototype, key, sourceProperty);
      }
    }
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/math-trunc.js
var require_math_trunc = /* @__PURE__ */__commonJSMin((exports, module) => {
  var ceil = Math.ceil;
  var floor = Math.floor;
  module.exports = Math.trunc || function trunc(x) {
    var n = +x;
    return (n > 0 ? floor : ceil)(n);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-integer-or-infinity.js
var require_to_integer_or_infinity = /* @__PURE__ */__commonJSMin((exports, module) => {
  var trunc = require_math_trunc();
  module.exports = function (argument) {
    var number = +argument;
    return number !== number || number === 0 ? 0 : trunc(number);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-absolute-index.js
var require_to_absolute_index = /* @__PURE__ */__commonJSMin((exports, module) => {
  var toIntegerOrInfinity = require_to_integer_or_infinity();
  var max = Math.max;
  var min = Math.min;
  module.exports = function (index, length) {
    var integer = toIntegerOrInfinity(index);
    return integer < 0 ? max(integer + length, 0) : min(integer, length);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-length.js
var require_to_length = /* @__PURE__ */__commonJSMin((exports, module) => {
  var toIntegerOrInfinity = require_to_integer_or_infinity();
  var min = Math.min;
  module.exports = function (argument) {
    var len = toIntegerOrInfinity(argument);
    return len > 0 ? min(len, 9007199254740991) : 0;
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/length-of-array-like.js
var require_length_of_array_like = /* @__PURE__ */__commonJSMin((exports, module) => {
  var toLength = require_to_length();
  module.exports = function (obj) {
    return toLength(obj.length);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/array-includes.js
var require_array_includes = /* @__PURE__ */__commonJSMin((exports, module) => {
  var toIndexedObject = require_to_indexed_object();
  var toAbsoluteIndex = require_to_absolute_index();
  var lengthOfArrayLike = require_length_of_array_like();
  var createMethod = function (IS_INCLUDES) {
    return function ($this, el, fromIndex) {
      var O = toIndexedObject($this);
      var length = lengthOfArrayLike(O);
      if (length === 0) return !IS_INCLUDES && -1;
      var index = toAbsoluteIndex(fromIndex, length);
      var value;
      if (IS_INCLUDES && el !== el) while (length > index) {
        value = O[index++];
        if (value !== value) return true;
      } else for (; length > index; index++) if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
      return !IS_INCLUDES && -1;
    };
  };
  module.exports = {
    includes: createMethod(true),
    indexOf: createMethod(false)
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/add-to-unscopables.js
var require_add_to_unscopables = /* @__PURE__ */__commonJSMin((exports, module) => {
  module.exports = function () {};
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/modules/es.array.includes.js
var require_es_array_includes = /* @__PURE__ */__commonJSMin(() => {
  var $ = require_export();
  var $includes = require_array_includes().includes;
  var fails = require_fails();
  var addToUnscopables = require_add_to_unscopables();
  var BROKEN_ON_SPARSE = fails(function () {
    return !Array(1).includes();
  });
  var BROKEN_ON_SPARSE_WITH_FROM_INDEX = fails(function () {
    return [, 1].includes(void 0, 1);
  });
  $({
    target: "Array",
    proto: true,
    forced: BROKEN_ON_SPARSE || BROKEN_ON_SPARSE_WITH_FROM_INDEX
  }, {
    includes: function includes(el) {
      return $includes(this, el, arguments.length > 1 ? arguments[1] : void 0);
    }
  });
  addToUnscopables("includes");
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/get-built-in-prototype-method.js
var require_get_built_in_prototype_method = /* @__PURE__ */__commonJSMin((exports, module) => {
  var globalThis = require_global_this();
  var path = require_path();
  module.exports = function (CONSTRUCTOR, METHOD) {
    var Namespace = path[CONSTRUCTOR + "Prototype"];
    var pureMethod = Namespace && Namespace[METHOD];
    if (pureMethod) return pureMethod;
    var NativeConstructor = globalThis[CONSTRUCTOR];
    var NativePrototype = NativeConstructor && NativeConstructor.prototype;
    return NativePrototype && NativePrototype[METHOD];
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/es/array/virtual/includes.js
var require_includes$3 = /* @__PURE__ */__commonJSMin((exports, module) => {
  require_es_array_includes();
  var getBuiltInPrototypeMethod = require_get_built_in_prototype_method();
  module.exports = getBuiltInPrototypeMethod("Array", "includes");
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/is-regexp.js
var require_is_regexp = /* @__PURE__ */__commonJSMin((exports, module) => {
  var isObject = require_is_object();
  var classof = require_classof_raw();
  var MATCH = require_well_known_symbol()("match");
  module.exports = function (it) {
    var isRegExp;
    return isObject(it) && ((isRegExp = it[MATCH]) !== void 0 ? !!isRegExp : classof(it) === "RegExp");
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/not-a-regexp.js
var require_not_a_regexp = /* @__PURE__ */__commonJSMin((exports, module) => {
  var isRegExp = require_is_regexp();
  var $TypeError = TypeError;
  module.exports = function (it) {
    if (isRegExp(it)) throw new $TypeError("The method doesn't accept regular expressions");
    return it;
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-string-tag-support.js
var require_to_string_tag_support = /* @__PURE__ */__commonJSMin((exports, module) => {
  var TO_STRING_TAG = require_well_known_symbol()("toStringTag");
  var test = {};
  test[TO_STRING_TAG] = "z";
  module.exports = String(test) === "[object z]";
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/classof.js
var require_classof = /* @__PURE__ */__commonJSMin((exports, module) => {
  var TO_STRING_TAG_SUPPORT = require_to_string_tag_support();
  var isCallable = require_is_callable();
  var classofRaw = require_classof_raw();
  var TO_STRING_TAG = require_well_known_symbol()("toStringTag");
  var $Object = Object;
  var CORRECT_ARGUMENTS = classofRaw(function () {
    return arguments;
  }()) === "Arguments";
  var tryGet = function (it, key) {
    try {
      return it[key];
    } catch (error) {}
  };
  module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
    var O, tag, result;
    return it === void 0 ? "Undefined" : it === null ? "Null" : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == "string" ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) === "Object" && isCallable(O.callee) ? "Arguments" : result;
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/to-string.js
var require_to_string = /* @__PURE__ */__commonJSMin((exports, module) => {
  var classof = require_classof();
  var $String = String;
  module.exports = function (argument) {
    if (classof(argument) === "Symbol") throw new TypeError("Cannot convert a Symbol value to a string");
    return $String(argument);
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/internals/correct-is-regexp-logic.js
var require_correct_is_regexp_logic = /* @__PURE__ */__commonJSMin((exports, module) => {
  var MATCH = require_well_known_symbol()("match");
  module.exports = function (METHOD_NAME) {
    var regexp = /./;
    try {
      "/./"[METHOD_NAME](regexp);
    } catch (error1) {
      try {
        regexp[MATCH] = false;
        return "/./"[METHOD_NAME](regexp);
      } catch (error2) {}
    }
    return false;
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/modules/es.string.includes.js
var require_es_string_includes = /* @__PURE__ */__commonJSMin(() => {
  var $ = require_export();
  var uncurryThis = require_function_uncurry_this();
  var notARegExp = require_not_a_regexp();
  var requireObjectCoercible = require_require_object_coercible();
  var toString = require_to_string();
  var correctIsRegExpLogic = require_correct_is_regexp_logic();
  var stringIndexOf = uncurryThis("".indexOf);
  $({
    target: "String",
    proto: true,
    forced: !correctIsRegExpLogic("includes")
  }, {
    includes: function includes(searchString) {
      return !!~stringIndexOf(toString(requireObjectCoercible(this)), toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : void 0);
    }
  });
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/es/string/virtual/includes.js
var require_includes$2 = /* @__PURE__ */__commonJSMin((exports, module) => {
  require_es_string_includes();
  var getBuiltInPrototypeMethod = require_get_built_in_prototype_method();
  module.exports = getBuiltInPrototypeMethod("String", "includes");
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/es/instance/includes.js
var require_includes$1 = /* @__PURE__ */__commonJSMin((exports, module) => {
  var isPrototypeOf = require_object_is_prototype_of();
  var arrayMethod = require_includes$3();
  var stringMethod = require_includes$2();
  var ArrayPrototype = Array.prototype;
  var StringPrototype = String.prototype;
  module.exports = function (it) {
    var own = it.includes;
    if (it === ArrayPrototype || isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.includes) return arrayMethod;
    if (typeof it == "string" || it === StringPrototype || isPrototypeOf(StringPrototype, it) && own === StringPrototype.includes) return stringMethod;
    return own;
  };
});

//#endregion
//#region node_modules/.pnpm/core-js-pure@3.49.0/node_modules/core-js-pure/stable/instance/includes.js
var require_includes = /* @__PURE__ */__commonJSMin((exports, module) => {
  var parent = require_includes$1();
  module.exports = parent;
});

//#endregion
//#region src/utils/utils.js
var utils_exports = /* @__PURE__ */__exportAll({
  capitalize: () => capitalize,
  degrees: () => degrees,
  filter: () => filter,
  getOrigin: () => getOrigin,
  isDescriptive: () => isDescriptive,
  map: () => map,
  proportionalSize: () => proportionalSize,
  radians: () => radians,
  unCamelCase: () => unCamelCase,
  writeDataToDom: () => writeDataToDom
});
var import_includes = /* @__PURE__ */__toESM(require_includes());
function map(array, block) {
  let i;
  const il = array.length;
  const result = [];
  for (i = 0; i < il; i++) result.push(block(array[i]));
  return result;
}
function filter(array, block) {
  let i;
  const il = array.length;
  const result = [];
  for (i = 0; i < il; i++) if (block(array[i])) result.push(array[i]);
  return result;
}
function radians(d) {
  return d % 360 * Math.PI / 180;
}
function degrees(r) {
  return r * 180 / Math.PI % 360;
}
function unCamelCase(s) {
  return s.replace(/([A-Z])/g, function (m, g) {
    return "-" + g.toLowerCase();
  });
}
function capitalize(s) {
  return s.charAt(0).toUpperCase() + s.slice(1);
}
function proportionalSize(element, width, height, box) {
  if (width == null || height == null) {
    box = box || element.bbox();
    if (width == null) width = box.width / box.height * height;else if (height == null) height = box.height / box.width * width;
  }
  return {
    width,
    height
  };
}
/**
* This function adds support for string origins.
* It searches for an origin in o.origin o.ox and o.originX.
* This way, origin: {x: 'center', y: 50} can be passed as well as ox: 'center', oy: 50
**/
function getOrigin(o, element) {
  const origin = o.origin;
  let ox = o.ox != null ? o.ox : o.originX != null ? o.originX : "center";
  let oy = o.oy != null ? o.oy : o.originY != null ? o.originY : "center";
  if (origin != null) [ox, oy] = Array.isArray(origin) ? origin : typeof origin === "object" ? [origin.x, origin.y] : [origin, origin];
  const condX = typeof ox === "string";
  const condY = typeof oy === "string";
  if (condX || condY) {
    const {
      height,
      width,
      x,
      y
    } = element.bbox();
    if (condX) ox = (0, import_includes.default)(ox).call(ox, "left") ? x : (0, import_includes.default)(ox).call(ox, "right") ? x + width : x + width / 2;
    if (condY) oy = (0, import_includes.default)(oy).call(oy, "top") ? y : (0, import_includes.default)(oy).call(oy, "bottom") ? y + height : y + height / 2;
  }
  return [ox, oy];
}
const descriptiveElements = /* @__PURE__ */new Set(["desc", "metadata", "title"]);
const isDescriptive = element => descriptiveElements.has(element.nodeName);
const writeDataToDom = (element, data, defaults = {}) => {
  const cloned = {
    ...data
  };
  for (const key in cloned) if (cloned[key].valueOf() === defaults[key]) delete cloned[key];
  if (Object.keys(cloned).length) element.node.setAttribute("data-svgjs", JSON.stringify(cloned));else {
    element.node.removeAttribute("data-svgjs");
    element.node.removeAttribute("svgjs:data");
  }
};

//#endregion
//#region src/modules/core/namespaces.js
var namespaces_exports = /* @__PURE__ */__exportAll({
  html: () => html,
  svg: () => svg,
  xlink: () => xlink,
  xmlns: () => xmlns
});
const svg = "http://www.w3.org/2000/svg";
const html = "http://www.w3.org/1999/xhtml";
const xmlns = "http://www.w3.org/2000/xmlns/";
const xlink = "http://www.w3.org/1999/xlink";

//#endregion
//#region src/utils/window.js
const globals = {
  window: typeof window === "undefined" ? null : window,
  document: typeof document === "undefined" ? null : document
};
function registerWindow(win = null, doc = null) {
  globals.window = win;
  globals.document = doc;
}
function withWindow(win, fn) {
  const oldWindow = globals.window;
  const oldDocument = globals.document;
  registerWindow(win, win.document);
  try {
    return fn(win, win.document);
  } finally {
    registerWindow(oldWindow, oldDocument);
  }
}
function getWindow() {
  return globals.window;
}

//#endregion
//#region src/types/Base.js
var Base = class {};

//#endregion
//#region src/utils/adopter.js
const elements = {};
const root = "___SYMBOL___ROOT___";
function create(name, ns = svg) {
  return globals.document.createElementNS(ns, name);
}
function makeInstance(element, isHTML = false) {
  if (element instanceof Base) return element;
  if (typeof element === "object") return adopter(element);
  if (element == null) return new elements[root]();
  if (typeof element === "string" && element.trim().charAt(0) !== "<") return adopter(globals.document.querySelector(element));
  const wrapper = isHTML ? globals.document.createElement("div") : create("svg");
  wrapper.innerHTML = element.trim();
  element = adopter(wrapper.firstElementChild);
  wrapper.removeChild(wrapper.firstElementChild);
  return element;
}
function nodeOrNew(name, node) {
  return node && (node instanceof globals.window.Node || node.ownerDocument && node instanceof node.ownerDocument.defaultView.Node) ? node : create(name);
}
function adopt(node) {
  if (!node) return null;
  if (node.instance instanceof Base) return node.instance;
  if (node.nodeName === "#document-fragment") return new elements.Fragment(node);
  let className = capitalize(node.nodeName || "Dom");
  if (className === "LinearGradient" || className === "RadialGradient") className = "Gradient";else if (!elements[className]) className = "Dom";
  return new elements[className](node);
}
let adopter = adopt;
function mockAdopt(mock = adopt) {
  adopter = mock;
}
function register(element, name = element.name, asRoot = false) {
  elements[name] = element;
  if (asRoot) elements[root] = element;
  addMethodNames(Object.getOwnPropertyNames(element.prototype));
  return element;
}
function getClass(name) {
  return elements[name];
}
let did = 1e3;
function eid(name) {
  return "Svgjs" + capitalize(name) + did++;
}
function assignNewId(node) {
  for (let i = node.children.length - 1; i >= 0; i--) assignNewId(node.children[i]);
  if (node.id) {
    node.id = eid(node.nodeName);
    return node;
  }
  return node;
}
function extend(modules, methods) {
  let key, i;
  modules = Array.isArray(modules) ? modules : [modules];
  for (i = modules.length - 1; i >= 0; i--) for (key in methods) modules[i].prototype[key] = methods[key];
}
function wrapWithAttrCheck(fn) {
  return function (...args) {
    const o = args[args.length - 1];
    if (o && o.constructor === Object && !(o instanceof Array)) return fn.apply(this, args.slice(0, -1)).attr(o);else return fn.apply(this, args);
  };
}

//#endregion
//#region src/modules/optional/arrange.js
function siblings() {
  return this.parent().children();
}
function position() {
  return this.parent().index(this);
}
function next() {
  return this.siblings()[this.position() + 1];
}
function prev() {
  return this.siblings()[this.position() - 1];
}
function forward() {
  const i = this.position();
  this.parent().add(this.remove(), i + 1);
  return this;
}
function backward() {
  const i = this.position();
  this.parent().add(this.remove(), i ? i - 1 : 0);
  return this;
}
function front() {
  this.parent().add(this.remove());
  return this;
}
function back() {
  this.parent().add(this.remove(), 0);
  return this;
}
function before(element) {
  element = makeInstance(element);
  element.remove();
  const i = this.position();
  this.parent().add(element, i);
  return this;
}
function after(element) {
  element = makeInstance(element);
  element.remove();
  const i = this.position();
  this.parent().add(element, i + 1);
  return this;
}
function insertBefore(element) {
  element = makeInstance(element);
  element.before(this);
  return this;
}
function insertAfter(element) {
  element = makeInstance(element);
  element.after(this);
  return this;
}
registerMethods("Dom", {
  siblings,
  position,
  next,
  prev,
  forward,
  backward,
  front,
  back,
  before,
  after,
  insertBefore,
  insertAfter
});

//#endregion
//#region src/modules/core/regex.js
var regex_exports = /* @__PURE__ */__exportAll({
  delimiter: () => delimiter,
  hex: () => hex,
  isBlank: () => isBlank,
  isHex: () => isHex,
  isImage: () => isImage,
  isNumber: () => isNumber,
  isPathLetter: () => isPathLetter,
  isRgb: () => isRgb,
  numberAndUnit: () => numberAndUnit,
  reference: () => reference,
  rgb: () => rgb,
  transforms: () => transforms,
  whitespace: () => whitespace
});
const numberAndUnit = /^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i;
const hex = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;
const rgb = /rgb\((\d+),(\d+),(\d+)\)/;
const reference = /^(#[^\s]+)$/;
const transforms = /\)\s*,?\s*/;
const whitespace = /\s/g;
const isHex = /^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i;
const isRgb = /^rgb\(/;
const isBlank = /^(\s+)?$/;
const isNumber = /^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
const isImage = /\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i;
const delimiter = /[\s,]+/;
const isPathLetter = /[MLHVCSQTAZ]/i;

//#endregion
//#region src/modules/optional/class.js
function classes() {
  const attr = this.attr("class");
  return attr == null ? [] : attr.trim().split(delimiter);
}
function hasClass(name) {
  return this.classes().indexOf(name) !== -1;
}
function addClass(name) {
  if (!this.hasClass(name)) {
    const array = this.classes();
    array.push(name);
    this.attr("class", array.join(" "));
  }
  return this;
}
function removeClass(name) {
  if (this.hasClass(name)) this.attr("class", this.classes().filter(function (c) {
    return c !== name;
  }).join(" "));
  return this;
}
function toggleClass(name) {
  return this.hasClass(name) ? this.removeClass(name) : this.addClass(name);
}
registerMethods("Dom", {
  classes,
  hasClass,
  addClass,
  removeClass,
  toggleClass
});

//#endregion
//#region src/modules/optional/css.js
const cssName = name => name.startsWith("--") ? name : unCamelCase(name);
function css(style, val) {
  const ret = {};
  if (arguments.length === 0) {
    const declaration = this.node.style;
    for (let i = 0; i < declaration.length; i++) {
      const name = declaration.item(i);
      const value = declaration.getPropertyValue(name);
      const priority = declaration.getPropertyPriority(name);
      ret[name] = priority ? `${value} !${priority}` : value;
    }
    return ret;
  }
  if (arguments.length < 2) {
    if (Array.isArray(style)) {
      for (const name of style) {
        const cased = cssName(name);
        ret[name] = this.node.style.getPropertyValue(cased);
      }
      return ret;
    }
    if (typeof style === "string") return this.node.style.getPropertyValue(cssName(style));
    if (typeof style === "object") for (const name in style) this.node.style.setProperty(cssName(name), style[name] == null || isBlank.test(style[name]) ? "" : style[name]);
  }
  if (arguments.length === 2) this.node.style.setProperty(cssName(style), val == null || isBlank.test(val) ? "" : val);
  return this;
}
function show() {
  return this.css("display", "");
}
function hide() {
  return this.css("display", "none");
}
function visible() {
  return this.css("display") !== "none";
}
registerMethods("Dom", {
  css,
  show,
  hide,
  visible
});

//#endregion
//#region src/modules/optional/data.js
function data(a, v, r) {
  if (a == null) return this.data(map(filter(this.node.attributes, el => el.nodeName.indexOf("data-") === 0), el => el.nodeName.slice(5)));else if (a instanceof Array) {
    const data = {};
    for (const key of a) data[key] = this.data(key);
    return data;
  } else if (typeof a === "object") for (v in a) this.data(v, a[v]);else if (arguments.length < 2) try {
    return JSON.parse(this.attr("data-" + a));
  } catch (e) {
    return this.attr("data-" + a);
  } else this.attr("data-" + a, v === null ? null : r === true || typeof v === "string" || typeof v === "number" ? v : JSON.stringify(v));
  return this;
}
registerMethods("Dom", {
  data
});

//#endregion
//#region src/modules/optional/memory.js
function remember(k, v) {
  if (typeof arguments[0] === "object") for (const key in k) this.remember(key, k[key]);else if (arguments.length === 1) return this.memory()[k];else this.memory()[k] = v;
  return this;
}
function forget() {
  if (arguments.length === 0) this._memory = {};else for (let i = arguments.length - 1; i >= 0; i--) delete this.memory()[arguments[i]];
  return this;
}
function memory() {
  return this._memory = this._memory || {};
}
registerMethods("Dom", {
  remember,
  forget,
  memory
});

//#endregion
//#region src/types/Color.js
function sixDigitHex(hex) {
  return hex.length === 4 ? ["#", hex.substring(1, 2), hex.substring(1, 2), hex.substring(2, 3), hex.substring(2, 3), hex.substring(3, 4), hex.substring(3, 4)].join("") : hex;
}
function componentHex(component) {
  const hex = Math.max(0, Math.min(255, Math.round(component))).toString(16);
  return hex.length === 1 ? "0" + hex : hex;
}
function is(object, space) {
  for (let i = space.length; i--;) if (object[space[i]] == null) return false;
  return true;
}
function getParameters(a, b) {
  const params = is(a, "rgb") ? {
    _a: a.r,
    _b: a.g,
    _c: a.b,
    _d: 0,
    space: "rgb"
  } : is(a, "xyz") ? {
    _a: a.x,
    _b: a.y,
    _c: a.z,
    _d: 0,
    space: "xyz"
  } : is(a, "hsl") ? {
    _a: a.h,
    _b: a.s,
    _c: a.l,
    _d: 0,
    space: "hsl"
  } : is(a, "lab") ? {
    _a: a.l,
    _b: a.a,
    _c: a.b,
    _d: 0,
    space: "lab"
  } : is(a, "lch") ? {
    _a: a.l,
    _b: a.c,
    _c: a.h,
    _d: 0,
    space: "lch"
  } : is(a, "cmyk") ? {
    _a: a.c,
    _b: a.m,
    _c: a.y,
    _d: a.k,
    space: "cmyk"
  } : {
    _a: 0,
    _b: 0,
    _c: 0,
    space: "rgb"
  };
  params.space = b || params.space;
  return params;
}
function cieSpace(space) {
  if (space === "lab" || space === "xyz" || space === "lch") return true;else return false;
}
function hueToRgb(p, q, t) {
  if (t < 0) t += 1;
  if (t > 1) t -= 1;
  if (t < 1 / 6) return p + (q - p) * 6 * t;
  if (t < 1 / 2) return q;
  if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
  return p;
}
var Color = class Color {
  constructor(...inputs) {
    this.init(...inputs);
  }
  static isColor(color) {
    return color && (color instanceof Color || this.isRgb(color) || this.test(color));
  }
  static isRgb(color) {
    return color && typeof color.r === "number" && typeof color.g === "number" && typeof color.b === "number";
  }
  static random(mode = "vibrant", t) {
    const {
      random,
      round,
      sin,
      PI: pi
    } = Math;
    if (mode === "vibrant") {
      const l = 24 * random() + 57;
      const c = 38 * random() + 45;
      const h = 360 * random();
      return new Color(l, c, h, "lch");
    } else if (mode === "sine") {
      t = t == null ? random() : t;
      const r = round(80 * sin(2 * pi * t / .5 + .01) + 150);
      const g = round(50 * sin(2 * pi * t / .5 + 4.6) + 200);
      const b = round(100 * sin(2 * pi * t / .5 + 2.3) + 150);
      return new Color(r, g, b);
    } else if (mode === "pastel") {
      const l = 8 * random() + 86;
      const c = 17 * random() + 9;
      const h = 360 * random();
      return new Color(l, c, h, "lch");
    } else if (mode === "dark") {
      const l = 10 + 10 * random();
      const c = 50 * random() + 86;
      const h = 360 * random();
      return new Color(l, c, h, "lch");
    } else if (mode === "rgb") {
      const r = 255 * random();
      const g = 255 * random();
      const b = 255 * random();
      return new Color(r, g, b);
    } else if (mode === "lab") {
      const l = 100 * random();
      const a = 256 * random() - 128;
      const b = 256 * random() - 128;
      return new Color(l, a, b, "lab");
    } else if (mode === "grey") {
      const grey = 255 * random();
      return new Color(grey, grey, grey);
    } else throw new Error("Unsupported random color mode");
  }
  static test(color) {
    return typeof color === "string" && (isHex.test(color) || isRgb.test(color));
  }
  cmyk() {
    const {
      _a,
      _b,
      _c
    } = this.rgb();
    const [r, g, b] = [_a, _b, _c].map(v => v / 255);
    const k = Math.min(1 - r, 1 - g, 1 - b);
    if (k === 1) return new Color(0, 0, 0, 1, "cmyk");
    const c = (1 - r - k) / (1 - k);
    const m = (1 - g - k) / (1 - k);
    const y = (1 - b - k) / (1 - k);
    return new Color(c, m, y, k, "cmyk");
  }
  hsl() {
    const {
      _a,
      _b,
      _c
    } = this.rgb();
    const [r, g, b] = [_a, _b, _c].map(v => v / 255);
    const max = Math.max(r, g, b);
    const min = Math.min(r, g, b);
    const l = (max + min) / 2;
    const isGrey = max === min;
    const delta = max - min;
    const s = isGrey ? 0 : l > .5 ? delta / (2 - max - min) : delta / (max + min);
    const h = isGrey ? 0 : max === r ? ((g - b) / delta + (g < b ? 6 : 0)) / 6 : max === g ? ((b - r) / delta + 2) / 6 : max === b ? ((r - g) / delta + 4) / 6 : 0;
    return new Color(360 * h, 100 * s, 100 * l, "hsl");
  }
  init(a = 0, b = 0, c = 0, d = 0, space = "rgb") {
    a = !a ? 0 : a;
    if (this.space) for (const component in this.space) delete this[this.space[component]];
    if (typeof a === "number") {
      space = typeof d === "string" ? d : space;
      d = typeof d === "string" ? 0 : d;
      Object.assign(this, {
        _a: a,
        _b: b,
        _c: c,
        _d: d,
        space
      });
    } else if (a instanceof Array) {
      this.space = b || (typeof a[3] === "string" ? a[3] : a[4]) || "rgb";
      Object.assign(this, {
        _a: a[0],
        _b: a[1],
        _c: a[2],
        _d: a[3] || 0
      });
    } else if (a instanceof Object) {
      const values = getParameters(a, b);
      Object.assign(this, values);
    } else if (typeof a === "string") if (isRgb.test(a)) {
      const noWhitespace = a.replace(whitespace, "");
      const [_a, _b, _c] = rgb.exec(noWhitespace).slice(1, 4).map(v => parseInt(v));
      Object.assign(this, {
        _a,
        _b,
        _c,
        _d: 0,
        space: "rgb"
      });
    } else if (isHex.test(a)) {
      const hexParse = v => parseInt(v, 16);
      const [, _a, _b, _c] = hex.exec(sixDigitHex(a)).map(hexParse);
      Object.assign(this, {
        _a,
        _b,
        _c,
        _d: 0,
        space: "rgb"
      });
    } else throw Error("Unsupported string format, can't construct Color");
    const {
      _a,
      _b,
      _c,
      _d
    } = this;
    const components = this.space === "rgb" ? {
      r: _a,
      g: _b,
      b: _c
    } : this.space === "xyz" ? {
      x: _a,
      y: _b,
      z: _c
    } : this.space === "hsl" ? {
      h: _a,
      s: _b,
      l: _c
    } : this.space === "lab" ? {
      l: _a,
      a: _b,
      b: _c
    } : this.space === "lch" ? {
      l: _a,
      c: _b,
      h: _c
    } : this.space === "cmyk" ? {
      c: _a,
      m: _b,
      y: _c,
      k: _d
    } : {};
    Object.assign(this, components);
  }
  lab() {
    const {
      x,
      y,
      z
    } = this.xyz();
    const l = 116 * y - 16;
    const a = 500 * (x - y);
    const b = 200 * (y - z);
    return new Color(l, a, b, "lab");
  }
  lch() {
    const {
      l,
      a,
      b
    } = this.lab();
    const c = Math.sqrt(a ** 2 + b ** 2);
    let h = 180 * Math.atan2(b, a) / Math.PI;
    if (h < 0) {
      h *= -1;
      h = 360 - h;
    }
    return new Color(l, c, h, "lch");
  }
  rgb() {
    if (this.space === "rgb") return this;else if (cieSpace(this.space)) {
      let {
        x,
        y,
        z
      } = this;
      if (this.space === "lab" || this.space === "lch") {
        let {
          l,
          a,
          b
        } = this;
        if (this.space === "lch") {
          const {
            c,
            h
          } = this;
          const dToR = Math.PI / 180;
          a = c * Math.cos(dToR * h);
          b = c * Math.sin(dToR * h);
        }
        const yL = (l + 16) / 116;
        const xL = a / 500 + yL;
        const zL = yL - b / 200;
        const ct = 16 / 116;
        const mx = .008856;
        const nm = 7.787;
        x = .95047 * (xL ** 3 > mx ? xL ** 3 : (xL - ct) / nm);
        y = 1 * (yL ** 3 > mx ? yL ** 3 : (yL - ct) / nm);
        z = 1.08883 * (zL ** 3 > mx ? zL ** 3 : (zL - ct) / nm);
      }
      const rU = x * 3.2406 + y * -1.5372 + z * -0.4986;
      const gU = x * -0.9689 + y * 1.8758 + z * .0415;
      const bU = x * .0557 + y * -0.204 + z * 1.057;
      const pow = Math.pow;
      const bd = .0031308;
      const r = rU > bd ? 1.055 * pow(rU, 1 / 2.4) - .055 : 12.92 * rU;
      const g = gU > bd ? 1.055 * pow(gU, 1 / 2.4) - .055 : 12.92 * gU;
      const b = bU > bd ? 1.055 * pow(bU, 1 / 2.4) - .055 : 12.92 * bU;
      return new Color(255 * r, 255 * g, 255 * b);
    } else if (this.space === "hsl") {
      let {
        h,
        s,
        l
      } = this;
      h /= 360;
      s /= 100;
      l /= 100;
      if (s === 0) {
        l *= 255;
        return new Color(l, l, l);
      }
      const q = l < .5 ? l * (1 + s) : l + s - l * s;
      const p = 2 * l - q;
      const r = 255 * hueToRgb(p, q, h + 1 / 3);
      const g = 255 * hueToRgb(p, q, h);
      const b = 255 * hueToRgb(p, q, h - 1 / 3);
      return new Color(r, g, b);
    } else if (this.space === "cmyk") {
      const {
        c,
        m,
        y,
        k
      } = this;
      const r = 255 * (1 - Math.min(1, c * (1 - k) + k));
      const g = 255 * (1 - Math.min(1, m * (1 - k) + k));
      const b = 255 * (1 - Math.min(1, y * (1 - k) + k));
      return new Color(r, g, b);
    } else return this;
  }
  toArray() {
    const {
      _a,
      _b,
      _c,
      _d,
      space
    } = this;
    return [_a, _b, _c, _d, space];
  }
  toHex() {
    const [r, g, b] = this._clamped().map(componentHex);
    return `#${r}${g}${b}`;
  }
  toRgb() {
    const [rV, gV, bV] = this._clamped();
    return `rgb(${rV},${gV},${bV})`;
  }
  toString() {
    return this.toHex();
  }
  xyz() {
    const {
      _a: r255,
      _b: g255,
      _c: b255
    } = this.rgb();
    const [r, g, b] = [r255, g255, b255].map(v => v / 255);
    const rL = r > .04045 ? Math.pow((r + .055) / 1.055, 2.4) : r / 12.92;
    const gL = g > .04045 ? Math.pow((g + .055) / 1.055, 2.4) : g / 12.92;
    const bL = b > .04045 ? Math.pow((b + .055) / 1.055, 2.4) : b / 12.92;
    const xU = (rL * .4124 + gL * .3576 + bL * .1805) / .95047;
    const yU = (rL * .2126 + gL * .7152 + bL * .0722) / 1;
    const zU = (rL * .0193 + gL * .1192 + bL * .9505) / 1.08883;
    const x = xU > .008856 ? Math.pow(xU, 1 / 3) : 7.787 * xU + 16 / 116;
    const y = yU > .008856 ? Math.pow(yU, 1 / 3) : 7.787 * yU + 16 / 116;
    const z = zU > .008856 ? Math.pow(zU, 1 / 3) : 7.787 * zU + 16 / 116;
    return new Color(x, y, z, "xyz");
  }
  _clamped() {
    const {
      _a,
      _b,
      _c
    } = this.rgb();
    const {
      max,
      min,
      round
    } = Math;
    const format = v => max(0, min(round(v), 255));
    return [_a, _b, _c].map(format);
  }
};

//#endregion
//#region src/types/Point.js
var Point = class Point {
  constructor(...args) {
    this.init(...args);
  }
  clone() {
    return new Point(this);
  }
  init(x, y) {
    const base = {
      x: 0,
      y: 0
    };
    const source = Array.isArray(x) ? {
      x: x[0],
      y: x[1]
    } : typeof x === "object" ? {
      x: x.x,
      y: x.y
    } : {
      x,
      y
    };
    this.x = source.x == null ? base.x : source.x;
    this.y = source.y == null ? base.y : source.y;
    return this;
  }
  toArray() {
    return [this.x, this.y];
  }
  transform(m) {
    return this.clone().transformO(m);
  }
  transformO(m) {
    if (!Matrix.isMatrixLike(m)) m = new Matrix(m);
    const {
      x,
      y
    } = this;
    this.x = m.a * x + m.c * y + m.e;
    this.y = m.b * x + m.d * y + m.f;
    return this;
  }
};
function point(x, y) {
  return new Point(x, y).transformO(this.screenCTM().inverseO());
}

//#endregion
//#region src/types/Matrix.js
function closeEnough(a, b, threshold) {
  return Math.abs(b - a) < (1e-6);
}
var Matrix = class Matrix {
  constructor(...args) {
    this.init(...args);
  }
  static formatTransforms(o) {
    const flipBoth = o.flip === "both" || o.flip === true;
    const flipX = o.flip && (flipBoth || o.flip === "x") ? -1 : 1;
    const flipY = o.flip && (flipBoth || o.flip === "y") ? -1 : 1;
    const skewX = o.skew && o.skew.length ? o.skew[0] : isFinite(o.skew) ? o.skew : isFinite(o.skewX) ? o.skewX : 0;
    const skewY = o.skew && o.skew.length ? o.skew[1] : isFinite(o.skew) ? o.skew : isFinite(o.skewY) ? o.skewY : 0;
    const scaleX = o.scale && o.scale.length ? o.scale[0] * flipX : isFinite(o.scale) ? o.scale * flipX : isFinite(o.scaleX) ? o.scaleX * flipX : flipX;
    const scaleY = o.scale && o.scale.length ? o.scale[1] * flipY : isFinite(o.scale) ? o.scale * flipY : isFinite(o.scaleY) ? o.scaleY * flipY : flipY;
    const shear = o.shear || 0;
    const theta = o.rotate || o.theta || 0;
    const origin = new Point(o.origin || o.around || o.ox || o.originX, o.oy || o.originY);
    const ox = origin.x;
    const oy = origin.y;
    const position = new Point(o.position ?? o.px ?? o.positionX ?? NaN, o.py ?? o.positionY ?? NaN);
    const px = position.x;
    const py = position.y;
    const translate = new Point(o.translate || o.tx || o.translateX, o.ty || o.translateY);
    const tx = translate.x;
    const ty = translate.y;
    const relative = new Point(o.relative || o.rx || o.relativeX, o.ry || o.relativeY);
    return {
      scaleX,
      scaleY,
      skewX,
      skewY,
      shear,
      theta,
      rx: relative.x,
      ry: relative.y,
      tx,
      ty,
      ox,
      oy,
      px,
      py
    };
  }
  static fromArray(a) {
    return {
      a: a[0],
      b: a[1],
      c: a[2],
      d: a[3],
      e: a[4],
      f: a[5]
    };
  }
  static isMatrixLike(o) {
    return o.a != null || o.b != null || o.c != null || o.d != null || o.e != null || o.f != null;
  }
  static matrixMultiply(l, r, o) {
    const a = l.a * r.a + l.c * r.b;
    const b = l.b * r.a + l.d * r.b;
    const c = l.a * r.c + l.c * r.d;
    const d = l.b * r.c + l.d * r.d;
    const e = l.e + l.a * r.e + l.c * r.f;
    const f = l.f + l.b * r.e + l.d * r.f;
    o.a = a;
    o.b = b;
    o.c = c;
    o.d = d;
    o.e = e;
    o.f = f;
    return o;
  }
  around(cx, cy, matrix) {
    return this.clone().aroundO(cx, cy, matrix);
  }
  aroundO(cx, cy, matrix) {
    const dx = cx || 0;
    const dy = cy || 0;
    return this.translateO(-dx, -dy).lmultiplyO(matrix).translateO(dx, dy);
  }
  clone() {
    return new Matrix(this);
  }
  decompose(cx = 0, cy = 0) {
    const a = this.a;
    const b = this.b;
    const c = this.c;
    const d = this.d;
    const e = this.e;
    const f = this.f;
    const determinant = a * d - b * c;
    const ccw = determinant > 0 ? 1 : -1;
    const sx = ccw * Math.sqrt(a * a + b * b);
    const thetaRad = Math.atan2(ccw * b, ccw * a);
    const theta = 180 / Math.PI * thetaRad;
    const lam = (a * c + b * d) / determinant;
    return {
      scaleX: sx,
      scaleY: c * sx / (lam * a - b) || d * sx / (lam * b + a),
      shear: lam,
      rotate: theta,
      translateX: e - cx + cx * a + cy * c,
      translateY: f - cy + cx * b + cy * d,
      originX: cx,
      originY: cy,
      a: this.a,
      b: this.b,
      c: this.c,
      d: this.d,
      e: this.e,
      f: this.f
    };
  }
  equals(other) {
    if (other === this) return true;
    const comp = new Matrix(other);
    return closeEnough(this.a, comp.a) && closeEnough(this.b, comp.b) && closeEnough(this.c, comp.c) && closeEnough(this.d, comp.d) && closeEnough(this.e, comp.e) && closeEnough(this.f, comp.f);
  }
  flip(axis, around) {
    return this.clone().flipO(axis, around);
  }
  flipO(axis, around) {
    return axis === "x" ? this.scaleO(-1, 1, around, 0) : axis === "y" ? this.scaleO(1, -1, 0, around) : this.scaleO(-1, -1, axis, around || axis);
  }
  init(source) {
    const base = Matrix.fromArray([1, 0, 0, 1, 0, 0]);
    source = source instanceof Element ? source.matrixify() : typeof source === "string" ? Matrix.fromArray(source.split(delimiter).map(parseFloat)) : Array.isArray(source) ? Matrix.fromArray(source) : typeof source === "object" && Matrix.isMatrixLike(source) ? source : typeof source === "object" ? new Matrix().transform(source) : arguments.length === 6 ? Matrix.fromArray([].slice.call(arguments)) : base;
    this.a = source.a != null ? source.a : base.a;
    this.b = source.b != null ? source.b : base.b;
    this.c = source.c != null ? source.c : base.c;
    this.d = source.d != null ? source.d : base.d;
    this.e = source.e != null ? source.e : base.e;
    this.f = source.f != null ? source.f : base.f;
    return this;
  }
  inverse() {
    return this.clone().inverseO();
  }
  inverseO() {
    const a = this.a;
    const b = this.b;
    const c = this.c;
    const d = this.d;
    const e = this.e;
    const f = this.f;
    const det = a * d - b * c;
    if (!det) throw new Error("Cannot invert " + this);
    const na = d / det;
    const nb = -b / det;
    const nc = -c / det;
    const nd = a / det;
    const ne = -(na * e + nc * f);
    const nf = -(nb * e + nd * f);
    this.a = na;
    this.b = nb;
    this.c = nc;
    this.d = nd;
    this.e = ne;
    this.f = nf;
    return this;
  }
  lmultiply(matrix) {
    return this.clone().lmultiplyO(matrix);
  }
  lmultiplyO(matrix) {
    const r = this;
    const l = matrix instanceof Matrix ? matrix : new Matrix(matrix);
    return Matrix.matrixMultiply(l, r, this);
  }
  multiply(matrix) {
    return this.clone().multiplyO(matrix);
  }
  multiplyO(matrix) {
    const l = this;
    const r = matrix instanceof Matrix ? matrix : new Matrix(matrix);
    return Matrix.matrixMultiply(l, r, this);
  }
  rotate(r, cx, cy) {
    return this.clone().rotateO(r, cx, cy);
  }
  rotateO(r, cx = 0, cy = 0) {
    r = radians(r);
    const cos = Math.cos(r);
    const sin = Math.sin(r);
    const {
      a,
      b,
      c,
      d,
      e,
      f
    } = this;
    this.a = a * cos - b * sin;
    this.b = b * cos + a * sin;
    this.c = c * cos - d * sin;
    this.d = d * cos + c * sin;
    this.e = e * cos - f * sin + cy * sin - cx * cos + cx;
    this.f = f * cos + e * sin - cx * sin - cy * cos + cy;
    return this;
  }
  scale() {
    return this.clone().scaleO(...arguments);
  }
  scaleO(x, y = x, cx = 0, cy = 0) {
    if (arguments.length === 3) {
      cy = cx;
      cx = y;
      y = x;
    }
    const {
      a,
      b,
      c,
      d,
      e,
      f
    } = this;
    this.a = a * x;
    this.b = b * y;
    this.c = c * x;
    this.d = d * y;
    this.e = e * x - cx * x + cx;
    this.f = f * y - cy * y + cy;
    return this;
  }
  shear(a, cx, cy) {
    return this.clone().shearO(a, cx, cy);
  }
  shearO(lx, cx = 0, cy = 0) {
    const {
      a,
      b,
      c,
      d,
      e,
      f
    } = this;
    this.a = a + b * lx;
    this.c = c + d * lx;
    this.e = e + f * lx - cy * lx;
    return this;
  }
  skew() {
    return this.clone().skewO(...arguments);
  }
  skewO(x, y = x, cx = 0, cy = 0) {
    if (arguments.length === 3) {
      cy = cx;
      cx = y;
      y = x;
    }
    x = radians(x);
    y = radians(y);
    const lx = Math.tan(x);
    const ly = Math.tan(y);
    const {
      a,
      b,
      c,
      d,
      e,
      f
    } = this;
    this.a = a + b * lx;
    this.b = b + a * ly;
    this.c = c + d * lx;
    this.d = d + c * ly;
    this.e = e + f * lx - cy * lx;
    this.f = f + e * ly - cx * ly;
    return this;
  }
  skewX(x, cx, cy) {
    return this.skew(x, 0, cx, cy);
  }
  skewY(y, cx, cy) {
    return this.skew(0, y, cx, cy);
  }
  toArray() {
    return [this.a, this.b, this.c, this.d, this.e, this.f];
  }
  toString() {
    return "matrix(" + this.a + "," + this.b + "," + this.c + "," + this.d + "," + this.e + "," + this.f + ")";
  }
  transform(o) {
    if (Matrix.isMatrixLike(o)) return new Matrix(o).multiplyO(this);
    const t = Matrix.formatTransforms(o);
    const current = this;
    const {
      x: ox,
      y: oy
    } = new Point(t.ox, t.oy).transform(current);
    const transformer = new Matrix().translateO(t.rx, t.ry).lmultiplyO(current).translateO(-ox, -oy).scaleO(t.scaleX, t.scaleY).skewO(t.skewX, t.skewY).shearO(t.shear).rotateO(t.theta).translateO(ox, oy);
    if (isFinite(t.px) || isFinite(t.py)) {
      const origin = new Point(ox, oy).transform(transformer);
      const dx = isFinite(t.px) ? t.px - origin.x : 0;
      const dy = isFinite(t.py) ? t.py - origin.y : 0;
      transformer.translateO(dx, dy);
    }
    transformer.translateO(t.tx, t.ty);
    return transformer;
  }
  translate(x, y) {
    return this.clone().translateO(x, y);
  }
  translateO(x, y) {
    this.e += x || 0;
    this.f += y || 0;
    return this;
  }
  valueOf() {
    return {
      a: this.a,
      b: this.b,
      c: this.c,
      d: this.d,
      e: this.e,
      f: this.f
    };
  }
};
function ctm() {
  return new Matrix(this.node.getCTM());
}
function screenCTM() {
  try {
    if (typeof this.isRoot === "function" && !this.isRoot()) {
      const rect = this.rect(1, 1);
      const m = rect.node.getScreenCTM();
      rect.remove();
      return new Matrix(m);
    }
    return new Matrix(this.node.getScreenCTM());
  } catch (e) {
    console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`);
    return new Matrix();
  }
}
register(Matrix, "Matrix");

//#endregion
//#region src/modules/core/parser.js
function parser() {
  if (!parser.nodes || parser.nodes.svg.node.ownerDocument !== globals.document) {
    const svg = makeInstance().size(2, 0);
    svg.node.style.cssText = ["opacity: 0", "position: absolute", "left: -100%", "top: -100%", "overflow: hidden"].join(";");
    svg.attr("focusable", "false");
    svg.attr("aria-hidden", "true");
    parser.nodes = {
      svg,
      path: svg.path().node
    };
  }
  if (!parser.nodes.svg.node.parentNode) parser.nodes.svg.addTo(globals.document.body || globals.document.documentElement);
  return parser.nodes;
}

//#endregion
//#region src/types/Box.js
function isNulledBox(box) {
  return !box.width && !box.height && !box.x && !box.y;
}
function domContains(node) {
  return node === globals.document || (globals.document.documentElement.contains || function (node) {
    while (node.parentNode) node = node.parentNode;
    return node === globals.document;
  }).call(globals.document.documentElement, node);
}
var Box = class Box {
  constructor(...args) {
    this.init(...args);
  }
  addOffset() {
    this.x += globals.window.pageXOffset;
    this.y += globals.window.pageYOffset;
    return new Box(this);
  }
  init(source) {
    source = typeof source === "string" ? source.split(delimiter).map(parseFloat) : Array.isArray(source) ? source : typeof source === "object" ? [source.left != null ? source.left : source.x, source.top != null ? source.top : source.y, source.width, source.height] : arguments.length === 4 ? [].slice.call(arguments) : [0, 0, 0, 0];
    this.x = source[0] || 0;
    this.y = source[1] || 0;
    this.width = this.w = source[2] || 0;
    this.height = this.h = source[3] || 0;
    this.x2 = this.x + this.w;
    this.y2 = this.y + this.h;
    this.cx = this.x + this.w / 2;
    this.cy = this.y + this.h / 2;
    return this;
  }
  isNulled() {
    return isNulledBox(this);
  }
  merge(box) {
    const x = Math.min(this.x, box.x);
    const y = Math.min(this.y, box.y);
    const width = Math.max(this.x + this.width, box.x + box.width) - x;
    const height = Math.max(this.y + this.height, box.y + box.height) - y;
    return new Box(x, y, width, height);
  }
  toArray() {
    return [this.x, this.y, this.width, this.height];
  }
  toString() {
    return this.x + " " + this.y + " " + this.width + " " + this.height;
  }
  transform(m) {
    if (!(m instanceof Matrix)) m = new Matrix(m);
    let xMin = Infinity;
    let xMax = -Infinity;
    let yMin = Infinity;
    let yMax = -Infinity;
    [new Point(this.x, this.y), new Point(this.x2, this.y), new Point(this.x, this.y2), new Point(this.x2, this.y2)].forEach(function (p) {
      p = p.transform(m);
      xMin = Math.min(xMin, p.x);
      xMax = Math.max(xMax, p.x);
      yMin = Math.min(yMin, p.y);
      yMax = Math.max(yMax, p.y);
    });
    return new Box(xMin, yMin, xMax - xMin, yMax - yMin);
  }
};
function getBox(el, getBBoxFn, retry) {
  let box;
  try {
    box = getBBoxFn(el.node);
    if (isNulledBox(box) && !domContains(el.node)) throw new Error("Element not in the dom");
  } catch (e) {
    box = retry(el);
  }
  return box;
}
function bbox() {
  const getBBox = node => node.getBBox();
  const retry = el => {
    try {
      const clone = el.clone().addTo(parser().svg).show();
      const box = clone.node.getBBox();
      clone.remove();
      return box;
    } catch (e) {
      throw new Error(`Getting bbox of element "${el.node.nodeName}" is not possible: ${e.toString()}`);
    }
  };
  const box = getBox(this, getBBox, retry);
  return new Box(box);
}
function rbox(el) {
  const getRBox = node => node.getBoundingClientRect();
  const retry = el => {
    throw new Error(`Getting rbox of element "${el.node.nodeName}" is not possible`);
  };
  const box = getBox(this, getRBox, retry);
  const rbox = new Box(box);
  if (el) return rbox.transform(el.screenCTM().inverseO());
  return rbox.addOffset();
}
function inside(x, y) {
  const box = this.bbox();
  return x > box.x && y > box.y && x < box.x + box.width && y < box.y + box.height;
}
registerMethods({
  viewbox: {
    viewbox(x, y, width, height) {
      if (x == null) return new Box(this.attr("viewBox"));
      return this.attr("viewBox", new Box(x, y, width, height));
    },
    zoom(level, point) {
      let {
        width,
        height
      } = this.attr(["width", "height"]);
      if (!width && !height || typeof width === "string" || typeof height === "string") {
        width = this.node.clientWidth;
        height = this.node.clientHeight;
      }
      if (!width || !height) throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");
      const v = this.viewbox();
      const zoomX = width / v.width;
      const zoomY = height / v.height;
      const zoom = Math.min(zoomX, zoomY);
      if (level == null) return zoom;
      let zoomAmount = zoom / level;
      if (zoomAmount === Infinity) zoomAmount = Number.MAX_SAFE_INTEGER / 100;
      point = point || new Point(width / 2 / zoomX + v.x, height / 2 / zoomY + v.y);
      const box = new Box(v).transform(new Matrix({
        scale: zoomAmount,
        origin: point
      }));
      return this.viewbox(box);
    }
  }
});
register(Box, "Box");

//#endregion
//#region src/types/List.js
var List = class extends Array {
  constructor(arr = [], ...args) {
    super(arr, ...args);
    if (typeof arr === "number") return this;
    this.length = 0;
    this.push(...arr);
  }
};
extend([List], {
  each(fnOrMethodName, ...args) {
    if (typeof fnOrMethodName === "function") return this.map((el, i, arr) => {
      return fnOrMethodName.call(el, el, i, arr);
    });else return this.map(el => {
      return el[fnOrMethodName](...args);
    });
  },
  toArray() {
    return Array.prototype.concat.apply([], this);
  }
});
const reserved = ["toArray", "constructor", "each"];
List.extend = function (methods) {
  methods = methods.reduce((obj, name) => {
    if ((0, import_includes.default)(reserved).call(reserved, name)) return obj;
    if (name[0] === "_") return obj;
    if (name in Array.prototype) obj["$" + name] = Array.prototype[name];
    obj[name] = function (...attrs) {
      return this.each(name, ...attrs);
    };
    return obj;
  }, {});
  extend([List], methods);
};

//#endregion
//#region src/modules/core/references.js
function getReferenceId(value) {
  let referenceValue = (value + "").trim();
  const url = referenceValue.match(/^url\((.*)\)$/i);
  if (url) {
    referenceValue = url[1].trim();
    const quote = referenceValue[0];
    if (quote === "\"" || quote === "'") {
      if (referenceValue[referenceValue.length - 1] !== quote) return null;
      referenceValue = referenceValue.slice(1, -1);
    }
  }
  const match = referenceValue.match(reference);
  return match ? match[1].slice(1) : null;
}
function findById(rootNode, id) {
  const selector = `#${globals.window.CSS.escape(id)}`;
  if (rootNode.nodeType === 1 && rootNode.matches(selector)) return rootNode;
  return rootNode.querySelector(selector);
}
function resolveReference(node, value) {
  const id = getReferenceId(value);
  return id ? findById(node.getRootNode(), id) : null;
}
function findReferences(node, attribute, selector = `[${attribute}]`) {
  const id = node.getAttribute("id");
  const rootNode = node.getRootNode();
  if (!id || findById(rootNode, id) !== node) return new List();
  const references = [];
  if (rootNode.nodeType === 1 && rootNode.matches(selector) && getReferenceId(rootNode.getAttribute(attribute)) === id) references.push(adopt(rootNode));
  for (const element of rootNode.querySelectorAll(selector)) if (getReferenceId(element.getAttribute(attribute)) === id) references.push(adopt(element));
  return new List(references);
}

//#endregion
//#region src/modules/core/selector.js
function baseFind(query, parent) {
  return new List(map((parent || globals.document).querySelectorAll(query), function (node) {
    return adopt(node);
  }));
}
function find(query) {
  return baseFind(query, this.node);
}
function findOne(query) {
  return adopt(this.node.querySelector(query));
}

//#endregion
//#region src/modules/core/event.js
let listenerId = 0;
const eventStore = /* @__PURE__ */new WeakMap();
const listenerIds = /* @__PURE__ */new WeakMap();
const createEventMap = () => Object.create(null);
function getEvents(instance) {
  const holder = instance.getEventHolder();
  let bag = eventStore.get(holder);
  if (!bag) {
    bag = createEventMap();
    eventStore.set(holder, bag);
  }
  return bag;
}
function getEventTarget(instance) {
  return instance.getEventTarget();
}
function clearEvents(instance) {
  eventStore.delete(instance.getEventHolder());
}
function on(node, events, listener, binding, options) {
  const l = listener.bind(binding || node);
  const listenerOptions = options || false;
  const instance = makeInstance(node);
  const bag = getEvents(instance);
  const n = getEventTarget(instance);
  events = Array.isArray(events) ? events : events.split(delimiter);
  let id = listenerIds.get(listener);
  if (!id) {
    id = ++listenerId;
    listenerIds.set(listener, id);
  }
  events.forEach(function (event) {
    const ev = event.split(".")[0];
    const ns = event.split(".")[1] || "*";
    bag[ev] = bag[ev] || createEventMap();
    bag[ev][ns] = bag[ev][ns] || createEventMap();
    bag[ev][ns][id] = bag[ev][ns][id] || [];
    bag[ev][ns][id].push({
      listener: l,
      options: listenerOptions
    });
    n.addEventListener(ev, l, listenerOptions);
  });
}
function off(node, events, listener, options) {
  const instance = makeInstance(node);
  const bag = getEvents(instance);
  const n = getEventTarget(instance);
  if (typeof listener === "function") {
    listener = listenerIds.get(listener);
    if (!listener) return;
  }
  events = Array.isArray(events) ? events : (events || "").split(delimiter);
  events.forEach(function (event) {
    const ev = event && event.split(".")[0];
    const ns = event && event.split(".")[1];
    let namespace, l;
    if (listener) {
      if (bag[ev] && bag[ev][ns || "*"]) {
        const listeners = bag[ev][ns || "*"][listener];
        if (!listeners) return;
        listeners.forEach(function (registration) {
          n.removeEventListener(ev, registration.listener, registration.options ?? options ?? false);
        });
        delete bag[ev][ns || "*"][listener];
      }
    } else if (ev && ns) {
      if (bag[ev] && bag[ev][ns]) {
        for (l in bag[ev][ns]) off(n, [ev, ns].join("."), l);
        delete bag[ev][ns];
      }
    } else if (ns) {
      for (event in bag) for (namespace in bag[event]) if (ns === namespace) off(n, [event, ns].join("."));
    } else if (ev) {
      if (bag[ev]) {
        for (namespace in bag[ev]) off(n, [ev, namespace].join("."));
        delete bag[ev];
      }
    } else {
      for (event in bag) off(n, event);
      clearEvents(instance);
    }
  });
}
function dispatch(node, event, data, options) {
  const n = getEventTarget(node);
  if (event instanceof globals.window.Event) n.dispatchEvent(event);else {
    event = new globals.window.CustomEvent(event, {
      detail: data,
      cancelable: true,
      ...options
    });
    n.dispatchEvent(event);
  }
  return event;
}

//#endregion
//#region src/types/EventTarget.js
var EventTarget = class extends Base {
  addEventListener() {}
  dispatch(event, data, options) {
    return dispatch(this, event, data, options);
  }
  dispatchEvent(event) {
    const events = getEvents(this)[event.type];
    if (!events) return true;
    for (const i in events) for (const j in events[i]) events[i][j].forEach(function (registration) {
      registration.listener(event);
    });
    return !event.defaultPrevented;
  }
  fire(event, data, options) {
    this.dispatch(event, data, options);
    return this;
  }
  getEventHolder() {
    return this;
  }
  getEventTarget() {
    return this;
  }
  off(event, listener, options) {
    off(this, event, listener, options);
    return this;
  }
  on(event, listener, binding, options) {
    on(this, event, listener, binding, options);
    return this;
  }
  removeEventListener() {}
};
register(EventTarget, "EventTarget");

//#endregion
//#region src/modules/core/defaults.js
var defaults_exports = /* @__PURE__ */__exportAll({
  attrs: () => attrs,
  noop: () => noop,
  timeline: () => timeline
});
function noop() {}
const timeline = {
  duration: 400,
  ease: ">",
  delay: 0
};
const attrs = {
  "fill-opacity": 1,
  "stroke-opacity": 1,
  "stroke-width": 0,
  "stroke-linejoin": "miter",
  "stroke-linecap": "butt",
  fill: "#000000",
  stroke: "#000000",
  opacity: 1,
  x: 0,
  y: 0,
  cx: 0,
  cy: 0,
  width: 0,
  height: 0,
  r: 0,
  rx: 0,
  ry: 0,
  offset: 0,
  "stop-opacity": 1,
  "stop-color": "#000000",
  "text-anchor": "start"
};

//#endregion
//#region src/types/SVGArray.js
var SVGArray = class extends Array {
  constructor(...args) {
    super(...args);
    this.init(...args);
  }
  clone() {
    return new this.constructor(this);
  }
  init(arr) {
    if (typeof arr === "number") return this;
    this.length = 0;
    this.push(...this.parse(arr));
    return this;
  }
  parse(array = []) {
    if (array instanceof Array) return array;
    return array.trim().split(delimiter).map(parseFloat);
  }
  toArray() {
    return Array.prototype.concat.apply([], this);
  }
  toSet() {
    return new Set(this);
  }
  toString() {
    return this.join(" ");
  }
  valueOf() {
    const ret = [];
    ret.push(...this);
    return ret;
  }
};

//#endregion
//#region src/types/SVGNumber.js
var SVGNumber = class SVGNumber {
  constructor(...args) {
    this.init(...args);
  }
  convert(unit) {
    return new SVGNumber(this.value, unit);
  }
  divide(number) {
    number = new SVGNumber(number);
    return new SVGNumber(this / number, this.unit || number.unit);
  }
  init(value, unit) {
    unit = Array.isArray(value) ? value[1] : unit;
    value = Array.isArray(value) ? value[0] : value;
    this.value = 0;
    this.unit = unit || "";
    if (typeof value === "number") this.value = isNaN(value) ? 0 : !isFinite(value) ? value < 0 ? -34e37 : 34e37 : value;else if (typeof value === "string") {
      unit = value.match(numberAndUnit);
      if (unit) {
        this.value = parseFloat(unit[1]);
        if (unit[5] === "%") this.value /= 100;else if (unit[5] === "s") this.value *= 1e3;
        this.unit = unit[5];
      }
    } else if (value instanceof SVGNumber) {
      this.value = value.valueOf();
      this.unit = value.unit;
    }
    return this;
  }
  minus(number) {
    number = new SVGNumber(number);
    return new SVGNumber(this - number, this.unit || number.unit);
  }
  plus(number) {
    number = new SVGNumber(number);
    return new SVGNumber(this + number, this.unit || number.unit);
  }
  times(number) {
    number = new SVGNumber(number);
    return new SVGNumber(this * number, this.unit || number.unit);
  }
  toArray() {
    return [this.value, this.unit];
  }
  toJSON() {
    return this.toString();
  }
  toString() {
    return (this.unit === "%" ? ~~(this.value * 1e8) / 1e6 : this.unit === "s" ? this.value / 1e3 : this.value) + this.unit;
  }
  valueOf() {
    return this.value;
  }
};

//#endregion
//#region src/modules/core/attr.js
const colorAttributes = /* @__PURE__ */new Set(["fill", "stroke", "color", "bgcolor", "stop-color", "flood-color", "lighting-color"]);
const hooks = [];
function registerAttrHook(fn) {
  hooks.push(fn);
}
function attr(attr, val, ns) {
  if (attr == null) {
    attr = {};
    val = this.node.attributes;
    for (const node of val) attr[node.nodeName] = isNumber.test(node.nodeValue) ? parseFloat(node.nodeValue) : node.nodeValue;
    return attr;
  } else if (attr instanceof Array) return attr.reduce((last, curr) => {
    last[curr] = this.attr(curr);
    return last;
  }, {});else if (typeof attr === "object" && attr.constructor === Object) for (val in attr) this.attr(val, attr[val]);else if (val === null) this.node.removeAttribute(attr);else if (val == null) {
    val = this.node.getAttribute(attr);
    return val == null ? attrs[attr] : isNumber.test(val) ? parseFloat(val) : val;
  } else {
    val = hooks.reduce((_val, hook) => {
      return hook(attr, _val, this);
    }, val);
    if (typeof val === "number") val = new SVGNumber(val);else if (colorAttributes.has(attr) && Color.isColor(val)) val = new Color(val);else if (val.constructor === Array) val = new SVGArray(val);
    if (attr === "leading") {
      if (this.leading) this.leading(val);
    } else typeof ns === "string" ? this.node.setAttributeNS(ns, attr, val.toString()) : this.node.setAttribute(attr, val.toString());
    if (this.rebuild && (attr === "font-size" || attr === "x")) this.rebuild();
  }
  return this;
}

//#endregion
//#region src/elements/Dom.js
var Dom = class Dom extends EventTarget {
  constructor(node, attrs) {
    super();
    this.node = node;
    this.type = node.nodeName;
    if (attrs && node !== attrs) this.attr(attrs);
  }
  add(element, i) {
    element = makeInstance(element);
    if (element.removeNamespace && this.node instanceof globals.window.SVGElement) element.removeNamespace();
    if (i == null) this.node.appendChild(element.node);else if (element.node !== this.node.childNodes[i]) this.node.insertBefore(element.node, this.node.childNodes[i]);
    return this;
  }
  addTo(parent, i) {
    return makeInstance(parent).put(this, i);
  }
  children() {
    return new List(map(this.node.children, function (node) {
      return adopt(node);
    }));
  }
  clear() {
    while (this.node.hasChildNodes()) this.node.removeChild(this.node.lastChild);
    return this;
  }
  clone(deep = true, assignNewIds = true) {
    this.writeDataToDom();
    let nodeClone = this.node.cloneNode(deep);
    if (assignNewIds) nodeClone = assignNewId(nodeClone);
    return new this.constructor(nodeClone);
  }
  each(block, deep) {
    const children = this.children();
    let i, il;
    for (i = 0, il = children.length; i < il; i++) {
      block.apply(children[i], [i, children]);
      if (deep) children[i].each(block, deep);
    }
    return this;
  }
  element(nodeName, attrs) {
    return this.put(new Dom(create(nodeName), attrs));
  }
  first() {
    return adopt(this.node.firstChild);
  }
  get(i) {
    return adopt(this.node.childNodes[i]);
  }
  getEventHolder() {
    return this.node;
  }
  getEventTarget() {
    return this.node;
  }
  has(element) {
    return this.index(element) >= 0;
  }
  html(htmlOrFn, outerHTML) {
    return this.xml(htmlOrFn, outerHTML, html);
  }
  id(id) {
    if (typeof id === "undefined" && !this.node.id) this.node.id = eid(this.type);
    return this.attr("id", id);
  }
  index(element) {
    return [].slice.call(this.node.childNodes).indexOf(element.node);
  }
  last() {
    return adopt(this.node.lastChild);
  }
  matches(selector) {
    const el = this.node;
    const matcher = el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector || null;
    return matcher && matcher.call(el, selector);
  }
  parent(type) {
    let parent = this;
    if (!parent.node.parentNode) return null;
    parent = adopt(parent.node.parentNode);
    if (!type) return parent;
    do if (typeof type === "string" ? parent.matches(type) : parent instanceof type) return parent; while (parent = adopt(parent.node.parentNode));
    return parent;
  }
  put(element, i) {
    element = makeInstance(element);
    this.add(element, i);
    return element;
  }
  putIn(parent, i) {
    return makeInstance(parent).add(this, i);
  }
  remove() {
    if (this.parent()) this.parent().removeElement(this);
    return this;
  }
  removeElement(element) {
    this.node.removeChild(element.node);
    return this;
  }
  replace(element) {
    element = makeInstance(element);
    if (this.node.parentNode) this.node.parentNode.replaceChild(element.node, this.node);
    return element;
  }
  round(precision = 2, map = null) {
    const factor = 10 ** precision;
    const attrs = this.attr(map);
    for (const i in attrs) if (typeof attrs[i] === "number") attrs[i] = Math.round(attrs[i] * factor) / factor;
    this.attr(attrs);
    return this;
  }
  svg(svgOrFn, outerSVG) {
    return this.xml(svgOrFn, outerSVG, svg);
  }
  toString() {
    return this.id();
  }
  words(text) {
    this.node.textContent = text;
    return this;
  }
  wrap(node) {
    const parent = this.parent();
    if (!parent) return this.addTo(node);
    const position = parent.index(this);
    return parent.put(node, position).put(this);
  }
  writeDataToDom() {
    this.each(function () {
      this.writeDataToDom();
    });
    return this;
  }
  xml(xmlOrFn, outerXML, ns) {
    if (typeof xmlOrFn === "boolean") {
      ns = outerXML;
      outerXML = xmlOrFn;
      xmlOrFn = null;
    }
    if (xmlOrFn == null || typeof xmlOrFn === "function") {
      outerXML = outerXML == null ? true : outerXML;
      this.writeDataToDom();
      let current = this;
      if (xmlOrFn != null) {
        current = adopt(current.node.cloneNode(true));
        if (outerXML) {
          const result = xmlOrFn(current);
          current = result || current;
          if (result === false) return "";
        }
        current.each(function () {
          const result = xmlOrFn(this);
          const _this = result || this;
          if (result === false) this.remove();else if (result && this !== _this) this.replace(_this);
        }, true);
      }
      return outerXML ? current.node.outerHTML : current.node.innerHTML;
    }
    outerXML = outerXML == null ? false : outerXML;
    const well = create("wrapper", ns);
    const fragment = globals.document.createDocumentFragment();
    well.innerHTML = xmlOrFn;
    for (let len = well.children.length; len--;) fragment.appendChild(well.firstElementChild);
    const parent = this.parent();
    return outerXML ? this.replace(fragment) && parent : this.add(fragment);
  }
};
extend(Dom, {
  attr,
  find,
  findOne
});
register(Dom, "Dom");

//#endregion
//#region src/elements/Element.js
var Element = class extends Dom {
  constructor(node, attrs) {
    super(node, attrs);
    this.dom = {};
    this.node.instance = this;
    if (node.hasAttribute("data-svgjs") || node.hasAttribute("svgjs:data")) this.setData(JSON.parse(node.getAttribute("data-svgjs")) ?? JSON.parse(node.getAttribute("svgjs:data")) ?? {});
  }
  center(x, y) {
    return this.cx(x).cy(y);
  }
  cx(x) {
    return x == null ? this.x() + this.width() / 2 : this.x(x - this.width() / 2);
  }
  cy(y) {
    return y == null ? this.y() + this.height() / 2 : this.y(y - this.height() / 2);
  }
  defs() {
    const root = this.root();
    return root && root.defs();
  }
  dmove(x, y) {
    return this.dx(x).dy(y);
  }
  dx(x = 0) {
    return this.x(new SVGNumber(x).plus(this.x()));
  }
  dy(y = 0) {
    return this.y(new SVGNumber(y).plus(this.y()));
  }
  getEventHolder() {
    return this;
  }
  height(height) {
    return this.attr("height", height);
  }
  move(x, y) {
    return this.x(x).y(y);
  }
  parents(until = this.root()) {
    const isSelector = typeof until === "string";
    const root = this.root();
    const rootNode = root && root.node;
    if (!isSelector) until = until && makeInstance(until).node;
    const parents = new List();
    let parent = this;
    while ((parent = parent.parent()) && parent.node !== globals.document && parent.node.nodeName !== "#document-fragment") {
      parents.push(parent);
      if (!isSelector && parent.node === until) break;
      if (isSelector && parent.matches(until)) break;
      if (rootNode && parent.node === rootNode) return null;
    }
    return parents;
  }
  reference(attr) {
    attr = this.attr(attr);
    if (!attr) return null;
    const target = resolveReference(this.node, attr);
    return target ? makeInstance(target) : null;
  }
  root() {
    const p = this.parent(getClass(root));
    return p && p.root();
  }
  setData(o) {
    this.dom = o;
    return this;
  }
  size(width, height) {
    const p = proportionalSize(this, width, height);
    return this.width(new SVGNumber(p.width)).height(new SVGNumber(p.height));
  }
  width(width) {
    return this.attr("width", width);
  }
  writeDataToDom(defaults) {
    writeDataToDom(this, this.dom, defaults);
    return super.writeDataToDom();
  }
  x(x) {
    return this.attr("x", x);
  }
  y(y) {
    return this.attr("y", y);
  }
};
extend(Element, {
  bbox,
  rbox,
  inside,
  point,
  ctm,
  screenCTM
});
register(Element, "Element");

//#endregion
//#region src/modules/optional/sugar.js
const sugar = {
  stroke: ["color", "width", "opacity", "linecap", "linejoin", "miterlimit", "dasharray", "dashoffset"],
  fill: ["color", "opacity", "rule"],
  prefix: function (t, a) {
    return a === "color" ? t : t + "-" + a;
  }
};
["fill", "stroke"].forEach(function (m) {
  const extension = {};
  let i;
  extension[m] = function (o) {
    if (typeof o === "undefined") return this.attr(m);
    if (typeof o === "string" || o instanceof Color || Color.isRgb(o) || o instanceof Element) this.attr(m, o);else for (i = sugar[m].length - 1; i >= 0; i--) if (o[sugar[m][i]] != null) this.attr(sugar.prefix(m, sugar[m][i]), o[sugar[m][i]]);
    return this;
  };
  registerMethods(["Element", "Runner"], extension);
});
registerMethods(["Element", "Runner"], {
  matrix: function (mat, b, c, d, e, f) {
    if (mat == null) return new Matrix(this);
    return this.attr("transform", new Matrix(mat, b, c, d, e, f));
  },
  rotate: function (angle, cx, cy) {
    return this.transform({
      rotate: angle,
      ox: cx,
      oy: cy
    }, true);
  },
  skew: function (x, y, cx, cy) {
    return arguments.length === 1 || arguments.length === 3 ? this.transform({
      skew: x,
      ox: y,
      oy: cx
    }, true) : this.transform({
      skew: [x, y],
      ox: cx,
      oy: cy
    }, true);
  },
  shear: function (lam, cx, cy) {
    return this.transform({
      shear: lam,
      ox: cx,
      oy: cy
    }, true);
  },
  scale: function (x, y, cx, cy) {
    return arguments.length === 1 || arguments.length === 3 ? this.transform({
      scale: x,
      ox: y,
      oy: cx
    }, true) : this.transform({
      scale: [x, y],
      ox: cx,
      oy: cy
    }, true);
  },
  translate: function (x, y) {
    return this.transform({
      translate: [x, y]
    }, true);
  },
  relative: function (x, y) {
    return this.transform({
      relative: [x, y]
    }, true);
  },
  flip: function (direction = "both", origin = "center") {
    if ("xybothtrue".indexOf(direction) === -1) {
      origin = direction;
      direction = "both";
    }
    return this.transform({
      flip: direction,
      origin
    }, true);
  },
  opacity: function (value) {
    return this.attr("opacity", value);
  }
});
registerMethods("radius", {
  radius: function (x, y = x) {
    return (this._element || this).type === "radialGradient" ? this.attr("r", new SVGNumber(x)) : this.rx(x).ry(y);
  }
});
registerMethods("Path", {
  length: function () {
    return this.node.getTotalLength();
  },
  pointAt: function (length) {
    return new Point(this.node.getPointAtLength(length));
  }
});
registerMethods(["Element", "Runner"], {
  font: function (a, v) {
    if (typeof a === "object") {
      for (v in a) this.font(v, a[v]);
      return this;
    }
    return a === "leading" ? this.leading(v) : a === "anchor" ? this.attr("text-anchor", v) : a === "size" || a === "family" || a === "weight" || a === "stretch" || a === "variant" || a === "style" ? this.attr("font-" + a, v) : this.attr(a, v);
  }
});
registerMethods("Element", ["click", "dblclick", "mousedown", "mouseup", "mouseover", "mouseout", "mousemove", "mouseenter", "mouseleave", "touchstart", "touchmove", "touchleave", "touchend", "touchcancel", "contextmenu", "wheel", "pointerdown", "pointermove", "pointerup", "pointerleave", "pointercancel"].reduce(function (last, event) {
  const fn = function (f) {
    if (f === null) this.off(event);else this.on(event, f);
    return this;
  };
  last[event] = fn;
  return last;
}, {}));

//#endregion
//#region src/modules/optional/transform.js
function untransform() {
  return this.attr("transform", null);
}
function matrixify() {
  return (this.attr("transform") || "").split(transforms).slice(0, -1).map(function (str) {
    const kv = str.trim().split("(");
    return [kv[0].trim(), kv[1].split(delimiter).map(function (str) {
      return parseFloat(str);
    })];
  }).reverse().reduce(function (matrix, transform) {
    if (transform[0] === "matrix") return matrix.lmultiply(Matrix.fromArray(transform[1]));
    return matrix[transform[0]].apply(matrix, transform[1]);
  }, new Matrix());
}
function toParent(parent, i) {
  if (this === parent) return this;
  if (isDescriptive(this.node)) return this.addTo(parent, i);
  const ctm = this.screenCTM();
  const pCtm = parent.screenCTM().inverse();
  this.addTo(parent, i).untransform().transform(pCtm.multiply(ctm));
  return this;
}
function toRoot(i) {
  return this.toParent(this.root(), i);
}
function transform(o, relative) {
  if (o == null || typeof o === "string") {
    const decomposed = new Matrix(this).decompose();
    return o == null ? decomposed : decomposed[o];
  }
  if (!Matrix.isMatrixLike(o)) o = {
    ...o,
    origin: getOrigin(o, this)
  };
  const result = new Matrix(relative === true ? this : relative || false).transform(o);
  return this.attr("transform", result);
}
registerMethods("Element", {
  untransform,
  matrixify,
  toParent,
  toRoot,
  transform
});

//#endregion
//#region src/elements/Container.js
var Container = class Container extends Element {
  flatten() {
    this.each(function () {
      if (this instanceof Container) return this.flatten().ungroup();
    });
    return this;
  }
  ungroup(parent = this.parent(), index = parent.index(this)) {
    index = index === -1 ? parent.children().length : index;
    this.each(function (i, children) {
      return children[children.length - i - 1].toParent(parent, index);
    });
    return this.remove();
  }
};
register(Container, "Container");

//#endregion
//#region src/elements/Defs.js
var Defs = class extends Container {
  constructor(node, attrs = node) {
    super(nodeOrNew("defs", node), attrs);
  }
  flatten() {
    return this;
  }
  ungroup() {
    return this;
  }
};
register(Defs, "Defs");

//#endregion
//#region src/elements/Shape.js
var Shape = class extends Element {};
register(Shape, "Shape");

//#endregion
//#region src/modules/core/circled.js
var circled_exports = /* @__PURE__ */__exportAll({
  cx: () => cx$1,
  cy: () => cy$1,
  height: () => height$2,
  rx: () => rx,
  ry: () => ry,
  width: () => width$2,
  x: () => x$3,
  y: () => y$3
});
function rx(rx) {
  return this.attr("rx", rx);
}
function ry(ry) {
  return this.attr("ry", ry);
}
function x$3(x) {
  return x == null ? this.cx() - this.rx() : this.cx(x + this.rx());
}
function y$3(y) {
  return y == null ? this.cy() - this.ry() : this.cy(y + this.ry());
}
function cx$1(x) {
  return this.attr("cx", x);
}
function cy$1(y) {
  return this.attr("cy", y);
}
function width$2(width) {
  return width == null ? this.rx() * 2 : this.rx(new SVGNumber(width).divide(2));
}
function height$2(height) {
  return height == null ? this.ry() * 2 : this.ry(new SVGNumber(height).divide(2));
}

//#endregion
//#region src/elements/Ellipse.js
var Ellipse = class extends Shape {
  constructor(node, attrs = node) {
    super(nodeOrNew("ellipse", node), attrs);
  }
  size(width, height) {
    const p = proportionalSize(this, width, height);
    return this.rx(new SVGNumber(p.width).divide(2)).ry(new SVGNumber(p.height).divide(2));
  }
};
extend(Ellipse, circled_exports);
registerMethods("Container", {
  ellipse: wrapWithAttrCheck(function (width = 0, height = width) {
    return this.put(new Ellipse()).size(width, height).move(0, 0);
  })
});
register(Ellipse, "Ellipse");

//#endregion
//#region src/elements/Fragment.js
var Fragment = class extends Dom {
  constructor(node = globals.document.createDocumentFragment()) {
    super(node);
  }
  xml(xmlOrFn, outerXML, ns) {
    if (typeof xmlOrFn === "boolean") {
      ns = outerXML;
      outerXML = xmlOrFn;
      xmlOrFn = null;
    }
    if (xmlOrFn == null || typeof xmlOrFn === "function") {
      const wrapper = new Dom(create("wrapper", ns));
      wrapper.add(this.node.cloneNode(true));
      return wrapper.xml(false, ns);
    }
    return super.xml(xmlOrFn, false, ns);
  }
};
register(Fragment, "Fragment");

//#endregion
//#region src/modules/core/gradiented.js
var gradiented_exports = /* @__PURE__ */__exportAll({
  from: () => from,
  to: () => to
});
function from(x, y) {
  return (this._element || this).type === "radialGradient" ? this.attr({
    fx: new SVGNumber(x),
    fy: new SVGNumber(y)
  }) : this.attr({
    x1: new SVGNumber(x),
    y1: new SVGNumber(y)
  });
}
function to(x, y) {
  return (this._element || this).type === "radialGradient" ? this.attr({
    cx: new SVGNumber(x),
    cy: new SVGNumber(y)
  }) : this.attr({
    x2: new SVGNumber(x),
    y2: new SVGNumber(y)
  });
}

//#endregion
//#region src/elements/Gradient.js
var Gradient = class extends Container {
  constructor(type, attrs) {
    super(nodeOrNew(type + "Gradient", typeof type === "string" ? null : type), attrs);
  }
  attr(a, b, c) {
    if (a === "transform") a = "gradientTransform";
    return super.attr(a, b, c);
  }
  bbox() {
    return new Box();
  }
  targets() {
    return findReferences(this.node, "fill");
  }
  toString() {
    return this.url();
  }
  update(block) {
    this.clear();
    if (typeof block === "function") block.call(this, this);
    return this;
  }
  url() {
    return "url(#" + this.id() + ")";
  }
};
extend(Gradient, gradiented_exports);
registerMethods({
  Container: {
    gradient(...args) {
      return this.defs().gradient(...args);
    }
  },
  Defs: {
    gradient: wrapWithAttrCheck(function (type, block) {
      return this.put(new Gradient(type)).update(block);
    })
  }
});
register(Gradient, "Gradient");

//#endregion
//#region src/elements/Pattern.js
var Pattern = class extends Container {
  constructor(node, attrs = node) {
    super(nodeOrNew("pattern", node), attrs);
  }
  attr(a, b, c) {
    if (a === "transform") a = "patternTransform";
    return super.attr(a, b, c);
  }
  bbox() {
    return new Box();
  }
  targets() {
    return findReferences(this.node, "fill");
  }
  toString() {
    return this.url();
  }
  update(block) {
    this.clear();
    if (typeof block === "function") block.call(this, this);
    return this;
  }
  url() {
    return "url(#" + this.id() + ")";
  }
};
registerMethods({
  Container: {
    pattern(...args) {
      return this.defs().pattern(...args);
    }
  },
  Defs: {
    pattern: wrapWithAttrCheck(function (width, height, block) {
      return this.put(new Pattern()).update(block).attr({
        x: 0,
        y: 0,
        width,
        height,
        patternUnits: "userSpaceOnUse"
      });
    })
  }
});
register(Pattern, "Pattern");

//#endregion
//#region src/elements/Image.js
var Image = class extends Shape {
  constructor(node, attrs = node) {
    super(nodeOrNew("image", node), attrs);
  }
  load(url, callback) {
    if (!url) return this;
    const img = new globals.window.Image();
    on(img, "load", function (e) {
      const p = this.parent(Pattern);
      if (this.width() === 0 && this.height() === 0) this.size(img.width, img.height);
      if (p instanceof Pattern) {
        if (p.width() === 0 && p.height() === 0) p.size(this.width(), this.height());
      }
      if (typeof callback === "function") callback.call(this, e);
    }, this);
    on(img, "load error", function () {
      off(img);
    });
    return this.attr("href", img.src = url, xlink);
  }
};
registerAttrHook(function (attr, val, _this) {
  if (attr === "fill" || attr === "stroke") {
    if (isImage.test(val)) val = _this.root().defs().image(val);
  }
  if (val instanceof Image) val = _this.root().defs().pattern(0, 0, pattern => {
    pattern.add(val);
  });
  return val;
});
registerMethods({
  Container: {
    image: wrapWithAttrCheck(function (source, callback) {
      return this.put(new Image()).size(0, 0).load(source, callback);
    })
  }
});
register(Image, "Image");

//#endregion
//#region src/types/PointArray.js
var PointArray = class extends SVGArray {
  bbox() {
    let maxX = -Infinity;
    let maxY = -Infinity;
    let minX = Infinity;
    let minY = Infinity;
    this.forEach(function (el) {
      maxX = Math.max(el[0], maxX);
      maxY = Math.max(el[1], maxY);
      minX = Math.min(el[0], minX);
      minY = Math.min(el[1], minY);
    });
    return new Box(minX, minY, maxX - minX, maxY - minY);
  }
  move(x, y) {
    const box = this.bbox();
    x -= box.x;
    y -= box.y;
    if (!isNaN(x) && !isNaN(y)) for (let i = this.length - 1; i >= 0; i--) this[i] = [this[i][0] + x, this[i][1] + y];
    return this;
  }
  parse(array = [0, 0]) {
    const points = [];
    if (array instanceof Array) array = Array.prototype.concat.apply([], array);else array = array.trim().split(delimiter).map(parseFloat);
    if (array.length % 2 !== 0) array.pop();
    for (let i = 0, len = array.length; i < len; i = i + 2) points.push([array[i], array[i + 1]]);
    return points;
  }
  size(width, height) {
    let i;
    const box = this.bbox();
    for (i = this.length - 1; i >= 0; i--) {
      if (box.width) this[i][0] = (this[i][0] - box.x) * width / box.width + box.x;
      if (box.height) this[i][1] = (this[i][1] - box.y) * height / box.height + box.y;
    }
    return this;
  }
  toLine() {
    return {
      x1: this[0][0],
      y1: this[0][1],
      x2: this[1][0],
      y2: this[1][1]
    };
  }
  toString() {
    const array = [];
    for (let i = 0, il = this.length; i < il; i++) array.push(this[i].join(","));
    return array.join(" ");
  }
  transform(m) {
    return this.clone().transformO(m);
  }
  transformO(m) {
    if (!Matrix.isMatrixLike(m)) m = new Matrix(m);
    for (let i = this.length; i--;) {
      const [x, y] = this[i];
      this[i][0] = m.a * x + m.c * y + m.e;
      this[i][1] = m.b * x + m.d * y + m.f;
    }
    return this;
  }
};

//#endregion
//#region src/modules/core/pointed.js
var pointed_exports = /* @__PURE__ */__exportAll({
  MorphArray: () => MorphArray,
  height: () => height$1,
  width: () => width$1,
  x: () => x$2,
  y: () => y$2
});
const MorphArray = PointArray;
function x$2(x) {
  return x == null ? this.bbox().x : this.move(x, this.bbox().y);
}
function y$2(y) {
  return y == null ? this.bbox().y : this.move(this.bbox().x, y);
}
function width$1(width) {
  const b = this.bbox();
  return width == null ? b.width : this.size(width, b.height);
}
function height$1(height) {
  const b = this.bbox();
  return height == null ? b.height : this.size(b.width, height);
}

//#endregion
//#region src/elements/Line.js
var Line = class extends Shape {
  constructor(node, attrs = node) {
    super(nodeOrNew("line", node), attrs);
  }
  array() {
    return new PointArray([[this.attr("x1"), this.attr("y1")], [this.attr("x2"), this.attr("y2")]]);
  }
  move(x, y) {
    return this.attr(this.array().move(x, y).toLine());
  }
  plot(x1, y1, x2, y2) {
    if (x1 == null) return this.array();else if (typeof y1 !== "undefined") x1 = {
      x1,
      y1,
      x2,
      y2
    };else x1 = new PointArray(x1).toLine();
    return this.attr(x1);
  }
  size(width, height) {
    const p = proportionalSize(this, width, height);
    return this.attr(this.array().size(p.width, p.height).toLine());
  }
};
extend(Line, pointed_exports);
registerMethods({
  Container: {
    line: wrapWithAttrCheck(function (...args) {
      return Line.prototype.plot.apply(this.put(new Line()), args[0] != null ? args : [0, 0, 0, 0]);
    })
  }
});
register(Line, "Line");

//#endregion
//#region src/elements/Marker.js
var Marker = class extends Container {
  constructor(node, attrs = node) {
    super(nodeOrNew("marker", node), attrs);
  }
  height(height) {
    return this.attr("markerHeight", height);
  }
  orient(orient) {
    return this.attr("orient", orient);
  }
  ref(x, y) {
    return this.attr("refX", x).attr("refY", y);
  }
  toString() {
    return "url(#" + this.id() + ")";
  }
  update(block) {
    this.clear();
    if (typeof block === "function") block.call(this, this);
    return this;
  }
  width(width) {
    return this.attr("markerWidth", width);
  }
};
registerMethods({
  Container: {
    marker(...args) {
      return this.defs().marker(...args);
    }
  },
  Defs: {
    marker: wrapWithAttrCheck(function (width, height, block) {
      return this.put(new Marker()).size(width, height).ref(width / 2, height / 2).viewbox(0, 0, width, height).attr("orient", "auto").update(block);
    })
  },
  marker: {
    marker(marker, width, height, block) {
      let attr = ["marker"];
      if (marker !== "all") attr.push(marker);
      attr = attr.join("-");
      marker = arguments[1] instanceof Marker ? arguments[1] : this.defs().marker(width, height, block);
      return this.attr(attr, marker);
    }
  }
});
register(Marker, "Marker");

//#endregion
//#region src/animation/Controller.js
/***
Base Class
==========
The base stepper class that will be
***/
function makeSetterGetter(k, f) {
  return function (v) {
    if (v == null) return this[k];
    this[k] = v;
    if (f) f.call(this);
    return this;
  };
}
const easing = {
  "-": function (pos) {
    return pos;
  },
  "<>": function (pos) {
    return -Math.cos(pos * Math.PI) / 2 + .5;
  },
  ">": function (pos) {
    return Math.sin(pos * Math.PI / 2);
  },
  "<": function (pos) {
    return -Math.cos(pos * Math.PI / 2) + 1;
  },
  bezier: function (x1, y1, x2, y2) {
    return function (t) {
      if (t < 0) {
        if (x1 > 0) return y1 / x1 * t;else if (x2 > 0) return y2 / x2 * t;else return 0;
      } else if (t > 1) {
        if (x2 < 1) return (1 - y2) / (1 - x2) * t + (y2 - x2) / (1 - x2);else if (x1 < 1) return (1 - y1) / (1 - x1) * t + (y1 - x1) / (1 - x1);else return 1;
      } else return 3 * t * (1 - t) ** 2 * y1 + 3 * t ** 2 * (1 - t) * y2 + t ** 3;
    };
  },
  steps: function (steps, stepPosition = "end") {
    stepPosition = stepPosition.split("-").reverse()[0];
    let jumps = steps;
    if (stepPosition === "none") --jumps;else if (stepPosition === "both") ++jumps;
    return (t, beforeFlag = false) => {
      let step = Math.floor(t * steps);
      const jumping = t * step % 1 === 0;
      if (stepPosition === "start" || stepPosition === "both") ++step;
      if (beforeFlag && jumping) --step;
      if (t >= 0 && step < 0) step = 0;
      if (t <= 1 && step > jumps) step = jumps;
      return step / jumps;
    };
  }
};
var Stepper = class {
  done() {
    return false;
  }
};
/***
Easing Functions
================
***/
var Ease = class extends Stepper {
  constructor(fn = timeline.ease) {
    super();
    this.ease = easing[fn] || fn;
  }
  step(from, to, pos) {
    if (typeof from !== "number") return pos < 1 ? from : to;
    return from + (to - from) * this.ease(pos);
  }
};
/***
Controller Types
================
***/
var Controller = class extends Stepper {
  constructor(fn) {
    super();
    this.stepper = fn;
  }
  done(c) {
    return c.done;
  }
  step(current, target, dt, c) {
    return this.stepper(current, target, dt, c);
  }
};
function recalculate() {
  const duration = (this._duration || 500) / 1e3;
  const overshoot = this._overshoot || 0;
  const eps = 1e-10;
  const pi = Math.PI;
  const os = Math.log(overshoot / 100 + eps);
  const zeta = -os / Math.sqrt(pi * pi + os * os);
  const wn = 3.9 / (zeta * duration);
  this.d = 2 * zeta * wn;
  this.k = wn * wn;
}
var Spring = class extends Controller {
  constructor(duration = 500, overshoot = 0) {
    super();
    this.duration(duration).overshoot(overshoot);
  }
  step(current, target, dt, c) {
    if (typeof current === "string") return current;
    c.done = dt === Infinity;
    if (dt === Infinity) return target;
    if (dt === 0) return current;
    if (dt > 100) dt = 16;
    dt /= 1e3;
    const velocity = c.velocity || 0;
    const acceleration = -this.d * velocity - this.k * (current - target);
    const newPosition = current + velocity * dt + acceleration * dt * dt / 2;
    c.velocity = velocity + acceleration * dt;
    c.done = Math.abs(target - newPosition) + Math.abs(velocity) < .002;
    return c.done ? target : newPosition;
  }
};
extend(Spring, {
  duration: makeSetterGetter("_duration", recalculate),
  overshoot: makeSetterGetter("_overshoot", recalculate)
});
var PID = class extends Controller {
  constructor(p = .1, i = .01, d = 0, windup = 1e3) {
    super();
    this.p(p).i(i).d(d).windup(windup);
  }
  step(current, target, dt, c) {
    if (typeof current === "string") return current;
    c.done = dt === Infinity;
    if (dt === Infinity) return target;
    if (dt === 0) return current;
    const p = target - current;
    let i = (c.integral || 0) + p * dt;
    const d = (p - (c.error || 0)) / dt;
    const windup = this._windup;
    if (windup !== false) i = Math.max(-windup, Math.min(i, windup));
    c.error = p;
    c.integral = i;
    c.done = Math.abs(p) < .001;
    return c.done ? target : current + (this.P * p + this.I * i + this.D * d);
  }
};
extend(PID, {
  windup: makeSetterGetter("_windup"),
  p: makeSetterGetter("P"),
  i: makeSetterGetter("I"),
  d: makeSetterGetter("D")
});

//#endregion
//#region src/utils/pathParser.js
const segmentParameters = {
  M: 2,
  L: 2,
  H: 1,
  V: 1,
  C: 6,
  S: 4,
  Q: 4,
  T: 2,
  A: 7,
  Z: 0
};
const pathHandlers = {
  M: function (c, p, p0) {
    p.x = p0.x = c[0];
    p.y = p0.y = c[1];
    return ["M", p.x, p.y];
  },
  L: function (c, p) {
    p.x = c[0];
    p.y = c[1];
    return ["L", c[0], c[1]];
  },
  H: function (c, p) {
    p.x = c[0];
    return ["H", c[0]];
  },
  V: function (c, p) {
    p.y = c[0];
    return ["V", c[0]];
  },
  C: function (c, p) {
    p.x = c[4];
    p.y = c[5];
    return ["C", c[0], c[1], c[2], c[3], c[4], c[5]];
  },
  S: function (c, p) {
    p.x = c[2];
    p.y = c[3];
    return ["S", c[0], c[1], c[2], c[3]];
  },
  Q: function (c, p) {
    p.x = c[2];
    p.y = c[3];
    return ["Q", c[0], c[1], c[2], c[3]];
  },
  T: function (c, p) {
    p.x = c[0];
    p.y = c[1];
    return ["T", c[0], c[1]];
  },
  Z: function (c, p, p0) {
    p.x = p0.x;
    p.y = p0.y;
    return ["Z"];
  },
  A: function (c, p) {
    p.x = c[5];
    p.y = c[6];
    return ["A", c[0], c[1], c[2], c[3], c[4], c[5], c[6]];
  }
};
const mlhvqtcsaz = "mlhvqtcsaz".split("");
for (let i = 0, il = mlhvqtcsaz.length; i < il; ++i) pathHandlers[mlhvqtcsaz[i]] = function (i) {
  return function (c, p, p0) {
    if (i === "H") c[0] = c[0] + p.x;else if (i === "V") c[0] = c[0] + p.y;else if (i === "A") {
      c[5] = c[5] + p.x;
      c[6] = c[6] + p.y;
    } else for (let j = 0, jl = c.length; j < jl; ++j) c[j] = c[j] + (j % 2 ? p.y : p.x);
    return pathHandlers[i](c, p, p0);
  };
}(mlhvqtcsaz[i].toUpperCase());
function makeAbsolut(parser) {
  return pathHandlers[parser.segment[0]](parser.segment.slice(1), parser.p, parser.p0);
}
function segmentComplete(parser) {
  return parser.segment.length && parser.segment.length - 1 === segmentParameters[parser.segment[0].toUpperCase()];
}
function startNewSegment(parser, token) {
  parser.inNumber && finalizeNumber(parser, false);
  const pathLetter = isPathLetter.test(token);
  if (pathLetter) parser.segment = [token];else {
    const lastCommand = parser.lastCommand;
    const small = lastCommand.toLowerCase();
    parser.segment = [small === "m" ? lastCommand === small ? "l" : "L" : lastCommand];
  }
  parser.inSegment = true;
  parser.lastCommand = parser.segment[0];
  return pathLetter;
}
function finalizeNumber(parser, inNumber) {
  if (!parser.inNumber) throw new Error("Parser Error");
  parser.number && parser.segment.push(parseFloat(parser.number));
  parser.inNumber = inNumber;
  parser.number = "";
  parser.pointSeen = false;
  parser.hasExponent = false;
  if (segmentComplete(parser)) finalizeSegment(parser);
}
function finalizeSegment(parser) {
  parser.inSegment = false;
  if (parser.absolute) parser.segment = makeAbsolut(parser);
  parser.segments.push(parser.segment);
}
function isArcFlag(parser) {
  if (!parser.segment.length) return false;
  const isArc = parser.segment[0].toUpperCase() === "A";
  const length = parser.segment.length;
  return isArc && (length === 4 || length === 5);
}
function isExponential(parser) {
  return parser.lastToken.toUpperCase() === "E";
}
const pathDelimiters = /* @__PURE__ */new Set([" ", ",", "	", "\n", "\r", "\f"]);
function pathParser(d, toAbsolute = true) {
  let index = 0;
  let token = "";
  const parser = {
    segment: [],
    inNumber: false,
    number: "",
    lastToken: "",
    inSegment: false,
    segments: [],
    pointSeen: false,
    hasExponent: false,
    absolute: toAbsolute,
    p0: new Point(),
    p: new Point()
  };
  while (parser.lastToken = token, token = d.charAt(index++)) {
    if (!parser.inSegment) {
      if (startNewSegment(parser, token)) continue;
    }
    if (token === ".") {
      if (parser.pointSeen || parser.hasExponent) {
        finalizeNumber(parser, false);
        --index;
        continue;
      }
      parser.inNumber = true;
      parser.pointSeen = true;
      parser.number += token;
      continue;
    }
    if (!isNaN(parseInt(token))) {
      if (parser.number === "0" || isArcFlag(parser)) {
        parser.inNumber = true;
        parser.number = token;
        finalizeNumber(parser, true);
        continue;
      }
      parser.inNumber = true;
      parser.number += token;
      continue;
    }
    if (pathDelimiters.has(token)) {
      if (parser.inNumber) finalizeNumber(parser, false);
      continue;
    }
    if (token === "-" || token === "+") {
      if (parser.inNumber && !isExponential(parser)) {
        finalizeNumber(parser, false);
        --index;
        continue;
      }
      parser.number += token;
      parser.inNumber = true;
      continue;
    }
    if (token.toUpperCase() === "E") {
      parser.number += token;
      parser.hasExponent = true;
      continue;
    }
    if (isPathLetter.test(token)) {
      if (parser.inNumber) finalizeNumber(parser, false);else if (!segmentComplete(parser)) throw new Error("parser Error");else finalizeSegment(parser);
      --index;
    }
  }
  if (parser.inNumber) finalizeNumber(parser, false);
  if (parser.inSegment && segmentComplete(parser)) finalizeSegment(parser);
  return parser.segments;
}

//#endregion
//#region src/types/PathArray.js
function arrayToString(a) {
  let s = "";
  for (let i = 0, il = a.length; i < il; i++) {
    s += a[i][0];
    if (a[i][1] != null) {
      s += a[i][1];
      if (a[i][2] != null) {
        s += " ";
        s += a[i][2];
        if (a[i][3] != null) {
          s += " ";
          s += a[i][3];
          s += " ";
          s += a[i][4];
          if (a[i][5] != null) {
            s += " ";
            s += a[i][5];
            s += " ";
            s += a[i][6];
            if (a[i][7] != null) {
              s += " ";
              s += a[i][7];
            }
          }
        }
      }
    }
  }
  return s + " ";
}
var PathArray = class extends SVGArray {
  bbox() {
    parser().path.setAttribute("d", this.toString());
    return new Box(parser.nodes.path.getBBox());
  }
  move(x, y) {
    const box = this.bbox();
    x -= box.x;
    y -= box.y;
    if (!isNaN(x) && !isNaN(y)) for (let l, i = this.length - 1; i >= 0; i--) {
      l = this[i][0];
      if (l === "M" || l === "L" || l === "T") {
        this[i][1] += x;
        this[i][2] += y;
      } else if (l === "H") this[i][1] += x;else if (l === "V") this[i][1] += y;else if (l === "C" || l === "S" || l === "Q") {
        this[i][1] += x;
        this[i][2] += y;
        this[i][3] += x;
        this[i][4] += y;
        if (l === "C") {
          this[i][5] += x;
          this[i][6] += y;
        }
      } else if (l === "A") {
        this[i][6] += x;
        this[i][7] += y;
      }
    }
    return this;
  }
  parse(d = "M0 0") {
    if (Array.isArray(d)) d = Array.prototype.concat.apply([], d).toString();
    return pathParser(d);
  }
  size(width, height) {
    const box = this.bbox();
    let i, l;
    box.width = box.width === 0 ? 1 : box.width;
    box.height = box.height === 0 ? 1 : box.height;
    for (i = this.length - 1; i >= 0; i--) {
      l = this[i][0];
      if (l === "M" || l === "L" || l === "T") {
        this[i][1] = (this[i][1] - box.x) * width / box.width + box.x;
        this[i][2] = (this[i][2] - box.y) * height / box.height + box.y;
      } else if (l === "H") this[i][1] = (this[i][1] - box.x) * width / box.width + box.x;else if (l === "V") this[i][1] = (this[i][1] - box.y) * height / box.height + box.y;else if (l === "C" || l === "S" || l === "Q") {
        this[i][1] = (this[i][1] - box.x) * width / box.width + box.x;
        this[i][2] = (this[i][2] - box.y) * height / box.height + box.y;
        this[i][3] = (this[i][3] - box.x) * width / box.width + box.x;
        this[i][4] = (this[i][4] - box.y) * height / box.height + box.y;
        if (l === "C") {
          this[i][5] = (this[i][5] - box.x) * width / box.width + box.x;
          this[i][6] = (this[i][6] - box.y) * height / box.height + box.y;
        }
      } else if (l === "A") {
        this[i][1] = this[i][1] * width / box.width;
        this[i][2] = this[i][2] * height / box.height;
        this[i][6] = (this[i][6] - box.x) * width / box.width + box.x;
        this[i][7] = (this[i][7] - box.y) * height / box.height + box.y;
      }
    }
    return this;
  }
  toString() {
    return arrayToString(this);
  }
};

//#endregion
//#region src/animation/Morphable.js
const getClassForType = value => {
  const type = typeof value;
  if (type === "number") return SVGNumber;else if (type === "string") {
    if (Color.isColor(value)) return Color;else if (delimiter.test(value)) return isPathLetter.test(value) ? PathArray : SVGArray;else if (numberAndUnit.test(value)) return SVGNumber;else return NonMorphable;
  } else if (morphableTypes.indexOf(value.constructor) > -1) return value.constructor;else if (Array.isArray(value)) return SVGArray;else if (type === "object") return ObjectBag;else return NonMorphable;
};
var Morphable = class {
  constructor(stepper) {
    this._stepper = stepper || new Ease("-");
    this._from = null;
    this._to = null;
    this._type = null;
    this._context = null;
    this._morphObj = null;
  }
  at(pos) {
    return this._morphObj.morph(this._from, this._to, pos, this._stepper, this._context);
  }
  done() {
    return this._context.map(this._stepper.done).reduce(function (last, curr) {
      return last && curr;
    }, true);
  }
  from(val) {
    if (val == null) return this._from;
    this._from = this._set(val);
    return this;
  }
  stepper(stepper) {
    if (stepper == null) return this._stepper;
    this._stepper = stepper;
    return this;
  }
  to(val) {
    if (val == null) return this._to;
    this._to = this._set(val);
    return this;
  }
  type(type) {
    if (type == null) return this._type;
    this._type = type;
    return this;
  }
  _set(value) {
    if (!this._type) this.type(getClassForType(value));
    let result = new this._type(value);
    if (this._type === Color) result = this._to ? result[this._to[4]]() : this._from ? result[this._from[4]]() : result;
    if (this._type === ObjectBag) result = this._to ? result.align(this._to) : this._from ? result.align(this._from) : result;
    result = result.toConsumable();
    this._morphObj = this._morphObj || new this._type();
    this._context = this._context || Array.apply(null, Array(result.length)).map(Object).map(function (o) {
      o.done = true;
      return o;
    });
    return result;
  }
};
var NonMorphable = class {
  constructor(...args) {
    this.init(...args);
  }
  init(val) {
    val = Array.isArray(val) ? val[0] : val;
    this.value = val;
    return this;
  }
  toArray() {
    return [this.value];
  }
  valueOf() {
    return this.value;
  }
};
var TransformBag = class TransformBag {
  constructor(...args) {
    this.init(...args);
  }
  init(obj) {
    if (Array.isArray(obj)) obj = {
      scaleX: obj[0],
      scaleY: obj[1],
      shear: obj[2],
      rotate: obj[3],
      translateX: obj[4],
      translateY: obj[5],
      originX: obj[6],
      originY: obj[7]
    };
    Object.assign(this, TransformBag.defaults, obj);
    return this;
  }
  toArray() {
    const v = this;
    return [v.scaleX, v.scaleY, v.shear, v.rotate, v.translateX, v.translateY, v.originX, v.originY];
  }
};
TransformBag.defaults = {
  scaleX: 1,
  scaleY: 1,
  shear: 0,
  rotate: 0,
  translateX: 0,
  translateY: 0,
  originX: 0,
  originY: 0
};
const sortByKey = (a, b) => {
  return a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0;
};
var ObjectBag = class {
  constructor(...args) {
    this.init(...args);
  }
  align(other) {
    const values = this.values;
    for (let i = 0, il = values.length; i < il; ++i) {
      if (values[i + 1] === other[i + 1]) {
        if (values[i + 1] === Color && other[i + 7] !== values[i + 7]) {
          const space = other[i + 7];
          const color = new Color(this.values.splice(i + 3, 5))[space]().toArray();
          this.values.splice(i + 3, 0, ...color);
        }
        i += values[i + 2] + 2;
        continue;
      }
      if (!other[i + 1]) return this;
      const defaultObject = new other[i + 1]().toArray();
      const toDelete = values[i + 2] + 3;
      values.splice(i, toDelete, other[i], other[i + 1], other[i + 2], ...defaultObject);
      i += values[i + 2] + 2;
    }
    return this;
  }
  init(objOrArr) {
    this.values = [];
    if (Array.isArray(objOrArr)) {
      this.values = objOrArr.slice();
      return;
    }
    objOrArr = objOrArr || {};
    const entries = [];
    for (const i in objOrArr) {
      const Type = getClassForType(objOrArr[i]);
      const val = new Type(objOrArr[i]).toArray();
      entries.push([i, Type, val.length, ...val]);
    }
    entries.sort(sortByKey);
    this.values = entries.reduce((last, curr) => last.concat(curr), []);
    return this;
  }
  toArray() {
    return this.values;
  }
  valueOf() {
    const obj = {};
    const arr = this.values;
    while (arr.length) {
      const key = arr.shift();
      const Type = arr.shift();
      const num = arr.shift();
      obj[key] = new Type(arr.splice(0, num));
    }
    return obj;
  }
};
const morphableTypes = [NonMorphable, TransformBag, ObjectBag];
function registerMorphableType(type = []) {
  morphableTypes.push(...[].concat(type));
}
function makeMorphable() {
  extend(morphableTypes, {
    to(val) {
      return new Morphable().type(this.constructor).from(this.toArray()).to(val);
    },
    fromArray(arr) {
      this.init(arr);
      return this;
    },
    toConsumable() {
      return this.toArray();
    },
    morph(from, to, pos, stepper, context) {
      const mapper = function (i, index) {
        return stepper.step(i, to[index], pos, context[index], context);
      };
      return this.fromArray(from.map(mapper));
    }
  });
}

//#endregion
//#region src/elements/Path.js
var Path = class extends Shape {
  constructor(node, attrs = node) {
    super(nodeOrNew("path", node), attrs);
  }
  array() {
    return this._array || (this._array = new PathArray(this.attr("d")));
  }
  clear() {
    delete this._array;
    return this;
  }
  height(height) {
    return height == null ? this.bbox().height : this.size(this.bbox().width, height);
  }
  move(x, y) {
    return this.attr("d", this.array().move(x, y));
  }
  plot(d) {
    return d == null ? this.array() : this.clear().attr("d", typeof d === "string" ? d : this._array = new PathArray(d));
  }
  size(width, height) {
    const p = proportionalSize(this, width, height);
    return this.attr("d", this.array().size(p.width, p.height));
  }
  width(width) {
    return width == null ? this.bbox().width : this.size(width, this.bbox().height);
  }
  x(x) {
    return x == null ? this.bbox().x : this.move(x, this.bbox().y);
  }
  y(y) {
    return y == null ? this.bbox().y : this.move(this.bbox().x, y);
  }
};
Path.prototype.MorphArray = PathArray;
registerMethods({
  Container: {
    path: wrapWithAttrCheck(function (d) {
      return this.put(new Path()).plot(d || new PathArray());
    })
  }
});
register(Path, "Path");

//#endregion
//#region src/modules/core/poly.js
var poly_exports = /* @__PURE__ */__exportAll({
  array: () => array,
  clear: () => clear,
  move: () => move$2,
  plot: () => plot,
  size: () => size$1
});
function array() {
  return this._array || (this._array = new PointArray(this.attr("points")));
}
function clear() {
  delete this._array;
  return this;
}
function move$2(x, y) {
  return this.attr("points", this.array().move(x, y));
}
function plot(p) {
  return p == null ? this.array() : this.clear().attr("points", typeof p === "string" ? p : this._array = new PointArray(p));
}
function size$1(width, height) {
  const p = proportionalSize(this, width, height);
  return this.attr("points", this.array().size(p.width, p.height));
}

//#endregion
//#region src/elements/Polygon.js
var Polygon = class extends Shape {
  constructor(node, attrs = node) {
    super(nodeOrNew("polygon", node), attrs);
  }
};
registerMethods({
  Container: {
    polygon: wrapWithAttrCheck(function (p) {
      return this.put(new Polygon()).plot(p || new PointArray());
    })
  }
});
extend(Polygon, pointed_exports);
extend(Polygon, poly_exports);
register(Polygon, "Polygon");

//#endregion
//#region src/elements/Polyline.js
var Polyline = class extends Shape {
  constructor(node, attrs = node) {
    super(nodeOrNew("polyline", node), attrs);
  }
};
registerMethods({
  Container: {
    polyline: wrapWithAttrCheck(function (p) {
      return this.put(new Polyline()).plot(p || new PointArray());
    })
  }
});
extend(Polyline, pointed_exports);
extend(Polyline, poly_exports);
register(Polyline, "Polyline");

//#endregion
//#region src/elements/Rect.js
var Rect = class extends Shape {
  constructor(node, attrs = node) {
    super(nodeOrNew("rect", node), attrs);
  }
};
extend(Rect, {
  rx,
  ry
});
registerMethods({
  Container: {
    rect: wrapWithAttrCheck(function (width, height) {
      return this.put(new Rect()).size(width, height);
    })
  }
});
register(Rect, "Rect");

//#endregion
//#region src/animation/Queue.js
var Queue = class {
  constructor() {
    this._first = null;
    this._last = null;
  }
  first() {
    return this._first && this._first.value;
  }
  last() {
    return this._last && this._last.value;
  }
  push(value) {
    const item = typeof value.next !== "undefined" ? value : {
      value,
      next: null,
      prev: null
    };
    if (this._last) {
      item.prev = this._last;
      this._last.next = item;
      this._last = item;
    } else {
      this._last = item;
      this._first = item;
    }
    return item;
  }
  remove(item) {
    if (item.prev) item.prev.next = item.next;
    if (item.next) item.next.prev = item.prev;
    if (item === this._last) this._last = item.prev;
    if (item === this._first) this._first = item.next;
    item.prev = null;
    item.next = null;
  }
  shift() {
    const remove = this._first;
    if (!remove) return null;
    this._first = remove.next;
    if (this._first) this._first.prev = null;
    this._last = this._first ? this._last : null;
    return remove.value;
  }
};

//#endregion
//#region src/animation/Animator.js
const Animator = {
  nextDraw: null,
  frames: new Queue(),
  timeouts: new Queue(),
  immediates: new Queue(),
  timer: () => globals.window.performance || globals.window.Date,
  transforms: [],
  frame(fn) {
    const node = Animator.frames.push({
      run: fn
    });
    if (Animator.nextDraw === null) Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw);
    return node;
  },
  timeout(fn, delay) {
    delay = delay || 0;
    const time = Animator.timer().now() + delay;
    const node = Animator.timeouts.push({
      run: fn,
      time
    });
    if (Animator.nextDraw === null) Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw);
    return node;
  },
  immediate(fn) {
    const node = Animator.immediates.push(fn);
    if (Animator.nextDraw === null) Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw);
    return node;
  },
  cancelFrame(node) {
    node != null && Animator.frames.remove(node);
  },
  clearTimeout(node) {
    node != null && Animator.timeouts.remove(node);
  },
  cancelImmediate(node) {
    node != null && Animator.immediates.remove(node);
  },
  _draw(now) {
    try {
      let nextTimeout = null;
      const lastTimeout = Animator.timeouts.last();
      while (nextTimeout = Animator.timeouts.shift()) {
        if (now >= nextTimeout.time) nextTimeout.run();else Animator.timeouts.push(nextTimeout);
        if (nextTimeout === lastTimeout) break;
      }
      let nextFrame = null;
      const lastFrame = Animator.frames.last();
      while (nextFrame !== lastFrame && (nextFrame = Animator.frames.shift())) nextFrame.run(now);
      let nextImmediate = null;
      while (nextImmediate = Animator.immediates.shift()) nextImmediate();
    } finally {
      const pending = Animator.timeouts.first() || Animator.frames.first() || Animator.immediates.first();
      Animator.nextDraw = pending ? globals.window.requestAnimationFrame(Animator._draw) : null;
    }
  }
};

//#endregion
//#region src/animation/Timeline.js
const makeSchedule = function (runnerInfo) {
  const start = runnerInfo.start;
  const duration = runnerInfo.runner.duration();
  return {
    start,
    duration,
    end: start + duration,
    runner: runnerInfo.runner
  };
};
const defaultSource = function () {
  const w = globals.window;
  return (w.performance || w.Date).now();
};
var Timeline = class extends EventTarget {
  constructor(timeSource = defaultSource) {
    super();
    this._timeSource = timeSource;
    this.terminate();
  }
  active() {
    return !!this._nextFrame;
  }
  finish() {
    this.time(this.getEndTimeOfTimeline() + 1);
    return this.pause();
  }
  getEndTime() {
    const lastRunnerInfo = this.getLastRunnerInfo();
    const lastDuration = lastRunnerInfo ? lastRunnerInfo.runner.duration() : 0;
    return (lastRunnerInfo ? lastRunnerInfo.start : this._time) + lastDuration;
  }
  getEndTimeOfTimeline() {
    const endTimes = this._runners.map(i => i.start + i.runner.duration());
    return Math.max(0, ...endTimes);
  }
  getLastRunnerInfo() {
    return this.getRunnerInfoById(this._lastRunnerId);
  }
  getRunnerInfoById(id) {
    return this._runners[this._runnerIds.indexOf(id)] || null;
  }
  pause() {
    this._paused = true;
    return this._continue();
  }
  persist(dtOrForever) {
    if (dtOrForever == null) return this._persist;
    this._persist = dtOrForever;
    return this;
  }
  play() {
    this._paused = false;
    return this.updateTime()._continue();
  }
  reverse(yes) {
    const currentSpeed = this.speed();
    if (yes == null) return this.speed(-currentSpeed);
    const positive = Math.abs(currentSpeed);
    return this.speed(yes ? -positive : positive);
  }
  schedule(runner, delay, when) {
    if (runner == null) return this._runners.map(makeSchedule);
    let absoluteStartTime = 0;
    const endTime = this.getEndTime();
    delay = delay || 0;
    if (when == null || when === "last" || when === "after") absoluteStartTime = endTime;else if (when === "absolute" || when === "start") {
      absoluteStartTime = delay;
      delay = 0;
    } else if (when === "now") absoluteStartTime = this._time;else if (when === "relative") {
      const runnerInfo = this.getRunnerInfoById(runner.id);
      if (runnerInfo) {
        absoluteStartTime = runnerInfo.start + delay;
        delay = 0;
      }
    } else if (when === "with-last") {
      const lastRunnerInfo = this.getLastRunnerInfo();
      absoluteStartTime = lastRunnerInfo ? lastRunnerInfo.start : this._time;
    } else throw new Error("Invalid value for the \"when\" parameter");
    runner.unschedule();
    runner.timeline(this);
    const persist = runner.persist();
    const runnerInfo = {
      persist: persist === null ? this._persist : persist,
      start: absoluteStartTime + delay,
      runner
    };
    this._lastRunnerId = runner.id;
    this._runners.push(runnerInfo);
    this._runners.sort((a, b) => a.start - b.start);
    this._runnerIds = this._runners.map(info => info.runner.id);
    this.updateTime()._continue();
    return this;
  }
  seek(dt) {
    return this.time(this._time + dt);
  }
  source(fn) {
    if (fn == null) return this._timeSource;
    this._timeSource = fn;
    return this;
  }
  speed(speed) {
    if (speed == null) return this._speed;
    this._speed = speed;
    return this;
  }
  stop() {
    this.time(0);
    return this.pause();
  }
  time(time) {
    if (time == null) return this._time;
    this._time = time;
    return this._continue(true);
  }
  unschedule(runner) {
    const index = this._runnerIds.indexOf(runner.id);
    if (index < 0) return this;
    this._runners.splice(index, 1);
    this._runnerIds.splice(index, 1);
    runner.timeline(null);
    return this;
  }
  updateTime() {
    if (!this.active()) this._lastSourceTime = this._timeSource();
    return this;
  }
  _continue(immediateStep = false) {
    Animator.cancelFrame(this._nextFrame);
    this._nextFrame = null;
    if (immediateStep) return this._stepImmediate();
    if (this._paused) return this;
    this._nextFrame = Animator.frame(this._step);
    return this;
  }
  _stepFn(immediateStep = false) {
    const time = this._timeSource();
    let dtSource = time - this._lastSourceTime;
    if (immediateStep) dtSource = 0;
    const dtTime = this._speed * dtSource + (this._time - this._lastStepTime);
    this._lastSourceTime = time;
    if (!immediateStep) {
      this._time += dtTime;
      this._time = this._time < 0 ? 0 : this._time;
    }
    this._lastStepTime = this._time;
    this.fire("time", this._time);
    for (let k = this._runners.length; k--;) {
      const runnerInfo = this._runners[k];
      const runner = runnerInfo.runner;
      if (this._time - runnerInfo.start <= 0) runner.reset();
    }
    let runnersLeft = false;
    for (let i = 0, len = this._runners.length; i < len; i++) {
      const runnerInfo = this._runners[i];
      const runner = runnerInfo.runner;
      let dt = dtTime;
      const dtToStart = this._time - runnerInfo.start;
      if (dtToStart <= 0) {
        runnersLeft = true;
        continue;
      } else if (dtToStart < dt) dt = dtToStart;
      if (!runner.active()) continue;
      if (!runner.step(dt).done) runnersLeft = true;else if (runnerInfo.persist !== true) {
        if (runner.duration() - runner.time() + this._time + runnerInfo.persist < this._time) {
          runner.unschedule();
          --i;
          --len;
        }
      }
    }
    if (runnersLeft && !(this._speed < 0 && this._time === 0) || this._runnerIds.length && this._speed < 0 && this._time > 0) this._continue();else {
      this.pause();
      this.fire("finished");
    }
    return this;
  }
  terminate() {
    this._startTime = 0;
    this._speed = 1;
    this._persist = 0;
    this._nextFrame = null;
    this._paused = true;
    this._runners = [];
    this._runnerIds = [];
    this._lastRunnerId = -1;
    this._time = 0;
    this._lastSourceTime = 0;
    this._lastStepTime = 0;
    this._step = this._stepFn.bind(this, false);
    this._stepImmediate = this._stepFn.bind(this, true);
  }
};
registerMethods({
  Element: {
    timeline: function (timeline) {
      if (timeline == null) {
        this._timeline = this._timeline || new Timeline();
        return this._timeline;
      } else {
        this._timeline = timeline;
        return this;
      }
    }
  }
});

//#endregion
//#region src/animation/Runner.js
var Runner = class Runner extends EventTarget {
  constructor(options) {
    super();
    this.id = Runner.id++;
    options = options == null ? timeline.duration : options;
    options = typeof options === "function" ? new Controller(options) : options;
    this._element = null;
    this._timeline = null;
    this.done = false;
    this._queue = [];
    this._duration = typeof options === "number" && options;
    this._isDeclarative = options instanceof Controller;
    this._stepper = this._isDeclarative ? options : new Ease();
    this._history = {};
    this.enabled = true;
    this._time = 0;
    this._lastTime = 0;
    this._reseted = true;
    this.transforms = new Matrix();
    this.transformId = 1;
    this._haveReversed = false;
    this._reverse = false;
    this._loopsDone = 0;
    this._swing = false;
    this._wait = 0;
    this._times = 1;
    this._frameId = null;
    this._persist = this._isDeclarative ? true : null;
  }
  static sanitise(duration, delay, when) {
    let times = 1;
    let swing = false;
    let wait = 0;
    duration = duration ?? timeline.duration;
    delay = delay ?? timeline.delay;
    when = when || "last";
    if (typeof duration === "object" && !(duration instanceof Stepper)) {
      delay = duration.delay ?? delay;
      when = duration.when ?? when;
      swing = duration.swing || swing;
      times = duration.times ?? times;
      wait = duration.wait ?? wait;
      duration = duration.duration ?? timeline.duration;
    }
    return {
      duration,
      delay,
      swing,
      times,
      wait,
      when
    };
  }
  active(enabled) {
    if (enabled == null) return this.enabled;
    this.enabled = enabled;
    return this;
  }
  addTransform(transform) {
    this.transforms.lmultiplyO(transform);
    return this;
  }
  after(fn) {
    return this.on("finished", fn);
  }
  animate(duration, delay, when) {
    const o = Runner.sanitise(duration, delay, when);
    const runner = new Runner(o.duration);
    if (this._timeline) runner.timeline(this._timeline);
    if (this._element) runner.element(this._element);
    return runner.loop(o).schedule(o.delay, o.when);
  }
  clearTransform() {
    this.transforms = new Matrix();
    return this;
  }
  clearTransformsFromQueue() {
    var _context;
    if (!this.done || !this._timeline || !(0, import_includes.default)(_context = this._timeline._runnerIds).call(_context, this.id)) this._queue = this._queue.filter(item => {
      return !item.isTransform;
    });
  }
  delay(delay) {
    return this.animate(0, delay);
  }
  duration() {
    return this._times * (this._wait + this._duration) - this._wait;
  }
  during(fn) {
    return this.queue(null, fn);
  }
  ease(fn) {
    this._stepper = new Ease(fn);
    return this;
  }
  element(element) {
    if (element == null) return this._element;
    this._element = element;
    element._prepareRunner();
    return this;
  }
  finish() {
    return this.step(Infinity);
  }
  loop(times, swing, wait) {
    if (typeof times === "object") {
      swing = times.swing;
      wait = times.wait;
      times = times.times;
    }
    this._times = times || Infinity;
    this._swing = swing || false;
    this._wait = wait || 0;
    if (this._times === true) this._times = Infinity;
    return this;
  }
  loops(p) {
    const loopDuration = this._duration + this._wait;
    if (p == null) {
      const loopsDone = Math.floor(this._time / loopDuration);
      const position = (this._time - loopsDone * loopDuration) / this._duration;
      return Math.min(loopsDone + position, this._times);
    }
    const whole = Math.floor(p);
    const partial = p % 1;
    const time = loopDuration * whole + this._duration * partial;
    return this.time(time);
  }
  persist(dtOrForever) {
    if (dtOrForever == null) return this._persist;
    this._persist = dtOrForever;
    return this;
  }
  position(p) {
    const x = this._time;
    const d = this._duration;
    const w = this._wait;
    const t = this._times;
    const s = this._swing;
    const r = this._reverse;
    let position;
    if (p == null) {
      const f = function (x) {
        const swinging = s * Math.floor(x % (2 * (w + d)) / (w + d));
        const backwards = swinging && !r || !swinging && r;
        const uncliped = Math.pow(-1, backwards) * (x % (w + d)) / d + backwards;
        return Math.max(Math.min(uncliped, 1), 0);
      };
      const endTime = t * (w + d) - w;
      position = x <= 0 ? Math.round(f(1e-5)) : x < endTime ? f(x) : Math.round(f(endTime - 1e-5));
      return position;
    }
    const loopsDone = Math.floor(this.loops());
    const swingForward = s && loopsDone % 2 === 0;
    position = loopsDone + (swingForward && !r || r && swingForward ? p : 1 - p);
    return this.loops(position);
  }
  progress(p) {
    if (p == null) return Math.min(1, this._time / this.duration());
    return this.time(p * this.duration());
  }
  queue(initFn, runFn, retargetFn, isTransform) {
    this._queue.push({
      initialiser: initFn || noop,
      runner: runFn || noop,
      retarget: retargetFn,
      isTransform,
      initialised: false,
      finished: false
    });
    this.timeline() && this.timeline()._continue();
    return this;
  }
  reset() {
    if (this._reseted) return this;
    this.time(0);
    this._reseted = true;
    return this;
  }
  reverse(reverse) {
    this._reverse = reverse == null ? !this._reverse : reverse;
    return this;
  }
  schedule(timeline, delay, when) {
    if (!(timeline instanceof Timeline)) {
      when = delay;
      delay = timeline;
      timeline = this.timeline();
    }
    if (!timeline) throw Error("Runner cannot be scheduled without timeline");
    timeline.schedule(this, delay, when);
    return this;
  }
  step(dt) {
    if (!this.enabled) return this;
    dt = dt == null ? 16 : dt;
    this._time += dt;
    const position = this.position();
    const running = this._lastPosition !== position && this._time >= 0;
    this._lastPosition = position;
    const duration = this.duration();
    const justStarted = this._lastTime <= 0 && this._time > 0;
    const justFinished = this._lastTime < duration && this._time >= duration;
    this._lastTime = this._time;
    if (justStarted) this.fire("start", this);
    const declarative = this._isDeclarative;
    this.done = !declarative && !justFinished && this._time >= duration;
    this._reseted = false;
    let converged = false;
    if (running || declarative) {
      this._initialise(running);
      this.transforms = new Matrix();
      converged = this._run(declarative ? dt : position);
      this.fire("step", this);
    }
    this.done = this.done || converged && declarative;
    if (justFinished) this.fire("finished", this);
    return this;
  }
  time(time) {
    if (time == null) return this._time;
    const dt = time - this._time;
    this.step(dt);
    return this;
  }
  timeline(timeline) {
    if (typeof timeline === "undefined") return this._timeline;
    this._timeline = timeline;
    return this;
  }
  unschedule() {
    const timeline = this.timeline();
    timeline && timeline.unschedule(this);
    return this;
  }
  _initialise(running) {
    if (!running && !this._isDeclarative) return;
    for (let i = 0, len = this._queue.length; i < len; ++i) {
      const current = this._queue[i];
      const needsIt = this._isDeclarative || !current.initialised && running;
      running = !current.finished;
      if (needsIt && running) {
        current.initialiser.call(this);
        current.initialised = true;
      }
    }
  }
  _rememberMorpher(method, morpher) {
    this._history[method] = {
      morpher,
      caller: this._queue[this._queue.length - 1]
    };
    if (this._isDeclarative) {
      const timeline = this.timeline();
      timeline && timeline.play();
    }
  }
  _run(positionOrDt) {
    let allfinished = true;
    for (let i = 0, len = this._queue.length; i < len; ++i) {
      const current = this._queue[i];
      const converged = current.runner.call(this, positionOrDt);
      current.finished = current.finished || converged === true;
      allfinished = allfinished && current.finished;
    }
    return allfinished;
  }
  _tryRetarget(method, target, extra) {
    if (this._history[method]) {
      if (!this._history[method].caller.initialised) {
        const index = this._queue.indexOf(this._history[method].caller);
        this._queue.splice(index, 1);
        return false;
      }
      if (this._history[method].caller.retarget) this._history[method].caller.retarget.call(this, target, extra);else this._history[method].morpher.to(target);
      this._history[method].caller.finished = false;
      const timeline = this.timeline();
      timeline && timeline.play();
      return true;
    }
    return false;
  }
};
Runner.id = 0;
var FakeRunner = class {
  constructor(transforms = new Matrix(), id = -1, done = true) {
    this.transforms = transforms;
    this.id = id;
    this.done = done;
  }
  clearTransformsFromQueue() {}
};
extend([Runner, FakeRunner], {
  mergeWith(runner) {
    return new FakeRunner(runner.transforms.lmultiply(this.transforms), runner.id);
  }
});
const lmultiply = (last, curr) => last.lmultiplyO(curr);
const getRunnerTransform = runner => runner.transforms;
function mergeTransforms() {
  const netTransform = this._transformationRunners.runners.map(getRunnerTransform).reduce(lmultiply, new Matrix());
  this.transform(netTransform);
  this._transformationRunners.merge();
  if (this._transformationRunners.length() === 1) this._frameId = null;
}
var RunnerArray = class {
  constructor() {
    this.runners = [];
    this.ids = [];
  }
  add(runner) {
    var _context2;
    if ((0, import_includes.default)(_context2 = this.runners).call(_context2, runner)) return;
    const id = runner.id + 1;
    this.runners.push(runner);
    this.ids.push(id);
    return this;
  }
  clearBefore(id) {
    const deleteCnt = this.ids.indexOf(id + 1) || 1;
    this.ids.splice(0, deleteCnt, 0);
    this.runners.splice(0, deleteCnt, new FakeRunner()).forEach(r => r.clearTransformsFromQueue());
    return this;
  }
  edit(id, newRunner) {
    const index = this.ids.indexOf(id + 1);
    this.ids.splice(index, 1, id + 1);
    this.runners.splice(index, 1, newRunner);
    return this;
  }
  getByID(id) {
    return this.runners[this.ids.indexOf(id + 1)];
  }
  length() {
    return this.ids.length;
  }
  merge() {
    let lastRunner = null;
    for (let i = 0; i < this.runners.length; ++i) {
      var _context3, _context4;
      const runner = this.runners[i];
      if (lastRunner && runner.done && lastRunner.done && (!runner._timeline || !(0, import_includes.default)(_context3 = runner._timeline._runnerIds).call(_context3, runner.id)) && (!lastRunner._timeline || !(0, import_includes.default)(_context4 = lastRunner._timeline._runnerIds).call(_context4, lastRunner.id))) {
        this.remove(runner.id);
        const newRunner = runner.mergeWith(lastRunner);
        this.edit(lastRunner.id, newRunner);
        lastRunner = newRunner;
        --i;
      } else lastRunner = runner;
    }
    return this;
  }
  remove(id) {
    const index = this.ids.indexOf(id + 1);
    this.ids.splice(index, 1);
    this.runners.splice(index, 1);
    return this;
  }
};
registerMethods({
  Element: {
    animate(duration, delay, when) {
      const o = Runner.sanitise(duration, delay, when);
      const timeline = this.timeline();
      return new Runner(o.duration).loop(o).element(this).timeline(timeline.play()).schedule(o.delay, o.when);
    },
    delay(by, when) {
      return this.animate(0, by, when);
    },
    _clearTransformRunnersBefore(currentRunner) {
      this._transformationRunners.clearBefore(currentRunner.id);
    },
    _currentTransform(current) {
      return this._transformationRunners.runners.filter(runner => runner.id <= current.id).map(getRunnerTransform).reduce(lmultiply, new Matrix());
    },
    _addRunner(runner) {
      this._transformationRunners.add(runner);
      Animator.cancelImmediate(this._frameId);
      this._frameId = Animator.immediate(mergeTransforms.bind(this));
    },
    _prepareRunner() {
      if (this._frameId == null) this._transformationRunners = new RunnerArray().add(new FakeRunner(new Matrix(this)));
    }
  }
});
const difference = (a, b) => a.filter(x => !(0, import_includes.default)(b).call(b, x));
extend(Runner, {
  attr(a, v) {
    return this.styleAttr("attr", a, v);
  },
  css(s, v) {
    return this.styleAttr("css", s, v);
  },
  styleAttr(type, nameOrAttrs, val) {
    if (typeof nameOrAttrs === "string") return this.styleAttr(type, {
      [nameOrAttrs]: val
    });
    const attrs = nameOrAttrs;
    const history = this._history[type];
    if (history && !history.caller.initialised && history.caller.retarget) {
      history.caller.retarget.call(this, attrs);
      return this;
    }
    if (this._tryRetarget(type, attrs)) return this;
    let morpher = new Morphable(this._stepper).to(attrs);
    let keys = Object.keys(attrs);
    this.queue(function () {
      morpher = morpher.from(this.element()[type](keys));
    }, function (pos) {
      this.element()[type](morpher.at(pos).valueOf());
      return morpher.done();
    }, function (newToAttrs) {
      const differences = difference(Object.keys(newToAttrs), keys);
      if (differences.length && morpher.from() != null) {
        const addedFromAttrs = this.element()[type](differences);
        const oldFromAttrs = new ObjectBag(morpher.from()).valueOf();
        Object.assign(oldFromAttrs, addedFromAttrs);
        morpher.from(oldFromAttrs);
      }
      const mergedToAttrs = new ObjectBag(morpher.to()).valueOf();
      Object.assign(mergedToAttrs, newToAttrs);
      morpher.to(mergedToAttrs);
      keys = Object.keys(mergedToAttrs);
    });
    this._rememberMorpher(type, morpher);
    return this;
  },
  zoom(level, point) {
    if (this._tryRetarget("zoom", level, point)) return this;
    let morpher = new Morphable(this._stepper).to(new SVGNumber(level));
    this.queue(function () {
      morpher = morpher.from(this.element().zoom());
    }, function (pos) {
      this.element().zoom(morpher.at(pos), point);
      return morpher.done();
    }, function (newLevel, newPoint) {
      point = newPoint;
      morpher.to(newLevel);
    });
    this._rememberMorpher("zoom", morpher);
    return this;
  },
  /**
  ** absolute transformations
  **/
  transform(transforms, relative, affine) {
    relative = transforms.relative || relative;
    if (this._isDeclarative && !relative && this._tryRetarget("transform", transforms)) return this;
    const isMatrix = Matrix.isMatrixLike(transforms);
    affine = transforms.affine != null ? transforms.affine : affine != null ? affine : !isMatrix;
    const morpher = new Morphable(this._stepper).type(affine ? TransformBag : Matrix);
    let origin;
    let element;
    let current;
    let currentAngle;
    let startTransform;
    function setup() {
      element = element || this.element();
      origin = origin || getOrigin(transforms, element);
      startTransform = new Matrix(relative ? void 0 : element);
      element._addRunner(this);
      if (!relative) element._clearTransformRunnersBefore(this);
    }
    function run(pos) {
      if (!relative) this.clearTransform();
      const {
        x,
        y
      } = new Point(origin).transform(element._currentTransform(this));
      const targetTransforms = {
        ...transforms,
        origin: [x, y]
      };
      if (targetTransforms.relative === true) delete targetTransforms.relative;
      let target = new Matrix(targetTransforms);
      let start = this._isDeclarative && current ? current : startTransform;
      if (affine) {
        target = target.decompose(x, y);
        start = start.decompose(x, y);
        const rTarget = target.rotate;
        const rCurrent = start.rotate;
        const possibilities = [rTarget - 360, rTarget, rTarget + 360];
        const distances = possibilities.map(a => Math.abs(a - rCurrent));
        const shortest = Math.min(...distances);
        const index = distances.indexOf(shortest);
        target.rotate = possibilities[index];
      }
      if (relative) {
        if (!isMatrix) target.rotate = transforms.rotate || 0;
        if (this._isDeclarative && currentAngle) start.rotate = currentAngle;
      }
      morpher.from(start);
      morpher.to(target);
      const affineParameters = morpher.at(pos);
      currentAngle = affineParameters.rotate;
      current = new Matrix(affineParameters);
      this.addTransform(current);
      element._addRunner(this);
      return morpher.done();
    }
    function retarget(newTransforms) {
      if ((newTransforms.origin || "center").toString() !== (transforms.origin || "center").toString()) origin = getOrigin(newTransforms, element);
      transforms = {
        ...newTransforms,
        origin
      };
    }
    this.queue(setup, run, retarget, true);
    this._isDeclarative && this._rememberMorpher("transform", morpher);
    return this;
  },
  x(x) {
    return this._queueNumber("x", x);
  },
  y(y) {
    return this._queueNumber("y", y);
  },
  ax(x) {
    return this._queueNumber("ax", x);
  },
  ay(y) {
    return this._queueNumber("ay", y);
  },
  dx(x = 0) {
    return this._queueNumberDelta("x", x);
  },
  dy(y = 0) {
    return this._queueNumberDelta("y", y);
  },
  dmove(x, y) {
    return this.dx(x).dy(y);
  },
  _queueNumberDelta(method, to) {
    to = new SVGNumber(to);
    if (this._tryRetarget(method, to)) return this;
    const morpher = new Morphable(this._stepper).to(to);
    let from = null;
    this.queue(function () {
      from = this.element()[method]();
      morpher.from(from);
      morpher.to(from + to);
    }, function (pos) {
      this.element()[method](morpher.at(pos));
      return morpher.done();
    }, function (newTo) {
      morpher.to(from + new SVGNumber(newTo));
    });
    this._rememberMorpher(method, morpher);
    return this;
  },
  _queueObject(method, to) {
    if (this._tryRetarget(method, to)) return this;
    const morpher = new Morphable(this._stepper).to(to);
    this.queue(function () {
      morpher.from(this.element()[method]());
    }, function (pos) {
      this.element()[method](morpher.at(pos));
      return morpher.done();
    });
    this._rememberMorpher(method, morpher);
    return this;
  },
  _queueNumber(method, value) {
    return this._queueObject(method, new SVGNumber(value));
  },
  cx(x) {
    return this._queueNumber("cx", x);
  },
  cy(y) {
    return this._queueNumber("cy", y);
  },
  move(x, y) {
    return this.x(x).y(y);
  },
  amove(x, y) {
    return this.ax(x).ay(y);
  },
  center(x, y) {
    return this.cx(x).cy(y);
  },
  size(width, height) {
    const size = proportionalSize(this._element, width, height);
    return this.width(size.width).height(size.height);
  },
  width(width) {
    return this._queueNumber("width", width);
  },
  height(height) {
    return this._queueNumber("height", height);
  },
  plot(a, b, c, d) {
    if (arguments.length === 4) return this.plot([a, b, c, d]);
    if (this._tryRetarget("plot", a)) return this;
    const morpher = new Morphable(this._stepper).type(this._element.MorphArray).to(a);
    this.queue(function () {
      morpher.from(this._element.array());
    }, function (pos) {
      this._element.plot(morpher.at(pos));
      return morpher.done();
    });
    this._rememberMorpher("plot", morpher);
    return this;
  },
  leading(value) {
    return this._queueNumber("leading", value);
  },
  viewbox(x, y, width, height) {
    return this._queueObject("viewbox", new Box(x, y, width, height));
  },
  update(o) {
    if (typeof o !== "object") return this.update({
      offset: arguments[0],
      color: arguments[1],
      opacity: arguments[2]
    });
    if (o.opacity != null) this.attr("stop-opacity", o.opacity);
    if (o.color != null) this.attr("stop-color", o.color);
    if (o.offset != null) this.attr("offset", o.offset);
    return this;
  }
});
extend(Runner, {
  rx,
  ry,
  from,
  to
});
register(Runner, "Runner");

//#endregion
//#region src/elements/Svg.js
var Svg = class extends Container {
  constructor(node, attrs = node) {
    super(nodeOrNew("svg", node), attrs);
    this.namespace();
  }
  defs() {
    if (!this.isRoot()) return this.root().defs();
    return adopt(this.node.querySelector("defs")) || this.put(new Defs());
  }
  isRoot() {
    return !this.node.parentNode || !(this.node.parentNode instanceof globals.window.SVGElement) && this.node.parentNode.nodeName !== "#document-fragment";
  }
  namespace() {
    if (!this.isRoot()) return this.root().namespace();
    return this.attr({
      xmlns: svg,
      version: "1.1"
    }).attr("xmlns:xlink", xlink, xmlns);
  }
  removeNamespace() {
    return this.attr({
      xmlns: null,
      version: null
    }).attr("xmlns:xlink", null, xmlns).attr("xmlns:svgjs", null, xmlns);
  }
  root() {
    if (this.isRoot()) return this;
    return super.root();
  }
};
registerMethods({
  Container: {
    nested: wrapWithAttrCheck(function () {
      return this.put(new Svg());
    })
  }
});
register(Svg, "Svg", true);

//#endregion
//#region src/elements/Symbol.js
var Symbol$1 = class extends Container {
  constructor(node, attrs = node) {
    super(nodeOrNew("symbol", node), attrs);
  }
};
registerMethods({
  Container: {
    symbol: wrapWithAttrCheck(function () {
      return this.put(new Symbol$1());
    })
  }
});
register(Symbol$1, "Symbol");

//#endregion
//#region src/modules/core/textable.js
var textable_exports = /* @__PURE__ */__exportAll({
  amove: () => amove,
  ax: () => ax,
  ay: () => ay,
  build: () => build,
  center: () => center,
  cx: () => cx,
  cy: () => cy,
  length: () => length,
  move: () => move$1,
  plain: () => plain,
  x: () => x$1,
  y: () => y$1
});
function plain(text) {
  if (this._build === false) this.clear();
  this.node.appendChild(globals.document.createTextNode(text));
  return this;
}
function length() {
  return this.node.getComputedTextLength();
}
function x$1(x, box = this.bbox()) {
  if (x == null) return box.x;
  return this.attr("x", this.attr("x") + x - box.x);
}
function y$1(y, box = this.bbox()) {
  if (y == null) return box.y;
  return this.attr("y", this.attr("y") + y - box.y);
}
function move$1(x, y, box = this.bbox()) {
  return this.x(x, box).y(y, box);
}
function cx(x, box = this.bbox()) {
  if (x == null) return box.cx;
  return this.attr("x", this.attr("x") + x - box.cx);
}
function cy(y, box = this.bbox()) {
  if (y == null) return box.cy;
  return this.attr("y", this.attr("y") + y - box.cy);
}
function center(x, y, box = this.bbox()) {
  return this.cx(x, box).cy(y, box);
}
function ax(x) {
  return this.attr("x", x);
}
function ay(y) {
  return this.attr("y", y);
}
function amove(x, y) {
  return this.ax(x).ay(y);
}
function build(build) {
  this._build = !!build;
  return this;
}

//#endregion
//#region src/elements/Text.js
var Text = class extends Shape {
  constructor(node, attrs = node) {
    super(nodeOrNew("text", node), attrs);
    this.dom.leading = this.dom.leading ?? new SVGNumber(1.3);
    this._rebuild = true;
    this._build = false;
  }
  leading(value) {
    if (value == null) return this.dom.leading;
    this.dom.leading = new SVGNumber(value);
    return this.rebuild();
  }
  rebuild(rebuild) {
    if (typeof rebuild === "boolean") this._rebuild = rebuild;
    if (this._rebuild) {
      const self = this;
      let blankLineOffset = 0;
      const leading = this.dom.leading;
      this.each(function (i) {
        if (isDescriptive(this.node)) return;
        const fontSize = globals.window.getComputedStyle(this.node).getPropertyValue("font-size");
        const dy = leading * new SVGNumber(fontSize);
        if (this.dom.newLined) {
          this.attr("x", self.attr("x"));
          if (this.text() === "\n") blankLineOffset += dy;else {
            this.attr("dy", i ? dy + blankLineOffset : 0);
            blankLineOffset = 0;
          }
        }
      });
      this.fire("rebuild");
    }
    return this;
  }
  setData(o) {
    this.dom = o;
    this.dom.leading = new SVGNumber(o.leading || 1.3);
    return this;
  }
  writeDataToDom() {
    return super.writeDataToDom({
      leading: 1.3
    });
  }
  text(text) {
    if (text === void 0) {
      const children = this.node.childNodes;
      let firstLine = 0;
      text = "";
      for (let i = 0, len = children.length; i < len; ++i) {
        if (children[i].nodeName === "textPath" || isDescriptive(children[i])) {
          if (i === 0) firstLine = i + 1;
          continue;
        }
        if (i !== firstLine && children[i].nodeType !== 3 && adopt(children[i]).dom.newLined === true) text += "\n";
        text += children[i].textContent;
      }
      return text;
    }
    this.clear().build(true);
    if (typeof text === "function") text.call(this, this);else {
      text = (text + "").split("\n");
      for (let j = 0, jl = text.length; j < jl; j++) this.newLine(text[j]);
    }
    return this.build(false).rebuild();
  }
};
extend(Text, textable_exports);
registerMethods({
  Container: {
    text: wrapWithAttrCheck(function (text = "") {
      return this.put(new Text()).text(text);
    }),
    plain: wrapWithAttrCheck(function (text = "") {
      return this.put(new Text()).plain(text);
    })
  }
});
register(Text, "Text");

//#endregion
//#region src/elements/Tspan.js
var Tspan = class extends Shape {
  constructor(node, attrs = node) {
    super(nodeOrNew("tspan", node), attrs);
    this._build = false;
  }
  dx(dx) {
    return this.attr("dx", dx);
  }
  dy(dy) {
    return this.attr("dy", dy);
  }
  newLine() {
    this.dom.newLined = true;
    const text = this.parent();
    if (!(text instanceof Text)) return this;
    const i = text.index(this);
    const fontSize = globals.window.getComputedStyle(this.node).getPropertyValue("font-size");
    const dy = text.dom.leading * new SVGNumber(fontSize);
    return this.dy(i ? dy : 0).attr("x", text.x());
  }
  text(text) {
    if (text == null) return this.node.textContent + (this.dom.newLined ? "\n" : "");
    if (typeof text === "function") {
      this.clear().build(true);
      text.call(this, this);
      this.build(false);
    } else this.plain(text);
    return this;
  }
};
extend(Tspan, textable_exports);
registerMethods({
  Tspan: {
    tspan: wrapWithAttrCheck(function (text = "") {
      const tspan = new Tspan();
      if (!this._build) this.clear();
      return this.put(tspan).text(text);
    })
  },
  Text: {
    newLine: function (text = "") {
      return this.tspan(text).newLine();
    }
  }
});
register(Tspan, "Tspan");

//#endregion
//#region src/elements/Circle.js
var Circle = class extends Shape {
  constructor(node, attrs = node) {
    super(nodeOrNew("circle", node), attrs);
  }
  radius(r) {
    return this.attr("r", r);
  }
  rx(rx) {
    return this.attr("r", rx);
  }
  ry(ry) {
    return this.rx(ry);
  }
  size(size) {
    return this.radius(new SVGNumber(size).divide(2));
  }
};
extend(Circle, {
  x: x$3,
  y: y$3,
  cx: cx$1,
  cy: cy$1,
  width: width$2,
  height: height$2
});
registerMethods({
  Container: {
    circle: wrapWithAttrCheck(function (size = 0) {
      return this.put(new Circle()).size(size).move(0, 0);
    })
  }
});
register(Circle, "Circle");

//#endregion
//#region src/elements/ClipPath.js
var ClipPath = class extends Container {
  constructor(node, attrs = node) {
    super(nodeOrNew("clipPath", node), attrs);
  }
  remove() {
    this.targets().forEach(function (el) {
      el.unclip();
    });
    return super.remove();
  }
  targets() {
    return findReferences(this.node, "clip-path");
  }
};
registerMethods({
  Container: {
    clip: wrapWithAttrCheck(function () {
      return this.defs().put(new ClipPath());
    })
  },
  Element: {
    clipper() {
      return this.reference("clip-path");
    },
    clipWith(element) {
      const clipper = element instanceof ClipPath ? element : this.parent().clip().add(element);
      return this.attr("clip-path", "url(#" + clipper.id() + ")");
    },
    unclip() {
      return this.attr("clip-path", null);
    }
  }
});
register(ClipPath, "ClipPath");

//#endregion
//#region src/elements/ForeignObject.js
var ForeignObject = class extends Element {
  constructor(node, attrs = node) {
    super(nodeOrNew("foreignObject", node), attrs);
  }
};
registerMethods({
  Container: {
    foreignObject: wrapWithAttrCheck(function (width, height) {
      return this.put(new ForeignObject()).size(width, height);
    })
  }
});
register(ForeignObject, "ForeignObject");

//#endregion
//#region src/modules/core/containerGeometry.js
var containerGeometry_exports = /* @__PURE__ */__exportAll({
  dmove: () => dmove,
  dx: () => dx,
  dy: () => dy,
  height: () => height,
  move: () => move,
  size: () => size,
  width: () => width,
  x: () => x,
  y: () => y
});
function dmove(dx, dy) {
  this.children().forEach(child => {
    let bbox;
    try {
      bbox = child.node instanceof getWindow().SVGSVGElement ? new Box(child.attr(["x", "y", "width", "height"])) : child.bbox();
    } catch (e) {
      return;
    }
    const m = new Matrix(child);
    const matrix = m.translate(dx, dy).transform(m.inverse());
    const p = new Point(bbox.x, bbox.y).transform(matrix);
    child.dmove(p.x - bbox.x, p.y - bbox.y);
  });
  return this;
}
function dx(dx) {
  return this.dmove(dx, 0);
}
function dy(dy) {
  return this.dmove(0, dy);
}
function height(height, box = this.bbox()) {
  if (height == null) return box.height;
  return this.size(box.width, height, box);
}
function move(x = 0, y = 0, box = this.bbox()) {
  const dx = x - box.x;
  const dy = y - box.y;
  return this.dmove(dx, dy);
}
function size(width, height, box = this.bbox()) {
  const p = proportionalSize(this, width, height, box);
  const scaleX = p.width / box.width;
  const scaleY = p.height / box.height;
  this.children().forEach(child => {
    const o = new Point(box).transform(new Matrix(child).inverse());
    child.scale(scaleX, scaleY, o.x, o.y);
  });
  return this;
}
function width(width, box = this.bbox()) {
  if (width == null) return box.width;
  return this.size(width, box.height, box);
}
function x(x, box = this.bbox()) {
  if (x == null) return box.x;
  return this.move(x, box.y, box);
}
function y(y, box = this.bbox()) {
  if (y == null) return box.y;
  return this.move(box.x, y, box);
}

//#endregion
//#region src/elements/G.js
var G = class extends Container {
  constructor(node, attrs = node) {
    super(nodeOrNew("g", node), attrs);
  }
};
extend(G, containerGeometry_exports);
registerMethods({
  Container: {
    group: wrapWithAttrCheck(function () {
      return this.put(new G());
    })
  }
});
register(G, "G");

//#endregion
//#region src/elements/A.js
var A = class extends Container {
  constructor(node, attrs = node) {
    super(nodeOrNew("a", node), attrs);
  }
  target(target) {
    return this.attr("target", target);
  }
  to(url) {
    return this.attr("href", url, xlink);
  }
};
extend(A, containerGeometry_exports);
registerMethods({
  Container: {
    link: wrapWithAttrCheck(function (url) {
      return this.put(new A()).to(url);
    })
  },
  Element: {
    unlink() {
      const link = this.linker();
      if (!link) return this;
      const parent = link.parent();
      if (!parent) return this.remove();
      const index = parent.index(link);
      parent.add(this, index);
      link.remove();
      return this;
    },
    linkTo(url) {
      let link = this.linker();
      if (!link) {
        link = new A();
        this.wrap(link);
      }
      if (typeof url === "function") url.call(link, link);else link.to(url);
      return this;
    },
    linker() {
      const link = this.parent();
      if (link && link.node.nodeName.toLowerCase() === "a") return link;
      return null;
    }
  }
});
register(A, "A");

//#endregion
//#region src/elements/Mask.js
var Mask = class extends Container {
  constructor(node, attrs = node) {
    super(nodeOrNew("mask", node), attrs);
  }
  remove() {
    this.targets().forEach(function (el) {
      el.unmask();
    });
    return super.remove();
  }
  targets() {
    return findReferences(this.node, "mask");
  }
};
registerMethods({
  Container: {
    mask: wrapWithAttrCheck(function () {
      return this.defs().put(new Mask());
    })
  },
  Element: {
    masker() {
      return this.reference("mask");
    },
    maskWith(element) {
      const masker = element instanceof Mask ? element : this.parent().mask().add(element);
      return this.attr("mask", "url(#" + masker.id() + ")");
    },
    unmask() {
      return this.attr("mask", null);
    }
  }
});
register(Mask, "Mask");

//#endregion
//#region src/elements/Stop.js
var Stop = class extends Element {
  constructor(node, attrs = node) {
    super(nodeOrNew("stop", node), attrs);
  }
  update(o) {
    if (typeof o === "number" || o instanceof SVGNumber) o = {
      offset: arguments[0],
      color: arguments[1],
      opacity: arguments[2]
    };
    if (o.opacity != null) this.attr("stop-opacity", o.opacity);
    if (o.color != null) this.attr("stop-color", o.color);
    if (o.offset != null) this.attr("offset", new SVGNumber(o.offset));
    return this;
  }
};
registerMethods({
  Gradient: {
    stop: function (offset, color, opacity) {
      return this.put(new Stop()).update(offset, color, opacity);
    }
  }
});
register(Stop, "Stop");

//#endregion
//#region src/elements/Style.js
function cssRule(selector, rule) {
  if (!selector) return "";
  if (!rule) return selector;
  let ret = selector + "{";
  for (const i in rule) ret += unCamelCase(i) + ":" + rule[i] + ";";
  ret += "}";
  return ret;
}
var Style = class extends Element {
  constructor(node, attrs = node) {
    super(nodeOrNew("style", node), attrs);
  }
  addText(w = "") {
    this.node.textContent += w;
    return this;
  }
  font(name, src, params = {}) {
    return this.rule("@font-face", {
      fontFamily: name,
      src,
      ...params
    });
  }
  rule(selector, obj) {
    return this.addText(cssRule(selector, obj));
  }
};
registerMethods("Dom", {
  style(selector, obj) {
    return this.put(new Style()).rule(selector, obj);
  },
  fontface(name, src, params) {
    return this.put(new Style()).font(name, src, params);
  }
});
register(Style, "Style");

//#endregion
//#region src/elements/TextPath.js
var TextPath = class extends Text {
  constructor(node, attrs = node) {
    super(nodeOrNew("textPath", node), attrs);
  }
  array() {
    const track = this.track();
    return track ? track.array() : null;
  }
  plot(d) {
    const track = this.track();
    let pathArray = null;
    if (track) pathArray = track.plot(d);
    return d == null ? pathArray : this;
  }
  track() {
    return this.reference("href");
  }
};
registerMethods({
  Container: {
    textPath: wrapWithAttrCheck(function (text, path) {
      if (!(text instanceof Text)) text = this.text(text);
      return text.path(path);
    })
  },
  Text: {
    path: wrapWithAttrCheck(function (track, importNodes = true) {
      const textPath = new TextPath();
      if (!(track instanceof Path)) track = this.defs().path(track);
      textPath.attr("href", "#" + track, xlink);
      let node;
      if (importNodes) while (node = this.node.firstChild) textPath.node.appendChild(node);
      return this.put(textPath);
    }),
    textPath() {
      return this.findOne("textPath");
    }
  },
  Path: {
    text: wrapWithAttrCheck(function (text) {
      if (!(text instanceof Text)) text = new Text().addTo(this.parent()).text(text);
      return text.path(this);
    }),
    targets() {
      return findReferences(this.node, "href", "textPath");
    }
  }
});
TextPath.prototype.MorphArray = PathArray;
register(TextPath, "TextPath");

//#endregion
//#region src/elements/Use.js
var Use = class extends Shape {
  constructor(node, attrs = node) {
    super(nodeOrNew("use", node), attrs);
  }
  use(element, file) {
    return this.attr("href", (file || "") + "#" + element, xlink);
  }
};
registerMethods({
  Container: {
    use: wrapWithAttrCheck(function (element, file) {
      return this.put(new Use()).use(element, file);
    })
  }
});
register(Use, "Use");

//#endregion
//#region src/main.js
const SVG = makeInstance;
extend([Svg, Symbol$1, Image, Pattern, Marker], getMethodsFor("viewbox"));
extend([Line, Polyline, Polygon, Path], getMethodsFor("marker"));
extend(Text, getMethodsFor("Text"));
extend(Path, getMethodsFor("Path"));
extend(Defs, getMethodsFor("Defs"));
extend([Text, Tspan], getMethodsFor("Tspan"));
extend([Rect, Ellipse, Gradient, Runner], getMethodsFor("radius"));
extend(EventTarget, getMethodsFor("EventTarget"));
extend(Dom, getMethodsFor("Dom"));
extend(Element, getMethodsFor("Element"));
extend(Shape, getMethodsFor("Shape"));
extend([Container, Fragment], getMethodsFor("Container"));
extend(Gradient, getMethodsFor("Gradient"));
extend(Runner, getMethodsFor("Runner"));
List.extend(getMethodNames());
registerMorphableType([SVGNumber, Color, Box, Matrix, SVGArray, PointArray, PathArray, Point]);
makeMorphable();

var svg_esm = /*#__PURE__*/Object.freeze({
	__proto__: null,
	A: A,
	Animator: Animator,
	Array: SVGArray,
	Box: Box,
	Circle: Circle,
	ClipPath: ClipPath,
	Color: Color,
	Container: Container,
	Controller: Controller,
	Defs: Defs,
	Dom: Dom,
	Ease: Ease,
	Element: Element,
	Ellipse: Ellipse,
	EventTarget: EventTarget,
	ForeignObject: ForeignObject,
	Fragment: Fragment,
	G: G,
	Gradient: Gradient,
	Image: Image,
	Line: Line,
	List: List,
	Marker: Marker,
	Mask: Mask,
	Matrix: Matrix,
	Morphable: Morphable,
	NonMorphable: NonMorphable,
	Number: SVGNumber,
	ObjectBag: ObjectBag,
	PID: PID,
	Path: Path,
	PathArray: PathArray,
	Pattern: Pattern,
	Point: Point,
	PointArray: PointArray,
	Polygon: Polygon,
	Polyline: Polyline,
	Queue: Queue,
	Rect: Rect,
	Runner: Runner,
	SVG: SVG,
	Shape: Shape,
	Spring: Spring,
	Stop: Stop,
	Style: Style,
	Svg: Svg,
	Symbol: Symbol$1,
	Text: Text,
	TextPath: TextPath,
	Timeline: Timeline,
	TransformBag: TransformBag,
	Tspan: Tspan,
	Use: Use,
	adopt: adopt,
	assignNewId: assignNewId,
	create: create,
	defaults: defaults_exports,
	dispatch: dispatch,
	easing: easing,
	eid: eid,
	extend: extend,
	find: baseFind,
	getClass: getClass,
	getWindow: getWindow,
	makeInstance: makeInstance,
	makeMorphable: makeMorphable,
	mockAdopt: mockAdopt,
	namespaces: namespaces_exports,
	nodeOrNew: nodeOrNew,
	off: off,
	on: on,
	parser: parser,
	regex: regex_exports,
	register: register,
	registerMorphableType: registerMorphableType,
	registerWindow: registerWindow,
	root: root,
	utils: utils_exports,
	withWindow: withWindow,
	wrapWithAttrCheck: wrapWithAttrCheck
});

var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(svg_esm);

Object.defineProperty(getPaper_browser, "__esModule", {
  value: true
});
getPaper_browser.getPaper = getPaper;
const svg_js_1 = require$$0$1;
function getPaper() {
  // eslint-disable-next-line new-cap
  return (0, svg_js_1.SVG)();
}

Object.defineProperty(appendResiduesPosition$1, "__esModule", {
  value: true
});
appendResiduesPosition$1.appendResiduesPosition = appendResiduesPosition;
const getPaper_1$1 = getPaper_browser;
function appendResiduesPosition(data, options = {}) {
  const residues = data.residues;
  const {
    leftRightBorders = 20,
    spaceBetweenResidues = 20,
    width = 600
  } = options;
  let xPos = leftRightBorders;
  let xOld = xPos;
  let line = 0;
  // we create a temporary paper in order to get the width of the text blocs
  const paper = (0, getPaper_1$1.getPaper)();
  for (let i = 0; i < residues.all.length; i++) {
    let residue = residues.all[i];
    let textWidth = getTextWidth(paper, residue.label, options);
    xPos += textWidth;
    if (xPos > width - leftRightBorders) {
      xOld = leftRightBorders;
      xPos = leftRightBorders + textWidth;
      line++;
    }
    setPaper(residue, xOld, xPos, line);
    xPos += spaceBetweenResidues;
    xOld = xPos;
  }
  residues.nbLines = line;
}
function setPaper(residue, xFrom, xTo, line) {
  residue.paper = {
    xFrom,
    xTo,
    line,
    usedSlots: [],
    topPosition: 0,
    bottomPosition: 0
  };
}
function getTextWidth(paper, label, options = {}) {
  const {
    labelFontFamily = 'Verdana',
    labelSize = 12
  } = options;
  let text = paper.text(label);
  text.font({
    family: labelFontFamily,
    size: labelSize,
    weight: 'bold',
    fill: '#888'
  });
  let textWidth = text.length() || text.bbox().width;
  text.remove();
  return textWidth;
}

var appendResults$1 = {};

Object.defineProperty(appendResults$1, "__esModule", {
  value: true
});
appendResults$1.appendResults = appendResults;
function appendResults(data, analysisResult, options = {}) {
  const numberResidues = data.residues.residues.length;
  const {
    merge = {},
    filter = {}
  } = options;
  let results = structuredClone(analysisResult);
  results = results.filter(result => !result.type.match(/^-B\d$/));
  // we calculate all the lines based on the results
  for (let result of results) {
    let parts = result.type.split(/:|(?=[a-z])/); // we may have ':' but not mandatory
    if (parts.length === 2) {
      result.internal = true;
      if (parts[1].match(/^[a-d][1-9]/)) {
        [parts[0], parts[1]] = [parts[1], parts[0]];
      }
      result.to = getNumber(parts[0]) - 1;
      result.from = numberResidues - getNumber(parts[1]);
    } else {
      if (parts[0].match(/^[a-d][1-9]/)) {
        result.fromBegin = true;
        result.position = getNumber(parts[0]) - 1;
      }
      if (parts[0].match(/^[w-z][1-9]/)) {
        result.fromEnd = true;
        result.position = numberResidues - 1 - getNumber(parts[0]);
      }
    }
    if (result.fromEnd) result.color = 'red';
    if (result.fromBegin) result.color = 'blue';
    if (result.internal) {
      switch (result.type.slice(0, 1)) {
        case 'a':
          result.color = 'green';
          break;
        case 'b':
          result.color = 'orange';
          break;
        case 'c':
          result.color = 'cyan';
          break;
        default:
          result.color = 'green';
      }
    }
  }
  if (merge.charge) {
    const unique = {};
    for (let result of results) {
      if (!unique[result.type]) {
        unique[result.type] = [];
      }
      unique[result.type].push(result);
    }
    results = [];
    for (let key in unique) {
      let current = unique[key][0];
      current.similarity = unique[key].reduce((previous, item) => previous + item.similarity, 0);
      current.similarity = current.similarity / unique[key].length;
      results.push(current);
      current.charge = '';
    }
  }
  for (let result of results) {
    if (result.similarity > 0.95) {
      result.textColor = 'black';
    } else if (result.similarity > 0.9) {
      result.textColor = '#333';
    } else if (result.similariy > 0.8) {
      result.textColor = '#666';
    } else {
      result.textColor = '#999';
    }
  }
  results = filterResults(results, filter);
  // sort by residue length
  results.sort((a, b) => a.length - b.length);
  data.results = results;
}
function getNumber(text) {
  return Number(text.replace(/^.(\d+).*$/, '$1'));
}
function filterResults(results, filter) {
  if (!filter) return;
  let {
    minRelativeQuantity = 0,
    minSimilarity = 0,
    minQuantity = 0,
    showInternals = true
  } = filter;
  if (minRelativeQuantity) {
    minQuantity = Math.max(...results.map(entry => entry.quantity)) * minRelativeQuantity;
  }
  if (minSimilarity) {
    results = results.filter(result => !result.similarity || result.similarity >= minSimilarity);
  }
  if (minQuantity) {
    results = results.filter(result => !result.quantity || result.quantity >= minQuantity);
  }
  if (!showInternals) {
    results = results.filter(result => !result.internal);
  }
  return results;
}

var appendRows$1 = {};

Object.defineProperty(appendRows$1, "__esModule", {
  value: true
});
appendRows$1.appendRows = appendRows;
function appendRows(data) {
  let allResidues = data.residues.all.toSorted((a, b) => a.line - b.line);
  data.rows = [];
  for (let residue of allResidues) {
    let line = residue.paper.line;
    if (!data.rows[line]) {
      data.rows[line] = {
        residues: []
      };
    }
    data.rows[line].residues.push(residue);
  }
  for (let row of data.rows) {
    row.info = {};
  }
}

var appendRowsInformation$1 = {};

Object.defineProperty(appendRowsInformation$1, "__esModule", {
  value: true
});
appendRowsInformation$1.appendRowsInformation = appendRowsInformation;
/**
 * For each row we calculate internals, label over and label under
 * @param {*} data
 */
function appendRowsInformation(data) {
  for (let row of data.rows) {
    let filtered = row.residues.filter(entry => entry.fromBegin !== undefined);
    if (filtered.length > 0) {
      row.info.firstResidue = filtered[0].fromBegin;
      row.info.lastResidue = filtered.at(-1).fromBegin;
    }
    row.internals = [];
  }
  for (let result of data.results) {
    if (result.internal) {
      let fromResidue = data.residues.residues[result.from];
      let from = fromResidue.fromBegin;
      let toResidue = data.residues.residues[result.to];
      let to = toResidue.fromBegin;
      for (let row of data.rows) {
        if (from <= row.info.lastResidue && to >= row.info.firstResidue) {
          result = structuredClone(result);
          result.fromResidue = fromResidue;
          if (from < row.info.firstResidue) {
            result.firstIndex = true;
          } else {
            for (const [index, residue] of row.residues.entries()) {
              if (residue.fromBegin === from) {
                result.firstIndex = index;
              }
            }
          }
          result.toResidue = toResidue;
          if (to > row.info.lastResidue) {
            result.lastIndex = true;
          } else {
            for (const [index, residue] of row.residues.entries()) {
              if (residue.fromBegin === to) {
                result.lastIndex = index;
              }
            }
          }
          row.internals.push(result);
        }
      }
    } else if (result.position !== undefined && data.residues.residues[result.position]) {
      let residue = data.residues.residues[result.position];
      if (result.fromEnd) {
        residue.info.nbOver++;
        residue.results.end.push(result);
      }
      if (result.fromBegin) {
        residue.info.nbUnder++;
        residue.results.begin.push(result);
      }
    }
  }
  for (let row of data.rows) {
    let maxNbOver = 0;
    let maxNbUnder = 0;
    for (let residue of row.residues) {
      if (residue.info.nbOver > maxNbOver) maxNbOver = residue.info.nbOver;
      if (residue.info.nbUnder > maxNbUnder) maxNbUnder = residue.info.nbUnder;
    }
    row.info.nbOver = maxNbOver;
    row.info.nbUnder = maxNbUnder;
  }
}

var addCSS$1 = {};

Object.defineProperty(addCSS$1, "__esModule", {
  value: true
});
addCSS$1.addCSS = addCSS;
function addCSS(paper) {
  let cssCode = `
    .highlight {
        stroke: yellow;
        stroke-width: 5px;
        fill: red;
    }
    .highlightText {
        fill: red;
    }
    `;
  let style = paper.element('style');
  style.words(cssCode);
}

var addScript$1 = {};

Object.defineProperty(addScript$1, "__esModule", {
  value: true
});
addScript$1.addScript = addScript;
function addScript(paper) {
  let scriptCode = ` // <![CDATA[
        function mouseOver(evt) {
           
            let targetRange=evt.target.id.replace(/^line/,'');
            let from=targetRange.replace(/-.*/,'')*1;
            let to=targetRange.replace(/.*-/,'')*1;
            let children=evt.target.parentNode.children;
            for (let child of children) {
                if (child.id === evt.target.id) {
                    child.setAttribute('class','highlight');
                }
                if (child.nodeName === 'text' && child.id.startsWith("residue")) {
                    let residueNumber=child.id.replace(/residue-/,'')*1;
                    if (residueNumber>=from && residueNumber<=to) {
                        child.setAttribute('class','highlightText');
                    }
                }
            }
        }
        function mouseOut(evt) {
            let children=evt.target.parentNode.children;
            for (let child of children) {
                if (child.id === evt.target.id) {
                    child.setAttribute('class','');
                }
                if (child.nodeName === 'text' && child.id.startsWith("residue")) {
                    child.setAttribute('class','');
                }
            }
        }
     // ]]>
    `;
  let script = paper.element('script');
  script.attr({
    type: 'application/ecmascript'
  });
  script.words(scriptCode);
}

var drawInternals$1 = {};

var drawLabel$1 = {};

Object.defineProperty(drawLabel$1, "__esModule", {
  value: true
});
drawLabel$1.drawLabel = drawLabel;
function drawLabel(paper, result, x, y, options) {
  let label = result.type;
  let similarity = String(Math.round(result.similarity * 100));
  let charge = result.charge > 0 ? `+${result.charge}` : result.charge;
  let text = paper.plain(label);
  text.font({
    fill: result.textColor,
    family: options.labelFontFamily,
    weight: 'bold',
    size: options.labelSize,
    anchor: 'end'
  });
  text.attr({
    x,
    y
  });
  let textWidth = 0;
  text = paper.plain(charge);
  text.font({
    fill: result.textColor,
    family: options.labelFontFamily,
    size: options.labelSize / 2
  });
  text.attr({
    x: x + textWidth,
    y: y - options.labelSize / 2
  });
  text = paper.plain(similarity);
  text.font({
    fill: result.textColor,
    family: options.labelFontFamily,
    size: options.labelSize / 2
  });
  text.attr({
    x: x + textWidth,
    y
  });
}

Object.defineProperty(drawInternals$1, "__esModule", {
  value: true
});
drawInternals$1.drawInternals = drawInternals;
const drawLabel_1$1 = drawLabel$1;
function drawInternals(paper, row, options) {
  let fromX = 0;
  let toX = 0;
  for (const internal of row.internals) {
    options.verticalPosition += options.spaceBetweenInternalLines;
    if (internal.firstIndex === true) {
      fromX = 0;
    } else {
      fromX = internal.fromResidue.paper.xFrom - options.spaceBetweenResidues / 2;
    }
    if (internal.lastIndex === true) {
      toX = options.width - 1;
    } else {
      toX = internal.toResidue.paper.xTo + options.spaceBetweenResidues / 2;
    }
    let y = options.verticalPosition;
    let drawLine = paper.line(fromX, y, toX, y);
    drawLine.attr({
      onmouseover: 'mouseOver(evt)',
      onmouseout: 'mouseOut(evt)',
      id: `line${internal.fromResidue.fromBegin}-${internal.toResidue.fromBegin}`
    });
    drawLine.stroke({
      color: internal.color,
      width: options.strokeWidth
    });
    let center = (fromX + toX + internal.type.length * options.labelSize * 2 / 3) / 2;
    (0, drawLabel_1$1.drawLabel)(paper, internal, center, y - 2, options);
  }
  options.verticalPosition += options.spaceBetweenInternalLines * 2;
}

var drawReplacements$1 = {};

Object.defineProperty(drawReplacements$1, "__esModule", {
  value: true
});
drawReplacements$1.drawReplacements = drawReplacements;
function drawReplacements(paper, data, options) {
  let replacements = data.residues.replacements;
  replacements = Object.keys(replacements).map(key => {
    return {
      key,
      ...replacements[key]
    };
  });
  for (let replacement of replacements) {
    options.verticalPosition += options.spaceBetweenInternalLines;
    let text = paper.plain(`${replacement.label} = ${replacement.key}`);
    text.font({
      fill: 'darkviolet',
      family: options.labelFontFamily,
      weight: 'bold',
      size: 10
    });
    text.attr({
      x: options.leftRightBorders,
      y: options.verticalPosition
    });
  }
  options.verticalPosition += options.spaceBetweenInternalLines;
}

var drawSequence$1 = {};

var drawTerminals$1 = {};

Object.defineProperty(drawTerminals$1, "__esModule", {
  value: true
});
drawTerminals$1.drawTerminals = drawTerminals;
const drawLabel_1 = drawLabel$1;
function drawTerminals(paper, row, options) {
  for (let residue of row.residues) {
    if (!residue.results) continue;
    for (let result of residue.results.begin) {
      let line = paper.line(residue.paper.xTo + options.spaceBetweenResidues / 2, residue.paper.y, residue.paper.xTo + options.spaceBetweenResidues / 2, residue.paper.y - 8);
      line.stroke({
        color: result.color,
        width: options.strokeWidth,
        linecap: 'round'
      });
      line = paper.line(residue.paper.xTo + options.spaceBetweenResidues / 2, residue.paper.y, residue.paper.xTo + options.spaceBetweenResidues / 2 - 5, residue.paper.y + 5);
      line.stroke({
        color: result.color,
        width: options.strokeWidth,
        linecap: 'round'
      });
      (0, drawLabel_1.drawLabel)(paper, result, residue.paper.xTo + options.spaceBetweenResidues / 2, residue.paper.y + options.labelSize + 6 + residue.paper.bottomPosition * options.labelSize, options);
      residue.paper.bottomPosition++;
    }
    for (let result of residue.results.end) {
      let line = paper.line(residue.paper.xTo + options.spaceBetweenResidues / 2 + options.strokeWidth, residue.paper.y, residue.paper.xTo + options.spaceBetweenResidues / 2 + options.strokeWidth, residue.paper.y - 8);
      line.stroke({
        color: result.color,
        width: options.strokeWidth,
        linecap: 'round'
      });
      line = paper.line(residue.paper.xTo + options.spaceBetweenResidues / 2 + options.strokeWidth, residue.paper.y - 8, residue.paper.xTo + options.spaceBetweenResidues / 2 + 5 + options.strokeWidth, residue.paper.y - 13);
      line.stroke({
        color: result.color,
        width: options.strokeWidth,
        linecap: 'round'
      });
      (0, drawLabel_1.drawLabel)(paper, result, residue.paper.xTo + options.spaceBetweenResidues, residue.paper.y - 17 - residue.paper.topPosition * options.labelSize, options);
      residue.paper.topPosition++;
    }
  }
}

Object.defineProperty(drawSequence$1, "__esModule", {
  value: true
});
drawSequence$1.drawSequence = drawSequence;
const drawTerminals_1 = drawTerminals$1;
function drawSequence(paper, row, options) {
  // need to plan some space for the OVER
  options.verticalPosition += row.info.nbOver * (options.labelSize + 1);
  for (const residue of row.residues) {
    residue.paper.y = options.verticalPosition;
    let text = paper.plain(residue.label);
    let textColor = residue.replaced ? 'darkviolet' : residue.kind === 'residue' ? '#555' : '#CCC';
    text.font({
      family: options.labelFontFamily,
      size: 12,
      weight: 'bold',
      fill: textColor
    });
    text.attr({
      x: residue.paper.xFrom,
      y: residue.paper.y
    });
    text.attr({
      id: `residue-${residue.fromBegin}`
    });
  }
  (0, drawTerminals_1.drawTerminals)(paper, row, options);
  // need to plan some space for the UNDER
  options.verticalPosition += row.info.nbUnder * (options.labelSize + 1);
  options.verticalPosition += options.spaceBetweenInternalLines * 2;
}

Object.defineProperty(sequenceSVG$1, "__esModule", {
  value: true
});
sequenceSVG$1.sequenceSVG = sequenceSVG;
const appendInternals_1 = appendInternals$1;
const appendResidues_1 = appendResidues$1;
const appendResiduesPosition_1 = appendResiduesPosition$1;
const appendResults_1 = appendResults$1;
const appendRows_1 = appendRows$1;
const appendRowsInformation_1 = appendRowsInformation$1;
const addCSS_1 = addCSS$1;
const addScript_1 = addScript$1;
const drawInternals_1 = drawInternals$1;
const drawReplacements_1 = drawReplacements$1;
const drawSequence_1 = drawSequence$1;
const getPaper_1 = getPaper_browser;
/**
 *
 * @param {string} sequence
 * @param {array} analysisResults
 * @param {object} [options={}]
 * @param {number} [options.leftRightBorders=50]
 * @param {number} [options.width=600]
 * @param {number} [options.spaceBetweenResidues=30]
 * @param {number} [options.spaceBetweenInternalLines=12]
 * @param {number} [options.strokeWidth=2]
 * @param {string} [options.labelFontFamily='Verdana']
 * @param {number} [options.labelSize=8]
 * @param {number} [options.parsing] Sequence parsing options
 * @param {object} [options.merge={}]
 * @param {boolean} [options.merge.charge] Merge results if only differs by charge
 * @param {object} [options.filter={}] define some filters
 * @param {number} [options.filter.minSimilarity=0]  minimal similarity
 * @param {number} [options.filter.minQuantity=0]  minimal quantity
 * @param {number} [options.filter.minRelativeQuantity=0]  minimal relative quantity. This value should be between 0 and 1 and supersede minQuantity.
 * @param {boolean} [options.filter.showInternals=true] show the internal fragments
 *
 */
function sequenceSVG(sequence, analysisResults, options = {}) {
  const {
    width = 600,
    leftRightBorders = 50,
    spaceBetweenResidues = 30,
    spaceBetweenInternalLines = 12,
    strokeWidth = 2,
    labelFontFamily = 'Verdana',
    labelSize = 8,
    parsing,
    merge,
    filter
  } = options;
  const drawOptions = {
    spaceBetweenResidues,
    leftRightBorders,
    spaceBetweenInternalLines,
    strokeWidth,
    labelSize,
    labelFontFamily,
    verticalPosition: spaceBetweenInternalLines,
    width
  };
  let data = {};
  (0, appendResidues_1.appendResidues)(data, sequence, parsing);
  (0, appendResults_1.appendResults)(data, analysisResults, {
    merge,
    filter
  });
  (0, appendResiduesPosition_1.appendResiduesPosition)(data, {
    leftRightBorders,
    spaceBetweenResidues,
    labelFontFamily,
    labelSize,
    width
  });
  (0, appendRows_1.appendRows)(data);
  (0, appendInternals_1.appendInternals)(data);
  (0, appendRowsInformation_1.appendRowsInformation)(data);
  // We start to create the SVG and create the paper
  const paper = (0, getPaper_1.getPaper)();
  (0, addCSS_1.addCSS)(paper);
  (0, addScript_1.addScript)(paper);
  for (let row of data.rows) {
    (0, drawInternals_1.drawInternals)(paper, row, drawOptions);
    (0, drawSequence_1.drawSequence)(paper, row, drawOptions);
  }
  (0, drawReplacements_1.drawReplacements)(paper, data, drawOptions);
  paper.size(width, drawOptions.verticalPosition);
  let svg = paper.svg();
  paper.clear();
  return svg;
}

(function (exports) {

  var __createBinding = src$1 && src$1.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src$1 && src$1.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(sequenceSVG$1, exports);
})(src$1);
var index$2 = /*@__PURE__*/getDefaultExportFromCjs(src$1);

var index$3 = /*#__PURE__*/_mergeNamespaces({
	__proto__: null,
	default: index$2
}, [src$1]);

var src = {};

var mfsDeconvolution$1 = {};

var dist = {};

var IDX = 256,
  HEX = [],
  BUFFER;
while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
function v4() {
  var i = 0,
    num,
    out = '';
  if (!BUFFER || IDX + 16 > 256) {
    BUFFER = Array(i = 256);
    while (i--) BUFFER[i] = 256 * Math.random() | 0;
    i = IDX = 0;
  }
  for (; i < 16; i++) {
    num = BUFFER[IDX + i];
    if (i == 6) out += HEX[num & 15 | 64];else if (i == 8) out += HEX[num & 63 | 128];else out += HEX[num];
    if (i & 1 && i > 1 && i < 11) out += '-';
  }
  IDX++;
  return out;
}
dist.v4 = v4;

var getPeakWidthFct$1 = {};

Object.defineProperty(getPeakWidthFct$1, "__esModule", {
  value: true
});
getPeakWidthFct$1.getPeakWidthFct = getPeakWidthFct;
/**
 *
 * @param {object} [options ={}]
 * @param {object}        [options.mass={}]
 * @param {number}        [options.mass.precision=0] -  Precision (accuracy) of the monoisotopic mass in ppm
 * @param {string|Function} [options.mass.peakWidthFct=()=>0.01]
 * @param {import('cheminfo-types').Logger} [options.logger]
 * @returns
 */
function getPeakWidthFct(options = {}) {
  const {
    logger,
    mass: massOptions = {}
  } = options;
  const {
    precision = 0,
    peakWidthFct
  } = massOptions;
  if (typeof peakWidthFct === 'function') {
    return peakWidthFct;
  }
  if (!peakWidthFct) {
    return () => 0.01;
  }
  try {
    // eslint-disable-next-line no-new-func
    return new Function('mass', `return ${peakWidthFct} + ${precision} * mass / 1e6`);
  } catch (error) {
    logger?.warn(`error in peakWidthFct: ${error.toString()}`);
    return fixedWidthFct;
  }
}
function fixedWidthFct() {
  return 0.01;
}

var blockFcnnls$1 = {};

/**
 * From an array of arrays it constructs a unique key for each array,
 * given by its values, such that same arrays have same keys.
 *
 * @param collection - Array of arrays
 * @returns - Array of objects with the original array, its index and its key
 */
function addUniqueKeyToColumns(collection) {
  return collection.map((positiveRows, columnIndexInK) => {
    //indices of positive values within the column. (Pset)
    let key = BigInt(0);
    // items will be the indexes of Pset, so it's always an integer.
    positiveRows.forEach(item => key |= BigInt(1) << BigInt(item));
    return {
      positiveRows,
      columnIndexInK,
      key
    };
  });
}
/**
 * From an array of arrays it constructs a unique key for each subarray,
 * given by its values, such that same arrays have same keys.
 * @param collection - Array of arrays
 * @returns Array of objects with the original array, its index and its key
 */
function groupColumnsBySign(collection) {
  const mapped = addUniqueKeyToColumns(collection);
  mapped.sort((a, b) => {
    if (a.key - b.key < 0) return -1;
    return 1;
  });
  const sorted = [];
  const indices = [];
  let key;
  for (const set of mapped) {
    if (set.key !== key) {
      key = set.key;
      indices.push([]);
      sorted.push(set.positiveRows);
    }
    indices[indices.length - 1].push(set.columnIndexInK);
  }
  const result = {
    values: sorted,
    indices
  };
  return result;
}

/**
 * Combinatorial Subspace Least Squares - subfunction for the FC-NNLS
 * Solves XtX*K = XtY for the variables in Pset
 * if XtX (or XtX(vars,vars)) is singular, performs the svd and find pseudo-inverse, otherwise (even if ill-conditioned) finds inverse with LU decomposition and solves the set of equation
 * it is consistent with matlab results for ill-conditioned matrices (at least consistent with test 'ill-conditioned square X rank 2, Y 3x1' in cssls.test)
 * @param XtX - Gram matrix
 * @param XtY
 * @param Pset - Subset of matrix K with positive values (indices)
 * @param l - number of rows of X
 * @param p - number of columns of Y
 */
function cssls(XtX, XtY, Pset, l, p) {
  let K = Matrix$1.zeros(l, p);
  if (Pset === null) {
    // used for initialisation where OLS is solved.
    const choXtX = new CholeskyDecomposition(XtX);
    if (choXtX.isPositiveDefinite()) {
      K = choXtX.solve(XtY);
    } else {
      const luXtX = new LuDecomposition(XtX);
      if (!luXtX.isSingular()) {
        K = luXtX.solve(Matrix$1.eye(l)).mmul(XtY);
      } else {
        K = solve(XtX, XtY, true);
      }
    }
  } else {
    const {
      values: sortedPset,
      indices: sortedEset
    } = groupColumnsBySign(Pset);
    if (sortedPset.length === 1 && sortedPset[0].length === 0 && sortedEset[0].length === p) {
      return K;
    } else if (sortedPset.length === 1 && sortedPset[0].length === l && sortedEset[0].length === p) {
      const choXtX = new CholeskyDecomposition(XtX);
      if (choXtX.isPositiveDefinite()) {
        K = choXtX.solve(XtY);
      } else {
        const luXtX = new LuDecomposition(XtX);
        if (!luXtX.isSingular()) {
          K = luXtX.solve(Matrix$1.eye(l)).mmul(XtY);
        } else {
          K = solve(XtX, XtY, true);
        }
      }
    } else {
      for (let k = 0; k < sortedPset.length; k++) {
        const cols2Solve = sortedEset[k];
        const vars = sortedPset[k];
        let L;
        const choXtX = new CholeskyDecomposition(XtX.selection(vars, vars));
        if (choXtX.isPositiveDefinite()) {
          L = choXtX.solve(XtY.selection(vars, cols2Solve));
        } else {
          const luXtX = new LuDecomposition(XtX.selection(vars, vars));
          if (!luXtX.isSingular()) {
            L = luXtX.solve(Matrix$1.eye(vars.length)).mmul(XtY.selection(vars, cols2Solve));
          } else {
            L = solve(XtX.selection(vars, vars), XtY.selection(vars, cols2Solve), true);
          }
        }
        for (let i = 0; i < L.rows; i++) {
          for (let j = 0; j < L.columns; j++) {
            K.set(vars[i], cols2Solve[j], L.get(i, j));
          }
        }
      }
    }
  }
  return K;
}

/**
 * Solves as std linear squares,
 * and overwrites the negative values of K with 0 as an initial guess for K,
 * It also precomputes part of the pseudoinverse used to solve Least Squares.
 * @param - X input data matrix
 * @param - Y output data matrix
 * @returns - initial values for the algorithm (including the solution K to least squares, overwriting of negative values with 0)
 */
function initialisation(X, Y) {
  // X = n x l
  // W = l x p, same as K
  // Y = n x p
  const n = X.rows;
  const l = X.columns;
  const p = Y.columns;
  const iter = 0;
  if (Y.rows !== n) throw new Error('ERROR: matrix size not compatible');
  const W = Matrix$1.zeros(l, p);
  // precomputes part of pseudoinverse
  const XtX = X.transpose().mmul(X);
  const XtY = X.transpose().mmul(Y);
  const K = cssls(XtX, XtY, null, l, p); // K is lxp
  /* Each subarray corresponds to col of K
   * And stores indices of positive values of that column
   */
  const Pset = [];
  for (let j = 0; j < p; j++) {
    Pset[j] = [];
    for (let i = 0; i < l; i++) {
      if (K.get(i, j) > 0) {
        Pset[j].push(i); // [[1,2,3...,l],[1,2,4,7,..,l],[],..] p arrays, each length l or less
      } else {
        K.set(i, j, 0);
      } // This is our initial solution, it's the solution found by overwriting the unconstrained least square solution in K.
    }
  }
  const Fset = [];
  for (let j = 0; j < p; j++) {
    if (Pset[j].length !== l) {
      Fset.push(j); // If column j of K was not all positive, add it to the Fset. So Fset are the indices of columns with negative values
    }
  }
  const D = K.clone();
  return {
    n,
    l,
    p,
    iter,
    W,
    XtX,
    XtY,
    K,
    Pset,
    Fset,
    D
  };
}

/**
 * Computes the set difference A\B
 * @param set A as an array
 * @param set B as an array
 * @returns Elements of A that are not in B
 */
function setDifference(A, B) {
  const C = [];
  for (const i of A) {
    if (!B.includes(i)) C.push(i);
  }
  return C;
}

/**
 * Checks whether the solution has converged
 * @param iter - current iteration
 * @param maxIter - maximum number of iterations, @default 3 times the number of columns of X
 * @param XtX - Gram matrix
 * @param XtY
 * @param Fset - Columns to be optimized (active), it stores indices of columns with negative values
 * @param Pset - Subset of matrix K with positive values (indices)
 * @param W - Gradient Matrix
 * @param K - Coefficients Matrix
 * @param l - Number of rows of X
 * @param p - Number of columns of X
 * @param D - K clone
 * @param gradientTolerance - Control over the optimality of the solution; applied over the largest gradient value of all. @default 1e-5.
 * @returns - {Pset, Fset, W}
 */
function optimality(iter, maxIter, XtX, XtY, Fset, Pset, W, K, l, p, D, gradientTolerance) {
  if (iter === maxIter) {
    throw new Error('Maximum number of iterations exceeded');
  }
  // Check solution for optimality
  const V = XtY.subMatrixColumn(Fset).subtract(XtX.mmul(K.subMatrixColumn(Fset)));
  for (let j = 0; j < Fset.length; j++) {
    // for the "negative" columns, we set the new gradient.
    W.setColumn(Fset[j], V.subMatrixColumn([j]));
  }
  const Jset = [];
  const fullSet = [];
  for (let i = 0; i < l; i++) {
    fullSet.push(i);
  }
  for (const colIndex of Fset) {
    const notPset = setDifference(fullSet, Pset[colIndex]);
    if (notPset.length === 0) {
      Jset.push(colIndex);
    } else if (W.selection(notPset, [colIndex]).max() <= gradientTolerance) {
      Jset.push(colIndex);
    }
  }
  Fset = setDifference(Fset, Jset);
  // For non-optimal solutions, add the appropriate variables to Pset
  if (Fset.length !== 0) {
    for (let j = 0; j < Fset.length; j++) {
      for (let i = 0; i < l; i++) {
        if (Pset[Fset[j]].includes(i)) W.set(i, Fset[j], -Infinity);
      }
      Pset[Fset[j]].push(W.subMatrixColumn(Fset).maxColumnIndex(j)[0]);
    }
    for (const colIndex of Fset) {
      D.setColumn(colIndex, K.getColumn(colIndex));
    }
  }
  for (let j = 0; j < p; j++) {
    Pset[j].sort((a, b) => a - b);
  }
  return {
    Pset,
    Fset,
    W
  };
}

/**
 * Returns a new array based on extraction of specific indices of an array
 * @param collection or array
 * @param indices
 */
function selection(vector, indices) {
  const u = []; //new Float64Array(indices.length);
  for (let i = 0; i < indices.length; i++) {
    u[i] = vector[indices[i]];
  }
  return u;
}

/**
 * Fast Combinatorial Non-negative Least Squares with multiple Right Hand Side
 * @param X
 * @param Y
 * @param options
 * @returns Solution Matrix.
 */
function fcnnls(X, Y, options = {}) {
  X = Matrix$1.checkMatrix(X);
  Y = Matrix$1.checkMatrix(Y);
  const init = initialisation(X, Y);
  const {
    l,
    p,
    XtX,
    XtY,
    K,
    D
  } = init;
  let {
    iter,
    W,
    Pset,
    Fset
  } = init;
  const {
    maxIterations = X.columns * 3,
    gradientTolerance = 1e-5
  } = options;
  // Active set algorithm for NNLS main loop
  while (Fset.length > 0) {
    // Solves for the passive variables (uses subroutine below)
    let L = cssls(XtX, XtY.subMatrixColumn(Fset), selection(Pset, Fset), l, Fset.length);
    for (let i = 0; i < l; i++) {
      for (let j = 0; j < Fset.length; j++) {
        K.set(i, Fset[j], L.get(i, j));
      }
    }
    // Finds any infeasible solutions
    const infeasIndex = [];
    for (let j = 0; j < Fset.length; j++) {
      for (let i = 0; i < l; i++) {
        if (L.get(i, j) < 0) {
          infeasIndex.push(j);
          break;
        }
      }
    }
    let Hset = selection(Fset, infeasIndex);
    // Makes infeasible solutions feasible (standard NNLS inner loop)
    if (Hset.length > 0) {
      let m = Hset.length;
      const alpha = Matrix$1.ones(l, m);
      while (m > 0 && iter < maxIterations) {
        iter++;
        alpha.mul(Infinity);
        // Finds indices of negative variables in passive set
        const hRowColIdx = [[], []]; // Indexes work in pairs, each pair reprensents a single element, first array is row index, second array is column index
        const negRowColIdx = [[], []]; // Same as before
        for (let j = 0; j < m; j++) {
          for (const item of Pset[Hset[j]]) {
            if (K.get(item, Hset[j]) < 0) {
              hRowColIdx[0].push(item); // i
              hRowColIdx[1].push(j);
              negRowColIdx[0].push(item); // i
              negRowColIdx[1].push(Hset[j]);
            } // Compared to matlab, here we keep the row/column indexing (we are not taking the linear indexing)
          }
        }
        for (let k = 0; k < hRowColIdx[0].length; k++) {
          // could be hRowColIdx[1].length as well
          alpha.set(hRowColIdx[0][k], hRowColIdx[1][k], D.get(negRowColIdx[0][k], negRowColIdx[1][k]) / (D.get(negRowColIdx[0][k], negRowColIdx[1][k]) - K.get(negRowColIdx[0][k], negRowColIdx[1][k])));
        }
        let alphaMin = [];
        const minIdx = [];
        for (let j = 0; j < m; j++) {
          alphaMin[j] = alpha.minColumn(j);
          minIdx[j] = alpha.minColumnIndex(j)[0];
        }
        alphaMin = Matrix$1.rowVector(alphaMin);
        for (let i = 0; i < l; i++) {
          alpha.setSubMatrix(alphaMin, i, 0);
        }
        let E = new Matrix$1(l, m);
        E = D.subMatrixColumn(Hset).subtract(alpha.subMatrix(0, l - 1, 0, m - 1).mul(D.subMatrixColumn(Hset).subtract(K.subMatrixColumn(Hset))));
        for (let j = 0; j < m; j++) {
          D.setColumn(Hset[j], E.subMatrixColumn([j]));
        }
        const idx2zero = [minIdx, Hset];
        for (let k = 0; k < m; k++) {
          D.set(idx2zero[0][k], idx2zero[1][k], 0);
        }
        for (let j = 0; j < m; j++) {
          Pset[Hset[j]].splice(Pset[Hset[j]].findIndex(item => item === minIdx[j]), 1);
        }
        L = cssls(XtX, XtY.subMatrixColumn(Hset), selection(Pset, Hset), l, m);
        for (let j = 0; j < m; j++) {
          K.setColumn(Hset[j], L.subMatrixColumn([j]));
        }
        Hset = [];
        for (let j = 0; j < K.columns; j++) {
          for (let i = 0; i < l; i++) {
            if (K.get(i, j) < 0) {
              Hset.push(j);
              break;
            }
          }
        }
        m = Hset.length;
      }
    }
    const newParam = optimality(iter, maxIterations, XtX, XtY, Fset, Pset, W, K, l, p, D, gradientTolerance);
    Pset = newParam.Pset;
    Fset = newParam.Fset;
    W = newParam.W;
  }
  return K;
}

/**
 * Fast Combinatorial Non-negative Least Squares with single Right Hand Side
 * @param X - input data matrix
 * @param y - output data vector
 * @param options - for maxIterations
 * @returns Solution vector.
 */
function fcnnlsVector(X, y, options = {}) {
  if (!Array.isArray(y)) {
    throw new TypeError('y must be a 1D Array');
  }
  const Y = Matrix$1.columnVector(y);
  const K = fcnnls(X, Y, options);
  const k = K.to1DArray();
  return k;
}

var libEsm = /*#__PURE__*/Object.freeze({
	__proto__: null,
	fcnnls: fcnnls,
	fcnnlsVector: fcnnlsVector
});

var require$$0 = /*@__PURE__*/getAugmentedNamespace(libEsm);

var splitMatrix$1 = {};

Object.defineProperty(splitMatrix$1, "__esModule", {
  value: true
});
splitMatrix$1.splitMatrix = splitMatrix;
function splitMatrix(matrix) {
  const nbRows = matrix.length;
  const nbColumns = matrix[0].length;
  const {
    nonZeroColumns,
    nonZeroRows
  } = createMatrixIndexes(matrix);
  const rowsMapping = new Int32Array(nbRows).fill(-1);
  const columnsMapping = new Int32Array(nbColumns).fill(-1);
  const matrices = [];
  let currentMappingID = 0;
  for (let row = 0; row < matrix.length; row++) {
    for (let column of nonZeroColumns[row]) {
      if (matrix[row][column] === 0) {
        continue;
      }
      if (rowsMapping[row] !== -1) {
        continue;
      }
      if (columnsMapping[column] !== -1) {
        continue;
      }
      currentMappingID++;
      const result = {
        rows: [],
        columns: []
      };
      matrices.push(result);
      processFromACell(row, rowsMapping, columnsMapping, currentMappingID, nonZeroColumns, nonZeroRows, result);
    }
  }
  appendSubMatrix(matrices, matrix);
  return matrices;
}
function appendSubMatrix(matrices, matrix) {
  for (const entry of matrices) {
    const submatrix = new Array(entry.rows.length).fill(0).map(() => new Float64Array(entry.columns.length));
    for (let i = 0; i < entry.rows.length; i++) {
      for (let j = 0; j < entry.columns.length; j++) {
        submatrix[i][j] = matrix[entry.rows[i]][entry.columns[j]];
      }
    }
    entry.submatrix = submatrix;
  }
}
function processFromACell(row, rowsMapping, columnsMapping, currentMappingID, nonZeroColumns, nonZeroRows, result) {
  const rowsTodo = [row];
  let nextRow;
  while ((nextRow = rowsTodo.pop()) !== undefined) {
    result.rows.push(nextRow);
    for (let column of nonZeroColumns[nextRow]) {
      if (columnsMapping[column] !== -1) {
        continue;
      }
      rowsMapping[nextRow] = currentMappingID;
      columnsMapping[column] = currentMappingID;
      result.columns.push(column);
      for (let internalRow of nonZeroRows[column]) {
        if (rowsMapping[internalRow] === -1) {
          if (!rowsTodo.includes(internalRow)) {
            rowsTodo.push(internalRow);
          }
          continue;
        }
        if (rowsMapping[internalRow] !== currentMappingID) {
          throw new Error('This should not happen');
        }
      }
    }
  }
}
function createMatrixIndexes(matrix) {
  const nbRows = matrix.length;
  const nbColumns = matrix[0].length;
  const nonZeroColumns = new Array(nbRows).fill(0).map(() => []);
  const nonZeroRows = new Array(nbColumns).fill(0).map(() => []);
  for (let row = 0; row < nbRows; row++) {
    for (let column = 0; column < nbColumns; column++) {
      if (matrix[row][column] === 0) {
        continue;
      }
      nonZeroColumns[row].push(column);
      nonZeroRows[column].push(row);
    }
  }
  return {
    nonZeroColumns,
    nonZeroRows
  };
}

Object.defineProperty(blockFcnnls$1, "__esModule", {
  value: true
});
blockFcnnls$1.blockFcnnls = blockFcnnls;
const ml_fcnnls_1 = require$$0;
const ml_matrix_1$1 = matrix$1;
const splitMatrix_js_1 = splitMatrix$1;
function blockFcnnls(fullMatrix) {
  const target = fullMatrix[0];
  const originalMatrix = fullMatrix.slice(1);
  const matrix = [];
  const emptyRow = new Float64Array(originalMatrix[0].length);
  row: for (const row of originalMatrix) {
    for (let i = 0; i < row.length; i++) {
      if (row[i] !== 0 && target[i] !== 0) {
        matrix.push(row);
        continue row;
      }
    }
    matrix.push(emptyRow);
  }
  // if there is no match with first spectrum we just ignore this entry
  const matrices = (0, splitMatrix_js_1.splitMatrix)(matrix);
  appendTarget(matrices, target);
  const weights = new Float64Array(matrix.length);
  const reconstructed = new Float64Array(target.length);
  for (const entry of matrices) {
    const A = new ml_matrix_1$1.Matrix(entry.submatrix);
    const At = A.transpose();
    const b = Array.from(entry.target); // target
    const w = (0, ml_fcnnls_1.fcnnlsVector)(At, b);
    const W = new ml_matrix_1$1.Matrix([w]); // weights
    const partialReconstructed = W.mmul(A).getRow(0);
    for (let i = 0; i < entry.columns.length; i++) {
      reconstructed[entry.columns[i]] = partialReconstructed[i];
    }
    for (let i = 0; i < entry.rows.length; i++) {
      weights[entry.rows[i]] = w[i];
    }
  }
  return {
    reconstructed,
    weights
  };
}
function appendTarget(matrices, target) {
  for (const entry of matrices) {
    entry.target = [];
    for (let column of entry.columns) {
      entry.target.push(target[column]);
    }
  }
}

Object.defineProperty(mfsDeconvolution$1, "__esModule", {
  value: true
});
mfsDeconvolution$1.mfsDeconvolution = mfsDeconvolution;
const uuid_1 = dist;
const isotopic_distribution_1 = src$6;
const mf_generator_1 = src$b;
const ml_matrix_1 = matrix$1;
const ml_spectra_processing_1$1 = require$$0$7;
const getPeakWidthFct_1 = getPeakWidthFct$1;
const blockFcnnls_js_1 = blockFcnnls$1;
/**
 *
 * @param {import('ms-spectrum').Spectrum} spectrum
 * @param {Array}         ranges
 * @param {object}        [options={}]
 * @param {string}        [options.ionizations=''] - Comma separated list of ionizations (to charge the molecule)
 * @param {string[]}      [options.customMFs={}] - An array of MFs to add to the list generated by ranges
 * @param {object}        [options.mass={}]
 * @param {number}        [options.mass.threshold=0.001]
 * @param {number}        [options.mass.precision=0] -  Precision (accuracy) of the monoisotopic mass in ppm
 * @param {string|Function} [options.mass.peakWidthFct=()=>0.01]
 * @param {import('cheminfo-types').Logger} [options.logger]
 * @param {object}        [options.filter={}]
 * @param {number}        [options.filter.minMass=0] - Minimal monoisotopic mass
 * @param {number}        [options.filter.maxMass=+Infinity] - Maximal monoisotopic mass
 * @param {number}        [options.filter.minCharge=-Infinity] - Minimal charge
 * @param {number}        [options.filter.maxCharge=+Infinity] - Maximal charge
 * @param {boolean}       [options.filter.absoluteCharge=false] - If true, the charge is absolute (so between 0 and +Infinity by default)
 * @param {boolean}       [options.filter.allowNegativeAtoms=false] - Allow to have negative number of atoms
 * @param {object}        [options.filter.unsaturation={}]
 * @param {number}        [options.filter.unsaturation.min=-Infinity] - Minimal unsaturation
 * @param {number}        [options.filter.unsaturation.max=+Infinity] - Maximal unsaturation
 * @param {boolean}       [options.filter.unsaturation.onlyInteger=false] - Integer unsaturation
 * @param {boolean}       [options.filter.unsaturation.onlyNonInteger=false] - Non integer unsaturation
 * @param {object}        [options.filter.atoms] - object of atom:{min, max}
 * @param {function}      [options.filter.callback] - a function to filter the MF
 * @param {string}        [options.filterFct]
 */
async function mfsDeconvolution(spectrum, ranges, options = {}) {
  if (!spectrum || !spectrum.getPeaks || !spectrum.getPeaks()) {
    throw new Error('spectrum must be an instance of Spectrum');
  }
  const {
    customMFs = [],
    mass: massOptions = {},
    filter,
    ionizations,
    logger
  } = options;
  const {
    threshold = 0.001
  } = massOptions;
  if (!ionizations) {
    logger?.warn('No ionizations provided this could be an error if the molecule is not naturally charged.');
  }
  const peakWidthFct = (0, getPeakWidthFct_1.getPeakWidthFct)(options);
  const centroids = getCentroids(spectrum, {
    threshold
  });
  let mfs = await (0, mf_generator_1.generateMFs)(ranges, {
    filter,
    ionizations
  });
  if (customMFs.length > 0) {
    const newMFs = await (0, mf_generator_1.generateMFs)([customMFs], {
      filter,
      ionizations
    });
    mfs = mfs.concat(newMFs);
  }
  for (const mf of mfs) {
    mf.id = (0, uuid_1.v4)();
  }
  mfs = addIsotopicDistributionAndCheckMF(mfs, {
    logger,
    peakWidthFct
  });
  mfs.sort((mf1, mf2) => mf1.ms.em - mf2.ms.em);
  const combined = buildCombined(centroids, mfs, {
    peakWidthFct
  });
  if (!hasOverlap(combined.ys)) {
    throw new Error('Could not find any overlaping peaks between experimental and theoretical spectra.');
  }
  const {
    weights,
    reconstructed
  } = (0, blockFcnnls_js_1.blockFcnnls)(combined.ys);
  const relativeIntensity = (0, ml_spectra_processing_1$1.xNormed)(weights);
  for (let i = 0; i < mfs.length; i++) {
    mfs[i].absoluteQuantity = weights[i];
    mfs[i].relativeQuantity = relativeIntensity[i];
    mfs[i].distribution.y = mfs[i].distribution.y.map(y => y * weights[i]);
  }
  let matchingScore = 0;
  const difference = [];
  for (let i = 0; i < combined.ys[0].length; i++) {
    matchingScore += Math.min(combined.ys[0][i], reconstructed[i]);
    difference.push(combined.ys[0][i] - reconstructed[i]);
  }
  matchingScore = matchingScore / (0, ml_spectra_processing_1$1.xSum)(combined.ys[0]);
  let A;
  let W;
  return {
    reconstructed: {
      x: combined.x,
      y: reconstructed
    },
    difference: {
      x: combined.x,
      y: difference
    },
    mfs: mfs.slice().toSorted((mf1, mf2) => mf2.absoluteQuantity - mf1.absoluteQuantity),
    matchingScore,
    getFilteredReconstructed
  };
  function getFilteredReconstructed(ids = mfs.map(mf => mf.id)) {
    if (!A) A = new ml_matrix_1.Matrix(combined.ys.slice(1));
    if (!W) W = new ml_matrix_1.Matrix([weights]);
    let wClone = W;
    if (ids.length !== W.length) {
      wClone = W.clone();
      for (let i = 0; i < mfs.length; i++) {
        if (ids.includes(mfs[i].id)) continue;
        wClone.set(0, i, 0);
      }
    }
    const filteredReconstructed = wClone.mmul(A).getRow(0);
    return {
      x: combined.x,
      y: filteredReconstructed
    };
  }
}
/**
 *
 * @param {object} spectrum
 * @param {object} [options={}]
 * @param {number} [options.threshold=0.001]
 */
function getCentroids(spectrum, options = {}) {
  const {
    threshold = 0.001
  } = options;
  const peaks = spectrum.getPeaks({
    threshold
  });
  return {
    x: peaks.map(peak => peak.x),
    y: peaks.map(peak => peak.y)
  };
}
function addIsotopicDistributionAndCheckMF(mfs, options) {
  const {
    logger,
    peakWidthFct
  } = options;
  for (let mf of mfs) {
    const isotopicDistribution = new isotopic_distribution_1.IsotopicDistribution(mf.mf, {
      fwhm: peakWidthFct(mf.ms.em),
      // when should we join peaks
      ionizations: mf.ms.ionization
    });
    mf.distribution = isotopicDistribution.getXY({
      sumValue: 1
    });
    if (mf.distribution.y.length === 0) {
      logger?.warn(`Problem with isotopic distribution calculation. Negative number of atoms ? ${mf.mf} ${mf.ms.ionization}`);
    }
  }
  mfs = mfs.filter(mf => mf.distribution.x.length > 0);
  if (mfs.length === 0) {
    throw new Error('No MF found. Did you forget ionization ?');
  }
  return mfs;
}
function buildCombined(centroids, mfs, options = {}) {
  const {
    peakWidthFct
  } = options;
  if (!peakWidthFct) {
    throw new Error('peakWidthFct is mandatory');
  }
  const data = [centroids];
  for (const mf of mfs) {
    data.push(mf.distribution);
  }
  // We align all the spectra to the first one, but if some values (X) are missing, we will add them.
  return (0, ml_spectra_processing_1$1.xyArrayAlignToFirst)(data, {
    delta: peakWidthFct
  });
}
/**
 * We will check if there is any overlap between the theoretical and experimental spectra
 * @param {number[][]} ys
 */
function hasOverlap(ys) {
  for (let i = 0; i < ys[0].length; i++) {
    for (let j = 1; j < ys.length; j++) {
      if (ys[0][i] > 0 && ys[j][i] > 0) {
        return true;
      }
    }
  }
  return false;
}

var reconstruct$1 = {};

Object.defineProperty(reconstruct$1, "__esModule", {
  value: true
});
reconstruct$1.reconstruct = reconstruct;
const ml_spectra_processing_1 = require$$0$7;
/**
 * Reconstruct a mass spectrum from a set of molecular formulas
 * that has the  distribution property
 * @param {object[]} mfs
 * @param {object} [options={}]
 * @param {import('cheminfo-types').Logger} [options.logger]
 * @param {object}        [options.mass={}]
 * @param {number}        [options.mass.precision=0] -  Precision (accuracy) of the monoisotopic mass in ppm
 * @param {string|Function} [options.mass.peakWidthFct=()=>0.01]
 */
const getPeakWidthFct_js_1 = getPeakWidthFct$1;
function reconstruct(mfs, options = {}) {
  const delta = (0, getPeakWidthFct_js_1.getPeakWidthFct)(options);
  const data = mfs.map(mf => mf.distribution);
  const reconstructed = (0, ml_spectra_processing_1.xyArrayWeightedMerge)(data, {
    delta
  });
  return reconstructed;
}

(function (exports) {

  var __createBinding = src && src.__createBinding || (Object.create ? function (o, m, k, k2) {
    if (k2 === undefined) 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 === undefined) k2 = k;
    o[k2] = m[k];
  });
  var __exportStar = src && src.__exportStar || function (m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
  };
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  __exportStar(mfsDeconvolution$1, exports);
  __exportStar(reconstruct$1, exports);
})(src);
var index = /*@__PURE__*/getDefaultExportFromCjs(src);

var index$1 = /*#__PURE__*/_mergeNamespaces({
	__proto__: null,
	default: index
}, [src]);

src$l.EMDB.massShifts = src$l.massShifts;
src$l.EMDB.prototype.massShifts = src$l.massShifts;
const EMDB = src$l.EMDB;
src$k.Spectrum.JsGraph = src$k.JsGraph;
src$k.Spectrum.prototype.JsGraph = src$k.JsGraph;
const Spectrum = src$k.Spectrum;
const MSComparator = src$k.MSComparator;
const getBestPeaks = src$k.getBestPeaks;

var ActiveOrNaturalSummarizer$2 = src$2.ActiveOrNaturalSummarizer;
var IsotopicDistribution$2 = src$6.IsotopicDistribution;
var MF$2 = src$h.MF;
var MFRange$2 = src$i.MFRange;
var OctoChemDB$2 = src$2.OctoChemDB;
var createTaxonomyTree$2 = src$2.createTaxonomyTree;
var elements$3 = src$j.elements;
var elementsObject$1 = src$j.elementsObject;
var ensureCase$2 = src$h.ensureCase;
var generateMFs$2 = src$b.generateMFs;
var getRangesForFragment$2 = src$i.getRangesForFragment;
var groups$1 = src$f.groups;
var groupsObject$1 = src$f.groupsObject;
var mfFromAtomicRatio$2 = src$3.mfFromAtomicRatio;
var preprocessIonizations$2 = src$i.preprocessIonizations;
var preprocessRanges$2 = src$i.preprocessRanges;
export { ActiveOrNaturalSummarizer$2 as ActiveOrNaturalSummarizer, EMDB, IsotopicDistribution$2 as IsotopicDistribution, MF$2 as MF, MFRange$2 as MFRange, index$1 as MFSDeconvolution, MSComparator, index$b as MassFragmentation, index$9 as Nucleotide, OctoChemDB$2 as OctoChemDB, index$7 as Peptide, index$3 as Report, Spectrum, atomSorter_1 as atomSorter, createTaxonomyTree$2 as createTaxonomyTree, elements$3 as elements, elementsObject$1 as elementsObject, ensureCase$2 as ensureCase, generateMFs$2 as generateMFs, getBestPeaks, getRangesForFragment$2 as getRangesForFragment, groups$1 as groups, groupsObject$1 as groupsObject, mfFromAtomicRatio$2 as mfFromAtomicRatio, mfFromEA_1 as mfFromEA, preprocessIonizations$2 as preprocessIonizations, preprocessRanges$2 as preprocessRanges };
//# sourceMappingURL=mass-tools.esm.js.map
