/******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ "../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js":
/*!**************************************************************************************!*\
  !*** ../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js ***!
  \**************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _memoize = _interopRequireDefault(__webpack_require__(/*! @emotion/memoize */ "../../../node_modules/@emotion/memoize/dist/memoize.browser.esm.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23

var index = (0, _memoize.default)(function (prop) {
  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
  /* o */ && prop.charCodeAt(1) === 110
  /* n */ && prop.charCodeAt(2) < 91;
}
/* Z+1 */);
var _default = index;
exports["default"] = _default;

/***/ }),

/***/ "../../../node_modules/@emotion/memoize/dist/memoize.browser.esm.js":
/*!**************************************************************************!*\
  !*** ../../../node_modules/@emotion/memoize/dist/memoize.browser.esm.js ***!
  \**************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function memoize(fn) {
  var cache = {};
  return function (arg) {
    if (cache[arg] === undefined) cache[arg] = fn(arg);
    return cache[arg];
  };
}
var _default = memoize;
exports["default"] = _default;

/***/ }),

/***/ "../../../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js":
/*!****************************************************************************!*\
  !*** ../../../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js ***!
  \****************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.computePosition = exports.autoPlacement = exports.arrow = void 0;
exports.detectOverflow = detectOverflow;
exports.offset = exports.limitShift = exports.inline = exports.hide = exports.flip = void 0;
exports.rectToClientRect = rectToClientRect;
exports.size = exports.shift = void 0;
function getAlignment(placement) {
  return placement.split('-')[1];
}
function getLengthFromAxis(axis) {
  return axis === 'y' ? 'height' : 'width';
}
function getSide(placement) {
  return placement.split('-')[0];
}
function getMainAxisFromPlacement(placement) {
  return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
}
function computeCoordsFromPlacement(_ref, placement, rtl) {
  let {
    reference,
    floating
  } = _ref;
  const commonX = reference.x + reference.width / 2 - floating.width / 2;
  const commonY = reference.y + reference.height / 2 - floating.height / 2;
  const mainAxis = getMainAxisFromPlacement(placement);
  const length = getLengthFromAxis(mainAxis);
  const commonAlign = reference[length] / 2 - floating[length] / 2;
  const side = getSide(placement);
  const isVertical = mainAxis === 'x';
  let coords;
  switch (side) {
    case 'top':
      coords = {
        x: commonX,
        y: reference.y - floating.height
      };
      break;
    case 'bottom':
      coords = {
        x: commonX,
        y: reference.y + reference.height
      };
      break;
    case 'right':
      coords = {
        x: reference.x + reference.width,
        y: commonY
      };
      break;
    case 'left':
      coords = {
        x: reference.x - floating.width,
        y: commonY
      };
      break;
    default:
      coords = {
        x: reference.x,
        y: reference.y
      };
  }
  switch (getAlignment(placement)) {
    case 'start':
      coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
      break;
    case 'end':
      coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
      break;
  }
  return coords;
}

/**
 * Computes the `x` and `y` coordinates that will place the floating element
 * next to a reference element when it is given a certain positioning strategy.
 *
 * This export does not have any `platform` interface logic. You will need to
 * write one for the platform you are using Floating UI with.
 */
const computePosition = async (reference, floating, config) => {
  const {
    placement = 'bottom',
    strategy = 'absolute',
    middleware = [],
    platform
  } = config;
  const validMiddleware = middleware.filter(Boolean);
  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
  let rects = await platform.getElementRects({
    reference,
    floating,
    strategy
  });
  let {
    x,
    y
  } = computeCoordsFromPlacement(rects, placement, rtl);
  let statefulPlacement = placement;
  let middlewareData = {};
  let resetCount = 0;
  for (let i = 0; i < validMiddleware.length; i++) {
    const {
      name,
      fn
    } = validMiddleware[i];
    const {
      x: nextX,
      y: nextY,
      data,
      reset
    } = await fn({
      x,
      y,
      initialPlacement: placement,
      placement: statefulPlacement,
      strategy,
      middlewareData,
      rects,
      platform,
      elements: {
        reference,
        floating
      }
    });
    x = nextX != null ? nextX : x;
    y = nextY != null ? nextY : y;
    middlewareData = {
      ...middlewareData,
      [name]: {
        ...middlewareData[name],
        ...data
      }
    };
    if (reset && resetCount <= 50) {
      resetCount++;
      if (typeof reset === 'object') {
        if (reset.placement) {
          statefulPlacement = reset.placement;
        }
        if (reset.rects) {
          rects = reset.rects === true ? await platform.getElementRects({
            reference,
            floating,
            strategy
          }) : reset.rects;
        }
        ({
          x,
          y
        } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
      }
      i = -1;
      continue;
    }
  }
  return {
    x,
    y,
    placement: statefulPlacement,
    strategy,
    middlewareData
  };
};
exports.computePosition = computePosition;
function evaluate(value, param) {
  return typeof value === 'function' ? value(param) : value;
}
function expandPaddingObject(padding) {
  return {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0,
    ...padding
  };
}
function getSideObjectFromPadding(padding) {
  return typeof padding !== 'number' ? expandPaddingObject(padding) : {
    top: padding,
    right: padding,
    bottom: padding,
    left: padding
  };
}
function rectToClientRect(rect) {
  return {
    ...rect,
    top: rect.y,
    left: rect.x,
    right: rect.x + rect.width,
    bottom: rect.y + rect.height
  };
}

/**
 * Resolves with an object of overflow side offsets that determine how much the
 * element is overflowing a given clipping boundary on each side.
 * - positive = overflowing the boundary by that number of pixels
 * - negative = how many pixels left before it will overflow
 * - 0 = lies flush with the boundary
 * @see https://floating-ui.com/docs/detectOverflow
 */
async function detectOverflow(state, options) {
  var _await$platform$isEle;
  if (options === void 0) {
    options = {};
  }
  const {
    x,
    y,
    platform,
    rects,
    elements,
    strategy
  } = state;
  const {
    boundary = 'clippingAncestors',
    rootBoundary = 'viewport',
    elementContext = 'floating',
    altBoundary = false,
    padding = 0
  } = evaluate(options, state);
  const paddingObject = getSideObjectFromPadding(padding);
  const altContext = elementContext === 'floating' ? 'reference' : 'floating';
  const element = elements[altBoundary ? altContext : elementContext];
  const clippingClientRect = rectToClientRect(await platform.getClippingRect({
    element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
    boundary,
    rootBoundary,
    strategy
  }));
  const rect = elementContext === 'floating' ? {
    ...rects.floating,
    x,
    y
  } : rects.reference;
  const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
  const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
    x: 1,
    y: 1
  } : {
    x: 1,
    y: 1
  };
  const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
    rect,
    offsetParent,
    strategy
  }) : rect);
  return {
    top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
    bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
    left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
    right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
  };
}
const min = Math.min;
const max = Math.max;
function within(min$1, value, max$1) {
  return max(min$1, min(value, max$1));
}

/**
 * Provides data to position an inner element of the floating element so that it
 * appears centered to the reference element.
 * @see https://floating-ui.com/docs/arrow
 */
const arrow = options => ({
  name: 'arrow',
  options,
  async fn(state) {
    const {
      x,
      y,
      placement,
      rects,
      platform,
      elements
    } = state;
    // Since `element` is required, we don't Partial<> the type.
    const {
      element,
      padding = 0
    } = evaluate(options, state) || {};
    if (element == null) {
      return {};
    }
    const paddingObject = getSideObjectFromPadding(padding);
    const coords = {
      x,
      y
    };
    const axis = getMainAxisFromPlacement(placement);
    const length = getLengthFromAxis(axis);
    const arrowDimensions = await platform.getDimensions(element);
    const isYAxis = axis === 'y';
    const minProp = isYAxis ? 'top' : 'left';
    const maxProp = isYAxis ? 'bottom' : 'right';
    const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
    const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
    const startDiff = coords[axis] - rects.reference[axis];
    const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
    let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;

    // DOM platform can return `window` as the `offsetParent`.
    if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
      clientSize = elements.floating[clientProp] || rects.floating[length];
    }
    const centerToReference = endDiff / 2 - startDiff / 2;

    // If the padding is large enough that it causes the arrow to no longer be
    // centered, modify the padding so that it is centered.
    const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
    const minPadding = min(paddingObject[minProp], largestPossiblePadding);
    const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);

    // Make sure the arrow doesn't overflow the floating element if the center
    // point is outside the floating element's bounds.
    const min$1 = minPadding;
    const max = clientSize - arrowDimensions[length] - maxPadding;
    const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
    const offset = within(min$1, center, max);

    // If the reference is small enough that the arrow's padding causes it to
    // to point to nothing for an aligned placement, adjust the offset of the
    // floating element itself. This stops `shift()` from taking action, but can
    // be worked around by calling it again after the `arrow()` if desired.
    const shouldAddOffset = getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
    const alignmentOffset = shouldAddOffset ? center < min$1 ? min$1 - center : max - center : 0;
    return {
      [axis]: coords[axis] - alignmentOffset,
      data: {
        [axis]: offset,
        centerOffset: center - offset
      }
    };
  }
});
exports.arrow = arrow;
const sides = ['top', 'right', 'bottom', 'left'];
const allPlacements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-start", side + "-end"), []);
const oppositeSideMap = {
  left: 'right',
  right: 'left',
  bottom: 'top',
  top: 'bottom'
};
function getOppositePlacement(placement) {
  return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
}
function getAlignmentSides(placement, rects, rtl) {
  if (rtl === void 0) {
    rtl = false;
  }
  const alignment = getAlignment(placement);
  const mainAxis = getMainAxisFromPlacement(placement);
  const length = getLengthFromAxis(mainAxis);
  let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
  if (rects.reference[length] > rects.floating[length]) {
    mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
  }
  return {
    main: mainAlignmentSide,
    cross: getOppositePlacement(mainAlignmentSide)
  };
}
const oppositeAlignmentMap = {
  start: 'end',
  end: 'start'
};
function getOppositeAlignmentPlacement(placement) {
  return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
}
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
  const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
  return allowedPlacementsSortedByAlignment.filter(placement => {
    if (alignment) {
      return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
    }
    return true;
  });
}
/**
 * Optimizes the visibility of the floating element by choosing the placement
 * that has the most space available automatically, without needing to specify a
 * preferred placement. Alternative to `flip`.
 * @see https://floating-ui.com/docs/autoPlacement
 */
const autoPlacement = function (options) {
  if (options === void 0) {
    options = {};
  }
  return {
    name: 'autoPlacement',
    options,
    async fn(state) {
      var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
      const {
        rects,
        middlewareData,
        placement,
        platform,
        elements
      } = state;
      const {
        crossAxis = false,
        alignment,
        allowedPlacements = allPlacements,
        autoAlignment = true,
        ...detectOverflowOptions
      } = evaluate(options, state);
      const placements = alignment !== undefined || allowedPlacements === allPlacements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
      const overflow = await detectOverflow(state, detectOverflowOptions);
      const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
      const currentPlacement = placements[currentIndex];
      if (currentPlacement == null) {
        return {};
      }
      const {
        main,
        cross
      } = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));

      // Make `computeCoords` start from the right place.
      if (placement !== currentPlacement) {
        return {
          reset: {
            placement: placements[0]
          }
        };
      }
      const currentOverflows = [overflow[getSide(currentPlacement)], overflow[main], overflow[cross]];
      const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
        placement: currentPlacement,
        overflows: currentOverflows
      }];
      const nextPlacement = placements[currentIndex + 1];

      // There are more placements to check.
      if (nextPlacement) {
        return {
          data: {
            index: currentIndex + 1,
            overflows: allOverflows
          },
          reset: {
            placement: nextPlacement
          }
        };
      }
      const placementsSortedByMostSpace = allOverflows.map(d => {
        const alignment = getAlignment(d.placement);
        return [d.placement, alignment && crossAxis ?
        // Check along the mainAxis and main crossAxis side.
        d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
        // Check only the mainAxis.
        d.overflows[0], d.overflows];
      }).sort((a, b) => a[1] - b[1]);
      const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
      // Aligned placements should not check their opposite crossAxis
      // side.
      getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
      const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
      if (resetPlacement !== placement) {
        return {
          data: {
            index: currentIndex + 1,
            overflows: allOverflows
          },
          reset: {
            placement: resetPlacement
          }
        };
      }
      return {};
    }
  };
};
exports.autoPlacement = autoPlacement;
function getExpandedPlacements(placement) {
  const oppositePlacement = getOppositePlacement(placement);
  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
}
function getSideList(side, isStart, rtl) {
  const lr = ['left', 'right'];
  const rl = ['right', 'left'];
  const tb = ['top', 'bottom'];
  const bt = ['bottom', 'top'];
  switch (side) {
    case 'top':
    case 'bottom':
      if (rtl) return isStart ? rl : lr;
      return isStart ? lr : rl;
    case 'left':
    case 'right':
      return isStart ? tb : bt;
    default:
      return [];
  }
}
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
  const alignment = getAlignment(placement);
  let list = getSideList(getSide(placement), direction === 'start', rtl);
  if (alignment) {
    list = list.map(side => side + "-" + alignment);
    if (flipAlignment) {
      list = list.concat(list.map(getOppositeAlignmentPlacement));
    }
  }
  return list;
}

/**
 * Optimizes the visibility of the floating element by flipping the `placement`
 * in order to keep it in view when the preferred placement(s) will overflow the
 * clipping boundary. Alternative to `autoPlacement`.
 * @see https://floating-ui.com/docs/flip
 */
const flip = function (options) {
  if (options === void 0) {
    options = {};
  }
  return {
    name: 'flip',
    options,
    async fn(state) {
      var _middlewareData$flip;
      const {
        placement,
        middlewareData,
        rects,
        initialPlacement,
        platform,
        elements
      } = state;
      const {
        mainAxis: checkMainAxis = true,
        crossAxis: checkCrossAxis = true,
        fallbackPlacements: specifiedFallbackPlacements,
        fallbackStrategy = 'bestFit',
        fallbackAxisSideDirection = 'none',
        flipAlignment = true,
        ...detectOverflowOptions
      } = evaluate(options, state);
      const side = getSide(placement);
      const isBasePlacement = getSide(initialPlacement) === initialPlacement;
      const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
      const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
      if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
        fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
      }
      const placements = [initialPlacement, ...fallbackPlacements];
      const overflow = await detectOverflow(state, detectOverflowOptions);
      const overflows = [];
      let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
      if (checkMainAxis) {
        overflows.push(overflow[side]);
      }
      if (checkCrossAxis) {
        const {
          main,
          cross
        } = getAlignmentSides(placement, rects, rtl);
        overflows.push(overflow[main], overflow[cross]);
      }
      overflowsData = [...overflowsData, {
        placement,
        overflows
      }];

      // One or more sides is overflowing.
      if (!overflows.every(side => side <= 0)) {
        var _middlewareData$flip2, _overflowsData$filter;
        const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
        const nextPlacement = placements[nextIndex];
        if (nextPlacement) {
          // Try next placement and re-run the lifecycle.
          return {
            data: {
              index: nextIndex,
              overflows: overflowsData
            },
            reset: {
              placement: nextPlacement
            }
          };
        }

        // First, find the candidates that fit on the mainAxis side of overflow,
        // then find the placement that fits the best on the main crossAxis side.
        let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;

        // Otherwise fallback.
        if (!resetPlacement) {
          switch (fallbackStrategy) {
            case 'bestFit':
              {
                var _overflowsData$map$so;
                const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
                if (placement) {
                  resetPlacement = placement;
                }
                break;
              }
            case 'initialPlacement':
              resetPlacement = initialPlacement;
              break;
          }
        }
        if (placement !== resetPlacement) {
          return {
            reset: {
              placement: resetPlacement
            }
          };
        }
      }
      return {};
    }
  };
};
exports.flip = flip;
function getSideOffsets(overflow, rect) {
  return {
    top: overflow.top - rect.height,
    right: overflow.right - rect.width,
    bottom: overflow.bottom - rect.height,
    left: overflow.left - rect.width
  };
}
function isAnySideFullyClipped(overflow) {
  return sides.some(side => overflow[side] >= 0);
}
/**
 * Provides data to hide the floating element in applicable situations, such as
 * when it is not in the same clipping context as the reference element.
 * @see https://floating-ui.com/docs/hide
 */
const hide = function (options) {
  if (options === void 0) {
    options = {};
  }
  return {
    name: 'hide',
    options,
    async fn(state) {
      const {
        rects
      } = state;
      const {
        strategy = 'referenceHidden',
        ...detectOverflowOptions
      } = evaluate(options, state);
      switch (strategy) {
        case 'referenceHidden':
          {
            const overflow = await detectOverflow(state, {
              ...detectOverflowOptions,
              elementContext: 'reference'
            });
            const offsets = getSideOffsets(overflow, rects.reference);
            return {
              data: {
                referenceHiddenOffsets: offsets,
                referenceHidden: isAnySideFullyClipped(offsets)
              }
            };
          }
        case 'escaped':
          {
            const overflow = await detectOverflow(state, {
              ...detectOverflowOptions,
              altBoundary: true
            });
            const offsets = getSideOffsets(overflow, rects.floating);
            return {
              data: {
                escapedOffsets: offsets,
                escaped: isAnySideFullyClipped(offsets)
              }
            };
          }
        default:
          {
            return {};
          }
      }
    }
  };
};
exports.hide = hide;
function getBoundingRect(rects) {
  const minX = min(...rects.map(rect => rect.left));
  const minY = min(...rects.map(rect => rect.top));
  const maxX = max(...rects.map(rect => rect.right));
  const maxY = max(...rects.map(rect => rect.bottom));
  return {
    x: minX,
    y: minY,
    width: maxX - minX,
    height: maxY - minY
  };
}
function getRectsByLine(rects) {
  const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
  const groups = [];
  let prevRect = null;
  for (let i = 0; i < sortedRects.length; i++) {
    const rect = sortedRects[i];
    if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
      groups.push([rect]);
    } else {
      groups[groups.length - 1].push(rect);
    }
    prevRect = rect;
  }
  return groups.map(rect => rectToClientRect(getBoundingRect(rect)));
}
/**
 * Provides improved positioning for inline reference elements that can span
 * over multiple lines, such as hyperlinks or range selections.
 * @see https://floating-ui.com/docs/inline
 */
const inline = function (options) {
  if (options === void 0) {
    options = {};
  }
  return {
    name: 'inline',
    options,
    async fn(state) {
      const {
        placement,
        elements,
        rects,
        platform,
        strategy
      } = state;
      // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
      // ClientRect's bounds, despite the event listener being triggered. A
      // padding of 2 seems to handle this issue.
      const {
        padding = 2,
        x,
        y
      } = evaluate(options, state);
      const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
      const clientRects = getRectsByLine(nativeClientRects);
      const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
      const paddingObject = getSideObjectFromPadding(padding);
      function getBoundingClientRect() {
        // There are two rects and they are disjoined.
        if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
          // Find the first rect in which the point is fully inside.
          return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
        }

        // There are 2 or more connected rects.
        if (clientRects.length >= 2) {
          if (getMainAxisFromPlacement(placement) === 'x') {
            const firstRect = clientRects[0];
            const lastRect = clientRects[clientRects.length - 1];
            const isTop = getSide(placement) === 'top';
            const top = firstRect.top;
            const bottom = lastRect.bottom;
            const left = isTop ? firstRect.left : lastRect.left;
            const right = isTop ? firstRect.right : lastRect.right;
            const width = right - left;
            const height = bottom - top;
            return {
              top,
              bottom,
              left,
              right,
              width,
              height,
              x: left,
              y: top
            };
          }
          const isLeftSide = getSide(placement) === 'left';
          const maxRight = max(...clientRects.map(rect => rect.right));
          const minLeft = min(...clientRects.map(rect => rect.left));
          const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
          const top = measureRects[0].top;
          const bottom = measureRects[measureRects.length - 1].bottom;
          const left = minLeft;
          const right = maxRight;
          const width = right - left;
          const height = bottom - top;
          return {
            top,
            bottom,
            left,
            right,
            width,
            height,
            x: left,
            y: top
          };
        }
        return fallback;
      }
      const resetRects = await platform.getElementRects({
        reference: {
          getBoundingClientRect
        },
        floating: elements.floating,
        strategy
      });
      if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
        return {
          reset: {
            rects: resetRects
          }
        };
      }
      return {};
    }
  };
};
exports.inline = inline;
async function convertValueToCoords(state, options) {
  const {
    placement,
    platform,
    elements
  } = state;
  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
  const side = getSide(placement);
  const alignment = getAlignment(placement);
  const isVertical = getMainAxisFromPlacement(placement) === 'x';
  const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
  const rawValue = evaluate(options, state);

  // eslint-disable-next-line prefer-const
  let {
    mainAxis,
    crossAxis,
    alignmentAxis
  } = typeof rawValue === 'number' ? {
    mainAxis: rawValue,
    crossAxis: 0,
    alignmentAxis: null
  } : {
    mainAxis: 0,
    crossAxis: 0,
    alignmentAxis: null,
    ...rawValue
  };
  if (alignment && typeof alignmentAxis === 'number') {
    crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
  }
  return isVertical ? {
    x: crossAxis * crossAxisMulti,
    y: mainAxis * mainAxisMulti
  } : {
    x: mainAxis * mainAxisMulti,
    y: crossAxis * crossAxisMulti
  };
}

/**
 * Modifies the placement by translating the floating element along the
 * specified axes.
 * A number (shorthand for `mainAxis` or distance), or an axes configuration
 * object may be passed.
 * @see https://floating-ui.com/docs/offset
 */
const offset = function (options) {
  if (options === void 0) {
    options = 0;
  }
  return {
    name: 'offset',
    options,
    async fn(state) {
      const {
        x,
        y
      } = state;
      const diffCoords = await convertValueToCoords(state, options);
      return {
        x: x + diffCoords.x,
        y: y + diffCoords.y,
        data: diffCoords
      };
    }
  };
};
exports.offset = offset;
function getCrossAxis(axis) {
  return axis === 'x' ? 'y' : 'x';
}

/**
 * Optimizes the visibility of the floating element by shifting it in order to
 * keep it in view when it will overflow the clipping boundary.
 * @see https://floating-ui.com/docs/shift
 */
const shift = function (options) {
  if (options === void 0) {
    options = {};
  }
  return {
    name: 'shift',
    options,
    async fn(state) {
      const {
        x,
        y,
        placement
      } = state;
      const {
        mainAxis: checkMainAxis = true,
        crossAxis: checkCrossAxis = false,
        limiter = {
          fn: _ref => {
            let {
              x,
              y
            } = _ref;
            return {
              x,
              y
            };
          }
        },
        ...detectOverflowOptions
      } = evaluate(options, state);
      const coords = {
        x,
        y
      };
      const overflow = await detectOverflow(state, detectOverflowOptions);
      const mainAxis = getMainAxisFromPlacement(getSide(placement));
      const crossAxis = getCrossAxis(mainAxis);
      let mainAxisCoord = coords[mainAxis];
      let crossAxisCoord = coords[crossAxis];
      if (checkMainAxis) {
        const minSide = mainAxis === 'y' ? 'top' : 'left';
        const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
        const min = mainAxisCoord + overflow[minSide];
        const max = mainAxisCoord - overflow[maxSide];
        mainAxisCoord = within(min, mainAxisCoord, max);
      }
      if (checkCrossAxis) {
        const minSide = crossAxis === 'y' ? 'top' : 'left';
        const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
        const min = crossAxisCoord + overflow[minSide];
        const max = crossAxisCoord - overflow[maxSide];
        crossAxisCoord = within(min, crossAxisCoord, max);
      }
      const limitedCoords = limiter.fn({
        ...state,
        [mainAxis]: mainAxisCoord,
        [crossAxis]: crossAxisCoord
      });
      return {
        ...limitedCoords,
        data: {
          x: limitedCoords.x - x,
          y: limitedCoords.y - y
        }
      };
    }
  };
};
/**
 * Built-in `limiter` that will stop `shift()` at a certain point.
 */
exports.shift = shift;
const limitShift = function (options) {
  if (options === void 0) {
    options = {};
  }
  return {
    options,
    fn(state) {
      const {
        x,
        y,
        placement,
        rects,
        middlewareData
      } = state;
      const {
        offset = 0,
        mainAxis: checkMainAxis = true,
        crossAxis: checkCrossAxis = true
      } = evaluate(options, state);
      const coords = {
        x,
        y
      };
      const mainAxis = getMainAxisFromPlacement(placement);
      const crossAxis = getCrossAxis(mainAxis);
      let mainAxisCoord = coords[mainAxis];
      let crossAxisCoord = coords[crossAxis];
      const rawOffset = evaluate(offset, state);
      const computedOffset = typeof rawOffset === 'number' ? {
        mainAxis: rawOffset,
        crossAxis: 0
      } : {
        mainAxis: 0,
        crossAxis: 0,
        ...rawOffset
      };
      if (checkMainAxis) {
        const len = mainAxis === 'y' ? 'height' : 'width';
        const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
        const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
        if (mainAxisCoord < limitMin) {
          mainAxisCoord = limitMin;
        } else if (mainAxisCoord > limitMax) {
          mainAxisCoord = limitMax;
        }
      }
      if (checkCrossAxis) {
        var _middlewareData$offse, _middlewareData$offse2;
        const len = mainAxis === 'y' ? 'width' : 'height';
        const isOriginSide = ['top', 'left'].includes(getSide(placement));
        const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
        const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
        if (crossAxisCoord < limitMin) {
          crossAxisCoord = limitMin;
        } else if (crossAxisCoord > limitMax) {
          crossAxisCoord = limitMax;
        }
      }
      return {
        [mainAxis]: mainAxisCoord,
        [crossAxis]: crossAxisCoord
      };
    }
  };
};

/**
 * Provides data that allows you to change the size of the floating element —
 * for instance, prevent it from overflowing the clipping boundary or match the
 * width of the reference element.
 * @see https://floating-ui.com/docs/size
 */
exports.limitShift = limitShift;
const size = function (options) {
  if (options === void 0) {
    options = {};
  }
  return {
    name: 'size',
    options,
    async fn(state) {
      const {
        placement,
        rects,
        platform,
        elements
      } = state;
      const {
        apply = () => {},
        ...detectOverflowOptions
      } = evaluate(options, state);
      const overflow = await detectOverflow(state, detectOverflowOptions);
      const side = getSide(placement);
      const alignment = getAlignment(placement);
      const axis = getMainAxisFromPlacement(placement);
      const isXAxis = axis === 'x';
      const {
        width,
        height
      } = rects.floating;
      let heightSide;
      let widthSide;
      if (side === 'top' || side === 'bottom') {
        heightSide = side;
        widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
      } else {
        widthSide = side;
        heightSide = alignment === 'end' ? 'top' : 'bottom';
      }
      const overflowAvailableHeight = height - overflow[heightSide];
      const overflowAvailableWidth = width - overflow[widthSide];
      const noShift = !state.middlewareData.shift;
      let availableHeight = overflowAvailableHeight;
      let availableWidth = overflowAvailableWidth;
      if (isXAxis) {
        const maximumClippingWidth = width - overflow.left - overflow.right;
        availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
      } else {
        const maximumClippingHeight = height - overflow.top - overflow.bottom;
        availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
      }
      if (noShift && !alignment) {
        const xMin = max(overflow.left, 0);
        const xMax = max(overflow.right, 0);
        const yMin = max(overflow.top, 0);
        const yMax = max(overflow.bottom, 0);
        if (isXAxis) {
          availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
        } else {
          availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
        }
      }
      await apply({
        ...state,
        availableWidth,
        availableHeight
      });
      const nextDimensions = await platform.getDimensions(elements.floating);
      if (width !== nextDimensions.width || height !== nextDimensions.height) {
        return {
          reset: {
            rects: true
          }
        };
      }
      return {};
    }
  };
};
exports.size = size;

/***/ }),

/***/ "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js":
/*!**************************************************************************!*\
  !*** ../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js ***!
  \**************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "arrow", ({
  enumerable: true,
  get: function () {
    return _core.arrow;
  }
}));
Object.defineProperty(exports, "autoPlacement", ({
  enumerable: true,
  get: function () {
    return _core.autoPlacement;
  }
}));
exports.autoUpdate = autoUpdate;
exports.computePosition = void 0;
Object.defineProperty(exports, "detectOverflow", ({
  enumerable: true,
  get: function () {
    return _core.detectOverflow;
  }
}));
Object.defineProperty(exports, "flip", ({
  enumerable: true,
  get: function () {
    return _core.flip;
  }
}));
exports.getOverflowAncestors = getOverflowAncestors;
Object.defineProperty(exports, "hide", ({
  enumerable: true,
  get: function () {
    return _core.hide;
  }
}));
Object.defineProperty(exports, "inline", ({
  enumerable: true,
  get: function () {
    return _core.inline;
  }
}));
Object.defineProperty(exports, "limitShift", ({
  enumerable: true,
  get: function () {
    return _core.limitShift;
  }
}));
Object.defineProperty(exports, "offset", ({
  enumerable: true,
  get: function () {
    return _core.offset;
  }
}));
exports.platform = void 0;
Object.defineProperty(exports, "shift", ({
  enumerable: true,
  get: function () {
    return _core.shift;
  }
}));
Object.defineProperty(exports, "size", ({
  enumerable: true,
  get: function () {
    return _core.size;
  }
}));
var _core = __webpack_require__(/*! @floating-ui/core */ "../../../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js");
function getWindow(node) {
  var _node$ownerDocument;
  return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
}
function getComputedStyle$1(element) {
  return getWindow(element).getComputedStyle(element);
}
function isNode(value) {
  return value instanceof getWindow(value).Node;
}
function getNodeName(node) {
  return isNode(node) ? (node.nodeName || '').toLowerCase() : '';
}
function isHTMLElement(value) {
  return value instanceof getWindow(value).HTMLElement;
}
function isElement(value) {
  return value instanceof getWindow(value).Element;
}
function isShadowRoot(node) {
  // Browsers without `ShadowRoot` support.
  if (typeof ShadowRoot === 'undefined') {
    return false;
  }
  const OwnElement = getWindow(node).ShadowRoot;
  return node instanceof OwnElement || node instanceof ShadowRoot;
}
function isOverflowElement(element) {
  const {
    overflow,
    overflowX,
    overflowY,
    display
  } = getComputedStyle$1(element);
  return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
}
function isTableElement(element) {
  return ['table', 'td', 'th'].includes(getNodeName(element));
}
function isContainingBlock(element) {
  const safari = isSafari();
  const css = getComputedStyle$1(element);

  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
  return css.transform !== 'none' || css.perspective !== 'none' || !safari && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !safari && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
}
function isSafari() {
  if (typeof CSS === 'undefined' || !CSS.supports) return false;
  return CSS.supports('-webkit-backdrop-filter', 'none');
}
function isLastTraversableNode(node) {
  return ['html', 'body', '#document'].includes(getNodeName(node));
}
const min = Math.min;
const max = Math.max;
const round = Math.round;
function getCssDimensions(element) {
  const css = getComputedStyle$1(element);
  // In testing environments, the `width` and `height` properties are empty
  // strings for SVG elements, returning NaN. Fallback to `0` in this case.
  let width = parseFloat(css.width) || 0;
  let height = parseFloat(css.height) || 0;
  const hasOffset = isHTMLElement(element);
  const offsetWidth = hasOffset ? element.offsetWidth : width;
  const offsetHeight = hasOffset ? element.offsetHeight : height;
  const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
  if (shouldFallback) {
    width = offsetWidth;
    height = offsetHeight;
  }
  return {
    width,
    height,
    fallback: shouldFallback
  };
}
function unwrapElement(element) {
  return !isElement(element) ? element.contextElement : element;
}
const FALLBACK_SCALE = {
  x: 1,
  y: 1
};
function getScale(element) {
  const domElement = unwrapElement(element);
  if (!isHTMLElement(domElement)) {
    return FALLBACK_SCALE;
  }
  const rect = domElement.getBoundingClientRect();
  const {
    width,
    height,
    fallback
  } = getCssDimensions(domElement);
  let x = (fallback ? round(rect.width) : rect.width) / width;
  let y = (fallback ? round(rect.height) : rect.height) / height;

  // 0, NaN, or Infinity should always fallback to 1.

  if (!x || !Number.isFinite(x)) {
    x = 1;
  }
  if (!y || !Number.isFinite(y)) {
    y = 1;
  }
  return {
    x,
    y
  };
}
const noOffsets = {
  x: 0,
  y: 0
};
function getVisualOffsets(element, isFixed, floatingOffsetParent) {
  var _win$visualViewport, _win$visualViewport2;
  if (isFixed === void 0) {
    isFixed = true;
  }
  if (!isSafari()) {
    return noOffsets;
  }
  const win = element ? getWindow(element) : window;
  if (!floatingOffsetParent || isFixed && floatingOffsetParent !== win) {
    return noOffsets;
  }
  return {
    x: ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0,
    y: ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0
  };
}
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
  if (includeScale === void 0) {
    includeScale = false;
  }
  if (isFixedStrategy === void 0) {
    isFixedStrategy = false;
  }
  const clientRect = element.getBoundingClientRect();
  const domElement = unwrapElement(element);
  let scale = FALLBACK_SCALE;
  if (includeScale) {
    if (offsetParent) {
      if (isElement(offsetParent)) {
        scale = getScale(offsetParent);
      }
    } else {
      scale = getScale(element);
    }
  }
  const visualOffsets = getVisualOffsets(domElement, isFixedStrategy, offsetParent);
  let x = (clientRect.left + visualOffsets.x) / scale.x;
  let y = (clientRect.top + visualOffsets.y) / scale.y;
  let width = clientRect.width / scale.x;
  let height = clientRect.height / scale.y;
  if (domElement) {
    const win = getWindow(domElement);
    const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
    let currentIFrame = win.frameElement;
    while (currentIFrame && offsetParent && offsetWin !== win) {
      const iframeScale = getScale(currentIFrame);
      const iframeRect = currentIFrame.getBoundingClientRect();
      const css = getComputedStyle(currentIFrame);
      iframeRect.x += (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
      iframeRect.y += (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
      x *= iframeScale.x;
      y *= iframeScale.y;
      width *= iframeScale.x;
      height *= iframeScale.y;
      x += iframeRect.x;
      y += iframeRect.y;
      currentIFrame = getWindow(currentIFrame).frameElement;
    }
  }
  return (0, _core.rectToClientRect)({
    width,
    height,
    x,
    y
  });
}
function getDocumentElement(node) {
  return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
}
function getNodeScroll(element) {
  if (isElement(element)) {
    return {
      scrollLeft: element.scrollLeft,
      scrollTop: element.scrollTop
    };
  }
  return {
    scrollLeft: element.pageXOffset,
    scrollTop: element.pageYOffset
  };
}
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
  let {
    rect,
    offsetParent,
    strategy
  } = _ref;
  const isOffsetParentAnElement = isHTMLElement(offsetParent);
  const documentElement = getDocumentElement(offsetParent);
  if (offsetParent === documentElement) {
    return rect;
  }
  let scroll = {
    scrollLeft: 0,
    scrollTop: 0
  };
  let scale = {
    x: 1,
    y: 1
  };
  const offsets = {
    x: 0,
    y: 0
  };
  if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
    if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
      scroll = getNodeScroll(offsetParent);
    }
    if (isHTMLElement(offsetParent)) {
      const offsetRect = getBoundingClientRect(offsetParent);
      scale = getScale(offsetParent);
      offsets.x = offsetRect.x + offsetParent.clientLeft;
      offsets.y = offsetRect.y + offsetParent.clientTop;
    }
  }
  return {
    width: rect.width * scale.x,
    height: rect.height * scale.y,
    x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
    y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
  };
}
function getWindowScrollBarX(element) {
  // If <html> has a CSS width greater than the viewport, then this will be
  // incorrect for RTL.
  return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
}

// Gets the entire size of the scrollable document area, even extending outside
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
function getDocumentRect(element) {
  const html = getDocumentElement(element);
  const scroll = getNodeScroll(element);
  const body = element.ownerDocument.body;
  const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
  const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
  let x = -scroll.scrollLeft + getWindowScrollBarX(element);
  const y = -scroll.scrollTop;
  if (getComputedStyle$1(body).direction === 'rtl') {
    x += max(html.clientWidth, body.clientWidth) - width;
  }
  return {
    width,
    height,
    x,
    y
  };
}
function getParentNode(node) {
  if (getNodeName(node) === 'html') {
    return node;
  }
  const result =
  // Step into the shadow DOM of the parent of a slotted node.
  node.assignedSlot ||
  // DOM Element detected.
  node.parentNode ||
  // ShadowRoot detected.
  isShadowRoot(node) && node.host ||
  // Fallback.
  getDocumentElement(node);
  return isShadowRoot(result) ? result.host : result;
}
function getNearestOverflowAncestor(node) {
  const parentNode = getParentNode(node);
  if (isLastTraversableNode(parentNode)) {
    // `getParentNode` will never return a `Document` due to the fallback
    // check, so it's either the <html> or <body> element.
    return parentNode.ownerDocument.body;
  }
  if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
    return parentNode;
  }
  return getNearestOverflowAncestor(parentNode);
}
function getOverflowAncestors(node, list) {
  var _node$ownerDocument;
  if (list === void 0) {
    list = [];
  }
  const scrollableAncestor = getNearestOverflowAncestor(node);
  const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
  const win = getWindow(scrollableAncestor);
  if (isBody) {
    return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
  }
  return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
}
function getViewportRect(element, strategy) {
  const win = getWindow(element);
  const html = getDocumentElement(element);
  const visualViewport = win.visualViewport;
  let width = html.clientWidth;
  let height = html.clientHeight;
  let x = 0;
  let y = 0;
  if (visualViewport) {
    width = visualViewport.width;
    height = visualViewport.height;
    const visualViewportBased = isSafari();
    if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
      x = visualViewport.offsetLeft;
      y = visualViewport.offsetTop;
    }
  }
  return {
    width,
    height,
    x,
    y
  };
}

// Returns the inner client rect, subtracting scrollbars if present.
function getInnerBoundingClientRect(element, strategy) {
  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
  const top = clientRect.top + element.clientTop;
  const left = clientRect.left + element.clientLeft;
  const scale = isHTMLElement(element) ? getScale(element) : {
    x: 1,
    y: 1
  };
  const width = element.clientWidth * scale.x;
  const height = element.clientHeight * scale.y;
  const x = left * scale.x;
  const y = top * scale.y;
  return {
    width,
    height,
    x,
    y
  };
}
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
  let rect;
  if (clippingAncestor === 'viewport') {
    rect = getViewportRect(element, strategy);
  } else if (clippingAncestor === 'document') {
    rect = getDocumentRect(getDocumentElement(element));
  } else if (isElement(clippingAncestor)) {
    rect = getInnerBoundingClientRect(clippingAncestor, strategy);
  } else {
    const visualOffsets = getVisualOffsets(element);
    rect = {
      ...clippingAncestor,
      x: clippingAncestor.x - visualOffsets.x,
      y: clippingAncestor.y - visualOffsets.y
    };
  }
  return (0, _core.rectToClientRect)(rect);
}
function hasFixedPositionAncestor(element, stopNode) {
  const parentNode = getParentNode(element);
  if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
    return false;
  }
  return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
}

// A "clipping ancestor" is an `overflow` element with the characteristic of
// clipping (or hiding) child elements. This returns all clipping ancestors
// of the given element up the tree.
function getClippingElementAncestors(element, cache) {
  const cachedResult = cache.get(element);
  if (cachedResult) {
    return cachedResult;
  }
  let result = getOverflowAncestors(element).filter(el => isElement(el) && getNodeName(el) !== 'body');
  let currentContainingBlockComputedStyle = null;
  const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
  let currentNode = elementIsFixed ? getParentNode(element) : element;

  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
    const computedStyle = getComputedStyle$1(currentNode);
    const currentNodeIsContaining = isContainingBlock(currentNode);
    if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
      currentContainingBlockComputedStyle = null;
    }
    const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
    if (shouldDropCurrentNode) {
      // Drop non-containing blocks.
      result = result.filter(ancestor => ancestor !== currentNode);
    } else {
      // Record last containing block for next iteration.
      currentContainingBlockComputedStyle = computedStyle;
    }
    currentNode = getParentNode(currentNode);
  }
  cache.set(element, result);
  return result;
}

// Gets the maximum area that the element is visible in due to any number of
// clipping ancestors.
function getClippingRect(_ref) {
  let {
    element,
    boundary,
    rootBoundary,
    strategy
  } = _ref;
  const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
  const clippingAncestors = [...elementClippingAncestors, rootBoundary];
  const firstClippingAncestor = clippingAncestors[0];
  const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
    const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
    accRect.top = max(rect.top, accRect.top);
    accRect.right = min(rect.right, accRect.right);
    accRect.bottom = min(rect.bottom, accRect.bottom);
    accRect.left = max(rect.left, accRect.left);
    return accRect;
  }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
  return {
    width: clippingRect.right - clippingRect.left,
    height: clippingRect.bottom - clippingRect.top,
    x: clippingRect.left,
    y: clippingRect.top
  };
}
function getDimensions(element) {
  return getCssDimensions(element);
}
function getTrueOffsetParent(element, polyfill) {
  if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
    return null;
  }
  if (polyfill) {
    return polyfill(element);
  }
  return element.offsetParent;
}
function getContainingBlock(element) {
  let currentNode = getParentNode(element);
  while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
    if (isContainingBlock(currentNode)) {
      return currentNode;
    } else {
      currentNode = getParentNode(currentNode);
    }
  }
  return null;
}

// Gets the closest ancestor positioned element. Handles some edge cases,
// such as table ancestors and cross browser bugs.
function getOffsetParent(element, polyfill) {
  const window = getWindow(element);
  if (!isHTMLElement(element)) {
    return window;
  }
  let offsetParent = getTrueOffsetParent(element, polyfill);
  while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
    offsetParent = getTrueOffsetParent(offsetParent, polyfill);
  }
  if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
    return window;
  }
  return offsetParent || getContainingBlock(element) || window;
}
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
  const isOffsetParentAnElement = isHTMLElement(offsetParent);
  const documentElement = getDocumentElement(offsetParent);
  const isFixed = strategy === 'fixed';
  const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
  let scroll = {
    scrollLeft: 0,
    scrollTop: 0
  };
  const offsets = {
    x: 0,
    y: 0
  };
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
    if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
      scroll = getNodeScroll(offsetParent);
    }
    if (isHTMLElement(offsetParent)) {
      const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
      offsets.x = offsetRect.x + offsetParent.clientLeft;
      offsets.y = offsetRect.y + offsetParent.clientTop;
    } else if (documentElement) {
      offsets.x = getWindowScrollBarX(documentElement);
    }
  }
  return {
    x: rect.left + scroll.scrollLeft - offsets.x,
    y: rect.top + scroll.scrollTop - offsets.y,
    width: rect.width,
    height: rect.height
  };
}
const platform = {
  getClippingRect,
  convertOffsetParentRelativeRectToViewportRelativeRect,
  isElement,
  getDimensions,
  getOffsetParent,
  getDocumentElement,
  getScale,
  async getElementRects(_ref) {
    let {
      reference,
      floating,
      strategy
    } = _ref;
    const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
    const getDimensionsFn = this.getDimensions;
    return {
      reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
      floating: {
        x: 0,
        y: 0,
        ...(await getDimensionsFn(floating))
      }
    };
  },
  getClientRects: element => Array.from(element.getClientRects()),
  isRTL: element => getComputedStyle$1(element).direction === 'rtl'
};

/**
 * Automatically updates the position of the floating element when necessary.
 * Should only be called when the floating element is mounted on the DOM or
 * visible on the screen.
 * @returns cleanup function that should be invoked when the floating element is
 * removed from the DOM or hidden from the screen.
 * @see https://floating-ui.com/docs/autoUpdate
 */
exports.platform = platform;
function autoUpdate(reference, floating, update, options) {
  if (options === void 0) {
    options = {};
  }
  const {
    ancestorScroll = true,
    ancestorResize = true,
    elementResize = true,
    animationFrame = false
  } = options;
  const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : reference.contextElement ? getOverflowAncestors(reference.contextElement) : []), ...getOverflowAncestors(floating)] : [];
  ancestors.forEach(ancestor => {
    // ignores Window, checks for [object VisualViewport]
    const isVisualViewport = !isElement(ancestor) && ancestor.toString().includes('V');
    if (ancestorScroll && (animationFrame ? isVisualViewport : true)) {
      ancestor.addEventListener('scroll', update, {
        passive: true
      });
    }
    ancestorResize && ancestor.addEventListener('resize', update);
  });
  let observer = null;
  if (elementResize) {
    observer = new ResizeObserver(() => {
      update();
    });
    isElement(reference) && !animationFrame && observer.observe(reference);
    if (!isElement(reference) && reference.contextElement && !animationFrame) {
      observer.observe(reference.contextElement);
    }
    observer.observe(floating);
  }
  let frameId;
  let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
  if (animationFrame) {
    frameLoop();
  }
  function frameLoop() {
    const nextRefRect = getBoundingClientRect(reference);
    if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
      update();
    }
    prevRefRect = nextRefRect;
    frameId = requestAnimationFrame(frameLoop);
  }
  update();
  return () => {
    var _observer;
    ancestors.forEach(ancestor => {
      ancestorScroll && ancestor.removeEventListener('scroll', update);
      ancestorResize && ancestor.removeEventListener('resize', update);
    });
    (_observer = observer) == null ? void 0 : _observer.disconnect();
    observer = null;
    if (animationFrame) {
      cancelAnimationFrame(frameId);
    }
  };
}

/**
 * Computes the `x` and `y` coordinates that will place the floating element
 * next to a reference element when it is given a certain CSS positioning
 * strategy.
 */
const computePosition = (reference, floating, options) => {
  // This caches the expensive `getClippingElementAncestors` function so that
  // multiple lifecycle resets re-use the same result. It only lives for a
  // single call. If other functions become expensive, we can add them as well.
  const cache = new Map();
  const mergedOptions = {
    platform,
    ...options
  };
  const platformWithCache = {
    ...mergedOptions.platform,
    _c: cache
  };
  return (0, _core.computePosition)(reference, floating, {
    ...mergedOptions,
    platform: platformWithCache
  });
};
exports.computePosition = computePosition;

/***/ }),

/***/ "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js":
/*!**************************************************************************************!*\
  !*** ../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js ***!
  \**************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.arrow = void 0;
Object.defineProperty(exports, "autoPlacement", ({
  enumerable: true,
  get: function () {
    return _dom.autoPlacement;
  }
}));
Object.defineProperty(exports, "autoUpdate", ({
  enumerable: true,
  get: function () {
    return _dom.autoUpdate;
  }
}));
Object.defineProperty(exports, "computePosition", ({
  enumerable: true,
  get: function () {
    return _dom.computePosition;
  }
}));
Object.defineProperty(exports, "detectOverflow", ({
  enumerable: true,
  get: function () {
    return _dom.detectOverflow;
  }
}));
Object.defineProperty(exports, "flip", ({
  enumerable: true,
  get: function () {
    return _dom.flip;
  }
}));
Object.defineProperty(exports, "getOverflowAncestors", ({
  enumerable: true,
  get: function () {
    return _dom.getOverflowAncestors;
  }
}));
Object.defineProperty(exports, "hide", ({
  enumerable: true,
  get: function () {
    return _dom.hide;
  }
}));
Object.defineProperty(exports, "inline", ({
  enumerable: true,
  get: function () {
    return _dom.inline;
  }
}));
Object.defineProperty(exports, "limitShift", ({
  enumerable: true,
  get: function () {
    return _dom.limitShift;
  }
}));
Object.defineProperty(exports, "offset", ({
  enumerable: true,
  get: function () {
    return _dom.offset;
  }
}));
Object.defineProperty(exports, "platform", ({
  enumerable: true,
  get: function () {
    return _dom.platform;
  }
}));
Object.defineProperty(exports, "shift", ({
  enumerable: true,
  get: function () {
    return _dom.shift;
  }
}));
Object.defineProperty(exports, "size", ({
  enumerable: true,
  get: function () {
    return _dom.size;
  }
}));
exports.useFloating = useFloating;
var _dom = __webpack_require__(/*! @floating-ui/dom */ "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js");
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * Provides data to position an inner element of the floating element so that it
 * appears centered to the reference element.
 * This wraps the core `arrow` middleware to allow React refs as the element.
 * @see https://floating-ui.com/docs/arrow
 */
const arrow = options => {
  function isRef(value) {
    return {}.hasOwnProperty.call(value, 'current');
  }
  return {
    name: 'arrow',
    options,
    fn(state) {
      const {
        element,
        padding
      } = typeof options === 'function' ? options(state) : options;
      if (element && isRef(element)) {
        if (element.current != null) {
          return (0, _dom.arrow)({
            element: element.current,
            padding
          }).fn(state);
        }
        return {};
      } else if (element) {
        return (0, _dom.arrow)({
          element,
          padding
        }).fn(state);
      }
      return {};
    }
  };
};
exports.arrow = arrow;
var index = typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect;

// Fork of `fast-deep-equal` that only does the comparisons we need and compares
// functions
function deepEqual(a, b) {
  if (a === b) {
    return true;
  }
  if (typeof a !== typeof b) {
    return false;
  }
  if (typeof a === 'function' && a.toString() === b.toString()) {
    return true;
  }
  let length, i, keys;
  if (a && b && typeof a == 'object') {
    if (Array.isArray(a)) {
      length = a.length;
      if (length != b.length) return false;
      for (i = length; i-- !== 0;) {
        if (!deepEqual(a[i], b[i])) {
          return false;
        }
      }
      return true;
    }
    keys = Object.keys(a);
    length = keys.length;
    if (length !== Object.keys(b).length) {
      return false;
    }
    for (i = length; i-- !== 0;) {
      if (!{}.hasOwnProperty.call(b, keys[i])) {
        return false;
      }
    }
    for (i = length; i-- !== 0;) {
      const key = keys[i];
      if (key === '_owner' && a.$$typeof) {
        continue;
      }
      if (!deepEqual(a[key], b[key])) {
        return false;
      }
    }
    return true;
  }
  return a !== a && b !== b;
}
function getDPR(element) {
  if (typeof window === 'undefined') {
    return 1;
  }
  const win = element.ownerDocument.defaultView || window;
  return win.devicePixelRatio || 1;
}
function roundByDPR(element, value) {
  const dpr = getDPR(element);
  return Math.round(value * dpr) / dpr;
}
function useLatestRef(value) {
  const ref = React.useRef(value);
  index(() => {
    ref.current = value;
  });
  return ref;
}

/**
 * Provides data to position a floating element.
 * @see https://floating-ui.com/docs/react
 */
function useFloating(options) {
  if (options === void 0) {
    options = {};
  }
  const {
    placement = 'bottom',
    strategy = 'absolute',
    middleware = [],
    platform,
    elements: {
      reference: externalReference,
      floating: externalFloating
    } = {},
    transform = true,
    whileElementsMounted,
    open
  } = options;
  const [data, setData] = React.useState({
    x: 0,
    y: 0,
    strategy,
    placement,
    middlewareData: {},
    isPositioned: false
  });
  const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);
  if (!deepEqual(latestMiddleware, middleware)) {
    setLatestMiddleware(middleware);
  }
  const [_reference, _setReference] = React.useState(null);
  const [_floating, _setFloating] = React.useState(null);
  const setReference = React.useCallback(node => {
    if (node != referenceRef.current) {
      referenceRef.current = node;
      _setReference(node);
    }
  }, [_setReference]);
  const setFloating = React.useCallback(node => {
    if (node !== floatingRef.current) {
      floatingRef.current = node;
      _setFloating(node);
    }
  }, [_setFloating]);
  const referenceEl = externalReference || _reference;
  const floatingEl = externalFloating || _floating;
  const referenceRef = React.useRef(null);
  const floatingRef = React.useRef(null);
  const dataRef = React.useRef(data);
  const whileElementsMountedRef = useLatestRef(whileElementsMounted);
  const platformRef = useLatestRef(platform);
  const update = React.useCallback(() => {
    if (!referenceRef.current || !floatingRef.current) {
      return;
    }
    const config = {
      placement,
      strategy,
      middleware: latestMiddleware
    };
    if (platformRef.current) {
      config.platform = platformRef.current;
    }
    (0, _dom.computePosition)(referenceRef.current, floatingRef.current, config).then(data => {
      const fullData = {
        ...data,
        isPositioned: true
      };
      if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
        dataRef.current = fullData;
        ReactDOM.flushSync(() => {
          setData(fullData);
        });
      }
    });
  }, [latestMiddleware, placement, strategy, platformRef]);
  index(() => {
    if (open === false && dataRef.current.isPositioned) {
      dataRef.current.isPositioned = false;
      setData(data => ({
        ...data,
        isPositioned: false
      }));
    }
  }, [open]);
  const isMountedRef = React.useRef(false);
  index(() => {
    isMountedRef.current = true;
    return () => {
      isMountedRef.current = false;
    };
  }, []);
  index(() => {
    if (referenceEl) referenceRef.current = referenceEl;
    if (floatingEl) floatingRef.current = floatingEl;
    if (referenceEl && floatingEl) {
      if (whileElementsMountedRef.current) {
        return whileElementsMountedRef.current(referenceEl, floatingEl, update);
      } else {
        update();
      }
    }
  }, [referenceEl, floatingEl, update, whileElementsMountedRef]);
  const refs = React.useMemo(() => ({
    reference: referenceRef,
    floating: floatingRef,
    setReference,
    setFloating
  }), [setReference, setFloating]);
  const elements = React.useMemo(() => ({
    reference: referenceEl,
    floating: floatingEl
  }), [referenceEl, floatingEl]);
  const floatingStyles = React.useMemo(() => {
    const initialStyles = {
      position: strategy,
      left: 0,
      top: 0
    };
    if (!elements.floating) {
      return initialStyles;
    }
    const x = roundByDPR(elements.floating, data.x);
    const y = roundByDPR(elements.floating, data.y);
    if (transform) {
      return {
        ...initialStyles,
        transform: "translate(" + x + "px, " + y + "px)",
        ...(getDPR(elements.floating) >= 1.5 && {
          willChange: 'transform'
        })
      };
    }
    return {
      position: strategy,
      left: x,
      top: y
    };
  }, [strategy, transform, elements.floating, data.x, data.y]);
  return React.useMemo(() => ({
    ...data,
    update,
    refs,
    elements,
    floatingStyles
  }), [data, update, refs, elements, floatingStyles]);
}

/***/ }),

/***/ "../../../node_modules/@motionone/animation/dist/Animation.es.js":
/*!***********************************************************************!*\
  !*** ../../../node_modules/@motionone/animation/dist/Animation.es.js ***!
  \***********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.Animation = void 0;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
var _easingEs = __webpack_require__(/*! ./utils/easing.es.js */ "../../../node_modules/@motionone/animation/dist/utils/easing.es.js");
class Animation {
  constructor(output) {
    let keyframes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 1];
    let {
      easing,
      duration: initialDuration = _utils.defaults.duration,
      delay = _utils.defaults.delay,
      endDelay = _utils.defaults.endDelay,
      repeat = _utils.defaults.repeat,
      offset,
      direction = "normal"
    } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
    this.startTime = null;
    this.rate = 1;
    this.t = 0;
    this.cancelTimestamp = null;
    this.easing = _utils.noopReturn;
    this.duration = 0;
    this.totalDuration = 0;
    this.repeat = 0;
    this.playState = "idle";
    this.finished = new Promise((resolve, reject) => {
      this.resolve = resolve;
      this.reject = reject;
    });
    easing = easing || _utils.defaults.easing;
    if ((0, _utils.isEasingGenerator)(easing)) {
      const custom = easing.createAnimation(keyframes);
      easing = custom.easing;
      keyframes = custom.keyframes || keyframes;
      initialDuration = custom.duration || initialDuration;
    }
    this.repeat = repeat;
    this.easing = (0, _utils.isEasingList)(easing) ? _utils.noopReturn : (0, _easingEs.getEasingFunction)(easing);
    this.updateDuration(initialDuration);
    const interpolate$1 = (0, _utils.interpolate)(keyframes, offset, (0, _utils.isEasingList)(easing) ? easing.map(_easingEs.getEasingFunction) : _utils.noopReturn);
    this.tick = timestamp => {
      var _a;
      // TODO: Temporary fix for OptionsResolver typing
      delay = delay;
      let t = 0;
      if (this.pauseTime !== undefined) {
        t = this.pauseTime;
      } else {
        t = (timestamp - this.startTime) * this.rate;
      }
      this.t = t;
      // Convert to seconds
      t /= 1000;
      // Rebase on delay
      t = Math.max(t - delay, 0);
      /**
       * If this animation has finished, set the current time
       * to the total duration.
       */
      if (this.playState === "finished" && this.pauseTime === undefined) {
        t = this.totalDuration;
      }
      /**
       * Get the current progress (0-1) of the animation. If t is >
       * than duration we'll get values like 2.5 (midway through the
       * third iteration)
       */
      const progress = t / this.duration;
      // TODO progress += iterationStart
      /**
       * Get the current iteration (0 indexed). For instance the floor of
       * 2.5 is 2.
       */
      let currentIteration = Math.floor(progress);
      /**
       * Get the current progress of the iteration by taking the remainder
       * so 2.5 is 0.5 through iteration 2
       */
      let iterationProgress = progress % 1.0;
      if (!iterationProgress && progress >= 1) {
        iterationProgress = 1;
      }
      /**
       * If iteration progress is 1 we count that as the end
       * of the previous iteration.
       */
      iterationProgress === 1 && currentIteration--;
      /**
       * Reverse progress if we're not running in "normal" direction
       */
      const iterationIsOdd = currentIteration % 2;
      if (direction === "reverse" || direction === "alternate" && iterationIsOdd || direction === "alternate-reverse" && !iterationIsOdd) {
        iterationProgress = 1 - iterationProgress;
      }
      const p = t >= this.totalDuration ? 1 : Math.min(iterationProgress, 1);
      const latest = interpolate$1(this.easing(p));
      output(latest);
      const isAnimationFinished = this.pauseTime === undefined && (this.playState === "finished" || t >= this.totalDuration + endDelay);
      if (isAnimationFinished) {
        this.playState = "finished";
        (_a = this.resolve) === null || _a === void 0 ? void 0 : _a.call(this, latest);
      } else if (this.playState !== "idle") {
        this.frameRequestId = requestAnimationFrame(this.tick);
      }
    };
    this.play();
  }
  play() {
    const now = performance.now();
    this.playState = "running";
    if (this.pauseTime !== undefined) {
      this.startTime = now - this.pauseTime;
    } else if (!this.startTime) {
      this.startTime = now;
    }
    this.cancelTimestamp = this.startTime;
    this.pauseTime = undefined;
    this.frameRequestId = requestAnimationFrame(this.tick);
  }
  pause() {
    this.playState = "paused";
    this.pauseTime = this.t;
  }
  finish() {
    this.playState = "finished";
    this.tick(0);
  }
  stop() {
    var _a;
    this.playState = "idle";
    if (this.frameRequestId !== undefined) {
      cancelAnimationFrame(this.frameRequestId);
    }
    (_a = this.reject) === null || _a === void 0 ? void 0 : _a.call(this, false);
  }
  cancel() {
    this.stop();
    this.tick(this.cancelTimestamp);
  }
  reverse() {
    this.rate *= -1;
  }
  commitStyles() {}
  updateDuration(duration) {
    this.duration = duration;
    this.totalDuration = duration * (this.repeat + 1);
  }
  get currentTime() {
    return this.t;
  }
  set currentTime(t) {
    if (this.pauseTime !== undefined || this.rate === 0) {
      this.pauseTime = t;
    } else {
      this.startTime = performance.now() - t / this.rate;
    }
  }
  get playbackRate() {
    return this.rate;
  }
  set playbackRate(rate) {
    this.rate = rate;
  }
}
exports.Animation = Animation;

/***/ }),

/***/ "../../../node_modules/@motionone/animation/dist/index.es.js":
/*!*******************************************************************!*\
  !*** ../../../node_modules/@motionone/animation/dist/index.es.js ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "Animation", ({
  enumerable: true,
  get: function () {
    return _AnimationEs.Animation;
  }
}));
Object.defineProperty(exports, "getEasingFunction", ({
  enumerable: true,
  get: function () {
    return _easingEs.getEasingFunction;
  }
}));
var _AnimationEs = __webpack_require__(/*! ./Animation.es.js */ "../../../node_modules/@motionone/animation/dist/Animation.es.js");
var _easingEs = __webpack_require__(/*! ./utils/easing.es.js */ "../../../node_modules/@motionone/animation/dist/utils/easing.es.js");

/***/ }),

/***/ "../../../node_modules/@motionone/animation/dist/utils/easing.es.js":
/*!**************************************************************************!*\
  !*** ../../../node_modules/@motionone/animation/dist/utils/easing.es.js ***!
  \**************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getEasingFunction = getEasingFunction;
var _easing = __webpack_require__(/*! @motionone/easing */ "../../../node_modules/@motionone/easing/dist/index.es.js");
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
const namedEasings = {
  ease: (0, _easing.cubicBezier)(0.25, 0.1, 0.25, 1.0),
  "ease-in": (0, _easing.cubicBezier)(0.42, 0.0, 1.0, 1.0),
  "ease-in-out": (0, _easing.cubicBezier)(0.42, 0.0, 0.58, 1.0),
  "ease-out": (0, _easing.cubicBezier)(0.0, 0.0, 0.58, 1.0)
};
const functionArgsRegex = /\((.*?)\)/;
function getEasingFunction(definition) {
  // If already an easing function, return
  if ((0, _utils.isFunction)(definition)) return definition;
  // If an easing curve definition, return bezier function
  if ((0, _utils.isCubicBezier)(definition)) return (0, _easing.cubicBezier)(...definition);
  // If we have a predefined easing function, return
  if (namedEasings[definition]) return namedEasings[definition];
  // If this is a steps function, attempt to create easing curve
  if (definition.startsWith("steps")) {
    const args = functionArgsRegex.exec(definition);
    if (args) {
      const argsArray = args[1].split(",");
      return (0, _easing.steps)(parseFloat(argsArray[0]), argsArray[1].trim());
    }
  }
  return _utils.noopReturn;
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/animate-style.es.js":
/*!*****************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/animate-style.es.js ***!
  \*****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.animateStyle = animateStyle;
var _dataEs = __webpack_require__(/*! ./data.es.js */ "../../../node_modules/@motionone/dom/dist/animate/data.es.js");
var _cssVarEs = __webpack_require__(/*! ./utils/css-var.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/css-var.es.js");
var _animation = __webpack_require__(/*! @motionone/animation */ "../../../node_modules/@motionone/animation/dist/index.es.js");
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
var _transformsEs = __webpack_require__(/*! ./utils/transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js");
var _easingEs = __webpack_require__(/*! ./utils/easing.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/easing.es.js");
var _featureDetectionEs = __webpack_require__(/*! ./utils/feature-detection.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js");
var _keyframesEs = __webpack_require__(/*! ./utils/keyframes.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js");
var _styleEs = __webpack_require__(/*! ./style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/style.es.js");
var _getStyleNameEs = __webpack_require__(/*! ./utils/get-style-name.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js");
var _stopAnimationEs = __webpack_require__(/*! ./utils/stop-animation.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js");
function getDevToolsRecord() {
  return window.__MOTION_DEV_TOOLS_RECORD;
}
function animateStyle(element, key, keyframesDefinition) {
  let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  const record = getDevToolsRecord();
  const isRecording = options.record !== false && record;
  let animation;
  let {
    duration = _utils.defaults.duration,
    delay = _utils.defaults.delay,
    endDelay = _utils.defaults.endDelay,
    repeat = _utils.defaults.repeat,
    easing = _utils.defaults.easing,
    direction,
    offset,
    allowWebkitAcceleration = false
  } = options;
  const data = (0, _dataEs.getAnimationData)(element);
  let canAnimateNatively = _featureDetectionEs.supports.waapi();
  const valueIsTransform = (0, _transformsEs.isTransform)(key);
  /**
   * If this is an individual transform, we need to map its
   * key to a CSS variable and update the element's transform style
   */
  valueIsTransform && (0, _transformsEs.addTransformToElement)(element, key);
  const name = (0, _getStyleNameEs.getStyleName)(key);
  const motionValue = (0, _dataEs.getMotionValue)(data.values, name);
  /**
   * Get definition of value, this will be used to convert numerical
   * keyframes into the default value type.
   */
  const definition = _transformsEs.transformDefinitions.get(name);
  /**
   * Stop the current animation, if any. Because this will trigger
   * commitStyles (DOM writes) and we might later trigger DOM reads,
   * this is fired now and we return a factory function to create
   * the actual animation that can get called in batch,
   */
  (0, _stopAnimationEs.stopAnimation)(motionValue.animation, !((0, _utils.isEasingGenerator)(easing) && motionValue.generator) && options.record !== false);
  /**
   * Batchable factory function containing all DOM reads.
   */
  return () => {
    const readInitialValue = () => {
      var _a, _b;
      return (_b = (_a = _styleEs.style.get(element, name)) !== null && _a !== void 0 ? _a : definition === null || definition === void 0 ? void 0 : definition.initialValue) !== null && _b !== void 0 ? _b : 0;
    };
    /**
     * Replace null values with the previous keyframe value, or read
     * it from the DOM if it's the first keyframe.
     */
    let keyframes = (0, _keyframesEs.hydrateKeyframes)((0, _keyframesEs.keyframesList)(keyframesDefinition), readInitialValue);
    if ((0, _utils.isEasingGenerator)(easing)) {
      const custom = easing.createAnimation(keyframes, readInitialValue, valueIsTransform, name, motionValue);
      easing = custom.easing;
      if (custom.keyframes !== undefined) keyframes = custom.keyframes;
      if (custom.duration !== undefined) duration = custom.duration;
    }
    /**
     * If this is a CSS variable we need to register it with the browser
     * before it can be animated natively. We also set it with setProperty
     * rather than directly onto the element.style object.
     */
    if ((0, _cssVarEs.isCssVar)(name)) {
      if (_featureDetectionEs.supports.cssRegisterProperty()) {
        (0, _cssVarEs.registerCssVariable)(name);
      } else {
        canAnimateNatively = false;
      }
    }
    /**
     * If we can animate this value with WAAPI, do so. Currently this only
     * feature detects CSS.registerProperty but could check WAAPI too.
     */
    if (canAnimateNatively) {
      /**
       * Convert numbers to default value types. Currently this only supports
       * transforms but it could also support other value types.
       */
      if (definition) {
        keyframes = keyframes.map(value => (0, _utils.isNumber)(value) ? definition.toDefaultUnit(value) : value);
      }
      /**
       * If this browser doesn't support partial/implicit keyframes we need to
       * explicitly provide one.
       */
      if (keyframes.length === 1 && (!_featureDetectionEs.supports.partialKeyframes() || isRecording)) {
        keyframes.unshift(readInitialValue());
      }
      const animationOptions = {
        delay: _utils.time.ms(delay),
        duration: _utils.time.ms(duration),
        endDelay: _utils.time.ms(endDelay),
        easing: !(0, _utils.isEasingList)(easing) ? (0, _easingEs.convertEasing)(easing) : undefined,
        direction,
        iterations: repeat + 1,
        fill: "both"
      };
      animation = element.animate({
        [name]: keyframes,
        offset,
        easing: (0, _utils.isEasingList)(easing) ? easing.map(_easingEs.convertEasing) : undefined
      }, animationOptions);
      /**
       * Polyfill finished Promise in browsers that don't support it
       */
      if (!animation.finished) {
        animation.finished = new Promise((resolve, reject) => {
          animation.onfinish = resolve;
          animation.oncancel = reject;
        });
      }
      const target = keyframes[keyframes.length - 1];
      animation.finished.then(() => {
        // Apply styles to target
        _styleEs.style.set(element, name, target);
        // Ensure fill modes don't persist
        animation.cancel();
      }).catch(_utils.noop);
      /**
       * This forces Webkit to run animations on the main thread by exploiting
       * this condition:
       * https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp?rev=281238#L1099
       *
       * This fixes Webkit's timing bugs, like accelerated animations falling
       * out of sync with main thread animations and massive delays in starting
       * accelerated animations in WKWebView.
       */
      if (!allowWebkitAcceleration) animation.playbackRate = 1.000001;
      /**
       * If we can't animate the value natively then we can fallback to the numbers-only
       * polyfill for transforms.
       */
    } else if (valueIsTransform) {
      /**
       * If any keyframe is a string (because we measured it from the DOM), we need to convert
       * it into a number before passing to the Animation polyfill.
       */
      keyframes = keyframes.map(value => typeof value === "string" ? parseFloat(value) : value);
      /**
       * If we only have a single keyframe, we need to create an initial keyframe by reading
       * the current value from the DOM.
       */
      if (keyframes.length === 1) {
        keyframes.unshift(parseFloat(readInitialValue()));
      }
      const render = latest => {
        if (definition) latest = definition.toDefaultUnit(latest);
        _styleEs.style.set(element, name, latest);
      };
      animation = new _animation.Animation(render, keyframes, Object.assign(Object.assign({}, options), {
        duration,
        easing
      }));
    } else {
      const target = keyframes[keyframes.length - 1];
      _styleEs.style.set(element, name, definition && (0, _utils.isNumber)(target) ? definition.toDefaultUnit(target) : target);
    }
    if (isRecording) {
      record(element, key, keyframes, {
        duration,
        delay: delay,
        easing,
        repeat,
        offset
      }, "motion-one");
    }
    motionValue.setAnimation(animation);
    return animation;
  };
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/data.es.js":
/*!********************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/data.es.js ***!
  \********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getAnimationData = getAnimationData;
exports.getMotionValue = getMotionValue;
var _types = __webpack_require__(/*! @motionone/types */ "../../../node_modules/@motionone/types/dist/index.es.js");
const data = new WeakMap();
function getAnimationData(element) {
  if (!data.has(element)) {
    data.set(element, {
      transforms: [],
      values: new Map()
    });
  }
  return data.get(element);
}
function getMotionValue(motionValues, name) {
  if (!motionValues.has(name)) {
    motionValues.set(name, new _types.MotionValue());
  }
  return motionValues.get(name);
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/index.es.js":
/*!*********************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/index.es.js ***!
  \*********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.animate = animate;
var _animateStyleEs = __webpack_require__(/*! ./animate-style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/animate-style.es.js");
var _optionsEs = __webpack_require__(/*! ./utils/options.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/options.es.js");
var _resolveElementsEs = __webpack_require__(/*! ../utils/resolve-elements.es.js */ "../../../node_modules/@motionone/dom/dist/utils/resolve-elements.es.js");
var _controlsEs = __webpack_require__(/*! ./utils/controls.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/controls.es.js");
var _staggerEs = __webpack_require__(/*! ../utils/stagger.es.js */ "../../../node_modules/@motionone/dom/dist/utils/stagger.es.js");
function animate(elements, keyframes) {
  let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  elements = (0, _resolveElementsEs.resolveElements)(elements);
  const numElements = elements.length;
  /**
   * Create and start new animations
   */
  const animationFactories = [];
  for (let i = 0; i < numElements; i++) {
    const element = elements[i];
    for (const key in keyframes) {
      const valueOptions = (0, _optionsEs.getOptions)(options, key);
      valueOptions.delay = (0, _staggerEs.resolveOption)(valueOptions.delay, i, numElements);
      const animation = (0, _animateStyleEs.animateStyle)(element, key, keyframes[key], valueOptions);
      animationFactories.push(animation);
    }
  }
  return (0, _controlsEs.withControls)(animationFactories, options,
  /**
   * TODO:
   * If easing is set to spring or glide, duration will be dynamically
   * generated. Ideally we would dynamically generate this from
   * animation.effect.getComputedTiming().duration but this isn't
   * supported in iOS13 or our number polyfill. Perhaps it's possible
   * to Proxy animations returned from animateStyle that has duration
   * as a getter.
   */
  options.duration);
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/style.es.js":
/*!*********************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/style.es.js ***!
  \*********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.style = void 0;
var _cssVarEs = __webpack_require__(/*! ./utils/css-var.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/css-var.es.js");
var _getStyleNameEs = __webpack_require__(/*! ./utils/get-style-name.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js");
var _transformsEs = __webpack_require__(/*! ./utils/transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js");
const style = {
  get: (element, name) => {
    name = (0, _getStyleNameEs.getStyleName)(name);
    let value = (0, _cssVarEs.isCssVar)(name) ? element.style.getPropertyValue(name) : getComputedStyle(element)[name];
    if (!value && value !== 0) {
      const definition = _transformsEs.transformDefinitions.get(name);
      if (definition) value = definition.initialValue;
    }
    return value;
  },
  set: (element, name, value) => {
    name = (0, _getStyleNameEs.getStyleName)(name);
    if ((0, _cssVarEs.isCssVar)(name)) {
      element.style.setProperty(name, value);
    } else {
      element.style[name] = value;
    }
  }
};
exports.style = style;

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/utils/controls.es.js":
/*!******************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/utils/controls.es.js ***!
  \******************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.withControls = exports.controls = void 0;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
var _stopAnimationEs = __webpack_require__(/*! ./stop-animation.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js");
const createAnimation = factory => factory();
const withControls = function (animationFactory, options) {
  let duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _utils.defaults.duration;
  return new Proxy({
    animations: animationFactory.map(createAnimation).filter(Boolean),
    duration,
    options
  }, controls);
};
/**
 * TODO:
 * Currently this returns the first animation, ideally it would return
 * the first active animation.
 */
exports.withControls = withControls;
const getActiveAnimation = state => state.animations[0];
const controls = {
  get: (target, key) => {
    const activeAnimation = getActiveAnimation(target);
    switch (key) {
      case "duration":
        return target.duration;
      case "currentTime":
        return _utils.time.s((activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) || 0);
      case "playbackRate":
      case "playState":
        return activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key];
      case "finished":
        if (!target.finished) {
          target.finished = Promise.all(target.animations.map(selectFinished)).catch(_utils.noop);
        }
        return target.finished;
      case "stop":
        return () => {
          target.animations.forEach(animation => (0, _stopAnimationEs.stopAnimation)(animation));
        };
      case "forEachNative":
        /**
         * This is for internal use only, fire a callback for each
         * underlying animation.
         */
        return callback => {
          target.animations.forEach(animation => callback(animation, target));
        };
      default:
        return typeof (activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) === "undefined" ? undefined : () => target.animations.forEach(animation => animation[key]());
    }
  },
  set: (target, key, value) => {
    switch (key) {
      case "currentTime":
        value = _utils.time.ms(value);
      case "currentTime":
      case "playbackRate":
        for (let i = 0; i < target.animations.length; i++) {
          target.animations[i][key] = value;
        }
        return true;
    }
    return false;
  }
};
exports.controls = controls;
const selectFinished = animation => animation.finished;

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/utils/css-var.es.js":
/*!*****************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/utils/css-var.es.js ***!
  \*****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isCssVar = void 0;
exports.registerCssVariable = registerCssVariable;
exports.registeredProperties = void 0;
var _transformsEs = __webpack_require__(/*! ./transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js");
const isCssVar = name => name.startsWith("--");
exports.isCssVar = isCssVar;
const registeredProperties = new Set();
exports.registeredProperties = registeredProperties;
function registerCssVariable(name) {
  if (registeredProperties.has(name)) return;
  registeredProperties.add(name);
  try {
    const {
      syntax,
      initialValue
    } = _transformsEs.transformDefinitions.has(name) ? _transformsEs.transformDefinitions.get(name) : {};
    CSS.registerProperty({
      name,
      inherits: false,
      syntax,
      initialValue
    });
  } catch (e) {}
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/utils/easing.es.js":
/*!****************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/utils/easing.es.js ***!
  \****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.cubicBezierAsString = exports.convertEasing = void 0;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
const convertEasing = easing => (0, _utils.isCubicBezier)(easing) ? cubicBezierAsString(easing) : easing;
exports.convertEasing = convertEasing;
const cubicBezierAsString = _ref => {
  let [a, b, c, d] = _ref;
  return `cubic-bezier(${a}, ${b}, ${c}, ${d})`;
};
exports.cubicBezierAsString = cubicBezierAsString;

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js":
/*!***************************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js ***!
  \***************************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.supports = void 0;
const testAnimation = keyframes => document.createElement("div").animate(keyframes, {
  duration: 0.001
});
const featureTests = {
  cssRegisterProperty: () => typeof CSS !== "undefined" && Object.hasOwnProperty.call(CSS, "registerProperty"),
  waapi: () => Object.hasOwnProperty.call(Element.prototype, "animate"),
  partialKeyframes: () => {
    try {
      testAnimation({
        opacity: [1]
      });
    } catch (e) {
      return false;
    }
    return true;
  },
  finished: () => Boolean(testAnimation({
    opacity: [0, 1]
  }).finished)
};
const results = {};
const supports = {};
exports.supports = supports;
for (const key in featureTests) {
  supports[key] = () => {
    if (results[key] === undefined) results[key] = featureTests[key]();
    return results[key];
  };
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js":
/*!************************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js ***!
  \************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getStyleName = getStyleName;
var _transformsEs = __webpack_require__(/*! ./transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js");
function getStyleName(key) {
  if (_transformsEs.transformAlias[key]) key = _transformsEs.transformAlias[key];
  return (0, _transformsEs.isTransform)(key) ? (0, _transformsEs.asTransformCssVar)(key) : key;
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js":
/*!*******************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js ***!
  \*******************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.hydrateKeyframes = hydrateKeyframes;
exports.keyframesList = void 0;
function hydrateKeyframes(keyframes, readInitialValue) {
  for (let i = 0; i < keyframes.length; i++) {
    if (keyframes[i] === null) {
      keyframes[i] = i ? keyframes[i - 1] : readInitialValue();
    }
  }
  return keyframes;
}
const keyframesList = keyframes => Array.isArray(keyframes) ? keyframes : [keyframes];
exports.keyframesList = keyframesList;

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/utils/options.es.js":
/*!*****************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/utils/options.es.js ***!
  \*****************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getOptions = void 0;
const getOptions = (options, key) =>
/**
 * TODO: Make test for this
 * Always return a new object otherwise delay is overwritten by results of stagger
 * and this results in no stagger
 */
options[key] ? Object.assign(Object.assign({}, options), options[key]) : Object.assign({}, options);
exports.getOptions = getOptions;

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js":
/*!************************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js ***!
  \************************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.stopAnimation = stopAnimation;
function stopAnimation(animation) {
  let needsCommit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  if (!animation || animation.playState === "finished") return;
  // Suppress error thrown by WAAPI
  try {
    if (animation.stop) {
      animation.stop();
    } else {
      needsCommit && animation.commitStyles();
      animation.cancel();
    }
  } catch (e) {}
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/utils/style-object.es.js":
/*!**********************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/utils/style-object.es.js ***!
  \**********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.createStyles = createStyles;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
var _transformsEs = __webpack_require__(/*! ./transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js");
function createStyles(keyframes) {
  const initialKeyframes = {};
  const transformKeys = [];
  for (let key in keyframes) {
    const value = keyframes[key];
    if ((0, _transformsEs.isTransform)(key)) {
      if (_transformsEs.transformAlias[key]) key = _transformsEs.transformAlias[key];
      transformKeys.push(key);
      key = (0, _transformsEs.asTransformCssVar)(key);
    }
    let initialKeyframe = Array.isArray(value) ? value[0] : value;
    /**
     * If this is a number and we have a default value type, convert the number
     * to this type.
     */
    const definition = _transformsEs.transformDefinitions.get(key);
    if (definition) {
      initialKeyframe = (0, _utils.isNumber)(value) ? definition.toDefaultUnit(value) : value;
    }
    initialKeyframes[key] = initialKeyframe;
  }
  if (transformKeys.length) {
    initialKeyframes.transform = (0, _transformsEs.buildTransformTemplate)(transformKeys);
  }
  return initialKeyframes;
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/utils/style-string.es.js":
/*!**********************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/utils/style-string.es.js ***!
  \**********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.createStyleString = createStyleString;
var _styleObjectEs = __webpack_require__(/*! ./style-object.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/style-object.es.js");
const camelLetterToPipeLetter = letter => `-${letter.toLowerCase()}`;
const camelToPipeCase = str => str.replace(/[A-Z]/g, camelLetterToPipeLetter);
function createStyleString() {
  let target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  const styles = (0, _styleObjectEs.createStyles)(target);
  let style = "";
  for (const key in styles) {
    style += key.startsWith("--") ? key : camelToPipeCase(key);
    style += `: ${styles[key]}; `;
  }
  return style;
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js":
/*!********************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js ***!
  \********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.transformDefinitions = exports.transformAlias = exports.isTransform = exports.compareTransformOrder = exports.buildTransformTemplate = exports.axes = exports.asTransformCssVar = exports.addTransformToElement = void 0;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
var _dataEs = __webpack_require__(/*! ../data.es.js */ "../../../node_modules/@motionone/dom/dist/animate/data.es.js");
/**
 * A list of all transformable axes. We'll use this list to generated a version
 * of each axes for each transform.
 */
const axes = ["", "X", "Y", "Z"];
/**
 * An ordered array of each transformable value. By default, transform values
 * will be sorted to this order.
 */
exports.axes = axes;
const order = ["translate", "scale", "rotate", "skew"];
const transformAlias = {
  x: "translateX",
  y: "translateY",
  z: "translateZ"
};
exports.transformAlias = transformAlias;
const rotation = {
  syntax: "<angle>",
  initialValue: "0deg",
  toDefaultUnit: v => v + "deg"
};
const baseTransformProperties = {
  translate: {
    syntax: "<length-percentage>",
    initialValue: "0px",
    toDefaultUnit: v => v + "px"
  },
  rotate: rotation,
  scale: {
    syntax: "<number>",
    initialValue: 1,
    toDefaultUnit: _utils.noopReturn
  },
  skew: rotation
};
const transformDefinitions = new Map();
exports.transformDefinitions = transformDefinitions;
const asTransformCssVar = name => `--motion-${name}`;
/**
 * Generate a list of every possible transform key
 */
exports.asTransformCssVar = asTransformCssVar;
const transforms = ["x", "y", "z"];
order.forEach(name => {
  axes.forEach(axis => {
    transforms.push(name + axis);
    transformDefinitions.set(asTransformCssVar(name + axis), baseTransformProperties[name]);
  });
});
/**
 * A function to use with Array.sort to sort transform keys by their default order.
 */
const compareTransformOrder = (a, b) => transforms.indexOf(a) - transforms.indexOf(b);
/**
 * Provide a quick way to check if a string is the name of a transform
 */
exports.compareTransformOrder = compareTransformOrder;
const transformLookup = new Set(transforms);
const isTransform = name => transformLookup.has(name);
exports.isTransform = isTransform;
const addTransformToElement = (element, name) => {
  // Map x to translateX etc
  if (transformAlias[name]) name = transformAlias[name];
  const {
    transforms
  } = (0, _dataEs.getAnimationData)(element);
  (0, _utils.addUniqueItem)(transforms, name);
  /**
   * TODO: An optimisation here could be to cache the transform in element data
   * and only update if this has changed.
   */
  element.style.transform = buildTransformTemplate(transforms);
};
exports.addTransformToElement = addTransformToElement;
const buildTransformTemplate = transforms => transforms.sort(compareTransformOrder).reduce(transformListToString, "").trim();
exports.buildTransformTemplate = buildTransformTemplate;
const transformListToString = (template, name) => `${template} ${name}(var(${asTransformCssVar(name)}))`;

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/easing/create-generator-easing.es.js":
/*!**************************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/easing/create-generator-easing.es.js ***!
  \**************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.createGeneratorEasing = createGeneratorEasing;
var _generators = __webpack_require__(/*! @motionone/generators */ "../../../node_modules/@motionone/generators/dist/index.es.js");
function createGeneratorEasing(createGenerator) {
  const keyframesCache = new WeakMap();
  return function () {
    let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    const generatorCache = new Map();
    const getGenerator = function () {
      let from = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
      let to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
      let velocity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
      let isScale = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
      const key = `${from}-${to}-${velocity}-${isScale}`;
      if (!generatorCache.has(key)) {
        generatorCache.set(key, createGenerator(Object.assign({
          from,
          to,
          velocity,
          restSpeed: isScale ? 0.05 : 2,
          restDistance: isScale ? 0.01 : 0.5
        }, options)));
      }
      return generatorCache.get(key);
    };
    const getKeyframes = generator => {
      if (!keyframesCache.has(generator)) {
        keyframesCache.set(generator, (0, _generators.pregenerateKeyframes)(generator));
      }
      return keyframesCache.get(generator);
    };
    return {
      createAnimation: (keyframes, getOrigin, canUseGenerator, name, motionValue) => {
        var _a, _b;
        let settings;
        const numKeyframes = keyframes.length;
        let shouldUseGenerator = canUseGenerator && numKeyframes <= 2 && keyframes.every(isNumberOrNull);
        if (shouldUseGenerator) {
          const target = keyframes[numKeyframes - 1];
          const unresolvedOrigin = numKeyframes === 1 ? null : keyframes[0];
          let velocity = 0;
          let origin = 0;
          const prevGenerator = motionValue === null || motionValue === void 0 ? void 0 : motionValue.generator;
          if (prevGenerator) {
            /**
             * If we have a generator for this value we can use it to resolve
             * the animations's current value and velocity.
             */
            const {
              animation,
              generatorStartTime
            } = motionValue;
            const startTime = (animation === null || animation === void 0 ? void 0 : animation.startTime) || generatorStartTime || 0;
            const currentTime = (animation === null || animation === void 0 ? void 0 : animation.currentTime) || performance.now() - startTime;
            const prevGeneratorCurrent = prevGenerator(currentTime).current;
            origin = (_a = unresolvedOrigin) !== null && _a !== void 0 ? _a : prevGeneratorCurrent;
            if (numKeyframes === 1 || numKeyframes === 2 && keyframes[0] === null) {
              velocity = (0, _generators.calcGeneratorVelocity)(t => prevGenerator(t).current, currentTime, prevGeneratorCurrent);
            }
          } else {
            origin = (_b = unresolvedOrigin) !== null && _b !== void 0 ? _b : parseFloat(getOrigin());
          }
          const generator = getGenerator(origin, target, velocity, name === null || name === void 0 ? void 0 : name.includes("scale"));
          const keyframesMetadata = getKeyframes(generator);
          settings = Object.assign(Object.assign({}, keyframesMetadata), {
            easing: "linear"
          });
          // TODO Add test for this
          if (motionValue) {
            motionValue.generator = generator;
            motionValue.generatorStartTime = performance.now();
          }
        } else {
          const keyframesMetadata = getKeyframes(getGenerator(0, 100));
          settings = {
            easing: "ease",
            duration: keyframesMetadata.overshootDuration
          };
        }
        return settings;
      }
    };
  };
}
const isNumberOrNull = value => typeof value !== "string";

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/easing/glide/index.es.js":
/*!**************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/easing/glide/index.es.js ***!
  \**************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.glide = void 0;
var _generators = __webpack_require__(/*! @motionone/generators */ "../../../node_modules/@motionone/generators/dist/index.es.js");
var _createGeneratorEasingEs = __webpack_require__(/*! ../create-generator-easing.es.js */ "../../../node_modules/@motionone/dom/dist/easing/create-generator-easing.es.js");
const glide = (0, _createGeneratorEasingEs.createGeneratorEasing)(_generators.glide);
exports.glide = glide;

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/easing/spring/index.es.js":
/*!***************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/easing/spring/index.es.js ***!
  \***************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.spring = void 0;
var _generators = __webpack_require__(/*! @motionone/generators */ "../../../node_modules/@motionone/generators/dist/index.es.js");
var _createGeneratorEasingEs = __webpack_require__(/*! ../create-generator-easing.es.js */ "../../../node_modules/@motionone/dom/dist/easing/create-generator-easing.es.js");
const spring = (0, _createGeneratorEasingEs.createGeneratorEasing)(_generators.spring);
exports.spring = spring;

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/gestures/in-view.es.js":
/*!************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/gestures/in-view.es.js ***!
  \************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.inView = inView;
var _resolveElementsEs = __webpack_require__(/*! ../utils/resolve-elements.es.js */ "../../../node_modules/@motionone/dom/dist/utils/resolve-elements.es.js");
const thresholds = {
  any: 0,
  all: 1
};
function inView(elementOrSelector, onStart) {
  let {
    root,
    margin: rootMargin,
    amount = "any"
  } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  /**
   * If this browser doesn't support IntersectionObserver, return a dummy stop function.
   * Default triggering of onStart is tricky - it could be used for starting/stopping
   * videos, lazy loading content etc. We could provide an option to enable a fallback, or
   * provide a fallback callback option.
   */
  if (typeof IntersectionObserver === "undefined") {
    return () => {};
  }
  const elements = (0, _resolveElementsEs.resolveElements)(elementOrSelector);
  const activeIntersections = new WeakMap();
  const onIntersectionChange = entries => {
    entries.forEach(entry => {
      const onEnd = activeIntersections.get(entry.target);
      /**
       * If there's no change to the intersection, we don't need to
       * do anything here.
       */
      if (entry.isIntersecting === Boolean(onEnd)) return;
      if (entry.isIntersecting) {
        const newOnEnd = onStart(entry);
        if (typeof newOnEnd === "function") {
          activeIntersections.set(entry.target, newOnEnd);
        } else {
          observer.unobserve(entry.target);
        }
      } else if (onEnd) {
        onEnd(entry);
        activeIntersections.delete(entry.target);
      }
    });
  };
  const observer = new IntersectionObserver(onIntersectionChange, {
    root,
    rootMargin,
    threshold: typeof amount === "number" ? amount : thresholds[amount]
  });
  elements.forEach(element => observer.observe(element));
  return () => observer.disconnect();
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/gestures/resize/handle-element.es.js":
/*!**************************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/gestures/resize/handle-element.es.js ***!
  \**************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.resizeElement = resizeElement;
var _resolveElementsEs = __webpack_require__(/*! ../../utils/resolve-elements.es.js */ "../../../node_modules/@motionone/dom/dist/utils/resolve-elements.es.js");
const resizeHandlers = new WeakMap();
let observer;
function getElementSize(target, borderBoxSize) {
  if (borderBoxSize) {
    const {
      inlineSize,
      blockSize
    } = borderBoxSize[0];
    return {
      width: inlineSize,
      height: blockSize
    };
  } else if (target instanceof SVGElement && "getBBox" in target) {
    return target.getBBox();
  } else {
    return {
      width: target.offsetWidth,
      height: target.offsetHeight
    };
  }
}
function notifyTarget(_ref) {
  let {
    target,
    contentRect,
    borderBoxSize
  } = _ref;
  var _a;
  (_a = resizeHandlers.get(target)) === null || _a === void 0 ? void 0 : _a.forEach(handler => {
    handler({
      target,
      contentSize: contentRect,
      get size() {
        return getElementSize(target, borderBoxSize);
      }
    });
  });
}
function notifyAll(entries) {
  entries.forEach(notifyTarget);
}
function createResizeObserver() {
  if (typeof ResizeObserver === "undefined") return;
  observer = new ResizeObserver(notifyAll);
}
function resizeElement(target, handler) {
  if (!observer) createResizeObserver();
  const elements = (0, _resolveElementsEs.resolveElements)(target);
  elements.forEach(element => {
    let elementHandlers = resizeHandlers.get(element);
    if (!elementHandlers) {
      elementHandlers = new Set();
      resizeHandlers.set(element, elementHandlers);
    }
    elementHandlers.add(handler);
    observer === null || observer === void 0 ? void 0 : observer.observe(element);
  });
  return () => {
    elements.forEach(element => {
      const elementHandlers = resizeHandlers.get(element);
      elementHandlers === null || elementHandlers === void 0 ? void 0 : elementHandlers.delete(handler);
      if (!(elementHandlers === null || elementHandlers === void 0 ? void 0 : elementHandlers.size)) {
        observer === null || observer === void 0 ? void 0 : observer.unobserve(element);
      }
    });
  };
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/gestures/resize/handle-window.es.js":
/*!*************************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/gestures/resize/handle-window.es.js ***!
  \*************************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.resizeWindow = resizeWindow;
const windowCallbacks = new Set();
let windowResizeHandler;
function createWindowResizeHandler() {
  windowResizeHandler = () => {
    const size = {
      width: window.innerWidth,
      height: window.innerHeight
    };
    const info = {
      target: window,
      size,
      contentSize: size
    };
    windowCallbacks.forEach(callback => callback(info));
  };
  window.addEventListener("resize", windowResizeHandler);
}
function resizeWindow(callback) {
  windowCallbacks.add(callback);
  if (!windowResizeHandler) createWindowResizeHandler();
  return () => {
    windowCallbacks.delete(callback);
    if (!windowCallbacks.size && windowResizeHandler) {
      windowResizeHandler = undefined;
    }
  };
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/gestures/resize/index.es.js":
/*!*****************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/gestures/resize/index.es.js ***!
  \*****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.resize = resize;
var _handleElementEs = __webpack_require__(/*! ./handle-element.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/resize/handle-element.es.js");
var _handleWindowEs = __webpack_require__(/*! ./handle-window.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/resize/handle-window.es.js");
function resize(a, b) {
  return typeof a === "function" ? (0, _handleWindowEs.resizeWindow)(a) : (0, _handleElementEs.resizeElement)(a, b);
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/gestures/scroll/index.es.js":
/*!*****************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/index.es.js ***!
  \*****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.scroll = scroll;
var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
var _indexEs = __webpack_require__(/*! ../resize/index.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/resize/index.es.js");
var _infoEs = __webpack_require__(/*! ./info.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/info.es.js");
var _onScrollHandlerEs = __webpack_require__(/*! ./on-scroll-handler.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/on-scroll-handler.es.js");
const scrollListeners = new WeakMap();
const resizeListeners = new WeakMap();
const onScrollHandlers = new WeakMap();
const getEventTarget = element => element === document.documentElement ? window : element;
function scroll(onScroll) {
  let _a = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  var {
      container = document.documentElement
    } = _a,
    options = (0, _tslib.__rest)(_a, ["container"]);
  let containerHandlers = onScrollHandlers.get(container);
  /**
   * Get the onScroll handlers for this container.
   * If one isn't found, create a new one.
   */
  if (!containerHandlers) {
    containerHandlers = new Set();
    onScrollHandlers.set(container, containerHandlers);
  }
  /**
   * Create a new onScroll handler for the provided callback.
   */
  const info = (0, _infoEs.createScrollInfo)();
  const containerHandler = (0, _onScrollHandlerEs.createOnScrollHandler)(container, onScroll, info, options);
  containerHandlers.add(containerHandler);
  /**
   * Check if there's a scroll event listener for this container.
   * If not, create one.
   */
  if (!scrollListeners.has(container)) {
    const listener = () => {
      const time = performance.now();
      for (const handler of containerHandlers) handler.measure();
      for (const handler of containerHandlers) handler.update(time);
      for (const handler of containerHandlers) handler.notify();
    };
    scrollListeners.set(container, listener);
    const target = getEventTarget(container);
    window.addEventListener("resize", listener, {
      passive: true
    });
    if (container !== document.documentElement) {
      resizeListeners.set(container, (0, _indexEs.resize)(container, listener));
    }
    target.addEventListener("scroll", listener, {
      passive: true
    });
  }
  const listener = scrollListeners.get(container);
  const onLoadProcesss = requestAnimationFrame(listener);
  return () => {
    var _a;
    if (typeof onScroll !== "function") onScroll.stop();
    cancelAnimationFrame(onLoadProcesss);
    /**
     * Check if we even have any handlers for this container.
     */
    const containerHandlers = onScrollHandlers.get(container);
    if (!containerHandlers) return;
    containerHandlers.delete(containerHandler);
    if (containerHandlers.size) return;
    /**
     * If no more handlers, remove the scroll listener too.
     */
    const listener = scrollListeners.get(container);
    scrollListeners.delete(container);
    if (listener) {
      getEventTarget(container).removeEventListener("scroll", listener);
      (_a = resizeListeners.get(container)) === null || _a === void 0 ? void 0 : _a();
      window.removeEventListener("resize", listener);
    }
  };
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/gestures/scroll/info.es.js":
/*!****************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/info.es.js ***!
  \****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.createScrollInfo = void 0;
exports.updateScrollInfo = updateScrollInfo;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
/**
 * A time in milliseconds, beyond which we consider the scroll velocity to be 0.
 */
const maxElapsed = 50;
const createAxisInfo = () => ({
  current: 0,
  offset: [],
  progress: 0,
  scrollLength: 0,
  targetOffset: 0,
  targetLength: 0,
  containerLength: 0,
  velocity: 0
});
const createScrollInfo = () => ({
  time: 0,
  x: createAxisInfo(),
  y: createAxisInfo()
});
exports.createScrollInfo = createScrollInfo;
const keys = {
  x: {
    length: "Width",
    position: "Left"
  },
  y: {
    length: "Height",
    position: "Top"
  }
};
function updateAxisInfo(element, axisName, info, time) {
  const axis = info[axisName];
  const {
    length,
    position
  } = keys[axisName];
  const prev = axis.current;
  const prevTime = info.time;
  axis.current = element["scroll" + position];
  axis.scrollLength = element["scroll" + length] - element["client" + length];
  axis.offset.length = 0;
  axis.offset[0] = 0;
  axis.offset[1] = axis.scrollLength;
  axis.progress = (0, _utils.progress)(0, axis.scrollLength, axis.current);
  const elapsed = time - prevTime;
  axis.velocity = elapsed > maxElapsed ? 0 : (0, _utils.velocityPerSecond)(axis.current - prev, elapsed);
}
function updateScrollInfo(element, info, time) {
  updateAxisInfo(element, "x", info, time);
  updateAxisInfo(element, "y", info, time);
  info.time = time;
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/edge.es.js":
/*!************************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/edge.es.js ***!
  \************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.namedEdges = void 0;
exports.resolveEdge = resolveEdge;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
const namedEdges = {
  start: 0,
  center: 0.5,
  end: 1
};
exports.namedEdges = namedEdges;
function resolveEdge(edge, length) {
  let inset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
  let delta = 0;
  /**
   * If we have this edge defined as a preset, replace the definition
   * with the numerical value.
   */
  if (namedEdges[edge] !== undefined) {
    edge = namedEdges[edge];
  }
  /**
   * Handle unit values
   */
  if ((0, _utils.isString)(edge)) {
    const asNumber = parseFloat(edge);
    if (edge.endsWith("px")) {
      delta = asNumber;
    } else if (edge.endsWith("%")) {
      edge = asNumber / 100;
    } else if (edge.endsWith("vw")) {
      delta = asNumber / 100 * document.documentElement.clientWidth;
    } else if (edge.endsWith("vh")) {
      delta = asNumber / 100 * document.documentElement.clientHeight;
    } else {
      edge = asNumber;
    }
  }
  /**
   * If the edge is defined as a number, handle as a progress value.
   */
  if ((0, _utils.isNumber)(edge)) {
    delta = length * edge;
  }
  return inset + delta;
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/index.es.js":
/*!*************************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/index.es.js ***!
  \*************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.resolveOffsets = resolveOffsets;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
var _insetEs = __webpack_require__(/*! ./inset.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/inset.es.js");
var _presetsEs = __webpack_require__(/*! ./presets.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/presets.es.js");
var _offsetEs = __webpack_require__(/*! ./offset.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/offset.es.js");
const point = {
  x: 0,
  y: 0
};
function resolveOffsets(container, info, options) {
  let {
    offset: offsetDefinition = _presetsEs.ScrollOffset.All
  } = options;
  const {
    target = container,
    axis = "y"
  } = options;
  const lengthLabel = axis === "y" ? "height" : "width";
  const inset = target !== container ? (0, _insetEs.calcInset)(target, container) : point;
  /**
   * Measure the target and container. If they're the same thing then we
   * use the container's scrollWidth/Height as the target, from there
   * all other calculations can remain the same.
   */
  const targetSize = target === container ? {
    width: container.scrollWidth,
    height: container.scrollHeight
  } : {
    width: target.clientWidth,
    height: target.clientHeight
  };
  const containerSize = {
    width: container.clientWidth,
    height: container.clientHeight
  };
  /**
   * Reset the length of the resolved offset array rather than creating a new one.
   * TODO: More reusable data structures for targetSize/containerSize would also be good.
   */
  info[axis].offset.length = 0;
  /**
   * Populate the offset array by resolving the user's offset definition into
   * a list of pixel scroll offets.
   */
  let hasChanged = !info[axis].interpolate;
  const numOffsets = offsetDefinition.length;
  for (let i = 0; i < numOffsets; i++) {
    const offset = (0, _offsetEs.resolveOffset)(offsetDefinition[i], containerSize[lengthLabel], targetSize[lengthLabel], inset[axis]);
    if (!hasChanged && offset !== info[axis].interpolatorOffsets[i]) {
      hasChanged = true;
    }
    info[axis].offset[i] = offset;
  }
  /**
   * If the pixel scroll offsets have changed, create a new interpolator function
   * to map scroll value into a progress.
   */
  if (hasChanged) {
    info[axis].interpolate = (0, _utils.interpolate)((0, _utils.defaultOffset)(numOffsets), info[axis].offset);
    info[axis].interpolatorOffsets = [...info[axis].offset];
  }
  info[axis].progress = info[axis].interpolate(info[axis].current);
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/inset.es.js":
/*!*************************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/inset.es.js ***!
  \*************************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.calcInset = calcInset;
function calcInset(element, container) {
  let inset = {
    x: 0,
    y: 0
  };
  let current = element;
  while (current && current !== container) {
    if (current instanceof HTMLElement) {
      inset.x += current.offsetLeft;
      inset.y += current.offsetTop;
      current = current.offsetParent;
    } else if (current instanceof SVGGraphicsElement && "getBBox" in current) {
      const {
        top,
        left
      } = current.getBBox();
      inset.x += left;
      inset.y += top;
      /**
       * Assign the next parent element as the <svg /> tag.
       */
      while (current && current.tagName !== "svg") {
        current = current.parentNode;
      }
    }
  }
  return inset;
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/offset.es.js":
/*!**************************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/offset.es.js ***!
  \**************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.resolveOffset = resolveOffset;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
var _edgeEs = __webpack_require__(/*! ./edge.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/edge.es.js");
const defaultOffset = [0, 0];
function resolveOffset(offset, containerLength, targetLength, targetInset) {
  let offsetDefinition = Array.isArray(offset) ? offset : defaultOffset;
  let targetPoint = 0;
  let containerPoint = 0;
  if ((0, _utils.isNumber)(offset)) {
    /**
     * If we're provided offset: [0, 0.5, 1] then each number x should become
     * [x, x], so we default to the behaviour of mapping 0 => 0 of both target
     * and container etc.
     */
    offsetDefinition = [offset, offset];
  } else if ((0, _utils.isString)(offset)) {
    offset = offset.trim();
    if (offset.includes(" ")) {
      offsetDefinition = offset.split(" ");
    } else {
      /**
       * If we're provided a definition like "100px" then we want to apply
       * that only to the top of the target point, leaving the container at 0.
       * Whereas a named offset like "end" should be applied to both.
       */
      offsetDefinition = [offset, _edgeEs.namedEdges[offset] ? offset : `0`];
    }
  }
  targetPoint = (0, _edgeEs.resolveEdge)(offsetDefinition[0], targetLength, targetInset);
  containerPoint = (0, _edgeEs.resolveEdge)(offsetDefinition[1], containerLength);
  return targetPoint - containerPoint;
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/presets.es.js":
/*!***************************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/presets.es.js ***!
  \***************************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.ScrollOffset = void 0;
const ScrollOffset = {
  Enter: [[0, 1], [1, 1]],
  Exit: [[0, 0], [1, 0]],
  Any: [[1, 0], [0, 1]],
  All: [[0, 0], [1, 1]]
};
exports.ScrollOffset = ScrollOffset;

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/gestures/scroll/on-scroll-handler.es.js":
/*!*****************************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/gestures/scroll/on-scroll-handler.es.js ***!
  \*****************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.createOnScrollHandler = createOnScrollHandler;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
var _infoEs = __webpack_require__(/*! ./info.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/info.es.js");
var _indexEs = __webpack_require__(/*! ./offsets/index.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/index.es.js");
function measure(container) {
  let target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : container;
  let info = arguments.length > 2 ? arguments[2] : undefined;
  /**
   * Find inset of target within scrollable container
   */
  info.x.targetOffset = 0;
  info.y.targetOffset = 0;
  if (target !== container) {
    let node = target;
    while (node && node != container) {
      info.x.targetOffset += node.offsetLeft;
      info.y.targetOffset += node.offsetTop;
      node = node.offsetParent;
    }
  }
  info.x.targetLength = target === container ? target.scrollWidth : target.clientWidth;
  info.y.targetLength = target === container ? target.scrollHeight : target.clientHeight;
  info.x.containerLength = container.clientWidth;
  info.y.containerLength = container.clientHeight;
}
function createOnScrollHandler(element, onScroll, info) {
  let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  const axis = options.axis || "y";
  return {
    measure: () => measure(element, options.target, info),
    update: time => {
      (0, _infoEs.updateScrollInfo)(element, info, time);
      if (options.offset || options.target) {
        (0, _indexEs.resolveOffsets)(element, info, options);
      }
    },
    notify: typeof onScroll === "function" ? () => onScroll(info) : scrubAnimation(onScroll, info[axis])
  };
}
function scrubAnimation(controls, axisInfo) {
  controls.pause();
  controls.forEachNative((animation, _ref) => {
    let {
      easing
    } = _ref;
    var _a, _b;
    if (animation.updateDuration) {
      if (!easing) animation.easing = _utils.noopReturn;
      animation.updateDuration(1);
    } else {
      const timingOptions = {
        duration: 1000
      };
      if (!easing) timingOptions.easing = "linear";
      (_b = (_a = animation.effect) === null || _a === void 0 ? void 0 : _a.updateTiming) === null || _b === void 0 ? void 0 : _b.call(_a, timingOptions);
    }
  });
  return () => {
    controls.currentTime = axisInfo.progress;
  };
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/index.es.js":
/*!*************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/index.es.js ***!
  \*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "ScrollOffset", ({
  enumerable: true,
  get: function () {
    return _presetsEs.ScrollOffset;
  }
}));
Object.defineProperty(exports, "animate", ({
  enumerable: true,
  get: function () {
    return _indexEs.animate;
  }
}));
Object.defineProperty(exports, "animateStyle", ({
  enumerable: true,
  get: function () {
    return _animateStyleEs.animateStyle;
  }
}));
Object.defineProperty(exports, "createMotionState", ({
  enumerable: true,
  get: function () {
    return _indexEs7.createMotionState;
  }
}));
Object.defineProperty(exports, "createStyleString", ({
  enumerable: true,
  get: function () {
    return _styleStringEs.createStyleString;
  }
}));
Object.defineProperty(exports, "createStyles", ({
  enumerable: true,
  get: function () {
    return _styleObjectEs.createStyles;
  }
}));
Object.defineProperty(exports, "getAnimationData", ({
  enumerable: true,
  get: function () {
    return _dataEs.getAnimationData;
  }
}));
Object.defineProperty(exports, "getStyleName", ({
  enumerable: true,
  get: function () {
    return _getStyleNameEs.getStyleName;
  }
}));
Object.defineProperty(exports, "glide", ({
  enumerable: true,
  get: function () {
    return _indexEs4.glide;
  }
}));
Object.defineProperty(exports, "inView", ({
  enumerable: true,
  get: function () {
    return _inViewEs.inView;
  }
}));
Object.defineProperty(exports, "mountedStates", ({
  enumerable: true,
  get: function () {
    return _indexEs7.mountedStates;
  }
}));
Object.defineProperty(exports, "resize", ({
  enumerable: true,
  get: function () {
    return _indexEs5.resize;
  }
}));
Object.defineProperty(exports, "scroll", ({
  enumerable: true,
  get: function () {
    return _indexEs6.scroll;
  }
}));
Object.defineProperty(exports, "spring", ({
  enumerable: true,
  get: function () {
    return _indexEs3.spring;
  }
}));
Object.defineProperty(exports, "stagger", ({
  enumerable: true,
  get: function () {
    return _staggerEs.stagger;
  }
}));
Object.defineProperty(exports, "style", ({
  enumerable: true,
  get: function () {
    return _styleEs.style;
  }
}));
Object.defineProperty(exports, "timeline", ({
  enumerable: true,
  get: function () {
    return _indexEs2.timeline;
  }
}));
Object.defineProperty(exports, "withControls", ({
  enumerable: true,
  get: function () {
    return _controlsEs.withControls;
  }
}));
var _indexEs = __webpack_require__(/*! ./animate/index.es.js */ "../../../node_modules/@motionone/dom/dist/animate/index.es.js");
var _animateStyleEs = __webpack_require__(/*! ./animate/animate-style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/animate-style.es.js");
var _indexEs2 = __webpack_require__(/*! ./timeline/index.es.js */ "../../../node_modules/@motionone/dom/dist/timeline/index.es.js");
var _staggerEs = __webpack_require__(/*! ./utils/stagger.es.js */ "../../../node_modules/@motionone/dom/dist/utils/stagger.es.js");
var _indexEs3 = __webpack_require__(/*! ./easing/spring/index.es.js */ "../../../node_modules/@motionone/dom/dist/easing/spring/index.es.js");
var _indexEs4 = __webpack_require__(/*! ./easing/glide/index.es.js */ "../../../node_modules/@motionone/dom/dist/easing/glide/index.es.js");
var _styleEs = __webpack_require__(/*! ./animate/style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/style.es.js");
var _inViewEs = __webpack_require__(/*! ./gestures/in-view.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/in-view.es.js");
var _indexEs5 = __webpack_require__(/*! ./gestures/resize/index.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/resize/index.es.js");
var _indexEs6 = __webpack_require__(/*! ./gestures/scroll/index.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/index.es.js");
var _presetsEs = __webpack_require__(/*! ./gestures/scroll/offsets/presets.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/scroll/offsets/presets.es.js");
var _controlsEs = __webpack_require__(/*! ./animate/utils/controls.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/controls.es.js");
var _dataEs = __webpack_require__(/*! ./animate/data.es.js */ "../../../node_modules/@motionone/dom/dist/animate/data.es.js");
var _getStyleNameEs = __webpack_require__(/*! ./animate/utils/get-style-name.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js");
var _indexEs7 = __webpack_require__(/*! ./state/index.es.js */ "../../../node_modules/@motionone/dom/dist/state/index.es.js");
var _styleObjectEs = __webpack_require__(/*! ./animate/utils/style-object.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/style-object.es.js");
var _styleStringEs = __webpack_require__(/*! ./animate/utils/style-string.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/style-string.es.js");

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/state/gestures/hover.es.js":
/*!****************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/state/gestures/hover.es.js ***!
  \****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.hover = void 0;
var _eventsEs = __webpack_require__(/*! ../utils/events.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/events.es.js");
const mouseEvent = (element, name, action) => event => {
  if (event.pointerType && event.pointerType !== "mouse") return;
  action();
  (0, _eventsEs.dispatchPointerEvent)(element, name, event);
};
const hover = {
  isActive: options => Boolean(options.hover),
  subscribe: (element, _ref) => {
    let {
      enable,
      disable
    } = _ref;
    const onEnter = mouseEvent(element, "hoverstart", enable);
    const onLeave = mouseEvent(element, "hoverend", disable);
    element.addEventListener("pointerenter", onEnter);
    element.addEventListener("pointerleave", onLeave);
    return () => {
      element.removeEventListener("pointerenter", onEnter);
      element.removeEventListener("pointerleave", onLeave);
    };
  }
};
exports.hover = hover;

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/state/gestures/in-view.es.js":
/*!******************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/state/gestures/in-view.es.js ***!
  \******************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.inView = void 0;
var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
var _eventsEs = __webpack_require__(/*! ../utils/events.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/events.es.js");
var _inViewEs = __webpack_require__(/*! ../../gestures/in-view.es.js */ "../../../node_modules/@motionone/dom/dist/gestures/in-view.es.js");
const inView = {
  isActive: options => Boolean(options.inView),
  subscribe: (element, _ref, _ref2) => {
    let {
      enable,
      disable
    } = _ref;
    let {
      inViewOptions = {}
    } = _ref2;
    const {
        once
      } = inViewOptions,
      viewOptions = (0, _tslib.__rest)(inViewOptions, ["once"]);
    return (0, _inViewEs.inView)(element, enterEntry => {
      enable();
      (0, _eventsEs.dispatchViewEvent)(element, "viewenter", enterEntry);
      if (!once) {
        return leaveEntry => {
          disable();
          (0, _eventsEs.dispatchViewEvent)(element, "viewleave", leaveEntry);
        };
      }
    }, viewOptions);
  }
};
exports.inView = inView;

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/state/gestures/press.es.js":
/*!****************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/state/gestures/press.es.js ***!
  \****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.press = void 0;
var _eventsEs = __webpack_require__(/*! ../utils/events.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/events.es.js");
const press = {
  isActive: options => Boolean(options.press),
  subscribe: (element, _ref) => {
    let {
      enable,
      disable
    } = _ref;
    const onPointerUp = event => {
      disable();
      (0, _eventsEs.dispatchPointerEvent)(element, "pressend", event);
      window.removeEventListener("pointerup", onPointerUp);
    };
    const onPointerDown = event => {
      enable();
      (0, _eventsEs.dispatchPointerEvent)(element, "pressstart", event);
      window.addEventListener("pointerup", onPointerUp);
    };
    element.addEventListener("pointerdown", onPointerDown);
    return () => {
      element.removeEventListener("pointerdown", onPointerDown);
      window.removeEventListener("pointerup", onPointerUp);
    };
  }
};
exports.press = press;

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/state/index.es.js":
/*!*******************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/state/index.es.js ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.createMotionState = createMotionState;
exports.mountedStates = void 0;
var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
var _heyListen = __webpack_require__(/*! hey-listen */ "../../../node_modules/hey-listen/dist/hey-listen.es.js");
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
var _animateStyleEs = __webpack_require__(/*! ../animate/animate-style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/animate-style.es.js");
var _styleEs = __webpack_require__(/*! ../animate/style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/style.es.js");
var _optionsEs = __webpack_require__(/*! ../animate/utils/options.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/options.es.js");
var _hasChangedEs = __webpack_require__(/*! ./utils/has-changed.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/has-changed.es.js");
var _resolveVariantEs = __webpack_require__(/*! ./utils/resolve-variant.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/resolve-variant.es.js");
var _scheduleEs = __webpack_require__(/*! ./utils/schedule.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/schedule.es.js");
var _inViewEs = __webpack_require__(/*! ./gestures/in-view.es.js */ "../../../node_modules/@motionone/dom/dist/state/gestures/in-view.es.js");
var _hoverEs = __webpack_require__(/*! ./gestures/hover.es.js */ "../../../node_modules/@motionone/dom/dist/state/gestures/hover.es.js");
var _pressEs = __webpack_require__(/*! ./gestures/press.es.js */ "../../../node_modules/@motionone/dom/dist/state/gestures/press.es.js");
var _eventsEs = __webpack_require__(/*! ./utils/events.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/events.es.js");
const gestures = {
  inView: _inViewEs.inView,
  hover: _hoverEs.hover,
  press: _pressEs.press
};
/**
 * A list of state types, in priority order. If a value is defined in
 * a righter-most type, it will override any definition in a lefter-most.
 */
const stateTypes = ["initial", "animate", ...Object.keys(gestures), "exit"];
/**
 * A global store of all generated motion states. This can be used to lookup
 * a motion state for a given Element.
 */
const mountedStates = new WeakMap();
exports.mountedStates = mountedStates;
function createMotionState() {
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  let parent = arguments.length > 1 ? arguments[1] : undefined;
  /**
   * The element represented by the motion state. This is an empty reference
   * when we create the state to support SSR and allow for later mounting
   * in view libraries.
   *
   * @ts-ignore
   */
  let element;
  /**
   * Calculate a depth that we can use to order motion states by tree depth.
   */
  let depth = parent ? parent.getDepth() + 1 : 0;
  /**
   * Track which states are currently active.
   */
  const activeStates = {
    initial: true,
    animate: true
  };
  /**
   * A map of functions that, when called, will remove event listeners for
   * a given gesture.
   */
  const gestureSubscriptions = {};
  /**
   * Initialise a context to share through motion states. This
   * will be populated by variant names (if any).
   */
  const context = {};
  for (const name of stateTypes) {
    context[name] = typeof options[name] === "string" ? options[name] : parent === null || parent === void 0 ? void 0 : parent.getContext()[name];
  }
  /**
   * If initial is set to false we use the animate prop as the initial
   * animation state.
   */
  const initialVariantSource = options.initial === false ? "animate" : "initial";
  /**
   * Destructure an initial target out from the resolved initial variant.
   */
  let _a = (0, _resolveVariantEs.resolveVariant)(options[initialVariantSource] || context[initialVariantSource], options.variants) || {},
    target = (0, _tslib.__rest)(_a, ["transition"]);
  /**
   * The base target is a cached map of values that we'll use to animate
   * back to if a value is removed from all active state types. This
   * is usually the initial value as read from the DOM, for instance if
   * it hasn't been defined in initial.
   */
  const baseTarget = Object.assign({}, target);
  /**
   * A generator that will be processed by the global animation scheduler.
   * This yeilds when it switches from reading the DOM to writing to it
   * to prevent layout thrashing.
   */
  function* animateUpdates() {
    var _a, _b;
    const prevTarget = target;
    target = {};
    const animationOptions = {};
    for (const name of stateTypes) {
      if (!activeStates[name]) continue;
      const variant = (0, _resolveVariantEs.resolveVariant)(options[name]);
      if (!variant) continue;
      for (const key in variant) {
        if (key === "transition") continue;
        target[key] = variant[key];
        animationOptions[key] = (0, _optionsEs.getOptions)((_b = (_a = variant.transition) !== null && _a !== void 0 ? _a : options.transition) !== null && _b !== void 0 ? _b : {}, key);
      }
    }
    const allTargetKeys = new Set([...Object.keys(target), ...Object.keys(prevTarget)]);
    const animationFactories = [];
    allTargetKeys.forEach(key => {
      var _a;
      if (target[key] === undefined) {
        target[key] = baseTarget[key];
      }
      if ((0, _hasChangedEs.hasChanged)(prevTarget[key], target[key])) {
        (_a = baseTarget[key]) !== null && _a !== void 0 ? _a : baseTarget[key] = _styleEs.style.get(element, key);
        animationFactories.push((0, _animateStyleEs.animateStyle)(element, key, target[key], animationOptions[key]));
      }
    });
    // Wait for all animation states to read from the DOM
    yield;
    const animations = animationFactories.map(factory => factory()).filter(Boolean);
    if (!animations.length) return;
    const animationTarget = target;
    element.dispatchEvent((0, _eventsEs.motionEvent)("motionstart", animationTarget));
    Promise.all(animations.map(animation => animation.finished)).then(() => {
      element.dispatchEvent((0, _eventsEs.motionEvent)("motioncomplete", animationTarget));
    }).catch(_utils.noop);
  }
  const setGesture = (name, isActive) => () => {
    activeStates[name] = isActive;
    (0, _scheduleEs.scheduleAnimation)(state);
  };
  const updateGestureSubscriptions = () => {
    for (const name in gestures) {
      const isGestureActive = gestures[name].isActive(options);
      const remove = gestureSubscriptions[name];
      if (isGestureActive && !remove) {
        gestureSubscriptions[name] = gestures[name].subscribe(element, {
          enable: setGesture(name, true),
          disable: setGesture(name, false)
        }, options);
      } else if (!isGestureActive && remove) {
        remove();
        delete gestureSubscriptions[name];
      }
    }
  };
  const state = {
    update: newOptions => {
      if (!element) return;
      options = newOptions;
      updateGestureSubscriptions();
      (0, _scheduleEs.scheduleAnimation)(state);
    },
    setActive: (name, isActive) => {
      if (!element) return;
      activeStates[name] = isActive;
      (0, _scheduleEs.scheduleAnimation)(state);
    },
    animateUpdates,
    getDepth: () => depth,
    getTarget: () => target,
    getOptions: () => options,
    getContext: () => context,
    mount: newElement => {
      (0, _heyListen.invariant)(Boolean(newElement), "Animation state must be mounted with valid Element");
      element = newElement;
      mountedStates.set(element, state);
      updateGestureSubscriptions();
      return () => {
        mountedStates.delete(element);
        (0, _scheduleEs.unscheduleAnimation)(state);
        for (const key in gestureSubscriptions) {
          gestureSubscriptions[key]();
        }
      };
    },
    isMounted: () => Boolean(element)
  };
  return state;
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/state/utils/events.es.js":
/*!**************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/state/utils/events.es.js ***!
  \**************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.dispatchPointerEvent = dispatchPointerEvent;
exports.dispatchViewEvent = dispatchViewEvent;
exports.motionEvent = void 0;
const motionEvent = (name, target) => new CustomEvent(name, {
  detail: {
    target
  }
});
exports.motionEvent = motionEvent;
function dispatchPointerEvent(element, name, event) {
  element.dispatchEvent(new CustomEvent(name, {
    detail: {
      originalEvent: event
    }
  }));
}
function dispatchViewEvent(element, name, entry) {
  element.dispatchEvent(new CustomEvent(name, {
    detail: {
      originalEntry: entry
    }
  }));
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/state/utils/has-changed.es.js":
/*!*******************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/state/utils/has-changed.es.js ***!
  \*******************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.hasChanged = hasChanged;
exports.shallowCompare = shallowCompare;
function hasChanged(a, b) {
  if (typeof a !== typeof b) return true;
  if (Array.isArray(a) && Array.isArray(b)) return !shallowCompare(a, b);
  return a !== b;
}
function shallowCompare(next, prev) {
  const prevLength = prev.length;
  if (prevLength !== next.length) return false;
  for (let i = 0; i < prevLength; i++) {
    if (prev[i] !== next[i]) return false;
  }
  return true;
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/state/utils/is-variant.es.js":
/*!******************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/state/utils/is-variant.es.js ***!
  \******************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isVariant = isVariant;
function isVariant(definition) {
  return typeof definition === "object";
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/state/utils/resolve-variant.es.js":
/*!***********************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/state/utils/resolve-variant.es.js ***!
  \***********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.resolveVariant = resolveVariant;
var _isVariantEs = __webpack_require__(/*! ./is-variant.es.js */ "../../../node_modules/@motionone/dom/dist/state/utils/is-variant.es.js");
function resolveVariant(definition, variants) {
  if ((0, _isVariantEs.isVariant)(definition)) {
    return definition;
  } else if (definition && variants) {
    return variants[definition];
  }
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/state/utils/schedule.es.js":
/*!****************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/state/utils/schedule.es.js ***!
  \****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.scheduleAnimation = scheduleAnimation;
exports.unscheduleAnimation = unscheduleAnimation;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
let scheduled = undefined;
function processScheduledAnimations() {
  if (!scheduled) return;
  const generators = scheduled.sort(compareByDepth).map(fireAnimateUpdates);
  generators.forEach(fireNext);
  generators.forEach(fireNext);
  scheduled = undefined;
}
function scheduleAnimation(state) {
  if (!scheduled) {
    scheduled = [state];
    requestAnimationFrame(processScheduledAnimations);
  } else {
    (0, _utils.addUniqueItem)(scheduled, state);
  }
}
function unscheduleAnimation(state) {
  scheduled && (0, _utils.removeItem)(scheduled, state);
}
const compareByDepth = (a, b) => a.getDepth() - b.getDepth();
const fireAnimateUpdates = state => state.animateUpdates();
const fireNext = iterator => iterator.next();

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/timeline/index.es.js":
/*!**********************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/timeline/index.es.js ***!
  \**********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.createAnimationsFromTimeline = createAnimationsFromTimeline;
exports.timeline = timeline;
var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
var _heyListen = __webpack_require__(/*! hey-listen */ "../../../node_modules/hey-listen/dist/hey-listen.es.js");
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
var _staggerEs = __webpack_require__(/*! ../utils/stagger.es.js */ "../../../node_modules/@motionone/dom/dist/utils/stagger.es.js");
var _animateStyleEs = __webpack_require__(/*! ../animate/animate-style.es.js */ "../../../node_modules/@motionone/dom/dist/animate/animate-style.es.js");
var _controlsEs = __webpack_require__(/*! ../animate/utils/controls.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/controls.es.js");
var _keyframesEs = __webpack_require__(/*! ../animate/utils/keyframes.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js");
var _optionsEs = __webpack_require__(/*! ../animate/utils/options.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/options.es.js");
var _resolveElementsEs = __webpack_require__(/*! ../utils/resolve-elements.es.js */ "../../../node_modules/@motionone/dom/dist/utils/resolve-elements.es.js");
var _transformsEs = __webpack_require__(/*! ../animate/utils/transforms.es.js */ "../../../node_modules/@motionone/dom/dist/animate/utils/transforms.es.js");
var _calcTimeEs = __webpack_require__(/*! ./utils/calc-time.es.js */ "../../../node_modules/@motionone/dom/dist/timeline/utils/calc-time.es.js");
var _editEs = __webpack_require__(/*! ./utils/edit.es.js */ "../../../node_modules/@motionone/dom/dist/timeline/utils/edit.es.js");
var _sortEs = __webpack_require__(/*! ./utils/sort.es.js */ "../../../node_modules/@motionone/dom/dist/timeline/utils/sort.es.js");
function timeline(definition) {
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  var _a;
  const animationDefinitions = createAnimationsFromTimeline(definition, options);
  /**
   * Create and start animations
   */
  const animationFactories = animationDefinitions.map(definition => (0, _animateStyleEs.animateStyle)(...definition)).filter(Boolean);
  return (0, _controlsEs.withControls)(animationFactories, options,
  // Get the duration from the first animation definition
  (_a = animationDefinitions[0]) === null || _a === void 0 ? void 0 : _a[3].duration);
}
function createAnimationsFromTimeline(definition) {
  let _a = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  var {
      defaultOptions = {}
    } = _a,
    timelineOptions = (0, _tslib.__rest)(_a, ["defaultOptions"]);
  const animationDefinitions = [];
  const elementSequences = new Map();
  const elementCache = {};
  const timeLabels = new Map();
  let prevTime = 0;
  let currentTime = 0;
  let totalDuration = 0;
  /**
   * Build the timeline by mapping over the definition array and converting
   * the definitions into keyframes and offsets with absolute time values.
   * These will later get converted into relative offsets in a second pass.
   */
  for (let i = 0; i < definition.length; i++) {
    const segment = definition[i];
    /**
     * If this is a timeline label, mark it and skip the rest of this iteration.
     */
    if ((0, _utils.isString)(segment)) {
      timeLabels.set(segment, currentTime);
      continue;
    } else if (!Array.isArray(segment)) {
      timeLabels.set(segment.name, (0, _calcTimeEs.calcNextTime)(currentTime, segment.at, prevTime, timeLabels));
      continue;
    }
    const [elementDefinition, keyframes, options = {}] = segment;
    /**
     * If a relative or absolute time value has been specified we need to resolve
     * it in relation to the currentTime.
     */
    if (options.at !== undefined) {
      currentTime = (0, _calcTimeEs.calcNextTime)(currentTime, options.at, prevTime, timeLabels);
    }
    /**
     * Keep track of the maximum duration in this definition. This will be
     * applied to currentTime once the definition has been parsed.
     */
    let maxDuration = 0;
    /**
     * Find all the elements specified in the definition and parse value
     * keyframes from their timeline definitions.
     */
    const elements = (0, _resolveElementsEs.resolveElements)(elementDefinition, elementCache);
    const numElements = elements.length;
    for (let elementIndex = 0; elementIndex < numElements; elementIndex++) {
      const element = elements[elementIndex];
      const elementSequence = getElementSequence(element, elementSequences);
      for (const key in keyframes) {
        const valueSequence = getValueSequence(key, elementSequence);
        let valueKeyframes = (0, _keyframesEs.keyframesList)(keyframes[key]);
        const valueOptions = (0, _optionsEs.getOptions)(options, key);
        let {
          duration = defaultOptions.duration || _utils.defaults.duration,
          easing = defaultOptions.easing || _utils.defaults.easing
        } = valueOptions;
        if ((0, _utils.isEasingGenerator)(easing)) {
          const valueIsTransform = (0, _transformsEs.isTransform)(key);
          (0, _heyListen.invariant)(valueKeyframes.length === 2 || !valueIsTransform, "spring must be provided 2 keyframes within timeline");
          const custom = easing.createAnimation(valueKeyframes,
          // TODO We currently only support explicit keyframes
          // so this doesn't currently read from the DOM
          () => "0", valueIsTransform);
          easing = custom.easing;
          if (custom.keyframes !== undefined) valueKeyframes = custom.keyframes;
          if (custom.duration !== undefined) duration = custom.duration;
        }
        const delay = (0, _staggerEs.resolveOption)(options.delay, elementIndex, numElements) || 0;
        const startTime = currentTime + delay;
        const targetTime = startTime + duration;
        /**
         *
         */
        let {
          offset = (0, _utils.defaultOffset)(valueKeyframes.length)
        } = valueOptions;
        /**
         * If there's only one offset of 0, fill in a second with length 1
         *
         * TODO: Ensure there's a test that covers this removal
         */
        if (offset.length === 1 && offset[0] === 0) {
          offset[1] = 1;
        }
        /**
         * Fill out if offset if fewer offsets than keyframes
         */
        const remainder = length - valueKeyframes.length;
        remainder > 0 && (0, _utils.fillOffset)(offset, remainder);
        /**
         * If only one value has been set, ie [1], push a null to the start of
         * the keyframe array. This will let us mark a keyframe at this point
         * that will later be hydrated with the previous value.
         */
        valueKeyframes.length === 1 && valueKeyframes.unshift(null);
        /**
         * Add keyframes, mapping offsets to absolute time.
         */
        (0, _editEs.addKeyframes)(valueSequence, valueKeyframes, easing, offset, startTime, targetTime);
        maxDuration = Math.max(delay + duration, maxDuration);
        totalDuration = Math.max(targetTime, totalDuration);
      }
    }
    prevTime = currentTime;
    currentTime += maxDuration;
  }
  /**
   * For every element and value combination create a new animation.
   */
  elementSequences.forEach((valueSequences, element) => {
    for (const key in valueSequences) {
      const valueSequence = valueSequences[key];
      /**
       * Arrange all the keyframes in ascending time order.
       */
      valueSequence.sort(_sortEs.compareByTime);
      const keyframes = [];
      const valueOffset = [];
      const valueEasing = [];
      /**
       * For each keyframe, translate absolute times into
       * relative offsets based on the total duration of the timeline.
       */
      for (let i = 0; i < valueSequence.length; i++) {
        const {
          at,
          value,
          easing
        } = valueSequence[i];
        keyframes.push(value);
        valueOffset.push((0, _utils.progress)(0, totalDuration, at));
        valueEasing.push(easing || _utils.defaults.easing);
      }
      /**
       * If the first keyframe doesn't land on offset: 0
       * provide one by duplicating the initial keyframe. This ensures
       * it snaps to the first keyframe when the animation starts.
       */
      if (valueOffset[0] !== 0) {
        valueOffset.unshift(0);
        keyframes.unshift(keyframes[0]);
        valueEasing.unshift("linear");
      }
      /**
       * If the last keyframe doesn't land on offset: 1
       * provide one with a null wildcard value. This will ensure it
       * stays static until the end of the animation.
       */
      if (valueOffset[valueOffset.length - 1] !== 1) {
        valueOffset.push(1);
        keyframes.push(null);
      }
      animationDefinitions.push([element, key, keyframes, Object.assign(Object.assign(Object.assign({}, defaultOptions), {
        duration: totalDuration,
        easing: valueEasing,
        offset: valueOffset
      }), timelineOptions)]);
    }
  });
  return animationDefinitions;
}
function getElementSequence(element, sequences) {
  !sequences.has(element) && sequences.set(element, {});
  return sequences.get(element);
}
function getValueSequence(name, sequences) {
  if (!sequences[name]) sequences[name] = [];
  return sequences[name];
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/timeline/utils/calc-time.es.js":
/*!********************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/timeline/utils/calc-time.es.js ***!
  \********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.calcNextTime = calcNextTime;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
function calcNextTime(current, next, prev, labels) {
  var _a;
  if ((0, _utils.isNumber)(next)) {
    return next;
  } else if (next.startsWith("-") || next.startsWith("+")) {
    return Math.max(0, current + parseFloat(next));
  } else if (next === "<") {
    return prev;
  } else {
    return (_a = labels.get(next)) !== null && _a !== void 0 ? _a : current;
  }
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/timeline/utils/edit.es.js":
/*!***************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/timeline/utils/edit.es.js ***!
  \***************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.addKeyframes = addKeyframes;
exports.eraseKeyframes = eraseKeyframes;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
function eraseKeyframes(sequence, startTime, endTime) {
  for (let i = 0; i < sequence.length; i++) {
    const keyframe = sequence[i];
    if (keyframe.at > startTime && keyframe.at < endTime) {
      (0, _utils.removeItem)(sequence, keyframe);
      // If we remove this item we have to push the pointer back one
      i--;
    }
  }
}
function addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) {
  /**
   * Erase every existing value between currentTime and targetTime,
   * this will essentially splice this timeline into any currently
   * defined ones.
   */
  eraseKeyframes(sequence, startTime, endTime);
  for (let i = 0; i < keyframes.length; i++) {
    sequence.push({
      value: keyframes[i],
      at: (0, _utils.mix)(startTime, endTime, offset[i]),
      easing: (0, _utils.getEasingForSegment)(easing, i)
    });
  }
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/timeline/utils/sort.es.js":
/*!***************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/timeline/utils/sort.es.js ***!
  \***************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.compareByTime = compareByTime;
function compareByTime(a, b) {
  if (a.at === b.at) {
    return a.value === null ? 1 : -1;
  } else {
    return a.at - b.at;
  }
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/utils/resolve-elements.es.js":
/*!******************************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/utils/resolve-elements.es.js ***!
  \******************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.resolveElements = resolveElements;
function resolveElements(elements, selectorCache) {
  var _a;
  if (typeof elements === "string") {
    if (selectorCache) {
      (_a = selectorCache[elements]) !== null && _a !== void 0 ? _a : selectorCache[elements] = document.querySelectorAll(elements);
      elements = selectorCache[elements];
    } else {
      elements = document.querySelectorAll(elements);
    }
  } else if (elements instanceof Element) {
    elements = [elements];
  }
  /**
   * Return an empty array
   */
  return Array.from(elements || []);
}

/***/ }),

/***/ "../../../node_modules/@motionone/dom/dist/utils/stagger.es.js":
/*!*********************************************************************!*\
  !*** ../../../node_modules/@motionone/dom/dist/utils/stagger.es.js ***!
  \*********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getFromIndex = getFromIndex;
exports.resolveOption = resolveOption;
exports.stagger = stagger;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
var _animation = __webpack_require__(/*! @motionone/animation */ "../../../node_modules/@motionone/animation/dist/index.es.js");
function stagger() {
  let duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.1;
  let {
    start = 0,
    from = 0,
    easing
  } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  return (i, total) => {
    const fromIndex = (0, _utils.isNumber)(from) ? from : getFromIndex(from, total);
    const distance = Math.abs(fromIndex - i);
    let delay = duration * distance;
    if (easing) {
      const maxDelay = total * duration;
      const easingFunction = (0, _animation.getEasingFunction)(easing);
      delay = easingFunction(delay / maxDelay) * maxDelay;
    }
    return start + delay;
  };
}
function getFromIndex(from, total) {
  if (from === "first") {
    return 0;
  } else {
    const lastIndex = total - 1;
    return from === "last" ? lastIndex : lastIndex / 2;
  }
}
function resolveOption(option, i, total) {
  return typeof option === "function" ? option(i, total) : option;
}

/***/ }),

/***/ "../../../node_modules/@motionone/easing/dist/cubic-bezier.es.js":
/*!***********************************************************************!*\
  !*** ../../../node_modules/@motionone/easing/dist/cubic-bezier.es.js ***!
  \***********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.cubicBezier = cubicBezier;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
/*
  Bezier function generator

  This has been modified from Gaëtan Renaudeau's BezierEasing
  https://github.com/gre/bezier-easing/blob/master/src/index.js
  https://github.com/gre/bezier-easing/blob/master/LICENSE
  
  I've removed the newtonRaphsonIterate algo because in benchmarking it
  wasn't noticiably faster than binarySubdivision, indeed removing it
  usually improved times, depending on the curve.

  I also removed the lookup table, as for the added bundle size and loop we're
  only cutting ~4 or so subdivision iterations. I bumped the max iterations up
  to 12 to compensate and this still tended to be faster for no perceivable
  loss in accuracy.

  Usage
    const easeOut = cubicBezier(.17,.67,.83,.67);
    const x = easeOut(0.5); // returns 0.627...
*/
// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
const calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) * t;
const subdivisionPrecision = 0.0000001;
const subdivisionMaxIterations = 12;
function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
  let currentX;
  let currentT;
  let i = 0;
  do {
    currentT = lowerBound + (upperBound - lowerBound) / 2.0;
    currentX = calcBezier(currentT, mX1, mX2) - x;
    if (currentX > 0.0) {
      upperBound = currentT;
    } else {
      lowerBound = currentT;
    }
  } while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);
  return currentT;
}
function cubicBezier(mX1, mY1, mX2, mY2) {
  // If this is a linear gradient, return linear easing
  if (mX1 === mY1 && mX2 === mY2) return _utils.noopReturn;
  const getTForX = aX => binarySubdivide(aX, 0, 1, mX1, mX2);
  // If animation is at start/end, return t without easing
  return t => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
}

/***/ }),

/***/ "../../../node_modules/@motionone/easing/dist/index.es.js":
/*!****************************************************************!*\
  !*** ../../../node_modules/@motionone/easing/dist/index.es.js ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "cubicBezier", ({
  enumerable: true,
  get: function () {
    return _cubicBezierEs.cubicBezier;
  }
}));
Object.defineProperty(exports, "steps", ({
  enumerable: true,
  get: function () {
    return _stepsEs.steps;
  }
}));
var _cubicBezierEs = __webpack_require__(/*! ./cubic-bezier.es.js */ "../../../node_modules/@motionone/easing/dist/cubic-bezier.es.js");
var _stepsEs = __webpack_require__(/*! ./steps.es.js */ "../../../node_modules/@motionone/easing/dist/steps.es.js");

/***/ }),

/***/ "../../../node_modules/@motionone/easing/dist/steps.es.js":
/*!****************************************************************!*\
  !*** ../../../node_modules/@motionone/easing/dist/steps.es.js ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.steps = void 0;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
const steps = function (steps) {
  let direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "end";
  return progress => {
    progress = direction === "end" ? Math.min(progress, 0.999) : Math.max(progress, 0.001);
    const expanded = progress * steps;
    const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
    return (0, _utils.clamp)(0, 1, rounded / steps);
  };
};
exports.steps = steps;

/***/ }),

/***/ "../../../node_modules/@motionone/generators/dist/glide/index.es.js":
/*!**************************************************************************!*\
  !*** ../../../node_modules/@motionone/generators/dist/glide/index.es.js ***!
  \**************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.glide = void 0;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
var _velocityEs = __webpack_require__(/*! ../utils/velocity.es.js */ "../../../node_modules/@motionone/generators/dist/utils/velocity.es.js");
var _indexEs = __webpack_require__(/*! ../spring/index.es.js */ "../../../node_modules/@motionone/generators/dist/spring/index.es.js");
const glide = _ref => {
  let {
    from = 0,
    velocity = 0.0,
    power = 0.8,
    decay = 0.325,
    bounceDamping,
    bounceStiffness,
    changeTarget,
    min,
    max,
    restDistance = 0.5,
    restSpeed
  } = _ref;
  decay = _utils.time.ms(decay);
  const state = {
    hasReachedTarget: false,
    done: false,
    current: from,
    target: from
  };
  const isOutOfBounds = v => min !== undefined && v < min || max !== undefined && v > max;
  const nearestBoundary = v => {
    if (min === undefined) return max;
    if (max === undefined) return min;
    return Math.abs(min - v) < Math.abs(max - v) ? min : max;
  };
  let amplitude = power * velocity;
  const ideal = from + amplitude;
  const target = changeTarget === undefined ? ideal : changeTarget(ideal);
  state.target = target;
  /**
   * If the target has changed we need to re-calculate the amplitude, otherwise
   * the animation will start from the wrong position.
   */
  if (target !== ideal) amplitude = target - from;
  const calcDelta = t => -amplitude * Math.exp(-t / decay);
  const calcLatest = t => target + calcDelta(t);
  const applyFriction = t => {
    const delta = calcDelta(t);
    const latest = calcLatest(t);
    state.done = Math.abs(delta) <= restDistance;
    state.current = state.done ? target : latest;
  };
  /**
   * Ideally this would resolve for t in a stateless way, we could
   * do that by always precalculating the animation but as we know
   * this will be done anyway we can assume that spring will
   * be discovered during that.
   */
  let timeReachedBoundary;
  let spring$1;
  const checkCatchBoundary = t => {
    if (!isOutOfBounds(state.current)) return;
    timeReachedBoundary = t;
    spring$1 = (0, _indexEs.spring)({
      from: state.current,
      to: nearestBoundary(state.current),
      velocity: (0, _velocityEs.calcGeneratorVelocity)(calcLatest, t, state.current),
      damping: bounceDamping,
      stiffness: bounceStiffness,
      restDistance,
      restSpeed
    });
  };
  checkCatchBoundary(0);
  return t => {
    /**
     * We need to resolve the friction to figure out if we need a
     * spring but we don't want to do this twice per frame. So here
     * we flag if we updated for this frame and later if we did
     * we can skip doing it again.
     */
    let hasUpdatedFrame = false;
    if (!spring$1 && timeReachedBoundary === undefined) {
      hasUpdatedFrame = true;
      applyFriction(t);
      checkCatchBoundary(t);
    }
    /**
     * If we have a spring and the provided t is beyond the moment the friction
     * animation crossed the min/max boundary, use the spring.
     */
    if (timeReachedBoundary !== undefined && t > timeReachedBoundary) {
      state.hasReachedTarget = true;
      return spring$1(t - timeReachedBoundary);
    } else {
      state.hasReachedTarget = false;
      !hasUpdatedFrame && applyFriction(t);
      return state;
    }
  };
};
exports.glide = glide;

/***/ }),

/***/ "../../../node_modules/@motionone/generators/dist/index.es.js":
/*!********************************************************************!*\
  !*** ../../../node_modules/@motionone/generators/dist/index.es.js ***!
  \********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "calcGeneratorVelocity", ({
  enumerable: true,
  get: function () {
    return _velocityEs.calcGeneratorVelocity;
  }
}));
Object.defineProperty(exports, "glide", ({
  enumerable: true,
  get: function () {
    return _indexEs.glide;
  }
}));
Object.defineProperty(exports, "pregenerateKeyframes", ({
  enumerable: true,
  get: function () {
    return _pregenerateKeyframesEs.pregenerateKeyframes;
  }
}));
Object.defineProperty(exports, "spring", ({
  enumerable: true,
  get: function () {
    return _indexEs2.spring;
  }
}));
var _indexEs = __webpack_require__(/*! ./glide/index.es.js */ "../../../node_modules/@motionone/generators/dist/glide/index.es.js");
var _indexEs2 = __webpack_require__(/*! ./spring/index.es.js */ "../../../node_modules/@motionone/generators/dist/spring/index.es.js");
var _pregenerateKeyframesEs = __webpack_require__(/*! ./utils/pregenerate-keyframes.es.js */ "../../../node_modules/@motionone/generators/dist/utils/pregenerate-keyframes.es.js");
var _velocityEs = __webpack_require__(/*! ./utils/velocity.es.js */ "../../../node_modules/@motionone/generators/dist/utils/velocity.es.js");

/***/ }),

/***/ "../../../node_modules/@motionone/generators/dist/spring/defaults.es.js":
/*!******************************************************************************!*\
  !*** ../../../node_modules/@motionone/generators/dist/spring/defaults.es.js ***!
  \******************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.defaults = void 0;
const defaults = {
  stiffness: 100.0,
  damping: 10.0,
  mass: 1.0
};
exports.defaults = defaults;

/***/ }),

/***/ "../../../node_modules/@motionone/generators/dist/spring/index.es.js":
/*!***************************************************************************!*\
  !*** ../../../node_modules/@motionone/generators/dist/spring/index.es.js ***!
  \***************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.spring = void 0;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
var _defaultsEs = __webpack_require__(/*! ./defaults.es.js */ "../../../node_modules/@motionone/generators/dist/spring/defaults.es.js");
var _utilsEs = __webpack_require__(/*! ./utils.es.js */ "../../../node_modules/@motionone/generators/dist/spring/utils.es.js");
var _hasReachedTargetEs = __webpack_require__(/*! ../utils/has-reached-target.es.js */ "../../../node_modules/@motionone/generators/dist/utils/has-reached-target.es.js");
var _velocityEs = __webpack_require__(/*! ../utils/velocity.es.js */ "../../../node_modules/@motionone/generators/dist/utils/velocity.es.js");
const spring = function () {
  let {
    stiffness = _defaultsEs.defaults.stiffness,
    damping = _defaultsEs.defaults.damping,
    mass = _defaultsEs.defaults.mass,
    from = 0,
    to = 1,
    velocity = 0.0,
    restSpeed = 2,
    restDistance = 0.5
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  velocity = velocity ? _utils.time.s(velocity) : 0.0;
  const state = {
    done: false,
    hasReachedTarget: false,
    current: from,
    target: to
  };
  const initialDelta = to - from;
  const undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000;
  const dampingRatio = (0, _utilsEs.calcDampingRatio)(stiffness, damping, mass);
  let resolveSpring;
  if (dampingRatio < 1) {
    const angularFreq = undampedAngularFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
    // Underdamped spring (bouncy)
    resolveSpring = t => to - Math.exp(-dampingRatio * undampedAngularFreq * t) * ((-velocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq * Math.sin(angularFreq * t) + initialDelta * Math.cos(angularFreq * t));
  } else {
    // Critically damped spring
    resolveSpring = t => {
      return to - Math.exp(-undampedAngularFreq * t) * (initialDelta + (-velocity + undampedAngularFreq * initialDelta) * t);
    };
  }
  return t => {
    state.current = resolveSpring(t);
    const currentVelocity = t === 0 ? velocity : (0, _velocityEs.calcGeneratorVelocity)(resolveSpring, t, state.current);
    const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;
    const isBelowDisplacementThreshold = Math.abs(to - state.current) <= restDistance;
    state.done = isBelowVelocityThreshold && isBelowDisplacementThreshold;
    state.hasReachedTarget = (0, _hasReachedTargetEs.hasReachedTarget)(from, to, state.current);
    return state;
  };
};
exports.spring = spring;

/***/ }),

/***/ "../../../node_modules/@motionone/generators/dist/spring/utils.es.js":
/*!***************************************************************************!*\
  !*** ../../../node_modules/@motionone/generators/dist/spring/utils.es.js ***!
  \***************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.calcDampingRatio = void 0;
var _defaultsEs = __webpack_require__(/*! ./defaults.es.js */ "../../../node_modules/@motionone/generators/dist/spring/defaults.es.js");
const calcDampingRatio = function () {
  let stiffness = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _defaultsEs.defaults.stiffness;
  let damping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _defaultsEs.defaults.damping;
  let mass = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _defaultsEs.defaults.mass;
  return damping / (2 * Math.sqrt(stiffness * mass));
};
exports.calcDampingRatio = calcDampingRatio;

/***/ }),

/***/ "../../../node_modules/@motionone/generators/dist/utils/has-reached-target.es.js":
/*!***************************************************************************************!*\
  !*** ../../../node_modules/@motionone/generators/dist/utils/has-reached-target.es.js ***!
  \***************************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.hasReachedTarget = hasReachedTarget;
function hasReachedTarget(origin, target, current) {
  return origin < target && current >= target || origin > target && current <= target;
}

/***/ }),

/***/ "../../../node_modules/@motionone/generators/dist/utils/pregenerate-keyframes.es.js":
/*!******************************************************************************************!*\
  !*** ../../../node_modules/@motionone/generators/dist/utils/pregenerate-keyframes.es.js ***!
  \******************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.pregenerateKeyframes = pregenerateKeyframes;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
const timeStep = 10;
const maxDuration = 10000;
function pregenerateKeyframes(generator) {
  let toUnit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _utils.noopReturn;
  let overshootDuration = undefined;
  let timestamp = timeStep;
  let state = generator(0);
  const keyframes = [toUnit(state.current)];
  while (!state.done && timestamp < maxDuration) {
    state = generator(timestamp);
    keyframes.push(toUnit(state.done ? state.target : state.current));
    if (overshootDuration === undefined && state.hasReachedTarget) {
      overshootDuration = timestamp;
    }
    timestamp += timeStep;
  }
  const duration = timestamp - timeStep;
  /**
   * If generating an animation that didn't actually move,
   * generate a second keyframe so we have an origin and target.
   */
  if (keyframes.length === 1) keyframes.push(state.current);
  return {
    keyframes,
    duration: duration / 1000,
    overshootDuration: (overshootDuration !== null && overshootDuration !== void 0 ? overshootDuration : duration) / 1000
  };
}

/***/ }),

/***/ "../../../node_modules/@motionone/generators/dist/utils/velocity.es.js":
/*!*****************************************************************************!*\
  !*** ../../../node_modules/@motionone/generators/dist/utils/velocity.es.js ***!
  \*****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.calcGeneratorVelocity = calcGeneratorVelocity;
var _utils = __webpack_require__(/*! @motionone/utils */ "../../../node_modules/@motionone/utils/dist/index.es.js");
const sampleT = 5; // ms
function calcGeneratorVelocity(resolveValue, t, current) {
  const prevT = Math.max(t - sampleT, 0);
  return (0, _utils.velocityPerSecond)(current - resolveValue(prevT), t - prevT);
}

/***/ }),

/***/ "../../../node_modules/@motionone/types/dist/MotionValue.es.js":
/*!*********************************************************************!*\
  !*** ../../../node_modules/@motionone/types/dist/MotionValue.es.js ***!
  \*********************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.MotionValue = void 0;
/**
 * The MotionValue tracks the state of a single animatable
 * value. Currently, updatedAt and current are unused. The
 * long term idea is to use this to minimise the number
 * of DOM reads, and to abstract the DOM interactions here.
 */
class MotionValue {
  setAnimation(animation) {
    this.animation = animation;
    animation === null || animation === void 0 ? void 0 : animation.finished.then(() => this.clearAnimation()).catch(() => {});
  }
  clearAnimation() {
    this.animation = this.generator = undefined;
  }
}
exports.MotionValue = MotionValue;

/***/ }),

/***/ "../../../node_modules/@motionone/types/dist/index.es.js":
/*!***************************************************************!*\
  !*** ../../../node_modules/@motionone/types/dist/index.es.js ***!
  \***************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "MotionValue", ({
  enumerable: true,
  get: function () {
    return _MotionValueEs.MotionValue;
  }
}));
var _MotionValueEs = __webpack_require__(/*! ./MotionValue.es.js */ "../../../node_modules/@motionone/types/dist/MotionValue.es.js");

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/array.es.js":
/*!***************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/array.es.js ***!
  \***************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.addUniqueItem = addUniqueItem;
exports.removeItem = removeItem;
function addUniqueItem(array, item) {
  array.indexOf(item) === -1 && array.push(item);
}
function removeItem(arr, item) {
  const index = arr.indexOf(item);
  index > -1 && arr.splice(index, 1);
}

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/clamp.es.js":
/*!***************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/clamp.es.js ***!
  \***************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.clamp = void 0;
const clamp = (min, max, v) => Math.min(Math.max(v, min), max);
exports.clamp = clamp;

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/defaults.es.js":
/*!******************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/defaults.es.js ***!
  \******************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.defaults = void 0;
const defaults = {
  duration: 0.3,
  delay: 0,
  endDelay: 0,
  repeat: 0,
  easing: "ease"
};
exports.defaults = defaults;

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/easing.es.js":
/*!****************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/easing.es.js ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getEasingForSegment = getEasingForSegment;
var _isEasingListEs = __webpack_require__(/*! ./is-easing-list.es.js */ "../../../node_modules/@motionone/utils/dist/is-easing-list.es.js");
var _wrapEs = __webpack_require__(/*! ./wrap.es.js */ "../../../node_modules/@motionone/utils/dist/wrap.es.js");
function getEasingForSegment(easing, i) {
  return (0, _isEasingListEs.isEasingList)(easing) ? easing[(0, _wrapEs.wrap)(0, easing.length, i)] : easing;
}

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/index.es.js":
/*!***************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/index.es.js ***!
  \***************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "addUniqueItem", ({
  enumerable: true,
  get: function () {
    return _arrayEs.addUniqueItem;
  }
}));
Object.defineProperty(exports, "clamp", ({
  enumerable: true,
  get: function () {
    return _clampEs.clamp;
  }
}));
Object.defineProperty(exports, "defaultOffset", ({
  enumerable: true,
  get: function () {
    return _offsetEs.defaultOffset;
  }
}));
Object.defineProperty(exports, "defaults", ({
  enumerable: true,
  get: function () {
    return _defaultsEs.defaults;
  }
}));
Object.defineProperty(exports, "fillOffset", ({
  enumerable: true,
  get: function () {
    return _offsetEs.fillOffset;
  }
}));
Object.defineProperty(exports, "getEasingForSegment", ({
  enumerable: true,
  get: function () {
    return _easingEs.getEasingForSegment;
  }
}));
Object.defineProperty(exports, "interpolate", ({
  enumerable: true,
  get: function () {
    return _interpolateEs.interpolate;
  }
}));
Object.defineProperty(exports, "isCubicBezier", ({
  enumerable: true,
  get: function () {
    return _isCubicBezierEs.isCubicBezier;
  }
}));
Object.defineProperty(exports, "isEasingGenerator", ({
  enumerable: true,
  get: function () {
    return _isEasingGeneratorEs.isEasingGenerator;
  }
}));
Object.defineProperty(exports, "isEasingList", ({
  enumerable: true,
  get: function () {
    return _isEasingListEs.isEasingList;
  }
}));
Object.defineProperty(exports, "isFunction", ({
  enumerable: true,
  get: function () {
    return _isFunctionEs.isFunction;
  }
}));
Object.defineProperty(exports, "isNumber", ({
  enumerable: true,
  get: function () {
    return _isNumberEs.isNumber;
  }
}));
Object.defineProperty(exports, "isString", ({
  enumerable: true,
  get: function () {
    return _isStringEs.isString;
  }
}));
Object.defineProperty(exports, "mix", ({
  enumerable: true,
  get: function () {
    return _mixEs.mix;
  }
}));
Object.defineProperty(exports, "noop", ({
  enumerable: true,
  get: function () {
    return _noopEs.noop;
  }
}));
Object.defineProperty(exports, "noopReturn", ({
  enumerable: true,
  get: function () {
    return _noopEs.noopReturn;
  }
}));
Object.defineProperty(exports, "progress", ({
  enumerable: true,
  get: function () {
    return _progressEs.progress;
  }
}));
Object.defineProperty(exports, "removeItem", ({
  enumerable: true,
  get: function () {
    return _arrayEs.removeItem;
  }
}));
Object.defineProperty(exports, "time", ({
  enumerable: true,
  get: function () {
    return _timeEs.time;
  }
}));
Object.defineProperty(exports, "velocityPerSecond", ({
  enumerable: true,
  get: function () {
    return _velocityEs.velocityPerSecond;
  }
}));
Object.defineProperty(exports, "wrap", ({
  enumerable: true,
  get: function () {
    return _wrapEs.wrap;
  }
}));
var _arrayEs = __webpack_require__(/*! ./array.es.js */ "../../../node_modules/@motionone/utils/dist/array.es.js");
var _clampEs = __webpack_require__(/*! ./clamp.es.js */ "../../../node_modules/@motionone/utils/dist/clamp.es.js");
var _defaultsEs = __webpack_require__(/*! ./defaults.es.js */ "../../../node_modules/@motionone/utils/dist/defaults.es.js");
var _easingEs = __webpack_require__(/*! ./easing.es.js */ "../../../node_modules/@motionone/utils/dist/easing.es.js");
var _interpolateEs = __webpack_require__(/*! ./interpolate.es.js */ "../../../node_modules/@motionone/utils/dist/interpolate.es.js");
var _isCubicBezierEs = __webpack_require__(/*! ./is-cubic-bezier.es.js */ "../../../node_modules/@motionone/utils/dist/is-cubic-bezier.es.js");
var _isEasingGeneratorEs = __webpack_require__(/*! ./is-easing-generator.es.js */ "../../../node_modules/@motionone/utils/dist/is-easing-generator.es.js");
var _isEasingListEs = __webpack_require__(/*! ./is-easing-list.es.js */ "../../../node_modules/@motionone/utils/dist/is-easing-list.es.js");
var _isFunctionEs = __webpack_require__(/*! ./is-function.es.js */ "../../../node_modules/@motionone/utils/dist/is-function.es.js");
var _isNumberEs = __webpack_require__(/*! ./is-number.es.js */ "../../../node_modules/@motionone/utils/dist/is-number.es.js");
var _isStringEs = __webpack_require__(/*! ./is-string.es.js */ "../../../node_modules/@motionone/utils/dist/is-string.es.js");
var _mixEs = __webpack_require__(/*! ./mix.es.js */ "../../../node_modules/@motionone/utils/dist/mix.es.js");
var _noopEs = __webpack_require__(/*! ./noop.es.js */ "../../../node_modules/@motionone/utils/dist/noop.es.js");
var _offsetEs = __webpack_require__(/*! ./offset.es.js */ "../../../node_modules/@motionone/utils/dist/offset.es.js");
var _progressEs = __webpack_require__(/*! ./progress.es.js */ "../../../node_modules/@motionone/utils/dist/progress.es.js");
var _timeEs = __webpack_require__(/*! ./time.es.js */ "../../../node_modules/@motionone/utils/dist/time.es.js");
var _velocityEs = __webpack_require__(/*! ./velocity.es.js */ "../../../node_modules/@motionone/utils/dist/velocity.es.js");
var _wrapEs = __webpack_require__(/*! ./wrap.es.js */ "../../../node_modules/@motionone/utils/dist/wrap.es.js");

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/interpolate.es.js":
/*!*********************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/interpolate.es.js ***!
  \*********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.interpolate = interpolate;
var _mixEs = __webpack_require__(/*! ./mix.es.js */ "../../../node_modules/@motionone/utils/dist/mix.es.js");
var _noopEs = __webpack_require__(/*! ./noop.es.js */ "../../../node_modules/@motionone/utils/dist/noop.es.js");
var _offsetEs = __webpack_require__(/*! ./offset.es.js */ "../../../node_modules/@motionone/utils/dist/offset.es.js");
var _progressEs = __webpack_require__(/*! ./progress.es.js */ "../../../node_modules/@motionone/utils/dist/progress.es.js");
var _easingEs = __webpack_require__(/*! ./easing.es.js */ "../../../node_modules/@motionone/utils/dist/easing.es.js");
var _clampEs = __webpack_require__(/*! ./clamp.es.js */ "../../../node_modules/@motionone/utils/dist/clamp.es.js");
function interpolate(output) {
  let input = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (0, _offsetEs.defaultOffset)(output.length);
  let easing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _noopEs.noopReturn;
  const length = output.length;
  /**
   * If the input length is lower than the output we
   * fill the input to match. This currently assumes the input
   * is an animation progress value so is a good candidate for
   * moving outside the function.
   */
  const remainder = length - input.length;
  remainder > 0 && (0, _offsetEs.fillOffset)(input, remainder);
  return t => {
    let i = 0;
    for (; i < length - 2; i++) {
      if (t < input[i + 1]) break;
    }
    let progressInRange = (0, _clampEs.clamp)(0, 1, (0, _progressEs.progress)(input[i], input[i + 1], t));
    const segmentEasing = (0, _easingEs.getEasingForSegment)(easing, i);
    progressInRange = segmentEasing(progressInRange);
    return (0, _mixEs.mix)(output[i], output[i + 1], progressInRange);
  };
}

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/is-cubic-bezier.es.js":
/*!*************************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/is-cubic-bezier.es.js ***!
  \*************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isCubicBezier = void 0;
var _isNumberEs = __webpack_require__(/*! ./is-number.es.js */ "../../../node_modules/@motionone/utils/dist/is-number.es.js");
const isCubicBezier = easing => Array.isArray(easing) && (0, _isNumberEs.isNumber)(easing[0]);
exports.isCubicBezier = isCubicBezier;

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/is-easing-generator.es.js":
/*!*****************************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/is-easing-generator.es.js ***!
  \*****************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isEasingGenerator = void 0;
const isEasingGenerator = easing => typeof easing === "object" && Boolean(easing.createAnimation);
exports.isEasingGenerator = isEasingGenerator;

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/is-easing-list.es.js":
/*!************************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/is-easing-list.es.js ***!
  \************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isEasingList = void 0;
var _isNumberEs = __webpack_require__(/*! ./is-number.es.js */ "../../../node_modules/@motionone/utils/dist/is-number.es.js");
const isEasingList = easing => Array.isArray(easing) && !(0, _isNumberEs.isNumber)(easing[0]);
exports.isEasingList = isEasingList;

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/is-function.es.js":
/*!*********************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/is-function.es.js ***!
  \*********************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isFunction = void 0;
const isFunction = value => typeof value === "function";
exports.isFunction = isFunction;

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/is-number.es.js":
/*!*******************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/is-number.es.js ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isNumber = void 0;
const isNumber = value => typeof value === "number";
exports.isNumber = isNumber;

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/is-string.es.js":
/*!*******************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/is-string.es.js ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isString = void 0;
const isString = value => typeof value === "string";
exports.isString = isString;

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/mix.es.js":
/*!*************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/mix.es.js ***!
  \*************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.mix = void 0;
const mix = (min, max, progress) => -progress * min + progress * max + min;
exports.mix = mix;

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/noop.es.js":
/*!**************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/noop.es.js ***!
  \**************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.noopReturn = exports.noop = void 0;
const noop = () => {};
exports.noop = noop;
const noopReturn = v => v;
exports.noopReturn = noopReturn;

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/offset.es.js":
/*!****************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/offset.es.js ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.defaultOffset = defaultOffset;
exports.fillOffset = fillOffset;
var _mixEs = __webpack_require__(/*! ./mix.es.js */ "../../../node_modules/@motionone/utils/dist/mix.es.js");
var _progressEs = __webpack_require__(/*! ./progress.es.js */ "../../../node_modules/@motionone/utils/dist/progress.es.js");
function fillOffset(offset, remaining) {
  const min = offset[offset.length - 1];
  for (let i = 1; i <= remaining; i++) {
    const offsetProgress = (0, _progressEs.progress)(0, remaining, i);
    offset.push((0, _mixEs.mix)(min, 1, offsetProgress));
  }
}
function defaultOffset(length) {
  const offset = [0];
  fillOffset(offset, length - 1);
  return offset;
}

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/progress.es.js":
/*!******************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/progress.es.js ***!
  \******************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.progress = void 0;
const progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min);
exports.progress = progress;

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/time.es.js":
/*!**************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/time.es.js ***!
  \**************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.time = void 0;
const time = {
  ms: seconds => seconds * 1000,
  s: milliseconds => milliseconds / 1000
};
exports.time = time;

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/velocity.es.js":
/*!******************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/velocity.es.js ***!
  \******************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.velocityPerSecond = velocityPerSecond;
/*
  Convert velocity into velocity per second

  @param [number]: Unit per frame
  @param [number]: Frame duration in ms
*/
function velocityPerSecond(velocity, frameDuration) {
  return frameDuration ? velocity * (1000 / frameDuration) : 0;
}

/***/ }),

/***/ "../../../node_modules/@motionone/utils/dist/wrap.es.js":
/*!**************************************************************!*\
  !*** ../../../node_modules/@motionone/utils/dist/wrap.es.js ***!
  \**************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.wrap = void 0;
const wrap = (min, max, v) => {
  const rangeSize = max - min;
  return ((v - min) % rangeSize + rangeSize) % rangeSize + min;
};
exports.wrap = wrap;

/***/ }),

/***/ "../../../node_modules/@n1ru4l/push-pull-async-iterable-iterator/index.js":
/*!********************************************************************************!*\
  !*** ../../../node_modules/@n1ru4l/push-pull-async-iterable-iterator/index.js ***!
  \********************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
function createDeferred() {
  const d = {};
  d.promise = new Promise((resolve, reject) => {
    d.resolve = resolve;
    d.reject = reject;
  });
  return d;
}
const SYMBOL_FINISHED = Symbol();
const SYMBOL_NEW_VALUE = Symbol();
/**
 * makePushPullAsyncIterableIterator
 *
 * The iterable will publish values until return or throw is called.
 * Afterwards it is in the completed state and cannot be used for publishing any further values.
 * It will handle back-pressure and keep pushed values until they are consumed by a source.
 */
function makePushPullAsyncIterableIterator() {
  let isRunning = true;
  const values = [];
  let newValueD = createDeferred();
  const finishedD = createDeferred();
  const asyncIterableIterator = async function* PushPullAsyncIterableIterator() {
    while (true) {
      if (values.length > 0) {
        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
        yield values.shift();
      } else {
        const result = await Promise.race([newValueD.promise, finishedD.promise]);
        if (result === SYMBOL_FINISHED) {
          break;
        }
        if (result !== SYMBOL_NEW_VALUE) {
          throw result;
        }
      }
    }
  }();
  function pushValue(value) {
    if (isRunning === false) {
      // TODO: Should this throw?
      return;
    }
    values.push(value);
    newValueD.resolve(SYMBOL_NEW_VALUE);
    newValueD = createDeferred();
  }
  // We monkey patch the original generator for clean-up
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
  const originalReturn = asyncIterableIterator.return.bind(asyncIterableIterator);
  asyncIterableIterator.return = function () {
    isRunning = false;
    finishedD.resolve(SYMBOL_FINISHED);
    return originalReturn(...arguments);
  };
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
  const originalThrow = asyncIterableIterator.throw.bind(asyncIterableIterator);
  asyncIterableIterator.throw = err => {
    isRunning = false;
    finishedD.resolve(err);
    return originalThrow(err);
  };
  return {
    pushValue,
    asyncIterableIterator
  };
}
const makeAsyncIterableIteratorFromSink = make => {
  const {
    pushValue,
    asyncIterableIterator
  } = makePushPullAsyncIterableIterator();
  const dispose = make({
    next: value => {
      pushValue(value);
    },
    complete: () => {
      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
      asyncIterableIterator.return();
    },
    error: err => {
      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
      asyncIterableIterator.throw(err);
    }
  });
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
  const originalReturn = asyncIterableIterator.return;
  let returnValue = undefined;
  asyncIterableIterator.return = () => {
    if (returnValue === undefined) {
      dispose();
      returnValue = originalReturn();
    }
    return returnValue;
  };
  return asyncIterableIterator;
};
function applyAsyncIterableIteratorToSink(asyncIterableIterator, sink) {
  const run = async () => {
    try {
      for await (const value of asyncIterableIterator) {
        sink.next(value);
      }
      sink.complete();
    } catch (err) {
      sink.error(err);
    }
  };
  run();
  return () => {
    var _a;
    (_a = asyncIterableIterator.return) === null || _a === void 0 ? void 0 : _a.call(asyncIterableIterator);
  };
}
function isAsyncIterable(input) {
  return typeof input === "object" && input !== null && (
  // The AsyncGenerator check is for Safari on iOS which currently does not have
  // Symbol.asyncIterator implemented
  // That means every custom AsyncIterable must be built using a AsyncGeneratorFunction (async function * () {})
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  input[Symbol.toStringTag] === "AsyncGenerator" || Symbol.asyncIterator && Symbol.asyncIterator in input);
}
exports.applyAsyncIterableIteratorToSink = applyAsyncIterableIteratorToSink;
exports.isAsyncIterable = isAsyncIterable;
exports.makeAsyncIterableIteratorFromSink = makeAsyncIterableIteratorFromSink;
exports.makePushPullAsyncIterableIterator = makePushPullAsyncIterableIterator;

/***/ }),

/***/ "../../../node_modules/@radix-ui/primitive/dist/index.js":
/*!***************************************************************!*\
  !*** ../../../node_modules/@radix-ui/primitive/dist/index.js ***!
  \***************************************************************/
/***/ (function(module) {



function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
$parcel$export(module.exports, "composeEventHandlers", () => $1a6a90a521dcd173$export$b9ecd428b558ff10);
function $1a6a90a521dcd173$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler) {
  let {
    checkForDefaultPrevented = true
  } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  return function handleEvent(event) {
    originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
    if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
  };
}

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-arrow/dist/index.js":
/*!*****************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-arrow/dist/index.js ***!
  \*****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $eQpDd$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
var $eQpDd$react = __webpack_require__(/*! react */ "react");
var $eQpDd$radixuireactprimitive = __webpack_require__(/*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "Arrow", () => $09f4ad68a9251bc3$export$21b07c8f274aebd5);
$parcel$export(module.exports, "Root", () => $09f4ad68a9251bc3$export$be92b6f5f03c0fe9);

/* -------------------------------------------------------------------------------------------------
 * Arrow
 * -----------------------------------------------------------------------------------------------*/
const $09f4ad68a9251bc3$var$NAME = 'Arrow';
const $09f4ad68a9251bc3$export$21b07c8f274aebd5 = /*#__PURE__*/$eQpDd$react.forwardRef((props, forwardedRef) => {
  const {
    children: children,
    width = 10,
    height = 5,
    ...arrowProps
  } = props;
  return /*#__PURE__*/$eQpDd$react.createElement($eQpDd$radixuireactprimitive.Primitive.svg, $parcel$interopDefault($eQpDd$babelruntimehelpersextends)({}, arrowProps, {
    ref: forwardedRef,
    width: width,
    height: height,
    viewBox: "0 0 30 10",
    preserveAspectRatio: "none"
  }), props.asChild ? children : /*#__PURE__*/$eQpDd$react.createElement("polygon", {
    points: "0,0 30,0 15,10"
  }));
});
/*#__PURE__*/
Object.assign($09f4ad68a9251bc3$export$21b07c8f274aebd5, {
  displayName: $09f4ad68a9251bc3$var$NAME
});
/* -----------------------------------------------------------------------------------------------*/
const $09f4ad68a9251bc3$export$be92b6f5f03c0fe9 = $09f4ad68a9251bc3$export$21b07c8f274aebd5;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-collection/dist/index.js":
/*!**********************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-collection/dist/index.js ***!
  \**********************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $hnlpS$react = __webpack_require__(/*! react */ "react");
var $hnlpS$radixuireactcontext = __webpack_require__(/*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
var $hnlpS$radixuireactcomposerefs = __webpack_require__(/*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
var $hnlpS$radixuireactslot = __webpack_require__(/*! @radix-ui/react-slot */ "../../../node_modules/@radix-ui/react-slot/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "createCollection", () => $1a96635ec239608b$export$c74125a8e3af6bb2);

// We have resorted to returning slots directly rather than exposing primitives that can then
// be slotted like `<CollectionItem as={Slot}>…</CollectionItem>`.
// This is because we encountered issues with generic types that cannot be statically analysed
// due to creating them dynamically via createCollection.
function $1a96635ec239608b$export$c74125a8e3af6bb2(name) {
  /* -----------------------------------------------------------------------------------------------
  * CollectionProvider
  * ---------------------------------------------------------------------------------------------*/
  const PROVIDER_NAME = name + 'CollectionProvider';
  const [createCollectionContext, createCollectionScope] = $hnlpS$radixuireactcontext.createContextScope(PROVIDER_NAME);
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
    collectionRef: {
      current: null
    },
    itemMap: new Map()
  });
  const CollectionProvider = props => {
    const {
      scope: scope,
      children: children
    } = props;
    const ref = $parcel$interopDefault($hnlpS$react).useRef(null);
    const itemMap = $parcel$interopDefault($hnlpS$react).useRef(new Map()).current;
    return /*#__PURE__*/$parcel$interopDefault($hnlpS$react).createElement(CollectionProviderImpl, {
      scope: scope,
      itemMap: itemMap,
      collectionRef: ref
    }, children);
  };
  /*#__PURE__*/
  Object.assign(CollectionProvider, {
    displayName: PROVIDER_NAME
  });
  /* -----------------------------------------------------------------------------------------------
  * CollectionSlot
  * ---------------------------------------------------------------------------------------------*/
  const COLLECTION_SLOT_NAME = name + 'CollectionSlot';
  const CollectionSlot = /*#__PURE__*/$parcel$interopDefault($hnlpS$react).forwardRef((props, forwardedRef) => {
    const {
      scope: scope,
      children: children
    } = props;
    const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
    const composedRefs = $hnlpS$radixuireactcomposerefs.useComposedRefs(forwardedRef, context.collectionRef);
    return /*#__PURE__*/$parcel$interopDefault($hnlpS$react).createElement($hnlpS$radixuireactslot.Slot, {
      ref: composedRefs
    }, children);
  });
  /*#__PURE__*/
  Object.assign(CollectionSlot, {
    displayName: COLLECTION_SLOT_NAME
  });
  /* -----------------------------------------------------------------------------------------------
  * CollectionItem
  * ---------------------------------------------------------------------------------------------*/
  const ITEM_SLOT_NAME = name + 'CollectionItemSlot';
  const ITEM_DATA_ATTR = 'data-radix-collection-item';
  const CollectionItemSlot = /*#__PURE__*/$parcel$interopDefault($hnlpS$react).forwardRef((props, forwardedRef) => {
    const {
      scope: scope,
      children: children,
      ...itemData
    } = props;
    const ref = $parcel$interopDefault($hnlpS$react).useRef(null);
    const composedRefs = $hnlpS$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
    const context = useCollectionContext(ITEM_SLOT_NAME, scope);
    $parcel$interopDefault($hnlpS$react).useEffect(() => {
      context.itemMap.set(ref, {
        ref: ref,
        ...itemData
      });
      return () => void context.itemMap.delete(ref);
    });
    return /*#__PURE__*/$parcel$interopDefault($hnlpS$react).createElement($hnlpS$radixuireactslot.Slot, {
      [ITEM_DATA_ATTR]: '',
      ref: composedRefs
    }, children);
  });
  /*#__PURE__*/
  Object.assign(CollectionItemSlot, {
    displayName: ITEM_SLOT_NAME
  });
  /* -----------------------------------------------------------------------------------------------
  * useCollection
  * ---------------------------------------------------------------------------------------------*/
  function useCollection(scope) {
    const context = useCollectionContext(name + 'CollectionConsumer', scope);
    const getItems = $parcel$interopDefault($hnlpS$react).useCallback(() => {
      const collectionNode = context.collectionRef.current;
      if (!collectionNode) return [];
      const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
      const items = Array.from(context.itemMap.values());
      const orderedItems = items.sort((a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current));
      return orderedItems;
    }, [context.collectionRef, context.itemMap]);
    return getItems;
  }
  return [{
    Provider: CollectionProvider,
    Slot: CollectionSlot,
    ItemSlot: CollectionItemSlot
  }, useCollection, createCollectionScope];
}

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js":
/*!************************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-compose-refs/dist/index.js ***!
  \************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $dJwbH$react = __webpack_require__(/*! react */ "react");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
$parcel$export(module.exports, "composeRefs", () => $9c2aaba23466b352$export$43e446d32b3d21af);
$parcel$export(module.exports, "useComposedRefs", () => $9c2aaba23466b352$export$c7b2cbe3552a0d05);

/**
 * Set a given ref to a given value
 * This utility takes care of different types of refs: callback refs and RefObject(s)
 */
function $9c2aaba23466b352$var$setRef(ref, value) {
  if (typeof ref === 'function') ref(value);else if (ref !== null && ref !== undefined) ref.current = value;
}
/**
 * A utility to compose multiple refs together
 * Accepts callback refs and RefObject(s)
 */
function $9c2aaba23466b352$export$43e446d32b3d21af() {
  for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
    refs[_key] = arguments[_key];
  }
  return node => refs.forEach(ref => $9c2aaba23466b352$var$setRef(ref, node));
}
/**
 * A custom hook that composes multiple refs
 * Accepts callback refs and RefObject(s)
 */
function $9c2aaba23466b352$export$c7b2cbe3552a0d05() {
  for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
    refs[_key2] = arguments[_key2];
  }
  // eslint-disable-next-line react-hooks/exhaustive-deps
  return $dJwbH$react.useCallback($9c2aaba23466b352$export$43e446d32b3d21af(...refs), refs);
}

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-context/dist/index.js":
/*!*******************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-context/dist/index.js ***!
  \*******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $4O1Ne$react = __webpack_require__(/*! react */ "react");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
$parcel$export(module.exports, "createContext", () => $dec3cc0142d4f286$export$fd42f52fd3ae1109);
$parcel$export(module.exports, "createContextScope", () => $dec3cc0142d4f286$export$50c7b4e9d9f19c1);
function $dec3cc0142d4f286$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
  const Context = /*#__PURE__*/$4O1Ne$react.createContext(defaultContext);
  function Provider(props) {
    const {
      children: children,
      ...context
    } = props; // Only re-memoize when prop values change
    // eslint-disable-next-line react-hooks/exhaustive-deps
    const value = $4O1Ne$react.useMemo(() => context, Object.values(context));
    return /*#__PURE__*/$4O1Ne$react.createElement(Context.Provider, {
      value: value
    }, children);
  }
  function useContext(consumerName) {
    const context = $4O1Ne$react.useContext(Context);
    if (context) return context;
    if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.
    throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
  }
  Provider.displayName = rootComponentName + 'Provider';
  return [Provider, useContext];
}
/* -------------------------------------------------------------------------------------------------
 * createContextScope
 * -----------------------------------------------------------------------------------------------*/
function $dec3cc0142d4f286$export$50c7b4e9d9f19c1(scopeName) {
  let createContextScopeDeps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  let defaultContexts = [];
  /* -----------------------------------------------------------------------------------------------
  * createContext
  * ---------------------------------------------------------------------------------------------*/
  function $dec3cc0142d4f286$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
    const BaseContext = /*#__PURE__*/$4O1Ne$react.createContext(defaultContext);
    const index = defaultContexts.length;
    defaultContexts = [...defaultContexts, defaultContext];
    function Provider(props) {
      const {
        scope: scope,
        children: children,
        ...context
      } = props;
      const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext; // Only re-memoize when prop values change
      // eslint-disable-next-line react-hooks/exhaustive-deps
      const value = $4O1Ne$react.useMemo(() => context, Object.values(context));
      return /*#__PURE__*/$4O1Ne$react.createElement(Context.Provider, {
        value: value
      }, children);
    }
    function useContext(consumerName, scope) {
      const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
      const context = $4O1Ne$react.useContext(Context);
      if (context) return context;
      if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.
      throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
    }
    Provider.displayName = rootComponentName + 'Provider';
    return [Provider, useContext];
  }
  /* -----------------------------------------------------------------------------------------------
  * createScope
  * ---------------------------------------------------------------------------------------------*/
  const createScope = () => {
    const scopeContexts = defaultContexts.map(defaultContext => {
      return /*#__PURE__*/$4O1Ne$react.createContext(defaultContext);
    });
    return function useScope(scope) {
      const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
      return $4O1Ne$react.useMemo(() => ({
        [`__scope${scopeName}`]: {
          ...scope,
          [scopeName]: contexts
        }
      }), [scope, contexts]);
    };
  };
  createScope.scopeName = scopeName;
  return [$dec3cc0142d4f286$export$fd42f52fd3ae1109, $dec3cc0142d4f286$var$composeContextScopes(createScope, ...createContextScopeDeps)];
}
/* -------------------------------------------------------------------------------------------------
 * composeContextScopes
 * -----------------------------------------------------------------------------------------------*/
function $dec3cc0142d4f286$var$composeContextScopes() {
  for (var _len = arguments.length, scopes = new Array(_len), _key = 0; _key < _len; _key++) {
    scopes[_key] = arguments[_key];
  }
  const baseScope = scopes[0];
  if (scopes.length === 1) return baseScope;
  const createScope1 = () => {
    const scopeHooks = scopes.map(createScope => ({
      useScope: createScope(),
      scopeName: createScope.scopeName
    }));
    return function useComposedScopes(overrideScopes) {
      const nextScopes1 = scopeHooks.reduce((nextScopes, _ref) => {
        let {
          useScope: useScope,
          scopeName: scopeName
        } = _ref;
        // We are calling a hook inside a callback which React warns against to avoid inconsistent
        // renders, however, scoping doesn't have render side effects so we ignore the rule.
        // eslint-disable-next-line react-hooks/rules-of-hooks
        const scopeProps = useScope(overrideScopes);
        const currentScope = scopeProps[`__scope${scopeName}`];
        return {
          ...nextScopes,
          ...currentScope
        };
      }, {});
      return $4O1Ne$react.useMemo(() => ({
        [`__scope${baseScope.scopeName}`]: nextScopes1
      }), [nextScopes1]);
    };
  };
  createScope1.scopeName = baseScope.scopeName;
  return createScope1;
}

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-dialog/dist/index.js":
/*!******************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-dialog/dist/index.js ***!
  \******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $aJCrN$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
var $aJCrN$react = __webpack_require__(/*! react */ "react");
var $aJCrN$radixuiprimitive = __webpack_require__(/*! @radix-ui/primitive */ "../../../node_modules/@radix-ui/primitive/dist/index.js");
var $aJCrN$radixuireactcomposerefs = __webpack_require__(/*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
var $aJCrN$radixuireactcontext = __webpack_require__(/*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
var $aJCrN$radixuireactid = __webpack_require__(/*! @radix-ui/react-id */ "../../../node_modules/@radix-ui/react-id/dist/index.js");
var $aJCrN$radixuireactusecontrollablestate = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ "../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js");
var $aJCrN$radixuireactdismissablelayer = __webpack_require__(/*! @radix-ui/react-dismissable-layer */ "../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.js");
var $aJCrN$radixuireactfocusscope = __webpack_require__(/*! @radix-ui/react-focus-scope */ "../../../node_modules/@radix-ui/react-focus-scope/dist/index.js");
var $aJCrN$radixuireactportal = __webpack_require__(/*! @radix-ui/react-portal */ "../../../node_modules/@radix-ui/react-portal/dist/index.js");
var $aJCrN$radixuireactpresence = __webpack_require__(/*! @radix-ui/react-presence */ "../../../node_modules/@radix-ui/react-presence/dist/index.js");
var $aJCrN$radixuireactprimitive = __webpack_require__(/*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
var $aJCrN$radixuireactfocusguards = __webpack_require__(/*! @radix-ui/react-focus-guards */ "../../../node_modules/@radix-ui/react-focus-guards/dist/index.js");
var $aJCrN$reactremovescroll = __webpack_require__(/*! react-remove-scroll */ "../../../node_modules/react-remove-scroll/dist/es2015/index.js");
var $aJCrN$ariahidden = __webpack_require__(/*! aria-hidden */ "../../../node_modules/aria-hidden/dist/es2015/index.js");
var $aJCrN$radixuireactslot = __webpack_require__(/*! @radix-ui/react-slot */ "../../../node_modules/@radix-ui/react-slot/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "createDialogScope", () => $f4833395aa1bca1a$export$cc702773b8ea3e41);
$parcel$export(module.exports, "Dialog", () => $f4833395aa1bca1a$export$3ddf2d174ce01153);
$parcel$export(module.exports, "DialogTrigger", () => $f4833395aa1bca1a$export$2e1e1122cf0cba88);
$parcel$export(module.exports, "DialogPortal", () => $f4833395aa1bca1a$export$dad7c95542bacce0);
$parcel$export(module.exports, "DialogOverlay", () => $f4833395aa1bca1a$export$bd1d06c79be19e17);
$parcel$export(module.exports, "DialogContent", () => $f4833395aa1bca1a$export$b6d9565de1e068cf);
$parcel$export(module.exports, "DialogTitle", () => $f4833395aa1bca1a$export$16f7638e4a34b909);
$parcel$export(module.exports, "DialogDescription", () => $f4833395aa1bca1a$export$94e94c2ec2c954d5);
$parcel$export(module.exports, "DialogClose", () => $f4833395aa1bca1a$export$fba2fb7cd781b7ac);
$parcel$export(module.exports, "Root", () => $f4833395aa1bca1a$export$be92b6f5f03c0fe9);
$parcel$export(module.exports, "Trigger", () => $f4833395aa1bca1a$export$41fb9f06171c75f4);
$parcel$export(module.exports, "Portal", () => $f4833395aa1bca1a$export$602eac185826482c);
$parcel$export(module.exports, "Overlay", () => $f4833395aa1bca1a$export$c6fdb837b070b4ff);
$parcel$export(module.exports, "Content", () => $f4833395aa1bca1a$export$7c6e2c02157bb7d2);
$parcel$export(module.exports, "Title", () => $f4833395aa1bca1a$export$f99233281efd08a0);
$parcel$export(module.exports, "Description", () => $f4833395aa1bca1a$export$393edc798c47379d);
$parcel$export(module.exports, "Close", () => $f4833395aa1bca1a$export$f39c2d165cd861fe);
$parcel$export(module.exports, "WarningProvider", () => $f4833395aa1bca1a$export$69b62a49393917d6);

/* -------------------------------------------------------------------------------------------------
 * Dialog
 * -----------------------------------------------------------------------------------------------*/
const $f4833395aa1bca1a$var$DIALOG_NAME = 'Dialog';
const [$f4833395aa1bca1a$var$createDialogContext, $f4833395aa1bca1a$export$cc702773b8ea3e41] = $aJCrN$radixuireactcontext.createContextScope($f4833395aa1bca1a$var$DIALOG_NAME);
const [$f4833395aa1bca1a$var$DialogProvider, $f4833395aa1bca1a$var$useDialogContext] = $f4833395aa1bca1a$var$createDialogContext($f4833395aa1bca1a$var$DIALOG_NAME);
const $f4833395aa1bca1a$export$3ddf2d174ce01153 = props => {
  const {
    __scopeDialog: __scopeDialog,
    children: children,
    open: openProp,
    defaultOpen: defaultOpen,
    onOpenChange: onOpenChange,
    modal = true
  } = props;
  const triggerRef = $aJCrN$react.useRef(null);
  const contentRef = $aJCrN$react.useRef(null);
  const [open = false, setOpen] = $aJCrN$radixuireactusecontrollablestate.useControllableState({
    prop: openProp,
    defaultProp: defaultOpen,
    onChange: onOpenChange
  });
  return /*#__PURE__*/$aJCrN$react.createElement($f4833395aa1bca1a$var$DialogProvider, {
    scope: __scopeDialog,
    triggerRef: triggerRef,
    contentRef: contentRef,
    contentId: $aJCrN$radixuireactid.useId(),
    titleId: $aJCrN$radixuireactid.useId(),
    descriptionId: $aJCrN$radixuireactid.useId(),
    open: open,
    onOpenChange: setOpen,
    onOpenToggle: $aJCrN$react.useCallback(() => setOpen(prevOpen => !prevOpen), [setOpen]),
    modal: modal
  }, children);
};
/*#__PURE__*/
Object.assign($f4833395aa1bca1a$export$3ddf2d174ce01153, {
  displayName: $f4833395aa1bca1a$var$DIALOG_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DialogTrigger
 * -----------------------------------------------------------------------------------------------*/
const $f4833395aa1bca1a$var$TRIGGER_NAME = 'DialogTrigger';
const $f4833395aa1bca1a$export$2e1e1122cf0cba88 = /*#__PURE__*/$aJCrN$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDialog: __scopeDialog,
    ...triggerProps
  } = props;
  const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$TRIGGER_NAME, __scopeDialog);
  const composedTriggerRef = $aJCrN$radixuireactcomposerefs.useComposedRefs(forwardedRef, context.triggerRef);
  return /*#__PURE__*/$aJCrN$react.createElement($aJCrN$radixuireactprimitive.Primitive.button, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({
    type: "button",
    "aria-haspopup": "dialog",
    "aria-expanded": context.open,
    "aria-controls": context.contentId,
    "data-state": $f4833395aa1bca1a$var$getState(context.open)
  }, triggerProps, {
    ref: composedTriggerRef,
    onClick: $aJCrN$radixuiprimitive.composeEventHandlers(props.onClick, context.onOpenToggle)
  }));
});
/*#__PURE__*/
Object.assign($f4833395aa1bca1a$export$2e1e1122cf0cba88, {
  displayName: $f4833395aa1bca1a$var$TRIGGER_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DialogPortal
 * -----------------------------------------------------------------------------------------------*/
const $f4833395aa1bca1a$var$PORTAL_NAME = 'DialogPortal';
const [$f4833395aa1bca1a$var$PortalProvider, $f4833395aa1bca1a$var$usePortalContext] = $f4833395aa1bca1a$var$createDialogContext($f4833395aa1bca1a$var$PORTAL_NAME, {
  forceMount: undefined
});
const $f4833395aa1bca1a$export$dad7c95542bacce0 = props => {
  const {
    __scopeDialog: __scopeDialog,
    forceMount: forceMount,
    children: children,
    container: container
  } = props;
  const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$PORTAL_NAME, __scopeDialog);
  return /*#__PURE__*/$aJCrN$react.createElement($f4833395aa1bca1a$var$PortalProvider, {
    scope: __scopeDialog,
    forceMount: forceMount
  }, $aJCrN$react.Children.map(children, child => /*#__PURE__*/$aJCrN$react.createElement($aJCrN$radixuireactpresence.Presence, {
    present: forceMount || context.open
  }, /*#__PURE__*/$aJCrN$react.createElement($aJCrN$radixuireactportal.Portal, {
    asChild: true,
    container: container
  }, child))));
};
/*#__PURE__*/
Object.assign($f4833395aa1bca1a$export$dad7c95542bacce0, {
  displayName: $f4833395aa1bca1a$var$PORTAL_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DialogOverlay
 * -----------------------------------------------------------------------------------------------*/
const $f4833395aa1bca1a$var$OVERLAY_NAME = 'DialogOverlay';
const $f4833395aa1bca1a$export$bd1d06c79be19e17 = /*#__PURE__*/$aJCrN$react.forwardRef((props, forwardedRef) => {
  const portalContext = $f4833395aa1bca1a$var$usePortalContext($f4833395aa1bca1a$var$OVERLAY_NAME, props.__scopeDialog);
  const {
    forceMount = portalContext.forceMount,
    ...overlayProps
  } = props;
  const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$OVERLAY_NAME, props.__scopeDialog);
  return context.modal ? /*#__PURE__*/$aJCrN$react.createElement($aJCrN$radixuireactpresence.Presence, {
    present: forceMount || context.open
  }, /*#__PURE__*/$aJCrN$react.createElement($f4833395aa1bca1a$var$DialogOverlayImpl, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({}, overlayProps, {
    ref: forwardedRef
  }))) : null;
});
/*#__PURE__*/
Object.assign($f4833395aa1bca1a$export$bd1d06c79be19e17, {
  displayName: $f4833395aa1bca1a$var$OVERLAY_NAME
});
const $f4833395aa1bca1a$var$DialogOverlayImpl = /*#__PURE__*/$aJCrN$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDialog: __scopeDialog,
    ...overlayProps
  } = props;
  const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$OVERLAY_NAME, __scopeDialog);
  return /*#__PURE__*/ (// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
    // ie. when `Overlay` and `Content` are siblings
    $aJCrN$react.createElement($aJCrN$reactremovescroll.RemoveScroll, {
      as: $aJCrN$radixuireactslot.Slot,
      allowPinchZoom: true,
      shards: [context.contentRef]
    }, /*#__PURE__*/$aJCrN$react.createElement($aJCrN$radixuireactprimitive.Primitive.div, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({
      "data-state": $f4833395aa1bca1a$var$getState(context.open)
    }, overlayProps, {
      ref: forwardedRef // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.
      ,

      style: {
        pointerEvents: 'auto',
        ...overlayProps.style
      }
    })))
  );
});
/* -------------------------------------------------------------------------------------------------
 * DialogContent
 * -----------------------------------------------------------------------------------------------*/
const $f4833395aa1bca1a$var$CONTENT_NAME = 'DialogContent';
const $f4833395aa1bca1a$export$b6d9565de1e068cf = /*#__PURE__*/$aJCrN$react.forwardRef((props, forwardedRef) => {
  const portalContext = $f4833395aa1bca1a$var$usePortalContext($f4833395aa1bca1a$var$CONTENT_NAME, props.__scopeDialog);
  const {
    forceMount = portalContext.forceMount,
    ...contentProps
  } = props;
  const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$CONTENT_NAME, props.__scopeDialog);
  return /*#__PURE__*/$aJCrN$react.createElement($aJCrN$radixuireactpresence.Presence, {
    present: forceMount || context.open
  }, context.modal ? /*#__PURE__*/$aJCrN$react.createElement($f4833395aa1bca1a$var$DialogContentModal, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({}, contentProps, {
    ref: forwardedRef
  })) : /*#__PURE__*/$aJCrN$react.createElement($f4833395aa1bca1a$var$DialogContentNonModal, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({}, contentProps, {
    ref: forwardedRef
  })));
});
/*#__PURE__*/
Object.assign($f4833395aa1bca1a$export$b6d9565de1e068cf, {
  displayName: $f4833395aa1bca1a$var$CONTENT_NAME
});
/* -----------------------------------------------------------------------------------------------*/
const $f4833395aa1bca1a$var$DialogContentModal = /*#__PURE__*/$aJCrN$react.forwardRef((props, forwardedRef) => {
  const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$CONTENT_NAME, props.__scopeDialog);
  const contentRef = $aJCrN$react.useRef(null);
  const composedRefs = $aJCrN$radixuireactcomposerefs.useComposedRefs(forwardedRef, context.contentRef, contentRef); // aria-hide everything except the content (better supported equivalent to setting aria-modal)
  $aJCrN$react.useEffect(() => {
    const content = contentRef.current;
    if (content) return $aJCrN$ariahidden.hideOthers(content);
  }, []);
  return /*#__PURE__*/$aJCrN$react.createElement($f4833395aa1bca1a$var$DialogContentImpl, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({}, props, {
    ref: composedRefs // we make sure focus isn't trapped once `DialogContent` has been closed
    ,

    trapFocus: context.open,
    disableOutsidePointerEvents: true,
    onCloseAutoFocus: $aJCrN$radixuiprimitive.composeEventHandlers(props.onCloseAutoFocus, event => {
      var _context$triggerRef$c;
      event.preventDefault();
      (_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();
    }),
    onPointerDownOutside: $aJCrN$radixuiprimitive.composeEventHandlers(props.onPointerDownOutside, event => {
      const originalEvent = event.detail.originalEvent;
      const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
      const isRightClick = originalEvent.button === 2 || ctrlLeftClick; // If the event is a right-click, we shouldn't close because
      // it is effectively as if we right-clicked the `Overlay`.
      if (isRightClick) event.preventDefault();
    }) // When focus is trapped, a `focusout` event may still happen.
    ,

    onFocusOutside: $aJCrN$radixuiprimitive.composeEventHandlers(props.onFocusOutside, event => event.preventDefault())
  }));
});
/* -----------------------------------------------------------------------------------------------*/
const $f4833395aa1bca1a$var$DialogContentNonModal = /*#__PURE__*/$aJCrN$react.forwardRef((props, forwardedRef) => {
  const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$CONTENT_NAME, props.__scopeDialog);
  const hasInteractedOutsideRef = $aJCrN$react.useRef(false);
  const hasPointerDownOutsideRef = $aJCrN$react.useRef(false);
  return /*#__PURE__*/$aJCrN$react.createElement($f4833395aa1bca1a$var$DialogContentImpl, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({}, props, {
    ref: forwardedRef,
    trapFocus: false,
    disableOutsidePointerEvents: false,
    onCloseAutoFocus: event => {
      var _props$onCloseAutoFoc;
      (_props$onCloseAutoFoc = props.onCloseAutoFocus) === null || _props$onCloseAutoFoc === void 0 || _props$onCloseAutoFoc.call(props, event);
      if (!event.defaultPrevented) {
        var _context$triggerRef$c2;
        if (!hasInteractedOutsideRef.current) (_context$triggerRef$c2 = context.triggerRef.current) === null || _context$triggerRef$c2 === void 0 || _context$triggerRef$c2.focus(); // Always prevent auto focus because we either focus manually or want user agent focus
        event.preventDefault();
      }
      hasInteractedOutsideRef.current = false;
      hasPointerDownOutsideRef.current = false;
    },
    onInteractOutside: event => {
      var _props$onInteractOuts, _context$triggerRef$c3;
      (_props$onInteractOuts = props.onInteractOutside) === null || _props$onInteractOuts === void 0 || _props$onInteractOuts.call(props, event);
      if (!event.defaultPrevented) {
        hasInteractedOutsideRef.current = true;
        if (event.detail.originalEvent.type === 'pointerdown') hasPointerDownOutsideRef.current = true;
      } // Prevent dismissing when clicking the trigger.
      // As the trigger is already setup to close, without doing so would
      // cause it to close and immediately open.
      const target = event.target;
      const targetIsTrigger = (_context$triggerRef$c3 = context.triggerRef.current) === null || _context$triggerRef$c3 === void 0 ? void 0 : _context$triggerRef$c3.contains(target);
      if (targetIsTrigger) event.preventDefault(); // On Safari if the trigger is inside a container with tabIndex={0}, when clicked
      // we will get the pointer down outside event on the trigger, but then a subsequent
      // focus outside event on the container, we ignore any focus outside event when we've
      // already had a pointer down outside event.
      if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) event.preventDefault();
    }
  }));
});
/* -----------------------------------------------------------------------------------------------*/
const $f4833395aa1bca1a$var$DialogContentImpl = /*#__PURE__*/$aJCrN$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDialog: __scopeDialog,
    trapFocus: trapFocus,
    onOpenAutoFocus: onOpenAutoFocus,
    onCloseAutoFocus: onCloseAutoFocus,
    ...contentProps
  } = props;
  const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$CONTENT_NAME, __scopeDialog);
  const contentRef = $aJCrN$react.useRef(null);
  const composedRefs = $aJCrN$radixuireactcomposerefs.useComposedRefs(forwardedRef, contentRef); // Make sure the whole tree has focus guards as our `Dialog` will be
  // the last element in the DOM (beacuse of the `Portal`)
  $aJCrN$radixuireactfocusguards.useFocusGuards();
  return /*#__PURE__*/$aJCrN$react.createElement($aJCrN$react.Fragment, null, /*#__PURE__*/$aJCrN$react.createElement($aJCrN$radixuireactfocusscope.FocusScope, {
    asChild: true,
    loop: true,
    trapped: trapFocus,
    onMountAutoFocus: onOpenAutoFocus,
    onUnmountAutoFocus: onCloseAutoFocus
  }, /*#__PURE__*/$aJCrN$react.createElement($aJCrN$radixuireactdismissablelayer.DismissableLayer, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({
    role: "dialog",
    id: context.contentId,
    "aria-describedby": context.descriptionId,
    "aria-labelledby": context.titleId,
    "data-state": $f4833395aa1bca1a$var$getState(context.open)
  }, contentProps, {
    ref: composedRefs,
    onDismiss: () => context.onOpenChange(false)
  }))), false);
});
/* -------------------------------------------------------------------------------------------------
 * DialogTitle
 * -----------------------------------------------------------------------------------------------*/
const $f4833395aa1bca1a$var$TITLE_NAME = 'DialogTitle';
const $f4833395aa1bca1a$export$16f7638e4a34b909 = /*#__PURE__*/$aJCrN$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDialog: __scopeDialog,
    ...titleProps
  } = props;
  const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$TITLE_NAME, __scopeDialog);
  return /*#__PURE__*/$aJCrN$react.createElement($aJCrN$radixuireactprimitive.Primitive.h2, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({
    id: context.titleId
  }, titleProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($f4833395aa1bca1a$export$16f7638e4a34b909, {
  displayName: $f4833395aa1bca1a$var$TITLE_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DialogDescription
 * -----------------------------------------------------------------------------------------------*/
const $f4833395aa1bca1a$var$DESCRIPTION_NAME = 'DialogDescription';
const $f4833395aa1bca1a$export$94e94c2ec2c954d5 = /*#__PURE__*/$aJCrN$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDialog: __scopeDialog,
    ...descriptionProps
  } = props;
  const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$DESCRIPTION_NAME, __scopeDialog);
  return /*#__PURE__*/$aJCrN$react.createElement($aJCrN$radixuireactprimitive.Primitive.p, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({
    id: context.descriptionId
  }, descriptionProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($f4833395aa1bca1a$export$94e94c2ec2c954d5, {
  displayName: $f4833395aa1bca1a$var$DESCRIPTION_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DialogClose
 * -----------------------------------------------------------------------------------------------*/
const $f4833395aa1bca1a$var$CLOSE_NAME = 'DialogClose';
const $f4833395aa1bca1a$export$fba2fb7cd781b7ac = /*#__PURE__*/$aJCrN$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDialog: __scopeDialog,
    ...closeProps
  } = props;
  const context = $f4833395aa1bca1a$var$useDialogContext($f4833395aa1bca1a$var$CLOSE_NAME, __scopeDialog);
  return /*#__PURE__*/$aJCrN$react.createElement($aJCrN$radixuireactprimitive.Primitive.button, $parcel$interopDefault($aJCrN$babelruntimehelpersextends)({
    type: "button"
  }, closeProps, {
    ref: forwardedRef,
    onClick: $aJCrN$radixuiprimitive.composeEventHandlers(props.onClick, () => context.onOpenChange(false))
  }));
});
/*#__PURE__*/
Object.assign($f4833395aa1bca1a$export$fba2fb7cd781b7ac, {
  displayName: $f4833395aa1bca1a$var$CLOSE_NAME
});
/* -----------------------------------------------------------------------------------------------*/
function $f4833395aa1bca1a$var$getState(open) {
  return open ? 'open' : 'closed';
}
const $f4833395aa1bca1a$var$TITLE_WARNING_NAME = 'DialogTitleWarning';
const [$f4833395aa1bca1a$export$69b62a49393917d6, $f4833395aa1bca1a$var$useWarningContext] = $aJCrN$radixuireactcontext.createContext($f4833395aa1bca1a$var$TITLE_WARNING_NAME, {
  contentName: $f4833395aa1bca1a$var$CONTENT_NAME,
  titleName: $f4833395aa1bca1a$var$TITLE_NAME,
  docsSlug: 'dialog'
});
const $f4833395aa1bca1a$var$TitleWarning = _ref => {
  let {
    titleId: titleId
  } = _ref;
  const titleWarningContext = $f4833395aa1bca1a$var$useWarningContext($f4833395aa1bca1a$var$TITLE_WARNING_NAME);
  const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
  $aJCrN$react.useEffect(() => {
    if (titleId) {
      const hasTitle = document.getElementById(titleId);
      if (!hasTitle) throw new Error(MESSAGE);
    }
  }, [MESSAGE, titleId]);
  return null;
};
const $f4833395aa1bca1a$var$DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning';
const $f4833395aa1bca1a$var$DescriptionWarning = _ref2 => {
  let {
    contentRef: contentRef,
    descriptionId: descriptionId
  } = _ref2;
  const descriptionWarningContext = $f4833395aa1bca1a$var$useWarningContext($f4833395aa1bca1a$var$DESCRIPTION_WARNING_NAME);
  const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
  $aJCrN$react.useEffect(() => {
    var _contentRef$current;
    const describedById = (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 ? void 0 : _contentRef$current.getAttribute('aria-describedby'); // if we have an id and the user hasn't set aria-describedby={undefined}
    if (descriptionId && describedById) {
      const hasDescription = document.getElementById(descriptionId);
      if (!hasDescription) console.warn(MESSAGE);
    }
  }, [MESSAGE, contentRef, descriptionId]);
  return null;
};
const $f4833395aa1bca1a$export$be92b6f5f03c0fe9 = $f4833395aa1bca1a$export$3ddf2d174ce01153;
const $f4833395aa1bca1a$export$41fb9f06171c75f4 = $f4833395aa1bca1a$export$2e1e1122cf0cba88;
const $f4833395aa1bca1a$export$602eac185826482c = $f4833395aa1bca1a$export$dad7c95542bacce0;
const $f4833395aa1bca1a$export$c6fdb837b070b4ff = $f4833395aa1bca1a$export$bd1d06c79be19e17;
const $f4833395aa1bca1a$export$7c6e2c02157bb7d2 = $f4833395aa1bca1a$export$b6d9565de1e068cf;
const $f4833395aa1bca1a$export$f99233281efd08a0 = $f4833395aa1bca1a$export$16f7638e4a34b909;
const $f4833395aa1bca1a$export$393edc798c47379d = $f4833395aa1bca1a$export$94e94c2ec2c954d5;
const $f4833395aa1bca1a$export$f39c2d165cd861fe = $f4833395aa1bca1a$export$fba2fb7cd781b7ac;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-direction/dist/index.js":
/*!*********************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-direction/dist/index.js ***!
  \*********************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $9g4ps$react = __webpack_require__(/*! react */ "react");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
$parcel$export(module.exports, "useDirection", () => $cc45c1b701a63adc$export$b39126d51d94e6f3);
$parcel$export(module.exports, "Provider", () => $cc45c1b701a63adc$export$2881499e37b75b9a);
$parcel$export(module.exports, "DirectionProvider", () => $cc45c1b701a63adc$export$c760c09fdd558351);
const $cc45c1b701a63adc$var$DirectionContext = /*#__PURE__*/$9g4ps$react.createContext(undefined);
/* -------------------------------------------------------------------------------------------------
 * Direction
 * -----------------------------------------------------------------------------------------------*/
const $cc45c1b701a63adc$export$c760c09fdd558351 = props => {
  const {
    dir: dir,
    children: children
  } = props;
  return /*#__PURE__*/$9g4ps$react.createElement($cc45c1b701a63adc$var$DirectionContext.Provider, {
    value: dir
  }, children);
};
/* -----------------------------------------------------------------------------------------------*/
function $cc45c1b701a63adc$export$b39126d51d94e6f3(localDir) {
  const globalDir = $9g4ps$react.useContext($cc45c1b701a63adc$var$DirectionContext);
  return localDir || globalDir || 'ltr';
}
const $cc45c1b701a63adc$export$2881499e37b75b9a = $cc45c1b701a63adc$export$c760c09fdd558351;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.js":
/*!*****************************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.js ***!
  \*****************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $g2vWm$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
var $g2vWm$react = __webpack_require__(/*! react */ "react");
var $g2vWm$radixuiprimitive = __webpack_require__(/*! @radix-ui/primitive */ "../../../node_modules/@radix-ui/primitive/dist/index.js");
var $g2vWm$radixuireactprimitive = __webpack_require__(/*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
var $g2vWm$radixuireactcomposerefs = __webpack_require__(/*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
var $g2vWm$radixuireactusecallbackref = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");
var $g2vWm$radixuireactuseescapekeydown = __webpack_require__(/*! @radix-ui/react-use-escape-keydown */ "../../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "DismissableLayer", () => $d715e0554b679f1f$export$177fb62ff3ec1f22);
$parcel$export(module.exports, "DismissableLayerBranch", () => $d715e0554b679f1f$export$4d5eb2109db14228);
$parcel$export(module.exports, "Root", () => $d715e0554b679f1f$export$be92b6f5f03c0fe9);
$parcel$export(module.exports, "Branch", () => $d715e0554b679f1f$export$aecb2ddcb55c95be);

/* -------------------------------------------------------------------------------------------------
 * DismissableLayer
 * -----------------------------------------------------------------------------------------------*/
const $d715e0554b679f1f$var$DISMISSABLE_LAYER_NAME = 'DismissableLayer';
const $d715e0554b679f1f$var$CONTEXT_UPDATE = 'dismissableLayer.update';
const $d715e0554b679f1f$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
const $d715e0554b679f1f$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
let $d715e0554b679f1f$var$originalBodyPointerEvents;
const $d715e0554b679f1f$var$DismissableLayerContext = /*#__PURE__*/$g2vWm$react.createContext({
  layers: new Set(),
  layersWithOutsidePointerEventsDisabled: new Set(),
  branches: new Set()
});
const $d715e0554b679f1f$export$177fb62ff3ec1f22 = /*#__PURE__*/$g2vWm$react.forwardRef((props, forwardedRef) => {
  var _node$ownerDocument;
  const {
    disableOutsidePointerEvents = false,
    onEscapeKeyDown: onEscapeKeyDown,
    onPointerDownOutside: onPointerDownOutside,
    onFocusOutside: onFocusOutside,
    onInteractOutside: onInteractOutside,
    onDismiss: onDismiss,
    ...layerProps
  } = props;
  const context = $g2vWm$react.useContext($d715e0554b679f1f$var$DismissableLayerContext);
  const [node1, setNode] = $g2vWm$react.useState(null);
  const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
  const [, force] = $g2vWm$react.useState({});
  const composedRefs = $g2vWm$radixuireactcomposerefs.useComposedRefs(forwardedRef, node => setNode(node));
  const layers = Array.from(context.layers);
  const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1); // prettier-ignore
  const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore
  const index = node1 ? layers.indexOf(node1) : -1;
  const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
  const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
  const pointerDownOutside = $d715e0554b679f1f$var$usePointerDownOutside(event => {
    const target = event.target;
    const isPointerDownOnBranch = [...context.branches].some(branch => branch.contains(target));
    if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
    onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
    onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
    if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
  }, ownerDocument);
  const focusOutside = $d715e0554b679f1f$var$useFocusOutside(event => {
    const target = event.target;
    const isFocusInBranch = [...context.branches].some(branch => branch.contains(target));
    if (isFocusInBranch) return;
    onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
    onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
    if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
  }, ownerDocument);
  $g2vWm$radixuireactuseescapekeydown.useEscapeKeydown(event => {
    const isHighestLayer = index === context.layers.size - 1;
    if (!isHighestLayer) return;
    onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
    if (!event.defaultPrevented && onDismiss) {
      event.preventDefault();
      onDismiss();
    }
  }, ownerDocument);
  $g2vWm$react.useEffect(() => {
    if (!node1) return;
    if (disableOutsidePointerEvents) {
      if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
        $d715e0554b679f1f$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
        ownerDocument.body.style.pointerEvents = 'none';
      }
      context.layersWithOutsidePointerEventsDisabled.add(node1);
    }
    context.layers.add(node1);
    $d715e0554b679f1f$var$dispatchUpdate();
    return () => {
      if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $d715e0554b679f1f$var$originalBodyPointerEvents;
    };
  }, [node1, ownerDocument, disableOutsidePointerEvents, context]);
  /**
  * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect
  * because a change to `disableOutsidePointerEvents` would remove this layer from the stack
  * and add it to the end again so the layering order wouldn't be _creation order_.
  * We only want them to be removed from context stacks when unmounted.
  */
  $g2vWm$react.useEffect(() => {
    return () => {
      if (!node1) return;
      context.layers.delete(node1);
      context.layersWithOutsidePointerEventsDisabled.delete(node1);
      $d715e0554b679f1f$var$dispatchUpdate();
    };
  }, [node1, context]);
  $g2vWm$react.useEffect(() => {
    const handleUpdate = () => force({});
    document.addEventListener($d715e0554b679f1f$var$CONTEXT_UPDATE, handleUpdate);
    return () => document.removeEventListener($d715e0554b679f1f$var$CONTEXT_UPDATE, handleUpdate);
  }, []);
  return /*#__PURE__*/$g2vWm$react.createElement($g2vWm$radixuireactprimitive.Primitive.div, $parcel$interopDefault($g2vWm$babelruntimehelpersextends)({}, layerProps, {
    ref: composedRefs,
    style: {
      pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
      ...props.style
    },
    onFocusCapture: $g2vWm$radixuiprimitive.composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
    onBlurCapture: $g2vWm$radixuiprimitive.composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
    onPointerDownCapture: $g2vWm$radixuiprimitive.composeEventHandlers(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
  }));
});
/*#__PURE__*/
Object.assign($d715e0554b679f1f$export$177fb62ff3ec1f22, {
  displayName: $d715e0554b679f1f$var$DISMISSABLE_LAYER_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DismissableLayerBranch
 * -----------------------------------------------------------------------------------------------*/
const $d715e0554b679f1f$var$BRANCH_NAME = 'DismissableLayerBranch';
const $d715e0554b679f1f$export$4d5eb2109db14228 = /*#__PURE__*/$g2vWm$react.forwardRef((props, forwardedRef) => {
  const context = $g2vWm$react.useContext($d715e0554b679f1f$var$DismissableLayerContext);
  const ref = $g2vWm$react.useRef(null);
  const composedRefs = $g2vWm$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
  $g2vWm$react.useEffect(() => {
    const node = ref.current;
    if (node) {
      context.branches.add(node);
      return () => {
        context.branches.delete(node);
      };
    }
  }, [context.branches]);
  return /*#__PURE__*/$g2vWm$react.createElement($g2vWm$radixuireactprimitive.Primitive.div, $parcel$interopDefault($g2vWm$babelruntimehelpersextends)({}, props, {
    ref: composedRefs
  }));
});
/*#__PURE__*/
Object.assign($d715e0554b679f1f$export$4d5eb2109db14228, {
  displayName: $d715e0554b679f1f$var$BRANCH_NAME
});
/* -----------------------------------------------------------------------------------------------*/ /**
                                                                                                     * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`
                                                                                                     * to mimic layer dismissing behaviour present in OS.
                                                                                                     * Returns props to pass to the node we want to check for outside events.
                                                                                                     */
function $d715e0554b679f1f$var$usePointerDownOutside(onPointerDownOutside) {
  let ownerDocument = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
  const handlePointerDownOutside = $g2vWm$radixuireactusecallbackref.useCallbackRef(onPointerDownOutside);
  const isPointerInsideReactTreeRef = $g2vWm$react.useRef(false);
  const handleClickRef = $g2vWm$react.useRef(() => {});
  $g2vWm$react.useEffect(() => {
    const handlePointerDown = event => {
      if (event.target && !isPointerInsideReactTreeRef.current) {
        const eventDetail = {
          originalEvent: event
        };
        function handleAndDispatchPointerDownOutsideEvent() {
          $d715e0554b679f1f$var$handleAndDispatchCustomEvent($d715e0554b679f1f$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
            discrete: true
          });
        }
        /**
        * On touch devices, we need to wait for a click event because browsers implement
        * a ~350ms delay between the time the user stops touching the display and when the
        * browser executres events. We need to ensure we don't reactivate pointer-events within
        * this timeframe otherwise the browser may execute events that should have been prevented.
        *
        * Additionally, this also lets us deal automatically with cancellations when a click event
        * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.
        *
        * This is why we also continuously remove the previous listener, because we cannot be
        * certain that it was raised, and therefore cleaned-up.
        */
        if (event.pointerType === 'touch') {
          ownerDocument.removeEventListener('click', handleClickRef.current);
          handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
          ownerDocument.addEventListener('click', handleClickRef.current, {
            once: true
          });
        } else handleAndDispatchPointerDownOutsideEvent();
      }
      isPointerInsideReactTreeRef.current = false;
    };
    /**
    * if this hook executes in a component that mounts via a `pointerdown` event, the event
    * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid
    * this by delaying the event listener registration on the document.
    * This is not React specific, but rather how the DOM works, ie:
    * ```
    * button.addEventListener('pointerdown', () => {
    *   console.log('I will log');
    *   document.addEventListener('pointerdown', () => {
    *     console.log('I will also log');
    *   })
    * });
    */
    const timerId = window.setTimeout(() => {
      ownerDocument.addEventListener('pointerdown', handlePointerDown);
    }, 0);
    return () => {
      window.clearTimeout(timerId);
      ownerDocument.removeEventListener('pointerdown', handlePointerDown);
      ownerDocument.removeEventListener('click', handleClickRef.current);
    };
  }, [ownerDocument, handlePointerDownOutside]);
  return {
    // ensures we check React component tree (not just DOM tree)
    onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
  };
}
/**
 * Listens for when focus happens outside a react subtree.
 * Returns props to pass to the root (node) of the subtree we want to check.
 */
function $d715e0554b679f1f$var$useFocusOutside(onFocusOutside) {
  let ownerDocument = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
  const handleFocusOutside = $g2vWm$radixuireactusecallbackref.useCallbackRef(onFocusOutside);
  const isFocusInsideReactTreeRef = $g2vWm$react.useRef(false);
  $g2vWm$react.useEffect(() => {
    const handleFocus = event => {
      if (event.target && !isFocusInsideReactTreeRef.current) {
        const eventDetail = {
          originalEvent: event
        };
        $d715e0554b679f1f$var$handleAndDispatchCustomEvent($d715e0554b679f1f$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
          discrete: false
        });
      }
    };
    ownerDocument.addEventListener('focusin', handleFocus);
    return () => ownerDocument.removeEventListener('focusin', handleFocus);
  }, [ownerDocument, handleFocusOutside]);
  return {
    onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
    onBlurCapture: () => isFocusInsideReactTreeRef.current = false
  };
}
function $d715e0554b679f1f$var$dispatchUpdate() {
  const event = new CustomEvent($d715e0554b679f1f$var$CONTEXT_UPDATE);
  document.dispatchEvent(event);
}
function $d715e0554b679f1f$var$handleAndDispatchCustomEvent(name, handler, detail, _ref) {
  let {
    discrete: discrete
  } = _ref;
  const target = detail.originalEvent.target;
  const event = new CustomEvent(name, {
    bubbles: false,
    cancelable: true,
    detail: detail
  });
  if (handler) target.addEventListener(name, handler, {
    once: true
  });
  if (discrete) $g2vWm$radixuireactprimitive.dispatchDiscreteCustomEvent(target, event);else target.dispatchEvent(event);
}
const $d715e0554b679f1f$export$be92b6f5f03c0fe9 = $d715e0554b679f1f$export$177fb62ff3ec1f22;
const $d715e0554b679f1f$export$aecb2ddcb55c95be = $d715e0554b679f1f$export$4d5eb2109db14228;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js":
/*!*************************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js ***!
  \*************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $7dQ7Q$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
var $7dQ7Q$react = __webpack_require__(/*! react */ "react");
var $7dQ7Q$radixuiprimitive = __webpack_require__(/*! @radix-ui/primitive */ "../../../node_modules/@radix-ui/primitive/dist/index.js");
var $7dQ7Q$radixuireactcomposerefs = __webpack_require__(/*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
var $7dQ7Q$radixuireactcontext = __webpack_require__(/*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
var $7dQ7Q$radixuireactusecontrollablestate = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ "../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js");
var $7dQ7Q$radixuireactprimitive = __webpack_require__(/*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
var $7dQ7Q$radixuireactmenu = __webpack_require__(/*! @radix-ui/react-menu */ "../../../node_modules/@radix-ui/react-menu/dist/index.js");
var $7dQ7Q$radixuireactid = __webpack_require__(/*! @radix-ui/react-id */ "../../../node_modules/@radix-ui/react-id/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "createDropdownMenuScope", () => $d1bf075a6b218014$export$c0623cd925aeb687);
$parcel$export(module.exports, "DropdownMenu", () => $d1bf075a6b218014$export$e44a253a59704894);
$parcel$export(module.exports, "DropdownMenuTrigger", () => $d1bf075a6b218014$export$d2469213b3befba9);
$parcel$export(module.exports, "DropdownMenuPortal", () => $d1bf075a6b218014$export$cd369b4d4d54efc9);
$parcel$export(module.exports, "DropdownMenuContent", () => $d1bf075a6b218014$export$6e76d93a37c01248);
$parcel$export(module.exports, "DropdownMenuGroup", () => $d1bf075a6b218014$export$246bebaba3a2f70e);
$parcel$export(module.exports, "DropdownMenuLabel", () => $d1bf075a6b218014$export$76e48c5b57f24495);
$parcel$export(module.exports, "DropdownMenuItem", () => $d1bf075a6b218014$export$ed97964d1871885d);
$parcel$export(module.exports, "DropdownMenuCheckboxItem", () => $d1bf075a6b218014$export$53a69729da201fa9);
$parcel$export(module.exports, "DropdownMenuRadioGroup", () => $d1bf075a6b218014$export$3323ad73d55f587e);
$parcel$export(module.exports, "DropdownMenuRadioItem", () => $d1bf075a6b218014$export$e4f69b41b1637536);
$parcel$export(module.exports, "DropdownMenuItemIndicator", () => $d1bf075a6b218014$export$42355ae145153fb6);
$parcel$export(module.exports, "DropdownMenuSeparator", () => $d1bf075a6b218014$export$da160178fd3bc7e9);
$parcel$export(module.exports, "DropdownMenuArrow", () => $d1bf075a6b218014$export$34b8980744021ec5);
$parcel$export(module.exports, "DropdownMenuSub", () => $d1bf075a6b218014$export$2f307d81a64f5442);
$parcel$export(module.exports, "DropdownMenuSubTrigger", () => $d1bf075a6b218014$export$21dcb7ec56f874cf);
$parcel$export(module.exports, "DropdownMenuSubContent", () => $d1bf075a6b218014$export$f34ec8bc2482cc5f);
$parcel$export(module.exports, "Root", () => $d1bf075a6b218014$export$be92b6f5f03c0fe9);
$parcel$export(module.exports, "Trigger", () => $d1bf075a6b218014$export$41fb9f06171c75f4);
$parcel$export(module.exports, "Portal", () => $d1bf075a6b218014$export$602eac185826482c);
$parcel$export(module.exports, "Content", () => $d1bf075a6b218014$export$7c6e2c02157bb7d2);
$parcel$export(module.exports, "Group", () => $d1bf075a6b218014$export$eb2fcfdbd7ba97d4);
$parcel$export(module.exports, "Label", () => $d1bf075a6b218014$export$b04be29aa201d4f5);
$parcel$export(module.exports, "Item", () => $d1bf075a6b218014$export$6d08773d2e66f8f2);
$parcel$export(module.exports, "CheckboxItem", () => $d1bf075a6b218014$export$16ce288f89fa631c);
$parcel$export(module.exports, "RadioGroup", () => $d1bf075a6b218014$export$a98f0dcb43a68a25);
$parcel$export(module.exports, "RadioItem", () => $d1bf075a6b218014$export$371ab307eab489c0);
$parcel$export(module.exports, "ItemIndicator", () => $d1bf075a6b218014$export$c3468e2714d175fa);
$parcel$export(module.exports, "Separator", () => $d1bf075a6b218014$export$1ff3c3f08ae963c0);
$parcel$export(module.exports, "Arrow", () => $d1bf075a6b218014$export$21b07c8f274aebd5);
$parcel$export(module.exports, "Sub", () => $d1bf075a6b218014$export$d7a01e11500dfb6f);
$parcel$export(module.exports, "SubTrigger", () => $d1bf075a6b218014$export$2ea8a7a591ac5eac);
$parcel$export(module.exports, "SubContent", () => $d1bf075a6b218014$export$6d4de93b380beddf);

/* -------------------------------------------------------------------------------------------------
 * DropdownMenu
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$DROPDOWN_MENU_NAME = 'DropdownMenu';
const [$d1bf075a6b218014$var$createDropdownMenuContext, $d1bf075a6b218014$export$c0623cd925aeb687] = $7dQ7Q$radixuireactcontext.createContextScope($d1bf075a6b218014$var$DROPDOWN_MENU_NAME, [$7dQ7Q$radixuireactmenu.createMenuScope]);
const $d1bf075a6b218014$var$useMenuScope = $7dQ7Q$radixuireactmenu.createMenuScope();
const [$d1bf075a6b218014$var$DropdownMenuProvider, $d1bf075a6b218014$var$useDropdownMenuContext] = $d1bf075a6b218014$var$createDropdownMenuContext($d1bf075a6b218014$var$DROPDOWN_MENU_NAME);
const $d1bf075a6b218014$export$e44a253a59704894 = props => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    children: children,
    dir: dir,
    open: openProp,
    defaultOpen: defaultOpen,
    onOpenChange: onOpenChange,
    modal = true
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  const triggerRef = $7dQ7Q$react.useRef(null);
  const [open = false, setOpen] = $7dQ7Q$radixuireactusecontrollablestate.useControllableState({
    prop: openProp,
    defaultProp: defaultOpen,
    onChange: onOpenChange
  });
  return /*#__PURE__*/$7dQ7Q$react.createElement($d1bf075a6b218014$var$DropdownMenuProvider, {
    scope: __scopeDropdownMenu,
    triggerId: $7dQ7Q$radixuireactid.useId(),
    triggerRef: triggerRef,
    contentId: $7dQ7Q$radixuireactid.useId(),
    open: open,
    onOpenChange: setOpen,
    onOpenToggle: $7dQ7Q$react.useCallback(() => setOpen(prevOpen => !prevOpen), [setOpen]),
    modal: modal
  }, /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Root, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, {
    open: open,
    onOpenChange: setOpen,
    dir: dir,
    modal: modal
  }), children));
};
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$e44a253a59704894, {
  displayName: $d1bf075a6b218014$var$DROPDOWN_MENU_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuTrigger
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$TRIGGER_NAME = 'DropdownMenuTrigger';
const $d1bf075a6b218014$export$d2469213b3befba9 = /*#__PURE__*/$7dQ7Q$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    disabled = false,
    ...triggerProps
  } = props;
  const context = $d1bf075a6b218014$var$useDropdownMenuContext($d1bf075a6b218014$var$TRIGGER_NAME, __scopeDropdownMenu);
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Anchor, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({
    asChild: true
  }, menuScope), /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactprimitive.Primitive.button, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({
    type: "button",
    id: context.triggerId,
    "aria-haspopup": "menu",
    "aria-expanded": context.open,
    "aria-controls": context.open ? context.contentId : undefined,
    "data-state": context.open ? 'open' : 'closed',
    "data-disabled": disabled ? '' : undefined,
    disabled: disabled
  }, triggerProps, {
    ref: $7dQ7Q$radixuireactcomposerefs.composeRefs(forwardedRef, context.triggerRef),
    onPointerDown: $7dQ7Q$radixuiprimitive.composeEventHandlers(props.onPointerDown, event => {
      // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
      // but not when the control key is pressed (avoiding MacOS right click)
      if (!disabled && event.button === 0 && event.ctrlKey === false) {
        context.onOpenToggle(); // prevent trigger focusing when opening
        // this allows the content to be given focus without competition
        if (!context.open) event.preventDefault();
      }
    }),
    onKeyDown: $7dQ7Q$radixuiprimitive.composeEventHandlers(props.onKeyDown, event => {
      if (disabled) return;
      if (['Enter', ' '].includes(event.key)) context.onOpenToggle();
      if (event.key === 'ArrowDown') context.onOpenChange(true); // prevent keydown from scrolling window / first focused item to execute
      // that keydown (inadvertently closing the menu)
      if (['Enter', ' ', 'ArrowDown'].includes(event.key)) event.preventDefault();
    })
  })));
});
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$d2469213b3befba9, {
  displayName: $d1bf075a6b218014$var$TRIGGER_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuPortal
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$PORTAL_NAME = 'DropdownMenuPortal';
const $d1bf075a6b218014$export$cd369b4d4d54efc9 = props => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    ...portalProps
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Portal, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, portalProps));
};
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$cd369b4d4d54efc9, {
  displayName: $d1bf075a6b218014$var$PORTAL_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuContent
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$CONTENT_NAME = 'DropdownMenuContent';
const $d1bf075a6b218014$export$6e76d93a37c01248 = /*#__PURE__*/$7dQ7Q$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    ...contentProps
  } = props;
  const context = $d1bf075a6b218014$var$useDropdownMenuContext($d1bf075a6b218014$var$CONTENT_NAME, __scopeDropdownMenu);
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  const hasInteractedOutsideRef = $7dQ7Q$react.useRef(false);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Content, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({
    id: context.contentId,
    "aria-labelledby": context.triggerId
  }, menuScope, contentProps, {
    ref: forwardedRef,
    onCloseAutoFocus: $7dQ7Q$radixuiprimitive.composeEventHandlers(props.onCloseAutoFocus, event => {
      var _context$triggerRef$c;
      if (!hasInteractedOutsideRef.current) (_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();
      hasInteractedOutsideRef.current = false; // Always prevent auto focus because we either focus manually or want user agent focus
      event.preventDefault();
    }),
    onInteractOutside: $7dQ7Q$radixuiprimitive.composeEventHandlers(props.onInteractOutside, event => {
      const originalEvent = event.detail.originalEvent;
      const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
      const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
      if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;
    }),
    style: {
      ...props.style,
      '--radix-dropdown-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',
      '--radix-dropdown-menu-content-available-width': 'var(--radix-popper-available-width)',
      '--radix-dropdown-menu-content-available-height': 'var(--radix-popper-available-height)',
      '--radix-dropdown-menu-trigger-width': 'var(--radix-popper-anchor-width)',
      '--radix-dropdown-menu-trigger-height': 'var(--radix-popper-anchor-height)'
    }
  }));
});
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$6e76d93a37c01248, {
  displayName: $d1bf075a6b218014$var$CONTENT_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuGroup
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$GROUP_NAME = 'DropdownMenuGroup';
const $d1bf075a6b218014$export$246bebaba3a2f70e = /*#__PURE__*/$7dQ7Q$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    ...groupProps
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Group, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, groupProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$246bebaba3a2f70e, {
  displayName: $d1bf075a6b218014$var$GROUP_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuLabel
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$LABEL_NAME = 'DropdownMenuLabel';
const $d1bf075a6b218014$export$76e48c5b57f24495 = /*#__PURE__*/$7dQ7Q$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    ...labelProps
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Label, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, labelProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$76e48c5b57f24495, {
  displayName: $d1bf075a6b218014$var$LABEL_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuItem
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$ITEM_NAME = 'DropdownMenuItem';
const $d1bf075a6b218014$export$ed97964d1871885d = /*#__PURE__*/$7dQ7Q$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    ...itemProps
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Item, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, itemProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$ed97964d1871885d, {
  displayName: $d1bf075a6b218014$var$ITEM_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuCheckboxItem
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';
const $d1bf075a6b218014$export$53a69729da201fa9 = /*#__PURE__*/$7dQ7Q$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    ...checkboxItemProps
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.CheckboxItem, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, checkboxItemProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$53a69729da201fa9, {
  displayName: $d1bf075a6b218014$var$CHECKBOX_ITEM_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuRadioGroup
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$RADIO_GROUP_NAME = 'DropdownMenuRadioGroup';
const $d1bf075a6b218014$export$3323ad73d55f587e = /*#__PURE__*/$7dQ7Q$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    ...radioGroupProps
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.RadioGroup, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, radioGroupProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$3323ad73d55f587e, {
  displayName: $d1bf075a6b218014$var$RADIO_GROUP_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuRadioItem
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$RADIO_ITEM_NAME = 'DropdownMenuRadioItem';
const $d1bf075a6b218014$export$e4f69b41b1637536 = /*#__PURE__*/$7dQ7Q$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    ...radioItemProps
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.RadioItem, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, radioItemProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$e4f69b41b1637536, {
  displayName: $d1bf075a6b218014$var$RADIO_ITEM_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuItemIndicator
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$INDICATOR_NAME = 'DropdownMenuItemIndicator';
const $d1bf075a6b218014$export$42355ae145153fb6 = /*#__PURE__*/$7dQ7Q$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    ...itemIndicatorProps
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.ItemIndicator, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, itemIndicatorProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$42355ae145153fb6, {
  displayName: $d1bf075a6b218014$var$INDICATOR_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuSeparator
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$SEPARATOR_NAME = 'DropdownMenuSeparator';
const $d1bf075a6b218014$export$da160178fd3bc7e9 = /*#__PURE__*/$7dQ7Q$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    ...separatorProps
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Separator, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, separatorProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$da160178fd3bc7e9, {
  displayName: $d1bf075a6b218014$var$SEPARATOR_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuArrow
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$ARROW_NAME = 'DropdownMenuArrow';
const $d1bf075a6b218014$export$34b8980744021ec5 = /*#__PURE__*/$7dQ7Q$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    ...arrowProps
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Arrow, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, arrowProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$34b8980744021ec5, {
  displayName: $d1bf075a6b218014$var$ARROW_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuSub
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$export$2f307d81a64f5442 = props => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    children: children,
    open: openProp,
    onOpenChange: onOpenChange,
    defaultOpen: defaultOpen
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  const [open = false, setOpen] = $7dQ7Q$radixuireactusecontrollablestate.useControllableState({
    prop: openProp,
    defaultProp: defaultOpen,
    onChange: onOpenChange
  });
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Sub, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, {
    open: open,
    onOpenChange: setOpen
  }), children);
};
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuSubTrigger
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$SUB_TRIGGER_NAME = 'DropdownMenuSubTrigger';
const $d1bf075a6b218014$export$21dcb7ec56f874cf = /*#__PURE__*/$7dQ7Q$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    ...subTriggerProps
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.SubTrigger, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, subTriggerProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$21dcb7ec56f874cf, {
  displayName: $d1bf075a6b218014$var$SUB_TRIGGER_NAME
});
/* -------------------------------------------------------------------------------------------------
 * DropdownMenuSubContent
 * -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$var$SUB_CONTENT_NAME = 'DropdownMenuSubContent';
const $d1bf075a6b218014$export$f34ec8bc2482cc5f = /*#__PURE__*/$7dQ7Q$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeDropdownMenu: __scopeDropdownMenu,
    ...subContentProps
  } = props;
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
  return /*#__PURE__*/$7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.SubContent, $parcel$interopDefault($7dQ7Q$babelruntimehelpersextends)({}, menuScope, subContentProps, {
    ref: forwardedRef,
    style: {
      ...props.style,
      '--radix-dropdown-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',
      '--radix-dropdown-menu-content-available-width': 'var(--radix-popper-available-width)',
      '--radix-dropdown-menu-content-available-height': 'var(--radix-popper-available-height)',
      '--radix-dropdown-menu-trigger-width': 'var(--radix-popper-anchor-width)',
      '--radix-dropdown-menu-trigger-height': 'var(--radix-popper-anchor-height)'
    }
  }));
});
/*#__PURE__*/
Object.assign($d1bf075a6b218014$export$f34ec8bc2482cc5f, {
  displayName: $d1bf075a6b218014$var$SUB_CONTENT_NAME
});
/* -----------------------------------------------------------------------------------------------*/
const $d1bf075a6b218014$export$be92b6f5f03c0fe9 = $d1bf075a6b218014$export$e44a253a59704894;
const $d1bf075a6b218014$export$41fb9f06171c75f4 = $d1bf075a6b218014$export$d2469213b3befba9;
const $d1bf075a6b218014$export$602eac185826482c = $d1bf075a6b218014$export$cd369b4d4d54efc9;
const $d1bf075a6b218014$export$7c6e2c02157bb7d2 = $d1bf075a6b218014$export$6e76d93a37c01248;
const $d1bf075a6b218014$export$eb2fcfdbd7ba97d4 = $d1bf075a6b218014$export$246bebaba3a2f70e;
const $d1bf075a6b218014$export$b04be29aa201d4f5 = $d1bf075a6b218014$export$76e48c5b57f24495;
const $d1bf075a6b218014$export$6d08773d2e66f8f2 = $d1bf075a6b218014$export$ed97964d1871885d;
const $d1bf075a6b218014$export$16ce288f89fa631c = $d1bf075a6b218014$export$53a69729da201fa9;
const $d1bf075a6b218014$export$a98f0dcb43a68a25 = $d1bf075a6b218014$export$3323ad73d55f587e;
const $d1bf075a6b218014$export$371ab307eab489c0 = $d1bf075a6b218014$export$e4f69b41b1637536;
const $d1bf075a6b218014$export$c3468e2714d175fa = $d1bf075a6b218014$export$42355ae145153fb6;
const $d1bf075a6b218014$export$1ff3c3f08ae963c0 = $d1bf075a6b218014$export$da160178fd3bc7e9;
const $d1bf075a6b218014$export$21b07c8f274aebd5 = $d1bf075a6b218014$export$34b8980744021ec5;
const $d1bf075a6b218014$export$d7a01e11500dfb6f = $d1bf075a6b218014$export$2f307d81a64f5442;
const $d1bf075a6b218014$export$2ea8a7a591ac5eac = $d1bf075a6b218014$export$21dcb7ec56f874cf;
const $d1bf075a6b218014$export$6d4de93b380beddf = $d1bf075a6b218014$export$f34ec8bc2482cc5f;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-focus-guards/dist/index.js":
/*!************************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-focus-guards/dist/index.js ***!
  \************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $cnctE$react = __webpack_require__(/*! react */ "react");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
$parcel$export(module.exports, "FocusGuards", () => $71476a6ed7dbbaf3$export$ac5b58043b79449b);
$parcel$export(module.exports, "Root", () => $71476a6ed7dbbaf3$export$be92b6f5f03c0fe9);
$parcel$export(module.exports, "useFocusGuards", () => $71476a6ed7dbbaf3$export$b7ece24a22aeda8c);

/** Number of components which have requested interest to have focus guards */
let $71476a6ed7dbbaf3$var$count = 0;
function $71476a6ed7dbbaf3$export$ac5b58043b79449b(props) {
  $71476a6ed7dbbaf3$export$b7ece24a22aeda8c();
  return props.children;
}
/**
 * Injects a pair of focus guards at the edges of the whole DOM tree
 * to ensure `focusin` & `focusout` events can be caught consistently.
 */
function $71476a6ed7dbbaf3$export$b7ece24a22aeda8c() {
  $cnctE$react.useEffect(() => {
    var _edgeGuards$, _edgeGuards$2;
    const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');
    document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $71476a6ed7dbbaf3$var$createFocusGuard());
    document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $71476a6ed7dbbaf3$var$createFocusGuard());
    $71476a6ed7dbbaf3$var$count++;
    return () => {
      if ($71476a6ed7dbbaf3$var$count === 1) document.querySelectorAll('[data-radix-focus-guard]').forEach(node => node.remove());
      $71476a6ed7dbbaf3$var$count--;
    };
  }, []);
}
function $71476a6ed7dbbaf3$var$createFocusGuard() {
  const element = document.createElement('span');
  element.setAttribute('data-radix-focus-guard', '');
  element.tabIndex = 0;
  element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';
  return element;
}
const $71476a6ed7dbbaf3$export$be92b6f5f03c0fe9 = $71476a6ed7dbbaf3$export$ac5b58043b79449b;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-focus-scope/dist/index.js":
/*!***********************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-focus-scope/dist/index.js ***!
  \***********************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $buum9$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
var $buum9$react = __webpack_require__(/*! react */ "react");
var $buum9$radixuireactcomposerefs = __webpack_require__(/*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
var $buum9$radixuireactprimitive = __webpack_require__(/*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
var $buum9$radixuireactusecallbackref = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "FocusScope", () => $2bc01e66e04aa9ed$export$20e40289641fbbb6);
$parcel$export(module.exports, "Root", () => $2bc01e66e04aa9ed$export$be92b6f5f03c0fe9);
const $2bc01e66e04aa9ed$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';
const $2bc01e66e04aa9ed$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';
const $2bc01e66e04aa9ed$var$EVENT_OPTIONS = {
  bubbles: false,
  cancelable: true
};
/* -------------------------------------------------------------------------------------------------
 * FocusScope
 * -----------------------------------------------------------------------------------------------*/
const $2bc01e66e04aa9ed$var$FOCUS_SCOPE_NAME = 'FocusScope';
const $2bc01e66e04aa9ed$export$20e40289641fbbb6 = /*#__PURE__*/$buum9$react.forwardRef((props, forwardedRef) => {
  const {
    loop = false,
    trapped = false,
    onMountAutoFocus: onMountAutoFocusProp,
    onUnmountAutoFocus: onUnmountAutoFocusProp,
    ...scopeProps
  } = props;
  const [container1, setContainer] = $buum9$react.useState(null);
  const onMountAutoFocus = $buum9$radixuireactusecallbackref.useCallbackRef(onMountAutoFocusProp);
  const onUnmountAutoFocus = $buum9$radixuireactusecallbackref.useCallbackRef(onUnmountAutoFocusProp);
  const lastFocusedElementRef = $buum9$react.useRef(null);
  const composedRefs = $buum9$radixuireactcomposerefs.useComposedRefs(forwardedRef, node => setContainer(node));
  const focusScope = $buum9$react.useRef({
    paused: false,
    pause() {
      this.paused = true;
    },
    resume() {
      this.paused = false;
    }
  }).current; // Takes care of trapping focus if focus is moved outside programmatically for example
  $buum9$react.useEffect(() => {
    if (trapped) {
      function handleFocusIn(event) {
        if (focusScope.paused || !container1) return;
        const target = event.target;
        if (container1.contains(target)) lastFocusedElementRef.current = target;else $2bc01e66e04aa9ed$var$focus(lastFocusedElementRef.current, {
          select: true
        });
      }
      function handleFocusOut(event) {
        if (focusScope.paused || !container1) return;
        const relatedTarget = event.relatedTarget; // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:
        //
        // 1. When the user switches app/tabs/windows/the browser itself loses focus.
        // 2. In Google Chrome, when the focused element is removed from the DOM.
        //
        // We let the browser do its thing here because:
        //
        // 1. The browser already keeps a memory of what's focused for when the page gets refocused.
        // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it
        //    throws the CPU to 100%, so we avoid doing anything for this reason here too.
        if (relatedTarget === null) return; // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)
        // that is outside the container, we move focus to the last valid focused element inside.
        if (!container1.contains(relatedTarget)) $2bc01e66e04aa9ed$var$focus(lastFocusedElementRef.current, {
          select: true
        });
      } // When the focused element gets removed from the DOM, browsers move focus
      // back to the document.body. In this case, we move focus to the container
      // to keep focus trapped correctly.
      function handleMutations(mutations) {
        const focusedElement = document.activeElement;
        for (const mutation of mutations) {
          if (mutation.removedNodes.length > 0) {
            if (!(container1 !== null && container1 !== void 0 && container1.contains(focusedElement))) $2bc01e66e04aa9ed$var$focus(container1);
          }
        }
      }
      document.addEventListener('focusin', handleFocusIn);
      document.addEventListener('focusout', handleFocusOut);
      const mutationObserver = new MutationObserver(handleMutations);
      if (container1) mutationObserver.observe(container1, {
        childList: true,
        subtree: true
      });
      return () => {
        document.removeEventListener('focusin', handleFocusIn);
        document.removeEventListener('focusout', handleFocusOut);
        mutationObserver.disconnect();
      };
    }
  }, [trapped, container1, focusScope.paused]);
  $buum9$react.useEffect(() => {
    if (container1) {
      $2bc01e66e04aa9ed$var$focusScopesStack.add(focusScope);
      const previouslyFocusedElement = document.activeElement;
      const hasFocusedCandidate = container1.contains(previouslyFocusedElement);
      if (!hasFocusedCandidate) {
        const mountEvent = new CustomEvent($2bc01e66e04aa9ed$var$AUTOFOCUS_ON_MOUNT, $2bc01e66e04aa9ed$var$EVENT_OPTIONS);
        container1.addEventListener($2bc01e66e04aa9ed$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
        container1.dispatchEvent(mountEvent);
        if (!mountEvent.defaultPrevented) {
          $2bc01e66e04aa9ed$var$focusFirst($2bc01e66e04aa9ed$var$removeLinks($2bc01e66e04aa9ed$var$getTabbableCandidates(container1)), {
            select: true
          });
          if (document.activeElement === previouslyFocusedElement) $2bc01e66e04aa9ed$var$focus(container1);
        }
      }
      return () => {
        container1.removeEventListener($2bc01e66e04aa9ed$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount.
        // We need to delay the focus a little to get around it for now.
        // See: https://github.com/facebook/react/issues/17894
        setTimeout(() => {
          const unmountEvent = new CustomEvent($2bc01e66e04aa9ed$var$AUTOFOCUS_ON_UNMOUNT, $2bc01e66e04aa9ed$var$EVENT_OPTIONS);
          container1.addEventListener($2bc01e66e04aa9ed$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
          container1.dispatchEvent(unmountEvent);
          if (!unmountEvent.defaultPrevented) $2bc01e66e04aa9ed$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {
            select: true
          });
          // we need to remove the listener after we `dispatchEvent`
          container1.removeEventListener($2bc01e66e04aa9ed$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
          $2bc01e66e04aa9ed$var$focusScopesStack.remove(focusScope);
        }, 0);
      };
    }
  }, [container1, onMountAutoFocus, onUnmountAutoFocus, focusScope]); // Takes care of looping focus (when tabbing whilst at the edges)
  const handleKeyDown = $buum9$react.useCallback(event => {
    if (!loop && !trapped) return;
    if (focusScope.paused) return;
    const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;
    const focusedElement = document.activeElement;
    if (isTabKey && focusedElement) {
      const container = event.currentTarget;
      const [first, last] = $2bc01e66e04aa9ed$var$getTabbableEdges(container);
      const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges
      if (!hasTabbableElementsInside) {
        if (focusedElement === container) event.preventDefault();
      } else {
        if (!event.shiftKey && focusedElement === last) {
          event.preventDefault();
          if (loop) $2bc01e66e04aa9ed$var$focus(first, {
            select: true
          });
        } else if (event.shiftKey && focusedElement === first) {
          event.preventDefault();
          if (loop) $2bc01e66e04aa9ed$var$focus(last, {
            select: true
          });
        }
      }
    }
  }, [loop, trapped, focusScope.paused]);
  return /*#__PURE__*/$buum9$react.createElement($buum9$radixuireactprimitive.Primitive.div, $parcel$interopDefault($buum9$babelruntimehelpersextends)({
    tabIndex: -1
  }, scopeProps, {
    ref: composedRefs,
    onKeyDown: handleKeyDown
  }));
});
/*#__PURE__*/
Object.assign($2bc01e66e04aa9ed$export$20e40289641fbbb6, {
  displayName: $2bc01e66e04aa9ed$var$FOCUS_SCOPE_NAME
});
/* -------------------------------------------------------------------------------------------------
 * Utils
 * -----------------------------------------------------------------------------------------------*/ /**
                                                                                                     * Attempts focusing the first element in a list of candidates.
                                                                                                     * Stops when focus has actually moved.
                                                                                                     */
function $2bc01e66e04aa9ed$var$focusFirst(candidates) {
  let {
    select = false
  } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  const previouslyFocusedElement = document.activeElement;
  for (const candidate of candidates) {
    $2bc01e66e04aa9ed$var$focus(candidate, {
      select: select
    });
    if (document.activeElement !== previouslyFocusedElement) return;
  }
}
/**
 * Returns the first and last tabbable elements inside a container.
 */
function $2bc01e66e04aa9ed$var$getTabbableEdges(container) {
  const candidates = $2bc01e66e04aa9ed$var$getTabbableCandidates(container);
  const first = $2bc01e66e04aa9ed$var$findVisible(candidates, container);
  const last = $2bc01e66e04aa9ed$var$findVisible(candidates.reverse(), container);
  return [first, last];
}
/**
 * Returns a list of potential tabbable candidates.
 *
 * NOTE: This is only a close approximation. For example it doesn't take into account cases like when
 * elements are not visible. This cannot be worked out easily by just reading a property, but rather
 * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.
 *
 * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
 * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1
 */
function $2bc01e66e04aa9ed$var$getTabbableCandidates(container) {
  const nodes = [];
  const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
    acceptNode: node => {
      const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';
      if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the
      // runtime's understanding of tabbability, so this automatically accounts
      // for any kind of element that could be tabbed to.
      return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  while (walker.nextNode()) nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it
  // hinders accessibility to have tab order different from visual order.
  return nodes;
}
/**
 * Returns the first visible element in a list.
 * NOTE: Only checks visibility up to the `container`.
 */
function $2bc01e66e04aa9ed$var$findVisible(elements, container) {
  for (const element of elements) {
    // we stop checking if it's hidden at the `container` level (excluding)
    if (!$2bc01e66e04aa9ed$var$isHidden(element, {
      upTo: container
    })) return element;
  }
}
function $2bc01e66e04aa9ed$var$isHidden(node, _ref) {
  let {
    upTo: upTo
  } = _ref;
  if (getComputedStyle(node).visibility === 'hidden') return true;
  while (node) {
    // we stop at `upTo` (excluding it)
    if (upTo !== undefined && node === upTo) return false;
    if (getComputedStyle(node).display === 'none') return true;
    node = node.parentElement;
  }
  return false;
}
function $2bc01e66e04aa9ed$var$isSelectableInput(element) {
  return element instanceof HTMLInputElement && 'select' in element;
}
function $2bc01e66e04aa9ed$var$focus(element) {
  let {
    select = false
  } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  // only focus if that element is focusable
  if (element && element.focus) {
    const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users
    element.focus({
      preventScroll: true
    }); // only select if its not the same element, it supports selection and we need to select
    if (element !== previouslyFocusedElement && $2bc01e66e04aa9ed$var$isSelectableInput(element) && select) element.select();
  }
}
/* -------------------------------------------------------------------------------------------------
 * FocusScope stack
 * -----------------------------------------------------------------------------------------------*/
const $2bc01e66e04aa9ed$var$focusScopesStack = $2bc01e66e04aa9ed$var$createFocusScopesStack();
function $2bc01e66e04aa9ed$var$createFocusScopesStack() {
  /** A stack of focus scopes, with the active one at the top */let stack = [];
  return {
    add(focusScope) {
      // pause the currently active focus scope (at the top of the stack)
      const activeFocusScope = stack[0];
      if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();
      // remove in case it already exists (because we'll re-add it at the top of the stack)
      stack = $2bc01e66e04aa9ed$var$arrayRemove(stack, focusScope);
      stack.unshift(focusScope);
    },
    remove(focusScope) {
      var _stack$;
      stack = $2bc01e66e04aa9ed$var$arrayRemove(stack, focusScope);
      (_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();
    }
  };
}
function $2bc01e66e04aa9ed$var$arrayRemove(array, item) {
  const updatedArray = [...array];
  const index = updatedArray.indexOf(item);
  if (index !== -1) updatedArray.splice(index, 1);
  return updatedArray;
}
function $2bc01e66e04aa9ed$var$removeLinks(items) {
  return items.filter(item => item.tagName !== 'A');
}
const $2bc01e66e04aa9ed$export$be92b6f5f03c0fe9 = $2bc01e66e04aa9ed$export$20e40289641fbbb6;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-id/dist/index.js":
/*!**************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-id/dist/index.js ***!
  \**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $47woD$react = __webpack_require__(/*! react */ "react");
var $47woD$radixuireactuselayouteffect = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ "../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
$parcel$export(module.exports, "useId", () => $dc478e4659f630c5$export$f680877a34711e37);
const $dc478e4659f630c5$var$useReactId = $47woD$react['useId'.toString()] || (() => undefined);
let $dc478e4659f630c5$var$count = 0;
function $dc478e4659f630c5$export$f680877a34711e37(deterministicId) {
  const [id, setId] = $47woD$react.useState($dc478e4659f630c5$var$useReactId()); // React versions older than 18 will have client-side ids only.
  $47woD$radixuireactuselayouteffect.useLayoutEffect(() => {
    if (!deterministicId) setId(reactId => reactId !== null && reactId !== void 0 ? reactId : String($dc478e4659f630c5$var$count++));
  }, [deterministicId]);
  return deterministicId || (id ? `radix-${id}` : '');
}

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-menu/dist/index.js":
/*!****************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-menu/dist/index.js ***!
  \****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $cnSS2$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
var $cnSS2$react = __webpack_require__(/*! react */ "react");
var $cnSS2$radixuiprimitive = __webpack_require__(/*! @radix-ui/primitive */ "../../../node_modules/@radix-ui/primitive/dist/index.js");
var $cnSS2$radixuireactcollection = __webpack_require__(/*! @radix-ui/react-collection */ "../../../node_modules/@radix-ui/react-collection/dist/index.js");
var $cnSS2$radixuireactcomposerefs = __webpack_require__(/*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
var $cnSS2$radixuireactcontext = __webpack_require__(/*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
var $cnSS2$radixuireactdirection = __webpack_require__(/*! @radix-ui/react-direction */ "../../../node_modules/@radix-ui/react-direction/dist/index.js");
var $cnSS2$radixuireactdismissablelayer = __webpack_require__(/*! @radix-ui/react-dismissable-layer */ "../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.js");
var $cnSS2$radixuireactfocusguards = __webpack_require__(/*! @radix-ui/react-focus-guards */ "../../../node_modules/@radix-ui/react-focus-guards/dist/index.js");
var $cnSS2$radixuireactfocusscope = __webpack_require__(/*! @radix-ui/react-focus-scope */ "../../../node_modules/@radix-ui/react-focus-scope/dist/index.js");
var $cnSS2$radixuireactid = __webpack_require__(/*! @radix-ui/react-id */ "../../../node_modules/@radix-ui/react-id/dist/index.js");
var $cnSS2$radixuireactpopper = __webpack_require__(/*! @radix-ui/react-popper */ "../../../node_modules/@radix-ui/react-popper/dist/index.js");
var $cnSS2$radixuireactportal = __webpack_require__(/*! @radix-ui/react-portal */ "../../../node_modules/@radix-ui/react-portal/dist/index.js");
var $cnSS2$radixuireactpresence = __webpack_require__(/*! @radix-ui/react-presence */ "../../../node_modules/@radix-ui/react-presence/dist/index.js");
var $cnSS2$radixuireactprimitive = __webpack_require__(/*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
var $cnSS2$radixuireactrovingfocus = __webpack_require__(/*! @radix-ui/react-roving-focus */ "../../../node_modules/@radix-ui/react-roving-focus/dist/index.js");
var $cnSS2$radixuireactslot = __webpack_require__(/*! @radix-ui/react-slot */ "../../../node_modules/@radix-ui/react-slot/dist/index.js");
var $cnSS2$radixuireactusecallbackref = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");
var $cnSS2$ariahidden = __webpack_require__(/*! aria-hidden */ "../../../node_modules/aria-hidden/dist/es2015/index.js");
var $cnSS2$reactremovescroll = __webpack_require__(/*! react-remove-scroll */ "../../../node_modules/react-remove-scroll/dist/es2015/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "createMenuScope", () => $213e4d2df823067d$export$4027731b685e72eb);
$parcel$export(module.exports, "Menu", () => $213e4d2df823067d$export$d9b273488cd8ce6f);
$parcel$export(module.exports, "MenuAnchor", () => $213e4d2df823067d$export$9fa5ebd18bee4d43);
$parcel$export(module.exports, "MenuPortal", () => $213e4d2df823067d$export$793392f970497feb);
$parcel$export(module.exports, "MenuContent", () => $213e4d2df823067d$export$479f0f2f71193efe);
$parcel$export(module.exports, "MenuGroup", () => $213e4d2df823067d$export$22a631d1f72787bb);
$parcel$export(module.exports, "MenuLabel", () => $213e4d2df823067d$export$dd37bec0e8a99143);
$parcel$export(module.exports, "MenuItem", () => $213e4d2df823067d$export$2ce376c2cc3355c8);
$parcel$export(module.exports, "MenuCheckboxItem", () => $213e4d2df823067d$export$f6f243521332502d);
$parcel$export(module.exports, "MenuRadioGroup", () => $213e4d2df823067d$export$ea2200c9eee416b3);
$parcel$export(module.exports, "MenuRadioItem", () => $213e4d2df823067d$export$69bd225e9817f6d0);
$parcel$export(module.exports, "MenuItemIndicator", () => $213e4d2df823067d$export$a2593e23056970a3);
$parcel$export(module.exports, "MenuSeparator", () => $213e4d2df823067d$export$1cec7dcdd713e220);
$parcel$export(module.exports, "MenuArrow", () => $213e4d2df823067d$export$bcdda4773debf5fa);
$parcel$export(module.exports, "MenuSub", () => $213e4d2df823067d$export$71bdb9d1e2909932);
$parcel$export(module.exports, "MenuSubTrigger", () => $213e4d2df823067d$export$5fbbb3ba7297405f);
$parcel$export(module.exports, "MenuSubContent", () => $213e4d2df823067d$export$e7142ab31822bde6);
$parcel$export(module.exports, "Root", () => $213e4d2df823067d$export$be92b6f5f03c0fe9);
$parcel$export(module.exports, "Anchor", () => $213e4d2df823067d$export$b688253958b8dfe7);
$parcel$export(module.exports, "Portal", () => $213e4d2df823067d$export$602eac185826482c);
$parcel$export(module.exports, "Content", () => $213e4d2df823067d$export$7c6e2c02157bb7d2);
$parcel$export(module.exports, "Group", () => $213e4d2df823067d$export$eb2fcfdbd7ba97d4);
$parcel$export(module.exports, "Label", () => $213e4d2df823067d$export$b04be29aa201d4f5);
$parcel$export(module.exports, "Item", () => $213e4d2df823067d$export$6d08773d2e66f8f2);
$parcel$export(module.exports, "CheckboxItem", () => $213e4d2df823067d$export$16ce288f89fa631c);
$parcel$export(module.exports, "RadioGroup", () => $213e4d2df823067d$export$a98f0dcb43a68a25);
$parcel$export(module.exports, "RadioItem", () => $213e4d2df823067d$export$371ab307eab489c0);
$parcel$export(module.exports, "ItemIndicator", () => $213e4d2df823067d$export$c3468e2714d175fa);
$parcel$export(module.exports, "Separator", () => $213e4d2df823067d$export$1ff3c3f08ae963c0);
$parcel$export(module.exports, "Arrow", () => $213e4d2df823067d$export$21b07c8f274aebd5);
$parcel$export(module.exports, "Sub", () => $213e4d2df823067d$export$d7a01e11500dfb6f);
$parcel$export(module.exports, "SubTrigger", () => $213e4d2df823067d$export$2ea8a7a591ac5eac);
$parcel$export(module.exports, "SubContent", () => $213e4d2df823067d$export$6d4de93b380beddf);
const $213e4d2df823067d$var$SELECTION_KEYS = ['Enter', ' '];
const $213e4d2df823067d$var$FIRST_KEYS = ['ArrowDown', 'PageUp', 'Home'];
const $213e4d2df823067d$var$LAST_KEYS = ['ArrowUp', 'PageDown', 'End'];
const $213e4d2df823067d$var$FIRST_LAST_KEYS = [...$213e4d2df823067d$var$FIRST_KEYS, ...$213e4d2df823067d$var$LAST_KEYS];
const $213e4d2df823067d$var$SUB_OPEN_KEYS = {
  ltr: [...$213e4d2df823067d$var$SELECTION_KEYS, 'ArrowRight'],
  rtl: [...$213e4d2df823067d$var$SELECTION_KEYS, 'ArrowLeft']
};
const $213e4d2df823067d$var$SUB_CLOSE_KEYS = {
  ltr: ['ArrowLeft'],
  rtl: ['ArrowRight']
};
/* -------------------------------------------------------------------------------------------------
 * Menu
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$MENU_NAME = 'Menu';
const [$213e4d2df823067d$var$Collection, $213e4d2df823067d$var$useCollection, $213e4d2df823067d$var$createCollectionScope] = $cnSS2$radixuireactcollection.createCollection($213e4d2df823067d$var$MENU_NAME);
const [$213e4d2df823067d$var$createMenuContext, $213e4d2df823067d$export$4027731b685e72eb] = $cnSS2$radixuireactcontext.createContextScope($213e4d2df823067d$var$MENU_NAME, [$213e4d2df823067d$var$createCollectionScope, $cnSS2$radixuireactpopper.createPopperScope, $cnSS2$radixuireactrovingfocus.createRovingFocusGroupScope]);
const $213e4d2df823067d$var$usePopperScope = $cnSS2$radixuireactpopper.createPopperScope();
const $213e4d2df823067d$var$useRovingFocusGroupScope = $cnSS2$radixuireactrovingfocus.createRovingFocusGroupScope();
const [$213e4d2df823067d$var$MenuProvider, $213e4d2df823067d$var$useMenuContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$MENU_NAME);
const [$213e4d2df823067d$var$MenuRootProvider, $213e4d2df823067d$var$useMenuRootContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$MENU_NAME);
const $213e4d2df823067d$export$d9b273488cd8ce6f = props => {
  const {
    __scopeMenu: __scopeMenu,
    open = false,
    children: children,
    dir: dir,
    onOpenChange: onOpenChange,
    modal = true
  } = props;
  const popperScope = $213e4d2df823067d$var$usePopperScope(__scopeMenu);
  const [content, setContent] = $cnSS2$react.useState(null);
  const isUsingKeyboardRef = $cnSS2$react.useRef(false);
  const handleOpenChange = $cnSS2$radixuireactusecallbackref.useCallbackRef(onOpenChange);
  const direction = $cnSS2$radixuireactdirection.useDirection(dir);
  $cnSS2$react.useEffect(() => {
    // Capture phase ensures we set the boolean before any side effects execute
    // in response to the key or pointer event as they might depend on this value.
    const handleKeyDown = () => {
      isUsingKeyboardRef.current = true;
      document.addEventListener('pointerdown', handlePointer, {
        capture: true,
        once: true
      });
      document.addEventListener('pointermove', handlePointer, {
        capture: true,
        once: true
      });
    };
    const handlePointer = () => isUsingKeyboardRef.current = false;
    document.addEventListener('keydown', handleKeyDown, {
      capture: true
    });
    return () => {
      document.removeEventListener('keydown', handleKeyDown, {
        capture: true
      });
      document.removeEventListener('pointerdown', handlePointer, {
        capture: true
      });
      document.removeEventListener('pointermove', handlePointer, {
        capture: true
      });
    };
  }, []);
  return /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactpopper.Root, popperScope, /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$MenuProvider, {
    scope: __scopeMenu,
    open: open,
    onOpenChange: handleOpenChange,
    content: content,
    onContentChange: setContent
  }, /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$MenuRootProvider, {
    scope: __scopeMenu,
    onClose: $cnSS2$react.useCallback(() => handleOpenChange(false), [handleOpenChange]),
    isUsingKeyboardRef: isUsingKeyboardRef,
    dir: direction,
    modal: modal
  }, children)));
};
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$d9b273488cd8ce6f, {
  displayName: $213e4d2df823067d$var$MENU_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuAnchor
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$ANCHOR_NAME = 'MenuAnchor';
const $213e4d2df823067d$export$9fa5ebd18bee4d43 = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeMenu: __scopeMenu,
    ...anchorProps
  } = props;
  const popperScope = $213e4d2df823067d$var$usePopperScope(__scopeMenu);
  return /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactpopper.Anchor, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, popperScope, anchorProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$9fa5ebd18bee4d43, {
  displayName: $213e4d2df823067d$var$ANCHOR_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuPortal
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$PORTAL_NAME = 'MenuPortal';
const [$213e4d2df823067d$var$PortalProvider, $213e4d2df823067d$var$usePortalContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$PORTAL_NAME, {
  forceMount: undefined
});
const $213e4d2df823067d$export$793392f970497feb = props => {
  const {
    __scopeMenu: __scopeMenu,
    forceMount: forceMount,
    children: children,
    container: container
  } = props;
  const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$PORTAL_NAME, __scopeMenu);
  return /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$PortalProvider, {
    scope: __scopeMenu,
    forceMount: forceMount
  }, /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactpresence.Presence, {
    present: forceMount || context.open
  }, /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactportal.Portal, {
    asChild: true,
    container: container
  }, children)));
};
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$793392f970497feb, {
  displayName: $213e4d2df823067d$var$PORTAL_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuContent
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$CONTENT_NAME = 'MenuContent';
const [$213e4d2df823067d$var$MenuContentProvider, $213e4d2df823067d$var$useMenuContentContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$CONTENT_NAME);
const $213e4d2df823067d$export$479f0f2f71193efe = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const portalContext = $213e4d2df823067d$var$usePortalContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
  const {
    forceMount = portalContext.forceMount,
    ...contentProps
  } = props;
  const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
  const rootContext = $213e4d2df823067d$var$useMenuRootContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
  return /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$Collection.Provider, {
    scope: props.__scopeMenu
  }, /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactpresence.Presence, {
    present: forceMount || context.open
  }, /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$Collection.Slot, {
    scope: props.__scopeMenu
  }, rootContext.modal ? /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$MenuRootContentModal, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, contentProps, {
    ref: forwardedRef
  })) : /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$MenuRootContentNonModal, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, contentProps, {
    ref: forwardedRef
  })))));
});
/* ---------------------------------------------------------------------------------------------- */
const $213e4d2df823067d$var$MenuRootContentModal = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
  const ref = $cnSS2$react.useRef(null);
  const composedRefs = $cnSS2$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref); // Hide everything from ARIA except the `MenuContent`
  $cnSS2$react.useEffect(() => {
    const content = ref.current;
    if (content) return $cnSS2$ariahidden.hideOthers(content);
  }, []);
  return /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$MenuContentImpl, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, props, {
    ref: composedRefs // we make sure we're not trapping once it's been closed
    ,

    trapFocus: context.open // make sure to only disable pointer events when open
    ,

    disableOutsidePointerEvents: context.open,
    disableOutsideScroll: true // When focus is trapped, a `focusout` event may still happen.
    ,

    onFocusOutside: $cnSS2$radixuiprimitive.composeEventHandlers(props.onFocusOutside, event => event.preventDefault(), {
      checkForDefaultPrevented: false
    }),
    onDismiss: () => context.onOpenChange(false)
  }));
});
const $213e4d2df823067d$var$MenuRootContentNonModal = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
  return /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$MenuContentImpl, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, props, {
    ref: forwardedRef,
    trapFocus: false,
    disableOutsidePointerEvents: false,
    disableOutsideScroll: false,
    onDismiss: () => context.onOpenChange(false)
  }));
});
/* ---------------------------------------------------------------------------------------------- */
const $213e4d2df823067d$var$MenuContentImpl = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeMenu: __scopeMenu,
    loop = false,
    trapFocus: trapFocus,
    onOpenAutoFocus: onOpenAutoFocus,
    onCloseAutoFocus: onCloseAutoFocus,
    disableOutsidePointerEvents: disableOutsidePointerEvents,
    onEntryFocus: onEntryFocus,
    onEscapeKeyDown: onEscapeKeyDown,
    onPointerDownOutside: onPointerDownOutside,
    onFocusOutside: onFocusOutside,
    onInteractOutside: onInteractOutside,
    onDismiss: onDismiss,
    disableOutsideScroll: disableOutsideScroll,
    ...contentProps
  } = props;
  const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$CONTENT_NAME, __scopeMenu);
  const rootContext = $213e4d2df823067d$var$useMenuRootContext($213e4d2df823067d$var$CONTENT_NAME, __scopeMenu);
  const popperScope = $213e4d2df823067d$var$usePopperScope(__scopeMenu);
  const rovingFocusGroupScope = $213e4d2df823067d$var$useRovingFocusGroupScope(__scopeMenu);
  const getItems = $213e4d2df823067d$var$useCollection(__scopeMenu);
  const [currentItemId, setCurrentItemId] = $cnSS2$react.useState(null);
  const contentRef = $cnSS2$react.useRef(null);
  const composedRefs = $cnSS2$radixuireactcomposerefs.useComposedRefs(forwardedRef, contentRef, context.onContentChange);
  const timerRef = $cnSS2$react.useRef(0);
  const searchRef = $cnSS2$react.useRef('');
  const pointerGraceTimerRef = $cnSS2$react.useRef(0);
  const pointerGraceIntentRef = $cnSS2$react.useRef(null);
  const pointerDirRef = $cnSS2$react.useRef('right');
  const lastPointerXRef = $cnSS2$react.useRef(0);
  const ScrollLockWrapper = disableOutsideScroll ? $cnSS2$reactremovescroll.RemoveScroll : $cnSS2$react.Fragment;
  const scrollLockWrapperProps = disableOutsideScroll ? {
    as: $cnSS2$radixuireactslot.Slot,
    allowPinchZoom: true
  } : undefined;
  const handleTypeaheadSearch = key => {
    var _items$find, _items$find2;
    const search = searchRef.current + key;
    const items = getItems().filter(item => !item.disabled);
    const currentItem = document.activeElement;
    const currentMatch = (_items$find = items.find(item => item.ref.current === currentItem)) === null || _items$find === void 0 ? void 0 : _items$find.textValue;
    const values = items.map(item => item.textValue);
    const nextMatch = $213e4d2df823067d$var$getNextMatch(values, search, currentMatch);
    const newItem = (_items$find2 = items.find(item => item.textValue === nextMatch)) === null || _items$find2 === void 0 ? void 0 : _items$find2.ref.current; // Reset `searchRef` 1 second after it was last updated
    (function updateSearch(value) {
      searchRef.current = value;
      window.clearTimeout(timerRef.current);
      if (value !== '') timerRef.current = window.setTimeout(() => updateSearch(''), 1000);
    })(search);
    if (newItem)
      /**
      * Imperative focus during keydown is risky so we prevent React's batching updates
      * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332
      */
      setTimeout(() => newItem.focus());
  };
  $cnSS2$react.useEffect(() => {
    return () => window.clearTimeout(timerRef.current);
  }, []); // Make sure the whole tree has focus guards as our `MenuContent` may be
  // the last element in the DOM (beacuse of the `Portal`)
  $cnSS2$radixuireactfocusguards.useFocusGuards();
  const isPointerMovingToSubmenu = $cnSS2$react.useCallback(event => {
    var _pointerGraceIntentRe, _pointerGraceIntentRe2;
    const isMovingTowards = pointerDirRef.current === ((_pointerGraceIntentRe = pointerGraceIntentRef.current) === null || _pointerGraceIntentRe === void 0 ? void 0 : _pointerGraceIntentRe.side);
    return isMovingTowards && $213e4d2df823067d$var$isPointerInGraceArea(event, (_pointerGraceIntentRe2 = pointerGraceIntentRef.current) === null || _pointerGraceIntentRe2 === void 0 ? void 0 : _pointerGraceIntentRe2.area);
  }, []);
  return /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$MenuContentProvider, {
    scope: __scopeMenu,
    searchRef: searchRef,
    onItemEnter: $cnSS2$react.useCallback(event => {
      if (isPointerMovingToSubmenu(event)) event.preventDefault();
    }, [isPointerMovingToSubmenu]),
    onItemLeave: $cnSS2$react.useCallback(event => {
      var _contentRef$current;
      if (isPointerMovingToSubmenu(event)) return;
      (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 || _contentRef$current.focus();
      setCurrentItemId(null);
    }, [isPointerMovingToSubmenu]),
    onTriggerLeave: $cnSS2$react.useCallback(event => {
      if (isPointerMovingToSubmenu(event)) event.preventDefault();
    }, [isPointerMovingToSubmenu]),
    pointerGraceTimerRef: pointerGraceTimerRef,
    onPointerGraceIntentChange: $cnSS2$react.useCallback(intent => {
      pointerGraceIntentRef.current = intent;
    }, [])
  }, /*#__PURE__*/$cnSS2$react.createElement(ScrollLockWrapper, scrollLockWrapperProps, /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactfocusscope.FocusScope, {
    asChild: true,
    trapped: trapFocus,
    onMountAutoFocus: $cnSS2$radixuiprimitive.composeEventHandlers(onOpenAutoFocus, event => {
      var _contentRef$current2;
      // when opening, explicitly focus the content area only and leave
      // `onEntryFocus` in  control of focusing first item
      event.preventDefault();
      (_contentRef$current2 = contentRef.current) === null || _contentRef$current2 === void 0 || _contentRef$current2.focus();
    }),
    onUnmountAutoFocus: onCloseAutoFocus
  }, /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactdismissablelayer.DismissableLayer, {
    asChild: true,
    disableOutsidePointerEvents: disableOutsidePointerEvents,
    onEscapeKeyDown: onEscapeKeyDown,
    onPointerDownOutside: onPointerDownOutside,
    onFocusOutside: onFocusOutside,
    onInteractOutside: onInteractOutside,
    onDismiss: onDismiss
  }, /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactrovingfocus.Root, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
    asChild: true
  }, rovingFocusGroupScope, {
    dir: rootContext.dir,
    orientation: "vertical",
    loop: loop,
    currentTabStopId: currentItemId,
    onCurrentTabStopIdChange: setCurrentItemId,
    onEntryFocus: $cnSS2$radixuiprimitive.composeEventHandlers(onEntryFocus, event => {
      // only focus first item when using keyboard
      if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
    })
  }), /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactpopper.Content, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
    role: "menu",
    "aria-orientation": "vertical",
    "data-state": $213e4d2df823067d$var$getOpenState(context.open),
    "data-radix-menu-content": "",
    dir: rootContext.dir
  }, popperScope, contentProps, {
    ref: composedRefs,
    style: {
      outline: 'none',
      ...contentProps.style
    },
    onKeyDown: $cnSS2$radixuiprimitive.composeEventHandlers(contentProps.onKeyDown, event => {
      // submenu key events bubble through portals. We only care about keys in this menu.
      const target = event.target;
      const isKeyDownInside = target.closest('[data-radix-menu-content]') === event.currentTarget;
      const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
      const isCharacterKey = event.key.length === 1;
      if (isKeyDownInside) {
        // menus should not be navigated using tab key so we prevent it
        if (event.key === 'Tab') event.preventDefault();
        if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);
      } // focus first/last item based on key pressed
      const content = contentRef.current;
      if (event.target !== content) return;
      if (!$213e4d2df823067d$var$FIRST_LAST_KEYS.includes(event.key)) return;
      event.preventDefault();
      const items = getItems().filter(item => !item.disabled);
      const candidateNodes = items.map(item => item.ref.current);
      if ($213e4d2df823067d$var$LAST_KEYS.includes(event.key)) candidateNodes.reverse();
      $213e4d2df823067d$var$focusFirst(candidateNodes);
    }),
    onBlur: $cnSS2$radixuiprimitive.composeEventHandlers(props.onBlur, event => {
      // clear search buffer when leaving the menu
      if (!event.currentTarget.contains(event.target)) {
        window.clearTimeout(timerRef.current);
        searchRef.current = '';
      }
    }),
    onPointerMove: $cnSS2$radixuiprimitive.composeEventHandlers(props.onPointerMove, $213e4d2df823067d$var$whenMouse(event => {
      const target = event.target;
      const pointerXHasChanged = lastPointerXRef.current !== event.clientX; // We don't use `event.movementX` for this check because Safari will
      // always return `0` on a pointer event.
      if (event.currentTarget.contains(target) && pointerXHasChanged) {
        const newDir = event.clientX > lastPointerXRef.current ? 'right' : 'left';
        pointerDirRef.current = newDir;
        lastPointerXRef.current = event.clientX;
      }
    }))
  })))))));
});
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$479f0f2f71193efe, {
  displayName: $213e4d2df823067d$var$CONTENT_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuGroup
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$GROUP_NAME = 'MenuGroup';
const $213e4d2df823067d$export$22a631d1f72787bb = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeMenu: __scopeMenu,
    ...groupProps
  } = props;
  return /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactprimitive.Primitive.div, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
    role: "group"
  }, groupProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$22a631d1f72787bb, {
  displayName: $213e4d2df823067d$var$GROUP_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuLabel
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$LABEL_NAME = 'MenuLabel';
const $213e4d2df823067d$export$dd37bec0e8a99143 = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeMenu: __scopeMenu,
    ...labelProps
  } = props;
  return /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactprimitive.Primitive.div, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, labelProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$dd37bec0e8a99143, {
  displayName: $213e4d2df823067d$var$LABEL_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuItem
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$ITEM_NAME = 'MenuItem';
const $213e4d2df823067d$var$ITEM_SELECT = 'menu.itemSelect';
const $213e4d2df823067d$export$2ce376c2cc3355c8 = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const {
    disabled = false,
    onSelect: onSelect,
    ...itemProps
  } = props;
  const ref = $cnSS2$react.useRef(null);
  const rootContext = $213e4d2df823067d$var$useMenuRootContext($213e4d2df823067d$var$ITEM_NAME, props.__scopeMenu);
  const contentContext = $213e4d2df823067d$var$useMenuContentContext($213e4d2df823067d$var$ITEM_NAME, props.__scopeMenu);
  const composedRefs = $cnSS2$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
  const isPointerDownRef = $cnSS2$react.useRef(false);
  const handleSelect = () => {
    const menuItem = ref.current;
    if (!disabled && menuItem) {
      const itemSelectEvent = new CustomEvent($213e4d2df823067d$var$ITEM_SELECT, {
        bubbles: true,
        cancelable: true
      });
      menuItem.addEventListener($213e4d2df823067d$var$ITEM_SELECT, event => onSelect === null || onSelect === void 0 ? void 0 : onSelect(event), {
        once: true
      });
      $cnSS2$radixuireactprimitive.dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);
      if (itemSelectEvent.defaultPrevented) isPointerDownRef.current = false;else rootContext.onClose();
    }
  };
  return /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$MenuItemImpl, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, itemProps, {
    ref: composedRefs,
    disabled: disabled,
    onClick: $cnSS2$radixuiprimitive.composeEventHandlers(props.onClick, handleSelect),
    onPointerDown: event => {
      var _props$onPointerDown;
      (_props$onPointerDown = props.onPointerDown) === null || _props$onPointerDown === void 0 || _props$onPointerDown.call(props, event);
      isPointerDownRef.current = true;
    },
    onPointerUp: $cnSS2$radixuiprimitive.composeEventHandlers(props.onPointerUp, event => {
      var _event$currentTarget;
      // Pointer down can move to a different menu item which should activate it on pointer up.
      // We dispatch a click for selection to allow composition with click based triggers and to
      // prevent Firefox from getting stuck in text selection mode when the menu closes.
      if (!isPointerDownRef.current) (_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 || _event$currentTarget.click();
    }),
    onKeyDown: $cnSS2$radixuiprimitive.composeEventHandlers(props.onKeyDown, event => {
      const isTypingAhead = contentContext.searchRef.current !== '';
      if (disabled || isTypingAhead && event.key === ' ') return;
      if ($213e4d2df823067d$var$SELECTION_KEYS.includes(event.key)) {
        event.currentTarget.click();
        /**
        * We prevent default browser behaviour for selection keys as they should trigger
        * a selection only:
        * - prevents space from scrolling the page.
        * - if keydown causes focus to move, prevents keydown from firing on the new target.
        */
        event.preventDefault();
      }
    })
  }));
});
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$2ce376c2cc3355c8, {
  displayName: $213e4d2df823067d$var$ITEM_NAME
});
/* ---------------------------------------------------------------------------------------------- */
const $213e4d2df823067d$var$MenuItemImpl = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeMenu: __scopeMenu,
    disabled = false,
    textValue: textValue,
    ...itemProps
  } = props;
  const contentContext = $213e4d2df823067d$var$useMenuContentContext($213e4d2df823067d$var$ITEM_NAME, __scopeMenu);
  const rovingFocusGroupScope = $213e4d2df823067d$var$useRovingFocusGroupScope(__scopeMenu);
  const ref = $cnSS2$react.useRef(null);
  const composedRefs = $cnSS2$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
  const [isFocused, setIsFocused] = $cnSS2$react.useState(false); // get the item's `.textContent` as default strategy for typeahead `textValue`
  const [textContent, setTextContent] = $cnSS2$react.useState('');
  $cnSS2$react.useEffect(() => {
    const menuItem = ref.current;
    if (menuItem) {
      var _menuItem$textContent;
      setTextContent(((_menuItem$textContent = menuItem.textContent) !== null && _menuItem$textContent !== void 0 ? _menuItem$textContent : '').trim());
    }
  }, [itemProps.children]);
  return /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$Collection.ItemSlot, {
    scope: __scopeMenu,
    disabled: disabled,
    textValue: textValue !== null && textValue !== void 0 ? textValue : textContent
  }, /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactrovingfocus.Item, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
    asChild: true
  }, rovingFocusGroupScope, {
    focusable: !disabled
  }), /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactprimitive.Primitive.div, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
    role: "menuitem",
    "data-highlighted": isFocused ? '' : undefined,
    "aria-disabled": disabled || undefined,
    "data-disabled": disabled ? '' : undefined
  }, itemProps, {
    ref: composedRefs,
    onPointerMove: $cnSS2$radixuiprimitive.composeEventHandlers(props.onPointerMove, $213e4d2df823067d$var$whenMouse(event => {
      if (disabled) contentContext.onItemLeave(event);else {
        contentContext.onItemEnter(event);
        if (!event.defaultPrevented) {
          const item = event.currentTarget;
          item.focus();
        }
      }
    })),
    onPointerLeave: $cnSS2$radixuiprimitive.composeEventHandlers(props.onPointerLeave, $213e4d2df823067d$var$whenMouse(event => contentContext.onItemLeave(event))),
    onFocus: $cnSS2$radixuiprimitive.composeEventHandlers(props.onFocus, () => setIsFocused(true)),
    onBlur: $cnSS2$radixuiprimitive.composeEventHandlers(props.onBlur, () => setIsFocused(false))
  }))));
});
/* -------------------------------------------------------------------------------------------------
 * MenuCheckboxItem
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$CHECKBOX_ITEM_NAME = 'MenuCheckboxItem';
const $213e4d2df823067d$export$f6f243521332502d = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const {
    checked = false,
    onCheckedChange: onCheckedChange,
    ...checkboxItemProps
  } = props;
  return /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$ItemIndicatorProvider, {
    scope: props.__scopeMenu,
    checked: checked
  }, /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$export$2ce376c2cc3355c8, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
    role: "menuitemcheckbox",
    "aria-checked": $213e4d2df823067d$var$isIndeterminate(checked) ? 'mixed' : checked
  }, checkboxItemProps, {
    ref: forwardedRef,
    "data-state": $213e4d2df823067d$var$getCheckedState(checked),
    onSelect: $cnSS2$radixuiprimitive.composeEventHandlers(checkboxItemProps.onSelect, () => onCheckedChange === null || onCheckedChange === void 0 ? void 0 : onCheckedChange($213e4d2df823067d$var$isIndeterminate(checked) ? true : !checked), {
      checkForDefaultPrevented: false
    })
  })));
});
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$f6f243521332502d, {
  displayName: $213e4d2df823067d$var$CHECKBOX_ITEM_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuRadioGroup
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$RADIO_GROUP_NAME = 'MenuRadioGroup';
const [$213e4d2df823067d$var$RadioGroupProvider, $213e4d2df823067d$var$useRadioGroupContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$RADIO_GROUP_NAME, {
  value: undefined,
  onValueChange: () => {}
});
const $213e4d2df823067d$export$ea2200c9eee416b3 = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const {
    value: value,
    onValueChange: onValueChange,
    ...groupProps
  } = props;
  const handleValueChange = $cnSS2$radixuireactusecallbackref.useCallbackRef(onValueChange);
  return /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$RadioGroupProvider, {
    scope: props.__scopeMenu,
    value: value,
    onValueChange: handleValueChange
  }, /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$export$22a631d1f72787bb, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, groupProps, {
    ref: forwardedRef
  })));
});
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$ea2200c9eee416b3, {
  displayName: $213e4d2df823067d$var$RADIO_GROUP_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuRadioItem
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$RADIO_ITEM_NAME = 'MenuRadioItem';
const $213e4d2df823067d$export$69bd225e9817f6d0 = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const {
    value: value,
    ...radioItemProps
  } = props;
  const context = $213e4d2df823067d$var$useRadioGroupContext($213e4d2df823067d$var$RADIO_ITEM_NAME, props.__scopeMenu);
  const checked = value === context.value;
  return /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$ItemIndicatorProvider, {
    scope: props.__scopeMenu,
    checked: checked
  }, /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$export$2ce376c2cc3355c8, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
    role: "menuitemradio",
    "aria-checked": checked
  }, radioItemProps, {
    ref: forwardedRef,
    "data-state": $213e4d2df823067d$var$getCheckedState(checked),
    onSelect: $cnSS2$radixuiprimitive.composeEventHandlers(radioItemProps.onSelect, () => {
      var _context$onValueChang;
      return (_context$onValueChang = context.onValueChange) === null || _context$onValueChang === void 0 ? void 0 : _context$onValueChang.call(context, value);
    }, {
      checkForDefaultPrevented: false
    })
  })));
});
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$69bd225e9817f6d0, {
  displayName: $213e4d2df823067d$var$RADIO_ITEM_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuItemIndicator
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$ITEM_INDICATOR_NAME = 'MenuItemIndicator';
const [$213e4d2df823067d$var$ItemIndicatorProvider, $213e4d2df823067d$var$useItemIndicatorContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$ITEM_INDICATOR_NAME, {
  checked: false
});
const $213e4d2df823067d$export$a2593e23056970a3 = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeMenu: __scopeMenu,
    forceMount: forceMount,
    ...itemIndicatorProps
  } = props;
  const indicatorContext = $213e4d2df823067d$var$useItemIndicatorContext($213e4d2df823067d$var$ITEM_INDICATOR_NAME, __scopeMenu);
  return /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactpresence.Presence, {
    present: forceMount || $213e4d2df823067d$var$isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true
  }, /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactprimitive.Primitive.span, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, itemIndicatorProps, {
    ref: forwardedRef,
    "data-state": $213e4d2df823067d$var$getCheckedState(indicatorContext.checked)
  })));
});
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$a2593e23056970a3, {
  displayName: $213e4d2df823067d$var$ITEM_INDICATOR_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuSeparator
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$SEPARATOR_NAME = 'MenuSeparator';
const $213e4d2df823067d$export$1cec7dcdd713e220 = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeMenu: __scopeMenu,
    ...separatorProps
  } = props;
  return /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactprimitive.Primitive.div, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
    role: "separator",
    "aria-orientation": "horizontal"
  }, separatorProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$1cec7dcdd713e220, {
  displayName: $213e4d2df823067d$var$SEPARATOR_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuArrow
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$ARROW_NAME = 'MenuArrow';
const $213e4d2df823067d$export$bcdda4773debf5fa = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeMenu: __scopeMenu,
    ...arrowProps
  } = props;
  const popperScope = $213e4d2df823067d$var$usePopperScope(__scopeMenu);
  return /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactpopper.Arrow, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({}, popperScope, arrowProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$bcdda4773debf5fa, {
  displayName: $213e4d2df823067d$var$ARROW_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuSub
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$SUB_NAME = 'MenuSub';
const [$213e4d2df823067d$var$MenuSubProvider, $213e4d2df823067d$var$useMenuSubContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$SUB_NAME);
const $213e4d2df823067d$export$71bdb9d1e2909932 = props => {
  const {
    __scopeMenu: __scopeMenu,
    children: children,
    open = false,
    onOpenChange: onOpenChange
  } = props;
  const parentMenuContext = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$SUB_NAME, __scopeMenu);
  const popperScope = $213e4d2df823067d$var$usePopperScope(__scopeMenu);
  const [trigger, setTrigger] = $cnSS2$react.useState(null);
  const [content, setContent] = $cnSS2$react.useState(null);
  const handleOpenChange = $cnSS2$radixuireactusecallbackref.useCallbackRef(onOpenChange); // Prevent the parent menu from reopening with open submenus.
  $cnSS2$react.useEffect(() => {
    if (parentMenuContext.open === false) handleOpenChange(false);
    return () => handleOpenChange(false);
  }, [parentMenuContext.open, handleOpenChange]);
  return /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactpopper.Root, popperScope, /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$MenuProvider, {
    scope: __scopeMenu,
    open: open,
    onOpenChange: handleOpenChange,
    content: content,
    onContentChange: setContent
  }, /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$MenuSubProvider, {
    scope: __scopeMenu,
    contentId: $cnSS2$radixuireactid.useId(),
    triggerId: $cnSS2$radixuireactid.useId(),
    trigger: trigger,
    onTriggerChange: setTrigger
  }, children)));
};
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$71bdb9d1e2909932, {
  displayName: $213e4d2df823067d$var$SUB_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuSubTrigger
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$SUB_TRIGGER_NAME = 'MenuSubTrigger';
const $213e4d2df823067d$export$5fbbb3ba7297405f = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$SUB_TRIGGER_NAME, props.__scopeMenu);
  const rootContext = $213e4d2df823067d$var$useMenuRootContext($213e4d2df823067d$var$SUB_TRIGGER_NAME, props.__scopeMenu);
  const subContext = $213e4d2df823067d$var$useMenuSubContext($213e4d2df823067d$var$SUB_TRIGGER_NAME, props.__scopeMenu);
  const contentContext = $213e4d2df823067d$var$useMenuContentContext($213e4d2df823067d$var$SUB_TRIGGER_NAME, props.__scopeMenu);
  const openTimerRef = $cnSS2$react.useRef(null);
  const {
    pointerGraceTimerRef: pointerGraceTimerRef,
    onPointerGraceIntentChange: onPointerGraceIntentChange
  } = contentContext;
  const scope = {
    __scopeMenu: props.__scopeMenu
  };
  const clearOpenTimer = $cnSS2$react.useCallback(() => {
    if (openTimerRef.current) window.clearTimeout(openTimerRef.current);
    openTimerRef.current = null;
  }, []);
  $cnSS2$react.useEffect(() => clearOpenTimer, [clearOpenTimer]);
  $cnSS2$react.useEffect(() => {
    const pointerGraceTimer = pointerGraceTimerRef.current;
    return () => {
      window.clearTimeout(pointerGraceTimer);
      onPointerGraceIntentChange(null);
    };
  }, [pointerGraceTimerRef, onPointerGraceIntentChange]);
  return /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$export$9fa5ebd18bee4d43, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
    asChild: true
  }, scope), /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$MenuItemImpl, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
    id: subContext.triggerId,
    "aria-haspopup": "menu",
    "aria-expanded": context.open,
    "aria-controls": subContext.contentId,
    "data-state": $213e4d2df823067d$var$getOpenState(context.open)
  }, props, {
    ref: $cnSS2$radixuireactcomposerefs.composeRefs(forwardedRef, subContext.onTriggerChange) // This is redundant for mouse users but we cannot determine pointer type from
    ,

    onClick: event => {
      var _props$onClick;
      (_props$onClick = props.onClick) === null || _props$onClick === void 0 || _props$onClick.call(props, event);
      if (props.disabled || event.defaultPrevented) return;
      /**
      * We manually focus because iOS Safari doesn't always focus on click (e.g. buttons)
      * and we rely heavily on `onFocusOutside` for submenus to close when switching
      * between separate submenus.
      */
      event.currentTarget.focus();
      if (!context.open) context.onOpenChange(true);
    },
    onPointerMove: $cnSS2$radixuiprimitive.composeEventHandlers(props.onPointerMove, $213e4d2df823067d$var$whenMouse(event => {
      contentContext.onItemEnter(event);
      if (event.defaultPrevented) return;
      if (!props.disabled && !context.open && !openTimerRef.current) {
        contentContext.onPointerGraceIntentChange(null);
        openTimerRef.current = window.setTimeout(() => {
          context.onOpenChange(true);
          clearOpenTimer();
        }, 100);
      }
    })),
    onPointerLeave: $cnSS2$radixuiprimitive.composeEventHandlers(props.onPointerLeave, $213e4d2df823067d$var$whenMouse(event => {
      var _context$content;
      clearOpenTimer();
      const contentRect = (_context$content = context.content) === null || _context$content === void 0 ? void 0 : _context$content.getBoundingClientRect();
      if (contentRect) {
        var _context$content2;
        // TODO: make sure to update this when we change positioning logic
        const side = (_context$content2 = context.content) === null || _context$content2 === void 0 ? void 0 : _context$content2.dataset.side;
        const rightSide = side === 'right';
        const bleed = rightSide ? -5 : 5;
        const contentNearEdge = contentRect[rightSide ? 'left' : 'right'];
        const contentFarEdge = contentRect[rightSide ? 'right' : 'left'];
        contentContext.onPointerGraceIntentChange({
          area: [
          // consistently within polygon bounds
          {
            x: event.clientX + bleed,
            y: event.clientY
          }, {
            x: contentNearEdge,
            y: contentRect.top
          }, {
            x: contentFarEdge,
            y: contentRect.top
          }, {
            x: contentFarEdge,
            y: contentRect.bottom
          }, {
            x: contentNearEdge,
            y: contentRect.bottom
          }],
          side: side
        });
        window.clearTimeout(pointerGraceTimerRef.current);
        pointerGraceTimerRef.current = window.setTimeout(() => contentContext.onPointerGraceIntentChange(null), 300);
      } else {
        contentContext.onTriggerLeave(event);
        if (event.defaultPrevented) return; // There's 100ms where the user may leave an item before the submenu was opened.
        contentContext.onPointerGraceIntentChange(null);
      }
    })),
    onKeyDown: $cnSS2$radixuiprimitive.composeEventHandlers(props.onKeyDown, event => {
      const isTypingAhead = contentContext.searchRef.current !== '';
      if (props.disabled || isTypingAhead && event.key === ' ') return;
      if ($213e4d2df823067d$var$SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {
        var _context$content3;
        context.onOpenChange(true); // The trigger may hold focus if opened via pointer interaction
        // so we ensure content is given focus again when switching to keyboard.
        (_context$content3 = context.content) === null || _context$content3 === void 0 || _context$content3.focus(); // prevent window from scrolling
        event.preventDefault();
      }
    })
  })));
});
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$5fbbb3ba7297405f, {
  displayName: $213e4d2df823067d$var$SUB_TRIGGER_NAME
});
/* -------------------------------------------------------------------------------------------------
 * MenuSubContent
 * -----------------------------------------------------------------------------------------------*/
const $213e4d2df823067d$var$SUB_CONTENT_NAME = 'MenuSubContent';
const $213e4d2df823067d$export$e7142ab31822bde6 = /*#__PURE__*/$cnSS2$react.forwardRef((props, forwardedRef) => {
  const portalContext = $213e4d2df823067d$var$usePortalContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
  const {
    forceMount = portalContext.forceMount,
    ...subContentProps
  } = props;
  const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
  const rootContext = $213e4d2df823067d$var$useMenuRootContext($213e4d2df823067d$var$CONTENT_NAME, props.__scopeMenu);
  const subContext = $213e4d2df823067d$var$useMenuSubContext($213e4d2df823067d$var$SUB_CONTENT_NAME, props.__scopeMenu);
  const ref = $cnSS2$react.useRef(null);
  const composedRefs = $cnSS2$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
  return /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$Collection.Provider, {
    scope: props.__scopeMenu
  }, /*#__PURE__*/$cnSS2$react.createElement($cnSS2$radixuireactpresence.Presence, {
    present: forceMount || context.open
  }, /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$Collection.Slot, {
    scope: props.__scopeMenu
  }, /*#__PURE__*/$cnSS2$react.createElement($213e4d2df823067d$var$MenuContentImpl, $parcel$interopDefault($cnSS2$babelruntimehelpersextends)({
    id: subContext.contentId,
    "aria-labelledby": subContext.triggerId
  }, subContentProps, {
    ref: composedRefs,
    align: "start",
    side: rootContext.dir === 'rtl' ? 'left' : 'right',
    disableOutsidePointerEvents: false,
    disableOutsideScroll: false,
    trapFocus: false,
    onOpenAutoFocus: event => {
      var _ref$current;
      // when opening a submenu, focus content for keyboard users only
      if (rootContext.isUsingKeyboardRef.current) (_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.focus();
      event.preventDefault();
    } // The menu might close because of focusing another menu item in the parent menu. We
    ,

    onCloseAutoFocus: event => event.preventDefault(),
    onFocusOutside: $cnSS2$radixuiprimitive.composeEventHandlers(props.onFocusOutside, event => {
      // We prevent closing when the trigger is focused to avoid triggering a re-open animation
      // on pointer interaction.
      if (event.target !== subContext.trigger) context.onOpenChange(false);
    }),
    onEscapeKeyDown: $cnSS2$radixuiprimitive.composeEventHandlers(props.onEscapeKeyDown, event => {
      rootContext.onClose(); // ensure pressing escape in submenu doesn't escape full screen mode
      event.preventDefault();
    }),
    onKeyDown: $cnSS2$radixuiprimitive.composeEventHandlers(props.onKeyDown, event => {
      // Submenu key events bubble through portals. We only care about keys in this menu.
      const isKeyDownInside = event.currentTarget.contains(event.target);
      const isCloseKey = $213e4d2df823067d$var$SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);
      if (isKeyDownInside && isCloseKey) {
        var _subContext$trigger;
        context.onOpenChange(false); // We focus manually because we prevented it in `onCloseAutoFocus`
        (_subContext$trigger = subContext.trigger) === null || _subContext$trigger === void 0 || _subContext$trigger.focus(); // prevent window from scrolling
        event.preventDefault();
      }
    })
  })))));
});
/*#__PURE__*/
Object.assign($213e4d2df823067d$export$e7142ab31822bde6, {
  displayName: $213e4d2df823067d$var$SUB_CONTENT_NAME
});
/* -----------------------------------------------------------------------------------------------*/
function $213e4d2df823067d$var$getOpenState(open) {
  return open ? 'open' : 'closed';
}
function $213e4d2df823067d$var$isIndeterminate(checked) {
  return checked === 'indeterminate';
}
function $213e4d2df823067d$var$getCheckedState(checked) {
  return $213e4d2df823067d$var$isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';
}
function $213e4d2df823067d$var$focusFirst(candidates) {
  const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
  for (const candidate of candidates) {
    // if focus is already where we want to go, we don't want to keep going through the candidates
    if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
    candidate.focus();
    if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
  }
}
/**
 * Wraps an array around itself at a given start index
 * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`
 */
function $213e4d2df823067d$var$wrapArray(array, startIndex) {
  return array.map((_, index) => array[(startIndex + index) % array.length]);
}
/**
 * This is the "meat" of the typeahead matching logic. It takes in all the values,
 * the search and the current match, and returns the next match (or `undefined`).
 *
 * We normalize the search because if a user has repeatedly pressed a character,
 * we want the exact same behavior as if we only had that one character
 * (ie. cycle through options starting with that character)
 *
 * We also reorder the values by wrapping the array around the current match.
 * This is so we always look forward from the current match, and picking the first
 * match will always be the correct one.
 *
 * Finally, if the normalized search is exactly one character, we exclude the
 * current match from the values because otherwise it would be the first to match always
 * and focus would never move. This is as opposed to the regular case, where we
 * don't want focus to move if the current match still matches.
 */
function $213e4d2df823067d$var$getNextMatch(values, search, currentMatch) {
  const isRepeated = search.length > 1 && Array.from(search).every(char => char === search[0]);
  const normalizedSearch = isRepeated ? search[0] : search;
  const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;
  let wrappedValues = $213e4d2df823067d$var$wrapArray(values, Math.max(currentMatchIndex, 0));
  const excludeCurrentMatch = normalizedSearch.length === 1;
  if (excludeCurrentMatch) wrappedValues = wrappedValues.filter(v => v !== currentMatch);
  const nextMatch = wrappedValues.find(value => value.toLowerCase().startsWith(normalizedSearch.toLowerCase()));
  return nextMatch !== currentMatch ? nextMatch : undefined;
}
// Determine if a point is inside of a polygon.
// Based on https://github.com/substack/point-in-polygon
function $213e4d2df823067d$var$isPointInPolygon(point, polygon) {
  const {
    x: x,
    y: y
  } = point;
  let inside = false;
  for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
    const xi = polygon[i].x;
    const yi = polygon[i].y;
    const xj = polygon[j].x;
    const yj = polygon[j].y; // prettier-ignore
    const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
    if (intersect) inside = !inside;
  }
  return inside;
}
function $213e4d2df823067d$var$isPointerInGraceArea(event, area) {
  if (!area) return false;
  const cursorPos = {
    x: event.clientX,
    y: event.clientY
  };
  return $213e4d2df823067d$var$isPointInPolygon(cursorPos, area);
}
function $213e4d2df823067d$var$whenMouse(handler) {
  return event => event.pointerType === 'mouse' ? handler(event) : undefined;
}
const $213e4d2df823067d$export$be92b6f5f03c0fe9 = $213e4d2df823067d$export$d9b273488cd8ce6f;
const $213e4d2df823067d$export$b688253958b8dfe7 = $213e4d2df823067d$export$9fa5ebd18bee4d43;
const $213e4d2df823067d$export$602eac185826482c = $213e4d2df823067d$export$793392f970497feb;
const $213e4d2df823067d$export$7c6e2c02157bb7d2 = $213e4d2df823067d$export$479f0f2f71193efe;
const $213e4d2df823067d$export$eb2fcfdbd7ba97d4 = $213e4d2df823067d$export$22a631d1f72787bb;
const $213e4d2df823067d$export$b04be29aa201d4f5 = $213e4d2df823067d$export$dd37bec0e8a99143;
const $213e4d2df823067d$export$6d08773d2e66f8f2 = $213e4d2df823067d$export$2ce376c2cc3355c8;
const $213e4d2df823067d$export$16ce288f89fa631c = $213e4d2df823067d$export$f6f243521332502d;
const $213e4d2df823067d$export$a98f0dcb43a68a25 = $213e4d2df823067d$export$ea2200c9eee416b3;
const $213e4d2df823067d$export$371ab307eab489c0 = $213e4d2df823067d$export$69bd225e9817f6d0;
const $213e4d2df823067d$export$c3468e2714d175fa = $213e4d2df823067d$export$a2593e23056970a3;
const $213e4d2df823067d$export$1ff3c3f08ae963c0 = $213e4d2df823067d$export$1cec7dcdd713e220;
const $213e4d2df823067d$export$21b07c8f274aebd5 = $213e4d2df823067d$export$bcdda4773debf5fa;
const $213e4d2df823067d$export$d7a01e11500dfb6f = $213e4d2df823067d$export$71bdb9d1e2909932;
const $213e4d2df823067d$export$2ea8a7a591ac5eac = $213e4d2df823067d$export$5fbbb3ba7297405f;
const $213e4d2df823067d$export$6d4de93b380beddf = $213e4d2df823067d$export$e7142ab31822bde6;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-popper/dist/index.js":
/*!******************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-popper/dist/index.js ***!
  \******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $50Iv9$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
var $50Iv9$react = __webpack_require__(/*! react */ "react");
var $50Iv9$floatinguireactdom = __webpack_require__(/*! @floating-ui/react-dom */ "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js");
var $50Iv9$radixuireactarrow = __webpack_require__(/*! @radix-ui/react-arrow */ "../../../node_modules/@radix-ui/react-arrow/dist/index.js");
var $50Iv9$radixuireactcomposerefs = __webpack_require__(/*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
var $50Iv9$radixuireactcontext = __webpack_require__(/*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
var $50Iv9$radixuireactprimitive = __webpack_require__(/*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
var $50Iv9$radixuireactusecallbackref = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");
var $50Iv9$radixuireactuselayouteffect = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ "../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.js");
var $50Iv9$radixuireactusesize = __webpack_require__(/*! @radix-ui/react-use-size */ "../../../node_modules/@radix-ui/react-use-size/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "createPopperScope", () => $34310caa050a8d63$export$722aac194ae923);
$parcel$export(module.exports, "Popper", () => $34310caa050a8d63$export$badac9ada3a0bdf9);
$parcel$export(module.exports, "PopperAnchor", () => $34310caa050a8d63$export$ecd4e1ccab6ed6d);
$parcel$export(module.exports, "PopperContent", () => $34310caa050a8d63$export$bc4ae5855d3c4fc);
$parcel$export(module.exports, "PopperArrow", () => $34310caa050a8d63$export$79d62cd4e10a3fd0);
$parcel$export(module.exports, "Root", () => $34310caa050a8d63$export$be92b6f5f03c0fe9);
$parcel$export(module.exports, "Anchor", () => $34310caa050a8d63$export$b688253958b8dfe7);
$parcel$export(module.exports, "Content", () => $34310caa050a8d63$export$7c6e2c02157bb7d2);
$parcel$export(module.exports, "Arrow", () => $34310caa050a8d63$export$21b07c8f274aebd5);
$parcel$export(module.exports, "SIDE_OPTIONS", () => $34310caa050a8d63$export$36f0086da09c4b9f);
$parcel$export(module.exports, "ALIGN_OPTIONS", () => $34310caa050a8d63$export$3671ffab7b302fc9);
const $34310caa050a8d63$export$36f0086da09c4b9f = ['top', 'right', 'bottom', 'left'];
const $34310caa050a8d63$export$3671ffab7b302fc9 = ['start', 'center', 'end'];
/* -------------------------------------------------------------------------------------------------
 * Popper
 * -----------------------------------------------------------------------------------------------*/
const $34310caa050a8d63$var$POPPER_NAME = 'Popper';
const [$34310caa050a8d63$var$createPopperContext, $34310caa050a8d63$export$722aac194ae923] = $50Iv9$radixuireactcontext.createContextScope($34310caa050a8d63$var$POPPER_NAME);
const [$34310caa050a8d63$var$PopperProvider, $34310caa050a8d63$var$usePopperContext] = $34310caa050a8d63$var$createPopperContext($34310caa050a8d63$var$POPPER_NAME);
const $34310caa050a8d63$export$badac9ada3a0bdf9 = props => {
  const {
    __scopePopper: __scopePopper,
    children: children
  } = props;
  const [anchor, setAnchor] = $50Iv9$react.useState(null);
  return /*#__PURE__*/$50Iv9$react.createElement($34310caa050a8d63$var$PopperProvider, {
    scope: __scopePopper,
    anchor: anchor,
    onAnchorChange: setAnchor
  }, children);
};
/*#__PURE__*/
Object.assign($34310caa050a8d63$export$badac9ada3a0bdf9, {
  displayName: $34310caa050a8d63$var$POPPER_NAME
});
/* -------------------------------------------------------------------------------------------------
 * PopperAnchor
 * -----------------------------------------------------------------------------------------------*/
const $34310caa050a8d63$var$ANCHOR_NAME = 'PopperAnchor';
const $34310caa050a8d63$export$ecd4e1ccab6ed6d = /*#__PURE__*/$50Iv9$react.forwardRef((props, forwardedRef) => {
  const {
    __scopePopper: __scopePopper,
    virtualRef: virtualRef,
    ...anchorProps
  } = props;
  const context = $34310caa050a8d63$var$usePopperContext($34310caa050a8d63$var$ANCHOR_NAME, __scopePopper);
  const ref = $50Iv9$react.useRef(null);
  const composedRefs = $50Iv9$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
  $50Iv9$react.useEffect(() => {
    // Consumer can anchor the popper to something that isn't
    // a DOM node e.g. pointer position, so we override the
    // `anchorRef` with their virtual ref in this case.
    context.onAnchorChange((virtualRef === null || virtualRef === void 0 ? void 0 : virtualRef.current) || ref.current);
  });
  return virtualRef ? null : /*#__PURE__*/$50Iv9$react.createElement($50Iv9$radixuireactprimitive.Primitive.div, $parcel$interopDefault($50Iv9$babelruntimehelpersextends)({}, anchorProps, {
    ref: composedRefs
  }));
});
/*#__PURE__*/
Object.assign($34310caa050a8d63$export$ecd4e1ccab6ed6d, {
  displayName: $34310caa050a8d63$var$ANCHOR_NAME
});
/* -------------------------------------------------------------------------------------------------
 * PopperContent
 * -----------------------------------------------------------------------------------------------*/
const $34310caa050a8d63$var$CONTENT_NAME = 'PopperContent';
const [$34310caa050a8d63$var$PopperContentProvider, $34310caa050a8d63$var$useContentContext] = $34310caa050a8d63$var$createPopperContext($34310caa050a8d63$var$CONTENT_NAME);
const $34310caa050a8d63$export$bc4ae5855d3c4fc = /*#__PURE__*/$50Iv9$react.forwardRef((props, forwardedRef) => {
  var _arrowSize$width, _arrowSize$height, _middlewareData$arrow, _middlewareData$arrow2, _middlewareData$arrow3, _middlewareData$trans, _middlewareData$trans2, _middlewareData$hide;
  const {
    __scopePopper: __scopePopper,
    side = 'bottom',
    sideOffset = 0,
    align = 'center',
    alignOffset = 0,
    arrowPadding = 0,
    collisionBoundary = [],
    collisionPadding: collisionPaddingProp = 0,
    sticky = 'partial',
    hideWhenDetached = false,
    avoidCollisions = true,
    onPlaced: onPlaced,
    ...contentProps
  } = props;
  const context = $34310caa050a8d63$var$usePopperContext($34310caa050a8d63$var$CONTENT_NAME, __scopePopper);
  const [content, setContent] = $50Iv9$react.useState(null);
  const composedRefs = $50Iv9$radixuireactcomposerefs.useComposedRefs(forwardedRef, node => setContent(node));
  const [arrow, setArrow] = $50Iv9$react.useState(null);
  const arrowSize = $50Iv9$radixuireactusesize.useSize(arrow);
  const arrowWidth = (_arrowSize$width = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.width) !== null && _arrowSize$width !== void 0 ? _arrowSize$width : 0;
  const arrowHeight = (_arrowSize$height = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.height) !== null && _arrowSize$height !== void 0 ? _arrowSize$height : 0;
  const desiredPlacement = side + (align !== 'center' ? '-' + align : '');
  const collisionPadding = typeof collisionPaddingProp === 'number' ? collisionPaddingProp : {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0,
    ...collisionPaddingProp
  };
  const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];
  const hasExplicitBoundaries = boundary.length > 0;
  const detectOverflowOptions = {
    padding: collisionPadding,
    boundary: boundary.filter($34310caa050a8d63$var$isNotNull),
    // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
    altBoundary: hasExplicitBoundaries
  };
  const {
    refs: refs,
    floatingStyles: floatingStyles,
    placement: placement,
    isPositioned: isPositioned,
    middlewareData: middlewareData
  } = $50Iv9$floatinguireactdom.useFloating({
    // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
    strategy: 'fixed',
    placement: desiredPlacement,
    whileElementsMounted: $50Iv9$floatinguireactdom.autoUpdate,
    elements: {
      reference: context.anchor
    },
    middleware: [$50Iv9$floatinguireactdom.offset({
      mainAxis: sideOffset + arrowHeight,
      alignmentAxis: alignOffset
    }), avoidCollisions && $50Iv9$floatinguireactdom.shift({
      mainAxis: true,
      crossAxis: false,
      limiter: sticky === 'partial' ? $50Iv9$floatinguireactdom.limitShift() : undefined,
      ...detectOverflowOptions
    }), avoidCollisions && $50Iv9$floatinguireactdom.flip({
      ...detectOverflowOptions
    }), $50Iv9$floatinguireactdom.size({
      ...detectOverflowOptions,
      apply: _ref => {
        let {
          elements: elements,
          rects: rects,
          availableWidth: availableWidth,
          availableHeight: availableHeight
        } = _ref;
        const {
          width: anchorWidth,
          height: anchorHeight
        } = rects.reference;
        const contentStyle = elements.floating.style;
        contentStyle.setProperty('--radix-popper-available-width', `${availableWidth}px`);
        contentStyle.setProperty('--radix-popper-available-height', `${availableHeight}px`);
        contentStyle.setProperty('--radix-popper-anchor-width', `${anchorWidth}px`);
        contentStyle.setProperty('--radix-popper-anchor-height', `${anchorHeight}px`);
      }
    }), arrow && $50Iv9$floatinguireactdom.arrow({
      element: arrow,
      padding: arrowPadding
    }), $34310caa050a8d63$var$transformOrigin({
      arrowWidth: arrowWidth,
      arrowHeight: arrowHeight
    }), hideWhenDetached && $50Iv9$floatinguireactdom.hide({
      strategy: 'referenceHidden'
    })]
  });
  const [placedSide, placedAlign] = $34310caa050a8d63$var$getSideAndAlignFromPlacement(placement);
  const handlePlaced = $50Iv9$radixuireactusecallbackref.useCallbackRef(onPlaced);
  $50Iv9$radixuireactuselayouteffect.useLayoutEffect(() => {
    if (isPositioned) handlePlaced === null || handlePlaced === void 0 || handlePlaced();
  }, [isPositioned, handlePlaced]);
  const arrowX = (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x;
  const arrowY = (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y;
  const cannotCenterArrow = ((_middlewareData$arrow3 = middlewareData.arrow) === null || _middlewareData$arrow3 === void 0 ? void 0 : _middlewareData$arrow3.centerOffset) !== 0;
  const [contentZIndex, setContentZIndex] = $50Iv9$react.useState();
  $50Iv9$radixuireactuselayouteffect.useLayoutEffect(() => {
    if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
  }, [content]);
  return /*#__PURE__*/$50Iv9$react.createElement("div", {
    ref: refs.setFloating,
    "data-radix-popper-content-wrapper": "",
    style: {
      ...floatingStyles,
      transform: isPositioned ? floatingStyles.transform : 'translate(0, -200%)',
      // keep off the page when measuring
      minWidth: 'max-content',
      zIndex: contentZIndex,
      ['--radix-popper-transform-origin']: [(_middlewareData$trans = middlewareData.transformOrigin) === null || _middlewareData$trans === void 0 ? void 0 : _middlewareData$trans.x, (_middlewareData$trans2 = middlewareData.transformOrigin) === null || _middlewareData$trans2 === void 0 ? void 0 : _middlewareData$trans2.y].join(' ')
    } // Floating UI interally calculates logical alignment based the `dir` attribute on
    ,

    dir: props.dir
  }, /*#__PURE__*/$50Iv9$react.createElement($34310caa050a8d63$var$PopperContentProvider, {
    scope: __scopePopper,
    placedSide: placedSide,
    onArrowChange: setArrow,
    arrowX: arrowX,
    arrowY: arrowY,
    shouldHideArrow: cannotCenterArrow
  }, /*#__PURE__*/$50Iv9$react.createElement($50Iv9$radixuireactprimitive.Primitive.div, $parcel$interopDefault($50Iv9$babelruntimehelpersextends)({
    "data-side": placedSide,
    "data-align": placedAlign
  }, contentProps, {
    ref: composedRefs,
    style: {
      ...contentProps.style,
      // if the PopperContent hasn't been placed yet (not all measurements done)
      // we prevent animations so that users's animation don't kick in too early referring wrong sides
      animation: !isPositioned ? 'none' : undefined,
      // hide the content if using the hide middleware and should be hidden
      opacity: (_middlewareData$hide = middlewareData.hide) !== null && _middlewareData$hide !== void 0 && _middlewareData$hide.referenceHidden ? 0 : undefined
    }
  }))));
});
/*#__PURE__*/
Object.assign($34310caa050a8d63$export$bc4ae5855d3c4fc, {
  displayName: $34310caa050a8d63$var$CONTENT_NAME
});
/* -------------------------------------------------------------------------------------------------
 * PopperArrow
 * -----------------------------------------------------------------------------------------------*/
const $34310caa050a8d63$var$ARROW_NAME = 'PopperArrow';
const $34310caa050a8d63$var$OPPOSITE_SIDE = {
  top: 'bottom',
  right: 'left',
  bottom: 'top',
  left: 'right'
};
const $34310caa050a8d63$export$79d62cd4e10a3fd0 = /*#__PURE__*/$50Iv9$react.forwardRef(function $34310caa050a8d63$export$79d62cd4e10a3fd0(props, forwardedRef) {
  const {
    __scopePopper: __scopePopper,
    ...arrowProps
  } = props;
  const contentContext = $34310caa050a8d63$var$useContentContext($34310caa050a8d63$var$ARROW_NAME, __scopePopper);
  const baseSide = $34310caa050a8d63$var$OPPOSITE_SIDE[contentContext.placedSide];
  return /*#__PURE__*/ (// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
    // doesn't report size as we'd expect on SVG elements.
    // it reports their bounding box which is effectively the largest path inside the SVG.
    $50Iv9$react.createElement("span", {
      ref: contentContext.onArrowChange,
      style: {
        position: 'absolute',
        left: contentContext.arrowX,
        top: contentContext.arrowY,
        [baseSide]: 0,
        transformOrigin: {
          top: '',
          right: '0 0',
          bottom: 'center 0',
          left: '100% 0'
        }[contentContext.placedSide],
        transform: {
          top: 'translateY(100%)',
          right: 'translateY(50%) rotate(90deg) translateX(-50%)',
          bottom: `rotate(180deg)`,
          left: 'translateY(50%) rotate(-90deg) translateX(50%)'
        }[contentContext.placedSide],
        visibility: contentContext.shouldHideArrow ? 'hidden' : undefined
      }
    }, /*#__PURE__*/$50Iv9$react.createElement($50Iv9$radixuireactarrow.Root, $parcel$interopDefault($50Iv9$babelruntimehelpersextends)({}, arrowProps, {
      ref: forwardedRef,
      style: {
        ...arrowProps.style,
        // ensures the element can be measured correctly (mostly for if SVG)
        display: 'block'
      }
    })))
  );
});
/*#__PURE__*/
Object.assign($34310caa050a8d63$export$79d62cd4e10a3fd0, {
  displayName: $34310caa050a8d63$var$ARROW_NAME
});
/* -----------------------------------------------------------------------------------------------*/
function $34310caa050a8d63$var$isNotNull(value) {
  return value !== null;
}
const $34310caa050a8d63$var$transformOrigin = options => ({
  name: 'transformOrigin',
  options: options,
  fn(data) {
    var _middlewareData$arrow4, _middlewareData$arrow5, _middlewareData$arrow6, _middlewareData$arrow7, _middlewareData$arrow8;
    const {
      placement: placement,
      rects: rects,
      middlewareData: middlewareData
    } = data;
    const cannotCenterArrow = ((_middlewareData$arrow4 = middlewareData.arrow) === null || _middlewareData$arrow4 === void 0 ? void 0 : _middlewareData$arrow4.centerOffset) !== 0;
    const isArrowHidden = cannotCenterArrow;
    const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
    const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
    const [placedSide, placedAlign] = $34310caa050a8d63$var$getSideAndAlignFromPlacement(placement);
    const noArrowAlign = {
      start: '0%',
      center: '50%',
      end: '100%'
    }[placedAlign];
    const arrowXCenter = ((_middlewareData$arrow5 = (_middlewareData$arrow6 = middlewareData.arrow) === null || _middlewareData$arrow6 === void 0 ? void 0 : _middlewareData$arrow6.x) !== null && _middlewareData$arrow5 !== void 0 ? _middlewareData$arrow5 : 0) + arrowWidth / 2;
    const arrowYCenter = ((_middlewareData$arrow7 = (_middlewareData$arrow8 = middlewareData.arrow) === null || _middlewareData$arrow8 === void 0 ? void 0 : _middlewareData$arrow8.y) !== null && _middlewareData$arrow7 !== void 0 ? _middlewareData$arrow7 : 0) + arrowHeight / 2;
    let x = '';
    let y = '';
    if (placedSide === 'bottom') {
      x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
      y = `${-arrowHeight}px`;
    } else if (placedSide === 'top') {
      x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
      y = `${rects.floating.height + arrowHeight}px`;
    } else if (placedSide === 'right') {
      x = `${-arrowHeight}px`;
      y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
    } else if (placedSide === 'left') {
      x = `${rects.floating.width + arrowHeight}px`;
      y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
    }
    return {
      data: {
        x: x,
        y: y
      }
    };
  }
});
function $34310caa050a8d63$var$getSideAndAlignFromPlacement(placement) {
  const [side, align = 'center'] = placement.split('-');
  return [side, align];
}
const $34310caa050a8d63$export$be92b6f5f03c0fe9 = $34310caa050a8d63$export$badac9ada3a0bdf9;
const $34310caa050a8d63$export$b688253958b8dfe7 = $34310caa050a8d63$export$ecd4e1ccab6ed6d;
const $34310caa050a8d63$export$7c6e2c02157bb7d2 = $34310caa050a8d63$export$bc4ae5855d3c4fc;
const $34310caa050a8d63$export$21b07c8f274aebd5 = $34310caa050a8d63$export$79d62cd4e10a3fd0;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-portal/dist/index.js":
/*!******************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-portal/dist/index.js ***!
  \******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $amzHf$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
var $amzHf$react = __webpack_require__(/*! react */ "react");
var $amzHf$reactdom = __webpack_require__(/*! react-dom */ "react-dom");
var $amzHf$radixuireactprimitive = __webpack_require__(/*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "Portal", () => $913a70b877676c16$export$602eac185826482c);
$parcel$export(module.exports, "Root", () => $913a70b877676c16$export$be92b6f5f03c0fe9);

/* -------------------------------------------------------------------------------------------------
 * Portal
 * -----------------------------------------------------------------------------------------------*/
const $913a70b877676c16$var$PORTAL_NAME = 'Portal';
const $913a70b877676c16$export$602eac185826482c = /*#__PURE__*/$amzHf$react.forwardRef((props, forwardedRef) => {
  var _globalThis$document;
  const {
    container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body,
    ...portalProps
  } = props;
  return container ? /*#__PURE__*/$parcel$interopDefault($amzHf$reactdom).createPortal( /*#__PURE__*/$amzHf$react.createElement($amzHf$radixuireactprimitive.Primitive.div, $parcel$interopDefault($amzHf$babelruntimehelpersextends)({}, portalProps, {
    ref: forwardedRef
  })), container) : null;
});
/*#__PURE__*/
Object.assign($913a70b877676c16$export$602eac185826482c, {
  displayName: $913a70b877676c16$var$PORTAL_NAME
});
/* -----------------------------------------------------------------------------------------------*/
const $913a70b877676c16$export$be92b6f5f03c0fe9 = $913a70b877676c16$export$602eac185826482c;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-presence/dist/index.js":
/*!********************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-presence/dist/index.js ***!
  \********************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $fnLeV$react = __webpack_require__(/*! react */ "react");
var $fnLeV$reactdom = __webpack_require__(/*! react-dom */ "react-dom");
var $fnLeV$radixuireactcomposerefs = __webpack_require__(/*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
var $fnLeV$radixuireactuselayouteffect = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ "../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
$parcel$export(module.exports, "Presence", () => $a2fa0214bb2735a1$export$99c2b779aa4e8b8b);
function $8f63844556d0d3cd$export$3e6543de14f8614f(initialState, machine) {
  return $fnLeV$react.useReducer((state, event) => {
    const nextState = machine[state][event];
    return nextState !== null && nextState !== void 0 ? nextState : state;
  }, initialState);
}
const $a2fa0214bb2735a1$export$99c2b779aa4e8b8b = props => {
  const {
    present: present,
    children: children
  } = props;
  const presence = $a2fa0214bb2735a1$var$usePresence(present);
  const child = typeof children === 'function' ? children({
    present: presence.isPresent
  }) : $fnLeV$react.Children.only(children);
  const ref = $fnLeV$radixuireactcomposerefs.useComposedRefs(presence.ref, child.ref);
  const forceMount = typeof children === 'function';
  return forceMount || presence.isPresent ? /*#__PURE__*/$fnLeV$react.cloneElement(child, {
    ref: ref
  }) : null;
};
$a2fa0214bb2735a1$export$99c2b779aa4e8b8b.displayName = 'Presence';
/* -------------------------------------------------------------------------------------------------
 * usePresence
 * -----------------------------------------------------------------------------------------------*/
function $a2fa0214bb2735a1$var$usePresence(present) {
  const [node1, setNode] = $fnLeV$react.useState();
  const stylesRef = $fnLeV$react.useRef({});
  const prevPresentRef = $fnLeV$react.useRef(present);
  const prevAnimationNameRef = $fnLeV$react.useRef('none');
  const initialState = present ? 'mounted' : 'unmounted';
  const [state, send] = $8f63844556d0d3cd$export$3e6543de14f8614f(initialState, {
    mounted: {
      UNMOUNT: 'unmounted',
      ANIMATION_OUT: 'unmountSuspended'
    },
    unmountSuspended: {
      MOUNT: 'mounted',
      ANIMATION_END: 'unmounted'
    },
    unmounted: {
      MOUNT: 'mounted'
    }
  });
  $fnLeV$react.useEffect(() => {
    const currentAnimationName = $a2fa0214bb2735a1$var$getAnimationName(stylesRef.current);
    prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';
  }, [state]);
  $fnLeV$radixuireactuselayouteffect.useLayoutEffect(() => {
    const styles = stylesRef.current;
    const wasPresent = prevPresentRef.current;
    const hasPresentChanged = wasPresent !== present;
    if (hasPresentChanged) {
      const prevAnimationName = prevAnimationNameRef.current;
      const currentAnimationName = $a2fa0214bb2735a1$var$getAnimationName(styles);
      if (present) send('MOUNT');else if (currentAnimationName === 'none' || (styles === null || styles === void 0 ? void 0 : styles.display) === 'none')
        // If there is no exit animation or the element is hidden, animations won't run
        // so we unmount instantly
        send('UNMOUNT');else {
        /**
        * When `present` changes to `false`, we check changes to animation-name to
        * determine whether an animation has started. We chose this approach (reading
        * computed styles) because there is no `animationrun` event and `animationstart`
        * fires after `animation-delay` has expired which would be too late.
        */
        const isAnimating = prevAnimationName !== currentAnimationName;
        if (wasPresent && isAnimating) send('ANIMATION_OUT');else send('UNMOUNT');
      }
      prevPresentRef.current = present;
    }
  }, [present, send]);
  $fnLeV$radixuireactuselayouteffect.useLayoutEffect(() => {
    if (node1) {
      /**
      * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`
      * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we
      * make sure we only trigger ANIMATION_END for the currently active animation.
      */
      const handleAnimationEnd = event => {
        const currentAnimationName = $a2fa0214bb2735a1$var$getAnimationName(stylesRef.current);
        const isCurrentAnimation = currentAnimationName.includes(event.animationName);
        if (event.target === node1 && isCurrentAnimation)
          // With React 18 concurrency this update is applied
          // a frame after the animation ends, creating a flash of visible content.
          // By manually flushing we ensure they sync within a frame, removing the flash.
          $fnLeV$reactdom.flushSync(() => send('ANIMATION_END'));
      };
      const handleAnimationStart = event => {
        if (event.target === node1)
          // if animation occurred, store its name as the previous animation.
          prevAnimationNameRef.current = $a2fa0214bb2735a1$var$getAnimationName(stylesRef.current);
      };
      node1.addEventListener('animationstart', handleAnimationStart);
      node1.addEventListener('animationcancel', handleAnimationEnd);
      node1.addEventListener('animationend', handleAnimationEnd);
      return () => {
        node1.removeEventListener('animationstart', handleAnimationStart);
        node1.removeEventListener('animationcancel', handleAnimationEnd);
        node1.removeEventListener('animationend', handleAnimationEnd);
      };
    } else
      // Transition to the unmounted state if the node is removed prematurely.
      // We avoid doing so during cleanup as the node may change but still exist.
      send('ANIMATION_END');
  }, [node1, send]);
  return {
    isPresent: ['mounted', 'unmountSuspended'].includes(state),
    ref: $fnLeV$react.useCallback(node => {
      if (node) stylesRef.current = getComputedStyle(node);
      setNode(node);
    }, [])
  };
}
/* -----------------------------------------------------------------------------------------------*/
function $a2fa0214bb2735a1$var$getAnimationName(styles) {
  return (styles === null || styles === void 0 ? void 0 : styles.animationName) || 'none';
}

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-primitive/dist/index.js":
/*!*********************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-primitive/dist/index.js ***!
  \*********************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $iMixA$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
var $iMixA$react = __webpack_require__(/*! react */ "react");
var $iMixA$reactdom = __webpack_require__(/*! react-dom */ "react-dom");
var $iMixA$radixuireactslot = __webpack_require__(/*! @radix-ui/react-slot */ "../../../node_modules/@radix-ui/react-slot/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "Primitive", () => $c3def6332c2749a6$export$250ffa63cdc0d034);
$parcel$export(module.exports, "Root", () => $c3def6332c2749a6$export$be92b6f5f03c0fe9);
$parcel$export(module.exports, "dispatchDiscreteCustomEvent", () => $c3def6332c2749a6$export$6d1a0317bde7de7f);
const $c3def6332c2749a6$var$NODES = ['a', 'button', 'div', 'form', 'h2', 'h3', 'img', 'input', 'label', 'li', 'nav', 'ol', 'p', 'span', 'svg', 'ul']; // Temporary while we await merge of this fix:
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
// prettier-ignore
/* -------------------------------------------------------------------------------------------------
 * Primitive
 * -----------------------------------------------------------------------------------------------*/
const $c3def6332c2749a6$export$250ffa63cdc0d034 = $c3def6332c2749a6$var$NODES.reduce((primitive, node) => {
  const Node = /*#__PURE__*/$iMixA$react.forwardRef((props, forwardedRef) => {
    const {
      asChild: asChild,
      ...primitiveProps
    } = props;
    const Comp = asChild ? $iMixA$radixuireactslot.Slot : node;
    $iMixA$react.useEffect(() => {
      window[Symbol.for('radix-ui')] = true;
    }, []);
    return /*#__PURE__*/$iMixA$react.createElement(Comp, $parcel$interopDefault($iMixA$babelruntimehelpersextends)({}, primitiveProps, {
      ref: forwardedRef
    }));
  });
  Node.displayName = `Primitive.${node}`;
  return {
    ...primitive,
    [node]: Node
  };
}, {});
/* -------------------------------------------------------------------------------------------------
 * Utils
 * -----------------------------------------------------------------------------------------------*/ /**
                                                                                                     * Flush custom event dispatch
                                                                                                     * https://github.com/radix-ui/primitives/pull/1378
                                                                                                     *
                                                                                                     * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
                                                                                                     *
                                                                                                     * Internally, React prioritises events in the following order:
                                                                                                     *  - discrete
                                                                                                     *  - continuous
                                                                                                     *  - default
                                                                                                     *
                                                                                                     * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
                                                                                                     *
                                                                                                     * `discrete` is an  important distinction as updates within these events are applied immediately.
                                                                                                     * React however, is not able to infer the priority of custom event types due to how they are detected internally.
                                                                                                     * Because of this, it's possible for updates from custom events to be unexpectedly batched when
                                                                                                     * dispatched by another `discrete` event.
                                                                                                     *
                                                                                                     * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
                                                                                                     * This utility should be used when dispatching a custom event from within another `discrete` event, this utility
                                                                                                     * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
                                                                                                     * For example:
                                                                                                     *
                                                                                                     * dispatching a known click 👎
                                                                                                     * target.dispatchEvent(new Event(‘click’))
                                                                                                     *
                                                                                                     * dispatching a custom type within a non-discrete event 👎
                                                                                                     * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
                                                                                                     *
                                                                                                     * dispatching a custom type within a `discrete` event 👍
                                                                                                     * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
                                                                                                     *
                                                                                                     * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's  not recommended to use
                                                                                                     * this utility with them. This is because it's possible for those handlers to be called implicitly during render
                                                                                                     * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
                                                                                                     */
function $c3def6332c2749a6$export$6d1a0317bde7de7f(target, event) {
  if (target) $iMixA$reactdom.flushSync(() => target.dispatchEvent(event));
}
/* -----------------------------------------------------------------------------------------------*/
const $c3def6332c2749a6$export$be92b6f5f03c0fe9 = $c3def6332c2749a6$export$250ffa63cdc0d034;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-roving-focus/dist/index.js":
/*!************************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-roving-focus/dist/index.js ***!
  \************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $9QJ9Y$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
var $9QJ9Y$react = __webpack_require__(/*! react */ "react");
var $9QJ9Y$radixuiprimitive = __webpack_require__(/*! @radix-ui/primitive */ "../../../node_modules/@radix-ui/primitive/dist/index.js");
var $9QJ9Y$radixuireactcollection = __webpack_require__(/*! @radix-ui/react-collection */ "../../../node_modules/@radix-ui/react-collection/dist/index.js");
var $9QJ9Y$radixuireactcomposerefs = __webpack_require__(/*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
var $9QJ9Y$radixuireactcontext = __webpack_require__(/*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
var $9QJ9Y$radixuireactid = __webpack_require__(/*! @radix-ui/react-id */ "../../../node_modules/@radix-ui/react-id/dist/index.js");
var $9QJ9Y$radixuireactprimitive = __webpack_require__(/*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
var $9QJ9Y$radixuireactusecallbackref = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");
var $9QJ9Y$radixuireactusecontrollablestate = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ "../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js");
var $9QJ9Y$radixuireactdirection = __webpack_require__(/*! @radix-ui/react-direction */ "../../../node_modules/@radix-ui/react-direction/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "createRovingFocusGroupScope", () => $0063afae63b3fa70$export$c7109489551a4f4);
$parcel$export(module.exports, "RovingFocusGroup", () => $0063afae63b3fa70$export$8699f7c8af148338);
$parcel$export(module.exports, "RovingFocusGroupItem", () => $0063afae63b3fa70$export$ab9df7c53fe8454);
$parcel$export(module.exports, "Root", () => $0063afae63b3fa70$export$be92b6f5f03c0fe9);
$parcel$export(module.exports, "Item", () => $0063afae63b3fa70$export$6d08773d2e66f8f2);
const $0063afae63b3fa70$var$ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';
const $0063afae63b3fa70$var$EVENT_OPTIONS = {
  bubbles: false,
  cancelable: true
};
/* -------------------------------------------------------------------------------------------------
 * RovingFocusGroup
 * -----------------------------------------------------------------------------------------------*/
const $0063afae63b3fa70$var$GROUP_NAME = 'RovingFocusGroup';
const [$0063afae63b3fa70$var$Collection, $0063afae63b3fa70$var$useCollection, $0063afae63b3fa70$var$createCollectionScope] = $9QJ9Y$radixuireactcollection.createCollection($0063afae63b3fa70$var$GROUP_NAME);
const [$0063afae63b3fa70$var$createRovingFocusGroupContext, $0063afae63b3fa70$export$c7109489551a4f4] = $9QJ9Y$radixuireactcontext.createContextScope($0063afae63b3fa70$var$GROUP_NAME, [$0063afae63b3fa70$var$createCollectionScope]);
const [$0063afae63b3fa70$var$RovingFocusProvider, $0063afae63b3fa70$var$useRovingFocusContext] = $0063afae63b3fa70$var$createRovingFocusGroupContext($0063afae63b3fa70$var$GROUP_NAME);
const $0063afae63b3fa70$export$8699f7c8af148338 = /*#__PURE__*/$9QJ9Y$react.forwardRef((props, forwardedRef) => {
  return /*#__PURE__*/$9QJ9Y$react.createElement($0063afae63b3fa70$var$Collection.Provider, {
    scope: props.__scopeRovingFocusGroup
  }, /*#__PURE__*/$9QJ9Y$react.createElement($0063afae63b3fa70$var$Collection.Slot, {
    scope: props.__scopeRovingFocusGroup
  }, /*#__PURE__*/$9QJ9Y$react.createElement($0063afae63b3fa70$var$RovingFocusGroupImpl, $parcel$interopDefault($9QJ9Y$babelruntimehelpersextends)({}, props, {
    ref: forwardedRef
  }))));
});
/*#__PURE__*/
Object.assign($0063afae63b3fa70$export$8699f7c8af148338, {
  displayName: $0063afae63b3fa70$var$GROUP_NAME
});
/* -----------------------------------------------------------------------------------------------*/
const $0063afae63b3fa70$var$RovingFocusGroupImpl = /*#__PURE__*/$9QJ9Y$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeRovingFocusGroup: __scopeRovingFocusGroup,
    orientation: orientation,
    loop = false,
    dir: dir,
    currentTabStopId: currentTabStopIdProp,
    defaultCurrentTabStopId: defaultCurrentTabStopId,
    onCurrentTabStopIdChange: onCurrentTabStopIdChange,
    onEntryFocus: onEntryFocus,
    ...groupProps
  } = props;
  const ref = $9QJ9Y$react.useRef(null);
  const composedRefs = $9QJ9Y$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
  const direction = $9QJ9Y$radixuireactdirection.useDirection(dir);
  const [currentTabStopId = null, setCurrentTabStopId] = $9QJ9Y$radixuireactusecontrollablestate.useControllableState({
    prop: currentTabStopIdProp,
    defaultProp: defaultCurrentTabStopId,
    onChange: onCurrentTabStopIdChange
  });
  const [isTabbingBackOut, setIsTabbingBackOut] = $9QJ9Y$react.useState(false);
  const handleEntryFocus = $9QJ9Y$radixuireactusecallbackref.useCallbackRef(onEntryFocus);
  const getItems = $0063afae63b3fa70$var$useCollection(__scopeRovingFocusGroup);
  const isClickFocusRef = $9QJ9Y$react.useRef(false);
  const [focusableItemsCount, setFocusableItemsCount] = $9QJ9Y$react.useState(0);
  $9QJ9Y$react.useEffect(() => {
    const node = ref.current;
    if (node) {
      node.addEventListener($0063afae63b3fa70$var$ENTRY_FOCUS, handleEntryFocus);
      return () => node.removeEventListener($0063afae63b3fa70$var$ENTRY_FOCUS, handleEntryFocus);
    }
  }, [handleEntryFocus]);
  return /*#__PURE__*/$9QJ9Y$react.createElement($0063afae63b3fa70$var$RovingFocusProvider, {
    scope: __scopeRovingFocusGroup,
    orientation: orientation,
    dir: direction,
    loop: loop,
    currentTabStopId: currentTabStopId,
    onItemFocus: $9QJ9Y$react.useCallback(tabStopId => setCurrentTabStopId(tabStopId), [setCurrentTabStopId]),
    onItemShiftTab: $9QJ9Y$react.useCallback(() => setIsTabbingBackOut(true), []),
    onFocusableItemAdd: $9QJ9Y$react.useCallback(() => setFocusableItemsCount(prevCount => prevCount + 1), []),
    onFocusableItemRemove: $9QJ9Y$react.useCallback(() => setFocusableItemsCount(prevCount => prevCount - 1), [])
  }, /*#__PURE__*/$9QJ9Y$react.createElement($9QJ9Y$radixuireactprimitive.Primitive.div, $parcel$interopDefault($9QJ9Y$babelruntimehelpersextends)({
    tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
    "data-orientation": orientation
  }, groupProps, {
    ref: composedRefs,
    style: {
      outline: 'none',
      ...props.style
    },
    onMouseDown: $9QJ9Y$radixuiprimitive.composeEventHandlers(props.onMouseDown, () => {
      isClickFocusRef.current = true;
    }),
    onFocus: $9QJ9Y$radixuiprimitive.composeEventHandlers(props.onFocus, event => {
      // We normally wouldn't need this check, because we already check
      // that the focus is on the current target and not bubbling to it.
      // We do this because Safari doesn't focus buttons when clicked, and
      // instead, the wrapper will get focused and not through a bubbling event.
      const isKeyboardFocus = !isClickFocusRef.current;
      if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
        const entryFocusEvent = new CustomEvent($0063afae63b3fa70$var$ENTRY_FOCUS, $0063afae63b3fa70$var$EVENT_OPTIONS);
        event.currentTarget.dispatchEvent(entryFocusEvent);
        if (!entryFocusEvent.defaultPrevented) {
          const items = getItems().filter(item => item.focusable);
          const activeItem = items.find(item => item.active);
          const currentItem = items.find(item => item.id === currentTabStopId);
          const candidateItems = [activeItem, currentItem, ...items].filter(Boolean);
          const candidateNodes = candidateItems.map(item => item.ref.current);
          $0063afae63b3fa70$var$focusFirst(candidateNodes);
        }
      }
      isClickFocusRef.current = false;
    }),
    onBlur: $9QJ9Y$radixuiprimitive.composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
  })));
});
/* -------------------------------------------------------------------------------------------------
 * RovingFocusGroupItem
 * -----------------------------------------------------------------------------------------------*/
const $0063afae63b3fa70$var$ITEM_NAME = 'RovingFocusGroupItem';
const $0063afae63b3fa70$export$ab9df7c53fe8454 = /*#__PURE__*/$9QJ9Y$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeRovingFocusGroup: __scopeRovingFocusGroup,
    focusable = true,
    active = false,
    tabStopId: tabStopId,
    ...itemProps
  } = props;
  const autoId = $9QJ9Y$radixuireactid.useId();
  const id = tabStopId || autoId;
  const context = $0063afae63b3fa70$var$useRovingFocusContext($0063afae63b3fa70$var$ITEM_NAME, __scopeRovingFocusGroup);
  const isCurrentTabStop = context.currentTabStopId === id;
  const getItems = $0063afae63b3fa70$var$useCollection(__scopeRovingFocusGroup);
  const {
    onFocusableItemAdd: onFocusableItemAdd,
    onFocusableItemRemove: onFocusableItemRemove
  } = context;
  $9QJ9Y$react.useEffect(() => {
    if (focusable) {
      onFocusableItemAdd();
      return () => onFocusableItemRemove();
    }
  }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
  return /*#__PURE__*/$9QJ9Y$react.createElement($0063afae63b3fa70$var$Collection.ItemSlot, {
    scope: __scopeRovingFocusGroup,
    id: id,
    focusable: focusable,
    active: active
  }, /*#__PURE__*/$9QJ9Y$react.createElement($9QJ9Y$radixuireactprimitive.Primitive.span, $parcel$interopDefault($9QJ9Y$babelruntimehelpersextends)({
    tabIndex: isCurrentTabStop ? 0 : -1,
    "data-orientation": context.orientation
  }, itemProps, {
    ref: forwardedRef,
    onMouseDown: $9QJ9Y$radixuiprimitive.composeEventHandlers(props.onMouseDown, event => {
      // We prevent focusing non-focusable items on `mousedown`.
      // Even though the item has tabIndex={-1}, that only means take it out of the tab order.
      if (!focusable) event.preventDefault(); // Safari doesn't focus a button when clicked so we run our logic on mousedown also
      else context.onItemFocus(id);
    }),
    onFocus: $9QJ9Y$radixuiprimitive.composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
    onKeyDown: $9QJ9Y$radixuiprimitive.composeEventHandlers(props.onKeyDown, event => {
      if (event.key === 'Tab' && event.shiftKey) {
        context.onItemShiftTab();
        return;
      }
      if (event.target !== event.currentTarget) return;
      const focusIntent = $0063afae63b3fa70$var$getFocusIntent(event, context.orientation, context.dir);
      if (focusIntent !== undefined) {
        event.preventDefault();
        const items = getItems().filter(item => item.focusable);
        let candidateNodes = items.map(item => item.ref.current);
        if (focusIntent === 'last') candidateNodes.reverse();else if (focusIntent === 'prev' || focusIntent === 'next') {
          if (focusIntent === 'prev') candidateNodes.reverse();
          const currentIndex = candidateNodes.indexOf(event.currentTarget);
          candidateNodes = context.loop ? $0063afae63b3fa70$var$wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
        }
        /**
        * Imperative focus during keydown is risky so we prevent React's batching updates
        * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332
        */
        setTimeout(() => $0063afae63b3fa70$var$focusFirst(candidateNodes));
      }
    })
  })));
});
/*#__PURE__*/
Object.assign($0063afae63b3fa70$export$ab9df7c53fe8454, {
  displayName: $0063afae63b3fa70$var$ITEM_NAME
});
/* -----------------------------------------------------------------------------------------------*/ // prettier-ignore
const $0063afae63b3fa70$var$MAP_KEY_TO_FOCUS_INTENT = {
  ArrowLeft: 'prev',
  ArrowUp: 'prev',
  ArrowRight: 'next',
  ArrowDown: 'next',
  PageUp: 'first',
  Home: 'first',
  PageDown: 'last',
  End: 'last'
};
function $0063afae63b3fa70$var$getDirectionAwareKey(key, dir) {
  if (dir !== 'rtl') return key;
  return key === 'ArrowLeft' ? 'ArrowRight' : key === 'ArrowRight' ? 'ArrowLeft' : key;
}
function $0063afae63b3fa70$var$getFocusIntent(event, orientation, dir) {
  const key = $0063afae63b3fa70$var$getDirectionAwareKey(event.key, dir);
  if (orientation === 'vertical' && ['ArrowLeft', 'ArrowRight'].includes(key)) return undefined;
  if (orientation === 'horizontal' && ['ArrowUp', 'ArrowDown'].includes(key)) return undefined;
  return $0063afae63b3fa70$var$MAP_KEY_TO_FOCUS_INTENT[key];
}
function $0063afae63b3fa70$var$focusFirst(candidates) {
  const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
  for (const candidate of candidates) {
    // if focus is already where we want to go, we don't want to keep going through the candidates
    if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
    candidate.focus();
    if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
  }
}
/**
 * Wraps an array around itself at a given start index
 * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`
 */
function $0063afae63b3fa70$var$wrapArray(array, startIndex) {
  return array.map((_, index) => array[(startIndex + index) % array.length]);
}
const $0063afae63b3fa70$export$be92b6f5f03c0fe9 = $0063afae63b3fa70$export$8699f7c8af148338;
const $0063afae63b3fa70$export$6d08773d2e66f8f2 = $0063afae63b3fa70$export$ab9df7c53fe8454;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-slot/dist/index.js":
/*!****************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-slot/dist/index.js ***!
  \****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $dAvBt$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
var $dAvBt$react = __webpack_require__(/*! react */ "react");
var $dAvBt$radixuireactcomposerefs = __webpack_require__(/*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "Slot", () => $82dc8d030dec7549$export$8c6ed5c666ac1360);
$parcel$export(module.exports, "Slottable", () => $82dc8d030dec7549$export$d9f1ccf0bdb05d45);
$parcel$export(module.exports, "Root", () => $82dc8d030dec7549$export$be92b6f5f03c0fe9);

/* -------------------------------------------------------------------------------------------------
 * Slot
 * -----------------------------------------------------------------------------------------------*/
const $82dc8d030dec7549$export$8c6ed5c666ac1360 = /*#__PURE__*/$dAvBt$react.forwardRef((props, forwardedRef) => {
  const {
    children: children,
    ...slotProps
  } = props;
  const childrenArray = $dAvBt$react.Children.toArray(children);
  const slottable = childrenArray.find($82dc8d030dec7549$var$isSlottable);
  if (slottable) {
    // the new element to render is the one passed as a child of `Slottable`
    const newElement = slottable.props.children;
    const newChildren = childrenArray.map(child => {
      if (child === slottable) {
        // because the new element will be the one rendered, we are only interested
        // in grabbing its children (`newElement.props.children`)
        if ($dAvBt$react.Children.count(newElement) > 1) return $dAvBt$react.Children.only(null);
        return /*#__PURE__*/$dAvBt$react.isValidElement(newElement) ? newElement.props.children : null;
      } else return child;
    });
    return /*#__PURE__*/$dAvBt$react.createElement($82dc8d030dec7549$var$SlotClone, $parcel$interopDefault($dAvBt$babelruntimehelpersextends)({}, slotProps, {
      ref: forwardedRef
    }), /*#__PURE__*/$dAvBt$react.isValidElement(newElement) ? /*#__PURE__*/$dAvBt$react.cloneElement(newElement, undefined, newChildren) : null);
  }
  return /*#__PURE__*/$dAvBt$react.createElement($82dc8d030dec7549$var$SlotClone, $parcel$interopDefault($dAvBt$babelruntimehelpersextends)({}, slotProps, {
    ref: forwardedRef
  }), children);
});
$82dc8d030dec7549$export$8c6ed5c666ac1360.displayName = 'Slot';
/* -------------------------------------------------------------------------------------------------
 * SlotClone
 * -----------------------------------------------------------------------------------------------*/
const $82dc8d030dec7549$var$SlotClone = /*#__PURE__*/$dAvBt$react.forwardRef((props, forwardedRef) => {
  const {
    children: children,
    ...slotProps
  } = props;
  if ( /*#__PURE__*/$dAvBt$react.isValidElement(children)) return /*#__PURE__*/$dAvBt$react.cloneElement(children, {
    ...$82dc8d030dec7549$var$mergeProps(slotProps, children.props),
    ref: forwardedRef ? $dAvBt$radixuireactcomposerefs.composeRefs(forwardedRef, children.ref) : children.ref
  });
  return $dAvBt$react.Children.count(children) > 1 ? $dAvBt$react.Children.only(null) : null;
});
$82dc8d030dec7549$var$SlotClone.displayName = 'SlotClone';
/* -------------------------------------------------------------------------------------------------
 * Slottable
 * -----------------------------------------------------------------------------------------------*/
const $82dc8d030dec7549$export$d9f1ccf0bdb05d45 = _ref => {
  let {
    children: children
  } = _ref;
  return /*#__PURE__*/$dAvBt$react.createElement($dAvBt$react.Fragment, null, children);
};
/* ---------------------------------------------------------------------------------------------- */
function $82dc8d030dec7549$var$isSlottable(child) {
  return /*#__PURE__*/$dAvBt$react.isValidElement(child) && child.type === $82dc8d030dec7549$export$d9f1ccf0bdb05d45;
}
function $82dc8d030dec7549$var$mergeProps(slotProps, childProps) {
  // all child props should override
  const overrideProps = {
    ...childProps
  };
  for (const propName in childProps) {
    const slotPropValue = slotProps[propName];
    const childPropValue = childProps[propName];
    const isHandler = /^on[A-Z]/.test(propName);
    if (isHandler) {
      // if the handler exists on both, we compose them
      if (slotPropValue && childPropValue) overrideProps[propName] = function () {
        childPropValue(...arguments);
        slotPropValue(...arguments);
      };else if (slotPropValue) overrideProps[propName] = slotPropValue;
    } else if (propName === 'style') overrideProps[propName] = {
      ...slotPropValue,
      ...childPropValue
    };else if (propName === 'className') overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');
  }
  return {
    ...slotProps,
    ...overrideProps
  };
}
const $82dc8d030dec7549$export$be92b6f5f03c0fe9 = $82dc8d030dec7549$export$8c6ed5c666ac1360;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-tooltip/dist/index.js":
/*!*******************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-tooltip/dist/index.js ***!
  \*******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $iVrL9$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
var $iVrL9$react = __webpack_require__(/*! react */ "react");
var $iVrL9$radixuiprimitive = __webpack_require__(/*! @radix-ui/primitive */ "../../../node_modules/@radix-ui/primitive/dist/index.js");
var $iVrL9$radixuireactcomposerefs = __webpack_require__(/*! @radix-ui/react-compose-refs */ "../../../node_modules/@radix-ui/react-compose-refs/dist/index.js");
var $iVrL9$radixuireactcontext = __webpack_require__(/*! @radix-ui/react-context */ "../../../node_modules/@radix-ui/react-context/dist/index.js");
var $iVrL9$radixuireactdismissablelayer = __webpack_require__(/*! @radix-ui/react-dismissable-layer */ "../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.js");
var $iVrL9$radixuireactid = __webpack_require__(/*! @radix-ui/react-id */ "../../../node_modules/@radix-ui/react-id/dist/index.js");
var $iVrL9$radixuireactpopper = __webpack_require__(/*! @radix-ui/react-popper */ "../../../node_modules/@radix-ui/react-popper/dist/index.js");
var $iVrL9$radixuireactportal = __webpack_require__(/*! @radix-ui/react-portal */ "../../../node_modules/@radix-ui/react-portal/dist/index.js");
var $iVrL9$radixuireactpresence = __webpack_require__(/*! @radix-ui/react-presence */ "../../../node_modules/@radix-ui/react-presence/dist/index.js");
var $iVrL9$radixuireactprimitive = __webpack_require__(/*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
var $iVrL9$radixuireactslot = __webpack_require__(/*! @radix-ui/react-slot */ "../../../node_modules/@radix-ui/react-slot/dist/index.js");
var $iVrL9$radixuireactusecontrollablestate = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ "../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js");
var $iVrL9$radixuireactvisuallyhidden = __webpack_require__(/*! @radix-ui/react-visually-hidden */ "../../../node_modules/@radix-ui/react-visually-hidden/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "createTooltipScope", () => $c34afbc43c90cc6f$export$1c540a2224f0d865);
$parcel$export(module.exports, "TooltipProvider", () => $c34afbc43c90cc6f$export$f78649fb9ca566b8);
$parcel$export(module.exports, "Tooltip", () => $c34afbc43c90cc6f$export$28c660c63b792dea);
$parcel$export(module.exports, "TooltipTrigger", () => $c34afbc43c90cc6f$export$8c610744efcf8a1d);
$parcel$export(module.exports, "TooltipPortal", () => $c34afbc43c90cc6f$export$7b36b8f925ab7497);
$parcel$export(module.exports, "TooltipContent", () => $c34afbc43c90cc6f$export$e9003e2be37ec060);
$parcel$export(module.exports, "TooltipArrow", () => $c34afbc43c90cc6f$export$c27ee0ad710f7559);
$parcel$export(module.exports, "Provider", () => $c34afbc43c90cc6f$export$2881499e37b75b9a);
$parcel$export(module.exports, "Root", () => $c34afbc43c90cc6f$export$be92b6f5f03c0fe9);
$parcel$export(module.exports, "Trigger", () => $c34afbc43c90cc6f$export$41fb9f06171c75f4);
$parcel$export(module.exports, "Portal", () => $c34afbc43c90cc6f$export$602eac185826482c);
$parcel$export(module.exports, "Content", () => $c34afbc43c90cc6f$export$7c6e2c02157bb7d2);
$parcel$export(module.exports, "Arrow", () => $c34afbc43c90cc6f$export$21b07c8f274aebd5);
const [$c34afbc43c90cc6f$var$createTooltipContext, $c34afbc43c90cc6f$export$1c540a2224f0d865] = $iVrL9$radixuireactcontext.createContextScope('Tooltip', [$iVrL9$radixuireactpopper.createPopperScope]);
const $c34afbc43c90cc6f$var$usePopperScope = $iVrL9$radixuireactpopper.createPopperScope();
/* -------------------------------------------------------------------------------------------------
 * TooltipProvider
 * -----------------------------------------------------------------------------------------------*/
const $c34afbc43c90cc6f$var$PROVIDER_NAME = 'TooltipProvider';
const $c34afbc43c90cc6f$var$DEFAULT_DELAY_DURATION = 700;
const $c34afbc43c90cc6f$var$TOOLTIP_OPEN = 'tooltip.open';
const [$c34afbc43c90cc6f$var$TooltipProviderContextProvider, $c34afbc43c90cc6f$var$useTooltipProviderContext] = $c34afbc43c90cc6f$var$createTooltipContext($c34afbc43c90cc6f$var$PROVIDER_NAME);
const $c34afbc43c90cc6f$export$f78649fb9ca566b8 = props => {
  const {
    __scopeTooltip: __scopeTooltip,
    delayDuration = $c34afbc43c90cc6f$var$DEFAULT_DELAY_DURATION,
    skipDelayDuration = 300,
    disableHoverableContent = false,
    children: children
  } = props;
  const [isOpenDelayed, setIsOpenDelayed] = $iVrL9$react.useState(true);
  const isPointerInTransitRef = $iVrL9$react.useRef(false);
  const skipDelayTimerRef = $iVrL9$react.useRef(0);
  $iVrL9$react.useEffect(() => {
    const skipDelayTimer = skipDelayTimerRef.current;
    return () => window.clearTimeout(skipDelayTimer);
  }, []);
  return /*#__PURE__*/$iVrL9$react.createElement($c34afbc43c90cc6f$var$TooltipProviderContextProvider, {
    scope: __scopeTooltip,
    isOpenDelayed: isOpenDelayed,
    delayDuration: delayDuration,
    onOpen: $iVrL9$react.useCallback(() => {
      window.clearTimeout(skipDelayTimerRef.current);
      setIsOpenDelayed(false);
    }, []),
    onClose: $iVrL9$react.useCallback(() => {
      window.clearTimeout(skipDelayTimerRef.current);
      skipDelayTimerRef.current = window.setTimeout(() => setIsOpenDelayed(true), skipDelayDuration);
    }, [skipDelayDuration]),
    isPointerInTransitRef: isPointerInTransitRef,
    onPointerInTransitChange: $iVrL9$react.useCallback(inTransit => {
      isPointerInTransitRef.current = inTransit;
    }, []),
    disableHoverableContent: disableHoverableContent
  }, children);
};
/*#__PURE__*/
Object.assign($c34afbc43c90cc6f$export$f78649fb9ca566b8, {
  displayName: $c34afbc43c90cc6f$var$PROVIDER_NAME
});
/* -------------------------------------------------------------------------------------------------
 * Tooltip
 * -----------------------------------------------------------------------------------------------*/
const $c34afbc43c90cc6f$var$TOOLTIP_NAME = 'Tooltip';
const [$c34afbc43c90cc6f$var$TooltipContextProvider, $c34afbc43c90cc6f$var$useTooltipContext] = $c34afbc43c90cc6f$var$createTooltipContext($c34afbc43c90cc6f$var$TOOLTIP_NAME);
const $c34afbc43c90cc6f$export$28c660c63b792dea = props => {
  const {
    __scopeTooltip: __scopeTooltip,
    children: children,
    open: openProp,
    defaultOpen = false,
    onOpenChange: onOpenChange,
    disableHoverableContent: disableHoverableContentProp,
    delayDuration: delayDurationProp
  } = props;
  const providerContext = $c34afbc43c90cc6f$var$useTooltipProviderContext($c34afbc43c90cc6f$var$TOOLTIP_NAME, props.__scopeTooltip);
  const popperScope = $c34afbc43c90cc6f$var$usePopperScope(__scopeTooltip);
  const [trigger, setTrigger] = $iVrL9$react.useState(null);
  const contentId = $iVrL9$radixuireactid.useId();
  const openTimerRef = $iVrL9$react.useRef(0);
  const disableHoverableContent = disableHoverableContentProp !== null && disableHoverableContentProp !== void 0 ? disableHoverableContentProp : providerContext.disableHoverableContent;
  const delayDuration = delayDurationProp !== null && delayDurationProp !== void 0 ? delayDurationProp : providerContext.delayDuration;
  const wasOpenDelayedRef = $iVrL9$react.useRef(false);
  const [open1 = false, setOpen] = $iVrL9$radixuireactusecontrollablestate.useControllableState({
    prop: openProp,
    defaultProp: defaultOpen,
    onChange: open => {
      if (open) {
        providerContext.onOpen(); // as `onChange` is called within a lifecycle method we
        // avoid dispatching via `dispatchDiscreteCustomEvent`.
        document.dispatchEvent(new CustomEvent($c34afbc43c90cc6f$var$TOOLTIP_OPEN));
      } else providerContext.onClose();
      onOpenChange === null || onOpenChange === void 0 || onOpenChange(open);
    }
  });
  const stateAttribute = $iVrL9$react.useMemo(() => {
    return open1 ? wasOpenDelayedRef.current ? 'delayed-open' : 'instant-open' : 'closed';
  }, [open1]);
  const handleOpen = $iVrL9$react.useCallback(() => {
    window.clearTimeout(openTimerRef.current);
    wasOpenDelayedRef.current = false;
    setOpen(true);
  }, [setOpen]);
  const handleClose = $iVrL9$react.useCallback(() => {
    window.clearTimeout(openTimerRef.current);
    setOpen(false);
  }, [setOpen]);
  const handleDelayedOpen = $iVrL9$react.useCallback(() => {
    window.clearTimeout(openTimerRef.current);
    openTimerRef.current = window.setTimeout(() => {
      wasOpenDelayedRef.current = true;
      setOpen(true);
    }, delayDuration);
  }, [delayDuration, setOpen]);
  $iVrL9$react.useEffect(() => {
    return () => window.clearTimeout(openTimerRef.current);
  }, []);
  return /*#__PURE__*/$iVrL9$react.createElement($iVrL9$radixuireactpopper.Root, popperScope, /*#__PURE__*/$iVrL9$react.createElement($c34afbc43c90cc6f$var$TooltipContextProvider, {
    scope: __scopeTooltip,
    contentId: contentId,
    open: open1,
    stateAttribute: stateAttribute,
    trigger: trigger,
    onTriggerChange: setTrigger,
    onTriggerEnter: $iVrL9$react.useCallback(() => {
      if (providerContext.isOpenDelayed) handleDelayedOpen();else handleOpen();
    }, [providerContext.isOpenDelayed, handleDelayedOpen, handleOpen]),
    onTriggerLeave: $iVrL9$react.useCallback(() => {
      if (disableHoverableContent) handleClose();else
        // Clear the timer in case the pointer leaves the trigger before the tooltip is opened.
        window.clearTimeout(openTimerRef.current);
    }, [handleClose, disableHoverableContent]),
    onOpen: handleOpen,
    onClose: handleClose,
    disableHoverableContent: disableHoverableContent
  }, children));
};
/*#__PURE__*/
Object.assign($c34afbc43c90cc6f$export$28c660c63b792dea, {
  displayName: $c34afbc43c90cc6f$var$TOOLTIP_NAME
});
/* -------------------------------------------------------------------------------------------------
 * TooltipTrigger
 * -----------------------------------------------------------------------------------------------*/
const $c34afbc43c90cc6f$var$TRIGGER_NAME = 'TooltipTrigger';
const $c34afbc43c90cc6f$export$8c610744efcf8a1d = /*#__PURE__*/$iVrL9$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeTooltip: __scopeTooltip,
    ...triggerProps
  } = props;
  const context = $c34afbc43c90cc6f$var$useTooltipContext($c34afbc43c90cc6f$var$TRIGGER_NAME, __scopeTooltip);
  const providerContext = $c34afbc43c90cc6f$var$useTooltipProviderContext($c34afbc43c90cc6f$var$TRIGGER_NAME, __scopeTooltip);
  const popperScope = $c34afbc43c90cc6f$var$usePopperScope(__scopeTooltip);
  const ref = $iVrL9$react.useRef(null);
  const composedRefs = $iVrL9$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref, context.onTriggerChange);
  const isPointerDownRef = $iVrL9$react.useRef(false);
  const hasPointerMoveOpenedRef = $iVrL9$react.useRef(false);
  const handlePointerUp = $iVrL9$react.useCallback(() => isPointerDownRef.current = false, []);
  $iVrL9$react.useEffect(() => {
    return () => document.removeEventListener('pointerup', handlePointerUp);
  }, [handlePointerUp]);
  return /*#__PURE__*/$iVrL9$react.createElement($iVrL9$radixuireactpopper.Anchor, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({
    asChild: true
  }, popperScope), /*#__PURE__*/$iVrL9$react.createElement($iVrL9$radixuireactprimitive.Primitive.button, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({
    // We purposefully avoid adding `type=button` here because tooltip triggers are also
    // commonly anchors and the anchor `type` attribute signifies MIME type.
    "aria-describedby": context.open ? context.contentId : undefined,
    "data-state": context.stateAttribute
  }, triggerProps, {
    ref: composedRefs,
    onPointerMove: $iVrL9$radixuiprimitive.composeEventHandlers(props.onPointerMove, event => {
      if (event.pointerType === 'touch') return;
      if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {
        context.onTriggerEnter();
        hasPointerMoveOpenedRef.current = true;
      }
    }),
    onPointerLeave: $iVrL9$radixuiprimitive.composeEventHandlers(props.onPointerLeave, () => {
      context.onTriggerLeave();
      hasPointerMoveOpenedRef.current = false;
    }),
    onPointerDown: $iVrL9$radixuiprimitive.composeEventHandlers(props.onPointerDown, () => {
      isPointerDownRef.current = true;
      document.addEventListener('pointerup', handlePointerUp, {
        once: true
      });
    }),
    onFocus: $iVrL9$radixuiprimitive.composeEventHandlers(props.onFocus, () => {
      if (!isPointerDownRef.current) context.onOpen();
    }),
    onBlur: $iVrL9$radixuiprimitive.composeEventHandlers(props.onBlur, context.onClose),
    onClick: $iVrL9$radixuiprimitive.composeEventHandlers(props.onClick, context.onClose)
  })));
});
/*#__PURE__*/
Object.assign($c34afbc43c90cc6f$export$8c610744efcf8a1d, {
  displayName: $c34afbc43c90cc6f$var$TRIGGER_NAME
});
/* -------------------------------------------------------------------------------------------------
 * TooltipPortal
 * -----------------------------------------------------------------------------------------------*/
const $c34afbc43c90cc6f$var$PORTAL_NAME = 'TooltipPortal';
const [$c34afbc43c90cc6f$var$PortalProvider, $c34afbc43c90cc6f$var$usePortalContext] = $c34afbc43c90cc6f$var$createTooltipContext($c34afbc43c90cc6f$var$PORTAL_NAME, {
  forceMount: undefined
});
const $c34afbc43c90cc6f$export$7b36b8f925ab7497 = props => {
  const {
    __scopeTooltip: __scopeTooltip,
    forceMount: forceMount,
    children: children,
    container: container
  } = props;
  const context = $c34afbc43c90cc6f$var$useTooltipContext($c34afbc43c90cc6f$var$PORTAL_NAME, __scopeTooltip);
  return /*#__PURE__*/$iVrL9$react.createElement($c34afbc43c90cc6f$var$PortalProvider, {
    scope: __scopeTooltip,
    forceMount: forceMount
  }, /*#__PURE__*/$iVrL9$react.createElement($iVrL9$radixuireactpresence.Presence, {
    present: forceMount || context.open
  }, /*#__PURE__*/$iVrL9$react.createElement($iVrL9$radixuireactportal.Portal, {
    asChild: true,
    container: container
  }, children)));
};
/*#__PURE__*/
Object.assign($c34afbc43c90cc6f$export$7b36b8f925ab7497, {
  displayName: $c34afbc43c90cc6f$var$PORTAL_NAME
});
/* -------------------------------------------------------------------------------------------------
 * TooltipContent
 * -----------------------------------------------------------------------------------------------*/
const $c34afbc43c90cc6f$var$CONTENT_NAME = 'TooltipContent';
const $c34afbc43c90cc6f$export$e9003e2be37ec060 = /*#__PURE__*/$iVrL9$react.forwardRef((props, forwardedRef) => {
  const portalContext = $c34afbc43c90cc6f$var$usePortalContext($c34afbc43c90cc6f$var$CONTENT_NAME, props.__scopeTooltip);
  const {
    forceMount = portalContext.forceMount,
    side = 'top',
    ...contentProps
  } = props;
  const context = $c34afbc43c90cc6f$var$useTooltipContext($c34afbc43c90cc6f$var$CONTENT_NAME, props.__scopeTooltip);
  return /*#__PURE__*/$iVrL9$react.createElement($iVrL9$radixuireactpresence.Presence, {
    present: forceMount || context.open
  }, context.disableHoverableContent ? /*#__PURE__*/$iVrL9$react.createElement($c34afbc43c90cc6f$var$TooltipContentImpl, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({
    side: side
  }, contentProps, {
    ref: forwardedRef
  })) : /*#__PURE__*/$iVrL9$react.createElement($c34afbc43c90cc6f$var$TooltipContentHoverable, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({
    side: side
  }, contentProps, {
    ref: forwardedRef
  })));
});
const $c34afbc43c90cc6f$var$TooltipContentHoverable = /*#__PURE__*/$iVrL9$react.forwardRef((props, forwardedRef) => {
  const context = $c34afbc43c90cc6f$var$useTooltipContext($c34afbc43c90cc6f$var$CONTENT_NAME, props.__scopeTooltip);
  const providerContext = $c34afbc43c90cc6f$var$useTooltipProviderContext($c34afbc43c90cc6f$var$CONTENT_NAME, props.__scopeTooltip);
  const ref = $iVrL9$react.useRef(null);
  const composedRefs = $iVrL9$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);
  const [pointerGraceArea, setPointerGraceArea] = $iVrL9$react.useState(null);
  const {
    trigger: trigger,
    onClose: onClose
  } = context;
  const content = ref.current;
  const {
    onPointerInTransitChange: onPointerInTransitChange
  } = providerContext;
  const handleRemoveGraceArea = $iVrL9$react.useCallback(() => {
    setPointerGraceArea(null);
    onPointerInTransitChange(false);
  }, [onPointerInTransitChange]);
  const handleCreateGraceArea = $iVrL9$react.useCallback((event, hoverTarget) => {
    const currentTarget = event.currentTarget;
    const exitPoint = {
      x: event.clientX,
      y: event.clientY
    };
    const exitSide = $c34afbc43c90cc6f$var$getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());
    const paddedExitPoints = $c34afbc43c90cc6f$var$getPaddedExitPoints(exitPoint, exitSide);
    const hoverTargetPoints = $c34afbc43c90cc6f$var$getPointsFromRect(hoverTarget.getBoundingClientRect());
    const graceArea = $c34afbc43c90cc6f$var$getHull([...paddedExitPoints, ...hoverTargetPoints]);
    setPointerGraceArea(graceArea);
    onPointerInTransitChange(true);
  }, [onPointerInTransitChange]);
  $iVrL9$react.useEffect(() => {
    return () => handleRemoveGraceArea();
  }, [handleRemoveGraceArea]);
  $iVrL9$react.useEffect(() => {
    if (trigger && content) {
      const handleTriggerLeave = event => handleCreateGraceArea(event, content);
      const handleContentLeave = event => handleCreateGraceArea(event, trigger);
      trigger.addEventListener('pointerleave', handleTriggerLeave);
      content.addEventListener('pointerleave', handleContentLeave);
      return () => {
        trigger.removeEventListener('pointerleave', handleTriggerLeave);
        content.removeEventListener('pointerleave', handleContentLeave);
      };
    }
  }, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);
  $iVrL9$react.useEffect(() => {
    if (pointerGraceArea) {
      const handleTrackPointerGrace = event => {
        const target = event.target;
        const pointerPosition = {
          x: event.clientX,
          y: event.clientY
        };
        const hasEnteredTarget = (trigger === null || trigger === void 0 ? void 0 : trigger.contains(target)) || (content === null || content === void 0 ? void 0 : content.contains(target));
        const isPointerOutsideGraceArea = !$c34afbc43c90cc6f$var$isPointInPolygon(pointerPosition, pointerGraceArea);
        if (hasEnteredTarget) handleRemoveGraceArea();else if (isPointerOutsideGraceArea) {
          handleRemoveGraceArea();
          onClose();
        }
      };
      document.addEventListener('pointermove', handleTrackPointerGrace);
      return () => document.removeEventListener('pointermove', handleTrackPointerGrace);
    }
  }, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
  return /*#__PURE__*/$iVrL9$react.createElement($c34afbc43c90cc6f$var$TooltipContentImpl, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({}, props, {
    ref: composedRefs
  }));
});
const [$c34afbc43c90cc6f$var$VisuallyHiddenContentContextProvider, $c34afbc43c90cc6f$var$useVisuallyHiddenContentContext] = $c34afbc43c90cc6f$var$createTooltipContext($c34afbc43c90cc6f$var$TOOLTIP_NAME, {
  isInside: false
});
const $c34afbc43c90cc6f$var$TooltipContentImpl = /*#__PURE__*/$iVrL9$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeTooltip: __scopeTooltip,
    children: children,
    'aria-label': ariaLabel,
    onEscapeKeyDown: onEscapeKeyDown,
    onPointerDownOutside: onPointerDownOutside,
    ...contentProps
  } = props;
  const context = $c34afbc43c90cc6f$var$useTooltipContext($c34afbc43c90cc6f$var$CONTENT_NAME, __scopeTooltip);
  const popperScope = $c34afbc43c90cc6f$var$usePopperScope(__scopeTooltip);
  const {
    onClose: onClose
  } = context; // Close this tooltip if another one opens
  $iVrL9$react.useEffect(() => {
    document.addEventListener($c34afbc43c90cc6f$var$TOOLTIP_OPEN, onClose);
    return () => document.removeEventListener($c34afbc43c90cc6f$var$TOOLTIP_OPEN, onClose);
  }, [onClose]); // Close the tooltip if the trigger is scrolled
  $iVrL9$react.useEffect(() => {
    if (context.trigger) {
      const handleScroll = event => {
        const target = event.target;
        if (target !== null && target !== void 0 && target.contains(context.trigger)) onClose();
      };
      window.addEventListener('scroll', handleScroll, {
        capture: true
      });
      return () => window.removeEventListener('scroll', handleScroll, {
        capture: true
      });
    }
  }, [context.trigger, onClose]);
  return /*#__PURE__*/$iVrL9$react.createElement($iVrL9$radixuireactdismissablelayer.DismissableLayer, {
    asChild: true,
    disableOutsidePointerEvents: false,
    onEscapeKeyDown: onEscapeKeyDown,
    onPointerDownOutside: onPointerDownOutside,
    onFocusOutside: event => event.preventDefault(),
    onDismiss: onClose
  }, /*#__PURE__*/$iVrL9$react.createElement($iVrL9$radixuireactpopper.Content, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({
    "data-state": context.stateAttribute
  }, popperScope, contentProps, {
    ref: forwardedRef,
    style: {
      ...contentProps.style,
      '--radix-tooltip-content-transform-origin': 'var(--radix-popper-transform-origin)',
      '--radix-tooltip-content-available-width': 'var(--radix-popper-available-width)',
      '--radix-tooltip-content-available-height': 'var(--radix-popper-available-height)',
      '--radix-tooltip-trigger-width': 'var(--radix-popper-anchor-width)',
      '--radix-tooltip-trigger-height': 'var(--radix-popper-anchor-height)'
    }
  }), /*#__PURE__*/$iVrL9$react.createElement($iVrL9$radixuireactslot.Slottable, null, children), /*#__PURE__*/$iVrL9$react.createElement($c34afbc43c90cc6f$var$VisuallyHiddenContentContextProvider, {
    scope: __scopeTooltip,
    isInside: true
  }, /*#__PURE__*/$iVrL9$react.createElement($iVrL9$radixuireactvisuallyhidden.Root, {
    id: context.contentId,
    role: "tooltip"
  }, ariaLabel || children))));
});
/*#__PURE__*/
Object.assign($c34afbc43c90cc6f$export$e9003e2be37ec060, {
  displayName: $c34afbc43c90cc6f$var$CONTENT_NAME
});
/* -------------------------------------------------------------------------------------------------
 * TooltipArrow
 * -----------------------------------------------------------------------------------------------*/
const $c34afbc43c90cc6f$var$ARROW_NAME = 'TooltipArrow';
const $c34afbc43c90cc6f$export$c27ee0ad710f7559 = /*#__PURE__*/$iVrL9$react.forwardRef((props, forwardedRef) => {
  const {
    __scopeTooltip: __scopeTooltip,
    ...arrowProps
  } = props;
  const popperScope = $c34afbc43c90cc6f$var$usePopperScope(__scopeTooltip);
  const visuallyHiddenContentContext = $c34afbc43c90cc6f$var$useVisuallyHiddenContentContext($c34afbc43c90cc6f$var$ARROW_NAME, __scopeTooltip); // if the arrow is inside the `VisuallyHidden`, we don't want to render it all to
  // prevent issues in positioning the arrow due to the duplicate
  return visuallyHiddenContentContext.isInside ? null : /*#__PURE__*/$iVrL9$react.createElement($iVrL9$radixuireactpopper.Arrow, $parcel$interopDefault($iVrL9$babelruntimehelpersextends)({}, popperScope, arrowProps, {
    ref: forwardedRef
  }));
});
/*#__PURE__*/
Object.assign($c34afbc43c90cc6f$export$c27ee0ad710f7559, {
  displayName: $c34afbc43c90cc6f$var$ARROW_NAME
});
/* -----------------------------------------------------------------------------------------------*/
function $c34afbc43c90cc6f$var$getExitSideFromRect(point, rect) {
  const top = Math.abs(rect.top - point.y);
  const bottom = Math.abs(rect.bottom - point.y);
  const right = Math.abs(rect.right - point.x);
  const left = Math.abs(rect.left - point.x);
  switch (Math.min(top, bottom, right, left)) {
    case left:
      return 'left';
    case right:
      return 'right';
    case top:
      return 'top';
    case bottom:
      return 'bottom';
    default:
      throw new Error('unreachable');
  }
}
function $c34afbc43c90cc6f$var$getPaddedExitPoints(exitPoint, exitSide) {
  let padding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  const paddedExitPoints = [];
  switch (exitSide) {
    case 'top':
      paddedExitPoints.push({
        x: exitPoint.x - padding,
        y: exitPoint.y + padding
      }, {
        x: exitPoint.x + padding,
        y: exitPoint.y + padding
      });
      break;
    case 'bottom':
      paddedExitPoints.push({
        x: exitPoint.x - padding,
        y: exitPoint.y - padding
      }, {
        x: exitPoint.x + padding,
        y: exitPoint.y - padding
      });
      break;
    case 'left':
      paddedExitPoints.push({
        x: exitPoint.x + padding,
        y: exitPoint.y - padding
      }, {
        x: exitPoint.x + padding,
        y: exitPoint.y + padding
      });
      break;
    case 'right':
      paddedExitPoints.push({
        x: exitPoint.x - padding,
        y: exitPoint.y - padding
      }, {
        x: exitPoint.x - padding,
        y: exitPoint.y + padding
      });
      break;
  }
  return paddedExitPoints;
}
function $c34afbc43c90cc6f$var$getPointsFromRect(rect) {
  const {
    top: top,
    right: right,
    bottom: bottom,
    left: left
  } = rect;
  return [{
    x: left,
    y: top
  }, {
    x: right,
    y: top
  }, {
    x: right,
    y: bottom
  }, {
    x: left,
    y: bottom
  }];
} // Determine if a point is inside of a polygon.
// Based on https://github.com/substack/point-in-polygon
function $c34afbc43c90cc6f$var$isPointInPolygon(point, polygon) {
  const {
    x: x,
    y: y
  } = point;
  let inside = false;
  for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
    const xi = polygon[i].x;
    const yi = polygon[i].y;
    const xj = polygon[j].x;
    const yj = polygon[j].y; // prettier-ignore
    const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
    if (intersect) inside = !inside;
  }
  return inside;
} // Returns a new array of points representing the convex hull of the given set of points.
// https://www.nayuki.io/page/convex-hull-algorithm
function $c34afbc43c90cc6f$var$getHull(points) {
  const newPoints = points.slice();
  newPoints.sort((a, b) => {
    if (a.x < b.x) return -1;else if (a.x > b.x) return 1;else if (a.y < b.y) return -1;else if (a.y > b.y) return 1;else return 0;
  });
  return $c34afbc43c90cc6f$var$getHullPresorted(newPoints);
} // Returns the convex hull, assuming that each points[i] <= points[i + 1]. Runs in O(n) time.
function $c34afbc43c90cc6f$var$getHullPresorted(points) {
  if (points.length <= 1) return points.slice();
  const upperHull = [];
  for (let i = 0; i < points.length; i++) {
    const p = points[i];
    while (upperHull.length >= 2) {
      const q = upperHull[upperHull.length - 1];
      const r = upperHull[upperHull.length - 2];
      if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop();else break;
    }
    upperHull.push(p);
  }
  upperHull.pop();
  const lowerHull = [];
  for (let i1 = points.length - 1; i1 >= 0; i1--) {
    const p = points[i1];
    while (lowerHull.length >= 2) {
      const q = lowerHull[lowerHull.length - 1];
      const r = lowerHull[lowerHull.length - 2];
      if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop();else break;
    }
    lowerHull.push(p);
  }
  lowerHull.pop();
  if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) return upperHull;else return upperHull.concat(lowerHull);
}
const $c34afbc43c90cc6f$export$2881499e37b75b9a = $c34afbc43c90cc6f$export$f78649fb9ca566b8;
const $c34afbc43c90cc6f$export$be92b6f5f03c0fe9 = $c34afbc43c90cc6f$export$28c660c63b792dea;
const $c34afbc43c90cc6f$export$41fb9f06171c75f4 = $c34afbc43c90cc6f$export$8c610744efcf8a1d;
const $c34afbc43c90cc6f$export$602eac185826482c = $c34afbc43c90cc6f$export$7b36b8f925ab7497;
const $c34afbc43c90cc6f$export$7c6e2c02157bb7d2 = $c34afbc43c90cc6f$export$e9003e2be37ec060;
const $c34afbc43c90cc6f$export$21b07c8f274aebd5 = $c34afbc43c90cc6f$export$c27ee0ad710f7559;

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js":
/*!****************************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js ***!
  \****************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $92muK$react = __webpack_require__(/*! react */ "react");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
$parcel$export(module.exports, "useCallbackRef", () => $28e03942f763e819$export$25bec8c6f54ee79a);

/**
 * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
 * prop or avoid re-executing effects when passed as a dependency
 */
function $28e03942f763e819$export$25bec8c6f54ee79a(callback) {
  const callbackRef = $92muK$react.useRef(callback);
  $92muK$react.useEffect(() => {
    callbackRef.current = callback;
  }); // https://github.com/facebook/react/issues/19240
  return $92muK$react.useMemo(() => function () {
    var _callbackRef$current;
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
  }, []);
}

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js":
/*!**********************************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js ***!
  \**********************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $ijazI$react = __webpack_require__(/*! react */ "react");
var $ijazI$radixuireactusecallbackref = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
$parcel$export(module.exports, "useControllableState", () => $b84d42d44371bff7$export$6f32135080cb4c3);
function $b84d42d44371bff7$export$6f32135080cb4c3(_ref) {
  let {
    prop: prop,
    defaultProp: defaultProp,
    onChange = () => {}
  } = _ref;
  const [uncontrolledProp, setUncontrolledProp] = $b84d42d44371bff7$var$useUncontrolledState({
    defaultProp: defaultProp,
    onChange: onChange
  });
  const isControlled = prop !== undefined;
  const value1 = isControlled ? prop : uncontrolledProp;
  const handleChange = $ijazI$radixuireactusecallbackref.useCallbackRef(onChange);
  const setValue = $ijazI$react.useCallback(nextValue => {
    if (isControlled) {
      const setter = nextValue;
      const value = typeof nextValue === 'function' ? setter(prop) : nextValue;
      if (value !== prop) handleChange(value);
    } else setUncontrolledProp(nextValue);
  }, [isControlled, prop, setUncontrolledProp, handleChange]);
  return [value1, setValue];
}
function $b84d42d44371bff7$var$useUncontrolledState(_ref2) {
  let {
    defaultProp: defaultProp,
    onChange: onChange
  } = _ref2;
  const uncontrolledState = $ijazI$react.useState(defaultProp);
  const [value] = uncontrolledState;
  const prevValueRef = $ijazI$react.useRef(value);
  const handleChange = $ijazI$radixuireactusecallbackref.useCallbackRef(onChange);
  $ijazI$react.useEffect(() => {
    if (prevValueRef.current !== value) {
      handleChange(value);
      prevValueRef.current = value;
    }
  }, [value, prevValueRef, handleChange]);
  return uncontrolledState;
}

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.js":
/*!******************************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.js ***!
  \******************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $b0gz3$react = __webpack_require__(/*! react */ "react");
var $b0gz3$radixuireactusecallbackref = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ "../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
$parcel$export(module.exports, "useEscapeKeydown", () => $24c84e9f83c4454f$export$3a72a57244d6e765);

/**
 * Listens for when the escape key is down
 */
function $24c84e9f83c4454f$export$3a72a57244d6e765(onEscapeKeyDownProp) {
  let ownerDocument = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
  const onEscapeKeyDown = $b0gz3$radixuireactusecallbackref.useCallbackRef(onEscapeKeyDownProp);
  $b0gz3$react.useEffect(() => {
    const handleKeyDown = event => {
      if (event.key === 'Escape') onEscapeKeyDown(event);
    };
    ownerDocument.addEventListener('keydown', handleKeyDown);
    return () => ownerDocument.removeEventListener('keydown', handleKeyDown);
  }, [onEscapeKeyDown, ownerDocument]);
}

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.js":
/*!*****************************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.js ***!
  \*****************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $caHyQ$react = __webpack_require__(/*! react */ "react");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
$parcel$export(module.exports, "useLayoutEffect", () => $ca21affb0542a8a4$export$e5c5a5f917a5871c);

/**
 * On the server, React emits a warning when calling `useLayoutEffect`.
 * This is because neither `useLayoutEffect` nor `useEffect` run on the server.
 * We use this safe version which suppresses the warning by replacing it with a noop on the server.
 *
 * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
 */
const $ca21affb0542a8a4$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? $caHyQ$react.useLayoutEffect : () => {};

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-use-size/dist/index.js":
/*!********************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-use-size/dist/index.js ***!
  \********************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $ksDzM$react = __webpack_require__(/*! react */ "react");
var $ksDzM$radixuireactuselayouteffect = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ "../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
$parcel$export(module.exports, "useSize", () => $d2c1d285af17635b$export$1ab7ae714698c4b8);
function $d2c1d285af17635b$export$1ab7ae714698c4b8(element) {
  const [size, setSize] = $ksDzM$react.useState(undefined);
  $ksDzM$radixuireactuselayouteffect.useLayoutEffect(() => {
    if (element) {
      // provide size as early as possible
      setSize({
        width: element.offsetWidth,
        height: element.offsetHeight
      });
      const resizeObserver = new ResizeObserver(entries => {
        if (!Array.isArray(entries)) return;
        // Since we only observe the one element, we don't need to loop over the
        // array
        if (!entries.length) return;
        const entry = entries[0];
        let width;
        let height;
        if ('borderBoxSize' in entry) {
          const borderSizeEntry = entry['borderBoxSize']; // iron out differences between browsers
          const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
          width = borderSize['inlineSize'];
          height = borderSize['blockSize'];
        } else {
          // for browsers that don't support `borderBoxSize`
          // we calculate it ourselves to get the correct border box.
          width = element.offsetWidth;
          height = element.offsetHeight;
        }
        setSize({
          width: width,
          height: height
        });
      });
      resizeObserver.observe(element, {
        box: 'border-box'
      });
      return () => resizeObserver.unobserve(element);
    } else
      // We only want to reset to `undefined` when the element becomes `null`,
      // not if it changes to another element.
      setSize(undefined);
  }, [element]);
  return size;
}

/***/ }),

/***/ "../../../node_modules/@radix-ui/react-visually-hidden/dist/index.js":
/*!***************************************************************************!*\
  !*** ../../../node_modules/@radix-ui/react-visually-hidden/dist/index.js ***!
  \***************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var $awrN2$babelruntimehelpersextends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "../../../node_modules/@babel/runtime/helpers/extends.js");
var $awrN2$react = __webpack_require__(/*! react */ "react");
var $awrN2$radixuireactprimitive = __webpack_require__(/*! @radix-ui/react-primitive */ "../../../node_modules/@radix-ui/react-primitive/dist/index.js");
function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {
    get: v,
    set: s,
    enumerable: true,
    configurable: true
  });
}
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "VisuallyHidden", () => $685371e9c20848e2$export$439d29a4e110a164);
$parcel$export(module.exports, "Root", () => $685371e9c20848e2$export$be92b6f5f03c0fe9);

/* -------------------------------------------------------------------------------------------------
 * VisuallyHidden
 * -----------------------------------------------------------------------------------------------*/
const $685371e9c20848e2$var$NAME = 'VisuallyHidden';
const $685371e9c20848e2$export$439d29a4e110a164 = /*#__PURE__*/$awrN2$react.forwardRef((props, forwardedRef) => {
  return /*#__PURE__*/$awrN2$react.createElement($awrN2$radixuireactprimitive.Primitive.span, $parcel$interopDefault($awrN2$babelruntimehelpersextends)({}, props, {
    ref: forwardedRef,
    style: {
      // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
      position: 'absolute',
      border: 0,
      width: 1,
      height: 1,
      padding: 0,
      margin: -1,
      overflow: 'hidden',
      clip: 'rect(0, 0, 0, 0)',
      whiteSpace: 'nowrap',
      wordWrap: 'normal',
      ...props.style
    }
  }));
});
/*#__PURE__*/
Object.assign($685371e9c20848e2$export$439d29a4e110a164, {
  displayName: $685371e9c20848e2$var$NAME
});
/* -----------------------------------------------------------------------------------------------*/
const $685371e9c20848e2$export$be92b6f5f03c0fe9 = $685371e9c20848e2$export$439d29a4e110a164;

/***/ }),

/***/ "../../../node_modules/aria-hidden/dist/es2015/index.js":
/*!**************************************************************!*\
  !*** ../../../node_modules/aria-hidden/dist/es2015/index.js ***!
  \**************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.suppressOthers = exports.supportsInert = exports.inertOthers = exports.hideOthers = void 0;
var getDefaultParent = function (originalTarget) {
  if (typeof document === 'undefined') {
    return null;
  }
  var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
  return sampleTarget.ownerDocument.body;
};
var counterMap = new WeakMap();
var uncontrolledNodes = new WeakMap();
var markerMap = {};
var lockCount = 0;
var unwrapHost = function (node) {
  return node && (node.host || unwrapHost(node.parentNode));
};
var correctTargets = function (parent, targets) {
  return targets.map(function (target) {
    if (parent.contains(target)) {
      return target;
    }
    var correctedTarget = unwrapHost(target);
    if (correctedTarget && parent.contains(correctedTarget)) {
      return correctedTarget;
    }
    console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');
    return null;
  }).filter(function (x) {
    return Boolean(x);
  });
};
/**
 * Marks everything except given node(or nodes) as aria-hidden
 * @param {Element | Element[]} originalTarget - elements to keep on the page
 * @param [parentNode] - top element, defaults to document.body
 * @param {String} [markerName] - a special attribute to mark every node
 * @param {String} [controlAttribute] - html Attribute to control
 * @return {Undo} undo command
 */
var applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {
  var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
  if (!markerMap[markerName]) {
    markerMap[markerName] = new WeakMap();
  }
  var markerCounter = markerMap[markerName];
  var hiddenNodes = [];
  var elementsToKeep = new Set();
  var elementsToStop = new Set(targets);
  var keep = function (el) {
    if (!el || elementsToKeep.has(el)) {
      return;
    }
    elementsToKeep.add(el);
    keep(el.parentNode);
  };
  targets.forEach(keep);
  var deep = function (parent) {
    if (!parent || elementsToStop.has(parent)) {
      return;
    }
    Array.prototype.forEach.call(parent.children, function (node) {
      if (elementsToKeep.has(node)) {
        deep(node);
      } else {
        var attr = node.getAttribute(controlAttribute);
        var alreadyHidden = attr !== null && attr !== 'false';
        var counterValue = (counterMap.get(node) || 0) + 1;
        var markerValue = (markerCounter.get(node) || 0) + 1;
        counterMap.set(node, counterValue);
        markerCounter.set(node, markerValue);
        hiddenNodes.push(node);
        if (counterValue === 1 && alreadyHidden) {
          uncontrolledNodes.set(node, true);
        }
        if (markerValue === 1) {
          node.setAttribute(markerName, 'true');
        }
        if (!alreadyHidden) {
          node.setAttribute(controlAttribute, 'true');
        }
      }
    });
  };
  deep(parentNode);
  elementsToKeep.clear();
  lockCount++;
  return function () {
    hiddenNodes.forEach(function (node) {
      var counterValue = counterMap.get(node) - 1;
      var markerValue = markerCounter.get(node) - 1;
      counterMap.set(node, counterValue);
      markerCounter.set(node, markerValue);
      if (!counterValue) {
        if (!uncontrolledNodes.has(node)) {
          node.removeAttribute(controlAttribute);
        }
        uncontrolledNodes.delete(node);
      }
      if (!markerValue) {
        node.removeAttribute(markerName);
      }
    });
    lockCount--;
    if (!lockCount) {
      // clear
      counterMap = new WeakMap();
      counterMap = new WeakMap();
      uncontrolledNodes = new WeakMap();
      markerMap = {};
    }
  };
};
/**
 * Marks everything except given node(or nodes) as aria-hidden
 * @param {Element | Element[]} originalTarget - elements to keep on the page
 * @param [parentNode] - top element, defaults to document.body
 * @param {String} [markerName] - a special attribute to mark every node
 * @return {Undo} undo command
 */
var hideOthers = function (originalTarget, parentNode, markerName) {
  if (markerName === void 0) {
    markerName = 'data-aria-hidden';
  }
  var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
  var activeParentNode = parentNode || getDefaultParent(originalTarget);
  if (!activeParentNode) {
    return function () {
      return null;
    };
  }
  // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10
  targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));
  return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');
};
/**
 * Marks everything except given node(or nodes) as inert
 * @param {Element | Element[]} originalTarget - elements to keep on the page
 * @param [parentNode] - top element, defaults to document.body
 * @param {String} [markerName] - a special attribute to mark every node
 * @return {Undo} undo command
 */
exports.hideOthers = hideOthers;
var inertOthers = function (originalTarget, parentNode, markerName) {
  if (markerName === void 0) {
    markerName = 'data-inert-ed';
  }
  var activeParentNode = parentNode || getDefaultParent(originalTarget);
  if (!activeParentNode) {
    return function () {
      return null;
    };
  }
  return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');
};
/**
 * @returns if current browser supports inert
 */
exports.inertOthers = inertOthers;
var supportsInert = function () {
  return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');
};
/**
 * Automatic function to "suppress" DOM elements - _hide_ or _inert_ in the best possible way
 * @param {Element | Element[]} originalTarget - elements to keep on the page
 * @param [parentNode] - top element, defaults to document.body
 * @param {String} [markerName] - a special attribute to mark every node
 * @return {Undo} undo command
 */
exports.supportsInert = supportsInert;
var suppressOthers = function (originalTarget, parentNode, markerName) {
  if (markerName === void 0) {
    markerName = 'data-suppressed';
  }
  return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);
};
exports.suppressOthers = suppressOthers;

/***/ }),

/***/ "../../../node_modules/clsx/dist/clsx.m.js":
/*!*************************************************!*\
  !*** ../../../node_modules/clsx/dist/clsx.m.js ***!
  \*************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.clsx = clsx;
exports["default"] = void 0;
function r(e) {
  var t,
    f,
    n = "";
  if ("string" == typeof e || "number" == typeof e) n += e;else if ("object" == typeof e) if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);else for (t in e) e[t] && (n && (n += " "), n += t);
  return n;
}
function clsx() {
  for (var e, t, f = 0, n = ""; f < arguments.length;) (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
  return n;
}
var _default = clsx;
exports["default"] = _default;

/***/ }),

/***/ "../../../node_modules/copy-to-clipboard/index.js":
/*!********************************************************!*\
  !*** ../../../node_modules/copy-to-clipboard/index.js ***!
  \********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var deselectCurrent = __webpack_require__(/*! toggle-selection */ "../../../node_modules/toggle-selection/index.js");
var clipboardToIE11Formatting = {
  "text/plain": "Text",
  "text/html": "Url",
  "default": "Text"
};
var defaultMessage = "Copy to clipboard: #{key}, Enter";
function format(message) {
  var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
  return message.replace(/#{\s*key\s*}/g, copyKey);
}
function copy(text, options) {
  var debug,
    message,
    reselectPrevious,
    range,
    selection,
    mark,
    success = false;
  if (!options) {
    options = {};
  }
  debug = options.debug || false;
  try {
    reselectPrevious = deselectCurrent();
    range = document.createRange();
    selection = document.getSelection();
    mark = document.createElement("span");
    mark.textContent = text;
    // avoid screen readers from reading out loud the text
    mark.ariaHidden = "true";
    // reset user styles for span element
    mark.style.all = "unset";
    // prevents scrolling to the end of the page
    mark.style.position = "fixed";
    mark.style.top = 0;
    mark.style.clip = "rect(0, 0, 0, 0)";
    // used to preserve spaces and line breaks
    mark.style.whiteSpace = "pre";
    // do not inherit user-select (it may be `none`)
    mark.style.webkitUserSelect = "text";
    mark.style.MozUserSelect = "text";
    mark.style.msUserSelect = "text";
    mark.style.userSelect = "text";
    mark.addEventListener("copy", function (e) {
      e.stopPropagation();
      if (options.format) {
        e.preventDefault();
        if (typeof e.clipboardData === "undefined") {
          // IE 11
          debug && console.warn("unable to use e.clipboardData");
          debug && console.warn("trying IE specific stuff");
          window.clipboardData.clearData();
          var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"];
          window.clipboardData.setData(format, text);
        } else {
          // all other browsers
          e.clipboardData.clearData();
          e.clipboardData.setData(options.format, text);
        }
      }
      if (options.onCopy) {
        e.preventDefault();
        options.onCopy(e.clipboardData);
      }
    });
    document.body.appendChild(mark);
    range.selectNodeContents(mark);
    selection.addRange(range);
    var successful = document.execCommand("copy");
    if (!successful) {
      throw new Error("copy command was unsuccessful");
    }
    success = true;
  } catch (err) {
    debug && console.error("unable to copy using execCommand: ", err);
    debug && console.warn("trying IE specific stuff");
    try {
      window.clipboardData.setData(options.format || "text", text);
      options.onCopy && options.onCopy(window.clipboardData);
      success = true;
    } catch (err) {
      debug && console.error("unable to copy using clipboardData: ", err);
      debug && console.error("falling back to prompt");
      message = format("message" in options ? options.message : defaultMessage);
      window.prompt(message, text);
    }
  } finally {
    if (selection) {
      if (typeof selection.removeRange == "function") {
        selection.removeRange(range);
      } else {
        selection.removeAllRanges();
      }
    }
    if (mark) {
      document.body.removeChild(mark);
    }
    reselectPrevious();
  }
  return success;
}
module.exports = copy;

/***/ }),

/***/ "../../../node_modules/detect-node-es/esm/browser.js":
/*!***********************************************************!*\
  !*** ../../../node_modules/detect-node-es/esm/browser.js ***!
  \***********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isNode = void 0;
const isNode = false;
exports.isNode = isNode;

/***/ }),

/***/ "../../../node_modules/entities/lib/decode.js":
/*!****************************************************!*\
  !*** ../../../node_modules/entities/lib/decode.js ***!
  \****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var __createBinding = void 0 && (void 0).__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 = void 0 && (void 0).__setModuleDefault || (Object.create ? function (o, v) {
  Object.defineProperty(o, "default", {
    enumerable: true,
    value: v
  });
} : function (o, v) {
  o["default"] = v;
});
var __importStar = void 0 && (void 0).__importStar || function (mod) {
  if (mod && mod.__esModule) return mod;
  var result = {};
  if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  __setModuleDefault(result, mod);
  return result;
};
var __importDefault = void 0 && (void 0).__importDefault || function (mod) {
  return mod && mod.__esModule ? mod : {
    "default": mod
  };
};
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTMLAttribute = exports.decodeHTML = exports.determineBranch = exports.EntityDecoder = exports.DecodingMode = exports.BinTrieFlags = exports.fromCodePoint = exports.replaceCodePoint = exports.decodeCodePoint = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0;
var decode_data_html_js_1 = __importDefault(__webpack_require__(/*! ./generated/decode-data-html.js */ "../../../node_modules/entities/lib/generated/decode-data-html.js"));
exports.htmlDecodeTree = decode_data_html_js_1.default;
var decode_data_xml_js_1 = __importDefault(__webpack_require__(/*! ./generated/decode-data-xml.js */ "../../../node_modules/entities/lib/generated/decode-data-xml.js"));
exports.xmlDecodeTree = decode_data_xml_js_1.default;
var decode_codepoint_js_1 = __importStar(__webpack_require__(/*! ./decode_codepoint.js */ "../../../node_modules/entities/lib/decode_codepoint.js"));
exports.decodeCodePoint = decode_codepoint_js_1.default;
var decode_codepoint_js_2 = __webpack_require__(/*! ./decode_codepoint.js */ "../../../node_modules/entities/lib/decode_codepoint.js");
Object.defineProperty(exports, "replaceCodePoint", ({
  enumerable: true,
  get: function () {
    return decode_codepoint_js_2.replaceCodePoint;
  }
}));
Object.defineProperty(exports, "fromCodePoint", ({
  enumerable: true,
  get: function () {
    return decode_codepoint_js_2.fromCodePoint;
  }
}));
var CharCodes;
(function (CharCodes) {
  CharCodes[CharCodes["NUM"] = 35] = "NUM";
  CharCodes[CharCodes["SEMI"] = 59] = "SEMI";
  CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS";
  CharCodes[CharCodes["ZERO"] = 48] = "ZERO";
  CharCodes[CharCodes["NINE"] = 57] = "NINE";
  CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A";
  CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F";
  CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X";
  CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z";
  CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A";
  CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F";
  CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
})(CharCodes || (CharCodes = {}));
/** Bit that needs to be set to convert an upper case ASCII character to lower case */
var TO_LOWER_BIT = 32;
var BinTrieFlags;
(function (BinTrieFlags) {
  BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
  BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
  BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
})(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {}));
function isNumber(code) {
  return code >= CharCodes.ZERO && code <= CharCodes.NINE;
}
function isHexadecimalCharacter(code) {
  return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F;
}
function isAsciiAlphaNumeric(code) {
  return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || isNumber(code);
}
/**
 * Checks if the given character is a valid end character for an entity in an attribute.
 *
 * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.
 * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
 */
function isEntityInAttributeInvalidEnd(code) {
  return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
}
var EntityDecoderState;
(function (EntityDecoderState) {
  EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
  EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
  EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
  EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
  EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
})(EntityDecoderState || (EntityDecoderState = {}));
var DecodingMode;
(function (DecodingMode) {
  /** Entities in text nodes that can end with any character. */
  DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
  /** Only allow entities terminated with a semicolon. */
  DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
  /** Entities in attributes have limitations on ending characters. */
  DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
})(DecodingMode = exports.DecodingMode || (exports.DecodingMode = {}));
/**
 * Token decoder with support of writing partial entities.
 */
var EntityDecoder = /** @class */function () {
  function EntityDecoder( /** The tree used to decode entities. */
  decodeTree,
  /**
   * The function that is called when a codepoint is decoded.
   *
   * For multi-byte named entities, this will be called multiple times,
   * with the second codepoint, and the same `consumed` value.
   *
   * @param codepoint The decoded codepoint.
   * @param consumed The number of bytes consumed by the decoder.
   */
  emitCodePoint, /** An object that is used to produce errors. */
  errors) {
    this.decodeTree = decodeTree;
    this.emitCodePoint = emitCodePoint;
    this.errors = errors;
    /** The current state of the decoder. */
    this.state = EntityDecoderState.EntityStart;
    /** Characters that were consumed while parsing an entity. */
    this.consumed = 1;
    /**
     * The result of the entity.
     *
     * Either the result index of a numeric entity, or the codepoint of a
     * numeric entity.
     */
    this.result = 0;
    /** The current index in the decode tree. */
    this.treeIndex = 0;
    /** The number of characters that were consumed in excess. */
    this.excess = 1;
    /** The mode in which the decoder is operating. */
    this.decodeMode = DecodingMode.Strict;
  }
  /** Resets the instance to make it reusable. */
  EntityDecoder.prototype.startEntity = function (decodeMode) {
    this.decodeMode = decodeMode;
    this.state = EntityDecoderState.EntityStart;
    this.result = 0;
    this.treeIndex = 0;
    this.excess = 1;
    this.consumed = 1;
  };
  /**
   * Write an entity to the decoder. This can be called multiple times with partial entities.
   * If the entity is incomplete, the decoder will return -1.
   *
   * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
   * entity is incomplete, and resume when the next string is written.
   *
   * @param string The string containing the entity (or a continuation of the entity).
   * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
   * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
   */
  EntityDecoder.prototype.write = function (str, offset) {
    switch (this.state) {
      case EntityDecoderState.EntityStart:
        {
          if (str.charCodeAt(offset) === CharCodes.NUM) {
            this.state = EntityDecoderState.NumericStart;
            this.consumed += 1;
            return this.stateNumericStart(str, offset + 1);
          }
          this.state = EntityDecoderState.NamedEntity;
          return this.stateNamedEntity(str, offset);
        }
      case EntityDecoderState.NumericStart:
        {
          return this.stateNumericStart(str, offset);
        }
      case EntityDecoderState.NumericDecimal:
        {
          return this.stateNumericDecimal(str, offset);
        }
      case EntityDecoderState.NumericHex:
        {
          return this.stateNumericHex(str, offset);
        }
      case EntityDecoderState.NamedEntity:
        {
          return this.stateNamedEntity(str, offset);
        }
    }
  };
  /**
   * Switches between the numeric decimal and hexadecimal states.
   *
   * Equivalent to the `Numeric character reference state` in the HTML spec.
   *
   * @param str The string containing the entity (or a continuation of the entity).
   * @param offset The current offset.
   * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
   */
  EntityDecoder.prototype.stateNumericStart = function (str, offset) {
    if (offset >= str.length) {
      return -1;
    }
    if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
      this.state = EntityDecoderState.NumericHex;
      this.consumed += 1;
      return this.stateNumericHex(str, offset + 1);
    }
    this.state = EntityDecoderState.NumericDecimal;
    return this.stateNumericDecimal(str, offset);
  };
  EntityDecoder.prototype.addToNumericResult = function (str, start, end, base) {
    if (start !== end) {
      var digitCount = end - start;
      this.result = this.result * Math.pow(base, digitCount) + parseInt(str.substr(start, digitCount), base);
      this.consumed += digitCount;
    }
  };
  /**
   * Parses a hexadecimal numeric entity.
   *
   * Equivalent to the `Hexademical character reference state` in the HTML spec.
   *
   * @param str The string containing the entity (or a continuation of the entity).
   * @param offset The current offset.
   * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
   */
  EntityDecoder.prototype.stateNumericHex = function (str, offset) {
    var startIdx = offset;
    while (offset < str.length) {
      var char = str.charCodeAt(offset);
      if (isNumber(char) || isHexadecimalCharacter(char)) {
        offset += 1;
      } else {
        this.addToNumericResult(str, startIdx, offset, 16);
        return this.emitNumericEntity(char, 3);
      }
    }
    this.addToNumericResult(str, startIdx, offset, 16);
    return -1;
  };
  /**
   * Parses a decimal numeric entity.
   *
   * Equivalent to the `Decimal character reference state` in the HTML spec.
   *
   * @param str The string containing the entity (or a continuation of the entity).
   * @param offset The current offset.
   * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
   */
  EntityDecoder.prototype.stateNumericDecimal = function (str, offset) {
    var startIdx = offset;
    while (offset < str.length) {
      var char = str.charCodeAt(offset);
      if (isNumber(char)) {
        offset += 1;
      } else {
        this.addToNumericResult(str, startIdx, offset, 10);
        return this.emitNumericEntity(char, 2);
      }
    }
    this.addToNumericResult(str, startIdx, offset, 10);
    return -1;
  };
  /**
   * Validate and emit a numeric entity.
   *
   * Implements the logic from the `Hexademical character reference start
   * state` and `Numeric character reference end state` in the HTML spec.
   *
   * @param lastCp The last code point of the entity. Used to see if the
   *               entity was terminated with a semicolon.
   * @param expectedLength The minimum number of characters that should be
   *                       consumed. Used to validate that at least one digit
   *                       was consumed.
   * @returns The number of characters that were consumed.
   */
  EntityDecoder.prototype.emitNumericEntity = function (lastCp, expectedLength) {
    var _a;
    // Ensure we consumed at least one digit.
    if (this.consumed <= expectedLength) {
      (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
      return 0;
    }
    // Figure out if this is a legit end of the entity
    if (lastCp === CharCodes.SEMI) {
      this.consumed += 1;
    } else if (this.decodeMode === DecodingMode.Strict) {
      return 0;
    }
    this.emitCodePoint((0, decode_codepoint_js_1.replaceCodePoint)(this.result), this.consumed);
    if (this.errors) {
      if (lastCp !== CharCodes.SEMI) {
        this.errors.missingSemicolonAfterCharacterReference();
      }
      this.errors.validateNumericCharacterReference(this.result);
    }
    return this.consumed;
  };
  /**
   * Parses a named entity.
   *
   * Equivalent to the `Named character reference state` in the HTML spec.
   *
   * @param str The string containing the entity (or a continuation of the entity).
   * @param offset The current offset.
   * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
   */
  EntityDecoder.prototype.stateNamedEntity = function (str, offset) {
    var decodeTree = this.decodeTree;
    var current = decodeTree[this.treeIndex];
    // The mask is the number of bytes of the value, including the current byte.
    var valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
    for (; offset < str.length; offset++, this.excess++) {
      var char = str.charCodeAt(offset);
      this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
      if (this.treeIndex < 0) {
        return this.result === 0 ||
        // If we are parsing an attribute
        this.decodeMode === DecodingMode.Attribute && (
        // We shouldn't have consumed any characters after the entity,
        valueLength === 0 ||
        // And there should be no invalid characters.
        isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity();
      }
      current = decodeTree[this.treeIndex];
      valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
      // If the branch is a value, store it and continue
      if (valueLength !== 0) {
        // If the entity is terminated by a semicolon, we are done.
        if (char === CharCodes.SEMI) {
          return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
        }
        // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.
        if (this.decodeMode !== DecodingMode.Strict) {
          this.result = this.treeIndex;
          this.consumed += this.excess;
          this.excess = 0;
        }
      }
    }
    return -1;
  };
  /**
   * Emit a named entity that was not terminated with a semicolon.
   *
   * @returns The number of characters consumed.
   */
  EntityDecoder.prototype.emitNotTerminatedNamedEntity = function () {
    var _a;
    var _b = this,
      result = _b.result,
      decodeTree = _b.decodeTree;
    var valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
    this.emitNamedEntityData(result, valueLength, this.consumed);
    (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();
    return this.consumed;
  };
  /**
   * Emit a named entity.
   *
   * @param result The index of the entity in the decode tree.
   * @param valueLength The number of bytes in the entity.
   * @param consumed The number of characters consumed.
   *
   * @returns The number of characters consumed.
   */
  EntityDecoder.prototype.emitNamedEntityData = function (result, valueLength, consumed) {
    var decodeTree = this.decodeTree;
    this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result + 1], consumed);
    if (valueLength === 3) {
      // For multi-byte values, we need to emit the second byte.
      this.emitCodePoint(decodeTree[result + 2], consumed);
    }
    return consumed;
  };
  /**
   * Signal to the parser that the end of the input was reached.
   *
   * Remaining data will be emitted and relevant errors will be produced.
   *
   * @returns The number of characters consumed.
   */
  EntityDecoder.prototype.end = function () {
    var _a;
    switch (this.state) {
      case EntityDecoderState.NamedEntity:
        {
          // Emit a named entity if we have one.
          return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
        }
      // Otherwise, emit a numeric entity if we have one.
      case EntityDecoderState.NumericDecimal:
        {
          return this.emitNumericEntity(0, 2);
        }
      case EntityDecoderState.NumericHex:
        {
          return this.emitNumericEntity(0, 3);
        }
      case EntityDecoderState.NumericStart:
        {
          (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
          return 0;
        }
      case EntityDecoderState.EntityStart:
        {
          // Return 0 if we have no entity.
          return 0;
        }
    }
  };
  return EntityDecoder;
}();
exports.EntityDecoder = EntityDecoder;
/**
 * Creates a function that decodes entities in a string.
 *
 * @param decodeTree The decode tree.
 * @returns A function that decodes entities in a string.
 */
function getDecoder(decodeTree) {
  var ret = "";
  var decoder = new EntityDecoder(decodeTree, function (str) {
    return ret += (0, decode_codepoint_js_1.fromCodePoint)(str);
  });
  return function decodeWithTrie(str, decodeMode) {
    var lastIndex = 0;
    var offset = 0;
    while ((offset = str.indexOf("&", offset)) >= 0) {
      ret += str.slice(lastIndex, offset);
      decoder.startEntity(decodeMode);
      var len = decoder.write(str,
      // Skip the "&"
      offset + 1);
      if (len < 0) {
        lastIndex = offset + decoder.end();
        break;
      }
      lastIndex = offset + len;
      // If `len` is 0, skip the current `&` and continue.
      offset = len === 0 ? lastIndex + 1 : lastIndex;
    }
    var result = ret + str.slice(lastIndex);
    // Make sure we don't keep a reference to the final string.
    ret = "";
    return result;
  };
}
/**
 * Determines the branch of the current node that is taken given the current
 * character. This function is used to traverse the trie.
 *
 * @param decodeTree The trie.
 * @param current The current node.
 * @param nodeIdx The index right after the current node and its value.
 * @param char The current character.
 * @returns The index of the next node, or -1 if no branch is taken.
 */
function determineBranch(decodeTree, current, nodeIdx, char) {
  var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
  var jumpOffset = current & BinTrieFlags.JUMP_TABLE;
  // Case 1: Single branch encoded in jump offset
  if (branchCount === 0) {
    return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1;
  }
  // Case 2: Multiple branches encoded in jump table
  if (jumpOffset) {
    var value = char - jumpOffset;
    return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIdx + value] - 1;
  }
  // Case 3: Multiple branches encoded in dictionary
  // Binary search for the character.
  var lo = nodeIdx;
  var hi = lo + branchCount - 1;
  while (lo <= hi) {
    var mid = lo + hi >>> 1;
    var midVal = decodeTree[mid];
    if (midVal < char) {
      lo = mid + 1;
    } else if (midVal > char) {
      hi = mid - 1;
    } else {
      return decodeTree[mid + branchCount];
    }
  }
  return -1;
}
exports.determineBranch = determineBranch;
var htmlDecoder = getDecoder(decode_data_html_js_1.default);
var xmlDecoder = getDecoder(decode_data_xml_js_1.default);
/**
 * Decodes an HTML string.
 *
 * @param str The string to decode.
 * @param mode The decoding mode.
 * @returns The decoded string.
 */
function decodeHTML(str, mode) {
  if (mode === void 0) {
    mode = DecodingMode.Legacy;
  }
  return htmlDecoder(str, mode);
}
exports.decodeHTML = decodeHTML;
/**
 * Decodes an HTML string in an attribute.
 *
 * @param str The string to decode.
 * @returns The decoded string.
 */
function decodeHTMLAttribute(str) {
  return htmlDecoder(str, DecodingMode.Attribute);
}
exports.decodeHTMLAttribute = decodeHTMLAttribute;
/**
 * Decodes an HTML string, requiring all entities to be terminated by a semicolon.
 *
 * @param str The string to decode.
 * @returns The decoded string.
 */
function decodeHTMLStrict(str) {
  return htmlDecoder(str, DecodingMode.Strict);
}
exports.decodeHTMLStrict = decodeHTMLStrict;
/**
 * Decodes an XML string, requiring all entities to be terminated by a semicolon.
 *
 * @param str The string to decode.
 * @returns The decoded string.
 */
function decodeXML(str) {
  return xmlDecoder(str, DecodingMode.Strict);
}
exports.decodeXML = decodeXML;

/***/ }),

/***/ "../../../node_modules/entities/lib/decode_codepoint.js":
/*!**************************************************************!*\
  !*** ../../../node_modules/entities/lib/decode_codepoint.js ***!
  \**************************************************************/
/***/ (function(__unused_webpack_module, exports) {



// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134
var _a;
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.replaceCodePoint = exports.fromCodePoint = void 0;
var decodeMap = new Map([[0, 65533],
// C1 Unicode control character reference replacements
[128, 8364], [130, 8218], [131, 402], [132, 8222], [133, 8230], [134, 8224], [135, 8225], [136, 710], [137, 8240], [138, 352], [139, 8249], [140, 338], [142, 381], [145, 8216], [146, 8217], [147, 8220], [148, 8221], [149, 8226], [150, 8211], [151, 8212], [152, 732], [153, 8482], [154, 353], [155, 8250], [156, 339], [158, 382], [159, 376]]);
/**
 * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.
 */
exports.fromCodePoint =
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) {
  var output = "";
  if (codePoint > 0xffff) {
    codePoint -= 0x10000;
    output += String.fromCharCode(codePoint >>> 10 & 0x3ff | 0xd800);
    codePoint = 0xdc00 | codePoint & 0x3ff;
  }
  output += String.fromCharCode(codePoint);
  return output;
};
/**
 * Replace the given code point with a replacement character if it is a
 * surrogate or is outside the valid range. Otherwise return the code
 * point unchanged.
 */
function replaceCodePoint(codePoint) {
  var _a;
  if (codePoint >= 0xd800 && codePoint <= 0xdfff || codePoint > 0x10ffff) {
    return 0xfffd;
  }
  return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;
}
exports.replaceCodePoint = replaceCodePoint;
/**
 * Replace the code point if relevant, then convert it to a string.
 *
 * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead.
 * @param codePoint The code point to decode.
 * @returns The decoded code point.
 */
function decodeCodePoint(codePoint) {
  return (0, exports.fromCodePoint)(replaceCodePoint(codePoint));
}
exports["default"] = decodeCodePoint;

/***/ }),

/***/ "../../../node_modules/entities/lib/encode.js":
/*!****************************************************!*\
  !*** ../../../node_modules/entities/lib/encode.js ***!
  \****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var __importDefault = void 0 && (void 0).__importDefault || function (mod) {
  return mod && mod.__esModule ? mod : {
    "default": mod
  };
};
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.encodeNonAsciiHTML = exports.encodeHTML = void 0;
var encode_html_js_1 = __importDefault(__webpack_require__(/*! ./generated/encode-html.js */ "../../../node_modules/entities/lib/generated/encode-html.js"));
var escape_js_1 = __webpack_require__(/*! ./escape.js */ "../../../node_modules/entities/lib/escape.js");
var htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;
/**
 * Encodes all characters in the input using HTML entities. This includes
 * characters that are valid ASCII characters in HTML documents, such as `#`.
 *
 * To get a more compact output, consider using the `encodeNonAsciiHTML`
 * function, which will only encode characters that are not valid in HTML
 * documents, as well as non-ASCII characters.
 *
 * If a character has no equivalent entity, a numeric hexadecimal reference
 * (eg. `&#xfc;`) will be used.
 */
function encodeHTML(data) {
  return encodeHTMLTrieRe(htmlReplacer, data);
}
exports.encodeHTML = encodeHTML;
/**
 * Encodes all non-ASCII characters, as well as characters not valid in HTML
 * documents using HTML entities. This function will not encode characters that
 * are valid in HTML documents, such as `#`.
 *
 * If a character has no equivalent entity, a numeric hexadecimal reference
 * (eg. `&#xfc;`) will be used.
 */
function encodeNonAsciiHTML(data) {
  return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data);
}
exports.encodeNonAsciiHTML = encodeNonAsciiHTML;
function encodeHTMLTrieRe(regExp, str) {
  var ret = "";
  var lastIdx = 0;
  var match;
  while ((match = regExp.exec(str)) !== null) {
    var i = match.index;
    ret += str.substring(lastIdx, i);
    var char = str.charCodeAt(i);
    var next = encode_html_js_1.default.get(char);
    if (typeof next === "object") {
      // We are in a branch. Try to match the next char.
      if (i + 1 < str.length) {
        var nextChar = str.charCodeAt(i + 1);
        var value = typeof next.n === "number" ? next.n === nextChar ? next.o : undefined : next.n.get(nextChar);
        if (value !== undefined) {
          ret += value;
          lastIdx = regExp.lastIndex += 1;
          continue;
        }
      }
      next = next.v;
    }
    // We might have a tree node without a value; skip and use a numeric entity.
    if (next !== undefined) {
      ret += next;
      lastIdx = i + 1;
    } else {
      var cp = (0, escape_js_1.getCodePoint)(str, i);
      ret += "&#x".concat(cp.toString(16), ";");
      // Increase by 1 if we have a surrogate pair
      lastIdx = regExp.lastIndex += Number(cp !== char);
    }
  }
  return ret + str.substr(lastIdx);
}

/***/ }),

/***/ "../../../node_modules/entities/lib/escape.js":
/*!****************************************************!*\
  !*** ../../../node_modules/entities/lib/escape.js ***!
  \****************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.getCodePoint = exports.xmlReplacer = void 0;
exports.xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
var xmlCodeMap = new Map([[34, "&quot;"], [38, "&amp;"], [39, "&apos;"], [60, "&lt;"], [62, "&gt;"]]);
// For compatibility with node < 4, we wrap `codePointAt`
exports.getCodePoint =
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
String.prototype.codePointAt != null ? function (str, index) {
  return str.codePointAt(index);
} :
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
function (c, index) {
  return (c.charCodeAt(index) & 0xfc00) === 0xd800 ? (c.charCodeAt(index) - 0xd800) * 0x400 + c.charCodeAt(index + 1) - 0xdc00 + 0x10000 : c.charCodeAt(index);
};
/**
 * Encodes all non-ASCII characters, as well as characters not valid in XML
 * documents using XML entities.
 *
 * If a character has no equivalent entity, a
 * numeric hexadecimal reference (eg. `&#xfc;`) will be used.
 */
function encodeXML(str) {
  var ret = "";
  var lastIdx = 0;
  var match;
  while ((match = exports.xmlReplacer.exec(str)) !== null) {
    var i = match.index;
    var char = str.charCodeAt(i);
    var next = xmlCodeMap.get(char);
    if (next !== undefined) {
      ret += str.substring(lastIdx, i) + next;
      lastIdx = i + 1;
    } else {
      ret += "".concat(str.substring(lastIdx, i), "&#x").concat((0, exports.getCodePoint)(str, i).toString(16), ";");
      // Increase by 1 if we have a surrogate pair
      lastIdx = exports.xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800);
    }
  }
  return ret + str.substr(lastIdx);
}
exports.encodeXML = encodeXML;
/**
 * Encodes all non-ASCII characters, as well as characters not valid in XML
 * documents using numeric hexadecimal reference (eg. `&#xfc;`).
 *
 * Have a look at `escapeUTF8` if you want a more concise output at the expense
 * of reduced transportability.
 *
 * @param data String to escape.
 */
exports.escape = encodeXML;
/**
 * Creates a function that escapes all characters matched by the given regular
 * expression using the given map of characters to escape to their entities.
 *
 * @param regex Regular expression to match characters to escape.
 * @param map Map of characters to escape to their entities.
 *
 * @returns Function that escapes all characters matched by the given regular
 * expression using the given map of characters to escape to their entities.
 */
function getEscaper(regex, map) {
  return function escape(data) {
    var match;
    var lastIdx = 0;
    var result = "";
    while (match = regex.exec(data)) {
      if (lastIdx !== match.index) {
        result += data.substring(lastIdx, match.index);
      }
      // We know that this character will be in the map.
      result += map.get(match[0].charCodeAt(0));
      // Every match will be of length 1
      lastIdx = match.index + 1;
    }
    return result + data.substring(lastIdx);
  };
}
/**
 * Encodes all characters not valid in XML documents using XML entities.
 *
 * Note that the output will be character-set dependent.
 *
 * @param data String to escape.
 */
exports.escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap);
/**
 * Encodes all characters that have to be escaped in HTML attributes,
 * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
 *
 * @param data String to escape.
 */
exports.escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([[34, "&quot;"], [38, "&amp;"], [160, "&nbsp;"]]));
/**
 * Encodes all characters that have to be escaped in HTML text,
 * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
 *
 * @param data String to escape.
 */
exports.escapeText = getEscaper(/[&<>\u00A0]/g, new Map([[38, "&amp;"], [60, "&lt;"], [62, "&gt;"], [160, "&nbsp;"]]));

/***/ }),

/***/ "../../../node_modules/entities/lib/generated/decode-data-html.js":
/*!************************************************************************!*\
  !*** ../../../node_modules/entities/lib/generated/decode-data-html.js ***!
  \************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



// Generated using scripts/write-decode-map.ts
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = new Uint16Array(
// prettier-ignore
"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c".split("").map(function (c) {
  return c.charCodeAt(0);
}));

/***/ }),

/***/ "../../../node_modules/entities/lib/generated/decode-data-xml.js":
/*!***********************************************************************!*\
  !*** ../../../node_modules/entities/lib/generated/decode-data-xml.js ***!
  \***********************************************************************/
/***/ (function(__unused_webpack_module, exports) {



// Generated using scripts/write-decode-map.ts
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = new Uint16Array(
// prettier-ignore
"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022".split("").map(function (c) {
  return c.charCodeAt(0);
}));

/***/ }),

/***/ "../../../node_modules/entities/lib/generated/encode-html.js":
/*!*******************************************************************!*\
  !*** ../../../node_modules/entities/lib/generated/encode-html.js ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports) {



// Generated using scripts/write-encode-map.ts
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
function restoreDiff(arr) {
  for (var i = 1; i < arr.length; i++) {
    arr[i][0] += arr[i - 1][0] + 1;
  }
  return arr;
}
// prettier-ignore
exports["default"] = new Map( /* #__PURE__ */restoreDiff([[9, "&Tab;"], [0, "&NewLine;"], [22, "&excl;"], [0, "&quot;"], [0, "&num;"], [0, "&dollar;"], [0, "&percnt;"], [0, "&amp;"], [0, "&apos;"], [0, "&lpar;"], [0, "&rpar;"], [0, "&ast;"], [0, "&plus;"], [0, "&comma;"], [1, "&period;"], [0, "&sol;"], [10, "&colon;"], [0, "&semi;"], [0, {
  v: "&lt;",
  n: 8402,
  o: "&nvlt;"
}], [0, {
  v: "&equals;",
  n: 8421,
  o: "&bne;"
}], [0, {
  v: "&gt;",
  n: 8402,
  o: "&nvgt;"
}], [0, "&quest;"], [0, "&commat;"], [26, "&lbrack;"], [0, "&bsol;"], [0, "&rbrack;"], [0, "&Hat;"], [0, "&lowbar;"], [0, "&DiacriticalGrave;"], [5, {
  n: 106,
  o: "&fjlig;"
}], [20, "&lbrace;"], [0, "&verbar;"], [0, "&rbrace;"], [34, "&nbsp;"], [0, "&iexcl;"], [0, "&cent;"], [0, "&pound;"], [0, "&curren;"], [0, "&yen;"], [0, "&brvbar;"], [0, "&sect;"], [0, "&die;"], [0, "&copy;"], [0, "&ordf;"], [0, "&laquo;"], [0, "&not;"], [0, "&shy;"], [0, "&circledR;"], [0, "&macr;"], [0, "&deg;"], [0, "&PlusMinus;"], [0, "&sup2;"], [0, "&sup3;"], [0, "&acute;"], [0, "&micro;"], [0, "&para;"], [0, "&centerdot;"], [0, "&cedil;"], [0, "&sup1;"], [0, "&ordm;"], [0, "&raquo;"], [0, "&frac14;"], [0, "&frac12;"], [0, "&frac34;"], [0, "&iquest;"], [0, "&Agrave;"], [0, "&Aacute;"], [0, "&Acirc;"], [0, "&Atilde;"], [0, "&Auml;"], [0, "&angst;"], [0, "&AElig;"], [0, "&Ccedil;"], [0, "&Egrave;"], [0, "&Eacute;"], [0, "&Ecirc;"], [0, "&Euml;"], [0, "&Igrave;"], [0, "&Iacute;"], [0, "&Icirc;"], [0, "&Iuml;"], [0, "&ETH;"], [0, "&Ntilde;"], [0, "&Ograve;"], [0, "&Oacute;"], [0, "&Ocirc;"], [0, "&Otilde;"], [0, "&Ouml;"], [0, "&times;"], [0, "&Oslash;"], [0, "&Ugrave;"], [0, "&Uacute;"], [0, "&Ucirc;"], [0, "&Uuml;"], [0, "&Yacute;"], [0, "&THORN;"], [0, "&szlig;"], [0, "&agrave;"], [0, "&aacute;"], [0, "&acirc;"], [0, "&atilde;"], [0, "&auml;"], [0, "&aring;"], [0, "&aelig;"], [0, "&ccedil;"], [0, "&egrave;"], [0, "&eacute;"], [0, "&ecirc;"], [0, "&euml;"], [0, "&igrave;"], [0, "&iacute;"], [0, "&icirc;"], [0, "&iuml;"], [0, "&eth;"], [0, "&ntilde;"], [0, "&ograve;"], [0, "&oacute;"], [0, "&ocirc;"], [0, "&otilde;"], [0, "&ouml;"], [0, "&div;"], [0, "&oslash;"], [0, "&ugrave;"], [0, "&uacute;"], [0, "&ucirc;"], [0, "&uuml;"], [0, "&yacute;"], [0, "&thorn;"], [0, "&yuml;"], [0, "&Amacr;"], [0, "&amacr;"], [0, "&Abreve;"], [0, "&abreve;"], [0, "&Aogon;"], [0, "&aogon;"], [0, "&Cacute;"], [0, "&cacute;"], [0, "&Ccirc;"], [0, "&ccirc;"], [0, "&Cdot;"], [0, "&cdot;"], [0, "&Ccaron;"], [0, "&ccaron;"], [0, "&Dcaron;"], [0, "&dcaron;"], [0, "&Dstrok;"], [0, "&dstrok;"], [0, "&Emacr;"], [0, "&emacr;"], [2, "&Edot;"], [0, "&edot;"], [0, "&Eogon;"], [0, "&eogon;"], [0, "&Ecaron;"], [0, "&ecaron;"], [0, "&Gcirc;"], [0, "&gcirc;"], [0, "&Gbreve;"], [0, "&gbreve;"], [0, "&Gdot;"], [0, "&gdot;"], [0, "&Gcedil;"], [1, "&Hcirc;"], [0, "&hcirc;"], [0, "&Hstrok;"], [0, "&hstrok;"], [0, "&Itilde;"], [0, "&itilde;"], [0, "&Imacr;"], [0, "&imacr;"], [2, "&Iogon;"], [0, "&iogon;"], [0, "&Idot;"], [0, "&imath;"], [0, "&IJlig;"], [0, "&ijlig;"], [0, "&Jcirc;"], [0, "&jcirc;"], [0, "&Kcedil;"], [0, "&kcedil;"], [0, "&kgreen;"], [0, "&Lacute;"], [0, "&lacute;"], [0, "&Lcedil;"], [0, "&lcedil;"], [0, "&Lcaron;"], [0, "&lcaron;"], [0, "&Lmidot;"], [0, "&lmidot;"], [0, "&Lstrok;"], [0, "&lstrok;"], [0, "&Nacute;"], [0, "&nacute;"], [0, "&Ncedil;"], [0, "&ncedil;"], [0, "&Ncaron;"], [0, "&ncaron;"], [0, "&napos;"], [0, "&ENG;"], [0, "&eng;"], [0, "&Omacr;"], [0, "&omacr;"], [2, "&Odblac;"], [0, "&odblac;"], [0, "&OElig;"], [0, "&oelig;"], [0, "&Racute;"], [0, "&racute;"], [0, "&Rcedil;"], [0, "&rcedil;"], [0, "&Rcaron;"], [0, "&rcaron;"], [0, "&Sacute;"], [0, "&sacute;"], [0, "&Scirc;"], [0, "&scirc;"], [0, "&Scedil;"], [0, "&scedil;"], [0, "&Scaron;"], [0, "&scaron;"], [0, "&Tcedil;"], [0, "&tcedil;"], [0, "&Tcaron;"], [0, "&tcaron;"], [0, "&Tstrok;"], [0, "&tstrok;"], [0, "&Utilde;"], [0, "&utilde;"], [0, "&Umacr;"], [0, "&umacr;"], [0, "&Ubreve;"], [0, "&ubreve;"], [0, "&Uring;"], [0, "&uring;"], [0, "&Udblac;"], [0, "&udblac;"], [0, "&Uogon;"], [0, "&uogon;"], [0, "&Wcirc;"], [0, "&wcirc;"], [0, "&Ycirc;"], [0, "&ycirc;"], [0, "&Yuml;"], [0, "&Zacute;"], [0, "&zacute;"], [0, "&Zdot;"], [0, "&zdot;"], [0, "&Zcaron;"], [0, "&zcaron;"], [19, "&fnof;"], [34, "&imped;"], [63, "&gacute;"], [65, "&jmath;"], [142, "&circ;"], [0, "&caron;"], [16, "&breve;"], [0, "&DiacriticalDot;"], [0, "&ring;"], [0, "&ogon;"], [0, "&DiacriticalTilde;"], [0, "&dblac;"], [51, "&DownBreve;"], [127, "&Alpha;"], [0, "&Beta;"], [0, "&Gamma;"], [0, "&Delta;"], [0, "&Epsilon;"], [0, "&Zeta;"], [0, "&Eta;"], [0, "&Theta;"], [0, "&Iota;"], [0, "&Kappa;"], [0, "&Lambda;"], [0, "&Mu;"], [0, "&Nu;"], [0, "&Xi;"], [0, "&Omicron;"], [0, "&Pi;"], [0, "&Rho;"], [1, "&Sigma;"], [0, "&Tau;"], [0, "&Upsilon;"], [0, "&Phi;"], [0, "&Chi;"], [0, "&Psi;"], [0, "&ohm;"], [7, "&alpha;"], [0, "&beta;"], [0, "&gamma;"], [0, "&delta;"], [0, "&epsi;"], [0, "&zeta;"], [0, "&eta;"], [0, "&theta;"], [0, "&iota;"], [0, "&kappa;"], [0, "&lambda;"], [0, "&mu;"], [0, "&nu;"], [0, "&xi;"], [0, "&omicron;"], [0, "&pi;"], [0, "&rho;"], [0, "&sigmaf;"], [0, "&sigma;"], [0, "&tau;"], [0, "&upsi;"], [0, "&phi;"], [0, "&chi;"], [0, "&psi;"], [0, "&omega;"], [7, "&thetasym;"], [0, "&Upsi;"], [2, "&phiv;"], [0, "&piv;"], [5, "&Gammad;"], [0, "&digamma;"], [18, "&kappav;"], [0, "&rhov;"], [3, "&epsiv;"], [0, "&backepsilon;"], [10, "&IOcy;"], [0, "&DJcy;"], [0, "&GJcy;"], [0, "&Jukcy;"], [0, "&DScy;"], [0, "&Iukcy;"], [0, "&YIcy;"], [0, "&Jsercy;"], [0, "&LJcy;"], [0, "&NJcy;"], [0, "&TSHcy;"], [0, "&KJcy;"], [1, "&Ubrcy;"], [0, "&DZcy;"], [0, "&Acy;"], [0, "&Bcy;"], [0, "&Vcy;"], [0, "&Gcy;"], [0, "&Dcy;"], [0, "&IEcy;"], [0, "&ZHcy;"], [0, "&Zcy;"], [0, "&Icy;"], [0, "&Jcy;"], [0, "&Kcy;"], [0, "&Lcy;"], [0, "&Mcy;"], [0, "&Ncy;"], [0, "&Ocy;"], [0, "&Pcy;"], [0, "&Rcy;"], [0, "&Scy;"], [0, "&Tcy;"], [0, "&Ucy;"], [0, "&Fcy;"], [0, "&KHcy;"], [0, "&TScy;"], [0, "&CHcy;"], [0, "&SHcy;"], [0, "&SHCHcy;"], [0, "&HARDcy;"], [0, "&Ycy;"], [0, "&SOFTcy;"], [0, "&Ecy;"], [0, "&YUcy;"], [0, "&YAcy;"], [0, "&acy;"], [0, "&bcy;"], [0, "&vcy;"], [0, "&gcy;"], [0, "&dcy;"], [0, "&iecy;"], [0, "&zhcy;"], [0, "&zcy;"], [0, "&icy;"], [0, "&jcy;"], [0, "&kcy;"], [0, "&lcy;"], [0, "&mcy;"], [0, "&ncy;"], [0, "&ocy;"], [0, "&pcy;"], [0, "&rcy;"], [0, "&scy;"], [0, "&tcy;"], [0, "&ucy;"], [0, "&fcy;"], [0, "&khcy;"], [0, "&tscy;"], [0, "&chcy;"], [0, "&shcy;"], [0, "&shchcy;"], [0, "&hardcy;"], [0, "&ycy;"], [0, "&softcy;"], [0, "&ecy;"], [0, "&yucy;"], [0, "&yacy;"], [1, "&iocy;"], [0, "&djcy;"], [0, "&gjcy;"], [0, "&jukcy;"], [0, "&dscy;"], [0, "&iukcy;"], [0, "&yicy;"], [0, "&jsercy;"], [0, "&ljcy;"], [0, "&njcy;"], [0, "&tshcy;"], [0, "&kjcy;"], [1, "&ubrcy;"], [0, "&dzcy;"], [7074, "&ensp;"], [0, "&emsp;"], [0, "&emsp13;"], [0, "&emsp14;"], [1, "&numsp;"], [0, "&puncsp;"], [0, "&ThinSpace;"], [0, "&hairsp;"], [0, "&NegativeMediumSpace;"], [0, "&zwnj;"], [0, "&zwj;"], [0, "&lrm;"], [0, "&rlm;"], [0, "&dash;"], [2, "&ndash;"], [0, "&mdash;"], [0, "&horbar;"], [0, "&Verbar;"], [1, "&lsquo;"], [0, "&CloseCurlyQuote;"], [0, "&lsquor;"], [1, "&ldquo;"], [0, "&CloseCurlyDoubleQuote;"], [0, "&bdquo;"], [1, "&dagger;"], [0, "&Dagger;"], [0, "&bull;"], [2, "&nldr;"], [0, "&hellip;"], [9, "&permil;"], [0, "&pertenk;"], [0, "&prime;"], [0, "&Prime;"], [0, "&tprime;"], [0, "&backprime;"], [3, "&lsaquo;"], [0, "&rsaquo;"], [3, "&oline;"], [2, "&caret;"], [1, "&hybull;"], [0, "&frasl;"], [10, "&bsemi;"], [7, "&qprime;"], [7, {
  v: "&MediumSpace;",
  n: 8202,
  o: "&ThickSpace;"
}], [0, "&NoBreak;"], [0, "&af;"], [0, "&InvisibleTimes;"], [0, "&ic;"], [72, "&euro;"], [46, "&tdot;"], [0, "&DotDot;"], [37, "&complexes;"], [2, "&incare;"], [4, "&gscr;"], [0, "&hamilt;"], [0, "&Hfr;"], [0, "&Hopf;"], [0, "&planckh;"], [0, "&hbar;"], [0, "&imagline;"], [0, "&Ifr;"], [0, "&lagran;"], [0, "&ell;"], [1, "&naturals;"], [0, "&numero;"], [0, "&copysr;"], [0, "&weierp;"], [0, "&Popf;"], [0, "&Qopf;"], [0, "&realine;"], [0, "&real;"], [0, "&reals;"], [0, "&rx;"], [3, "&trade;"], [1, "&integers;"], [2, "&mho;"], [0, "&zeetrf;"], [0, "&iiota;"], [2, "&bernou;"], [0, "&Cayleys;"], [1, "&escr;"], [0, "&Escr;"], [0, "&Fouriertrf;"], [1, "&Mellintrf;"], [0, "&order;"], [0, "&alefsym;"], [0, "&beth;"], [0, "&gimel;"], [0, "&daleth;"], [12, "&CapitalDifferentialD;"], [0, "&dd;"], [0, "&ee;"], [0, "&ii;"], [10, "&frac13;"], [0, "&frac23;"], [0, "&frac15;"], [0, "&frac25;"], [0, "&frac35;"], [0, "&frac45;"], [0, "&frac16;"], [0, "&frac56;"], [0, "&frac18;"], [0, "&frac38;"], [0, "&frac58;"], [0, "&frac78;"], [49, "&larr;"], [0, "&ShortUpArrow;"], [0, "&rarr;"], [0, "&darr;"], [0, "&harr;"], [0, "&updownarrow;"], [0, "&nwarr;"], [0, "&nearr;"], [0, "&LowerRightArrow;"], [0, "&LowerLeftArrow;"], [0, "&nlarr;"], [0, "&nrarr;"], [1, {
  v: "&rarrw;",
  n: 824,
  o: "&nrarrw;"
}], [0, "&Larr;"], [0, "&Uarr;"], [0, "&Rarr;"], [0, "&Darr;"], [0, "&larrtl;"], [0, "&rarrtl;"], [0, "&LeftTeeArrow;"], [0, "&mapstoup;"], [0, "&map;"], [0, "&DownTeeArrow;"], [1, "&hookleftarrow;"], [0, "&hookrightarrow;"], [0, "&larrlp;"], [0, "&looparrowright;"], [0, "&harrw;"], [0, "&nharr;"], [1, "&lsh;"], [0, "&rsh;"], [0, "&ldsh;"], [0, "&rdsh;"], [1, "&crarr;"], [0, "&cularr;"], [0, "&curarr;"], [2, "&circlearrowleft;"], [0, "&circlearrowright;"], [0, "&leftharpoonup;"], [0, "&DownLeftVector;"], [0, "&RightUpVector;"], [0, "&LeftUpVector;"], [0, "&rharu;"], [0, "&DownRightVector;"], [0, "&dharr;"], [0, "&dharl;"], [0, "&RightArrowLeftArrow;"], [0, "&udarr;"], [0, "&LeftArrowRightArrow;"], [0, "&leftleftarrows;"], [0, "&upuparrows;"], [0, "&rightrightarrows;"], [0, "&ddarr;"], [0, "&leftrightharpoons;"], [0, "&Equilibrium;"], [0, "&nlArr;"], [0, "&nhArr;"], [0, "&nrArr;"], [0, "&DoubleLeftArrow;"], [0, "&DoubleUpArrow;"], [0, "&DoubleRightArrow;"], [0, "&dArr;"], [0, "&DoubleLeftRightArrow;"], [0, "&DoubleUpDownArrow;"], [0, "&nwArr;"], [0, "&neArr;"], [0, "&seArr;"], [0, "&swArr;"], [0, "&lAarr;"], [0, "&rAarr;"], [1, "&zigrarr;"], [6, "&larrb;"], [0, "&rarrb;"], [15, "&DownArrowUpArrow;"], [7, "&loarr;"], [0, "&roarr;"], [0, "&hoarr;"], [0, "&forall;"], [0, "&comp;"], [0, {
  v: "&part;",
  n: 824,
  o: "&npart;"
}], [0, "&exist;"], [0, "&nexist;"], [0, "&empty;"], [1, "&Del;"], [0, "&Element;"], [0, "&NotElement;"], [1, "&ni;"], [0, "&notni;"], [2, "&prod;"], [0, "&coprod;"], [0, "&sum;"], [0, "&minus;"], [0, "&MinusPlus;"], [0, "&dotplus;"], [1, "&Backslash;"], [0, "&lowast;"], [0, "&compfn;"], [1, "&radic;"], [2, "&prop;"], [0, "&infin;"], [0, "&angrt;"], [0, {
  v: "&ang;",
  n: 8402,
  o: "&nang;"
}], [0, "&angmsd;"], [0, "&angsph;"], [0, "&mid;"], [0, "&nmid;"], [0, "&DoubleVerticalBar;"], [0, "&NotDoubleVerticalBar;"], [0, "&and;"], [0, "&or;"], [0, {
  v: "&cap;",
  n: 65024,
  o: "&caps;"
}], [0, {
  v: "&cup;",
  n: 65024,
  o: "&cups;"
}], [0, "&int;"], [0, "&Int;"], [0, "&iiint;"], [0, "&conint;"], [0, "&Conint;"], [0, "&Cconint;"], [0, "&cwint;"], [0, "&ClockwiseContourIntegral;"], [0, "&awconint;"], [0, "&there4;"], [0, "&becaus;"], [0, "&ratio;"], [0, "&Colon;"], [0, "&dotminus;"], [1, "&mDDot;"], [0, "&homtht;"], [0, {
  v: "&sim;",
  n: 8402,
  o: "&nvsim;"
}], [0, {
  v: "&backsim;",
  n: 817,
  o: "&race;"
}], [0, {
  v: "&ac;",
  n: 819,
  o: "&acE;"
}], [0, "&acd;"], [0, "&VerticalTilde;"], [0, "&NotTilde;"], [0, {
  v: "&eqsim;",
  n: 824,
  o: "&nesim;"
}], [0, "&sime;"], [0, "&NotTildeEqual;"], [0, "&cong;"], [0, "&simne;"], [0, "&ncong;"], [0, "&ap;"], [0, "&nap;"], [0, "&ape;"], [0, {
  v: "&apid;",
  n: 824,
  o: "&napid;"
}], [0, "&backcong;"], [0, {
  v: "&asympeq;",
  n: 8402,
  o: "&nvap;"
}], [0, {
  v: "&bump;",
  n: 824,
  o: "&nbump;"
}], [0, {
  v: "&bumpe;",
  n: 824,
  o: "&nbumpe;"
}], [0, {
  v: "&doteq;",
  n: 824,
  o: "&nedot;"
}], [0, "&doteqdot;"], [0, "&efDot;"], [0, "&erDot;"], [0, "&Assign;"], [0, "&ecolon;"], [0, "&ecir;"], [0, "&circeq;"], [1, "&wedgeq;"], [0, "&veeeq;"], [1, "&triangleq;"], [2, "&equest;"], [0, "&ne;"], [0, {
  v: "&Congruent;",
  n: 8421,
  o: "&bnequiv;"
}], [0, "&nequiv;"], [1, {
  v: "&le;",
  n: 8402,
  o: "&nvle;"
}], [0, {
  v: "&ge;",
  n: 8402,
  o: "&nvge;"
}], [0, {
  v: "&lE;",
  n: 824,
  o: "&nlE;"
}], [0, {
  v: "&gE;",
  n: 824,
  o: "&ngE;"
}], [0, {
  v: "&lnE;",
  n: 65024,
  o: "&lvertneqq;"
}], [0, {
  v: "&gnE;",
  n: 65024,
  o: "&gvertneqq;"
}], [0, {
  v: "&ll;",
  n: new Map( /* #__PURE__ */restoreDiff([[824, "&nLtv;"], [7577, "&nLt;"]]))
}], [0, {
  v: "&gg;",
  n: new Map( /* #__PURE__ */restoreDiff([[824, "&nGtv;"], [7577, "&nGt;"]]))
}], [0, "&between;"], [0, "&NotCupCap;"], [0, "&nless;"], [0, "&ngt;"], [0, "&nle;"], [0, "&nge;"], [0, "&lesssim;"], [0, "&GreaterTilde;"], [0, "&nlsim;"], [0, "&ngsim;"], [0, "&LessGreater;"], [0, "&gl;"], [0, "&NotLessGreater;"], [0, "&NotGreaterLess;"], [0, "&pr;"], [0, "&sc;"], [0, "&prcue;"], [0, "&sccue;"], [0, "&PrecedesTilde;"], [0, {
  v: "&scsim;",
  n: 824,
  o: "&NotSucceedsTilde;"
}], [0, "&NotPrecedes;"], [0, "&NotSucceeds;"], [0, {
  v: "&sub;",
  n: 8402,
  o: "&NotSubset;"
}], [0, {
  v: "&sup;",
  n: 8402,
  o: "&NotSuperset;"
}], [0, "&nsub;"], [0, "&nsup;"], [0, "&sube;"], [0, "&supe;"], [0, "&NotSubsetEqual;"], [0, "&NotSupersetEqual;"], [0, {
  v: "&subne;",
  n: 65024,
  o: "&varsubsetneq;"
}], [0, {
  v: "&supne;",
  n: 65024,
  o: "&varsupsetneq;"
}], [1, "&cupdot;"], [0, "&UnionPlus;"], [0, {
  v: "&sqsub;",
  n: 824,
  o: "&NotSquareSubset;"
}], [0, {
  v: "&sqsup;",
  n: 824,
  o: "&NotSquareSuperset;"
}], [0, "&sqsube;"], [0, "&sqsupe;"], [0, {
  v: "&sqcap;",
  n: 65024,
  o: "&sqcaps;"
}], [0, {
  v: "&sqcup;",
  n: 65024,
  o: "&sqcups;"
}], [0, "&CirclePlus;"], [0, "&CircleMinus;"], [0, "&CircleTimes;"], [0, "&osol;"], [0, "&CircleDot;"], [0, "&circledcirc;"], [0, "&circledast;"], [1, "&circleddash;"], [0, "&boxplus;"], [0, "&boxminus;"], [0, "&boxtimes;"], [0, "&dotsquare;"], [0, "&RightTee;"], [0, "&dashv;"], [0, "&DownTee;"], [0, "&bot;"], [1, "&models;"], [0, "&DoubleRightTee;"], [0, "&Vdash;"], [0, "&Vvdash;"], [0, "&VDash;"], [0, "&nvdash;"], [0, "&nvDash;"], [0, "&nVdash;"], [0, "&nVDash;"], [0, "&prurel;"], [1, "&LeftTriangle;"], [0, "&RightTriangle;"], [0, {
  v: "&LeftTriangleEqual;",
  n: 8402,
  o: "&nvltrie;"
}], [0, {
  v: "&RightTriangleEqual;",
  n: 8402,
  o: "&nvrtrie;"
}], [0, "&origof;"], [0, "&imof;"], [0, "&multimap;"], [0, "&hercon;"], [0, "&intcal;"], [0, "&veebar;"], [1, "&barvee;"], [0, "&angrtvb;"], [0, "&lrtri;"], [0, "&bigwedge;"], [0, "&bigvee;"], [0, "&bigcap;"], [0, "&bigcup;"], [0, "&diam;"], [0, "&sdot;"], [0, "&sstarf;"], [0, "&divideontimes;"], [0, "&bowtie;"], [0, "&ltimes;"], [0, "&rtimes;"], [0, "&leftthreetimes;"], [0, "&rightthreetimes;"], [0, "&backsimeq;"], [0, "&curlyvee;"], [0, "&curlywedge;"], [0, "&Sub;"], [0, "&Sup;"], [0, "&Cap;"], [0, "&Cup;"], [0, "&fork;"], [0, "&epar;"], [0, "&lessdot;"], [0, "&gtdot;"], [0, {
  v: "&Ll;",
  n: 824,
  o: "&nLl;"
}], [0, {
  v: "&Gg;",
  n: 824,
  o: "&nGg;"
}], [0, {
  v: "&leg;",
  n: 65024,
  o: "&lesg;"
}], [0, {
  v: "&gel;",
  n: 65024,
  o: "&gesl;"
}], [2, "&cuepr;"], [0, "&cuesc;"], [0, "&NotPrecedesSlantEqual;"], [0, "&NotSucceedsSlantEqual;"], [0, "&NotSquareSubsetEqual;"], [0, "&NotSquareSupersetEqual;"], [2, "&lnsim;"], [0, "&gnsim;"], [0, "&precnsim;"], [0, "&scnsim;"], [0, "&nltri;"], [0, "&NotRightTriangle;"], [0, "&nltrie;"], [0, "&NotRightTriangleEqual;"], [0, "&vellip;"], [0, "&ctdot;"], [0, "&utdot;"], [0, "&dtdot;"], [0, "&disin;"], [0, "&isinsv;"], [0, "&isins;"], [0, {
  v: "&isindot;",
  n: 824,
  o: "&notindot;"
}], [0, "&notinvc;"], [0, "&notinvb;"], [1, {
  v: "&isinE;",
  n: 824,
  o: "&notinE;"
}], [0, "&nisd;"], [0, "&xnis;"], [0, "&nis;"], [0, "&notnivc;"], [0, "&notnivb;"], [6, "&barwed;"], [0, "&Barwed;"], [1, "&lceil;"], [0, "&rceil;"], [0, "&LeftFloor;"], [0, "&rfloor;"], [0, "&drcrop;"], [0, "&dlcrop;"], [0, "&urcrop;"], [0, "&ulcrop;"], [0, "&bnot;"], [1, "&profline;"], [0, "&profsurf;"], [1, "&telrec;"], [0, "&target;"], [5, "&ulcorn;"], [0, "&urcorn;"], [0, "&dlcorn;"], [0, "&drcorn;"], [2, "&frown;"], [0, "&smile;"], [9, "&cylcty;"], [0, "&profalar;"], [7, "&topbot;"], [6, "&ovbar;"], [1, "&solbar;"], [60, "&angzarr;"], [51, "&lmoustache;"], [0, "&rmoustache;"], [2, "&OverBracket;"], [0, "&bbrk;"], [0, "&bbrktbrk;"], [37, "&OverParenthesis;"], [0, "&UnderParenthesis;"], [0, "&OverBrace;"], [0, "&UnderBrace;"], [2, "&trpezium;"], [4, "&elinters;"], [59, "&blank;"], [164, "&circledS;"], [55, "&boxh;"], [1, "&boxv;"], [9, "&boxdr;"], [3, "&boxdl;"], [3, "&boxur;"], [3, "&boxul;"], [3, "&boxvr;"], [7, "&boxvl;"], [7, "&boxhd;"], [7, "&boxhu;"], [7, "&boxvh;"], [19, "&boxH;"], [0, "&boxV;"], [0, "&boxdR;"], [0, "&boxDr;"], [0, "&boxDR;"], [0, "&boxdL;"], [0, "&boxDl;"], [0, "&boxDL;"], [0, "&boxuR;"], [0, "&boxUr;"], [0, "&boxUR;"], [0, "&boxuL;"], [0, "&boxUl;"], [0, "&boxUL;"], [0, "&boxvR;"], [0, "&boxVr;"], [0, "&boxVR;"], [0, "&boxvL;"], [0, "&boxVl;"], [0, "&boxVL;"], [0, "&boxHd;"], [0, "&boxhD;"], [0, "&boxHD;"], [0, "&boxHu;"], [0, "&boxhU;"], [0, "&boxHU;"], [0, "&boxvH;"], [0, "&boxVh;"], [0, "&boxVH;"], [19, "&uhblk;"], [3, "&lhblk;"], [3, "&block;"], [8, "&blk14;"], [0, "&blk12;"], [0, "&blk34;"], [13, "&square;"], [8, "&blacksquare;"], [0, "&EmptyVerySmallSquare;"], [1, "&rect;"], [0, "&marker;"], [2, "&fltns;"], [1, "&bigtriangleup;"], [0, "&blacktriangle;"], [0, "&triangle;"], [2, "&blacktriangleright;"], [0, "&rtri;"], [3, "&bigtriangledown;"], [0, "&blacktriangledown;"], [0, "&dtri;"], [2, "&blacktriangleleft;"], [0, "&ltri;"], [6, "&loz;"], [0, "&cir;"], [32, "&tridot;"], [2, "&bigcirc;"], [8, "&ultri;"], [0, "&urtri;"], [0, "&lltri;"], [0, "&EmptySmallSquare;"], [0, "&FilledSmallSquare;"], [8, "&bigstar;"], [0, "&star;"], [7, "&phone;"], [49, "&female;"], [1, "&male;"], [29, "&spades;"], [2, "&clubs;"], [1, "&hearts;"], [0, "&diamondsuit;"], [3, "&sung;"], [2, "&flat;"], [0, "&natural;"], [0, "&sharp;"], [163, "&check;"], [3, "&cross;"], [8, "&malt;"], [21, "&sext;"], [33, "&VerticalSeparator;"], [25, "&lbbrk;"], [0, "&rbbrk;"], [84, "&bsolhsub;"], [0, "&suphsol;"], [28, "&LeftDoubleBracket;"], [0, "&RightDoubleBracket;"], [0, "&lang;"], [0, "&rang;"], [0, "&Lang;"], [0, "&Rang;"], [0, "&loang;"], [0, "&roang;"], [7, "&longleftarrow;"], [0, "&longrightarrow;"], [0, "&longleftrightarrow;"], [0, "&DoubleLongLeftArrow;"], [0, "&DoubleLongRightArrow;"], [0, "&DoubleLongLeftRightArrow;"], [1, "&longmapsto;"], [2, "&dzigrarr;"], [258, "&nvlArr;"], [0, "&nvrArr;"], [0, "&nvHarr;"], [0, "&Map;"], [6, "&lbarr;"], [0, "&bkarow;"], [0, "&lBarr;"], [0, "&dbkarow;"], [0, "&drbkarow;"], [0, "&DDotrahd;"], [0, "&UpArrowBar;"], [0, "&DownArrowBar;"], [2, "&Rarrtl;"], [2, "&latail;"], [0, "&ratail;"], [0, "&lAtail;"], [0, "&rAtail;"], [0, "&larrfs;"], [0, "&rarrfs;"], [0, "&larrbfs;"], [0, "&rarrbfs;"], [2, "&nwarhk;"], [0, "&nearhk;"], [0, "&hksearow;"], [0, "&hkswarow;"], [0, "&nwnear;"], [0, "&nesear;"], [0, "&seswar;"], [0, "&swnwar;"], [8, {
  v: "&rarrc;",
  n: 824,
  o: "&nrarrc;"
}], [1, "&cudarrr;"], [0, "&ldca;"], [0, "&rdca;"], [0, "&cudarrl;"], [0, "&larrpl;"], [2, "&curarrm;"], [0, "&cularrp;"], [7, "&rarrpl;"], [2, "&harrcir;"], [0, "&Uarrocir;"], [0, "&lurdshar;"], [0, "&ldrushar;"], [2, "&LeftRightVector;"], [0, "&RightUpDownVector;"], [0, "&DownLeftRightVector;"], [0, "&LeftUpDownVector;"], [0, "&LeftVectorBar;"], [0, "&RightVectorBar;"], [0, "&RightUpVectorBar;"], [0, "&RightDownVectorBar;"], [0, "&DownLeftVectorBar;"], [0, "&DownRightVectorBar;"], [0, "&LeftUpVectorBar;"], [0, "&LeftDownVectorBar;"], [0, "&LeftTeeVector;"], [0, "&RightTeeVector;"], [0, "&RightUpTeeVector;"], [0, "&RightDownTeeVector;"], [0, "&DownLeftTeeVector;"], [0, "&DownRightTeeVector;"], [0, "&LeftUpTeeVector;"], [0, "&LeftDownTeeVector;"], [0, "&lHar;"], [0, "&uHar;"], [0, "&rHar;"], [0, "&dHar;"], [0, "&luruhar;"], [0, "&ldrdhar;"], [0, "&ruluhar;"], [0, "&rdldhar;"], [0, "&lharul;"], [0, "&llhard;"], [0, "&rharul;"], [0, "&lrhard;"], [0, "&udhar;"], [0, "&duhar;"], [0, "&RoundImplies;"], [0, "&erarr;"], [0, "&simrarr;"], [0, "&larrsim;"], [0, "&rarrsim;"], [0, "&rarrap;"], [0, "&ltlarr;"], [1, "&gtrarr;"], [0, "&subrarr;"], [1, "&suplarr;"], [0, "&lfisht;"], [0, "&rfisht;"], [0, "&ufisht;"], [0, "&dfisht;"], [5, "&lopar;"], [0, "&ropar;"], [4, "&lbrke;"], [0, "&rbrke;"], [0, "&lbrkslu;"], [0, "&rbrksld;"], [0, "&lbrksld;"], [0, "&rbrkslu;"], [0, "&langd;"], [0, "&rangd;"], [0, "&lparlt;"], [0, "&rpargt;"], [0, "&gtlPar;"], [0, "&ltrPar;"], [3, "&vzigzag;"], [1, "&vangrt;"], [0, "&angrtvbd;"], [6, "&ange;"], [0, "&range;"], [0, "&dwangle;"], [0, "&uwangle;"], [0, "&angmsdaa;"], [0, "&angmsdab;"], [0, "&angmsdac;"], [0, "&angmsdad;"], [0, "&angmsdae;"], [0, "&angmsdaf;"], [0, "&angmsdag;"], [0, "&angmsdah;"], [0, "&bemptyv;"], [0, "&demptyv;"], [0, "&cemptyv;"], [0, "&raemptyv;"], [0, "&laemptyv;"], [0, "&ohbar;"], [0, "&omid;"], [0, "&opar;"], [1, "&operp;"], [1, "&olcross;"], [0, "&odsold;"], [1, "&olcir;"], [0, "&ofcir;"], [0, "&olt;"], [0, "&ogt;"], [0, "&cirscir;"], [0, "&cirE;"], [0, "&solb;"], [0, "&bsolb;"], [3, "&boxbox;"], [3, "&trisb;"], [0, "&rtriltri;"], [0, {
  v: "&LeftTriangleBar;",
  n: 824,
  o: "&NotLeftTriangleBar;"
}], [0, {
  v: "&RightTriangleBar;",
  n: 824,
  o: "&NotRightTriangleBar;"
}], [11, "&iinfin;"], [0, "&infintie;"], [0, "&nvinfin;"], [4, "&eparsl;"], [0, "&smeparsl;"], [0, "&eqvparsl;"], [5, "&blacklozenge;"], [8, "&RuleDelayed;"], [1, "&dsol;"], [9, "&bigodot;"], [0, "&bigoplus;"], [0, "&bigotimes;"], [1, "&biguplus;"], [1, "&bigsqcup;"], [5, "&iiiint;"], [0, "&fpartint;"], [2, "&cirfnint;"], [0, "&awint;"], [0, "&rppolint;"], [0, "&scpolint;"], [0, "&npolint;"], [0, "&pointint;"], [0, "&quatint;"], [0, "&intlarhk;"], [10, "&pluscir;"], [0, "&plusacir;"], [0, "&simplus;"], [0, "&plusdu;"], [0, "&plussim;"], [0, "&plustwo;"], [1, "&mcomma;"], [0, "&minusdu;"], [2, "&loplus;"], [0, "&roplus;"], [0, "&Cross;"], [0, "&timesd;"], [0, "&timesbar;"], [1, "&smashp;"], [0, "&lotimes;"], [0, "&rotimes;"], [0, "&otimesas;"], [0, "&Otimes;"], [0, "&odiv;"], [0, "&triplus;"], [0, "&triminus;"], [0, "&tritime;"], [0, "&intprod;"], [2, "&amalg;"], [0, "&capdot;"], [1, "&ncup;"], [0, "&ncap;"], [0, "&capand;"], [0, "&cupor;"], [0, "&cupcap;"], [0, "&capcup;"], [0, "&cupbrcap;"], [0, "&capbrcup;"], [0, "&cupcup;"], [0, "&capcap;"], [0, "&ccups;"], [0, "&ccaps;"], [2, "&ccupssm;"], [2, "&And;"], [0, "&Or;"], [0, "&andand;"], [0, "&oror;"], [0, "&orslope;"], [0, "&andslope;"], [1, "&andv;"], [0, "&orv;"], [0, "&andd;"], [0, "&ord;"], [1, "&wedbar;"], [6, "&sdote;"], [3, "&simdot;"], [2, {
  v: "&congdot;",
  n: 824,
  o: "&ncongdot;"
}], [0, "&easter;"], [0, "&apacir;"], [0, {
  v: "&apE;",
  n: 824,
  o: "&napE;"
}], [0, "&eplus;"], [0, "&pluse;"], [0, "&Esim;"], [0, "&Colone;"], [0, "&Equal;"], [1, "&ddotseq;"], [0, "&equivDD;"], [0, "&ltcir;"], [0, "&gtcir;"], [0, "&ltquest;"], [0, "&gtquest;"], [0, {
  v: "&leqslant;",
  n: 824,
  o: "&nleqslant;"
}], [0, {
  v: "&geqslant;",
  n: 824,
  o: "&ngeqslant;"
}], [0, "&lesdot;"], [0, "&gesdot;"], [0, "&lesdoto;"], [0, "&gesdoto;"], [0, "&lesdotor;"], [0, "&gesdotol;"], [0, "&lap;"], [0, "&gap;"], [0, "&lne;"], [0, "&gne;"], [0, "&lnap;"], [0, "&gnap;"], [0, "&lEg;"], [0, "&gEl;"], [0, "&lsime;"], [0, "&gsime;"], [0, "&lsimg;"], [0, "&gsiml;"], [0, "&lgE;"], [0, "&glE;"], [0, "&lesges;"], [0, "&gesles;"], [0, "&els;"], [0, "&egs;"], [0, "&elsdot;"], [0, "&egsdot;"], [0, "&el;"], [0, "&eg;"], [2, "&siml;"], [0, "&simg;"], [0, "&simlE;"], [0, "&simgE;"], [0, {
  v: "&LessLess;",
  n: 824,
  o: "&NotNestedLessLess;"
}], [0, {
  v: "&GreaterGreater;",
  n: 824,
  o: "&NotNestedGreaterGreater;"
}], [1, "&glj;"], [0, "&gla;"], [0, "&ltcc;"], [0, "&gtcc;"], [0, "&lescc;"], [0, "&gescc;"], [0, "&smt;"], [0, "&lat;"], [0, {
  v: "&smte;",
  n: 65024,
  o: "&smtes;"
}], [0, {
  v: "&late;",
  n: 65024,
  o: "&lates;"
}], [0, "&bumpE;"], [0, {
  v: "&PrecedesEqual;",
  n: 824,
  o: "&NotPrecedesEqual;"
}], [0, {
  v: "&sce;",
  n: 824,
  o: "&NotSucceedsEqual;"
}], [2, "&prE;"], [0, "&scE;"], [0, "&precneqq;"], [0, "&scnE;"], [0, "&prap;"], [0, "&scap;"], [0, "&precnapprox;"], [0, "&scnap;"], [0, "&Pr;"], [0, "&Sc;"], [0, "&subdot;"], [0, "&supdot;"], [0, "&subplus;"], [0, "&supplus;"], [0, "&submult;"], [0, "&supmult;"], [0, "&subedot;"], [0, "&supedot;"], [0, {
  v: "&subE;",
  n: 824,
  o: "&nsubE;"
}], [0, {
  v: "&supE;",
  n: 824,
  o: "&nsupE;"
}], [0, "&subsim;"], [0, "&supsim;"], [2, {
  v: "&subnE;",
  n: 65024,
  o: "&varsubsetneqq;"
}], [0, {
  v: "&supnE;",
  n: 65024,
  o: "&varsupsetneqq;"
}], [2, "&csub;"], [0, "&csup;"], [0, "&csube;"], [0, "&csupe;"], [0, "&subsup;"], [0, "&supsub;"], [0, "&subsub;"], [0, "&supsup;"], [0, "&suphsub;"], [0, "&supdsub;"], [0, "&forkv;"], [0, "&topfork;"], [0, "&mlcp;"], [8, "&Dashv;"], [1, "&Vdashl;"], [0, "&Barv;"], [0, "&vBar;"], [0, "&vBarv;"], [1, "&Vbar;"], [0, "&Not;"], [0, "&bNot;"], [0, "&rnmid;"], [0, "&cirmid;"], [0, "&midcir;"], [0, "&topcir;"], [0, "&nhpar;"], [0, "&parsim;"], [9, {
  v: "&parsl;",
  n: 8421,
  o: "&nparsl;"
}], [44343, {
  n: new Map( /* #__PURE__ */restoreDiff([[56476, "&Ascr;"], [1, "&Cscr;"], [0, "&Dscr;"], [2, "&Gscr;"], [2, "&Jscr;"], [0, "&Kscr;"], [2, "&Nscr;"], [0, "&Oscr;"], [0, "&Pscr;"], [0, "&Qscr;"], [1, "&Sscr;"], [0, "&Tscr;"], [0, "&Uscr;"], [0, "&Vscr;"], [0, "&Wscr;"], [0, "&Xscr;"], [0, "&Yscr;"], [0, "&Zscr;"], [0, "&ascr;"], [0, "&bscr;"], [0, "&cscr;"], [0, "&dscr;"], [1, "&fscr;"], [1, "&hscr;"], [0, "&iscr;"], [0, "&jscr;"], [0, "&kscr;"], [0, "&lscr;"], [0, "&mscr;"], [0, "&nscr;"], [1, "&pscr;"], [0, "&qscr;"], [0, "&rscr;"], [0, "&sscr;"], [0, "&tscr;"], [0, "&uscr;"], [0, "&vscr;"], [0, "&wscr;"], [0, "&xscr;"], [0, "&yscr;"], [0, "&zscr;"], [52, "&Afr;"], [0, "&Bfr;"], [1, "&Dfr;"], [0, "&Efr;"], [0, "&Ffr;"], [0, "&Gfr;"], [2, "&Jfr;"], [0, "&Kfr;"], [0, "&Lfr;"], [0, "&Mfr;"], [0, "&Nfr;"], [0, "&Ofr;"], [0, "&Pfr;"], [0, "&Qfr;"], [1, "&Sfr;"], [0, "&Tfr;"], [0, "&Ufr;"], [0, "&Vfr;"], [0, "&Wfr;"], [0, "&Xfr;"], [0, "&Yfr;"], [1, "&afr;"], [0, "&bfr;"], [0, "&cfr;"], [0, "&dfr;"], [0, "&efr;"], [0, "&ffr;"], [0, "&gfr;"], [0, "&hfr;"], [0, "&ifr;"], [0, "&jfr;"], [0, "&kfr;"], [0, "&lfr;"], [0, "&mfr;"], [0, "&nfr;"], [0, "&ofr;"], [0, "&pfr;"], [0, "&qfr;"], [0, "&rfr;"], [0, "&sfr;"], [0, "&tfr;"], [0, "&ufr;"], [0, "&vfr;"], [0, "&wfr;"], [0, "&xfr;"], [0, "&yfr;"], [0, "&zfr;"], [0, "&Aopf;"], [0, "&Bopf;"], [1, "&Dopf;"], [0, "&Eopf;"], [0, "&Fopf;"], [0, "&Gopf;"], [1, "&Iopf;"], [0, "&Jopf;"], [0, "&Kopf;"], [0, "&Lopf;"], [0, "&Mopf;"], [1, "&Oopf;"], [3, "&Sopf;"], [0, "&Topf;"], [0, "&Uopf;"], [0, "&Vopf;"], [0, "&Wopf;"], [0, "&Xopf;"], [0, "&Yopf;"], [1, "&aopf;"], [0, "&bopf;"], [0, "&copf;"], [0, "&dopf;"], [0, "&eopf;"], [0, "&fopf;"], [0, "&gopf;"], [0, "&hopf;"], [0, "&iopf;"], [0, "&jopf;"], [0, "&kopf;"], [0, "&lopf;"], [0, "&mopf;"], [0, "&nopf;"], [0, "&oopf;"], [0, "&popf;"], [0, "&qopf;"], [0, "&ropf;"], [0, "&sopf;"], [0, "&topf;"], [0, "&uopf;"], [0, "&vopf;"], [0, "&wopf;"], [0, "&xopf;"], [0, "&yopf;"], [0, "&zopf;"]]))
}], [8906, "&fflig;"], [0, "&filig;"], [0, "&fllig;"], [0, "&ffilig;"], [0, "&ffllig;"]]));

/***/ }),

/***/ "../../../node_modules/entities/lib/index.js":
/*!***************************************************!*\
  !*** ../../../node_modules/entities/lib/index.js ***!
  \***************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLAttribute = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.DecodingMode = exports.EntityDecoder = exports.encodeHTML5 = exports.encodeHTML4 = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = exports.EncodingMode = exports.EntityLevel = void 0;
var decode_js_1 = __webpack_require__(/*! ./decode.js */ "../../../node_modules/entities/lib/decode.js");
var encode_js_1 = __webpack_require__(/*! ./encode.js */ "../../../node_modules/entities/lib/encode.js");
var escape_js_1 = __webpack_require__(/*! ./escape.js */ "../../../node_modules/entities/lib/escape.js");
/** The level of entities to support. */
var EntityLevel;
(function (EntityLevel) {
  /** Support only XML entities. */
  EntityLevel[EntityLevel["XML"] = 0] = "XML";
  /** Support HTML entities, which are a superset of XML entities. */
  EntityLevel[EntityLevel["HTML"] = 1] = "HTML";
})(EntityLevel = exports.EntityLevel || (exports.EntityLevel = {}));
var EncodingMode;
(function (EncodingMode) {
  /**
   * The output is UTF-8 encoded. Only characters that need escaping within
   * XML will be escaped.
   */
  EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8";
  /**
   * The output consists only of ASCII characters. Characters that need
   * escaping within HTML, and characters that aren't ASCII characters will
   * be escaped.
   */
  EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII";
  /**
   * Encode all characters that have an equivalent entity, as well as all
   * characters that are not ASCII characters.
   */
  EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive";
  /**
   * Encode all characters that have to be escaped in HTML attributes,
   * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
   */
  EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute";
  /**
   * Encode all characters that have to be escaped in HTML text,
   * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
   */
  EncodingMode[EncodingMode["Text"] = 4] = "Text";
})(EncodingMode = exports.EncodingMode || (exports.EncodingMode = {}));
/**
 * Decodes a string with entities.
 *
 * @param data String to decode.
 * @param options Decoding options.
 */
function decode(data, options) {
  if (options === void 0) {
    options = EntityLevel.XML;
  }
  var level = typeof options === "number" ? options : options.level;
  if (level === EntityLevel.HTML) {
    var mode = typeof options === "object" ? options.mode : undefined;
    return (0, decode_js_1.decodeHTML)(data, mode);
  }
  return (0, decode_js_1.decodeXML)(data);
}
exports.decode = decode;
/**
 * Decodes a string with entities. Does not allow missing trailing semicolons for entities.
 *
 * @param data String to decode.
 * @param options Decoding options.
 * @deprecated Use `decode` with the `mode` set to `Strict`.
 */
function decodeStrict(data, options) {
  var _a;
  if (options === void 0) {
    options = EntityLevel.XML;
  }
  var opts = typeof options === "number" ? {
    level: options
  } : options;
  (_a = opts.mode) !== null && _a !== void 0 ? _a : opts.mode = decode_js_1.DecodingMode.Strict;
  return decode(data, opts);
}
exports.decodeStrict = decodeStrict;
/**
 * Encodes a string with entities.
 *
 * @param data String to encode.
 * @param options Encoding options.
 */
function encode(data, options) {
  if (options === void 0) {
    options = EntityLevel.XML;
  }
  var opts = typeof options === "number" ? {
    level: options
  } : options;
  // Mode `UTF8` just escapes XML entities
  if (opts.mode === EncodingMode.UTF8) return (0, escape_js_1.escapeUTF8)(data);
  if (opts.mode === EncodingMode.Attribute) return (0, escape_js_1.escapeAttribute)(data);
  if (opts.mode === EncodingMode.Text) return (0, escape_js_1.escapeText)(data);
  if (opts.level === EntityLevel.HTML) {
    if (opts.mode === EncodingMode.ASCII) {
      return (0, encode_js_1.encodeNonAsciiHTML)(data);
    }
    return (0, encode_js_1.encodeHTML)(data);
  }
  // ASCII and Extensive are equivalent
  return (0, escape_js_1.encodeXML)(data);
}
exports.encode = encode;
var escape_js_2 = __webpack_require__(/*! ./escape.js */ "../../../node_modules/entities/lib/escape.js");
Object.defineProperty(exports, "encodeXML", ({
  enumerable: true,
  get: function () {
    return escape_js_2.encodeXML;
  }
}));
Object.defineProperty(exports, "escape", ({
  enumerable: true,
  get: function () {
    return escape_js_2.escape;
  }
}));
Object.defineProperty(exports, "escapeUTF8", ({
  enumerable: true,
  get: function () {
    return escape_js_2.escapeUTF8;
  }
}));
Object.defineProperty(exports, "escapeAttribute", ({
  enumerable: true,
  get: function () {
    return escape_js_2.escapeAttribute;
  }
}));
Object.defineProperty(exports, "escapeText", ({
  enumerable: true,
  get: function () {
    return escape_js_2.escapeText;
  }
}));
var encode_js_2 = __webpack_require__(/*! ./encode.js */ "../../../node_modules/entities/lib/encode.js");
Object.defineProperty(exports, "encodeHTML", ({
  enumerable: true,
  get: function () {
    return encode_js_2.encodeHTML;
  }
}));
Object.defineProperty(exports, "encodeNonAsciiHTML", ({
  enumerable: true,
  get: function () {
    return encode_js_2.encodeNonAsciiHTML;
  }
}));
// Legacy aliases (deprecated)
Object.defineProperty(exports, "encodeHTML4", ({
  enumerable: true,
  get: function () {
    return encode_js_2.encodeHTML;
  }
}));
Object.defineProperty(exports, "encodeHTML5", ({
  enumerable: true,
  get: function () {
    return encode_js_2.encodeHTML;
  }
}));
var decode_js_2 = __webpack_require__(/*! ./decode.js */ "../../../node_modules/entities/lib/decode.js");
Object.defineProperty(exports, "EntityDecoder", ({
  enumerable: true,
  get: function () {
    return decode_js_2.EntityDecoder;
  }
}));
Object.defineProperty(exports, "DecodingMode", ({
  enumerable: true,
  get: function () {
    return decode_js_2.DecodingMode;
  }
}));
Object.defineProperty(exports, "decodeXML", ({
  enumerable: true,
  get: function () {
    return decode_js_2.decodeXML;
  }
}));
Object.defineProperty(exports, "decodeHTML", ({
  enumerable: true,
  get: function () {
    return decode_js_2.decodeHTML;
  }
}));
Object.defineProperty(exports, "decodeHTMLStrict", ({
  enumerable: true,
  get: function () {
    return decode_js_2.decodeHTMLStrict;
  }
}));
Object.defineProperty(exports, "decodeHTMLAttribute", ({
  enumerable: true,
  get: function () {
    return decode_js_2.decodeHTMLAttribute;
  }
}));
// Legacy aliases (deprecated)
Object.defineProperty(exports, "decodeHTML4", ({
  enumerable: true,
  get: function () {
    return decode_js_2.decodeHTML;
  }
}));
Object.defineProperty(exports, "decodeHTML5", ({
  enumerable: true,
  get: function () {
    return decode_js_2.decodeHTML;
  }
}));
Object.defineProperty(exports, "decodeHTML4Strict", ({
  enumerable: true,
  get: function () {
    return decode_js_2.decodeHTMLStrict;
  }
}));
Object.defineProperty(exports, "decodeHTML5Strict", ({
  enumerable: true,
  get: function () {
    return decode_js_2.decodeHTMLStrict;
  }
}));
Object.defineProperty(exports, "decodeXMLStrict", ({
  enumerable: true,
  get: function () {
    return decode_js_2.decodeXML;
  }
}));

/***/ }),

/***/ "../../../node_modules/framer-motion/dist/cjs/index.js":
/*!*************************************************************!*\
  !*** ../../../node_modules/framer-motion/dist/cjs/index.js ***!
  \*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
var tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
var React = __webpack_require__(/*! react */ "react");
var heyListen = __webpack_require__(/*! hey-listen */ "../../../node_modules/hey-listen/dist/hey-listen.es.js");
var styleValueTypes = __webpack_require__(/*! style-value-types */ "../../../node_modules/style-value-types/dist/valueTypes.cjs.js");
var popmotion = __webpack_require__(/*! popmotion */ "../../../node_modules/popmotion/dist/popmotion.cjs.js");
var sync = __webpack_require__(/*! framesync */ "../../../node_modules/framesync/dist/framesync.cjs.js");
var dom = __webpack_require__(/*! @motionone/dom */ "../../../node_modules/@motionone/dom/dist/index.es.js");
function _interopDefaultLegacy(e) {
  return e && typeof e === 'object' && 'default' in e ? e : {
    'default': e
  };
}
function _interopNamespace(e) {
  if (e && e.__esModule) return e;
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () {
            return e[k];
          }
        });
      }
    });
  }
  n["default"] = e;
  return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
var sync__default = /*#__PURE__*/_interopDefaultLegacy(sync);

/**
 * Browser-safe usage of process
 */
var defaultEnvironment = "production";
var env = typeof process === "undefined" || process.env === undefined ? defaultEnvironment : "development" || 0;
var createDefinition = function (propNames) {
  return {
    isEnabled: function (props) {
      return propNames.some(function (name) {
        return !!props[name];
      });
    }
  };
};
var featureDefinitions = {
  measureLayout: createDefinition(["layout", "layoutId", "drag"]),
  animation: createDefinition(["animate", "exit", "variants", "whileHover", "whileTap", "whileFocus", "whileDrag", "whileInView"]),
  exit: createDefinition(["exit"]),
  drag: createDefinition(["drag", "dragControls"]),
  focus: createDefinition(["whileFocus"]),
  hover: createDefinition(["whileHover", "onHoverStart", "onHoverEnd"]),
  tap: createDefinition(["whileTap", "onTap", "onTapStart", "onTapCancel"]),
  pan: createDefinition(["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"]),
  inView: createDefinition(["whileInView", "onViewportEnter", "onViewportLeave"])
};
function loadFeatures(features) {
  for (var key in features) {
    if (features[key] === null) continue;
    if (key === "projectionNodeConstructor") {
      featureDefinitions.projectionNodeConstructor = features[key];
    } else {
      featureDefinitions[key].Component = features[key];
    }
  }
}
var LazyContext = React.createContext({
  strict: false
});
var featureNames = Object.keys(featureDefinitions);
var numFeatures = featureNames.length;
/**
 * Load features via renderless components based on the provided MotionProps.
 */
function useFeatures(props, visualElement, preloadedFeatures) {
  var features = [];
  var lazyContext = React.useContext(LazyContext);
  if (!visualElement) return null;
  /**
   * If we're in development mode, check to make sure we're not rendering a motion component
   * as a child of LazyMotion, as this will break the file-size benefits of using it.
   */
  if (env !== "production" && preloadedFeatures && lazyContext.strict) {
    heyListen.invariant(false, "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");
  }
  for (var i = 0; i < numFeatures; i++) {
    var name_1 = featureNames[i];
    var _a = featureDefinitions[name_1],
      isEnabled = _a.isEnabled,
      Component = _a.Component;
    /**
     * It might be possible in the future to use this moment to
     * dynamically request functionality. In initial tests this
     * was producing a lot of duplication amongst bundles.
     */
    if (isEnabled(props) && Component) {
      features.push(React__namespace.createElement(Component, tslib.__assign({
        key: name_1
      }, props, {
        visualElement: visualElement
      })));
    }
  }
  return features;
}

/**
 * @public
 */
var MotionConfigContext = React.createContext({
  transformPagePoint: function (p) {
    return p;
  },
  isStatic: false,
  reducedMotion: "never"
});
var MotionContext = React.createContext({});
function useVisualElementContext() {
  return React.useContext(MotionContext).visualElement;
}

/**
 * @public
 */
var PresenceContext = React.createContext(null);
var isBrowser = typeof document !== "undefined";
var useIsomorphicLayoutEffect = isBrowser ? React.useLayoutEffect : React.useEffect;

// Does this device prefer reduced motion? Returns `null` server-side.
var prefersReducedMotion = {
  current: null
};
var hasDetected = false;
function initPrefersReducedMotion() {
  hasDetected = true;
  if (!isBrowser) return;
  if (window.matchMedia) {
    var motionMediaQuery_1 = window.matchMedia("(prefers-reduced-motion)");
    var setReducedMotionPreferences = function () {
      return prefersReducedMotion.current = motionMediaQuery_1.matches;
    };
    motionMediaQuery_1.addListener(setReducedMotionPreferences);
    setReducedMotionPreferences();
  } else {
    prefersReducedMotion.current = false;
  }
}
/**
 * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.
 *
 * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing
 * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.
 *
 * It will actively respond to changes and re-render your components with the latest setting.
 *
 * ```jsx
 * export function Sidebar({ isOpen }) {
 *   const shouldReduceMotion = useReducedMotion()
 *   const closedX = shouldReduceMotion ? 0 : "-100%"
 *
 *   return (
 *     <motion.div animate={{
 *       opacity: isOpen ? 1 : 0,
 *       x: isOpen ? 0 : closedX
 *     }} />
 *   )
 * }
 * ```
 *
 * @return boolean
 *
 * @public
 */
function useReducedMotion() {
  /**
   * Lazy initialisation of prefersReducedMotion
   */
  !hasDetected && initPrefersReducedMotion();
  var _a = tslib.__read(React.useState(prefersReducedMotion.current), 1),
    shouldReduceMotion = _a[0];
  /**
   * TODO See if people miss automatically updating shouldReduceMotion setting
   */
  return shouldReduceMotion;
}
function useReducedMotionConfig() {
  var reducedMotionPreference = useReducedMotion();
  var reducedMotion = React.useContext(MotionConfigContext).reducedMotion;
  if (reducedMotion === "never") {
    return false;
  } else if (reducedMotion === "always") {
    return true;
  } else {
    return reducedMotionPreference;
  }
}
function useVisualElement(Component, visualState, props, createVisualElement) {
  var lazyContext = React.useContext(LazyContext);
  var parent = useVisualElementContext();
  var presenceContext = React.useContext(PresenceContext);
  var shouldReduceMotion = useReducedMotionConfig();
  var visualElementRef = React.useRef(undefined);
  /**
   * If we haven't preloaded a renderer, check to see if we have one lazy-loaded
   */
  if (!createVisualElement) createVisualElement = lazyContext.renderer;
  if (!visualElementRef.current && createVisualElement) {
    visualElementRef.current = createVisualElement(Component, {
      visualState: visualState,
      parent: parent,
      props: props,
      presenceId: presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id,
      blockInitialAnimation: (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false,
      shouldReduceMotion: shouldReduceMotion
    });
  }
  var visualElement = visualElementRef.current;
  useIsomorphicLayoutEffect(function () {
    visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender();
  });
  React.useEffect(function () {
    var _a;
    (_a = visualElement === null || visualElement === void 0 ? void 0 : visualElement.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges();
  });
  useIsomorphicLayoutEffect(function () {
    return function () {
      return visualElement === null || visualElement === void 0 ? void 0 : visualElement.notifyUnmount();
    };
  }, []);
  return visualElement;
}
function isRefObject(ref) {
  return typeof ref === "object" && Object.prototype.hasOwnProperty.call(ref, "current");
}

/**
 * Creates a ref function that, when called, hydrates the provided
 * external ref and VisualElement.
 */
function useMotionRef(visualState, visualElement, externalRef) {
  return React.useCallback(function (instance) {
    var _a;
    instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance));
    if (visualElement) {
      instance ? visualElement.mount(instance) : visualElement.unmount();
    }
    if (externalRef) {
      if (typeof externalRef === "function") {
        externalRef(instance);
      } else if (isRefObject(externalRef)) {
        externalRef.current = instance;
      }
    }
  },
  /**
   * Only pass a new ref callback to React if we've received a visual element
   * factory. Otherwise we'll be mounting/remounting every time externalRef
   * or other dependencies change.
   */
  [visualElement]);
}

/**
 * Decides if the supplied variable is an array of variant labels
 */
function isVariantLabels(v) {
  return Array.isArray(v);
}
/**
 * Decides if the supplied variable is variant label
 */
function isVariantLabel(v) {
  return typeof v === "string" || isVariantLabels(v);
}
/**
 * Creates an object containing the latest state of every MotionValue on a VisualElement
 */
function getCurrent(visualElement) {
  var current = {};
  visualElement.forEachValue(function (value, key) {
    return current[key] = value.get();
  });
  return current;
}
/**
 * Creates an object containing the latest velocity of every MotionValue on a VisualElement
 */
function getVelocity$1(visualElement) {
  var velocity = {};
  visualElement.forEachValue(function (value, key) {
    return velocity[key] = value.getVelocity();
  });
  return velocity;
}
function resolveVariantFromProps(props, definition, custom, currentValues, currentVelocity) {
  var _a;
  if (currentValues === void 0) {
    currentValues = {};
  }
  if (currentVelocity === void 0) {
    currentVelocity = {};
  }
  /**
   * If the variant definition is a function, resolve.
   */
  if (typeof definition === "function") {
    definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity);
  }
  /**
   * If the variant definition is a variant label, or
   * the function returned a variant label, resolve.
   */
  if (typeof definition === "string") {
    definition = (_a = props.variants) === null || _a === void 0 ? void 0 : _a[definition];
  }
  /**
   * At this point we've resolved both functions and variant labels,
   * but the resolved variant label might itself have been a function.
   * If so, resolve. This can only have returned a valid target object.
   */
  if (typeof definition === "function") {
    definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity);
  }
  return definition;
}
function resolveVariant(visualElement, definition, custom) {
  var props = visualElement.getProps();
  return resolveVariantFromProps(props, definition, custom !== null && custom !== void 0 ? custom : props.custom, getCurrent(visualElement), getVelocity$1(visualElement));
}
function checkIfControllingVariants(props) {
  var _a;
  return typeof ((_a = props.animate) === null || _a === void 0 ? void 0 : _a.start) === "function" || isVariantLabel(props.initial) || isVariantLabel(props.animate) || isVariantLabel(props.whileHover) || isVariantLabel(props.whileDrag) || isVariantLabel(props.whileTap) || isVariantLabel(props.whileFocus) || isVariantLabel(props.exit);
}
function checkIfVariantNode(props) {
  return Boolean(checkIfControllingVariants(props) || props.variants);
}
function getCurrentTreeVariants(props, context) {
  if (checkIfControllingVariants(props)) {
    var initial = props.initial,
      animate = props.animate;
    return {
      initial: initial === false || isVariantLabel(initial) ? initial : undefined,
      animate: isVariantLabel(animate) ? animate : undefined
    };
  }
  return props.inherit !== false ? context : {};
}
function useCreateMotionContext(props) {
  var _a = getCurrentTreeVariants(props, React.useContext(MotionContext)),
    initial = _a.initial,
    animate = _a.animate;
  return React.useMemo(function () {
    return {
      initial: initial,
      animate: animate
    };
  }, [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);
}
function variantLabelsAsDependency(prop) {
  return Array.isArray(prop) ? prop.join(" ") : prop;
}

/**
 * Creates a constant value over the lifecycle of a component.
 *
 * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer
 * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`
 * you can ensure that initialisers don't execute twice or more.
 */
function useConstant(init) {
  var ref = React.useRef(null);
  if (ref.current === null) {
    ref.current = init();
  }
  return ref.current;
}

/**
 * This should only ever be modified on the client otherwise it'll
 * persist through server requests. If we need instanced states we
 * could lazy-init via root.
 */
var globalProjectionState = {
  /**
   * Global flag as to whether the tree has animated since the last time
   * we resized the window
   */
  hasAnimatedSinceResize: true,
  /**
   * We set this to true once, on the first update. Any nodes added to the tree beyond that
   * update will be given a `data-projection-id` attribute.
   */
  hasEverUpdated: false
};
var id$1 = 1;
function useProjectionId() {
  return useConstant(function () {
    if (globalProjectionState.hasEverUpdated) {
      return id$1++;
    }
  });
}
var LayoutGroupContext = React.createContext({});

/**
 * Internal, exported only for usage in Framer
 */
var SwitchLayoutGroupContext = React.createContext({});
function useProjection(projectionId, _a, visualElement, ProjectionNodeConstructor) {
  var _b;
  var layoutId = _a.layoutId,
    layout = _a.layout,
    drag = _a.drag,
    dragConstraints = _a.dragConstraints,
    layoutScroll = _a.layoutScroll;
  var initialPromotionConfig = React.useContext(SwitchLayoutGroupContext);
  if (!ProjectionNodeConstructor || !visualElement || (visualElement === null || visualElement === void 0 ? void 0 : visualElement.projection)) {
    return;
  }
  visualElement.projection = new ProjectionNodeConstructor(projectionId, visualElement.getLatestValues(), (_b = visualElement.parent) === null || _b === void 0 ? void 0 : _b.projection);
  visualElement.projection.setOptions({
    layoutId: layoutId,
    layout: layout,
    alwaysMeasureLayout: Boolean(drag) || dragConstraints && isRefObject(dragConstraints),
    visualElement: visualElement,
    scheduleRender: function () {
      return visualElement.scheduleRender();
    },
    /**
     * TODO: Update options in an effect. This could be tricky as it'll be too late
     * to update by the time layout animations run.
     * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
     * ensuring it gets called if there's no potential layout animations.
     *
     */
    animationType: typeof layout === "string" ? layout : "both",
    initialPromotionConfig: initialPromotionConfig,
    layoutScroll: layoutScroll
  });
}
var VisualElementHandler = /** @class */function (_super) {
  tslib.__extends(VisualElementHandler, _super);
  function VisualElementHandler() {
    return _super !== null && _super.apply(this, arguments) || this;
  }
  /**
   * Update visual element props as soon as we know this update is going to be commited.
   */
  VisualElementHandler.prototype.getSnapshotBeforeUpdate = function () {
    this.updateProps();
    return null;
  };
  VisualElementHandler.prototype.componentDidUpdate = function () {};
  VisualElementHandler.prototype.updateProps = function () {
    var _a = this.props,
      visualElement = _a.visualElement,
      props = _a.props;
    if (visualElement) visualElement.setProps(props);
  };
  VisualElementHandler.prototype.render = function () {
    return this.props.children;
  };
  return VisualElementHandler;
}(React__default["default"].Component);

/**
 * Create a `motion` component.
 *
 * This function accepts a Component argument, which can be either a string (ie "div"
 * for `motion.div`), or an actual React component.
 *
 * Alongside this is a config option which provides a way of rendering the provided
 * component "offline", or outside the React render cycle.
 */
function createMotionComponent(_a) {
  var preloadedFeatures = _a.preloadedFeatures,
    createVisualElement = _a.createVisualElement,
    projectionNodeConstructor = _a.projectionNodeConstructor,
    useRender = _a.useRender,
    useVisualState = _a.useVisualState,
    Component = _a.Component;
  preloadedFeatures && loadFeatures(preloadedFeatures);
  function MotionComponent(props, externalRef) {
    var layoutId = useLayoutId(props);
    props = tslib.__assign(tslib.__assign({}, props), {
      layoutId: layoutId
    });
    /**
     * If we're rendering in a static environment, we only visually update the component
     * as a result of a React-rerender rather than interactions or animations. This
     * means we don't need to load additional memory structures like VisualElement,
     * or any gesture/animation features.
     */
    var config = React.useContext(MotionConfigContext);
    var features = null;
    var context = useCreateMotionContext(props);
    /**
     * Create a unique projection ID for this component. If a new component is added
     * during a layout animation we'll use this to query the DOM and hydrate its ref early, allowing
     * us to measure it as soon as any layout effect flushes pending layout animations.
     *
     * Performance note: It'd be better not to have to search the DOM for these elements.
     * For newly-entering components it could be enough to only correct treeScale, in which
     * case we could mount in a scale-correction mode. This wouldn't be enough for
     * shared element transitions however. Perhaps for those we could revert to a root node
     * that gets forceRendered and layout animations are triggered on its layout effect.
     */
    var projectionId = config.isStatic ? undefined : useProjectionId();
    /**
     *
     */
    var visualState = useVisualState(props, config.isStatic);
    if (!config.isStatic && isBrowser) {
      /**
       * Create a VisualElement for this component. A VisualElement provides a common
       * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as
       * providing a way of rendering to these APIs outside of the React render loop
       * for more performant animations and interactions
       */
      context.visualElement = useVisualElement(Component, visualState, tslib.__assign(tslib.__assign({}, config), props), createVisualElement);
      useProjection(projectionId, props, context.visualElement, projectionNodeConstructor || featureDefinitions.projectionNodeConstructor);
      /**
       * Load Motion gesture and animation features. These are rendered as renderless
       * components so each feature can optionally make use of React lifecycle methods.
       */
      features = useFeatures(props, context.visualElement, preloadedFeatures);
    }
    /**
     * The mount order and hierarchy is specific to ensure our element ref
     * is hydrated by the time features fire their effects.
     */
    return React__namespace.createElement(VisualElementHandler, {
      visualElement: context.visualElement,
      props: tslib.__assign(tslib.__assign({}, config), props)
    }, features, React__namespace.createElement(MotionContext.Provider, {
      value: context
    }, useRender(Component, props, projectionId, useMotionRef(visualState, context.visualElement, externalRef), visualState, config.isStatic, context.visualElement)));
  }
  return React.forwardRef(MotionComponent);
}
function useLayoutId(_a) {
  var _b;
  var layoutId = _a.layoutId;
  var layoutGroupId = (_b = React.useContext(LayoutGroupContext)) === null || _b === void 0 ? void 0 : _b.id;
  return layoutGroupId && layoutId !== undefined ? layoutGroupId + "-" + layoutId : layoutId;
}

/**
 * Convert any React component into a `motion` component. The provided component
 * **must** use `React.forwardRef` to the underlying DOM component you want to animate.
 *
 * ```jsx
 * const Component = React.forwardRef((props, ref) => {
 *   return <div ref={ref} />
 * })
 *
 * const MotionComponent = motion(Component)
 * ```
 *
 * @public
 */
function createMotionProxy(createConfig) {
  function custom(Component, customMotionComponentConfig) {
    if (customMotionComponentConfig === void 0) {
      customMotionComponentConfig = {};
    }
    return createMotionComponent(createConfig(Component, customMotionComponentConfig));
  }
  if (typeof Proxy === "undefined") {
    return custom;
  }
  /**
   * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.
   * Rather than generating them anew every render.
   */
  var componentCache = new Map();
  return new Proxy(custom, {
    /**
     * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
     * The prop name is passed through as `key` and we can use that to generate a `motion`
     * DOM component with that name.
     */
    get: function (_target, key) {
      /**
       * If this element doesn't exist in the component cache, create it and cache.
       */
      if (!componentCache.has(key)) {
        componentCache.set(key, custom(key));
      }
      return componentCache.get(key);
    }
  });
}

/**
 * We keep these listed seperately as we use the lowercase tag names as part
 * of the runtime bundle to detect SVG components
 */
var lowercaseSVGElements = ["animate", "circle", "defs", "desc", "ellipse", "g", "image", "line", "filter", "marker", "mask", "metadata", "path", "pattern", "polygon", "polyline", "rect", "stop", "svg", "switch", "symbol", "text", "tspan", "use", "view"];
function isSVGComponent(Component) {
  if (
  /**
   * If it's not a string, it's a custom React component. Currently we only support
   * HTML custom React components.
   */
  typeof Component !== "string" ||
  /**
   * If it contains a dash, the element is a custom HTML webcomponent.
   */
  Component.includes("-")) {
    return false;
  } else if (
  /**
   * If it's in our list of lowercase SVG tags, it's an SVG component
   */
  lowercaseSVGElements.indexOf(Component) > -1 ||
  /**
   * If it contains a capital letter, it's an SVG component
   */
  /[A-Z]/.test(Component)) {
    return true;
  }
  return false;
}
var scaleCorrectors = {};
function addScaleCorrector(correctors) {
  Object.assign(scaleCorrectors, correctors);
}

/**
 * A list of all transformable axes. We'll use this list to generated a version
 * of each axes for each transform.
 */
var transformAxes = ["", "X", "Y", "Z"];
/**
 * An ordered array of each transformable value. By default, transform values
 * will be sorted to this order.
 */
var order = ["translate", "scale", "rotate", "skew"];
/**
 * Generate a list of every possible transform key.
 */
var transformProps = ["transformPerspective", "x", "y", "z"];
order.forEach(function (operationKey) {
  return transformAxes.forEach(function (axesKey) {
    return transformProps.push(operationKey + axesKey);
  });
});
/**
 * A function to use with Array.sort to sort transform keys by their default order.
 */
function sortTransformProps(a, b) {
  return transformProps.indexOf(a) - transformProps.indexOf(b);
}
/**
 * A quick lookup for transform props.
 */
var transformPropSet = new Set(transformProps);
function isTransformProp(key) {
  return transformPropSet.has(key);
}
/**
 * A quick lookup for transform origin props
 */
var transformOriginProps = new Set(["originX", "originY", "originZ"]);
function isTransformOriginProp(key) {
  return transformOriginProps.has(key);
}
function isForcedMotionValue(key, _a) {
  var layout = _a.layout,
    layoutId = _a.layoutId;
  return isTransformProp(key) || isTransformOriginProp(key) || (layout || layoutId !== undefined) && (!!scaleCorrectors[key] || key === "opacity");
}
var isMotionValue = function (value) {
  return Boolean(value !== null && typeof value === "object" && value.getVelocity);
};
var translateAlias = {
  x: "translateX",
  y: "translateY",
  z: "translateZ",
  transformPerspective: "perspective"
};
/**
 * Build a CSS transform style from individual x/y/scale etc properties.
 *
 * This outputs with a default order of transforms/scales/rotations, this can be customised by
 * providing a transformTemplate function.
 */
function buildTransform(_a, _b, transformIsDefault, transformTemplate) {
  var transform = _a.transform,
    transformKeys = _a.transformKeys;
  var _c = _b.enableHardwareAcceleration,
    enableHardwareAcceleration = _c === void 0 ? true : _c,
    _d = _b.allowTransformNone,
    allowTransformNone = _d === void 0 ? true : _d;
  // The transform string we're going to build into.
  var transformString = "";
  // Transform keys into their default order - this will determine the output order.
  transformKeys.sort(sortTransformProps);
  // Track whether the defined transform has a defined z so we don't add a
  // second to enable hardware acceleration
  var transformHasZ = false;
  // Loop over each transform and build them into transformString
  var numTransformKeys = transformKeys.length;
  for (var i = 0; i < numTransformKeys; i++) {
    var key = transformKeys[i];
    transformString += "".concat(translateAlias[key] || key, "(").concat(transform[key], ") ");
    if (key === "z") transformHasZ = true;
  }
  if (!transformHasZ && enableHardwareAcceleration) {
    transformString += "translateZ(0)";
  } else {
    transformString = transformString.trim();
  }
  // If we have a custom `transform` template, pass our transform values and
  // generated transformString to that before returning
  if (transformTemplate) {
    transformString = transformTemplate(transform, transformIsDefault ? "" : transformString);
  } else if (allowTransformNone && transformIsDefault) {
    transformString = "none";
  }
  return transformString;
}
/**
 * Build a transformOrigin style. Uses the same defaults as the browser for
 * undefined origins.
 */
function buildTransformOrigin(_a) {
  var _b = _a.originX,
    originX = _b === void 0 ? "50%" : _b,
    _c = _a.originY,
    originY = _c === void 0 ? "50%" : _c,
    _d = _a.originZ,
    originZ = _d === void 0 ? 0 : _d;
  return "".concat(originX, " ").concat(originY, " ").concat(originZ);
}

/**
 * Returns true if the provided key is a CSS variable
 */
function isCSSVariable$1(key) {
  return key.startsWith("--");
}

/**
 * Provided a value and a ValueType, returns the value as that value type.
 */
var getValueAsType = function (value, type) {
  return type && typeof value === "number" ? type.transform(value) : value;
};
var int = tslib.__assign(tslib.__assign({}, styleValueTypes.number), {
  transform: Math.round
});
var numberValueTypes = {
  // Border props
  borderWidth: styleValueTypes.px,
  borderTopWidth: styleValueTypes.px,
  borderRightWidth: styleValueTypes.px,
  borderBottomWidth: styleValueTypes.px,
  borderLeftWidth: styleValueTypes.px,
  borderRadius: styleValueTypes.px,
  radius: styleValueTypes.px,
  borderTopLeftRadius: styleValueTypes.px,
  borderTopRightRadius: styleValueTypes.px,
  borderBottomRightRadius: styleValueTypes.px,
  borderBottomLeftRadius: styleValueTypes.px,
  // Positioning props
  width: styleValueTypes.px,
  maxWidth: styleValueTypes.px,
  height: styleValueTypes.px,
  maxHeight: styleValueTypes.px,
  size: styleValueTypes.px,
  top: styleValueTypes.px,
  right: styleValueTypes.px,
  bottom: styleValueTypes.px,
  left: styleValueTypes.px,
  // Spacing props
  padding: styleValueTypes.px,
  paddingTop: styleValueTypes.px,
  paddingRight: styleValueTypes.px,
  paddingBottom: styleValueTypes.px,
  paddingLeft: styleValueTypes.px,
  margin: styleValueTypes.px,
  marginTop: styleValueTypes.px,
  marginRight: styleValueTypes.px,
  marginBottom: styleValueTypes.px,
  marginLeft: styleValueTypes.px,
  // Transform props
  rotate: styleValueTypes.degrees,
  rotateX: styleValueTypes.degrees,
  rotateY: styleValueTypes.degrees,
  rotateZ: styleValueTypes.degrees,
  scale: styleValueTypes.scale,
  scaleX: styleValueTypes.scale,
  scaleY: styleValueTypes.scale,
  scaleZ: styleValueTypes.scale,
  skew: styleValueTypes.degrees,
  skewX: styleValueTypes.degrees,
  skewY: styleValueTypes.degrees,
  distance: styleValueTypes.px,
  translateX: styleValueTypes.px,
  translateY: styleValueTypes.px,
  translateZ: styleValueTypes.px,
  x: styleValueTypes.px,
  y: styleValueTypes.px,
  z: styleValueTypes.px,
  perspective: styleValueTypes.px,
  transformPerspective: styleValueTypes.px,
  opacity: styleValueTypes.alpha,
  originX: styleValueTypes.progressPercentage,
  originY: styleValueTypes.progressPercentage,
  originZ: styleValueTypes.px,
  // Misc
  zIndex: int,
  // SVG
  fillOpacity: styleValueTypes.alpha,
  strokeOpacity: styleValueTypes.alpha,
  numOctaves: int
};
function buildHTMLStyles(state, latestValues, options, transformTemplate) {
  var _a;
  var style = state.style,
    vars = state.vars,
    transform = state.transform,
    transformKeys = state.transformKeys,
    transformOrigin = state.transformOrigin;
  // Empty the transformKeys array. As we're throwing out refs to its items
  // this might not be as cheap as suspected. Maybe using the array as a buffer
  // with a manual incrementation would be better.
  transformKeys.length = 0;
  // Track whether we encounter any transform or transformOrigin values.
  var hasTransform = false;
  var hasTransformOrigin = false;
  // Does the calculated transform essentially equal "none"?
  var transformIsNone = true;
  /**
   * Loop over all our latest animated values and decide whether to handle them
   * as a style or CSS variable.
   *
   * Transforms and transform origins are kept seperately for further processing.
   */
  for (var key in latestValues) {
    var value = latestValues[key];
    /**
     * If this is a CSS variable we don't do any further processing.
     */
    if (isCSSVariable$1(key)) {
      vars[key] = value;
      continue;
    }
    // Convert the value to its default value type, ie 0 -> "0px"
    var valueType = numberValueTypes[key];
    var valueAsType = getValueAsType(value, valueType);
    if (isTransformProp(key)) {
      // If this is a transform, flag to enable further transform processing
      hasTransform = true;
      transform[key] = valueAsType;
      transformKeys.push(key);
      // If we already know we have a non-default transform, early return
      if (!transformIsNone) continue;
      // Otherwise check to see if this is a default transform
      if (value !== ((_a = valueType.default) !== null && _a !== void 0 ? _a : 0)) transformIsNone = false;
    } else if (isTransformOriginProp(key)) {
      transformOrigin[key] = valueAsType;
      // If this is a transform origin, flag and enable further transform-origin processing
      hasTransformOrigin = true;
    } else {
      style[key] = valueAsType;
    }
  }
  if (hasTransform) {
    style.transform = buildTransform(state, options, transformIsNone, transformTemplate);
  } else if (transformTemplate) {
    style.transform = transformTemplate({}, "");
  } else if (!latestValues.transform && style.transform) {
    style.transform = "none";
  }
  if (hasTransformOrigin) {
    style.transformOrigin = buildTransformOrigin(transformOrigin);
  }
}
var createHtmlRenderState = function () {
  return {
    style: {},
    transform: {},
    transformKeys: [],
    transformOrigin: {},
    vars: {}
  };
};
function copyRawValuesOnly(target, source, props) {
  for (var key in source) {
    if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {
      target[key] = source[key];
    }
  }
}
function useInitialMotionValues(_a, visualState, isStatic) {
  var transformTemplate = _a.transformTemplate;
  return React.useMemo(function () {
    var state = createHtmlRenderState();
    buildHTMLStyles(state, visualState, {
      enableHardwareAcceleration: !isStatic
    }, transformTemplate);
    var vars = state.vars,
      style = state.style;
    return tslib.__assign(tslib.__assign({}, vars), style);
  }, [visualState]);
}
function useStyle(props, visualState, isStatic) {
  var styleProp = props.style || {};
  var style = {};
  /**
   * Copy non-Motion Values straight into style
   */
  copyRawValuesOnly(style, styleProp, props);
  Object.assign(style, useInitialMotionValues(props, visualState, isStatic));
  if (props.transformValues) {
    style = props.transformValues(style);
  }
  return style;
}
function useHTMLProps(props, visualState, isStatic) {
  // The `any` isn't ideal but it is the type of createElement props argument
  var htmlProps = {};
  var style = useStyle(props, visualState, isStatic);
  if (Boolean(props.drag) && props.dragListener !== false) {
    // Disable the ghost element when a user drags
    htmlProps.draggable = false;
    // Disable text selection
    style.userSelect = style.WebkitUserSelect = style.WebkitTouchCallout = "none";
    // Disable scrolling on the draggable direction
    style.touchAction = props.drag === true ? "none" : "pan-".concat(props.drag === "x" ? "y" : "x");
  }
  htmlProps.style = style;
  return htmlProps;
}

/**
 * A list of all valid MotionProps.
 *
 * @privateRemarks
 * This doesn't throw if a `MotionProp` name is missing - it should.
 */
var validMotionProps = new Set(["initial", "animate", "exit", "style", "variants", "transition", "transformTemplate", "transformValues", "custom", "inherit", "layout", "layoutId", "layoutDependency", "onLayoutAnimationStart", "onLayoutAnimationComplete", "onLayoutMeasure", "onBeforeLayoutMeasure", "onAnimationStart", "onAnimationComplete", "onUpdate", "onDragStart", "onDrag", "onDragEnd", "onMeasureDragConstraints", "onDirectionLock", "onDragTransitionEnd", "drag", "dragControls", "dragListener", "dragConstraints", "dragDirectionLock", "dragSnapToOrigin", "_dragX", "_dragY", "dragElastic", "dragMomentum", "dragPropagation", "dragTransition", "whileDrag", "onPan", "onPanStart", "onPanEnd", "onPanSessionStart", "onTap", "onTapStart", "onTapCancel", "onHoverStart", "onHoverEnd", "whileFocus", "whileTap", "whileHover", "whileInView", "onViewportEnter", "onViewportLeave", "viewport", "layoutScroll"]);
/**
 * Check whether a prop name is a valid `MotionProp` key.
 *
 * @param key - Name of the property to check
 * @returns `true` is key is a valid `MotionProp`.
 *
 * @public
 */
function isValidMotionProp(key) {
  return validMotionProps.has(key);
}
var shouldForward = function (key) {
  return !isValidMotionProp(key);
};
function loadExternalIsValidProp(isValidProp) {
  if (!isValidProp) return;
  // Explicitly filter our events
  shouldForward = function (key) {
    return key.startsWith("on") ? !isValidMotionProp(key) : isValidProp(key);
  };
}
/**
 * Emotion and Styled Components both allow users to pass through arbitrary props to their components
 * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which
 * of these should be passed to the underlying DOM node.
 *
 * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props
 * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props
 * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of
 * `@emotion/is-prop-valid`, however to fix this problem we need to use it.
 *
 * By making it an optionalDependency we can offer this functionality only in the situations where it's
 * actually required.
 */
try {
  /**
   * We attempt to import this package but require won't be defined in esm environments, in that case
   * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed
   * in favour of explicit injection.
   */
  loadExternalIsValidProp((__webpack_require__(/*! @emotion/is-prop-valid */ "../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js")["default"]));
} catch (_a) {
  // We don't need to actually do anything here - the fallback is the existing `isPropValid`.
}
function filterProps(props, isDom, forwardMotionProps) {
  var filteredProps = {};
  for (var key in props) {
    if (shouldForward(key) || forwardMotionProps === true && isValidMotionProp(key) || !isDom && !isValidMotionProp(key) ||
    // If trying to use native HTML drag events, forward drag listeners
    props["draggable"] && key.startsWith("onDrag")) {
      filteredProps[key] = props[key];
    }
  }
  return filteredProps;
}
function calcOrigin$1(origin, offset, size) {
  return typeof origin === "string" ? origin : styleValueTypes.px.transform(offset + size * origin);
}
/**
 * The SVG transform origin defaults are different to CSS and is less intuitive,
 * so we use the measured dimensions of the SVG to reconcile these.
 */
function calcSVGTransformOrigin(dimensions, originX, originY) {
  var pxOriginX = calcOrigin$1(originX, dimensions.x, dimensions.width);
  var pxOriginY = calcOrigin$1(originY, dimensions.y, dimensions.height);
  return "".concat(pxOriginX, " ").concat(pxOriginY);
}
var dashKeys = {
  offset: "stroke-dashoffset",
  array: "stroke-dasharray"
};
var camelKeys = {
  offset: "strokeDashoffset",
  array: "strokeDasharray"
};
/**
 * Build SVG path properties. Uses the path's measured length to convert
 * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset
 * and stroke-dasharray attributes.
 *
 * This function is mutative to reduce per-frame GC.
 */
function buildSVGPath(attrs, length, spacing, offset, useDashCase) {
  if (spacing === void 0) {
    spacing = 1;
  }
  if (offset === void 0) {
    offset = 0;
  }
  if (useDashCase === void 0) {
    useDashCase = true;
  }
  // Normalise path length by setting SVG attribute pathLength to 1
  attrs.pathLength = 1;
  // We use dash case when setting attributes directly to the DOM node and camel case
  // when defining props on a React component.
  var keys = useDashCase ? dashKeys : camelKeys;
  // Build the dash offset
  attrs[keys.offset] = styleValueTypes.px.transform(-offset);
  // Build the dash array
  var pathLength = styleValueTypes.px.transform(length);
  var pathSpacing = styleValueTypes.px.transform(spacing);
  attrs[keys.array] = "".concat(pathLength, " ").concat(pathSpacing);
}

/**
 * Build SVG visual attrbutes, like cx and style.transform
 */
function buildSVGAttrs(state, _a, options, transformTemplate) {
  var attrX = _a.attrX,
    attrY = _a.attrY,
    originX = _a.originX,
    originY = _a.originY,
    pathLength = _a.pathLength,
    _b = _a.pathSpacing,
    pathSpacing = _b === void 0 ? 1 : _b,
    _c = _a.pathOffset,
    pathOffset = _c === void 0 ? 0 : _c,
    // This is object creation, which we try to avoid per-frame.
    latest = tslib.__rest(_a, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]);
  buildHTMLStyles(state, latest, options, transformTemplate);
  state.attrs = state.style;
  state.style = {};
  var attrs = state.attrs,
    style = state.style,
    dimensions = state.dimensions;
  /**
   * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs
   * and copy it into style.
   */
  if (attrs.transform) {
    if (dimensions) style.transform = attrs.transform;
    delete attrs.transform;
  }
  // Parse transformOrigin
  if (dimensions && (originX !== undefined || originY !== undefined || style.transform)) {
    style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);
  }
  // Treat x/y not as shortcuts but as actual attributes
  if (attrX !== undefined) attrs.x = attrX;
  if (attrY !== undefined) attrs.y = attrY;
  // Build SVG path if one has been defined
  if (pathLength !== undefined) {
    buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);
  }
}
var createSvgRenderState = function () {
  return tslib.__assign(tslib.__assign({}, createHtmlRenderState()), {
    attrs: {}
  });
};
function useSVGProps(props, visualState) {
  var visualProps = React.useMemo(function () {
    var state = createSvgRenderState();
    buildSVGAttrs(state, visualState, {
      enableHardwareAcceleration: false
    }, props.transformTemplate);
    return tslib.__assign(tslib.__assign({}, state.attrs), {
      style: tslib.__assign({}, state.style)
    });
  }, [visualState]);
  if (props.style) {
    var rawStyles = {};
    copyRawValuesOnly(rawStyles, props.style, props);
    visualProps.style = tslib.__assign(tslib.__assign({}, rawStyles), visualProps.style);
  }
  return visualProps;
}
function createUseRender(forwardMotionProps) {
  if (forwardMotionProps === void 0) {
    forwardMotionProps = false;
  }
  var useRender = function (Component, props, projectionId, ref, _a, isStatic) {
    var latestValues = _a.latestValues;
    var useVisualProps = isSVGComponent(Component) ? useSVGProps : useHTMLProps;
    var visualProps = useVisualProps(props, latestValues, isStatic);
    var filteredProps = filterProps(props, typeof Component === "string", forwardMotionProps);
    var elementProps = tslib.__assign(tslib.__assign(tslib.__assign({}, filteredProps), visualProps), {
      ref: ref
    });
    if (projectionId) {
      elementProps["data-projection-id"] = projectionId;
    }
    return React.createElement(Component, elementProps);
  };
  return useRender;
}
var CAMEL_CASE_PATTERN = /([a-z])([A-Z])/g;
var REPLACE_TEMPLATE = "$1-$2";
/**
 * Convert camelCase to dash-case properties.
 */
var camelToDash = function (str) {
  return str.replace(CAMEL_CASE_PATTERN, REPLACE_TEMPLATE).toLowerCase();
};
function renderHTML(element, _a, styleProp, projection) {
  var style = _a.style,
    vars = _a.vars;
  Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));
  // Loop over any CSS variables and assign those.
  for (var key in vars) {
    element.style.setProperty(key, vars[key]);
  }
}

/**
 * A set of attribute names that are always read/written as camel case.
 */
var camelCaseAttributes = new Set(["baseFrequency", "diffuseConstant", "kernelMatrix", "kernelUnitLength", "keySplines", "keyTimes", "limitingConeAngle", "markerHeight", "markerWidth", "numOctaves", "targetX", "targetY", "surfaceScale", "specularConstant", "specularExponent", "stdDeviation", "tableValues", "viewBox", "gradientTransform", "pathLength"]);
function renderSVG(element, renderState, _styleProp, projection) {
  renderHTML(element, renderState, undefined, projection);
  for (var key in renderState.attrs) {
    element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);
  }
}
function scrapeMotionValuesFromProps$1(props) {
  var style = props.style;
  var newValues = {};
  for (var key in style) {
    if (isMotionValue(style[key]) || isForcedMotionValue(key, props)) {
      newValues[key] = style[key];
    }
  }
  return newValues;
}
function scrapeMotionValuesFromProps(props) {
  var newValues = scrapeMotionValuesFromProps$1(props);
  for (var key in props) {
    if (isMotionValue(props[key])) {
      var targetKey = key === "x" || key === "y" ? "attr" + key.toUpperCase() : key;
      newValues[targetKey] = props[key];
    }
  }
  return newValues;
}
function isAnimationControls(v) {
  return typeof v === "object" && typeof v.start === "function";
}
var isKeyframesTarget = function (v) {
  return Array.isArray(v);
};
var isCustomValue = function (v) {
  return Boolean(v && typeof v === "object" && v.mix && v.toValue);
};
var resolveFinalValueInKeyframes = function (v) {
  // TODO maybe throw if v.length - 1 is placeholder token?
  return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;
};

/**
 * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself
 *
 * TODO: Remove and move to library
 */
function resolveMotionValue(value) {
  var unwrappedValue = isMotionValue(value) ? value.get() : value;
  return isCustomValue(unwrappedValue) ? unwrappedValue.toValue() : unwrappedValue;
}
function makeState(_a, props, context, presenceContext) {
  var scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps,
    createRenderState = _a.createRenderState,
    onMount = _a.onMount;
  var state = {
    latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),
    renderState: createRenderState()
  };
  if (onMount) {
    state.mount = function (instance) {
      return onMount(props, instance, state);
    };
  }
  return state;
}
var makeUseVisualState = function (config) {
  return function (props, isStatic) {
    var context = React.useContext(MotionContext);
    var presenceContext = React.useContext(PresenceContext);
    return isStatic ? makeState(config, props, context, presenceContext) : useConstant(function () {
      return makeState(config, props, context, presenceContext);
    });
  };
};
function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
  var values = {};
  var blockInitialAnimation = (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false;
  var motionValues = scrapeMotionValues(props);
  for (var key in motionValues) {
    values[key] = resolveMotionValue(motionValues[key]);
  }
  var initial = props.initial,
    animate = props.animate;
  var isControllingVariants = checkIfControllingVariants(props);
  var isVariantNode = checkIfVariantNode(props);
  if (context && isVariantNode && !isControllingVariants && props.inherit !== false) {
    initial !== null && initial !== void 0 ? initial : initial = context.initial;
    animate !== null && animate !== void 0 ? animate : animate = context.animate;
  }
  var initialAnimationIsBlocked = blockInitialAnimation || initial === false;
  var variantToSet = initialAnimationIsBlocked ? animate : initial;
  if (variantToSet && typeof variantToSet !== "boolean" && !isAnimationControls(variantToSet)) {
    var list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];
    list.forEach(function (definition) {
      var resolved = resolveVariantFromProps(props, definition);
      if (!resolved) return;
      var transitionEnd = resolved.transitionEnd;
      resolved.transition;
      var target = tslib.__rest(resolved, ["transitionEnd", "transition"]);
      for (var key in target) {
        var valueTarget = target[key];
        if (Array.isArray(valueTarget)) {
          /**
           * Take final keyframe if the initial animation is blocked because
           * we want to initialise at the end of that blocked animation.
           */
          var index = initialAnimationIsBlocked ? valueTarget.length - 1 : 0;
          valueTarget = valueTarget[index];
        }
        if (valueTarget !== null) {
          values[key] = valueTarget;
        }
      }
      for (var key in transitionEnd) values[key] = transitionEnd[key];
    });
  }
  return values;
}
var svgMotionConfig = {
  useVisualState: makeUseVisualState({
    scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,
    createRenderState: createSvgRenderState,
    onMount: function (props, instance, _a) {
      var renderState = _a.renderState,
        latestValues = _a.latestValues;
      try {
        renderState.dimensions = typeof instance.getBBox === "function" ? instance.getBBox() : instance.getBoundingClientRect();
      } catch (e) {
        // Most likely trying to measure an unrendered element under Firefox
        renderState.dimensions = {
          x: 0,
          y: 0,
          width: 0,
          height: 0
        };
      }
      buildSVGAttrs(renderState, latestValues, {
        enableHardwareAcceleration: false
      }, props.transformTemplate);
      renderSVG(instance, renderState);
    }
  })
};
var htmlMotionConfig = {
  useVisualState: makeUseVisualState({
    scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
    createRenderState: createHtmlRenderState
  })
};
function createDomMotionConfig(Component, _a, preloadedFeatures, createVisualElement, projectionNodeConstructor) {
  var _b = _a.forwardMotionProps,
    forwardMotionProps = _b === void 0 ? false : _b;
  var baseConfig = isSVGComponent(Component) ? svgMotionConfig : htmlMotionConfig;
  return tslib.__assign(tslib.__assign({}, baseConfig), {
    preloadedFeatures: preloadedFeatures,
    useRender: createUseRender(forwardMotionProps),
    createVisualElement: createVisualElement,
    projectionNodeConstructor: projectionNodeConstructor,
    Component: Component
  });
}
exports.AnimationType = void 0;
(function (AnimationType) {
  AnimationType["Animate"] = "animate";
  AnimationType["Hover"] = "whileHover";
  AnimationType["Tap"] = "whileTap";
  AnimationType["Drag"] = "whileDrag";
  AnimationType["Focus"] = "whileFocus";
  AnimationType["InView"] = "whileInView";
  AnimationType["Exit"] = "exit";
})(exports.AnimationType || (exports.AnimationType = {}));
function addDomEvent(target, eventName, handler, options) {
  if (options === void 0) {
    options = {
      passive: true
    };
  }
  target.addEventListener(eventName, handler, options);
  return function () {
    return target.removeEventListener(eventName, handler);
  };
}
/**
 * Attaches an event listener directly to the provided DOM element.
 *
 * Bypassing React's event system can be desirable, for instance when attaching non-passive
 * event handlers.
 *
 * ```jsx
 * const ref = useRef(null)
 *
 * useDomEvent(ref, 'wheel', onWheel, { passive: false })
 *
 * return <div ref={ref} />
 * ```
 *
 * @param ref - React.RefObject that's been provided to the element you want to bind the listener to.
 * @param eventName - Name of the event you want listen for.
 * @param handler - Function to fire when receiving the event.
 * @param options - Options to pass to `Event.addEventListener`.
 *
 * @public
 */
function useDomEvent(ref, eventName, handler, options) {
  React.useEffect(function () {
    var element = ref.current;
    if (handler && element) {
      return addDomEvent(element, eventName, handler, options);
    }
  }, [ref, eventName, handler, options]);
}

/**
 *
 * @param props
 * @param ref
 * @internal
 */
function useFocusGesture(_a) {
  var whileFocus = _a.whileFocus,
    visualElement = _a.visualElement;
  var onFocus = function () {
    var _a;
    (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Focus, true);
  };
  var onBlur = function () {
    var _a;
    (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Focus, false);
  };
  useDomEvent(visualElement, "focus", whileFocus ? onFocus : undefined);
  useDomEvent(visualElement, "blur", whileFocus ? onBlur : undefined);
}
function isMouseEvent(event) {
  // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check.
  if (typeof PointerEvent !== "undefined" && event instanceof PointerEvent) {
    return !!(event.pointerType === "mouse");
  }
  return event instanceof MouseEvent;
}
function isTouchEvent(event) {
  var hasTouches = !!event.touches;
  return hasTouches;
}

/**
 * Filters out events not attached to the primary pointer (currently left mouse button)
 * @param eventHandler
 */
function filterPrimaryPointer(eventHandler) {
  return function (event) {
    var isMouseEvent = event instanceof MouseEvent;
    var isPrimaryPointer = !isMouseEvent || isMouseEvent && event.button === 0;
    if (isPrimaryPointer) {
      eventHandler(event);
    }
  };
}
var defaultPagePoint = {
  pageX: 0,
  pageY: 0
};
function pointFromTouch(e, pointType) {
  if (pointType === void 0) {
    pointType = "page";
  }
  var primaryTouch = e.touches[0] || e.changedTouches[0];
  var point = primaryTouch || defaultPagePoint;
  return {
    x: point[pointType + "X"],
    y: point[pointType + "Y"]
  };
}
function pointFromMouse(point, pointType) {
  if (pointType === void 0) {
    pointType = "page";
  }
  return {
    x: point[pointType + "X"],
    y: point[pointType + "Y"]
  };
}
function extractEventInfo(event, pointType) {
  if (pointType === void 0) {
    pointType = "page";
  }
  return {
    point: isTouchEvent(event) ? pointFromTouch(event, pointType) : pointFromMouse(event, pointType)
  };
}
var wrapHandler = function (handler, shouldFilterPrimaryPointer) {
  if (shouldFilterPrimaryPointer === void 0) {
    shouldFilterPrimaryPointer = false;
  }
  var listener = function (event) {
    return handler(event, extractEventInfo(event));
  };
  return shouldFilterPrimaryPointer ? filterPrimaryPointer(listener) : listener;
};

// We check for event support via functions in case they've been mocked by a testing suite.
var supportsPointerEvents = function () {
  return isBrowser && window.onpointerdown === null;
};
var supportsTouchEvents = function () {
  return isBrowser && window.ontouchstart === null;
};
var supportsMouseEvents = function () {
  return isBrowser && window.onmousedown === null;
};
var mouseEventNames = {
  pointerdown: "mousedown",
  pointermove: "mousemove",
  pointerup: "mouseup",
  pointercancel: "mousecancel",
  pointerover: "mouseover",
  pointerout: "mouseout",
  pointerenter: "mouseenter",
  pointerleave: "mouseleave"
};
var touchEventNames = {
  pointerdown: "touchstart",
  pointermove: "touchmove",
  pointerup: "touchend",
  pointercancel: "touchcancel"
};
function getPointerEventName(name) {
  if (supportsPointerEvents()) {
    return name;
  } else if (supportsTouchEvents()) {
    return touchEventNames[name];
  } else if (supportsMouseEvents()) {
    return mouseEventNames[name];
  }
  return name;
}
function addPointerEvent(target, eventName, handler, options) {
  return addDomEvent(target, getPointerEventName(eventName), wrapHandler(handler, eventName === "pointerdown"), options);
}
function usePointerEvent(ref, eventName, handler, options) {
  return useDomEvent(ref, getPointerEventName(eventName), handler && wrapHandler(handler, eventName === "pointerdown"), options);
}
function createLock(name) {
  var lock = null;
  return function () {
    var openLock = function () {
      lock = null;
    };
    if (lock === null) {
      lock = name;
      return openLock;
    }
    return false;
  };
}
var globalHorizontalLock = createLock("dragHorizontal");
var globalVerticalLock = createLock("dragVertical");
function getGlobalLock(drag) {
  var lock = false;
  if (drag === "y") {
    lock = globalVerticalLock();
  } else if (drag === "x") {
    lock = globalHorizontalLock();
  } else {
    var openHorizontal_1 = globalHorizontalLock();
    var openVertical_1 = globalVerticalLock();
    if (openHorizontal_1 && openVertical_1) {
      lock = function () {
        openHorizontal_1();
        openVertical_1();
      };
    } else {
      // Release the locks because we don't use them
      if (openHorizontal_1) openHorizontal_1();
      if (openVertical_1) openVertical_1();
    }
  }
  return lock;
}
function isDragActive() {
  // Check the gesture lock - if we get it, it means no drag gesture is active
  // and we can safely fire the tap gesture.
  var openGestureLock = getGlobalLock(true);
  if (!openGestureLock) return true;
  openGestureLock();
  return false;
}
function createHoverEvent(visualElement, isActive, callback) {
  return function (event, info) {
    var _a;
    if (!isMouseEvent(event) || isDragActive()) return;
    /**
     * Ensure we trigger animations before firing event callback
     */
    (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Hover, isActive);
    callback === null || callback === void 0 ? void 0 : callback(event, info);
  };
}
function useHoverGesture(_a) {
  var onHoverStart = _a.onHoverStart,
    onHoverEnd = _a.onHoverEnd,
    whileHover = _a.whileHover,
    visualElement = _a.visualElement;
  usePointerEvent(visualElement, "pointerenter", onHoverStart || whileHover ? createHoverEvent(visualElement, true, onHoverStart) : undefined, {
    passive: !onHoverStart
  });
  usePointerEvent(visualElement, "pointerleave", onHoverEnd || whileHover ? createHoverEvent(visualElement, false, onHoverEnd) : undefined, {
    passive: !onHoverEnd
  });
}

/**
 * Recursively traverse up the tree to check whether the provided child node
 * is the parent or a descendant of it.
 *
 * @param parent - Element to find
 * @param child - Element to test against parent
 */
var isNodeOrChild = function (parent, child) {
  if (!child) {
    return false;
  } else if (parent === child) {
    return true;
  } else {
    return isNodeOrChild(parent, child.parentElement);
  }
};
function useUnmountEffect(callback) {
  return React.useEffect(function () {
    return function () {
      return callback();
    };
  }, []);
}

/**
 * @param handlers -
 * @internal
 */
function useTapGesture(_a) {
  var onTap = _a.onTap,
    onTapStart = _a.onTapStart,
    onTapCancel = _a.onTapCancel,
    whileTap = _a.whileTap,
    visualElement = _a.visualElement;
  var hasPressListeners = onTap || onTapStart || onTapCancel || whileTap;
  var isPressing = React.useRef(false);
  var cancelPointerEndListeners = React.useRef(null);
  /**
   * Only set listener to passive if there are no external listeners.
   */
  var eventOptions = {
    passive: !(onTapStart || onTap || onTapCancel || onPointerDown)
  };
  function removePointerEndListener() {
    var _a;
    (_a = cancelPointerEndListeners.current) === null || _a === void 0 ? void 0 : _a.call(cancelPointerEndListeners);
    cancelPointerEndListeners.current = null;
  }
  function checkPointerEnd() {
    var _a;
    removePointerEndListener();
    isPressing.current = false;
    (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Tap, false);
    return !isDragActive();
  }
  function onPointerUp(event, info) {
    if (!checkPointerEnd()) return;
    /**
     * We only count this as a tap gesture if the event.target is the same
     * as, or a child of, this component's element
     */
    !isNodeOrChild(visualElement.getInstance(), event.target) ? onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info) : onTap === null || onTap === void 0 ? void 0 : onTap(event, info);
  }
  function onPointerCancel(event, info) {
    if (!checkPointerEnd()) return;
    onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info);
  }
  function onPointerDown(event, info) {
    var _a;
    removePointerEndListener();
    if (isPressing.current) return;
    isPressing.current = true;
    cancelPointerEndListeners.current = popmotion.pipe(addPointerEvent(window, "pointerup", onPointerUp, eventOptions), addPointerEvent(window, "pointercancel", onPointerCancel, eventOptions));
    /**
     * Ensure we trigger animations before firing event callback
     */
    (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Tap, true);
    onTapStart === null || onTapStart === void 0 ? void 0 : onTapStart(event, info);
  }
  usePointerEvent(visualElement, "pointerdown", hasPressListeners ? onPointerDown : undefined, eventOptions);
  useUnmountEffect(removePointerEndListener);
}
var warned = new Set();
function warnOnce(condition, message, element) {
  if (condition || warned.has(message)) return;
  console.warn(message);
  if (element) console.warn(element);
  warned.add(message);
}

/**
 * Map an IntersectionHandler callback to an element. We only ever make one handler for one
 * element, so even though these handlers might all be triggered by different
 * observers, we can keep them in the same map.
 */
var observerCallbacks = new WeakMap();
/**
 * Multiple observers can be created for multiple element/document roots. Each with
 * different settings. So here we store dictionaries of observers to each root,
 * using serialised settings (threshold/margin) as lookup keys.
 */
var observers = new WeakMap();
var fireObserverCallback = function (entry) {
  var _a;
  (_a = observerCallbacks.get(entry.target)) === null || _a === void 0 ? void 0 : _a(entry);
};
var fireAllObserverCallbacks = function (entries) {
  entries.forEach(fireObserverCallback);
};
function initIntersectionObserver(_a) {
  var root = _a.root,
    options = tslib.__rest(_a, ["root"]);
  var lookupRoot = root || document;
  /**
   * If we don't have an observer lookup map for this root, create one.
   */
  if (!observers.has(lookupRoot)) {
    observers.set(lookupRoot, {});
  }
  var rootObservers = observers.get(lookupRoot);
  var key = JSON.stringify(options);
  /**
   * If we don't have an observer for this combination of root and settings,
   * create one.
   */
  if (!rootObservers[key]) {
    rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, tslib.__assign({
      root: root
    }, options));
  }
  return rootObservers[key];
}
function observeIntersection(element, options, callback) {
  var rootInteresectionObserver = initIntersectionObserver(options);
  observerCallbacks.set(element, callback);
  rootInteresectionObserver.observe(element);
  return function () {
    observerCallbacks.delete(element);
    rootInteresectionObserver.unobserve(element);
  };
}
function useViewport(_a) {
  var visualElement = _a.visualElement,
    whileInView = _a.whileInView,
    onViewportEnter = _a.onViewportEnter,
    onViewportLeave = _a.onViewportLeave,
    _b = _a.viewport,
    viewport = _b === void 0 ? {} : _b;
  var state = React.useRef({
    hasEnteredView: false,
    isInView: false
  });
  var shouldObserve = Boolean(whileInView || onViewportEnter || onViewportLeave);
  if (viewport.once && state.current.hasEnteredView) shouldObserve = false;
  var useObserver = typeof IntersectionObserver === "undefined" ? useMissingIntersectionObserver : useIntersectionObserver;
  useObserver(shouldObserve, state.current, visualElement, viewport);
}
var thresholdNames = {
  some: 0,
  all: 1
};
function useIntersectionObserver(shouldObserve, state, visualElement, _a) {
  var root = _a.root,
    rootMargin = _a.margin,
    _b = _a.amount,
    amount = _b === void 0 ? "some" : _b,
    once = _a.once;
  React.useEffect(function () {
    if (!shouldObserve) return;
    var options = {
      root: root === null || root === void 0 ? void 0 : root.current,
      rootMargin: rootMargin,
      threshold: typeof amount === "number" ? amount : thresholdNames[amount]
    };
    var intersectionCallback = function (entry) {
      var _a;
      var isIntersecting = entry.isIntersecting;
      /**
       * If there's been no change in the viewport state, early return.
       */
      if (state.isInView === isIntersecting) return;
      state.isInView = isIntersecting;
      /**
       * Handle hasEnteredView. If this is only meant to run once, and
       * element isn't visible, early return. Otherwise set hasEnteredView to true.
       */
      if (once && !isIntersecting && state.hasEnteredView) {
        return;
      } else if (isIntersecting) {
        state.hasEnteredView = true;
      }
      (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.InView, isIntersecting);
      /**
       * Use the latest committed props rather than the ones in scope
       * when this observer is created
       */
      var props = visualElement.getProps();
      var callback = isIntersecting ? props.onViewportEnter : props.onViewportLeave;
      callback === null || callback === void 0 ? void 0 : callback(entry);
    };
    return observeIntersection(visualElement.getInstance(), options, intersectionCallback);
  }, [shouldObserve, root, rootMargin, amount]);
}
/**
 * If IntersectionObserver is missing, we activate inView and fire onViewportEnter
 * on mount. This way, the page will be in the state the author expects users
 * to see it in for everyone.
 */
function useMissingIntersectionObserver(shouldObserve, state, visualElement, _a) {
  var _b = _a.fallback,
    fallback = _b === void 0 ? true : _b;
  React.useEffect(function () {
    if (!shouldObserve || !fallback) return;
    if (env !== "production") {
      warnOnce(false, "IntersectionObserver not available on this device. whileInView animations will trigger on mount.");
    }
    /**
     * Fire this in an rAF because, at this point, the animation state
     * won't have flushed for the first time and there's certain logic in
     * there that behaves differently on the initial animation.
     *
     * This hook should be quite rarely called so setting this in an rAF
     * is preferred to changing the behaviour of the animation state.
     */
    requestAnimationFrame(function () {
      var _a;
      state.hasEnteredView = true;
      var onViewportEnter = visualElement.getProps().onViewportEnter;
      onViewportEnter === null || onViewportEnter === void 0 ? void 0 : onViewportEnter(null);
      (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.InView, true);
    });
  }, [shouldObserve]);
}
var makeRenderlessComponent = function (hook) {
  return function (props) {
    hook(props);
    return null;
  };
};
var gestureAnimations = {
  inView: makeRenderlessComponent(useViewport),
  tap: makeRenderlessComponent(useTapGesture),
  focus: makeRenderlessComponent(useFocusGesture),
  hover: makeRenderlessComponent(useHoverGesture)
};
var counter = 0;
var incrementId = function () {
  return counter++;
};
var useId = function () {
  return useConstant(incrementId);
};
/**
 * Ideally we'd use the following code to support React 18 optionally.
 * But this fairly fails in Webpack (otherwise treeshaking wouldn't work at all).
 * Need to come up with a different way of figuring this out.
 */
// export const useId = (React as any).useId
//     ? (React as any).useId
//     : () => useConstant(incrementId)

/**
 * When a component is the child of `AnimatePresence`, it can use `usePresence`
 * to access information about whether it's still present in the React tree.
 *
 * ```jsx
 * import { usePresence } from "framer-motion"
 *
 * export const Component = () => {
 *   const [isPresent, safeToRemove] = usePresence()
 *
 *   useEffect(() => {
 *     !isPresent && setTimeout(safeToRemove, 1000)
 *   }, [isPresent])
 *
 *   return <div />
 * }
 * ```
 *
 * If `isPresent` is `false`, it means that a component has been removed the tree, but
 * `AnimatePresence` won't really remove it until `safeToRemove` has been called.
 *
 * @public
 */
function usePresence() {
  var context = React.useContext(PresenceContext);
  if (context === null) return [true, null];
  var isPresent = context.isPresent,
    onExitComplete = context.onExitComplete,
    register = context.register;
  // It's safe to call the following hooks conditionally (after an early return) because the context will always
  // either be null or non-null for the lifespan of the component.
  // Replace with useId when released in React
  var id = useId();
  React.useEffect(function () {
    return register(id);
  }, []);
  var safeToRemove = function () {
    return onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete(id);
  };
  return !isPresent && onExitComplete ? [false, safeToRemove] : [true];
}
/**
 * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.
 * There is no `safeToRemove` function.
 *
 * ```jsx
 * import { useIsPresent } from "framer-motion"
 *
 * export const Component = () => {
 *   const isPresent = useIsPresent()
 *
 *   useEffect(() => {
 *     !isPresent && console.log("I've been removed!")
 *   }, [isPresent])
 *
 *   return <div />
 * }
 * ```
 *
 * @public
 */
function useIsPresent() {
  return isPresent(React.useContext(PresenceContext));
}
function isPresent(context) {
  return context === null ? true : context.isPresent;
}
function shallowCompare(next, prev) {
  if (!Array.isArray(prev)) return false;
  var prevLength = prev.length;
  if (prevLength !== next.length) return false;
  for (var i = 0; i < prevLength; i++) {
    if (prev[i] !== next[i]) return false;
  }
  return true;
}

/**
 * Converts seconds to milliseconds
 *
 * @param seconds - Time in seconds.
 * @return milliseconds - Converted time in milliseconds.
 */
var secondsToMilliseconds = function (seconds) {
  return seconds * 1000;
};
var easingLookup = {
  linear: popmotion.linear,
  easeIn: popmotion.easeIn,
  easeInOut: popmotion.easeInOut,
  easeOut: popmotion.easeOut,
  circIn: popmotion.circIn,
  circInOut: popmotion.circInOut,
  circOut: popmotion.circOut,
  backIn: popmotion.backIn,
  backInOut: popmotion.backInOut,
  backOut: popmotion.backOut,
  anticipate: popmotion.anticipate,
  bounceIn: popmotion.bounceIn,
  bounceInOut: popmotion.bounceInOut,
  bounceOut: popmotion.bounceOut
};
var easingDefinitionToFunction = function (definition) {
  if (Array.isArray(definition)) {
    // If cubic bezier definition, create bezier curve
    heyListen.invariant(definition.length === 4, "Cubic bezier arrays must contain four numerical values.");
    var _a = tslib.__read(definition, 4),
      x1 = _a[0],
      y1 = _a[1],
      x2 = _a[2],
      y2 = _a[3];
    return popmotion.cubicBezier(x1, y1, x2, y2);
  } else if (typeof definition === "string") {
    // Else lookup from table
    heyListen.invariant(easingLookup[definition] !== undefined, "Invalid easing type '".concat(definition, "'"));
    return easingLookup[definition];
  }
  return definition;
};
var isEasingArray = function (ease) {
  return Array.isArray(ease) && typeof ease[0] !== "number";
};

/**
 * Check if a value is animatable. Examples:
 *
 * ✅: 100, "100px", "#fff"
 * ❌: "block", "url(2.jpg)"
 * @param value
 *
 * @internal
 */
var isAnimatable = function (key, value) {
  // If the list of keys tat might be non-animatable grows, replace with Set
  if (key === "zIndex") return false;
  // If it's a number or a keyframes array, we can animate it. We might at some point
  // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,
  // but for now lets leave it like this for performance reasons
  if (typeof value === "number" || Array.isArray(value)) return true;
  if (typeof value === "string" &&
  // It's animatable if we have a string
  styleValueTypes.complex.test(value) &&
  // And it contains numbers and/or colors
  !value.startsWith("url(") // Unless it starts with "url("
  ) {
    return true;
  }
  return false;
};
var underDampedSpring = function () {
  return {
    type: "spring",
    stiffness: 500,
    damping: 25,
    restSpeed: 10
  };
};
var criticallyDampedSpring = function (to) {
  return {
    type: "spring",
    stiffness: 550,
    damping: to === 0 ? 2 * Math.sqrt(550) : 30,
    restSpeed: 10
  };
};
var linearTween = function () {
  return {
    type: "keyframes",
    ease: "linear",
    duration: 0.3
  };
};
var keyframes = function (values) {
  return {
    type: "keyframes",
    duration: 0.8,
    values: values
  };
};
var defaultTransitions = {
  x: underDampedSpring,
  y: underDampedSpring,
  z: underDampedSpring,
  rotate: underDampedSpring,
  rotateX: underDampedSpring,
  rotateY: underDampedSpring,
  rotateZ: underDampedSpring,
  scaleX: criticallyDampedSpring,
  scaleY: criticallyDampedSpring,
  scale: criticallyDampedSpring,
  opacity: linearTween,
  backgroundColor: linearTween,
  color: linearTween,
  default: criticallyDampedSpring
};
var getDefaultTransition = function (valueKey, to) {
  var transitionFactory;
  if (isKeyframesTarget(to)) {
    transitionFactory = keyframes;
  } else {
    transitionFactory = defaultTransitions[valueKey] || defaultTransitions.default;
  }
  return tslib.__assign({
    to: to
  }, transitionFactory(to));
};

/**
 * A map of default value types for common values
 */
var defaultValueTypes = tslib.__assign(tslib.__assign({}, numberValueTypes), {
  // Color props
  color: styleValueTypes.color,
  backgroundColor: styleValueTypes.color,
  outlineColor: styleValueTypes.color,
  fill: styleValueTypes.color,
  stroke: styleValueTypes.color,
  // Border props
  borderColor: styleValueTypes.color,
  borderTopColor: styleValueTypes.color,
  borderRightColor: styleValueTypes.color,
  borderBottomColor: styleValueTypes.color,
  borderLeftColor: styleValueTypes.color,
  filter: styleValueTypes.filter,
  WebkitFilter: styleValueTypes.filter
});
/**
 * Gets the default ValueType for the provided value key
 */
var getDefaultValueType = function (key) {
  return defaultValueTypes[key];
};
function getAnimatableNone(key, value) {
  var _a;
  var defaultValueType = getDefaultValueType(key);
  if (defaultValueType !== styleValueTypes.filter) defaultValueType = styleValueTypes.complex;
  // If value is not recognised as animatable, ie "none", create an animatable version origin based on the target
  return (_a = defaultValueType.getAnimatableNone) === null || _a === void 0 ? void 0 : _a.call(defaultValueType, value);
}
var instantAnimationState = {
  current: false
};

/**
 * Decide whether a transition is defined on a given Transition.
 * This filters out orchestration options and returns true
 * if any options are left.
 */
function isTransitionDefined(_a) {
  _a.when;
  _a.delay;
  _a.delayChildren;
  _a.staggerChildren;
  _a.staggerDirection;
  _a.repeat;
  _a.repeatType;
  _a.repeatDelay;
  _a.from;
  var transition = tslib.__rest(_a, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from"]);
  return !!Object.keys(transition).length;
}
var legacyRepeatWarning = false;
/**
 * Convert Framer Motion's Transition type into Popmotion-compatible options.
 */
function convertTransitionToAnimationOptions(_a) {
  var ease = _a.ease,
    times = _a.times,
    yoyo = _a.yoyo,
    flip = _a.flip,
    loop = _a.loop,
    transition = tslib.__rest(_a, ["ease", "times", "yoyo", "flip", "loop"]);
  var options = tslib.__assign({}, transition);
  if (times) options["offset"] = times;
  /**
   * Convert any existing durations from seconds to milliseconds
   */
  if (transition.duration) options["duration"] = secondsToMilliseconds(transition.duration);
  if (transition.repeatDelay) options.repeatDelay = secondsToMilliseconds(transition.repeatDelay);
  /**
   * Map easing names to Popmotion's easing functions
   */
  if (ease) {
    options["ease"] = isEasingArray(ease) ? ease.map(easingDefinitionToFunction) : easingDefinitionToFunction(ease);
  }
  /**
   * Support legacy transition API
   */
  if (transition.type === "tween") options.type = "keyframes";
  /**
   * TODO: These options are officially removed from the API.
   */
  if (yoyo || loop || flip) {
    heyListen.warning(!legacyRepeatWarning, "yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options.");
    legacyRepeatWarning = true;
    if (yoyo) {
      options.repeatType = "reverse";
    } else if (loop) {
      options.repeatType = "loop";
    } else if (flip) {
      options.repeatType = "mirror";
    }
    options.repeat = loop || yoyo || flip || transition.repeat;
  }
  /**
   * TODO: Popmotion 9 has the ability to automatically detect whether to use
   * a keyframes or spring animation, but does so by detecting velocity and other spring options.
   * It'd be good to introduce a similar thing here.
   */
  if (transition.type !== "spring") options.type = "keyframes";
  return options;
}
/**
 * Get the delay for a value by checking Transition with decreasing specificity.
 */
function getDelayFromTransition(transition, key) {
  var _a, _b;
  var valueTransition = getValueTransition(transition, key) || {};
  return (_b = (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : transition.delay) !== null && _b !== void 0 ? _b : 0;
}
function hydrateKeyframes(options) {
  if (Array.isArray(options.to) && options.to[0] === null) {
    options.to = tslib.__spreadArray([], tslib.__read(options.to), false);
    options.to[0] = options.from;
  }
  return options;
}
function getPopmotionAnimationOptions(transition, options, key) {
  var _a;
  if (Array.isArray(options.to)) {
    (_a = transition.duration) !== null && _a !== void 0 ? _a : transition.duration = 0.8;
  }
  hydrateKeyframes(options);
  /**
   * Get a default transition if none is determined to be defined.
   */
  if (!isTransitionDefined(transition)) {
    transition = tslib.__assign(tslib.__assign({}, transition), getDefaultTransition(key, options.to));
  }
  return tslib.__assign(tslib.__assign({}, options), convertTransitionToAnimationOptions(transition));
}
/**
 *
 */
function getAnimation(key, value, target, transition, onComplete) {
  var _a;
  var valueTransition = getValueTransition(transition, key);
  var origin = (_a = valueTransition.from) !== null && _a !== void 0 ? _a : value.get();
  var isTargetAnimatable = isAnimatable(key, target);
  if (origin === "none" && isTargetAnimatable && typeof target === "string") {
    /**
     * If we're trying to animate from "none", try and get an animatable version
     * of the target. This could be improved to work both ways.
     */
    origin = getAnimatableNone(key, target);
  } else if (isZero(origin) && typeof target === "string") {
    origin = getZeroUnit(target);
  } else if (!Array.isArray(target) && isZero(target) && typeof origin === "string") {
    target = getZeroUnit(origin);
  }
  var isOriginAnimatable = isAnimatable(key, origin);
  heyListen.warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate ".concat(key, " from \"").concat(origin, "\" to \"").concat(target, "\". ").concat(origin, " is not an animatable value - to enable this animation set ").concat(origin, " to a value animatable to ").concat(target, " via the `style` property."));
  function start() {
    var options = {
      from: origin,
      to: target,
      velocity: value.getVelocity(),
      onComplete: onComplete,
      onUpdate: function (v) {
        return value.set(v);
      }
    };
    return valueTransition.type === "inertia" || valueTransition.type === "decay" ? popmotion.inertia(tslib.__assign(tslib.__assign({}, options), valueTransition)) : popmotion.animate(tslib.__assign(tslib.__assign({}, getPopmotionAnimationOptions(valueTransition, options, key)), {
      onUpdate: function (v) {
        var _a;
        options.onUpdate(v);
        (_a = valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, v);
      },
      onComplete: function () {
        var _a;
        options.onComplete();
        (_a = valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition);
      }
    }));
  }
  function set() {
    var _a, _b;
    var finalTarget = resolveFinalValueInKeyframes(target);
    value.set(finalTarget);
    onComplete();
    (_a = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, finalTarget);
    (_b = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onComplete) === null || _b === void 0 ? void 0 : _b.call(valueTransition);
    return {
      stop: function () {}
    };
  }
  return !isOriginAnimatable || !isTargetAnimatable || valueTransition.type === false ? set : start;
}
function isZero(value) {
  return value === 0 || typeof value === "string" && parseFloat(value) === 0 && value.indexOf(" ") === -1;
}
function getZeroUnit(potentialUnitType) {
  return typeof potentialUnitType === "number" ? 0 : getAnimatableNone("", potentialUnitType);
}
function getValueTransition(transition, key) {
  return transition[key] || transition["default"] || transition;
}
/**
 * Start animation on a MotionValue. This function is an interface between
 * Framer Motion and Popmotion
 */
function startAnimation(key, value, target, transition) {
  if (transition === void 0) {
    transition = {};
  }
  if (instantAnimationState.current) {
    transition = {
      type: false
    };
  }
  return value.start(function (onComplete) {
    var delayTimer;
    var controls;
    var animation = getAnimation(key, value, target, transition, onComplete);
    var delay = getDelayFromTransition(transition, key);
    var start = function () {
      return controls = animation();
    };
    if (delay) {
      delayTimer = window.setTimeout(start, secondsToMilliseconds(delay));
    } else {
      start();
    }
    return function () {
      clearTimeout(delayTimer);
      controls === null || controls === void 0 ? void 0 : controls.stop();
    };
  });
}

/**
 * Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1"
 */
var isNumericalString = function (v) {
  return /^\-?\d*\.?\d+$/.test(v);
};

/**
 * Check if the value is a zero value string like "0px" or "0%"
 */
var isZeroValueString = function (v) {
  return /^0[^.\s]+$/.test(v);
};
function addUniqueItem(arr, item) {
  arr.indexOf(item) === -1 && arr.push(item);
}
function removeItem(arr, item) {
  var index = arr.indexOf(item);
  index > -1 && arr.splice(index, 1);
}
// Adapted from array-move
function moveItem(_a, fromIndex, toIndex) {
  var _b = tslib.__read(_a),
    arr = _b.slice(0);
  var startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;
  if (startIndex >= 0 && startIndex < arr.length) {
    var endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;
    var _c = tslib.__read(arr.splice(fromIndex, 1), 1),
      item = _c[0];
    arr.splice(endIndex, 0, item);
  }
  return arr;
}
var SubscriptionManager = /** @class */function () {
  function SubscriptionManager() {
    this.subscriptions = [];
  }
  SubscriptionManager.prototype.add = function (handler) {
    var _this = this;
    addUniqueItem(this.subscriptions, handler);
    return function () {
      return removeItem(_this.subscriptions, handler);
    };
  };
  SubscriptionManager.prototype.notify = function (a, b, c) {
    var numSubscriptions = this.subscriptions.length;
    if (!numSubscriptions) return;
    if (numSubscriptions === 1) {
      /**
       * If there's only a single handler we can just call it without invoking a loop.
       */
      this.subscriptions[0](a, b, c);
    } else {
      for (var i = 0; i < numSubscriptions; i++) {
        /**
         * Check whether the handler exists before firing as it's possible
         * the subscriptions were modified during this loop running.
         */
        var handler = this.subscriptions[i];
        handler && handler(a, b, c);
      }
    }
  };
  SubscriptionManager.prototype.getSize = function () {
    return this.subscriptions.length;
  };
  SubscriptionManager.prototype.clear = function () {
    this.subscriptions.length = 0;
  };
  return SubscriptionManager;
}();
var isFloat = function (value) {
  return !isNaN(parseFloat(value));
};
/**
 * `MotionValue` is used to track the state and velocity of motion values.
 *
 * @public
 */
var MotionValue = /** @class */function () {
  /**
   * @param init - The initiating value
   * @param config - Optional configuration options
   *
   * -  `transformer`: A function to transform incoming values with.
   *
   * @internal
   */
  function MotionValue(init) {
    var _this = this;
    /**
     * This will be replaced by the build step with the latest version number.
     * When MotionValues are provided to motion components, warn if versions are mixed.
     */
    this.version = "6.5.1";
    /**
     * Duration, in milliseconds, since last updating frame.
     *
     * @internal
     */
    this.timeDelta = 0;
    /**
     * Timestamp of the last time this `MotionValue` was updated.
     *
     * @internal
     */
    this.lastUpdated = 0;
    /**
     * Functions to notify when the `MotionValue` updates.
     *
     * @internal
     */
    this.updateSubscribers = new SubscriptionManager();
    /**
     * Functions to notify when the velocity updates.
     *
     * @internal
     */
    this.velocityUpdateSubscribers = new SubscriptionManager();
    /**
     * Functions to notify when the `MotionValue` updates and `render` is set to `true`.
     *
     * @internal
     */
    this.renderSubscribers = new SubscriptionManager();
    /**
     * Tracks whether this value can output a velocity. Currently this is only true
     * if the value is numerical, but we might be able to widen the scope here and support
     * other value types.
     *
     * @internal
     */
    this.canTrackVelocity = false;
    this.updateAndNotify = function (v, render) {
      if (render === void 0) {
        render = true;
      }
      _this.prev = _this.current;
      _this.current = v;
      // Update timestamp
      var _a = sync.getFrameData(),
        delta = _a.delta,
        timestamp = _a.timestamp;
      if (_this.lastUpdated !== timestamp) {
        _this.timeDelta = delta;
        _this.lastUpdated = timestamp;
        sync__default["default"].postRender(_this.scheduleVelocityCheck);
      }
      // Update update subscribers
      if (_this.prev !== _this.current) {
        _this.updateSubscribers.notify(_this.current);
      }
      // Update velocity subscribers
      if (_this.velocityUpdateSubscribers.getSize()) {
        _this.velocityUpdateSubscribers.notify(_this.getVelocity());
      }
      // Update render subscribers
      if (render) {
        _this.renderSubscribers.notify(_this.current);
      }
    };
    /**
     * Schedule a velocity check for the next frame.
     *
     * This is an instanced and bound function to prevent generating a new
     * function once per frame.
     *
     * @internal
     */
    this.scheduleVelocityCheck = function () {
      return sync__default["default"].postRender(_this.velocityCheck);
    };
    /**
     * Updates `prev` with `current` if the value hasn't been updated this frame.
     * This ensures velocity calculations return `0`.
     *
     * This is an instanced and bound function to prevent generating a new
     * function once per frame.
     *
     * @internal
     */
    this.velocityCheck = function (_a) {
      var timestamp = _a.timestamp;
      if (timestamp !== _this.lastUpdated) {
        _this.prev = _this.current;
        _this.velocityUpdateSubscribers.notify(_this.getVelocity());
      }
    };
    this.hasAnimated = false;
    this.prev = this.current = init;
    this.canTrackVelocity = isFloat(this.current);
  }
  /**
   * Adds a function that will be notified when the `MotionValue` is updated.
   *
   * It returns a function that, when called, will cancel the subscription.
   *
   * When calling `onChange` inside a React component, it should be wrapped with the
   * `useEffect` hook. As it returns an unsubscribe function, this should be returned
   * from the `useEffect` function to ensure you don't add duplicate subscribers..
   *
   * ```jsx
   * export const MyComponent = () => {
   *   const x = useMotionValue(0)
   *   const y = useMotionValue(0)
   *   const opacity = useMotionValue(1)
   *
   *   useEffect(() => {
   *     function updateOpacity() {
   *       const maxXY = Math.max(x.get(), y.get())
   *       const newOpacity = transform(maxXY, [0, 100], [1, 0])
   *       opacity.set(newOpacity)
   *     }
   *
   *     const unsubscribeX = x.onChange(updateOpacity)
   *     const unsubscribeY = y.onChange(updateOpacity)
   *
   *     return () => {
   *       unsubscribeX()
   *       unsubscribeY()
   *     }
   *   }, [])
   *
   *   return <motion.div style={{ x }} />
   * }
   * ```
   *
   * @privateRemarks
   *
   * We could look into a `useOnChange` hook if the above lifecycle management proves confusing.
   *
   * ```jsx
   * useOnChange(x, () => {})
   * ```
   *
   * @param subscriber - A function that receives the latest value.
   * @returns A function that, when called, will cancel this subscription.
   *
   * @public
   */
  MotionValue.prototype.onChange = function (subscription) {
    return this.updateSubscribers.add(subscription);
  };
  MotionValue.prototype.clearListeners = function () {
    this.updateSubscribers.clear();
  };
  /**
   * Adds a function that will be notified when the `MotionValue` requests a render.
   *
   * @param subscriber - A function that's provided the latest value.
   * @returns A function that, when called, will cancel this subscription.
   *
   * @internal
   */
  MotionValue.prototype.onRenderRequest = function (subscription) {
    // Render immediately
    subscription(this.get());
    return this.renderSubscribers.add(subscription);
  };
  /**
   * Attaches a passive effect to the `MotionValue`.
   *
   * @internal
   */
  MotionValue.prototype.attach = function (passiveEffect) {
    this.passiveEffect = passiveEffect;
  };
  /**
   * Sets the state of the `MotionValue`.
   *
   * @remarks
   *
   * ```jsx
   * const x = useMotionValue(0)
   * x.set(10)
   * ```
   *
   * @param latest - Latest value to set.
   * @param render - Whether to notify render subscribers. Defaults to `true`
   *
   * @public
   */
  MotionValue.prototype.set = function (v, render) {
    if (render === void 0) {
      render = true;
    }
    if (!render || !this.passiveEffect) {
      this.updateAndNotify(v, render);
    } else {
      this.passiveEffect(v, this.updateAndNotify);
    }
  };
  /**
   * Returns the latest state of `MotionValue`
   *
   * @returns - The latest state of `MotionValue`
   *
   * @public
   */
  MotionValue.prototype.get = function () {
    return this.current;
  };
  /**
   * @public
   */
  MotionValue.prototype.getPrevious = function () {
    return this.prev;
  };
  /**
   * Returns the latest velocity of `MotionValue`
   *
   * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
   *
   * @public
   */
  MotionValue.prototype.getVelocity = function () {
    // This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful
    return this.canTrackVelocity ?
    // These casts could be avoided if parseFloat would be typed better
    popmotion.velocityPerSecond(parseFloat(this.current) - parseFloat(this.prev), this.timeDelta) : 0;
  };
  /**
   * Registers a new animation to control this `MotionValue`. Only one
   * animation can drive a `MotionValue` at one time.
   *
   * ```jsx
   * value.start()
   * ```
   *
   * @param animation - A function that starts the provided animation
   *
   * @internal
   */
  MotionValue.prototype.start = function (animation) {
    var _this = this;
    this.stop();
    return new Promise(function (resolve) {
      _this.hasAnimated = true;
      _this.stopAnimation = animation(resolve);
    }).then(function () {
      return _this.clearAnimation();
    });
  };
  /**
   * Stop the currently active animation.
   *
   * @public
   */
  MotionValue.prototype.stop = function () {
    if (this.stopAnimation) this.stopAnimation();
    this.clearAnimation();
  };
  /**
   * Returns `true` if this value is currently animating.
   *
   * @public
   */
  MotionValue.prototype.isAnimating = function () {
    return !!this.stopAnimation;
  };
  MotionValue.prototype.clearAnimation = function () {
    this.stopAnimation = null;
  };
  /**
   * Destroy and clean up subscribers to this `MotionValue`.
   *
   * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
   * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
   * created a `MotionValue` via the `motionValue` function.
   *
   * @public
   */
  MotionValue.prototype.destroy = function () {
    this.updateSubscribers.clear();
    this.renderSubscribers.clear();
    this.stop();
  };
  return MotionValue;
}();
function motionValue(init) {
  return new MotionValue(init);
}

/**
 * Tests a provided value against a ValueType
 */
var testValueType = function (v) {
  return function (type) {
    return type.test(v);
  };
};

/**
 * ValueType for "auto"
 */
var auto = {
  test: function (v) {
    return v === "auto";
  },
  parse: function (v) {
    return v;
  }
};

/**
 * A list of value types commonly used for dimensions
 */
var dimensionValueTypes = [styleValueTypes.number, styleValueTypes.px, styleValueTypes.percent, styleValueTypes.degrees, styleValueTypes.vw, styleValueTypes.vh, auto];
/**
 * Tests a dimensional value against the list of dimension ValueTypes
 */
var findDimensionValueType = function (v) {
  return dimensionValueTypes.find(testValueType(v));
};

/**
 * A list of all ValueTypes
 */
var valueTypes = tslib.__spreadArray(tslib.__spreadArray([], tslib.__read(dimensionValueTypes), false), [styleValueTypes.color, styleValueTypes.complex], false);
/**
 * Tests a value against the list of ValueTypes
 */
var findValueType = function (v) {
  return valueTypes.find(testValueType(v));
};

/**
 * Set VisualElement's MotionValue, creating a new MotionValue for it if
 * it doesn't exist.
 */
function setMotionValue(visualElement, key, value) {
  if (visualElement.hasValue(key)) {
    visualElement.getValue(key).set(value);
  } else {
    visualElement.addValue(key, motionValue(value));
  }
}
function setTarget(visualElement, definition) {
  var resolved = resolveVariant(visualElement, definition);
  var _a = resolved ? visualElement.makeTargetAnimatable(resolved, false) : {},
    _b = _a.transitionEnd,
    transitionEnd = _b === void 0 ? {} : _b;
  _a.transition;
  var target = tslib.__rest(_a, ["transitionEnd", "transition"]);
  target = tslib.__assign(tslib.__assign({}, target), transitionEnd);
  for (var key in target) {
    var value = resolveFinalValueInKeyframes(target[key]);
    setMotionValue(visualElement, key, value);
  }
}
function setVariants(visualElement, variantLabels) {
  var reversedLabels = tslib.__spreadArray([], tslib.__read(variantLabels), false).reverse();
  reversedLabels.forEach(function (key) {
    var _a;
    var variant = visualElement.getVariant(key);
    variant && setTarget(visualElement, variant);
    (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {
      setVariants(child, variantLabels);
    });
  });
}
function setValues(visualElement, definition) {
  if (Array.isArray(definition)) {
    return setVariants(visualElement, definition);
  } else if (typeof definition === "string") {
    return setVariants(visualElement, [definition]);
  } else {
    setTarget(visualElement, definition);
  }
}
function checkTargetForNewValues(visualElement, target, origin) {
  var _a, _b, _c;
  var _d;
  var newValueKeys = Object.keys(target).filter(function (key) {
    return !visualElement.hasValue(key);
  });
  var numNewValues = newValueKeys.length;
  if (!numNewValues) return;
  for (var i = 0; i < numNewValues; i++) {
    var key = newValueKeys[i];
    var targetValue = target[key];
    var value = null;
    /**
     * If the target is a series of keyframes, we can use the first value
     * in the array. If this first value is null, we'll still need to read from the DOM.
     */
    if (Array.isArray(targetValue)) {
      value = targetValue[0];
    }
    /**
     * If the target isn't keyframes, or the first keyframe was null, we need to
     * first check if an origin value was explicitly defined in the transition as "from",
     * if not read the value from the DOM. As an absolute fallback, take the defined target value.
     */
    if (value === null) {
      value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key];
    }
    /**
     * If value is still undefined or null, ignore it. Preferably this would throw,
     * but this was causing issues in Framer.
     */
    if (value === undefined || value === null) continue;
    if (typeof value === "string" && (isNumericalString(value) || isZeroValueString(value))) {
      // If this is a number read as a string, ie "0" or "200", convert it to a number
      value = parseFloat(value);
    } else if (!findValueType(value) && styleValueTypes.complex.test(targetValue)) {
      value = getAnimatableNone(key, targetValue);
    }
    visualElement.addValue(key, motionValue(value));
    (_c = (_d = origin)[key]) !== null && _c !== void 0 ? _c : _d[key] = value;
    visualElement.setBaseTarget(key, value);
  }
}
function getOriginFromTransition(key, transition) {
  if (!transition) return;
  var valueTransition = transition[key] || transition["default"] || transition;
  return valueTransition.from;
}
function getOrigin(target, transition, visualElement) {
  var _a, _b;
  var origin = {};
  for (var key in target) {
    origin[key] = (_a = getOriginFromTransition(key, transition)) !== null && _a !== void 0 ? _a : (_b = visualElement.getValue(key)) === null || _b === void 0 ? void 0 : _b.get();
  }
  return origin;
}
function animateVisualElement(visualElement, definition, options) {
  if (options === void 0) {
    options = {};
  }
  visualElement.notifyAnimationStart(definition);
  var animation;
  if (Array.isArray(definition)) {
    var animations = definition.map(function (variant) {
      return animateVariant(visualElement, variant, options);
    });
    animation = Promise.all(animations);
  } else if (typeof definition === "string") {
    animation = animateVariant(visualElement, definition, options);
  } else {
    var resolvedDefinition = typeof definition === "function" ? resolveVariant(visualElement, definition, options.custom) : definition;
    animation = animateTarget(visualElement, resolvedDefinition, options);
  }
  return animation.then(function () {
    return visualElement.notifyAnimationComplete(definition);
  });
}
function animateVariant(visualElement, variant, options) {
  var _a;
  if (options === void 0) {
    options = {};
  }
  var resolved = resolveVariant(visualElement, variant, options.custom);
  var _b = (resolved || {}).transition,
    transition = _b === void 0 ? visualElement.getDefaultTransition() || {} : _b;
  if (options.transitionOverride) {
    transition = options.transitionOverride;
  }
  /**
   * If we have a variant, create a callback that runs it as an animation.
   * Otherwise, we resolve a Promise immediately for a composable no-op.
   */
  var getAnimation = resolved ? function () {
    return animateTarget(visualElement, resolved, options);
  } : function () {
    return Promise.resolve();
  };
  /**
   * If we have children, create a callback that runs all their animations.
   * Otherwise, we resolve a Promise immediately for a composable no-op.
   */
  var getChildAnimations = ((_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.size) ? function (forwardDelay) {
    if (forwardDelay === void 0) {
      forwardDelay = 0;
    }
    var _a = transition.delayChildren,
      delayChildren = _a === void 0 ? 0 : _a,
      staggerChildren = transition.staggerChildren,
      staggerDirection = transition.staggerDirection;
    return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);
  } : function () {
    return Promise.resolve();
  };
  /**
   * If the transition explicitly defines a "when" option, we need to resolve either
   * this animation or all children animations before playing the other.
   */
  var when = transition.when;
  if (when) {
    var _c = tslib.__read(when === "beforeChildren" ? [getAnimation, getChildAnimations] : [getChildAnimations, getAnimation], 2),
      first = _c[0],
      last = _c[1];
    return first().then(last);
  } else {
    return Promise.all([getAnimation(), getChildAnimations(options.delay)]);
  }
}
/**
 * @internal
 */
function animateTarget(visualElement, definition, _a) {
  var _b;
  var _c = _a === void 0 ? {} : _a,
    _d = _c.delay,
    delay = _d === void 0 ? 0 : _d,
    transitionOverride = _c.transitionOverride,
    type = _c.type;
  var _e = visualElement.makeTargetAnimatable(definition),
    _f = _e.transition,
    transition = _f === void 0 ? visualElement.getDefaultTransition() : _f,
    transitionEnd = _e.transitionEnd,
    target = tslib.__rest(_e, ["transition", "transitionEnd"]);
  if (transitionOverride) transition = transitionOverride;
  var animations = [];
  var animationTypeState = type && ((_b = visualElement.animationState) === null || _b === void 0 ? void 0 : _b.getState()[type]);
  for (var key in target) {
    var value = visualElement.getValue(key);
    var valueTarget = target[key];
    if (!value || valueTarget === undefined || animationTypeState && shouldBlockAnimation(animationTypeState, key)) {
      continue;
    }
    var valueTransition = tslib.__assign({
      delay: delay
    }, transition);
    /**
     * Make animation instant if this is a transform prop and we should reduce motion.
     */
    if (visualElement.shouldReduceMotion && isTransformProp(key)) {
      valueTransition = tslib.__assign(tslib.__assign({}, valueTransition), {
        type: false,
        delay: 0
      });
    }
    var animation = startAnimation(key, value, valueTarget, valueTransition);
    animations.push(animation);
  }
  return Promise.all(animations).then(function () {
    transitionEnd && setTarget(visualElement, transitionEnd);
  });
}
function animateChildren(visualElement, variant, delayChildren, staggerChildren, staggerDirection, options) {
  if (delayChildren === void 0) {
    delayChildren = 0;
  }
  if (staggerChildren === void 0) {
    staggerChildren = 0;
  }
  if (staggerDirection === void 0) {
    staggerDirection = 1;
  }
  var animations = [];
  var maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;
  var generateStaggerDuration = staggerDirection === 1 ? function (i) {
    if (i === void 0) {
      i = 0;
    }
    return i * staggerChildren;
  } : function (i) {
    if (i === void 0) {
      i = 0;
    }
    return maxStaggerDuration - i * staggerChildren;
  };
  Array.from(visualElement.variantChildren).sort(sortByTreeOrder).forEach(function (child, i) {
    animations.push(animateVariant(child, variant, tslib.__assign(tslib.__assign({}, options), {
      delay: delayChildren + generateStaggerDuration(i)
    })).then(function () {
      return child.notifyAnimationComplete(variant);
    }));
  });
  return Promise.all(animations);
}
function stopAnimation(visualElement) {
  visualElement.forEachValue(function (value) {
    return value.stop();
  });
}
function sortByTreeOrder(a, b) {
  return a.sortNodePosition(b);
}
/**
 * Decide whether we should block this animation. Previously, we achieved this
 * just by checking whether the key was listed in protectedKeys, but this
 * posed problems if an animation was triggered by afterChildren and protectedKeys
 * had been set to true in the meantime.
 */
function shouldBlockAnimation(_a, key) {
  var protectedKeys = _a.protectedKeys,
    needsAnimating = _a.needsAnimating;
  var shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;
  needsAnimating[key] = false;
  return shouldBlock;
}
var variantPriorityOrder = [exports.AnimationType.Animate, exports.AnimationType.InView, exports.AnimationType.Focus, exports.AnimationType.Hover, exports.AnimationType.Tap, exports.AnimationType.Drag, exports.AnimationType.Exit];
var reversePriorityOrder = tslib.__spreadArray([], tslib.__read(variantPriorityOrder), false).reverse();
var numAnimationTypes = variantPriorityOrder.length;
function animateList(visualElement) {
  return function (animations) {
    return Promise.all(animations.map(function (_a) {
      var animation = _a.animation,
        options = _a.options;
      return animateVisualElement(visualElement, animation, options);
    }));
  };
}
function createAnimationState(visualElement) {
  var animate = animateList(visualElement);
  var state = createState();
  var allAnimatedKeys = {};
  var isInitialRender = true;
  /**
   * This function will be used to reduce the animation definitions for
   * each active animation type into an object of resolved values for it.
   */
  var buildResolvedTypeValues = function (acc, definition) {
    var resolved = resolveVariant(visualElement, definition);
    if (resolved) {
      resolved.transition;
      var transitionEnd = resolved.transitionEnd,
        target = tslib.__rest(resolved, ["transition", "transitionEnd"]);
      acc = tslib.__assign(tslib.__assign(tslib.__assign({}, acc), target), transitionEnd);
    }
    return acc;
  };
  function isAnimated(key) {
    return allAnimatedKeys[key] !== undefined;
  }
  /**
   * This just allows us to inject mocked animation functions
   * @internal
   */
  function setAnimateFunction(makeAnimator) {
    animate = makeAnimator(visualElement);
  }
  /**
   * When we receive new props, we need to:
   * 1. Create a list of protected keys for each type. This is a directory of
   *    value keys that are currently being "handled" by types of a higher priority
   *    so that whenever an animation is played of a given type, these values are
   *    protected from being animated.
   * 2. Determine if an animation type needs animating.
   * 3. Determine if any values have been removed from a type and figure out
   *    what to animate those to.
   */
  function animateChanges(options, changedActiveType) {
    var _a;
    var props = visualElement.getProps();
    var context = visualElement.getVariantContext(true) || {};
    /**
     * A list of animations that we'll build into as we iterate through the animation
     * types. This will get executed at the end of the function.
     */
    var animations = [];
    /**
     * Keep track of which values have been removed. Then, as we hit lower priority
     * animation types, we can check if they contain removed values and animate to that.
     */
    var removedKeys = new Set();
    /**
     * A dictionary of all encountered keys. This is an object to let us build into and
     * copy it without iteration. Each time we hit an animation type we set its protected
     * keys - the keys its not allowed to animate - to the latest version of this object.
     */
    var encounteredKeys = {};
    /**
     * If a variant has been removed at a given index, and this component is controlling
     * variant animations, we want to ensure lower-priority variants are forced to animate.
     */
    var removedVariantIndex = Infinity;
    var _loop_1 = function (i) {
      var type = reversePriorityOrder[i];
      var typeState = state[type];
      var prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type];
      var propIsVariant = isVariantLabel(prop);
      /**
       * If this type has *just* changed isActive status, set activeDelta
       * to that status. Otherwise set to null.
       */
      var activeDelta = type === changedActiveType ? typeState.isActive : null;
      if (activeDelta === false) removedVariantIndex = i;
      /**
       * If this prop is an inherited variant, rather than been set directly on the
       * component itself, we want to make sure we allow the parent to trigger animations.
       *
       * TODO: Can probably change this to a !isControllingVariants check
       */
      var isInherited = prop === context[type] && prop !== props[type] && propIsVariant;
      /**
       *
       */
      if (isInherited && isInitialRender && visualElement.manuallyAnimateOnMount) {
        isInherited = false;
      }
      /**
       * Set all encountered keys so far as the protected keys for this type. This will
       * be any key that has been animated or otherwise handled by active, higher-priortiy types.
       */
      typeState.protectedKeys = tslib.__assign({}, encounteredKeys);
      // Check if we can skip analysing this prop early
      if (
      // If it isn't active and hasn't *just* been set as inactive
      !typeState.isActive && activeDelta === null ||
      // If we didn't and don't have any defined prop for this animation type
      !prop && !typeState.prevProp ||
      // Or if the prop doesn't define an animation
      isAnimationControls(prop) || typeof prop === "boolean") {
        return "continue";
      }
      /**
       * As we go look through the values defined on this type, if we detect
       * a changed value or a value that was removed in a higher priority, we set
       * this to true and add this prop to the animation list.
       */
      var variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);
      var shouldAnimateType = variantDidChange ||
      // If we're making this variant active, we want to always make it active
      type === changedActiveType && typeState.isActive && !isInherited && propIsVariant ||
      // If we removed a higher-priority variant (i is in reverse order)
      i > removedVariantIndex && propIsVariant;
      /**
       * As animations can be set as variant lists, variants or target objects, we
       * coerce everything to an array if it isn't one already
       */
      var definitionList = Array.isArray(prop) ? prop : [prop];
      /**
       * Build an object of all the resolved values. We'll use this in the subsequent
       * animateChanges calls to determine whether a value has changed.
       */
      var resolvedValues = definitionList.reduce(buildResolvedTypeValues, {});
      if (activeDelta === false) resolvedValues = {};
      /**
       * Now we need to loop through all the keys in the prev prop and this prop,
       * and decide:
       * 1. If the value has changed, and needs animating
       * 2. If it has been removed, and needs adding to the removedKeys set
       * 3. If it has been removed in a higher priority type and needs animating
       * 4. If it hasn't been removed in a higher priority but hasn't changed, and
       *    needs adding to the type's protectedKeys list.
       */
      var _b = typeState.prevResolvedValues,
        prevResolvedValues = _b === void 0 ? {} : _b;
      var allKeys = tslib.__assign(tslib.__assign({}, prevResolvedValues), resolvedValues);
      var markToAnimate = function (key) {
        shouldAnimateType = true;
        removedKeys.delete(key);
        typeState.needsAnimating[key] = true;
      };
      for (var key in allKeys) {
        var next = resolvedValues[key];
        var prev = prevResolvedValues[key];
        // If we've already handled this we can just skip ahead
        if (encounteredKeys.hasOwnProperty(key)) continue;
        /**
         * If the value has changed, we probably want to animate it.
         */
        if (next !== prev) {
          /**
           * If both values are keyframes, we need to shallow compare them to
           * detect whether any value has changed. If it has, we animate it.
           */
          if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {
            if (!shallowCompare(next, prev) || variantDidChange) {
              markToAnimate(key);
            } else {
              /**
               * If it hasn't changed, we want to ensure it doesn't animate by
               * adding it to the list of protected keys.
               */
              typeState.protectedKeys[key] = true;
            }
          } else if (next !== undefined) {
            // If next is defined and doesn't equal prev, it needs animating
            markToAnimate(key);
          } else {
            // If it's undefined, it's been removed.
            removedKeys.add(key);
          }
        } else if (next !== undefined && removedKeys.has(key)) {
          /**
           * If next hasn't changed and it isn't undefined, we want to check if it's
           * been removed by a higher priority
           */
          markToAnimate(key);
        } else {
          /**
           * If it hasn't changed, we add it to the list of protected values
           * to ensure it doesn't get animated.
           */
          typeState.protectedKeys[key] = true;
        }
      }
      /**
       * Update the typeState so next time animateChanges is called we can compare the
       * latest prop and resolvedValues to these.
       */
      typeState.prevProp = prop;
      typeState.prevResolvedValues = resolvedValues;
      /**
       *
       */
      if (typeState.isActive) {
        encounteredKeys = tslib.__assign(tslib.__assign({}, encounteredKeys), resolvedValues);
      }
      if (isInitialRender && visualElement.blockInitialAnimation) {
        shouldAnimateType = false;
      }
      /**
       * If this is an inherited prop we want to hard-block animations
       * TODO: Test as this should probably still handle animations triggered
       * by removed values?
       */
      if (shouldAnimateType && !isInherited) {
        animations.push.apply(animations, tslib.__spreadArray([], tslib.__read(definitionList.map(function (animation) {
          return {
            animation: animation,
            options: tslib.__assign({
              type: type
            }, options)
          };
        })), false));
      }
    };
    /**
     * Iterate through all animation types in reverse priority order. For each, we want to
     * detect which values it's handling and whether or not they've changed (and therefore
     * need to be animated). If any values have been removed, we want to detect those in
     * lower priority props and flag for animation.
     */
    for (var i = 0; i < numAnimationTypes; i++) {
      _loop_1(i);
    }
    allAnimatedKeys = tslib.__assign({}, encounteredKeys);
    /**
     * If there are some removed value that haven't been dealt with,
     * we need to create a new animation that falls back either to the value
     * defined in the style prop, or the last read value.
     */
    if (removedKeys.size) {
      var fallbackAnimation_1 = {};
      removedKeys.forEach(function (key) {
        var fallbackTarget = visualElement.getBaseTarget(key);
        if (fallbackTarget !== undefined) {
          fallbackAnimation_1[key] = fallbackTarget;
        }
      });
      animations.push({
        animation: fallbackAnimation_1
      });
    }
    var shouldAnimate = Boolean(animations.length);
    if (isInitialRender && props.initial === false && !visualElement.manuallyAnimateOnMount) {
      shouldAnimate = false;
    }
    isInitialRender = false;
    return shouldAnimate ? animate(animations) : Promise.resolve();
  }
  /**
   * Change whether a certain animation type is active.
   */
  function setActive(type, isActive, options) {
    var _a;
    // If the active state hasn't changed, we can safely do nothing here
    if (state[type].isActive === isActive) return Promise.resolve();
    // Propagate active change to children
    (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {
      var _a;
      return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive);
    });
    state[type].isActive = isActive;
    var animations = animateChanges(options, type);
    for (var key in state) {
      state[key].protectedKeys = {};
    }
    return animations;
  }
  return {
    isAnimated: isAnimated,
    animateChanges: animateChanges,
    setActive: setActive,
    setAnimateFunction: setAnimateFunction,
    getState: function () {
      return state;
    }
  };
}
function checkVariantsDidChange(prev, next) {
  if (typeof next === "string") {
    return next !== prev;
  } else if (isVariantLabels(next)) {
    return !shallowCompare(next, prev);
  }
  return false;
}
function createTypeState(isActive) {
  if (isActive === void 0) {
    isActive = false;
  }
  return {
    isActive: isActive,
    protectedKeys: {},
    needsAnimating: {},
    prevResolvedValues: {}
  };
}
function createState() {
  var _a;
  return _a = {}, _a[exports.AnimationType.Animate] = createTypeState(true), _a[exports.AnimationType.InView] = createTypeState(), _a[exports.AnimationType.Hover] = createTypeState(), _a[exports.AnimationType.Tap] = createTypeState(), _a[exports.AnimationType.Drag] = createTypeState(), _a[exports.AnimationType.Focus] = createTypeState(), _a[exports.AnimationType.Exit] = createTypeState(), _a;
}
var animations = {
  animation: makeRenderlessComponent(function (_a) {
    var visualElement = _a.visualElement,
      animate = _a.animate;
    /**
     * We dynamically generate the AnimationState manager as it contains a reference
     * to the underlying animation library. We only want to load that if we load this,
     * so people can optionally code split it out using the `m` component.
     */
    visualElement.animationState || (visualElement.animationState = createAnimationState(visualElement));
    /**
     * Subscribe any provided AnimationControls to the component's VisualElement
     */
    if (isAnimationControls(animate)) {
      React.useEffect(function () {
        return animate.subscribe(visualElement);
      }, [animate]);
    }
  }),
  exit: makeRenderlessComponent(function (props) {
    var custom = props.custom,
      visualElement = props.visualElement;
    var _a = tslib.__read(usePresence(), 2),
      isPresent = _a[0],
      safeToRemove = _a[1];
    var presenceContext = React.useContext(PresenceContext);
    React.useEffect(function () {
      var _a, _b;
      visualElement.isPresent = isPresent;
      var animation = (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Exit, !isPresent, {
        custom: (_b = presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.custom) !== null && _b !== void 0 ? _b : custom
      });
      !isPresent && (animation === null || animation === void 0 ? void 0 : animation.then(safeToRemove));
    }, [isPresent]);
  })
};

/**
 * @internal
 */
var PanSession = /** @class */function () {
  function PanSession(event, handlers, _a) {
    var _this = this;
    var _b = _a === void 0 ? {} : _a,
      transformPagePoint = _b.transformPagePoint;
    /**
     * @internal
     */
    this.startEvent = null;
    /**
     * @internal
     */
    this.lastMoveEvent = null;
    /**
     * @internal
     */
    this.lastMoveEventInfo = null;
    /**
     * @internal
     */
    this.handlers = {};
    this.updatePoint = function () {
      if (!(_this.lastMoveEvent && _this.lastMoveEventInfo)) return;
      var info = getPanInfo(_this.lastMoveEventInfo, _this.history);
      var isPanStarted = _this.startEvent !== null;
      // Only start panning if the offset is larger than 3 pixels. If we make it
      // any larger than this we'll want to reset the pointer history
      // on the first update to avoid visual snapping to the cursoe.
      var isDistancePastThreshold = popmotion.distance(info.offset, {
        x: 0,
        y: 0
      }) >= 3;
      if (!isPanStarted && !isDistancePastThreshold) return;
      var point = info.point;
      var timestamp = sync.getFrameData().timestamp;
      _this.history.push(tslib.__assign(tslib.__assign({}, point), {
        timestamp: timestamp
      }));
      var _a = _this.handlers,
        onStart = _a.onStart,
        onMove = _a.onMove;
      if (!isPanStarted) {
        onStart && onStart(_this.lastMoveEvent, info);
        _this.startEvent = _this.lastMoveEvent;
      }
      onMove && onMove(_this.lastMoveEvent, info);
    };
    this.handlePointerMove = function (event, info) {
      _this.lastMoveEvent = event;
      _this.lastMoveEventInfo = transformPoint(info, _this.transformPagePoint);
      // Because Safari doesn't trigger mouseup events when it's above a `<select>`
      if (isMouseEvent(event) && event.buttons === 0) {
        _this.handlePointerUp(event, info);
        return;
      }
      // Throttle mouse move event to once per frame
      sync__default["default"].update(_this.updatePoint, true);
    };
    this.handlePointerUp = function (event, info) {
      _this.end();
      var _a = _this.handlers,
        onEnd = _a.onEnd,
        onSessionEnd = _a.onSessionEnd;
      var panInfo = getPanInfo(transformPoint(info, _this.transformPagePoint), _this.history);
      if (_this.startEvent && onEnd) {
        onEnd(event, panInfo);
      }
      onSessionEnd && onSessionEnd(event, panInfo);
    };
    // If we have more than one touch, don't start detecting this gesture
    if (isTouchEvent(event) && event.touches.length > 1) return;
    this.handlers = handlers;
    this.transformPagePoint = transformPagePoint;
    var info = extractEventInfo(event);
    var initialInfo = transformPoint(info, this.transformPagePoint);
    var point = initialInfo.point;
    var timestamp = sync.getFrameData().timestamp;
    this.history = [tslib.__assign(tslib.__assign({}, point), {
      timestamp: timestamp
    })];
    var onSessionStart = handlers.onSessionStart;
    onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
    this.removeListeners = popmotion.pipe(addPointerEvent(window, "pointermove", this.handlePointerMove), addPointerEvent(window, "pointerup", this.handlePointerUp), addPointerEvent(window, "pointercancel", this.handlePointerUp));
  }
  PanSession.prototype.updateHandlers = function (handlers) {
    this.handlers = handlers;
  };
  PanSession.prototype.end = function () {
    this.removeListeners && this.removeListeners();
    sync.cancelSync.update(this.updatePoint);
  };
  return PanSession;
}();
function transformPoint(info, transformPagePoint) {
  return transformPagePoint ? {
    point: transformPagePoint(info.point)
  } : info;
}
function subtractPoint(a, b) {
  return {
    x: a.x - b.x,
    y: a.y - b.y
  };
}
function getPanInfo(_a, history) {
  var point = _a.point;
  return {
    point: point,
    delta: subtractPoint(point, lastDevicePoint(history)),
    offset: subtractPoint(point, startDevicePoint(history)),
    velocity: getVelocity(history, 0.1)
  };
}
function startDevicePoint(history) {
  return history[0];
}
function lastDevicePoint(history) {
  return history[history.length - 1];
}
function getVelocity(history, timeDelta) {
  if (history.length < 2) {
    return {
      x: 0,
      y: 0
    };
  }
  var i = history.length - 1;
  var timestampedPoint = null;
  var lastPoint = lastDevicePoint(history);
  while (i >= 0) {
    timestampedPoint = history[i];
    if (lastPoint.timestamp - timestampedPoint.timestamp > secondsToMilliseconds(timeDelta)) {
      break;
    }
    i--;
  }
  if (!timestampedPoint) {
    return {
      x: 0,
      y: 0
    };
  }
  var time = (lastPoint.timestamp - timestampedPoint.timestamp) / 1000;
  if (time === 0) {
    return {
      x: 0,
      y: 0
    };
  }
  var currentVelocity = {
    x: (lastPoint.x - timestampedPoint.x) / time,
    y: (lastPoint.y - timestampedPoint.y) / time
  };
  if (currentVelocity.x === Infinity) {
    currentVelocity.x = 0;
  }
  if (currentVelocity.y === Infinity) {
    currentVelocity.y = 0;
  }
  return currentVelocity;
}
function calcLength(axis) {
  return axis.max - axis.min;
}
function isNear(value, target, maxDistance) {
  if (target === void 0) {
    target = 0;
  }
  if (maxDistance === void 0) {
    maxDistance = 0.01;
  }
  return popmotion.distance(value, target) < maxDistance;
}
function calcAxisDelta(delta, source, target, origin) {
  if (origin === void 0) {
    origin = 0.5;
  }
  delta.origin = origin;
  delta.originPoint = popmotion.mix(source.min, source.max, delta.origin);
  delta.scale = calcLength(target) / calcLength(source);
  if (isNear(delta.scale, 1, 0.0001) || isNaN(delta.scale)) delta.scale = 1;
  delta.translate = popmotion.mix(target.min, target.max, delta.origin) - delta.originPoint;
  if (isNear(delta.translate) || isNaN(delta.translate)) delta.translate = 0;
}
function calcBoxDelta(delta, source, target, origin) {
  calcAxisDelta(delta.x, source.x, target.x, origin === null || origin === void 0 ? void 0 : origin.originX);
  calcAxisDelta(delta.y, source.y, target.y, origin === null || origin === void 0 ? void 0 : origin.originY);
}
function calcRelativeAxis(target, relative, parent) {
  target.min = parent.min + relative.min;
  target.max = target.min + calcLength(relative);
}
function calcRelativeBox(target, relative, parent) {
  calcRelativeAxis(target.x, relative.x, parent.x);
  calcRelativeAxis(target.y, relative.y, parent.y);
}
function calcRelativeAxisPosition(target, layout, parent) {
  target.min = layout.min - parent.min;
  target.max = target.min + calcLength(layout);
}
function calcRelativePosition(target, layout, parent) {
  calcRelativeAxisPosition(target.x, layout.x, parent.x);
  calcRelativeAxisPosition(target.y, layout.y, parent.y);
}

/**
 * Apply constraints to a point. These constraints are both physical along an
 * axis, and an elastic factor that determines how much to constrain the point
 * by if it does lie outside the defined parameters.
 */
function applyConstraints(point, _a, elastic) {
  var min = _a.min,
    max = _a.max;
  if (min !== undefined && point < min) {
    // If we have a min point defined, and this is outside of that, constrain
    point = elastic ? popmotion.mix(min, point, elastic.min) : Math.max(point, min);
  } else if (max !== undefined && point > max) {
    // If we have a max point defined, and this is outside of that, constrain
    point = elastic ? popmotion.mix(max, point, elastic.max) : Math.min(point, max);
  }
  return point;
}
/**
 * Calculate constraints in terms of the viewport when defined relatively to the
 * measured axis. This is measured from the nearest edge, so a max constraint of 200
 * on an axis with a max value of 300 would return a constraint of 500 - axis length
 */
function calcRelativeAxisConstraints(axis, min, max) {
  return {
    min: min !== undefined ? axis.min + min : undefined,
    max: max !== undefined ? axis.max + max - (axis.max - axis.min) : undefined
  };
}
/**
 * Calculate constraints in terms of the viewport when
 * defined relatively to the measured bounding box.
 */
function calcRelativeConstraints(layoutBox, _a) {
  var top = _a.top,
    left = _a.left,
    bottom = _a.bottom,
    right = _a.right;
  return {
    x: calcRelativeAxisConstraints(layoutBox.x, left, right),
    y: calcRelativeAxisConstraints(layoutBox.y, top, bottom)
  };
}
/**
 * Calculate viewport constraints when defined as another viewport-relative axis
 */
function calcViewportAxisConstraints(layoutAxis, constraintsAxis) {
  var _a;
  var min = constraintsAxis.min - layoutAxis.min;
  var max = constraintsAxis.max - layoutAxis.max;
  // If the constraints axis is actually smaller than the layout axis then we can
  // flip the constraints
  if (constraintsAxis.max - constraintsAxis.min < layoutAxis.max - layoutAxis.min) {
    _a = tslib.__read([max, min], 2), min = _a[0], max = _a[1];
  }
  return {
    min: min,
    max: max
  };
}
/**
 * Calculate viewport constraints when defined as another viewport-relative box
 */
function calcViewportConstraints(layoutBox, constraintsBox) {
  return {
    x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),
    y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y)
  };
}
/**
 * Calculate a transform origin relative to the source axis, between 0-1, that results
 * in an asthetically pleasing scale/transform needed to project from source to target.
 */
function calcOrigin(source, target) {
  var origin = 0.5;
  var sourceLength = calcLength(source);
  var targetLength = calcLength(target);
  if (targetLength > sourceLength) {
    origin = popmotion.progress(target.min, target.max - sourceLength, source.min);
  } else if (sourceLength > targetLength) {
    origin = popmotion.progress(source.min, source.max - targetLength, target.min);
  }
  return popmotion.clamp(0, 1, origin);
}
/**
 * Rebase the calculated viewport constraints relative to the layout.min point.
 */
function rebaseAxisConstraints(layout, constraints) {
  var relativeConstraints = {};
  if (constraints.min !== undefined) {
    relativeConstraints.min = constraints.min - layout.min;
  }
  if (constraints.max !== undefined) {
    relativeConstraints.max = constraints.max - layout.min;
  }
  return relativeConstraints;
}
var defaultElastic = 0.35;
/**
 * Accepts a dragElastic prop and returns resolved elastic values for each axis.
 */
function resolveDragElastic(dragElastic) {
  if (dragElastic === void 0) {
    dragElastic = defaultElastic;
  }
  if (dragElastic === false) {
    dragElastic = 0;
  } else if (dragElastic === true) {
    dragElastic = defaultElastic;
  }
  return {
    x: resolveAxisElastic(dragElastic, "left", "right"),
    y: resolveAxisElastic(dragElastic, "top", "bottom")
  };
}
function resolveAxisElastic(dragElastic, minLabel, maxLabel) {
  return {
    min: resolvePointElastic(dragElastic, minLabel),
    max: resolvePointElastic(dragElastic, maxLabel)
  };
}
function resolvePointElastic(dragElastic, label) {
  var _a;
  return typeof dragElastic === "number" ? dragElastic : (_a = dragElastic[label]) !== null && _a !== void 0 ? _a : 0;
}
var createAxisDelta = function () {
  return {
    translate: 0,
    scale: 1,
    origin: 0,
    originPoint: 0
  };
};
var createDelta = function () {
  return {
    x: createAxisDelta(),
    y: createAxisDelta()
  };
};
var createAxis = function () {
  return {
    min: 0,
    max: 0
  };
};
var createBox = function () {
  return {
    x: createAxis(),
    y: createAxis()
  };
};
function eachAxis(callback) {
  return [callback("x"), callback("y")];
}

/**
 * Bounding boxes tend to be defined as top, left, right, bottom. For various operations
 * it's easier to consider each axis individually. This function returns a bounding box
 * as a map of single-axis min/max values.
 */
function convertBoundingBoxToBox(_a) {
  var top = _a.top,
    left = _a.left,
    right = _a.right,
    bottom = _a.bottom;
  return {
    x: {
      min: left,
      max: right
    },
    y: {
      min: top,
      max: bottom
    }
  };
}
function convertBoxToBoundingBox(_a) {
  var x = _a.x,
    y = _a.y;
  return {
    top: y.min,
    right: x.max,
    bottom: y.max,
    left: x.min
  };
}
/**
 * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function
 * provided by Framer to allow measured points to be corrected for device scaling. This is used
 * when measuring DOM elements and DOM event points.
 */
function transformBoxPoints(point, transformPoint) {
  if (!transformPoint) return point;
  var topLeft = transformPoint({
    x: point.left,
    y: point.top
  });
  var bottomRight = transformPoint({
    x: point.right,
    y: point.bottom
  });
  return {
    top: topLeft.y,
    left: topLeft.x,
    bottom: bottomRight.y,
    right: bottomRight.x
  };
}
function isIdentityScale(scale) {
  return scale === undefined || scale === 1;
}
function hasScale(_a) {
  var scale = _a.scale,
    scaleX = _a.scaleX,
    scaleY = _a.scaleY;
  return !isIdentityScale(scale) || !isIdentityScale(scaleX) || !isIdentityScale(scaleY);
}
function hasTransform(values) {
  return hasScale(values) || hasTranslate(values.x) || hasTranslate(values.y) || values.z || values.rotate || values.rotateX || values.rotateY;
}
function hasTranslate(value) {
  return value && value !== "0%";
}

/**
 * Scales a point based on a factor and an originPoint
 */
function scalePoint(point, scale, originPoint) {
  var distanceFromOrigin = point - originPoint;
  var scaled = scale * distanceFromOrigin;
  return originPoint + scaled;
}
/**
 * Applies a translate/scale delta to a point
 */
function applyPointDelta(point, translate, scale, originPoint, boxScale) {
  if (boxScale !== undefined) {
    point = scalePoint(point, boxScale, originPoint);
  }
  return scalePoint(point, scale, originPoint) + translate;
}
/**
 * Applies a translate/scale delta to an axis
 */
function applyAxisDelta(axis, translate, scale, originPoint, boxScale) {
  if (translate === void 0) {
    translate = 0;
  }
  if (scale === void 0) {
    scale = 1;
  }
  axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);
  axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);
}
/**
 * Applies a translate/scale delta to a box
 */
function applyBoxDelta(box, _a) {
  var x = _a.x,
    y = _a.y;
  applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);
  applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);
}
/**
 * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms
 * in a tree upon our box before then calculating how to project it into our desired viewport-relative box
 *
 * This is the final nested loop within updateLayoutDelta for future refactoring
 */
function applyTreeDeltas(box, treeScale, treePath, isSharedTransition) {
  var _a, _b;
  if (isSharedTransition === void 0) {
    isSharedTransition = false;
  }
  var treeLength = treePath.length;
  if (!treeLength) return;
  // Reset the treeScale
  treeScale.x = treeScale.y = 1;
  var node;
  var delta;
  for (var i = 0; i < treeLength; i++) {
    node = treePath[i];
    delta = node.projectionDelta;
    if (((_b = (_a = node.instance) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.display) === "contents") continue;
    if (isSharedTransition && node.options.layoutScroll && node.scroll && node !== node.root) {
      transformBox(box, {
        x: -node.scroll.x,
        y: -node.scroll.y
      });
    }
    if (delta) {
      // Incoporate each ancestor's scale into a culmulative treeScale for this component
      treeScale.x *= delta.x.scale;
      treeScale.y *= delta.y.scale;
      // Apply each ancestor's calculated delta into this component's recorded layout box
      applyBoxDelta(box, delta);
    }
    if (isSharedTransition && hasTransform(node.latestValues)) {
      transformBox(box, node.latestValues);
    }
  }
}
function translateAxis(axis, distance) {
  axis.min = axis.min + distance;
  axis.max = axis.max + distance;
}
/**
 * Apply a transform to an axis from the latest resolved motion values.
 * This function basically acts as a bridge between a flat motion value map
 * and applyAxisDelta
 */
function transformAxis(axis, transforms, _a) {
  var _b = tslib.__read(_a, 3),
    key = _b[0],
    scaleKey = _b[1],
    originKey = _b[2];
  var axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5;
  var originPoint = popmotion.mix(axis.min, axis.max, axisOrigin);
  // Apply the axis delta to the final axis
  applyAxisDelta(axis, transforms[key], transforms[scaleKey], originPoint, transforms.scale);
}
/**
 * The names of the motion values we want to apply as translation, scale and origin.
 */
var xKeys$1 = ["x", "scaleX", "originX"];
var yKeys$1 = ["y", "scaleY", "originY"];
/**
 * Apply a transform to a box from the latest resolved motion values.
 */
function transformBox(box, transform) {
  transformAxis(box.x, transform, xKeys$1);
  transformAxis(box.y, transform, yKeys$1);
}
function measureViewportBox(instance, transformPoint) {
  return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));
}
function measurePageBox(element, rootProjectionNode, transformPagePoint) {
  var viewportBox = measureViewportBox(element, transformPagePoint);
  var scroll = rootProjectionNode.scroll;
  if (scroll) {
    translateAxis(viewportBox.x, scroll.x);
    translateAxis(viewportBox.y, scroll.y);
  }
  return viewportBox;
}
var elementDragControls = new WeakMap();
/**
 *
 */
// let latestPointerEvent: AnyPointerEvent
var VisualElementDragControls = /** @class */function () {
  function VisualElementDragControls(visualElement) {
    // This is a reference to the global drag gesture lock, ensuring only one component
    // can "capture" the drag of one or both axes.
    // TODO: Look into moving this into pansession?
    this.openGlobalLock = null;
    this.isDragging = false;
    this.currentDirection = null;
    this.originPoint = {
      x: 0,
      y: 0
    };
    /**
     * The permitted boundaries of travel, in pixels.
     */
    this.constraints = false;
    this.hasMutatedConstraints = false;
    /**
     * The per-axis resolved elastic values.
     */
    this.elastic = createBox();
    this.visualElement = visualElement;
  }
  VisualElementDragControls.prototype.start = function (originEvent, _a) {
    var _this = this;
    var _b = _a === void 0 ? {} : _a,
      _c = _b.snapToCursor,
      snapToCursor = _c === void 0 ? false : _c;
    /**
     * Don't start dragging if this component is exiting
     */
    if (this.visualElement.isPresent === false) return;
    var onSessionStart = function (event) {
      // Stop any animations on both axis values immediately. This allows the user to throw and catch
      // the component.
      _this.stopAnimation();
      if (snapToCursor) {
        _this.snapToCursor(extractEventInfo(event, "page").point);
      }
    };
    var onStart = function (event, info) {
      var _a;
      // Attempt to grab the global drag gesture lock - maybe make this part of PanSession
      var _b = _this.getProps(),
        drag = _b.drag,
        dragPropagation = _b.dragPropagation,
        onDragStart = _b.onDragStart;
      if (drag && !dragPropagation) {
        if (_this.openGlobalLock) _this.openGlobalLock();
        _this.openGlobalLock = getGlobalLock(drag);
        // If we don 't have the lock, don't start dragging
        if (!_this.openGlobalLock) return;
      }
      _this.isDragging = true;
      _this.currentDirection = null;
      _this.resolveConstraints();
      if (_this.visualElement.projection) {
        _this.visualElement.projection.isAnimationBlocked = true;
        _this.visualElement.projection.target = undefined;
      }
      /**
       * Record gesture origin
       */
      eachAxis(function (axis) {
        var _a, _b;
        var current = _this.getAxisMotionValue(axis).get() || 0;
        /**
         * If the MotionValue is a percentage value convert to px
         */
        if (styleValueTypes.percent.test(current)) {
          var measuredAxis = (_b = (_a = _this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.actual[axis];
          if (measuredAxis) {
            var length_1 = calcLength(measuredAxis);
            current = length_1 * (parseFloat(current) / 100);
          }
        }
        _this.originPoint[axis] = current;
      });
      // Fire onDragStart event
      onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart(event, info);
      (_a = _this.visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(exports.AnimationType.Drag, true);
    };
    var onMove = function (event, info) {
      // latestPointerEvent = event
      var _a = _this.getProps(),
        dragPropagation = _a.dragPropagation,
        dragDirectionLock = _a.dragDirectionLock,
        onDirectionLock = _a.onDirectionLock,
        onDrag = _a.onDrag;
      // If we didn't successfully receive the gesture lock, early return.
      if (!dragPropagation && !_this.openGlobalLock) return;
      var offset = info.offset;
      // Attempt to detect drag direction if directionLock is true
      if (dragDirectionLock && _this.currentDirection === null) {
        _this.currentDirection = getCurrentDirection(offset);
        // If we've successfully set a direction, notify listener
        if (_this.currentDirection !== null) {
          onDirectionLock === null || onDirectionLock === void 0 ? void 0 : onDirectionLock(_this.currentDirection);
        }
        return;
      }
      // Update each point with the latest position
      _this.updateAxis("x", info.point, offset);
      _this.updateAxis("y", info.point, offset);
      /**
       * Ideally we would leave the renderer to fire naturally at the end of
       * this frame but if the element is about to change layout as the result
       * of a re-render we want to ensure the browser can read the latest
       * bounding box to ensure the pointer and element don't fall out of sync.
       */
      _this.visualElement.syncRender();
      /**
       * This must fire after the syncRender call as it might trigger a state
       * change which itself might trigger a layout update.
       */
      onDrag === null || onDrag === void 0 ? void 0 : onDrag(event, info);
    };
    var onSessionEnd = function (event, info) {
      return _this.stop(event, info);
    };
    this.panSession = new PanSession(originEvent, {
      onSessionStart: onSessionStart,
      onStart: onStart,
      onMove: onMove,
      onSessionEnd: onSessionEnd
    }, {
      transformPagePoint: this.visualElement.getTransformPagePoint()
    });
  };
  VisualElementDragControls.prototype.stop = function (event, info) {
    var isDragging = this.isDragging;
    this.cancel();
    if (!isDragging) return;
    var velocity = info.velocity;
    this.startAnimation(velocity);
    var onDragEnd = this.getProps().onDragEnd;
    onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd(event, info);
  };
  VisualElementDragControls.prototype.cancel = function () {
    var _a, _b;
    this.isDragging = false;
    if (this.visualElement.projection) {
      this.visualElement.projection.isAnimationBlocked = false;
    }
    (_a = this.panSession) === null || _a === void 0 ? void 0 : _a.end();
    this.panSession = undefined;
    var dragPropagation = this.getProps().dragPropagation;
    if (!dragPropagation && this.openGlobalLock) {
      this.openGlobalLock();
      this.openGlobalLock = null;
    }
    (_b = this.visualElement.animationState) === null || _b === void 0 ? void 0 : _b.setActive(exports.AnimationType.Drag, false);
  };
  VisualElementDragControls.prototype.updateAxis = function (axis, _point, offset) {
    var drag = this.getProps().drag;
    // If we're not dragging this axis, do an early return.
    if (!offset || !shouldDrag(axis, drag, this.currentDirection)) return;
    var axisValue = this.getAxisMotionValue(axis);
    var next = this.originPoint[axis] + offset[axis];
    // Apply constraints
    if (this.constraints && this.constraints[axis]) {
      next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);
    }
    axisValue.set(next);
  };
  VisualElementDragControls.prototype.resolveConstraints = function () {
    var _this = this;
    var _a = this.getProps(),
      dragConstraints = _a.dragConstraints,
      dragElastic = _a.dragElastic;
    var layout = (this.visualElement.projection || {}).layout;
    var prevConstraints = this.constraints;
    if (dragConstraints && isRefObject(dragConstraints)) {
      if (!this.constraints) {
        this.constraints = this.resolveRefConstraints();
      }
    } else {
      if (dragConstraints && layout) {
        this.constraints = calcRelativeConstraints(layout.actual, dragConstraints);
      } else {
        this.constraints = false;
      }
    }
    this.elastic = resolveDragElastic(dragElastic);
    /**
     * If we're outputting to external MotionValues, we want to rebase the measured constraints
     * from viewport-relative to component-relative.
     */
    if (prevConstraints !== this.constraints && layout && this.constraints && !this.hasMutatedConstraints) {
      eachAxis(function (axis) {
        if (_this.getAxisMotionValue(axis)) {
          _this.constraints[axis] = rebaseAxisConstraints(layout.actual[axis], _this.constraints[axis]);
        }
      });
    }
  };
  VisualElementDragControls.prototype.resolveRefConstraints = function () {
    var _a = this.getProps(),
      constraints = _a.dragConstraints,
      onMeasureDragConstraints = _a.onMeasureDragConstraints;
    if (!constraints || !isRefObject(constraints)) return false;
    var constraintsElement = constraints.current;
    heyListen.invariant(constraintsElement !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
    var projection = this.visualElement.projection;
    // TODO
    if (!projection || !projection.layout) return false;
    var constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());
    var measuredConstraints = calcViewportConstraints(projection.layout.actual, constraintsBox);
    /**
     * If there's an onMeasureDragConstraints listener we call it and
     * if different constraints are returned, set constraints to that
     */
    if (onMeasureDragConstraints) {
      var userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));
      this.hasMutatedConstraints = !!userConstraints;
      if (userConstraints) {
        measuredConstraints = convertBoundingBoxToBox(userConstraints);
      }
    }
    return measuredConstraints;
  };
  VisualElementDragControls.prototype.startAnimation = function (velocity) {
    var _this = this;
    var _a = this.getProps(),
      drag = _a.drag,
      dragMomentum = _a.dragMomentum,
      dragElastic = _a.dragElastic,
      dragTransition = _a.dragTransition,
      dragSnapToOrigin = _a.dragSnapToOrigin,
      onDragTransitionEnd = _a.onDragTransitionEnd;
    var constraints = this.constraints || {};
    var momentumAnimations = eachAxis(function (axis) {
      var _a;
      if (!shouldDrag(axis, drag, _this.currentDirection)) {
        return;
      }
      var transition = (_a = constraints === null || constraints === void 0 ? void 0 : constraints[axis]) !== null && _a !== void 0 ? _a : {};
      if (dragSnapToOrigin) transition = {
        min: 0,
        max: 0
      };
      /**
       * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame
       * of spring animations so we should look into adding a disable spring option to `inertia`.
       * We could do something here where we affect the `bounceStiffness` and `bounceDamping`
       * using the value of `dragElastic`.
       */
      var bounceStiffness = dragElastic ? 200 : 1000000;
      var bounceDamping = dragElastic ? 40 : 10000000;
      var inertia = tslib.__assign(tslib.__assign({
        type: "inertia",
        velocity: dragMomentum ? velocity[axis] : 0,
        bounceStiffness: bounceStiffness,
        bounceDamping: bounceDamping,
        timeConstant: 750,
        restDelta: 1,
        restSpeed: 10
      }, dragTransition), transition);
      // If we're not animating on an externally-provided `MotionValue` we can use the
      // component's animation controls which will handle interactions with whileHover (etc),
      // otherwise we just have to animate the `MotionValue` itself.
      return _this.startAxisValueAnimation(axis, inertia);
    });
    // Run all animations and then resolve the new drag constraints.
    return Promise.all(momentumAnimations).then(onDragTransitionEnd);
  };
  VisualElementDragControls.prototype.startAxisValueAnimation = function (axis, transition) {
    var axisValue = this.getAxisMotionValue(axis);
    return startAnimation(axis, axisValue, 0, transition);
  };
  VisualElementDragControls.prototype.stopAnimation = function () {
    var _this = this;
    eachAxis(function (axis) {
      return _this.getAxisMotionValue(axis).stop();
    });
  };
  /**
   * Drag works differently depending on which props are provided.
   *
   * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
   * - Otherwise, we apply the delta to the x/y motion values.
   */
  VisualElementDragControls.prototype.getAxisMotionValue = function (axis) {
    var _a, _b;
    var dragKey = "_drag" + axis.toUpperCase();
    var externalMotionValue = this.visualElement.getProps()[dragKey];
    return externalMotionValue ? externalMotionValue : this.visualElement.getValue(axis, (_b = (_a = this.visualElement.getProps().initial) === null || _a === void 0 ? void 0 : _a[axis]) !== null && _b !== void 0 ? _b : 0);
  };
  VisualElementDragControls.prototype.snapToCursor = function (point) {
    var _this = this;
    eachAxis(function (axis) {
      var drag = _this.getProps().drag;
      // If we're not dragging this axis, do an early return.
      if (!shouldDrag(axis, drag, _this.currentDirection)) return;
      var projection = _this.visualElement.projection;
      var axisValue = _this.getAxisMotionValue(axis);
      if (projection && projection.layout) {
        var _a = projection.layout.actual[axis],
          min = _a.min,
          max = _a.max;
        axisValue.set(point[axis] - popmotion.mix(min, max, 0.5));
      }
    });
  };
  /**
   * When the viewport resizes we want to check if the measured constraints
   * have changed and, if so, reposition the element within those new constraints
   * relative to where it was before the resize.
   */
  VisualElementDragControls.prototype.scalePositionWithinConstraints = function () {
    var _this = this;
    var _a;
    var _b = this.getProps(),
      drag = _b.drag,
      dragConstraints = _b.dragConstraints;
    var projection = this.visualElement.projection;
    if (!isRefObject(dragConstraints) || !projection || !this.constraints) return;
    /**
     * Stop current animations as there can be visual glitching if we try to do
     * this mid-animation
     */
    this.stopAnimation();
    /**
     * Record the relative position of the dragged element relative to the
     * constraints box and save as a progress value.
     */
    var boxProgress = {
      x: 0,
      y: 0
    };
    eachAxis(function (axis) {
      var axisValue = _this.getAxisMotionValue(axis);
      if (axisValue) {
        var latest = axisValue.get();
        boxProgress[axis] = calcOrigin({
          min: latest,
          max: latest
        }, _this.constraints[axis]);
      }
    });
    /**
     * Update the layout of this element and resolve the latest drag constraints
     */
    var transformTemplate = this.visualElement.getProps().transformTemplate;
    this.visualElement.getInstance().style.transform = transformTemplate ? transformTemplate({}, "") : "none";
    (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll();
    projection.updateLayout();
    this.resolveConstraints();
    /**
     * For each axis, calculate the current progress of the layout axis
     * within the new constraints.
     */
    eachAxis(function (axis) {
      if (!shouldDrag(axis, drag, null)) return;
      /**
       * Calculate a new transform based on the previous box progress
       */
      var axisValue = _this.getAxisMotionValue(axis);
      var _a = _this.constraints[axis],
        min = _a.min,
        max = _a.max;
      axisValue.set(popmotion.mix(min, max, boxProgress[axis]));
    });
  };
  VisualElementDragControls.prototype.addListeners = function () {
    var _this = this;
    var _a;
    elementDragControls.set(this.visualElement, this);
    var element = this.visualElement.getInstance();
    /**
     * Attach a pointerdown event listener on this DOM element to initiate drag tracking.
     */
    var stopPointerListener = addPointerEvent(element, "pointerdown", function (event) {
      var _a = _this.getProps(),
        drag = _a.drag,
        _b = _a.dragListener,
        dragListener = _b === void 0 ? true : _b;
      drag && dragListener && _this.start(event);
    });
    var measureDragConstraints = function () {
      var dragConstraints = _this.getProps().dragConstraints;
      if (isRefObject(dragConstraints)) {
        _this.constraints = _this.resolveRefConstraints();
      }
    };
    var projection = this.visualElement.projection;
    var stopMeasureLayoutListener = projection.addEventListener("measure", measureDragConstraints);
    if (projection && !projection.layout) {
      (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll();
      projection.updateLayout();
    }
    measureDragConstraints();
    /**
     * Attach a window resize listener to scale the draggable target within its defined
     * constraints as the window resizes.
     */
    var stopResizeListener = addDomEvent(window, "resize", function () {
      return _this.scalePositionWithinConstraints();
    });
    /**
     * If the element's layout changes, calculate the delta and apply that to
     * the drag gesture's origin point.
     */
    projection.addEventListener("didUpdate", function (_a) {
      var delta = _a.delta,
        hasLayoutChanged = _a.hasLayoutChanged;
      if (_this.isDragging && hasLayoutChanged) {
        eachAxis(function (axis) {
          var motionValue = _this.getAxisMotionValue(axis);
          if (!motionValue) return;
          _this.originPoint[axis] += delta[axis].translate;
          motionValue.set(motionValue.get() + delta[axis].translate);
        });
        _this.visualElement.syncRender();
      }
    });
    return function () {
      stopResizeListener();
      stopPointerListener();
      stopMeasureLayoutListener();
    };
  };
  VisualElementDragControls.prototype.getProps = function () {
    var props = this.visualElement.getProps();
    var _a = props.drag,
      drag = _a === void 0 ? false : _a,
      _b = props.dragDirectionLock,
      dragDirectionLock = _b === void 0 ? false : _b,
      _c = props.dragPropagation,
      dragPropagation = _c === void 0 ? false : _c,
      _d = props.dragConstraints,
      dragConstraints = _d === void 0 ? false : _d,
      _e = props.dragElastic,
      dragElastic = _e === void 0 ? defaultElastic : _e,
      _f = props.dragMomentum,
      dragMomentum = _f === void 0 ? true : _f;
    return tslib.__assign(tslib.__assign({}, props), {
      drag: drag,
      dragDirectionLock: dragDirectionLock,
      dragPropagation: dragPropagation,
      dragConstraints: dragConstraints,
      dragElastic: dragElastic,
      dragMomentum: dragMomentum
    });
  };
  return VisualElementDragControls;
}();
function shouldDrag(direction, drag, currentDirection) {
  return (drag === true || drag === direction) && (currentDirection === null || currentDirection === direction);
}
/**
 * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower
 * than the provided threshold, return `null`.
 *
 * @param offset - The x/y offset from origin.
 * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.
 */
function getCurrentDirection(offset, lockThreshold) {
  if (lockThreshold === void 0) {
    lockThreshold = 10;
  }
  var direction = null;
  if (Math.abs(offset.y) > lockThreshold) {
    direction = "y";
  } else if (Math.abs(offset.x) > lockThreshold) {
    direction = "x";
  }
  return direction;
}

/**
 * A hook that allows an element to be dragged.
 *
 * @internal
 */
function useDrag(props) {
  var groupDragControls = props.dragControls,
    visualElement = props.visualElement;
  var dragControls = useConstant(function () {
    return new VisualElementDragControls(visualElement);
  });
  // If we've been provided a DragControls for manual control over the drag gesture,
  // subscribe this component to it on mount.
  React.useEffect(function () {
    return groupDragControls && groupDragControls.subscribe(dragControls);
  }, [dragControls, groupDragControls]);
  // Apply the event listeners to the element
  React.useEffect(function () {
    return dragControls.addListeners();
  }, [dragControls]);
}

/**
 *
 * @param handlers -
 * @param ref -
 *
 * @privateRemarks
 * Currently this sets new pan gesture functions every render. The memo route has been explored
 * in the past but ultimately we're still creating new functions every render. An optimisation
 * to explore is creating the pan gestures and loading them into a `ref`.
 *
 * @internal
 */
function usePanGesture(_a) {
  var onPan = _a.onPan,
    onPanStart = _a.onPanStart,
    onPanEnd = _a.onPanEnd,
    onPanSessionStart = _a.onPanSessionStart,
    visualElement = _a.visualElement;
  var hasPanEvents = onPan || onPanStart || onPanEnd || onPanSessionStart;
  var panSession = React.useRef(null);
  var transformPagePoint = React.useContext(MotionConfigContext).transformPagePoint;
  var handlers = {
    onSessionStart: onPanSessionStart,
    onStart: onPanStart,
    onMove: onPan,
    onEnd: function (event, info) {
      panSession.current = null;
      onPanEnd && onPanEnd(event, info);
    }
  };
  React.useEffect(function () {
    if (panSession.current !== null) {
      panSession.current.updateHandlers(handlers);
    }
  });
  function onPointerDown(event) {
    panSession.current = new PanSession(event, handlers, {
      transformPagePoint: transformPagePoint
    });
  }
  usePointerEvent(visualElement, "pointerdown", hasPanEvents && onPointerDown);
  useUnmountEffect(function () {
    return panSession.current && panSession.current.end();
  });
}
var drag = {
  pan: makeRenderlessComponent(usePanGesture),
  drag: makeRenderlessComponent(useDrag)
};
var names = ["LayoutMeasure", "BeforeLayoutMeasure", "LayoutUpdate", "ViewportBoxUpdate", "Update", "Render", "AnimationComplete", "LayoutAnimationComplete", "AnimationStart", "LayoutAnimationStart", "SetAxisTarget", "Unmount"];
function createLifecycles() {
  var managers = names.map(function () {
    return new SubscriptionManager();
  });
  var propSubscriptions = {};
  var lifecycles = {
    clearAllListeners: function () {
      return managers.forEach(function (manager) {
        return manager.clear();
      });
    },
    updatePropListeners: function (props) {
      names.forEach(function (name) {
        var _a;
        var on = "on" + name;
        var propListener = props[on];
        // Unsubscribe existing subscription
        (_a = propSubscriptions[name]) === null || _a === void 0 ? void 0 : _a.call(propSubscriptions);
        // Add new subscription
        if (propListener) {
          propSubscriptions[name] = lifecycles[on](propListener);
        }
      });
    }
  };
  managers.forEach(function (manager, i) {
    lifecycles["on" + names[i]] = function (handler) {
      return manager.add(handler);
    };
    lifecycles["notify" + names[i]] = function () {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      return manager.notify.apply(manager, tslib.__spreadArray([], tslib.__read(args), false));
    };
  });
  return lifecycles;
}
function updateMotionValuesFromProps(element, next, prev) {
  var _a;
  for (var key in next) {
    var nextValue = next[key];
    var prevValue = prev[key];
    if (isMotionValue(nextValue)) {
      /**
       * If this is a motion value found in props or style, we want to add it
       * to our visual element's motion value map.
       */
      element.addValue(key, nextValue);
      /**
       * Check the version of the incoming motion value with this version
       * and warn against mismatches.
       */
      if (true) {
        warnOnce(nextValue.version === "6.5.1", "Attempting to mix Framer Motion versions ".concat(nextValue.version, " with 6.5.1 may not work as expected."));
      }
    } else if (isMotionValue(prevValue)) {
      /**
       * If we're swapping to a new motion value, create a new motion value
       * from that
       */
      element.addValue(key, motionValue(nextValue));
    } else if (prevValue !== nextValue) {
      /**
       * If this is a flat value that has changed, update the motion value
       * or create one if it doesn't exist. We only want to do this if we're
       * not handling the value with our animation state.
       */
      if (element.hasValue(key)) {
        var existingValue = element.getValue(key);
        // TODO: Only update values that aren't being animated or even looked at
        !existingValue.hasAnimated && existingValue.set(nextValue);
      } else {
        element.addValue(key, motionValue((_a = element.getStaticValue(key)) !== null && _a !== void 0 ? _a : nextValue));
      }
    }
  }
  // Handle removed values
  for (var key in prev) {
    if (next[key] === undefined) element.removeValue(key);
  }
  return next;
}
var visualElement = function (_a) {
  var _b = _a.treeType,
    treeType = _b === void 0 ? "" : _b,
    build = _a.build,
    getBaseTarget = _a.getBaseTarget,
    makeTargetAnimatable = _a.makeTargetAnimatable,
    measureViewportBox = _a.measureViewportBox,
    renderInstance = _a.render,
    readValueFromInstance = _a.readValueFromInstance,
    removeValueFromRenderState = _a.removeValueFromRenderState,
    sortNodePosition = _a.sortNodePosition,
    scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps;
  return function (_a, options) {
    var parent = _a.parent,
      props = _a.props,
      presenceId = _a.presenceId,
      blockInitialAnimation = _a.blockInitialAnimation,
      visualState = _a.visualState,
      shouldReduceMotion = _a.shouldReduceMotion;
    if (options === void 0) {
      options = {};
    }
    var isMounted = false;
    var latestValues = visualState.latestValues,
      renderState = visualState.renderState;
    /**
     * The instance of the render-specific node that will be hydrated by the
     * exposed React ref. So for example, this visual element can host a
     * HTMLElement, plain object, or Three.js object. The functions provided
     * in VisualElementConfig allow us to interface with this instance.
     */
    var instance;
    /**
     * Manages the subscriptions for a visual element's lifecycle, for instance
     * onRender
     */
    var lifecycles = createLifecycles();
    /**
     * A map of all motion values attached to this visual element. Motion
     * values are source of truth for any given animated value. A motion
     * value might be provided externally by the component via props.
     */
    var values = new Map();
    /**
     * A map of every subscription that binds the provided or generated
     * motion values onChange listeners to this visual element.
     */
    var valueSubscriptions = new Map();
    /**
     * A reference to the previously-provided motion values as returned
     * from scrapeMotionValuesFromProps. We use the keys in here to determine
     * if any motion values need to be removed after props are updated.
     */
    var prevMotionValues = {};
    /**
     * When values are removed from all animation props we need to search
     * for a fallback value to animate to. These values are tracked in baseTarget.
     */
    var baseTarget = tslib.__assign({}, latestValues);
    // Internal methods ========================
    /**
     * On mount, this will be hydrated with a callback to disconnect
     * this visual element from its parent on unmount.
     */
    var removeFromVariantTree;
    /**
     * Render the element with the latest styles outside of the React
     * render lifecycle
     */
    function render() {
      if (!instance || !isMounted) return;
      triggerBuild();
      renderInstance(instance, renderState, props.style, element.projection);
    }
    function triggerBuild() {
      build(element, renderState, latestValues, options, props);
    }
    function update() {
      lifecycles.notifyUpdate(latestValues);
    }
    /**
     *
     */
    function bindToMotionValue(key, value) {
      var removeOnChange = value.onChange(function (latestValue) {
        latestValues[key] = latestValue;
        props.onUpdate && sync__default["default"].update(update, false, true);
      });
      var removeOnRenderRequest = value.onRenderRequest(element.scheduleRender);
      valueSubscriptions.set(key, function () {
        removeOnChange();
        removeOnRenderRequest();
      });
    }
    /**
     * Any motion values that are provided to the element when created
     * aren't yet bound to the element, as this would technically be impure.
     * However, we iterate through the motion values and set them to the
     * initial values for this component.
     *
     * TODO: This is impure and we should look at changing this to run on mount.
     * Doing so will break some tests but this isn't neccessarily a breaking change,
     * more a reflection of the test.
     */
    var initialMotionValues = scrapeMotionValuesFromProps(props);
    for (var key in initialMotionValues) {
      var value = initialMotionValues[key];
      if (latestValues[key] !== undefined && isMotionValue(value)) {
        value.set(latestValues[key], false);
      }
    }
    /**
     * Determine what role this visual element should take in the variant tree.
     */
    var isControllingVariants = checkIfControllingVariants(props);
    var isVariantNode = checkIfVariantNode(props);
    var element = tslib.__assign(tslib.__assign({
      treeType: treeType,
      /**
       * This is a mirror of the internal instance prop, which keeps
       * VisualElement type-compatible with React's RefObject.
       */
      current: null,
      /**
       * The depth of this visual element within the visual element tree.
       */
      depth: parent ? parent.depth + 1 : 0,
      parent: parent,
      children: new Set(),
      /**
       *
       */
      presenceId: presenceId,
      shouldReduceMotion: shouldReduceMotion,
      /**
       * If this component is part of the variant tree, it should track
       * any children that are also part of the tree. This is essentially
       * a shadow tree to simplify logic around how to stagger over children.
       */
      variantChildren: isVariantNode ? new Set() : undefined,
      /**
       * Whether this instance is visible. This can be changed imperatively
       * by the projection tree, is analogous to CSS's visibility in that
       * hidden elements should take up layout, and needs enacting by the configured
       * render function.
       */
      isVisible: undefined,
      /**
       * Normally, if a component is controlled by a parent's variants, it can
       * rely on that ancestor to trigger animations further down the tree.
       * However, if a component is created after its parent is mounted, the parent
       * won't trigger that mount animation so the child needs to.
       *
       * TODO: This might be better replaced with a method isParentMounted
       */
      manuallyAnimateOnMount: Boolean(parent === null || parent === void 0 ? void 0 : parent.isMounted()),
      /**
       * This can be set by AnimatePresence to force components that mount
       * at the same time as it to mount as if they have initial={false} set.
       */
      blockInitialAnimation: blockInitialAnimation,
      /**
       * Determine whether this component has mounted yet. This is mostly used
       * by variant children to determine whether they need to trigger their
       * own animations on mount.
       */
      isMounted: function () {
        return Boolean(instance);
      },
      mount: function (newInstance) {
        isMounted = true;
        instance = element.current = newInstance;
        if (element.projection) {
          element.projection.mount(newInstance);
        }
        if (isVariantNode && parent && !isControllingVariants) {
          removeFromVariantTree = parent === null || parent === void 0 ? void 0 : parent.addVariantChild(element);
        }
        values.forEach(function (value, key) {
          return bindToMotionValue(key, value);
        });
        parent === null || parent === void 0 ? void 0 : parent.children.add(element);
        element.setProps(props);
      },
      /**
       *
       */
      unmount: function () {
        var _a;
        (_a = element.projection) === null || _a === void 0 ? void 0 : _a.unmount();
        sync.cancelSync.update(update);
        sync.cancelSync.render(render);
        valueSubscriptions.forEach(function (remove) {
          return remove();
        });
        removeFromVariantTree === null || removeFromVariantTree === void 0 ? void 0 : removeFromVariantTree();
        parent === null || parent === void 0 ? void 0 : parent.children.delete(element);
        lifecycles.clearAllListeners();
        instance = undefined;
        isMounted = false;
      },
      /**
       * Add a child visual element to our set of children.
       */
      addVariantChild: function (child) {
        var _a;
        var closestVariantNode = element.getClosestVariantNode();
        if (closestVariantNode) {
          (_a = closestVariantNode.variantChildren) === null || _a === void 0 ? void 0 : _a.add(child);
          return function () {
            return closestVariantNode.variantChildren.delete(child);
          };
        }
      },
      sortNodePosition: function (other) {
        /**
         * If these nodes aren't even of the same type we can't compare their depth.
         */
        if (!sortNodePosition || treeType !== other.treeType) return 0;
        return sortNodePosition(element.getInstance(), other.getInstance());
      },
      /**
       * Returns the closest variant node in the tree starting from
       * this visual element.
       */
      getClosestVariantNode: function () {
        return isVariantNode ? element : parent === null || parent === void 0 ? void 0 : parent.getClosestVariantNode();
      },
      /**
       * Expose the latest layoutId prop.
       */
      getLayoutId: function () {
        return props.layoutId;
      },
      /**
       * Returns the current instance.
       */
      getInstance: function () {
        return instance;
      },
      /**
       * Get/set the latest static values.
       */
      getStaticValue: function (key) {
        return latestValues[key];
      },
      setStaticValue: function (key, value) {
        return latestValues[key] = value;
      },
      /**
       * Returns the latest motion value state. Currently only used to take
       * a snapshot of the visual element - perhaps this can return the whole
       * visual state
       */
      getLatestValues: function () {
        return latestValues;
      },
      /**
       * Set the visiblity of the visual element. If it's changed, schedule
       * a render to reflect these changes.
       */
      setVisibility: function (visibility) {
        if (element.isVisible === visibility) return;
        element.isVisible = visibility;
        element.scheduleRender();
      },
      /**
       * Make a target animatable by Popmotion. For instance, if we're
       * trying to animate width from 100px to 100vw we need to measure 100vw
       * in pixels to determine what we really need to animate to. This is also
       * pluggable to support Framer's custom value types like Color,
       * and CSS variables.
       */
      makeTargetAnimatable: function (target, canMutate) {
        if (canMutate === void 0) {
          canMutate = true;
        }
        return makeTargetAnimatable(element, target, props, canMutate);
      },
      /**
       * Measure the current viewport box with or without transforms.
       * Only measures axis-aligned boxes, rotate and skew must be manually
       * removed with a re-render to work.
       */
      measureViewportBox: function () {
        return measureViewportBox(instance, props);
      },
      // Motion values ========================
      /**
       * Add a motion value and bind it to this visual element.
       */
      addValue: function (key, value) {
        // Remove existing value if it exists
        if (element.hasValue(key)) element.removeValue(key);
        values.set(key, value);
        latestValues[key] = value.get();
        bindToMotionValue(key, value);
      },
      /**
       * Remove a motion value and unbind any active subscriptions.
       */
      removeValue: function (key) {
        var _a;
        values.delete(key);
        (_a = valueSubscriptions.get(key)) === null || _a === void 0 ? void 0 : _a();
        valueSubscriptions.delete(key);
        delete latestValues[key];
        removeValueFromRenderState(key, renderState);
      },
      /**
       * Check whether we have a motion value for this key
       */
      hasValue: function (key) {
        return values.has(key);
      },
      /**
       * Get a motion value for this key. If called with a default
       * value, we'll create one if none exists.
       */
      getValue: function (key, defaultValue) {
        var value = values.get(key);
        if (value === undefined && defaultValue !== undefined) {
          value = motionValue(defaultValue);
          element.addValue(key, value);
        }
        return value;
      },
      /**
       * Iterate over our motion values.
       */
      forEachValue: function (callback) {
        return values.forEach(callback);
      },
      /**
       * If we're trying to animate to a previously unencountered value,
       * we need to check for it in our state and as a last resort read it
       * directly from the instance (which might have performance implications).
       */
      readValue: function (key) {
        var _a;
        return (_a = latestValues[key]) !== null && _a !== void 0 ? _a : readValueFromInstance(instance, key, options);
      },
      /**
       * Set the base target to later animate back to. This is currently
       * only hydrated on creation and when we first read a value.
       */
      setBaseTarget: function (key, value) {
        baseTarget[key] = value;
      },
      /**
       * Find the base target for a value thats been removed from all animation
       * props.
       */
      getBaseTarget: function (key) {
        if (getBaseTarget) {
          var target = getBaseTarget(props, key);
          if (target !== undefined && !isMotionValue(target)) return target;
        }
        return baseTarget[key];
      }
    }, lifecycles), {
      /**
       * Build the renderer state based on the latest visual state.
       */
      build: function () {
        triggerBuild();
        return renderState;
      },
      /**
       * Schedule a render on the next animation frame.
       */
      scheduleRender: function () {
        sync__default["default"].render(render, false, true);
      },
      /**
       * Synchronously fire render. It's prefered that we batch renders but
       * in many circumstances, like layout measurement, we need to run this
       * synchronously. However in those instances other measures should be taken
       * to batch reads/writes.
       */
      syncRender: render,
      /**
       * Update the provided props. Ensure any newly-added motion values are
       * added to our map, old ones removed, and listeners updated.
       */
      setProps: function (newProps) {
        if (newProps.transformTemplate || props.transformTemplate) {
          element.scheduleRender();
        }
        props = newProps;
        lifecycles.updatePropListeners(newProps);
        prevMotionValues = updateMotionValuesFromProps(element, scrapeMotionValuesFromProps(props), prevMotionValues);
      },
      getProps: function () {
        return props;
      },
      // Variants ==============================
      /**
       * Returns the variant definition with a given name.
       */
      getVariant: function (name) {
        var _a;
        return (_a = props.variants) === null || _a === void 0 ? void 0 : _a[name];
      },
      /**
       * Returns the defined default transition on this component.
       */
      getDefaultTransition: function () {
        return props.transition;
      },
      getTransformPagePoint: function () {
        return props.transformPagePoint;
      },
      /**
       * Used by child variant nodes to get the closest ancestor variant props.
       */
      getVariantContext: function (startAtParent) {
        if (startAtParent === void 0) {
          startAtParent = false;
        }
        if (startAtParent) return parent === null || parent === void 0 ? void 0 : parent.getVariantContext();
        if (!isControllingVariants) {
          var context_1 = (parent === null || parent === void 0 ? void 0 : parent.getVariantContext()) || {};
          if (props.initial !== undefined) {
            context_1.initial = props.initial;
          }
          return context_1;
        }
        var context = {};
        for (var i = 0; i < numVariantProps; i++) {
          var name_1 = variantProps[i];
          var prop = props[name_1];
          if (isVariantLabel(prop) || prop === false) {
            context[name_1] = prop;
          }
        }
        return context;
      }
    });
    return element;
  };
};
var variantProps = tslib.__spreadArray(["initial"], tslib.__read(variantPriorityOrder), false);
var numVariantProps = variantProps.length;
function isCSSVariable(value) {
  return typeof value === "string" && value.startsWith("var(--");
}
/**
 * Parse Framer's special CSS variable format into a CSS token and a fallback.
 *
 * ```
 * `var(--foo, #fff)` => [`--foo`, '#fff']
 * ```
 *
 * @param current
 */
var cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
function parseCSSVariable(current) {
  var match = cssVariableRegex.exec(current);
  if (!match) return [,];
  var _a = tslib.__read(match, 3),
    token = _a[1],
    fallback = _a[2];
  return [token, fallback];
}
var maxDepth = 4;
function getVariableValue(current, element, depth) {
  if (depth === void 0) {
    depth = 1;
  }
  heyListen.invariant(depth <= maxDepth, "Max CSS variable fallback depth detected in property \"".concat(current, "\". This may indicate a circular fallback dependency."));
  var _a = tslib.__read(parseCSSVariable(current), 2),
    token = _a[0],
    fallback = _a[1];
  // No CSS variable detected
  if (!token) return;
  // Attempt to read this CSS variable off the element
  var resolved = window.getComputedStyle(element).getPropertyValue(token);
  if (resolved) {
    return resolved.trim();
  } else if (isCSSVariable(fallback)) {
    // The fallback might itself be a CSS variable, in which case we attempt to resolve it too.
    return getVariableValue(fallback, element, depth + 1);
  } else {
    return fallback;
  }
}
/**
 * Resolve CSS variables from
 *
 * @internal
 */
function resolveCSSVariables(visualElement, _a, transitionEnd) {
  var _b;
  var target = tslib.__rest(_a, []);
  var element = visualElement.getInstance();
  if (!(element instanceof Element)) return {
    target: target,
    transitionEnd: transitionEnd
  };
  // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`
  // only if they change but I think this reads clearer and this isn't a performance-critical path.
  if (transitionEnd) {
    transitionEnd = tslib.__assign({}, transitionEnd);
  }
  // Go through existing `MotionValue`s and ensure any existing CSS variables are resolved
  visualElement.forEachValue(function (value) {
    var current = value.get();
    if (!isCSSVariable(current)) return;
    var resolved = getVariableValue(current, element);
    if (resolved) value.set(resolved);
  });
  // Cycle through every target property and resolve CSS variables. Currently
  // we only read single-var properties like `var(--foo)`, not `calc(var(--foo) + 20px)`
  for (var key in target) {
    var current = target[key];
    if (!isCSSVariable(current)) continue;
    var resolved = getVariableValue(current, element);
    if (!resolved) continue;
    // Clone target if it hasn't already been
    target[key] = resolved;
    // If the user hasn't already set this key on `transitionEnd`, set it to the unresolved
    // CSS variable. This will ensure that after the animation the component will reflect
    // changes in the value of the CSS variable.
    if (transitionEnd) (_b = transitionEnd[key]) !== null && _b !== void 0 ? _b : transitionEnd[key] = current;
  }
  return {
    target: target,
    transitionEnd: transitionEnd
  };
}
var positionalKeys = new Set(["width", "height", "top", "left", "right", "bottom", "x", "y"]);
var isPositionalKey = function (key) {
  return positionalKeys.has(key);
};
var hasPositionalKey = function (target) {
  return Object.keys(target).some(isPositionalKey);
};
var setAndResetVelocity = function (value, to) {
  // Looks odd but setting it twice doesn't render, it'll just
  // set both prev and current to the latest value
  value.set(to, false);
  value.set(to);
};
var isNumOrPxType = function (v) {
  return v === styleValueTypes.number || v === styleValueTypes.px;
};
var BoundingBoxDimension;
(function (BoundingBoxDimension) {
  BoundingBoxDimension["width"] = "width";
  BoundingBoxDimension["height"] = "height";
  BoundingBoxDimension["left"] = "left";
  BoundingBoxDimension["right"] = "right";
  BoundingBoxDimension["top"] = "top";
  BoundingBoxDimension["bottom"] = "bottom";
})(BoundingBoxDimension || (BoundingBoxDimension = {}));
var getPosFromMatrix = function (matrix, pos) {
  return parseFloat(matrix.split(", ")[pos]);
};
var getTranslateFromMatrix = function (pos2, pos3) {
  return function (_bbox, _a) {
    var transform = _a.transform;
    if (transform === "none" || !transform) return 0;
    var matrix3d = transform.match(/^matrix3d\((.+)\)$/);
    if (matrix3d) {
      return getPosFromMatrix(matrix3d[1], pos3);
    } else {
      var matrix = transform.match(/^matrix\((.+)\)$/);
      if (matrix) {
        return getPosFromMatrix(matrix[1], pos2);
      } else {
        return 0;
      }
    }
  };
};
var transformKeys = new Set(["x", "y", "z"]);
var nonTranslationalTransformKeys = transformProps.filter(function (key) {
  return !transformKeys.has(key);
});
function removeNonTranslationalTransform(visualElement) {
  var removedTransforms = [];
  nonTranslationalTransformKeys.forEach(function (key) {
    var value = visualElement.getValue(key);
    if (value !== undefined) {
      removedTransforms.push([key, value.get()]);
      value.set(key.startsWith("scale") ? 1 : 0);
    }
  });
  // Apply changes to element before measurement
  if (removedTransforms.length) visualElement.syncRender();
  return removedTransforms;
}
var positionalValues = {
  // Dimensions
  width: function (_a, _b) {
    var x = _a.x;
    var _c = _b.paddingLeft,
      paddingLeft = _c === void 0 ? "0" : _c,
      _d = _b.paddingRight,
      paddingRight = _d === void 0 ? "0" : _d;
    return x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight);
  },
  height: function (_a, _b) {
    var y = _a.y;
    var _c = _b.paddingTop,
      paddingTop = _c === void 0 ? "0" : _c,
      _d = _b.paddingBottom,
      paddingBottom = _d === void 0 ? "0" : _d;
    return y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom);
  },
  top: function (_bbox, _a) {
    var top = _a.top;
    return parseFloat(top);
  },
  left: function (_bbox, _a) {
    var left = _a.left;
    return parseFloat(left);
  },
  bottom: function (_a, _b) {
    var y = _a.y;
    var top = _b.top;
    return parseFloat(top) + (y.max - y.min);
  },
  right: function (_a, _b) {
    var x = _a.x;
    var left = _b.left;
    return parseFloat(left) + (x.max - x.min);
  },
  // Transform
  x: getTranslateFromMatrix(4, 13),
  y: getTranslateFromMatrix(5, 14)
};
var convertChangedValueTypes = function (target, visualElement, changedKeys) {
  var originBbox = visualElement.measureViewportBox();
  var element = visualElement.getInstance();
  var elementComputedStyle = getComputedStyle(element);
  var display = elementComputedStyle.display;
  var origin = {};
  // If the element is currently set to display: "none", make it visible before
  // measuring the target bounding box
  if (display === "none") {
    visualElement.setStaticValue("display", target.display || "block");
  }
  /**
   * Record origins before we render and update styles
   */
  changedKeys.forEach(function (key) {
    origin[key] = positionalValues[key](originBbox, elementComputedStyle);
  });
  // Apply the latest values (as set in checkAndConvertChangedValueTypes)
  visualElement.syncRender();
  var targetBbox = visualElement.measureViewportBox();
  changedKeys.forEach(function (key) {
    // Restore styles to their **calculated computed style**, not their actual
    // originally set style. This allows us to animate between equivalent pixel units.
    var value = visualElement.getValue(key);
    setAndResetVelocity(value, origin[key]);
    target[key] = positionalValues[key](targetBbox, elementComputedStyle);
  });
  return target;
};
var checkAndConvertChangedValueTypes = function (visualElement, target, origin, transitionEnd) {
  if (origin === void 0) {
    origin = {};
  }
  if (transitionEnd === void 0) {
    transitionEnd = {};
  }
  target = tslib.__assign({}, target);
  transitionEnd = tslib.__assign({}, transitionEnd);
  var targetPositionalKeys = Object.keys(target).filter(isPositionalKey);
  // We want to remove any transform values that could affect the element's bounding box before
  // it's measured. We'll reapply these later.
  var removedTransformValues = [];
  var hasAttemptedToRemoveTransformValues = false;
  var changedValueTypeKeys = [];
  targetPositionalKeys.forEach(function (key) {
    var value = visualElement.getValue(key);
    if (!visualElement.hasValue(key)) return;
    var from = origin[key];
    var fromType = findDimensionValueType(from);
    var to = target[key];
    var toType;
    // TODO: The current implementation of this basically throws an error
    // if you try and do value conversion via keyframes. There's probably
    // a way of doing this but the performance implications would need greater scrutiny,
    // as it'd be doing multiple resize-remeasure operations.
    if (isKeyframesTarget(to)) {
      var numKeyframes = to.length;
      var fromIndex = to[0] === null ? 1 : 0;
      from = to[fromIndex];
      fromType = findDimensionValueType(from);
      for (var i = fromIndex; i < numKeyframes; i++) {
        if (!toType) {
          toType = findDimensionValueType(to[i]);
          heyListen.invariant(toType === fromType || isNumOrPxType(fromType) && isNumOrPxType(toType), "Keyframes must be of the same dimension as the current value");
        } else {
          heyListen.invariant(findDimensionValueType(to[i]) === toType, "All keyframes must be of the same type");
        }
      }
    } else {
      toType = findDimensionValueType(to);
    }
    if (fromType !== toType) {
      // If they're both just number or px, convert them both to numbers rather than
      // relying on resize/remeasure to convert (which is wasteful in this situation)
      if (isNumOrPxType(fromType) && isNumOrPxType(toType)) {
        var current = value.get();
        if (typeof current === "string") {
          value.set(parseFloat(current));
        }
        if (typeof to === "string") {
          target[key] = parseFloat(to);
        } else if (Array.isArray(to) && toType === styleValueTypes.px) {
          target[key] = to.map(parseFloat);
        }
      } else if ((fromType === null || fromType === void 0 ? void 0 : fromType.transform) && (toType === null || toType === void 0 ? void 0 : toType.transform) && (from === 0 || to === 0)) {
        // If one or the other value is 0, it's safe to coerce it to the
        // type of the other without measurement
        if (from === 0) {
          value.set(toType.transform(from));
        } else {
          target[key] = fromType.transform(to);
        }
      } else {
        // If we're going to do value conversion via DOM measurements, we first
        // need to remove non-positional transform values that could affect the bbox measurements.
        if (!hasAttemptedToRemoveTransformValues) {
          removedTransformValues = removeNonTranslationalTransform(visualElement);
          hasAttemptedToRemoveTransformValues = true;
        }
        changedValueTypeKeys.push(key);
        transitionEnd[key] = transitionEnd[key] !== undefined ? transitionEnd[key] : target[key];
        setAndResetVelocity(value, to);
      }
    }
  });
  if (changedValueTypeKeys.length) {
    var scrollY_1 = changedValueTypeKeys.indexOf("height") >= 0 ? window.pageYOffset : null;
    var convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys);
    // If we removed transform values, reapply them before the next render
    if (removedTransformValues.length) {
      removedTransformValues.forEach(function (_a) {
        var _b = tslib.__read(_a, 2),
          key = _b[0],
          value = _b[1];
        visualElement.getValue(key).set(value);
      });
    }
    // Reapply original values
    visualElement.syncRender();
    // Restore scroll position
    if (scrollY_1 !== null) window.scrollTo({
      top: scrollY_1
    });
    return {
      target: convertedTarget,
      transitionEnd: transitionEnd
    };
  } else {
    return {
      target: target,
      transitionEnd: transitionEnd
    };
  }
};
/**
 * Convert value types for x/y/width/height/top/left/bottom/right
 *
 * Allows animation between `'auto'` -> `'100%'` or `0` -> `'calc(50% - 10vw)'`
 *
 * @internal
 */
function unitConversion(visualElement, target, origin, transitionEnd) {
  return hasPositionalKey(target) ? checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd) : {
    target: target,
    transitionEnd: transitionEnd
  };
}

/**
 * Parse a DOM variant to make it animatable. This involves resolving CSS variables
 * and ensuring animations like "20%" => "calc(50vw)" are performed in pixels.
 */
var parseDomVariant = function (visualElement, target, origin, transitionEnd) {
  var resolved = resolveCSSVariables(visualElement, target, transitionEnd);
  target = resolved.target;
  transitionEnd = resolved.transitionEnd;
  return unitConversion(visualElement, target, origin, transitionEnd);
};
function getComputedStyle$1(element) {
  return window.getComputedStyle(element);
}
var htmlConfig = {
  treeType: "dom",
  readValueFromInstance: function (domElement, key) {
    if (isTransformProp(key)) {
      var defaultType = getDefaultValueType(key);
      return defaultType ? defaultType.default || 0 : 0;
    } else {
      var computedStyle = getComputedStyle$1(domElement);
      return (isCSSVariable$1(key) ? computedStyle.getPropertyValue(key) : computedStyle[key]) || 0;
    }
  },
  sortNodePosition: function (a, b) {
    /**
     * compareDocumentPosition returns a bitmask, by using the bitwise &
     * we're returning true if 2 in that bitmask is set to true. 2 is set
     * to true if b preceeds a.
     */
    return a.compareDocumentPosition(b) & 2 ? 1 : -1;
  },
  getBaseTarget: function (props, key) {
    var _a;
    return (_a = props.style) === null || _a === void 0 ? void 0 : _a[key];
  },
  measureViewportBox: function (element, _a) {
    var transformPagePoint = _a.transformPagePoint;
    return measureViewportBox(element, transformPagePoint);
  },
  /**
   * Reset the transform on the current Element. This is called as part
   * of a batched process across the entire layout tree. To remove this write
   * cycle it'd be interesting to see if it's possible to "undo" all the current
   * layout transforms up the tree in the same way this.getBoundingBoxWithoutTransforms
   * works
   */
  resetTransform: function (element, domElement, props) {
    var transformTemplate = props.transformTemplate;
    domElement.style.transform = transformTemplate ? transformTemplate({}, "") : "none";
    // Ensure that whatever happens next, we restore our transform on the next frame
    element.scheduleRender();
  },
  restoreTransform: function (instance, mutableState) {
    instance.style.transform = mutableState.style.transform;
  },
  removeValueFromRenderState: function (key, _a) {
    var vars = _a.vars,
      style = _a.style;
    delete vars[key];
    delete style[key];
  },
  /**
   * Ensure that HTML and Framer-specific value types like `px`->`%` and `Color`
   * can be animated by Motion.
   */
  makeTargetAnimatable: function (element, _a, _b, isMounted) {
    var transformValues = _b.transformValues;
    if (isMounted === void 0) {
      isMounted = true;
    }
    var transition = _a.transition,
      transitionEnd = _a.transitionEnd,
      target = tslib.__rest(_a, ["transition", "transitionEnd"]);
    var origin = getOrigin(target, transition || {}, element);
    /**
     * If Framer has provided a function to convert `Color` etc value types, convert them
     */
    if (transformValues) {
      if (transitionEnd) transitionEnd = transformValues(transitionEnd);
      if (target) target = transformValues(target);
      if (origin) origin = transformValues(origin);
    }
    if (isMounted) {
      checkTargetForNewValues(element, target, origin);
      var parsed = parseDomVariant(element, target, origin, transitionEnd);
      transitionEnd = parsed.transitionEnd;
      target = parsed.target;
    }
    return tslib.__assign({
      transition: transition,
      transitionEnd: transitionEnd
    }, target);
  },
  scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
  build: function (element, renderState, latestValues, options, props) {
    if (element.isVisible !== undefined) {
      renderState.style.visibility = element.isVisible ? "visible" : "hidden";
    }
    buildHTMLStyles(renderState, latestValues, options, props.transformTemplate);
  },
  render: renderHTML
};
var htmlVisualElement = visualElement(htmlConfig);
var svgVisualElement = visualElement(tslib.__assign(tslib.__assign({}, htmlConfig), {
  getBaseTarget: function (props, key) {
    return props[key];
  },
  readValueFromInstance: function (domElement, key) {
    var _a;
    if (isTransformProp(key)) {
      return ((_a = getDefaultValueType(key)) === null || _a === void 0 ? void 0 : _a.default) || 0;
    }
    key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;
    return domElement.getAttribute(key);
  },
  scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,
  build: function (_element, renderState, latestValues, options, props) {
    buildSVGAttrs(renderState, latestValues, options, props.transformTemplate);
  },
  render: renderSVG
}));
var createDomVisualElement = function (Component, options) {
  return isSVGComponent(Component) ? svgVisualElement(options, {
    enableHardwareAcceleration: false
  }) : htmlVisualElement(options, {
    enableHardwareAcceleration: true
  });
};
function pixelsToPercent(pixels, axis) {
  if (axis.max === axis.min) return 0;
  return pixels / (axis.max - axis.min) * 100;
}
/**
 * We always correct borderRadius as a percentage rather than pixels to reduce paints.
 * For example, if you are projecting a box that is 100px wide with a 10px borderRadius
 * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%
 * borderRadius in both states. If we animate between the two in pixels that will trigger
 * a paint each time. If we animate between the two in percentage we'll avoid a paint.
 */
var correctBorderRadius = {
  correct: function (latest, node) {
    if (!node.target) return latest;
    /**
     * If latest is a string, if it's a percentage we can return immediately as it's
     * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.
     */
    if (typeof latest === "string") {
      if (styleValueTypes.px.test(latest)) {
        latest = parseFloat(latest);
      } else {
        return latest;
      }
    }
    /**
     * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that
     * pixel value as a percentage of each axis
     */
    var x = pixelsToPercent(latest, node.target.x);
    var y = pixelsToPercent(latest, node.target.y);
    return "".concat(x, "% ").concat(y, "%");
  }
};
var varToken = "_$css";
var correctBoxShadow = {
  correct: function (latest, _a) {
    var treeScale = _a.treeScale,
      projectionDelta = _a.projectionDelta;
    var original = latest;
    /**
     * We need to first strip and store CSS variables from the string.
     */
    var containsCSSVariables = latest.includes("var(");
    var cssVariables = [];
    if (containsCSSVariables) {
      latest = latest.replace(cssVariableRegex, function (match) {
        cssVariables.push(match);
        return varToken;
      });
    }
    var shadow = styleValueTypes.complex.parse(latest);
    // TODO: Doesn't support multiple shadows
    if (shadow.length > 5) return original;
    var template = styleValueTypes.complex.createTransformer(latest);
    var offset = typeof shadow[0] !== "number" ? 1 : 0;
    // Calculate the overall context scale
    var xScale = projectionDelta.x.scale * treeScale.x;
    var yScale = projectionDelta.y.scale * treeScale.y;
    shadow[0 + offset] /= xScale;
    shadow[1 + offset] /= yScale;
    /**
     * Ideally we'd correct x and y scales individually, but because blur and
     * spread apply to both we have to take a scale average and apply that instead.
     * We could potentially improve the outcome of this by incorporating the ratio between
     * the two scales.
     */
    var averageScale = popmotion.mix(xScale, yScale, 0.5);
    // Blur
    if (typeof shadow[2 + offset] === "number") shadow[2 + offset] /= averageScale;
    // Spread
    if (typeof shadow[3 + offset] === "number") shadow[3 + offset] /= averageScale;
    var output = template(shadow);
    if (containsCSSVariables) {
      var i_1 = 0;
      output = output.replace(varToken, function () {
        var cssVariable = cssVariables[i_1];
        i_1++;
        return cssVariable;
      });
    }
    return output;
  }
};
var MeasureLayoutWithContext = /** @class */function (_super) {
  tslib.__extends(MeasureLayoutWithContext, _super);
  function MeasureLayoutWithContext() {
    return _super !== null && _super.apply(this, arguments) || this;
  }
  /**
   * This only mounts projection nodes for components that
   * need measuring, we might want to do it for all components
   * in order to incorporate transforms
   */
  MeasureLayoutWithContext.prototype.componentDidMount = function () {
    var _this = this;
    var _a = this.props,
      visualElement = _a.visualElement,
      layoutGroup = _a.layoutGroup,
      switchLayoutGroup = _a.switchLayoutGroup,
      layoutId = _a.layoutId;
    var projection = visualElement.projection;
    addScaleCorrector(defaultScaleCorrectors);
    if (projection) {
      if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group) layoutGroup.group.add(projection);
      if ((switchLayoutGroup === null || switchLayoutGroup === void 0 ? void 0 : switchLayoutGroup.register) && layoutId) {
        switchLayoutGroup.register(projection);
      }
      projection.root.didUpdate();
      projection.addEventListener("animationComplete", function () {
        _this.safeToRemove();
      });
      projection.setOptions(tslib.__assign(tslib.__assign({}, projection.options), {
        onExitComplete: function () {
          return _this.safeToRemove();
        }
      }));
    }
    globalProjectionState.hasEverUpdated = true;
  };
  MeasureLayoutWithContext.prototype.getSnapshotBeforeUpdate = function (prevProps) {
    var _this = this;
    var _a = this.props,
      layoutDependency = _a.layoutDependency,
      visualElement = _a.visualElement,
      drag = _a.drag,
      isPresent = _a.isPresent;
    var projection = visualElement.projection;
    if (!projection) return null;
    /**
     * TODO: We use this data in relegate to determine whether to
     * promote a previous element. There's no guarantee its presence data
     * will have updated by this point - if a bug like this arises it will
     * have to be that we markForRelegation and then find a new lead some other way,
     * perhaps in didUpdate
     */
    projection.isPresent = isPresent;
    if (drag || prevProps.layoutDependency !== layoutDependency || layoutDependency === undefined) {
      projection.willUpdate();
    } else {
      this.safeToRemove();
    }
    if (prevProps.isPresent !== isPresent) {
      if (isPresent) {
        projection.promote();
      } else if (!projection.relegate()) {
        /**
         * If there's another stack member taking over from this one,
         * it's in charge of the exit animation and therefore should
         * be in charge of the safe to remove. Otherwise we call it here.
         */
        sync__default["default"].postRender(function () {
          var _a;
          if (!((_a = projection.getStack()) === null || _a === void 0 ? void 0 : _a.members.length)) {
            _this.safeToRemove();
          }
        });
      }
    }
    return null;
  };
  MeasureLayoutWithContext.prototype.componentDidUpdate = function () {
    var projection = this.props.visualElement.projection;
    if (projection) {
      projection.root.didUpdate();
      if (!projection.currentAnimation && projection.isLead()) {
        this.safeToRemove();
      }
    }
  };
  MeasureLayoutWithContext.prototype.componentWillUnmount = function () {
    var _a = this.props,
      visualElement = _a.visualElement,
      layoutGroup = _a.layoutGroup,
      promoteContext = _a.switchLayoutGroup;
    var projection = visualElement.projection;
    if (projection) {
      projection.scheduleCheckAfterUnmount();
      if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group) layoutGroup.group.remove(projection);
      if (promoteContext === null || promoteContext === void 0 ? void 0 : promoteContext.deregister) promoteContext.deregister(projection);
    }
  };
  MeasureLayoutWithContext.prototype.safeToRemove = function () {
    var safeToRemove = this.props.safeToRemove;
    safeToRemove === null || safeToRemove === void 0 ? void 0 : safeToRemove();
  };
  MeasureLayoutWithContext.prototype.render = function () {
    return null;
  };
  return MeasureLayoutWithContext;
}(React__default["default"].Component);
function MeasureLayout(props) {
  var _a = tslib.__read(usePresence(), 2),
    isPresent = _a[0],
    safeToRemove = _a[1];
  var layoutGroup = React.useContext(LayoutGroupContext);
  return React__default["default"].createElement(MeasureLayoutWithContext, tslib.__assign({}, props, {
    layoutGroup: layoutGroup,
    switchLayoutGroup: React.useContext(SwitchLayoutGroupContext),
    isPresent: isPresent,
    safeToRemove: safeToRemove
  }));
}
var defaultScaleCorrectors = {
  borderRadius: tslib.__assign(tslib.__assign({}, correctBorderRadius), {
    applyTo: ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomLeftRadius", "borderBottomRightRadius"]
  }),
  borderTopLeftRadius: correctBorderRadius,
  borderTopRightRadius: correctBorderRadius,
  borderBottomLeftRadius: correctBorderRadius,
  borderBottomRightRadius: correctBorderRadius,
  boxShadow: correctBoxShadow
};
var layoutFeatures = {
  measureLayout: MeasureLayout
};

/**
 * Animate a single value or a `MotionValue`.
 *
 * The first argument is either a `MotionValue` to animate, or an initial animation value.
 *
 * The second is either a value to animate to, or an array of keyframes to animate through.
 *
 * The third argument can be either tween or spring options, and optional lifecycle methods: `onUpdate`, `onPlay`, `onComplete`, `onRepeat` and `onStop`.
 *
 * Returns `AnimationPlaybackControls`, currently just a `stop` method.
 *
 * ```javascript
 * const x = useMotionValue(0)
 *
 * useEffect(() => {
 *   const controls = animate(x, 100, {
 *     type: "spring",
 *     stiffness: 2000,
 *     onComplete: v => {}
 *   })
 *
 *   return controls.stop
 * })
 * ```
 *
 * @public
 */
function animate(from, to, transition) {
  if (transition === void 0) {
    transition = {};
  }
  var value = isMotionValue(from) ? from : motionValue(from);
  startAnimation("", value, to, transition);
  return {
    stop: function () {
      return value.stop();
    },
    isAnimating: function () {
      return value.isAnimating();
    }
  };
}
var borders = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"];
var numBorders = borders.length;
var asNumber = function (value) {
  return typeof value === "string" ? parseFloat(value) : value;
};
var isPx = function (value) {
  return typeof value === "number" || styleValueTypes.px.test(value);
};
function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {
  var _a, _b, _c, _d;
  if (shouldCrossfadeOpacity) {
    target.opacity = popmotion.mix(0,
    // (follow?.opacity as number) ?? 0,
    // TODO Reinstate this if only child
    (_a = lead.opacity) !== null && _a !== void 0 ? _a : 1, easeCrossfadeIn(progress));
    target.opacityExit = popmotion.mix((_b = follow.opacity) !== null && _b !== void 0 ? _b : 1, 0, easeCrossfadeOut(progress));
  } else if (isOnlyMember) {
    target.opacity = popmotion.mix((_c = follow.opacity) !== null && _c !== void 0 ? _c : 1, (_d = lead.opacity) !== null && _d !== void 0 ? _d : 1, progress);
  }
  /**
   * Mix border radius
   */
  for (var i = 0; i < numBorders; i++) {
    var borderLabel = "border".concat(borders[i], "Radius");
    var followRadius = getRadius(follow, borderLabel);
    var leadRadius = getRadius(lead, borderLabel);
    if (followRadius === undefined && leadRadius === undefined) continue;
    followRadius || (followRadius = 0);
    leadRadius || (leadRadius = 0);
    var canMix = followRadius === 0 || leadRadius === 0 || isPx(followRadius) === isPx(leadRadius);
    if (canMix) {
      target[borderLabel] = Math.max(popmotion.mix(asNumber(followRadius), asNumber(leadRadius), progress), 0);
      if (styleValueTypes.percent.test(leadRadius) || styleValueTypes.percent.test(followRadius)) {
        target[borderLabel] += "%";
      }
    } else {
      target[borderLabel] = leadRadius;
    }
  }
  /**
   * Mix rotation
   */
  if (follow.rotate || lead.rotate) {
    target.rotate = popmotion.mix(follow.rotate || 0, lead.rotate || 0, progress);
  }
}
function getRadius(values, radiusName) {
  var _a;
  return (_a = values[radiusName]) !== null && _a !== void 0 ? _a : values.borderRadius;
}
// /**
//  * We only want to mix the background color if there's a follow element
//  * that we're not crossfading opacity between. For instance with switch
//  * AnimateSharedLayout animations, this helps the illusion of a continuous
//  * element being animated but also cuts down on the number of paints triggered
//  * for elements where opacity is doing that work for us.
//  */
// if (
//     !hasFollowElement &&
//     latestLeadValues.backgroundColor &&
//     latestFollowValues.backgroundColor
// ) {
//     /**
//      * This isn't ideal performance-wise as mixColor is creating a new function every frame.
//      * We could probably create a mixer that runs at the start of the animation but
//      * the idea behind the crossfader is that it runs dynamically between two potentially
//      * changing targets (ie opacity or borderRadius may be animating independently via variants)
//      */
//     leadState.backgroundColor = followState.backgroundColor = mixColor(
//         latestFollowValues.backgroundColor as string,
//         latestLeadValues.backgroundColor as string
//     )(p)
// }
var easeCrossfadeIn = compress(0, 0.5, popmotion.circOut);
var easeCrossfadeOut = compress(0.5, 0.95, popmotion.linear);
function compress(min, max, easing) {
  return function (p) {
    // Could replace ifs with clamp
    if (p < min) return 0;
    if (p > max) return 1;
    return easing(popmotion.progress(min, max, p));
  };
}

/**
 * Reset an axis to the provided origin box.
 *
 * This is a mutative operation.
 */
function copyAxisInto(axis, originAxis) {
  axis.min = originAxis.min;
  axis.max = originAxis.max;
}
/**
 * Reset a box to the provided origin box.
 *
 * This is a mutative operation.
 */
function copyBoxInto(box, originBox) {
  copyAxisInto(box.x, originBox.x);
  copyAxisInto(box.y, originBox.y);
}

/**
 * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse
 */
function removePointDelta(point, translate, scale, originPoint, boxScale) {
  point -= translate;
  point = scalePoint(point, 1 / scale, originPoint);
  if (boxScale !== undefined) {
    point = scalePoint(point, 1 / boxScale, originPoint);
  }
  return point;
}
/**
 * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse
 */
function removeAxisDelta(axis, translate, scale, origin, boxScale, originAxis, sourceAxis) {
  if (translate === void 0) {
    translate = 0;
  }
  if (scale === void 0) {
    scale = 1;
  }
  if (origin === void 0) {
    origin = 0.5;
  }
  if (originAxis === void 0) {
    originAxis = axis;
  }
  if (sourceAxis === void 0) {
    sourceAxis = axis;
  }
  if (styleValueTypes.percent.test(translate)) {
    translate = parseFloat(translate);
    var relativeProgress = popmotion.mix(sourceAxis.min, sourceAxis.max, translate / 100);
    translate = relativeProgress - sourceAxis.min;
  }
  if (typeof translate !== "number") return;
  var originPoint = popmotion.mix(originAxis.min, originAxis.max, origin);
  if (axis === originAxis) originPoint -= translate;
  axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);
  axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);
}
/**
 * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse
 * and acts as a bridge between motion values and removeAxisDelta
 */
function removeAxisTransforms(axis, transforms, _a, origin, sourceAxis) {
  var _b = tslib.__read(_a, 3),
    key = _b[0],
    scaleKey = _b[1],
    originKey = _b[2];
  removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);
}
/**
 * The names of the motion values we want to apply as translation, scale and origin.
 */
var xKeys = ["x", "scaleX", "originX"];
var yKeys = ["y", "scaleY", "originY"];
/**
 * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse
 * and acts as a bridge between motion values and removeAxisDelta
 */
function removeBoxTransforms(box, transforms, originBox, sourceBox) {
  removeAxisTransforms(box.x, transforms, xKeys, originBox === null || originBox === void 0 ? void 0 : originBox.x, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.x);
  removeAxisTransforms(box.y, transforms, yKeys, originBox === null || originBox === void 0 ? void 0 : originBox.y, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.y);
}
function isAxisDeltaZero(delta) {
  return delta.translate === 0 && delta.scale === 1;
}
function isDeltaZero(delta) {
  return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);
}
function boxEquals(a, b) {
  return a.x.min === b.x.min && a.x.max === b.x.max && a.y.min === b.y.min && a.y.max === b.y.max;
}
var NodeStack = /** @class */function () {
  function NodeStack() {
    this.members = [];
  }
  NodeStack.prototype.add = function (node) {
    addUniqueItem(this.members, node);
    node.scheduleRender();
  };
  NodeStack.prototype.remove = function (node) {
    removeItem(this.members, node);
    if (node === this.prevLead) {
      this.prevLead = undefined;
    }
    if (node === this.lead) {
      var prevLead = this.members[this.members.length - 1];
      if (prevLead) {
        this.promote(prevLead);
      }
    }
  };
  NodeStack.prototype.relegate = function (node) {
    var indexOfNode = this.members.findIndex(function (member) {
      return node === member;
    });
    if (indexOfNode === 0) return false;
    /**
     * Find the next projection node that is present
     */
    var prevLead;
    for (var i = indexOfNode; i >= 0; i--) {
      var member = this.members[i];
      if (member.isPresent !== false) {
        prevLead = member;
        break;
      }
    }
    if (prevLead) {
      this.promote(prevLead);
      return true;
    } else {
      return false;
    }
  };
  NodeStack.prototype.promote = function (node, preserveFollowOpacity) {
    var _a;
    var prevLead = this.lead;
    if (node === prevLead) return;
    this.prevLead = prevLead;
    this.lead = node;
    node.show();
    if (prevLead) {
      prevLead.instance && prevLead.scheduleRender();
      node.scheduleRender();
      node.resumeFrom = prevLead;
      if (preserveFollowOpacity) {
        node.resumeFrom.preserveOpacity = true;
      }
      if (prevLead.snapshot) {
        node.snapshot = prevLead.snapshot;
        node.snapshot.latestValues = prevLead.animationValues || prevLead.latestValues;
        node.snapshot.isShared = true;
      }
      if ((_a = node.root) === null || _a === void 0 ? void 0 : _a.isUpdating) {
        node.isLayoutDirty = true;
      }
      var crossfade = node.options.crossfade;
      if (crossfade === false) {
        prevLead.hide();
      }
      /**
       * TODO:
       *   - Test border radius when previous node was deleted
       *   - boxShadow mixing
       *   - Shared between element A in scrolled container and element B (scroll stays the same or changes)
       *   - Shared between element A in transformed container and element B (transform stays the same or changes)
       *   - Shared between element A in scrolled page and element B (scroll stays the same or changes)
       * ---
       *   - Crossfade opacity of root nodes
       *   - layoutId changes after animation
       *   - layoutId changes mid animation
       */
    }
  };

  NodeStack.prototype.exitAnimationComplete = function () {
    this.members.forEach(function (node) {
      var _a, _b, _c, _d, _e;
      (_b = (_a = node.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a);
      (_e = (_c = node.resumingFrom) === null || _c === void 0 ? void 0 : (_d = _c.options).onExitComplete) === null || _e === void 0 ? void 0 : _e.call(_d);
    });
  };
  NodeStack.prototype.scheduleRender = function () {
    this.members.forEach(function (node) {
      node.instance && node.scheduleRender(false);
    });
  };
  /**
   * Clear any leads that have been removed this render to prevent them from being
   * used in future animations and to prevent memory leaks
   */
  NodeStack.prototype.removeLeadSnapshot = function () {
    if (this.lead && this.lead.snapshot) {
      this.lead.snapshot = undefined;
    }
  };
  return NodeStack;
}();
var identityProjection = "translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";
function buildProjectionTransform(delta, treeScale, latestTransform) {
  /**
   * The translations we use to calculate are always relative to the viewport coordinate space.
   * But when we apply scales, we also scale the coordinate space of an element and its children.
   * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need
   * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.
   */
  var xTranslate = delta.x.translate / treeScale.x;
  var yTranslate = delta.y.translate / treeScale.y;
  var transform = "translate3d(".concat(xTranslate, "px, ").concat(yTranslate, "px, 0) ");
  /**
   * Apply scale correction for the tree transform.
   * This will apply scale to the screen-orientated axes.
   */
  transform += "scale(".concat(1 / treeScale.x, ", ").concat(1 / treeScale.y, ") ");
  if (latestTransform) {
    var rotate = latestTransform.rotate,
      rotateX = latestTransform.rotateX,
      rotateY = latestTransform.rotateY;
    if (rotate) transform += "rotate(".concat(rotate, "deg) ");
    if (rotateX) transform += "rotateX(".concat(rotateX, "deg) ");
    if (rotateY) transform += "rotateY(".concat(rotateY, "deg) ");
  }
  /**
   * Apply scale to match the size of the element to the size we want it.
   * This will apply scale to the element-orientated axes.
   */
  var elementScaleX = delta.x.scale * treeScale.x;
  var elementScaleY = delta.y.scale * treeScale.y;
  transform += "scale(".concat(elementScaleX, ", ").concat(elementScaleY, ")");
  return transform === identityProjection ? "none" : transform;
}
var compareByDepth = function (a, b) {
  return a.depth - b.depth;
};
var FlatTree = /** @class */function () {
  function FlatTree() {
    this.children = [];
    this.isDirty = false;
  }
  FlatTree.prototype.add = function (child) {
    addUniqueItem(this.children, child);
    this.isDirty = true;
  };
  FlatTree.prototype.remove = function (child) {
    removeItem(this.children, child);
    this.isDirty = true;
  };
  FlatTree.prototype.forEach = function (callback) {
    this.isDirty && this.children.sort(compareByDepth);
    this.isDirty = false;
    this.children.forEach(callback);
  };
  return FlatTree;
}();

/**
 * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1
 * which has a noticeable difference in spring animations
 */
var animationTarget = 1000;
function createProjectionNode(_a) {
  var attachResizeListener = _a.attachResizeListener,
    defaultParent = _a.defaultParent,
    measureScroll = _a.measureScroll,
    checkIsScrollRoot = _a.checkIsScrollRoot,
    resetTransform = _a.resetTransform;
  return (/** @class */function () {
      function ProjectionNode(id, latestValues, parent) {
        var _this = this;
        if (latestValues === void 0) {
          latestValues = {};
        }
        if (parent === void 0) {
          parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent();
        }
        /**
         * A Set containing all this component's children. This is used to iterate
         * through the children.
         *
         * TODO: This could be faster to iterate as a flat array stored on the root node.
         */
        this.children = new Set();
        /**
         * Options for the node. We use this to configure what kind of layout animations
         * we should perform (if any).
         */
        this.options = {};
        /**
         * We use this to detect when its safe to shut down part of a projection tree.
         * We have to keep projecting children for scale correction and relative projection
         * until all their parents stop performing layout animations.
         */
        this.isTreeAnimating = false;
        this.isAnimationBlocked = false;
        /**
         * Flag to true if we think this layout has been changed. We can't always know this,
         * currently we set it to true every time a component renders, or if it has a layoutDependency
         * if that has changed between renders. Additionally, components can be grouped by LayoutGroup
         * and if one node is dirtied, they all are.
         */
        this.isLayoutDirty = false;
        /**
         * Block layout updates for instant layout transitions throughout the tree.
         */
        this.updateManuallyBlocked = false;
        this.updateBlockedByResize = false;
        /**
         * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`
         * call.
         */
        this.isUpdating = false;
        /**
         * If this is an SVG element we currently disable projection transforms
         */
        this.isSVG = false;
        /**
         * Flag to true (during promotion) if a node doing an instant layout transition needs to reset
         * its projection styles.
         */
        this.needsReset = false;
        /**
         * Flags whether this node should have its transform reset prior to measuring.
         */
        this.shouldResetTransform = false;
        /**
         * An object representing the calculated contextual/accumulated/tree scale.
         * This will be used to scale calculcated projection transforms, as these are
         * calculated in screen-space but need to be scaled for elements to actually
         * make it to their calculated destinations.
         *
         * TODO: Lazy-init
         */
        this.treeScale = {
          x: 1,
          y: 1
        };
        /**
         *
         */
        this.eventHandlers = new Map();
        // Note: Currently only running on root node
        this.potentialNodes = new Map();
        this.checkUpdateFailed = function () {
          if (_this.isUpdating) {
            _this.isUpdating = false;
            _this.clearAllSnapshots();
          }
        };
        this.updateProjection = function () {
          _this.nodes.forEach(resolveTargetDelta);
          _this.nodes.forEach(calcProjection);
        };
        this.hasProjected = false;
        this.isVisible = true;
        this.animationProgress = 0;
        /**
         * Shared layout
         */
        // TODO Only running on root node
        this.sharedNodes = new Map();
        this.id = id;
        this.latestValues = latestValues;
        this.root = parent ? parent.root || parent : this;
        this.path = parent ? tslib.__spreadArray(tslib.__spreadArray([], tslib.__read(parent.path), false), [parent], false) : [];
        this.parent = parent;
        this.depth = parent ? parent.depth + 1 : 0;
        id && this.root.registerPotentialNode(id, this);
        for (var i = 0; i < this.path.length; i++) {
          this.path[i].shouldResetTransform = true;
        }
        if (this.root === this) this.nodes = new FlatTree();
      }
      ProjectionNode.prototype.addEventListener = function (name, handler) {
        if (!this.eventHandlers.has(name)) {
          this.eventHandlers.set(name, new SubscriptionManager());
        }
        return this.eventHandlers.get(name).add(handler);
      };
      ProjectionNode.prototype.notifyListeners = function (name) {
        var args = [];
        for (var _i = 1; _i < arguments.length; _i++) {
          args[_i - 1] = arguments[_i];
        }
        var subscriptionManager = this.eventHandlers.get(name);
        subscriptionManager === null || subscriptionManager === void 0 ? void 0 : subscriptionManager.notify.apply(subscriptionManager, tslib.__spreadArray([], tslib.__read(args), false));
      };
      ProjectionNode.prototype.hasListeners = function (name) {
        return this.eventHandlers.has(name);
      };
      ProjectionNode.prototype.registerPotentialNode = function (id, node) {
        this.potentialNodes.set(id, node);
      };
      /**
       * Lifecycles
       */
      ProjectionNode.prototype.mount = function (instance, isLayoutDirty) {
        var _this = this;
        var _a;
        if (isLayoutDirty === void 0) {
          isLayoutDirty = false;
        }
        if (this.instance) return;
        this.isSVG = instance instanceof SVGElement && instance.tagName !== "svg";
        this.instance = instance;
        var _b = this.options,
          layoutId = _b.layoutId,
          layout = _b.layout,
          visualElement = _b.visualElement;
        if (visualElement && !visualElement.getInstance()) {
          visualElement.mount(instance);
        }
        this.root.nodes.add(this);
        (_a = this.parent) === null || _a === void 0 ? void 0 : _a.children.add(this);
        this.id && this.root.potentialNodes.delete(this.id);
        if (isLayoutDirty && (layout || layoutId)) {
          this.isLayoutDirty = true;
        }
        if (attachResizeListener) {
          var unblockTimeout_1;
          var resizeUnblockUpdate_1 = function () {
            return _this.root.updateBlockedByResize = false;
          };
          attachResizeListener(instance, function () {
            _this.root.updateBlockedByResize = true;
            clearTimeout(unblockTimeout_1);
            unblockTimeout_1 = window.setTimeout(resizeUnblockUpdate_1, 250);
            if (globalProjectionState.hasAnimatedSinceResize) {
              globalProjectionState.hasAnimatedSinceResize = false;
              _this.nodes.forEach(finishAnimation);
            }
          });
        }
        if (layoutId) {
          this.root.registerSharedNode(layoutId, this);
        }
        // Only register the handler if it requires layout animation
        if (this.options.animate !== false && visualElement && (layoutId || layout)) {
          this.addEventListener("didUpdate", function (_a) {
            var _b, _c, _d, _e, _f;
            var delta = _a.delta,
              hasLayoutChanged = _a.hasLayoutChanged,
              hasRelativeTargetChanged = _a.hasRelativeTargetChanged,
              newLayout = _a.layout;
            if (_this.isTreeAnimationBlocked()) {
              _this.target = undefined;
              _this.relativeTarget = undefined;
              return;
            }
            // TODO: Check here if an animation exists
            var layoutTransition = (_c = (_b = _this.options.transition) !== null && _b !== void 0 ? _b : visualElement.getDefaultTransition()) !== null && _c !== void 0 ? _c : defaultLayoutTransition;
            var _g = visualElement.getProps(),
              onLayoutAnimationStart = _g.onLayoutAnimationStart,
              onLayoutAnimationComplete = _g.onLayoutAnimationComplete;
            /**
             * The target layout of the element might stay the same,
             * but its position relative to its parent has changed.
             */
            var targetChanged = !_this.targetLayout || !boxEquals(_this.targetLayout, newLayout) || hasRelativeTargetChanged;
            /**
             * If the layout hasn't seemed to have changed, it might be that the
             * element is visually in the same place in the document but its position
             * relative to its parent has indeed changed. So here we check for that.
             */
            var hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;
            if (((_d = _this.resumeFrom) === null || _d === void 0 ? void 0 : _d.instance) || hasOnlyRelativeTargetChanged || hasLayoutChanged && (targetChanged || !_this.currentAnimation)) {
              if (_this.resumeFrom) {
                _this.resumingFrom = _this.resumeFrom;
                _this.resumingFrom.resumingFrom = undefined;
              }
              _this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
              var animationOptions = tslib.__assign(tslib.__assign({}, getValueTransition(layoutTransition, "layout")), {
                onPlay: onLayoutAnimationStart,
                onComplete: onLayoutAnimationComplete
              });
              if (visualElement.shouldReduceMotion) {
                animationOptions.delay = 0;
                animationOptions.type = false;
              }
              _this.startAnimation(animationOptions);
            } else {
              /**
               * If the layout hasn't changed and we have an animation that hasn't started yet,
               * finish it immediately. Otherwise it will be animating from a location
               * that was probably never commited to screen and look like a jumpy box.
               */
              if (!hasLayoutChanged && _this.animationProgress === 0) {
                _this.finishAnimation();
              }
              _this.isLead() && ((_f = (_e = _this.options).onExitComplete) === null || _f === void 0 ? void 0 : _f.call(_e));
            }
            _this.targetLayout = newLayout;
          });
        }
      };
      ProjectionNode.prototype.unmount = function () {
        var _a, _b;
        this.options.layoutId && this.willUpdate();
        this.root.nodes.remove(this);
        (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.remove(this);
        (_b = this.parent) === null || _b === void 0 ? void 0 : _b.children.delete(this);
        this.instance = undefined;
        sync.cancelSync.preRender(this.updateProjection);
      };
      // only on the root
      ProjectionNode.prototype.blockUpdate = function () {
        this.updateManuallyBlocked = true;
      };
      ProjectionNode.prototype.unblockUpdate = function () {
        this.updateManuallyBlocked = false;
      };
      ProjectionNode.prototype.isUpdateBlocked = function () {
        return this.updateManuallyBlocked || this.updateBlockedByResize;
      };
      ProjectionNode.prototype.isTreeAnimationBlocked = function () {
        var _a;
        return this.isAnimationBlocked || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimationBlocked()) || false;
      };
      // Note: currently only running on root node
      ProjectionNode.prototype.startUpdate = function () {
        var _a;
        if (this.isUpdateBlocked()) return;
        this.isUpdating = true;
        (_a = this.nodes) === null || _a === void 0 ? void 0 : _a.forEach(resetRotation);
      };
      ProjectionNode.prototype.willUpdate = function (shouldNotifyListeners) {
        var _a, _b, _c;
        if (shouldNotifyListeners === void 0) {
          shouldNotifyListeners = true;
        }
        if (this.root.isUpdateBlocked()) {
          (_b = (_a = this.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a);
          return;
        }
        !this.root.isUpdating && this.root.startUpdate();
        if (this.isLayoutDirty) return;
        this.isLayoutDirty = true;
        for (var i = 0; i < this.path.length; i++) {
          var node = this.path[i];
          node.shouldResetTransform = true;
          /**
           * TODO: Check we haven't updated the scroll
           * since the last didUpdate
           */
          node.updateScroll();
        }
        var _d = this.options,
          layoutId = _d.layoutId,
          layout = _d.layout;
        if (layoutId === undefined && !layout) return;
        var transformTemplate = (_c = this.options.visualElement) === null || _c === void 0 ? void 0 : _c.getProps().transformTemplate;
        this.prevTransformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, "");
        this.updateSnapshot();
        shouldNotifyListeners && this.notifyListeners("willUpdate");
      };
      // Note: Currently only running on root node
      ProjectionNode.prototype.didUpdate = function () {
        var updateWasBlocked = this.isUpdateBlocked();
        // When doing an instant transition, we skip the layout update,
        // but should still clean up the measurements so that the next
        // snapshot could be taken correctly.
        if (updateWasBlocked) {
          this.unblockUpdate();
          this.clearAllSnapshots();
          this.nodes.forEach(clearMeasurements);
          return;
        }
        if (!this.isUpdating) return;
        this.isUpdating = false;
        /**
         * Search for and mount newly-added projection elements.
         *
         * TODO: Every time a new component is rendered we could search up the tree for
         * the closest mounted node and query from there rather than document.
         */
        if (this.potentialNodes.size) {
          this.potentialNodes.forEach(mountNodeEarly);
          this.potentialNodes.clear();
        }
        /**
         * Write
         */
        this.nodes.forEach(resetTransformStyle);
        /**
         * Read ==================
         */
        // Update layout measurements of updated children
        this.nodes.forEach(updateLayout);
        /**
         * Write
         */
        // Notify listeners that the layout is updated
        this.nodes.forEach(notifyLayoutUpdate);
        this.clearAllSnapshots();
        // Flush any scheduled updates
        sync.flushSync.update();
        sync.flushSync.preRender();
        sync.flushSync.render();
      };
      ProjectionNode.prototype.clearAllSnapshots = function () {
        this.nodes.forEach(clearSnapshot);
        this.sharedNodes.forEach(removeLeadSnapshots);
      };
      ProjectionNode.prototype.scheduleUpdateProjection = function () {
        sync__default["default"].preRender(this.updateProjection, false, true);
      };
      ProjectionNode.prototype.scheduleCheckAfterUnmount = function () {
        var _this = this;
        /**
         * If the unmounting node is in a layoutGroup and did trigger a willUpdate,
         * we manually call didUpdate to give a chance to the siblings to animate.
         * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.
         */
        sync__default["default"].postRender(function () {
          if (_this.isLayoutDirty) {
            _this.root.didUpdate();
          } else {
            _this.root.checkUpdateFailed();
          }
        });
      };
      /**
       * Update measurements
       */
      ProjectionNode.prototype.updateSnapshot = function () {
        if (this.snapshot || !this.instance) return;
        var measured = this.measure();
        var layout = this.removeTransform(this.removeElementScroll(measured));
        roundBox(layout);
        this.snapshot = {
          measured: measured,
          layout: layout,
          latestValues: {}
        };
      };
      ProjectionNode.prototype.updateLayout = function () {
        var _a;
        if (!this.instance) return;
        // TODO: Incorporate into a forwarded scroll offset
        this.updateScroll();
        if (!(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty) {
          return;
        }
        /**
         * When a node is mounted, it simply resumes from the prevLead's
         * snapshot instead of taking a new one, but the ancestors scroll
         * might have updated while the prevLead is unmounted. We need to
         * update the scroll again to make sure the layout we measure is
         * up to date.
         */
        if (this.resumeFrom && !this.resumeFrom.instance) {
          for (var i = 0; i < this.path.length; i++) {
            var node = this.path[i];
            node.updateScroll();
          }
        }
        var measured = this.measure();
        roundBox(measured);
        var prevLayout = this.layout;
        this.layout = {
          measured: measured,
          actual: this.removeElementScroll(measured)
        };
        this.layoutCorrected = createBox();
        this.isLayoutDirty = false;
        this.projectionDelta = undefined;
        this.notifyListeners("measure", this.layout.actual);
        (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.notifyLayoutMeasure(this.layout.actual, prevLayout === null || prevLayout === void 0 ? void 0 : prevLayout.actual);
      };
      ProjectionNode.prototype.updateScroll = function () {
        if (this.options.layoutScroll && this.instance) {
          this.isScrollRoot = checkIsScrollRoot(this.instance);
          this.scroll = measureScroll(this.instance);
        }
      };
      ProjectionNode.prototype.resetTransform = function () {
        var _a;
        if (!resetTransform) return;
        var isResetRequested = this.isLayoutDirty || this.shouldResetTransform;
        var hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);
        var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate;
        var transformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, "");
        var transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;
        if (isResetRequested && (hasProjection || hasTransform(this.latestValues) || transformTemplateHasChanged)) {
          resetTransform(this.instance, transformTemplateValue);
          this.shouldResetTransform = false;
          this.scheduleRender();
        }
      };
      ProjectionNode.prototype.measure = function () {
        var visualElement = this.options.visualElement;
        if (!visualElement) return createBox();
        var box = visualElement.measureViewportBox();
        // Remove viewport scroll to give page-relative coordinates
        var scroll = this.root.scroll;
        if (scroll) {
          translateAxis(box.x, scroll.x);
          translateAxis(box.y, scroll.y);
        }
        return box;
      };
      ProjectionNode.prototype.removeElementScroll = function (box) {
        var boxWithoutScroll = createBox();
        copyBoxInto(boxWithoutScroll, box);
        /**
         * Performance TODO: Keep a cumulative scroll offset down the tree
         * rather than loop back up the path.
         */
        for (var i = 0; i < this.path.length; i++) {
          var node = this.path[i];
          var scroll_1 = node.scroll,
            options = node.options,
            isScrollRoot = node.isScrollRoot;
          if (node !== this.root && scroll_1 && options.layoutScroll) {
            /**
             * If this is a new scroll root, we want to remove all previous scrolls
             * from the viewport box.
             */
            if (isScrollRoot) {
              copyBoxInto(boxWithoutScroll, box);
              var rootScroll = this.root.scroll;
              /**
               * Undo the application of page scroll that was originally added
               * to the measured bounding box.
               */
              if (rootScroll) {
                translateAxis(boxWithoutScroll.x, -rootScroll.x);
                translateAxis(boxWithoutScroll.y, -rootScroll.y);
              }
            }
            translateAxis(boxWithoutScroll.x, scroll_1.x);
            translateAxis(boxWithoutScroll.y, scroll_1.y);
          }
        }
        return boxWithoutScroll;
      };
      ProjectionNode.prototype.applyTransform = function (box, transformOnly) {
        if (transformOnly === void 0) {
          transformOnly = false;
        }
        var withTransforms = createBox();
        copyBoxInto(withTransforms, box);
        for (var i = 0; i < this.path.length; i++) {
          var node = this.path[i];
          if (!transformOnly && node.options.layoutScroll && node.scroll && node !== node.root) {
            transformBox(withTransforms, {
              x: -node.scroll.x,
              y: -node.scroll.y
            });
          }
          if (!hasTransform(node.latestValues)) continue;
          transformBox(withTransforms, node.latestValues);
        }
        if (hasTransform(this.latestValues)) {
          transformBox(withTransforms, this.latestValues);
        }
        return withTransforms;
      };
      ProjectionNode.prototype.removeTransform = function (box) {
        var _a;
        var boxWithoutTransform = createBox();
        copyBoxInto(boxWithoutTransform, box);
        for (var i = 0; i < this.path.length; i++) {
          var node = this.path[i];
          if (!node.instance) continue;
          if (!hasTransform(node.latestValues)) continue;
          hasScale(node.latestValues) && node.updateSnapshot();
          var sourceBox = createBox();
          var nodeBox = node.measure();
          copyBoxInto(sourceBox, nodeBox);
          removeBoxTransforms(boxWithoutTransform, node.latestValues, (_a = node.snapshot) === null || _a === void 0 ? void 0 : _a.layout, sourceBox);
        }
        if (hasTransform(this.latestValues)) {
          removeBoxTransforms(boxWithoutTransform, this.latestValues);
        }
        return boxWithoutTransform;
      };
      /**
       *
       */
      ProjectionNode.prototype.setTargetDelta = function (delta) {
        this.targetDelta = delta;
        this.root.scheduleUpdateProjection();
      };
      ProjectionNode.prototype.setOptions = function (options) {
        var _a;
        this.options = tslib.__assign(tslib.__assign(tslib.__assign({}, this.options), options), {
          crossfade: (_a = options.crossfade) !== null && _a !== void 0 ? _a : true
        });
      };
      ProjectionNode.prototype.clearMeasurements = function () {
        this.scroll = undefined;
        this.layout = undefined;
        this.snapshot = undefined;
        this.prevTransformTemplateValue = undefined;
        this.targetDelta = undefined;
        this.target = undefined;
        this.isLayoutDirty = false;
      };
      /**
       * Frame calculations
       */
      ProjectionNode.prototype.resolveTargetDelta = function () {
        var _a;
        var _b = this.options,
          layout = _b.layout,
          layoutId = _b.layoutId;
        /**
         * If we have no layout, we can't perform projection, so early return
         */
        if (!this.layout || !(layout || layoutId)) return;
        /**
         * If we don't have a targetDelta but do have a layout, we can attempt to resolve
         * a relativeParent. This will allow a component to perform scale correction
         * even if no animation has started.
         */
        // TODO If this is unsuccessful this currently happens every frame
        if (!this.targetDelta && !this.relativeTarget) {
          // TODO: This is a semi-repetition of further down this function, make DRY
          this.relativeParent = this.getClosestProjectingParent();
          if (this.relativeParent && this.relativeParent.layout) {
            this.relativeTarget = createBox();
            this.relativeTargetOrigin = createBox();
            calcRelativePosition(this.relativeTargetOrigin, this.layout.actual, this.relativeParent.layout.actual);
            copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);
          }
        }
        /**
         * If we have no relative target or no target delta our target isn't valid
         * for this frame.
         */
        if (!this.relativeTarget && !this.targetDelta) return;
        /**
         * Lazy-init target data structure
         */
        if (!this.target) {
          this.target = createBox();
          this.targetWithTransforms = createBox();
        }
        /**
         * If we've got a relative box for this component, resolve it into a target relative to the parent.
         */
        if (this.relativeTarget && this.relativeTargetOrigin && ((_a = this.relativeParent) === null || _a === void 0 ? void 0 : _a.target)) {
          calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target);
          /**
           * If we've only got a targetDelta, resolve it into a target
           */
        } else if (this.targetDelta) {
          if (Boolean(this.resumingFrom)) {
            // TODO: This is creating a new object every frame
            this.target = this.applyTransform(this.layout.actual);
          } else {
            copyBoxInto(this.target, this.layout.actual);
          }
          applyBoxDelta(this.target, this.targetDelta);
        } else {
          /**
           * If no target, use own layout as target
           */
          copyBoxInto(this.target, this.layout.actual);
        }
        /**
         * If we've been told to attempt to resolve a relative target, do so.
         */
        if (this.attemptToResolveRelativeTarget) {
          this.attemptToResolveRelativeTarget = false;
          this.relativeParent = this.getClosestProjectingParent();
          if (this.relativeParent && Boolean(this.relativeParent.resumingFrom) === Boolean(this.resumingFrom) && !this.relativeParent.options.layoutScroll && this.relativeParent.target) {
            this.relativeTarget = createBox();
            this.relativeTargetOrigin = createBox();
            calcRelativePosition(this.relativeTargetOrigin, this.target, this.relativeParent.target);
            copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);
          }
        }
      };
      ProjectionNode.prototype.getClosestProjectingParent = function () {
        if (!this.parent || hasTransform(this.parent.latestValues)) return undefined;
        if ((this.parent.relativeTarget || this.parent.targetDelta) && this.parent.layout) {
          return this.parent;
        } else {
          return this.parent.getClosestProjectingParent();
        }
      };
      ProjectionNode.prototype.calcProjection = function () {
        var _a;
        var _b = this.options,
          layout = _b.layout,
          layoutId = _b.layoutId;
        /**
         * If this section of the tree isn't animating we can
         * delete our target sources for the following frame.
         */
        this.isTreeAnimating = Boolean(((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimating) || this.currentAnimation || this.pendingAnimation);
        if (!this.isTreeAnimating) {
          this.targetDelta = this.relativeTarget = undefined;
        }
        if (!this.layout || !(layout || layoutId)) return;
        var lead = this.getLead();
        /**
         * Reset the corrected box with the latest values from box, as we're then going
         * to perform mutative operations on it.
         */
        copyBoxInto(this.layoutCorrected, this.layout.actual);
        /**
         * Apply all the parent deltas to this box to produce the corrected box. This
         * is the layout box, as it will appear on screen as a result of the transforms of its parents.
         */
        applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, Boolean(this.resumingFrom) || this !== lead);
        var target = lead.target;
        if (!target) return;
        if (!this.projectionDelta) {
          this.projectionDelta = createDelta();
          this.projectionDeltaWithTransform = createDelta();
        }
        var prevTreeScaleX = this.treeScale.x;
        var prevTreeScaleY = this.treeScale.y;
        var prevProjectionTransform = this.projectionTransform;
        /**
         * Update the delta between the corrected box and the target box before user-set transforms were applied.
         * This will allow us to calculate the corrected borderRadius and boxShadow to compensate
         * for our layout reprojection, but still allow them to be scaled correctly by the user.
         * It might be that to simplify this we may want to accept that user-set scale is also corrected
         * and we wouldn't have to keep and calc both deltas, OR we could support a user setting
         * to allow people to choose whether these styles are corrected based on just the
         * layout reprojection or the final bounding box.
         */
        calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);
        this.projectionTransform = buildProjectionTransform(this.projectionDelta, this.treeScale);
        if (this.projectionTransform !== prevProjectionTransform || this.treeScale.x !== prevTreeScaleX || this.treeScale.y !== prevTreeScaleY) {
          this.hasProjected = true;
          this.scheduleRender();
          this.notifyListeners("projectionUpdate", target);
        }
      };
      ProjectionNode.prototype.hide = function () {
        this.isVisible = false;
        // TODO: Schedule render
      };

      ProjectionNode.prototype.show = function () {
        this.isVisible = true;
        // TODO: Schedule render
      };

      ProjectionNode.prototype.scheduleRender = function (notifyAll) {
        var _a, _b, _c;
        if (notifyAll === void 0) {
          notifyAll = true;
        }
        (_b = (_a = this.options).scheduleRender) === null || _b === void 0 ? void 0 : _b.call(_a);
        notifyAll && ((_c = this.getStack()) === null || _c === void 0 ? void 0 : _c.scheduleRender());
        if (this.resumingFrom && !this.resumingFrom.instance) {
          this.resumingFrom = undefined;
        }
      };
      ProjectionNode.prototype.setAnimationOrigin = function (delta, hasOnlyRelativeTargetChanged) {
        var _this = this;
        var _a;
        if (hasOnlyRelativeTargetChanged === void 0) {
          hasOnlyRelativeTargetChanged = false;
        }
        var snapshot = this.snapshot;
        var snapshotLatestValues = (snapshot === null || snapshot === void 0 ? void 0 : snapshot.latestValues) || {};
        var mixedValues = tslib.__assign({}, this.latestValues);
        var targetDelta = createDelta();
        this.relativeTarget = this.relativeTargetOrigin = undefined;
        this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;
        var relativeLayout = createBox();
        var isSharedLayoutAnimation = snapshot === null || snapshot === void 0 ? void 0 : snapshot.isShared;
        var isOnlyMember = (((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.members.length) || 0) <= 1;
        var shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && !isOnlyMember && this.options.crossfade === true && !this.path.some(hasOpacityCrossfade));
        this.animationProgress = 0;
        this.mixTargetDelta = function (latest) {
          var _a;
          var progress = latest / 1000;
          mixAxisDelta(targetDelta.x, delta.x, progress);
          mixAxisDelta(targetDelta.y, delta.y, progress);
          _this.setTargetDelta(targetDelta);
          if (_this.relativeTarget && _this.relativeTargetOrigin && _this.layout && ((_a = _this.relativeParent) === null || _a === void 0 ? void 0 : _a.layout)) {
            calcRelativePosition(relativeLayout, _this.layout.actual, _this.relativeParent.layout.actual);
            mixBox(_this.relativeTarget, _this.relativeTargetOrigin, relativeLayout, progress);
          }
          if (isSharedLayoutAnimation) {
            _this.animationValues = mixedValues;
            mixValues(mixedValues, snapshotLatestValues, _this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);
          }
          _this.root.scheduleUpdateProjection();
          _this.scheduleRender();
          _this.animationProgress = progress;
        };
        this.mixTargetDelta(0);
      };
      ProjectionNode.prototype.startAnimation = function (options) {
        var _this = this;
        var _a, _b;
        this.notifyListeners("animationStart");
        (_a = this.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop();
        if (this.resumingFrom) {
          (_b = this.resumingFrom.currentAnimation) === null || _b === void 0 ? void 0 : _b.stop();
        }
        if (this.pendingAnimation) {
          sync.cancelSync.update(this.pendingAnimation);
          this.pendingAnimation = undefined;
        }
        /**
         * Start the animation in the next frame to have a frame with progress 0,
         * where the target is the same as when the animation started, so we can
         * calculate the relative positions correctly for instant transitions.
         */
        this.pendingAnimation = sync__default["default"].update(function () {
          globalProjectionState.hasAnimatedSinceResize = true;
          _this.currentAnimation = animate(0, animationTarget, tslib.__assign(tslib.__assign({}, options), {
            onUpdate: function (latest) {
              var _a;
              _this.mixTargetDelta(latest);
              (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, latest);
            },
            onComplete: function () {
              var _a;
              (_a = options.onComplete) === null || _a === void 0 ? void 0 : _a.call(options);
              _this.completeAnimation();
            }
          }));
          if (_this.resumingFrom) {
            _this.resumingFrom.currentAnimation = _this.currentAnimation;
          }
          _this.pendingAnimation = undefined;
        });
      };
      ProjectionNode.prototype.completeAnimation = function () {
        var _a;
        if (this.resumingFrom) {
          this.resumingFrom.currentAnimation = undefined;
          this.resumingFrom.preserveOpacity = undefined;
        }
        (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.exitAnimationComplete();
        this.resumingFrom = this.currentAnimation = this.animationValues = undefined;
        this.notifyListeners("animationComplete");
      };
      ProjectionNode.prototype.finishAnimation = function () {
        var _a;
        if (this.currentAnimation) {
          (_a = this.mixTargetDelta) === null || _a === void 0 ? void 0 : _a.call(this, animationTarget);
          this.currentAnimation.stop();
        }
        this.completeAnimation();
      };
      ProjectionNode.prototype.applyTransformsToTarget = function () {
        var _a = this.getLead(),
          targetWithTransforms = _a.targetWithTransforms,
          target = _a.target,
          layout = _a.layout,
          latestValues = _a.latestValues;
        if (!targetWithTransforms || !target || !layout) return;
        copyBoxInto(targetWithTransforms, target);
        /**
         * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.
         * This is the final box that we will then project into by calculating a transform delta and
         * applying it to the corrected box.
         */
        transformBox(targetWithTransforms, latestValues);
        /**
         * Update the delta between the corrected box and the final target box, after
         * user-set transforms are applied to it. This will be used by the renderer to
         * create a transform style that will reproject the element from its actual layout
         * into the desired bounding box.
         */
        calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);
      };
      ProjectionNode.prototype.registerSharedNode = function (layoutId, node) {
        var _a, _b, _c;
        if (!this.sharedNodes.has(layoutId)) {
          this.sharedNodes.set(layoutId, new NodeStack());
        }
        var stack = this.sharedNodes.get(layoutId);
        stack.add(node);
        node.promote({
          transition: (_a = node.options.initialPromotionConfig) === null || _a === void 0 ? void 0 : _a.transition,
          preserveFollowOpacity: (_c = (_b = node.options.initialPromotionConfig) === null || _b === void 0 ? void 0 : _b.shouldPreserveFollowOpacity) === null || _c === void 0 ? void 0 : _c.call(_b, node)
        });
      };
      ProjectionNode.prototype.isLead = function () {
        var stack = this.getStack();
        return stack ? stack.lead === this : true;
      };
      ProjectionNode.prototype.getLead = function () {
        var _a;
        var layoutId = this.options.layoutId;
        return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;
      };
      ProjectionNode.prototype.getPrevLead = function () {
        var _a;
        var layoutId = this.options.layoutId;
        return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined;
      };
      ProjectionNode.prototype.getStack = function () {
        var layoutId = this.options.layoutId;
        if (layoutId) return this.root.sharedNodes.get(layoutId);
      };
      ProjectionNode.prototype.promote = function (_a) {
        var _b = _a === void 0 ? {} : _a,
          needsReset = _b.needsReset,
          transition = _b.transition,
          preserveFollowOpacity = _b.preserveFollowOpacity;
        var stack = this.getStack();
        if (stack) stack.promote(this, preserveFollowOpacity);
        if (needsReset) {
          this.projectionDelta = undefined;
          this.needsReset = true;
        }
        if (transition) this.setOptions({
          transition: transition
        });
      };
      ProjectionNode.prototype.relegate = function () {
        var stack = this.getStack();
        if (stack) {
          return stack.relegate(this);
        } else {
          return false;
        }
      };
      ProjectionNode.prototype.resetRotation = function () {
        var visualElement = this.options.visualElement;
        if (!visualElement) return;
        // If there's no detected rotation values, we can early return without a forced render.
        var hasRotate = false;
        // Keep a record of all the values we've reset
        var resetValues = {};
        // Check the rotate value of all axes and reset to 0
        for (var i = 0; i < transformAxes.length; i++) {
          var axis = transformAxes[i];
          var key = "rotate" + axis;
          // If this rotation doesn't exist as a motion value, then we don't
          // need to reset it
          if (!visualElement.getStaticValue(key)) {
            continue;
          }
          hasRotate = true;
          // Record the rotation and then temporarily set it to 0
          resetValues[key] = visualElement.getStaticValue(key);
          visualElement.setStaticValue(key, 0);
        }
        // If there's no rotation values, we don't need to do any more.
        if (!hasRotate) return;
        // Force a render of this element to apply the transform with all rotations
        // set to 0.
        visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender();
        // Put back all the values we reset
        for (var key in resetValues) {
          visualElement.setStaticValue(key, resetValues[key]);
        }
        // Schedule a render for the next frame. This ensures we won't visually
        // see the element with the reset rotate value applied.
        visualElement.scheduleRender();
      };
      ProjectionNode.prototype.getProjectionStyles = function (styleProp) {
        var _a, _b, _c, _d, _e, _f;
        if (styleProp === void 0) {
          styleProp = {};
        }
        // TODO: Return lifecycle-persistent object
        var styles = {};
        if (!this.instance || this.isSVG) return styles;
        if (!this.isVisible) {
          return {
            visibility: "hidden"
          };
        } else {
          styles.visibility = "";
        }
        var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate;
        if (this.needsReset) {
          this.needsReset = false;
          styles.opacity = "";
          styles.pointerEvents = resolveMotionValue(styleProp.pointerEvents) || "";
          styles.transform = transformTemplate ? transformTemplate(this.latestValues, "") : "none";
          return styles;
        }
        var lead = this.getLead();
        if (!this.projectionDelta || !this.layout || !lead.target) {
          var emptyStyles = {};
          if (this.options.layoutId) {
            emptyStyles.opacity = (_b = this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1;
            emptyStyles.pointerEvents = resolveMotionValue(styleProp.pointerEvents) || "";
          }
          if (this.hasProjected && !hasTransform(this.latestValues)) {
            emptyStyles.transform = transformTemplate ? transformTemplate({}, "") : "none";
            this.hasProjected = false;
          }
          return emptyStyles;
        }
        var valuesToRender = lead.animationValues || lead.latestValues;
        this.applyTransformsToTarget();
        styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);
        if (transformTemplate) {
          styles.transform = transformTemplate(valuesToRender, styles.transform);
        }
        var _g = this.projectionDelta,
          x = _g.x,
          y = _g.y;
        styles.transformOrigin = "".concat(x.origin * 100, "% ").concat(y.origin * 100, "% 0");
        if (lead.animationValues) {
          /**
           * If the lead component is animating, assign this either the entering/leaving
           * opacity
           */
          styles.opacity = lead === this ? (_d = (_c = valuesToRender.opacity) !== null && _c !== void 0 ? _c : this.latestValues.opacity) !== null && _d !== void 0 ? _d : 1 : this.preserveOpacity ? this.latestValues.opacity : valuesToRender.opacityExit;
        } else {
          /**
           * Or we're not animating at all, set the lead component to its actual
           * opacity and other components to hidden.
           */
          styles.opacity = lead === this ? (_e = valuesToRender.opacity) !== null && _e !== void 0 ? _e : "" : (_f = valuesToRender.opacityExit) !== null && _f !== void 0 ? _f : 0;
        }
        /**
         * Apply scale correction
         */
        for (var key in scaleCorrectors) {
          if (valuesToRender[key] === undefined) continue;
          var _h = scaleCorrectors[key],
            correct = _h.correct,
            applyTo = _h.applyTo;
          var corrected = correct(valuesToRender[key], lead);
          if (applyTo) {
            var num = applyTo.length;
            for (var i = 0; i < num; i++) {
              styles[applyTo[i]] = corrected;
            }
          } else {
            styles[key] = corrected;
          }
        }
        /**
         * Disable pointer events on follow components. This is to ensure
         * that if a follow component covers a lead component it doesn't block
         * pointer events on the lead.
         */
        if (this.options.layoutId) {
          styles.pointerEvents = lead === this ? resolveMotionValue(styleProp.pointerEvents) || "" : "none";
        }
        return styles;
      };
      ProjectionNode.prototype.clearSnapshot = function () {
        this.resumeFrom = this.snapshot = undefined;
      };
      // Only run on root
      ProjectionNode.prototype.resetTree = function () {
        this.root.nodes.forEach(function (node) {
          var _a;
          return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop();
        });
        this.root.nodes.forEach(clearMeasurements);
        this.root.sharedNodes.clear();
      };
      return ProjectionNode;
    }()
  );
}
function updateLayout(node) {
  node.updateLayout();
}
function notifyLayoutUpdate(node) {
  var _a, _b, _c, _d;
  var snapshot = (_b = (_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) !== null && _b !== void 0 ? _b : node.snapshot;
  if (node.isLead() && node.layout && snapshot && node.hasListeners("didUpdate")) {
    var _e = node.layout,
      layout_1 = _e.actual,
      measuredLayout = _e.measured;
    // TODO Maybe we want to also resize the layout snapshot so we don't trigger
    // animations for instance if layout="size" and an element has only changed position
    if (node.options.animationType === "size") {
      eachAxis(function (axis) {
        var axisSnapshot = snapshot.isShared ? snapshot.measured[axis] : snapshot.layout[axis];
        var length = calcLength(axisSnapshot);
        axisSnapshot.min = layout_1[axis].min;
        axisSnapshot.max = axisSnapshot.min + length;
      });
    } else if (node.options.animationType === "position") {
      eachAxis(function (axis) {
        var axisSnapshot = snapshot.isShared ? snapshot.measured[axis] : snapshot.layout[axis];
        var length = calcLength(layout_1[axis]);
        axisSnapshot.max = axisSnapshot.min + length;
      });
    }
    var layoutDelta = createDelta();
    calcBoxDelta(layoutDelta, layout_1, snapshot.layout);
    var visualDelta = createDelta();
    if (snapshot.isShared) {
      calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measured);
    } else {
      calcBoxDelta(visualDelta, layout_1, snapshot.layout);
    }
    var hasLayoutChanged = !isDeltaZero(layoutDelta);
    var hasRelativeTargetChanged = false;
    if (!node.resumeFrom) {
      node.relativeParent = node.getClosestProjectingParent();
      /**
       * If the relativeParent is itself resuming from a different element then
       * the relative snapshot is not relavent
       */
      if (node.relativeParent && !node.relativeParent.resumeFrom) {
        var _f = node.relativeParent,
          parentSnapshot = _f.snapshot,
          parentLayout = _f.layout;
        if (parentSnapshot && parentLayout) {
          var relativeSnapshot = createBox();
          calcRelativePosition(relativeSnapshot, snapshot.layout, parentSnapshot.layout);
          var relativeLayout = createBox();
          calcRelativePosition(relativeLayout, layout_1, parentLayout.actual);
          if (!boxEquals(relativeSnapshot, relativeLayout)) {
            hasRelativeTargetChanged = true;
          }
        }
      }
    }
    node.notifyListeners("didUpdate", {
      layout: layout_1,
      snapshot: snapshot,
      delta: visualDelta,
      layoutDelta: layoutDelta,
      hasLayoutChanged: hasLayoutChanged,
      hasRelativeTargetChanged: hasRelativeTargetChanged
    });
  } else if (node.isLead()) {
    (_d = (_c = node.options).onExitComplete) === null || _d === void 0 ? void 0 : _d.call(_c);
  }
  /**
   * Clearing transition
   * TODO: Investigate why this transition is being passed in as {type: false } from Framer
   * and why we need it at all
   */
  node.options.transition = undefined;
}
function clearSnapshot(node) {
  node.clearSnapshot();
}
function clearMeasurements(node) {
  node.clearMeasurements();
}
function resetTransformStyle(node) {
  var visualElement = node.options.visualElement;
  if (visualElement === null || visualElement === void 0 ? void 0 : visualElement.getProps().onBeforeLayoutMeasure) {
    visualElement.notifyBeforeLayoutMeasure();
  }
  node.resetTransform();
}
function finishAnimation(node) {
  node.finishAnimation();
  node.targetDelta = node.relativeTarget = node.target = undefined;
}
function resolveTargetDelta(node) {
  node.resolveTargetDelta();
}
function calcProjection(node) {
  node.calcProjection();
}
function resetRotation(node) {
  node.resetRotation();
}
function removeLeadSnapshots(stack) {
  stack.removeLeadSnapshot();
}
function mixAxisDelta(output, delta, p) {
  output.translate = popmotion.mix(delta.translate, 0, p);
  output.scale = popmotion.mix(delta.scale, 1, p);
  output.origin = delta.origin;
  output.originPoint = delta.originPoint;
}
function mixAxis(output, from, to, p) {
  output.min = popmotion.mix(from.min, to.min, p);
  output.max = popmotion.mix(from.max, to.max, p);
}
function mixBox(output, from, to, p) {
  mixAxis(output.x, from.x, to.x, p);
  mixAxis(output.y, from.y, to.y, p);
}
function hasOpacityCrossfade(node) {
  return node.animationValues && node.animationValues.opacityExit !== undefined;
}
var defaultLayoutTransition = {
  duration: 0.45,
  ease: [0.4, 0, 0.1, 1]
};
function mountNodeEarly(node, id) {
  /**
   * Rather than searching the DOM from document we can search the
   * path for the deepest mounted ancestor and search from there
   */
  var searchNode = node.root;
  for (var i = node.path.length - 1; i >= 0; i--) {
    if (Boolean(node.path[i].instance)) {
      searchNode = node.path[i];
      break;
    }
  }
  var searchElement = searchNode && searchNode !== node.root ? searchNode.instance : document;
  var element = searchElement.querySelector("[data-projection-id=\"".concat(id, "\"]"));
  if (element) node.mount(element, true);
}
function roundAxis(axis) {
  axis.min = Math.round(axis.min);
  axis.max = Math.round(axis.max);
}
function roundBox(box) {
  roundAxis(box.x);
  roundAxis(box.y);
}
var DocumentProjectionNode = createProjectionNode({
  attachResizeListener: function (ref, notify) {
    return addDomEvent(ref, "resize", notify);
  },
  measureScroll: function () {
    return {
      x: document.documentElement.scrollLeft || document.body.scrollLeft,
      y: document.documentElement.scrollTop || document.body.scrollTop
    };
  },
  checkIsScrollRoot: function () {
    return true;
  }
});
var rootProjectionNode = {
  current: undefined
};
var HTMLProjectionNode = createProjectionNode({
  measureScroll: function (instance) {
    return {
      x: instance.scrollLeft,
      y: instance.scrollTop
    };
  },
  defaultParent: function () {
    if (!rootProjectionNode.current) {
      var documentNode = new DocumentProjectionNode(0, {});
      documentNode.mount(window);
      documentNode.setOptions({
        layoutScroll: true
      });
      rootProjectionNode.current = documentNode;
    }
    return rootProjectionNode.current;
  },
  resetTransform: function (instance, value) {
    instance.style.transform = value !== null && value !== void 0 ? value : "none";
  },
  checkIsScrollRoot: function (instance) {
    return Boolean(window.getComputedStyle(instance).position === "fixed");
  }
});
var featureBundle = tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, animations), gestureAnimations), drag), layoutFeatures);
/**
 * HTML & SVG components, optimised for use with gestures and animation. These can be used as
 * drop-in replacements for any HTML & SVG component, all CSS & SVG properties are supported.
 *
 * @public
 */
var motion = /*@__PURE__*/createMotionProxy(function (Component, config) {
  return createDomMotionConfig(Component, config, featureBundle, createDomVisualElement, HTMLProjectionNode);
});
/**
 * Create a DOM `motion` component with the provided string. This is primarily intended
 * as a full alternative to `motion` for consumers who have to support environments that don't
 * support `Proxy`.
 *
 * ```javascript
 * import { createDomMotionComponent } from "framer-motion"
 *
 * const motion = {
 *   div: createDomMotionComponent('div')
 * }
 * ```
 *
 * @public
 */
function createDomMotionComponent(key) {
  return createMotionComponent(createDomMotionConfig(key, {
    forwardMotionProps: false
  }, featureBundle, createDomVisualElement, HTMLProjectionNode));
}

/**
 * @public
 */
var m = createMotionProxy(createDomMotionConfig);
function useIsMounted() {
  var isMounted = React.useRef(false);
  useIsomorphicLayoutEffect(function () {
    isMounted.current = true;
    return function () {
      isMounted.current = false;
    };
  }, []);
  return isMounted;
}
function useForceUpdate() {
  var isMounted = useIsMounted();
  var _a = tslib.__read(React.useState(0), 2),
    forcedRenderCount = _a[0],
    setForcedRenderCount = _a[1];
  var forceRender = React.useCallback(function () {
    isMounted.current && setForcedRenderCount(forcedRenderCount + 1);
  }, [forcedRenderCount]);
  /**
   * Defer this to the end of the next animation frame in case there are multiple
   * synchronous calls.
   */
  var deferredForceRender = React.useCallback(function () {
    return sync__default["default"].postRender(forceRender);
  }, [forceRender]);
  return [deferredForceRender, forcedRenderCount];
}
var PresenceChild = function (_a) {
  var children = _a.children,
    initial = _a.initial,
    isPresent = _a.isPresent,
    onExitComplete = _a.onExitComplete,
    custom = _a.custom,
    presenceAffectsLayout = _a.presenceAffectsLayout;
  var presenceChildren = useConstant(newChildrenMap);
  var id = useId();
  var context = React.useMemo(function () {
    return {
      id: id,
      initial: initial,
      isPresent: isPresent,
      custom: custom,
      onExitComplete: function (childId) {
        var e_1, _a;
        presenceChildren.set(childId, true);
        try {
          for (var _b = tslib.__values(presenceChildren.values()), _c = _b.next(); !_c.done; _c = _b.next()) {
            var isComplete = _c.value;
            if (!isComplete) return; // can stop searching when any is incomplete
          }
        } catch (e_1_1) {
          e_1 = {
            error: e_1_1
          };
        } finally {
          try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
          } finally {
            if (e_1) throw e_1.error;
          }
        }
        onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete();
      },
      register: function (childId) {
        presenceChildren.set(childId, false);
        return function () {
          return presenceChildren.delete(childId);
        };
      }
    };
  },
  /**
   * If the presence of a child affects the layout of the components around it,
   * we want to make a new context value to ensure they get re-rendered
   * so they can detect that layout change.
   */
  presenceAffectsLayout ? undefined : [isPresent]);
  React.useMemo(function () {
    presenceChildren.forEach(function (_, key) {
      return presenceChildren.set(key, false);
    });
  }, [isPresent]);
  /**
   * If there's no `motion` components to fire exit animations, we want to remove this
   * component immediately.
   */
  React__namespace.useEffect(function () {
    !isPresent && !presenceChildren.size && (onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete());
  }, [isPresent]);
  return React__namespace.createElement(PresenceContext.Provider, {
    value: context
  }, children);
};
function newChildrenMap() {
  return new Map();
}
var getChildKey = function (child) {
  return child.key || "";
};
function updateChildLookup(children, allChildren) {
  children.forEach(function (child) {
    var key = getChildKey(child);
    allChildren.set(key, child);
  });
}
function onlyElements(children) {
  var filtered = [];
  // We use forEach here instead of map as map mutates the component key by preprending `.$`
  React.Children.forEach(children, function (child) {
    if (React.isValidElement(child)) filtered.push(child);
  });
  return filtered;
}
/**
 * `AnimatePresence` enables the animation of components that have been removed from the tree.
 *
 * When adding/removing more than a single child, every child **must** be given a unique `key` prop.
 *
 * Any `motion` components that have an `exit` property defined will animate out when removed from
 * the tree.
 *
 * ```jsx
 * import { motion, AnimatePresence } from 'framer-motion'
 *
 * export const Items = ({ items }) => (
 *   <AnimatePresence>
 *     {items.map(item => (
 *       <motion.div
 *         key={item.id}
 *         initial={{ opacity: 0 }}
 *         animate={{ opacity: 1 }}
 *         exit={{ opacity: 0 }}
 *       />
 *     ))}
 *   </AnimatePresence>
 * )
 * ```
 *
 * You can sequence exit animations throughout a tree using variants.
 *
 * If a child contains multiple `motion` components with `exit` props, it will only unmount the child
 * once all `motion` components have finished animating out. Likewise, any components using
 * `usePresence` all need to call `safeToRemove`.
 *
 * @public
 */
var AnimatePresence = function (_a) {
  var children = _a.children,
    custom = _a.custom,
    _b = _a.initial,
    initial = _b === void 0 ? true : _b,
    onExitComplete = _a.onExitComplete,
    exitBeforeEnter = _a.exitBeforeEnter,
    _c = _a.presenceAffectsLayout,
    presenceAffectsLayout = _c === void 0 ? true : _c;
  // We want to force a re-render once all exiting animations have finished. We
  // either use a local forceRender function, or one from a parent context if it exists.
  var _d = tslib.__read(useForceUpdate(), 1),
    forceRender = _d[0];
  var forceRenderLayoutGroup = React.useContext(LayoutGroupContext).forceRender;
  if (forceRenderLayoutGroup) forceRender = forceRenderLayoutGroup;
  var isMounted = useIsMounted();
  // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key
  var filteredChildren = onlyElements(children);
  var childrenToRender = filteredChildren;
  var exiting = new Set();
  // Keep a living record of the children we're actually rendering so we
  // can diff to figure out which are entering and exiting
  var presentChildren = React.useRef(childrenToRender);
  // A lookup table to quickly reference components by key
  var allChildren = React.useRef(new Map()).current;
  // If this is the initial component render, just deal with logic surrounding whether
  // we play onMount animations or not.
  var isInitialRender = React.useRef(true);
  useIsomorphicLayoutEffect(function () {
    isInitialRender.current = false;
    updateChildLookup(filteredChildren, allChildren);
    presentChildren.current = childrenToRender;
  });
  useUnmountEffect(function () {
    isInitialRender.current = true;
    allChildren.clear();
    exiting.clear();
  });
  if (isInitialRender.current) {
    return React__namespace.createElement(React__namespace.Fragment, null, childrenToRender.map(function (child) {
      return React__namespace.createElement(PresenceChild, {
        key: getChildKey(child),
        isPresent: true,
        initial: initial ? undefined : false,
        presenceAffectsLayout: presenceAffectsLayout
      }, child);
    }));
  }
  // If this is a subsequent render, deal with entering and exiting children
  childrenToRender = tslib.__spreadArray([], tslib.__read(childrenToRender), false);
  // Diff the keys of the currently-present and target children to update our
  // exiting list.
  var presentKeys = presentChildren.current.map(getChildKey);
  var targetKeys = filteredChildren.map(getChildKey);
  // Diff the present children with our target children and mark those that are exiting
  var numPresent = presentKeys.length;
  for (var i = 0; i < numPresent; i++) {
    var key = presentKeys[i];
    if (targetKeys.indexOf(key) === -1) {
      exiting.add(key);
    }
  }
  // If we currently have exiting children, and we're deferring rendering incoming children
  // until after all current children have exiting, empty the childrenToRender array
  if (exitBeforeEnter && exiting.size) {
    childrenToRender = [];
  }
  // Loop through all currently exiting components and clone them to overwrite `animate`
  // with any `exit` prop they might have defined.
  exiting.forEach(function (key) {
    // If this component is actually entering again, early return
    if (targetKeys.indexOf(key) !== -1) return;
    var child = allChildren.get(key);
    if (!child) return;
    var insertionIndex = presentKeys.indexOf(key);
    var onExit = function () {
      allChildren.delete(key);
      exiting.delete(key);
      // Remove this child from the present children
      var removeIndex = presentChildren.current.findIndex(function (presentChild) {
        return presentChild.key === key;
      });
      presentChildren.current.splice(removeIndex, 1);
      // Defer re-rendering until all exiting children have indeed left
      if (!exiting.size) {
        presentChildren.current = filteredChildren;
        if (isMounted.current === false) return;
        forceRender();
        onExitComplete && onExitComplete();
      }
    };
    childrenToRender.splice(insertionIndex, 0, React__namespace.createElement(PresenceChild, {
      key: getChildKey(child),
      isPresent: false,
      onExitComplete: onExit,
      custom: custom,
      presenceAffectsLayout: presenceAffectsLayout
    }, child));
  });
  // Add `MotionContext` even to children that don't need it to ensure we're rendering
  // the same tree between renders
  childrenToRender = childrenToRender.map(function (child) {
    var key = child.key;
    return exiting.has(key) ? child : React__namespace.createElement(PresenceChild, {
      key: getChildKey(child),
      isPresent: true,
      presenceAffectsLayout: presenceAffectsLayout
    }, child);
  });
  if (env !== "production" && exitBeforeEnter && childrenToRender.length > 1) {
    console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour.");
  }
  return React__namespace.createElement(React__namespace.Fragment, null, exiting.size ? childrenToRender : childrenToRender.map(function (child) {
    return React.cloneElement(child);
  }));
};

/**
 * @deprecated
 */
var DeprecatedLayoutGroupContext = React.createContext(null);
var notify = function (node) {
  return !node.isLayoutDirty && node.willUpdate(false);
};
function nodeGroup() {
  var nodes = new Set();
  var subscriptions = new WeakMap();
  var dirtyAll = function () {
    return nodes.forEach(notify);
  };
  return {
    add: function (node) {
      nodes.add(node);
      subscriptions.set(node, node.addEventListener("willUpdate", dirtyAll));
    },
    remove: function (node) {
      var _a;
      nodes.delete(node);
      (_a = subscriptions.get(node)) === null || _a === void 0 ? void 0 : _a();
      subscriptions.delete(node);
      dirtyAll();
    },
    dirty: dirtyAll
  };
}
var shouldInheritGroup = function (inherit) {
  return inherit === true;
};
var shouldInheritId = function (inherit) {
  return shouldInheritGroup(inherit === true) || inherit === "id";
};
var LayoutGroup = function (_a) {
  var _b, _c;
  var children = _a.children,
    id = _a.id,
    inheritId = _a.inheritId,
    _d = _a.inherit,
    inherit = _d === void 0 ? true : _d;
  // Maintain backwards-compatibility with inheritId until 7.0
  if (inheritId !== undefined) inherit = inheritId;
  var layoutGroupContext = React.useContext(LayoutGroupContext);
  var deprecatedLayoutGroupContext = React.useContext(DeprecatedLayoutGroupContext);
  var _e = tslib.__read(useForceUpdate(), 2),
    forceRender = _e[0],
    key = _e[1];
  var context = React.useRef(null);
  var upstreamId = (_b = layoutGroupContext.id) !== null && _b !== void 0 ? _b : deprecatedLayoutGroupContext;
  if (context.current === null) {
    if (shouldInheritId(inherit) && upstreamId) {
      id = id ? upstreamId + "-" + id : upstreamId;
    }
    context.current = {
      id: id,
      group: shouldInheritGroup(inherit) ? (_c = layoutGroupContext === null || layoutGroupContext === void 0 ? void 0 : layoutGroupContext.group) !== null && _c !== void 0 ? _c : nodeGroup() : nodeGroup()
    };
  }
  var memoizedContext = React.useMemo(function () {
    return tslib.__assign(tslib.__assign({}, context.current), {
      forceRender: forceRender
    });
  }, [key]);
  return React__namespace.createElement(LayoutGroupContext.Provider, {
    value: memoizedContext
  }, children);
};
var id = 0;
var AnimateSharedLayout = function (_a) {
  var children = _a.children;
  React__namespace.useEffect(function () {
    heyListen.warning(false, "AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations");
  }, []);
  return React__namespace.createElement(LayoutGroup, {
    id: useConstant(function () {
      return "asl-".concat(id++);
    })
  }, children);
};

/**
 * `MotionConfig` is used to set configuration options for all children `motion` components.
 *
 * ```jsx
 * import { motion, MotionConfig } from "framer-motion"
 *
 * export function App() {
 *   return (
 *     <MotionConfig transition={{ type: "spring" }}>
 *       <motion.div animate={{ x: 100 }} />
 *     </MotionConfig>
 *   )
 * }
 * ```
 *
 * @public
 */
function MotionConfig(_a) {
  var children = _a.children,
    isValidProp = _a.isValidProp,
    config = tslib.__rest(_a, ["children", "isValidProp"]);
  isValidProp && loadExternalIsValidProp(isValidProp);
  /**
   * Inherit props from any parent MotionConfig components
   */
  config = tslib.__assign(tslib.__assign({}, React.useContext(MotionConfigContext)), config);
  /**
   * Don't allow isStatic to change between renders as it affects how many hooks
   * motion components fire.
   */
  config.isStatic = useConstant(function () {
    return config.isStatic;
  });
  /**
   * Creating a new config context object will re-render every `motion` component
   * every time it renders. So we only want to create a new one sparingly.
   */
  var context = React.useMemo(function () {
    return config;
  }, [JSON.stringify(config.transition), config.transformPagePoint, config.reducedMotion]);
  return React__namespace.createElement(MotionConfigContext.Provider, {
    value: context
  }, children);
}

/**
 * Used in conjunction with the `m` component to reduce bundle size.
 *
 * `m` is a version of the `motion` component that only loads functionality
 * critical for the initial render.
 *
 * `LazyMotion` can then be used to either synchronously or asynchronously
 * load animation and gesture support.
 *
 * ```jsx
 * // Synchronous loading
 * import { LazyMotion, m, domAnimations } from "framer-motion"
 *
 * function App() {
 *   return (
 *     <LazyMotion features={domAnimations}>
 *       <m.div animate={{ scale: 2 }} />
 *     </LazyMotion>
 *   )
 * }
 *
 * // Asynchronous loading
 * import { LazyMotion, m } from "framer-motion"
 *
 * function App() {
 *   return (
 *     <LazyMotion features={() => import('./path/to/domAnimations')}>
 *       <m.div animate={{ scale: 2 }} />
 *     </LazyMotion>
 *   )
 * }
 * ```
 *
 * @public
 */
function LazyMotion(_a) {
  var children = _a.children,
    features = _a.features,
    _b = _a.strict,
    strict = _b === void 0 ? false : _b;
  var _c = tslib.__read(React.useState(!isLazyBundle(features)), 2),
    setIsLoaded = _c[1];
  var loadedRenderer = React.useRef(undefined);
  /**
   * If this is a synchronous load, load features immediately
   */
  if (!isLazyBundle(features)) {
    var renderer = features.renderer,
      loadedFeatures = tslib.__rest(features, ["renderer"]);
    loadedRenderer.current = renderer;
    loadFeatures(loadedFeatures);
  }
  React.useEffect(function () {
    if (isLazyBundle(features)) {
      features().then(function (_a) {
        var renderer = _a.renderer,
          loadedFeatures = tslib.__rest(_a, ["renderer"]);
        loadFeatures(loadedFeatures);
        loadedRenderer.current = renderer;
        setIsLoaded(true);
      });
    }
  }, []);
  return React__namespace.createElement(LazyContext.Provider, {
    value: {
      renderer: loadedRenderer.current,
      strict: strict
    }
  }, children);
}
function isLazyBundle(features) {
  return typeof features === "function";
}
var ReorderContext = React.createContext(null);
function checkReorder(order, value, offset, velocity) {
  if (!velocity) return order;
  var index = order.findIndex(function (item) {
    return item.value === value;
  });
  if (index === -1) return order;
  var nextOffset = velocity > 0 ? 1 : -1;
  var nextItem = order[index + nextOffset];
  if (!nextItem) return order;
  var item = order[index];
  var nextLayout = nextItem.layout;
  var nextItemCenter = popmotion.mix(nextLayout.min, nextLayout.max, 0.5);
  if (nextOffset === 1 && item.layout.max + offset > nextItemCenter || nextOffset === -1 && item.layout.min + offset < nextItemCenter) {
    return moveItem(order, index, index + nextOffset);
  }
  return order;
}
function ReorderGroup(_a, externalRef) {
  var children = _a.children,
    _b = _a.as,
    as = _b === void 0 ? "ul" : _b,
    _c = _a.axis,
    axis = _c === void 0 ? "y" : _c,
    onReorder = _a.onReorder,
    values = _a.values,
    props = tslib.__rest(_a, ["children", "as", "axis", "onReorder", "values"]);
  var Component = useConstant(function () {
    return motion(as);
  });
  var order = [];
  var isReordering = React.useRef(false);
  heyListen.invariant(Boolean(values), "Reorder.Group must be provided a values prop");
  var context = {
    axis: axis,
    registerItem: function (value, layout) {
      /**
       * Ensure entries can't add themselves more than once
       */
      if (layout && order.findIndex(function (entry) {
        return value === entry.value;
      }) === -1) {
        order.push({
          value: value,
          layout: layout[axis]
        });
        order.sort(compareMin);
      }
    },
    updateOrder: function (id, offset, velocity) {
      if (isReordering.current) return;
      var newOrder = checkReorder(order, id, offset, velocity);
      if (order !== newOrder) {
        isReordering.current = true;
        onReorder(newOrder.map(getValue).filter(function (value) {
          return values.indexOf(value) !== -1;
        }));
      }
    }
  };
  React.useEffect(function () {
    isReordering.current = false;
  });
  return React__namespace.createElement(Component, tslib.__assign({}, props, {
    ref: externalRef
  }), React__namespace.createElement(ReorderContext.Provider, {
    value: context
  }, children));
}
var Group = React.forwardRef(ReorderGroup);
function getValue(item) {
  return item.value;
}
function compareMin(a, b) {
  return a.layout.min - b.layout.min;
}

/**
 * Creates a `MotionValue` to track the state and velocity of a value.
 *
 * Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop.
 *
 * ```jsx
 * export const MyComponent = () => {
 *   const scale = useMotionValue(1)
 *
 *   return <motion.div style={{ scale }} />
 * }
 * ```
 *
 * @param initial - The initial state.
 *
 * @public
 */
function useMotionValue(initial) {
  var value = useConstant(function () {
    return motionValue(initial);
  });
  /**
   * If this motion value is being used in static mode, like on
   * the Framer canvas, force components to rerender when the motion
   * value is updated.
   */
  var isStatic = React.useContext(MotionConfigContext).isStatic;
  if (isStatic) {
    var _a = tslib.__read(React.useState(initial), 2),
      setLatest_1 = _a[1];
    React.useEffect(function () {
      return value.onChange(setLatest_1);
    }, []);
  }
  return value;
}
var isCustomValueType = function (v) {
  return typeof v === "object" && v.mix;
};
var getMixer = function (v) {
  return isCustomValueType(v) ? v.mix : undefined;
};
function transform() {
  var args = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    args[_i] = arguments[_i];
  }
  var useImmediate = !Array.isArray(args[0]);
  var argOffset = useImmediate ? 0 : -1;
  var inputValue = args[0 + argOffset];
  var inputRange = args[1 + argOffset];
  var outputRange = args[2 + argOffset];
  var options = args[3 + argOffset];
  var interpolator = popmotion.interpolate(inputRange, outputRange, tslib.__assign({
    mixer: getMixer(outputRange[0])
  }, options));
  return useImmediate ? interpolator(inputValue) : interpolator;
}
function useOnChange(value, callback) {
  useIsomorphicLayoutEffect(function () {
    if (isMotionValue(value)) return value.onChange(callback);
  }, [callback]);
}
function useMultiOnChange(values, handler) {
  useIsomorphicLayoutEffect(function () {
    var subscriptions = values.map(function (value) {
      return value.onChange(handler);
    });
    return function () {
      return subscriptions.forEach(function (unsubscribe) {
        return unsubscribe();
      });
    };
  });
}
function useCombineMotionValues(values, combineValues) {
  /**
   * Initialise the returned motion value. This remains the same between renders.
   */
  var value = useMotionValue(combineValues());
  /**
   * Create a function that will update the template motion value with the latest values.
   * This is pre-bound so whenever a motion value updates it can schedule its
   * execution in Framesync. If it's already been scheduled it won't be fired twice
   * in a single frame.
   */
  var updateValue = function () {
    return value.set(combineValues());
  };
  /**
   * Synchronously update the motion value with the latest values during the render.
   * This ensures that within a React render, the styles applied to the DOM are up-to-date.
   */
  updateValue();
  /**
   * Subscribe to all motion values found within the template. Whenever any of them change,
   * schedule an update.
   */
  useMultiOnChange(values, function () {
    return sync__default["default"].update(updateValue, false, true);
  });
  return value;
}
function useTransform(input, inputRangeOrTransformer, outputRange, options) {
  var transformer = typeof inputRangeOrTransformer === "function" ? inputRangeOrTransformer : transform(inputRangeOrTransformer, outputRange, options);
  return Array.isArray(input) ? useListTransform(input, transformer) : useListTransform([input], function (_a) {
    var _b = tslib.__read(_a, 1),
      latest = _b[0];
    return transformer(latest);
  });
}
function useListTransform(values, transformer) {
  var latest = useConstant(function () {
    return [];
  });
  return useCombineMotionValues(values, function () {
    latest.length = 0;
    var numValues = values.length;
    for (var i = 0; i < numValues; i++) {
      latest[i] = values[i].get();
    }
    return transformer(latest);
  });
}
function useDefaultMotionValue(value, defaultValue) {
  if (defaultValue === void 0) {
    defaultValue = 0;
  }
  return isMotionValue(value) ? value : useMotionValue(defaultValue);
}
function ReorderItem(_a, externalRef) {
  var children = _a.children,
    style = _a.style,
    value = _a.value,
    _b = _a.as,
    as = _b === void 0 ? "li" : _b,
    onDrag = _a.onDrag,
    _c = _a.layout,
    layout = _c === void 0 ? true : _c,
    props = tslib.__rest(_a, ["children", "style", "value", "as", "onDrag", "layout"]);
  var Component = useConstant(function () {
    return motion(as);
  });
  var context = React.useContext(ReorderContext);
  var point = {
    x: useDefaultMotionValue(style === null || style === void 0 ? void 0 : style.x),
    y: useDefaultMotionValue(style === null || style === void 0 ? void 0 : style.y)
  };
  var zIndex = useTransform([point.x, point.y], function (_a) {
    var _b = tslib.__read(_a, 2),
      latestX = _b[0],
      latestY = _b[1];
    return latestX || latestY ? 1 : "unset";
  });
  var measuredLayout = React.useRef(null);
  heyListen.invariant(Boolean(context), "Reorder.Item must be a child of Reorder.Group");
  var _d = context,
    axis = _d.axis,
    registerItem = _d.registerItem,
    updateOrder = _d.updateOrder;
  React.useEffect(function () {
    registerItem(value, measuredLayout.current);
  }, [context]);
  return React__namespace.createElement(Component, tslib.__assign({
    drag: axis
  }, props, {
    dragSnapToOrigin: true,
    style: tslib.__assign(tslib.__assign({}, style), {
      x: point.x,
      y: point.y,
      zIndex: zIndex
    }),
    layout: layout,
    onDrag: function (event, gesturePoint) {
      var velocity = gesturePoint.velocity;
      velocity[axis] && updateOrder(value, point[axis].get(), velocity[axis]);
      onDrag === null || onDrag === void 0 ? void 0 : onDrag(event, gesturePoint);
    },
    onLayoutMeasure: function (measured) {
      measuredLayout.current = measured;
    },
    ref: externalRef
  }), children);
}
var Item = React.forwardRef(ReorderItem);
var Reorder = {
  Group: Group,
  Item: Item
};

/**
 * @public
 */
var domAnimation = tslib.__assign(tslib.__assign({
  renderer: createDomVisualElement
}, animations), gestureAnimations);

/**
 * @public
 */
var domMax = tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, domAnimation), drag), layoutFeatures), {
  projectionNodeConstructor: HTMLProjectionNode
});

/**
 * Combine multiple motion values into a new one using a string template literal.
 *
 * ```jsx
 * import {
 *   motion,
 *   useSpring,
 *   useMotionValue,
 *   useMotionTemplate
 * } from "framer-motion"
 *
 * function Component() {
 *   const shadowX = useSpring(0)
 *   const shadowY = useMotionValue(0)
 *   const shadow = useMotionTemplate`drop-shadow(${shadowX}px ${shadowY}px 20px rgba(0,0,0,0.3))`
 *
 *   return <motion.div style={{ filter: shadow }} />
 * }
 * ```
 *
 * @public
 */
function useMotionTemplate(fragments) {
  var values = [];
  for (var _i = 1; _i < arguments.length; _i++) {
    values[_i - 1] = arguments[_i];
  }
  /**
   * Create a function that will build a string from the latest motion values.
   */
  var numFragments = fragments.length;
  function buildValue() {
    var output = "";
    for (var i = 0; i < numFragments; i++) {
      output += fragments[i];
      var value = values[i];
      if (value) output += values[i].get();
    }
    return output;
  }
  return useCombineMotionValues(values, buildValue);
}

/**
 * Creates a `MotionValue` that, when `set`, will use a spring animation to animate to its new state.
 *
 * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber
 * to another `MotionValue`.
 *
 * @remarks
 *
 * ```jsx
 * const x = useSpring(0, { stiffness: 300 })
 * const y = useSpring(x, { damping: 10 })
 * ```
 *
 * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will spring towards that value.
 * @param springConfig - Configuration options for the spring.
 * @returns `MotionValue`
 *
 * @public
 */
function useSpring(source, config) {
  if (config === void 0) {
    config = {};
  }
  var isStatic = React.useContext(MotionConfigContext).isStatic;
  var activeSpringAnimation = React.useRef(null);
  var value = useMotionValue(isMotionValue(source) ? source.get() : source);
  React.useMemo(function () {
    return value.attach(function (v, set) {
      /**
       * A more hollistic approach to this might be to use isStatic to fix VisualElement animations
       * at that level, but this will work for now
       */
      if (isStatic) return set(v);
      if (activeSpringAnimation.current) {
        activeSpringAnimation.current.stop();
      }
      activeSpringAnimation.current = popmotion.animate(tslib.__assign(tslib.__assign({
        from: value.get(),
        to: v,
        velocity: value.getVelocity()
      }, config), {
        onUpdate: set
      }));
      return value.get();
    });
  }, [JSON.stringify(config)]);
  useOnChange(source, function (v) {
    return value.set(parseFloat(v));
  });
  return value;
}

/**
 * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.
 *
 * ```javascript
 * const x = useMotionValue(0)
 * const xVelocity = useVelocity(x)
 * const xAcceleration = useVelocity(xVelocity)
 * ```
 *
 * @public
 */
function useVelocity(value) {
  var velocity = useMotionValue(value.getVelocity());
  React.useEffect(function () {
    return value.velocityUpdateSubscribers.add(function (newVelocity) {
      velocity.set(newVelocity);
    });
  }, [value]);
  return velocity;
}
var createScrollMotionValues = function () {
  return {
    scrollX: motionValue(0),
    scrollY: motionValue(0),
    scrollXProgress: motionValue(0),
    scrollYProgress: motionValue(0)
  };
};
function useScroll(_a) {
  if (_a === void 0) {
    _a = {};
  }
  var container = _a.container,
    target = _a.target,
    options = tslib.__rest(_a, ["container", "target"]);
  var values = useConstant(createScrollMotionValues);
  useIsomorphicLayoutEffect(function () {
    return dom.scroll(function (_a) {
      var x = _a.x,
        y = _a.y;
      values.scrollX.set(x.current);
      values.scrollXProgress.set(x.progress);
      values.scrollY.set(y.current);
      values.scrollYProgress.set(y.progress);
    }, tslib.__assign(tslib.__assign({}, options), {
      container: (container === null || container === void 0 ? void 0 : container.current) || undefined,
      target: (target === null || target === void 0 ? void 0 : target.current) || undefined
    }));
  }, []);
  return values;
}
function useElementScroll(ref) {
  warnOnce(false, "useElementScroll is deprecated. Convert to useScroll({ container: ref }).");
  return useScroll({
    container: ref
  });
}
function useViewportScroll() {
  warnOnce(false, "useViewportScroll is deprecated. Convert to useScroll().");
  return useScroll();
}
var getCurrentTime = typeof performance !== "undefined" ? function () {
  return performance.now();
} : function () {
  return Date.now();
};
function useAnimationFrame(callback) {
  var initialTimestamp = useConstant(getCurrentTime);
  var isStatic = React.useContext(MotionConfigContext).isStatic;
  React.useEffect(function () {
    if (isStatic) return;
    var provideTimeSinceStart = function (_a) {
      var timestamp = _a.timestamp;
      callback(timestamp - initialTimestamp);
    };
    sync__default["default"].update(provideTimeSinceStart, true);
    return function () {
      return sync.cancelSync.update(provideTimeSinceStart);
    };
  }, [callback]);
}
function useTime() {
  var time = useMotionValue(0);
  useAnimationFrame(function (t) {
    return time.set(t);
  });
  return time;
}

/**
 * @public
 */
function animationControls() {
  /**
   * Track whether the host component has mounted.
   */
  var hasMounted = false;
  /**
   * Pending animations that are started before a component is mounted.
   * TODO: Remove this as animations should only run in effects
   */
  var pendingAnimations = [];
  /**
   * A collection of linked component animation controls.
   */
  var subscribers = new Set();
  var controls = {
    subscribe: function (visualElement) {
      subscribers.add(visualElement);
      return function () {
        return void subscribers.delete(visualElement);
      };
    },
    start: function (definition, transitionOverride) {
      /**
       * TODO: We only perform this hasMounted check because in Framer we used to
       * encourage the ability to start an animation within the render phase. This
       * isn't behaviour concurrent-safe so when we make Framer concurrent-safe
       * we can ditch this.
       */
      if (hasMounted) {
        var animations_1 = [];
        subscribers.forEach(function (visualElement) {
          animations_1.push(animateVisualElement(visualElement, definition, {
            transitionOverride: transitionOverride
          }));
        });
        return Promise.all(animations_1);
      } else {
        return new Promise(function (resolve) {
          pendingAnimations.push({
            animation: [definition, transitionOverride],
            resolve: resolve
          });
        });
      }
    },
    set: function (definition) {
      heyListen.invariant(hasMounted, "controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.");
      return subscribers.forEach(function (visualElement) {
        setValues(visualElement, definition);
      });
    },
    stop: function () {
      subscribers.forEach(function (visualElement) {
        stopAnimation(visualElement);
      });
    },
    mount: function () {
      hasMounted = true;
      pendingAnimations.forEach(function (_a) {
        var animation = _a.animation,
          resolve = _a.resolve;
        controls.start.apply(controls, tslib.__spreadArray([], tslib.__read(animation), false)).then(resolve);
      });
      return function () {
        hasMounted = false;
        controls.stop();
      };
    }
  };
  return controls;
}

/**
 * Creates `AnimationControls`, which can be used to manually start, stop
 * and sequence animations on one or more components.
 *
 * The returned `AnimationControls` should be passed to the `animate` property
 * of the components you want to animate.
 *
 * These components can then be animated with the `start` method.
 *
 * ```jsx
 * import * as React from 'react'
 * import { motion, useAnimation } from 'framer-motion'
 *
 * export function MyComponent(props) {
 *    const controls = useAnimation()
 *
 *    controls.start({
 *        x: 100,
 *        transition: { duration: 0.5 },
 *    })
 *
 *    return <motion.div animate={controls} />
 * }
 * ```
 *
 * @returns Animation controller with `start` and `stop` methods
 *
 * @public
 */
function useAnimationControls() {
  var controls = useConstant(animationControls);
  React.useEffect(controls.mount, []);
  return controls;
}
var useAnimation = useAnimationControls;

/**
 * Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments.
 *
 * An index value can be passed to the returned `cycle` function to cycle to a specific index.
 *
 * ```jsx
 * import * as React from "react"
 * import { motion, useCycle } from "framer-motion"
 *
 * export const MyComponent = () => {
 *   const [x, cycleX] = useCycle(0, 50, 100)
 *
 *   return (
 *     <motion.div
 *       animate={{ x: x }}
 *       onTap={() => cycleX()}
 *      />
 *    )
 * }
 * ```
 *
 * @param items - items to cycle through
 * @returns [currentState, cycleState]
 *
 * @public
 */
function useCycle() {
  var items = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    items[_i] = arguments[_i];
  }
  var index = React.useRef(0);
  var _a = tslib.__read(React.useState(items[index.current]), 2),
    item = _a[0],
    setItem = _a[1];
  var runCycle = React.useCallback(function (next) {
    index.current = typeof next !== "number" ? popmotion.wrap(0, items.length, index.current + 1) : next;
    setItem(items[index.current]);
  }, tslib.__spreadArray([items.length], tslib.__read(items), false));
  return [item, runCycle];
}
function useInView(ref, _a) {
  var _b = _a === void 0 ? {} : _a,
    root = _b.root,
    margin = _b.margin,
    amount = _b.amount,
    _c = _b.once,
    once = _c === void 0 ? false : _c;
  var _d = tslib.__read(React.useState(false), 2),
    isInView = _d[0],
    setInView = _d[1];
  React.useEffect(function () {
    var _a;
    if (!ref.current || once && isInView) return;
    var onEnter = function () {
      setInView(true);
      return once ? undefined : function () {
        return setInView(false);
      };
    };
    var options = {
      root: (_a = root === null || root === void 0 ? void 0 : root.current) !== null && _a !== void 0 ? _a : undefined,
      margin: margin,
      amount: amount === "some" ? "any" : amount
    };
    return dom.inView(ref.current, onEnter, options);
  }, [root, ref, margin, once]);
  return isInView;
}

/**
 * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.
 *
 * ```jsx
 * const dragControls = useDragControls()
 *
 * function startDrag(event) {
 *   dragControls.start(event, { snapToCursor: true })
 * }
 *
 * return (
 *   <>
 *     <div onPointerDown={startDrag} />
 *     <motion.div drag="x" dragControls={dragControls} />
 *   </>
 * )
 * ```
 *
 * @public
 */
var DragControls = /** @class */function () {
  function DragControls() {
    this.componentControls = new Set();
  }
  /**
   * Subscribe a component's internal `VisualElementDragControls` to the user-facing API.
   *
   * @internal
   */
  DragControls.prototype.subscribe = function (controls) {
    var _this = this;
    this.componentControls.add(controls);
    return function () {
      return _this.componentControls.delete(controls);
    };
  };
  /**
   * Start a drag gesture on every `motion` component that has this set of drag controls
   * passed into it via the `dragControls` prop.
   *
   * ```jsx
   * dragControls.start(e, {
   *   snapToCursor: true
   * })
   * ```
   *
   * @param event - PointerEvent
   * @param options - Options
   *
   * @public
   */
  DragControls.prototype.start = function (event, options) {
    this.componentControls.forEach(function (controls) {
      controls.start(event.nativeEvent || event, options);
    });
  };
  return DragControls;
}();
var createDragControls = function () {
  return new DragControls();
};
/**
 * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop
 * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we
 * might want to initiate that dragging from a different component than the draggable one.
 *
 * By creating a `dragControls` using the `useDragControls` hook, we can pass this into
 * the draggable component's `dragControls` prop. It exposes a `start` method
 * that can start dragging from pointer events on other components.
 *
 * ```jsx
 * const dragControls = useDragControls()
 *
 * function startDrag(event) {
 *   dragControls.start(event, { snapToCursor: true })
 * }
 *
 * return (
 *   <>
 *     <div onPointerDown={startDrag} />
 *     <motion.div drag="x" dragControls={dragControls} />
 *   </>
 * )
 * ```
 *
 * @public
 */
function useDragControls() {
  return useConstant(createDragControls);
}
function useInstantLayoutTransition() {
  return startTransition;
}
function startTransition(cb) {
  if (!rootProjectionNode.current) return;
  rootProjectionNode.current.isUpdating = false;
  rootProjectionNode.current.blockUpdate();
  cb === null || cb === void 0 ? void 0 : cb();
}
function useInstantTransition() {
  var _a = tslib.__read(useForceUpdate(), 2),
    forceUpdate = _a[0],
    forcedRenderCount = _a[1];
  var startInstantLayoutTransition = useInstantLayoutTransition();
  React.useEffect(function () {
    /**
     * Unblock after two animation frames, otherwise this will unblock too soon.
     */
    sync__default["default"].postRender(function () {
      return sync__default["default"].postRender(function () {
        return instantAnimationState.current = false;
      });
    });
  }, [forcedRenderCount]);
  return function (callback) {
    startInstantLayoutTransition(function () {
      instantAnimationState.current = true;
      forceUpdate();
      callback();
    });
  };
}
function useResetProjection() {
  var reset = React__namespace.useCallback(function () {
    var root = rootProjectionNode.current;
    if (!root) return;
    root.resetTree();
  }, []);
  return reset;
}
var createObject = function () {
  return {};
};
var stateVisualElement = visualElement({
  build: function () {},
  measureViewportBox: createBox,
  resetTransform: function () {},
  restoreTransform: function () {},
  removeValueFromRenderState: function () {},
  render: function () {},
  scrapeMotionValuesFromProps: createObject,
  readValueFromInstance: function (_state, key, options) {
    return options.initialState[key] || 0;
  },
  makeTargetAnimatable: function (element, _a) {
    var transition = _a.transition,
      transitionEnd = _a.transitionEnd,
      target = tslib.__rest(_a, ["transition", "transitionEnd"]);
    var origin = getOrigin(target, transition || {}, element);
    checkTargetForNewValues(element, target, origin);
    return tslib.__assign({
      transition: transition,
      transitionEnd: transitionEnd
    }, target);
  }
});
var useVisualState = makeUseVisualState({
  scrapeMotionValuesFromProps: createObject,
  createRenderState: createObject
});
/**
 * This is not an officially supported API and may be removed
 * on any version.
 */
function useAnimatedState(initialState) {
  var _a = tslib.__read(React.useState(initialState), 2),
    animationState = _a[0],
    setAnimationState = _a[1];
  var visualState = useVisualState({}, false);
  var element = useConstant(function () {
    return stateVisualElement({
      props: {},
      visualState: visualState
    }, {
      initialState: initialState
    });
  });
  React.useEffect(function () {
    element.mount({});
    return element.unmount;
  }, [element]);
  React.useEffect(function () {
    element.setProps({
      onUpdate: function (v) {
        setAnimationState(tslib.__assign({}, v));
      }
    });
  }, [setAnimationState, element]);
  var startAnimation = useConstant(function () {
    return function (animationDefinition) {
      return animateVisualElement(element, animationDefinition);
    };
  });
  return [animationState, startAnimation];
}

// Keep things reasonable and avoid scale: Infinity. In practise we might need
// to add another value, opacity, that could interpolate scaleX/Y [0,0.01] => [0,1]
// to simply hide content at unreasonable scales.
var maxScale = 100000;
var invertScale = function (scale) {
  return scale > 0.001 ? 1 / scale : maxScale;
};
var hasWarned = false;
/**
 * Returns a `MotionValue` each for `scaleX` and `scaleY` that update with the inverse
 * of their respective parent scales.
 *
 * This is useful for undoing the distortion of content when scaling a parent component.
 *
 * By default, `useInvertedScale` will automatically fetch `scaleX` and `scaleY` from the nearest parent.
 * By passing other `MotionValue`s in as `useInvertedScale({ scaleX, scaleY })`, it will invert the output
 * of those instead.
 *
 * ```jsx
 * const MyComponent = () => {
 *   const { scaleX, scaleY } = useInvertedScale()
 *   return <motion.div style={{ scaleX, scaleY }} />
 * }
 * ```
 *
 * @deprecated
 */
function useInvertedScale(scale) {
  var parentScaleX = useMotionValue(1);
  var parentScaleY = useMotionValue(1);
  var visualElement = useVisualElementContext();
  heyListen.invariant(!!(scale || visualElement), "If no scale values are provided, useInvertedScale must be used within a child of another motion component.");
  heyListen.warning(hasWarned, "useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead.");
  hasWarned = true;
  if (scale) {
    parentScaleX = scale.scaleX || parentScaleX;
    parentScaleY = scale.scaleY || parentScaleY;
  } else if (visualElement) {
    parentScaleX = visualElement.getValue("scaleX", 1);
    parentScaleY = visualElement.getValue("scaleY", 1);
  }
  var scaleX = useTransform(parentScaleX, invertScale);
  var scaleY = useTransform(parentScaleY, invertScale);
  return {
    scaleX: scaleX,
    scaleY: scaleY
  };
}
exports.AnimatePresence = AnimatePresence;
exports.AnimateSharedLayout = AnimateSharedLayout;
exports.DeprecatedLayoutGroupContext = DeprecatedLayoutGroupContext;
exports.DragControls = DragControls;
exports.FlatTree = FlatTree;
exports.LayoutGroup = LayoutGroup;
exports.LayoutGroupContext = LayoutGroupContext;
exports.LazyMotion = LazyMotion;
exports.MotionConfig = MotionConfig;
exports.MotionConfigContext = MotionConfigContext;
exports.MotionContext = MotionContext;
exports.MotionValue = MotionValue;
exports.PresenceContext = PresenceContext;
exports.Reorder = Reorder;
exports.SwitchLayoutGroupContext = SwitchLayoutGroupContext;
exports.addPointerEvent = addPointerEvent;
exports.addScaleCorrector = addScaleCorrector;
exports.animate = animate;
exports.animateVisualElement = animateVisualElement;
exports.animationControls = animationControls;
exports.animations = animations;
exports.calcLength = calcLength;
exports.checkTargetForNewValues = checkTargetForNewValues;
exports.createBox = createBox;
exports.createDomMotionComponent = createDomMotionComponent;
exports.createMotionComponent = createMotionComponent;
exports.domAnimation = domAnimation;
exports.domMax = domMax;
exports.filterProps = filterProps;
exports.isBrowser = isBrowser;
exports.isDragActive = isDragActive;
exports.isMotionValue = isMotionValue;
exports.isValidMotionProp = isValidMotionProp;
exports.m = m;
exports.makeUseVisualState = makeUseVisualState;
exports.motion = motion;
exports.motionValue = motionValue;
exports.resolveMotionValue = resolveMotionValue;
exports.transform = transform;
exports.useAnimation = useAnimation;
exports.useAnimationControls = useAnimationControls;
exports.useAnimationFrame = useAnimationFrame;
exports.useCycle = useCycle;
exports.useDeprecatedAnimatedState = useAnimatedState;
exports.useDeprecatedInvertedScale = useInvertedScale;
exports.useDomEvent = useDomEvent;
exports.useDragControls = useDragControls;
exports.useElementScroll = useElementScroll;
exports.useForceUpdate = useForceUpdate;
exports.useInView = useInView;
exports.useInstantLayoutTransition = useInstantLayoutTransition;
exports.useInstantTransition = useInstantTransition;
exports.useIsPresent = useIsPresent;
exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
exports.useMotionTemplate = useMotionTemplate;
exports.useMotionValue = useMotionValue;
exports.usePresence = usePresence;
exports.useReducedMotion = useReducedMotion;
exports.useReducedMotionConfig = useReducedMotionConfig;
exports.useResetProjection = useResetProjection;
exports.useScroll = useScroll;
exports.useSpring = useSpring;
exports.useTime = useTime;
exports.useTransform = useTransform;
exports.useUnmountEffect = useUnmountEffect;
exports.useVelocity = useVelocity;
exports.useViewportScroll = useViewportScroll;
exports.useVisualElementContext = useVisualElementContext;
exports.visualElement = visualElement;
exports.wrapHandler = wrapHandler;

/***/ }),

/***/ "../../../node_modules/framesync/dist/framesync.cjs.js":
/*!*************************************************************!*\
  !*** ../../../node_modules/framesync/dist/framesync.cjs.js ***!
  \*************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
const defaultTimestep = 1 / 60 * 1000;
const getCurrentTime = typeof performance !== "undefined" ? () => performance.now() : () => Date.now();
const onNextFrame = typeof window !== "undefined" ? callback => window.requestAnimationFrame(callback) : callback => setTimeout(() => callback(getCurrentTime()), defaultTimestep);
function createRenderStep(runNextFrame) {
  let toRun = [];
  let toRunNextFrame = [];
  let numToRun = 0;
  let isProcessing = false;
  let flushNextFrame = false;
  const toKeepAlive = new WeakSet();
  const step = {
    schedule: function (callback) {
      let keepAlive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      let immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
      const addToCurrentFrame = immediate && isProcessing;
      const buffer = addToCurrentFrame ? toRun : toRunNextFrame;
      if (keepAlive) toKeepAlive.add(callback);
      if (buffer.indexOf(callback) === -1) {
        buffer.push(callback);
        if (addToCurrentFrame && isProcessing) numToRun = toRun.length;
      }
      return callback;
    },
    cancel: callback => {
      const index = toRunNextFrame.indexOf(callback);
      if (index !== -1) toRunNextFrame.splice(index, 1);
      toKeepAlive.delete(callback);
    },
    process: frameData => {
      if (isProcessing) {
        flushNextFrame = true;
        return;
      }
      isProcessing = true;
      [toRun, toRunNextFrame] = [toRunNextFrame, toRun];
      toRunNextFrame.length = 0;
      numToRun = toRun.length;
      if (numToRun) {
        for (let i = 0; i < numToRun; i++) {
          const callback = toRun[i];
          callback(frameData);
          if (toKeepAlive.has(callback)) {
            step.schedule(callback);
            runNextFrame();
          }
        }
      }
      isProcessing = false;
      if (flushNextFrame) {
        flushNextFrame = false;
        step.process(frameData);
      }
    }
  };
  return step;
}
const maxElapsed = 40;
let useDefaultElapsed = true;
let runNextFrame = false;
let isProcessing = false;
const frame = {
  delta: 0,
  timestamp: 0
};
const stepsOrder = ["read", "update", "preRender", "render", "postRender"];
const steps = stepsOrder.reduce((acc, key) => {
  acc[key] = createRenderStep(() => runNextFrame = true);
  return acc;
}, {});
const sync = stepsOrder.reduce((acc, key) => {
  const step = steps[key];
  acc[key] = function (process) {
    let keepAlive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
    let immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
    if (!runNextFrame) startLoop();
    return step.schedule(process, keepAlive, immediate);
  };
  return acc;
}, {});
const cancelSync = stepsOrder.reduce((acc, key) => {
  acc[key] = steps[key].cancel;
  return acc;
}, {});
const flushSync = stepsOrder.reduce((acc, key) => {
  acc[key] = () => steps[key].process(frame);
  return acc;
}, {});
const processStep = stepId => steps[stepId].process(frame);
const processFrame = timestamp => {
  runNextFrame = false;
  frame.delta = useDefaultElapsed ? defaultTimestep : Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);
  frame.timestamp = timestamp;
  isProcessing = true;
  stepsOrder.forEach(processStep);
  isProcessing = false;
  if (runNextFrame) {
    useDefaultElapsed = false;
    onNextFrame(processFrame);
  }
};
const startLoop = () => {
  runNextFrame = true;
  useDefaultElapsed = true;
  if (!isProcessing) onNextFrame(processFrame);
};
const getFrameData = () => frame;
exports.cancelSync = cancelSync;
exports["default"] = sync;
exports.flushSync = flushSync;
exports.getFrameData = getFrameData;

/***/ }),

/***/ "../../../node_modules/get-nonce/dist/es2015/index.js":
/*!************************************************************!*\
  !*** ../../../node_modules/get-nonce/dist/es2015/index.js ***!
  \************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.setNonce = exports.getNonce = void 0;
var currentNonce;
var setNonce = function (nonce) {
  currentNonce = nonce;
};
exports.setNonce = setNonce;
var getNonce = function () {
  if (currentNonce) {
    return currentNonce;
  }
  if (true) {
    return __webpack_require__.nc;
  }
  return undefined;
};
exports.getNonce = getNonce;

/***/ }),

/***/ "../../../node_modules/graphql-ws/lib/client.mjs":
/*!*******************************************************!*\
  !*** ../../../node_modules/graphql-ws/lib/client.mjs ***!
  \*******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
var _exportNames = {
  createClient: true
};
exports.createClient = createClient;
var _common = __webpack_require__(/*! ./common.mjs */ "../../../node_modules/graphql-ws/lib/common.mjs");
Object.keys(_common).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _common[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _common[key];
    }
  });
});
var _utils = __webpack_require__(/*! ./utils.mjs */ "../../../node_modules/graphql-ws/lib/utils.mjs");
/**
 *
 * client
 *
 */

/** This file is the entry point for browsers, re-export common elements. */

/**
 * Creates a disposable GraphQL over WebSocket client.
 *
 * @category Client
 */
function createClient(options) {
  const {
    url,
    connectionParams,
    lazy = true,
    onNonLazyError = console.error,
    lazyCloseTimeout = 0,
    keepAlive = 0,
    disablePong,
    connectionAckWaitTimeout = 0,
    retryAttempts = 5,
    retryWait = async function randomisedExponentialBackoff(retries) {
      let retryDelay = 1000; // start with 1s delay
      for (let i = 0; i < retries; i++) {
        retryDelay *= 2;
      }
      await new Promise(resolve => setTimeout(resolve, retryDelay +
      // add random timeout from 300ms to 3s
      Math.floor(Math.random() * (3000 - 300) + 300)));
    },
    isFatalConnectionProblem = errOrCloseEvent =>
    // non `CloseEvent`s are fatal by default
    !isLikeCloseEvent(errOrCloseEvent),
    on,
    webSocketImpl,
    /**
     * Generates a v4 UUID to be used as the ID using `Math`
     * as the random number generator. Supply your own generator
     * in case you need more uniqueness.
     *
     * Reference: https://gist.github.com/jed/982883
     */
    generateID = function generateUUID() {
      return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
        const r = Math.random() * 16 | 0,
          v = c == 'x' ? r : r & 0x3 | 0x8;
        return v.toString(16);
      });
    },
    jsonMessageReplacer: replacer,
    jsonMessageReviver: reviver
  } = options;
  let ws;
  if (webSocketImpl) {
    if (!isWebSocket(webSocketImpl)) {
      throw new Error('Invalid WebSocket implementation provided');
    }
    ws = webSocketImpl;
  } else if (typeof WebSocket !== 'undefined') {
    ws = WebSocket;
  } else if (typeof __webpack_require__.g !== 'undefined') {
    ws = __webpack_require__.g.WebSocket ||
    // @ts-expect-error: Support more browsers
    __webpack_require__.g.MozWebSocket;
  } else if (typeof window !== 'undefined') {
    ws = window.WebSocket ||
    // @ts-expect-error: Support more browsers
    window.MozWebSocket;
  }
  if (!ws) throw new Error('WebSocket implementation missing');
  const WebSocketImpl = ws;
  // websocket status emitter, subscriptions are handled differently
  const emitter = (() => {
    const message = (() => {
      const listeners = {};
      return {
        on(id, listener) {
          listeners[id] = listener;
          return () => {
            delete listeners[id];
          };
        },
        emit(message) {
          var _a;
          if ('id' in message) (_a = listeners[message.id]) === null || _a === void 0 ? void 0 : _a.call(listeners, message);
        }
      };
    })();
    const listeners = {
      connecting: (on === null || on === void 0 ? void 0 : on.connecting) ? [on.connecting] : [],
      opened: (on === null || on === void 0 ? void 0 : on.opened) ? [on.opened] : [],
      connected: (on === null || on === void 0 ? void 0 : on.connected) ? [on.connected] : [],
      ping: (on === null || on === void 0 ? void 0 : on.ping) ? [on.ping] : [],
      pong: (on === null || on === void 0 ? void 0 : on.pong) ? [on.pong] : [],
      message: (on === null || on === void 0 ? void 0 : on.message) ? [message.emit, on.message] : [message.emit],
      closed: (on === null || on === void 0 ? void 0 : on.closed) ? [on.closed] : [],
      error: (on === null || on === void 0 ? void 0 : on.error) ? [on.error] : []
    };
    return {
      onMessage: message.on,
      on(event, listener) {
        const l = listeners[event];
        l.push(listener);
        return () => {
          l.splice(l.indexOf(listener), 1);
        };
      },
      emit(event) {
        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
          args[_key - 1] = arguments[_key];
        }
        // we copy the listeners so that unlistens dont "pull the rug under our feet"
        for (const listener of [...listeners[event]]) {
          // @ts-expect-error: The args should fit
          listener(...args);
        }
      }
    };
  })();
  // invokes the callback either when an error or closed event is emitted,
  // first one that gets called prevails, other emissions are ignored
  function errorOrClosed(cb) {
    const listening = [
    // errors are fatal and more critical than close events, throw them first
    emitter.on('error', err => {
      listening.forEach(unlisten => unlisten());
      cb(err);
    }),
    // closes can be graceful and not fatal, throw them second (if error didnt throw)
    emitter.on('closed', event => {
      listening.forEach(unlisten => unlisten());
      cb(event);
    })];
  }
  let connecting,
    locks = 0,
    retrying = false,
    retries = 0,
    disposed = false;
  async function connect() {
    const [socket, throwOnClose] = await (connecting !== null && connecting !== void 0 ? connecting : connecting = new Promise((connected, denied) => (async () => {
      if (retrying) {
        await retryWait(retries);
        // subscriptions might complete while waiting for retry
        if (!locks) {
          connecting = undefined;
          return denied({
            code: 1000,
            reason: 'All Subscriptions Gone'
          });
        }
        retries++;
      }
      emitter.emit('connecting');
      const socket = new WebSocketImpl(typeof url === 'function' ? await url() : url, _common.GRAPHQL_TRANSPORT_WS_PROTOCOL);
      let connectionAckTimeout, queuedPing;
      function enqueuePing() {
        if (isFinite(keepAlive) && keepAlive > 0) {
          clearTimeout(queuedPing); // in case where a pong was received before a ping (this is valid behaviour)
          queuedPing = setTimeout(() => {
            if (socket.readyState === WebSocketImpl.OPEN) {
              socket.send((0, _common.stringifyMessage)({
                type: _common.MessageType.Ping
              }));
              emitter.emit('ping', false, undefined);
            }
          }, keepAlive);
        }
      }
      errorOrClosed(errOrEvent => {
        connecting = undefined;
        clearTimeout(connectionAckTimeout);
        clearTimeout(queuedPing);
        denied(errOrEvent);
      });
      socket.onerror = err => emitter.emit('error', err);
      socket.onclose = event => emitter.emit('closed', event);
      socket.onopen = async () => {
        try {
          emitter.emit('opened', socket);
          const payload = typeof connectionParams === 'function' ? await connectionParams() : connectionParams;
          socket.send((0, _common.stringifyMessage)(payload ? {
            type: _common.MessageType.ConnectionInit,
            payload
          } : {
            type: _common.MessageType.ConnectionInit
            // payload is completely absent if not provided
          }, replacer));
          if (isFinite(connectionAckWaitTimeout) && connectionAckWaitTimeout > 0) {
            connectionAckTimeout = setTimeout(() => {
              socket.close(_common.CloseCode.ConnectionAcknowledgementTimeout, 'Connection acknowledgement timeout');
            }, connectionAckWaitTimeout);
          }
          enqueuePing(); // enqueue ping (noop if disabled)
        } catch (err) {
          emitter.emit('error', err);
          socket.close(_common.CloseCode.InternalClientError, (0, _utils.limitCloseReason)(err instanceof Error ? err.message : new Error(err).message, 'Internal client error'));
        }
      };
      let acknowledged = false;
      socket.onmessage = _ref => {
        let {
          data
        } = _ref;
        try {
          const message = (0, _common.parseMessage)(data, reviver);
          emitter.emit('message', message);
          if (message.type === 'ping' || message.type === 'pong') {
            emitter.emit(message.type, true, message.payload); // received
            if (message.type === 'pong') {
              enqueuePing(); // enqueue next ping (noop if disabled)
            } else if (!disablePong) {
              // respond with pong on ping
              socket.send((0, _common.stringifyMessage)(message.payload ? {
                type: _common.MessageType.Pong,
                payload: message.payload
              } : {
                type: _common.MessageType.Pong
                // payload is completely absent if not provided
              }));

              emitter.emit('pong', false, message.payload);
            }
            return; // ping and pongs can be received whenever
          }

          if (acknowledged) return; // already connected and acknowledged
          if (message.type !== _common.MessageType.ConnectionAck) throw new Error(`First message cannot be of type ${message.type}`);
          clearTimeout(connectionAckTimeout);
          acknowledged = true;
          emitter.emit('connected', socket, message.payload); // connected = socket opened + acknowledged
          retrying = false; // future lazy connects are not retries
          retries = 0; // reset the retries on connect
          connected([socket, new Promise((_, reject) => errorOrClosed(reject))]);
        } catch (err) {
          socket.onmessage = null; // stop reading messages as soon as reading breaks once
          emitter.emit('error', err);
          socket.close(_common.CloseCode.BadResponse, (0, _utils.limitCloseReason)(err instanceof Error ? err.message : new Error(err).message, 'Bad response'));
        }
      };
    })()));
    // if the provided socket is in a closing state, wait for the throw on close
    if (socket.readyState === WebSocketImpl.CLOSING) await throwOnClose;
    let release = () => {
      // releases this connection
    };
    const released = new Promise(resolve => release = resolve);
    return [socket, release, Promise.race([
    // wait for
    released.then(() => {
      if (!locks) {
        // and if no more locks are present, complete the connection
        const complete = () => socket.close(1000, 'Normal Closure');
        if (isFinite(lazyCloseTimeout) && lazyCloseTimeout > 0) {
          // if the keepalive is set, allow for the specified calmdown time and
          // then complete. but only if no lock got created in the meantime and
          // if the socket is still open
          setTimeout(() => {
            if (!locks && socket.readyState === WebSocketImpl.OPEN) complete();
          }, lazyCloseTimeout);
        } else {
          // otherwise complete immediately
          complete();
        }
      }
    }),
    // or
    throwOnClose])];
  }
  /**
   * Checks the `connect` problem and evaluates if the client should retry.
   */
  function shouldRetryConnectOrThrow(errOrCloseEvent) {
    // some close codes are worth reporting immediately
    if (isLikeCloseEvent(errOrCloseEvent) && (isFatalInternalCloseCode(errOrCloseEvent.code) || [_common.CloseCode.InternalServerError, _common.CloseCode.InternalClientError, _common.CloseCode.BadRequest, _common.CloseCode.BadResponse, _common.CloseCode.Unauthorized,
    // CloseCode.Forbidden, might grant access out after retry
    _common.CloseCode.SubprotocolNotAcceptable,
    // CloseCode.ConnectionInitialisationTimeout, might not time out after retry
    // CloseCode.ConnectionAcknowledgementTimeout, might not time out after retry
    _common.CloseCode.SubscriberAlreadyExists, _common.CloseCode.TooManyInitialisationRequests].includes(errOrCloseEvent.code))) throw errOrCloseEvent;
    // client was disposed, no retries should proceed regardless
    if (disposed) return false;
    // normal closure (possibly all subscriptions have completed)
    // if no locks were acquired in the meantime, shouldnt try again
    if (isLikeCloseEvent(errOrCloseEvent) && errOrCloseEvent.code === 1000) return locks > 0;
    // retries are not allowed or we tried to many times, report error
    if (!retryAttempts || retries >= retryAttempts) throw errOrCloseEvent;
    // throw fatal connection problems immediately
    if (isFatalConnectionProblem(errOrCloseEvent)) throw errOrCloseEvent;
    // looks good, start retrying
    return retrying = true;
  }
  // in non-lazy (hot?) mode always hold one connection lock to persist the socket
  if (!lazy) {
    (async () => {
      locks++;
      for (;;) {
        try {
          const [,, throwOnClose] = await connect();
          await throwOnClose; // will always throw because releaser is not used
        } catch (errOrCloseEvent) {
          try {
            if (!shouldRetryConnectOrThrow(errOrCloseEvent)) return;
          } catch (errOrCloseEvent) {
            // report thrown error, no further retries
            return onNonLazyError === null || onNonLazyError === void 0 ? void 0 : onNonLazyError(errOrCloseEvent);
          }
        }
      }
    })();
  }
  return {
    on: emitter.on,
    subscribe(payload, sink) {
      const id = generateID();
      let done = false,
        errored = false,
        releaser = () => {
          // for handling completions before connect
          locks--;
          done = true;
        };
      (async () => {
        locks++;
        for (;;) {
          try {
            const [socket, release, waitForReleaseOrThrowOnClose] = await connect();
            // if done while waiting for connect, release the connection lock right away
            if (done) return release();
            const unlisten = emitter.onMessage(id, message => {
              switch (message.type) {
                case _common.MessageType.Next:
                  {
                    // eslint-disable-next-line @typescript-eslint/no-explicit-any
                    sink.next(message.payload);
                    return;
                  }
                case _common.MessageType.Error:
                  {
                    errored = true, done = true;
                    sink.error(message.payload);
                    releaser();
                    return;
                  }
                case _common.MessageType.Complete:
                  {
                    done = true;
                    releaser(); // release completes the sink
                    return;
                  }
              }
            });
            socket.send((0, _common.stringifyMessage)({
              id,
              type: _common.MessageType.Subscribe,
              payload
            }, replacer));
            releaser = () => {
              if (!done && socket.readyState === WebSocketImpl.OPEN)
                // if not completed already and socket is open, send complete message to server on release
                socket.send((0, _common.stringifyMessage)({
                  id,
                  type: _common.MessageType.Complete
                }, replacer));
              locks--;
              done = true;
              release();
            };
            // either the releaser will be called, connection completed and
            // the promise resolved or the socket closed and the promise rejected.
            // whatever happens though, we want to stop listening for messages
            await waitForReleaseOrThrowOnClose.finally(unlisten);
            return; // completed, shouldnt try again
          } catch (errOrCloseEvent) {
            if (!shouldRetryConnectOrThrow(errOrCloseEvent)) return;
          }
        }
      })().then(() => {
        // delivering either an error or a complete terminates the sequence
        if (!errored) sink.complete();
      }) // resolves on release or normal closure
      .catch(err => {
        sink.error(err);
      }); // rejects on close events and errors
      return () => {
        // dispose only of active subscriptions
        if (!done) releaser();
      };
    },
    async dispose() {
      disposed = true;
      if (connecting) {
        // if there is a connection, close it
        const [socket] = await connecting;
        socket.close(1000, 'Normal Closure');
      }
    }
  };
}
function isLikeCloseEvent(val) {
  return (0, _utils.isObject)(val) && 'code' in val && 'reason' in val;
}
function isFatalInternalCloseCode(code) {
  if ([1000, 1001, 1006, 1005, 1012, 1013, 1013 // Bad Gateway
  ].includes(code)) return false;
  // all other internal errors are fatal
  return code >= 1000 && code <= 1999;
}
function isWebSocket(val) {
  return typeof val === 'function' && 'constructor' in val && 'CLOSED' in val && 'CLOSING' in val && 'CONNECTING' in val && 'OPEN' in val;
}

/***/ }),

/***/ "../../../node_modules/graphql-ws/lib/common.mjs":
/*!*******************************************************!*\
  !*** ../../../node_modules/graphql-ws/lib/common.mjs ***!
  \*******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.MessageType = exports.GRAPHQL_TRANSPORT_WS_PROTOCOL = exports.CloseCode = void 0;
exports.isMessage = isMessage;
exports.parseMessage = parseMessage;
exports.stringifyMessage = stringifyMessage;
var _utils = __webpack_require__(/*! ./utils.mjs */ "../../../node_modules/graphql-ws/lib/utils.mjs");
/**
 *
 * common
 *
 */

/**
 * The WebSocket sub-protocol used for the [GraphQL over WebSocket Protocol](/PROTOCOL.md).
 *
 * @category Common
 */
const GRAPHQL_TRANSPORT_WS_PROTOCOL = 'graphql-transport-ws';
/**
 * `graphql-ws` expected and standard close codes of the [GraphQL over WebSocket Protocol](/PROTOCOL.md).
 *
 * @category Common
 */
exports.GRAPHQL_TRANSPORT_WS_PROTOCOL = GRAPHQL_TRANSPORT_WS_PROTOCOL;
var CloseCode;
exports.CloseCode = CloseCode;
(function (CloseCode) {
  CloseCode[CloseCode["InternalServerError"] = 4500] = "InternalServerError";
  CloseCode[CloseCode["InternalClientError"] = 4005] = "InternalClientError";
  CloseCode[CloseCode["BadRequest"] = 4400] = "BadRequest";
  CloseCode[CloseCode["BadResponse"] = 4004] = "BadResponse";
  /** Tried subscribing before connect ack */
  CloseCode[CloseCode["Unauthorized"] = 4401] = "Unauthorized";
  CloseCode[CloseCode["Forbidden"] = 4403] = "Forbidden";
  CloseCode[CloseCode["SubprotocolNotAcceptable"] = 4406] = "SubprotocolNotAcceptable";
  CloseCode[CloseCode["ConnectionInitialisationTimeout"] = 4408] = "ConnectionInitialisationTimeout";
  CloseCode[CloseCode["ConnectionAcknowledgementTimeout"] = 4504] = "ConnectionAcknowledgementTimeout";
  /** Subscriber distinction is very important */
  CloseCode[CloseCode["SubscriberAlreadyExists"] = 4409] = "SubscriberAlreadyExists";
  CloseCode[CloseCode["TooManyInitialisationRequests"] = 4429] = "TooManyInitialisationRequests";
})(CloseCode || (exports.CloseCode = CloseCode = {}));
/**
 * Types of messages allowed to be sent by the client/server over the WS protocol.
 *
 * @category Common
 */
var MessageType;
exports.MessageType = MessageType;
(function (MessageType) {
  MessageType["ConnectionInit"] = "connection_init";
  MessageType["ConnectionAck"] = "connection_ack";
  MessageType["Ping"] = "ping";
  MessageType["Pong"] = "pong";
  MessageType["Subscribe"] = "subscribe";
  MessageType["Next"] = "next";
  MessageType["Error"] = "error";
  MessageType["Complete"] = "complete";
})(MessageType || (exports.MessageType = MessageType = {}));
/**
 * Checks if the provided value is a message.
 *
 * @category Common
 */
function isMessage(val) {
  if ((0, _utils.isObject)(val)) {
    // all messages must have the `type` prop
    if (!(0, _utils.hasOwnStringProperty)(val, 'type')) {
      return false;
    }
    // validate other properties depending on the `type`
    switch (val.type) {
      case MessageType.ConnectionInit:
        // the connection init message can have optional payload object
        return !(0, _utils.hasOwnProperty)(val, 'payload') || val.payload === undefined || (0, _utils.isObject)(val.payload);
      case MessageType.ConnectionAck:
      case MessageType.Ping:
      case MessageType.Pong:
        // the connection ack, ping and pong messages can have optional payload object too
        return !(0, _utils.hasOwnProperty)(val, 'payload') || val.payload === undefined || (0, _utils.isObject)(val.payload);
      case MessageType.Subscribe:
        return (0, _utils.hasOwnStringProperty)(val, 'id') && (0, _utils.hasOwnObjectProperty)(val, 'payload') && (!(0, _utils.hasOwnProperty)(val.payload, 'operationName') || val.payload.operationName === undefined || val.payload.operationName === null || typeof val.payload.operationName === 'string') && (0, _utils.hasOwnStringProperty)(val.payload, 'query') && (!(0, _utils.hasOwnProperty)(val.payload, 'variables') || val.payload.variables === undefined || val.payload.variables === null || (0, _utils.hasOwnObjectProperty)(val.payload, 'variables')) && (!(0, _utils.hasOwnProperty)(val.payload, 'extensions') || val.payload.extensions === undefined || val.payload.extensions === null || (0, _utils.hasOwnObjectProperty)(val.payload, 'extensions'));
      case MessageType.Next:
        return (0, _utils.hasOwnStringProperty)(val, 'id') && (0, _utils.hasOwnObjectProperty)(val, 'payload');
      case MessageType.Error:
        return (0, _utils.hasOwnStringProperty)(val, 'id') && (0, _utils.areGraphQLErrors)(val.payload);
      case MessageType.Complete:
        return (0, _utils.hasOwnStringProperty)(val, 'id');
      default:
        return false;
    }
  }
  return false;
}
/**
 * Parses the raw websocket message data to a valid message.
 *
 * @category Common
 */
function parseMessage(data, reviver) {
  if (isMessage(data)) {
    return data;
  }
  if (typeof data !== 'string') {
    throw new Error('Message not parsable');
  }
  const message = JSON.parse(data, reviver);
  if (!isMessage(message)) {
    throw new Error('Invalid message');
  }
  return message;
}
/**
 * Stringifies a valid message ready to be sent through the socket.
 *
 * @category Common
 */
function stringifyMessage(msg, replacer) {
  if (!isMessage(msg)) {
    throw new Error('Cannot stringify invalid message');
  }
  return JSON.stringify(msg, replacer);
}

/***/ }),

/***/ "../../../node_modules/graphql-ws/lib/index.js":
/*!*****************************************************!*\
  !*** ../../../node_modules/graphql-ws/lib/index.js ***!
  \*****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var __createBinding = void 0 && (void 0).__createBinding || (Object.create ? function (o, m, k, k2) {
  if (k2 === undefined) k2 = k;
  Object.defineProperty(o, k2, {
    enumerable: true,
    get: function () {
      return m[k];
    }
  });
} : function (o, m, k, k2) {
  if (k2 === undefined) k2 = k;
  o[k2] = m[k];
});
var __exportStar = void 0 && (void 0).__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(__webpack_require__(/*! ./client */ "../../../node_modules/graphql-ws/lib/client.mjs"), exports);
__exportStar(__webpack_require__(/*! ./server */ "../../../node_modules/graphql-ws/lib/server.mjs"), exports);
__exportStar(__webpack_require__(/*! ./common */ "../../../node_modules/graphql-ws/lib/common.mjs"), exports);

/***/ }),

/***/ "../../../node_modules/graphql-ws/lib/server.mjs":
/*!*******************************************************!*\
  !*** ../../../node_modules/graphql-ws/lib/server.mjs ***!
  \*******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.makeServer = makeServer;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
var _common = __webpack_require__(/*! ./common.mjs */ "../../../node_modules/graphql-ws/lib/common.mjs");
var _utils = __webpack_require__(/*! ./utils.mjs */ "../../../node_modules/graphql-ws/lib/utils.mjs");
/**
 *
 * server
 *
 */
var __asyncValues = void 0 && (void 0).__asyncValues || function (o) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var m = o[Symbol.asyncIterator],
    i;
  return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
    return this;
  }, i);
  function verb(n) {
    i[n] = o[n] && function (v) {
      return new Promise(function (resolve, reject) {
        v = o[n](v), settle(resolve, reject, v.done, v.value);
      });
    };
  }
  function settle(resolve, reject, d, v) {
    Promise.resolve(v).then(function (v) {
      resolve({
        value: v,
        done: d
      });
    }, reject);
  }
};
/**
 * Makes a Protocol complient WebSocket GraphQL server. The server
 * is actually an API which is to be used with your favourite WebSocket
 * server library!
 *
 * Read more about the Protocol in the PROTOCOL.md documentation file.
 *
 * @category Server
 */
function makeServer(options) {
  const {
    schema,
    context,
    roots,
    validate,
    execute,
    subscribe,
    connectionInitWaitTimeout = 3000,
    // 3 seconds
    onConnect,
    onDisconnect,
    onClose,
    onSubscribe,
    onOperation,
    onNext,
    onError,
    onComplete,
    jsonMessageReviver: reviver,
    jsonMessageReplacer: replacer
  } = options;
  return {
    opened(socket, extra) {
      const ctx = {
        connectionInitReceived: false,
        acknowledged: false,
        subscriptions: {},
        extra
      };
      if (socket.protocol !== _common.GRAPHQL_TRANSPORT_WS_PROTOCOL) {
        socket.close(_common.CloseCode.SubprotocolNotAcceptable, 'Subprotocol not acceptable');
        return async (code, reason) => {
          /* nothing was set up, just notify the closure */
          await (onClose === null || onClose === void 0 ? void 0 : onClose(ctx, code, reason));
        };
      }
      // kick the client off (close socket) if the connection has
      // not been initialised after the specified wait timeout
      const connectionInitWait = connectionInitWaitTimeout > 0 && isFinite(connectionInitWaitTimeout) ? setTimeout(() => {
        if (!ctx.connectionInitReceived) socket.close(_common.CloseCode.ConnectionInitialisationTimeout, 'Connection initialisation timeout');
      }, connectionInitWaitTimeout) : null;
      socket.onMessage(async function onMessage(data) {
        var e_1, _a;
        var _b;
        let message;
        try {
          message = (0, _common.parseMessage)(data, reviver);
        } catch (err) {
          return socket.close(_common.CloseCode.BadRequest, 'Invalid message received');
        }
        switch (message.type) {
          case _common.MessageType.ConnectionInit:
            {
              if (ctx.connectionInitReceived) return socket.close(_common.CloseCode.TooManyInitialisationRequests, 'Too many initialisation requests');
              // @ts-expect-error: I can write
              ctx.connectionInitReceived = true;
              if ((0, _utils.isObject)(message.payload))
                // @ts-expect-error: I can write
                ctx.connectionParams = message.payload;
              const permittedOrPayload = await (onConnect === null || onConnect === void 0 ? void 0 : onConnect(ctx));
              if (permittedOrPayload === false) return socket.close(_common.CloseCode.Forbidden, 'Forbidden');
              await socket.send((0, _common.stringifyMessage)((0, _utils.isObject)(permittedOrPayload) ? {
                type: _common.MessageType.ConnectionAck,
                payload: permittedOrPayload
              } : {
                type: _common.MessageType.ConnectionAck
                // payload is completely absent if not provided
              }, replacer));
              // @ts-expect-error: I can write
              ctx.acknowledged = true;
              return;
            }
          case _common.MessageType.Ping:
            {
              if (socket.onPing)
                // if the onPing listener is registered, automatic pong is disabled
                return await socket.onPing(message.payload);
              await socket.send((0, _common.stringifyMessage)(message.payload ? {
                type: _common.MessageType.Pong,
                payload: message.payload
              } : {
                type: _common.MessageType.Pong
                // payload is completely absent if not provided
              }));

              return;
            }
          case _common.MessageType.Pong:
            return await ((_b = socket.onPong) === null || _b === void 0 ? void 0 : _b.call(socket, message.payload));
          case _common.MessageType.Subscribe:
            {
              if (!ctx.acknowledged) return socket.close(_common.CloseCode.Unauthorized, 'Unauthorized');
              const {
                id,
                payload
              } = message;
              if (id in ctx.subscriptions) return socket.close(_common.CloseCode.SubscriberAlreadyExists, `Subscriber for ${id} already exists`);
              // if this turns out to be a streaming operation, the subscription value
              // will change to an `AsyncIterable`, otherwise it will stay as is
              ctx.subscriptions[id] = null;
              const emit = {
                next: async (result, args) => {
                  let nextMessage = {
                    id,
                    type: _common.MessageType.Next,
                    payload: result
                  };
                  const maybeResult = await (onNext === null || onNext === void 0 ? void 0 : onNext(ctx, nextMessage, args, result));
                  if (maybeResult) nextMessage = Object.assign(Object.assign({}, nextMessage), {
                    payload: maybeResult
                  });
                  await socket.send((0, _common.stringifyMessage)(nextMessage, replacer));
                },
                error: async errors => {
                  let errorMessage = {
                    id,
                    type: _common.MessageType.Error,
                    payload: errors
                  };
                  const maybeErrors = await (onError === null || onError === void 0 ? void 0 : onError(ctx, errorMessage, errors));
                  if (maybeErrors) errorMessage = Object.assign(Object.assign({}, errorMessage), {
                    payload: maybeErrors
                  });
                  await socket.send((0, _common.stringifyMessage)(errorMessage, replacer));
                },
                complete: async notifyClient => {
                  const completeMessage = {
                    id,
                    type: _common.MessageType.Complete
                  };
                  await (onComplete === null || onComplete === void 0 ? void 0 : onComplete(ctx, completeMessage));
                  if (notifyClient) await socket.send((0, _common.stringifyMessage)(completeMessage, replacer));
                }
              };
              let execArgs;
              const maybeExecArgsOrErrors = await (onSubscribe === null || onSubscribe === void 0 ? void 0 : onSubscribe(ctx, message));
              if (maybeExecArgsOrErrors) {
                if ((0, _utils.areGraphQLErrors)(maybeExecArgsOrErrors)) return await emit.error(maybeExecArgsOrErrors);else if (Array.isArray(maybeExecArgsOrErrors)) throw new Error('Invalid return value from onSubscribe hook, expected an array of GraphQLError objects');
                // not errors, is exec args
                execArgs = maybeExecArgsOrErrors;
              } else {
                // you either provide a schema dynamically through
                // `onSubscribe` or you set one up during the server setup
                if (!schema) throw new Error('The GraphQL schema is not provided');
                const args = {
                  operationName: payload.operationName,
                  document: (0, _graphql.parse)(payload.query),
                  variableValues: payload.variables
                };
                execArgs = Object.assign(Object.assign({}, args), {
                  schema: typeof schema === 'function' ? await schema(ctx, message, args) : schema
                });
                const validationErrors = (validate !== null && validate !== void 0 ? validate : _graphql.validate)(execArgs.schema, execArgs.document);
                if (validationErrors.length > 0) return await emit.error(validationErrors);
              }
              const operationAST = (0, _graphql.getOperationAST)(execArgs.document, execArgs.operationName);
              if (!operationAST) return await emit.error([new _graphql.GraphQLError('Unable to identify operation')]);
              // if `onSubscribe` didnt specify a rootValue, inject one
              if (!('rootValue' in execArgs)) execArgs.rootValue = roots === null || roots === void 0 ? void 0 : roots[operationAST.operation];
              // if `onSubscribe` didn't specify a context, inject one
              if (!('contextValue' in execArgs)) execArgs.contextValue = typeof context === 'function' ? await context(ctx, message, execArgs) : context;
              // the execution arguments have been prepared
              // perform the operation and act accordingly
              let operationResult;
              if (operationAST.operation === 'subscription') operationResult = await (subscribe !== null && subscribe !== void 0 ? subscribe : _graphql.subscribe)(execArgs);
              // operation === 'query' || 'mutation'
              else operationResult = await (execute !== null && execute !== void 0 ? execute : _graphql.execute)(execArgs);
              const maybeResult = await (onOperation === null || onOperation === void 0 ? void 0 : onOperation(ctx, message, execArgs, operationResult));
              if (maybeResult) operationResult = maybeResult;
              if ((0, _utils.isAsyncIterable)(operationResult)) {
                /** multiple emitted results */
                if (!(id in ctx.subscriptions)) {
                  // subscription was completed/canceled before the operation settled
                  if ((0, _utils.isAsyncGenerator)(operationResult)) operationResult.return(undefined);
                } else {
                  ctx.subscriptions[id] = operationResult;
                  try {
                    for (var operationResult_1 = __asyncValues(operationResult), operationResult_1_1; operationResult_1_1 = await operationResult_1.next(), !operationResult_1_1.done;) {
                      const result = operationResult_1_1.value;
                      await emit.next(result, execArgs);
                    }
                  } catch (e_1_1) {
                    e_1 = {
                      error: e_1_1
                    };
                  } finally {
                    try {
                      if (operationResult_1_1 && !operationResult_1_1.done && (_a = operationResult_1.return)) await _a.call(operationResult_1);
                    } finally {
                      if (e_1) throw e_1.error;
                    }
                  }
                }
              } else {
                /** single emitted result */
                // if the client completed the subscription before the single result
                // became available, he effectively canceled it and no data should be sent
                if (id in ctx.subscriptions) await emit.next(operationResult, execArgs);
              }
              // lack of subscription at this point indicates that the client
              // completed the subscription, he doesnt need to be reminded
              await emit.complete(id in ctx.subscriptions);
              delete ctx.subscriptions[id];
              return;
            }
          case _common.MessageType.Complete:
            {
              const subscription = ctx.subscriptions[message.id];
              if ((0, _utils.isAsyncGenerator)(subscription)) await subscription.return(undefined);
              delete ctx.subscriptions[message.id]; // deleting the subscription means no further activity should take place
              return;
            }
          default:
            throw new Error(`Unexpected message of type ${message.type} received`);
        }
      });
      // wait for close, cleanup and the disconnect callback
      return async (code, reason) => {
        if (connectionInitWait) clearTimeout(connectionInitWait);
        for (const sub of Object.values(ctx.subscriptions)) {
          if ((0, _utils.isAsyncGenerator)(sub)) await sub.return(undefined);
        }
        if (ctx.acknowledged) await (onDisconnect === null || onDisconnect === void 0 ? void 0 : onDisconnect(ctx, code, reason));
        await (onClose === null || onClose === void 0 ? void 0 : onClose(ctx, code, reason));
      };
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql-ws/lib/utils.mjs":
/*!******************************************************!*\
  !*** ../../../node_modules/graphql-ws/lib/utils.mjs ***!
  \******************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.areGraphQLErrors = areGraphQLErrors;
exports.hasOwnArrayProperty = hasOwnArrayProperty;
exports.hasOwnObjectProperty = hasOwnObjectProperty;
exports.hasOwnProperty = hasOwnProperty;
exports.hasOwnStringProperty = hasOwnStringProperty;
exports.isAsyncGenerator = isAsyncGenerator;
exports.isAsyncIterable = isAsyncIterable;
exports.isObject = isObject;
exports.limitCloseReason = limitCloseReason;
// Extremely small optimisation, reduces runtime prototype traversal
const baseHasOwnProperty = Object.prototype.hasOwnProperty;
/** @private */
function isObject(val) {
  return typeof val === 'object' && val !== null;
}
/** @private */
function isAsyncIterable(val) {
  return typeof Object(val)[Symbol.asyncIterator] === 'function';
}
/** @private */
function isAsyncGenerator(val) {
  return isObject(val) && typeof Object(val)[Symbol.asyncIterator] === 'function' && typeof val.return === 'function'
  // for lazy ones, we only need the return anyway
  // typeof val.throw === 'function' &&
  // typeof val.next === 'function'
  ;
}
/** @private */
function areGraphQLErrors(obj) {
  return Array.isArray(obj) &&
  // must be at least one error
  obj.length > 0 &&
  // error has at least a message
  obj.every(ob => 'message' in ob);
}
/** @private */
function hasOwnProperty(obj, prop) {
  return baseHasOwnProperty.call(obj, prop);
}
/** @private */
function hasOwnObjectProperty(obj, prop) {
  return baseHasOwnProperty.call(obj, prop) && isObject(obj[prop]);
}
/** @private */
function hasOwnArrayProperty(obj, prop) {
  return baseHasOwnProperty.call(obj, prop) && Array.isArray(obj[prop]);
}
/** @private */
function hasOwnStringProperty(obj, prop) {
  return baseHasOwnProperty.call(obj, prop) && typeof obj[prop] === 'string';
}
/**
 * Limits the WebSocket close event reason to not exceed a length of one frame.
 * Reference: https://datatracker.ietf.org/doc/html/rfc6455#section-5.2.
 *
 * @private
 */
function limitCloseReason(reason, whenTooLong) {
  return reason.length < 124 ? reason : whenTooLong;
}

/***/ }),

/***/ "../../../node_modules/graphql/error/GraphQLError.mjs":
/*!************************************************************!*\
  !*** ../../../node_modules/graphql/error/GraphQLError.mjs ***!
  \************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.GraphQLError = void 0;
exports.formatError = formatError;
exports.printError = printError;
var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
var _location = __webpack_require__(/*! ../language/location.mjs */ "../../../node_modules/graphql/language/location.mjs");
var _printLocation = __webpack_require__(/*! ../language/printLocation.mjs */ "../../../node_modules/graphql/language/printLocation.mjs");
function toNormalizedOptions(args) {
  const firstArg = args[0];
  if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {
    return {
      nodes: firstArg,
      source: args[1],
      positions: args[2],
      path: args[3],
      originalError: args[4],
      extensions: args[5]
    };
  }
  return firstArg;
}
/**
 * A GraphQLError describes an Error found during the parse, validate, or
 * execute phases of performing a GraphQL operation. In addition to a message
 * and stack trace, it also includes information about the locations in a
 * GraphQL document and/or execution result that correspond to the Error.
 */

class GraphQLError extends Error {
  /**
   * An array of `{ line, column }` locations within the source GraphQL document
   * which correspond to this error.
   *
   * Errors during validation often contain multiple locations, for example to
   * point out two things with the same name. Errors during execution include a
   * single location, the field which produced the error.
   *
   * Enumerable, and appears in the result of JSON.stringify().
   */

  /**
   * An array describing the JSON-path into the execution response which
   * corresponds to this error. Only included for errors during execution.
   *
   * Enumerable, and appears in the result of JSON.stringify().
   */

  /**
   * An array of GraphQL AST Nodes corresponding to this error.
   */

  /**
   * The source GraphQL document for the first location of this error.
   *
   * Note that if this Error represents more than one node, the source may not
   * represent nodes after the first node.
   */

  /**
   * An array of character offsets within the source GraphQL document
   * which correspond to this error.
   */

  /**
   * The original error thrown from a field resolver during execution.
   */

  /**
   * Extension fields to add to the formatted error.
   */

  /**
   * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
   */
  constructor(message) {
    var _this$nodes, _nodeLocations$, _ref;
    for (var _len = arguments.length, rawArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      rawArgs[_key - 1] = arguments[_key];
    }
    const {
      nodes,
      source,
      positions,
      path,
      originalError,
      extensions
    } = toNormalizedOptions(rawArgs);
    super(message);
    this.name = 'GraphQLError';
    this.path = path !== null && path !== void 0 ? path : undefined;
    this.originalError = originalError !== null && originalError !== void 0 ? originalError : undefined; // Compute list of blame nodes.

    this.nodes = undefinedIfEmpty(Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined);
    const nodeLocations = undefinedIfEmpty((_this$nodes = this.nodes) === null || _this$nodes === void 0 ? void 0 : _this$nodes.map(node => node.loc).filter(loc => loc != null)); // Compute locations in the source for the given nodes/positions.

    this.source = source !== null && source !== void 0 ? source : nodeLocations === null || nodeLocations === void 0 ? void 0 : (_nodeLocations$ = nodeLocations[0]) === null || _nodeLocations$ === void 0 ? void 0 : _nodeLocations$.source;
    this.positions = positions !== null && positions !== void 0 ? positions : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map(loc => loc.start);
    this.locations = positions && source ? positions.map(pos => (0, _location.getLocation)(source, pos)) : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map(loc => (0, _location.getLocation)(loc.source, loc.start));
    const originalExtensions = (0, _isObjectLike.isObjectLike)(originalError === null || originalError === void 0 ? void 0 : originalError.extensions) ? originalError === null || originalError === void 0 ? void 0 : originalError.extensions : undefined;
    this.extensions = (_ref = extensions !== null && extensions !== void 0 ? extensions : originalExtensions) !== null && _ref !== void 0 ? _ref : Object.create(null); // Only properties prescribed by the spec should be enumerable.
    // Keep the rest as non-enumerable.

    Object.defineProperties(this, {
      message: {
        writable: true,
        enumerable: true
      },
      name: {
        enumerable: false
      },
      nodes: {
        enumerable: false
      },
      source: {
        enumerable: false
      },
      positions: {
        enumerable: false
      },
      originalError: {
        enumerable: false
      }
    }); // Include (non-enumerable) stack trace.

    /* c8 ignore start */
    // FIXME: https://github.com/graphql/graphql-js/issues/2317

    if (originalError !== null && originalError !== void 0 && originalError.stack) {
      Object.defineProperty(this, 'stack', {
        value: originalError.stack,
        writable: true,
        configurable: true
      });
    } else if (Error.captureStackTrace) {
      Error.captureStackTrace(this, GraphQLError);
    } else {
      Object.defineProperty(this, 'stack', {
        value: Error().stack,
        writable: true,
        configurable: true
      });
    }
    /* c8 ignore stop */
  }

  get [Symbol.toStringTag]() {
    return 'GraphQLError';
  }
  toString() {
    let output = this.message;
    if (this.nodes) {
      for (const node of this.nodes) {
        if (node.loc) {
          output += '\n\n' + (0, _printLocation.printLocation)(node.loc);
        }
      }
    } else if (this.source && this.locations) {
      for (const location of this.locations) {
        output += '\n\n' + (0, _printLocation.printSourceLocation)(this.source, location);
      }
    }
    return output;
  }
  toJSON() {
    const formattedError = {
      message: this.message
    };
    if (this.locations != null) {
      formattedError.locations = this.locations;
    }
    if (this.path != null) {
      formattedError.path = this.path;
    }
    if (this.extensions != null && Object.keys(this.extensions).length > 0) {
      formattedError.extensions = this.extensions;
    }
    return formattedError;
  }
}
exports.GraphQLError = GraphQLError;
function undefinedIfEmpty(array) {
  return array === undefined || array.length === 0 ? undefined : array;
}
/**
 * See: https://spec.graphql.org/draft/#sec-Errors
 */

/**
 * Prints a GraphQLError to a string, representing useful location information
 * about the error's position in the source.
 *
 * @deprecated Please use `error.toString` instead. Will be removed in v17
 */
function printError(error) {
  return error.toString();
}
/**
 * Given a GraphQLError, format it according to the rules described by the
 * Response Format, Errors section of the GraphQL Specification.
 *
 * @deprecated Please use `error.toJSON` instead. Will be removed in v17
 */

function formatError(error) {
  return error.toJSON();
}

/***/ }),

/***/ "../../../node_modules/graphql/error/index.mjs":
/*!*****************************************************!*\
  !*** ../../../node_modules/graphql/error/index.mjs ***!
  \*****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "GraphQLError", ({
  enumerable: true,
  get: function () {
    return _GraphQLError.GraphQLError;
  }
}));
Object.defineProperty(exports, "formatError", ({
  enumerable: true,
  get: function () {
    return _GraphQLError.formatError;
  }
}));
Object.defineProperty(exports, "locatedError", ({
  enumerable: true,
  get: function () {
    return _locatedError.locatedError;
  }
}));
Object.defineProperty(exports, "printError", ({
  enumerable: true,
  get: function () {
    return _GraphQLError.printError;
  }
}));
Object.defineProperty(exports, "syntaxError", ({
  enumerable: true,
  get: function () {
    return _syntaxError.syntaxError;
  }
}));
var _GraphQLError = __webpack_require__(/*! ./GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _syntaxError = __webpack_require__(/*! ./syntaxError.mjs */ "../../../node_modules/graphql/error/syntaxError.mjs");
var _locatedError = __webpack_require__(/*! ./locatedError.mjs */ "../../../node_modules/graphql/error/locatedError.mjs");

/***/ }),

/***/ "../../../node_modules/graphql/error/locatedError.mjs":
/*!************************************************************!*\
  !*** ../../../node_modules/graphql/error/locatedError.mjs ***!
  \************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.locatedError = locatedError;
var _toError = __webpack_require__(/*! ../jsutils/toError.mjs */ "../../../node_modules/graphql/jsutils/toError.mjs");
var _GraphQLError = __webpack_require__(/*! ./GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Given an arbitrary value, presumably thrown while attempting to execute a
 * GraphQL operation, produce a new GraphQLError aware of the location in the
 * document responsible for the original Error.
 */

function locatedError(rawOriginalError, nodes, path) {
  var _nodes;
  const originalError = (0, _toError.toError)(rawOriginalError); // Note: this uses a brand-check to support GraphQL errors originating from other contexts.

  if (isLocatedGraphQLError(originalError)) {
    return originalError;
  }
  return new _GraphQLError.GraphQLError(originalError.message, {
    nodes: (_nodes = originalError.nodes) !== null && _nodes !== void 0 ? _nodes : nodes,
    source: originalError.source,
    positions: originalError.positions,
    path,
    originalError
  });
}
function isLocatedGraphQLError(error) {
  return Array.isArray(error.path);
}

/***/ }),

/***/ "../../../node_modules/graphql/error/syntaxError.mjs":
/*!***********************************************************!*\
  !*** ../../../node_modules/graphql/error/syntaxError.mjs ***!
  \***********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.syntaxError = syntaxError;
var _GraphQLError = __webpack_require__(/*! ./GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Produces a GraphQLError representing a syntax error, containing useful
 * descriptive information about the syntax error's position in the source.
 */

function syntaxError(source, position, description) {
  return new _GraphQLError.GraphQLError(`Syntax Error: ${description}`, {
    source,
    positions: [position]
  });
}

/***/ }),

/***/ "../../../node_modules/graphql/execution/collectFields.mjs":
/*!*****************************************************************!*\
  !*** ../../../node_modules/graphql/execution/collectFields.mjs ***!
  \*****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.collectFields = collectFields;
exports.collectSubfields = collectSubfields;
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
var _typeFromAST = __webpack_require__(/*! ../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
var _values = __webpack_require__(/*! ./values.mjs */ "../../../node_modules/graphql/execution/values.mjs");
/**
 * Given a selectionSet, collects all of the fields and returns them.
 *
 * CollectFields requires the "runtime type" of an object. For a field that
 * returns an Interface or Union type, the "runtime type" will be the actual
 * object type returned by that field.
 *
 * @internal
 */

function collectFields(schema, fragments, variableValues, runtimeType, selectionSet) {
  const fields = new Map();
  collectFieldsImpl(schema, fragments, variableValues, runtimeType, selectionSet, fields, new Set());
  return fields;
}
/**
 * Given an array of field nodes, collects all of the subfields of the passed
 * in fields, and returns them at the end.
 *
 * CollectSubFields requires the "return type" of an object. For a field that
 * returns an Interface or Union type, the "return type" will be the actual
 * object type returned by that field.
 *
 * @internal
 */

function collectSubfields(schema, fragments, variableValues, returnType, fieldNodes) {
  const subFieldNodes = new Map();
  const visitedFragmentNames = new Set();
  for (const node of fieldNodes) {
    if (node.selectionSet) {
      collectFieldsImpl(schema, fragments, variableValues, returnType, node.selectionSet, subFieldNodes, visitedFragmentNames);
    }
  }
  return subFieldNodes;
}
function collectFieldsImpl(schema, fragments, variableValues, runtimeType, selectionSet, fields, visitedFragmentNames) {
  for (const selection of selectionSet.selections) {
    switch (selection.kind) {
      case _kinds.Kind.FIELD:
        {
          if (!shouldIncludeNode(variableValues, selection)) {
            continue;
          }
          const name = getFieldEntryKey(selection);
          const fieldList = fields.get(name);
          if (fieldList !== undefined) {
            fieldList.push(selection);
          } else {
            fields.set(name, [selection]);
          }
          break;
        }
      case _kinds.Kind.INLINE_FRAGMENT:
        {
          if (!shouldIncludeNode(variableValues, selection) || !doesFragmentConditionMatch(schema, selection, runtimeType)) {
            continue;
          }
          collectFieldsImpl(schema, fragments, variableValues, runtimeType, selection.selectionSet, fields, visitedFragmentNames);
          break;
        }
      case _kinds.Kind.FRAGMENT_SPREAD:
        {
          const fragName = selection.name.value;
          if (visitedFragmentNames.has(fragName) || !shouldIncludeNode(variableValues, selection)) {
            continue;
          }
          visitedFragmentNames.add(fragName);
          const fragment = fragments[fragName];
          if (!fragment || !doesFragmentConditionMatch(schema, fragment, runtimeType)) {
            continue;
          }
          collectFieldsImpl(schema, fragments, variableValues, runtimeType, fragment.selectionSet, fields, visitedFragmentNames);
          break;
        }
    }
  }
}
/**
 * Determines if a field should be included based on the `@include` and `@skip`
 * directives, where `@skip` has higher precedence than `@include`.
 */

function shouldIncludeNode(variableValues, node) {
  const skip = (0, _values.getDirectiveValues)(_directives.GraphQLSkipDirective, node, variableValues);
  if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) {
    return false;
  }
  const include = (0, _values.getDirectiveValues)(_directives.GraphQLIncludeDirective, node, variableValues);
  if ((include === null || include === void 0 ? void 0 : include.if) === false) {
    return false;
  }
  return true;
}
/**
 * Determines if a fragment is applicable to the given type.
 */

function doesFragmentConditionMatch(schema, fragment, type) {
  const typeConditionNode = fragment.typeCondition;
  if (!typeConditionNode) {
    return true;
  }
  const conditionalType = (0, _typeFromAST.typeFromAST)(schema, typeConditionNode);
  if (conditionalType === type) {
    return true;
  }
  if ((0, _definition.isAbstractType)(conditionalType)) {
    return schema.isSubType(conditionalType, type);
  }
  return false;
}
/**
 * Implements the logic to compute the key of a given field's entry
 */

function getFieldEntryKey(node) {
  return node.alias ? node.alias.value : node.name.value;
}

/***/ }),

/***/ "../../../node_modules/graphql/execution/execute.mjs":
/*!***********************************************************!*\
  !*** ../../../node_modules/graphql/execution/execute.mjs ***!
  \***********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.assertValidExecutionArguments = assertValidExecutionArguments;
exports.buildExecutionContext = buildExecutionContext;
exports.buildResolveInfo = buildResolveInfo;
exports.defaultTypeResolver = exports.defaultFieldResolver = void 0;
exports.execute = execute;
exports.executeSync = executeSync;
exports.getFieldDef = getFieldDef;
var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _isIterableObject = __webpack_require__(/*! ../jsutils/isIterableObject.mjs */ "../../../node_modules/graphql/jsutils/isIterableObject.mjs");
var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
var _isPromise = __webpack_require__(/*! ../jsutils/isPromise.mjs */ "../../../node_modules/graphql/jsutils/isPromise.mjs");
var _memoize = __webpack_require__(/*! ../jsutils/memoize3.mjs */ "../../../node_modules/graphql/jsutils/memoize3.mjs");
var _Path = __webpack_require__(/*! ../jsutils/Path.mjs */ "../../../node_modules/graphql/jsutils/Path.mjs");
var _promiseForObject = __webpack_require__(/*! ../jsutils/promiseForObject.mjs */ "../../../node_modules/graphql/jsutils/promiseForObject.mjs");
var _promiseReduce = __webpack_require__(/*! ../jsutils/promiseReduce.mjs */ "../../../node_modules/graphql/jsutils/promiseReduce.mjs");
var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _locatedError = __webpack_require__(/*! ../error/locatedError.mjs */ "../../../node_modules/graphql/error/locatedError.mjs");
var _ast = __webpack_require__(/*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
var _validate = __webpack_require__(/*! ../type/validate.mjs */ "../../../node_modules/graphql/type/validate.mjs");
var _collectFields = __webpack_require__(/*! ./collectFields.mjs */ "../../../node_modules/graphql/execution/collectFields.mjs");
var _values = __webpack_require__(/*! ./values.mjs */ "../../../node_modules/graphql/execution/values.mjs");
/**
 * A memoized collection of relevant subfields with regard to the return
 * type. Memoizing ensures the subfields are not repeatedly calculated, which
 * saves overhead when resolving lists of values.
 */

const collectSubfields = (0, _memoize.memoize3)((exeContext, returnType, fieldNodes) => (0, _collectFields.collectSubfields)(exeContext.schema, exeContext.fragments, exeContext.variableValues, returnType, fieldNodes));
/**
 * Terminology
 *
 * "Definitions" are the generic name for top-level statements in the document.
 * Examples of this include:
 * 1) Operations (such as a query)
 * 2) Fragments
 *
 * "Operations" are a generic name for requests in the document.
 * Examples of this include:
 * 1) query,
 * 2) mutation
 *
 * "Selections" are the definitions that can appear legally and at
 * single level of the query. These include:
 * 1) field references e.g `a`
 * 2) fragment "spreads" e.g. `...c`
 * 3) inline fragment "spreads" e.g. `...on Type { a }`
 */

/**
 * Data that must be available at all points during query execution.
 *
 * Namely, schema of the type system that is currently executing,
 * and the fragments defined in the query document
 */

/**
 * Implements the "Executing requests" section of the GraphQL specification.
 *
 * Returns either a synchronous ExecutionResult (if all encountered resolvers
 * are synchronous), or a Promise of an ExecutionResult that will eventually be
 * resolved and never rejected.
 *
 * If the arguments to this function do not result in a legal execution context,
 * a GraphQLError will be thrown immediately explaining the invalid input.
 */
function execute(args) {
  // Temporary for v15 to v16 migration. Remove in v17
  arguments.length < 2 || (0, _devAssert.devAssert)(false, 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.');
  const {
    schema,
    document,
    variableValues,
    rootValue
  } = args; // If arguments are missing or incorrect, throw an error.

  assertValidExecutionArguments(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments,
  // a "Response" with only errors is returned.

  const exeContext = buildExecutionContext(args); // Return early errors if execution context failed.

  if (!('schema' in exeContext)) {
    return {
      errors: exeContext
    };
  } // Return a Promise that will eventually resolve to the data described by
  // The "Response" section of the GraphQL specification.
  //
  // If errors are encountered while executing a GraphQL field, only that
  // field and its descendants will be omitted, and sibling fields will still
  // be executed. An execution which encounters errors will still result in a
  // resolved Promise.
  //
  // Errors from sub-fields of a NonNull type may propagate to the top level,
  // at which point we still log the error and null the parent field, which
  // in this case is the entire response.

  try {
    const {
      operation
    } = exeContext;
    const result = executeOperation(exeContext, operation, rootValue);
    if ((0, _isPromise.isPromise)(result)) {
      return result.then(data => buildResponse(data, exeContext.errors), error => {
        exeContext.errors.push(error);
        return buildResponse(null, exeContext.errors);
      });
    }
    return buildResponse(result, exeContext.errors);
  } catch (error) {
    exeContext.errors.push(error);
    return buildResponse(null, exeContext.errors);
  }
}
/**
 * Also implements the "Executing requests" section of the GraphQL specification.
 * However, it guarantees to complete synchronously (or throw an error) assuming
 * that all field resolvers are also synchronous.
 */

function executeSync(args) {
  const result = execute(args); // Assert that the execution was synchronous.

  if ((0, _isPromise.isPromise)(result)) {
    throw new Error('GraphQL execution failed to complete synchronously.');
  }
  return result;
}
/**
 * Given a completed execution context and data, build the `{ errors, data }`
 * response defined by the "Response" section of the GraphQL specification.
 */

function buildResponse(data, errors) {
  return errors.length === 0 ? {
    data
  } : {
    errors,
    data
  };
}
/**
 * Essential assertions before executing to provide developer feedback for
 * improper use of the GraphQL library.
 *
 * @internal
 */

function assertValidExecutionArguments(schema, document, rawVariableValues) {
  document || (0, _devAssert.devAssert)(false, 'Must provide document.'); // If the schema used for execution is invalid, throw an error.

  (0, _validate.assertValidSchema)(schema); // Variables, if provided, must be an object.

  rawVariableValues == null || (0, _isObjectLike.isObjectLike)(rawVariableValues) || (0, _devAssert.devAssert)(false, 'Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.');
}
/**
 * Constructs a ExecutionContext object from the arguments passed to
 * execute, which we will pass throughout the other execution methods.
 *
 * Throws a GraphQLError if a valid execution context cannot be created.
 *
 * @internal
 */

function buildExecutionContext(args) {
  var _definition$name, _operation$variableDe;
  const {
    schema,
    document,
    rootValue,
    contextValue,
    variableValues: rawVariableValues,
    operationName,
    fieldResolver,
    typeResolver,
    subscribeFieldResolver
  } = args;
  let operation;
  const fragments = Object.create(null);
  for (const definition of document.definitions) {
    switch (definition.kind) {
      case _kinds.Kind.OPERATION_DEFINITION:
        if (operationName == null) {
          if (operation !== undefined) {
            return [new _GraphQLError.GraphQLError('Must provide operation name if query contains multiple operations.')];
          }
          operation = definition;
        } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) {
          operation = definition;
        }
        break;
      case _kinds.Kind.FRAGMENT_DEFINITION:
        fragments[definition.name.value] = definition;
        break;
      default: // ignore non-executable definitions
    }
  }

  if (!operation) {
    if (operationName != null) {
      return [new _GraphQLError.GraphQLError(`Unknown operation named "${operationName}".`)];
    }
    return [new _GraphQLError.GraphQLError('Must provide an operation.')];
  } // FIXME: https://github.com/graphql/graphql-js/issues/2203

  /* c8 ignore next */

  const variableDefinitions = (_operation$variableDe = operation.variableDefinitions) !== null && _operation$variableDe !== void 0 ? _operation$variableDe : [];
  const coercedVariableValues = (0, _values.getVariableValues)(schema, variableDefinitions, rawVariableValues !== null && rawVariableValues !== void 0 ? rawVariableValues : {}, {
    maxErrors: 50
  });
  if (coercedVariableValues.errors) {
    return coercedVariableValues.errors;
  }
  return {
    schema,
    fragments,
    rootValue,
    contextValue,
    operation,
    variableValues: coercedVariableValues.coerced,
    fieldResolver: fieldResolver !== null && fieldResolver !== void 0 ? fieldResolver : defaultFieldResolver,
    typeResolver: typeResolver !== null && typeResolver !== void 0 ? typeResolver : defaultTypeResolver,
    subscribeFieldResolver: subscribeFieldResolver !== null && subscribeFieldResolver !== void 0 ? subscribeFieldResolver : defaultFieldResolver,
    errors: []
  };
}
/**
 * Implements the "Executing operations" section of the spec.
 */

function executeOperation(exeContext, operation, rootValue) {
  const rootType = exeContext.schema.getRootType(operation.operation);
  if (rootType == null) {
    throw new _GraphQLError.GraphQLError(`Schema is not configured to execute ${operation.operation} operation.`, {
      nodes: operation
    });
  }
  const rootFields = (0, _collectFields.collectFields)(exeContext.schema, exeContext.fragments, exeContext.variableValues, rootType, operation.selectionSet);
  const path = undefined;
  switch (operation.operation) {
    case _ast.OperationTypeNode.QUERY:
      return executeFields(exeContext, rootType, rootValue, path, rootFields);
    case _ast.OperationTypeNode.MUTATION:
      return executeFieldsSerially(exeContext, rootType, rootValue, path, rootFields);
    case _ast.OperationTypeNode.SUBSCRIPTION:
      // TODO: deprecate `subscribe` and move all logic here
      // Temporary solution until we finish merging execute and subscribe together
      return executeFields(exeContext, rootType, rootValue, path, rootFields);
  }
}
/**
 * Implements the "Executing selection sets" section of the spec
 * for fields that must be executed serially.
 */

function executeFieldsSerially(exeContext, parentType, sourceValue, path, fields) {
  return (0, _promiseReduce.promiseReduce)(fields.entries(), (results, _ref) => {
    let [responseName, fieldNodes] = _ref;
    const fieldPath = (0, _Path.addPath)(path, responseName, parentType.name);
    const result = executeField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);
    if (result === undefined) {
      return results;
    }
    if ((0, _isPromise.isPromise)(result)) {
      return result.then(resolvedResult => {
        results[responseName] = resolvedResult;
        return results;
      });
    }
    results[responseName] = result;
    return results;
  }, Object.create(null));
}
/**
 * Implements the "Executing selection sets" section of the spec
 * for fields that may be executed in parallel.
 */

function executeFields(exeContext, parentType, sourceValue, path, fields) {
  const results = Object.create(null);
  let containsPromise = false;
  try {
    for (const [responseName, fieldNodes] of fields.entries()) {
      const fieldPath = (0, _Path.addPath)(path, responseName, parentType.name);
      const result = executeField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);
      if (result !== undefined) {
        results[responseName] = result;
        if ((0, _isPromise.isPromise)(result)) {
          containsPromise = true;
        }
      }
    }
  } catch (error) {
    if (containsPromise) {
      // Ensure that any promises returned by other fields are handled, as they may also reject.
      return (0, _promiseForObject.promiseForObject)(results).finally(() => {
        throw error;
      });
    }
    throw error;
  } // If there are no promises, we can just return the object

  if (!containsPromise) {
    return results;
  } // Otherwise, results is a map from field name to the result of resolving that
  // field, which is possibly a promise. Return a promise that will return this
  // same map, but with any promises replaced with the values they resolved to.

  return (0, _promiseForObject.promiseForObject)(results);
}
/**
 * Implements the "Executing fields" section of the spec
 * In particular, this function figures out the value that the field returns by
 * calling its resolve function, then calls completeValue to complete promises,
 * serialize scalars, or execute the sub-selection-set for objects.
 */

function executeField(exeContext, parentType, source, fieldNodes, path) {
  var _fieldDef$resolve;
  const fieldDef = getFieldDef(exeContext.schema, parentType, fieldNodes[0]);
  if (!fieldDef) {
    return;
  }
  const returnType = fieldDef.type;
  const resolveFn = (_fieldDef$resolve = fieldDef.resolve) !== null && _fieldDef$resolve !== void 0 ? _fieldDef$resolve : exeContext.fieldResolver;
  const info = buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path); // Get the resolve function, regardless of if its result is normal or abrupt (error).

  try {
    // Build a JS object of arguments from the field.arguments AST, using the
    // variables scope to fulfill any variable references.
    // TODO: find a way to memoize, in case this field is within a List type.
    const args = (0, _values.getArgumentValues)(fieldDef, fieldNodes[0], exeContext.variableValues); // The resolve function's optional third argument is a context value that
    // is provided to every resolve function within an execution. It is commonly
    // used to represent an authenticated user, or request-specific caches.

    const contextValue = exeContext.contextValue;
    const result = resolveFn(source, args, contextValue, info);
    let completed;
    if ((0, _isPromise.isPromise)(result)) {
      completed = result.then(resolved => completeValue(exeContext, returnType, fieldNodes, info, path, resolved));
    } else {
      completed = completeValue(exeContext, returnType, fieldNodes, info, path, result);
    }
    if ((0, _isPromise.isPromise)(completed)) {
      // Note: we don't rely on a `catch` method, but we do expect "thenable"
      // to take a second callback for the error case.
      return completed.then(undefined, rawError => {
        const error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(path));
        return handleFieldError(error, returnType, exeContext);
      });
    }
    return completed;
  } catch (rawError) {
    const error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(path));
    return handleFieldError(error, returnType, exeContext);
  }
}
/**
 * @internal
 */

function buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path) {
  // The resolve function's optional fourth argument is a collection of
  // information about the current execution state.
  return {
    fieldName: fieldDef.name,
    fieldNodes,
    returnType: fieldDef.type,
    parentType,
    path,
    schema: exeContext.schema,
    fragments: exeContext.fragments,
    rootValue: exeContext.rootValue,
    operation: exeContext.operation,
    variableValues: exeContext.variableValues
  };
}
function handleFieldError(error, returnType, exeContext) {
  // If the field type is non-nullable, then it is resolved without any
  // protection from errors, however it still properly locates the error.
  if ((0, _definition.isNonNullType)(returnType)) {
    throw error;
  } // Otherwise, error protection is applied, logging the error and resolving
  // a null value for this field if one is encountered.

  exeContext.errors.push(error);
  return null;
}
/**
 * Implements the instructions for completeValue as defined in the
 * "Value Completion" section of the spec.
 *
 * If the field type is Non-Null, then this recursively completes the value
 * for the inner type. It throws a field error if that completion returns null,
 * as per the "Nullability" section of the spec.
 *
 * If the field type is a List, then this recursively completes the value
 * for the inner type on each item in the list.
 *
 * If the field type is a Scalar or Enum, ensures the completed value is a legal
 * value of the type by calling the `serialize` method of GraphQL type
 * definition.
 *
 * If the field is an abstract type, determine the runtime type of the value
 * and then complete based on that type
 *
 * Otherwise, the field type expects a sub-selection set, and will complete the
 * value by executing all sub-selections.
 */

function completeValue(exeContext, returnType, fieldNodes, info, path, result) {
  // If result is an Error, throw a located error.
  if (result instanceof Error) {
    throw result;
  } // If field type is NonNull, complete for inner type, and throw field error
  // if result is null.

  if ((0, _definition.isNonNullType)(returnType)) {
    const completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);
    if (completed === null) {
      throw new Error(`Cannot return null for non-nullable field ${info.parentType.name}.${info.fieldName}.`);
    }
    return completed;
  } // If result value is null or undefined then return null.

  if (result == null) {
    return null;
  } // If field type is List, complete each item in the list with the inner type

  if ((0, _definition.isListType)(returnType)) {
    return completeListValue(exeContext, returnType, fieldNodes, info, path, result);
  } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,
  // returning null if serialization is not possible.

  if ((0, _definition.isLeafType)(returnType)) {
    return completeLeafValue(returnType, result);
  } // If field type is an abstract type, Interface or Union, determine the
  // runtime Object type and complete for that type.

  if ((0, _definition.isAbstractType)(returnType)) {
    return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);
  } // If field type is Object, execute and complete all sub-selections.

  if ((0, _definition.isObjectType)(returnType)) {
    return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);
  }
  /* c8 ignore next 6 */
  // Not reachable, all possible output types have been considered.

   false || (0, _invariant.invariant)(false, 'Cannot complete value of unexpected output type: ' + (0, _inspect.inspect)(returnType));
}
/**
 * Complete a list value by completing each item in the list with the
 * inner type
 */

function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {
  if (!(0, _isIterableObject.isIterableObject)(result)) {
    throw new _GraphQLError.GraphQLError(`Expected Iterable, but did not find one for field "${info.parentType.name}.${info.fieldName}".`);
  } // This is specified as a simple map, however we're optimizing the path
  // where the list contains no Promises by avoiding creating another Promise.

  const itemType = returnType.ofType;
  let containsPromise = false;
  const completedResults = Array.from(result, (item, index) => {
    // No need to modify the info object containing the path,
    // since from here on it is not ever accessed by resolver functions.
    const itemPath = (0, _Path.addPath)(path, index, undefined);
    try {
      let completedItem;
      if ((0, _isPromise.isPromise)(item)) {
        completedItem = item.then(resolved => completeValue(exeContext, itemType, fieldNodes, info, itemPath, resolved));
      } else {
        completedItem = completeValue(exeContext, itemType, fieldNodes, info, itemPath, item);
      }
      if ((0, _isPromise.isPromise)(completedItem)) {
        containsPromise = true; // Note: we don't rely on a `catch` method, but we do expect "thenable"
        // to take a second callback for the error case.

        return completedItem.then(undefined, rawError => {
          const error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(itemPath));
          return handleFieldError(error, itemType, exeContext);
        });
      }
      return completedItem;
    } catch (rawError) {
      const error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(itemPath));
      return handleFieldError(error, itemType, exeContext);
    }
  });
  return containsPromise ? Promise.all(completedResults) : completedResults;
}
/**
 * Complete a Scalar or Enum by serializing to a valid value, returning
 * null if serialization is not possible.
 */

function completeLeafValue(returnType, result) {
  const serializedResult = returnType.serialize(result);
  if (serializedResult == null) {
    throw new Error(`Expected \`${(0, _inspect.inspect)(returnType)}.serialize(${(0, _inspect.inspect)(result)})\` to ` + `return non-nullable value, returned: ${(0, _inspect.inspect)(serializedResult)}`);
  }
  return serializedResult;
}
/**
 * Complete a value of an abstract type by determining the runtime object type
 * of that value, then complete the value for that type.
 */

function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {
  var _returnType$resolveTy;
  const resolveTypeFn = (_returnType$resolveTy = returnType.resolveType) !== null && _returnType$resolveTy !== void 0 ? _returnType$resolveTy : exeContext.typeResolver;
  const contextValue = exeContext.contextValue;
  const runtimeType = resolveTypeFn(result, contextValue, info, returnType);
  if ((0, _isPromise.isPromise)(runtimeType)) {
    return runtimeType.then(resolvedRuntimeType => completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result));
  }
  return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);
}
function ensureValidRuntimeType(runtimeTypeName, exeContext, returnType, fieldNodes, info, result) {
  if (runtimeTypeName == null) {
    throw new _GraphQLError.GraphQLError(`Abstract type "${returnType.name}" must resolve to an Object type at runtime for field "${info.parentType.name}.${info.fieldName}". Either the "${returnType.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`, fieldNodes);
  } // releases before 16.0.0 supported returning `GraphQLObjectType` from `resolveType`
  // TODO: remove in 17.0.0 release

  if ((0, _definition.isObjectType)(runtimeTypeName)) {
    throw new _GraphQLError.GraphQLError('Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.');
  }
  if (typeof runtimeTypeName !== 'string') {
    throw new _GraphQLError.GraphQLError(`Abstract type "${returnType.name}" must resolve to an Object type at runtime for field "${info.parentType.name}.${info.fieldName}" with ` + `value ${(0, _inspect.inspect)(result)}, received "${(0, _inspect.inspect)(runtimeTypeName)}".`);
  }
  const runtimeType = exeContext.schema.getType(runtimeTypeName);
  if (runtimeType == null) {
    throw new _GraphQLError.GraphQLError(`Abstract type "${returnType.name}" was resolved to a type "${runtimeTypeName}" that does not exist inside the schema.`, {
      nodes: fieldNodes
    });
  }
  if (!(0, _definition.isObjectType)(runtimeType)) {
    throw new _GraphQLError.GraphQLError(`Abstract type "${returnType.name}" was resolved to a non-object type "${runtimeTypeName}".`, {
      nodes: fieldNodes
    });
  }
  if (!exeContext.schema.isSubType(returnType, runtimeType)) {
    throw new _GraphQLError.GraphQLError(`Runtime Object type "${runtimeType.name}" is not a possible type for "${returnType.name}".`, {
      nodes: fieldNodes
    });
  }
  return runtimeType;
}
/**
 * Complete an Object value by executing all sub-selections.
 */

function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {
  // Collect sub-fields to execute to complete this value.
  const subFieldNodes = collectSubfields(exeContext, returnType, fieldNodes); // If there is an isTypeOf predicate function, call it with the
  // current result. If isTypeOf returns false, then raise an error rather
  // than continuing execution.

  if (returnType.isTypeOf) {
    const isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);
    if ((0, _isPromise.isPromise)(isTypeOf)) {
      return isTypeOf.then(resolvedIsTypeOf => {
        if (!resolvedIsTypeOf) {
          throw invalidReturnTypeError(returnType, result, fieldNodes);
        }
        return executeFields(exeContext, returnType, result, path, subFieldNodes);
      });
    }
    if (!isTypeOf) {
      throw invalidReturnTypeError(returnType, result, fieldNodes);
    }
  }
  return executeFields(exeContext, returnType, result, path, subFieldNodes);
}
function invalidReturnTypeError(returnType, result, fieldNodes) {
  return new _GraphQLError.GraphQLError(`Expected value of type "${returnType.name}" but got: ${(0, _inspect.inspect)(result)}.`, {
    nodes: fieldNodes
  });
}
/**
 * If a resolveType function is not given, then a default resolve behavior is
 * used which attempts two strategies:
 *
 * First, See if the provided value has a `__typename` field defined, if so, use
 * that value as name of the resolved type.
 *
 * Otherwise, test each possible type for the abstract type by calling
 * isTypeOf for the object being coerced, returning the first type that matches.
 */

const defaultTypeResolver = function (value, contextValue, info, abstractType) {
  // First, look for `__typename`.
  if ((0, _isObjectLike.isObjectLike)(value) && typeof value.__typename === 'string') {
    return value.__typename;
  } // Otherwise, test each possible type.

  const possibleTypes = info.schema.getPossibleTypes(abstractType);
  const promisedIsTypeOfResults = [];
  for (let i = 0; i < possibleTypes.length; i++) {
    const type = possibleTypes[i];
    if (type.isTypeOf) {
      const isTypeOfResult = type.isTypeOf(value, contextValue, info);
      if ((0, _isPromise.isPromise)(isTypeOfResult)) {
        promisedIsTypeOfResults[i] = isTypeOfResult;
      } else if (isTypeOfResult) {
        return type.name;
      }
    }
  }
  if (promisedIsTypeOfResults.length) {
    return Promise.all(promisedIsTypeOfResults).then(isTypeOfResults => {
      for (let i = 0; i < isTypeOfResults.length; i++) {
        if (isTypeOfResults[i]) {
          return possibleTypes[i].name;
        }
      }
    });
  }
};
/**
 * If a resolve function is not given, then a default resolve behavior is used
 * which takes the property of the source object of the same name as the field
 * and returns it as the result, or if it's a function, returns the result
 * of calling that function while passing along args and context value.
 */
exports.defaultTypeResolver = defaultTypeResolver;
const defaultFieldResolver = function (source, args, contextValue, info) {
  // ensure source is a value for which property access is acceptable.
  if ((0, _isObjectLike.isObjectLike)(source) || typeof source === 'function') {
    const property = source[info.fieldName];
    if (typeof property === 'function') {
      return source[info.fieldName](args, contextValue, info);
    }
    return property;
  }
};
/**
 * This method looks up the field on the given type definition.
 * It has special casing for the three introspection fields,
 * __schema, __type and __typename. __typename is special because
 * it can always be queried as a field, even in situations where no
 * other fields are allowed, like on a Union. __schema and __type
 * could get automatically added to the query type, but that would
 * require mutating type definitions, which would cause issues.
 *
 * @internal
 */
exports.defaultFieldResolver = defaultFieldResolver;
function getFieldDef(schema, parentType, fieldNode) {
  const fieldName = fieldNode.name.value;
  if (fieldName === _introspection.SchemaMetaFieldDef.name && schema.getQueryType() === parentType) {
    return _introspection.SchemaMetaFieldDef;
  } else if (fieldName === _introspection.TypeMetaFieldDef.name && schema.getQueryType() === parentType) {
    return _introspection.TypeMetaFieldDef;
  } else if (fieldName === _introspection.TypeNameMetaFieldDef.name) {
    return _introspection.TypeNameMetaFieldDef;
  }
  return parentType.getFields()[fieldName];
}

/***/ }),

/***/ "../../../node_modules/graphql/execution/index.mjs":
/*!*********************************************************!*\
  !*** ../../../node_modules/graphql/execution/index.mjs ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "createSourceEventStream", ({
  enumerable: true,
  get: function () {
    return _subscribe.createSourceEventStream;
  }
}));
Object.defineProperty(exports, "defaultFieldResolver", ({
  enumerable: true,
  get: function () {
    return _execute.defaultFieldResolver;
  }
}));
Object.defineProperty(exports, "defaultTypeResolver", ({
  enumerable: true,
  get: function () {
    return _execute.defaultTypeResolver;
  }
}));
Object.defineProperty(exports, "execute", ({
  enumerable: true,
  get: function () {
    return _execute.execute;
  }
}));
Object.defineProperty(exports, "executeSync", ({
  enumerable: true,
  get: function () {
    return _execute.executeSync;
  }
}));
Object.defineProperty(exports, "getArgumentValues", ({
  enumerable: true,
  get: function () {
    return _values.getArgumentValues;
  }
}));
Object.defineProperty(exports, "getDirectiveValues", ({
  enumerable: true,
  get: function () {
    return _values.getDirectiveValues;
  }
}));
Object.defineProperty(exports, "getVariableValues", ({
  enumerable: true,
  get: function () {
    return _values.getVariableValues;
  }
}));
Object.defineProperty(exports, "responsePathAsArray", ({
  enumerable: true,
  get: function () {
    return _Path.pathToArray;
  }
}));
Object.defineProperty(exports, "subscribe", ({
  enumerable: true,
  get: function () {
    return _subscribe.subscribe;
  }
}));
var _Path = __webpack_require__(/*! ../jsutils/Path.mjs */ "../../../node_modules/graphql/jsutils/Path.mjs");
var _execute = __webpack_require__(/*! ./execute.mjs */ "../../../node_modules/graphql/execution/execute.mjs");
var _subscribe = __webpack_require__(/*! ./subscribe.mjs */ "../../../node_modules/graphql/execution/subscribe.mjs");
var _values = __webpack_require__(/*! ./values.mjs */ "../../../node_modules/graphql/execution/values.mjs");

/***/ }),

/***/ "../../../node_modules/graphql/execution/mapAsyncIterator.mjs":
/*!********************************************************************!*\
  !*** ../../../node_modules/graphql/execution/mapAsyncIterator.mjs ***!
  \********************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.mapAsyncIterator = mapAsyncIterator;
/**
 * Given an AsyncIterable and a callback function, return an AsyncIterator
 * which produces values mapped via calling the callback function.
 */
function mapAsyncIterator(iterable, callback) {
  const iterator = iterable[Symbol.asyncIterator]();
  async function mapResult(result) {
    if (result.done) {
      return result;
    }
    try {
      return {
        value: await callback(result.value),
        done: false
      };
    } catch (error) {
      /* c8 ignore start */
      // FIXME: add test case
      if (typeof iterator.return === 'function') {
        try {
          await iterator.return();
        } catch (_e) {
          /* ignore error */
        }
      }
      throw error;
      /* c8 ignore stop */
    }
  }

  return {
    async next() {
      return mapResult(await iterator.next());
    },
    async return() {
      // If iterator.return() does not exist, then type R must be undefined.
      return typeof iterator.return === 'function' ? mapResult(await iterator.return()) : {
        value: undefined,
        done: true
      };
    },
    async throw(error) {
      if (typeof iterator.throw === 'function') {
        return mapResult(await iterator.throw(error));
      }
      throw error;
    },
    [Symbol.asyncIterator]() {
      return this;
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/execution/subscribe.mjs":
/*!*************************************************************!*\
  !*** ../../../node_modules/graphql/execution/subscribe.mjs ***!
  \*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.createSourceEventStream = createSourceEventStream;
exports.subscribe = subscribe;
var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _isAsyncIterable = __webpack_require__(/*! ../jsutils/isAsyncIterable.mjs */ "../../../node_modules/graphql/jsutils/isAsyncIterable.mjs");
var _Path = __webpack_require__(/*! ../jsutils/Path.mjs */ "../../../node_modules/graphql/jsutils/Path.mjs");
var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _locatedError = __webpack_require__(/*! ../error/locatedError.mjs */ "../../../node_modules/graphql/error/locatedError.mjs");
var _collectFields = __webpack_require__(/*! ./collectFields.mjs */ "../../../node_modules/graphql/execution/collectFields.mjs");
var _execute = __webpack_require__(/*! ./execute.mjs */ "../../../node_modules/graphql/execution/execute.mjs");
var _mapAsyncIterator = __webpack_require__(/*! ./mapAsyncIterator.mjs */ "../../../node_modules/graphql/execution/mapAsyncIterator.mjs");
var _values = __webpack_require__(/*! ./values.mjs */ "../../../node_modules/graphql/execution/values.mjs");
/**
 * Implements the "Subscribe" algorithm described in the GraphQL specification.
 *
 * Returns a Promise which resolves to either an AsyncIterator (if successful)
 * or an ExecutionResult (error). The promise will be rejected if the schema or
 * other arguments to this function are invalid, or if the resolved event stream
 * is not an async iterable.
 *
 * If the client-provided arguments to this function do not result in a
 * compliant subscription, a GraphQL Response (ExecutionResult) with
 * descriptive errors and no data will be returned.
 *
 * If the source stream could not be created due to faulty subscription
 * resolver logic or underlying systems, the promise will resolve to a single
 * ExecutionResult containing `errors` and no `data`.
 *
 * If the operation succeeded, the promise resolves to an AsyncIterator, which
 * yields a stream of ExecutionResults representing the response stream.
 *
 * Accepts either an object with named arguments, or individual arguments.
 */

async function subscribe(args) {
  // Temporary for v15 to v16 migration. Remove in v17
  arguments.length < 2 || (0, _devAssert.devAssert)(false, 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.');
  const resultOrStream = await createSourceEventStream(args);
  if (!(0, _isAsyncIterable.isAsyncIterable)(resultOrStream)) {
    return resultOrStream;
  } // For each payload yielded from a subscription, map it over the normal
  // GraphQL `execute` function, with `payload` as the rootValue.
  // This implements the "MapSourceToResponseEvent" algorithm described in
  // the GraphQL specification. The `execute` function provides the
  // "ExecuteSubscriptionEvent" algorithm, as it is nearly identical to the
  // "ExecuteQuery" algorithm, for which `execute` is also used.

  const mapSourceToResponse = payload => (0, _execute.execute)({
    ...args,
    rootValue: payload
  }); // Map every source value to a ExecutionResult value as described above.

  return (0, _mapAsyncIterator.mapAsyncIterator)(resultOrStream, mapSourceToResponse);
}
function toNormalizedArgs(args) {
  const firstArg = args[0];
  if (firstArg && 'document' in firstArg) {
    return firstArg;
  }
  return {
    schema: firstArg,
    // FIXME: when underlying TS bug fixed, see https://github.com/microsoft/TypeScript/issues/31613
    document: args[1],
    rootValue: args[2],
    contextValue: args[3],
    variableValues: args[4],
    operationName: args[5],
    subscribeFieldResolver: args[6]
  };
}
/**
 * Implements the "CreateSourceEventStream" algorithm described in the
 * GraphQL specification, resolving the subscription source event stream.
 *
 * Returns a Promise which resolves to either an AsyncIterable (if successful)
 * or an ExecutionResult (error). The promise will be rejected if the schema or
 * other arguments to this function are invalid, or if the resolved event stream
 * is not an async iterable.
 *
 * If the client-provided arguments to this function do not result in a
 * compliant subscription, a GraphQL Response (ExecutionResult) with
 * descriptive errors and no data will be returned.
 *
 * If the the source stream could not be created due to faulty subscription
 * resolver logic or underlying systems, the promise will resolve to a single
 * ExecutionResult containing `errors` and no `data`.
 *
 * If the operation succeeded, the promise resolves to the AsyncIterable for the
 * event stream returned by the resolver.
 *
 * A Source Event Stream represents a sequence of events, each of which triggers
 * a GraphQL execution for that event.
 *
 * This may be useful when hosting the stateful subscription service in a
 * different process or machine than the stateless GraphQL execution engine,
 * or otherwise separating these two steps. For more on this, see the
 * "Supporting Subscriptions at Scale" information in the GraphQL specification.
 */

async function createSourceEventStream() {
  for (var _len = arguments.length, rawArgs = new Array(_len), _key = 0; _key < _len; _key++) {
    rawArgs[_key] = arguments[_key];
  }
  const args = toNormalizedArgs(rawArgs);
  const {
    schema,
    document,
    variableValues
  } = args; // If arguments are missing or incorrectly typed, this is an internal
  // developer mistake which should throw an early error.

  (0, _execute.assertValidExecutionArguments)(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments,
  // a "Response" with only errors is returned.

  const exeContext = (0, _execute.buildExecutionContext)(args); // Return early errors if execution context failed.

  if (!('schema' in exeContext)) {
    return {
      errors: exeContext
    };
  }
  try {
    const eventStream = await executeSubscription(exeContext); // Assert field returned an event stream, otherwise yield an error.

    if (!(0, _isAsyncIterable.isAsyncIterable)(eventStream)) {
      throw new Error('Subscription field must return Async Iterable. ' + `Received: ${(0, _inspect.inspect)(eventStream)}.`);
    }
    return eventStream;
  } catch (error) {
    // If it GraphQLError, report it as an ExecutionResult, containing only errors and no data.
    // Otherwise treat the error as a system-class error and re-throw it.
    if (error instanceof _GraphQLError.GraphQLError) {
      return {
        errors: [error]
      };
    }
    throw error;
  }
}
async function executeSubscription(exeContext) {
  const {
    schema,
    fragments,
    operation,
    variableValues,
    rootValue
  } = exeContext;
  const rootType = schema.getSubscriptionType();
  if (rootType == null) {
    throw new _GraphQLError.GraphQLError('Schema is not configured to execute subscription operation.', {
      nodes: operation
    });
  }
  const rootFields = (0, _collectFields.collectFields)(schema, fragments, variableValues, rootType, operation.selectionSet);
  const [responseName, fieldNodes] = [...rootFields.entries()][0];
  const fieldDef = (0, _execute.getFieldDef)(schema, rootType, fieldNodes[0]);
  if (!fieldDef) {
    const fieldName = fieldNodes[0].name.value;
    throw new _GraphQLError.GraphQLError(`The subscription field "${fieldName}" is not defined.`, {
      nodes: fieldNodes
    });
  }
  const path = (0, _Path.addPath)(undefined, responseName, rootType.name);
  const info = (0, _execute.buildResolveInfo)(exeContext, fieldDef, fieldNodes, rootType, path);
  try {
    var _fieldDef$subscribe;

    // Implements the "ResolveFieldEventStream" algorithm from GraphQL specification.
    // It differs from "ResolveFieldValue" due to providing a different `resolveFn`.
    // Build a JS object of arguments from the field.arguments AST, using the
    // variables scope to fulfill any variable references.
    const args = (0, _values.getArgumentValues)(fieldDef, fieldNodes[0], variableValues); // The resolve function's optional third argument is a context value that
    // is provided to every resolve function within an execution. It is commonly
    // used to represent an authenticated user, or request-specific caches.

    const contextValue = exeContext.contextValue; // Call the `subscribe()` resolver or the default resolver to produce an
    // AsyncIterable yielding raw payloads.

    const resolveFn = (_fieldDef$subscribe = fieldDef.subscribe) !== null && _fieldDef$subscribe !== void 0 ? _fieldDef$subscribe : exeContext.subscribeFieldResolver;
    const eventStream = await resolveFn(rootValue, args, contextValue, info);
    if (eventStream instanceof Error) {
      throw eventStream;
    }
    return eventStream;
  } catch (error) {
    throw (0, _locatedError.locatedError)(error, fieldNodes, (0, _Path.pathToArray)(path));
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/execution/values.mjs":
/*!**********************************************************!*\
  !*** ../../../node_modules/graphql/execution/values.mjs ***!
  \**********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getArgumentValues = getArgumentValues;
exports.getDirectiveValues = getDirectiveValues;
exports.getVariableValues = getVariableValues;
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
var _printPathArray = __webpack_require__(/*! ../jsutils/printPathArray.mjs */ "../../../node_modules/graphql/jsutils/printPathArray.mjs");
var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _coerceInputValue = __webpack_require__(/*! ../utilities/coerceInputValue.mjs */ "../../../node_modules/graphql/utilities/coerceInputValue.mjs");
var _typeFromAST = __webpack_require__(/*! ../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
var _valueFromAST = __webpack_require__(/*! ../utilities/valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs");
/**
 * Prepares an object map of variableValues of the correct type based on the
 * provided variable definitions and arbitrary input. If the input cannot be
 * parsed to match the variable definitions, a GraphQLError will be thrown.
 *
 * Note: The returned value is a plain Object with a prototype, since it is
 * exposed to user code. Care should be taken to not pull values from the
 * Object prototype.
 */
function getVariableValues(schema, varDefNodes, inputs, options) {
  const errors = [];
  const maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors;
  try {
    const coerced = coerceVariableValues(schema, varDefNodes, inputs, error => {
      if (maxErrors != null && errors.length >= maxErrors) {
        throw new _GraphQLError.GraphQLError('Too many errors processing variables, error limit reached. Execution aborted.');
      }
      errors.push(error);
    });
    if (errors.length === 0) {
      return {
        coerced
      };
    }
  } catch (error) {
    errors.push(error);
  }
  return {
    errors
  };
}
function coerceVariableValues(schema, varDefNodes, inputs, onError) {
  const coercedValues = {};
  for (const varDefNode of varDefNodes) {
    const varName = varDefNode.variable.name.value;
    const varType = (0, _typeFromAST.typeFromAST)(schema, varDefNode.type);
    if (!(0, _definition.isInputType)(varType)) {
      // Must use input types for variables. This should be caught during
      // validation, however is checked again here for safety.
      const varTypeStr = (0, _printer.print)(varDefNode.type);
      onError(new _GraphQLError.GraphQLError(`Variable "$${varName}" expected value of type "${varTypeStr}" which cannot be used as an input type.`, {
        nodes: varDefNode.type
      }));
      continue;
    }
    if (!hasOwnProperty(inputs, varName)) {
      if (varDefNode.defaultValue) {
        coercedValues[varName] = (0, _valueFromAST.valueFromAST)(varDefNode.defaultValue, varType);
      } else if ((0, _definition.isNonNullType)(varType)) {
        const varTypeStr = (0, _inspect.inspect)(varType);
        onError(new _GraphQLError.GraphQLError(`Variable "$${varName}" of required type "${varTypeStr}" was not provided.`, {
          nodes: varDefNode
        }));
      }
      continue;
    }
    const value = inputs[varName];
    if (value === null && (0, _definition.isNonNullType)(varType)) {
      const varTypeStr = (0, _inspect.inspect)(varType);
      onError(new _GraphQLError.GraphQLError(`Variable "$${varName}" of non-null type "${varTypeStr}" must not be null.`, {
        nodes: varDefNode
      }));
      continue;
    }
    coercedValues[varName] = (0, _coerceInputValue.coerceInputValue)(value, varType, (path, invalidValue, error) => {
      let prefix = `Variable "$${varName}" got invalid value ` + (0, _inspect.inspect)(invalidValue);
      if (path.length > 0) {
        prefix += ` at "${varName}${(0, _printPathArray.printPathArray)(path)}"`;
      }
      onError(new _GraphQLError.GraphQLError(prefix + '; ' + error.message, {
        nodes: varDefNode,
        originalError: error
      }));
    });
  }
  return coercedValues;
}
/**
 * Prepares an object map of argument values given a list of argument
 * definitions and list of argument AST nodes.
 *
 * Note: The returned value is a plain Object with a prototype, since it is
 * exposed to user code. Care should be taken to not pull values from the
 * Object prototype.
 */

function getArgumentValues(def, node, variableValues) {
  var _node$arguments;
  const coercedValues = {}; // FIXME: https://github.com/graphql/graphql-js/issues/2203

  /* c8 ignore next */

  const argumentNodes = (_node$arguments = node.arguments) !== null && _node$arguments !== void 0 ? _node$arguments : [];
  const argNodeMap = (0, _keyMap.keyMap)(argumentNodes, arg => arg.name.value);
  for (const argDef of def.args) {
    const name = argDef.name;
    const argType = argDef.type;
    const argumentNode = argNodeMap[name];
    if (!argumentNode) {
      if (argDef.defaultValue !== undefined) {
        coercedValues[name] = argDef.defaultValue;
      } else if ((0, _definition.isNonNullType)(argType)) {
        throw new _GraphQLError.GraphQLError(`Argument "${name}" of required type "${(0, _inspect.inspect)(argType)}" ` + 'was not provided.', {
          nodes: node
        });
      }
      continue;
    }
    const valueNode = argumentNode.value;
    let isNull = valueNode.kind === _kinds.Kind.NULL;
    if (valueNode.kind === _kinds.Kind.VARIABLE) {
      const variableName = valueNode.name.value;
      if (variableValues == null || !hasOwnProperty(variableValues, variableName)) {
        if (argDef.defaultValue !== undefined) {
          coercedValues[name] = argDef.defaultValue;
        } else if ((0, _definition.isNonNullType)(argType)) {
          throw new _GraphQLError.GraphQLError(`Argument "${name}" of required type "${(0, _inspect.inspect)(argType)}" ` + `was provided the variable "$${variableName}" which was not provided a runtime value.`, {
            nodes: valueNode
          });
        }
        continue;
      }
      isNull = variableValues[variableName] == null;
    }
    if (isNull && (0, _definition.isNonNullType)(argType)) {
      throw new _GraphQLError.GraphQLError(`Argument "${name}" of non-null type "${(0, _inspect.inspect)(argType)}" ` + 'must not be null.', {
        nodes: valueNode
      });
    }
    const coercedValue = (0, _valueFromAST.valueFromAST)(valueNode, argType, variableValues);
    if (coercedValue === undefined) {
      // Note: ValuesOfCorrectTypeRule validation should catch this before
      // execution. This is a runtime check to ensure execution does not
      // continue with an invalid argument value.
      throw new _GraphQLError.GraphQLError(`Argument "${name}" has invalid value ${(0, _printer.print)(valueNode)}.`, {
        nodes: valueNode
      });
    }
    coercedValues[name] = coercedValue;
  }
  return coercedValues;
}
/**
 * Prepares an object map of argument values given a directive definition
 * and a AST node which may contain directives. Optionally also accepts a map
 * of variable values.
 *
 * If the directive does not exist on the node, returns undefined.
 *
 * Note: The returned value is a plain Object with a prototype, since it is
 * exposed to user code. Care should be taken to not pull values from the
 * Object prototype.
 */

function getDirectiveValues(directiveDef, node, variableValues) {
  var _node$directives;
  const directiveNode = (_node$directives = node.directives) === null || _node$directives === void 0 ? void 0 : _node$directives.find(directive => directive.name.value === directiveDef.name);
  if (directiveNode) {
    return getArgumentValues(directiveDef, directiveNode, variableValues);
  }
}
function hasOwnProperty(obj, prop) {
  return Object.prototype.hasOwnProperty.call(obj, prop);
}

/***/ }),

/***/ "../../../node_modules/graphql/graphql.mjs":
/*!*************************************************!*\
  !*** ../../../node_modules/graphql/graphql.mjs ***!
  \*************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.graphql = graphql;
exports.graphqlSync = graphqlSync;
var _devAssert = __webpack_require__(/*! ./jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _isPromise = __webpack_require__(/*! ./jsutils/isPromise.mjs */ "../../../node_modules/graphql/jsutils/isPromise.mjs");
var _parser = __webpack_require__(/*! ./language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs");
var _validate = __webpack_require__(/*! ./type/validate.mjs */ "../../../node_modules/graphql/type/validate.mjs");
var _validate2 = __webpack_require__(/*! ./validation/validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs");
var _execute = __webpack_require__(/*! ./execution/execute.mjs */ "../../../node_modules/graphql/execution/execute.mjs");
/**
 * This is the primary entry point function for fulfilling GraphQL operations
 * by parsing, validating, and executing a GraphQL document along side a
 * GraphQL schema.
 *
 * More sophisticated GraphQL servers, such as those which persist queries,
 * may wish to separate the validation and execution phases to a static time
 * tooling step, and a server runtime step.
 *
 * Accepts either an object with named arguments, or individual arguments:
 *
 * schema:
 *    The GraphQL type system to use when validating and executing a query.
 * source:
 *    A GraphQL language formatted string representing the requested operation.
 * rootValue:
 *    The value provided as the first argument to resolver functions on the top
 *    level type (e.g. the query object type).
 * contextValue:
 *    The context value is provided as an argument to resolver functions after
 *    field arguments. It is used to pass shared information useful at any point
 *    during executing this query, for example the currently logged in user and
 *    connections to databases or other services.
 * variableValues:
 *    A mapping of variable name to runtime value to use for all variables
 *    defined in the requestString.
 * operationName:
 *    The name of the operation to use if requestString contains multiple
 *    possible operations. Can be omitted if requestString contains only
 *    one operation.
 * fieldResolver:
 *    A resolver function to use when one is not provided by the schema.
 *    If not provided, the default field resolver is used (which looks for a
 *    value or method on the source value with the field's name).
 * typeResolver:
 *    A type resolver function to use when none is provided by the schema.
 *    If not provided, the default type resolver is used (which looks for a
 *    `__typename` field or alternatively calls the `isTypeOf` method).
 */

function graphql(args) {
  // Always return a Promise for a consistent API.
  return new Promise(resolve => resolve(graphqlImpl(args)));
}
/**
 * The graphqlSync function also fulfills GraphQL operations by parsing,
 * validating, and executing a GraphQL document along side a GraphQL schema.
 * However, it guarantees to complete synchronously (or throw an error) assuming
 * that all field resolvers are also synchronous.
 */

function graphqlSync(args) {
  const result = graphqlImpl(args); // Assert that the execution was synchronous.

  if ((0, _isPromise.isPromise)(result)) {
    throw new Error('GraphQL execution failed to complete synchronously.');
  }
  return result;
}
function graphqlImpl(args) {
  // Temporary for v15 to v16 migration. Remove in v17
  arguments.length < 2 || (0, _devAssert.devAssert)(false, 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.');
  const {
    schema,
    source,
    rootValue,
    contextValue,
    variableValues,
    operationName,
    fieldResolver,
    typeResolver
  } = args; // Validate Schema

  const schemaValidationErrors = (0, _validate.validateSchema)(schema);
  if (schemaValidationErrors.length > 0) {
    return {
      errors: schemaValidationErrors
    };
  } // Parse

  let document;
  try {
    document = (0, _parser.parse)(source);
  } catch (syntaxError) {
    return {
      errors: [syntaxError]
    };
  } // Validate

  const validationErrors = (0, _validate2.validate)(schema, document);
  if (validationErrors.length > 0) {
    return {
      errors: validationErrors
    };
  } // Execute

  return (0, _execute.execute)({
    schema,
    document,
    rootValue,
    contextValue,
    variableValues,
    operationName,
    fieldResolver,
    typeResolver
  });
}

/***/ }),

/***/ "../../../node_modules/graphql/index.mjs":
/*!***********************************************!*\
  !*** ../../../node_modules/graphql/index.mjs ***!
  \***********************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "BREAK", ({
  enumerable: true,
  get: function () {
    return _index2.BREAK;
  }
}));
Object.defineProperty(exports, "BreakingChangeType", ({
  enumerable: true,
  get: function () {
    return _index6.BreakingChangeType;
  }
}));
Object.defineProperty(exports, "DEFAULT_DEPRECATION_REASON", ({
  enumerable: true,
  get: function () {
    return _index.DEFAULT_DEPRECATION_REASON;
  }
}));
Object.defineProperty(exports, "DangerousChangeType", ({
  enumerable: true,
  get: function () {
    return _index6.DangerousChangeType;
  }
}));
Object.defineProperty(exports, "DirectiveLocation", ({
  enumerable: true,
  get: function () {
    return _index2.DirectiveLocation;
  }
}));
Object.defineProperty(exports, "ExecutableDefinitionsRule", ({
  enumerable: true,
  get: function () {
    return _index4.ExecutableDefinitionsRule;
  }
}));
Object.defineProperty(exports, "FieldsOnCorrectTypeRule", ({
  enumerable: true,
  get: function () {
    return _index4.FieldsOnCorrectTypeRule;
  }
}));
Object.defineProperty(exports, "FragmentsOnCompositeTypesRule", ({
  enumerable: true,
  get: function () {
    return _index4.FragmentsOnCompositeTypesRule;
  }
}));
Object.defineProperty(exports, "GRAPHQL_MAX_INT", ({
  enumerable: true,
  get: function () {
    return _index.GRAPHQL_MAX_INT;
  }
}));
Object.defineProperty(exports, "GRAPHQL_MIN_INT", ({
  enumerable: true,
  get: function () {
    return _index.GRAPHQL_MIN_INT;
  }
}));
Object.defineProperty(exports, "GraphQLBoolean", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLBoolean;
  }
}));
Object.defineProperty(exports, "GraphQLDeprecatedDirective", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLDeprecatedDirective;
  }
}));
Object.defineProperty(exports, "GraphQLDirective", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLDirective;
  }
}));
Object.defineProperty(exports, "GraphQLEnumType", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLEnumType;
  }
}));
Object.defineProperty(exports, "GraphQLError", ({
  enumerable: true,
  get: function () {
    return _index5.GraphQLError;
  }
}));
Object.defineProperty(exports, "GraphQLFloat", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLFloat;
  }
}));
Object.defineProperty(exports, "GraphQLID", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLID;
  }
}));
Object.defineProperty(exports, "GraphQLIncludeDirective", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLIncludeDirective;
  }
}));
Object.defineProperty(exports, "GraphQLInputObjectType", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLInputObjectType;
  }
}));
Object.defineProperty(exports, "GraphQLInt", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLInt;
  }
}));
Object.defineProperty(exports, "GraphQLInterfaceType", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLInterfaceType;
  }
}));
Object.defineProperty(exports, "GraphQLList", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLList;
  }
}));
Object.defineProperty(exports, "GraphQLNonNull", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLNonNull;
  }
}));
Object.defineProperty(exports, "GraphQLObjectType", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLObjectType;
  }
}));
Object.defineProperty(exports, "GraphQLScalarType", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLScalarType;
  }
}));
Object.defineProperty(exports, "GraphQLSchema", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLSchema;
  }
}));
Object.defineProperty(exports, "GraphQLSkipDirective", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLSkipDirective;
  }
}));
Object.defineProperty(exports, "GraphQLSpecifiedByDirective", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLSpecifiedByDirective;
  }
}));
Object.defineProperty(exports, "GraphQLString", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLString;
  }
}));
Object.defineProperty(exports, "GraphQLUnionType", ({
  enumerable: true,
  get: function () {
    return _index.GraphQLUnionType;
  }
}));
Object.defineProperty(exports, "Kind", ({
  enumerable: true,
  get: function () {
    return _index2.Kind;
  }
}));
Object.defineProperty(exports, "KnownArgumentNamesRule", ({
  enumerable: true,
  get: function () {
    return _index4.KnownArgumentNamesRule;
  }
}));
Object.defineProperty(exports, "KnownDirectivesRule", ({
  enumerable: true,
  get: function () {
    return _index4.KnownDirectivesRule;
  }
}));
Object.defineProperty(exports, "KnownFragmentNamesRule", ({
  enumerable: true,
  get: function () {
    return _index4.KnownFragmentNamesRule;
  }
}));
Object.defineProperty(exports, "KnownTypeNamesRule", ({
  enumerable: true,
  get: function () {
    return _index4.KnownTypeNamesRule;
  }
}));
Object.defineProperty(exports, "Lexer", ({
  enumerable: true,
  get: function () {
    return _index2.Lexer;
  }
}));
Object.defineProperty(exports, "Location", ({
  enumerable: true,
  get: function () {
    return _index2.Location;
  }
}));
Object.defineProperty(exports, "LoneAnonymousOperationRule", ({
  enumerable: true,
  get: function () {
    return _index4.LoneAnonymousOperationRule;
  }
}));
Object.defineProperty(exports, "LoneSchemaDefinitionRule", ({
  enumerable: true,
  get: function () {
    return _index4.LoneSchemaDefinitionRule;
  }
}));
Object.defineProperty(exports, "NoDeprecatedCustomRule", ({
  enumerable: true,
  get: function () {
    return _index4.NoDeprecatedCustomRule;
  }
}));
Object.defineProperty(exports, "NoFragmentCyclesRule", ({
  enumerable: true,
  get: function () {
    return _index4.NoFragmentCyclesRule;
  }
}));
Object.defineProperty(exports, "NoSchemaIntrospectionCustomRule", ({
  enumerable: true,
  get: function () {
    return _index4.NoSchemaIntrospectionCustomRule;
  }
}));
Object.defineProperty(exports, "NoUndefinedVariablesRule", ({
  enumerable: true,
  get: function () {
    return _index4.NoUndefinedVariablesRule;
  }
}));
Object.defineProperty(exports, "NoUnusedFragmentsRule", ({
  enumerable: true,
  get: function () {
    return _index4.NoUnusedFragmentsRule;
  }
}));
Object.defineProperty(exports, "NoUnusedVariablesRule", ({
  enumerable: true,
  get: function () {
    return _index4.NoUnusedVariablesRule;
  }
}));
Object.defineProperty(exports, "OperationTypeNode", ({
  enumerable: true,
  get: function () {
    return _index2.OperationTypeNode;
  }
}));
Object.defineProperty(exports, "OverlappingFieldsCanBeMergedRule", ({
  enumerable: true,
  get: function () {
    return _index4.OverlappingFieldsCanBeMergedRule;
  }
}));
Object.defineProperty(exports, "PossibleFragmentSpreadsRule", ({
  enumerable: true,
  get: function () {
    return _index4.PossibleFragmentSpreadsRule;
  }
}));
Object.defineProperty(exports, "PossibleTypeExtensionsRule", ({
  enumerable: true,
  get: function () {
    return _index4.PossibleTypeExtensionsRule;
  }
}));
Object.defineProperty(exports, "ProvidedRequiredArgumentsRule", ({
  enumerable: true,
  get: function () {
    return _index4.ProvidedRequiredArgumentsRule;
  }
}));
Object.defineProperty(exports, "ScalarLeafsRule", ({
  enumerable: true,
  get: function () {
    return _index4.ScalarLeafsRule;
  }
}));
Object.defineProperty(exports, "SchemaMetaFieldDef", ({
  enumerable: true,
  get: function () {
    return _index.SchemaMetaFieldDef;
  }
}));
Object.defineProperty(exports, "SingleFieldSubscriptionsRule", ({
  enumerable: true,
  get: function () {
    return _index4.SingleFieldSubscriptionsRule;
  }
}));
Object.defineProperty(exports, "Source", ({
  enumerable: true,
  get: function () {
    return _index2.Source;
  }
}));
Object.defineProperty(exports, "Token", ({
  enumerable: true,
  get: function () {
    return _index2.Token;
  }
}));
Object.defineProperty(exports, "TokenKind", ({
  enumerable: true,
  get: function () {
    return _index2.TokenKind;
  }
}));
Object.defineProperty(exports, "TypeInfo", ({
  enumerable: true,
  get: function () {
    return _index6.TypeInfo;
  }
}));
Object.defineProperty(exports, "TypeKind", ({
  enumerable: true,
  get: function () {
    return _index.TypeKind;
  }
}));
Object.defineProperty(exports, "TypeMetaFieldDef", ({
  enumerable: true,
  get: function () {
    return _index.TypeMetaFieldDef;
  }
}));
Object.defineProperty(exports, "TypeNameMetaFieldDef", ({
  enumerable: true,
  get: function () {
    return _index.TypeNameMetaFieldDef;
  }
}));
Object.defineProperty(exports, "UniqueArgumentDefinitionNamesRule", ({
  enumerable: true,
  get: function () {
    return _index4.UniqueArgumentDefinitionNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueArgumentNamesRule", ({
  enumerable: true,
  get: function () {
    return _index4.UniqueArgumentNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueDirectiveNamesRule", ({
  enumerable: true,
  get: function () {
    return _index4.UniqueDirectiveNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueDirectivesPerLocationRule", ({
  enumerable: true,
  get: function () {
    return _index4.UniqueDirectivesPerLocationRule;
  }
}));
Object.defineProperty(exports, "UniqueEnumValueNamesRule", ({
  enumerable: true,
  get: function () {
    return _index4.UniqueEnumValueNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueFieldDefinitionNamesRule", ({
  enumerable: true,
  get: function () {
    return _index4.UniqueFieldDefinitionNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueFragmentNamesRule", ({
  enumerable: true,
  get: function () {
    return _index4.UniqueFragmentNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueInputFieldNamesRule", ({
  enumerable: true,
  get: function () {
    return _index4.UniqueInputFieldNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueOperationNamesRule", ({
  enumerable: true,
  get: function () {
    return _index4.UniqueOperationNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueOperationTypesRule", ({
  enumerable: true,
  get: function () {
    return _index4.UniqueOperationTypesRule;
  }
}));
Object.defineProperty(exports, "UniqueTypeNamesRule", ({
  enumerable: true,
  get: function () {
    return _index4.UniqueTypeNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueVariableNamesRule", ({
  enumerable: true,
  get: function () {
    return _index4.UniqueVariableNamesRule;
  }
}));
Object.defineProperty(exports, "ValidationContext", ({
  enumerable: true,
  get: function () {
    return _index4.ValidationContext;
  }
}));
Object.defineProperty(exports, "ValuesOfCorrectTypeRule", ({
  enumerable: true,
  get: function () {
    return _index4.ValuesOfCorrectTypeRule;
  }
}));
Object.defineProperty(exports, "VariablesAreInputTypesRule", ({
  enumerable: true,
  get: function () {
    return _index4.VariablesAreInputTypesRule;
  }
}));
Object.defineProperty(exports, "VariablesInAllowedPositionRule", ({
  enumerable: true,
  get: function () {
    return _index4.VariablesInAllowedPositionRule;
  }
}));
Object.defineProperty(exports, "__Directive", ({
  enumerable: true,
  get: function () {
    return _index.__Directive;
  }
}));
Object.defineProperty(exports, "__DirectiveLocation", ({
  enumerable: true,
  get: function () {
    return _index.__DirectiveLocation;
  }
}));
Object.defineProperty(exports, "__EnumValue", ({
  enumerable: true,
  get: function () {
    return _index.__EnumValue;
  }
}));
Object.defineProperty(exports, "__Field", ({
  enumerable: true,
  get: function () {
    return _index.__Field;
  }
}));
Object.defineProperty(exports, "__InputValue", ({
  enumerable: true,
  get: function () {
    return _index.__InputValue;
  }
}));
Object.defineProperty(exports, "__Schema", ({
  enumerable: true,
  get: function () {
    return _index.__Schema;
  }
}));
Object.defineProperty(exports, "__Type", ({
  enumerable: true,
  get: function () {
    return _index.__Type;
  }
}));
Object.defineProperty(exports, "__TypeKind", ({
  enumerable: true,
  get: function () {
    return _index.__TypeKind;
  }
}));
Object.defineProperty(exports, "assertAbstractType", ({
  enumerable: true,
  get: function () {
    return _index.assertAbstractType;
  }
}));
Object.defineProperty(exports, "assertCompositeType", ({
  enumerable: true,
  get: function () {
    return _index.assertCompositeType;
  }
}));
Object.defineProperty(exports, "assertDirective", ({
  enumerable: true,
  get: function () {
    return _index.assertDirective;
  }
}));
Object.defineProperty(exports, "assertEnumType", ({
  enumerable: true,
  get: function () {
    return _index.assertEnumType;
  }
}));
Object.defineProperty(exports, "assertEnumValueName", ({
  enumerable: true,
  get: function () {
    return _index.assertEnumValueName;
  }
}));
Object.defineProperty(exports, "assertInputObjectType", ({
  enumerable: true,
  get: function () {
    return _index.assertInputObjectType;
  }
}));
Object.defineProperty(exports, "assertInputType", ({
  enumerable: true,
  get: function () {
    return _index.assertInputType;
  }
}));
Object.defineProperty(exports, "assertInterfaceType", ({
  enumerable: true,
  get: function () {
    return _index.assertInterfaceType;
  }
}));
Object.defineProperty(exports, "assertLeafType", ({
  enumerable: true,
  get: function () {
    return _index.assertLeafType;
  }
}));
Object.defineProperty(exports, "assertListType", ({
  enumerable: true,
  get: function () {
    return _index.assertListType;
  }
}));
Object.defineProperty(exports, "assertName", ({
  enumerable: true,
  get: function () {
    return _index.assertName;
  }
}));
Object.defineProperty(exports, "assertNamedType", ({
  enumerable: true,
  get: function () {
    return _index.assertNamedType;
  }
}));
Object.defineProperty(exports, "assertNonNullType", ({
  enumerable: true,
  get: function () {
    return _index.assertNonNullType;
  }
}));
Object.defineProperty(exports, "assertNullableType", ({
  enumerable: true,
  get: function () {
    return _index.assertNullableType;
  }
}));
Object.defineProperty(exports, "assertObjectType", ({
  enumerable: true,
  get: function () {
    return _index.assertObjectType;
  }
}));
Object.defineProperty(exports, "assertOutputType", ({
  enumerable: true,
  get: function () {
    return _index.assertOutputType;
  }
}));
Object.defineProperty(exports, "assertScalarType", ({
  enumerable: true,
  get: function () {
    return _index.assertScalarType;
  }
}));
Object.defineProperty(exports, "assertSchema", ({
  enumerable: true,
  get: function () {
    return _index.assertSchema;
  }
}));
Object.defineProperty(exports, "assertType", ({
  enumerable: true,
  get: function () {
    return _index.assertType;
  }
}));
Object.defineProperty(exports, "assertUnionType", ({
  enumerable: true,
  get: function () {
    return _index.assertUnionType;
  }
}));
Object.defineProperty(exports, "assertValidName", ({
  enumerable: true,
  get: function () {
    return _index6.assertValidName;
  }
}));
Object.defineProperty(exports, "assertValidSchema", ({
  enumerable: true,
  get: function () {
    return _index.assertValidSchema;
  }
}));
Object.defineProperty(exports, "assertWrappingType", ({
  enumerable: true,
  get: function () {
    return _index.assertWrappingType;
  }
}));
Object.defineProperty(exports, "astFromValue", ({
  enumerable: true,
  get: function () {
    return _index6.astFromValue;
  }
}));
Object.defineProperty(exports, "buildASTSchema", ({
  enumerable: true,
  get: function () {
    return _index6.buildASTSchema;
  }
}));
Object.defineProperty(exports, "buildClientSchema", ({
  enumerable: true,
  get: function () {
    return _index6.buildClientSchema;
  }
}));
Object.defineProperty(exports, "buildSchema", ({
  enumerable: true,
  get: function () {
    return _index6.buildSchema;
  }
}));
Object.defineProperty(exports, "coerceInputValue", ({
  enumerable: true,
  get: function () {
    return _index6.coerceInputValue;
  }
}));
Object.defineProperty(exports, "concatAST", ({
  enumerable: true,
  get: function () {
    return _index6.concatAST;
  }
}));
Object.defineProperty(exports, "createSourceEventStream", ({
  enumerable: true,
  get: function () {
    return _index3.createSourceEventStream;
  }
}));
Object.defineProperty(exports, "defaultFieldResolver", ({
  enumerable: true,
  get: function () {
    return _index3.defaultFieldResolver;
  }
}));
Object.defineProperty(exports, "defaultTypeResolver", ({
  enumerable: true,
  get: function () {
    return _index3.defaultTypeResolver;
  }
}));
Object.defineProperty(exports, "doTypesOverlap", ({
  enumerable: true,
  get: function () {
    return _index6.doTypesOverlap;
  }
}));
Object.defineProperty(exports, "execute", ({
  enumerable: true,
  get: function () {
    return _index3.execute;
  }
}));
Object.defineProperty(exports, "executeSync", ({
  enumerable: true,
  get: function () {
    return _index3.executeSync;
  }
}));
Object.defineProperty(exports, "extendSchema", ({
  enumerable: true,
  get: function () {
    return _index6.extendSchema;
  }
}));
Object.defineProperty(exports, "findBreakingChanges", ({
  enumerable: true,
  get: function () {
    return _index6.findBreakingChanges;
  }
}));
Object.defineProperty(exports, "findDangerousChanges", ({
  enumerable: true,
  get: function () {
    return _index6.findDangerousChanges;
  }
}));
Object.defineProperty(exports, "formatError", ({
  enumerable: true,
  get: function () {
    return _index5.formatError;
  }
}));
Object.defineProperty(exports, "getArgumentValues", ({
  enumerable: true,
  get: function () {
    return _index3.getArgumentValues;
  }
}));
Object.defineProperty(exports, "getDirectiveValues", ({
  enumerable: true,
  get: function () {
    return _index3.getDirectiveValues;
  }
}));
Object.defineProperty(exports, "getEnterLeaveForKind", ({
  enumerable: true,
  get: function () {
    return _index2.getEnterLeaveForKind;
  }
}));
Object.defineProperty(exports, "getIntrospectionQuery", ({
  enumerable: true,
  get: function () {
    return _index6.getIntrospectionQuery;
  }
}));
Object.defineProperty(exports, "getLocation", ({
  enumerable: true,
  get: function () {
    return _index2.getLocation;
  }
}));
Object.defineProperty(exports, "getNamedType", ({
  enumerable: true,
  get: function () {
    return _index.getNamedType;
  }
}));
Object.defineProperty(exports, "getNullableType", ({
  enumerable: true,
  get: function () {
    return _index.getNullableType;
  }
}));
Object.defineProperty(exports, "getOperationAST", ({
  enumerable: true,
  get: function () {
    return _index6.getOperationAST;
  }
}));
Object.defineProperty(exports, "getOperationRootType", ({
  enumerable: true,
  get: function () {
    return _index6.getOperationRootType;
  }
}));
Object.defineProperty(exports, "getVariableValues", ({
  enumerable: true,
  get: function () {
    return _index3.getVariableValues;
  }
}));
Object.defineProperty(exports, "getVisitFn", ({
  enumerable: true,
  get: function () {
    return _index2.getVisitFn;
  }
}));
Object.defineProperty(exports, "graphql", ({
  enumerable: true,
  get: function () {
    return _graphql.graphql;
  }
}));
Object.defineProperty(exports, "graphqlSync", ({
  enumerable: true,
  get: function () {
    return _graphql.graphqlSync;
  }
}));
Object.defineProperty(exports, "introspectionFromSchema", ({
  enumerable: true,
  get: function () {
    return _index6.introspectionFromSchema;
  }
}));
Object.defineProperty(exports, "introspectionTypes", ({
  enumerable: true,
  get: function () {
    return _index.introspectionTypes;
  }
}));
Object.defineProperty(exports, "isAbstractType", ({
  enumerable: true,
  get: function () {
    return _index.isAbstractType;
  }
}));
Object.defineProperty(exports, "isCompositeType", ({
  enumerable: true,
  get: function () {
    return _index.isCompositeType;
  }
}));
Object.defineProperty(exports, "isConstValueNode", ({
  enumerable: true,
  get: function () {
    return _index2.isConstValueNode;
  }
}));
Object.defineProperty(exports, "isDefinitionNode", ({
  enumerable: true,
  get: function () {
    return _index2.isDefinitionNode;
  }
}));
Object.defineProperty(exports, "isDirective", ({
  enumerable: true,
  get: function () {
    return _index.isDirective;
  }
}));
Object.defineProperty(exports, "isEnumType", ({
  enumerable: true,
  get: function () {
    return _index.isEnumType;
  }
}));
Object.defineProperty(exports, "isEqualType", ({
  enumerable: true,
  get: function () {
    return _index6.isEqualType;
  }
}));
Object.defineProperty(exports, "isExecutableDefinitionNode", ({
  enumerable: true,
  get: function () {
    return _index2.isExecutableDefinitionNode;
  }
}));
Object.defineProperty(exports, "isInputObjectType", ({
  enumerable: true,
  get: function () {
    return _index.isInputObjectType;
  }
}));
Object.defineProperty(exports, "isInputType", ({
  enumerable: true,
  get: function () {
    return _index.isInputType;
  }
}));
Object.defineProperty(exports, "isInterfaceType", ({
  enumerable: true,
  get: function () {
    return _index.isInterfaceType;
  }
}));
Object.defineProperty(exports, "isIntrospectionType", ({
  enumerable: true,
  get: function () {
    return _index.isIntrospectionType;
  }
}));
Object.defineProperty(exports, "isLeafType", ({
  enumerable: true,
  get: function () {
    return _index.isLeafType;
  }
}));
Object.defineProperty(exports, "isListType", ({
  enumerable: true,
  get: function () {
    return _index.isListType;
  }
}));
Object.defineProperty(exports, "isNamedType", ({
  enumerable: true,
  get: function () {
    return _index.isNamedType;
  }
}));
Object.defineProperty(exports, "isNonNullType", ({
  enumerable: true,
  get: function () {
    return _index.isNonNullType;
  }
}));
Object.defineProperty(exports, "isNullableType", ({
  enumerable: true,
  get: function () {
    return _index.isNullableType;
  }
}));
Object.defineProperty(exports, "isObjectType", ({
  enumerable: true,
  get: function () {
    return _index.isObjectType;
  }
}));
Object.defineProperty(exports, "isOutputType", ({
  enumerable: true,
  get: function () {
    return _index.isOutputType;
  }
}));
Object.defineProperty(exports, "isRequiredArgument", ({
  enumerable: true,
  get: function () {
    return _index.isRequiredArgument;
  }
}));
Object.defineProperty(exports, "isRequiredInputField", ({
  enumerable: true,
  get: function () {
    return _index.isRequiredInputField;
  }
}));
Object.defineProperty(exports, "isScalarType", ({
  enumerable: true,
  get: function () {
    return _index.isScalarType;
  }
}));
Object.defineProperty(exports, "isSchema", ({
  enumerable: true,
  get: function () {
    return _index.isSchema;
  }
}));
Object.defineProperty(exports, "isSelectionNode", ({
  enumerable: true,
  get: function () {
    return _index2.isSelectionNode;
  }
}));
Object.defineProperty(exports, "isSpecifiedDirective", ({
  enumerable: true,
  get: function () {
    return _index.isSpecifiedDirective;
  }
}));
Object.defineProperty(exports, "isSpecifiedScalarType", ({
  enumerable: true,
  get: function () {
    return _index.isSpecifiedScalarType;
  }
}));
Object.defineProperty(exports, "isType", ({
  enumerable: true,
  get: function () {
    return _index.isType;
  }
}));
Object.defineProperty(exports, "isTypeDefinitionNode", ({
  enumerable: true,
  get: function () {
    return _index2.isTypeDefinitionNode;
  }
}));
Object.defineProperty(exports, "isTypeExtensionNode", ({
  enumerable: true,
  get: function () {
    return _index2.isTypeExtensionNode;
  }
}));
Object.defineProperty(exports, "isTypeNode", ({
  enumerable: true,
  get: function () {
    return _index2.isTypeNode;
  }
}));
Object.defineProperty(exports, "isTypeSubTypeOf", ({
  enumerable: true,
  get: function () {
    return _index6.isTypeSubTypeOf;
  }
}));
Object.defineProperty(exports, "isTypeSystemDefinitionNode", ({
  enumerable: true,
  get: function () {
    return _index2.isTypeSystemDefinitionNode;
  }
}));
Object.defineProperty(exports, "isTypeSystemExtensionNode", ({
  enumerable: true,
  get: function () {
    return _index2.isTypeSystemExtensionNode;
  }
}));
Object.defineProperty(exports, "isUnionType", ({
  enumerable: true,
  get: function () {
    return _index.isUnionType;
  }
}));
Object.defineProperty(exports, "isValidNameError", ({
  enumerable: true,
  get: function () {
    return _index6.isValidNameError;
  }
}));
Object.defineProperty(exports, "isValueNode", ({
  enumerable: true,
  get: function () {
    return _index2.isValueNode;
  }
}));
Object.defineProperty(exports, "isWrappingType", ({
  enumerable: true,
  get: function () {
    return _index.isWrappingType;
  }
}));
Object.defineProperty(exports, "lexicographicSortSchema", ({
  enumerable: true,
  get: function () {
    return _index6.lexicographicSortSchema;
  }
}));
Object.defineProperty(exports, "locatedError", ({
  enumerable: true,
  get: function () {
    return _index5.locatedError;
  }
}));
Object.defineProperty(exports, "parse", ({
  enumerable: true,
  get: function () {
    return _index2.parse;
  }
}));
Object.defineProperty(exports, "parseConstValue", ({
  enumerable: true,
  get: function () {
    return _index2.parseConstValue;
  }
}));
Object.defineProperty(exports, "parseType", ({
  enumerable: true,
  get: function () {
    return _index2.parseType;
  }
}));
Object.defineProperty(exports, "parseValue", ({
  enumerable: true,
  get: function () {
    return _index2.parseValue;
  }
}));
Object.defineProperty(exports, "print", ({
  enumerable: true,
  get: function () {
    return _index2.print;
  }
}));
Object.defineProperty(exports, "printError", ({
  enumerable: true,
  get: function () {
    return _index5.printError;
  }
}));
Object.defineProperty(exports, "printIntrospectionSchema", ({
  enumerable: true,
  get: function () {
    return _index6.printIntrospectionSchema;
  }
}));
Object.defineProperty(exports, "printLocation", ({
  enumerable: true,
  get: function () {
    return _index2.printLocation;
  }
}));
Object.defineProperty(exports, "printSchema", ({
  enumerable: true,
  get: function () {
    return _index6.printSchema;
  }
}));
Object.defineProperty(exports, "printSourceLocation", ({
  enumerable: true,
  get: function () {
    return _index2.printSourceLocation;
  }
}));
Object.defineProperty(exports, "printType", ({
  enumerable: true,
  get: function () {
    return _index6.printType;
  }
}));
Object.defineProperty(exports, "resolveObjMapThunk", ({
  enumerable: true,
  get: function () {
    return _index.resolveObjMapThunk;
  }
}));
Object.defineProperty(exports, "resolveReadonlyArrayThunk", ({
  enumerable: true,
  get: function () {
    return _index.resolveReadonlyArrayThunk;
  }
}));
Object.defineProperty(exports, "responsePathAsArray", ({
  enumerable: true,
  get: function () {
    return _index3.responsePathAsArray;
  }
}));
Object.defineProperty(exports, "separateOperations", ({
  enumerable: true,
  get: function () {
    return _index6.separateOperations;
  }
}));
Object.defineProperty(exports, "specifiedDirectives", ({
  enumerable: true,
  get: function () {
    return _index.specifiedDirectives;
  }
}));
Object.defineProperty(exports, "specifiedRules", ({
  enumerable: true,
  get: function () {
    return _index4.specifiedRules;
  }
}));
Object.defineProperty(exports, "specifiedScalarTypes", ({
  enumerable: true,
  get: function () {
    return _index.specifiedScalarTypes;
  }
}));
Object.defineProperty(exports, "stripIgnoredCharacters", ({
  enumerable: true,
  get: function () {
    return _index6.stripIgnoredCharacters;
  }
}));
Object.defineProperty(exports, "subscribe", ({
  enumerable: true,
  get: function () {
    return _index3.subscribe;
  }
}));
Object.defineProperty(exports, "syntaxError", ({
  enumerable: true,
  get: function () {
    return _index5.syntaxError;
  }
}));
Object.defineProperty(exports, "typeFromAST", ({
  enumerable: true,
  get: function () {
    return _index6.typeFromAST;
  }
}));
Object.defineProperty(exports, "validate", ({
  enumerable: true,
  get: function () {
    return _index4.validate;
  }
}));
Object.defineProperty(exports, "validateSchema", ({
  enumerable: true,
  get: function () {
    return _index.validateSchema;
  }
}));
Object.defineProperty(exports, "valueFromAST", ({
  enumerable: true,
  get: function () {
    return _index6.valueFromAST;
  }
}));
Object.defineProperty(exports, "valueFromASTUntyped", ({
  enumerable: true,
  get: function () {
    return _index6.valueFromASTUntyped;
  }
}));
Object.defineProperty(exports, "version", ({
  enumerable: true,
  get: function () {
    return _version.version;
  }
}));
Object.defineProperty(exports, "versionInfo", ({
  enumerable: true,
  get: function () {
    return _version.versionInfo;
  }
}));
Object.defineProperty(exports, "visit", ({
  enumerable: true,
  get: function () {
    return _index2.visit;
  }
}));
Object.defineProperty(exports, "visitInParallel", ({
  enumerable: true,
  get: function () {
    return _index2.visitInParallel;
  }
}));
Object.defineProperty(exports, "visitWithTypeInfo", ({
  enumerable: true,
  get: function () {
    return _index6.visitWithTypeInfo;
  }
}));
var _version = __webpack_require__(/*! ./version.mjs */ "../../../node_modules/graphql/version.mjs");
var _graphql = __webpack_require__(/*! ./graphql.mjs */ "../../../node_modules/graphql/graphql.mjs");
var _index = __webpack_require__(/*! ./type/index.mjs */ "../../../node_modules/graphql/type/index.mjs");
var _index2 = __webpack_require__(/*! ./language/index.mjs */ "../../../node_modules/graphql/language/index.mjs");
var _index3 = __webpack_require__(/*! ./execution/index.mjs */ "../../../node_modules/graphql/execution/index.mjs");
var _index4 = __webpack_require__(/*! ./validation/index.mjs */ "../../../node_modules/graphql/validation/index.mjs");
var _index5 = __webpack_require__(/*! ./error/index.mjs */ "../../../node_modules/graphql/error/index.mjs");
var _index6 = __webpack_require__(/*! ./utilities/index.mjs */ "../../../node_modules/graphql/utilities/index.mjs");

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/Path.mjs":
/*!******************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/Path.mjs ***!
  \******************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.addPath = addPath;
exports.pathToArray = pathToArray;
/**
 * Given a Path and a key, return a new Path containing the new key.
 */
function addPath(prev, key, typename) {
  return {
    prev,
    key,
    typename
  };
}
/**
 * Given a Path, return an Array of the path keys.
 */

function pathToArray(path) {
  const flattened = [];
  let curr = path;
  while (curr) {
    flattened.push(curr.key);
    curr = curr.prev;
  }
  return flattened.reverse();
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/devAssert.mjs":
/*!***********************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/devAssert.mjs ***!
  \***********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.devAssert = devAssert;
function devAssert(condition, message) {
  const booleanCondition = Boolean(condition);
  if (!booleanCondition) {
    throw new Error(message);
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/didYouMean.mjs":
/*!************************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/didYouMean.mjs ***!
  \************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.didYouMean = didYouMean;
const MAX_SUGGESTIONS = 5;
/**
 * Given [ A, B, C ] return ' Did you mean A, B, or C?'.
 */

function didYouMean(firstArg, secondArg) {
  const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [undefined, firstArg];
  let message = ' Did you mean ';
  if (subMessage) {
    message += subMessage + ' ';
  }
  const suggestions = suggestionsArg.map(x => `"${x}"`);
  switch (suggestions.length) {
    case 0:
      return '';
    case 1:
      return message + suggestions[0] + '?';
    case 2:
      return message + suggestions[0] + ' or ' + suggestions[1] + '?';
  }
  const selected = suggestions.slice(0, MAX_SUGGESTIONS);
  const lastItem = selected.pop();
  return message + selected.join(', ') + ', or ' + lastItem + '?';
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/groupBy.mjs":
/*!*********************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/groupBy.mjs ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.groupBy = groupBy;
/**
 * Groups array items into a Map, given a function to produce grouping key.
 */
function groupBy(list, keyFn) {
  const result = new Map();
  for (const item of list) {
    const key = keyFn(item);
    const group = result.get(key);
    if (group === undefined) {
      result.set(key, [item]);
    } else {
      group.push(item);
    }
  }
  return result;
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/identityFunc.mjs":
/*!**************************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/identityFunc.mjs ***!
  \**************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.identityFunc = identityFunc;
/**
 * Returns the first argument it receives.
 */
function identityFunc(x) {
  return x;
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/inspect.mjs":
/*!*********************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/inspect.mjs ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.inspect = inspect;
const MAX_ARRAY_LENGTH = 10;
const MAX_RECURSIVE_DEPTH = 2;
/**
 * Used to print values in error messages.
 */

function inspect(value) {
  return formatValue(value, []);
}
function formatValue(value, seenValues) {
  switch (typeof value) {
    case 'string':
      return JSON.stringify(value);
    case 'function':
      return value.name ? `[function ${value.name}]` : '[function]';
    case 'object':
      return formatObjectValue(value, seenValues);
    default:
      return String(value);
  }
}
function formatObjectValue(value, previouslySeenValues) {
  if (value === null) {
    return 'null';
  }
  if (previouslySeenValues.includes(value)) {
    return '[Circular]';
  }
  const seenValues = [...previouslySeenValues, value];
  if (isJSONable(value)) {
    const jsonValue = value.toJSON(); // check for infinite recursion

    if (jsonValue !== value) {
      return typeof jsonValue === 'string' ? jsonValue : formatValue(jsonValue, seenValues);
    }
  } else if (Array.isArray(value)) {
    return formatArray(value, seenValues);
  }
  return formatObject(value, seenValues);
}
function isJSONable(value) {
  return typeof value.toJSON === 'function';
}
function formatObject(object, seenValues) {
  const entries = Object.entries(object);
  if (entries.length === 0) {
    return '{}';
  }
  if (seenValues.length > MAX_RECURSIVE_DEPTH) {
    return '[' + getObjectTag(object) + ']';
  }
  const properties = entries.map(_ref => {
    let [key, value] = _ref;
    return key + ': ' + formatValue(value, seenValues);
  });
  return '{ ' + properties.join(', ') + ' }';
}
function formatArray(array, seenValues) {
  if (array.length === 0) {
    return '[]';
  }
  if (seenValues.length > MAX_RECURSIVE_DEPTH) {
    return '[Array]';
  }
  const len = Math.min(MAX_ARRAY_LENGTH, array.length);
  const remaining = array.length - len;
  const items = [];
  for (let i = 0; i < len; ++i) {
    items.push(formatValue(array[i], seenValues));
  }
  if (remaining === 1) {
    items.push('... 1 more item');
  } else if (remaining > 1) {
    items.push(`... ${remaining} more items`);
  }
  return '[' + items.join(', ') + ']';
}
function getObjectTag(object) {
  const tag = Object.prototype.toString.call(object).replace(/^\[object /, '').replace(/]$/, '');
  if (tag === 'Object' && typeof object.constructor === 'function') {
    const name = object.constructor.name;
    if (typeof name === 'string' && name !== '') {
      return name;
    }
  }
  return tag;
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/instanceOf.mjs":
/*!************************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/instanceOf.mjs ***!
  \************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.instanceOf = void 0;
var _inspect = __webpack_require__(/*! ./inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
/**
 * A replacement for instanceof which includes an error warning when multi-realm
 * constructors are detected.
 * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
 * See: https://webpack.js.org/guides/production/
 */

const instanceOf = /* c8 ignore next 6 */
// FIXME: https://github.com/graphql/graphql-js/issues/2317
globalThis.process && globalThis.process.env.NODE_ENV === 'production' ? function instanceOf(value, constructor) {
  return value instanceof constructor;
} : function instanceOf(value, constructor) {
  if (value instanceof constructor) {
    return true;
  }
  if (typeof value === 'object' && value !== null) {
    var _value$constructor;

    // Prefer Symbol.toStringTag since it is immune to minification.
    const className = constructor.prototype[Symbol.toStringTag];
    const valueClassName =
    // We still need to support constructor's name to detect conflicts with older versions of this library.
    Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009
    ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name;
    if (className === valueClassName) {
      const stringifiedValue = (0, _inspect.inspect)(value);
      throw new Error(`Cannot use ${className} "${stringifiedValue}" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.`);
    }
  }
  return false;
};
exports.instanceOf = instanceOf;

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/invariant.mjs":
/*!***********************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/invariant.mjs ***!
  \***********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.invariant = invariant;
function invariant(condition, message) {
  const booleanCondition = Boolean(condition);
  if (!booleanCondition) {
    throw new Error(message != null ? message : 'Unexpected invariant triggered.');
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/isAsyncIterable.mjs":
/*!*****************************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/isAsyncIterable.mjs ***!
  \*****************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isAsyncIterable = isAsyncIterable;
/**
 * Returns true if the provided object implements the AsyncIterator protocol via
 * implementing a `Symbol.asyncIterator` method.
 */
function isAsyncIterable(maybeAsyncIterable) {
  return typeof (maybeAsyncIterable === null || maybeAsyncIterable === void 0 ? void 0 : maybeAsyncIterable[Symbol.asyncIterator]) === 'function';
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/isIterableObject.mjs":
/*!******************************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/isIterableObject.mjs ***!
  \******************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isIterableObject = isIterableObject;
/**
 * Returns true if the provided object is an Object (i.e. not a string literal)
 * and implements the Iterator protocol.
 *
 * This may be used in place of [Array.isArray()][isArray] to determine if
 * an object should be iterated-over e.g. Array, Map, Set, Int8Array,
 * TypedArray, etc. but excludes string literals.
 *
 * @example
 * ```ts
 * isIterableObject([ 1, 2, 3 ]) // true
 * isIterableObject(new Map()) // true
 * isIterableObject('ABC') // false
 * isIterableObject({ key: 'value' }) // false
 * isIterableObject({ length: 1, 0: 'Alpha' }) // false
 * ```
 */
function isIterableObject(maybeIterable) {
  return typeof maybeIterable === 'object' && typeof (maybeIterable === null || maybeIterable === void 0 ? void 0 : maybeIterable[Symbol.iterator]) === 'function';
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/isObjectLike.mjs":
/*!**************************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/isObjectLike.mjs ***!
  \**************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isObjectLike = isObjectLike;
/**
 * Return true if `value` is object-like. A value is object-like if it's not
 * `null` and has a `typeof` result of "object".
 */
function isObjectLike(value) {
  return typeof value == 'object' && value !== null;
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/isPromise.mjs":
/*!***********************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/isPromise.mjs ***!
  \***********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isPromise = isPromise;
/**
 * Returns true if the value acts like a Promise, i.e. has a "then" function,
 * otherwise returns false.
 */
function isPromise(value) {
  return typeof (value === null || value === void 0 ? void 0 : value.then) === 'function';
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/keyMap.mjs":
/*!********************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/keyMap.mjs ***!
  \********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.keyMap = keyMap;
/**
 * Creates a keyed JS object from an array, given a function to produce the keys
 * for each value in the array.
 *
 * This provides a convenient lookup for the array items if the key function
 * produces unique results.
 * ```ts
 * const phoneBook = [
 *   { name: 'Jon', num: '555-1234' },
 *   { name: 'Jenny', num: '867-5309' }
 * ]
 *
 * const entriesByName = keyMap(
 *   phoneBook,
 *   entry => entry.name
 * )
 *
 * // {
 * //   Jon: { name: 'Jon', num: '555-1234' },
 * //   Jenny: { name: 'Jenny', num: '867-5309' }
 * // }
 *
 * const jennyEntry = entriesByName['Jenny']
 *
 * // { name: 'Jenny', num: '857-6309' }
 * ```
 */
function keyMap(list, keyFn) {
  const result = Object.create(null);
  for (const item of list) {
    result[keyFn(item)] = item;
  }
  return result;
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/keyValMap.mjs":
/*!***********************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/keyValMap.mjs ***!
  \***********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.keyValMap = keyValMap;
/**
 * Creates a keyed JS object from an array, given a function to produce the keys
 * and a function to produce the values from each item in the array.
 * ```ts
 * const phoneBook = [
 *   { name: 'Jon', num: '555-1234' },
 *   { name: 'Jenny', num: '867-5309' }
 * ]
 *
 * // { Jon: '555-1234', Jenny: '867-5309' }
 * const phonesByName = keyValMap(
 *   phoneBook,
 *   entry => entry.name,
 *   entry => entry.num
 * )
 * ```
 */
function keyValMap(list, keyFn, valFn) {
  const result = Object.create(null);
  for (const item of list) {
    result[keyFn(item)] = valFn(item);
  }
  return result;
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/mapValue.mjs":
/*!**********************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/mapValue.mjs ***!
  \**********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.mapValue = mapValue;
/**
 * Creates an object map with the same keys as `map` and values generated by
 * running each value of `map` thru `fn`.
 */
function mapValue(map, fn) {
  const result = Object.create(null);
  for (const key of Object.keys(map)) {
    result[key] = fn(map[key], key);
  }
  return result;
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/memoize3.mjs":
/*!**********************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/memoize3.mjs ***!
  \**********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.memoize3 = memoize3;
/**
 * Memoizes the provided three-argument function.
 */
function memoize3(fn) {
  let cache0;
  return function memoized(a1, a2, a3) {
    if (cache0 === undefined) {
      cache0 = new WeakMap();
    }
    let cache1 = cache0.get(a1);
    if (cache1 === undefined) {
      cache1 = new WeakMap();
      cache0.set(a1, cache1);
    }
    let cache2 = cache1.get(a2);
    if (cache2 === undefined) {
      cache2 = new WeakMap();
      cache1.set(a2, cache2);
    }
    let fnResult = cache2.get(a3);
    if (fnResult === undefined) {
      fnResult = fn(a1, a2, a3);
      cache2.set(a3, fnResult);
    }
    return fnResult;
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/naturalCompare.mjs":
/*!****************************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/naturalCompare.mjs ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.naturalCompare = naturalCompare;
/**
 * Returns a number indicating whether a reference string comes before, or after,
 * or is the same as the given string in natural sort order.
 *
 * See: https://en.wikipedia.org/wiki/Natural_sort_order
 *
 */
function naturalCompare(aStr, bStr) {
  let aIndex = 0;
  let bIndex = 0;
  while (aIndex < aStr.length && bIndex < bStr.length) {
    let aChar = aStr.charCodeAt(aIndex);
    let bChar = bStr.charCodeAt(bIndex);
    if (isDigit(aChar) && isDigit(bChar)) {
      let aNum = 0;
      do {
        ++aIndex;
        aNum = aNum * 10 + aChar - DIGIT_0;
        aChar = aStr.charCodeAt(aIndex);
      } while (isDigit(aChar) && aNum > 0);
      let bNum = 0;
      do {
        ++bIndex;
        bNum = bNum * 10 + bChar - DIGIT_0;
        bChar = bStr.charCodeAt(bIndex);
      } while (isDigit(bChar) && bNum > 0);
      if (aNum < bNum) {
        return -1;
      }
      if (aNum > bNum) {
        return 1;
      }
    } else {
      if (aChar < bChar) {
        return -1;
      }
      if (aChar > bChar) {
        return 1;
      }
      ++aIndex;
      ++bIndex;
    }
  }
  return aStr.length - bStr.length;
}
const DIGIT_0 = 48;
const DIGIT_9 = 57;
function isDigit(code) {
  return !isNaN(code) && DIGIT_0 <= code && code <= DIGIT_9;
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/printPathArray.mjs":
/*!****************************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/printPathArray.mjs ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.printPathArray = printPathArray;
/**
 * Build a string describing the path.
 */
function printPathArray(path) {
  return path.map(key => typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key).join('');
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/promiseForObject.mjs":
/*!******************************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/promiseForObject.mjs ***!
  \******************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.promiseForObject = promiseForObject;
/**
 * This function transforms a JS object `ObjMap<Promise<T>>` into
 * a `Promise<ObjMap<T>>`
 *
 * This is akin to bluebird's `Promise.props`, but implemented only using
 * `Promise.all` so it will work with any implementation of ES6 promises.
 */
function promiseForObject(object) {
  return Promise.all(Object.values(object)).then(resolvedValues => {
    const resolvedObject = Object.create(null);
    for (const [i, key] of Object.keys(object).entries()) {
      resolvedObject[key] = resolvedValues[i];
    }
    return resolvedObject;
  });
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/promiseReduce.mjs":
/*!***************************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/promiseReduce.mjs ***!
  \***************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.promiseReduce = promiseReduce;
var _isPromise = __webpack_require__(/*! ./isPromise.mjs */ "../../../node_modules/graphql/jsutils/isPromise.mjs");
/**
 * Similar to Array.prototype.reduce(), however the reducing callback may return
 * a Promise, in which case reduction will continue after each promise resolves.
 *
 * If the callback does not return a Promise, then this function will also not
 * return a Promise.
 */
function promiseReduce(values, callbackFn, initialValue) {
  let accumulator = initialValue;
  for (const value of values) {
    accumulator = (0, _isPromise.isPromise)(accumulator) ? accumulator.then(resolved => callbackFn(resolved, value)) : callbackFn(accumulator, value);
  }
  return accumulator;
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/suggestionList.mjs":
/*!****************************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/suggestionList.mjs ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.suggestionList = suggestionList;
var _naturalCompare = __webpack_require__(/*! ./naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs");
/**
 * Given an invalid input string and a list of valid options, returns a filtered
 * list of valid options sorted based on their similarity with the input.
 */

function suggestionList(input, options) {
  const optionsByDistance = Object.create(null);
  const lexicalDistance = new LexicalDistance(input);
  const threshold = Math.floor(input.length * 0.4) + 1;
  for (const option of options) {
    const distance = lexicalDistance.measure(option, threshold);
    if (distance !== undefined) {
      optionsByDistance[option] = distance;
    }
  }
  return Object.keys(optionsByDistance).sort((a, b) => {
    const distanceDiff = optionsByDistance[a] - optionsByDistance[b];
    return distanceDiff !== 0 ? distanceDiff : (0, _naturalCompare.naturalCompare)(a, b);
  });
}
/**
 * Computes the lexical distance between strings A and B.
 *
 * The "distance" between two strings is given by counting the minimum number
 * of edits needed to transform string A into string B. An edit can be an
 * insertion, deletion, or substitution of a single character, or a swap of two
 * adjacent characters.
 *
 * Includes a custom alteration from Damerau-Levenshtein to treat case changes
 * as a single edit which helps identify mis-cased values with an edit distance
 * of 1.
 *
 * This distance can be useful for detecting typos in input or sorting
 */

class LexicalDistance {
  constructor(input) {
    this._input = input;
    this._inputLowerCase = input.toLowerCase();
    this._inputArray = stringToArray(this._inputLowerCase);
    this._rows = [new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0)];
  }
  measure(option, threshold) {
    if (this._input === option) {
      return 0;
    }
    const optionLowerCase = option.toLowerCase(); // Any case change counts as a single edit

    if (this._inputLowerCase === optionLowerCase) {
      return 1;
    }
    let a = stringToArray(optionLowerCase);
    let b = this._inputArray;
    if (a.length < b.length) {
      const tmp = a;
      a = b;
      b = tmp;
    }
    const aLength = a.length;
    const bLength = b.length;
    if (aLength - bLength > threshold) {
      return undefined;
    }
    const rows = this._rows;
    for (let j = 0; j <= bLength; j++) {
      rows[0][j] = j;
    }
    for (let i = 1; i <= aLength; i++) {
      const upRow = rows[(i - 1) % 3];
      const currentRow = rows[i % 3];
      let smallestCell = currentRow[0] = i;
      for (let j = 1; j <= bLength; j++) {
        const cost = a[i - 1] === b[j - 1] ? 0 : 1;
        let currentCell = Math.min(upRow[j] + 1,
        // delete
        currentRow[j - 1] + 1,
        // insert
        upRow[j - 1] + cost // substitute
        );

        if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {
          // transposition
          const doubleDiagonalCell = rows[(i - 2) % 3][j - 2];
          currentCell = Math.min(currentCell, doubleDiagonalCell + 1);
        }
        if (currentCell < smallestCell) {
          smallestCell = currentCell;
        }
        currentRow[j] = currentCell;
      } // Early exit, since distance can't go smaller than smallest element of the previous row.

      if (smallestCell > threshold) {
        return undefined;
      }
    }
    const distance = rows[aLength % 3][bLength];
    return distance <= threshold ? distance : undefined;
  }
}
function stringToArray(str) {
  const strLength = str.length;
  const array = new Array(strLength);
  for (let i = 0; i < strLength; ++i) {
    array[i] = str.charCodeAt(i);
  }
  return array;
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/toError.mjs":
/*!*********************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/toError.mjs ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.toError = toError;
var _inspect = __webpack_require__(/*! ./inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
/**
 * Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface.
 */

function toError(thrownValue) {
  return thrownValue instanceof Error ? thrownValue : new NonErrorThrown(thrownValue);
}
class NonErrorThrown extends Error {
  constructor(thrownValue) {
    super('Unexpected error value: ' + (0, _inspect.inspect)(thrownValue));
    this.name = 'NonErrorThrown';
    this.thrownValue = thrownValue;
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/jsutils/toObjMap.mjs":
/*!**********************************************************!*\
  !*** ../../../node_modules/graphql/jsutils/toObjMap.mjs ***!
  \**********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.toObjMap = toObjMap;
function toObjMap(obj) {
  if (obj == null) {
    return Object.create(null);
  }
  if (Object.getPrototypeOf(obj) === null) {
    return obj;
  }
  const map = Object.create(null);
  for (const [key, value] of Object.entries(obj)) {
    map[key] = value;
  }
  return map;
}

/***/ }),

/***/ "../../../node_modules/graphql/language/ast.mjs":
/*!******************************************************!*\
  !*** ../../../node_modules/graphql/language/ast.mjs ***!
  \******************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.Token = exports.QueryDocumentKeys = exports.OperationTypeNode = exports.Location = void 0;
exports.isNode = isNode;
/**
 * Contains a range of UTF-8 character offsets and token references that
 * identify the region of the source from which the AST derived.
 */
class Location {
  /**
   * The character offset at which this Node begins.
   */

  /**
   * The character offset at which this Node ends.
   */

  /**
   * The Token at which this Node begins.
   */

  /**
   * The Token at which this Node ends.
   */

  /**
   * The Source document the AST represents.
   */
  constructor(startToken, endToken, source) {
    this.start = startToken.start;
    this.end = endToken.end;
    this.startToken = startToken;
    this.endToken = endToken;
    this.source = source;
  }
  get [Symbol.toStringTag]() {
    return 'Location';
  }
  toJSON() {
    return {
      start: this.start,
      end: this.end
    };
  }
}
/**
 * Represents a range of characters represented by a lexical token
 * within a Source.
 */
exports.Location = Location;
class Token {
  /**
   * The kind of Token.
   */

  /**
   * The character offset at which this Node begins.
   */

  /**
   * The character offset at which this Node ends.
   */

  /**
   * The 1-indexed line number on which this Token appears.
   */

  /**
   * The 1-indexed column number at which this Token begins.
   */

  /**
   * For non-punctuation tokens, represents the interpreted value of the token.
   *
   * Note: is undefined for punctuation tokens, but typed as string for
   * convenience in the parser.
   */

  /**
   * Tokens exist as nodes in a double-linked-list amongst all tokens
   * including ignored tokens. <SOF> is always the first node and <EOF>
   * the last.
   */
  constructor(kind, start, end, line, column, value) {
    this.kind = kind;
    this.start = start;
    this.end = end;
    this.line = line;
    this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion

    this.value = value;
    this.prev = null;
    this.next = null;
  }
  get [Symbol.toStringTag]() {
    return 'Token';
  }
  toJSON() {
    return {
      kind: this.kind,
      value: this.value,
      line: this.line,
      column: this.column
    };
  }
}
/**
 * The list of all possible AST node types.
 */

/**
 * @internal
 */
exports.Token = Token;
const QueryDocumentKeys = {
  Name: [],
  Document: ['definitions'],
  OperationDefinition: ['name', 'variableDefinitions', 'directives', 'selectionSet'],
  VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'],
  Variable: ['name'],
  SelectionSet: ['selections'],
  Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],
  Argument: ['name', 'value'],
  FragmentSpread: ['name', 'directives'],
  InlineFragment: ['typeCondition', 'directives', 'selectionSet'],
  FragmentDefinition: ['name',
  // Note: fragment variable definitions are deprecated and will removed in v17.0.0
  'variableDefinitions', 'typeCondition', 'directives', 'selectionSet'],
  IntValue: [],
  FloatValue: [],
  StringValue: [],
  BooleanValue: [],
  NullValue: [],
  EnumValue: [],
  ListValue: ['values'],
  ObjectValue: ['fields'],
  ObjectField: ['name', 'value'],
  Directive: ['name', 'arguments'],
  NamedType: ['name'],
  ListType: ['type'],
  NonNullType: ['type'],
  SchemaDefinition: ['description', 'directives', 'operationTypes'],
  OperationTypeDefinition: ['type'],
  ScalarTypeDefinition: ['description', 'name', 'directives'],
  ObjectTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'],
  FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],
  InputValueDefinition: ['description', 'name', 'type', 'defaultValue', 'directives'],
  InterfaceTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'],
  UnionTypeDefinition: ['description', 'name', 'directives', 'types'],
  EnumTypeDefinition: ['description', 'name', 'directives', 'values'],
  EnumValueDefinition: ['description', 'name', 'directives'],
  InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],
  DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],
  SchemaExtension: ['directives', 'operationTypes'],
  ScalarTypeExtension: ['name', 'directives'],
  ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],
  InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],
  UnionTypeExtension: ['name', 'directives', 'types'],
  EnumTypeExtension: ['name', 'directives', 'values'],
  InputObjectTypeExtension: ['name', 'directives', 'fields']
};
exports.QueryDocumentKeys = QueryDocumentKeys;
const kindValues = new Set(Object.keys(QueryDocumentKeys));
/**
 * @internal
 */

function isNode(maybeNode) {
  const maybeKind = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;
  return typeof maybeKind === 'string' && kindValues.has(maybeKind);
}
/** Name */

var OperationTypeNode;
exports.OperationTypeNode = OperationTypeNode;
(function (OperationTypeNode) {
  OperationTypeNode['QUERY'] = 'query';
  OperationTypeNode['MUTATION'] = 'mutation';
  OperationTypeNode['SUBSCRIPTION'] = 'subscription';
})(OperationTypeNode || (exports.OperationTypeNode = OperationTypeNode = {}));

/***/ }),

/***/ "../../../node_modules/graphql/language/blockString.mjs":
/*!**************************************************************!*\
  !*** ../../../node_modules/graphql/language/blockString.mjs ***!
  \**************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.dedentBlockStringLines = dedentBlockStringLines;
exports.isPrintableAsBlockString = isPrintableAsBlockString;
exports.printBlockString = printBlockString;
var _characterClasses = __webpack_require__(/*! ./characterClasses.mjs */ "../../../node_modules/graphql/language/characterClasses.mjs");
/**
 * Produces the value of a block string from its parsed raw value, similar to
 * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.
 *
 * This implements the GraphQL spec's BlockStringValue() static algorithm.
 *
 * @internal
 */

function dedentBlockStringLines(lines) {
  var _firstNonEmptyLine2;
  let commonIndent = Number.MAX_SAFE_INTEGER;
  let firstNonEmptyLine = null;
  let lastNonEmptyLine = -1;
  for (let i = 0; i < lines.length; ++i) {
    var _firstNonEmptyLine;
    const line = lines[i];
    const indent = leadingWhitespace(line);
    if (indent === line.length) {
      continue; // skip empty lines
    }

    firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine : i;
    lastNonEmptyLine = i;
    if (i !== 0 && indent < commonIndent) {
      commonIndent = indent;
    }
  }
  return lines // Remove common indentation from all lines but first.
  .map((line, i) => i === 0 ? line : line.slice(commonIndent)) // Remove leading and trailing blank lines.
  .slice((_firstNonEmptyLine2 = firstNonEmptyLine) !== null && _firstNonEmptyLine2 !== void 0 ? _firstNonEmptyLine2 : 0, lastNonEmptyLine + 1);
}
function leadingWhitespace(str) {
  let i = 0;
  while (i < str.length && (0, _characterClasses.isWhiteSpace)(str.charCodeAt(i))) {
    ++i;
  }
  return i;
}
/**
 * @internal
 */

function isPrintableAsBlockString(value) {
  if (value === '') {
    return true; // empty string is printable
  }

  let isEmptyLine = true;
  let hasIndent = false;
  let hasCommonIndent = true;
  let seenNonEmptyLine = false;
  for (let i = 0; i < value.length; ++i) {
    switch (value.codePointAt(i)) {
      case 0x0000:
      case 0x0001:
      case 0x0002:
      case 0x0003:
      case 0x0004:
      case 0x0005:
      case 0x0006:
      case 0x0007:
      case 0x0008:
      case 0x000b:
      case 0x000c:
      case 0x000e:
      case 0x000f:
        return false;
      // Has non-printable characters

      case 0x000d:
        //  \r
        return false;
      // Has \r or \r\n which will be replaced as \n

      case 10:
        //  \n
        if (isEmptyLine && !seenNonEmptyLine) {
          return false; // Has leading new line
        }

        seenNonEmptyLine = true;
        isEmptyLine = true;
        hasIndent = false;
        break;
      case 9: //   \t

      case 32:
        //  <space>
        hasIndent || (hasIndent = isEmptyLine);
        break;
      default:
        hasCommonIndent && (hasCommonIndent = hasIndent);
        isEmptyLine = false;
    }
  }
  if (isEmptyLine) {
    return false; // Has trailing empty lines
  }

  if (hasCommonIndent && seenNonEmptyLine) {
    return false; // Has internal indent
  }

  return true;
}
/**
 * Print a block string in the indented block form by adding a leading and
 * trailing blank line. However, if a block string starts with whitespace and is
 * a single-line, adding a leading blank line would strip that whitespace.
 *
 * @internal
 */

function printBlockString(value, options) {
  const escapedValue = value.replace(/"""/g, '\\"""'); // Expand a block string's raw value into independent lines.

  const lines = escapedValue.split(/\r\n|[\n\r]/g);
  const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line

  const forceLeadingNewLine = lines.length > 1 && lines.slice(1).every(line => line.length === 0 || (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0))); // Trailing triple quotes just looks confusing but doesn't force trailing new line

  const hasTrailingTripleQuotes = escapedValue.endsWith('\\"""'); // Trailing quote (single or double) or slash forces trailing new line

  const hasTrailingQuote = value.endsWith('"') && !hasTrailingTripleQuotes;
  const hasTrailingSlash = value.endsWith('\\');
  const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;
  const printAsMultipleLines = !(options !== null && options !== void 0 && options.minimize) && (
  // add leading and trailing new lines only if it improves readability
  !isSingleLine || value.length > 70 || forceTrailingNewline || forceLeadingNewLine || hasTrailingTripleQuotes);
  let result = ''; // Format a multi-line block quote to account for leading space.

  const skipLeadingNewLine = isSingleLine && (0, _characterClasses.isWhiteSpace)(value.charCodeAt(0));
  if (printAsMultipleLines && !skipLeadingNewLine || forceLeadingNewLine) {
    result += '\n';
  }
  result += escapedValue;
  if (printAsMultipleLines || forceTrailingNewline) {
    result += '\n';
  }
  return '"""' + result + '"""';
}

/***/ }),

/***/ "../../../node_modules/graphql/language/characterClasses.mjs":
/*!*******************************************************************!*\
  !*** ../../../node_modules/graphql/language/characterClasses.mjs ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isDigit = isDigit;
exports.isLetter = isLetter;
exports.isNameContinue = isNameContinue;
exports.isNameStart = isNameStart;
exports.isWhiteSpace = isWhiteSpace;
/**
 * ```
 * WhiteSpace ::
 *   - "Horizontal Tab (U+0009)"
 *   - "Space (U+0020)"
 * ```
 * @internal
 */
function isWhiteSpace(code) {
  return code === 0x0009 || code === 0x0020;
}
/**
 * ```
 * Digit :: one of
 *   - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`
 * ```
 * @internal
 */

function isDigit(code) {
  return code >= 0x0030 && code <= 0x0039;
}
/**
 * ```
 * Letter :: one of
 *   - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M`
 *   - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`
 *   - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m`
 *   - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`
 * ```
 * @internal
 */

function isLetter(code) {
  return code >= 0x0061 && code <= 0x007a ||
  // A-Z
  code >= 0x0041 && code <= 0x005a // a-z
  ;
}
/**
 * ```
 * NameStart ::
 *   - Letter
 *   - `_`
 * ```
 * @internal
 */

function isNameStart(code) {
  return isLetter(code) || code === 0x005f;
}
/**
 * ```
 * NameContinue ::
 *   - Letter
 *   - Digit
 *   - `_`
 * ```
 * @internal
 */

function isNameContinue(code) {
  return isLetter(code) || isDigit(code) || code === 0x005f;
}

/***/ }),

/***/ "../../../node_modules/graphql/language/directiveLocation.mjs":
/*!********************************************************************!*\
  !*** ../../../node_modules/graphql/language/directiveLocation.mjs ***!
  \********************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.DirectiveLocation = void 0;
/**
 * The set of allowed directive location values.
 */
var DirectiveLocation;
exports.DirectiveLocation = DirectiveLocation;
(function (DirectiveLocation) {
  DirectiveLocation['QUERY'] = 'QUERY';
  DirectiveLocation['MUTATION'] = 'MUTATION';
  DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION';
  DirectiveLocation['FIELD'] = 'FIELD';
  DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION';
  DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD';
  DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT';
  DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION';
  DirectiveLocation['SCHEMA'] = 'SCHEMA';
  DirectiveLocation['SCALAR'] = 'SCALAR';
  DirectiveLocation['OBJECT'] = 'OBJECT';
  DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION';
  DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION';
  DirectiveLocation['INTERFACE'] = 'INTERFACE';
  DirectiveLocation['UNION'] = 'UNION';
  DirectiveLocation['ENUM'] = 'ENUM';
  DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE';
  DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT';
  DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION';
})(DirectiveLocation || (exports.DirectiveLocation = DirectiveLocation = {}));

/**
 * The enum type representing the directive location values.
 *
 * @deprecated Please use `DirectiveLocation`. Will be remove in v17.
 */

/***/ }),

/***/ "../../../node_modules/graphql/language/index.mjs":
/*!********************************************************!*\
  !*** ../../../node_modules/graphql/language/index.mjs ***!
  \********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "BREAK", ({
  enumerable: true,
  get: function () {
    return _visitor.BREAK;
  }
}));
Object.defineProperty(exports, "DirectiveLocation", ({
  enumerable: true,
  get: function () {
    return _directiveLocation.DirectiveLocation;
  }
}));
Object.defineProperty(exports, "Kind", ({
  enumerable: true,
  get: function () {
    return _kinds.Kind;
  }
}));
Object.defineProperty(exports, "Lexer", ({
  enumerable: true,
  get: function () {
    return _lexer.Lexer;
  }
}));
Object.defineProperty(exports, "Location", ({
  enumerable: true,
  get: function () {
    return _ast.Location;
  }
}));
Object.defineProperty(exports, "OperationTypeNode", ({
  enumerable: true,
  get: function () {
    return _ast.OperationTypeNode;
  }
}));
Object.defineProperty(exports, "Source", ({
  enumerable: true,
  get: function () {
    return _source.Source;
  }
}));
Object.defineProperty(exports, "Token", ({
  enumerable: true,
  get: function () {
    return _ast.Token;
  }
}));
Object.defineProperty(exports, "TokenKind", ({
  enumerable: true,
  get: function () {
    return _tokenKind.TokenKind;
  }
}));
Object.defineProperty(exports, "getEnterLeaveForKind", ({
  enumerable: true,
  get: function () {
    return _visitor.getEnterLeaveForKind;
  }
}));
Object.defineProperty(exports, "getLocation", ({
  enumerable: true,
  get: function () {
    return _location.getLocation;
  }
}));
Object.defineProperty(exports, "getVisitFn", ({
  enumerable: true,
  get: function () {
    return _visitor.getVisitFn;
  }
}));
Object.defineProperty(exports, "isConstValueNode", ({
  enumerable: true,
  get: function () {
    return _predicates.isConstValueNode;
  }
}));
Object.defineProperty(exports, "isDefinitionNode", ({
  enumerable: true,
  get: function () {
    return _predicates.isDefinitionNode;
  }
}));
Object.defineProperty(exports, "isExecutableDefinitionNode", ({
  enumerable: true,
  get: function () {
    return _predicates.isExecutableDefinitionNode;
  }
}));
Object.defineProperty(exports, "isSelectionNode", ({
  enumerable: true,
  get: function () {
    return _predicates.isSelectionNode;
  }
}));
Object.defineProperty(exports, "isTypeDefinitionNode", ({
  enumerable: true,
  get: function () {
    return _predicates.isTypeDefinitionNode;
  }
}));
Object.defineProperty(exports, "isTypeExtensionNode", ({
  enumerable: true,
  get: function () {
    return _predicates.isTypeExtensionNode;
  }
}));
Object.defineProperty(exports, "isTypeNode", ({
  enumerable: true,
  get: function () {
    return _predicates.isTypeNode;
  }
}));
Object.defineProperty(exports, "isTypeSystemDefinitionNode", ({
  enumerable: true,
  get: function () {
    return _predicates.isTypeSystemDefinitionNode;
  }
}));
Object.defineProperty(exports, "isTypeSystemExtensionNode", ({
  enumerable: true,
  get: function () {
    return _predicates.isTypeSystemExtensionNode;
  }
}));
Object.defineProperty(exports, "isValueNode", ({
  enumerable: true,
  get: function () {
    return _predicates.isValueNode;
  }
}));
Object.defineProperty(exports, "parse", ({
  enumerable: true,
  get: function () {
    return _parser.parse;
  }
}));
Object.defineProperty(exports, "parseConstValue", ({
  enumerable: true,
  get: function () {
    return _parser.parseConstValue;
  }
}));
Object.defineProperty(exports, "parseType", ({
  enumerable: true,
  get: function () {
    return _parser.parseType;
  }
}));
Object.defineProperty(exports, "parseValue", ({
  enumerable: true,
  get: function () {
    return _parser.parseValue;
  }
}));
Object.defineProperty(exports, "print", ({
  enumerable: true,
  get: function () {
    return _printer.print;
  }
}));
Object.defineProperty(exports, "printLocation", ({
  enumerable: true,
  get: function () {
    return _printLocation.printLocation;
  }
}));
Object.defineProperty(exports, "printSourceLocation", ({
  enumerable: true,
  get: function () {
    return _printLocation.printSourceLocation;
  }
}));
Object.defineProperty(exports, "visit", ({
  enumerable: true,
  get: function () {
    return _visitor.visit;
  }
}));
Object.defineProperty(exports, "visitInParallel", ({
  enumerable: true,
  get: function () {
    return _visitor.visitInParallel;
  }
}));
var _source = __webpack_require__(/*! ./source.mjs */ "../../../node_modules/graphql/language/source.mjs");
var _location = __webpack_require__(/*! ./location.mjs */ "../../../node_modules/graphql/language/location.mjs");
var _printLocation = __webpack_require__(/*! ./printLocation.mjs */ "../../../node_modules/graphql/language/printLocation.mjs");
var _kinds = __webpack_require__(/*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _tokenKind = __webpack_require__(/*! ./tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs");
var _lexer = __webpack_require__(/*! ./lexer.mjs */ "../../../node_modules/graphql/language/lexer.mjs");
var _parser = __webpack_require__(/*! ./parser.mjs */ "../../../node_modules/graphql/language/parser.mjs");
var _printer = __webpack_require__(/*! ./printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
var _visitor = __webpack_require__(/*! ./visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs");
var _ast = __webpack_require__(/*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
var _predicates = __webpack_require__(/*! ./predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs");
var _directiveLocation = __webpack_require__(/*! ./directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs");

/***/ }),

/***/ "../../../node_modules/graphql/language/kinds.mjs":
/*!********************************************************!*\
  !*** ../../../node_modules/graphql/language/kinds.mjs ***!
  \********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.Kind = void 0;
/**
 * The set of allowed kind values for AST nodes.
 */
var Kind;
exports.Kind = Kind;
(function (Kind) {
  Kind['NAME'] = 'Name';
  Kind['DOCUMENT'] = 'Document';
  Kind['OPERATION_DEFINITION'] = 'OperationDefinition';
  Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';
  Kind['SELECTION_SET'] = 'SelectionSet';
  Kind['FIELD'] = 'Field';
  Kind['ARGUMENT'] = 'Argument';
  Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';
  Kind['INLINE_FRAGMENT'] = 'InlineFragment';
  Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';
  Kind['VARIABLE'] = 'Variable';
  Kind['INT'] = 'IntValue';
  Kind['FLOAT'] = 'FloatValue';
  Kind['STRING'] = 'StringValue';
  Kind['BOOLEAN'] = 'BooleanValue';
  Kind['NULL'] = 'NullValue';
  Kind['ENUM'] = 'EnumValue';
  Kind['LIST'] = 'ListValue';
  Kind['OBJECT'] = 'ObjectValue';
  Kind['OBJECT_FIELD'] = 'ObjectField';
  Kind['DIRECTIVE'] = 'Directive';
  Kind['NAMED_TYPE'] = 'NamedType';
  Kind['LIST_TYPE'] = 'ListType';
  Kind['NON_NULL_TYPE'] = 'NonNullType';
  Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';
  Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';
  Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';
  Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';
  Kind['FIELD_DEFINITION'] = 'FieldDefinition';
  Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';
  Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';
  Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';
  Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';
  Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';
  Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';
  Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';
  Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';
  Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';
  Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';
  Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';
  Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';
  Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';
  Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';
})(Kind || (exports.Kind = Kind = {}));

/**
 * The enum type representing the possible kind values of AST nodes.
 *
 * @deprecated Please use `Kind`. Will be remove in v17.
 */

/***/ }),

/***/ "../../../node_modules/graphql/language/lexer.mjs":
/*!********************************************************!*\
  !*** ../../../node_modules/graphql/language/lexer.mjs ***!
  \********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.Lexer = void 0;
exports.isPunctuatorTokenKind = isPunctuatorTokenKind;
var _syntaxError = __webpack_require__(/*! ../error/syntaxError.mjs */ "../../../node_modules/graphql/error/syntaxError.mjs");
var _ast = __webpack_require__(/*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
var _blockString = __webpack_require__(/*! ./blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs");
var _characterClasses = __webpack_require__(/*! ./characterClasses.mjs */ "../../../node_modules/graphql/language/characterClasses.mjs");
var _tokenKind = __webpack_require__(/*! ./tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs");
/**
 * Given a Source object, creates a Lexer for that source.
 * A Lexer is a stateful stream generator in that every time
 * it is advanced, it returns the next token in the Source. Assuming the
 * source lexes, the final Token emitted by the lexer will be of kind
 * EOF, after which the lexer will repeatedly return the same EOF token
 * whenever called.
 */

class Lexer {
  /**
   * The previously focused non-ignored token.
   */

  /**
   * The currently focused non-ignored token.
   */

  /**
   * The (1-indexed) line containing the current token.
   */

  /**
   * The character offset at which the current line begins.
   */
  constructor(source) {
    const startOfFileToken = new _ast.Token(_tokenKind.TokenKind.SOF, 0, 0, 0, 0);
    this.source = source;
    this.lastToken = startOfFileToken;
    this.token = startOfFileToken;
    this.line = 1;
    this.lineStart = 0;
  }
  get [Symbol.toStringTag]() {
    return 'Lexer';
  }
  /**
   * Advances the token stream to the next non-ignored token.
   */

  advance() {
    this.lastToken = this.token;
    const token = this.token = this.lookahead();
    return token;
  }
  /**
   * Looks ahead and returns the next non-ignored token, but does not change
   * the state of Lexer.
   */

  lookahead() {
    let token = this.token;
    if (token.kind !== _tokenKind.TokenKind.EOF) {
      do {
        if (token.next) {
          token = token.next;
        } else {
          // Read the next token and form a link in the token linked-list.
          const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.

          token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.

          nextToken.prev = token;
          token = nextToken;
        }
      } while (token.kind === _tokenKind.TokenKind.COMMENT);
    }
    return token;
  }
}
/**
 * @internal
 */
exports.Lexer = Lexer;
function isPunctuatorTokenKind(kind) {
  return kind === _tokenKind.TokenKind.BANG || kind === _tokenKind.TokenKind.DOLLAR || kind === _tokenKind.TokenKind.AMP || kind === _tokenKind.TokenKind.PAREN_L || kind === _tokenKind.TokenKind.PAREN_R || kind === _tokenKind.TokenKind.SPREAD || kind === _tokenKind.TokenKind.COLON || kind === _tokenKind.TokenKind.EQUALS || kind === _tokenKind.TokenKind.AT || kind === _tokenKind.TokenKind.BRACKET_L || kind === _tokenKind.TokenKind.BRACKET_R || kind === _tokenKind.TokenKind.BRACE_L || kind === _tokenKind.TokenKind.PIPE || kind === _tokenKind.TokenKind.BRACE_R;
}
/**
 * A Unicode scalar value is any Unicode code point except surrogate code
 * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and
 * 0xE000 to 0x10FFFF.
 *
 * SourceCharacter ::
 *   - "Any Unicode scalar value"
 */

function isUnicodeScalarValue(code) {
  return code >= 0x0000 && code <= 0xd7ff || code >= 0xe000 && code <= 0x10ffff;
}
/**
 * The GraphQL specification defines source text as a sequence of unicode scalar
 * values (which Unicode defines to exclude surrogate code points). However
 * JavaScript defines strings as a sequence of UTF-16 code units which may
 * include surrogates. A surrogate pair is a valid source character as it
 * encodes a supplementary code point (above U+FFFF), but unpaired surrogate
 * code points are not valid source characters.
 */

function isSupplementaryCodePoint(body, location) {
  return isLeadingSurrogate(body.charCodeAt(location)) && isTrailingSurrogate(body.charCodeAt(location + 1));
}
function isLeadingSurrogate(code) {
  return code >= 0xd800 && code <= 0xdbff;
}
function isTrailingSurrogate(code) {
  return code >= 0xdc00 && code <= 0xdfff;
}
/**
 * Prints the code point (or end of file reference) at a given location in a
 * source for use in error messages.
 *
 * Printable ASCII is printed quoted, while other points are printed in Unicode
 * code point form (ie. U+1234).
 */

function printCodePointAt(lexer, location) {
  const code = lexer.source.body.codePointAt(location);
  if (code === undefined) {
    return _tokenKind.TokenKind.EOF;
  } else if (code >= 0x0020 && code <= 0x007e) {
    // Printable ASCII
    const char = String.fromCodePoint(code);
    return char === '"' ? "'\"'" : `"${char}"`;
  } // Unicode code point

  return 'U+' + code.toString(16).toUpperCase().padStart(4, '0');
}
/**
 * Create a token with line and column location information.
 */

function createToken(lexer, kind, start, end, value) {
  const line = lexer.line;
  const col = 1 + start - lexer.lineStart;
  return new _ast.Token(kind, start, end, line, col, value);
}
/**
 * Gets the next token from the source starting at the given position.
 *
 * This skips over whitespace until it finds the next lexable token, then lexes
 * punctuators immediately or calls the appropriate helper function for more
 * complicated tokens.
 */

function readNextToken(lexer, start) {
  const body = lexer.source.body;
  const bodyLength = body.length;
  let position = start;
  while (position < bodyLength) {
    const code = body.charCodeAt(position); // SourceCharacter

    switch (code) {
      // Ignored ::
      //   - UnicodeBOM
      //   - WhiteSpace
      //   - LineTerminator
      //   - Comment
      //   - Comma
      //
      // UnicodeBOM :: "Byte Order Mark (U+FEFF)"
      //
      // WhiteSpace ::
      //   - "Horizontal Tab (U+0009)"
      //   - "Space (U+0020)"
      //
      // Comma :: ,
      case 0xfeff: // <BOM>

      case 0x0009: // \t

      case 0x0020: // <space>

      case 0x002c:
        // ,
        ++position;
        continue;
      // LineTerminator ::
      //   - "New Line (U+000A)"
      //   - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"]
      //   - "Carriage Return (U+000D)" "New Line (U+000A)"

      case 0x000a:
        // \n
        ++position;
        ++lexer.line;
        lexer.lineStart = position;
        continue;
      case 0x000d:
        // \r
        if (body.charCodeAt(position + 1) === 0x000a) {
          position += 2;
        } else {
          ++position;
        }
        ++lexer.line;
        lexer.lineStart = position;
        continue;
      // Comment

      case 0x0023:
        // #
        return readComment(lexer, position);
      // Token ::
      //   - Punctuator
      //   - Name
      //   - IntValue
      //   - FloatValue
      //   - StringValue
      //
      // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }

      case 0x0021:
        // !
        return createToken(lexer, _tokenKind.TokenKind.BANG, position, position + 1);
      case 0x0024:
        // $
        return createToken(lexer, _tokenKind.TokenKind.DOLLAR, position, position + 1);
      case 0x0026:
        // &
        return createToken(lexer, _tokenKind.TokenKind.AMP, position, position + 1);
      case 0x0028:
        // (
        return createToken(lexer, _tokenKind.TokenKind.PAREN_L, position, position + 1);
      case 0x0029:
        // )
        return createToken(lexer, _tokenKind.TokenKind.PAREN_R, position, position + 1);
      case 0x002e:
        // .
        if (body.charCodeAt(position + 1) === 0x002e && body.charCodeAt(position + 2) === 0x002e) {
          return createToken(lexer, _tokenKind.TokenKind.SPREAD, position, position + 3);
        }
        break;
      case 0x003a:
        // :
        return createToken(lexer, _tokenKind.TokenKind.COLON, position, position + 1);
      case 0x003d:
        // =
        return createToken(lexer, _tokenKind.TokenKind.EQUALS, position, position + 1);
      case 0x0040:
        // @
        return createToken(lexer, _tokenKind.TokenKind.AT, position, position + 1);
      case 0x005b:
        // [
        return createToken(lexer, _tokenKind.TokenKind.BRACKET_L, position, position + 1);
      case 0x005d:
        // ]
        return createToken(lexer, _tokenKind.TokenKind.BRACKET_R, position, position + 1);
      case 0x007b:
        // {
        return createToken(lexer, _tokenKind.TokenKind.BRACE_L, position, position + 1);
      case 0x007c:
        // |
        return createToken(lexer, _tokenKind.TokenKind.PIPE, position, position + 1);
      case 0x007d:
        // }
        return createToken(lexer, _tokenKind.TokenKind.BRACE_R, position, position + 1);
      // StringValue

      case 0x0022:
        // "
        if (body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022) {
          return readBlockString(lexer, position);
        }
        return readString(lexer, position);
    } // IntValue | FloatValue (Digit | -)

    if ((0, _characterClasses.isDigit)(code) || code === 0x002d) {
      return readNumber(lexer, position, code);
    } // Name

    if ((0, _characterClasses.isNameStart)(code)) {
      return readName(lexer, position);
    }
    throw (0, _syntaxError.syntaxError)(lexer.source, position, code === 0x0027 ? 'Unexpected single quote character (\'), did you mean to use a double quote (")?' : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position) ? `Unexpected character: ${printCodePointAt(lexer, position)}.` : `Invalid character: ${printCodePointAt(lexer, position)}.`);
  }
  return createToken(lexer, _tokenKind.TokenKind.EOF, bodyLength, bodyLength);
}
/**
 * Reads a comment token from the source file.
 *
 * ```
 * Comment :: # CommentChar* [lookahead != CommentChar]
 *
 * CommentChar :: SourceCharacter but not LineTerminator
 * ```
 */

function readComment(lexer, start) {
  const body = lexer.source.body;
  const bodyLength = body.length;
  let position = start + 1;
  while (position < bodyLength) {
    const code = body.charCodeAt(position); // LineTerminator (\n | \r)

    if (code === 0x000a || code === 0x000d) {
      break;
    } // SourceCharacter

    if (isUnicodeScalarValue(code)) {
      ++position;
    } else if (isSupplementaryCodePoint(body, position)) {
      position += 2;
    } else {
      break;
    }
  }
  return createToken(lexer, _tokenKind.TokenKind.COMMENT, start, position, body.slice(start + 1, position));
}
/**
 * Reads a number token from the source file, either a FloatValue or an IntValue
 * depending on whether a FractionalPart or ExponentPart is encountered.
 *
 * ```
 * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}]
 *
 * IntegerPart ::
 *   - NegativeSign? 0
 *   - NegativeSign? NonZeroDigit Digit*
 *
 * NegativeSign :: -
 *
 * NonZeroDigit :: Digit but not `0`
 *
 * FloatValue ::
 *   - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}]
 *   - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}]
 *   - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}]
 *
 * FractionalPart :: . Digit+
 *
 * ExponentPart :: ExponentIndicator Sign? Digit+
 *
 * ExponentIndicator :: one of `e` `E`
 *
 * Sign :: one of + -
 * ```
 */

function readNumber(lexer, start, firstCode) {
  const body = lexer.source.body;
  let position = start;
  let code = firstCode;
  let isFloat = false; // NegativeSign (-)

  if (code === 0x002d) {
    code = body.charCodeAt(++position);
  } // Zero (0)

  if (code === 0x0030) {
    code = body.charCodeAt(++position);
    if ((0, _characterClasses.isDigit)(code)) {
      throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid number, unexpected digit after 0: ${printCodePointAt(lexer, position)}.`);
    }
  } else {
    position = readDigits(lexer, position, code);
    code = body.charCodeAt(position);
  } // Full stop (.)

  if (code === 0x002e) {
    isFloat = true;
    code = body.charCodeAt(++position);
    position = readDigits(lexer, position, code);
    code = body.charCodeAt(position);
  } // E e

  if (code === 0x0045 || code === 0x0065) {
    isFloat = true;
    code = body.charCodeAt(++position); // + -

    if (code === 0x002b || code === 0x002d) {
      code = body.charCodeAt(++position);
    }
    position = readDigits(lexer, position, code);
    code = body.charCodeAt(position);
  } // Numbers cannot be followed by . or NameStart

  if (code === 0x002e || (0, _characterClasses.isNameStart)(code)) {
    throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid number, expected digit but got: ${printCodePointAt(lexer, position)}.`);
  }
  return createToken(lexer, isFloat ? _tokenKind.TokenKind.FLOAT : _tokenKind.TokenKind.INT, start, position, body.slice(start, position));
}
/**
 * Returns the new position in the source after reading one or more digits.
 */

function readDigits(lexer, start, firstCode) {
  if (!(0, _characterClasses.isDigit)(firstCode)) {
    throw (0, _syntaxError.syntaxError)(lexer.source, start, `Invalid number, expected digit but got: ${printCodePointAt(lexer, start)}.`);
  }
  const body = lexer.source.body;
  let position = start + 1; // +1 to skip first firstCode

  while ((0, _characterClasses.isDigit)(body.charCodeAt(position))) {
    ++position;
  }
  return position;
}
/**
 * Reads a single-quote string token from the source file.
 *
 * ```
 * StringValue ::
 *   - `""` [lookahead != `"`]
 *   - `"` StringCharacter+ `"`
 *
 * StringCharacter ::
 *   - SourceCharacter but not `"` or `\` or LineTerminator
 *   - `\u` EscapedUnicode
 *   - `\` EscapedCharacter
 *
 * EscapedUnicode ::
 *   - `{` HexDigit+ `}`
 *   - HexDigit HexDigit HexDigit HexDigit
 *
 * EscapedCharacter :: one of `"` `\` `/` `b` `f` `n` `r` `t`
 * ```
 */

function readString(lexer, start) {
  const body = lexer.source.body;
  const bodyLength = body.length;
  let position = start + 1;
  let chunkStart = position;
  let value = '';
  while (position < bodyLength) {
    const code = body.charCodeAt(position); // Closing Quote (")

    if (code === 0x0022) {
      value += body.slice(chunkStart, position);
      return createToken(lexer, _tokenKind.TokenKind.STRING, start, position + 1, value);
    } // Escape Sequence (\)

    if (code === 0x005c) {
      value += body.slice(chunkStart, position);
      const escape = body.charCodeAt(position + 1) === 0x0075 // u
      ? body.charCodeAt(position + 2) === 0x007b // {
      ? readEscapedUnicodeVariableWidth(lexer, position) : readEscapedUnicodeFixedWidth(lexer, position) : readEscapedCharacter(lexer, position);
      value += escape.value;
      position += escape.size;
      chunkStart = position;
      continue;
    } // LineTerminator (\n | \r)

    if (code === 0x000a || code === 0x000d) {
      break;
    } // SourceCharacter

    if (isUnicodeScalarValue(code)) {
      ++position;
    } else if (isSupplementaryCodePoint(body, position)) {
      position += 2;
    } else {
      throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid character within String: ${printCodePointAt(lexer, position)}.`);
    }
  }
  throw (0, _syntaxError.syntaxError)(lexer.source, position, 'Unterminated string.');
} // The string value and lexed size of an escape sequence.

function readEscapedUnicodeVariableWidth(lexer, position) {
  const body = lexer.source.body;
  let point = 0;
  let size = 3; // Cannot be larger than 12 chars (\u{00000000}).

  while (size < 12) {
    const code = body.charCodeAt(position + size++); // Closing Brace (})

    if (code === 0x007d) {
      // Must be at least 5 chars (\u{0}) and encode a Unicode scalar value.
      if (size < 5 || !isUnicodeScalarValue(point)) {
        break;
      }
      return {
        value: String.fromCodePoint(point),
        size
      };
    } // Append this hex digit to the code point.

    point = point << 4 | readHexDigit(code);
    if (point < 0) {
      break;
    }
  }
  throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid Unicode escape sequence: "${body.slice(position, position + size)}".`);
}
function readEscapedUnicodeFixedWidth(lexer, position) {
  const body = lexer.source.body;
  const code = read16BitHexCode(body, position + 2);
  if (isUnicodeScalarValue(code)) {
    return {
      value: String.fromCodePoint(code),
      size: 6
    };
  } // GraphQL allows JSON-style surrogate pair escape sequences, but only when
  // a valid pair is formed.

  if (isLeadingSurrogate(code)) {
    // \u
    if (body.charCodeAt(position + 6) === 0x005c && body.charCodeAt(position + 7) === 0x0075) {
      const trailingCode = read16BitHexCode(body, position + 8);
      if (isTrailingSurrogate(trailingCode)) {
        // JavaScript defines strings as a sequence of UTF-16 code units and
        // encodes Unicode code points above U+FFFF using a surrogate pair of
        // code units. Since this is a surrogate pair escape sequence, just
        // include both codes into the JavaScript string value. Had JavaScript
        // not been internally based on UTF-16, then this surrogate pair would
        // be decoded to retrieve the supplementary code point.
        return {
          value: String.fromCodePoint(code, trailingCode),
          size: 12
        };
      }
    }
  }
  throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid Unicode escape sequence: "${body.slice(position, position + 6)}".`);
}
/**
 * Reads four hexadecimal characters and returns the positive integer that 16bit
 * hexadecimal string represents. For example, "000f" will return 15, and "dead"
 * will return 57005.
 *
 * Returns a negative number if any char was not a valid hexadecimal digit.
 */

function read16BitHexCode(body, position) {
  // readHexDigit() returns -1 on error. ORing a negative value with any other
  // value always produces a negative value.
  return readHexDigit(body.charCodeAt(position)) << 12 | readHexDigit(body.charCodeAt(position + 1)) << 8 | readHexDigit(body.charCodeAt(position + 2)) << 4 | readHexDigit(body.charCodeAt(position + 3));
}
/**
 * Reads a hexadecimal character and returns its positive integer value (0-15).
 *
 * '0' becomes 0, '9' becomes 9
 * 'A' becomes 10, 'F' becomes 15
 * 'a' becomes 10, 'f' becomes 15
 *
 * Returns -1 if the provided character code was not a valid hexadecimal digit.
 *
 * HexDigit :: one of
 *   - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`
 *   - `A` `B` `C` `D` `E` `F`
 *   - `a` `b` `c` `d` `e` `f`
 */

function readHexDigit(code) {
  return code >= 0x0030 && code <= 0x0039 // 0-9
  ? code - 0x0030 : code >= 0x0041 && code <= 0x0046 // A-F
  ? code - 0x0037 : code >= 0x0061 && code <= 0x0066 // a-f
  ? code - 0x0057 : -1;
}
/**
 * | Escaped Character | Code Point | Character Name               |
 * | ----------------- | ---------- | ---------------------------- |
 * | `"`               | U+0022     | double quote                 |
 * | `\`               | U+005C     | reverse solidus (back slash) |
 * | `/`               | U+002F     | solidus (forward slash)      |
 * | `b`               | U+0008     | backspace                    |
 * | `f`               | U+000C     | form feed                    |
 * | `n`               | U+000A     | line feed (new line)         |
 * | `r`               | U+000D     | carriage return              |
 * | `t`               | U+0009     | horizontal tab               |
 */

function readEscapedCharacter(lexer, position) {
  const body = lexer.source.body;
  const code = body.charCodeAt(position + 1);
  switch (code) {
    case 0x0022:
      // "
      return {
        value: '\u0022',
        size: 2
      };
    case 0x005c:
      // \
      return {
        value: '\u005c',
        size: 2
      };
    case 0x002f:
      // /
      return {
        value: '\u002f',
        size: 2
      };
    case 0x0062:
      // b
      return {
        value: '\u0008',
        size: 2
      };
    case 0x0066:
      // f
      return {
        value: '\u000c',
        size: 2
      };
    case 0x006e:
      // n
      return {
        value: '\u000a',
        size: 2
      };
    case 0x0072:
      // r
      return {
        value: '\u000d',
        size: 2
      };
    case 0x0074:
      // t
      return {
        value: '\u0009',
        size: 2
      };
  }
  throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid character escape sequence: "${body.slice(position, position + 2)}".`);
}
/**
 * Reads a block string token from the source file.
 *
 * ```
 * StringValue ::
 *   - `"""` BlockStringCharacter* `"""`
 *
 * BlockStringCharacter ::
 *   - SourceCharacter but not `"""` or `\"""`
 *   - `\"""`
 * ```
 */

function readBlockString(lexer, start) {
  const body = lexer.source.body;
  const bodyLength = body.length;
  let lineStart = lexer.lineStart;
  let position = start + 3;
  let chunkStart = position;
  let currentLine = '';
  const blockLines = [];
  while (position < bodyLength) {
    const code = body.charCodeAt(position); // Closing Triple-Quote (""")

    if (code === 0x0022 && body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022) {
      currentLine += body.slice(chunkStart, position);
      blockLines.push(currentLine);
      const token = createToken(lexer, _tokenKind.TokenKind.BLOCK_STRING, start, position + 3,
      // Return a string of the lines joined with U+000A.
      (0, _blockString.dedentBlockStringLines)(blockLines).join('\n'));
      lexer.line += blockLines.length - 1;
      lexer.lineStart = lineStart;
      return token;
    } // Escaped Triple-Quote (\""")

    if (code === 0x005c && body.charCodeAt(position + 1) === 0x0022 && body.charCodeAt(position + 2) === 0x0022 && body.charCodeAt(position + 3) === 0x0022) {
      currentLine += body.slice(chunkStart, position);
      chunkStart = position + 1; // skip only slash

      position += 4;
      continue;
    } // LineTerminator

    if (code === 0x000a || code === 0x000d) {
      currentLine += body.slice(chunkStart, position);
      blockLines.push(currentLine);
      if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) {
        position += 2;
      } else {
        ++position;
      }
      currentLine = '';
      chunkStart = position;
      lineStart = position;
      continue;
    } // SourceCharacter

    if (isUnicodeScalarValue(code)) {
      ++position;
    } else if (isSupplementaryCodePoint(body, position)) {
      position += 2;
    } else {
      throw (0, _syntaxError.syntaxError)(lexer.source, position, `Invalid character within String: ${printCodePointAt(lexer, position)}.`);
    }
  }
  throw (0, _syntaxError.syntaxError)(lexer.source, position, 'Unterminated string.');
}
/**
 * Reads an alphanumeric + underscore name from the source.
 *
 * ```
 * Name ::
 *   - NameStart NameContinue* [lookahead != NameContinue]
 * ```
 */

function readName(lexer, start) {
  const body = lexer.source.body;
  const bodyLength = body.length;
  let position = start + 1;
  while (position < bodyLength) {
    const code = body.charCodeAt(position);
    if ((0, _characterClasses.isNameContinue)(code)) {
      ++position;
    } else {
      break;
    }
  }
  return createToken(lexer, _tokenKind.TokenKind.NAME, start, position, body.slice(start, position));
}

/***/ }),

/***/ "../../../node_modules/graphql/language/location.mjs":
/*!***********************************************************!*\
  !*** ../../../node_modules/graphql/language/location.mjs ***!
  \***********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getLocation = getLocation;
var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
const LineRegExp = /\r\n|[\n\r]/g;
/**
 * Represents a location in a Source.
 */

/**
 * Takes a Source and a UTF-8 character offset, and returns the corresponding
 * line and column as a SourceLocation.
 */
function getLocation(source, position) {
  let lastLineStart = 0;
  let line = 1;
  for (const match of source.body.matchAll(LineRegExp)) {
    typeof match.index === 'number' || (0, _invariant.invariant)(false);
    if (match.index >= position) {
      break;
    }
    lastLineStart = match.index + match[0].length;
    line += 1;
  }
  return {
    line,
    column: position + 1 - lastLineStart
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/language/parser.mjs":
/*!*********************************************************!*\
  !*** ../../../node_modules/graphql/language/parser.mjs ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.Parser = void 0;
exports.parse = parse;
exports.parseConstValue = parseConstValue;
exports.parseType = parseType;
exports.parseValue = parseValue;
var _syntaxError = __webpack_require__(/*! ../error/syntaxError.mjs */ "../../../node_modules/graphql/error/syntaxError.mjs");
var _ast = __webpack_require__(/*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
var _directiveLocation = __webpack_require__(/*! ./directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs");
var _kinds = __webpack_require__(/*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _lexer = __webpack_require__(/*! ./lexer.mjs */ "../../../node_modules/graphql/language/lexer.mjs");
var _source = __webpack_require__(/*! ./source.mjs */ "../../../node_modules/graphql/language/source.mjs");
var _tokenKind = __webpack_require__(/*! ./tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs");
/**
 * Configuration options to control parser behavior
 */

/**
 * Given a GraphQL source, parses it into a Document.
 * Throws GraphQLError if a syntax error is encountered.
 */
function parse(source, options) {
  const parser = new Parser(source, options);
  return parser.parseDocument();
}
/**
 * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for
 * that value.
 * Throws GraphQLError if a syntax error is encountered.
 *
 * This is useful within tools that operate upon GraphQL Values directly and
 * in isolation of complete GraphQL documents.
 *
 * Consider providing the results to the utility function: valueFromAST().
 */

function parseValue(source, options) {
  const parser = new Parser(source, options);
  parser.expectToken(_tokenKind.TokenKind.SOF);
  const value = parser.parseValueLiteral(false);
  parser.expectToken(_tokenKind.TokenKind.EOF);
  return value;
}
/**
 * Similar to parseValue(), but raises a parse error if it encounters a
 * variable. The return type will be a constant value.
 */

function parseConstValue(source, options) {
  const parser = new Parser(source, options);
  parser.expectToken(_tokenKind.TokenKind.SOF);
  const value = parser.parseConstValueLiteral();
  parser.expectToken(_tokenKind.TokenKind.EOF);
  return value;
}
/**
 * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for
 * that type.
 * Throws GraphQLError if a syntax error is encountered.
 *
 * This is useful within tools that operate upon GraphQL Types directly and
 * in isolation of complete GraphQL documents.
 *
 * Consider providing the results to the utility function: typeFromAST().
 */

function parseType(source, options) {
  const parser = new Parser(source, options);
  parser.expectToken(_tokenKind.TokenKind.SOF);
  const type = parser.parseTypeReference();
  parser.expectToken(_tokenKind.TokenKind.EOF);
  return type;
}
/**
 * This class is exported only to assist people in implementing their own parsers
 * without duplicating too much code and should be used only as last resort for cases
 * such as experimental syntax or if certain features could not be contributed upstream.
 *
 * It is still part of the internal API and is versioned, so any changes to it are never
 * considered breaking changes. If you still need to support multiple versions of the
 * library, please use the `versionInfo` variable for version detection.
 *
 * @internal
 */

class Parser {
  constructor(source) {
    let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
    const sourceObj = (0, _source.isSource)(source) ? source : new _source.Source(source);
    this._lexer = new _lexer.Lexer(sourceObj);
    this._options = options;
    this._tokenCounter = 0;
  }
  /**
   * Converts a name lex token into a name parse node.
   */

  parseName() {
    const token = this.expectToken(_tokenKind.TokenKind.NAME);
    return this.node(token, {
      kind: _kinds.Kind.NAME,
      value: token.value
    });
  } // Implements the parsing rules in the Document section.

  /**
   * Document : Definition+
   */

  parseDocument() {
    return this.node(this._lexer.token, {
      kind: _kinds.Kind.DOCUMENT,
      definitions: this.many(_tokenKind.TokenKind.SOF, this.parseDefinition, _tokenKind.TokenKind.EOF)
    });
  }
  /**
   * Definition :
   *   - ExecutableDefinition
   *   - TypeSystemDefinition
   *   - TypeSystemExtension
   *
   * ExecutableDefinition :
   *   - OperationDefinition
   *   - FragmentDefinition
   *
   * TypeSystemDefinition :
   *   - SchemaDefinition
   *   - TypeDefinition
   *   - DirectiveDefinition
   *
   * TypeDefinition :
   *   - ScalarTypeDefinition
   *   - ObjectTypeDefinition
   *   - InterfaceTypeDefinition
   *   - UnionTypeDefinition
   *   - EnumTypeDefinition
   *   - InputObjectTypeDefinition
   */

  parseDefinition() {
    if (this.peek(_tokenKind.TokenKind.BRACE_L)) {
      return this.parseOperationDefinition();
    } // Many definitions begin with a description and require a lookahead.

    const hasDescription = this.peekDescription();
    const keywordToken = hasDescription ? this._lexer.lookahead() : this._lexer.token;
    if (keywordToken.kind === _tokenKind.TokenKind.NAME) {
      switch (keywordToken.value) {
        case 'schema':
          return this.parseSchemaDefinition();
        case 'scalar':
          return this.parseScalarTypeDefinition();
        case 'type':
          return this.parseObjectTypeDefinition();
        case 'interface':
          return this.parseInterfaceTypeDefinition();
        case 'union':
          return this.parseUnionTypeDefinition();
        case 'enum':
          return this.parseEnumTypeDefinition();
        case 'input':
          return this.parseInputObjectTypeDefinition();
        case 'directive':
          return this.parseDirectiveDefinition();
      }
      if (hasDescription) {
        throw (0, _syntaxError.syntaxError)(this._lexer.source, this._lexer.token.start, 'Unexpected description, descriptions are supported only on type definitions.');
      }
      switch (keywordToken.value) {
        case 'query':
        case 'mutation':
        case 'subscription':
          return this.parseOperationDefinition();
        case 'fragment':
          return this.parseFragmentDefinition();
        case 'extend':
          return this.parseTypeSystemExtension();
      }
    }
    throw this.unexpected(keywordToken);
  } // Implements the parsing rules in the Operations section.

  /**
   * OperationDefinition :
   *  - SelectionSet
   *  - OperationType Name? VariableDefinitions? Directives? SelectionSet
   */

  parseOperationDefinition() {
    const start = this._lexer.token;
    if (this.peek(_tokenKind.TokenKind.BRACE_L)) {
      return this.node(start, {
        kind: _kinds.Kind.OPERATION_DEFINITION,
        operation: _ast.OperationTypeNode.QUERY,
        name: undefined,
        variableDefinitions: [],
        directives: [],
        selectionSet: this.parseSelectionSet()
      });
    }
    const operation = this.parseOperationType();
    let name;
    if (this.peek(_tokenKind.TokenKind.NAME)) {
      name = this.parseName();
    }
    return this.node(start, {
      kind: _kinds.Kind.OPERATION_DEFINITION,
      operation,
      name,
      variableDefinitions: this.parseVariableDefinitions(),
      directives: this.parseDirectives(false),
      selectionSet: this.parseSelectionSet()
    });
  }
  /**
   * OperationType : one of query mutation subscription
   */

  parseOperationType() {
    const operationToken = this.expectToken(_tokenKind.TokenKind.NAME);
    switch (operationToken.value) {
      case 'query':
        return _ast.OperationTypeNode.QUERY;
      case 'mutation':
        return _ast.OperationTypeNode.MUTATION;
      case 'subscription':
        return _ast.OperationTypeNode.SUBSCRIPTION;
    }
    throw this.unexpected(operationToken);
  }
  /**
   * VariableDefinitions : ( VariableDefinition+ )
   */

  parseVariableDefinitions() {
    return this.optionalMany(_tokenKind.TokenKind.PAREN_L, this.parseVariableDefinition, _tokenKind.TokenKind.PAREN_R);
  }
  /**
   * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?
   */

  parseVariableDefinition() {
    return this.node(this._lexer.token, {
      kind: _kinds.Kind.VARIABLE_DEFINITION,
      variable: this.parseVariable(),
      type: (this.expectToken(_tokenKind.TokenKind.COLON), this.parseTypeReference()),
      defaultValue: this.expectOptionalToken(_tokenKind.TokenKind.EQUALS) ? this.parseConstValueLiteral() : undefined,
      directives: this.parseConstDirectives()
    });
  }
  /**
   * Variable : $ Name
   */

  parseVariable() {
    const start = this._lexer.token;
    this.expectToken(_tokenKind.TokenKind.DOLLAR);
    return this.node(start, {
      kind: _kinds.Kind.VARIABLE,
      name: this.parseName()
    });
  }
  /**
   * ```
   * SelectionSet : { Selection+ }
   * ```
   */

  parseSelectionSet() {
    return this.node(this._lexer.token, {
      kind: _kinds.Kind.SELECTION_SET,
      selections: this.many(_tokenKind.TokenKind.BRACE_L, this.parseSelection, _tokenKind.TokenKind.BRACE_R)
    });
  }
  /**
   * Selection :
   *   - Field
   *   - FragmentSpread
   *   - InlineFragment
   */

  parseSelection() {
    return this.peek(_tokenKind.TokenKind.SPREAD) ? this.parseFragment() : this.parseField();
  }
  /**
   * Field : Alias? Name Arguments? Directives? SelectionSet?
   *
   * Alias : Name :
   */

  parseField() {
    const start = this._lexer.token;
    const nameOrAlias = this.parseName();
    let alias;
    let name;
    if (this.expectOptionalToken(_tokenKind.TokenKind.COLON)) {
      alias = nameOrAlias;
      name = this.parseName();
    } else {
      name = nameOrAlias;
    }
    return this.node(start, {
      kind: _kinds.Kind.FIELD,
      alias,
      name,
      arguments: this.parseArguments(false),
      directives: this.parseDirectives(false),
      selectionSet: this.peek(_tokenKind.TokenKind.BRACE_L) ? this.parseSelectionSet() : undefined
    });
  }
  /**
   * Arguments[Const] : ( Argument[?Const]+ )
   */

  parseArguments(isConst) {
    const item = isConst ? this.parseConstArgument : this.parseArgument;
    return this.optionalMany(_tokenKind.TokenKind.PAREN_L, item, _tokenKind.TokenKind.PAREN_R);
  }
  /**
   * Argument[Const] : Name : Value[?Const]
   */

  parseArgument() {
    let isConst = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
    const start = this._lexer.token;
    const name = this.parseName();
    this.expectToken(_tokenKind.TokenKind.COLON);
    return this.node(start, {
      kind: _kinds.Kind.ARGUMENT,
      name,
      value: this.parseValueLiteral(isConst)
    });
  }
  parseConstArgument() {
    return this.parseArgument(true);
  } // Implements the parsing rules in the Fragments section.

  /**
   * Corresponds to both FragmentSpread and InlineFragment in the spec.
   *
   * FragmentSpread : ... FragmentName Directives?
   *
   * InlineFragment : ... TypeCondition? Directives? SelectionSet
   */

  parseFragment() {
    const start = this._lexer.token;
    this.expectToken(_tokenKind.TokenKind.SPREAD);
    const hasTypeCondition = this.expectOptionalKeyword('on');
    if (!hasTypeCondition && this.peek(_tokenKind.TokenKind.NAME)) {
      return this.node(start, {
        kind: _kinds.Kind.FRAGMENT_SPREAD,
        name: this.parseFragmentName(),
        directives: this.parseDirectives(false)
      });
    }
    return this.node(start, {
      kind: _kinds.Kind.INLINE_FRAGMENT,
      typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,
      directives: this.parseDirectives(false),
      selectionSet: this.parseSelectionSet()
    });
  }
  /**
   * FragmentDefinition :
   *   - fragment FragmentName on TypeCondition Directives? SelectionSet
   *
   * TypeCondition : NamedType
   */

  parseFragmentDefinition() {
    const start = this._lexer.token;
    this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes
    // the grammar of FragmentDefinition:
    //   - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet

    if (this._options.allowLegacyFragmentVariables === true) {
      return this.node(start, {
        kind: _kinds.Kind.FRAGMENT_DEFINITION,
        name: this.parseFragmentName(),
        variableDefinitions: this.parseVariableDefinitions(),
        typeCondition: (this.expectKeyword('on'), this.parseNamedType()),
        directives: this.parseDirectives(false),
        selectionSet: this.parseSelectionSet()
      });
    }
    return this.node(start, {
      kind: _kinds.Kind.FRAGMENT_DEFINITION,
      name: this.parseFragmentName(),
      typeCondition: (this.expectKeyword('on'), this.parseNamedType()),
      directives: this.parseDirectives(false),
      selectionSet: this.parseSelectionSet()
    });
  }
  /**
   * FragmentName : Name but not `on`
   */

  parseFragmentName() {
    if (this._lexer.token.value === 'on') {
      throw this.unexpected();
    }
    return this.parseName();
  } // Implements the parsing rules in the Values section.

  /**
   * Value[Const] :
   *   - [~Const] Variable
   *   - IntValue
   *   - FloatValue
   *   - StringValue
   *   - BooleanValue
   *   - NullValue
   *   - EnumValue
   *   - ListValue[?Const]
   *   - ObjectValue[?Const]
   *
   * BooleanValue : one of `true` `false`
   *
   * NullValue : `null`
   *
   * EnumValue : Name but not `true`, `false` or `null`
   */

  parseValueLiteral(isConst) {
    const token = this._lexer.token;
    switch (token.kind) {
      case _tokenKind.TokenKind.BRACKET_L:
        return this.parseList(isConst);
      case _tokenKind.TokenKind.BRACE_L:
        return this.parseObject(isConst);
      case _tokenKind.TokenKind.INT:
        this.advanceLexer();
        return this.node(token, {
          kind: _kinds.Kind.INT,
          value: token.value
        });
      case _tokenKind.TokenKind.FLOAT:
        this.advanceLexer();
        return this.node(token, {
          kind: _kinds.Kind.FLOAT,
          value: token.value
        });
      case _tokenKind.TokenKind.STRING:
      case _tokenKind.TokenKind.BLOCK_STRING:
        return this.parseStringLiteral();
      case _tokenKind.TokenKind.NAME:
        this.advanceLexer();
        switch (token.value) {
          case 'true':
            return this.node(token, {
              kind: _kinds.Kind.BOOLEAN,
              value: true
            });
          case 'false':
            return this.node(token, {
              kind: _kinds.Kind.BOOLEAN,
              value: false
            });
          case 'null':
            return this.node(token, {
              kind: _kinds.Kind.NULL
            });
          default:
            return this.node(token, {
              kind: _kinds.Kind.ENUM,
              value: token.value
            });
        }
      case _tokenKind.TokenKind.DOLLAR:
        if (isConst) {
          this.expectToken(_tokenKind.TokenKind.DOLLAR);
          if (this._lexer.token.kind === _tokenKind.TokenKind.NAME) {
            const varName = this._lexer.token.value;
            throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Unexpected variable "$${varName}" in constant value.`);
          } else {
            throw this.unexpected(token);
          }
        }
        return this.parseVariable();
      default:
        throw this.unexpected();
    }
  }
  parseConstValueLiteral() {
    return this.parseValueLiteral(true);
  }
  parseStringLiteral() {
    const token = this._lexer.token;
    this.advanceLexer();
    return this.node(token, {
      kind: _kinds.Kind.STRING,
      value: token.value,
      block: token.kind === _tokenKind.TokenKind.BLOCK_STRING
    });
  }
  /**
   * ListValue[Const] :
   *   - [ ]
   *   - [ Value[?Const]+ ]
   */

  parseList(isConst) {
    const item = () => this.parseValueLiteral(isConst);
    return this.node(this._lexer.token, {
      kind: _kinds.Kind.LIST,
      values: this.any(_tokenKind.TokenKind.BRACKET_L, item, _tokenKind.TokenKind.BRACKET_R)
    });
  }
  /**
   * ```
   * ObjectValue[Const] :
   *   - { }
   *   - { ObjectField[?Const]+ }
   * ```
   */

  parseObject(isConst) {
    const item = () => this.parseObjectField(isConst);
    return this.node(this._lexer.token, {
      kind: _kinds.Kind.OBJECT,
      fields: this.any(_tokenKind.TokenKind.BRACE_L, item, _tokenKind.TokenKind.BRACE_R)
    });
  }
  /**
   * ObjectField[Const] : Name : Value[?Const]
   */

  parseObjectField(isConst) {
    const start = this._lexer.token;
    const name = this.parseName();
    this.expectToken(_tokenKind.TokenKind.COLON);
    return this.node(start, {
      kind: _kinds.Kind.OBJECT_FIELD,
      name,
      value: this.parseValueLiteral(isConst)
    });
  } // Implements the parsing rules in the Directives section.

  /**
   * Directives[Const] : Directive[?Const]+
   */

  parseDirectives(isConst) {
    const directives = [];
    while (this.peek(_tokenKind.TokenKind.AT)) {
      directives.push(this.parseDirective(isConst));
    }
    return directives;
  }
  parseConstDirectives() {
    return this.parseDirectives(true);
  }
  /**
   * ```
   * Directive[Const] : @ Name Arguments[?Const]?
   * ```
   */

  parseDirective(isConst) {
    const start = this._lexer.token;
    this.expectToken(_tokenKind.TokenKind.AT);
    return this.node(start, {
      kind: _kinds.Kind.DIRECTIVE,
      name: this.parseName(),
      arguments: this.parseArguments(isConst)
    });
  } // Implements the parsing rules in the Types section.

  /**
   * Type :
   *   - NamedType
   *   - ListType
   *   - NonNullType
   */

  parseTypeReference() {
    const start = this._lexer.token;
    let type;
    if (this.expectOptionalToken(_tokenKind.TokenKind.BRACKET_L)) {
      const innerType = this.parseTypeReference();
      this.expectToken(_tokenKind.TokenKind.BRACKET_R);
      type = this.node(start, {
        kind: _kinds.Kind.LIST_TYPE,
        type: innerType
      });
    } else {
      type = this.parseNamedType();
    }
    if (this.expectOptionalToken(_tokenKind.TokenKind.BANG)) {
      return this.node(start, {
        kind: _kinds.Kind.NON_NULL_TYPE,
        type
      });
    }
    return type;
  }
  /**
   * NamedType : Name
   */

  parseNamedType() {
    return this.node(this._lexer.token, {
      kind: _kinds.Kind.NAMED_TYPE,
      name: this.parseName()
    });
  } // Implements the parsing rules in the Type Definition section.

  peekDescription() {
    return this.peek(_tokenKind.TokenKind.STRING) || this.peek(_tokenKind.TokenKind.BLOCK_STRING);
  }
  /**
   * Description : StringValue
   */

  parseDescription() {
    if (this.peekDescription()) {
      return this.parseStringLiteral();
    }
  }
  /**
   * ```
   * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }
   * ```
   */

  parseSchemaDefinition() {
    const start = this._lexer.token;
    const description = this.parseDescription();
    this.expectKeyword('schema');
    const directives = this.parseConstDirectives();
    const operationTypes = this.many(_tokenKind.TokenKind.BRACE_L, this.parseOperationTypeDefinition, _tokenKind.TokenKind.BRACE_R);
    return this.node(start, {
      kind: _kinds.Kind.SCHEMA_DEFINITION,
      description,
      directives,
      operationTypes
    });
  }
  /**
   * OperationTypeDefinition : OperationType : NamedType
   */

  parseOperationTypeDefinition() {
    const start = this._lexer.token;
    const operation = this.parseOperationType();
    this.expectToken(_tokenKind.TokenKind.COLON);
    const type = this.parseNamedType();
    return this.node(start, {
      kind: _kinds.Kind.OPERATION_TYPE_DEFINITION,
      operation,
      type
    });
  }
  /**
   * ScalarTypeDefinition : Description? scalar Name Directives[Const]?
   */

  parseScalarTypeDefinition() {
    const start = this._lexer.token;
    const description = this.parseDescription();
    this.expectKeyword('scalar');
    const name = this.parseName();
    const directives = this.parseConstDirectives();
    return this.node(start, {
      kind: _kinds.Kind.SCALAR_TYPE_DEFINITION,
      description,
      name,
      directives
    });
  }
  /**
   * ObjectTypeDefinition :
   *   Description?
   *   type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
   */

  parseObjectTypeDefinition() {
    const start = this._lexer.token;
    const description = this.parseDescription();
    this.expectKeyword('type');
    const name = this.parseName();
    const interfaces = this.parseImplementsInterfaces();
    const directives = this.parseConstDirectives();
    const fields = this.parseFieldsDefinition();
    return this.node(start, {
      kind: _kinds.Kind.OBJECT_TYPE_DEFINITION,
      description,
      name,
      interfaces,
      directives,
      fields
    });
  }
  /**
   * ImplementsInterfaces :
   *   - implements `&`? NamedType
   *   - ImplementsInterfaces & NamedType
   */

  parseImplementsInterfaces() {
    return this.expectOptionalKeyword('implements') ? this.delimitedMany(_tokenKind.TokenKind.AMP, this.parseNamedType) : [];
  }
  /**
   * ```
   * FieldsDefinition : { FieldDefinition+ }
   * ```
   */

  parseFieldsDefinition() {
    return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseFieldDefinition, _tokenKind.TokenKind.BRACE_R);
  }
  /**
   * FieldDefinition :
   *   - Description? Name ArgumentsDefinition? : Type Directives[Const]?
   */

  parseFieldDefinition() {
    const start = this._lexer.token;
    const description = this.parseDescription();
    const name = this.parseName();
    const args = this.parseArgumentDefs();
    this.expectToken(_tokenKind.TokenKind.COLON);
    const type = this.parseTypeReference();
    const directives = this.parseConstDirectives();
    return this.node(start, {
      kind: _kinds.Kind.FIELD_DEFINITION,
      description,
      name,
      arguments: args,
      type,
      directives
    });
  }
  /**
   * ArgumentsDefinition : ( InputValueDefinition+ )
   */

  parseArgumentDefs() {
    return this.optionalMany(_tokenKind.TokenKind.PAREN_L, this.parseInputValueDef, _tokenKind.TokenKind.PAREN_R);
  }
  /**
   * InputValueDefinition :
   *   - Description? Name : Type DefaultValue? Directives[Const]?
   */

  parseInputValueDef() {
    const start = this._lexer.token;
    const description = this.parseDescription();
    const name = this.parseName();
    this.expectToken(_tokenKind.TokenKind.COLON);
    const type = this.parseTypeReference();
    let defaultValue;
    if (this.expectOptionalToken(_tokenKind.TokenKind.EQUALS)) {
      defaultValue = this.parseConstValueLiteral();
    }
    const directives = this.parseConstDirectives();
    return this.node(start, {
      kind: _kinds.Kind.INPUT_VALUE_DEFINITION,
      description,
      name,
      type,
      defaultValue,
      directives
    });
  }
  /**
   * InterfaceTypeDefinition :
   *   - Description? interface Name Directives[Const]? FieldsDefinition?
   */

  parseInterfaceTypeDefinition() {
    const start = this._lexer.token;
    const description = this.parseDescription();
    this.expectKeyword('interface');
    const name = this.parseName();
    const interfaces = this.parseImplementsInterfaces();
    const directives = this.parseConstDirectives();
    const fields = this.parseFieldsDefinition();
    return this.node(start, {
      kind: _kinds.Kind.INTERFACE_TYPE_DEFINITION,
      description,
      name,
      interfaces,
      directives,
      fields
    });
  }
  /**
   * UnionTypeDefinition :
   *   - Description? union Name Directives[Const]? UnionMemberTypes?
   */

  parseUnionTypeDefinition() {
    const start = this._lexer.token;
    const description = this.parseDescription();
    this.expectKeyword('union');
    const name = this.parseName();
    const directives = this.parseConstDirectives();
    const types = this.parseUnionMemberTypes();
    return this.node(start, {
      kind: _kinds.Kind.UNION_TYPE_DEFINITION,
      description,
      name,
      directives,
      types
    });
  }
  /**
   * UnionMemberTypes :
   *   - = `|`? NamedType
   *   - UnionMemberTypes | NamedType
   */

  parseUnionMemberTypes() {
    return this.expectOptionalToken(_tokenKind.TokenKind.EQUALS) ? this.delimitedMany(_tokenKind.TokenKind.PIPE, this.parseNamedType) : [];
  }
  /**
   * EnumTypeDefinition :
   *   - Description? enum Name Directives[Const]? EnumValuesDefinition?
   */

  parseEnumTypeDefinition() {
    const start = this._lexer.token;
    const description = this.parseDescription();
    this.expectKeyword('enum');
    const name = this.parseName();
    const directives = this.parseConstDirectives();
    const values = this.parseEnumValuesDefinition();
    return this.node(start, {
      kind: _kinds.Kind.ENUM_TYPE_DEFINITION,
      description,
      name,
      directives,
      values
    });
  }
  /**
   * ```
   * EnumValuesDefinition : { EnumValueDefinition+ }
   * ```
   */

  parseEnumValuesDefinition() {
    return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseEnumValueDefinition, _tokenKind.TokenKind.BRACE_R);
  }
  /**
   * EnumValueDefinition : Description? EnumValue Directives[Const]?
   */

  parseEnumValueDefinition() {
    const start = this._lexer.token;
    const description = this.parseDescription();
    const name = this.parseEnumValueName();
    const directives = this.parseConstDirectives();
    return this.node(start, {
      kind: _kinds.Kind.ENUM_VALUE_DEFINITION,
      description,
      name,
      directives
    });
  }
  /**
   * EnumValue : Name but not `true`, `false` or `null`
   */

  parseEnumValueName() {
    if (this._lexer.token.value === 'true' || this._lexer.token.value === 'false' || this._lexer.token.value === 'null') {
      throw (0, _syntaxError.syntaxError)(this._lexer.source, this._lexer.token.start, `${getTokenDesc(this._lexer.token)} is reserved and cannot be used for an enum value.`);
    }
    return this.parseName();
  }
  /**
   * InputObjectTypeDefinition :
   *   - Description? input Name Directives[Const]? InputFieldsDefinition?
   */

  parseInputObjectTypeDefinition() {
    const start = this._lexer.token;
    const description = this.parseDescription();
    this.expectKeyword('input');
    const name = this.parseName();
    const directives = this.parseConstDirectives();
    const fields = this.parseInputFieldsDefinition();
    return this.node(start, {
      kind: _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION,
      description,
      name,
      directives,
      fields
    });
  }
  /**
   * ```
   * InputFieldsDefinition : { InputValueDefinition+ }
   * ```
   */

  parseInputFieldsDefinition() {
    return this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseInputValueDef, _tokenKind.TokenKind.BRACE_R);
  }
  /**
   * TypeSystemExtension :
   *   - SchemaExtension
   *   - TypeExtension
   *
   * TypeExtension :
   *   - ScalarTypeExtension
   *   - ObjectTypeExtension
   *   - InterfaceTypeExtension
   *   - UnionTypeExtension
   *   - EnumTypeExtension
   *   - InputObjectTypeDefinition
   */

  parseTypeSystemExtension() {
    const keywordToken = this._lexer.lookahead();
    if (keywordToken.kind === _tokenKind.TokenKind.NAME) {
      switch (keywordToken.value) {
        case 'schema':
          return this.parseSchemaExtension();
        case 'scalar':
          return this.parseScalarTypeExtension();
        case 'type':
          return this.parseObjectTypeExtension();
        case 'interface':
          return this.parseInterfaceTypeExtension();
        case 'union':
          return this.parseUnionTypeExtension();
        case 'enum':
          return this.parseEnumTypeExtension();
        case 'input':
          return this.parseInputObjectTypeExtension();
      }
    }
    throw this.unexpected(keywordToken);
  }
  /**
   * ```
   * SchemaExtension :
   *  - extend schema Directives[Const]? { OperationTypeDefinition+ }
   *  - extend schema Directives[Const]
   * ```
   */

  parseSchemaExtension() {
    const start = this._lexer.token;
    this.expectKeyword('extend');
    this.expectKeyword('schema');
    const directives = this.parseConstDirectives();
    const operationTypes = this.optionalMany(_tokenKind.TokenKind.BRACE_L, this.parseOperationTypeDefinition, _tokenKind.TokenKind.BRACE_R);
    if (directives.length === 0 && operationTypes.length === 0) {
      throw this.unexpected();
    }
    return this.node(start, {
      kind: _kinds.Kind.SCHEMA_EXTENSION,
      directives,
      operationTypes
    });
  }
  /**
   * ScalarTypeExtension :
   *   - extend scalar Name Directives[Const]
   */

  parseScalarTypeExtension() {
    const start = this._lexer.token;
    this.expectKeyword('extend');
    this.expectKeyword('scalar');
    const name = this.parseName();
    const directives = this.parseConstDirectives();
    if (directives.length === 0) {
      throw this.unexpected();
    }
    return this.node(start, {
      kind: _kinds.Kind.SCALAR_TYPE_EXTENSION,
      name,
      directives
    });
  }
  /**
   * ObjectTypeExtension :
   *  - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
   *  - extend type Name ImplementsInterfaces? Directives[Const]
   *  - extend type Name ImplementsInterfaces
   */

  parseObjectTypeExtension() {
    const start = this._lexer.token;
    this.expectKeyword('extend');
    this.expectKeyword('type');
    const name = this.parseName();
    const interfaces = this.parseImplementsInterfaces();
    const directives = this.parseConstDirectives();
    const fields = this.parseFieldsDefinition();
    if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {
      throw this.unexpected();
    }
    return this.node(start, {
      kind: _kinds.Kind.OBJECT_TYPE_EXTENSION,
      name,
      interfaces,
      directives,
      fields
    });
  }
  /**
   * InterfaceTypeExtension :
   *  - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
   *  - extend interface Name ImplementsInterfaces? Directives[Const]
   *  - extend interface Name ImplementsInterfaces
   */

  parseInterfaceTypeExtension() {
    const start = this._lexer.token;
    this.expectKeyword('extend');
    this.expectKeyword('interface');
    const name = this.parseName();
    const interfaces = this.parseImplementsInterfaces();
    const directives = this.parseConstDirectives();
    const fields = this.parseFieldsDefinition();
    if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {
      throw this.unexpected();
    }
    return this.node(start, {
      kind: _kinds.Kind.INTERFACE_TYPE_EXTENSION,
      name,
      interfaces,
      directives,
      fields
    });
  }
  /**
   * UnionTypeExtension :
   *   - extend union Name Directives[Const]? UnionMemberTypes
   *   - extend union Name Directives[Const]
   */

  parseUnionTypeExtension() {
    const start = this._lexer.token;
    this.expectKeyword('extend');
    this.expectKeyword('union');
    const name = this.parseName();
    const directives = this.parseConstDirectives();
    const types = this.parseUnionMemberTypes();
    if (directives.length === 0 && types.length === 0) {
      throw this.unexpected();
    }
    return this.node(start, {
      kind: _kinds.Kind.UNION_TYPE_EXTENSION,
      name,
      directives,
      types
    });
  }
  /**
   * EnumTypeExtension :
   *   - extend enum Name Directives[Const]? EnumValuesDefinition
   *   - extend enum Name Directives[Const]
   */

  parseEnumTypeExtension() {
    const start = this._lexer.token;
    this.expectKeyword('extend');
    this.expectKeyword('enum');
    const name = this.parseName();
    const directives = this.parseConstDirectives();
    const values = this.parseEnumValuesDefinition();
    if (directives.length === 0 && values.length === 0) {
      throw this.unexpected();
    }
    return this.node(start, {
      kind: _kinds.Kind.ENUM_TYPE_EXTENSION,
      name,
      directives,
      values
    });
  }
  /**
   * InputObjectTypeExtension :
   *   - extend input Name Directives[Const]? InputFieldsDefinition
   *   - extend input Name Directives[Const]
   */

  parseInputObjectTypeExtension() {
    const start = this._lexer.token;
    this.expectKeyword('extend');
    this.expectKeyword('input');
    const name = this.parseName();
    const directives = this.parseConstDirectives();
    const fields = this.parseInputFieldsDefinition();
    if (directives.length === 0 && fields.length === 0) {
      throw this.unexpected();
    }
    return this.node(start, {
      kind: _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION,
      name,
      directives,
      fields
    });
  }
  /**
   * ```
   * DirectiveDefinition :
   *   - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations
   * ```
   */

  parseDirectiveDefinition() {
    const start = this._lexer.token;
    const description = this.parseDescription();
    this.expectKeyword('directive');
    this.expectToken(_tokenKind.TokenKind.AT);
    const name = this.parseName();
    const args = this.parseArgumentDefs();
    const repeatable = this.expectOptionalKeyword('repeatable');
    this.expectKeyword('on');
    const locations = this.parseDirectiveLocations();
    return this.node(start, {
      kind: _kinds.Kind.DIRECTIVE_DEFINITION,
      description,
      name,
      arguments: args,
      repeatable,
      locations
    });
  }
  /**
   * DirectiveLocations :
   *   - `|`? DirectiveLocation
   *   - DirectiveLocations | DirectiveLocation
   */

  parseDirectiveLocations() {
    return this.delimitedMany(_tokenKind.TokenKind.PIPE, this.parseDirectiveLocation);
  }
  /*
   * DirectiveLocation :
   *   - ExecutableDirectiveLocation
   *   - TypeSystemDirectiveLocation
   *
   * ExecutableDirectiveLocation : one of
   *   `QUERY`
   *   `MUTATION`
   *   `SUBSCRIPTION`
   *   `FIELD`
   *   `FRAGMENT_DEFINITION`
   *   `FRAGMENT_SPREAD`
   *   `INLINE_FRAGMENT`
   *
   * TypeSystemDirectiveLocation : one of
   *   `SCHEMA`
   *   `SCALAR`
   *   `OBJECT`
   *   `FIELD_DEFINITION`
   *   `ARGUMENT_DEFINITION`
   *   `INTERFACE`
   *   `UNION`
   *   `ENUM`
   *   `ENUM_VALUE`
   *   `INPUT_OBJECT`
   *   `INPUT_FIELD_DEFINITION`
   */

  parseDirectiveLocation() {
    const start = this._lexer.token;
    const name = this.parseName();
    if (Object.prototype.hasOwnProperty.call(_directiveLocation.DirectiveLocation, name.value)) {
      return name;
    }
    throw this.unexpected(start);
  } // Core parsing utility functions

  /**
   * Returns a node that, if configured to do so, sets a "loc" field as a
   * location object, used to identify the place in the source that created a
   * given parsed object.
   */

  node(startToken, node) {
    if (this._options.noLocation !== true) {
      node.loc = new _ast.Location(startToken, this._lexer.lastToken, this._lexer.source);
    }
    return node;
  }
  /**
   * Determines if the next token is of a given kind
   */

  peek(kind) {
    return this._lexer.token.kind === kind;
  }
  /**
   * If the next token is of the given kind, return that token after advancing the lexer.
   * Otherwise, do not change the parser state and throw an error.
   */

  expectToken(kind) {
    const token = this._lexer.token;
    if (token.kind === kind) {
      this.advanceLexer();
      return token;
    }
    throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`);
  }
  /**
   * If the next token is of the given kind, return "true" after advancing the lexer.
   * Otherwise, do not change the parser state and return "false".
   */

  expectOptionalToken(kind) {
    const token = this._lexer.token;
    if (token.kind === kind) {
      this.advanceLexer();
      return true;
    }
    return false;
  }
  /**
   * If the next token is a given keyword, advance the lexer.
   * Otherwise, do not change the parser state and throw an error.
   */

  expectKeyword(value) {
    const token = this._lexer.token;
    if (token.kind === _tokenKind.TokenKind.NAME && token.value === value) {
      this.advanceLexer();
    } else {
      throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Expected "${value}", found ${getTokenDesc(token)}.`);
    }
  }
  /**
   * If the next token is a given keyword, return "true" after advancing the lexer.
   * Otherwise, do not change the parser state and return "false".
   */

  expectOptionalKeyword(value) {
    const token = this._lexer.token;
    if (token.kind === _tokenKind.TokenKind.NAME && token.value === value) {
      this.advanceLexer();
      return true;
    }
    return false;
  }
  /**
   * Helper function for creating an error when an unexpected lexed token is encountered.
   */

  unexpected(atToken) {
    const token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;
    return (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Unexpected ${getTokenDesc(token)}.`);
  }
  /**
   * Returns a possibly empty list of parse nodes, determined by the parseFn.
   * This list begins with a lex token of openKind and ends with a lex token of closeKind.
   * Advances the parser to the next lex token after the closing token.
   */

  any(openKind, parseFn, closeKind) {
    this.expectToken(openKind);
    const nodes = [];
    while (!this.expectOptionalToken(closeKind)) {
      nodes.push(parseFn.call(this));
    }
    return nodes;
  }
  /**
   * Returns a list of parse nodes, determined by the parseFn.
   * It can be empty only if open token is missing otherwise it will always return non-empty list
   * that begins with a lex token of openKind and ends with a lex token of closeKind.
   * Advances the parser to the next lex token after the closing token.
   */

  optionalMany(openKind, parseFn, closeKind) {
    if (this.expectOptionalToken(openKind)) {
      const nodes = [];
      do {
        nodes.push(parseFn.call(this));
      } while (!this.expectOptionalToken(closeKind));
      return nodes;
    }
    return [];
  }
  /**
   * Returns a non-empty list of parse nodes, determined by the parseFn.
   * This list begins with a lex token of openKind and ends with a lex token of closeKind.
   * Advances the parser to the next lex token after the closing token.
   */

  many(openKind, parseFn, closeKind) {
    this.expectToken(openKind);
    const nodes = [];
    do {
      nodes.push(parseFn.call(this));
    } while (!this.expectOptionalToken(closeKind));
    return nodes;
  }
  /**
   * Returns a non-empty list of parse nodes, determined by the parseFn.
   * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
   * Advances the parser to the next lex token after last item in the list.
   */

  delimitedMany(delimiterKind, parseFn) {
    this.expectOptionalToken(delimiterKind);
    const nodes = [];
    do {
      nodes.push(parseFn.call(this));
    } while (this.expectOptionalToken(delimiterKind));
    return nodes;
  }
  advanceLexer() {
    const {
      maxTokens
    } = this._options;
    const token = this._lexer.advance();
    if (maxTokens !== undefined && token.kind !== _tokenKind.TokenKind.EOF) {
      ++this._tokenCounter;
      if (this._tokenCounter > maxTokens) {
        throw (0, _syntaxError.syntaxError)(this._lexer.source, token.start, `Document contains more that ${maxTokens} tokens. Parsing aborted.`);
      }
    }
  }
}
/**
 * A helper function to describe a token as a string for debugging.
 */
exports.Parser = Parser;
function getTokenDesc(token) {
  const value = token.value;
  return getTokenKindDesc(token.kind) + (value != null ? ` "${value}"` : '');
}
/**
 * A helper function to describe a token kind as a string for debugging.
 */

function getTokenKindDesc(kind) {
  return (0, _lexer.isPunctuatorTokenKind)(kind) ? `"${kind}"` : kind;
}

/***/ }),

/***/ "../../../node_modules/graphql/language/predicates.mjs":
/*!*************************************************************!*\
  !*** ../../../node_modules/graphql/language/predicates.mjs ***!
  \*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isConstValueNode = isConstValueNode;
exports.isDefinitionNode = isDefinitionNode;
exports.isExecutableDefinitionNode = isExecutableDefinitionNode;
exports.isSelectionNode = isSelectionNode;
exports.isTypeDefinitionNode = isTypeDefinitionNode;
exports.isTypeExtensionNode = isTypeExtensionNode;
exports.isTypeNode = isTypeNode;
exports.isTypeSystemDefinitionNode = isTypeSystemDefinitionNode;
exports.isTypeSystemExtensionNode = isTypeSystemExtensionNode;
exports.isValueNode = isValueNode;
var _kinds = __webpack_require__(/*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
function isDefinitionNode(node) {
  return isExecutableDefinitionNode(node) || isTypeSystemDefinitionNode(node) || isTypeSystemExtensionNode(node);
}
function isExecutableDefinitionNode(node) {
  return node.kind === _kinds.Kind.OPERATION_DEFINITION || node.kind === _kinds.Kind.FRAGMENT_DEFINITION;
}
function isSelectionNode(node) {
  return node.kind === _kinds.Kind.FIELD || node.kind === _kinds.Kind.FRAGMENT_SPREAD || node.kind === _kinds.Kind.INLINE_FRAGMENT;
}
function isValueNode(node) {
  return node.kind === _kinds.Kind.VARIABLE || node.kind === _kinds.Kind.INT || node.kind === _kinds.Kind.FLOAT || node.kind === _kinds.Kind.STRING || node.kind === _kinds.Kind.BOOLEAN || node.kind === _kinds.Kind.NULL || node.kind === _kinds.Kind.ENUM || node.kind === _kinds.Kind.LIST || node.kind === _kinds.Kind.OBJECT;
}
function isConstValueNode(node) {
  return isValueNode(node) && (node.kind === _kinds.Kind.LIST ? node.values.some(isConstValueNode) : node.kind === _kinds.Kind.OBJECT ? node.fields.some(field => isConstValueNode(field.value)) : node.kind !== _kinds.Kind.VARIABLE);
}
function isTypeNode(node) {
  return node.kind === _kinds.Kind.NAMED_TYPE || node.kind === _kinds.Kind.LIST_TYPE || node.kind === _kinds.Kind.NON_NULL_TYPE;
}
function isTypeSystemDefinitionNode(node) {
  return node.kind === _kinds.Kind.SCHEMA_DEFINITION || isTypeDefinitionNode(node) || node.kind === _kinds.Kind.DIRECTIVE_DEFINITION;
}
function isTypeDefinitionNode(node) {
  return node.kind === _kinds.Kind.SCALAR_TYPE_DEFINITION || node.kind === _kinds.Kind.OBJECT_TYPE_DEFINITION || node.kind === _kinds.Kind.INTERFACE_TYPE_DEFINITION || node.kind === _kinds.Kind.UNION_TYPE_DEFINITION || node.kind === _kinds.Kind.ENUM_TYPE_DEFINITION || node.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION;
}
function isTypeSystemExtensionNode(node) {
  return node.kind === _kinds.Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node);
}
function isTypeExtensionNode(node) {
  return node.kind === _kinds.Kind.SCALAR_TYPE_EXTENSION || node.kind === _kinds.Kind.OBJECT_TYPE_EXTENSION || node.kind === _kinds.Kind.INTERFACE_TYPE_EXTENSION || node.kind === _kinds.Kind.UNION_TYPE_EXTENSION || node.kind === _kinds.Kind.ENUM_TYPE_EXTENSION || node.kind === _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION;
}

/***/ }),

/***/ "../../../node_modules/graphql/language/printLocation.mjs":
/*!****************************************************************!*\
  !*** ../../../node_modules/graphql/language/printLocation.mjs ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.printLocation = printLocation;
exports.printSourceLocation = printSourceLocation;
var _location = __webpack_require__(/*! ./location.mjs */ "../../../node_modules/graphql/language/location.mjs");
/**
 * Render a helpful description of the location in the GraphQL Source document.
 */
function printLocation(location) {
  return printSourceLocation(location.source, (0, _location.getLocation)(location.source, location.start));
}
/**
 * Render a helpful description of the location in the GraphQL Source document.
 */

function printSourceLocation(source, sourceLocation) {
  const firstLineColumnOffset = source.locationOffset.column - 1;
  const body = ''.padStart(firstLineColumnOffset) + source.body;
  const lineIndex = sourceLocation.line - 1;
  const lineOffset = source.locationOffset.line - 1;
  const lineNum = sourceLocation.line + lineOffset;
  const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;
  const columnNum = sourceLocation.column + columnOffset;
  const locationStr = `${source.name}:${lineNum}:${columnNum}\n`;
  const lines = body.split(/\r\n|[\n\r]/g);
  const locationLine = lines[lineIndex]; // Special case for minified documents

  if (locationLine.length > 120) {
    const subLineIndex = Math.floor(columnNum / 80);
    const subLineColumnNum = columnNum % 80;
    const subLines = [];
    for (let i = 0; i < locationLine.length; i += 80) {
      subLines.push(locationLine.slice(i, i + 80));
    }
    return locationStr + printPrefixedLines([[`${lineNum} |`, subLines[0]], ...subLines.slice(1, subLineIndex + 1).map(subLine => ['|', subLine]), ['|', '^'.padStart(subLineColumnNum)], ['|', subLines[subLineIndex + 1]]]);
  }
  return locationStr + printPrefixedLines([
  // Lines specified like this: ["prefix", "string"],
  [`${lineNum - 1} |`, lines[lineIndex - 1]], [`${lineNum} |`, locationLine], ['|', '^'.padStart(columnNum)], [`${lineNum + 1} |`, lines[lineIndex + 1]]]);
}
function printPrefixedLines(lines) {
  const existingLines = lines.filter(_ref => {
    let [_, line] = _ref;
    return line !== undefined;
  });
  const padLen = Math.max(...existingLines.map(_ref2 => {
    let [prefix] = _ref2;
    return prefix.length;
  }));
  return existingLines.map(_ref3 => {
    let [prefix, line] = _ref3;
    return prefix.padStart(padLen) + (line ? ' ' + line : '');
  }).join('\n');
}

/***/ }),

/***/ "../../../node_modules/graphql/language/printString.mjs":
/*!**************************************************************!*\
  !*** ../../../node_modules/graphql/language/printString.mjs ***!
  \**************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.printString = printString;
/**
 * Prints a string as a GraphQL StringValue literal. Replaces control characters
 * and excluded characters (" U+0022 and \\ U+005C) with escape sequences.
 */
function printString(str) {
  return `"${str.replace(escapedRegExp, escapedReplacer)}"`;
} // eslint-disable-next-line no-control-regex

const escapedRegExp = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
function escapedReplacer(str) {
  return escapeSequences[str.charCodeAt(0)];
} // prettier-ignore

const escapeSequences = ['\\u0000', '\\u0001', '\\u0002', '\\u0003', '\\u0004', '\\u0005', '\\u0006', '\\u0007', '\\b', '\\t', '\\n', '\\u000B', '\\f', '\\r', '\\u000E', '\\u000F', '\\u0010', '\\u0011', '\\u0012', '\\u0013', '\\u0014', '\\u0015', '\\u0016', '\\u0017', '\\u0018', '\\u0019', '\\u001A', '\\u001B', '\\u001C', '\\u001D', '\\u001E', '\\u001F', '', '', '\\"', '', '', '', '', '', '', '', '', '', '', '', '', '',
// 2F
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
// 3F
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
// 4F
'', '', '', '', '', '', '', '', '', '', '', '', '\\\\', '', '', '',
// 5F
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
// 6F
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '\\u007F', '\\u0080', '\\u0081', '\\u0082', '\\u0083', '\\u0084', '\\u0085', '\\u0086', '\\u0087', '\\u0088', '\\u0089', '\\u008A', '\\u008B', '\\u008C', '\\u008D', '\\u008E', '\\u008F', '\\u0090', '\\u0091', '\\u0092', '\\u0093', '\\u0094', '\\u0095', '\\u0096', '\\u0097', '\\u0098', '\\u0099', '\\u009A', '\\u009B', '\\u009C', '\\u009D', '\\u009E', '\\u009F'];

/***/ }),

/***/ "../../../node_modules/graphql/language/printer.mjs":
/*!**********************************************************!*\
  !*** ../../../node_modules/graphql/language/printer.mjs ***!
  \**********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.print = print;
var _blockString = __webpack_require__(/*! ./blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs");
var _printString = __webpack_require__(/*! ./printString.mjs */ "../../../node_modules/graphql/language/printString.mjs");
var _visitor = __webpack_require__(/*! ./visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs");
/**
 * Converts an AST into a string, using one set of reasonable
 * formatting rules.
 */

function print(ast) {
  return (0, _visitor.visit)(ast, printDocASTReducer);
}
const MAX_LINE_LENGTH = 80;
const printDocASTReducer = {
  Name: {
    leave: node => node.value
  },
  Variable: {
    leave: node => '$' + node.name
  },
  // Document
  Document: {
    leave: node => join(node.definitions, '\n\n')
  },
  OperationDefinition: {
    leave(node) {
      const varDefs = wrap('(', join(node.variableDefinitions, ', '), ')');
      const prefix = join([node.operation, join([node.name, varDefs]), join(node.directives, ' ')], ' '); // Anonymous queries with no directives or variable definitions can use
      // the query short form.

      return (prefix === 'query' ? '' : prefix + ' ') + node.selectionSet;
    }
  },
  VariableDefinition: {
    leave: _ref => {
      let {
        variable,
        type,
        defaultValue,
        directives
      } = _ref;
      return variable + ': ' + type + wrap(' = ', defaultValue) + wrap(' ', join(directives, ' '));
    }
  },
  SelectionSet: {
    leave: _ref2 => {
      let {
        selections
      } = _ref2;
      return block(selections);
    }
  },
  Field: {
    leave(_ref3) {
      let {
        alias,
        name,
        arguments: args,
        directives,
        selectionSet
      } = _ref3;
      const prefix = wrap('', alias, ': ') + name;
      let argsLine = prefix + wrap('(', join(args, ', '), ')');
      if (argsLine.length > MAX_LINE_LENGTH) {
        argsLine = prefix + wrap('(\n', indent(join(args, '\n')), '\n)');
      }
      return join([argsLine, join(directives, ' '), selectionSet], ' ');
    }
  },
  Argument: {
    leave: _ref4 => {
      let {
        name,
        value
      } = _ref4;
      return name + ': ' + value;
    }
  },
  // Fragments
  FragmentSpread: {
    leave: _ref5 => {
      let {
        name,
        directives
      } = _ref5;
      return '...' + name + wrap(' ', join(directives, ' '));
    }
  },
  InlineFragment: {
    leave: _ref6 => {
      let {
        typeCondition,
        directives,
        selectionSet
      } = _ref6;
      return join(['...', wrap('on ', typeCondition), join(directives, ' '), selectionSet], ' ');
    }
  },
  FragmentDefinition: {
    leave: (_ref7 // Note: fragment variable definitions are experimental and may be changed
    ) => {
      let {
        name,
        typeCondition,
        variableDefinitions,
        directives,
        selectionSet
      } = _ref7;
      return (
        // or removed in the future.
        `fragment ${name}${wrap('(', join(variableDefinitions, ', '), ')')} ` + `on ${typeCondition} ${wrap('', join(directives, ' '), ' ')}` + selectionSet
      );
    }
  },
  // Value
  IntValue: {
    leave: _ref8 => {
      let {
        value
      } = _ref8;
      return value;
    }
  },
  FloatValue: {
    leave: _ref9 => {
      let {
        value
      } = _ref9;
      return value;
    }
  },
  StringValue: {
    leave: _ref10 => {
      let {
        value,
        block: isBlockString
      } = _ref10;
      return isBlockString ? (0, _blockString.printBlockString)(value) : (0, _printString.printString)(value);
    }
  },
  BooleanValue: {
    leave: _ref11 => {
      let {
        value
      } = _ref11;
      return value ? 'true' : 'false';
    }
  },
  NullValue: {
    leave: () => 'null'
  },
  EnumValue: {
    leave: _ref12 => {
      let {
        value
      } = _ref12;
      return value;
    }
  },
  ListValue: {
    leave: _ref13 => {
      let {
        values
      } = _ref13;
      return '[' + join(values, ', ') + ']';
    }
  },
  ObjectValue: {
    leave: _ref14 => {
      let {
        fields
      } = _ref14;
      return '{' + join(fields, ', ') + '}';
    }
  },
  ObjectField: {
    leave: _ref15 => {
      let {
        name,
        value
      } = _ref15;
      return name + ': ' + value;
    }
  },
  // Directive
  Directive: {
    leave: _ref16 => {
      let {
        name,
        arguments: args
      } = _ref16;
      return '@' + name + wrap('(', join(args, ', '), ')');
    }
  },
  // Type
  NamedType: {
    leave: _ref17 => {
      let {
        name
      } = _ref17;
      return name;
    }
  },
  ListType: {
    leave: _ref18 => {
      let {
        type
      } = _ref18;
      return '[' + type + ']';
    }
  },
  NonNullType: {
    leave: _ref19 => {
      let {
        type
      } = _ref19;
      return type + '!';
    }
  },
  // Type System Definitions
  SchemaDefinition: {
    leave: _ref20 => {
      let {
        description,
        directives,
        operationTypes
      } = _ref20;
      return wrap('', description, '\n') + join(['schema', join(directives, ' '), block(operationTypes)], ' ');
    }
  },
  OperationTypeDefinition: {
    leave: _ref21 => {
      let {
        operation,
        type
      } = _ref21;
      return operation + ': ' + type;
    }
  },
  ScalarTypeDefinition: {
    leave: _ref22 => {
      let {
        description,
        name,
        directives
      } = _ref22;
      return wrap('', description, '\n') + join(['scalar', name, join(directives, ' ')], ' ');
    }
  },
  ObjectTypeDefinition: {
    leave: _ref23 => {
      let {
        description,
        name,
        interfaces,
        directives,
        fields
      } = _ref23;
      return wrap('', description, '\n') + join(['type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');
    }
  },
  FieldDefinition: {
    leave: _ref24 => {
      let {
        description,
        name,
        arguments: args,
        type,
        directives
      } = _ref24;
      return wrap('', description, '\n') + name + (hasMultilineItems(args) ? wrap('(\n', indent(join(args, '\n')), '\n)') : wrap('(', join(args, ', '), ')')) + ': ' + type + wrap(' ', join(directives, ' '));
    }
  },
  InputValueDefinition: {
    leave: _ref25 => {
      let {
        description,
        name,
        type,
        defaultValue,
        directives
      } = _ref25;
      return wrap('', description, '\n') + join([name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')], ' ');
    }
  },
  InterfaceTypeDefinition: {
    leave: _ref26 => {
      let {
        description,
        name,
        interfaces,
        directives,
        fields
      } = _ref26;
      return wrap('', description, '\n') + join(['interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');
    }
  },
  UnionTypeDefinition: {
    leave: _ref27 => {
      let {
        description,
        name,
        directives,
        types
      } = _ref27;
      return wrap('', description, '\n') + join(['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))], ' ');
    }
  },
  EnumTypeDefinition: {
    leave: _ref28 => {
      let {
        description,
        name,
        directives,
        values
      } = _ref28;
      return wrap('', description, '\n') + join(['enum', name, join(directives, ' '), block(values)], ' ');
    }
  },
  EnumValueDefinition: {
    leave: _ref29 => {
      let {
        description,
        name,
        directives
      } = _ref29;
      return wrap('', description, '\n') + join([name, join(directives, ' ')], ' ');
    }
  },
  InputObjectTypeDefinition: {
    leave: _ref30 => {
      let {
        description,
        name,
        directives,
        fields
      } = _ref30;
      return wrap('', description, '\n') + join(['input', name, join(directives, ' '), block(fields)], ' ');
    }
  },
  DirectiveDefinition: {
    leave: _ref31 => {
      let {
        description,
        name,
        arguments: args,
        repeatable,
        locations
      } = _ref31;
      return wrap('', description, '\n') + 'directive @' + name + (hasMultilineItems(args) ? wrap('(\n', indent(join(args, '\n')), '\n)') : wrap('(', join(args, ', '), ')')) + (repeatable ? ' repeatable' : '') + ' on ' + join(locations, ' | ');
    }
  },
  SchemaExtension: {
    leave: _ref32 => {
      let {
        directives,
        operationTypes
      } = _ref32;
      return join(['extend schema', join(directives, ' '), block(operationTypes)], ' ');
    }
  },
  ScalarTypeExtension: {
    leave: _ref33 => {
      let {
        name,
        directives
      } = _ref33;
      return join(['extend scalar', name, join(directives, ' ')], ' ');
    }
  },
  ObjectTypeExtension: {
    leave: _ref34 => {
      let {
        name,
        interfaces,
        directives,
        fields
      } = _ref34;
      return join(['extend type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');
    }
  },
  InterfaceTypeExtension: {
    leave: _ref35 => {
      let {
        name,
        interfaces,
        directives,
        fields
      } = _ref35;
      return join(['extend interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');
    }
  },
  UnionTypeExtension: {
    leave: _ref36 => {
      let {
        name,
        directives,
        types
      } = _ref36;
      return join(['extend union', name, join(directives, ' '), wrap('= ', join(types, ' | '))], ' ');
    }
  },
  EnumTypeExtension: {
    leave: _ref37 => {
      let {
        name,
        directives,
        values
      } = _ref37;
      return join(['extend enum', name, join(directives, ' '), block(values)], ' ');
    }
  },
  InputObjectTypeExtension: {
    leave: _ref38 => {
      let {
        name,
        directives,
        fields
      } = _ref38;
      return join(['extend input', name, join(directives, ' '), block(fields)], ' ');
    }
  }
};
/**
 * Given maybeArray, print an empty string if it is null or empty, otherwise
 * print all items together separated by separator if provided
 */

function join(maybeArray) {
  let separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  var _maybeArray$filter$jo;
  return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(x => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';
}
/**
 * Given array, print each item on its own line, wrapped in an indented `{ }` block.
 */

function block(array) {
  return wrap('{\n', indent(join(array, '\n')), '\n}');
}
/**
 * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.
 */

function wrap(start, maybeString) {
  let end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  return maybeString != null && maybeString !== '' ? start + maybeString + end : '';
}
function indent(str) {
  return wrap('  ', str.replace(/\n/g, '\n  '));
}
function hasMultilineItems(maybeArray) {
  var _maybeArray$some;

  // FIXME: https://github.com/graphql/graphql-js/issues/2203

  /* c8 ignore next */
  return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some(str => str.includes('\n'))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
}

/***/ }),

/***/ "../../../node_modules/graphql/language/source.mjs":
/*!*********************************************************!*\
  !*** ../../../node_modules/graphql/language/source.mjs ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.Source = void 0;
exports.isSource = isSource;
var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _instanceOf = __webpack_require__(/*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs");
/**
 * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are
 * optional, but they are useful for clients who store GraphQL documents in source files.
 * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might
 * be useful for `name` to be `"Foo.graphql"` and location to be `{ line: 40, column: 1 }`.
 * The `line` and `column` properties in `locationOffset` are 1-indexed.
 */
class Source {
  constructor(body) {
    let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'GraphQL request';
    let locationOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
      line: 1,
      column: 1
    };
    typeof body === 'string' || (0, _devAssert.devAssert)(false, `Body must be a string. Received: ${(0, _inspect.inspect)(body)}.`);
    this.body = body;
    this.name = name;
    this.locationOffset = locationOffset;
    this.locationOffset.line > 0 || (0, _devAssert.devAssert)(false, 'line in locationOffset is 1-indexed and must be positive.');
    this.locationOffset.column > 0 || (0, _devAssert.devAssert)(false, 'column in locationOffset is 1-indexed and must be positive.');
  }
  get [Symbol.toStringTag]() {
    return 'Source';
  }
}
/**
 * Test if the given value is a Source object.
 *
 * @internal
 */
exports.Source = Source;
function isSource(source) {
  return (0, _instanceOf.instanceOf)(source, Source);
}

/***/ }),

/***/ "../../../node_modules/graphql/language/tokenKind.mjs":
/*!************************************************************!*\
  !*** ../../../node_modules/graphql/language/tokenKind.mjs ***!
  \************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.TokenKind = void 0;
/**
 * An exported enum describing the different kinds of tokens that the
 * lexer emits.
 */
var TokenKind;
exports.TokenKind = TokenKind;
(function (TokenKind) {
  TokenKind['SOF'] = '<SOF>';
  TokenKind['EOF'] = '<EOF>';
  TokenKind['BANG'] = '!';
  TokenKind['DOLLAR'] = '$';
  TokenKind['AMP'] = '&';
  TokenKind['PAREN_L'] = '(';
  TokenKind['PAREN_R'] = ')';
  TokenKind['SPREAD'] = '...';
  TokenKind['COLON'] = ':';
  TokenKind['EQUALS'] = '=';
  TokenKind['AT'] = '@';
  TokenKind['BRACKET_L'] = '[';
  TokenKind['BRACKET_R'] = ']';
  TokenKind['BRACE_L'] = '{';
  TokenKind['PIPE'] = '|';
  TokenKind['BRACE_R'] = '}';
  TokenKind['NAME'] = 'Name';
  TokenKind['INT'] = 'Int';
  TokenKind['FLOAT'] = 'Float';
  TokenKind['STRING'] = 'String';
  TokenKind['BLOCK_STRING'] = 'BlockString';
  TokenKind['COMMENT'] = 'Comment';
})(TokenKind || (exports.TokenKind = TokenKind = {}));

/**
 * The enum type representing the token kinds values.
 *
 * @deprecated Please use `TokenKind`. Will be remove in v17.
 */

/***/ }),

/***/ "../../../node_modules/graphql/language/visitor.mjs":
/*!**********************************************************!*\
  !*** ../../../node_modules/graphql/language/visitor.mjs ***!
  \**********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.BREAK = void 0;
exports.getEnterLeaveForKind = getEnterLeaveForKind;
exports.getVisitFn = getVisitFn;
exports.visit = visit;
exports.visitInParallel = visitInParallel;
var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _ast = __webpack_require__(/*! ./ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
var _kinds = __webpack_require__(/*! ./kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
/**
 * A visitor is provided to visit, it contains the collection of
 * relevant functions to be called during the visitor's traversal.
 */

const BREAK = Object.freeze({});
/**
 * visit() will walk through an AST using a depth-first traversal, calling
 * the visitor's enter function at each node in the traversal, and calling the
 * leave function after visiting that node and all of its child nodes.
 *
 * By returning different values from the enter and leave functions, the
 * behavior of the visitor can be altered, including skipping over a sub-tree of
 * the AST (by returning false), editing the AST by returning a value or null
 * to remove the value, or to stop the whole traversal by returning BREAK.
 *
 * When using visit() to edit an AST, the original AST will not be modified, and
 * a new version of the AST with the changes applied will be returned from the
 * visit function.
 *
 * ```ts
 * const editedAST = visit(ast, {
 *   enter(node, key, parent, path, ancestors) {
 *     // @return
 *     //   undefined: no action
 *     //   false: skip visiting this node
 *     //   visitor.BREAK: stop visiting altogether
 *     //   null: delete this node
 *     //   any value: replace this node with the returned value
 *   },
 *   leave(node, key, parent, path, ancestors) {
 *     // @return
 *     //   undefined: no action
 *     //   false: no action
 *     //   visitor.BREAK: stop visiting altogether
 *     //   null: delete this node
 *     //   any value: replace this node with the returned value
 *   }
 * });
 * ```
 *
 * Alternatively to providing enter() and leave() functions, a visitor can
 * instead provide functions named the same as the kinds of AST nodes, or
 * enter/leave visitors at a named key, leading to three permutations of the
 * visitor API:
 *
 * 1) Named visitors triggered when entering a node of a specific kind.
 *
 * ```ts
 * visit(ast, {
 *   Kind(node) {
 *     // enter the "Kind" node
 *   }
 * })
 * ```
 *
 * 2) Named visitors that trigger upon entering and leaving a node of a specific kind.
 *
 * ```ts
 * visit(ast, {
 *   Kind: {
 *     enter(node) {
 *       // enter the "Kind" node
 *     }
 *     leave(node) {
 *       // leave the "Kind" node
 *     }
 *   }
 * })
 * ```
 *
 * 3) Generic visitors that trigger upon entering and leaving any node.
 *
 * ```ts
 * visit(ast, {
 *   enter(node) {
 *     // enter any node
 *   },
 *   leave(node) {
 *     // leave any node
 *   }
 * })
 * ```
 */
exports.BREAK = BREAK;
function visit(root, visitor) {
  let visitorKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _ast.QueryDocumentKeys;
  const enterLeaveMap = new Map();
  for (const kind of Object.values(_kinds.Kind)) {
    enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));
  }
  /* eslint-disable no-undef-init */

  let stack = undefined;
  let inArray = Array.isArray(root);
  let keys = [root];
  let index = -1;
  let edits = [];
  let node = root;
  let key = undefined;
  let parent = undefined;
  const path = [];
  const ancestors = [];
  /* eslint-enable no-undef-init */

  do {
    index++;
    const isLeaving = index === keys.length;
    const isEdited = isLeaving && edits.length !== 0;
    if (isLeaving) {
      key = ancestors.length === 0 ? undefined : path[path.length - 1];
      node = parent;
      parent = ancestors.pop();
      if (isEdited) {
        if (inArray) {
          node = node.slice();
          let editOffset = 0;
          for (const [editKey, editValue] of edits) {
            const arrayKey = editKey - editOffset;
            if (editValue === null) {
              node.splice(arrayKey, 1);
              editOffset++;
            } else {
              node[arrayKey] = editValue;
            }
          }
        } else {
          node = Object.defineProperties({}, Object.getOwnPropertyDescriptors(node));
          for (const [editKey, editValue] of edits) {
            node[editKey] = editValue;
          }
        }
      }
      index = stack.index;
      keys = stack.keys;
      edits = stack.edits;
      inArray = stack.inArray;
      stack = stack.prev;
    } else if (parent) {
      key = inArray ? index : keys[index];
      node = parent[key];
      if (node === null || node === undefined) {
        continue;
      }
      path.push(key);
    }
    let result;
    if (!Array.isArray(node)) {
      var _enterLeaveMap$get, _enterLeaveMap$get2;
      (0, _ast.isNode)(node) || (0, _devAssert.devAssert)(false, `Invalid AST Node: ${(0, _inspect.inspect)(node)}.`);
      const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter;
      result = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors);
      if (result === BREAK) {
        break;
      }
      if (result === false) {
        if (!isLeaving) {
          path.pop();
          continue;
        }
      } else if (result !== undefined) {
        edits.push([key, result]);
        if (!isLeaving) {
          if ((0, _ast.isNode)(result)) {
            node = result;
          } else {
            path.pop();
            continue;
          }
        }
      }
    }
    if (result === undefined && isEdited) {
      edits.push([key, node]);
    }
    if (isLeaving) {
      path.pop();
    } else {
      var _node$kind;
      stack = {
        inArray,
        index,
        keys,
        edits,
        prev: stack
      };
      inArray = Array.isArray(node);
      keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !== void 0 ? _node$kind : [];
      index = -1;
      edits = [];
      if (parent) {
        ancestors.push(parent);
      }
      parent = node;
    }
  } while (stack !== undefined);
  if (edits.length !== 0) {
    // New root
    return edits[edits.length - 1][1];
  }
  return root;
}
/**
 * Creates a new visitor instance which delegates to many visitors to run in
 * parallel. Each visitor will be visited for each node before moving on.
 *
 * If a prior visitor edits a node, no following visitors will see that node.
 */

function visitInParallel(visitors) {
  const skipping = new Array(visitors.length).fill(null);
  const mergedVisitor = Object.create(null);
  for (const kind of Object.values(_kinds.Kind)) {
    let hasVisitor = false;
    const enterList = new Array(visitors.length).fill(undefined);
    const leaveList = new Array(visitors.length).fill(undefined);
    for (let i = 0; i < visitors.length; ++i) {
      const {
        enter,
        leave
      } = getEnterLeaveForKind(visitors[i], kind);
      hasVisitor || (hasVisitor = enter != null || leave != null);
      enterList[i] = enter;
      leaveList[i] = leave;
    }
    if (!hasVisitor) {
      continue;
    }
    const mergedEnterLeave = {
      enter() {
        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }
        const node = args[0];
        for (let i = 0; i < visitors.length; i++) {
          if (skipping[i] === null) {
            var _enterList$i;
            const result = (_enterList$i = enterList[i]) === null || _enterList$i === void 0 ? void 0 : _enterList$i.apply(visitors[i], args);
            if (result === false) {
              skipping[i] = node;
            } else if (result === BREAK) {
              skipping[i] = BREAK;
            } else if (result !== undefined) {
              return result;
            }
          }
        }
      },
      leave() {
        for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
          args[_key2] = arguments[_key2];
        }
        const node = args[0];
        for (let i = 0; i < visitors.length; i++) {
          if (skipping[i] === null) {
            var _leaveList$i;
            const result = (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0 ? void 0 : _leaveList$i.apply(visitors[i], args);
            if (result === BREAK) {
              skipping[i] = BREAK;
            } else if (result !== undefined && result !== false) {
              return result;
            }
          } else if (skipping[i] === node) {
            skipping[i] = null;
          }
        }
      }
    };
    mergedVisitor[kind] = mergedEnterLeave;
  }
  return mergedVisitor;
}
/**
 * Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind.
 */

function getEnterLeaveForKind(visitor, kind) {
  const kindVisitor = visitor[kind];
  if (typeof kindVisitor === 'object') {
    // { Kind: { enter() {}, leave() {} } }
    return kindVisitor;
  } else if (typeof kindVisitor === 'function') {
    // { Kind() {} }
    return {
      enter: kindVisitor,
      leave: undefined
    };
  } // { enter() {}, leave() {} }

  return {
    enter: visitor.enter,
    leave: visitor.leave
  };
}
/**
 * Given a visitor instance, if it is leaving or not, and a node kind, return
 * the function the visitor runtime should call.
 *
 * @deprecated Please use `getEnterLeaveForKind` instead. Will be removed in v17
 */

/* c8 ignore next 8 */

function getVisitFn(visitor, kind, isLeaving) {
  const {
    enter,
    leave
  } = getEnterLeaveForKind(visitor, kind);
  return isLeaving ? leave : enter;
}

/***/ }),

/***/ "../../../node_modules/graphql/type/assertName.mjs":
/*!*********************************************************!*\
  !*** ../../../node_modules/graphql/type/assertName.mjs ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.assertEnumValueName = assertEnumValueName;
exports.assertName = assertName;
var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _characterClasses = __webpack_require__(/*! ../language/characterClasses.mjs */ "../../../node_modules/graphql/language/characterClasses.mjs");
/**
 * Upholds the spec rules about naming.
 */

function assertName(name) {
  name != null || (0, _devAssert.devAssert)(false, 'Must provide name.');
  typeof name === 'string' || (0, _devAssert.devAssert)(false, 'Expected name to be a string.');
  if (name.length === 0) {
    throw new _GraphQLError.GraphQLError('Expected name to be a non-empty string.');
  }
  for (let i = 1; i < name.length; ++i) {
    if (!(0, _characterClasses.isNameContinue)(name.charCodeAt(i))) {
      throw new _GraphQLError.GraphQLError(`Names must only contain [_a-zA-Z0-9] but "${name}" does not.`);
    }
  }
  if (!(0, _characterClasses.isNameStart)(name.charCodeAt(0))) {
    throw new _GraphQLError.GraphQLError(`Names must start with [_a-zA-Z] but "${name}" does not.`);
  }
  return name;
}
/**
 * Upholds the spec rules about naming enum values.
 *
 * @internal
 */

function assertEnumValueName(name) {
  if (name === 'true' || name === 'false' || name === 'null') {
    throw new _GraphQLError.GraphQLError(`Enum values cannot be named: ${name}`);
  }
  return assertName(name);
}

/***/ }),

/***/ "../../../node_modules/graphql/type/definition.mjs":
/*!*********************************************************!*\
  !*** ../../../node_modules/graphql/type/definition.mjs ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.GraphQLUnionType = exports.GraphQLScalarType = exports.GraphQLObjectType = exports.GraphQLNonNull = exports.GraphQLList = exports.GraphQLInterfaceType = exports.GraphQLInputObjectType = exports.GraphQLEnumType = void 0;
exports.argsToArgsConfig = argsToArgsConfig;
exports.assertAbstractType = assertAbstractType;
exports.assertCompositeType = assertCompositeType;
exports.assertEnumType = assertEnumType;
exports.assertInputObjectType = assertInputObjectType;
exports.assertInputType = assertInputType;
exports.assertInterfaceType = assertInterfaceType;
exports.assertLeafType = assertLeafType;
exports.assertListType = assertListType;
exports.assertNamedType = assertNamedType;
exports.assertNonNullType = assertNonNullType;
exports.assertNullableType = assertNullableType;
exports.assertObjectType = assertObjectType;
exports.assertOutputType = assertOutputType;
exports.assertScalarType = assertScalarType;
exports.assertType = assertType;
exports.assertUnionType = assertUnionType;
exports.assertWrappingType = assertWrappingType;
exports.defineArguments = defineArguments;
exports.getNamedType = getNamedType;
exports.getNullableType = getNullableType;
exports.isAbstractType = isAbstractType;
exports.isCompositeType = isCompositeType;
exports.isEnumType = isEnumType;
exports.isInputObjectType = isInputObjectType;
exports.isInputType = isInputType;
exports.isInterfaceType = isInterfaceType;
exports.isLeafType = isLeafType;
exports.isListType = isListType;
exports.isNamedType = isNamedType;
exports.isNonNullType = isNonNullType;
exports.isNullableType = isNullableType;
exports.isObjectType = isObjectType;
exports.isOutputType = isOutputType;
exports.isRequiredArgument = isRequiredArgument;
exports.isRequiredInputField = isRequiredInputField;
exports.isScalarType = isScalarType;
exports.isType = isType;
exports.isUnionType = isUnionType;
exports.isWrappingType = isWrappingType;
exports.resolveObjMapThunk = resolveObjMapThunk;
exports.resolveReadonlyArrayThunk = resolveReadonlyArrayThunk;
var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _didYouMean = __webpack_require__(/*! ../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
var _identityFunc = __webpack_require__(/*! ../jsutils/identityFunc.mjs */ "../../../node_modules/graphql/jsutils/identityFunc.mjs");
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _instanceOf = __webpack_require__(/*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs");
var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
var _keyValMap = __webpack_require__(/*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs");
var _mapValue = __webpack_require__(/*! ../jsutils/mapValue.mjs */ "../../../node_modules/graphql/jsutils/mapValue.mjs");
var _suggestionList = __webpack_require__(/*! ../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
var _toObjMap = __webpack_require__(/*! ../jsutils/toObjMap.mjs */ "../../../node_modules/graphql/jsutils/toObjMap.mjs");
var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
var _valueFromASTUntyped = __webpack_require__(/*! ../utilities/valueFromASTUntyped.mjs */ "../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs");
var _assertName = __webpack_require__(/*! ./assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs");
function isType(type) {
  return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type) || isListType(type) || isNonNullType(type);
}
function assertType(type) {
  if (!isType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL type.`);
  }
  return type;
}
/**
 * There are predicates for each kind of GraphQL type.
 */

function isScalarType(type) {
  return (0, _instanceOf.instanceOf)(type, GraphQLScalarType);
}
function assertScalarType(type) {
  if (!isScalarType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Scalar type.`);
  }
  return type;
}
function isObjectType(type) {
  return (0, _instanceOf.instanceOf)(type, GraphQLObjectType);
}
function assertObjectType(type) {
  if (!isObjectType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Object type.`);
  }
  return type;
}
function isInterfaceType(type) {
  return (0, _instanceOf.instanceOf)(type, GraphQLInterfaceType);
}
function assertInterfaceType(type) {
  if (!isInterfaceType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Interface type.`);
  }
  return type;
}
function isUnionType(type) {
  return (0, _instanceOf.instanceOf)(type, GraphQLUnionType);
}
function assertUnionType(type) {
  if (!isUnionType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Union type.`);
  }
  return type;
}
function isEnumType(type) {
  return (0, _instanceOf.instanceOf)(type, GraphQLEnumType);
}
function assertEnumType(type) {
  if (!isEnumType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Enum type.`);
  }
  return type;
}
function isInputObjectType(type) {
  return (0, _instanceOf.instanceOf)(type, GraphQLInputObjectType);
}
function assertInputObjectType(type) {
  if (!isInputObjectType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Input Object type.`);
  }
  return type;
}
function isListType(type) {
  return (0, _instanceOf.instanceOf)(type, GraphQLList);
}
function assertListType(type) {
  if (!isListType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL List type.`);
  }
  return type;
}
function isNonNullType(type) {
  return (0, _instanceOf.instanceOf)(type, GraphQLNonNull);
}
function assertNonNullType(type) {
  if (!isNonNullType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Non-Null type.`);
  }
  return type;
}
/**
 * These types may be used as input types for arguments and directives.
 */

function isInputType(type) {
  return isScalarType(type) || isEnumType(type) || isInputObjectType(type) || isWrappingType(type) && isInputType(type.ofType);
}
function assertInputType(type) {
  if (!isInputType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL input type.`);
  }
  return type;
}
/**
 * These types may be used as output types as the result of fields.
 */

function isOutputType(type) {
  return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isWrappingType(type) && isOutputType(type.ofType);
}
function assertOutputType(type) {
  if (!isOutputType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL output type.`);
  }
  return type;
}
/**
 * These types may describe types which may be leaf values.
 */

function isLeafType(type) {
  return isScalarType(type) || isEnumType(type);
}
function assertLeafType(type) {
  if (!isLeafType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL leaf type.`);
  }
  return type;
}
/**
 * These types may describe the parent context of a selection set.
 */

function isCompositeType(type) {
  return isObjectType(type) || isInterfaceType(type) || isUnionType(type);
}
function assertCompositeType(type) {
  if (!isCompositeType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL composite type.`);
  }
  return type;
}
/**
 * These types may describe the parent context of a selection set.
 */

function isAbstractType(type) {
  return isInterfaceType(type) || isUnionType(type);
}
function assertAbstractType(type) {
  if (!isAbstractType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL abstract type.`);
  }
  return type;
}
/**
 * List Type Wrapper
 *
 * A list is a wrapping type which points to another type.
 * Lists are often created within the context of defining the fields of
 * an object type.
 *
 * Example:
 *
 * ```ts
 * const PersonType = new GraphQLObjectType({
 *   name: 'Person',
 *   fields: () => ({
 *     parents: { type: new GraphQLList(PersonType) },
 *     children: { type: new GraphQLList(PersonType) },
 *   })
 * })
 * ```
 */

class GraphQLList {
  constructor(ofType) {
    isType(ofType) || (0, _devAssert.devAssert)(false, `Expected ${(0, _inspect.inspect)(ofType)} to be a GraphQL type.`);
    this.ofType = ofType;
  }
  get [Symbol.toStringTag]() {
    return 'GraphQLList';
  }
  toString() {
    return '[' + String(this.ofType) + ']';
  }
  toJSON() {
    return this.toString();
  }
}
/**
 * Non-Null Type Wrapper
 *
 * A non-null is a wrapping type which points to another type.
 * Non-null types enforce that their values are never null and can ensure
 * an error is raised if this ever occurs during a request. It is useful for
 * fields which you can make a strong guarantee on non-nullability, for example
 * usually the id field of a database row will never be null.
 *
 * Example:
 *
 * ```ts
 * const RowType = new GraphQLObjectType({
 *   name: 'Row',
 *   fields: () => ({
 *     id: { type: new GraphQLNonNull(GraphQLString) },
 *   })
 * })
 * ```
 * Note: the enforcement of non-nullability occurs within the executor.
 */
exports.GraphQLList = GraphQLList;
class GraphQLNonNull {
  constructor(ofType) {
    isNullableType(ofType) || (0, _devAssert.devAssert)(false, `Expected ${(0, _inspect.inspect)(ofType)} to be a GraphQL nullable type.`);
    this.ofType = ofType;
  }
  get [Symbol.toStringTag]() {
    return 'GraphQLNonNull';
  }
  toString() {
    return String(this.ofType) + '!';
  }
  toJSON() {
    return this.toString();
  }
}
/**
 * These types wrap and modify other types
 */
exports.GraphQLNonNull = GraphQLNonNull;
function isWrappingType(type) {
  return isListType(type) || isNonNullType(type);
}
function assertWrappingType(type) {
  if (!isWrappingType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL wrapping type.`);
  }
  return type;
}
/**
 * These types can all accept null as a value.
 */

function isNullableType(type) {
  return isType(type) && !isNonNullType(type);
}
function assertNullableType(type) {
  if (!isNullableType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL nullable type.`);
  }
  return type;
}
function getNullableType(type) {
  if (type) {
    return isNonNullType(type) ? type.ofType : type;
  }
}
/**
 * These named types do not include modifiers like List or NonNull.
 */

function isNamedType(type) {
  return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type);
}
function assertNamedType(type) {
  if (!isNamedType(type)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(type)} to be a GraphQL named type.`);
  }
  return type;
}
function getNamedType(type) {
  if (type) {
    let unwrappedType = type;
    while (isWrappingType(unwrappedType)) {
      unwrappedType = unwrappedType.ofType;
    }
    return unwrappedType;
  }
}
/**
 * Used while defining GraphQL types to allow for circular references in
 * otherwise immutable type definitions.
 */

function resolveReadonlyArrayThunk(thunk) {
  return typeof thunk === 'function' ? thunk() : thunk;
}
function resolveObjMapThunk(thunk) {
  return typeof thunk === 'function' ? thunk() : thunk;
}
/**
 * Custom extensions
 *
 * @remarks
 * Use a unique identifier name for your extension, for example the name of
 * your library or project. Do not use a shortened identifier as this increases
 * the risk of conflicts. We recommend you add at most one extension field,
 * an object which can contain all the values you need.
 */

/**
 * Scalar Type Definition
 *
 * The leaf values of any request and input values to arguments are
 * Scalars (or Enums) and are defined with a name and a series of functions
 * used to parse input from ast or variables and to ensure validity.
 *
 * If a type's serialize function returns `null` or does not return a value
 * (i.e. it returns `undefined`) then an error will be raised and a `null`
 * value will be returned in the response. It is always better to validate
 *
 * Example:
 *
 * ```ts
 * const OddType = new GraphQLScalarType({
 *   name: 'Odd',
 *   serialize(value) {
 *     if (!Number.isFinite(value)) {
 *       throw new Error(
 *         `Scalar "Odd" cannot represent "${value}" since it is not a finite number.`,
 *       );
 *     }
 *
 *     if (value % 2 === 0) {
 *       throw new Error(`Scalar "Odd" cannot represent "${value}" since it is even.`);
 *     }
 *     return value;
 *   }
 * });
 * ```
 */
class GraphQLScalarType {
  constructor(config) {
    var _config$parseValue, _config$serialize, _config$parseLiteral, _config$extensionASTN;
    const parseValue = (_config$parseValue = config.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : _identityFunc.identityFunc;
    this.name = (0, _assertName.assertName)(config.name);
    this.description = config.description;
    this.specifiedByURL = config.specifiedByURL;
    this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : _identityFunc.identityFunc;
    this.parseValue = parseValue;
    this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : (node, variables) => parseValue((0, _valueFromASTUntyped.valueFromASTUntyped)(node, variables));
    this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
    this.astNode = config.astNode;
    this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : [];
    config.specifiedByURL == null || typeof config.specifiedByURL === 'string' || (0, _devAssert.devAssert)(false, `${this.name} must provide "specifiedByURL" as a string, ` + `but got: ${(0, _inspect.inspect)(config.specifiedByURL)}.`);
    config.serialize == null || typeof config.serialize === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`);
    if (config.parseLiteral) {
      typeof config.parseValue === 'function' && typeof config.parseLiteral === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide both "parseValue" and "parseLiteral" functions.`);
    }
  }
  get [Symbol.toStringTag]() {
    return 'GraphQLScalarType';
  }
  toConfig() {
    return {
      name: this.name,
      description: this.description,
      specifiedByURL: this.specifiedByURL,
      serialize: this.serialize,
      parseValue: this.parseValue,
      parseLiteral: this.parseLiteral,
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes
    };
  }
  toString() {
    return this.name;
  }
  toJSON() {
    return this.toString();
  }
}

/**
 * Object Type Definition
 *
 * Almost all of the GraphQL types you define will be object types. Object types
 * have a name, but most importantly describe their fields.
 *
 * Example:
 *
 * ```ts
 * const AddressType = new GraphQLObjectType({
 *   name: 'Address',
 *   fields: {
 *     street: { type: GraphQLString },
 *     number: { type: GraphQLInt },
 *     formatted: {
 *       type: GraphQLString,
 *       resolve(obj) {
 *         return obj.number + ' ' + obj.street
 *       }
 *     }
 *   }
 * });
 * ```
 *
 * When two types need to refer to each other, or a type needs to refer to
 * itself in a field, you can use a function expression (aka a closure or a
 * thunk) to supply the fields lazily.
 *
 * Example:
 *
 * ```ts
 * const PersonType = new GraphQLObjectType({
 *   name: 'Person',
 *   fields: () => ({
 *     name: { type: GraphQLString },
 *     bestFriend: { type: PersonType },
 *   })
 * });
 * ```
 */
exports.GraphQLScalarType = GraphQLScalarType;
class GraphQLObjectType {
  constructor(config) {
    var _config$extensionASTN2;
    this.name = (0, _assertName.assertName)(config.name);
    this.description = config.description;
    this.isTypeOf = config.isTypeOf;
    this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
    this.astNode = config.astNode;
    this.extensionASTNodes = (_config$extensionASTN2 = config.extensionASTNodes) !== null && _config$extensionASTN2 !== void 0 ? _config$extensionASTN2 : [];
    this._fields = () => defineFieldMap(config);
    this._interfaces = () => defineInterfaces(config);
    config.isTypeOf == null || typeof config.isTypeOf === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "isTypeOf" as a function, ` + `but got: ${(0, _inspect.inspect)(config.isTypeOf)}.`);
  }
  get [Symbol.toStringTag]() {
    return 'GraphQLObjectType';
  }
  getFields() {
    if (typeof this._fields === 'function') {
      this._fields = this._fields();
    }
    return this._fields;
  }
  getInterfaces() {
    if (typeof this._interfaces === 'function') {
      this._interfaces = this._interfaces();
    }
    return this._interfaces;
  }
  toConfig() {
    return {
      name: this.name,
      description: this.description,
      interfaces: this.getInterfaces(),
      fields: fieldsToFieldsConfig(this.getFields()),
      isTypeOf: this.isTypeOf,
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes
    };
  }
  toString() {
    return this.name;
  }
  toJSON() {
    return this.toString();
  }
}
exports.GraphQLObjectType = GraphQLObjectType;
function defineInterfaces(config) {
  var _config$interfaces;
  const interfaces = resolveReadonlyArrayThunk((_config$interfaces = config.interfaces) !== null && _config$interfaces !== void 0 ? _config$interfaces : []);
  Array.isArray(interfaces) || (0, _devAssert.devAssert)(false, `${config.name} interfaces must be an Array or a function which returns an Array.`);
  return interfaces;
}
function defineFieldMap(config) {
  const fieldMap = resolveObjMapThunk(config.fields);
  isPlainObj(fieldMap) || (0, _devAssert.devAssert)(false, `${config.name} fields must be an object with field names as keys or a function which returns such an object.`);
  return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => {
    var _fieldConfig$args;
    isPlainObj(fieldConfig) || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} field config must be an object.`);
    fieldConfig.resolve == null || typeof fieldConfig.resolve === 'function' || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} field resolver must be a function if ` + `provided, but got: ${(0, _inspect.inspect)(fieldConfig.resolve)}.`);
    const argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};
    isPlainObj(argsConfig) || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} args must be an object with argument names as keys.`);
    return {
      name: (0, _assertName.assertName)(fieldName),
      description: fieldConfig.description,
      type: fieldConfig.type,
      args: defineArguments(argsConfig),
      resolve: fieldConfig.resolve,
      subscribe: fieldConfig.subscribe,
      deprecationReason: fieldConfig.deprecationReason,
      extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions),
      astNode: fieldConfig.astNode
    };
  });
}
function defineArguments(config) {
  return Object.entries(config).map(_ref => {
    let [argName, argConfig] = _ref;
    return {
      name: (0, _assertName.assertName)(argName),
      description: argConfig.description,
      type: argConfig.type,
      defaultValue: argConfig.defaultValue,
      deprecationReason: argConfig.deprecationReason,
      extensions: (0, _toObjMap.toObjMap)(argConfig.extensions),
      astNode: argConfig.astNode
    };
  });
}
function isPlainObj(obj) {
  return (0, _isObjectLike.isObjectLike)(obj) && !Array.isArray(obj);
}
function fieldsToFieldsConfig(fields) {
  return (0, _mapValue.mapValue)(fields, field => ({
    description: field.description,
    type: field.type,
    args: argsToArgsConfig(field.args),
    resolve: field.resolve,
    subscribe: field.subscribe,
    deprecationReason: field.deprecationReason,
    extensions: field.extensions,
    astNode: field.astNode
  }));
}
/**
 * @internal
 */

function argsToArgsConfig(args) {
  return (0, _keyValMap.keyValMap)(args, arg => arg.name, arg => ({
    description: arg.description,
    type: arg.type,
    defaultValue: arg.defaultValue,
    deprecationReason: arg.deprecationReason,
    extensions: arg.extensions,
    astNode: arg.astNode
  }));
}
function isRequiredArgument(arg) {
  return isNonNullType(arg.type) && arg.defaultValue === undefined;
}

/**
 * Interface Type Definition
 *
 * When a field can return one of a heterogeneous set of types, a Interface type
 * is used to describe what types are possible, what fields are in common across
 * all types, as well as a function to determine which type is actually used
 * when the field is resolved.
 *
 * Example:
 *
 * ```ts
 * const EntityType = new GraphQLInterfaceType({
 *   name: 'Entity',
 *   fields: {
 *     name: { type: GraphQLString }
 *   }
 * });
 * ```
 */
class GraphQLInterfaceType {
  constructor(config) {
    var _config$extensionASTN3;
    this.name = (0, _assertName.assertName)(config.name);
    this.description = config.description;
    this.resolveType = config.resolveType;
    this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
    this.astNode = config.astNode;
    this.extensionASTNodes = (_config$extensionASTN3 = config.extensionASTNodes) !== null && _config$extensionASTN3 !== void 0 ? _config$extensionASTN3 : [];
    this._fields = defineFieldMap.bind(undefined, config);
    this._interfaces = defineInterfaces.bind(undefined, config);
    config.resolveType == null || typeof config.resolveType === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "resolveType" as a function, ` + `but got: ${(0, _inspect.inspect)(config.resolveType)}.`);
  }
  get [Symbol.toStringTag]() {
    return 'GraphQLInterfaceType';
  }
  getFields() {
    if (typeof this._fields === 'function') {
      this._fields = this._fields();
    }
    return this._fields;
  }
  getInterfaces() {
    if (typeof this._interfaces === 'function') {
      this._interfaces = this._interfaces();
    }
    return this._interfaces;
  }
  toConfig() {
    return {
      name: this.name,
      description: this.description,
      interfaces: this.getInterfaces(),
      fields: fieldsToFieldsConfig(this.getFields()),
      resolveType: this.resolveType,
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes
    };
  }
  toString() {
    return this.name;
  }
  toJSON() {
    return this.toString();
  }
}

/**
 * Union Type Definition
 *
 * When a field can return one of a heterogeneous set of types, a Union type
 * is used to describe what types are possible as well as providing a function
 * to determine which type is actually used when the field is resolved.
 *
 * Example:
 *
 * ```ts
 * const PetType = new GraphQLUnionType({
 *   name: 'Pet',
 *   types: [ DogType, CatType ],
 *   resolveType(value) {
 *     if (value instanceof Dog) {
 *       return DogType;
 *     }
 *     if (value instanceof Cat) {
 *       return CatType;
 *     }
 *   }
 * });
 * ```
 */
exports.GraphQLInterfaceType = GraphQLInterfaceType;
class GraphQLUnionType {
  constructor(config) {
    var _config$extensionASTN4;
    this.name = (0, _assertName.assertName)(config.name);
    this.description = config.description;
    this.resolveType = config.resolveType;
    this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
    this.astNode = config.astNode;
    this.extensionASTNodes = (_config$extensionASTN4 = config.extensionASTNodes) !== null && _config$extensionASTN4 !== void 0 ? _config$extensionASTN4 : [];
    this._types = defineTypes.bind(undefined, config);
    config.resolveType == null || typeof config.resolveType === 'function' || (0, _devAssert.devAssert)(false, `${this.name} must provide "resolveType" as a function, ` + `but got: ${(0, _inspect.inspect)(config.resolveType)}.`);
  }
  get [Symbol.toStringTag]() {
    return 'GraphQLUnionType';
  }
  getTypes() {
    if (typeof this._types === 'function') {
      this._types = this._types();
    }
    return this._types;
  }
  toConfig() {
    return {
      name: this.name,
      description: this.description,
      types: this.getTypes(),
      resolveType: this.resolveType,
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes
    };
  }
  toString() {
    return this.name;
  }
  toJSON() {
    return this.toString();
  }
}
exports.GraphQLUnionType = GraphQLUnionType;
function defineTypes(config) {
  const types = resolveReadonlyArrayThunk(config.types);
  Array.isArray(types) || (0, _devAssert.devAssert)(false, `Must provide Array of types or a function which returns such an array for Union ${config.name}.`);
  return types;
}

/**
 * Enum Type Definition
 *
 * Some leaf values of requests and input values are Enums. GraphQL serializes
 * Enum values as strings, however internally Enums can be represented by any
 * kind of type, often integers.
 *
 * Example:
 *
 * ```ts
 * const RGBType = new GraphQLEnumType({
 *   name: 'RGB',
 *   values: {
 *     RED: { value: 0 },
 *     GREEN: { value: 1 },
 *     BLUE: { value: 2 }
 *   }
 * });
 * ```
 *
 * Note: If a value is not provided in a definition, the name of the enum value
 * will be used as its internal value.
 */
class GraphQLEnumType {
  /* <T> */
  constructor(config) {
    var _config$extensionASTN5;
    this.name = (0, _assertName.assertName)(config.name);
    this.description = config.description;
    this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
    this.astNode = config.astNode;
    this.extensionASTNodes = (_config$extensionASTN5 = config.extensionASTNodes) !== null && _config$extensionASTN5 !== void 0 ? _config$extensionASTN5 : [];
    this._values = defineEnumValues(this.name, config.values);
    this._valueLookup = new Map(this._values.map(enumValue => [enumValue.value, enumValue]));
    this._nameLookup = (0, _keyMap.keyMap)(this._values, value => value.name);
  }
  get [Symbol.toStringTag]() {
    return 'GraphQLEnumType';
  }
  getValues() {
    return this._values;
  }
  getValue(name) {
    return this._nameLookup[name];
  }
  serialize(outputValue) {
    const enumValue = this._valueLookup.get(outputValue);
    if (enumValue === undefined) {
      throw new _GraphQLError.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0, _inspect.inspect)(outputValue)}`);
    }
    return enumValue.name;
  }
  parseValue(inputValue) /* T */
  {
    if (typeof inputValue !== 'string') {
      const valueStr = (0, _inspect.inspect)(inputValue);
      throw new _GraphQLError.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr));
    }
    const enumValue = this.getValue(inputValue);
    if (enumValue == null) {
      throw new _GraphQLError.GraphQLError(`Value "${inputValue}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, inputValue));
    }
    return enumValue.value;
  }
  parseLiteral(valueNode, _variables) /* T */
  {
    // Note: variables will be resolved to a value before calling this function.
    if (valueNode.kind !== _kinds.Kind.ENUM) {
      const valueStr = (0, _printer.print)(valueNode);
      throw new _GraphQLError.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${valueStr}.` + didYouMeanEnumValue(this, valueStr), {
        nodes: valueNode
      });
    }
    const enumValue = this.getValue(valueNode.value);
    if (enumValue == null) {
      const valueStr = (0, _printer.print)(valueNode);
      throw new _GraphQLError.GraphQLError(`Value "${valueStr}" does not exist in "${this.name}" enum.` + didYouMeanEnumValue(this, valueStr), {
        nodes: valueNode
      });
    }
    return enumValue.value;
  }
  toConfig() {
    const values = (0, _keyValMap.keyValMap)(this.getValues(), value => value.name, value => ({
      description: value.description,
      value: value.value,
      deprecationReason: value.deprecationReason,
      extensions: value.extensions,
      astNode: value.astNode
    }));
    return {
      name: this.name,
      description: this.description,
      values,
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes
    };
  }
  toString() {
    return this.name;
  }
  toJSON() {
    return this.toString();
  }
}
exports.GraphQLEnumType = GraphQLEnumType;
function didYouMeanEnumValue(enumType, unknownValueStr) {
  const allNames = enumType.getValues().map(value => value.name);
  const suggestedValues = (0, _suggestionList.suggestionList)(unknownValueStr, allNames);
  return (0, _didYouMean.didYouMean)('the enum value', suggestedValues);
}
function defineEnumValues(typeName, valueMap) {
  isPlainObj(valueMap) || (0, _devAssert.devAssert)(false, `${typeName} values must be an object with value names as keys.`);
  return Object.entries(valueMap).map(_ref2 => {
    let [valueName, valueConfig] = _ref2;
    isPlainObj(valueConfig) || (0, _devAssert.devAssert)(false, `${typeName}.${valueName} must refer to an object with a "value" key ` + `representing an internal value but got: ${(0, _inspect.inspect)(valueConfig)}.`);
    return {
      name: (0, _assertName.assertEnumValueName)(valueName),
      description: valueConfig.description,
      value: valueConfig.value !== undefined ? valueConfig.value : valueName,
      deprecationReason: valueConfig.deprecationReason,
      extensions: (0, _toObjMap.toObjMap)(valueConfig.extensions),
      astNode: valueConfig.astNode
    };
  });
}

/**
 * Input Object Type Definition
 *
 * An input object defines a structured collection of fields which may be
 * supplied to a field argument.
 *
 * Using `NonNull` will ensure that a value must be provided by the query
 *
 * Example:
 *
 * ```ts
 * const GeoPoint = new GraphQLInputObjectType({
 *   name: 'GeoPoint',
 *   fields: {
 *     lat: { type: new GraphQLNonNull(GraphQLFloat) },
 *     lon: { type: new GraphQLNonNull(GraphQLFloat) },
 *     alt: { type: GraphQLFloat, defaultValue: 0 },
 *   }
 * });
 * ```
 */
class GraphQLInputObjectType {
  constructor(config) {
    var _config$extensionASTN6;
    this.name = (0, _assertName.assertName)(config.name);
    this.description = config.description;
    this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
    this.astNode = config.astNode;
    this.extensionASTNodes = (_config$extensionASTN6 = config.extensionASTNodes) !== null && _config$extensionASTN6 !== void 0 ? _config$extensionASTN6 : [];
    this._fields = defineInputFieldMap.bind(undefined, config);
  }
  get [Symbol.toStringTag]() {
    return 'GraphQLInputObjectType';
  }
  getFields() {
    if (typeof this._fields === 'function') {
      this._fields = this._fields();
    }
    return this._fields;
  }
  toConfig() {
    const fields = (0, _mapValue.mapValue)(this.getFields(), field => ({
      description: field.description,
      type: field.type,
      defaultValue: field.defaultValue,
      deprecationReason: field.deprecationReason,
      extensions: field.extensions,
      astNode: field.astNode
    }));
    return {
      name: this.name,
      description: this.description,
      fields,
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes
    };
  }
  toString() {
    return this.name;
  }
  toJSON() {
    return this.toString();
  }
}
exports.GraphQLInputObjectType = GraphQLInputObjectType;
function defineInputFieldMap(config) {
  const fieldMap = resolveObjMapThunk(config.fields);
  isPlainObj(fieldMap) || (0, _devAssert.devAssert)(false, `${config.name} fields must be an object with field names as keys or a function which returns such an object.`);
  return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => {
    !('resolve' in fieldConfig) || (0, _devAssert.devAssert)(false, `${config.name}.${fieldName} field has a resolve property, but Input Types cannot define resolvers.`);
    return {
      name: (0, _assertName.assertName)(fieldName),
      description: fieldConfig.description,
      type: fieldConfig.type,
      defaultValue: fieldConfig.defaultValue,
      deprecationReason: fieldConfig.deprecationReason,
      extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions),
      astNode: fieldConfig.astNode
    };
  });
}
function isRequiredInputField(field) {
  return isNonNullType(field.type) && field.defaultValue === undefined;
}

/***/ }),

/***/ "../../../node_modules/graphql/type/directives.mjs":
/*!*********************************************************!*\
  !*** ../../../node_modules/graphql/type/directives.mjs ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.GraphQLSpecifiedByDirective = exports.GraphQLSkipDirective = exports.GraphQLIncludeDirective = exports.GraphQLDirective = exports.GraphQLDeprecatedDirective = exports.DEFAULT_DEPRECATION_REASON = void 0;
exports.assertDirective = assertDirective;
exports.isDirective = isDirective;
exports.isSpecifiedDirective = isSpecifiedDirective;
exports.specifiedDirectives = void 0;
var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _instanceOf = __webpack_require__(/*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs");
var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
var _toObjMap = __webpack_require__(/*! ../jsutils/toObjMap.mjs */ "../../../node_modules/graphql/jsutils/toObjMap.mjs");
var _directiveLocation = __webpack_require__(/*! ../language/directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs");
var _assertName = __webpack_require__(/*! ./assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs");
var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _scalars = __webpack_require__(/*! ./scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
/**
 * Test if the given value is a GraphQL directive.
 */

function isDirective(directive) {
  return (0, _instanceOf.instanceOf)(directive, GraphQLDirective);
}
function assertDirective(directive) {
  if (!isDirective(directive)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(directive)} to be a GraphQL directive.`);
  }
  return directive;
}
/**
 * Custom extensions
 *
 * @remarks
 * Use a unique identifier name for your extension, for example the name of
 * your library or project. Do not use a shortened identifier as this increases
 * the risk of conflicts. We recommend you add at most one extension field,
 * an object which can contain all the values you need.
 */

/**
 * Directives are used by the GraphQL runtime as a way of modifying execution
 * behavior. Type system creators will usually not create these directly.
 */
class GraphQLDirective {
  constructor(config) {
    var _config$isRepeatable, _config$args;
    this.name = (0, _assertName.assertName)(config.name);
    this.description = config.description;
    this.locations = config.locations;
    this.isRepeatable = (_config$isRepeatable = config.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false;
    this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
    this.astNode = config.astNode;
    Array.isArray(config.locations) || (0, _devAssert.devAssert)(false, `@${config.name} locations must be an Array.`);
    const args = (_config$args = config.args) !== null && _config$args !== void 0 ? _config$args : {};
    (0, _isObjectLike.isObjectLike)(args) && !Array.isArray(args) || (0, _devAssert.devAssert)(false, `@${config.name} args must be an object with argument names as keys.`);
    this.args = (0, _definition.defineArguments)(args);
  }
  get [Symbol.toStringTag]() {
    return 'GraphQLDirective';
  }
  toConfig() {
    return {
      name: this.name,
      description: this.description,
      locations: this.locations,
      args: (0, _definition.argsToArgsConfig)(this.args),
      isRepeatable: this.isRepeatable,
      extensions: this.extensions,
      astNode: this.astNode
    };
  }
  toString() {
    return '@' + this.name;
  }
  toJSON() {
    return this.toString();
  }
}

/**
 * Used to conditionally include fields or fragments.
 */
exports.GraphQLDirective = GraphQLDirective;
const GraphQLIncludeDirective = new GraphQLDirective({
  name: 'include',
  description: 'Directs the executor to include this field or fragment only when the `if` argument is true.',
  locations: [_directiveLocation.DirectiveLocation.FIELD, _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, _directiveLocation.DirectiveLocation.INLINE_FRAGMENT],
  args: {
    if: {
      type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
      description: 'Included when true.'
    }
  }
});
/**
 * Used to conditionally skip (exclude) fields or fragments.
 */
exports.GraphQLIncludeDirective = GraphQLIncludeDirective;
const GraphQLSkipDirective = new GraphQLDirective({
  name: 'skip',
  description: 'Directs the executor to skip this field or fragment when the `if` argument is true.',
  locations: [_directiveLocation.DirectiveLocation.FIELD, _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD, _directiveLocation.DirectiveLocation.INLINE_FRAGMENT],
  args: {
    if: {
      type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
      description: 'Skipped when true.'
    }
  }
});
/**
 * Constant string used for default reason for a deprecation.
 */
exports.GraphQLSkipDirective = GraphQLSkipDirective;
const DEFAULT_DEPRECATION_REASON = 'No longer supported';
/**
 * Used to declare element of a GraphQL schema as deprecated.
 */
exports.DEFAULT_DEPRECATION_REASON = DEFAULT_DEPRECATION_REASON;
const GraphQLDeprecatedDirective = new GraphQLDirective({
  name: 'deprecated',
  description: 'Marks an element of a GraphQL schema as no longer supported.',
  locations: [_directiveLocation.DirectiveLocation.FIELD_DEFINITION, _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION, _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION, _directiveLocation.DirectiveLocation.ENUM_VALUE],
  args: {
    reason: {
      type: _scalars.GraphQLString,
      description: 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).',
      defaultValue: DEFAULT_DEPRECATION_REASON
    }
  }
});
/**
 * Used to provide a URL for specifying the behavior of custom scalar definitions.
 */
exports.GraphQLDeprecatedDirective = GraphQLDeprecatedDirective;
const GraphQLSpecifiedByDirective = new GraphQLDirective({
  name: 'specifiedBy',
  description: 'Exposes a URL that specifies the behavior of this scalar.',
  locations: [_directiveLocation.DirectiveLocation.SCALAR],
  args: {
    url: {
      type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
      description: 'The URL that specifies the behavior of this scalar.'
    }
  }
});
/**
 * The full list of specified directives.
 */
exports.GraphQLSpecifiedByDirective = GraphQLSpecifiedByDirective;
const specifiedDirectives = Object.freeze([GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective]);
exports.specifiedDirectives = specifiedDirectives;
function isSpecifiedDirective(directive) {
  return specifiedDirectives.some(_ref => {
    let {
      name
    } = _ref;
    return name === directive.name;
  });
}

/***/ }),

/***/ "../../../node_modules/graphql/type/index.mjs":
/*!****************************************************!*\
  !*** ../../../node_modules/graphql/type/index.mjs ***!
  \****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "DEFAULT_DEPRECATION_REASON", ({
  enumerable: true,
  get: function () {
    return _directives.DEFAULT_DEPRECATION_REASON;
  }
}));
Object.defineProperty(exports, "GRAPHQL_MAX_INT", ({
  enumerable: true,
  get: function () {
    return _scalars.GRAPHQL_MAX_INT;
  }
}));
Object.defineProperty(exports, "GRAPHQL_MIN_INT", ({
  enumerable: true,
  get: function () {
    return _scalars.GRAPHQL_MIN_INT;
  }
}));
Object.defineProperty(exports, "GraphQLBoolean", ({
  enumerable: true,
  get: function () {
    return _scalars.GraphQLBoolean;
  }
}));
Object.defineProperty(exports, "GraphQLDeprecatedDirective", ({
  enumerable: true,
  get: function () {
    return _directives.GraphQLDeprecatedDirective;
  }
}));
Object.defineProperty(exports, "GraphQLDirective", ({
  enumerable: true,
  get: function () {
    return _directives.GraphQLDirective;
  }
}));
Object.defineProperty(exports, "GraphQLEnumType", ({
  enumerable: true,
  get: function () {
    return _definition.GraphQLEnumType;
  }
}));
Object.defineProperty(exports, "GraphQLFloat", ({
  enumerable: true,
  get: function () {
    return _scalars.GraphQLFloat;
  }
}));
Object.defineProperty(exports, "GraphQLID", ({
  enumerable: true,
  get: function () {
    return _scalars.GraphQLID;
  }
}));
Object.defineProperty(exports, "GraphQLIncludeDirective", ({
  enumerable: true,
  get: function () {
    return _directives.GraphQLIncludeDirective;
  }
}));
Object.defineProperty(exports, "GraphQLInputObjectType", ({
  enumerable: true,
  get: function () {
    return _definition.GraphQLInputObjectType;
  }
}));
Object.defineProperty(exports, "GraphQLInt", ({
  enumerable: true,
  get: function () {
    return _scalars.GraphQLInt;
  }
}));
Object.defineProperty(exports, "GraphQLInterfaceType", ({
  enumerable: true,
  get: function () {
    return _definition.GraphQLInterfaceType;
  }
}));
Object.defineProperty(exports, "GraphQLList", ({
  enumerable: true,
  get: function () {
    return _definition.GraphQLList;
  }
}));
Object.defineProperty(exports, "GraphQLNonNull", ({
  enumerable: true,
  get: function () {
    return _definition.GraphQLNonNull;
  }
}));
Object.defineProperty(exports, "GraphQLObjectType", ({
  enumerable: true,
  get: function () {
    return _definition.GraphQLObjectType;
  }
}));
Object.defineProperty(exports, "GraphQLScalarType", ({
  enumerable: true,
  get: function () {
    return _definition.GraphQLScalarType;
  }
}));
Object.defineProperty(exports, "GraphQLSchema", ({
  enumerable: true,
  get: function () {
    return _schema.GraphQLSchema;
  }
}));
Object.defineProperty(exports, "GraphQLSkipDirective", ({
  enumerable: true,
  get: function () {
    return _directives.GraphQLSkipDirective;
  }
}));
Object.defineProperty(exports, "GraphQLSpecifiedByDirective", ({
  enumerable: true,
  get: function () {
    return _directives.GraphQLSpecifiedByDirective;
  }
}));
Object.defineProperty(exports, "GraphQLString", ({
  enumerable: true,
  get: function () {
    return _scalars.GraphQLString;
  }
}));
Object.defineProperty(exports, "GraphQLUnionType", ({
  enumerable: true,
  get: function () {
    return _definition.GraphQLUnionType;
  }
}));
Object.defineProperty(exports, "SchemaMetaFieldDef", ({
  enumerable: true,
  get: function () {
    return _introspection.SchemaMetaFieldDef;
  }
}));
Object.defineProperty(exports, "TypeKind", ({
  enumerable: true,
  get: function () {
    return _introspection.TypeKind;
  }
}));
Object.defineProperty(exports, "TypeMetaFieldDef", ({
  enumerable: true,
  get: function () {
    return _introspection.TypeMetaFieldDef;
  }
}));
Object.defineProperty(exports, "TypeNameMetaFieldDef", ({
  enumerable: true,
  get: function () {
    return _introspection.TypeNameMetaFieldDef;
  }
}));
Object.defineProperty(exports, "__Directive", ({
  enumerable: true,
  get: function () {
    return _introspection.__Directive;
  }
}));
Object.defineProperty(exports, "__DirectiveLocation", ({
  enumerable: true,
  get: function () {
    return _introspection.__DirectiveLocation;
  }
}));
Object.defineProperty(exports, "__EnumValue", ({
  enumerable: true,
  get: function () {
    return _introspection.__EnumValue;
  }
}));
Object.defineProperty(exports, "__Field", ({
  enumerable: true,
  get: function () {
    return _introspection.__Field;
  }
}));
Object.defineProperty(exports, "__InputValue", ({
  enumerable: true,
  get: function () {
    return _introspection.__InputValue;
  }
}));
Object.defineProperty(exports, "__Schema", ({
  enumerable: true,
  get: function () {
    return _introspection.__Schema;
  }
}));
Object.defineProperty(exports, "__Type", ({
  enumerable: true,
  get: function () {
    return _introspection.__Type;
  }
}));
Object.defineProperty(exports, "__TypeKind", ({
  enumerable: true,
  get: function () {
    return _introspection.__TypeKind;
  }
}));
Object.defineProperty(exports, "assertAbstractType", ({
  enumerable: true,
  get: function () {
    return _definition.assertAbstractType;
  }
}));
Object.defineProperty(exports, "assertCompositeType", ({
  enumerable: true,
  get: function () {
    return _definition.assertCompositeType;
  }
}));
Object.defineProperty(exports, "assertDirective", ({
  enumerable: true,
  get: function () {
    return _directives.assertDirective;
  }
}));
Object.defineProperty(exports, "assertEnumType", ({
  enumerable: true,
  get: function () {
    return _definition.assertEnumType;
  }
}));
Object.defineProperty(exports, "assertEnumValueName", ({
  enumerable: true,
  get: function () {
    return _assertName.assertEnumValueName;
  }
}));
Object.defineProperty(exports, "assertInputObjectType", ({
  enumerable: true,
  get: function () {
    return _definition.assertInputObjectType;
  }
}));
Object.defineProperty(exports, "assertInputType", ({
  enumerable: true,
  get: function () {
    return _definition.assertInputType;
  }
}));
Object.defineProperty(exports, "assertInterfaceType", ({
  enumerable: true,
  get: function () {
    return _definition.assertInterfaceType;
  }
}));
Object.defineProperty(exports, "assertLeafType", ({
  enumerable: true,
  get: function () {
    return _definition.assertLeafType;
  }
}));
Object.defineProperty(exports, "assertListType", ({
  enumerable: true,
  get: function () {
    return _definition.assertListType;
  }
}));
Object.defineProperty(exports, "assertName", ({
  enumerable: true,
  get: function () {
    return _assertName.assertName;
  }
}));
Object.defineProperty(exports, "assertNamedType", ({
  enumerable: true,
  get: function () {
    return _definition.assertNamedType;
  }
}));
Object.defineProperty(exports, "assertNonNullType", ({
  enumerable: true,
  get: function () {
    return _definition.assertNonNullType;
  }
}));
Object.defineProperty(exports, "assertNullableType", ({
  enumerable: true,
  get: function () {
    return _definition.assertNullableType;
  }
}));
Object.defineProperty(exports, "assertObjectType", ({
  enumerable: true,
  get: function () {
    return _definition.assertObjectType;
  }
}));
Object.defineProperty(exports, "assertOutputType", ({
  enumerable: true,
  get: function () {
    return _definition.assertOutputType;
  }
}));
Object.defineProperty(exports, "assertScalarType", ({
  enumerable: true,
  get: function () {
    return _definition.assertScalarType;
  }
}));
Object.defineProperty(exports, "assertSchema", ({
  enumerable: true,
  get: function () {
    return _schema.assertSchema;
  }
}));
Object.defineProperty(exports, "assertType", ({
  enumerable: true,
  get: function () {
    return _definition.assertType;
  }
}));
Object.defineProperty(exports, "assertUnionType", ({
  enumerable: true,
  get: function () {
    return _definition.assertUnionType;
  }
}));
Object.defineProperty(exports, "assertValidSchema", ({
  enumerable: true,
  get: function () {
    return _validate.assertValidSchema;
  }
}));
Object.defineProperty(exports, "assertWrappingType", ({
  enumerable: true,
  get: function () {
    return _definition.assertWrappingType;
  }
}));
Object.defineProperty(exports, "getNamedType", ({
  enumerable: true,
  get: function () {
    return _definition.getNamedType;
  }
}));
Object.defineProperty(exports, "getNullableType", ({
  enumerable: true,
  get: function () {
    return _definition.getNullableType;
  }
}));
Object.defineProperty(exports, "introspectionTypes", ({
  enumerable: true,
  get: function () {
    return _introspection.introspectionTypes;
  }
}));
Object.defineProperty(exports, "isAbstractType", ({
  enumerable: true,
  get: function () {
    return _definition.isAbstractType;
  }
}));
Object.defineProperty(exports, "isCompositeType", ({
  enumerable: true,
  get: function () {
    return _definition.isCompositeType;
  }
}));
Object.defineProperty(exports, "isDirective", ({
  enumerable: true,
  get: function () {
    return _directives.isDirective;
  }
}));
Object.defineProperty(exports, "isEnumType", ({
  enumerable: true,
  get: function () {
    return _definition.isEnumType;
  }
}));
Object.defineProperty(exports, "isInputObjectType", ({
  enumerable: true,
  get: function () {
    return _definition.isInputObjectType;
  }
}));
Object.defineProperty(exports, "isInputType", ({
  enumerable: true,
  get: function () {
    return _definition.isInputType;
  }
}));
Object.defineProperty(exports, "isInterfaceType", ({
  enumerable: true,
  get: function () {
    return _definition.isInterfaceType;
  }
}));
Object.defineProperty(exports, "isIntrospectionType", ({
  enumerable: true,
  get: function () {
    return _introspection.isIntrospectionType;
  }
}));
Object.defineProperty(exports, "isLeafType", ({
  enumerable: true,
  get: function () {
    return _definition.isLeafType;
  }
}));
Object.defineProperty(exports, "isListType", ({
  enumerable: true,
  get: function () {
    return _definition.isListType;
  }
}));
Object.defineProperty(exports, "isNamedType", ({
  enumerable: true,
  get: function () {
    return _definition.isNamedType;
  }
}));
Object.defineProperty(exports, "isNonNullType", ({
  enumerable: true,
  get: function () {
    return _definition.isNonNullType;
  }
}));
Object.defineProperty(exports, "isNullableType", ({
  enumerable: true,
  get: function () {
    return _definition.isNullableType;
  }
}));
Object.defineProperty(exports, "isObjectType", ({
  enumerable: true,
  get: function () {
    return _definition.isObjectType;
  }
}));
Object.defineProperty(exports, "isOutputType", ({
  enumerable: true,
  get: function () {
    return _definition.isOutputType;
  }
}));
Object.defineProperty(exports, "isRequiredArgument", ({
  enumerable: true,
  get: function () {
    return _definition.isRequiredArgument;
  }
}));
Object.defineProperty(exports, "isRequiredInputField", ({
  enumerable: true,
  get: function () {
    return _definition.isRequiredInputField;
  }
}));
Object.defineProperty(exports, "isScalarType", ({
  enumerable: true,
  get: function () {
    return _definition.isScalarType;
  }
}));
Object.defineProperty(exports, "isSchema", ({
  enumerable: true,
  get: function () {
    return _schema.isSchema;
  }
}));
Object.defineProperty(exports, "isSpecifiedDirective", ({
  enumerable: true,
  get: function () {
    return _directives.isSpecifiedDirective;
  }
}));
Object.defineProperty(exports, "isSpecifiedScalarType", ({
  enumerable: true,
  get: function () {
    return _scalars.isSpecifiedScalarType;
  }
}));
Object.defineProperty(exports, "isType", ({
  enumerable: true,
  get: function () {
    return _definition.isType;
  }
}));
Object.defineProperty(exports, "isUnionType", ({
  enumerable: true,
  get: function () {
    return _definition.isUnionType;
  }
}));
Object.defineProperty(exports, "isWrappingType", ({
  enumerable: true,
  get: function () {
    return _definition.isWrappingType;
  }
}));
Object.defineProperty(exports, "resolveObjMapThunk", ({
  enumerable: true,
  get: function () {
    return _definition.resolveObjMapThunk;
  }
}));
Object.defineProperty(exports, "resolveReadonlyArrayThunk", ({
  enumerable: true,
  get: function () {
    return _definition.resolveReadonlyArrayThunk;
  }
}));
Object.defineProperty(exports, "specifiedDirectives", ({
  enumerable: true,
  get: function () {
    return _directives.specifiedDirectives;
  }
}));
Object.defineProperty(exports, "specifiedScalarTypes", ({
  enumerable: true,
  get: function () {
    return _scalars.specifiedScalarTypes;
  }
}));
Object.defineProperty(exports, "validateSchema", ({
  enumerable: true,
  get: function () {
    return _validate.validateSchema;
  }
}));
var _schema = __webpack_require__(/*! ./schema.mjs */ "../../../node_modules/graphql/type/schema.mjs");
var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _directives = __webpack_require__(/*! ./directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
var _scalars = __webpack_require__(/*! ./scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
var _introspection = __webpack_require__(/*! ./introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
var _validate = __webpack_require__(/*! ./validate.mjs */ "../../../node_modules/graphql/type/validate.mjs");
var _assertName = __webpack_require__(/*! ./assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs");

/***/ }),

/***/ "../../../node_modules/graphql/type/introspection.mjs":
/*!************************************************************!*\
  !*** ../../../node_modules/graphql/type/introspection.mjs ***!
  \************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.introspectionTypes = exports.__TypeKind = exports.__Type = exports.__Schema = exports.__InputValue = exports.__Field = exports.__EnumValue = exports.__DirectiveLocation = exports.__Directive = exports.TypeNameMetaFieldDef = exports.TypeMetaFieldDef = exports.TypeKind = exports.SchemaMetaFieldDef = void 0;
exports.isIntrospectionType = isIntrospectionType;
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _directiveLocation = __webpack_require__(/*! ../language/directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs");
var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
var _astFromValue = __webpack_require__(/*! ../utilities/astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs");
var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _scalars = __webpack_require__(/*! ./scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
const __Schema = new _definition.GraphQLObjectType({
  name: '__Schema',
  description: 'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.',
  fields: () => ({
    description: {
      type: _scalars.GraphQLString,
      resolve: schema => schema.description
    },
    types: {
      description: 'A list of all types supported by this server.',
      type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type))),
      resolve(schema) {
        return Object.values(schema.getTypeMap());
      }
    },
    queryType: {
      description: 'The type that query operations will be rooted at.',
      type: new _definition.GraphQLNonNull(__Type),
      resolve: schema => schema.getQueryType()
    },
    mutationType: {
      description: 'If this server supports mutation, the type that mutation operations will be rooted at.',
      type: __Type,
      resolve: schema => schema.getMutationType()
    },
    subscriptionType: {
      description: 'If this server support subscription, the type that subscription operations will be rooted at.',
      type: __Type,
      resolve: schema => schema.getSubscriptionType()
    },
    directives: {
      description: 'A list of all directives supported by this server.',
      type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__Directive))),
      resolve: schema => schema.getDirectives()
    }
  })
});
exports.__Schema = __Schema;
const __Directive = new _definition.GraphQLObjectType({
  name: '__Directive',
  description: "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
  fields: () => ({
    name: {
      type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
      resolve: directive => directive.name
    },
    description: {
      type: _scalars.GraphQLString,
      resolve: directive => directive.description
    },
    isRepeatable: {
      type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
      resolve: directive => directive.isRepeatable
    },
    locations: {
      type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__DirectiveLocation))),
      resolve: directive => directive.locations
    },
    args: {
      type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))),
      args: {
        includeDeprecated: {
          type: _scalars.GraphQLBoolean,
          defaultValue: false
        }
      },
      resolve(field, _ref) {
        let {
          includeDeprecated
        } = _ref;
        return includeDeprecated ? field.args : field.args.filter(arg => arg.deprecationReason == null);
      }
    }
  })
});
exports.__Directive = __Directive;
const __DirectiveLocation = new _definition.GraphQLEnumType({
  name: '__DirectiveLocation',
  description: 'A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.',
  values: {
    QUERY: {
      value: _directiveLocation.DirectiveLocation.QUERY,
      description: 'Location adjacent to a query operation.'
    },
    MUTATION: {
      value: _directiveLocation.DirectiveLocation.MUTATION,
      description: 'Location adjacent to a mutation operation.'
    },
    SUBSCRIPTION: {
      value: _directiveLocation.DirectiveLocation.SUBSCRIPTION,
      description: 'Location adjacent to a subscription operation.'
    },
    FIELD: {
      value: _directiveLocation.DirectiveLocation.FIELD,
      description: 'Location adjacent to a field.'
    },
    FRAGMENT_DEFINITION: {
      value: _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION,
      description: 'Location adjacent to a fragment definition.'
    },
    FRAGMENT_SPREAD: {
      value: _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD,
      description: 'Location adjacent to a fragment spread.'
    },
    INLINE_FRAGMENT: {
      value: _directiveLocation.DirectiveLocation.INLINE_FRAGMENT,
      description: 'Location adjacent to an inline fragment.'
    },
    VARIABLE_DEFINITION: {
      value: _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION,
      description: 'Location adjacent to a variable definition.'
    },
    SCHEMA: {
      value: _directiveLocation.DirectiveLocation.SCHEMA,
      description: 'Location adjacent to a schema definition.'
    },
    SCALAR: {
      value: _directiveLocation.DirectiveLocation.SCALAR,
      description: 'Location adjacent to a scalar definition.'
    },
    OBJECT: {
      value: _directiveLocation.DirectiveLocation.OBJECT,
      description: 'Location adjacent to an object type definition.'
    },
    FIELD_DEFINITION: {
      value: _directiveLocation.DirectiveLocation.FIELD_DEFINITION,
      description: 'Location adjacent to a field definition.'
    },
    ARGUMENT_DEFINITION: {
      value: _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION,
      description: 'Location adjacent to an argument definition.'
    },
    INTERFACE: {
      value: _directiveLocation.DirectiveLocation.INTERFACE,
      description: 'Location adjacent to an interface definition.'
    },
    UNION: {
      value: _directiveLocation.DirectiveLocation.UNION,
      description: 'Location adjacent to a union definition.'
    },
    ENUM: {
      value: _directiveLocation.DirectiveLocation.ENUM,
      description: 'Location adjacent to an enum definition.'
    },
    ENUM_VALUE: {
      value: _directiveLocation.DirectiveLocation.ENUM_VALUE,
      description: 'Location adjacent to an enum value definition.'
    },
    INPUT_OBJECT: {
      value: _directiveLocation.DirectiveLocation.INPUT_OBJECT,
      description: 'Location adjacent to an input object type definition.'
    },
    INPUT_FIELD_DEFINITION: {
      value: _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION,
      description: 'Location adjacent to an input object field definition.'
    }
  }
});
exports.__DirectiveLocation = __DirectiveLocation;
const __Type = new _definition.GraphQLObjectType({
  name: '__Type',
  description: 'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.',
  fields: () => ({
    kind: {
      type: new _definition.GraphQLNonNull(__TypeKind),
      resolve(type) {
        if ((0, _definition.isScalarType)(type)) {
          return TypeKind.SCALAR;
        }
        if ((0, _definition.isObjectType)(type)) {
          return TypeKind.OBJECT;
        }
        if ((0, _definition.isInterfaceType)(type)) {
          return TypeKind.INTERFACE;
        }
        if ((0, _definition.isUnionType)(type)) {
          return TypeKind.UNION;
        }
        if ((0, _definition.isEnumType)(type)) {
          return TypeKind.ENUM;
        }
        if ((0, _definition.isInputObjectType)(type)) {
          return TypeKind.INPUT_OBJECT;
        }
        if ((0, _definition.isListType)(type)) {
          return TypeKind.LIST;
        }
        if ((0, _definition.isNonNullType)(type)) {
          return TypeKind.NON_NULL;
        }
        /* c8 ignore next 3 */
        // Not reachable, all possible types have been considered)

         false || (0, _invariant.invariant)(false, `Unexpected type: "${(0, _inspect.inspect)(type)}".`);
      }
    },
    name: {
      type: _scalars.GraphQLString,
      resolve: type => 'name' in type ? type.name : undefined
    },
    description: {
      type: _scalars.GraphQLString,
      resolve: (type // FIXME: add test case
      ) => /* c8 ignore next */
      'description' in type ? type.description : undefined
    },
    specifiedByURL: {
      type: _scalars.GraphQLString,
      resolve: obj => 'specifiedByURL' in obj ? obj.specifiedByURL : undefined
    },
    fields: {
      type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Field)),
      args: {
        includeDeprecated: {
          type: _scalars.GraphQLBoolean,
          defaultValue: false
        }
      },
      resolve(type, _ref2) {
        let {
          includeDeprecated
        } = _ref2;
        if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) {
          const fields = Object.values(type.getFields());
          return includeDeprecated ? fields : fields.filter(field => field.deprecationReason == null);
        }
      }
    },
    interfaces: {
      type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),
      resolve(type) {
        if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) {
          return type.getInterfaces();
        }
      }
    },
    possibleTypes: {
      type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),
      resolve(type, _args, _context, _ref3) {
        let {
          schema
        } = _ref3;
        if ((0, _definition.isAbstractType)(type)) {
          return schema.getPossibleTypes(type);
        }
      }
    },
    enumValues: {
      type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__EnumValue)),
      args: {
        includeDeprecated: {
          type: _scalars.GraphQLBoolean,
          defaultValue: false
        }
      },
      resolve(type, _ref4) {
        let {
          includeDeprecated
        } = _ref4;
        if ((0, _definition.isEnumType)(type)) {
          const values = type.getValues();
          return includeDeprecated ? values : values.filter(field => field.deprecationReason == null);
        }
      }
    },
    inputFields: {
      type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue)),
      args: {
        includeDeprecated: {
          type: _scalars.GraphQLBoolean,
          defaultValue: false
        }
      },
      resolve(type, _ref5) {
        let {
          includeDeprecated
        } = _ref5;
        if ((0, _definition.isInputObjectType)(type)) {
          const values = Object.values(type.getFields());
          return includeDeprecated ? values : values.filter(field => field.deprecationReason == null);
        }
      }
    },
    ofType: {
      type: __Type,
      resolve: type => 'ofType' in type ? type.ofType : undefined
    }
  })
});
exports.__Type = __Type;
const __Field = new _definition.GraphQLObjectType({
  name: '__Field',
  description: 'Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.',
  fields: () => ({
    name: {
      type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
      resolve: field => field.name
    },
    description: {
      type: _scalars.GraphQLString,
      resolve: field => field.description
    },
    args: {
      type: new _definition.GraphQLNonNull(new _definition.GraphQLList(new _definition.GraphQLNonNull(__InputValue))),
      args: {
        includeDeprecated: {
          type: _scalars.GraphQLBoolean,
          defaultValue: false
        }
      },
      resolve(field, _ref6) {
        let {
          includeDeprecated
        } = _ref6;
        return includeDeprecated ? field.args : field.args.filter(arg => arg.deprecationReason == null);
      }
    },
    type: {
      type: new _definition.GraphQLNonNull(__Type),
      resolve: field => field.type
    },
    isDeprecated: {
      type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
      resolve: field => field.deprecationReason != null
    },
    deprecationReason: {
      type: _scalars.GraphQLString,
      resolve: field => field.deprecationReason
    }
  })
});
exports.__Field = __Field;
const __InputValue = new _definition.GraphQLObjectType({
  name: '__InputValue',
  description: 'Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.',
  fields: () => ({
    name: {
      type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
      resolve: inputValue => inputValue.name
    },
    description: {
      type: _scalars.GraphQLString,
      resolve: inputValue => inputValue.description
    },
    type: {
      type: new _definition.GraphQLNonNull(__Type),
      resolve: inputValue => inputValue.type
    },
    defaultValue: {
      type: _scalars.GraphQLString,
      description: 'A GraphQL-formatted string representing the default value for this input value.',
      resolve(inputValue) {
        const {
          type,
          defaultValue
        } = inputValue;
        const valueAST = (0, _astFromValue.astFromValue)(defaultValue, type);
        return valueAST ? (0, _printer.print)(valueAST) : null;
      }
    },
    isDeprecated: {
      type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
      resolve: field => field.deprecationReason != null
    },
    deprecationReason: {
      type: _scalars.GraphQLString,
      resolve: obj => obj.deprecationReason
    }
  })
});
exports.__InputValue = __InputValue;
const __EnumValue = new _definition.GraphQLObjectType({
  name: '__EnumValue',
  description: 'One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.',
  fields: () => ({
    name: {
      type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
      resolve: enumValue => enumValue.name
    },
    description: {
      type: _scalars.GraphQLString,
      resolve: enumValue => enumValue.description
    },
    isDeprecated: {
      type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
      resolve: enumValue => enumValue.deprecationReason != null
    },
    deprecationReason: {
      type: _scalars.GraphQLString,
      resolve: enumValue => enumValue.deprecationReason
    }
  })
});
exports.__EnumValue = __EnumValue;
var TypeKind;
exports.TypeKind = TypeKind;
(function (TypeKind) {
  TypeKind['SCALAR'] = 'SCALAR';
  TypeKind['OBJECT'] = 'OBJECT';
  TypeKind['INTERFACE'] = 'INTERFACE';
  TypeKind['UNION'] = 'UNION';
  TypeKind['ENUM'] = 'ENUM';
  TypeKind['INPUT_OBJECT'] = 'INPUT_OBJECT';
  TypeKind['LIST'] = 'LIST';
  TypeKind['NON_NULL'] = 'NON_NULL';
})(TypeKind || (exports.TypeKind = TypeKind = {}));
const __TypeKind = new _definition.GraphQLEnumType({
  name: '__TypeKind',
  description: 'An enum describing what kind of type a given `__Type` is.',
  values: {
    SCALAR: {
      value: TypeKind.SCALAR,
      description: 'Indicates this type is a scalar.'
    },
    OBJECT: {
      value: TypeKind.OBJECT,
      description: 'Indicates this type is an object. `fields` and `interfaces` are valid fields.'
    },
    INTERFACE: {
      value: TypeKind.INTERFACE,
      description: 'Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.'
    },
    UNION: {
      value: TypeKind.UNION,
      description: 'Indicates this type is a union. `possibleTypes` is a valid field.'
    },
    ENUM: {
      value: TypeKind.ENUM,
      description: 'Indicates this type is an enum. `enumValues` is a valid field.'
    },
    INPUT_OBJECT: {
      value: TypeKind.INPUT_OBJECT,
      description: 'Indicates this type is an input object. `inputFields` is a valid field.'
    },
    LIST: {
      value: TypeKind.LIST,
      description: 'Indicates this type is a list. `ofType` is a valid field.'
    },
    NON_NULL: {
      value: TypeKind.NON_NULL,
      description: 'Indicates this type is a non-null. `ofType` is a valid field.'
    }
  }
});
/**
 * Note that these are GraphQLField and not GraphQLFieldConfig,
 * so the format for args is different.
 */
exports.__TypeKind = __TypeKind;
const SchemaMetaFieldDef = {
  name: '__schema',
  type: new _definition.GraphQLNonNull(__Schema),
  description: 'Access the current type schema of this server.',
  args: [],
  resolve: (_source, _args, _context, _ref7) => {
    let {
      schema
    } = _ref7;
    return schema;
  },
  deprecationReason: undefined,
  extensions: Object.create(null),
  astNode: undefined
};
exports.SchemaMetaFieldDef = SchemaMetaFieldDef;
const TypeMetaFieldDef = {
  name: '__type',
  type: __Type,
  description: 'Request the type information of a single type.',
  args: [{
    name: 'name',
    description: undefined,
    type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
    defaultValue: undefined,
    deprecationReason: undefined,
    extensions: Object.create(null),
    astNode: undefined
  }],
  resolve: (_source, _ref8, _context, _ref9) => {
    let {
      name
    } = _ref8;
    let {
      schema
    } = _ref9;
    return schema.getType(name);
  },
  deprecationReason: undefined,
  extensions: Object.create(null),
  astNode: undefined
};
exports.TypeMetaFieldDef = TypeMetaFieldDef;
const TypeNameMetaFieldDef = {
  name: '__typename',
  type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
  description: 'The name of the current Object type at runtime.',
  args: [],
  resolve: (_source, _args, _context, _ref10) => {
    let {
      parentType
    } = _ref10;
    return parentType.name;
  },
  deprecationReason: undefined,
  extensions: Object.create(null),
  astNode: undefined
};
exports.TypeNameMetaFieldDef = TypeNameMetaFieldDef;
const introspectionTypes = Object.freeze([__Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind]);
exports.introspectionTypes = introspectionTypes;
function isIntrospectionType(type) {
  return introspectionTypes.some(_ref11 => {
    let {
      name
    } = _ref11;
    return type.name === name;
  });
}

/***/ }),

/***/ "../../../node_modules/graphql/type/scalars.mjs":
/*!******************************************************!*\
  !*** ../../../node_modules/graphql/type/scalars.mjs ***!
  \******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.GraphQLString = exports.GraphQLInt = exports.GraphQLID = exports.GraphQLFloat = exports.GraphQLBoolean = exports.GRAPHQL_MIN_INT = exports.GRAPHQL_MAX_INT = void 0;
exports.isSpecifiedScalarType = isSpecifiedScalarType;
exports.specifiedScalarTypes = void 0;
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
/**
 * Maximum possible Int value as per GraphQL Spec (32-bit signed integer).
 * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe up-to 2^53 - 1
 * */

const GRAPHQL_MAX_INT = 2147483647;
/**
 * Minimum possible Int value as per GraphQL Spec (32-bit signed integer).
 * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe starting at -(2^53 - 1)
 * */
exports.GRAPHQL_MAX_INT = GRAPHQL_MAX_INT;
const GRAPHQL_MIN_INT = -2147483648;
exports.GRAPHQL_MIN_INT = GRAPHQL_MIN_INT;
const GraphQLInt = new _definition.GraphQLScalarType({
  name: 'Int',
  description: 'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.',
  serialize(outputValue) {
    const coercedValue = serializeObject(outputValue);
    if (typeof coercedValue === 'boolean') {
      return coercedValue ? 1 : 0;
    }
    let num = coercedValue;
    if (typeof coercedValue === 'string' && coercedValue !== '') {
      num = Number(coercedValue);
    }
    if (typeof num !== 'number' || !Number.isInteger(num)) {
      throw new _GraphQLError.GraphQLError(`Int cannot represent non-integer value: ${(0, _inspect.inspect)(coercedValue)}`);
    }
    if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {
      throw new _GraphQLError.GraphQLError('Int cannot represent non 32-bit signed integer value: ' + (0, _inspect.inspect)(coercedValue));
    }
    return num;
  },
  parseValue(inputValue) {
    if (typeof inputValue !== 'number' || !Number.isInteger(inputValue)) {
      throw new _GraphQLError.GraphQLError(`Int cannot represent non-integer value: ${(0, _inspect.inspect)(inputValue)}`);
    }
    if (inputValue > GRAPHQL_MAX_INT || inputValue < GRAPHQL_MIN_INT) {
      throw new _GraphQLError.GraphQLError(`Int cannot represent non 32-bit signed integer value: ${inputValue}`);
    }
    return inputValue;
  },
  parseLiteral(valueNode) {
    if (valueNode.kind !== _kinds.Kind.INT) {
      throw new _GraphQLError.GraphQLError(`Int cannot represent non-integer value: ${(0, _printer.print)(valueNode)}`, {
        nodes: valueNode
      });
    }
    const num = parseInt(valueNode.value, 10);
    if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {
      throw new _GraphQLError.GraphQLError(`Int cannot represent non 32-bit signed integer value: ${valueNode.value}`, {
        nodes: valueNode
      });
    }
    return num;
  }
});
exports.GraphQLInt = GraphQLInt;
const GraphQLFloat = new _definition.GraphQLScalarType({
  name: 'Float',
  description: 'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).',
  serialize(outputValue) {
    const coercedValue = serializeObject(outputValue);
    if (typeof coercedValue === 'boolean') {
      return coercedValue ? 1 : 0;
    }
    let num = coercedValue;
    if (typeof coercedValue === 'string' && coercedValue !== '') {
      num = Number(coercedValue);
    }
    if (typeof num !== 'number' || !Number.isFinite(num)) {
      throw new _GraphQLError.GraphQLError(`Float cannot represent non numeric value: ${(0, _inspect.inspect)(coercedValue)}`);
    }
    return num;
  },
  parseValue(inputValue) {
    if (typeof inputValue !== 'number' || !Number.isFinite(inputValue)) {
      throw new _GraphQLError.GraphQLError(`Float cannot represent non numeric value: ${(0, _inspect.inspect)(inputValue)}`);
    }
    return inputValue;
  },
  parseLiteral(valueNode) {
    if (valueNode.kind !== _kinds.Kind.FLOAT && valueNode.kind !== _kinds.Kind.INT) {
      throw new _GraphQLError.GraphQLError(`Float cannot represent non numeric value: ${(0, _printer.print)(valueNode)}`, valueNode);
    }
    return parseFloat(valueNode.value);
  }
});
exports.GraphQLFloat = GraphQLFloat;
const GraphQLString = new _definition.GraphQLScalarType({
  name: 'String',
  description: 'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.',
  serialize(outputValue) {
    const coercedValue = serializeObject(outputValue); // Serialize string, boolean and number values to a string, but do not
    // attempt to coerce object, function, symbol, or other types as strings.

    if (typeof coercedValue === 'string') {
      return coercedValue;
    }
    if (typeof coercedValue === 'boolean') {
      return coercedValue ? 'true' : 'false';
    }
    if (typeof coercedValue === 'number' && Number.isFinite(coercedValue)) {
      return coercedValue.toString();
    }
    throw new _GraphQLError.GraphQLError(`String cannot represent value: ${(0, _inspect.inspect)(outputValue)}`);
  },
  parseValue(inputValue) {
    if (typeof inputValue !== 'string') {
      throw new _GraphQLError.GraphQLError(`String cannot represent a non string value: ${(0, _inspect.inspect)(inputValue)}`);
    }
    return inputValue;
  },
  parseLiteral(valueNode) {
    if (valueNode.kind !== _kinds.Kind.STRING) {
      throw new _GraphQLError.GraphQLError(`String cannot represent a non string value: ${(0, _printer.print)(valueNode)}`, {
        nodes: valueNode
      });
    }
    return valueNode.value;
  }
});
exports.GraphQLString = GraphQLString;
const GraphQLBoolean = new _definition.GraphQLScalarType({
  name: 'Boolean',
  description: 'The `Boolean` scalar type represents `true` or `false`.',
  serialize(outputValue) {
    const coercedValue = serializeObject(outputValue);
    if (typeof coercedValue === 'boolean') {
      return coercedValue;
    }
    if (Number.isFinite(coercedValue)) {
      return coercedValue !== 0;
    }
    throw new _GraphQLError.GraphQLError(`Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)(coercedValue)}`);
  },
  parseValue(inputValue) {
    if (typeof inputValue !== 'boolean') {
      throw new _GraphQLError.GraphQLError(`Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)(inputValue)}`);
    }
    return inputValue;
  },
  parseLiteral(valueNode) {
    if (valueNode.kind !== _kinds.Kind.BOOLEAN) {
      throw new _GraphQLError.GraphQLError(`Boolean cannot represent a non boolean value: ${(0, _printer.print)(valueNode)}`, {
        nodes: valueNode
      });
    }
    return valueNode.value;
  }
});
exports.GraphQLBoolean = GraphQLBoolean;
const GraphQLID = new _definition.GraphQLScalarType({
  name: 'ID',
  description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',
  serialize(outputValue) {
    const coercedValue = serializeObject(outputValue);
    if (typeof coercedValue === 'string') {
      return coercedValue;
    }
    if (Number.isInteger(coercedValue)) {
      return String(coercedValue);
    }
    throw new _GraphQLError.GraphQLError(`ID cannot represent value: ${(0, _inspect.inspect)(outputValue)}`);
  },
  parseValue(inputValue) {
    if (typeof inputValue === 'string') {
      return inputValue;
    }
    if (typeof inputValue === 'number' && Number.isInteger(inputValue)) {
      return inputValue.toString();
    }
    throw new _GraphQLError.GraphQLError(`ID cannot represent value: ${(0, _inspect.inspect)(inputValue)}`);
  },
  parseLiteral(valueNode) {
    if (valueNode.kind !== _kinds.Kind.STRING && valueNode.kind !== _kinds.Kind.INT) {
      throw new _GraphQLError.GraphQLError('ID cannot represent a non-string and non-integer value: ' + (0, _printer.print)(valueNode), {
        nodes: valueNode
      });
    }
    return valueNode.value;
  }
});
exports.GraphQLID = GraphQLID;
const specifiedScalarTypes = Object.freeze([GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean, GraphQLID]);
exports.specifiedScalarTypes = specifiedScalarTypes;
function isSpecifiedScalarType(type) {
  return specifiedScalarTypes.some(_ref => {
    let {
      name
    } = _ref;
    return type.name === name;
  });
} // Support serializing objects with custom valueOf() or toJSON() functions -
// a common way to represent a complex value which can be represented as
// a string (ex: MongoDB id objects).

function serializeObject(outputValue) {
  if ((0, _isObjectLike.isObjectLike)(outputValue)) {
    if (typeof outputValue.valueOf === 'function') {
      const valueOfResult = outputValue.valueOf();
      if (!(0, _isObjectLike.isObjectLike)(valueOfResult)) {
        return valueOfResult;
      }
    }
    if (typeof outputValue.toJSON === 'function') {
      return outputValue.toJSON();
    }
  }
  return outputValue;
}

/***/ }),

/***/ "../../../node_modules/graphql/type/schema.mjs":
/*!*****************************************************!*\
  !*** ../../../node_modules/graphql/type/schema.mjs ***!
  \*****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.GraphQLSchema = void 0;
exports.assertSchema = assertSchema;
exports.isSchema = isSchema;
var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _instanceOf = __webpack_require__(/*! ../jsutils/instanceOf.mjs */ "../../../node_modules/graphql/jsutils/instanceOf.mjs");
var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
var _toObjMap = __webpack_require__(/*! ../jsutils/toObjMap.mjs */ "../../../node_modules/graphql/jsutils/toObjMap.mjs");
var _ast = __webpack_require__(/*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _directives = __webpack_require__(/*! ./directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
var _introspection = __webpack_require__(/*! ./introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
/**
 * Test if the given value is a GraphQL schema.
 */

function isSchema(schema) {
  return (0, _instanceOf.instanceOf)(schema, GraphQLSchema);
}
function assertSchema(schema) {
  if (!isSchema(schema)) {
    throw new Error(`Expected ${(0, _inspect.inspect)(schema)} to be a GraphQL schema.`);
  }
  return schema;
}
/**
 * Custom extensions
 *
 * @remarks
 * Use a unique identifier name for your extension, for example the name of
 * your library or project. Do not use a shortened identifier as this increases
 * the risk of conflicts. We recommend you add at most one extension field,
 * an object which can contain all the values you need.
 */

/**
 * Schema Definition
 *
 * A Schema is created by supplying the root types of each type of operation,
 * query and mutation (optional). A schema definition is then supplied to the
 * validator and executor.
 *
 * Example:
 *
 * ```ts
 * const MyAppSchema = new GraphQLSchema({
 *   query: MyAppQueryRootType,
 *   mutation: MyAppMutationRootType,
 * })
 * ```
 *
 * Note: When the schema is constructed, by default only the types that are
 * reachable by traversing the root types are included, other types must be
 * explicitly referenced.
 *
 * Example:
 *
 * ```ts
 * const characterInterface = new GraphQLInterfaceType({
 *   name: 'Character',
 *   ...
 * });
 *
 * const humanType = new GraphQLObjectType({
 *   name: 'Human',
 *   interfaces: [characterInterface],
 *   ...
 * });
 *
 * const droidType = new GraphQLObjectType({
 *   name: 'Droid',
 *   interfaces: [characterInterface],
 *   ...
 * });
 *
 * const schema = new GraphQLSchema({
 *   query: new GraphQLObjectType({
 *     name: 'Query',
 *     fields: {
 *       hero: { type: characterInterface, ... },
 *     }
 *   }),
 *   ...
 *   // Since this schema references only the `Character` interface it's
 *   // necessary to explicitly list the types that implement it if
 *   // you want them to be included in the final schema.
 *   types: [humanType, droidType],
 * })
 * ```
 *
 * Note: If an array of `directives` are provided to GraphQLSchema, that will be
 * the exact list of directives represented and allowed. If `directives` is not
 * provided then a default set of the specified directives (e.g. `@include` and
 * `@skip`) will be used. If you wish to provide *additional* directives to these
 * specified directives, you must explicitly declare them. Example:
 *
 * ```ts
 * const MyAppSchema = new GraphQLSchema({
 *   ...
 *   directives: specifiedDirectives.concat([ myCustomDirective ]),
 * })
 * ```
 */
class GraphQLSchema {
  // Used as a cache for validateSchema().
  constructor(config) {
    var _config$extensionASTN, _config$directives;

    // If this schema was built from a source known to be valid, then it may be
    // marked with assumeValid to avoid an additional type system validation.
    this.__validationErrors = config.assumeValid === true ? [] : undefined; // Check for common mistakes during construction to produce early errors.

    (0, _isObjectLike.isObjectLike)(config) || (0, _devAssert.devAssert)(false, 'Must provide configuration object.');
    !config.types || Array.isArray(config.types) || (0, _devAssert.devAssert)(false, `"types" must be Array if provided but got: ${(0, _inspect.inspect)(config.types)}.`);
    !config.directives || Array.isArray(config.directives) || (0, _devAssert.devAssert)(false, '"directives" must be Array if provided but got: ' + `${(0, _inspect.inspect)(config.directives)}.`);
    this.description = config.description;
    this.extensions = (0, _toObjMap.toObjMap)(config.extensions);
    this.astNode = config.astNode;
    this.extensionASTNodes = (_config$extensionASTN = config.extensionASTNodes) !== null && _config$extensionASTN !== void 0 ? _config$extensionASTN : [];
    this._queryType = config.query;
    this._mutationType = config.mutation;
    this._subscriptionType = config.subscription; // Provide specified directives (e.g. @include and @skip) by default.

    this._directives = (_config$directives = config.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives.specifiedDirectives; // To preserve order of user-provided types, we add first to add them to
    // the set of "collected" types, so `collectReferencedTypes` ignore them.

    const allReferencedTypes = new Set(config.types);
    if (config.types != null) {
      for (const type of config.types) {
        // When we ready to process this type, we remove it from "collected" types
        // and then add it together with all dependent types in the correct position.
        allReferencedTypes.delete(type);
        collectReferencedTypes(type, allReferencedTypes);
      }
    }
    if (this._queryType != null) {
      collectReferencedTypes(this._queryType, allReferencedTypes);
    }
    if (this._mutationType != null) {
      collectReferencedTypes(this._mutationType, allReferencedTypes);
    }
    if (this._subscriptionType != null) {
      collectReferencedTypes(this._subscriptionType, allReferencedTypes);
    }
    for (const directive of this._directives) {
      // Directives are not validated until validateSchema() is called.
      if ((0, _directives.isDirective)(directive)) {
        for (const arg of directive.args) {
          collectReferencedTypes(arg.type, allReferencedTypes);
        }
      }
    }
    collectReferencedTypes(_introspection.__Schema, allReferencedTypes); // Storing the resulting map for reference by the schema.

    this._typeMap = Object.create(null);
    this._subTypeMap = Object.create(null); // Keep track of all implementations by interface name.

    this._implementationsMap = Object.create(null);
    for (const namedType of allReferencedTypes) {
      if (namedType == null) {
        continue;
      }
      const typeName = namedType.name;
      typeName || (0, _devAssert.devAssert)(false, 'One of the provided types for building the Schema is missing a name.');
      if (this._typeMap[typeName] !== undefined) {
        throw new Error(`Schema must contain uniquely named types but contains multiple types named "${typeName}".`);
      }
      this._typeMap[typeName] = namedType;
      if ((0, _definition.isInterfaceType)(namedType)) {
        // Store implementations by interface.
        for (const iface of namedType.getInterfaces()) {
          if ((0, _definition.isInterfaceType)(iface)) {
            let implementations = this._implementationsMap[iface.name];
            if (implementations === undefined) {
              implementations = this._implementationsMap[iface.name] = {
                objects: [],
                interfaces: []
              };
            }
            implementations.interfaces.push(namedType);
          }
        }
      } else if ((0, _definition.isObjectType)(namedType)) {
        // Store implementations by objects.
        for (const iface of namedType.getInterfaces()) {
          if ((0, _definition.isInterfaceType)(iface)) {
            let implementations = this._implementationsMap[iface.name];
            if (implementations === undefined) {
              implementations = this._implementationsMap[iface.name] = {
                objects: [],
                interfaces: []
              };
            }
            implementations.objects.push(namedType);
          }
        }
      }
    }
  }
  get [Symbol.toStringTag]() {
    return 'GraphQLSchema';
  }
  getQueryType() {
    return this._queryType;
  }
  getMutationType() {
    return this._mutationType;
  }
  getSubscriptionType() {
    return this._subscriptionType;
  }
  getRootType(operation) {
    switch (operation) {
      case _ast.OperationTypeNode.QUERY:
        return this.getQueryType();
      case _ast.OperationTypeNode.MUTATION:
        return this.getMutationType();
      case _ast.OperationTypeNode.SUBSCRIPTION:
        return this.getSubscriptionType();
    }
  }
  getTypeMap() {
    return this._typeMap;
  }
  getType(name) {
    return this.getTypeMap()[name];
  }
  getPossibleTypes(abstractType) {
    return (0, _definition.isUnionType)(abstractType) ? abstractType.getTypes() : this.getImplementations(abstractType).objects;
  }
  getImplementations(interfaceType) {
    const implementations = this._implementationsMap[interfaceType.name];
    return implementations !== null && implementations !== void 0 ? implementations : {
      objects: [],
      interfaces: []
    };
  }
  isSubType(abstractType, maybeSubType) {
    let map = this._subTypeMap[abstractType.name];
    if (map === undefined) {
      map = Object.create(null);
      if ((0, _definition.isUnionType)(abstractType)) {
        for (const type of abstractType.getTypes()) {
          map[type.name] = true;
        }
      } else {
        const implementations = this.getImplementations(abstractType);
        for (const type of implementations.objects) {
          map[type.name] = true;
        }
        for (const type of implementations.interfaces) {
          map[type.name] = true;
        }
      }
      this._subTypeMap[abstractType.name] = map;
    }
    return map[maybeSubType.name] !== undefined;
  }
  getDirectives() {
    return this._directives;
  }
  getDirective(name) {
    return this.getDirectives().find(directive => directive.name === name);
  }
  toConfig() {
    return {
      description: this.description,
      query: this.getQueryType(),
      mutation: this.getMutationType(),
      subscription: this.getSubscriptionType(),
      types: Object.values(this.getTypeMap()),
      directives: this.getDirectives(),
      extensions: this.extensions,
      astNode: this.astNode,
      extensionASTNodes: this.extensionASTNodes,
      assumeValid: this.__validationErrors !== undefined
    };
  }
}
exports.GraphQLSchema = GraphQLSchema;
function collectReferencedTypes(type, typeSet) {
  const namedType = (0, _definition.getNamedType)(type);
  if (!typeSet.has(namedType)) {
    typeSet.add(namedType);
    if ((0, _definition.isUnionType)(namedType)) {
      for (const memberType of namedType.getTypes()) {
        collectReferencedTypes(memberType, typeSet);
      }
    } else if ((0, _definition.isObjectType)(namedType) || (0, _definition.isInterfaceType)(namedType)) {
      for (const interfaceType of namedType.getInterfaces()) {
        collectReferencedTypes(interfaceType, typeSet);
      }
      for (const field of Object.values(namedType.getFields())) {
        collectReferencedTypes(field.type, typeSet);
        for (const arg of field.args) {
          collectReferencedTypes(arg.type, typeSet);
        }
      }
    } else if ((0, _definition.isInputObjectType)(namedType)) {
      for (const field of Object.values(namedType.getFields())) {
        collectReferencedTypes(field.type, typeSet);
      }
    }
  }
  return typeSet;
}

/***/ }),

/***/ "../../../node_modules/graphql/type/validate.mjs":
/*!*******************************************************!*\
  !*** ../../../node_modules/graphql/type/validate.mjs ***!
  \*******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.assertValidSchema = assertValidSchema;
exports.validateSchema = validateSchema;
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _ast = __webpack_require__(/*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
var _typeComparators = __webpack_require__(/*! ../utilities/typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs");
var _definition = __webpack_require__(/*! ./definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _directives = __webpack_require__(/*! ./directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
var _introspection = __webpack_require__(/*! ./introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
var _schema = __webpack_require__(/*! ./schema.mjs */ "../../../node_modules/graphql/type/schema.mjs");
/**
 * Implements the "Type Validation" sub-sections of the specification's
 * "Type System" section.
 *
 * Validation runs synchronously, returning an array of encountered errors, or
 * an empty array if no errors were encountered and the Schema is valid.
 */

function validateSchema(schema) {
  // First check to ensure the provided value is in fact a GraphQLSchema.
  (0, _schema.assertSchema)(schema); // If this Schema has already been validated, return the previous results.

  if (schema.__validationErrors) {
    return schema.__validationErrors;
  } // Validate the schema, producing a list of errors.

  const context = new SchemaValidationContext(schema);
  validateRootTypes(context);
  validateDirectives(context);
  validateTypes(context); // Persist the results of validation before returning to ensure validation
  // does not run multiple times for this schema.

  const errors = context.getErrors();
  schema.__validationErrors = errors;
  return errors;
}
/**
 * Utility function which asserts a schema is valid by throwing an error if
 * it is invalid.
 */

function assertValidSchema(schema) {
  const errors = validateSchema(schema);
  if (errors.length !== 0) {
    throw new Error(errors.map(error => error.message).join('\n\n'));
  }
}
class SchemaValidationContext {
  constructor(schema) {
    this._errors = [];
    this.schema = schema;
  }
  reportError(message, nodes) {
    const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes;
    this._errors.push(new _GraphQLError.GraphQLError(message, {
      nodes: _nodes
    }));
  }
  getErrors() {
    return this._errors;
  }
}
function validateRootTypes(context) {
  const schema = context.schema;
  const queryType = schema.getQueryType();
  if (!queryType) {
    context.reportError('Query root type must be provided.', schema.astNode);
  } else if (!(0, _definition.isObjectType)(queryType)) {
    var _getOperationTypeNode;
    context.reportError(`Query root type must be Object type, it cannot be ${(0, _inspect.inspect)(queryType)}.`, (_getOperationTypeNode = getOperationTypeNode(schema, _ast.OperationTypeNode.QUERY)) !== null && _getOperationTypeNode !== void 0 ? _getOperationTypeNode : queryType.astNode);
  }
  const mutationType = schema.getMutationType();
  if (mutationType && !(0, _definition.isObjectType)(mutationType)) {
    var _getOperationTypeNode2;
    context.reportError('Mutation root type must be Object type if provided, it cannot be ' + `${(0, _inspect.inspect)(mutationType)}.`, (_getOperationTypeNode2 = getOperationTypeNode(schema, _ast.OperationTypeNode.MUTATION)) !== null && _getOperationTypeNode2 !== void 0 ? _getOperationTypeNode2 : mutationType.astNode);
  }
  const subscriptionType = schema.getSubscriptionType();
  if (subscriptionType && !(0, _definition.isObjectType)(subscriptionType)) {
    var _getOperationTypeNode3;
    context.reportError('Subscription root type must be Object type if provided, it cannot be ' + `${(0, _inspect.inspect)(subscriptionType)}.`, (_getOperationTypeNode3 = getOperationTypeNode(schema, _ast.OperationTypeNode.SUBSCRIPTION)) !== null && _getOperationTypeNode3 !== void 0 ? _getOperationTypeNode3 : subscriptionType.astNode);
  }
}
function getOperationTypeNode(schema, operation) {
  var _flatMap$find;
  return (_flatMap$find = [schema.astNode, ...schema.extensionASTNodes].flatMap(
  // FIXME: https://github.com/graphql/graphql-js/issues/2203
  schemaNode => {
    var _schemaNode$operation;
    return (/* c8 ignore next */
      (_schemaNode$operation = schemaNode === null || schemaNode === void 0 ? void 0 : schemaNode.operationTypes) !== null && _schemaNode$operation !== void 0 ? _schemaNode$operation : []
    );
  }).find(operationNode => operationNode.operation === operation)) === null || _flatMap$find === void 0 ? void 0 : _flatMap$find.type;
}
function validateDirectives(context) {
  for (const directive of context.schema.getDirectives()) {
    // Ensure all directives are in fact GraphQL directives.
    if (!(0, _directives.isDirective)(directive)) {
      context.reportError(`Expected directive but got: ${(0, _inspect.inspect)(directive)}.`, directive === null || directive === void 0 ? void 0 : directive.astNode);
      continue;
    } // Ensure they are named correctly.

    validateName(context, directive); // TODO: Ensure proper locations.
    // Ensure the arguments are valid.

    for (const arg of directive.args) {
      // Ensure they are named correctly.
      validateName(context, arg); // Ensure the type is an input type.

      if (!(0, _definition.isInputType)(arg.type)) {
        context.reportError(`The type of @${directive.name}(${arg.name}:) must be Input Type ` + `but got: ${(0, _inspect.inspect)(arg.type)}.`, arg.astNode);
      }
      if ((0, _definition.isRequiredArgument)(arg) && arg.deprecationReason != null) {
        var _arg$astNode;
        context.reportError(`Required argument @${directive.name}(${arg.name}:) cannot be deprecated.`, [getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode = arg.astNode) === null || _arg$astNode === void 0 ? void 0 : _arg$astNode.type]);
      }
    }
  }
}
function validateName(context, node) {
  // Ensure names are valid, however introspection types opt out.
  if (node.name.startsWith('__')) {
    context.reportError(`Name "${node.name}" must not begin with "__", which is reserved by GraphQL introspection.`, node.astNode);
  }
}
function validateTypes(context) {
  const validateInputObjectCircularRefs = createInputObjectCircularRefsValidator(context);
  const typeMap = context.schema.getTypeMap();
  for (const type of Object.values(typeMap)) {
    // Ensure all provided types are in fact GraphQL type.
    if (!(0, _definition.isNamedType)(type)) {
      context.reportError(`Expected GraphQL named type but got: ${(0, _inspect.inspect)(type)}.`, type.astNode);
      continue;
    } // Ensure it is named correctly (excluding introspection types).

    if (!(0, _introspection.isIntrospectionType)(type)) {
      validateName(context, type);
    }
    if ((0, _definition.isObjectType)(type)) {
      // Ensure fields are valid
      validateFields(context, type); // Ensure objects implement the interfaces they claim to.

      validateInterfaces(context, type);
    } else if ((0, _definition.isInterfaceType)(type)) {
      // Ensure fields are valid.
      validateFields(context, type); // Ensure interfaces implement the interfaces they claim to.

      validateInterfaces(context, type);
    } else if ((0, _definition.isUnionType)(type)) {
      // Ensure Unions include valid member types.
      validateUnionMembers(context, type);
    } else if ((0, _definition.isEnumType)(type)) {
      // Ensure Enums have valid values.
      validateEnumValues(context, type);
    } else if ((0, _definition.isInputObjectType)(type)) {
      // Ensure Input Object fields are valid.
      validateInputFields(context, type); // Ensure Input Objects do not contain non-nullable circular references

      validateInputObjectCircularRefs(type);
    }
  }
}
function validateFields(context, type) {
  const fields = Object.values(type.getFields()); // Objects and Interfaces both must define one or more fields.

  if (fields.length === 0) {
    context.reportError(`Type ${type.name} must define one or more fields.`, [type.astNode, ...type.extensionASTNodes]);
  }
  for (const field of fields) {
    // Ensure they are named correctly.
    validateName(context, field); // Ensure the type is an output type

    if (!(0, _definition.isOutputType)(field.type)) {
      var _field$astNode;
      context.reportError(`The type of ${type.name}.${field.name} must be Output Type ` + `but got: ${(0, _inspect.inspect)(field.type)}.`, (_field$astNode = field.astNode) === null || _field$astNode === void 0 ? void 0 : _field$astNode.type);
    } // Ensure the arguments are valid

    for (const arg of field.args) {
      const argName = arg.name; // Ensure they are named correctly.

      validateName(context, arg); // Ensure the type is an input type

      if (!(0, _definition.isInputType)(arg.type)) {
        var _arg$astNode2;
        context.reportError(`The type of ${type.name}.${field.name}(${argName}:) must be Input ` + `Type but got: ${(0, _inspect.inspect)(arg.type)}.`, (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0 ? void 0 : _arg$astNode2.type);
      }
      if ((0, _definition.isRequiredArgument)(arg) && arg.deprecationReason != null) {
        var _arg$astNode3;
        context.reportError(`Required argument ${type.name}.${field.name}(${argName}:) cannot be deprecated.`, [getDeprecatedDirectiveNode(arg.astNode), (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0 ? void 0 : _arg$astNode3.type]);
      }
    }
  }
}
function validateInterfaces(context, type) {
  const ifaceTypeNames = Object.create(null);
  for (const iface of type.getInterfaces()) {
    if (!(0, _definition.isInterfaceType)(iface)) {
      context.reportError(`Type ${(0, _inspect.inspect)(type)} must only implement Interface types, ` + `it cannot implement ${(0, _inspect.inspect)(iface)}.`, getAllImplementsInterfaceNodes(type, iface));
      continue;
    }
    if (type === iface) {
      context.reportError(`Type ${type.name} cannot implement itself because it would create a circular reference.`, getAllImplementsInterfaceNodes(type, iface));
      continue;
    }
    if (ifaceTypeNames[iface.name]) {
      context.reportError(`Type ${type.name} can only implement ${iface.name} once.`, getAllImplementsInterfaceNodes(type, iface));
      continue;
    }
    ifaceTypeNames[iface.name] = true;
    validateTypeImplementsAncestors(context, type, iface);
    validateTypeImplementsInterface(context, type, iface);
  }
}
function validateTypeImplementsInterface(context, type, iface) {
  const typeFieldMap = type.getFields(); // Assert each interface field is implemented.

  for (const ifaceField of Object.values(iface.getFields())) {
    const fieldName = ifaceField.name;
    const typeField = typeFieldMap[fieldName]; // Assert interface field exists on type.

    if (!typeField) {
      context.reportError(`Interface field ${iface.name}.${fieldName} expected but ${type.name} does not provide it.`, [ifaceField.astNode, type.astNode, ...type.extensionASTNodes]);
      continue;
    } // Assert interface field type is satisfied by type field type, by being
    // a valid subtype. (covariant)

    if (!(0, _typeComparators.isTypeSubTypeOf)(context.schema, typeField.type, ifaceField.type)) {
      var _ifaceField$astNode, _typeField$astNode;
      context.reportError(`Interface field ${iface.name}.${fieldName} expects type ` + `${(0, _inspect.inspect)(ifaceField.type)} but ${type.name}.${fieldName} ` + `is type ${(0, _inspect.inspect)(typeField.type)}.`, [(_ifaceField$astNode = ifaceField.astNode) === null || _ifaceField$astNode === void 0 ? void 0 : _ifaceField$astNode.type, (_typeField$astNode = typeField.astNode) === null || _typeField$astNode === void 0 ? void 0 : _typeField$astNode.type]);
    } // Assert each interface field arg is implemented.

    for (const ifaceArg of ifaceField.args) {
      const argName = ifaceArg.name;
      const typeArg = typeField.args.find(arg => arg.name === argName); // Assert interface field arg exists on object field.

      if (!typeArg) {
        context.reportError(`Interface field argument ${iface.name}.${fieldName}(${argName}:) expected but ${type.name}.${fieldName} does not provide it.`, [ifaceArg.astNode, typeField.astNode]);
        continue;
      } // Assert interface field arg type matches object field arg type.
      // (invariant)
      // TODO: change to contravariant?

      if (!(0, _typeComparators.isEqualType)(ifaceArg.type, typeArg.type)) {
        var _ifaceArg$astNode, _typeArg$astNode;
        context.reportError(`Interface field argument ${iface.name}.${fieldName}(${argName}:) ` + `expects type ${(0, _inspect.inspect)(ifaceArg.type)} but ` + `${type.name}.${fieldName}(${argName}:) is type ` + `${(0, _inspect.inspect)(typeArg.type)}.`, [(_ifaceArg$astNode = ifaceArg.astNode) === null || _ifaceArg$astNode === void 0 ? void 0 : _ifaceArg$astNode.type, (_typeArg$astNode = typeArg.astNode) === null || _typeArg$astNode === void 0 ? void 0 : _typeArg$astNode.type]);
      } // TODO: validate default values?
    } // Assert additional arguments must not be required.

    for (const typeArg of typeField.args) {
      const argName = typeArg.name;
      const ifaceArg = ifaceField.args.find(arg => arg.name === argName);
      if (!ifaceArg && (0, _definition.isRequiredArgument)(typeArg)) {
        context.reportError(`Object field ${type.name}.${fieldName} includes required argument ${argName} that is missing from the Interface field ${iface.name}.${fieldName}.`, [typeArg.astNode, ifaceField.astNode]);
      }
    }
  }
}
function validateTypeImplementsAncestors(context, type, iface) {
  const ifaceInterfaces = type.getInterfaces();
  for (const transitive of iface.getInterfaces()) {
    if (!ifaceInterfaces.includes(transitive)) {
      context.reportError(transitive === type ? `Type ${type.name} cannot implement ${iface.name} because it would create a circular reference.` : `Type ${type.name} must implement ${transitive.name} because it is implemented by ${iface.name}.`, [...getAllImplementsInterfaceNodes(iface, transitive), ...getAllImplementsInterfaceNodes(type, iface)]);
    }
  }
}
function validateUnionMembers(context, union) {
  const memberTypes = union.getTypes();
  if (memberTypes.length === 0) {
    context.reportError(`Union type ${union.name} must define one or more member types.`, [union.astNode, ...union.extensionASTNodes]);
  }
  const includedTypeNames = Object.create(null);
  for (const memberType of memberTypes) {
    if (includedTypeNames[memberType.name]) {
      context.reportError(`Union type ${union.name} can only include type ${memberType.name} once.`, getUnionMemberTypeNodes(union, memberType.name));
      continue;
    }
    includedTypeNames[memberType.name] = true;
    if (!(0, _definition.isObjectType)(memberType)) {
      context.reportError(`Union type ${union.name} can only include Object types, ` + `it cannot include ${(0, _inspect.inspect)(memberType)}.`, getUnionMemberTypeNodes(union, String(memberType)));
    }
  }
}
function validateEnumValues(context, enumType) {
  const enumValues = enumType.getValues();
  if (enumValues.length === 0) {
    context.reportError(`Enum type ${enumType.name} must define one or more values.`, [enumType.astNode, ...enumType.extensionASTNodes]);
  }
  for (const enumValue of enumValues) {
    // Ensure valid name.
    validateName(context, enumValue);
  }
}
function validateInputFields(context, inputObj) {
  const fields = Object.values(inputObj.getFields());
  if (fields.length === 0) {
    context.reportError(`Input Object type ${inputObj.name} must define one or more fields.`, [inputObj.astNode, ...inputObj.extensionASTNodes]);
  } // Ensure the arguments are valid

  for (const field of fields) {
    // Ensure they are named correctly.
    validateName(context, field); // Ensure the type is an input type

    if (!(0, _definition.isInputType)(field.type)) {
      var _field$astNode2;
      context.reportError(`The type of ${inputObj.name}.${field.name} must be Input Type ` + `but got: ${(0, _inspect.inspect)(field.type)}.`, (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0 ? void 0 : _field$astNode2.type);
    }
    if ((0, _definition.isRequiredInputField)(field) && field.deprecationReason != null) {
      var _field$astNode3;
      context.reportError(`Required input field ${inputObj.name}.${field.name} cannot be deprecated.`, [getDeprecatedDirectiveNode(field.astNode), (_field$astNode3 = field.astNode) === null || _field$astNode3 === void 0 ? void 0 : _field$astNode3.type]);
    }
  }
}
function createInputObjectCircularRefsValidator(context) {
  // Modified copy of algorithm from 'src/validation/rules/NoFragmentCycles.js'.
  // Tracks already visited types to maintain O(N) and to ensure that cycles
  // are not redundantly reported.
  const visitedTypes = Object.create(null); // Array of types nodes used to produce meaningful errors

  const fieldPath = []; // Position in the type path

  const fieldPathIndexByTypeName = Object.create(null);
  return detectCycleRecursive; // This does a straight-forward DFS to find cycles.
  // It does not terminate when a cycle was found but continues to explore
  // the graph to find all possible cycles.

  function detectCycleRecursive(inputObj) {
    if (visitedTypes[inputObj.name]) {
      return;
    }
    visitedTypes[inputObj.name] = true;
    fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;
    const fields = Object.values(inputObj.getFields());
    for (const field of fields) {
      if ((0, _definition.isNonNullType)(field.type) && (0, _definition.isInputObjectType)(field.type.ofType)) {
        const fieldType = field.type.ofType;
        const cycleIndex = fieldPathIndexByTypeName[fieldType.name];
        fieldPath.push(field);
        if (cycleIndex === undefined) {
          detectCycleRecursive(fieldType);
        } else {
          const cyclePath = fieldPath.slice(cycleIndex);
          const pathStr = cyclePath.map(fieldObj => fieldObj.name).join('.');
          context.reportError(`Cannot reference Input Object "${fieldType.name}" within itself through a series of non-null fields: "${pathStr}".`, cyclePath.map(fieldObj => fieldObj.astNode));
        }
        fieldPath.pop();
      }
    }
    fieldPathIndexByTypeName[inputObj.name] = undefined;
  }
}
function getAllImplementsInterfaceNodes(type, iface) {
  const {
    astNode,
    extensionASTNodes
  } = type;
  const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203

  return nodes.flatMap(typeNode => {
    var _typeNode$interfaces;
    return (/* c8 ignore next */
      (_typeNode$interfaces = typeNode.interfaces) !== null && _typeNode$interfaces !== void 0 ? _typeNode$interfaces : []
    );
  }).filter(ifaceNode => ifaceNode.name.value === iface.name);
}
function getUnionMemberTypeNodes(union, typeName) {
  const {
    astNode,
    extensionASTNodes
  } = union;
  const nodes = astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203

  return nodes.flatMap(unionNode => {
    var _unionNode$types;
    return (/* c8 ignore next */
      (_unionNode$types = unionNode.types) !== null && _unionNode$types !== void 0 ? _unionNode$types : []
    );
  }).filter(typeNode => typeNode.name.value === typeName);
}
function getDeprecatedDirectiveNode(definitionNode) {
  var _definitionNode$direc;
  return definitionNode === null || definitionNode === void 0 ? void 0 : (_definitionNode$direc = definitionNode.directives) === null || _definitionNode$direc === void 0 ? void 0 : _definitionNode$direc.find(node => node.name.value === _directives.GraphQLDeprecatedDirective.name);
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/TypeInfo.mjs":
/*!************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/TypeInfo.mjs ***!
  \************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.TypeInfo = void 0;
exports.visitWithTypeInfo = visitWithTypeInfo;
var _ast = __webpack_require__(/*! ../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _visitor = __webpack_require__(/*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs");
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
var _typeFromAST = __webpack_require__(/*! ./typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
/**
 * TypeInfo is a utility class which, given a GraphQL schema, can keep track
 * of the current field and type definitions at any point in a GraphQL document
 * AST during a recursive descent by calling `enter(node)` and `leave(node)`.
 */

class TypeInfo {
  constructor(schema,
  /**
   * Initial type may be provided in rare cases to facilitate traversals
   *  beginning somewhere other than documents.
   */
  initialType, /** @deprecated will be removed in 17.0.0 */
  getFieldDefFn) {
    this._schema = schema;
    this._typeStack = [];
    this._parentTypeStack = [];
    this._inputTypeStack = [];
    this._fieldDefStack = [];
    this._defaultValueStack = [];
    this._directive = null;
    this._argument = null;
    this._enumValue = null;
    this._getFieldDef = getFieldDefFn !== null && getFieldDefFn !== void 0 ? getFieldDefFn : getFieldDef;
    if (initialType) {
      if ((0, _definition.isInputType)(initialType)) {
        this._inputTypeStack.push(initialType);
      }
      if ((0, _definition.isCompositeType)(initialType)) {
        this._parentTypeStack.push(initialType);
      }
      if ((0, _definition.isOutputType)(initialType)) {
        this._typeStack.push(initialType);
      }
    }
  }
  get [Symbol.toStringTag]() {
    return 'TypeInfo';
  }
  getType() {
    if (this._typeStack.length > 0) {
      return this._typeStack[this._typeStack.length - 1];
    }
  }
  getParentType() {
    if (this._parentTypeStack.length > 0) {
      return this._parentTypeStack[this._parentTypeStack.length - 1];
    }
  }
  getInputType() {
    if (this._inputTypeStack.length > 0) {
      return this._inputTypeStack[this._inputTypeStack.length - 1];
    }
  }
  getParentInputType() {
    if (this._inputTypeStack.length > 1) {
      return this._inputTypeStack[this._inputTypeStack.length - 2];
    }
  }
  getFieldDef() {
    if (this._fieldDefStack.length > 0) {
      return this._fieldDefStack[this._fieldDefStack.length - 1];
    }
  }
  getDefaultValue() {
    if (this._defaultValueStack.length > 0) {
      return this._defaultValueStack[this._defaultValueStack.length - 1];
    }
  }
  getDirective() {
    return this._directive;
  }
  getArgument() {
    return this._argument;
  }
  getEnumValue() {
    return this._enumValue;
  }
  enter(node) {
    const schema = this._schema; // Note: many of the types below are explicitly typed as "unknown" to drop
    // any assumptions of a valid schema to ensure runtime types are properly
    // checked before continuing since TypeInfo is used as part of validation
    // which occurs before guarantees of schema and document validity.

    switch (node.kind) {
      case _kinds.Kind.SELECTION_SET:
        {
          const namedType = (0, _definition.getNamedType)(this.getType());
          this._parentTypeStack.push((0, _definition.isCompositeType)(namedType) ? namedType : undefined);
          break;
        }
      case _kinds.Kind.FIELD:
        {
          const parentType = this.getParentType();
          let fieldDef;
          let fieldType;
          if (parentType) {
            fieldDef = this._getFieldDef(schema, parentType, node);
            if (fieldDef) {
              fieldType = fieldDef.type;
            }
          }
          this._fieldDefStack.push(fieldDef);
          this._typeStack.push((0, _definition.isOutputType)(fieldType) ? fieldType : undefined);
          break;
        }
      case _kinds.Kind.DIRECTIVE:
        this._directive = schema.getDirective(node.name.value);
        break;
      case _kinds.Kind.OPERATION_DEFINITION:
        {
          const rootType = schema.getRootType(node.operation);
          this._typeStack.push((0, _definition.isObjectType)(rootType) ? rootType : undefined);
          break;
        }
      case _kinds.Kind.INLINE_FRAGMENT:
      case _kinds.Kind.FRAGMENT_DEFINITION:
        {
          const typeConditionAST = node.typeCondition;
          const outputType = typeConditionAST ? (0, _typeFromAST.typeFromAST)(schema, typeConditionAST) : (0, _definition.getNamedType)(this.getType());
          this._typeStack.push((0, _definition.isOutputType)(outputType) ? outputType : undefined);
          break;
        }
      case _kinds.Kind.VARIABLE_DEFINITION:
        {
          const inputType = (0, _typeFromAST.typeFromAST)(schema, node.type);
          this._inputTypeStack.push((0, _definition.isInputType)(inputType) ? inputType : undefined);
          break;
        }
      case _kinds.Kind.ARGUMENT:
        {
          var _this$getDirective;
          let argDef;
          let argType;
          const fieldOrDirective = (_this$getDirective = this.getDirective()) !== null && _this$getDirective !== void 0 ? _this$getDirective : this.getFieldDef();
          if (fieldOrDirective) {
            argDef = fieldOrDirective.args.find(arg => arg.name === node.name.value);
            if (argDef) {
              argType = argDef.type;
            }
          }
          this._argument = argDef;
          this._defaultValueStack.push(argDef ? argDef.defaultValue : undefined);
          this._inputTypeStack.push((0, _definition.isInputType)(argType) ? argType : undefined);
          break;
        }
      case _kinds.Kind.LIST:
        {
          const listType = (0, _definition.getNullableType)(this.getInputType());
          const itemType = (0, _definition.isListType)(listType) ? listType.ofType : listType; // List positions never have a default value.

          this._defaultValueStack.push(undefined);
          this._inputTypeStack.push((0, _definition.isInputType)(itemType) ? itemType : undefined);
          break;
        }
      case _kinds.Kind.OBJECT_FIELD:
        {
          const objectType = (0, _definition.getNamedType)(this.getInputType());
          let inputFieldType;
          let inputField;
          if ((0, _definition.isInputObjectType)(objectType)) {
            inputField = objectType.getFields()[node.name.value];
            if (inputField) {
              inputFieldType = inputField.type;
            }
          }
          this._defaultValueStack.push(inputField ? inputField.defaultValue : undefined);
          this._inputTypeStack.push((0, _definition.isInputType)(inputFieldType) ? inputFieldType : undefined);
          break;
        }
      case _kinds.Kind.ENUM:
        {
          const enumType = (0, _definition.getNamedType)(this.getInputType());
          let enumValue;
          if ((0, _definition.isEnumType)(enumType)) {
            enumValue = enumType.getValue(node.value);
          }
          this._enumValue = enumValue;
          break;
        }
      default: // Ignore other nodes
    }
  }

  leave(node) {
    switch (node.kind) {
      case _kinds.Kind.SELECTION_SET:
        this._parentTypeStack.pop();
        break;
      case _kinds.Kind.FIELD:
        this._fieldDefStack.pop();
        this._typeStack.pop();
        break;
      case _kinds.Kind.DIRECTIVE:
        this._directive = null;
        break;
      case _kinds.Kind.OPERATION_DEFINITION:
      case _kinds.Kind.INLINE_FRAGMENT:
      case _kinds.Kind.FRAGMENT_DEFINITION:
        this._typeStack.pop();
        break;
      case _kinds.Kind.VARIABLE_DEFINITION:
        this._inputTypeStack.pop();
        break;
      case _kinds.Kind.ARGUMENT:
        this._argument = null;
        this._defaultValueStack.pop();
        this._inputTypeStack.pop();
        break;
      case _kinds.Kind.LIST:
      case _kinds.Kind.OBJECT_FIELD:
        this._defaultValueStack.pop();
        this._inputTypeStack.pop();
        break;
      case _kinds.Kind.ENUM:
        this._enumValue = null;
        break;
      default: // Ignore other nodes
    }
  }
}

/**
 * Not exactly the same as the executor's definition of getFieldDef, in this
 * statically evaluated environment we do not always have an Object type,
 * and need to handle Interface and Union types.
 */
exports.TypeInfo = TypeInfo;
function getFieldDef(schema, parentType, fieldNode) {
  const name = fieldNode.name.value;
  if (name === _introspection.SchemaMetaFieldDef.name && schema.getQueryType() === parentType) {
    return _introspection.SchemaMetaFieldDef;
  }
  if (name === _introspection.TypeMetaFieldDef.name && schema.getQueryType() === parentType) {
    return _introspection.TypeMetaFieldDef;
  }
  if (name === _introspection.TypeNameMetaFieldDef.name && (0, _definition.isCompositeType)(parentType)) {
    return _introspection.TypeNameMetaFieldDef;
  }
  if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) {
    return parentType.getFields()[name];
  }
}
/**
 * Creates a new visitor instance which maintains a provided TypeInfo instance
 * along with visiting visitor.
 */

function visitWithTypeInfo(typeInfo, visitor) {
  return {
    enter() {
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      const node = args[0];
      typeInfo.enter(node);
      const fn = (0, _visitor.getEnterLeaveForKind)(visitor, node.kind).enter;
      if (fn) {
        const result = fn.apply(visitor, args);
        if (result !== undefined) {
          typeInfo.leave(node);
          if ((0, _ast.isNode)(result)) {
            typeInfo.enter(result);
          }
        }
        return result;
      }
    },
    leave() {
      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }
      const node = args[0];
      const fn = (0, _visitor.getEnterLeaveForKind)(visitor, node.kind).leave;
      let result;
      if (fn) {
        result = fn.apply(visitor, args);
      }
      typeInfo.leave(node);
      return result;
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/assertValidName.mjs":
/*!*******************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/assertValidName.mjs ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.assertValidName = assertValidName;
exports.isValidNameError = isValidNameError;
var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _assertName = __webpack_require__(/*! ../type/assertName.mjs */ "../../../node_modules/graphql/type/assertName.mjs");
/* c8 ignore start */

/**
 * Upholds the spec rules about naming.
 * @deprecated Please use `assertName` instead. Will be removed in v17
 */

function assertValidName(name) {
  const error = isValidNameError(name);
  if (error) {
    throw error;
  }
  return name;
}
/**
 * Returns an Error if a name is invalid.
 * @deprecated Please use `assertName` instead. Will be removed in v17
 */

function isValidNameError(name) {
  typeof name === 'string' || (0, _devAssert.devAssert)(false, 'Expected name to be a string.');
  if (name.startsWith('__')) {
    return new _GraphQLError.GraphQLError(`Name "${name}" must not begin with "__", which is reserved by GraphQL introspection.`);
  }
  try {
    (0, _assertName.assertName)(name);
  } catch (error) {
    return error;
  }
}
/* c8 ignore stop */

/***/ }),

/***/ "../../../node_modules/graphql/utilities/astFromValue.mjs":
/*!****************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/astFromValue.mjs ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.astFromValue = astFromValue;
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _isIterableObject = __webpack_require__(/*! ../jsutils/isIterableObject.mjs */ "../../../node_modules/graphql/jsutils/isIterableObject.mjs");
var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
/**
 * Produces a GraphQL Value AST given a JavaScript object.
 * Function will match JavaScript/JSON values to GraphQL AST schema format
 * by using suggested GraphQLInputType. For example:
 *
 *     astFromValue("value", GraphQLString)
 *
 * A GraphQL type must be provided, which will be used to interpret different
 * JavaScript values.
 *
 * | JSON Value    | GraphQL Value        |
 * | ------------- | -------------------- |
 * | Object        | Input Object         |
 * | Array         | List                 |
 * | Boolean       | Boolean              |
 * | String        | String / Enum Value  |
 * | Number        | Int / Float          |
 * | Unknown       | Enum Value           |
 * | null          | NullValue            |
 *
 */

function astFromValue(value, type) {
  if ((0, _definition.isNonNullType)(type)) {
    const astValue = astFromValue(value, type.ofType);
    if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === _kinds.Kind.NULL) {
      return null;
    }
    return astValue;
  } // only explicit null, not undefined, NaN

  if (value === null) {
    return {
      kind: _kinds.Kind.NULL
    };
  } // undefined

  if (value === undefined) {
    return null;
  } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but
  // the value is not an array, convert the value using the list's item type.

  if ((0, _definition.isListType)(type)) {
    const itemType = type.ofType;
    if ((0, _isIterableObject.isIterableObject)(value)) {
      const valuesNodes = [];
      for (const item of value) {
        const itemNode = astFromValue(item, itemType);
        if (itemNode != null) {
          valuesNodes.push(itemNode);
        }
      }
      return {
        kind: _kinds.Kind.LIST,
        values: valuesNodes
      };
    }
    return astFromValue(value, itemType);
  } // Populate the fields of the input object by creating ASTs from each value
  // in the JavaScript object according to the fields in the input type.

  if ((0, _definition.isInputObjectType)(type)) {
    if (!(0, _isObjectLike.isObjectLike)(value)) {
      return null;
    }
    const fieldNodes = [];
    for (const field of Object.values(type.getFields())) {
      const fieldValue = astFromValue(value[field.name], field.type);
      if (fieldValue) {
        fieldNodes.push({
          kind: _kinds.Kind.OBJECT_FIELD,
          name: {
            kind: _kinds.Kind.NAME,
            value: field.name
          },
          value: fieldValue
        });
      }
    }
    return {
      kind: _kinds.Kind.OBJECT,
      fields: fieldNodes
    };
  }
  if ((0, _definition.isLeafType)(type)) {
    // Since value is an internally represented value, it must be serialized
    // to an externally represented value before converting into an AST.
    const serialized = type.serialize(value);
    if (serialized == null) {
      return null;
    } // Others serialize based on their corresponding JavaScript scalar types.

    if (typeof serialized === 'boolean') {
      return {
        kind: _kinds.Kind.BOOLEAN,
        value: serialized
      };
    } // JavaScript numbers can be Int or Float values.

    if (typeof serialized === 'number' && Number.isFinite(serialized)) {
      const stringNum = String(serialized);
      return integerStringRegExp.test(stringNum) ? {
        kind: _kinds.Kind.INT,
        value: stringNum
      } : {
        kind: _kinds.Kind.FLOAT,
        value: stringNum
      };
    }
    if (typeof serialized === 'string') {
      // Enum types use Enum literals.
      if ((0, _definition.isEnumType)(type)) {
        return {
          kind: _kinds.Kind.ENUM,
          value: serialized
        };
      } // ID types can use Int literals.

      if (type === _scalars.GraphQLID && integerStringRegExp.test(serialized)) {
        return {
          kind: _kinds.Kind.INT,
          value: serialized
        };
      }
      return {
        kind: _kinds.Kind.STRING,
        value: serialized
      };
    }
    throw new TypeError(`Cannot convert value to AST: ${(0, _inspect.inspect)(serialized)}.`);
  }
  /* c8 ignore next 3 */
  // Not reachable, all possible types have been considered.

   false || (0, _invariant.invariant)(false, 'Unexpected input type: ' + (0, _inspect.inspect)(type));
}
/**
 * IntValue:
 *   - NegativeSign? 0
 *   - NegativeSign? NonZeroDigit ( Digit+ )?
 */

const integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/;

/***/ }),

/***/ "../../../node_modules/graphql/utilities/buildASTSchema.mjs":
/*!******************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/buildASTSchema.mjs ***!
  \******************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.buildASTSchema = buildASTSchema;
exports.buildSchema = buildSchema;
var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _parser = __webpack_require__(/*! ../language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs");
var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
var _schema = __webpack_require__(/*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs");
var _validate = __webpack_require__(/*! ../validation/validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs");
var _extendSchema = __webpack_require__(/*! ./extendSchema.mjs */ "../../../node_modules/graphql/utilities/extendSchema.mjs");
/**
 * This takes the ast of a schema document produced by the parse function in
 * src/language/parser.js.
 *
 * If no schema definition is provided, then it will look for types named Query,
 * Mutation and Subscription.
 *
 * Given that AST it constructs a GraphQLSchema. The resulting schema
 * has no resolve methods, so execution will use default resolvers.
 */
function buildASTSchema(documentAST, options) {
  documentAST != null && documentAST.kind === _kinds.Kind.DOCUMENT || (0, _devAssert.devAssert)(false, 'Must provide valid Document AST.');
  if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) {
    (0, _validate.assertValidSDL)(documentAST);
  }
  const emptySchemaConfig = {
    description: undefined,
    types: [],
    directives: [],
    extensions: Object.create(null),
    extensionASTNodes: [],
    assumeValid: false
  };
  const config = (0, _extendSchema.extendSchemaImpl)(emptySchemaConfig, documentAST, options);
  if (config.astNode == null) {
    for (const type of config.types) {
      switch (type.name) {
        // Note: While this could make early assertions to get the correctly
        // typed values below, that would throw immediately while type system
        // validation with validateSchema() will produce more actionable results.
        case 'Query':
          // @ts-expect-error validated in `validateSchema`
          config.query = type;
          break;
        case 'Mutation':
          // @ts-expect-error validated in `validateSchema`
          config.mutation = type;
          break;
        case 'Subscription':
          // @ts-expect-error validated in `validateSchema`
          config.subscription = type;
          break;
      }
    }
  }
  const directives = [...config.directives,
  // If specified directives were not explicitly declared, add them.
  ..._directives.specifiedDirectives.filter(stdDirective => config.directives.every(directive => directive.name !== stdDirective.name))];
  return new _schema.GraphQLSchema({
    ...config,
    directives
  });
}
/**
 * A helper function to build a GraphQLSchema directly from a source
 * document.
 */

function buildSchema(source, options) {
  const document = (0, _parser.parse)(source, {
    noLocation: options === null || options === void 0 ? void 0 : options.noLocation,
    allowLegacyFragmentVariables: options === null || options === void 0 ? void 0 : options.allowLegacyFragmentVariables
  });
  return buildASTSchema(document, {
    assumeValidSDL: options === null || options === void 0 ? void 0 : options.assumeValidSDL,
    assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid
  });
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/buildClientSchema.mjs":
/*!*********************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/buildClientSchema.mjs ***!
  \*********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.buildClientSchema = buildClientSchema;
var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
var _keyValMap = __webpack_require__(/*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs");
var _parser = __webpack_require__(/*! ../language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs");
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
var _schema = __webpack_require__(/*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs");
var _valueFromAST = __webpack_require__(/*! ./valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs");
/**
 * Build a GraphQLSchema for use by client tools.
 *
 * Given the result of a client running the introspection query, creates and
 * returns a GraphQLSchema instance which can be then used with all graphql-js
 * tools, but cannot be used to execute a query, as introspection does not
 * represent the "resolver", "parse" or "serialize" functions or any other
 * server-internal mechanisms.
 *
 * This function expects a complete introspection result. Don't forget to check
 * the "errors" field of a server response before calling this function.
 */

function buildClientSchema(introspection, options) {
  (0, _isObjectLike.isObjectLike)(introspection) && (0, _isObjectLike.isObjectLike)(introspection.__schema) || (0, _devAssert.devAssert)(false, `Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0, _inspect.inspect)(introspection)}.`); // Get the schema from the introspection result.

  const schemaIntrospection = introspection.__schema; // Iterate through all types, getting the type definition for each.

  const typeMap = (0, _keyValMap.keyValMap)(schemaIntrospection.types, typeIntrospection => typeIntrospection.name, typeIntrospection => buildType(typeIntrospection)); // Include standard types only if they are used.

  for (const stdType of [..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes]) {
    if (typeMap[stdType.name]) {
      typeMap[stdType.name] = stdType;
    }
  } // Get the root Query, Mutation, and Subscription types.

  const queryType = schemaIntrospection.queryType ? getObjectType(schemaIntrospection.queryType) : null;
  const mutationType = schemaIntrospection.mutationType ? getObjectType(schemaIntrospection.mutationType) : null;
  const subscriptionType = schemaIntrospection.subscriptionType ? getObjectType(schemaIntrospection.subscriptionType) : null; // Get the directives supported by Introspection, assuming empty-set if
  // directives were not queried for.

  const directives = schemaIntrospection.directives ? schemaIntrospection.directives.map(buildDirective) : []; // Then produce and return a Schema with these types.

  return new _schema.GraphQLSchema({
    description: schemaIntrospection.description,
    query: queryType,
    mutation: mutationType,
    subscription: subscriptionType,
    types: Object.values(typeMap),
    directives,
    assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid
  }); // Given a type reference in introspection, return the GraphQLType instance.
  // preferring cached instances before building new instances.

  function getType(typeRef) {
    if (typeRef.kind === _introspection.TypeKind.LIST) {
      const itemRef = typeRef.ofType;
      if (!itemRef) {
        throw new Error('Decorated type deeper than introspection query.');
      }
      return new _definition.GraphQLList(getType(itemRef));
    }
    if (typeRef.kind === _introspection.TypeKind.NON_NULL) {
      const nullableRef = typeRef.ofType;
      if (!nullableRef) {
        throw new Error('Decorated type deeper than introspection query.');
      }
      const nullableType = getType(nullableRef);
      return new _definition.GraphQLNonNull((0, _definition.assertNullableType)(nullableType));
    }
    return getNamedType(typeRef);
  }
  function getNamedType(typeRef) {
    const typeName = typeRef.name;
    if (!typeName) {
      throw new Error(`Unknown type reference: ${(0, _inspect.inspect)(typeRef)}.`);
    }
    const type = typeMap[typeName];
    if (!type) {
      throw new Error(`Invalid or incomplete schema, unknown type: ${typeName}. Ensure that a full introspection query is used in order to build a client schema.`);
    }
    return type;
  }
  function getObjectType(typeRef) {
    return (0, _definition.assertObjectType)(getNamedType(typeRef));
  }
  function getInterfaceType(typeRef) {
    return (0, _definition.assertInterfaceType)(getNamedType(typeRef));
  } // Given a type's introspection result, construct the correct
  // GraphQLType instance.

  function buildType(type) {
    // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
    if (type != null && type.name != null && type.kind != null) {
      // FIXME: Properly type IntrospectionType, it's a breaking change so fix in v17
      // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
      switch (type.kind) {
        case _introspection.TypeKind.SCALAR:
          return buildScalarDef(type);
        case _introspection.TypeKind.OBJECT:
          return buildObjectDef(type);
        case _introspection.TypeKind.INTERFACE:
          return buildInterfaceDef(type);
        case _introspection.TypeKind.UNION:
          return buildUnionDef(type);
        case _introspection.TypeKind.ENUM:
          return buildEnumDef(type);
        case _introspection.TypeKind.INPUT_OBJECT:
          return buildInputObjectDef(type);
      }
    }
    const typeStr = (0, _inspect.inspect)(type);
    throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${typeStr}.`);
  }
  function buildScalarDef(scalarIntrospection) {
    return new _definition.GraphQLScalarType({
      name: scalarIntrospection.name,
      description: scalarIntrospection.description,
      specifiedByURL: scalarIntrospection.specifiedByURL
    });
  }
  function buildImplementationsList(implementingIntrospection) {
    // TODO: Temporary workaround until GraphQL ecosystem will fully support
    // 'interfaces' on interface types.
    if (implementingIntrospection.interfaces === null && implementingIntrospection.kind === _introspection.TypeKind.INTERFACE) {
      return [];
    }
    if (!implementingIntrospection.interfaces) {
      const implementingIntrospectionStr = (0, _inspect.inspect)(implementingIntrospection);
      throw new Error(`Introspection result missing interfaces: ${implementingIntrospectionStr}.`);
    }
    return implementingIntrospection.interfaces.map(getInterfaceType);
  }
  function buildObjectDef(objectIntrospection) {
    return new _definition.GraphQLObjectType({
      name: objectIntrospection.name,
      description: objectIntrospection.description,
      interfaces: () => buildImplementationsList(objectIntrospection),
      fields: () => buildFieldDefMap(objectIntrospection)
    });
  }
  function buildInterfaceDef(interfaceIntrospection) {
    return new _definition.GraphQLInterfaceType({
      name: interfaceIntrospection.name,
      description: interfaceIntrospection.description,
      interfaces: () => buildImplementationsList(interfaceIntrospection),
      fields: () => buildFieldDefMap(interfaceIntrospection)
    });
  }
  function buildUnionDef(unionIntrospection) {
    if (!unionIntrospection.possibleTypes) {
      const unionIntrospectionStr = (0, _inspect.inspect)(unionIntrospection);
      throw new Error(`Introspection result missing possibleTypes: ${unionIntrospectionStr}.`);
    }
    return new _definition.GraphQLUnionType({
      name: unionIntrospection.name,
      description: unionIntrospection.description,
      types: () => unionIntrospection.possibleTypes.map(getObjectType)
    });
  }
  function buildEnumDef(enumIntrospection) {
    if (!enumIntrospection.enumValues) {
      const enumIntrospectionStr = (0, _inspect.inspect)(enumIntrospection);
      throw new Error(`Introspection result missing enumValues: ${enumIntrospectionStr}.`);
    }
    return new _definition.GraphQLEnumType({
      name: enumIntrospection.name,
      description: enumIntrospection.description,
      values: (0, _keyValMap.keyValMap)(enumIntrospection.enumValues, valueIntrospection => valueIntrospection.name, valueIntrospection => ({
        description: valueIntrospection.description,
        deprecationReason: valueIntrospection.deprecationReason
      }))
    });
  }
  function buildInputObjectDef(inputObjectIntrospection) {
    if (!inputObjectIntrospection.inputFields) {
      const inputObjectIntrospectionStr = (0, _inspect.inspect)(inputObjectIntrospection);
      throw new Error(`Introspection result missing inputFields: ${inputObjectIntrospectionStr}.`);
    }
    return new _definition.GraphQLInputObjectType({
      name: inputObjectIntrospection.name,
      description: inputObjectIntrospection.description,
      fields: () => buildInputValueDefMap(inputObjectIntrospection.inputFields)
    });
  }
  function buildFieldDefMap(typeIntrospection) {
    if (!typeIntrospection.fields) {
      throw new Error(`Introspection result missing fields: ${(0, _inspect.inspect)(typeIntrospection)}.`);
    }
    return (0, _keyValMap.keyValMap)(typeIntrospection.fields, fieldIntrospection => fieldIntrospection.name, buildField);
  }
  function buildField(fieldIntrospection) {
    const type = getType(fieldIntrospection.type);
    if (!(0, _definition.isOutputType)(type)) {
      const typeStr = (0, _inspect.inspect)(type);
      throw new Error(`Introspection must provide output type for fields, but received: ${typeStr}.`);
    }
    if (!fieldIntrospection.args) {
      const fieldIntrospectionStr = (0, _inspect.inspect)(fieldIntrospection);
      throw new Error(`Introspection result missing field args: ${fieldIntrospectionStr}.`);
    }
    return {
      description: fieldIntrospection.description,
      deprecationReason: fieldIntrospection.deprecationReason,
      type,
      args: buildInputValueDefMap(fieldIntrospection.args)
    };
  }
  function buildInputValueDefMap(inputValueIntrospections) {
    return (0, _keyValMap.keyValMap)(inputValueIntrospections, inputValue => inputValue.name, buildInputValue);
  }
  function buildInputValue(inputValueIntrospection) {
    const type = getType(inputValueIntrospection.type);
    if (!(0, _definition.isInputType)(type)) {
      const typeStr = (0, _inspect.inspect)(type);
      throw new Error(`Introspection must provide input type for arguments, but received: ${typeStr}.`);
    }
    const defaultValue = inputValueIntrospection.defaultValue != null ? (0, _valueFromAST.valueFromAST)((0, _parser.parseValue)(inputValueIntrospection.defaultValue), type) : undefined;
    return {
      description: inputValueIntrospection.description,
      type,
      defaultValue,
      deprecationReason: inputValueIntrospection.deprecationReason
    };
  }
  function buildDirective(directiveIntrospection) {
    if (!directiveIntrospection.args) {
      const directiveIntrospectionStr = (0, _inspect.inspect)(directiveIntrospection);
      throw new Error(`Introspection result missing directive args: ${directiveIntrospectionStr}.`);
    }
    if (!directiveIntrospection.locations) {
      const directiveIntrospectionStr = (0, _inspect.inspect)(directiveIntrospection);
      throw new Error(`Introspection result missing directive locations: ${directiveIntrospectionStr}.`);
    }
    return new _directives.GraphQLDirective({
      name: directiveIntrospection.name,
      description: directiveIntrospection.description,
      isRepeatable: directiveIntrospection.isRepeatable,
      locations: directiveIntrospection.locations.slice(),
      args: buildInputValueDefMap(directiveIntrospection.args)
    });
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/coerceInputValue.mjs":
/*!********************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/coerceInputValue.mjs ***!
  \********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.coerceInputValue = coerceInputValue;
var _didYouMean = __webpack_require__(/*! ../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _isIterableObject = __webpack_require__(/*! ../jsutils/isIterableObject.mjs */ "../../../node_modules/graphql/jsutils/isIterableObject.mjs");
var _isObjectLike = __webpack_require__(/*! ../jsutils/isObjectLike.mjs */ "../../../node_modules/graphql/jsutils/isObjectLike.mjs");
var _Path = __webpack_require__(/*! ../jsutils/Path.mjs */ "../../../node_modules/graphql/jsutils/Path.mjs");
var _printPathArray = __webpack_require__(/*! ../jsutils/printPathArray.mjs */ "../../../node_modules/graphql/jsutils/printPathArray.mjs");
var _suggestionList = __webpack_require__(/*! ../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
/**
 * Coerces a JavaScript value given a GraphQL Input Type.
 */
function coerceInputValue(inputValue, type) {
  let onError = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultOnError;
  return coerceInputValueImpl(inputValue, type, onError, undefined);
}
function defaultOnError(path, invalidValue, error) {
  let errorPrefix = 'Invalid value ' + (0, _inspect.inspect)(invalidValue);
  if (path.length > 0) {
    errorPrefix += ` at "value${(0, _printPathArray.printPathArray)(path)}"`;
  }
  error.message = errorPrefix + ': ' + error.message;
  throw error;
}
function coerceInputValueImpl(inputValue, type, onError, path) {
  if ((0, _definition.isNonNullType)(type)) {
    if (inputValue != null) {
      return coerceInputValueImpl(inputValue, type.ofType, onError, path);
    }
    onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected non-nullable type "${(0, _inspect.inspect)(type)}" not to be null.`));
    return;
  }
  if (inputValue == null) {
    // Explicitly return the value null.
    return null;
  }
  if ((0, _definition.isListType)(type)) {
    const itemType = type.ofType;
    if ((0, _isIterableObject.isIterableObject)(inputValue)) {
      return Array.from(inputValue, (itemValue, index) => {
        const itemPath = (0, _Path.addPath)(path, index, undefined);
        return coerceInputValueImpl(itemValue, itemType, onError, itemPath);
      });
    } // Lists accept a non-list value as a list of one.

    return [coerceInputValueImpl(inputValue, itemType, onError, path)];
  }
  if ((0, _definition.isInputObjectType)(type)) {
    if (!(0, _isObjectLike.isObjectLike)(inputValue)) {
      onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}" to be an object.`));
      return;
    }
    const coercedValue = {};
    const fieldDefs = type.getFields();
    for (const field of Object.values(fieldDefs)) {
      const fieldValue = inputValue[field.name];
      if (fieldValue === undefined) {
        if (field.defaultValue !== undefined) {
          coercedValue[field.name] = field.defaultValue;
        } else if ((0, _definition.isNonNullType)(field.type)) {
          const typeStr = (0, _inspect.inspect)(field.type);
          onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Field "${field.name}" of required type "${typeStr}" was not provided.`));
        }
        continue;
      }
      coercedValue[field.name] = coerceInputValueImpl(fieldValue, field.type, onError, (0, _Path.addPath)(path, field.name, type.name));
    } // Ensure every provided field is defined.

    for (const fieldName of Object.keys(inputValue)) {
      if (!fieldDefs[fieldName]) {
        const suggestions = (0, _suggestionList.suggestionList)(fieldName, Object.keys(type.getFields()));
        onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Field "${fieldName}" is not defined by type "${type.name}".` + (0, _didYouMean.didYouMean)(suggestions)));
      }
    }
    return coercedValue;
  }
  if ((0, _definition.isLeafType)(type)) {
    let parseResult; // Scalars and Enums determine if a input value is valid via parseValue(),
    // which can throw to indicate failure. If it throws, maintain a reference
    // to the original error.

    try {
      parseResult = type.parseValue(inputValue);
    } catch (error) {
      if (error instanceof _GraphQLError.GraphQLError) {
        onError((0, _Path.pathToArray)(path), inputValue, error);
      } else {
        onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}". ` + error.message, {
          originalError: error
        }));
      }
      return;
    }
    if (parseResult === undefined) {
      onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}".`));
    }
    return parseResult;
  }
  /* c8 ignore next 3 */
  // Not reachable, all possible types have been considered.

   false || (0, _invariant.invariant)(false, 'Unexpected input type: ' + (0, _inspect.inspect)(type));
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/concatAST.mjs":
/*!*************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/concatAST.mjs ***!
  \*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.concatAST = concatAST;
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
/**
 * Provided a collection of ASTs, presumably each from different files,
 * concatenate the ASTs together into batched AST, useful for validating many
 * GraphQL source files which together represent one conceptual application.
 */

function concatAST(documents) {
  const definitions = [];
  for (const doc of documents) {
    definitions.push(...doc.definitions);
  }
  return {
    kind: _kinds.Kind.DOCUMENT,
    definitions
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/extendSchema.mjs":
/*!****************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/extendSchema.mjs ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.extendSchema = extendSchema;
exports.extendSchemaImpl = extendSchemaImpl;
var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
var _mapValue = __webpack_require__(/*! ../jsutils/mapValue.mjs */ "../../../node_modules/graphql/jsutils/mapValue.mjs");
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _predicates = __webpack_require__(/*! ../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs");
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
var _schema = __webpack_require__(/*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs");
var _validate = __webpack_require__(/*! ../validation/validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs");
var _values = __webpack_require__(/*! ../execution/values.mjs */ "../../../node_modules/graphql/execution/values.mjs");
var _valueFromAST = __webpack_require__(/*! ./valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs");
/**
 * Produces a new schema given an existing schema and a document which may
 * contain GraphQL type extensions and definitions. The original schema will
 * remain unaltered.
 *
 * Because a schema represents a graph of references, a schema cannot be
 * extended without effectively making an entire copy. We do not know until it's
 * too late if subgraphs remain unchanged.
 *
 * This algorithm copies the provided schema, applying extensions while
 * producing the copy. The original schema remains unaltered.
 */
function extendSchema(schema, documentAST, options) {
  (0, _schema.assertSchema)(schema);
  documentAST != null && documentAST.kind === _kinds.Kind.DOCUMENT || (0, _devAssert.devAssert)(false, 'Must provide valid Document AST.');
  if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) {
    (0, _validate.assertValidSDLExtension)(documentAST, schema);
  }
  const schemaConfig = schema.toConfig();
  const extendedConfig = extendSchemaImpl(schemaConfig, documentAST, options);
  return schemaConfig === extendedConfig ? schema : new _schema.GraphQLSchema(extendedConfig);
}
/**
 * @internal
 */

function extendSchemaImpl(schemaConfig, documentAST, options) {
  var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid;

  // Collect the type definitions and extensions found in the document.
  const typeDefs = [];
  const typeExtensionsMap = Object.create(null); // New directives and types are separate because a directives and types can
  // have the same name. For example, a type named "skip".

  const directiveDefs = [];
  let schemaDef; // Schema extensions are collected which may add additional operation types.

  const schemaExtensions = [];
  for (const def of documentAST.definitions) {
    if (def.kind === _kinds.Kind.SCHEMA_DEFINITION) {
      schemaDef = def;
    } else if (def.kind === _kinds.Kind.SCHEMA_EXTENSION) {
      schemaExtensions.push(def);
    } else if ((0, _predicates.isTypeDefinitionNode)(def)) {
      typeDefs.push(def);
    } else if ((0, _predicates.isTypeExtensionNode)(def)) {
      const extendedTypeName = def.name.value;
      const existingTypeExtensions = typeExtensionsMap[extendedTypeName];
      typeExtensionsMap[extendedTypeName] = existingTypeExtensions ? existingTypeExtensions.concat([def]) : [def];
    } else if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
      directiveDefs.push(def);
    }
  } // If this document contains no new types, extensions, or directives then
  // return the same unmodified GraphQLSchema instance.

  if (Object.keys(typeExtensionsMap).length === 0 && typeDefs.length === 0 && directiveDefs.length === 0 && schemaExtensions.length === 0 && schemaDef == null) {
    return schemaConfig;
  }
  const typeMap = Object.create(null);
  for (const existingType of schemaConfig.types) {
    typeMap[existingType.name] = extendNamedType(existingType);
  }
  for (const typeNode of typeDefs) {
    var _stdTypeMap$name;
    const name = typeNode.name.value;
    typeMap[name] = (_stdTypeMap$name = stdTypeMap[name]) !== null && _stdTypeMap$name !== void 0 ? _stdTypeMap$name : buildType(typeNode);
  }
  const operationTypes = {
    // Get the extended root operation types.
    query: schemaConfig.query && replaceNamedType(schemaConfig.query),
    mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation),
    subscription: schemaConfig.subscription && replaceNamedType(schemaConfig.subscription),
    // Then, incorporate schema definition and all schema extensions.
    ...(schemaDef && getOperationTypes([schemaDef])),
    ...getOperationTypes(schemaExtensions)
  }; // Then produce and return a Schema config with these types.

  return {
    description: (_schemaDef = schemaDef) === null || _schemaDef === void 0 ? void 0 : (_schemaDef$descriptio = _schemaDef.description) === null || _schemaDef$descriptio === void 0 ? void 0 : _schemaDef$descriptio.value,
    ...operationTypes,
    types: Object.values(typeMap),
    directives: [...schemaConfig.directives.map(replaceDirective), ...directiveDefs.map(buildDirective)],
    extensions: Object.create(null),
    astNode: (_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0 ? _schemaDef2 : schemaConfig.astNode,
    extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions),
    assumeValid: (_options$assumeValid = options === null || options === void 0 ? void 0 : options.assumeValid) !== null && _options$assumeValid !== void 0 ? _options$assumeValid : false
  }; // Below are functions used for producing this schema that have closed over
  // this scope and have access to the schema, cache, and newly defined types.

  function replaceType(type) {
    if ((0, _definition.isListType)(type)) {
      // @ts-expect-error
      return new _definition.GraphQLList(replaceType(type.ofType));
    }
    if ((0, _definition.isNonNullType)(type)) {
      // @ts-expect-error
      return new _definition.GraphQLNonNull(replaceType(type.ofType));
    } // @ts-expect-error FIXME

    return replaceNamedType(type);
  }
  function replaceNamedType(type) {
    // Note: While this could make early assertions to get the correctly
    // typed values, that would throw immediately while type system
    // validation with validateSchema() will produce more actionable results.
    return typeMap[type.name];
  }
  function replaceDirective(directive) {
    const config = directive.toConfig();
    return new _directives.GraphQLDirective({
      ...config,
      args: (0, _mapValue.mapValue)(config.args, extendArg)
    });
  }
  function extendNamedType(type) {
    if ((0, _introspection.isIntrospectionType)(type) || (0, _scalars.isSpecifiedScalarType)(type)) {
      // Builtin types are not extended.
      return type;
    }
    if ((0, _definition.isScalarType)(type)) {
      return extendScalarType(type);
    }
    if ((0, _definition.isObjectType)(type)) {
      return extendObjectType(type);
    }
    if ((0, _definition.isInterfaceType)(type)) {
      return extendInterfaceType(type);
    }
    if ((0, _definition.isUnionType)(type)) {
      return extendUnionType(type);
    }
    if ((0, _definition.isEnumType)(type)) {
      return extendEnumType(type);
    }
    if ((0, _definition.isInputObjectType)(type)) {
      return extendInputObjectType(type);
    }
    /* c8 ignore next 3 */
    // Not reachable, all possible type definition nodes have been considered.

     false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type));
  }
  function extendInputObjectType(type) {
    var _typeExtensionsMap$co;
    const config = type.toConfig();
    const extensions = (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : [];
    return new _definition.GraphQLInputObjectType({
      ...config,
      fields: () => ({
        ...(0, _mapValue.mapValue)(config.fields, field => ({
          ...field,
          type: replaceType(field.type)
        })),
        ...buildInputFieldMap(extensions)
      }),
      extensionASTNodes: config.extensionASTNodes.concat(extensions)
    });
  }
  function extendEnumType(type) {
    var _typeExtensionsMap$ty;
    const config = type.toConfig();
    const extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : [];
    return new _definition.GraphQLEnumType({
      ...config,
      values: {
        ...config.values,
        ...buildEnumValueMap(extensions)
      },
      extensionASTNodes: config.extensionASTNodes.concat(extensions)
    });
  }
  function extendScalarType(type) {
    var _typeExtensionsMap$co2;
    const config = type.toConfig();
    const extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : [];
    let specifiedByURL = config.specifiedByURL;
    for (const extensionNode of extensions) {
      var _getSpecifiedByURL;
      specifiedByURL = (_getSpecifiedByURL = getSpecifiedByURL(extensionNode)) !== null && _getSpecifiedByURL !== void 0 ? _getSpecifiedByURL : specifiedByURL;
    }
    return new _definition.GraphQLScalarType({
      ...config,
      specifiedByURL,
      extensionASTNodes: config.extensionASTNodes.concat(extensions)
    });
  }
  function extendObjectType(type) {
    var _typeExtensionsMap$co3;
    const config = type.toConfig();
    const extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : [];
    return new _definition.GraphQLObjectType({
      ...config,
      interfaces: () => [...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions)],
      fields: () => ({
        ...(0, _mapValue.mapValue)(config.fields, extendField),
        ...buildFieldMap(extensions)
      }),
      extensionASTNodes: config.extensionASTNodes.concat(extensions)
    });
  }
  function extendInterfaceType(type) {
    var _typeExtensionsMap$co4;
    const config = type.toConfig();
    const extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : [];
    return new _definition.GraphQLInterfaceType({
      ...config,
      interfaces: () => [...type.getInterfaces().map(replaceNamedType), ...buildInterfaces(extensions)],
      fields: () => ({
        ...(0, _mapValue.mapValue)(config.fields, extendField),
        ...buildFieldMap(extensions)
      }),
      extensionASTNodes: config.extensionASTNodes.concat(extensions)
    });
  }
  function extendUnionType(type) {
    var _typeExtensionsMap$co5;
    const config = type.toConfig();
    const extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
    return new _definition.GraphQLUnionType({
      ...config,
      types: () => [...type.getTypes().map(replaceNamedType), ...buildUnionTypes(extensions)],
      extensionASTNodes: config.extensionASTNodes.concat(extensions)
    });
  }
  function extendField(field) {
    return {
      ...field,
      type: replaceType(field.type),
      args: field.args && (0, _mapValue.mapValue)(field.args, extendArg)
    };
  }
  function extendArg(arg) {
    return {
      ...arg,
      type: replaceType(arg.type)
    };
  }
  function getOperationTypes(nodes) {
    const opTypes = {};
    for (const node of nodes) {
      var _node$operationTypes;

      // FIXME: https://github.com/graphql/graphql-js/issues/2203
      const operationTypesNodes = /* c8 ignore next */
      (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : [];
      for (const operationType of operationTypesNodes) {
        // Note: While this could make early assertions to get the correctly
        // typed values below, that would throw immediately while type system
        // validation with validateSchema() will produce more actionable results.
        // @ts-expect-error
        opTypes[operationType.operation] = getNamedType(operationType.type);
      }
    }
    return opTypes;
  }
  function getNamedType(node) {
    var _stdTypeMap$name2;
    const name = node.name.value;
    const type = (_stdTypeMap$name2 = stdTypeMap[name]) !== null && _stdTypeMap$name2 !== void 0 ? _stdTypeMap$name2 : typeMap[name];
    if (type === undefined) {
      throw new Error(`Unknown type: "${name}".`);
    }
    return type;
  }
  function getWrappedType(node) {
    if (node.kind === _kinds.Kind.LIST_TYPE) {
      return new _definition.GraphQLList(getWrappedType(node.type));
    }
    if (node.kind === _kinds.Kind.NON_NULL_TYPE) {
      return new _definition.GraphQLNonNull(getWrappedType(node.type));
    }
    return getNamedType(node);
  }
  function buildDirective(node) {
    var _node$description;
    return new _directives.GraphQLDirective({
      name: node.name.value,
      description: (_node$description = node.description) === null || _node$description === void 0 ? void 0 : _node$description.value,
      // @ts-expect-error
      locations: node.locations.map(_ref => {
        let {
          value
        } = _ref;
        return value;
      }),
      isRepeatable: node.repeatable,
      args: buildArgumentMap(node.arguments),
      astNode: node
    });
  }
  function buildFieldMap(nodes) {
    const fieldConfigMap = Object.create(null);
    for (const node of nodes) {
      var _node$fields;

      // FIXME: https://github.com/graphql/graphql-js/issues/2203
      const nodeFields = /* c8 ignore next */
      (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : [];
      for (const field of nodeFields) {
        var _field$description;
        fieldConfigMap[field.name.value] = {
          // Note: While this could make assertions to get the correctly typed
          // value, that would throw immediately while type system validation
          // with validateSchema() will produce more actionable results.
          type: getWrappedType(field.type),
          description: (_field$description = field.description) === null || _field$description === void 0 ? void 0 : _field$description.value,
          args: buildArgumentMap(field.arguments),
          deprecationReason: getDeprecationReason(field),
          astNode: field
        };
      }
    }
    return fieldConfigMap;
  }
  function buildArgumentMap(args) {
    // FIXME: https://github.com/graphql/graphql-js/issues/2203
    const argsNodes = /* c8 ignore next */
    args !== null && args !== void 0 ? args : [];
    const argConfigMap = Object.create(null);
    for (const arg of argsNodes) {
      var _arg$description;

      // Note: While this could make assertions to get the correctly typed
      // value, that would throw immediately while type system validation
      // with validateSchema() will produce more actionable results.
      const type = getWrappedType(arg.type);
      argConfigMap[arg.name.value] = {
        type,
        description: (_arg$description = arg.description) === null || _arg$description === void 0 ? void 0 : _arg$description.value,
        defaultValue: (0, _valueFromAST.valueFromAST)(arg.defaultValue, type),
        deprecationReason: getDeprecationReason(arg),
        astNode: arg
      };
    }
    return argConfigMap;
  }
  function buildInputFieldMap(nodes) {
    const inputFieldMap = Object.create(null);
    for (const node of nodes) {
      var _node$fields2;

      // FIXME: https://github.com/graphql/graphql-js/issues/2203
      const fieldsNodes = /* c8 ignore next */
      (_node$fields2 = node.fields) !== null && _node$fields2 !== void 0 ? _node$fields2 : [];
      for (const field of fieldsNodes) {
        var _field$description2;

        // Note: While this could make assertions to get the correctly typed
        // value, that would throw immediately while type system validation
        // with validateSchema() will produce more actionable results.
        const type = getWrappedType(field.type);
        inputFieldMap[field.name.value] = {
          type,
          description: (_field$description2 = field.description) === null || _field$description2 === void 0 ? void 0 : _field$description2.value,
          defaultValue: (0, _valueFromAST.valueFromAST)(field.defaultValue, type),
          deprecationReason: getDeprecationReason(field),
          astNode: field
        };
      }
    }
    return inputFieldMap;
  }
  function buildEnumValueMap(nodes) {
    const enumValueMap = Object.create(null);
    for (const node of nodes) {
      var _node$values;

      // FIXME: https://github.com/graphql/graphql-js/issues/2203
      const valuesNodes = /* c8 ignore next */
      (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : [];
      for (const value of valuesNodes) {
        var _value$description;
        enumValueMap[value.name.value] = {
          description: (_value$description = value.description) === null || _value$description === void 0 ? void 0 : _value$description.value,
          deprecationReason: getDeprecationReason(value),
          astNode: value
        };
      }
    }
    return enumValueMap;
  }
  function buildInterfaces(nodes) {
    // Note: While this could make assertions to get the correctly typed
    // values below, that would throw immediately while type system
    // validation with validateSchema() will produce more actionable results.
    // @ts-expect-error
    return nodes.flatMap(
    // FIXME: https://github.com/graphql/graphql-js/issues/2203
    node => {
      var _node$interfaces$map, _node$interfaces;
      return (/* c8 ignore next */
        (_node$interfaces$map = (_node$interfaces = node.interfaces) === null || _node$interfaces === void 0 ? void 0 : _node$interfaces.map(getNamedType)) !== null && _node$interfaces$map !== void 0 ? _node$interfaces$map : []
      );
    });
  }
  function buildUnionTypes(nodes) {
    // Note: While this could make assertions to get the correctly typed
    // values below, that would throw immediately while type system
    // validation with validateSchema() will produce more actionable results.
    // @ts-expect-error
    return nodes.flatMap(
    // FIXME: https://github.com/graphql/graphql-js/issues/2203
    node => {
      var _node$types$map, _node$types;
      return (/* c8 ignore next */
        (_node$types$map = (_node$types = node.types) === null || _node$types === void 0 ? void 0 : _node$types.map(getNamedType)) !== null && _node$types$map !== void 0 ? _node$types$map : []
      );
    });
  }
  function buildType(astNode) {
    var _typeExtensionsMap$na;
    const name = astNode.name.value;
    const extensionASTNodes = (_typeExtensionsMap$na = typeExtensionsMap[name]) !== null && _typeExtensionsMap$na !== void 0 ? _typeExtensionsMap$na : [];
    switch (astNode.kind) {
      case _kinds.Kind.OBJECT_TYPE_DEFINITION:
        {
          var _astNode$description;
          const allNodes = [astNode, ...extensionASTNodes];
          return new _definition.GraphQLObjectType({
            name,
            description: (_astNode$description = astNode.description) === null || _astNode$description === void 0 ? void 0 : _astNode$description.value,
            interfaces: () => buildInterfaces(allNodes),
            fields: () => buildFieldMap(allNodes),
            astNode,
            extensionASTNodes
          });
        }
      case _kinds.Kind.INTERFACE_TYPE_DEFINITION:
        {
          var _astNode$description2;
          const allNodes = [astNode, ...extensionASTNodes];
          return new _definition.GraphQLInterfaceType({
            name,
            description: (_astNode$description2 = astNode.description) === null || _astNode$description2 === void 0 ? void 0 : _astNode$description2.value,
            interfaces: () => buildInterfaces(allNodes),
            fields: () => buildFieldMap(allNodes),
            astNode,
            extensionASTNodes
          });
        }
      case _kinds.Kind.ENUM_TYPE_DEFINITION:
        {
          var _astNode$description3;
          const allNodes = [astNode, ...extensionASTNodes];
          return new _definition.GraphQLEnumType({
            name,
            description: (_astNode$description3 = astNode.description) === null || _astNode$description3 === void 0 ? void 0 : _astNode$description3.value,
            values: buildEnumValueMap(allNodes),
            astNode,
            extensionASTNodes
          });
        }
      case _kinds.Kind.UNION_TYPE_DEFINITION:
        {
          var _astNode$description4;
          const allNodes = [astNode, ...extensionASTNodes];
          return new _definition.GraphQLUnionType({
            name,
            description: (_astNode$description4 = astNode.description) === null || _astNode$description4 === void 0 ? void 0 : _astNode$description4.value,
            types: () => buildUnionTypes(allNodes),
            astNode,
            extensionASTNodes
          });
        }
      case _kinds.Kind.SCALAR_TYPE_DEFINITION:
        {
          var _astNode$description5;
          return new _definition.GraphQLScalarType({
            name,
            description: (_astNode$description5 = astNode.description) === null || _astNode$description5 === void 0 ? void 0 : _astNode$description5.value,
            specifiedByURL: getSpecifiedByURL(astNode),
            astNode,
            extensionASTNodes
          });
        }
      case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION:
        {
          var _astNode$description6;
          const allNodes = [astNode, ...extensionASTNodes];
          return new _definition.GraphQLInputObjectType({
            name,
            description: (_astNode$description6 = astNode.description) === null || _astNode$description6 === void 0 ? void 0 : _astNode$description6.value,
            fields: () => buildInputFieldMap(allNodes),
            astNode,
            extensionASTNodes
          });
        }
    }
  }
}
const stdTypeMap = (0, _keyMap.keyMap)([..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes], type => type.name);
/**
 * Given a field or enum value node, returns the string value for the
 * deprecation reason.
 */

function getDeprecationReason(node) {
  const deprecated = (0, _values.getDirectiveValues)(_directives.GraphQLDeprecatedDirective, node); // @ts-expect-error validated by `getDirectiveValues`

  return deprecated === null || deprecated === void 0 ? void 0 : deprecated.reason;
}
/**
 * Given a scalar node, returns the string value for the specifiedByURL.
 */

function getSpecifiedByURL(node) {
  const specifiedBy = (0, _values.getDirectiveValues)(_directives.GraphQLSpecifiedByDirective, node); // @ts-expect-error validated by `getDirectiveValues`

  return specifiedBy === null || specifiedBy === void 0 ? void 0 : specifiedBy.url;
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/findBreakingChanges.mjs":
/*!***********************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/findBreakingChanges.mjs ***!
  \***********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.DangerousChangeType = exports.BreakingChangeType = void 0;
exports.findBreakingChanges = findBreakingChanges;
exports.findDangerousChanges = findDangerousChanges;
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
var _astFromValue = __webpack_require__(/*! ./astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs");
var _sortValueNode = __webpack_require__(/*! ./sortValueNode.mjs */ "../../../node_modules/graphql/utilities/sortValueNode.mjs");
var BreakingChangeType;
exports.BreakingChangeType = BreakingChangeType;
(function (BreakingChangeType) {
  BreakingChangeType['TYPE_REMOVED'] = 'TYPE_REMOVED';
  BreakingChangeType['TYPE_CHANGED_KIND'] = 'TYPE_CHANGED_KIND';
  BreakingChangeType['TYPE_REMOVED_FROM_UNION'] = 'TYPE_REMOVED_FROM_UNION';
  BreakingChangeType['VALUE_REMOVED_FROM_ENUM'] = 'VALUE_REMOVED_FROM_ENUM';
  BreakingChangeType['REQUIRED_INPUT_FIELD_ADDED'] = 'REQUIRED_INPUT_FIELD_ADDED';
  BreakingChangeType['IMPLEMENTED_INTERFACE_REMOVED'] = 'IMPLEMENTED_INTERFACE_REMOVED';
  BreakingChangeType['FIELD_REMOVED'] = 'FIELD_REMOVED';
  BreakingChangeType['FIELD_CHANGED_KIND'] = 'FIELD_CHANGED_KIND';
  BreakingChangeType['REQUIRED_ARG_ADDED'] = 'REQUIRED_ARG_ADDED';
  BreakingChangeType['ARG_REMOVED'] = 'ARG_REMOVED';
  BreakingChangeType['ARG_CHANGED_KIND'] = 'ARG_CHANGED_KIND';
  BreakingChangeType['DIRECTIVE_REMOVED'] = 'DIRECTIVE_REMOVED';
  BreakingChangeType['DIRECTIVE_ARG_REMOVED'] = 'DIRECTIVE_ARG_REMOVED';
  BreakingChangeType['REQUIRED_DIRECTIVE_ARG_ADDED'] = 'REQUIRED_DIRECTIVE_ARG_ADDED';
  BreakingChangeType['DIRECTIVE_REPEATABLE_REMOVED'] = 'DIRECTIVE_REPEATABLE_REMOVED';
  BreakingChangeType['DIRECTIVE_LOCATION_REMOVED'] = 'DIRECTIVE_LOCATION_REMOVED';
})(BreakingChangeType || (exports.BreakingChangeType = BreakingChangeType = {}));
var DangerousChangeType;
exports.DangerousChangeType = DangerousChangeType;
(function (DangerousChangeType) {
  DangerousChangeType['VALUE_ADDED_TO_ENUM'] = 'VALUE_ADDED_TO_ENUM';
  DangerousChangeType['TYPE_ADDED_TO_UNION'] = 'TYPE_ADDED_TO_UNION';
  DangerousChangeType['OPTIONAL_INPUT_FIELD_ADDED'] = 'OPTIONAL_INPUT_FIELD_ADDED';
  DangerousChangeType['OPTIONAL_ARG_ADDED'] = 'OPTIONAL_ARG_ADDED';
  DangerousChangeType['IMPLEMENTED_INTERFACE_ADDED'] = 'IMPLEMENTED_INTERFACE_ADDED';
  DangerousChangeType['ARG_DEFAULT_VALUE_CHANGE'] = 'ARG_DEFAULT_VALUE_CHANGE';
})(DangerousChangeType || (exports.DangerousChangeType = DangerousChangeType = {}));
/**
 * Given two schemas, returns an Array containing descriptions of all the types
 * of breaking changes covered by the other functions down below.
 */
function findBreakingChanges(oldSchema, newSchema) {
  // @ts-expect-error
  return findSchemaChanges(oldSchema, newSchema).filter(change => change.type in BreakingChangeType);
}
/**
 * Given two schemas, returns an Array containing descriptions of all the types
 * of potentially dangerous changes covered by the other functions down below.
 */

function findDangerousChanges(oldSchema, newSchema) {
  // @ts-expect-error
  return findSchemaChanges(oldSchema, newSchema).filter(change => change.type in DangerousChangeType);
}
function findSchemaChanges(oldSchema, newSchema) {
  return [...findTypeChanges(oldSchema, newSchema), ...findDirectiveChanges(oldSchema, newSchema)];
}
function findDirectiveChanges(oldSchema, newSchema) {
  const schemaChanges = [];
  const directivesDiff = diff(oldSchema.getDirectives(), newSchema.getDirectives());
  for (const oldDirective of directivesDiff.removed) {
    schemaChanges.push({
      type: BreakingChangeType.DIRECTIVE_REMOVED,
      description: `${oldDirective.name} was removed.`
    });
  }
  for (const [oldDirective, newDirective] of directivesDiff.persisted) {
    const argsDiff = diff(oldDirective.args, newDirective.args);
    for (const newArg of argsDiff.added) {
      if ((0, _definition.isRequiredArgument)(newArg)) {
        schemaChanges.push({
          type: BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED,
          description: `A required arg ${newArg.name} on directive ${oldDirective.name} was added.`
        });
      }
    }
    for (const oldArg of argsDiff.removed) {
      schemaChanges.push({
        type: BreakingChangeType.DIRECTIVE_ARG_REMOVED,
        description: `${oldArg.name} was removed from ${oldDirective.name}.`
      });
    }
    if (oldDirective.isRepeatable && !newDirective.isRepeatable) {
      schemaChanges.push({
        type: BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED,
        description: `Repeatable flag was removed from ${oldDirective.name}.`
      });
    }
    for (const location of oldDirective.locations) {
      if (!newDirective.locations.includes(location)) {
        schemaChanges.push({
          type: BreakingChangeType.DIRECTIVE_LOCATION_REMOVED,
          description: `${location} was removed from ${oldDirective.name}.`
        });
      }
    }
  }
  return schemaChanges;
}
function findTypeChanges(oldSchema, newSchema) {
  const schemaChanges = [];
  const typesDiff = diff(Object.values(oldSchema.getTypeMap()), Object.values(newSchema.getTypeMap()));
  for (const oldType of typesDiff.removed) {
    schemaChanges.push({
      type: BreakingChangeType.TYPE_REMOVED,
      description: (0, _scalars.isSpecifiedScalarType)(oldType) ? `Standard scalar ${oldType.name} was removed because it is not referenced anymore.` : `${oldType.name} was removed.`
    });
  }
  for (const [oldType, newType] of typesDiff.persisted) {
    if ((0, _definition.isEnumType)(oldType) && (0, _definition.isEnumType)(newType)) {
      schemaChanges.push(...findEnumTypeChanges(oldType, newType));
    } else if ((0, _definition.isUnionType)(oldType) && (0, _definition.isUnionType)(newType)) {
      schemaChanges.push(...findUnionTypeChanges(oldType, newType));
    } else if ((0, _definition.isInputObjectType)(oldType) && (0, _definition.isInputObjectType)(newType)) {
      schemaChanges.push(...findInputObjectTypeChanges(oldType, newType));
    } else if ((0, _definition.isObjectType)(oldType) && (0, _definition.isObjectType)(newType)) {
      schemaChanges.push(...findFieldChanges(oldType, newType), ...findImplementedInterfacesChanges(oldType, newType));
    } else if ((0, _definition.isInterfaceType)(oldType) && (0, _definition.isInterfaceType)(newType)) {
      schemaChanges.push(...findFieldChanges(oldType, newType), ...findImplementedInterfacesChanges(oldType, newType));
    } else if (oldType.constructor !== newType.constructor) {
      schemaChanges.push({
        type: BreakingChangeType.TYPE_CHANGED_KIND,
        description: `${oldType.name} changed from ` + `${typeKindName(oldType)} to ${typeKindName(newType)}.`
      });
    }
  }
  return schemaChanges;
}
function findInputObjectTypeChanges(oldType, newType) {
  const schemaChanges = [];
  const fieldsDiff = diff(Object.values(oldType.getFields()), Object.values(newType.getFields()));
  for (const newField of fieldsDiff.added) {
    if ((0, _definition.isRequiredInputField)(newField)) {
      schemaChanges.push({
        type: BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED,
        description: `A required field ${newField.name} on input type ${oldType.name} was added.`
      });
    } else {
      schemaChanges.push({
        type: DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED,
        description: `An optional field ${newField.name} on input type ${oldType.name} was added.`
      });
    }
  }
  for (const oldField of fieldsDiff.removed) {
    schemaChanges.push({
      type: BreakingChangeType.FIELD_REMOVED,
      description: `${oldType.name}.${oldField.name} was removed.`
    });
  }
  for (const [oldField, newField] of fieldsDiff.persisted) {
    const isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldField.type, newField.type);
    if (!isSafe) {
      schemaChanges.push({
        type: BreakingChangeType.FIELD_CHANGED_KIND,
        description: `${oldType.name}.${oldField.name} changed type from ` + `${String(oldField.type)} to ${String(newField.type)}.`
      });
    }
  }
  return schemaChanges;
}
function findUnionTypeChanges(oldType, newType) {
  const schemaChanges = [];
  const possibleTypesDiff = diff(oldType.getTypes(), newType.getTypes());
  for (const newPossibleType of possibleTypesDiff.added) {
    schemaChanges.push({
      type: DangerousChangeType.TYPE_ADDED_TO_UNION,
      description: `${newPossibleType.name} was added to union type ${oldType.name}.`
    });
  }
  for (const oldPossibleType of possibleTypesDiff.removed) {
    schemaChanges.push({
      type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,
      description: `${oldPossibleType.name} was removed from union type ${oldType.name}.`
    });
  }
  return schemaChanges;
}
function findEnumTypeChanges(oldType, newType) {
  const schemaChanges = [];
  const valuesDiff = diff(oldType.getValues(), newType.getValues());
  for (const newValue of valuesDiff.added) {
    schemaChanges.push({
      type: DangerousChangeType.VALUE_ADDED_TO_ENUM,
      description: `${newValue.name} was added to enum type ${oldType.name}.`
    });
  }
  for (const oldValue of valuesDiff.removed) {
    schemaChanges.push({
      type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,
      description: `${oldValue.name} was removed from enum type ${oldType.name}.`
    });
  }
  return schemaChanges;
}
function findImplementedInterfacesChanges(oldType, newType) {
  const schemaChanges = [];
  const interfacesDiff = diff(oldType.getInterfaces(), newType.getInterfaces());
  for (const newInterface of interfacesDiff.added) {
    schemaChanges.push({
      type: DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED,
      description: `${newInterface.name} added to interfaces implemented by ${oldType.name}.`
    });
  }
  for (const oldInterface of interfacesDiff.removed) {
    schemaChanges.push({
      type: BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED,
      description: `${oldType.name} no longer implements interface ${oldInterface.name}.`
    });
  }
  return schemaChanges;
}
function findFieldChanges(oldType, newType) {
  const schemaChanges = [];
  const fieldsDiff = diff(Object.values(oldType.getFields()), Object.values(newType.getFields()));
  for (const oldField of fieldsDiff.removed) {
    schemaChanges.push({
      type: BreakingChangeType.FIELD_REMOVED,
      description: `${oldType.name}.${oldField.name} was removed.`
    });
  }
  for (const [oldField, newField] of fieldsDiff.persisted) {
    schemaChanges.push(...findArgChanges(oldType, oldField, newField));
    const isSafe = isChangeSafeForObjectOrInterfaceField(oldField.type, newField.type);
    if (!isSafe) {
      schemaChanges.push({
        type: BreakingChangeType.FIELD_CHANGED_KIND,
        description: `${oldType.name}.${oldField.name} changed type from ` + `${String(oldField.type)} to ${String(newField.type)}.`
      });
    }
  }
  return schemaChanges;
}
function findArgChanges(oldType, oldField, newField) {
  const schemaChanges = [];
  const argsDiff = diff(oldField.args, newField.args);
  for (const oldArg of argsDiff.removed) {
    schemaChanges.push({
      type: BreakingChangeType.ARG_REMOVED,
      description: `${oldType.name}.${oldField.name} arg ${oldArg.name} was removed.`
    });
  }
  for (const [oldArg, newArg] of argsDiff.persisted) {
    const isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArg.type, newArg.type);
    if (!isSafe) {
      schemaChanges.push({
        type: BreakingChangeType.ARG_CHANGED_KIND,
        description: `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed type from ` + `${String(oldArg.type)} to ${String(newArg.type)}.`
      });
    } else if (oldArg.defaultValue !== undefined) {
      if (newArg.defaultValue === undefined) {
        schemaChanges.push({
          type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,
          description: `${oldType.name}.${oldField.name} arg ${oldArg.name} defaultValue was removed.`
        });
      } else {
        // Since we looking only for client's observable changes we should
        // compare default values in the same representation as they are
        // represented inside introspection.
        const oldValueStr = stringifyValue(oldArg.defaultValue, oldArg.type);
        const newValueStr = stringifyValue(newArg.defaultValue, newArg.type);
        if (oldValueStr !== newValueStr) {
          schemaChanges.push({
            type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,
            description: `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed defaultValue from ${oldValueStr} to ${newValueStr}.`
          });
        }
      }
    }
  }
  for (const newArg of argsDiff.added) {
    if ((0, _definition.isRequiredArgument)(newArg)) {
      schemaChanges.push({
        type: BreakingChangeType.REQUIRED_ARG_ADDED,
        description: `A required arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.`
      });
    } else {
      schemaChanges.push({
        type: DangerousChangeType.OPTIONAL_ARG_ADDED,
        description: `An optional arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.`
      });
    }
  }
  return schemaChanges;
}
function isChangeSafeForObjectOrInterfaceField(oldType, newType) {
  if ((0, _definition.isListType)(oldType)) {
    return (
      // if they're both lists, make sure the underlying types are compatible
      (0, _definition.isListType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType) ||
      // moving from nullable to non-null of the same underlying type is safe
      (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType)
    );
  }
  if ((0, _definition.isNonNullType)(oldType)) {
    // if they're both non-null, make sure the underlying types are compatible
    return (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType);
  }
  return (
    // if they're both named types, see if their names are equivalent
    (0, _definition.isNamedType)(newType) && oldType.name === newType.name ||
    // moving from nullable to non-null of the same underlying type is safe
    (0, _definition.isNonNullType)(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType)
  );
}
function isChangeSafeForInputObjectFieldOrFieldArg(oldType, newType) {
  if ((0, _definition.isListType)(oldType)) {
    // if they're both lists, make sure the underlying types are compatible
    return (0, _definition.isListType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType);
  }
  if ((0, _definition.isNonNullType)(oldType)) {
    return (
      // if they're both non-null, make sure the underlying types are
      // compatible
      (0, _definition.isNonNullType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType) ||
      // moving from non-null to nullable of the same underlying type is safe
      !(0, _definition.isNonNullType)(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType)
    );
  } // if they're both named types, see if their names are equivalent

  return (0, _definition.isNamedType)(newType) && oldType.name === newType.name;
}
function typeKindName(type) {
  if ((0, _definition.isScalarType)(type)) {
    return 'a Scalar type';
  }
  if ((0, _definition.isObjectType)(type)) {
    return 'an Object type';
  }
  if ((0, _definition.isInterfaceType)(type)) {
    return 'an Interface type';
  }
  if ((0, _definition.isUnionType)(type)) {
    return 'a Union type';
  }
  if ((0, _definition.isEnumType)(type)) {
    return 'an Enum type';
  }
  if ((0, _definition.isInputObjectType)(type)) {
    return 'an Input type';
  }
  /* c8 ignore next 3 */
  // Not reachable, all possible types have been considered.

   false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type));
}
function stringifyValue(value, type) {
  const ast = (0, _astFromValue.astFromValue)(value, type);
  ast != null || (0, _invariant.invariant)(false);
  return (0, _printer.print)((0, _sortValueNode.sortValueNode)(ast));
}
function diff(oldArray, newArray) {
  const added = [];
  const removed = [];
  const persisted = [];
  const oldMap = (0, _keyMap.keyMap)(oldArray, _ref => {
    let {
      name
    } = _ref;
    return name;
  });
  const newMap = (0, _keyMap.keyMap)(newArray, _ref2 => {
    let {
      name
    } = _ref2;
    return name;
  });
  for (const oldItem of oldArray) {
    const newItem = newMap[oldItem.name];
    if (newItem === undefined) {
      removed.push(oldItem);
    } else {
      persisted.push([oldItem, newItem]);
    }
  }
  for (const newItem of newArray) {
    if (oldMap[newItem.name] === undefined) {
      added.push(newItem);
    }
  }
  return {
    added,
    persisted,
    removed
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs":
/*!*************************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs ***!
  \*************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getIntrospectionQuery = getIntrospectionQuery;
/**
 * Produce the GraphQL query recommended for a full schema introspection.
 * Accepts optional IntrospectionOptions.
 */
function getIntrospectionQuery(options) {
  const optionsWithDefault = {
    descriptions: true,
    specifiedByUrl: false,
    directiveIsRepeatable: false,
    schemaDescription: false,
    inputValueDeprecation: false,
    ...options
  };
  const descriptions = optionsWithDefault.descriptions ? 'description' : '';
  const specifiedByUrl = optionsWithDefault.specifiedByUrl ? 'specifiedByURL' : '';
  const directiveIsRepeatable = optionsWithDefault.directiveIsRepeatable ? 'isRepeatable' : '';
  const schemaDescription = optionsWithDefault.schemaDescription ? descriptions : '';
  function inputDeprecation(str) {
    return optionsWithDefault.inputValueDeprecation ? str : '';
  }
  return `
    query IntrospectionQuery {
      __schema {
        ${schemaDescription}
        queryType { name }
        mutationType { name }
        subscriptionType { name }
        types {
          ...FullType
        }
        directives {
          name
          ${descriptions}
          ${directiveIsRepeatable}
          locations
          args${inputDeprecation('(includeDeprecated: true)')} {
            ...InputValue
          }
        }
      }
    }

    fragment FullType on __Type {
      kind
      name
      ${descriptions}
      ${specifiedByUrl}
      fields(includeDeprecated: true) {
        name
        ${descriptions}
        args${inputDeprecation('(includeDeprecated: true)')} {
          ...InputValue
        }
        type {
          ...TypeRef
        }
        isDeprecated
        deprecationReason
      }
      inputFields${inputDeprecation('(includeDeprecated: true)')} {
        ...InputValue
      }
      interfaces {
        ...TypeRef
      }
      enumValues(includeDeprecated: true) {
        name
        ${descriptions}
        isDeprecated
        deprecationReason
      }
      possibleTypes {
        ...TypeRef
      }
    }

    fragment InputValue on __InputValue {
      name
      ${descriptions}
      type { ...TypeRef }
      defaultValue
      ${inputDeprecation('isDeprecated')}
      ${inputDeprecation('deprecationReason')}
    }

    fragment TypeRef on __Type {
      kind
      name
      ofType {
        kind
        name
        ofType {
          kind
          name
          ofType {
            kind
            name
            ofType {
              kind
              name
              ofType {
                kind
                name
                ofType {
                  kind
                  name
                  ofType {
                    kind
                    name
                    ofType {
                      kind
                      name
                      ofType {
                        kind
                        name
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  `;
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/getOperationAST.mjs":
/*!*******************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/getOperationAST.mjs ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getOperationAST = getOperationAST;
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
/**
 * Returns an operation AST given a document AST and optionally an operation
 * name. If a name is not provided, an operation is only returned if only one is
 * provided in the document.
 */

function getOperationAST(documentAST, operationName) {
  let operation = null;
  for (const definition of documentAST.definitions) {
    if (definition.kind === _kinds.Kind.OPERATION_DEFINITION) {
      var _definition$name;
      if (operationName == null) {
        // If no operation name was provided, only return an Operation if there
        // is one defined in the document. Upon encountering the second, return
        // null.
        if (operation) {
          return null;
        }
        operation = definition;
      } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) {
        return definition;
      }
    }
  }
  return operation;
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/getOperationRootType.mjs":
/*!************************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/getOperationRootType.mjs ***!
  \************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getOperationRootType = getOperationRootType;
var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Extracts the root type of the operation from the schema.
 *
 * @deprecated Please use `GraphQLSchema.getRootType` instead. Will be removed in v17
 */
function getOperationRootType(schema, operation) {
  if (operation.operation === 'query') {
    const queryType = schema.getQueryType();
    if (!queryType) {
      throw new _GraphQLError.GraphQLError('Schema does not define the required query root type.', {
        nodes: operation
      });
    }
    return queryType;
  }
  if (operation.operation === 'mutation') {
    const mutationType = schema.getMutationType();
    if (!mutationType) {
      throw new _GraphQLError.GraphQLError('Schema is not configured for mutations.', {
        nodes: operation
      });
    }
    return mutationType;
  }
  if (operation.operation === 'subscription') {
    const subscriptionType = schema.getSubscriptionType();
    if (!subscriptionType) {
      throw new _GraphQLError.GraphQLError('Schema is not configured for subscriptions.', {
        nodes: operation
      });
    }
    return subscriptionType;
  }
  throw new _GraphQLError.GraphQLError('Can only have query, mutation and subscription operations.', {
    nodes: operation
  });
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/index.mjs":
/*!*********************************************************!*\
  !*** ../../../node_modules/graphql/utilities/index.mjs ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "BreakingChangeType", ({
  enumerable: true,
  get: function () {
    return _findBreakingChanges.BreakingChangeType;
  }
}));
Object.defineProperty(exports, "DangerousChangeType", ({
  enumerable: true,
  get: function () {
    return _findBreakingChanges.DangerousChangeType;
  }
}));
Object.defineProperty(exports, "TypeInfo", ({
  enumerable: true,
  get: function () {
    return _TypeInfo.TypeInfo;
  }
}));
Object.defineProperty(exports, "assertValidName", ({
  enumerable: true,
  get: function () {
    return _assertValidName.assertValidName;
  }
}));
Object.defineProperty(exports, "astFromValue", ({
  enumerable: true,
  get: function () {
    return _astFromValue.astFromValue;
  }
}));
Object.defineProperty(exports, "buildASTSchema", ({
  enumerable: true,
  get: function () {
    return _buildASTSchema.buildASTSchema;
  }
}));
Object.defineProperty(exports, "buildClientSchema", ({
  enumerable: true,
  get: function () {
    return _buildClientSchema.buildClientSchema;
  }
}));
Object.defineProperty(exports, "buildSchema", ({
  enumerable: true,
  get: function () {
    return _buildASTSchema.buildSchema;
  }
}));
Object.defineProperty(exports, "coerceInputValue", ({
  enumerable: true,
  get: function () {
    return _coerceInputValue.coerceInputValue;
  }
}));
Object.defineProperty(exports, "concatAST", ({
  enumerable: true,
  get: function () {
    return _concatAST.concatAST;
  }
}));
Object.defineProperty(exports, "doTypesOverlap", ({
  enumerable: true,
  get: function () {
    return _typeComparators.doTypesOverlap;
  }
}));
Object.defineProperty(exports, "extendSchema", ({
  enumerable: true,
  get: function () {
    return _extendSchema.extendSchema;
  }
}));
Object.defineProperty(exports, "findBreakingChanges", ({
  enumerable: true,
  get: function () {
    return _findBreakingChanges.findBreakingChanges;
  }
}));
Object.defineProperty(exports, "findDangerousChanges", ({
  enumerable: true,
  get: function () {
    return _findBreakingChanges.findDangerousChanges;
  }
}));
Object.defineProperty(exports, "getIntrospectionQuery", ({
  enumerable: true,
  get: function () {
    return _getIntrospectionQuery.getIntrospectionQuery;
  }
}));
Object.defineProperty(exports, "getOperationAST", ({
  enumerable: true,
  get: function () {
    return _getOperationAST.getOperationAST;
  }
}));
Object.defineProperty(exports, "getOperationRootType", ({
  enumerable: true,
  get: function () {
    return _getOperationRootType.getOperationRootType;
  }
}));
Object.defineProperty(exports, "introspectionFromSchema", ({
  enumerable: true,
  get: function () {
    return _introspectionFromSchema.introspectionFromSchema;
  }
}));
Object.defineProperty(exports, "isEqualType", ({
  enumerable: true,
  get: function () {
    return _typeComparators.isEqualType;
  }
}));
Object.defineProperty(exports, "isTypeSubTypeOf", ({
  enumerable: true,
  get: function () {
    return _typeComparators.isTypeSubTypeOf;
  }
}));
Object.defineProperty(exports, "isValidNameError", ({
  enumerable: true,
  get: function () {
    return _assertValidName.isValidNameError;
  }
}));
Object.defineProperty(exports, "lexicographicSortSchema", ({
  enumerable: true,
  get: function () {
    return _lexicographicSortSchema.lexicographicSortSchema;
  }
}));
Object.defineProperty(exports, "printIntrospectionSchema", ({
  enumerable: true,
  get: function () {
    return _printSchema.printIntrospectionSchema;
  }
}));
Object.defineProperty(exports, "printSchema", ({
  enumerable: true,
  get: function () {
    return _printSchema.printSchema;
  }
}));
Object.defineProperty(exports, "printType", ({
  enumerable: true,
  get: function () {
    return _printSchema.printType;
  }
}));
Object.defineProperty(exports, "separateOperations", ({
  enumerable: true,
  get: function () {
    return _separateOperations.separateOperations;
  }
}));
Object.defineProperty(exports, "stripIgnoredCharacters", ({
  enumerable: true,
  get: function () {
    return _stripIgnoredCharacters.stripIgnoredCharacters;
  }
}));
Object.defineProperty(exports, "typeFromAST", ({
  enumerable: true,
  get: function () {
    return _typeFromAST.typeFromAST;
  }
}));
Object.defineProperty(exports, "valueFromAST", ({
  enumerable: true,
  get: function () {
    return _valueFromAST.valueFromAST;
  }
}));
Object.defineProperty(exports, "valueFromASTUntyped", ({
  enumerable: true,
  get: function () {
    return _valueFromASTUntyped.valueFromASTUntyped;
  }
}));
Object.defineProperty(exports, "visitWithTypeInfo", ({
  enumerable: true,
  get: function () {
    return _TypeInfo.visitWithTypeInfo;
  }
}));
var _getIntrospectionQuery = __webpack_require__(/*! ./getIntrospectionQuery.mjs */ "../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs");
var _getOperationAST = __webpack_require__(/*! ./getOperationAST.mjs */ "../../../node_modules/graphql/utilities/getOperationAST.mjs");
var _getOperationRootType = __webpack_require__(/*! ./getOperationRootType.mjs */ "../../../node_modules/graphql/utilities/getOperationRootType.mjs");
var _introspectionFromSchema = __webpack_require__(/*! ./introspectionFromSchema.mjs */ "../../../node_modules/graphql/utilities/introspectionFromSchema.mjs");
var _buildClientSchema = __webpack_require__(/*! ./buildClientSchema.mjs */ "../../../node_modules/graphql/utilities/buildClientSchema.mjs");
var _buildASTSchema = __webpack_require__(/*! ./buildASTSchema.mjs */ "../../../node_modules/graphql/utilities/buildASTSchema.mjs");
var _extendSchema = __webpack_require__(/*! ./extendSchema.mjs */ "../../../node_modules/graphql/utilities/extendSchema.mjs");
var _lexicographicSortSchema = __webpack_require__(/*! ./lexicographicSortSchema.mjs */ "../../../node_modules/graphql/utilities/lexicographicSortSchema.mjs");
var _printSchema = __webpack_require__(/*! ./printSchema.mjs */ "../../../node_modules/graphql/utilities/printSchema.mjs");
var _typeFromAST = __webpack_require__(/*! ./typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
var _valueFromAST = __webpack_require__(/*! ./valueFromAST.mjs */ "../../../node_modules/graphql/utilities/valueFromAST.mjs");
var _valueFromASTUntyped = __webpack_require__(/*! ./valueFromASTUntyped.mjs */ "../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs");
var _astFromValue = __webpack_require__(/*! ./astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs");
var _TypeInfo = __webpack_require__(/*! ./TypeInfo.mjs */ "../../../node_modules/graphql/utilities/TypeInfo.mjs");
var _coerceInputValue = __webpack_require__(/*! ./coerceInputValue.mjs */ "../../../node_modules/graphql/utilities/coerceInputValue.mjs");
var _concatAST = __webpack_require__(/*! ./concatAST.mjs */ "../../../node_modules/graphql/utilities/concatAST.mjs");
var _separateOperations = __webpack_require__(/*! ./separateOperations.mjs */ "../../../node_modules/graphql/utilities/separateOperations.mjs");
var _stripIgnoredCharacters = __webpack_require__(/*! ./stripIgnoredCharacters.mjs */ "../../../node_modules/graphql/utilities/stripIgnoredCharacters.mjs");
var _typeComparators = __webpack_require__(/*! ./typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs");
var _assertValidName = __webpack_require__(/*! ./assertValidName.mjs */ "../../../node_modules/graphql/utilities/assertValidName.mjs");
var _findBreakingChanges = __webpack_require__(/*! ./findBreakingChanges.mjs */ "../../../node_modules/graphql/utilities/findBreakingChanges.mjs");

/***/ }),

/***/ "../../../node_modules/graphql/utilities/introspectionFromSchema.mjs":
/*!***************************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/introspectionFromSchema.mjs ***!
  \***************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.introspectionFromSchema = introspectionFromSchema;
var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _parser = __webpack_require__(/*! ../language/parser.mjs */ "../../../node_modules/graphql/language/parser.mjs");
var _execute = __webpack_require__(/*! ../execution/execute.mjs */ "../../../node_modules/graphql/execution/execute.mjs");
var _getIntrospectionQuery = __webpack_require__(/*! ./getIntrospectionQuery.mjs */ "../../../node_modules/graphql/utilities/getIntrospectionQuery.mjs");
/**
 * Build an IntrospectionQuery from a GraphQLSchema
 *
 * IntrospectionQuery is useful for utilities that care about type and field
 * relationships, but do not need to traverse through those relationships.
 *
 * This is the inverse of buildClientSchema. The primary use case is outside
 * of the server context, for instance when doing schema comparisons.
 */

function introspectionFromSchema(schema, options) {
  const optionsWithDefaults = {
    specifiedByUrl: true,
    directiveIsRepeatable: true,
    schemaDescription: true,
    inputValueDeprecation: true,
    ...options
  };
  const document = (0, _parser.parse)((0, _getIntrospectionQuery.getIntrospectionQuery)(optionsWithDefaults));
  const result = (0, _execute.executeSync)({
    schema,
    document
  });
  !result.errors && result.data || (0, _invariant.invariant)(false);
  return result.data;
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/lexicographicSortSchema.mjs":
/*!***************************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/lexicographicSortSchema.mjs ***!
  \***************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.lexicographicSortSchema = lexicographicSortSchema;
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _keyValMap = __webpack_require__(/*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs");
var _naturalCompare = __webpack_require__(/*! ../jsutils/naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs");
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
var _schema = __webpack_require__(/*! ../type/schema.mjs */ "../../../node_modules/graphql/type/schema.mjs");
/**
 * Sort GraphQLSchema.
 *
 * This function returns a sorted copy of the given GraphQLSchema.
 */

function lexicographicSortSchema(schema) {
  const schemaConfig = schema.toConfig();
  const typeMap = (0, _keyValMap.keyValMap)(sortByName(schemaConfig.types), type => type.name, sortNamedType);
  return new _schema.GraphQLSchema({
    ...schemaConfig,
    types: Object.values(typeMap),
    directives: sortByName(schemaConfig.directives).map(sortDirective),
    query: replaceMaybeType(schemaConfig.query),
    mutation: replaceMaybeType(schemaConfig.mutation),
    subscription: replaceMaybeType(schemaConfig.subscription)
  });
  function replaceType(type) {
    if ((0, _definition.isListType)(type)) {
      // @ts-expect-error
      return new _definition.GraphQLList(replaceType(type.ofType));
    } else if ((0, _definition.isNonNullType)(type)) {
      // @ts-expect-error
      return new _definition.GraphQLNonNull(replaceType(type.ofType));
    } // @ts-expect-error FIXME: TS Conversion

    return replaceNamedType(type);
  }
  function replaceNamedType(type) {
    return typeMap[type.name];
  }
  function replaceMaybeType(maybeType) {
    return maybeType && replaceNamedType(maybeType);
  }
  function sortDirective(directive) {
    const config = directive.toConfig();
    return new _directives.GraphQLDirective({
      ...config,
      locations: sortBy(config.locations, x => x),
      args: sortArgs(config.args)
    });
  }
  function sortArgs(args) {
    return sortObjMap(args, arg => ({
      ...arg,
      type: replaceType(arg.type)
    }));
  }
  function sortFields(fieldsMap) {
    return sortObjMap(fieldsMap, field => ({
      ...field,
      type: replaceType(field.type),
      args: field.args && sortArgs(field.args)
    }));
  }
  function sortInputFields(fieldsMap) {
    return sortObjMap(fieldsMap, field => ({
      ...field,
      type: replaceType(field.type)
    }));
  }
  function sortTypes(array) {
    return sortByName(array).map(replaceNamedType);
  }
  function sortNamedType(type) {
    if ((0, _definition.isScalarType)(type) || (0, _introspection.isIntrospectionType)(type)) {
      return type;
    }
    if ((0, _definition.isObjectType)(type)) {
      const config = type.toConfig();
      return new _definition.GraphQLObjectType({
        ...config,
        interfaces: () => sortTypes(config.interfaces),
        fields: () => sortFields(config.fields)
      });
    }
    if ((0, _definition.isInterfaceType)(type)) {
      const config = type.toConfig();
      return new _definition.GraphQLInterfaceType({
        ...config,
        interfaces: () => sortTypes(config.interfaces),
        fields: () => sortFields(config.fields)
      });
    }
    if ((0, _definition.isUnionType)(type)) {
      const config = type.toConfig();
      return new _definition.GraphQLUnionType({
        ...config,
        types: () => sortTypes(config.types)
      });
    }
    if ((0, _definition.isEnumType)(type)) {
      const config = type.toConfig();
      return new _definition.GraphQLEnumType({
        ...config,
        values: sortObjMap(config.values, value => value)
      });
    }
    if ((0, _definition.isInputObjectType)(type)) {
      const config = type.toConfig();
      return new _definition.GraphQLInputObjectType({
        ...config,
        fields: () => sortInputFields(config.fields)
      });
    }
    /* c8 ignore next 3 */
    // Not reachable, all possible types have been considered.

     false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type));
  }
}
function sortObjMap(map, sortValueFn) {
  const sortedMap = Object.create(null);
  for (const key of Object.keys(map).sort(_naturalCompare.naturalCompare)) {
    sortedMap[key] = sortValueFn(map[key]);
  }
  return sortedMap;
}
function sortByName(array) {
  return sortBy(array, obj => obj.name);
}
function sortBy(array, mapToKey) {
  return array.slice().sort((obj1, obj2) => {
    const key1 = mapToKey(obj1);
    const key2 = mapToKey(obj2);
    return (0, _naturalCompare.naturalCompare)(key1, key2);
  });
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/printSchema.mjs":
/*!***************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/printSchema.mjs ***!
  \***************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.printIntrospectionSchema = printIntrospectionSchema;
exports.printSchema = printSchema;
exports.printType = printType;
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _blockString = __webpack_require__(/*! ../language/blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs");
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _printer = __webpack_require__(/*! ../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _directives = __webpack_require__(/*! ../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
var _introspection = __webpack_require__(/*! ../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
var _scalars = __webpack_require__(/*! ../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
var _astFromValue = __webpack_require__(/*! ./astFromValue.mjs */ "../../../node_modules/graphql/utilities/astFromValue.mjs");
function printSchema(schema) {
  return printFilteredSchema(schema, n => !(0, _directives.isSpecifiedDirective)(n), isDefinedType);
}
function printIntrospectionSchema(schema) {
  return printFilteredSchema(schema, _directives.isSpecifiedDirective, _introspection.isIntrospectionType);
}
function isDefinedType(type) {
  return !(0, _scalars.isSpecifiedScalarType)(type) && !(0, _introspection.isIntrospectionType)(type);
}
function printFilteredSchema(schema, directiveFilter, typeFilter) {
  const directives = schema.getDirectives().filter(directiveFilter);
  const types = Object.values(schema.getTypeMap()).filter(typeFilter);
  return [printSchemaDefinition(schema), ...directives.map(directive => printDirective(directive)), ...types.map(type => printType(type))].filter(Boolean).join('\n\n');
}
function printSchemaDefinition(schema) {
  if (schema.description == null && isSchemaOfCommonNames(schema)) {
    return;
  }
  const operationTypes = [];
  const queryType = schema.getQueryType();
  if (queryType) {
    operationTypes.push(`  query: ${queryType.name}`);
  }
  const mutationType = schema.getMutationType();
  if (mutationType) {
    operationTypes.push(`  mutation: ${mutationType.name}`);
  }
  const subscriptionType = schema.getSubscriptionType();
  if (subscriptionType) {
    operationTypes.push(`  subscription: ${subscriptionType.name}`);
  }
  return printDescription(schema) + `schema {\n${operationTypes.join('\n')}\n}`;
}
/**
 * GraphQL schema define root types for each type of operation. These types are
 * the same as any other type and can be named in any manner, however there is
 * a common naming convention:
 *
 * ```graphql
 *   schema {
 *     query: Query
 *     mutation: Mutation
 *     subscription: Subscription
 *   }
 * ```
 *
 * When using this naming convention, the schema description can be omitted.
 */

function isSchemaOfCommonNames(schema) {
  const queryType = schema.getQueryType();
  if (queryType && queryType.name !== 'Query') {
    return false;
  }
  const mutationType = schema.getMutationType();
  if (mutationType && mutationType.name !== 'Mutation') {
    return false;
  }
  const subscriptionType = schema.getSubscriptionType();
  if (subscriptionType && subscriptionType.name !== 'Subscription') {
    return false;
  }
  return true;
}
function printType(type) {
  if ((0, _definition.isScalarType)(type)) {
    return printScalar(type);
  }
  if ((0, _definition.isObjectType)(type)) {
    return printObject(type);
  }
  if ((0, _definition.isInterfaceType)(type)) {
    return printInterface(type);
  }
  if ((0, _definition.isUnionType)(type)) {
    return printUnion(type);
  }
  if ((0, _definition.isEnumType)(type)) {
    return printEnum(type);
  }
  if ((0, _definition.isInputObjectType)(type)) {
    return printInputObject(type);
  }
  /* c8 ignore next 3 */
  // Not reachable, all possible types have been considered.

   false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type));
}
function printScalar(type) {
  return printDescription(type) + `scalar ${type.name}` + printSpecifiedByURL(type);
}
function printImplementedInterfaces(type) {
  const interfaces = type.getInterfaces();
  return interfaces.length ? ' implements ' + interfaces.map(i => i.name).join(' & ') : '';
}
function printObject(type) {
  return printDescription(type) + `type ${type.name}` + printImplementedInterfaces(type) + printFields(type);
}
function printInterface(type) {
  return printDescription(type) + `interface ${type.name}` + printImplementedInterfaces(type) + printFields(type);
}
function printUnion(type) {
  const types = type.getTypes();
  const possibleTypes = types.length ? ' = ' + types.join(' | ') : '';
  return printDescription(type) + 'union ' + type.name + possibleTypes;
}
function printEnum(type) {
  const values = type.getValues().map((value, i) => printDescription(value, '  ', !i) + '  ' + value.name + printDeprecated(value.deprecationReason));
  return printDescription(type) + `enum ${type.name}` + printBlock(values);
}
function printInputObject(type) {
  const fields = Object.values(type.getFields()).map((f, i) => printDescription(f, '  ', !i) + '  ' + printInputValue(f));
  return printDescription(type) + `input ${type.name}` + printBlock(fields);
}
function printFields(type) {
  const fields = Object.values(type.getFields()).map((f, i) => printDescription(f, '  ', !i) + '  ' + f.name + printArgs(f.args, '  ') + ': ' + String(f.type) + printDeprecated(f.deprecationReason));
  return printBlock(fields);
}
function printBlock(items) {
  return items.length !== 0 ? ' {\n' + items.join('\n') + '\n}' : '';
}
function printArgs(args) {
  let indentation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  if (args.length === 0) {
    return '';
  } // If every arg does not have a description, print them on one line.

  if (args.every(arg => !arg.description)) {
    return '(' + args.map(printInputValue).join(', ') + ')';
  }
  return '(\n' + args.map((arg, i) => printDescription(arg, '  ' + indentation, !i) + '  ' + indentation + printInputValue(arg)).join('\n') + '\n' + indentation + ')';
}
function printInputValue(arg) {
  const defaultAST = (0, _astFromValue.astFromValue)(arg.defaultValue, arg.type);
  let argDecl = arg.name + ': ' + String(arg.type);
  if (defaultAST) {
    argDecl += ` = ${(0, _printer.print)(defaultAST)}`;
  }
  return argDecl + printDeprecated(arg.deprecationReason);
}
function printDirective(directive) {
  return printDescription(directive) + 'directive @' + directive.name + printArgs(directive.args) + (directive.isRepeatable ? ' repeatable' : '') + ' on ' + directive.locations.join(' | ');
}
function printDeprecated(reason) {
  if (reason == null) {
    return '';
  }
  if (reason !== _directives.DEFAULT_DEPRECATION_REASON) {
    const astValue = (0, _printer.print)({
      kind: _kinds.Kind.STRING,
      value: reason
    });
    return ` @deprecated(reason: ${astValue})`;
  }
  return ' @deprecated';
}
function printSpecifiedByURL(scalar) {
  if (scalar.specifiedByURL == null) {
    return '';
  }
  const astValue = (0, _printer.print)({
    kind: _kinds.Kind.STRING,
    value: scalar.specifiedByURL
  });
  return ` @specifiedBy(url: ${astValue})`;
}
function printDescription(def) {
  let indentation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  let firstInBlock = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  const {
    description
  } = def;
  if (description == null) {
    return '';
  }
  const blockString = (0, _printer.print)({
    kind: _kinds.Kind.STRING,
    value: description,
    block: (0, _blockString.isPrintableAsBlockString)(description)
  });
  const prefix = indentation && !firstInBlock ? '\n' + indentation : indentation;
  return prefix + blockString.replace(/\n/g, '\n' + indentation) + '\n';
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/separateOperations.mjs":
/*!**********************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/separateOperations.mjs ***!
  \**********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.separateOperations = separateOperations;
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _visitor = __webpack_require__(/*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs");
/**
 * separateOperations accepts a single AST document which may contain many
 * operations and fragments and returns a collection of AST documents each of
 * which contains a single operation as well the fragment definitions it
 * refers to.
 */

function separateOperations(documentAST) {
  const operations = [];
  const depGraph = Object.create(null); // Populate metadata and build a dependency graph.

  for (const definitionNode of documentAST.definitions) {
    switch (definitionNode.kind) {
      case _kinds.Kind.OPERATION_DEFINITION:
        operations.push(definitionNode);
        break;
      case _kinds.Kind.FRAGMENT_DEFINITION:
        depGraph[definitionNode.name.value] = collectDependencies(definitionNode.selectionSet);
        break;
      default: // ignore non-executable definitions
    }
  } // For each operation, produce a new synthesized AST which includes only what
  // is necessary for completing that operation.

  const separatedDocumentASTs = Object.create(null);
  for (const operation of operations) {
    const dependencies = new Set();
    for (const fragmentName of collectDependencies(operation.selectionSet)) {
      collectTransitiveDependencies(dependencies, depGraph, fragmentName);
    } // Provides the empty string for anonymous operations.

    const operationName = operation.name ? operation.name.value : ''; // The list of definition nodes to be included for this operation, sorted
    // to retain the same order as the original document.

    separatedDocumentASTs[operationName] = {
      kind: _kinds.Kind.DOCUMENT,
      definitions: documentAST.definitions.filter(node => node === operation || node.kind === _kinds.Kind.FRAGMENT_DEFINITION && dependencies.has(node.name.value))
    };
  }
  return separatedDocumentASTs;
}

// From a dependency graph, collects a list of transitive dependencies by
// recursing through a dependency graph.
function collectTransitiveDependencies(collected, depGraph, fromName) {
  if (!collected.has(fromName)) {
    collected.add(fromName);
    const immediateDeps = depGraph[fromName];
    if (immediateDeps !== undefined) {
      for (const toName of immediateDeps) {
        collectTransitiveDependencies(collected, depGraph, toName);
      }
    }
  }
}
function collectDependencies(selectionSet) {
  const dependencies = [];
  (0, _visitor.visit)(selectionSet, {
    FragmentSpread(node) {
      dependencies.push(node.name.value);
    }
  });
  return dependencies;
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/sortValueNode.mjs":
/*!*****************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/sortValueNode.mjs ***!
  \*****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.sortValueNode = sortValueNode;
var _naturalCompare = __webpack_require__(/*! ../jsutils/naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs");
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
/**
 * Sort ValueNode.
 *
 * This function returns a sorted copy of the given ValueNode.
 *
 * @internal
 */

function sortValueNode(valueNode) {
  switch (valueNode.kind) {
    case _kinds.Kind.OBJECT:
      return {
        ...valueNode,
        fields: sortFields(valueNode.fields)
      };
    case _kinds.Kind.LIST:
      return {
        ...valueNode,
        values: valueNode.values.map(sortValueNode)
      };
    case _kinds.Kind.INT:
    case _kinds.Kind.FLOAT:
    case _kinds.Kind.STRING:
    case _kinds.Kind.BOOLEAN:
    case _kinds.Kind.NULL:
    case _kinds.Kind.ENUM:
    case _kinds.Kind.VARIABLE:
      return valueNode;
  }
}
function sortFields(fields) {
  return fields.map(fieldNode => ({
    ...fieldNode,
    value: sortValueNode(fieldNode.value)
  })).sort((fieldA, fieldB) => (0, _naturalCompare.naturalCompare)(fieldA.name.value, fieldB.name.value));
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/stripIgnoredCharacters.mjs":
/*!**************************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/stripIgnoredCharacters.mjs ***!
  \**************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.stripIgnoredCharacters = stripIgnoredCharacters;
var _blockString = __webpack_require__(/*! ../language/blockString.mjs */ "../../../node_modules/graphql/language/blockString.mjs");
var _lexer = __webpack_require__(/*! ../language/lexer.mjs */ "../../../node_modules/graphql/language/lexer.mjs");
var _source = __webpack_require__(/*! ../language/source.mjs */ "../../../node_modules/graphql/language/source.mjs");
var _tokenKind = __webpack_require__(/*! ../language/tokenKind.mjs */ "../../../node_modules/graphql/language/tokenKind.mjs");
/**
 * Strips characters that are not significant to the validity or execution
 * of a GraphQL document:
 *   - UnicodeBOM
 *   - WhiteSpace
 *   - LineTerminator
 *   - Comment
 *   - Comma
 *   - BlockString indentation
 *
 * Note: It is required to have a delimiter character between neighboring
 * non-punctuator tokens and this function always uses single space as delimiter.
 *
 * It is guaranteed that both input and output documents if parsed would result
 * in the exact same AST except for nodes location.
 *
 * Warning: It is guaranteed that this function will always produce stable results.
 * However, it's not guaranteed that it will stay the same between different
 * releases due to bugfixes or changes in the GraphQL specification.
 *
 * Query example:
 *
 * ```graphql
 * query SomeQuery($foo: String!, $bar: String) {
 *   someField(foo: $foo, bar: $bar) {
 *     a
 *     b {
 *       c
 *       d
 *     }
 *   }
 * }
 * ```
 *
 * Becomes:
 *
 * ```graphql
 * query SomeQuery($foo:String!$bar:String){someField(foo:$foo bar:$bar){a b{c d}}}
 * ```
 *
 * SDL example:
 *
 * ```graphql
 * """
 * Type description
 * """
 * type Foo {
 *   """
 *   Field description
 *   """
 *   bar: String
 * }
 * ```
 *
 * Becomes:
 *
 * ```graphql
 * """Type description""" type Foo{"""Field description""" bar:String}
 * ```
 */

function stripIgnoredCharacters(source) {
  const sourceObj = (0, _source.isSource)(source) ? source : new _source.Source(source);
  const body = sourceObj.body;
  const lexer = new _lexer.Lexer(sourceObj);
  let strippedBody = '';
  let wasLastAddedTokenNonPunctuator = false;
  while (lexer.advance().kind !== _tokenKind.TokenKind.EOF) {
    const currentToken = lexer.token;
    const tokenKind = currentToken.kind;
    /**
     * Every two non-punctuator tokens should have space between them.
     * Also prevent case of non-punctuator token following by spread resulting
     * in invalid token (e.g. `1...` is invalid Float token).
     */

    const isNonPunctuator = !(0, _lexer.isPunctuatorTokenKind)(currentToken.kind);
    if (wasLastAddedTokenNonPunctuator) {
      if (isNonPunctuator || currentToken.kind === _tokenKind.TokenKind.SPREAD) {
        strippedBody += ' ';
      }
    }
    const tokenBody = body.slice(currentToken.start, currentToken.end);
    if (tokenKind === _tokenKind.TokenKind.BLOCK_STRING) {
      strippedBody += (0, _blockString.printBlockString)(currentToken.value, {
        minimize: true
      });
    } else {
      strippedBody += tokenBody;
    }
    wasLastAddedTokenNonPunctuator = isNonPunctuator;
  }
  return strippedBody;
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/typeComparators.mjs":
/*!*******************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/typeComparators.mjs ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.doTypesOverlap = doTypesOverlap;
exports.isEqualType = isEqualType;
exports.isTypeSubTypeOf = isTypeSubTypeOf;
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
/**
 * Provided two types, return true if the types are equal (invariant).
 */
function isEqualType(typeA, typeB) {
  // Equivalent types are equal.
  if (typeA === typeB) {
    return true;
  } // If either type is non-null, the other must also be non-null.

  if ((0, _definition.isNonNullType)(typeA) && (0, _definition.isNonNullType)(typeB)) {
    return isEqualType(typeA.ofType, typeB.ofType);
  } // If either type is a list, the other must also be a list.

  if ((0, _definition.isListType)(typeA) && (0, _definition.isListType)(typeB)) {
    return isEqualType(typeA.ofType, typeB.ofType);
  } // Otherwise the types are not equal.

  return false;
}
/**
 * Provided a type and a super type, return true if the first type is either
 * equal or a subset of the second super type (covariant).
 */

function isTypeSubTypeOf(schema, maybeSubType, superType) {
  // Equivalent type is a valid subtype
  if (maybeSubType === superType) {
    return true;
  } // If superType is non-null, maybeSubType must also be non-null.

  if ((0, _definition.isNonNullType)(superType)) {
    if ((0, _definition.isNonNullType)(maybeSubType)) {
      return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType);
    }
    return false;
  }
  if ((0, _definition.isNonNullType)(maybeSubType)) {
    // If superType is nullable, maybeSubType may be non-null or nullable.
    return isTypeSubTypeOf(schema, maybeSubType.ofType, superType);
  } // If superType type is a list, maybeSubType type must also be a list.

  if ((0, _definition.isListType)(superType)) {
    if ((0, _definition.isListType)(maybeSubType)) {
      return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType);
    }
    return false;
  }
  if ((0, _definition.isListType)(maybeSubType)) {
    // If superType is not a list, maybeSubType must also be not a list.
    return false;
  } // If superType type is an abstract type, check if it is super type of maybeSubType.
  // Otherwise, the child type is not a valid subtype of the parent type.

  return (0, _definition.isAbstractType)(superType) && ((0, _definition.isInterfaceType)(maybeSubType) || (0, _definition.isObjectType)(maybeSubType)) && schema.isSubType(superType, maybeSubType);
}
/**
 * Provided two composite types, determine if they "overlap". Two composite
 * types overlap when the Sets of possible concrete types for each intersect.
 *
 * This is often used to determine if a fragment of a given type could possibly
 * be visited in a context of another type.
 *
 * This function is commutative.
 */

function doTypesOverlap(schema, typeA, typeB) {
  // Equivalent types overlap
  if (typeA === typeB) {
    return true;
  }
  if ((0, _definition.isAbstractType)(typeA)) {
    if ((0, _definition.isAbstractType)(typeB)) {
      // If both types are abstract, then determine if there is any intersection
      // between possible concrete types of each.
      return schema.getPossibleTypes(typeA).some(type => schema.isSubType(typeB, type));
    } // Determine if the latter type is a possible concrete type of the former.

    return schema.isSubType(typeA, typeB);
  }
  if ((0, _definition.isAbstractType)(typeB)) {
    // Determine if the former type is a possible concrete type of the latter.
    return schema.isSubType(typeB, typeA);
  } // Otherwise the types do not overlap.

  return false;
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/typeFromAST.mjs":
/*!***************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/typeFromAST.mjs ***!
  \***************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.typeFromAST = typeFromAST;
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
function typeFromAST(schema, typeNode) {
  switch (typeNode.kind) {
    case _kinds.Kind.LIST_TYPE:
      {
        const innerType = typeFromAST(schema, typeNode.type);
        return innerType && new _definition.GraphQLList(innerType);
      }
    case _kinds.Kind.NON_NULL_TYPE:
      {
        const innerType = typeFromAST(schema, typeNode.type);
        return innerType && new _definition.GraphQLNonNull(innerType);
      }
    case _kinds.Kind.NAMED_TYPE:
      return schema.getType(typeNode.name.value);
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/valueFromAST.mjs":
/*!****************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/valueFromAST.mjs ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.valueFromAST = valueFromAST;
var _inspect = __webpack_require__(/*! ../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _invariant = __webpack_require__(/*! ../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _keyMap = __webpack_require__(/*! ../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _definition = __webpack_require__(/*! ../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
/**
 * Produces a JavaScript value given a GraphQL Value AST.
 *
 * A GraphQL type must be provided, which will be used to interpret different
 * GraphQL Value literals.
 *
 * Returns `undefined` when the value could not be validly coerced according to
 * the provided type.
 *
 * | GraphQL Value        | JSON Value    |
 * | -------------------- | ------------- |
 * | Input Object         | Object        |
 * | List                 | Array         |
 * | Boolean              | Boolean       |
 * | String               | String        |
 * | Int / Float          | Number        |
 * | Enum Value           | Unknown       |
 * | NullValue            | null          |
 *
 */

function valueFromAST(valueNode, type, variables) {
  if (!valueNode) {
    // When there is no node, then there is also no value.
    // Importantly, this is different from returning the value null.
    return;
  }
  if (valueNode.kind === _kinds.Kind.VARIABLE) {
    const variableName = valueNode.name.value;
    if (variables == null || variables[variableName] === undefined) {
      // No valid return value.
      return;
    }
    const variableValue = variables[variableName];
    if (variableValue === null && (0, _definition.isNonNullType)(type)) {
      return; // Invalid: intentionally return no value.
    } // Note: This does no further checking that this variable is correct.
    // This assumes that this query has been validated and the variable
    // usage here is of the correct type.

    return variableValue;
  }
  if ((0, _definition.isNonNullType)(type)) {
    if (valueNode.kind === _kinds.Kind.NULL) {
      return; // Invalid: intentionally return no value.
    }

    return valueFromAST(valueNode, type.ofType, variables);
  }
  if (valueNode.kind === _kinds.Kind.NULL) {
    // This is explicitly returning the value null.
    return null;
  }
  if ((0, _definition.isListType)(type)) {
    const itemType = type.ofType;
    if (valueNode.kind === _kinds.Kind.LIST) {
      const coercedValues = [];
      for (const itemNode of valueNode.values) {
        if (isMissingVariable(itemNode, variables)) {
          // If an array contains a missing variable, it is either coerced to
          // null or if the item type is non-null, it considered invalid.
          if ((0, _definition.isNonNullType)(itemType)) {
            return; // Invalid: intentionally return no value.
          }

          coercedValues.push(null);
        } else {
          const itemValue = valueFromAST(itemNode, itemType, variables);
          if (itemValue === undefined) {
            return; // Invalid: intentionally return no value.
          }

          coercedValues.push(itemValue);
        }
      }
      return coercedValues;
    }
    const coercedValue = valueFromAST(valueNode, itemType, variables);
    if (coercedValue === undefined) {
      return; // Invalid: intentionally return no value.
    }

    return [coercedValue];
  }
  if ((0, _definition.isInputObjectType)(type)) {
    if (valueNode.kind !== _kinds.Kind.OBJECT) {
      return; // Invalid: intentionally return no value.
    }

    const coercedObj = Object.create(null);
    const fieldNodes = (0, _keyMap.keyMap)(valueNode.fields, field => field.name.value);
    for (const field of Object.values(type.getFields())) {
      const fieldNode = fieldNodes[field.name];
      if (!fieldNode || isMissingVariable(fieldNode.value, variables)) {
        if (field.defaultValue !== undefined) {
          coercedObj[field.name] = field.defaultValue;
        } else if ((0, _definition.isNonNullType)(field.type)) {
          return; // Invalid: intentionally return no value.
        }

        continue;
      }
      const fieldValue = valueFromAST(fieldNode.value, field.type, variables);
      if (fieldValue === undefined) {
        return; // Invalid: intentionally return no value.
      }

      coercedObj[field.name] = fieldValue;
    }
    return coercedObj;
  }
  if ((0, _definition.isLeafType)(type)) {
    // Scalars and Enums fulfill parsing a literal value via parseLiteral().
    // Invalid values represent a failure to parse correctly, in which case
    // no value is returned.
    let result;
    try {
      result = type.parseLiteral(valueNode, variables);
    } catch (_error) {
      return; // Invalid: intentionally return no value.
    }

    if (result === undefined) {
      return; // Invalid: intentionally return no value.
    }

    return result;
  }
  /* c8 ignore next 3 */
  // Not reachable, all possible input types have been considered.

   false || (0, _invariant.invariant)(false, 'Unexpected input type: ' + (0, _inspect.inspect)(type));
} // Returns true if the provided valueNode is a variable which is not defined
// in the set of variables.

function isMissingVariable(valueNode, variables) {
  return valueNode.kind === _kinds.Kind.VARIABLE && (variables == null || variables[valueNode.name.value] === undefined);
}

/***/ }),

/***/ "../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs":
/*!***********************************************************************!*\
  !*** ../../../node_modules/graphql/utilities/valueFromASTUntyped.mjs ***!
  \***********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.valueFromASTUntyped = valueFromASTUntyped;
var _keyValMap = __webpack_require__(/*! ../jsutils/keyValMap.mjs */ "../../../node_modules/graphql/jsutils/keyValMap.mjs");
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
/**
 * Produces a JavaScript value given a GraphQL Value AST.
 *
 * Unlike `valueFromAST()`, no type is provided. The resulting JavaScript value
 * will reflect the provided GraphQL value AST.
 *
 * | GraphQL Value        | JavaScript Value |
 * | -------------------- | ---------------- |
 * | Input Object         | Object           |
 * | List                 | Array            |
 * | Boolean              | Boolean          |
 * | String / Enum        | String           |
 * | Int / Float          | Number           |
 * | Null                 | null             |
 *
 */

function valueFromASTUntyped(valueNode, variables) {
  switch (valueNode.kind) {
    case _kinds.Kind.NULL:
      return null;
    case _kinds.Kind.INT:
      return parseInt(valueNode.value, 10);
    case _kinds.Kind.FLOAT:
      return parseFloat(valueNode.value);
    case _kinds.Kind.STRING:
    case _kinds.Kind.ENUM:
    case _kinds.Kind.BOOLEAN:
      return valueNode.value;
    case _kinds.Kind.LIST:
      return valueNode.values.map(node => valueFromASTUntyped(node, variables));
    case _kinds.Kind.OBJECT:
      return (0, _keyValMap.keyValMap)(valueNode.fields, field => field.name.value, field => valueFromASTUntyped(field.value, variables));
    case _kinds.Kind.VARIABLE:
      return variables === null || variables === void 0 ? void 0 : variables[valueNode.name.value];
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/ValidationContext.mjs":
/*!**********************************************************************!*\
  !*** ../../../node_modules/graphql/validation/ValidationContext.mjs ***!
  \**********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.ValidationContext = exports.SDLValidationContext = exports.ASTValidationContext = void 0;
var _kinds = __webpack_require__(/*! ../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _visitor = __webpack_require__(/*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs");
var _TypeInfo = __webpack_require__(/*! ../utilities/TypeInfo.mjs */ "../../../node_modules/graphql/utilities/TypeInfo.mjs");
/**
 * An instance of this class is passed as the "this" context to all validators,
 * allowing access to commonly useful contextual information from within a
 * validation rule.
 */
class ASTValidationContext {
  constructor(ast, onError) {
    this._ast = ast;
    this._fragments = undefined;
    this._fragmentSpreads = new Map();
    this._recursivelyReferencedFragments = new Map();
    this._onError = onError;
  }
  get [Symbol.toStringTag]() {
    return 'ASTValidationContext';
  }
  reportError(error) {
    this._onError(error);
  }
  getDocument() {
    return this._ast;
  }
  getFragment(name) {
    let fragments;
    if (this._fragments) {
      fragments = this._fragments;
    } else {
      fragments = Object.create(null);
      for (const defNode of this.getDocument().definitions) {
        if (defNode.kind === _kinds.Kind.FRAGMENT_DEFINITION) {
          fragments[defNode.name.value] = defNode;
        }
      }
      this._fragments = fragments;
    }
    return fragments[name];
  }
  getFragmentSpreads(node) {
    let spreads = this._fragmentSpreads.get(node);
    if (!spreads) {
      spreads = [];
      const setsToVisit = [node];
      let set;
      while (set = setsToVisit.pop()) {
        for (const selection of set.selections) {
          if (selection.kind === _kinds.Kind.FRAGMENT_SPREAD) {
            spreads.push(selection);
          } else if (selection.selectionSet) {
            setsToVisit.push(selection.selectionSet);
          }
        }
      }
      this._fragmentSpreads.set(node, spreads);
    }
    return spreads;
  }
  getRecursivelyReferencedFragments(operation) {
    let fragments = this._recursivelyReferencedFragments.get(operation);
    if (!fragments) {
      fragments = [];
      const collectedNames = Object.create(null);
      const nodesToVisit = [operation.selectionSet];
      let node;
      while (node = nodesToVisit.pop()) {
        for (const spread of this.getFragmentSpreads(node)) {
          const fragName = spread.name.value;
          if (collectedNames[fragName] !== true) {
            collectedNames[fragName] = true;
            const fragment = this.getFragment(fragName);
            if (fragment) {
              fragments.push(fragment);
              nodesToVisit.push(fragment.selectionSet);
            }
          }
        }
      }
      this._recursivelyReferencedFragments.set(operation, fragments);
    }
    return fragments;
  }
}
exports.ASTValidationContext = ASTValidationContext;
class SDLValidationContext extends ASTValidationContext {
  constructor(ast, schema, onError) {
    super(ast, onError);
    this._schema = schema;
  }
  get [Symbol.toStringTag]() {
    return 'SDLValidationContext';
  }
  getSchema() {
    return this._schema;
  }
}
exports.SDLValidationContext = SDLValidationContext;
class ValidationContext extends ASTValidationContext {
  constructor(schema, ast, typeInfo, onError) {
    super(ast, onError);
    this._schema = schema;
    this._typeInfo = typeInfo;
    this._variableUsages = new Map();
    this._recursiveVariableUsages = new Map();
  }
  get [Symbol.toStringTag]() {
    return 'ValidationContext';
  }
  getSchema() {
    return this._schema;
  }
  getVariableUsages(node) {
    let usages = this._variableUsages.get(node);
    if (!usages) {
      const newUsages = [];
      const typeInfo = new _TypeInfo.TypeInfo(this._schema);
      (0, _visitor.visit)(node, (0, _TypeInfo.visitWithTypeInfo)(typeInfo, {
        VariableDefinition: () => false,
        Variable(variable) {
          newUsages.push({
            node: variable,
            type: typeInfo.getInputType(),
            defaultValue: typeInfo.getDefaultValue()
          });
        }
      }));
      usages = newUsages;
      this._variableUsages.set(node, usages);
    }
    return usages;
  }
  getRecursiveVariableUsages(operation) {
    let usages = this._recursiveVariableUsages.get(operation);
    if (!usages) {
      usages = this.getVariableUsages(operation);
      for (const frag of this.getRecursivelyReferencedFragments(operation)) {
        usages = usages.concat(this.getVariableUsages(frag));
      }
      this._recursiveVariableUsages.set(operation, usages);
    }
    return usages;
  }
  getType() {
    return this._typeInfo.getType();
  }
  getParentType() {
    return this._typeInfo.getParentType();
  }
  getInputType() {
    return this._typeInfo.getInputType();
  }
  getParentInputType() {
    return this._typeInfo.getParentInputType();
  }
  getFieldDef() {
    return this._typeInfo.getFieldDef();
  }
  getDirective() {
    return this._typeInfo.getDirective();
  }
  getArgument() {
    return this._typeInfo.getArgument();
  }
  getEnumValue() {
    return this._typeInfo.getEnumValue();
  }
}
exports.ValidationContext = ValidationContext;

/***/ }),

/***/ "../../../node_modules/graphql/validation/index.mjs":
/*!**********************************************************!*\
  !*** ../../../node_modules/graphql/validation/index.mjs ***!
  \**********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "ExecutableDefinitionsRule", ({
  enumerable: true,
  get: function () {
    return _ExecutableDefinitionsRule.ExecutableDefinitionsRule;
  }
}));
Object.defineProperty(exports, "FieldsOnCorrectTypeRule", ({
  enumerable: true,
  get: function () {
    return _FieldsOnCorrectTypeRule.FieldsOnCorrectTypeRule;
  }
}));
Object.defineProperty(exports, "FragmentsOnCompositeTypesRule", ({
  enumerable: true,
  get: function () {
    return _FragmentsOnCompositeTypesRule.FragmentsOnCompositeTypesRule;
  }
}));
Object.defineProperty(exports, "KnownArgumentNamesRule", ({
  enumerable: true,
  get: function () {
    return _KnownArgumentNamesRule.KnownArgumentNamesRule;
  }
}));
Object.defineProperty(exports, "KnownDirectivesRule", ({
  enumerable: true,
  get: function () {
    return _KnownDirectivesRule.KnownDirectivesRule;
  }
}));
Object.defineProperty(exports, "KnownFragmentNamesRule", ({
  enumerable: true,
  get: function () {
    return _KnownFragmentNamesRule.KnownFragmentNamesRule;
  }
}));
Object.defineProperty(exports, "KnownTypeNamesRule", ({
  enumerable: true,
  get: function () {
    return _KnownTypeNamesRule.KnownTypeNamesRule;
  }
}));
Object.defineProperty(exports, "LoneAnonymousOperationRule", ({
  enumerable: true,
  get: function () {
    return _LoneAnonymousOperationRule.LoneAnonymousOperationRule;
  }
}));
Object.defineProperty(exports, "LoneSchemaDefinitionRule", ({
  enumerable: true,
  get: function () {
    return _LoneSchemaDefinitionRule.LoneSchemaDefinitionRule;
  }
}));
Object.defineProperty(exports, "NoDeprecatedCustomRule", ({
  enumerable: true,
  get: function () {
    return _NoDeprecatedCustomRule.NoDeprecatedCustomRule;
  }
}));
Object.defineProperty(exports, "NoFragmentCyclesRule", ({
  enumerable: true,
  get: function () {
    return _NoFragmentCyclesRule.NoFragmentCyclesRule;
  }
}));
Object.defineProperty(exports, "NoSchemaIntrospectionCustomRule", ({
  enumerable: true,
  get: function () {
    return _NoSchemaIntrospectionCustomRule.NoSchemaIntrospectionCustomRule;
  }
}));
Object.defineProperty(exports, "NoUndefinedVariablesRule", ({
  enumerable: true,
  get: function () {
    return _NoUndefinedVariablesRule.NoUndefinedVariablesRule;
  }
}));
Object.defineProperty(exports, "NoUnusedFragmentsRule", ({
  enumerable: true,
  get: function () {
    return _NoUnusedFragmentsRule.NoUnusedFragmentsRule;
  }
}));
Object.defineProperty(exports, "NoUnusedVariablesRule", ({
  enumerable: true,
  get: function () {
    return _NoUnusedVariablesRule.NoUnusedVariablesRule;
  }
}));
Object.defineProperty(exports, "OverlappingFieldsCanBeMergedRule", ({
  enumerable: true,
  get: function () {
    return _OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule;
  }
}));
Object.defineProperty(exports, "PossibleFragmentSpreadsRule", ({
  enumerable: true,
  get: function () {
    return _PossibleFragmentSpreadsRule.PossibleFragmentSpreadsRule;
  }
}));
Object.defineProperty(exports, "PossibleTypeExtensionsRule", ({
  enumerable: true,
  get: function () {
    return _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule;
  }
}));
Object.defineProperty(exports, "ProvidedRequiredArgumentsRule", ({
  enumerable: true,
  get: function () {
    return _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsRule;
  }
}));
Object.defineProperty(exports, "ScalarLeafsRule", ({
  enumerable: true,
  get: function () {
    return _ScalarLeafsRule.ScalarLeafsRule;
  }
}));
Object.defineProperty(exports, "SingleFieldSubscriptionsRule", ({
  enumerable: true,
  get: function () {
    return _SingleFieldSubscriptionsRule.SingleFieldSubscriptionsRule;
  }
}));
Object.defineProperty(exports, "UniqueArgumentDefinitionNamesRule", ({
  enumerable: true,
  get: function () {
    return _UniqueArgumentDefinitionNamesRule.UniqueArgumentDefinitionNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueArgumentNamesRule", ({
  enumerable: true,
  get: function () {
    return _UniqueArgumentNamesRule.UniqueArgumentNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueDirectiveNamesRule", ({
  enumerable: true,
  get: function () {
    return _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueDirectivesPerLocationRule", ({
  enumerable: true,
  get: function () {
    return _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule;
  }
}));
Object.defineProperty(exports, "UniqueEnumValueNamesRule", ({
  enumerable: true,
  get: function () {
    return _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueFieldDefinitionNamesRule", ({
  enumerable: true,
  get: function () {
    return _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueFragmentNamesRule", ({
  enumerable: true,
  get: function () {
    return _UniqueFragmentNamesRule.UniqueFragmentNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueInputFieldNamesRule", ({
  enumerable: true,
  get: function () {
    return _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueOperationNamesRule", ({
  enumerable: true,
  get: function () {
    return _UniqueOperationNamesRule.UniqueOperationNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueOperationTypesRule", ({
  enumerable: true,
  get: function () {
    return _UniqueOperationTypesRule.UniqueOperationTypesRule;
  }
}));
Object.defineProperty(exports, "UniqueTypeNamesRule", ({
  enumerable: true,
  get: function () {
    return _UniqueTypeNamesRule.UniqueTypeNamesRule;
  }
}));
Object.defineProperty(exports, "UniqueVariableNamesRule", ({
  enumerable: true,
  get: function () {
    return _UniqueVariableNamesRule.UniqueVariableNamesRule;
  }
}));
Object.defineProperty(exports, "ValidationContext", ({
  enumerable: true,
  get: function () {
    return _ValidationContext.ValidationContext;
  }
}));
Object.defineProperty(exports, "ValuesOfCorrectTypeRule", ({
  enumerable: true,
  get: function () {
    return _ValuesOfCorrectTypeRule.ValuesOfCorrectTypeRule;
  }
}));
Object.defineProperty(exports, "VariablesAreInputTypesRule", ({
  enumerable: true,
  get: function () {
    return _VariablesAreInputTypesRule.VariablesAreInputTypesRule;
  }
}));
Object.defineProperty(exports, "VariablesInAllowedPositionRule", ({
  enumerable: true,
  get: function () {
    return _VariablesInAllowedPositionRule.VariablesInAllowedPositionRule;
  }
}));
Object.defineProperty(exports, "specifiedRules", ({
  enumerable: true,
  get: function () {
    return _specifiedRules.specifiedRules;
  }
}));
Object.defineProperty(exports, "validate", ({
  enumerable: true,
  get: function () {
    return _validate.validate;
  }
}));
var _validate = __webpack_require__(/*! ./validate.mjs */ "../../../node_modules/graphql/validation/validate.mjs");
var _ValidationContext = __webpack_require__(/*! ./ValidationContext.mjs */ "../../../node_modules/graphql/validation/ValidationContext.mjs");
var _specifiedRules = __webpack_require__(/*! ./specifiedRules.mjs */ "../../../node_modules/graphql/validation/specifiedRules.mjs");
var _ExecutableDefinitionsRule = __webpack_require__(/*! ./rules/ExecutableDefinitionsRule.mjs */ "../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs");
var _FieldsOnCorrectTypeRule = __webpack_require__(/*! ./rules/FieldsOnCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs");
var _FragmentsOnCompositeTypesRule = __webpack_require__(/*! ./rules/FragmentsOnCompositeTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs");
var _KnownArgumentNamesRule = __webpack_require__(/*! ./rules/KnownArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs");
var _KnownDirectivesRule = __webpack_require__(/*! ./rules/KnownDirectivesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs");
var _KnownFragmentNamesRule = __webpack_require__(/*! ./rules/KnownFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs");
var _KnownTypeNamesRule = __webpack_require__(/*! ./rules/KnownTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs");
var _LoneAnonymousOperationRule = __webpack_require__(/*! ./rules/LoneAnonymousOperationRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs");
var _NoFragmentCyclesRule = __webpack_require__(/*! ./rules/NoFragmentCyclesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs");
var _NoUndefinedVariablesRule = __webpack_require__(/*! ./rules/NoUndefinedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs");
var _NoUnusedFragmentsRule = __webpack_require__(/*! ./rules/NoUnusedFragmentsRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs");
var _NoUnusedVariablesRule = __webpack_require__(/*! ./rules/NoUnusedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs");
var _OverlappingFieldsCanBeMergedRule = __webpack_require__(/*! ./rules/OverlappingFieldsCanBeMergedRule.mjs */ "../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs");
var _PossibleFragmentSpreadsRule = __webpack_require__(/*! ./rules/PossibleFragmentSpreadsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs");
var _ProvidedRequiredArgumentsRule = __webpack_require__(/*! ./rules/ProvidedRequiredArgumentsRule.mjs */ "../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs");
var _ScalarLeafsRule = __webpack_require__(/*! ./rules/ScalarLeafsRule.mjs */ "../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs");
var _SingleFieldSubscriptionsRule = __webpack_require__(/*! ./rules/SingleFieldSubscriptionsRule.mjs */ "../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs");
var _UniqueArgumentNamesRule = __webpack_require__(/*! ./rules/UniqueArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs");
var _UniqueDirectivesPerLocationRule = __webpack_require__(/*! ./rules/UniqueDirectivesPerLocationRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs");
var _UniqueFragmentNamesRule = __webpack_require__(/*! ./rules/UniqueFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs");
var _UniqueInputFieldNamesRule = __webpack_require__(/*! ./rules/UniqueInputFieldNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs");
var _UniqueOperationNamesRule = __webpack_require__(/*! ./rules/UniqueOperationNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs");
var _UniqueVariableNamesRule = __webpack_require__(/*! ./rules/UniqueVariableNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs");
var _ValuesOfCorrectTypeRule = __webpack_require__(/*! ./rules/ValuesOfCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs");
var _VariablesAreInputTypesRule = __webpack_require__(/*! ./rules/VariablesAreInputTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs");
var _VariablesInAllowedPositionRule = __webpack_require__(/*! ./rules/VariablesInAllowedPositionRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs");
var _LoneSchemaDefinitionRule = __webpack_require__(/*! ./rules/LoneSchemaDefinitionRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs");
var _UniqueOperationTypesRule = __webpack_require__(/*! ./rules/UniqueOperationTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs");
var _UniqueTypeNamesRule = __webpack_require__(/*! ./rules/UniqueTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs");
var _UniqueEnumValueNamesRule = __webpack_require__(/*! ./rules/UniqueEnumValueNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs");
var _UniqueFieldDefinitionNamesRule = __webpack_require__(/*! ./rules/UniqueFieldDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs");
var _UniqueArgumentDefinitionNamesRule = __webpack_require__(/*! ./rules/UniqueArgumentDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs");
var _UniqueDirectiveNamesRule = __webpack_require__(/*! ./rules/UniqueDirectiveNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs");
var _PossibleTypeExtensionsRule = __webpack_require__(/*! ./rules/PossibleTypeExtensionsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs");
var _NoDeprecatedCustomRule = __webpack_require__(/*! ./rules/custom/NoDeprecatedCustomRule.mjs */ "../../../node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs");
var _NoSchemaIntrospectionCustomRule = __webpack_require__(/*! ./rules/custom/NoSchemaIntrospectionCustomRule.mjs */ "../../../node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs");

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs":
/*!************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs ***!
  \************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.ExecutableDefinitionsRule = ExecutableDefinitionsRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _predicates = __webpack_require__(/*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs");
/**
 * Executable definitions
 *
 * A GraphQL document is only valid for execution if all definitions are either
 * operation or fragment definitions.
 *
 * See https://spec.graphql.org/draft/#sec-Executable-Definitions
 */
function ExecutableDefinitionsRule(context) {
  return {
    Document(node) {
      for (const definition of node.definitions) {
        if (!(0, _predicates.isExecutableDefinitionNode)(definition)) {
          const defName = definition.kind === _kinds.Kind.SCHEMA_DEFINITION || definition.kind === _kinds.Kind.SCHEMA_EXTENSION ? 'schema' : '"' + definition.name.value + '"';
          context.reportError(new _GraphQLError.GraphQLError(`The ${defName} definition is not executable.`, {
            nodes: definition
          }));
        }
      }
      return false;
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs":
/*!**********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs ***!
  \**********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.FieldsOnCorrectTypeRule = FieldsOnCorrectTypeRule;
var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
var _naturalCompare = __webpack_require__(/*! ../../jsutils/naturalCompare.mjs */ "../../../node_modules/graphql/jsutils/naturalCompare.mjs");
var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
/**
 * Fields on correct type
 *
 * A GraphQL document is only valid if all fields selected are defined by the
 * parent type, or are an allowed meta field such as __typename.
 *
 * See https://spec.graphql.org/draft/#sec-Field-Selections
 */
function FieldsOnCorrectTypeRule(context) {
  return {
    Field(node) {
      const type = context.getParentType();
      if (type) {
        const fieldDef = context.getFieldDef();
        if (!fieldDef) {
          // This field doesn't exist, lets look for suggestions.
          const schema = context.getSchema();
          const fieldName = node.name.value; // First determine if there are any suggested types to condition on.

          let suggestion = (0, _didYouMean.didYouMean)('to use an inline fragment on', getSuggestedTypeNames(schema, type, fieldName)); // If there are no suggested types, then perhaps this was a typo?

          if (suggestion === '') {
            suggestion = (0, _didYouMean.didYouMean)(getSuggestedFieldNames(type, fieldName));
          } // Report an error, including helpful suggestions.

          context.reportError(new _GraphQLError.GraphQLError(`Cannot query field "${fieldName}" on type "${type.name}".` + suggestion, {
            nodes: node
          }));
        }
      }
    }
  };
}
/**
 * Go through all of the implementations of type, as well as the interfaces that
 * they implement. If any of those types include the provided field, suggest them,
 * sorted by how often the type is referenced.
 */

function getSuggestedTypeNames(schema, type, fieldName) {
  if (!(0, _definition.isAbstractType)(type)) {
    // Must be an Object type, which does not have possible fields.
    return [];
  }
  const suggestedTypes = new Set();
  const usageCount = Object.create(null);
  for (const possibleType of schema.getPossibleTypes(type)) {
    if (!possibleType.getFields()[fieldName]) {
      continue;
    } // This object type defines this field.

    suggestedTypes.add(possibleType);
    usageCount[possibleType.name] = 1;
    for (const possibleInterface of possibleType.getInterfaces()) {
      var _usageCount$possibleI;
      if (!possibleInterface.getFields()[fieldName]) {
        continue;
      } // This interface type defines this field.

      suggestedTypes.add(possibleInterface);
      usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !== void 0 ? _usageCount$possibleI : 0) + 1;
    }
  }
  return [...suggestedTypes].sort((typeA, typeB) => {
    // Suggest both interface and object types based on how common they are.
    const usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name];
    if (usageCountDiff !== 0) {
      return usageCountDiff;
    } // Suggest super types first followed by subtypes

    if ((0, _definition.isInterfaceType)(typeA) && schema.isSubType(typeA, typeB)) {
      return -1;
    }
    if ((0, _definition.isInterfaceType)(typeB) && schema.isSubType(typeB, typeA)) {
      return 1;
    }
    return (0, _naturalCompare.naturalCompare)(typeA.name, typeB.name);
  }).map(x => x.name);
}
/**
 * For the field name provided, determine if there are any similar field names
 * that may be the result of a typo.
 */

function getSuggestedFieldNames(type, fieldName) {
  if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type)) {
    const possibleFieldNames = Object.keys(type.getFields());
    return (0, _suggestionList.suggestionList)(fieldName, possibleFieldNames);
  } // Otherwise, must be a Union type, which does not define fields.

  return [];
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs":
/*!****************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs ***!
  \****************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.FragmentsOnCompositeTypesRule = FragmentsOnCompositeTypesRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
/**
 * Fragments on composite type
 *
 * Fragments use a type condition to determine if they apply, since fragments
 * can only be spread into a composite type (object, interface, or union), the
 * type condition must also be a composite type.
 *
 * See https://spec.graphql.org/draft/#sec-Fragments-On-Composite-Types
 */
function FragmentsOnCompositeTypesRule(context) {
  return {
    InlineFragment(node) {
      const typeCondition = node.typeCondition;
      if (typeCondition) {
        const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition);
        if (type && !(0, _definition.isCompositeType)(type)) {
          const typeStr = (0, _printer.print)(typeCondition);
          context.reportError(new _GraphQLError.GraphQLError(`Fragment cannot condition on non composite type "${typeStr}".`, {
            nodes: typeCondition
          }));
        }
      }
    },
    FragmentDefinition(node) {
      const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), node.typeCondition);
      if (type && !(0, _definition.isCompositeType)(type)) {
        const typeStr = (0, _printer.print)(node.typeCondition);
        context.reportError(new _GraphQLError.GraphQLError(`Fragment "${node.name.value}" cannot condition on non composite type "${typeStr}".`, {
          nodes: node.typeCondition
        }));
      }
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs":
/*!*********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs ***!
  \*********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.KnownArgumentNamesOnDirectivesRule = KnownArgumentNamesOnDirectivesRule;
exports.KnownArgumentNamesRule = KnownArgumentNamesRule;
var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _directives = __webpack_require__(/*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
/**
 * Known argument names
 *
 * A GraphQL field is only valid if all supplied arguments are defined by
 * that field.
 *
 * See https://spec.graphql.org/draft/#sec-Argument-Names
 * See https://spec.graphql.org/draft/#sec-Directives-Are-In-Valid-Locations
 */
function KnownArgumentNamesRule(context) {
  return {
    // eslint-disable-next-line new-cap
    ...KnownArgumentNamesOnDirectivesRule(context),
    Argument(argNode) {
      const argDef = context.getArgument();
      const fieldDef = context.getFieldDef();
      const parentType = context.getParentType();
      if (!argDef && fieldDef && parentType) {
        const argName = argNode.name.value;
        const knownArgsNames = fieldDef.args.map(arg => arg.name);
        const suggestions = (0, _suggestionList.suggestionList)(argName, knownArgsNames);
        context.reportError(new _GraphQLError.GraphQLError(`Unknown argument "${argName}" on field "${parentType.name}.${fieldDef.name}".` + (0, _didYouMean.didYouMean)(suggestions), {
          nodes: argNode
        }));
      }
    }
  };
}
/**
 * @internal
 */

function KnownArgumentNamesOnDirectivesRule(context) {
  const directiveArgs = Object.create(null);
  const schema = context.getSchema();
  const definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives;
  for (const directive of definedDirectives) {
    directiveArgs[directive.name] = directive.args.map(arg => arg.name);
  }
  const astDefinitions = context.getDocument().definitions;
  for (const def of astDefinitions) {
    if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
      var _def$arguments;

      // FIXME: https://github.com/graphql/graphql-js/issues/2203

      /* c8 ignore next */
      const argsNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : [];
      directiveArgs[def.name.value] = argsNodes.map(arg => arg.name.value);
    }
  }
  return {
    Directive(directiveNode) {
      const directiveName = directiveNode.name.value;
      const knownArgs = directiveArgs[directiveName];
      if (directiveNode.arguments && knownArgs) {
        for (const argNode of directiveNode.arguments) {
          const argName = argNode.name.value;
          if (!knownArgs.includes(argName)) {
            const suggestions = (0, _suggestionList.suggestionList)(argName, knownArgs);
            context.reportError(new _GraphQLError.GraphQLError(`Unknown argument "${argName}" on directive "@${directiveName}".` + (0, _didYouMean.didYouMean)(suggestions), {
              nodes: argNode
            }));
          }
        }
      }
      return false;
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs":
/*!******************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs ***!
  \******************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.KnownDirectivesRule = KnownDirectivesRule;
var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _invariant = __webpack_require__(/*! ../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _ast = __webpack_require__(/*! ../../language/ast.mjs */ "../../../node_modules/graphql/language/ast.mjs");
var _directiveLocation = __webpack_require__(/*! ../../language/directiveLocation.mjs */ "../../../node_modules/graphql/language/directiveLocation.mjs");
var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _directives = __webpack_require__(/*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
/**
 * Known directives
 *
 * A GraphQL document is only valid if all `@directives` are known by the
 * schema and legally positioned.
 *
 * See https://spec.graphql.org/draft/#sec-Directives-Are-Defined
 */
function KnownDirectivesRule(context) {
  const locationsMap = Object.create(null);
  const schema = context.getSchema();
  const definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives;
  for (const directive of definedDirectives) {
    locationsMap[directive.name] = directive.locations;
  }
  const astDefinitions = context.getDocument().definitions;
  for (const def of astDefinitions) {
    if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
      locationsMap[def.name.value] = def.locations.map(name => name.value);
    }
  }
  return {
    Directive(node, _key, _parent, _path, ancestors) {
      const name = node.name.value;
      const locations = locationsMap[name];
      if (!locations) {
        context.reportError(new _GraphQLError.GraphQLError(`Unknown directive "@${name}".`, {
          nodes: node
        }));
        return;
      }
      const candidateLocation = getDirectiveLocationForASTPath(ancestors);
      if (candidateLocation && !locations.includes(candidateLocation)) {
        context.reportError(new _GraphQLError.GraphQLError(`Directive "@${name}" may not be used on ${candidateLocation}.`, {
          nodes: node
        }));
      }
    }
  };
}
function getDirectiveLocationForASTPath(ancestors) {
  const appliedTo = ancestors[ancestors.length - 1];
  'kind' in appliedTo || (0, _invariant.invariant)(false);
  switch (appliedTo.kind) {
    case _kinds.Kind.OPERATION_DEFINITION:
      return getDirectiveLocationForOperation(appliedTo.operation);
    case _kinds.Kind.FIELD:
      return _directiveLocation.DirectiveLocation.FIELD;
    case _kinds.Kind.FRAGMENT_SPREAD:
      return _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD;
    case _kinds.Kind.INLINE_FRAGMENT:
      return _directiveLocation.DirectiveLocation.INLINE_FRAGMENT;
    case _kinds.Kind.FRAGMENT_DEFINITION:
      return _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION;
    case _kinds.Kind.VARIABLE_DEFINITION:
      return _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION;
    case _kinds.Kind.SCHEMA_DEFINITION:
    case _kinds.Kind.SCHEMA_EXTENSION:
      return _directiveLocation.DirectiveLocation.SCHEMA;
    case _kinds.Kind.SCALAR_TYPE_DEFINITION:
    case _kinds.Kind.SCALAR_TYPE_EXTENSION:
      return _directiveLocation.DirectiveLocation.SCALAR;
    case _kinds.Kind.OBJECT_TYPE_DEFINITION:
    case _kinds.Kind.OBJECT_TYPE_EXTENSION:
      return _directiveLocation.DirectiveLocation.OBJECT;
    case _kinds.Kind.FIELD_DEFINITION:
      return _directiveLocation.DirectiveLocation.FIELD_DEFINITION;
    case _kinds.Kind.INTERFACE_TYPE_DEFINITION:
    case _kinds.Kind.INTERFACE_TYPE_EXTENSION:
      return _directiveLocation.DirectiveLocation.INTERFACE;
    case _kinds.Kind.UNION_TYPE_DEFINITION:
    case _kinds.Kind.UNION_TYPE_EXTENSION:
      return _directiveLocation.DirectiveLocation.UNION;
    case _kinds.Kind.ENUM_TYPE_DEFINITION:
    case _kinds.Kind.ENUM_TYPE_EXTENSION:
      return _directiveLocation.DirectiveLocation.ENUM;
    case _kinds.Kind.ENUM_VALUE_DEFINITION:
      return _directiveLocation.DirectiveLocation.ENUM_VALUE;
    case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION:
    case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION:
      return _directiveLocation.DirectiveLocation.INPUT_OBJECT;
    case _kinds.Kind.INPUT_VALUE_DEFINITION:
      {
        const parentNode = ancestors[ancestors.length - 3];
        'kind' in parentNode || (0, _invariant.invariant)(false);
        return parentNode.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION ? _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION : _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION;
      }
    // Not reachable, all possible types have been considered.

    /* c8 ignore next */

    default:
       false || (0, _invariant.invariant)(false, 'Unexpected kind: ' + (0, _inspect.inspect)(appliedTo.kind));
  }
}
function getDirectiveLocationForOperation(operation) {
  switch (operation) {
    case _ast.OperationTypeNode.QUERY:
      return _directiveLocation.DirectiveLocation.QUERY;
    case _ast.OperationTypeNode.MUTATION:
      return _directiveLocation.DirectiveLocation.MUTATION;
    case _ast.OperationTypeNode.SUBSCRIPTION:
      return _directiveLocation.DirectiveLocation.SUBSCRIPTION;
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs":
/*!*********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs ***!
  \*********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.KnownFragmentNamesRule = KnownFragmentNamesRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Known fragment names
 *
 * A GraphQL document is only valid if all `...Fragment` fragment spreads refer
 * to fragments defined in the same document.
 *
 * See https://spec.graphql.org/draft/#sec-Fragment-spread-target-defined
 */
function KnownFragmentNamesRule(context) {
  return {
    FragmentSpread(node) {
      const fragmentName = node.name.value;
      const fragment = context.getFragment(fragmentName);
      if (!fragment) {
        context.reportError(new _GraphQLError.GraphQLError(`Unknown fragment "${fragmentName}".`, {
          nodes: node.name
        }));
      }
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs":
/*!*****************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs ***!
  \*****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.KnownTypeNamesRule = KnownTypeNamesRule;
var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _predicates = __webpack_require__(/*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs");
var _introspection = __webpack_require__(/*! ../../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
var _scalars = __webpack_require__(/*! ../../type/scalars.mjs */ "../../../node_modules/graphql/type/scalars.mjs");
/**
 * Known type names
 *
 * A GraphQL document is only valid if referenced types (specifically
 * variable definitions and fragment conditions) are defined by the type schema.
 *
 * See https://spec.graphql.org/draft/#sec-Fragment-Spread-Type-Existence
 */
function KnownTypeNamesRule(context) {
  const schema = context.getSchema();
  const existingTypesMap = schema ? schema.getTypeMap() : Object.create(null);
  const definedTypes = Object.create(null);
  for (const def of context.getDocument().definitions) {
    if ((0, _predicates.isTypeDefinitionNode)(def)) {
      definedTypes[def.name.value] = true;
    }
  }
  const typeNames = [...Object.keys(existingTypesMap), ...Object.keys(definedTypes)];
  return {
    NamedType(node, _1, parent, _2, ancestors) {
      const typeName = node.name.value;
      if (!existingTypesMap[typeName] && !definedTypes[typeName]) {
        var _ancestors$;
        const definitionNode = (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0 ? _ancestors$ : parent;
        const isSDL = definitionNode != null && isSDLNode(definitionNode);
        if (isSDL && standardTypeNames.includes(typeName)) {
          return;
        }
        const suggestedTypes = (0, _suggestionList.suggestionList)(typeName, isSDL ? standardTypeNames.concat(typeNames) : typeNames);
        context.reportError(new _GraphQLError.GraphQLError(`Unknown type "${typeName}".` + (0, _didYouMean.didYouMean)(suggestedTypes), {
          nodes: node
        }));
      }
    }
  };
}
const standardTypeNames = [..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes].map(type => type.name);
function isSDLNode(value) {
  return 'kind' in value && ((0, _predicates.isTypeSystemDefinitionNode)(value) || (0, _predicates.isTypeSystemExtensionNode)(value));
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs":
/*!*************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs ***!
  \*************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.LoneAnonymousOperationRule = LoneAnonymousOperationRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
/**
 * Lone anonymous operation
 *
 * A GraphQL document is only valid if when it contains an anonymous operation
 * (the query short-hand) that it contains only that one operation definition.
 *
 * See https://spec.graphql.org/draft/#sec-Lone-Anonymous-Operation
 */
function LoneAnonymousOperationRule(context) {
  let operationCount = 0;
  return {
    Document(node) {
      operationCount = node.definitions.filter(definition => definition.kind === _kinds.Kind.OPERATION_DEFINITION).length;
    },
    OperationDefinition(node) {
      if (!node.name && operationCount > 1) {
        context.reportError(new _GraphQLError.GraphQLError('This anonymous operation must be the only defined operation.', {
          nodes: node
        }));
      }
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs":
/*!***********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs ***!
  \***********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.LoneSchemaDefinitionRule = LoneSchemaDefinitionRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Lone Schema definition
 *
 * A GraphQL document is only valid if it contains only one schema definition.
 */
function LoneSchemaDefinitionRule(context) {
  var _ref, _ref2, _oldSchema$astNode;
  const oldSchema = context.getSchema();
  const alreadyDefined = (_ref = (_ref2 = (_oldSchema$astNode = oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0 ? _oldSchema$astNode : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getQueryType()) !== null && _ref2 !== void 0 ? _ref2 : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getMutationType()) !== null && _ref !== void 0 ? _ref : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getSubscriptionType();
  let schemaDefinitionsCount = 0;
  return {
    SchemaDefinition(node) {
      if (alreadyDefined) {
        context.reportError(new _GraphQLError.GraphQLError('Cannot define a new schema within a schema extension.', {
          nodes: node
        }));
        return;
      }
      if (schemaDefinitionsCount > 0) {
        context.reportError(new _GraphQLError.GraphQLError('Must provide only one schema definition.', {
          nodes: node
        }));
      }
      ++schemaDefinitionsCount;
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs":
/*!*******************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs ***!
  \*******************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.NoFragmentCyclesRule = NoFragmentCyclesRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * No fragment cycles
 *
 * The graph of fragment spreads must not form any cycles including spreading itself.
 * Otherwise an operation could infinitely spread or infinitely execute on cycles in the underlying data.
 *
 * See https://spec.graphql.org/draft/#sec-Fragment-spreads-must-not-form-cycles
 */
function NoFragmentCyclesRule(context) {
  // Tracks already visited fragments to maintain O(N) and to ensure that cycles
  // are not redundantly reported.
  const visitedFrags = Object.create(null); // Array of AST nodes used to produce meaningful errors

  const spreadPath = []; // Position in the spread path

  const spreadPathIndexByName = Object.create(null);
  return {
    OperationDefinition: () => false,
    FragmentDefinition(node) {
      detectCycleRecursive(node);
      return false;
    }
  }; // This does a straight-forward DFS to find cycles.
  // It does not terminate when a cycle was found but continues to explore
  // the graph to find all possible cycles.

  function detectCycleRecursive(fragment) {
    if (visitedFrags[fragment.name.value]) {
      return;
    }
    const fragmentName = fragment.name.value;
    visitedFrags[fragmentName] = true;
    const spreadNodes = context.getFragmentSpreads(fragment.selectionSet);
    if (spreadNodes.length === 0) {
      return;
    }
    spreadPathIndexByName[fragmentName] = spreadPath.length;
    for (const spreadNode of spreadNodes) {
      const spreadName = spreadNode.name.value;
      const cycleIndex = spreadPathIndexByName[spreadName];
      spreadPath.push(spreadNode);
      if (cycleIndex === undefined) {
        const spreadFragment = context.getFragment(spreadName);
        if (spreadFragment) {
          detectCycleRecursive(spreadFragment);
        }
      } else {
        const cyclePath = spreadPath.slice(cycleIndex);
        const viaPath = cyclePath.slice(0, -1).map(s => '"' + s.name.value + '"').join(', ');
        context.reportError(new _GraphQLError.GraphQLError(`Cannot spread fragment "${spreadName}" within itself` + (viaPath !== '' ? ` via ${viaPath}.` : '.'), {
          nodes: cyclePath
        }));
      }
      spreadPath.pop();
    }
    spreadPathIndexByName[fragmentName] = undefined;
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs":
/*!***********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs ***!
  \***********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.NoUndefinedVariablesRule = NoUndefinedVariablesRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * No undefined variables
 *
 * A GraphQL operation is only valid if all variables encountered, both directly
 * and via fragment spreads, are defined by that operation.
 *
 * See https://spec.graphql.org/draft/#sec-All-Variable-Uses-Defined
 */
function NoUndefinedVariablesRule(context) {
  let variableNameDefined = Object.create(null);
  return {
    OperationDefinition: {
      enter() {
        variableNameDefined = Object.create(null);
      },
      leave(operation) {
        const usages = context.getRecursiveVariableUsages(operation);
        for (const {
          node
        } of usages) {
          const varName = node.name.value;
          if (variableNameDefined[varName] !== true) {
            context.reportError(new _GraphQLError.GraphQLError(operation.name ? `Variable "$${varName}" is not defined by operation "${operation.name.value}".` : `Variable "$${varName}" is not defined.`, {
              nodes: [node, operation]
            }));
          }
        }
      }
    },
    VariableDefinition(node) {
      variableNameDefined[node.variable.name.value] = true;
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs":
/*!********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs ***!
  \********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.NoUnusedFragmentsRule = NoUnusedFragmentsRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * No unused fragments
 *
 * A GraphQL document is only valid if all fragment definitions are spread
 * within operations, or spread within other fragments spread within operations.
 *
 * See https://spec.graphql.org/draft/#sec-Fragments-Must-Be-Used
 */
function NoUnusedFragmentsRule(context) {
  const operationDefs = [];
  const fragmentDefs = [];
  return {
    OperationDefinition(node) {
      operationDefs.push(node);
      return false;
    },
    FragmentDefinition(node) {
      fragmentDefs.push(node);
      return false;
    },
    Document: {
      leave() {
        const fragmentNameUsed = Object.create(null);
        for (const operation of operationDefs) {
          for (const fragment of context.getRecursivelyReferencedFragments(operation)) {
            fragmentNameUsed[fragment.name.value] = true;
          }
        }
        for (const fragmentDef of fragmentDefs) {
          const fragName = fragmentDef.name.value;
          if (fragmentNameUsed[fragName] !== true) {
            context.reportError(new _GraphQLError.GraphQLError(`Fragment "${fragName}" is never used.`, {
              nodes: fragmentDef
            }));
          }
        }
      }
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs":
/*!********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs ***!
  \********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.NoUnusedVariablesRule = NoUnusedVariablesRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * No unused variables
 *
 * A GraphQL operation is only valid if all variables defined by an operation
 * are used, either directly or within a spread fragment.
 *
 * See https://spec.graphql.org/draft/#sec-All-Variables-Used
 */
function NoUnusedVariablesRule(context) {
  let variableDefs = [];
  return {
    OperationDefinition: {
      enter() {
        variableDefs = [];
      },
      leave(operation) {
        const variableNameUsed = Object.create(null);
        const usages = context.getRecursiveVariableUsages(operation);
        for (const {
          node
        } of usages) {
          variableNameUsed[node.name.value] = true;
        }
        for (const variableDef of variableDefs) {
          const variableName = variableDef.variable.name.value;
          if (variableNameUsed[variableName] !== true) {
            context.reportError(new _GraphQLError.GraphQLError(operation.name ? `Variable "$${variableName}" is never used in operation "${operation.name.value}".` : `Variable "$${variableName}" is never used.`, {
              nodes: variableDef
            }));
          }
        }
      }
    },
    VariableDefinition(def) {
      variableDefs.push(def);
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs":
/*!*******************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs ***!
  \*******************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.OverlappingFieldsCanBeMergedRule = OverlappingFieldsCanBeMergedRule;
var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _sortValueNode = __webpack_require__(/*! ../../utilities/sortValueNode.mjs */ "../../../node_modules/graphql/utilities/sortValueNode.mjs");
var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
function reasonMessage(reason) {
  if (Array.isArray(reason)) {
    return reason.map(_ref => {
      let [responseName, subReason] = _ref;
      return `subfields "${responseName}" conflict because ` + reasonMessage(subReason);
    }).join(' and ');
  }
  return reason;
}
/**
 * Overlapping fields can be merged
 *
 * A selection set is only valid if all fields (including spreading any
 * fragments) either correspond to distinct response names or can be merged
 * without ambiguity.
 *
 * See https://spec.graphql.org/draft/#sec-Field-Selection-Merging
 */

function OverlappingFieldsCanBeMergedRule(context) {
  // A memoization for when two fragments are compared "between" each other for
  // conflicts. Two fragments may be compared many times, so memoizing this can
  // dramatically improve the performance of this validator.
  const comparedFragmentPairs = new PairSet(); // A cache for the "field map" and list of fragment names found in any given
  // selection set. Selection sets may be asked for this information multiple
  // times, so this improves the performance of this validator.

  const cachedFieldsAndFragmentNames = new Map();
  return {
    SelectionSet(selectionSet) {
      const conflicts = findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, context.getParentType(), selectionSet);
      for (const [[responseName, reason], fields1, fields2] of conflicts) {
        const reasonMsg = reasonMessage(reason);
        context.reportError(new _GraphQLError.GraphQLError(`Fields "${responseName}" conflict because ${reasonMsg}. Use different aliases on the fields to fetch both if this was intentional.`, {
          nodes: fields1.concat(fields2)
        }));
      }
    }
  };
}

/**
 * Algorithm:
 *
 * Conflicts occur when two fields exist in a query which will produce the same
 * response name, but represent differing values, thus creating a conflict.
 * The algorithm below finds all conflicts via making a series of comparisons
 * between fields. In order to compare as few fields as possible, this makes
 * a series of comparisons "within" sets of fields and "between" sets of fields.
 *
 * Given any selection set, a collection produces both a set of fields by
 * also including all inline fragments, as well as a list of fragments
 * referenced by fragment spreads.
 *
 * A) Each selection set represented in the document first compares "within" its
 * collected set of fields, finding any conflicts between every pair of
 * overlapping fields.
 * Note: This is the *only time* that a the fields "within" a set are compared
 * to each other. After this only fields "between" sets are compared.
 *
 * B) Also, if any fragment is referenced in a selection set, then a
 * comparison is made "between" the original set of fields and the
 * referenced fragment.
 *
 * C) Also, if multiple fragments are referenced, then comparisons
 * are made "between" each referenced fragment.
 *
 * D) When comparing "between" a set of fields and a referenced fragment, first
 * a comparison is made between each field in the original set of fields and
 * each field in the the referenced set of fields.
 *
 * E) Also, if any fragment is referenced in the referenced selection set,
 * then a comparison is made "between" the original set of fields and the
 * referenced fragment (recursively referring to step D).
 *
 * F) When comparing "between" two fragments, first a comparison is made between
 * each field in the first referenced set of fields and each field in the the
 * second referenced set of fields.
 *
 * G) Also, any fragments referenced by the first must be compared to the
 * second, and any fragments referenced by the second must be compared to the
 * first (recursively referring to step F).
 *
 * H) When comparing two fields, if both have selection sets, then a comparison
 * is made "between" both selection sets, first comparing the set of fields in
 * the first selection set with the set of fields in the second.
 *
 * I) Also, if any fragment is referenced in either selection set, then a
 * comparison is made "between" the other set of fields and the
 * referenced fragment.
 *
 * J) Also, if two fragments are referenced in both selection sets, then a
 * comparison is made "between" the two fragments.
 *
 */
// Find all conflicts found "within" a selection set, including those found
// via spreading in fragments. Called when visiting each SelectionSet in the
// GraphQL Document.
function findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentType, selectionSet) {
  const conflicts = [];
  const [fieldMap, fragmentNames] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet); // (A) Find find all conflicts "within" the fields of this selection set.
  // Note: this is the *only place* `collectConflictsWithin` is called.

  collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap);
  if (fragmentNames.length !== 0) {
    // (B) Then collect conflicts between these fields and those represented by
    // each spread fragment name found.
    for (let i = 0; i < fragmentNames.length; i++) {
      collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fieldMap, fragmentNames[i]); // (C) Then compare this fragment with all other fragments found in this
      // selection set to collect conflicts between fragments spread together.
      // This compares each item in the list of fragment names to every other
      // item in that same list (except for itself).

      for (let j = i + 1; j < fragmentNames.length; j++) {
        collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fragmentNames[i], fragmentNames[j]);
      }
    }
  }
  return conflicts;
} // Collect all conflicts found between a set of fields and a fragment reference
// including via spreading in any nested fragments.

function collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentName) {
  const fragment = context.getFragment(fragmentName);
  if (!fragment) {
    return;
  }
  const [fieldMap2, referencedFragmentNames] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment); // Do not compare a fragment's fieldMap to itself.

  if (fieldMap === fieldMap2) {
    return;
  } // (D) First collect any conflicts between the provided collection of fields
  // and the collection of fields represented by the given fragment.

  collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fieldMap2); // (E) Then collect any conflicts between the provided collection of fields
  // and any fragment names found in the given fragment.

  for (const referencedFragmentName of referencedFragmentNames) {
    // Memoize so two fragments are not compared for conflicts more than once.
    if (comparedFragmentPairs.has(referencedFragmentName, fragmentName, areMutuallyExclusive)) {
      continue;
    }
    comparedFragmentPairs.add(referencedFragmentName, fragmentName, areMutuallyExclusive);
    collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, referencedFragmentName);
  }
} // Collect all conflicts found between two fragments, including via spreading in
// any nested fragments.

function collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2) {
  // No need to compare a fragment to itself.
  if (fragmentName1 === fragmentName2) {
    return;
  } // Memoize so two fragments are not compared for conflicts more than once.

  if (comparedFragmentPairs.has(fragmentName1, fragmentName2, areMutuallyExclusive)) {
    return;
  }
  comparedFragmentPairs.add(fragmentName1, fragmentName2, areMutuallyExclusive);
  const fragment1 = context.getFragment(fragmentName1);
  const fragment2 = context.getFragment(fragmentName2);
  if (!fragment1 || !fragment2) {
    return;
  }
  const [fieldMap1, referencedFragmentNames1] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment1);
  const [fieldMap2, referencedFragmentNames2] = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment2); // (F) First, collect all conflicts between these two collections of fields
  // (not including any nested fragments).

  collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (G) Then collect conflicts between the first fragment and any nested
  // fragments spread in the second fragment.

  for (const referencedFragmentName2 of referencedFragmentNames2) {
    collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, referencedFragmentName2);
  } // (G) Then collect conflicts between the second fragment and any nested
  // fragments spread in the first fragment.

  for (const referencedFragmentName1 of referencedFragmentNames1) {
    collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, referencedFragmentName1, fragmentName2);
  }
} // Find all conflicts found between two selection sets, including those found
// via spreading in fragments. Called when determining if conflicts exist
// between the sub-fields of two overlapping fields.

function findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, parentType1, selectionSet1, parentType2, selectionSet2) {
  const conflicts = [];
  const [fieldMap1, fragmentNames1] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType1, selectionSet1);
  const [fieldMap2, fragmentNames2] = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType2, selectionSet2); // (H) First, collect all conflicts between these two collections of field.

  collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (I) Then collect conflicts between the first collection of fields and
  // those referenced by each fragment name associated with the second.

  for (const fragmentName2 of fragmentNames2) {
    collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fragmentName2);
  } // (I) Then collect conflicts between the second collection of fields and
  // those referenced by each fragment name associated with the first.

  for (const fragmentName1 of fragmentNames1) {
    collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap2, fragmentName1);
  } // (J) Also collect conflicts between any fragment names by the first and
  // fragment names by the second. This compares each item in the first set of
  // names to each item in the second set of names.

  for (const fragmentName1 of fragmentNames1) {
    for (const fragmentName2 of fragmentNames2) {
      collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2);
    }
  }
  return conflicts;
} // Collect all Conflicts "within" one collection of fields.

function collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap) {
  // A field map is a keyed collection, where each key represents a response
  // name and the value at that key is a list of all fields which provide that
  // response name. For every response name, if there are multiple fields, they
  // must be compared to find a potential conflict.
  for (const [responseName, fields] of Object.entries(fieldMap)) {
    // This compares every field in the list to every other field in this list
    // (except to itself). If the list only has one item, nothing needs to
    // be compared.
    if (fields.length > 1) {
      for (let i = 0; i < fields.length; i++) {
        for (let j = i + 1; j < fields.length; j++) {
          const conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, false,
          // within one collection is never mutually exclusive
          responseName, fields[i], fields[j]);
          if (conflict) {
            conflicts.push(conflict);
          }
        }
      }
    }
  }
} // Collect all Conflicts between two collections of fields. This is similar to,
// but different from the `collectConflictsWithin` function above. This check
// assumes that `collectConflictsWithin` has already been called on each
// provided collection of fields. This is true because this validator traverses
// each individual selection set.

function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) {
  // A field map is a keyed collection, where each key represents a response
  // name and the value at that key is a list of all fields which provide that
  // response name. For any response name which appears in both provided field
  // maps, each field from the first field map must be compared to every field
  // in the second field map to find potential conflicts.
  for (const [responseName, fields1] of Object.entries(fieldMap1)) {
    const fields2 = fieldMap2[responseName];
    if (fields2) {
      for (const field1 of fields1) {
        for (const field2 of fields2) {
          const conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2);
          if (conflict) {
            conflicts.push(conflict);
          }
        }
      }
    }
  }
} // Determines if there is a conflict between two particular fields, including
// comparing their sub-fields.

function findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2) {
  const [parentType1, node1, def1] = field1;
  const [parentType2, node2, def2] = field2; // If it is known that two fields could not possibly apply at the same
  // time, due to the parent types, then it is safe to permit them to diverge
  // in aliased field or arguments used as they will not present any ambiguity
  // by differing.
  // It is known that two parent types could never overlap if they are
  // different Object types. Interface or Union types might overlap - if not
  // in the current state of the schema, then perhaps in some future version,
  // thus may not safely diverge.

  const areMutuallyExclusive = parentFieldsAreMutuallyExclusive || parentType1 !== parentType2 && (0, _definition.isObjectType)(parentType1) && (0, _definition.isObjectType)(parentType2);
  if (!areMutuallyExclusive) {
    // Two aliases must refer to the same field.
    const name1 = node1.name.value;
    const name2 = node2.name.value;
    if (name1 !== name2) {
      return [[responseName, `"${name1}" and "${name2}" are different fields`], [node1], [node2]];
    } // Two field calls must have the same arguments.

    if (!sameArguments(node1, node2)) {
      return [[responseName, 'they have differing arguments'], [node1], [node2]];
    }
  } // The return type for each field.

  const type1 = def1 === null || def1 === void 0 ? void 0 : def1.type;
  const type2 = def2 === null || def2 === void 0 ? void 0 : def2.type;
  if (type1 && type2 && doTypesConflict(type1, type2)) {
    return [[responseName, `they return conflicting types "${(0, _inspect.inspect)(type1)}" and "${(0, _inspect.inspect)(type2)}"`], [node1], [node2]];
  } // Collect and compare sub-fields. Use the same "visited fragment names" list
  // for both collections so fields in a fragment reference are never
  // compared to themselves.

  const selectionSet1 = node1.selectionSet;
  const selectionSet2 = node2.selectionSet;
  if (selectionSet1 && selectionSet2) {
    const conflicts = findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, (0, _definition.getNamedType)(type1), selectionSet1, (0, _definition.getNamedType)(type2), selectionSet2);
    return subfieldConflicts(conflicts, responseName, node1, node2);
  }
}
function sameArguments(node1, node2) {
  const args1 = node1.arguments;
  const args2 = node2.arguments;
  if (args1 === undefined || args1.length === 0) {
    return args2 === undefined || args2.length === 0;
  }
  if (args2 === undefined || args2.length === 0) {
    return false;
  }
  /* c8 ignore next */

  if (args1.length !== args2.length) {
    /* c8 ignore next */
    return false;
    /* c8 ignore next */
  }

  const values2 = new Map(args2.map(_ref2 => {
    let {
      name,
      value
    } = _ref2;
    return [name.value, value];
  }));
  return args1.every(arg1 => {
    const value1 = arg1.value;
    const value2 = values2.get(arg1.name.value);
    if (value2 === undefined) {
      return false;
    }
    return stringifyValue(value1) === stringifyValue(value2);
  });
}
function stringifyValue(value) {
  return (0, _printer.print)((0, _sortValueNode.sortValueNode)(value));
} // Two types conflict if both types could not apply to a value simultaneously.
// Composite types are ignored as their individual field types will be compared
// later recursively. However List and Non-Null types must match.

function doTypesConflict(type1, type2) {
  if ((0, _definition.isListType)(type1)) {
    return (0, _definition.isListType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;
  }
  if ((0, _definition.isListType)(type2)) {
    return true;
  }
  if ((0, _definition.isNonNullType)(type1)) {
    return (0, _definition.isNonNullType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;
  }
  if ((0, _definition.isNonNullType)(type2)) {
    return true;
  }
  if ((0, _definition.isLeafType)(type1) || (0, _definition.isLeafType)(type2)) {
    return type1 !== type2;
  }
  return false;
} // Given a selection set, return the collection of fields (a mapping of response
// name to field nodes and definitions) as well as a list of fragment names
// referenced via fragment spreads.

function getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet) {
  const cached = cachedFieldsAndFragmentNames.get(selectionSet);
  if (cached) {
    return cached;
  }
  const nodeAndDefs = Object.create(null);
  const fragmentNames = Object.create(null);
  _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames);
  const result = [nodeAndDefs, Object.keys(fragmentNames)];
  cachedFieldsAndFragmentNames.set(selectionSet, result);
  return result;
} // Given a reference to a fragment, return the represented collection of fields
// as well as a list of nested fragment names referenced via fragment spreads.

function getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment) {
  // Short-circuit building a type from the node if possible.
  const cached = cachedFieldsAndFragmentNames.get(fragment.selectionSet);
  if (cached) {
    return cached;
  }
  const fragmentType = (0, _typeFromAST.typeFromAST)(context.getSchema(), fragment.typeCondition);
  return getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragmentType, fragment.selectionSet);
}
function _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames) {
  for (const selection of selectionSet.selections) {
    switch (selection.kind) {
      case _kinds.Kind.FIELD:
        {
          const fieldName = selection.name.value;
          let fieldDef;
          if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) {
            fieldDef = parentType.getFields()[fieldName];
          }
          const responseName = selection.alias ? selection.alias.value : fieldName;
          if (!nodeAndDefs[responseName]) {
            nodeAndDefs[responseName] = [];
          }
          nodeAndDefs[responseName].push([parentType, selection, fieldDef]);
          break;
        }
      case _kinds.Kind.FRAGMENT_SPREAD:
        fragmentNames[selection.name.value] = true;
        break;
      case _kinds.Kind.INLINE_FRAGMENT:
        {
          const typeCondition = selection.typeCondition;
          const inlineFragmentType = typeCondition ? (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition) : parentType;
          _collectFieldsAndFragmentNames(context, inlineFragmentType, selection.selectionSet, nodeAndDefs, fragmentNames);
          break;
        }
    }
  }
} // Given a series of Conflicts which occurred between two sub-fields, generate
// a single Conflict.

function subfieldConflicts(conflicts, responseName, node1, node2) {
  if (conflicts.length > 0) {
    return [[responseName, conflicts.map(_ref3 => {
      let [reason] = _ref3;
      return reason;
    })], [node1, ...conflicts.map(_ref4 => {
      let [, fields1] = _ref4;
      return fields1;
    }).flat()], [node2, ...conflicts.map(_ref5 => {
      let [,, fields2] = _ref5;
      return fields2;
    }).flat()]];
  }
}
/**
 * A way to keep track of pairs of things when the ordering of the pair does not matter.
 */

class PairSet {
  constructor() {
    this._data = new Map();
  }
  has(a, b, areMutuallyExclusive) {
    var _this$_data$get;
    const [key1, key2] = a < b ? [a, b] : [b, a];
    const result = (_this$_data$get = this._data.get(key1)) === null || _this$_data$get === void 0 ? void 0 : _this$_data$get.get(key2);
    if (result === undefined) {
      return false;
    } // areMutuallyExclusive being false is a superset of being true, hence if
    // we want to know if this PairSet "has" these two with no exclusivity,
    // we have to ensure it was added as such.

    return areMutuallyExclusive ? true : areMutuallyExclusive === result;
  }
  add(a, b, areMutuallyExclusive) {
    const [key1, key2] = a < b ? [a, b] : [b, a];
    const map = this._data.get(key1);
    if (map === undefined) {
      this._data.set(key1, new Map([[key2, areMutuallyExclusive]]));
    } else {
      map.set(key2, areMutuallyExclusive);
    }
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs":
/*!**************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs ***!
  \**************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.PossibleFragmentSpreadsRule = PossibleFragmentSpreadsRule;
var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _typeComparators = __webpack_require__(/*! ../../utilities/typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs");
var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
/**
 * Possible fragment spread
 *
 * A fragment spread is only valid if the type condition could ever possibly
 * be true: if there is a non-empty intersection of the possible parent types,
 * and possible types which pass the type condition.
 */
function PossibleFragmentSpreadsRule(context) {
  return {
    InlineFragment(node) {
      const fragType = context.getType();
      const parentType = context.getParentType();
      if ((0, _definition.isCompositeType)(fragType) && (0, _definition.isCompositeType)(parentType) && !(0, _typeComparators.doTypesOverlap)(context.getSchema(), fragType, parentType)) {
        const parentTypeStr = (0, _inspect.inspect)(parentType);
        const fragTypeStr = (0, _inspect.inspect)(fragType);
        context.reportError(new _GraphQLError.GraphQLError(`Fragment cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, {
          nodes: node
        }));
      }
    },
    FragmentSpread(node) {
      const fragName = node.name.value;
      const fragType = getFragmentType(context, fragName);
      const parentType = context.getParentType();
      if (fragType && parentType && !(0, _typeComparators.doTypesOverlap)(context.getSchema(), fragType, parentType)) {
        const parentTypeStr = (0, _inspect.inspect)(parentType);
        const fragTypeStr = (0, _inspect.inspect)(fragType);
        context.reportError(new _GraphQLError.GraphQLError(`Fragment "${fragName}" cannot be spread here as objects of type "${parentTypeStr}" can never be of type "${fragTypeStr}".`, {
          nodes: node
        }));
      }
    }
  };
}
function getFragmentType(context, name) {
  const frag = context.getFragment(name);
  if (frag) {
    const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), frag.typeCondition);
    if ((0, _definition.isCompositeType)(type)) {
      return type;
    }
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs":
/*!*************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs ***!
  \*************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.PossibleTypeExtensionsRule = PossibleTypeExtensionsRule;
var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _invariant = __webpack_require__(/*! ../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _predicates = __webpack_require__(/*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs");
var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
/**
 * Possible type extension
 *
 * A type extension is only valid if the type is defined and has the same kind.
 */
function PossibleTypeExtensionsRule(context) {
  const schema = context.getSchema();
  const definedTypes = Object.create(null);
  for (const def of context.getDocument().definitions) {
    if ((0, _predicates.isTypeDefinitionNode)(def)) {
      definedTypes[def.name.value] = def;
    }
  }
  return {
    ScalarTypeExtension: checkExtension,
    ObjectTypeExtension: checkExtension,
    InterfaceTypeExtension: checkExtension,
    UnionTypeExtension: checkExtension,
    EnumTypeExtension: checkExtension,
    InputObjectTypeExtension: checkExtension
  };
  function checkExtension(node) {
    const typeName = node.name.value;
    const defNode = definedTypes[typeName];
    const existingType = schema === null || schema === void 0 ? void 0 : schema.getType(typeName);
    let expectedKind;
    if (defNode) {
      expectedKind = defKindToExtKind[defNode.kind];
    } else if (existingType) {
      expectedKind = typeToExtKind(existingType);
    }
    if (expectedKind) {
      if (expectedKind !== node.kind) {
        const kindStr = extensionKindToTypeName(node.kind);
        context.reportError(new _GraphQLError.GraphQLError(`Cannot extend non-${kindStr} type "${typeName}".`, {
          nodes: defNode ? [defNode, node] : node
        }));
      }
    } else {
      const allTypeNames = Object.keys({
        ...definedTypes,
        ...(schema === null || schema === void 0 ? void 0 : schema.getTypeMap())
      });
      const suggestedTypes = (0, _suggestionList.suggestionList)(typeName, allTypeNames);
      context.reportError(new _GraphQLError.GraphQLError(`Cannot extend type "${typeName}" because it is not defined.` + (0, _didYouMean.didYouMean)(suggestedTypes), {
        nodes: node.name
      }));
    }
  }
}
const defKindToExtKind = {
  [_kinds.Kind.SCALAR_TYPE_DEFINITION]: _kinds.Kind.SCALAR_TYPE_EXTENSION,
  [_kinds.Kind.OBJECT_TYPE_DEFINITION]: _kinds.Kind.OBJECT_TYPE_EXTENSION,
  [_kinds.Kind.INTERFACE_TYPE_DEFINITION]: _kinds.Kind.INTERFACE_TYPE_EXTENSION,
  [_kinds.Kind.UNION_TYPE_DEFINITION]: _kinds.Kind.UNION_TYPE_EXTENSION,
  [_kinds.Kind.ENUM_TYPE_DEFINITION]: _kinds.Kind.ENUM_TYPE_EXTENSION,
  [_kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION]: _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION
};
function typeToExtKind(type) {
  if ((0, _definition.isScalarType)(type)) {
    return _kinds.Kind.SCALAR_TYPE_EXTENSION;
  }
  if ((0, _definition.isObjectType)(type)) {
    return _kinds.Kind.OBJECT_TYPE_EXTENSION;
  }
  if ((0, _definition.isInterfaceType)(type)) {
    return _kinds.Kind.INTERFACE_TYPE_EXTENSION;
  }
  if ((0, _definition.isUnionType)(type)) {
    return _kinds.Kind.UNION_TYPE_EXTENSION;
  }
  if ((0, _definition.isEnumType)(type)) {
    return _kinds.Kind.ENUM_TYPE_EXTENSION;
  }
  if ((0, _definition.isInputObjectType)(type)) {
    return _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION;
  }
  /* c8 ignore next 3 */
  // Not reachable. All possible types have been considered

   false || (0, _invariant.invariant)(false, 'Unexpected type: ' + (0, _inspect.inspect)(type));
}
function extensionKindToTypeName(kind) {
  switch (kind) {
    case _kinds.Kind.SCALAR_TYPE_EXTENSION:
      return 'scalar';
    case _kinds.Kind.OBJECT_TYPE_EXTENSION:
      return 'object';
    case _kinds.Kind.INTERFACE_TYPE_EXTENSION:
      return 'interface';
    case _kinds.Kind.UNION_TYPE_EXTENSION:
      return 'union';
    case _kinds.Kind.ENUM_TYPE_EXTENSION:
      return 'enum';
    case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION:
      return 'input object';
    // Not reachable. All possible types have been considered

    /* c8 ignore next */

    default:
       false || (0, _invariant.invariant)(false, 'Unexpected kind: ' + (0, _inspect.inspect)(kind));
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs":
/*!****************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs ***!
  \****************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.ProvidedRequiredArgumentsOnDirectivesRule = ProvidedRequiredArgumentsOnDirectivesRule;
exports.ProvidedRequiredArgumentsRule = ProvidedRequiredArgumentsRule;
var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _keyMap = __webpack_require__(/*! ../../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _directives = __webpack_require__(/*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
/**
 * Provided required arguments
 *
 * A field or directive is only valid if all required (non-null without a
 * default value) field arguments have been provided.
 */
function ProvidedRequiredArgumentsRule(context) {
  return {
    // eslint-disable-next-line new-cap
    ...ProvidedRequiredArgumentsOnDirectivesRule(context),
    Field: {
      // Validate on leave to allow for deeper errors to appear first.
      leave(fieldNode) {
        var _fieldNode$arguments;
        const fieldDef = context.getFieldDef();
        if (!fieldDef) {
          return false;
        }
        const providedArgs = new Set(
        // FIXME: https://github.com/graphql/graphql-js/issues/2203
        /* c8 ignore next */
        (_fieldNode$arguments = fieldNode.arguments) === null || _fieldNode$arguments === void 0 ? void 0 : _fieldNode$arguments.map(arg => arg.name.value));
        for (const argDef of fieldDef.args) {
          if (!providedArgs.has(argDef.name) && (0, _definition.isRequiredArgument)(argDef)) {
            const argTypeStr = (0, _inspect.inspect)(argDef.type);
            context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldDef.name}" argument "${argDef.name}" of type "${argTypeStr}" is required, but it was not provided.`, {
              nodes: fieldNode
            }));
          }
        }
      }
    }
  };
}
/**
 * @internal
 */

function ProvidedRequiredArgumentsOnDirectivesRule(context) {
  var _schema$getDirectives;
  const requiredArgsMap = Object.create(null);
  const schema = context.getSchema();
  const definedDirectives = (_schema$getDirectives = schema === null || schema === void 0 ? void 0 : schema.getDirectives()) !== null && _schema$getDirectives !== void 0 ? _schema$getDirectives : _directives.specifiedDirectives;
  for (const directive of definedDirectives) {
    requiredArgsMap[directive.name] = (0, _keyMap.keyMap)(directive.args.filter(_definition.isRequiredArgument), arg => arg.name);
  }
  const astDefinitions = context.getDocument().definitions;
  for (const def of astDefinitions) {
    if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
      var _def$arguments;

      // FIXME: https://github.com/graphql/graphql-js/issues/2203

      /* c8 ignore next */
      const argNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : [];
      requiredArgsMap[def.name.value] = (0, _keyMap.keyMap)(argNodes.filter(isRequiredArgumentNode), arg => arg.name.value);
    }
  }
  return {
    Directive: {
      // Validate on leave to allow for deeper errors to appear first.
      leave(directiveNode) {
        const directiveName = directiveNode.name.value;
        const requiredArgs = requiredArgsMap[directiveName];
        if (requiredArgs) {
          var _directiveNode$argume;

          // FIXME: https://github.com/graphql/graphql-js/issues/2203

          /* c8 ignore next */
          const argNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : [];
          const argNodeMap = new Set(argNodes.map(arg => arg.name.value));
          for (const [argName, argDef] of Object.entries(requiredArgs)) {
            if (!argNodeMap.has(argName)) {
              const argType = (0, _definition.isType)(argDef.type) ? (0, _inspect.inspect)(argDef.type) : (0, _printer.print)(argDef.type);
              context.reportError(new _GraphQLError.GraphQLError(`Directive "@${directiveName}" argument "${argName}" of type "${argType}" is required, but it was not provided.`, {
                nodes: directiveNode
              }));
            }
          }
        }
      }
    }
  };
}
function isRequiredArgumentNode(arg) {
  return arg.type.kind === _kinds.Kind.NON_NULL_TYPE && arg.defaultValue == null;
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs":
/*!**************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs ***!
  \**************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.ScalarLeafsRule = ScalarLeafsRule;
var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
/**
 * Scalar leafs
 *
 * A GraphQL document is valid only if all leaf fields (fields without
 * sub selections) are of scalar or enum types.
 */
function ScalarLeafsRule(context) {
  return {
    Field(node) {
      const type = context.getType();
      const selectionSet = node.selectionSet;
      if (type) {
        if ((0, _definition.isLeafType)((0, _definition.getNamedType)(type))) {
          if (selectionSet) {
            const fieldName = node.name.value;
            const typeStr = (0, _inspect.inspect)(type);
            context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldName}" must not have a selection since type "${typeStr}" has no subfields.`, {
              nodes: selectionSet
            }));
          }
        } else if (!selectionSet) {
          const fieldName = node.name.value;
          const typeStr = (0, _inspect.inspect)(type);
          context.reportError(new _GraphQLError.GraphQLError(`Field "${fieldName}" of type "${typeStr}" must have a selection of subfields. Did you mean "${fieldName} { ... }"?`, {
            nodes: node
          }));
        }
      }
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs":
/*!***************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs ***!
  \***************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.SingleFieldSubscriptionsRule = SingleFieldSubscriptionsRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _collectFields = __webpack_require__(/*! ../../execution/collectFields.mjs */ "../../../node_modules/graphql/execution/collectFields.mjs");
/**
 * Subscriptions must only include a non-introspection field.
 *
 * A GraphQL subscription is valid only if it contains a single root field and
 * that root field is not an introspection field.
 *
 * See https://spec.graphql.org/draft/#sec-Single-root-field
 */
function SingleFieldSubscriptionsRule(context) {
  return {
    OperationDefinition(node) {
      if (node.operation === 'subscription') {
        const schema = context.getSchema();
        const subscriptionType = schema.getSubscriptionType();
        if (subscriptionType) {
          const operationName = node.name ? node.name.value : null;
          const variableValues = Object.create(null);
          const document = context.getDocument();
          const fragments = Object.create(null);
          for (const definition of document.definitions) {
            if (definition.kind === _kinds.Kind.FRAGMENT_DEFINITION) {
              fragments[definition.name.value] = definition;
            }
          }
          const fields = (0, _collectFields.collectFields)(schema, fragments, variableValues, subscriptionType, node.selectionSet);
          if (fields.size > 1) {
            const fieldSelectionLists = [...fields.values()];
            const extraFieldSelectionLists = fieldSelectionLists.slice(1);
            const extraFieldSelections = extraFieldSelectionLists.flat();
            context.reportError(new _GraphQLError.GraphQLError(operationName != null ? `Subscription "${operationName}" must select only one top level field.` : 'Anonymous Subscription must select only one top level field.', {
              nodes: extraFieldSelections
            }));
          }
          for (const fieldNodes of fields.values()) {
            const field = fieldNodes[0];
            const fieldName = field.name.value;
            if (fieldName.startsWith('__')) {
              context.reportError(new _GraphQLError.GraphQLError(operationName != null ? `Subscription "${operationName}" must not select an introspection top level field.` : 'Anonymous Subscription must not select an introspection top level field.', {
                nodes: fieldNodes
              }));
            }
          }
        }
      }
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs":
/*!********************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs ***!
  \********************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UniqueArgumentDefinitionNamesRule = UniqueArgumentDefinitionNamesRule;
var _groupBy = __webpack_require__(/*! ../../jsutils/groupBy.mjs */ "../../../node_modules/graphql/jsutils/groupBy.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Unique argument definition names
 *
 * A GraphQL Object or Interface type is only valid if all its fields have uniquely named arguments.
 * A GraphQL Directive is only valid if all its arguments are uniquely named.
 */
function UniqueArgumentDefinitionNamesRule(context) {
  return {
    DirectiveDefinition(directiveNode) {
      var _directiveNode$argume;

      // FIXME: https://github.com/graphql/graphql-js/issues/2203

      /* c8 ignore next */
      const argumentNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : [];
      return checkArgUniqueness(`@${directiveNode.name.value}`, argumentNodes);
    },
    InterfaceTypeDefinition: checkArgUniquenessPerField,
    InterfaceTypeExtension: checkArgUniquenessPerField,
    ObjectTypeDefinition: checkArgUniquenessPerField,
    ObjectTypeExtension: checkArgUniquenessPerField
  };
  function checkArgUniquenessPerField(typeNode) {
    var _typeNode$fields;
    const typeName = typeNode.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203

    /* c8 ignore next */

    const fieldNodes = (_typeNode$fields = typeNode.fields) !== null && _typeNode$fields !== void 0 ? _typeNode$fields : [];
    for (const fieldDef of fieldNodes) {
      var _fieldDef$arguments;
      const fieldName = fieldDef.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203

      /* c8 ignore next */

      const argumentNodes = (_fieldDef$arguments = fieldDef.arguments) !== null && _fieldDef$arguments !== void 0 ? _fieldDef$arguments : [];
      checkArgUniqueness(`${typeName}.${fieldName}`, argumentNodes);
    }
    return false;
  }
  function checkArgUniqueness(parentName, argumentNodes) {
    const seenArgs = (0, _groupBy.groupBy)(argumentNodes, arg => arg.name.value);
    for (const [argName, argNodes] of seenArgs) {
      if (argNodes.length > 1) {
        context.reportError(new _GraphQLError.GraphQLError(`Argument "${parentName}(${argName}:)" can only be defined once.`, {
          nodes: argNodes.map(node => node.name)
        }));
      }
    }
    return false;
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs":
/*!**********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs ***!
  \**********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UniqueArgumentNamesRule = UniqueArgumentNamesRule;
var _groupBy = __webpack_require__(/*! ../../jsutils/groupBy.mjs */ "../../../node_modules/graphql/jsutils/groupBy.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Unique argument names
 *
 * A GraphQL field or directive is only valid if all supplied arguments are
 * uniquely named.
 *
 * See https://spec.graphql.org/draft/#sec-Argument-Names
 */
function UniqueArgumentNamesRule(context) {
  return {
    Field: checkArgUniqueness,
    Directive: checkArgUniqueness
  };
  function checkArgUniqueness(parentNode) {
    var _parentNode$arguments;

    // FIXME: https://github.com/graphql/graphql-js/issues/2203

    /* c8 ignore next */
    const argumentNodes = (_parentNode$arguments = parentNode.arguments) !== null && _parentNode$arguments !== void 0 ? _parentNode$arguments : [];
    const seenArgs = (0, _groupBy.groupBy)(argumentNodes, arg => arg.name.value);
    for (const [argName, argNodes] of seenArgs) {
      if (argNodes.length > 1) {
        context.reportError(new _GraphQLError.GraphQLError(`There can be only one argument named "${argName}".`, {
          nodes: argNodes.map(node => node.name)
        }));
      }
    }
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs":
/*!***********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs ***!
  \***********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UniqueDirectiveNamesRule = UniqueDirectiveNamesRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Unique directive names
 *
 * A GraphQL document is only valid if all defined directives have unique names.
 */
function UniqueDirectiveNamesRule(context) {
  const knownDirectiveNames = Object.create(null);
  const schema = context.getSchema();
  return {
    DirectiveDefinition(node) {
      const directiveName = node.name.value;
      if (schema !== null && schema !== void 0 && schema.getDirective(directiveName)) {
        context.reportError(new _GraphQLError.GraphQLError(`Directive "@${directiveName}" already exists in the schema. It cannot be redefined.`, {
          nodes: node.name
        }));
        return;
      }
      if (knownDirectiveNames[directiveName]) {
        context.reportError(new _GraphQLError.GraphQLError(`There can be only one directive named "@${directiveName}".`, {
          nodes: [knownDirectiveNames[directiveName], node.name]
        }));
      } else {
        knownDirectiveNames[directiveName] = node.name;
      }
      return false;
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs":
/*!******************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs ***!
  \******************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UniqueDirectivesPerLocationRule = UniqueDirectivesPerLocationRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _predicates = __webpack_require__(/*! ../../language/predicates.mjs */ "../../../node_modules/graphql/language/predicates.mjs");
var _directives = __webpack_require__(/*! ../../type/directives.mjs */ "../../../node_modules/graphql/type/directives.mjs");
/**
 * Unique directive names per location
 *
 * A GraphQL document is only valid if all non-repeatable directives at
 * a given location are uniquely named.
 *
 * See https://spec.graphql.org/draft/#sec-Directives-Are-Unique-Per-Location
 */
function UniqueDirectivesPerLocationRule(context) {
  const uniqueDirectiveMap = Object.create(null);
  const schema = context.getSchema();
  const definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives;
  for (const directive of definedDirectives) {
    uniqueDirectiveMap[directive.name] = !directive.isRepeatable;
  }
  const astDefinitions = context.getDocument().definitions;
  for (const def of astDefinitions) {
    if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
      uniqueDirectiveMap[def.name.value] = !def.repeatable;
    }
  }
  const schemaDirectives = Object.create(null);
  const typeDirectivesMap = Object.create(null);
  return {
    // Many different AST nodes may contain directives. Rather than listing
    // them all, just listen for entering any node, and check to see if it
    // defines any directives.
    enter(node) {
      if (!('directives' in node) || !node.directives) {
        return;
      }
      let seenDirectives;
      if (node.kind === _kinds.Kind.SCHEMA_DEFINITION || node.kind === _kinds.Kind.SCHEMA_EXTENSION) {
        seenDirectives = schemaDirectives;
      } else if ((0, _predicates.isTypeDefinitionNode)(node) || (0, _predicates.isTypeExtensionNode)(node)) {
        const typeName = node.name.value;
        seenDirectives = typeDirectivesMap[typeName];
        if (seenDirectives === undefined) {
          typeDirectivesMap[typeName] = seenDirectives = Object.create(null);
        }
      } else {
        seenDirectives = Object.create(null);
      }
      for (const directive of node.directives) {
        const directiveName = directive.name.value;
        if (uniqueDirectiveMap[directiveName]) {
          if (seenDirectives[directiveName]) {
            context.reportError(new _GraphQLError.GraphQLError(`The directive "@${directiveName}" can only be used once at this location.`, {
              nodes: [seenDirectives[directiveName], directive]
            }));
          } else {
            seenDirectives[directiveName] = directive;
          }
        }
      }
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs":
/*!***********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs ***!
  \***********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UniqueEnumValueNamesRule = UniqueEnumValueNamesRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
/**
 * Unique enum value names
 *
 * A GraphQL enum type is only valid if all its values are uniquely named.
 */
function UniqueEnumValueNamesRule(context) {
  const schema = context.getSchema();
  const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);
  const knownValueNames = Object.create(null);
  return {
    EnumTypeDefinition: checkValueUniqueness,
    EnumTypeExtension: checkValueUniqueness
  };
  function checkValueUniqueness(node) {
    var _node$values;
    const typeName = node.name.value;
    if (!knownValueNames[typeName]) {
      knownValueNames[typeName] = Object.create(null);
    } // FIXME: https://github.com/graphql/graphql-js/issues/2203

    /* c8 ignore next */

    const valueNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : [];
    const valueNames = knownValueNames[typeName];
    for (const valueDef of valueNodes) {
      const valueName = valueDef.name.value;
      const existingType = existingTypeMap[typeName];
      if ((0, _definition.isEnumType)(existingType) && existingType.getValue(valueName)) {
        context.reportError(new _GraphQLError.GraphQLError(`Enum value "${typeName}.${valueName}" already exists in the schema. It cannot also be defined in this type extension.`, {
          nodes: valueDef.name
        }));
      } else if (valueNames[valueName]) {
        context.reportError(new _GraphQLError.GraphQLError(`Enum value "${typeName}.${valueName}" can only be defined once.`, {
          nodes: [valueNames[valueName], valueDef.name]
        }));
      } else {
        valueNames[valueName] = valueDef.name;
      }
    }
    return false;
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs":
/*!*****************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs ***!
  \*****************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UniqueFieldDefinitionNamesRule = UniqueFieldDefinitionNamesRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
/**
 * Unique field definition names
 *
 * A GraphQL complex type is only valid if all its fields are uniquely named.
 */
function UniqueFieldDefinitionNamesRule(context) {
  const schema = context.getSchema();
  const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);
  const knownFieldNames = Object.create(null);
  return {
    InputObjectTypeDefinition: checkFieldUniqueness,
    InputObjectTypeExtension: checkFieldUniqueness,
    InterfaceTypeDefinition: checkFieldUniqueness,
    InterfaceTypeExtension: checkFieldUniqueness,
    ObjectTypeDefinition: checkFieldUniqueness,
    ObjectTypeExtension: checkFieldUniqueness
  };
  function checkFieldUniqueness(node) {
    var _node$fields;
    const typeName = node.name.value;
    if (!knownFieldNames[typeName]) {
      knownFieldNames[typeName] = Object.create(null);
    } // FIXME: https://github.com/graphql/graphql-js/issues/2203

    /* c8 ignore next */

    const fieldNodes = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : [];
    const fieldNames = knownFieldNames[typeName];
    for (const fieldDef of fieldNodes) {
      const fieldName = fieldDef.name.value;
      if (hasField(existingTypeMap[typeName], fieldName)) {
        context.reportError(new _GraphQLError.GraphQLError(`Field "${typeName}.${fieldName}" already exists in the schema. It cannot also be defined in this type extension.`, {
          nodes: fieldDef.name
        }));
      } else if (fieldNames[fieldName]) {
        context.reportError(new _GraphQLError.GraphQLError(`Field "${typeName}.${fieldName}" can only be defined once.`, {
          nodes: [fieldNames[fieldName], fieldDef.name]
        }));
      } else {
        fieldNames[fieldName] = fieldDef.name;
      }
    }
    return false;
  }
}
function hasField(type, fieldName) {
  if ((0, _definition.isObjectType)(type) || (0, _definition.isInterfaceType)(type) || (0, _definition.isInputObjectType)(type)) {
    return type.getFields()[fieldName] != null;
  }
  return false;
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs":
/*!**********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs ***!
  \**********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UniqueFragmentNamesRule = UniqueFragmentNamesRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Unique fragment names
 *
 * A GraphQL document is only valid if all defined fragments have unique names.
 *
 * See https://spec.graphql.org/draft/#sec-Fragment-Name-Uniqueness
 */
function UniqueFragmentNamesRule(context) {
  const knownFragmentNames = Object.create(null);
  return {
    OperationDefinition: () => false,
    FragmentDefinition(node) {
      const fragmentName = node.name.value;
      if (knownFragmentNames[fragmentName]) {
        context.reportError(new _GraphQLError.GraphQLError(`There can be only one fragment named "${fragmentName}".`, {
          nodes: [knownFragmentNames[fragmentName], node.name]
        }));
      } else {
        knownFragmentNames[fragmentName] = node.name;
      }
      return false;
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs":
/*!************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs ***!
  \************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UniqueInputFieldNamesRule = UniqueInputFieldNamesRule;
var _invariant = __webpack_require__(/*! ../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Unique input field names
 *
 * A GraphQL input object value is only valid if all supplied fields are
 * uniquely named.
 *
 * See https://spec.graphql.org/draft/#sec-Input-Object-Field-Uniqueness
 */
function UniqueInputFieldNamesRule(context) {
  const knownNameStack = [];
  let knownNames = Object.create(null);
  return {
    ObjectValue: {
      enter() {
        knownNameStack.push(knownNames);
        knownNames = Object.create(null);
      },
      leave() {
        const prevKnownNames = knownNameStack.pop();
        prevKnownNames || (0, _invariant.invariant)(false);
        knownNames = prevKnownNames;
      }
    },
    ObjectField(node) {
      const fieldName = node.name.value;
      if (knownNames[fieldName]) {
        context.reportError(new _GraphQLError.GraphQLError(`There can be only one input field named "${fieldName}".`, {
          nodes: [knownNames[fieldName], node.name]
        }));
      } else {
        knownNames[fieldName] = node.name;
      }
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs":
/*!***********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs ***!
  \***********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UniqueOperationNamesRule = UniqueOperationNamesRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Unique operation names
 *
 * A GraphQL document is only valid if all defined operations have unique names.
 *
 * See https://spec.graphql.org/draft/#sec-Operation-Name-Uniqueness
 */
function UniqueOperationNamesRule(context) {
  const knownOperationNames = Object.create(null);
  return {
    OperationDefinition(node) {
      const operationName = node.name;
      if (operationName) {
        if (knownOperationNames[operationName.value]) {
          context.reportError(new _GraphQLError.GraphQLError(`There can be only one operation named "${operationName.value}".`, {
            nodes: [knownOperationNames[operationName.value], operationName]
          }));
        } else {
          knownOperationNames[operationName.value] = operationName;
        }
      }
      return false;
    },
    FragmentDefinition: () => false
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs":
/*!***********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs ***!
  \***********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UniqueOperationTypesRule = UniqueOperationTypesRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Unique operation types
 *
 * A GraphQL document is only valid if it has only one type per operation.
 */
function UniqueOperationTypesRule(context) {
  const schema = context.getSchema();
  const definedOperationTypes = Object.create(null);
  const existingOperationTypes = schema ? {
    query: schema.getQueryType(),
    mutation: schema.getMutationType(),
    subscription: schema.getSubscriptionType()
  } : {};
  return {
    SchemaDefinition: checkOperationTypes,
    SchemaExtension: checkOperationTypes
  };
  function checkOperationTypes(node) {
    var _node$operationTypes;

    // See: https://github.com/graphql/graphql-js/issues/2203

    /* c8 ignore next */
    const operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : [];
    for (const operationType of operationTypesNodes) {
      const operation = operationType.operation;
      const alreadyDefinedOperationType = definedOperationTypes[operation];
      if (existingOperationTypes[operation]) {
        context.reportError(new _GraphQLError.GraphQLError(`Type for ${operation} already defined in the schema. It cannot be redefined.`, {
          nodes: operationType
        }));
      } else if (alreadyDefinedOperationType) {
        context.reportError(new _GraphQLError.GraphQLError(`There can be only one ${operation} type in schema.`, {
          nodes: [alreadyDefinedOperationType, operationType]
        }));
      } else {
        definedOperationTypes[operation] = operationType;
      }
    }
    return false;
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs":
/*!******************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs ***!
  \******************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UniqueTypeNamesRule = UniqueTypeNamesRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Unique type names
 *
 * A GraphQL document is only valid if all defined types have unique names.
 */
function UniqueTypeNamesRule(context) {
  const knownTypeNames = Object.create(null);
  const schema = context.getSchema();
  return {
    ScalarTypeDefinition: checkTypeName,
    ObjectTypeDefinition: checkTypeName,
    InterfaceTypeDefinition: checkTypeName,
    UnionTypeDefinition: checkTypeName,
    EnumTypeDefinition: checkTypeName,
    InputObjectTypeDefinition: checkTypeName
  };
  function checkTypeName(node) {
    const typeName = node.name.value;
    if (schema !== null && schema !== void 0 && schema.getType(typeName)) {
      context.reportError(new _GraphQLError.GraphQLError(`Type "${typeName}" already exists in the schema. It cannot also be defined in this type definition.`, {
        nodes: node.name
      }));
      return;
    }
    if (knownTypeNames[typeName]) {
      context.reportError(new _GraphQLError.GraphQLError(`There can be only one type named "${typeName}".`, {
        nodes: [knownTypeNames[typeName], node.name]
      }));
    } else {
      knownTypeNames[typeName] = node.name;
    }
    return false;
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs":
/*!**********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs ***!
  \**********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UniqueVariableNamesRule = UniqueVariableNamesRule;
var _groupBy = __webpack_require__(/*! ../../jsutils/groupBy.mjs */ "../../../node_modules/graphql/jsutils/groupBy.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
/**
 * Unique variable names
 *
 * A GraphQL operation is only valid if all its variables are uniquely named.
 */
function UniqueVariableNamesRule(context) {
  return {
    OperationDefinition(operationNode) {
      var _operationNode$variab;

      // See: https://github.com/graphql/graphql-js/issues/2203

      /* c8 ignore next */
      const variableDefinitions = (_operationNode$variab = operationNode.variableDefinitions) !== null && _operationNode$variab !== void 0 ? _operationNode$variab : [];
      const seenVariableDefinitions = (0, _groupBy.groupBy)(variableDefinitions, node => node.variable.name.value);
      for (const [variableName, variableNodes] of seenVariableDefinitions) {
        if (variableNodes.length > 1) {
          context.reportError(new _GraphQLError.GraphQLError(`There can be only one variable named "$${variableName}".`, {
            nodes: variableNodes.map(node => node.variable.name)
          }));
        }
      }
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs":
/*!**********************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs ***!
  \**********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.ValuesOfCorrectTypeRule = ValuesOfCorrectTypeRule;
var _didYouMean = __webpack_require__(/*! ../../jsutils/didYouMean.mjs */ "../../../node_modules/graphql/jsutils/didYouMean.mjs");
var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _keyMap = __webpack_require__(/*! ../../jsutils/keyMap.mjs */ "../../../node_modules/graphql/jsutils/keyMap.mjs");
var _suggestionList = __webpack_require__(/*! ../../jsutils/suggestionList.mjs */ "../../../node_modules/graphql/jsutils/suggestionList.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
/**
 * Value literals of correct type
 *
 * A GraphQL document is only valid if all value literals are of the type
 * expected at their position.
 *
 * See https://spec.graphql.org/draft/#sec-Values-of-Correct-Type
 */
function ValuesOfCorrectTypeRule(context) {
  return {
    ListValue(node) {
      // Note: TypeInfo will traverse into a list's item type, so look to the
      // parent input type to check if it is a list.
      const type = (0, _definition.getNullableType)(context.getParentInputType());
      if (!(0, _definition.isListType)(type)) {
        isValidValueNode(context, node);
        return false; // Don't traverse further.
      }
    },

    ObjectValue(node) {
      const type = (0, _definition.getNamedType)(context.getInputType());
      if (!(0, _definition.isInputObjectType)(type)) {
        isValidValueNode(context, node);
        return false; // Don't traverse further.
      } // Ensure every required field exists.

      const fieldNodeMap = (0, _keyMap.keyMap)(node.fields, field => field.name.value);
      for (const fieldDef of Object.values(type.getFields())) {
        const fieldNode = fieldNodeMap[fieldDef.name];
        if (!fieldNode && (0, _definition.isRequiredInputField)(fieldDef)) {
          const typeStr = (0, _inspect.inspect)(fieldDef.type);
          context.reportError(new _GraphQLError.GraphQLError(`Field "${type.name}.${fieldDef.name}" of required type "${typeStr}" was not provided.`, {
            nodes: node
          }));
        }
      }
    },
    ObjectField(node) {
      const parentType = (0, _definition.getNamedType)(context.getParentInputType());
      const fieldType = context.getInputType();
      if (!fieldType && (0, _definition.isInputObjectType)(parentType)) {
        const suggestions = (0, _suggestionList.suggestionList)(node.name.value, Object.keys(parentType.getFields()));
        context.reportError(new _GraphQLError.GraphQLError(`Field "${node.name.value}" is not defined by type "${parentType.name}".` + (0, _didYouMean.didYouMean)(suggestions), {
          nodes: node
        }));
      }
    },
    NullValue(node) {
      const type = context.getInputType();
      if ((0, _definition.isNonNullType)(type)) {
        context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${(0, _inspect.inspect)(type)}", found ${(0, _printer.print)(node)}.`, {
          nodes: node
        }));
      }
    },
    EnumValue: node => isValidValueNode(context, node),
    IntValue: node => isValidValueNode(context, node),
    FloatValue: node => isValidValueNode(context, node),
    StringValue: node => isValidValueNode(context, node),
    BooleanValue: node => isValidValueNode(context, node)
  };
}
/**
 * Any value literal may be a valid representation of a Scalar, depending on
 * that scalar type.
 */

function isValidValueNode(context, node) {
  // Report any error at the full type expected by the location.
  const locationType = context.getInputType();
  if (!locationType) {
    return;
  }
  const type = (0, _definition.getNamedType)(locationType);
  if (!(0, _definition.isLeafType)(type)) {
    const typeStr = (0, _inspect.inspect)(locationType);
    context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${typeStr}", found ${(0, _printer.print)(node)}.`, {
      nodes: node
    }));
    return;
  } // Scalars and Enums determine if a literal value is valid via parseLiteral(),
  // which may throw or return an invalid value to indicate failure.

  try {
    const parseResult = type.parseLiteral(node, undefined
    /* variables */);

    if (parseResult === undefined) {
      const typeStr = (0, _inspect.inspect)(locationType);
      context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${typeStr}", found ${(0, _printer.print)(node)}.`, {
        nodes: node
      }));
    }
  } catch (error) {
    const typeStr = (0, _inspect.inspect)(locationType);
    if (error instanceof _GraphQLError.GraphQLError) {
      context.reportError(error);
    } else {
      context.reportError(new _GraphQLError.GraphQLError(`Expected value of type "${typeStr}", found ${(0, _printer.print)(node)}; ` + error.message, {
        nodes: node,
        originalError: error
      }));
    }
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs":
/*!*************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs ***!
  \*************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.VariablesAreInputTypesRule = VariablesAreInputTypesRule;
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _printer = __webpack_require__(/*! ../../language/printer.mjs */ "../../../node_modules/graphql/language/printer.mjs");
var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
/**
 * Variables are input types
 *
 * A GraphQL operation is only valid if all the variables it defines are of
 * input types (scalar, enum, or input object).
 *
 * See https://spec.graphql.org/draft/#sec-Variables-Are-Input-Types
 */
function VariablesAreInputTypesRule(context) {
  return {
    VariableDefinition(node) {
      const type = (0, _typeFromAST.typeFromAST)(context.getSchema(), node.type);
      if (type !== undefined && !(0, _definition.isInputType)(type)) {
        const variableName = node.variable.name.value;
        const typeName = (0, _printer.print)(node.type);
        context.reportError(new _GraphQLError.GraphQLError(`Variable "$${variableName}" cannot be non-input type "${typeName}".`, {
          nodes: node.type
        }));
      }
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs":
/*!*****************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs ***!
  \*****************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.VariablesInAllowedPositionRule = VariablesInAllowedPositionRule;
var _inspect = __webpack_require__(/*! ../../jsutils/inspect.mjs */ "../../../node_modules/graphql/jsutils/inspect.mjs");
var _GraphQLError = __webpack_require__(/*! ../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _kinds = __webpack_require__(/*! ../../language/kinds.mjs */ "../../../node_modules/graphql/language/kinds.mjs");
var _definition = __webpack_require__(/*! ../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _typeComparators = __webpack_require__(/*! ../../utilities/typeComparators.mjs */ "../../../node_modules/graphql/utilities/typeComparators.mjs");
var _typeFromAST = __webpack_require__(/*! ../../utilities/typeFromAST.mjs */ "../../../node_modules/graphql/utilities/typeFromAST.mjs");
/**
 * Variables in allowed position
 *
 * Variable usages must be compatible with the arguments they are passed to.
 *
 * See https://spec.graphql.org/draft/#sec-All-Variable-Usages-are-Allowed
 */
function VariablesInAllowedPositionRule(context) {
  let varDefMap = Object.create(null);
  return {
    OperationDefinition: {
      enter() {
        varDefMap = Object.create(null);
      },
      leave(operation) {
        const usages = context.getRecursiveVariableUsages(operation);
        for (const {
          node,
          type,
          defaultValue
        } of usages) {
          const varName = node.name.value;
          const varDef = varDefMap[varName];
          if (varDef && type) {
            // A var type is allowed if it is the same or more strict (e.g. is
            // a subtype of) than the expected type. It can be more strict if
            // the variable type is non-null when the expected type is nullable.
            // If both are list types, the variable item type can be more strict
            // than the expected item type (contravariant).
            const schema = context.getSchema();
            const varType = (0, _typeFromAST.typeFromAST)(schema, varDef.type);
            if (varType && !allowedVariableUsage(schema, varType, varDef.defaultValue, type, defaultValue)) {
              const varTypeStr = (0, _inspect.inspect)(varType);
              const typeStr = (0, _inspect.inspect)(type);
              context.reportError(new _GraphQLError.GraphQLError(`Variable "$${varName}" of type "${varTypeStr}" used in position expecting type "${typeStr}".`, {
                nodes: [varDef, node]
              }));
            }
          }
        }
      }
    },
    VariableDefinition(node) {
      varDefMap[node.variable.name.value] = node;
    }
  };
}
/**
 * Returns true if the variable is allowed in the location it was found,
 * which includes considering if default values exist for either the variable
 * or the location at which it is located.
 */

function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) {
  if ((0, _definition.isNonNullType)(locationType) && !(0, _definition.isNonNullType)(varType)) {
    const hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== _kinds.Kind.NULL;
    const hasLocationDefaultValue = locationDefaultValue !== undefined;
    if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {
      return false;
    }
    const nullableLocationType = locationType.ofType;
    return (0, _typeComparators.isTypeSubTypeOf)(schema, varType, nullableLocationType);
  }
  return (0, _typeComparators.isTypeSubTypeOf)(schema, varType, locationType);
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs":
/*!****************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs ***!
  \****************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.NoDeprecatedCustomRule = NoDeprecatedCustomRule;
var _invariant = __webpack_require__(/*! ../../../jsutils/invariant.mjs */ "../../../node_modules/graphql/jsutils/invariant.mjs");
var _GraphQLError = __webpack_require__(/*! ../../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _definition = __webpack_require__(/*! ../../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
/**
 * No deprecated
 *
 * A GraphQL document is only valid if all selected fields and all used enum values have not been
 * deprecated.
 *
 * Note: This rule is optional and is not part of the Validation section of the GraphQL
 * Specification. The main purpose of this rule is detection of deprecated usages and not
 * necessarily to forbid their use when querying a service.
 */
function NoDeprecatedCustomRule(context) {
  return {
    Field(node) {
      const fieldDef = context.getFieldDef();
      const deprecationReason = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.deprecationReason;
      if (fieldDef && deprecationReason != null) {
        const parentType = context.getParentType();
        parentType != null || (0, _invariant.invariant)(false);
        context.reportError(new _GraphQLError.GraphQLError(`The field ${parentType.name}.${fieldDef.name} is deprecated. ${deprecationReason}`, {
          nodes: node
        }));
      }
    },
    Argument(node) {
      const argDef = context.getArgument();
      const deprecationReason = argDef === null || argDef === void 0 ? void 0 : argDef.deprecationReason;
      if (argDef && deprecationReason != null) {
        const directiveDef = context.getDirective();
        if (directiveDef != null) {
          context.reportError(new _GraphQLError.GraphQLError(`Directive "@${directiveDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, {
            nodes: node
          }));
        } else {
          const parentType = context.getParentType();
          const fieldDef = context.getFieldDef();
          parentType != null && fieldDef != null || (0, _invariant.invariant)(false);
          context.reportError(new _GraphQLError.GraphQLError(`Field "${parentType.name}.${fieldDef.name}" argument "${argDef.name}" is deprecated. ${deprecationReason}`, {
            nodes: node
          }));
        }
      }
    },
    ObjectField(node) {
      const inputObjectDef = (0, _definition.getNamedType)(context.getParentInputType());
      if ((0, _definition.isInputObjectType)(inputObjectDef)) {
        const inputFieldDef = inputObjectDef.getFields()[node.name.value];
        const deprecationReason = inputFieldDef === null || inputFieldDef === void 0 ? void 0 : inputFieldDef.deprecationReason;
        if (deprecationReason != null) {
          context.reportError(new _GraphQLError.GraphQLError(`The input field ${inputObjectDef.name}.${inputFieldDef.name} is deprecated. ${deprecationReason}`, {
            nodes: node
          }));
        }
      }
    },
    EnumValue(node) {
      const enumValueDef = context.getEnumValue();
      const deprecationReason = enumValueDef === null || enumValueDef === void 0 ? void 0 : enumValueDef.deprecationReason;
      if (enumValueDef && deprecationReason != null) {
        const enumTypeDef = (0, _definition.getNamedType)(context.getInputType());
        enumTypeDef != null || (0, _invariant.invariant)(false);
        context.reportError(new _GraphQLError.GraphQLError(`The enum value "${enumTypeDef.name}.${enumValueDef.name}" is deprecated. ${deprecationReason}`, {
          nodes: node
        }));
      }
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs":
/*!*************************************************************************************************!*\
  !*** ../../../node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs ***!
  \*************************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.NoSchemaIntrospectionCustomRule = NoSchemaIntrospectionCustomRule;
var _GraphQLError = __webpack_require__(/*! ../../../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _definition = __webpack_require__(/*! ../../../type/definition.mjs */ "../../../node_modules/graphql/type/definition.mjs");
var _introspection = __webpack_require__(/*! ../../../type/introspection.mjs */ "../../../node_modules/graphql/type/introspection.mjs");
/**
 * Prohibit introspection queries
 *
 * A GraphQL document is only valid if all fields selected are not fields that
 * return an introspection type.
 *
 * Note: This rule is optional and is not part of the Validation section of the
 * GraphQL Specification. This rule effectively disables introspection, which
 * does not reflect best practices and should only be done if absolutely necessary.
 */
function NoSchemaIntrospectionCustomRule(context) {
  return {
    Field(node) {
      const type = (0, _definition.getNamedType)(context.getType());
      if (type && (0, _introspection.isIntrospectionType)(type)) {
        context.reportError(new _GraphQLError.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${node.name.value}".`, {
          nodes: node
        }));
      }
    }
  };
}

/***/ }),

/***/ "../../../node_modules/graphql/validation/specifiedRules.mjs":
/*!*******************************************************************!*\
  !*** ../../../node_modules/graphql/validation/specifiedRules.mjs ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.specifiedSDLRules = exports.specifiedRules = void 0;
var _ExecutableDefinitionsRule = __webpack_require__(/*! ./rules/ExecutableDefinitionsRule.mjs */ "../../../node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs");
var _FieldsOnCorrectTypeRule = __webpack_require__(/*! ./rules/FieldsOnCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs");
var _FragmentsOnCompositeTypesRule = __webpack_require__(/*! ./rules/FragmentsOnCompositeTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs");
var _KnownArgumentNamesRule = __webpack_require__(/*! ./rules/KnownArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs");
var _KnownDirectivesRule = __webpack_require__(/*! ./rules/KnownDirectivesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownDirectivesRule.mjs");
var _KnownFragmentNamesRule = __webpack_require__(/*! ./rules/KnownFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs");
var _KnownTypeNamesRule = __webpack_require__(/*! ./rules/KnownTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs");
var _LoneAnonymousOperationRule = __webpack_require__(/*! ./rules/LoneAnonymousOperationRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs");
var _LoneSchemaDefinitionRule = __webpack_require__(/*! ./rules/LoneSchemaDefinitionRule.mjs */ "../../../node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs");
var _NoFragmentCyclesRule = __webpack_require__(/*! ./rules/NoFragmentCyclesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs");
var _NoUndefinedVariablesRule = __webpack_require__(/*! ./rules/NoUndefinedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs");
var _NoUnusedFragmentsRule = __webpack_require__(/*! ./rules/NoUnusedFragmentsRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs");
var _NoUnusedVariablesRule = __webpack_require__(/*! ./rules/NoUnusedVariablesRule.mjs */ "../../../node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs");
var _OverlappingFieldsCanBeMergedRule = __webpack_require__(/*! ./rules/OverlappingFieldsCanBeMergedRule.mjs */ "../../../node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs");
var _PossibleFragmentSpreadsRule = __webpack_require__(/*! ./rules/PossibleFragmentSpreadsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs");
var _PossibleTypeExtensionsRule = __webpack_require__(/*! ./rules/PossibleTypeExtensionsRule.mjs */ "../../../node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs");
var _ProvidedRequiredArgumentsRule = __webpack_require__(/*! ./rules/ProvidedRequiredArgumentsRule.mjs */ "../../../node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs");
var _ScalarLeafsRule = __webpack_require__(/*! ./rules/ScalarLeafsRule.mjs */ "../../../node_modules/graphql/validation/rules/ScalarLeafsRule.mjs");
var _SingleFieldSubscriptionsRule = __webpack_require__(/*! ./rules/SingleFieldSubscriptionsRule.mjs */ "../../../node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs");
var _UniqueArgumentDefinitionNamesRule = __webpack_require__(/*! ./rules/UniqueArgumentDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.mjs");
var _UniqueArgumentNamesRule = __webpack_require__(/*! ./rules/UniqueArgumentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs");
var _UniqueDirectiveNamesRule = __webpack_require__(/*! ./rules/UniqueDirectiveNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs");
var _UniqueDirectivesPerLocationRule = __webpack_require__(/*! ./rules/UniqueDirectivesPerLocationRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs");
var _UniqueEnumValueNamesRule = __webpack_require__(/*! ./rules/UniqueEnumValueNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs");
var _UniqueFieldDefinitionNamesRule = __webpack_require__(/*! ./rules/UniqueFieldDefinitionNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs");
var _UniqueFragmentNamesRule = __webpack_require__(/*! ./rules/UniqueFragmentNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs");
var _UniqueInputFieldNamesRule = __webpack_require__(/*! ./rules/UniqueInputFieldNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs");
var _UniqueOperationNamesRule = __webpack_require__(/*! ./rules/UniqueOperationNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs");
var _UniqueOperationTypesRule = __webpack_require__(/*! ./rules/UniqueOperationTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs");
var _UniqueTypeNamesRule = __webpack_require__(/*! ./rules/UniqueTypeNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs");
var _UniqueVariableNamesRule = __webpack_require__(/*! ./rules/UniqueVariableNamesRule.mjs */ "../../../node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs");
var _ValuesOfCorrectTypeRule = __webpack_require__(/*! ./rules/ValuesOfCorrectTypeRule.mjs */ "../../../node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs");
var _VariablesAreInputTypesRule = __webpack_require__(/*! ./rules/VariablesAreInputTypesRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs");
var _VariablesInAllowedPositionRule = __webpack_require__(/*! ./rules/VariablesInAllowedPositionRule.mjs */ "../../../node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs");
// Spec Section: "Executable Definitions"
// Spec Section: "Field Selections on Objects, Interfaces, and Unions Types"

// Spec Section: "Fragments on Composite Types"

// Spec Section: "Argument Names"

// Spec Section: "Directives Are Defined"

// Spec Section: "Fragment spread target defined"

// Spec Section: "Fragment Spread Type Existence"

// Spec Section: "Lone Anonymous Operation"

// SDL-specific validation rules

// Spec Section: "Fragments must not form cycles"

// Spec Section: "All Variable Used Defined"

// Spec Section: "Fragments must be used"

// Spec Section: "All Variables Used"

// Spec Section: "Field Selection Merging"

// Spec Section: "Fragment spread is possible"

// Spec Section: "Argument Optionality"

// Spec Section: "Leaf Field Selections"

// Spec Section: "Subscriptions with Single Root Field"

// Spec Section: "Argument Uniqueness"

// Spec Section: "Directives Are Unique Per Location"

// Spec Section: "Fragment Name Uniqueness"

// Spec Section: "Input Object Field Uniqueness"

// Spec Section: "Operation Name Uniqueness"

// Spec Section: "Variable Uniqueness"

// Spec Section: "Value Type Correctness"

// Spec Section: "Variables are Input Types"

// Spec Section: "All Variable Usages Are Allowed"

/**
 * This set includes all validation rules defined by the GraphQL spec.
 *
 * The order of the rules in this list has been adjusted to lead to the
 * most clear output when encountering multiple validation errors.
 */
const specifiedRules = Object.freeze([_ExecutableDefinitionsRule.ExecutableDefinitionsRule, _UniqueOperationNamesRule.UniqueOperationNamesRule, _LoneAnonymousOperationRule.LoneAnonymousOperationRule, _SingleFieldSubscriptionsRule.SingleFieldSubscriptionsRule, _KnownTypeNamesRule.KnownTypeNamesRule, _FragmentsOnCompositeTypesRule.FragmentsOnCompositeTypesRule, _VariablesAreInputTypesRule.VariablesAreInputTypesRule, _ScalarLeafsRule.ScalarLeafsRule, _FieldsOnCorrectTypeRule.FieldsOnCorrectTypeRule, _UniqueFragmentNamesRule.UniqueFragmentNamesRule, _KnownFragmentNamesRule.KnownFragmentNamesRule, _NoUnusedFragmentsRule.NoUnusedFragmentsRule, _PossibleFragmentSpreadsRule.PossibleFragmentSpreadsRule, _NoFragmentCyclesRule.NoFragmentCyclesRule, _UniqueVariableNamesRule.UniqueVariableNamesRule, _NoUndefinedVariablesRule.NoUndefinedVariablesRule, _NoUnusedVariablesRule.NoUnusedVariablesRule, _KnownDirectivesRule.KnownDirectivesRule, _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule, _KnownArgumentNamesRule.KnownArgumentNamesRule, _UniqueArgumentNamesRule.UniqueArgumentNamesRule, _ValuesOfCorrectTypeRule.ValuesOfCorrectTypeRule, _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsRule, _VariablesInAllowedPositionRule.VariablesInAllowedPositionRule, _OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule, _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule]);
/**
 * @internal
 */
exports.specifiedRules = specifiedRules;
const specifiedSDLRules = Object.freeze([_LoneSchemaDefinitionRule.LoneSchemaDefinitionRule, _UniqueOperationTypesRule.UniqueOperationTypesRule, _UniqueTypeNamesRule.UniqueTypeNamesRule, _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule, _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule, _UniqueArgumentDefinitionNamesRule.UniqueArgumentDefinitionNamesRule, _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule, _KnownTypeNamesRule.KnownTypeNamesRule, _KnownDirectivesRule.KnownDirectivesRule, _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule, _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule, _KnownArgumentNamesRule.KnownArgumentNamesOnDirectivesRule, _UniqueArgumentNamesRule.UniqueArgumentNamesRule, _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule, _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsOnDirectivesRule]);
exports.specifiedSDLRules = specifiedSDLRules;

/***/ }),

/***/ "../../../node_modules/graphql/validation/validate.mjs":
/*!*************************************************************!*\
  !*** ../../../node_modules/graphql/validation/validate.mjs ***!
  \*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.assertValidSDL = assertValidSDL;
exports.assertValidSDLExtension = assertValidSDLExtension;
exports.validate = validate;
exports.validateSDL = validateSDL;
var _devAssert = __webpack_require__(/*! ../jsutils/devAssert.mjs */ "../../../node_modules/graphql/jsutils/devAssert.mjs");
var _GraphQLError = __webpack_require__(/*! ../error/GraphQLError.mjs */ "../../../node_modules/graphql/error/GraphQLError.mjs");
var _visitor = __webpack_require__(/*! ../language/visitor.mjs */ "../../../node_modules/graphql/language/visitor.mjs");
var _validate = __webpack_require__(/*! ../type/validate.mjs */ "../../../node_modules/graphql/type/validate.mjs");
var _TypeInfo = __webpack_require__(/*! ../utilities/TypeInfo.mjs */ "../../../node_modules/graphql/utilities/TypeInfo.mjs");
var _specifiedRules = __webpack_require__(/*! ./specifiedRules.mjs */ "../../../node_modules/graphql/validation/specifiedRules.mjs");
var _ValidationContext = __webpack_require__(/*! ./ValidationContext.mjs */ "../../../node_modules/graphql/validation/ValidationContext.mjs");
/**
 * Implements the "Validation" section of the spec.
 *
 * Validation runs synchronously, returning an array of encountered errors, or
 * an empty array if no errors were encountered and the document is valid.
 *
 * A list of specific validation rules may be provided. If not provided, the
 * default list of rules defined by the GraphQL specification will be used.
 *
 * Each validation rules is a function which returns a visitor
 * (see the language/visitor API). Visitor methods are expected to return
 * GraphQLErrors, or Arrays of GraphQLErrors when invalid.
 *
 * Validate will stop validation after a `maxErrors` limit has been reached.
 * Attackers can send pathologically invalid queries to induce a DoS attack,
 * so by default `maxErrors` set to 100 errors.
 *
 * Optionally a custom TypeInfo instance may be provided. If not provided, one
 * will be created from the provided schema.
 */

function validate(schema, documentAST) {
  let rules = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _specifiedRules.specifiedRules;
  let options = arguments.length > 3 ? arguments[3] : undefined;
  let typeInfo = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : new _TypeInfo.TypeInfo(schema);
  var _options$maxErrors;
  const maxErrors = (_options$maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors) !== null && _options$maxErrors !== void 0 ? _options$maxErrors : 100;
  documentAST || (0, _devAssert.devAssert)(false, 'Must provide document.'); // If the schema used for validation is invalid, throw an error.

  (0, _validate.assertValidSchema)(schema);
  const abortObj = Object.freeze({});
  const errors = [];
  const context = new _ValidationContext.ValidationContext(schema, documentAST, typeInfo, error => {
    if (errors.length >= maxErrors) {
      errors.push(new _GraphQLError.GraphQLError('Too many validation errors, error limit reached. Validation aborted.')); // eslint-disable-next-line @typescript-eslint/no-throw-literal

      throw abortObj;
    }
    errors.push(error);
  }); // This uses a specialized visitor which runs multiple visitors in parallel,
  // while maintaining the visitor skip and break API.

  const visitor = (0, _visitor.visitInParallel)(rules.map(rule => rule(context))); // Visit the whole document with each instance of all provided rules.

  try {
    (0, _visitor.visit)(documentAST, (0, _TypeInfo.visitWithTypeInfo)(typeInfo, visitor));
  } catch (e) {
    if (e !== abortObj) {
      throw e;
    }
  }
  return errors;
}
/**
 * @internal
 */

function validateSDL(documentAST, schemaToExtend) {
  let rules = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _specifiedRules.specifiedSDLRules;
  const errors = [];
  const context = new _ValidationContext.SDLValidationContext(documentAST, schemaToExtend, error => {
    errors.push(error);
  });
  const visitors = rules.map(rule => rule(context));
  (0, _visitor.visit)(documentAST, (0, _visitor.visitInParallel)(visitors));
  return errors;
}
/**
 * Utility function which asserts a SDL document is valid by throwing an error
 * if it is invalid.
 *
 * @internal
 */

function assertValidSDL(documentAST) {
  const errors = validateSDL(documentAST);
  if (errors.length !== 0) {
    throw new Error(errors.map(error => error.message).join('\n\n'));
  }
}
/**
 * Utility function which asserts a SDL document is valid by throwing an error
 * if it is invalid.
 *
 * @internal
 */

function assertValidSDLExtension(documentAST, schema) {
  const errors = validateSDL(documentAST, schema);
  if (errors.length !== 0) {
    throw new Error(errors.map(error => error.message).join('\n\n'));
  }
}

/***/ }),

/***/ "../../../node_modules/graphql/version.mjs":
/*!*************************************************!*\
  !*** ../../../node_modules/graphql/version.mjs ***!
  \*************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.versionInfo = exports.version = void 0;
// Note: This file is autogenerated using "resources/gen-version.js" script and
// automatically updated by "npm version" command.

/**
 * A string containing the version of the GraphQL.js library
 */
const version = '16.8.1';
/**
 * An object containing the components of the GraphQL.js version string
 */
exports.version = version;
const versionInfo = Object.freeze({
  major: 16,
  minor: 8,
  patch: 1,
  preReleaseTag: null
});
exports.versionInfo = versionInfo;

/***/ }),

/***/ "../../../node_modules/hey-listen/dist/hey-listen.es.js":
/*!**************************************************************!*\
  !*** ../../../node_modules/hey-listen/dist/hey-listen.es.js ***!
  \**************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.warning = exports.invariant = void 0;
var warning = function () {};
exports.warning = warning;
var invariant = function () {};
exports.invariant = invariant;
if (true) {
  exports.warning = warning = function (check, message) {
    if (!check && typeof console !== 'undefined') {
      console.warn(message);
    }
  };
  exports.invariant = invariant = function (check, message) {
    if (!check) {
      throw new Error(message);
    }
  };
}

/***/ }),

/***/ "../../../node_modules/is-plain-object/index.js":
/*!******************************************************!*\
  !*** ../../../node_modules/is-plain-object/index.js ***!
  \******************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */



var isObject = __webpack_require__(/*! isobject */ "../../../node_modules/isobject/index.js");
function isObjectObject(o) {
  return isObject(o) === true && Object.prototype.toString.call(o) === '[object Object]';
}
module.exports = function isPlainObject(o) {
  var ctor, prot;
  if (isObjectObject(o) === false) return false;

  // If has modified constructor
  ctor = o.constructor;
  if (typeof ctor !== 'function') return false;

  // If has modified prototype
  prot = ctor.prototype;
  if (isObjectObject(prot) === false) return false;

  // If constructor does not have an Object-specific method
  if (prot.hasOwnProperty('isPrototypeOf') === false) {
    return false;
  }

  // Most likely a plain Object
  return true;
};

/***/ }),

/***/ "../../../node_modules/is-primitive/index.js":
/*!***************************************************!*\
  !*** ../../../node_modules/is-primitive/index.js ***!
  \***************************************************/
/***/ (function(module) {

/*!
 * is-primitive <https://github.com/jonschlinkert/is-primitive>
 *
 * Copyright (c) 2014-present, Jon Schlinkert.
 * Released under the MIT License.
 */



module.exports = function isPrimitive(val) {
  if (typeof val === 'object') {
    return val === null;
  }
  return typeof val !== 'function';
};

/***/ }),

/***/ "../../../node_modules/isarray/index.js":
/*!**********************************************!*\
  !*** ../../../node_modules/isarray/index.js ***!
  \**********************************************/
/***/ (function(module) {



var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
  return toString.call(arr) == '[object Array]';
};

/***/ }),

/***/ "../../../node_modules/isobject/index.js":
/*!***********************************************!*\
  !*** ../../../node_modules/isobject/index.js ***!
  \***********************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

/*!
 * isobject <https://github.com/jonschlinkert/isobject>
 *
 * Copyright (c) 2014-2015, Jon Schlinkert.
 * Licensed under the MIT License.
 */



var isArray = __webpack_require__(/*! isarray */ "../../../node_modules/isarray/index.js");
module.exports = function isObject(val) {
  return val != null && typeof val === 'object' && isArray(val) === false;
};

/***/ }),

/***/ "../../../node_modules/meros/browser/index.mjs":
/*!*****************************************************!*\
  !*** ../../../node_modules/meros/browser/index.mjs ***!
  \*****************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.meros = meros;
const separator = '\r\n\r\n';
const decoder = new TextDecoder();
async function* generate(stream, boundary, options) {
  const reader = stream.getReader(),
    is_eager = !options || !options.multiple;
  let buffer = '',
    is_preamble = true,
    payloads = [];
  try {
    let result;
    outer: while (!(result = await reader.read()).done) {
      const chunk = decoder.decode(result.value);
      const idx_chunk = chunk.indexOf(boundary);
      let idx_boundary = buffer.length;
      buffer += chunk;
      if (!!~idx_chunk) {
        // chunk itself had `boundary` marker
        idx_boundary += idx_chunk;
      } else {
        // search combined (boundary can be across chunks)
        idx_boundary = buffer.indexOf(boundary);
      }
      payloads = [];
      while (!!~idx_boundary) {
        const current = buffer.substring(0, idx_boundary);
        const next = buffer.substring(idx_boundary + boundary.length);
        if (is_preamble) {
          is_preamble = false;
        } else {
          const headers = {};
          const idx_headers = current.indexOf(separator);
          const arr_headers = buffer.slice(0, idx_headers).toString().trim().split(/\r\n/);
          // parse headers
          let tmp;
          while (tmp = arr_headers.shift()) {
            tmp = tmp.split(': ');
            headers[tmp.shift().toLowerCase()] = tmp.join(': ');
          }
          let body = current.substring(idx_headers + separator.length, current.lastIndexOf('\r\n'));
          let is_json = false;
          tmp = headers['content-type'];
          if (tmp && !!~tmp.indexOf('application/json')) {
            try {
              body = JSON.parse(body);
              is_json = true;
            } catch (_) {}
          }
          tmp = {
            headers,
            body,
            json: is_json
          };
          is_eager ? yield tmp : payloads.push(tmp);
          // hit a tail boundary, break
          if (next.substring(0, 2) === '--') break outer;
        }
        buffer = next;
        idx_boundary = buffer.indexOf(boundary);
      }
      if (payloads.length) yield payloads;
    }
  } finally {
    if (payloads.length) yield payloads;
    reader.releaseLock();
  }
}

/**
 * Yield immediately for every part made available on the response. If the `content-type` of the response isn't a
 * multipart body, then we'll resolve with {@link Response}.
 *
 * @example
 *
 * ```js
 * const parts = await fetch('/fetch-multipart')
 *      .then(meros);
 *
 * for await (const part of parts) {
 *     // do something with this part
 * }
 * ```
 */
async function meros(response, options) {
  if (!response.ok || !response.body || response.bodyUsed) return response;
  const ctype = response.headers.get('content-type');
  if (!ctype || !~ctype.indexOf('multipart/mixed')) return response;
  const idx_boundary = ctype.indexOf('boundary=');
  return generate(response.body, `--${!!~idx_boundary ?
  // +9 for 'boundary='.length
  ctype.substring(idx_boundary + 9).trim().replace(/['"]/g, '') : '-'}`, options);
}

/***/ }),

/***/ "../../../node_modules/nullthrows/nullthrows.js":
/*!******************************************************!*\
  !*** ../../../node_modules/nullthrows/nullthrows.js ***!
  \******************************************************/
/***/ (function(module) {



function nullthrows(x, message) {
  if (x != null) {
    return x;
  }
  var error = new Error(message !== undefined ? message : 'Got unexpected ' + x);
  error.framesToPop = 1; // Skip nullthrows's own stack frame.
  throw error;
}
module.exports = nullthrows;
module.exports["default"] = nullthrows;
Object.defineProperty(module.exports, "__esModule", ({
  value: true
}));

/***/ }),

/***/ "../../../node_modules/popmotion/dist/popmotion.cjs.js":
/*!*************************************************************!*\
  !*** ../../../node_modules/popmotion/dist/popmotion.cjs.js ***!
  \*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
var tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
var heyListen = __webpack_require__(/*! hey-listen */ "../../../node_modules/hey-listen/dist/hey-listen.es.js");
var styleValueTypes = __webpack_require__(/*! style-value-types */ "../../../node_modules/style-value-types/dist/valueTypes.cjs.js");
var sync = __webpack_require__(/*! framesync */ "../../../node_modules/framesync/dist/framesync.cjs.js");
function _interopDefaultLegacy(e) {
  return e && typeof e === 'object' && 'default' in e ? e : {
    'default': e
  };
}
var sync__default = /*#__PURE__*/_interopDefaultLegacy(sync);
const clamp = (min, max, v) => Math.min(Math.max(v, min), max);
const safeMin = 0.001;
const minDuration = 0.01;
const maxDuration = 10.0;
const minDamping = 0.05;
const maxDamping = 1;
function findSpring(_ref) {
  let {
    duration = 800,
    bounce = 0.25,
    velocity = 0,
    mass = 1
  } = _ref;
  let envelope;
  let derivative;
  heyListen.warning(duration <= maxDuration * 1000, "Spring duration must be 10 seconds or less");
  let dampingRatio = 1 - bounce;
  dampingRatio = clamp(minDamping, maxDamping, dampingRatio);
  duration = clamp(minDuration, maxDuration, duration / 1000);
  if (dampingRatio < 1) {
    envelope = undampedFreq => {
      const exponentialDecay = undampedFreq * dampingRatio;
      const delta = exponentialDecay * duration;
      const a = exponentialDecay - velocity;
      const b = calcAngularFreq(undampedFreq, dampingRatio);
      const c = Math.exp(-delta);
      return safeMin - a / b * c;
    };
    derivative = undampedFreq => {
      const exponentialDecay = undampedFreq * dampingRatio;
      const delta = exponentialDecay * duration;
      const d = delta * velocity + velocity;
      const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;
      const f = Math.exp(-delta);
      const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);
      const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;
      return factor * ((d - e) * f) / g;
    };
  } else {
    envelope = undampedFreq => {
      const a = Math.exp(-undampedFreq * duration);
      const b = (undampedFreq - velocity) * duration + 1;
      return -safeMin + a * b;
    };
    derivative = undampedFreq => {
      const a = Math.exp(-undampedFreq * duration);
      const b = (velocity - undampedFreq) * (duration * duration);
      return a * b;
    };
  }
  const initialGuess = 5 / duration;
  const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
  duration = duration * 1000;
  if (isNaN(undampedFreq)) {
    return {
      stiffness: 100,
      damping: 10,
      duration
    };
  } else {
    const stiffness = Math.pow(undampedFreq, 2) * mass;
    return {
      stiffness,
      damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
      duration
    };
  }
}
const rootIterations = 12;
function approximateRoot(envelope, derivative, initialGuess) {
  let result = initialGuess;
  for (let i = 1; i < rootIterations; i++) {
    result = result - envelope(result) / derivative(result);
  }
  return result;
}
function calcAngularFreq(undampedFreq, dampingRatio) {
  return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
}
const durationKeys = ["duration", "bounce"];
const physicsKeys = ["stiffness", "damping", "mass"];
function isSpringType(options, keys) {
  return keys.some(key => options[key] !== undefined);
}
function getSpringOptions(options) {
  let springOptions = Object.assign({
    velocity: 0.0,
    stiffness: 100,
    damping: 10,
    mass: 1.0,
    isResolvedFromDuration: false
  }, options);
  if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) {
    const derived = findSpring(options);
    springOptions = Object.assign(Object.assign(Object.assign({}, springOptions), derived), {
      velocity: 0.0,
      mass: 1.0
    });
    springOptions.isResolvedFromDuration = true;
  }
  return springOptions;
}
function spring(_a) {
  var {
      from = 0.0,
      to = 1.0,
      restSpeed = 2,
      restDelta
    } = _a,
    options = tslib.__rest(_a, ["from", "to", "restSpeed", "restDelta"]);
  const state = {
    done: false,
    value: from
  };
  let {
    stiffness,
    damping,
    mass,
    velocity,
    duration,
    isResolvedFromDuration
  } = getSpringOptions(options);
  let resolveSpring = zero;
  let resolveVelocity = zero;
  function createSpring() {
    const initialVelocity = velocity ? -(velocity / 1000) : 0.0;
    const initialDelta = to - from;
    const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
    const undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000;
    if (restDelta === undefined) {
      restDelta = Math.min(Math.abs(to - from) / 100, 0.4);
    }
    if (dampingRatio < 1) {
      const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);
      resolveSpring = t => {
        const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
        return to - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq * Math.sin(angularFreq * t) + initialDelta * Math.cos(angularFreq * t));
      };
      resolveVelocity = t => {
        const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
        return dampingRatio * undampedAngularFreq * envelope * (Math.sin(angularFreq * t) * (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq + initialDelta * Math.cos(angularFreq * t)) - envelope * (Math.cos(angularFreq * t) * (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) - angularFreq * initialDelta * Math.sin(angularFreq * t));
      };
    } else if (dampingRatio === 1) {
      resolveSpring = t => to - Math.exp(-undampedAngularFreq * t) * (initialDelta + (initialVelocity + undampedAngularFreq * initialDelta) * t);
    } else {
      const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);
      resolveSpring = t => {
        const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
        const freqForT = Math.min(dampedAngularFreq * t, 300);
        return to - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq * initialDelta * Math.cosh(freqForT)) / dampedAngularFreq;
      };
    }
  }
  createSpring();
  return {
    next: t => {
      const current = resolveSpring(t);
      if (!isResolvedFromDuration) {
        const currentVelocity = resolveVelocity(t) * 1000;
        const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;
        const isBelowDisplacementThreshold = Math.abs(to - current) <= restDelta;
        state.done = isBelowVelocityThreshold && isBelowDisplacementThreshold;
      } else {
        state.done = t >= duration;
      }
      state.value = state.done ? to : current;
      return state;
    },
    flipTarget: () => {
      velocity = -velocity;
      [from, to] = [to, from];
      createSpring();
    }
  };
}
spring.needsInterpolation = (a, b) => typeof a === "string" || typeof b === "string";
const zero = _t => 0;
const progress = (from, to, value) => {
  const toFromDifference = to - from;
  return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
};
const mix = (from, to, progress) => -progress * from + progress * to + from;
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;
}
function hslaToRgba(_ref2) {
  let {
    hue,
    saturation,
    lightness,
    alpha
  } = _ref2;
  hue /= 360;
  saturation /= 100;
  lightness /= 100;
  let red = 0;
  let green = 0;
  let blue = 0;
  if (!saturation) {
    red = green = blue = lightness;
  } else {
    const q = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation;
    const p = 2 * lightness - q;
    red = hueToRgb(p, q, hue + 1 / 3);
    green = hueToRgb(p, q, hue);
    blue = hueToRgb(p, q, hue - 1 / 3);
  }
  return {
    red: Math.round(red * 255),
    green: Math.round(green * 255),
    blue: Math.round(blue * 255),
    alpha
  };
}
const mixLinearColor = (from, to, v) => {
  const fromExpo = from * from;
  const toExpo = to * to;
  return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo));
};
const colorTypes = [styleValueTypes.hex, styleValueTypes.rgba, styleValueTypes.hsla];
const getColorType = v => colorTypes.find(type => type.test(v));
const notAnimatable = color => `'${color}' is not an animatable color. Use the equivalent color code instead.`;
const mixColor = (from, to) => {
  let fromColorType = getColorType(from);
  let toColorType = getColorType(to);
  heyListen.invariant(!!fromColorType, notAnimatable(from));
  heyListen.invariant(!!toColorType, notAnimatable(to));
  let fromColor = fromColorType.parse(from);
  let toColor = toColorType.parse(to);
  if (fromColorType === styleValueTypes.hsla) {
    fromColor = hslaToRgba(fromColor);
    fromColorType = styleValueTypes.rgba;
  }
  if (toColorType === styleValueTypes.hsla) {
    toColor = hslaToRgba(toColor);
    toColorType = styleValueTypes.rgba;
  }
  const blended = Object.assign({}, fromColor);
  return v => {
    for (const key in blended) {
      if (key !== "alpha") {
        blended[key] = mixLinearColor(fromColor[key], toColor[key], v);
      }
    }
    blended.alpha = mix(fromColor.alpha, toColor.alpha, v);
    return fromColorType.transform(blended);
  };
};
const zeroPoint = {
  x: 0,
  y: 0,
  z: 0
};
const isNum = v => typeof v === 'number';
const combineFunctions = (a, b) => v => b(a(v));
const pipe = function () {
  for (var _len = arguments.length, transformers = new Array(_len), _key = 0; _key < _len; _key++) {
    transformers[_key] = arguments[_key];
  }
  return transformers.reduce(combineFunctions);
};
function getMixer(origin, target) {
  if (isNum(origin)) {
    return v => mix(origin, target, v);
  } else if (styleValueTypes.color.test(origin)) {
    return mixColor(origin, target);
  } else {
    return mixComplex(origin, target);
  }
}
const mixArray = (from, to) => {
  const output = [...from];
  const numValues = output.length;
  const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i]));
  return v => {
    for (let i = 0; i < numValues; i++) {
      output[i] = blendValue[i](v);
    }
    return output;
  };
};
const mixObject = (origin, target) => {
  const output = Object.assign(Object.assign({}, origin), target);
  const blendValue = {};
  for (const key in output) {
    if (origin[key] !== undefined && target[key] !== undefined) {
      blendValue[key] = getMixer(origin[key], target[key]);
    }
  }
  return v => {
    for (const key in blendValue) {
      output[key] = blendValue[key](v);
    }
    return output;
  };
};
function analyse(value) {
  const parsed = styleValueTypes.complex.parse(value);
  const numValues = parsed.length;
  let numNumbers = 0;
  let numRGB = 0;
  let numHSL = 0;
  for (let i = 0; i < numValues; i++) {
    if (numNumbers || typeof parsed[i] === "number") {
      numNumbers++;
    } else {
      if (parsed[i].hue !== undefined) {
        numHSL++;
      } else {
        numRGB++;
      }
    }
  }
  return {
    parsed,
    numNumbers,
    numRGB,
    numHSL
  };
}
const mixComplex = (origin, target) => {
  const template = styleValueTypes.complex.createTransformer(target);
  const originStats = analyse(origin);
  const targetStats = analyse(target);
  const canInterpolate = originStats.numHSL === targetStats.numHSL && originStats.numRGB === targetStats.numRGB && originStats.numNumbers >= targetStats.numNumbers;
  if (canInterpolate) {
    return pipe(mixArray(originStats.parsed, targetStats.parsed), template);
  } else {
    heyListen.warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);
    return p => `${p > 0 ? target : origin}`;
  }
};
const mixNumber = (from, to) => p => mix(from, to, p);
function detectMixerFactory(v) {
  if (typeof v === 'number') {
    return mixNumber;
  } else if (typeof v === 'string') {
    if (styleValueTypes.color.test(v)) {
      return mixColor;
    } else {
      return mixComplex;
    }
  } else if (Array.isArray(v)) {
    return mixArray;
  } else if (typeof v === 'object') {
    return mixObject;
  }
}
function createMixers(output, ease, customMixer) {
  const mixers = [];
  const mixerFactory = customMixer || detectMixerFactory(output[0]);
  const numMixers = output.length - 1;
  for (let i = 0; i < numMixers; i++) {
    let mixer = mixerFactory(output[i], output[i + 1]);
    if (ease) {
      const easingFunction = Array.isArray(ease) ? ease[i] : ease;
      mixer = pipe(easingFunction, mixer);
    }
    mixers.push(mixer);
  }
  return mixers;
}
function fastInterpolate(_ref3, _ref4) {
  let [from, to] = _ref3;
  let [mixer] = _ref4;
  return v => mixer(progress(from, to, v));
}
function slowInterpolate(input, mixers) {
  const inputLength = input.length;
  const lastInputIndex = inputLength - 1;
  return v => {
    let mixerIndex = 0;
    let foundMixerIndex = false;
    if (v <= input[0]) {
      foundMixerIndex = true;
    } else if (v >= input[lastInputIndex]) {
      mixerIndex = lastInputIndex - 1;
      foundMixerIndex = true;
    }
    if (!foundMixerIndex) {
      let i = 1;
      for (; i < inputLength; i++) {
        if (input[i] > v || i === lastInputIndex) {
          break;
        }
      }
      mixerIndex = i - 1;
    }
    const progressInRange = progress(input[mixerIndex], input[mixerIndex + 1], v);
    return mixers[mixerIndex](progressInRange);
  };
}
function interpolate(input, output) {
  let {
    clamp: isClamp = true,
    ease,
    mixer
  } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  const inputLength = input.length;
  heyListen.invariant(inputLength === output.length, 'Both input and output ranges must be the same length');
  heyListen.invariant(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.');
  if (input[0] > input[inputLength - 1]) {
    input = [].concat(input);
    output = [].concat(output);
    input.reverse();
    output.reverse();
  }
  const mixers = createMixers(output, ease, mixer);
  const interpolator = inputLength === 2 ? fastInterpolate(input, mixers) : slowInterpolate(input, mixers);
  return isClamp ? v => interpolator(clamp(input[0], input[inputLength - 1], v)) : interpolator;
}
const reverseEasing = easing => p => 1 - easing(1 - p);
const mirrorEasing = easing => p => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
const createExpoIn = power => p => Math.pow(p, power);
const createBackIn = power => p => p * p * ((power + 1) * p - power);
const createAnticipate = power => {
  const backEasing = createBackIn(power);
  return p => (p *= 2) < 1 ? 0.5 * backEasing(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
};
const DEFAULT_OVERSHOOT_STRENGTH = 1.525;
const BOUNCE_FIRST_THRESHOLD = 4.0 / 11.0;
const BOUNCE_SECOND_THRESHOLD = 8.0 / 11.0;
const BOUNCE_THIRD_THRESHOLD = 9.0 / 10.0;
const linear = p => p;
const easeIn = createExpoIn(2);
const easeOut = reverseEasing(easeIn);
const easeInOut = mirrorEasing(easeIn);
const circIn = p => 1 - Math.sin(Math.acos(p));
const circOut = reverseEasing(circIn);
const circInOut = mirrorEasing(circOut);
const backIn = createBackIn(DEFAULT_OVERSHOOT_STRENGTH);
const backOut = reverseEasing(backIn);
const backInOut = mirrorEasing(backIn);
const anticipate = createAnticipate(DEFAULT_OVERSHOOT_STRENGTH);
const ca = 4356.0 / 361.0;
const cb = 35442.0 / 1805.0;
const cc = 16061.0 / 1805.0;
const bounceOut = p => {
  if (p === 1 || p === 0) return p;
  const p2 = p * p;
  return p < BOUNCE_FIRST_THRESHOLD ? 7.5625 * p2 : p < BOUNCE_SECOND_THRESHOLD ? 9.075 * p2 - 9.9 * p + 3.4 : p < BOUNCE_THIRD_THRESHOLD ? ca * p2 - cb * p + cc : 10.8 * p * p - 20.52 * p + 10.72;
};
const bounceIn = reverseEasing(bounceOut);
const bounceInOut = p => p < 0.5 ? 0.5 * (1.0 - bounceOut(1.0 - p * 2.0)) : 0.5 * bounceOut(p * 2.0 - 1.0) + 0.5;
function defaultEasing(values, easing) {
  return values.map(() => easing || easeInOut).splice(0, values.length - 1);
}
function defaultOffset(values) {
  const numValues = values.length;
  return values.map((_value, i) => i !== 0 ? i / (numValues - 1) : 0);
}
function convertOffsetToTimes(offset, duration) {
  return offset.map(o => o * duration);
}
function keyframes(_ref5) {
  let {
    from = 0,
    to = 1,
    ease,
    offset,
    duration = 300
  } = _ref5;
  const state = {
    done: false,
    value: from
  };
  const values = Array.isArray(to) ? to : [from, to];
  const times = convertOffsetToTimes(offset && offset.length === values.length ? offset : defaultOffset(values), duration);
  function createInterpolator() {
    return interpolate(times, values, {
      ease: Array.isArray(ease) ? ease : defaultEasing(values, ease)
    });
  }
  let interpolator = createInterpolator();
  return {
    next: t => {
      state.value = interpolator(t);
      state.done = t >= duration;
      return state;
    },
    flipTarget: () => {
      values.reverse();
      interpolator = createInterpolator();
    }
  };
}
function decay(_ref6) {
  let {
    velocity = 0,
    from = 0,
    power = 0.8,
    timeConstant = 350,
    restDelta = 0.5,
    modifyTarget
  } = _ref6;
  const state = {
    done: false,
    value: from
  };
  let amplitude = power * velocity;
  const ideal = from + amplitude;
  const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);
  if (target !== ideal) amplitude = target - from;
  return {
    next: t => {
      const delta = -amplitude * Math.exp(-t / timeConstant);
      state.done = !(delta > restDelta || delta < -restDelta);
      state.value = state.done ? target : target + delta;
      return state;
    },
    flipTarget: () => {}
  };
}
const types = {
  keyframes,
  spring,
  decay
};
function detectAnimationFromOptions(config) {
  if (Array.isArray(config.to)) {
    return keyframes;
  } else if (types[config.type]) {
    return types[config.type];
  }
  const keys = new Set(Object.keys(config));
  if (keys.has("ease") || keys.has("duration") && !keys.has("dampingRatio")) {
    return keyframes;
  } else if (keys.has("dampingRatio") || keys.has("stiffness") || keys.has("mass") || keys.has("damping") || keys.has("restSpeed") || keys.has("restDelta")) {
    return spring;
  }
  return keyframes;
}
function loopElapsed(elapsed, duration) {
  let delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
  return elapsed - duration - delay;
}
function reverseElapsed(elapsed, duration) {
  let delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
  let isForwardPlayback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
  return isForwardPlayback ? loopElapsed(duration + -elapsed, duration, delay) : duration - (elapsed - duration) + delay;
}
function hasRepeatDelayElapsed(elapsed, duration, delay, isForwardPlayback) {
  return isForwardPlayback ? elapsed >= duration + delay : elapsed <= -delay;
}
const framesync = update => {
  const passTimestamp = _ref7 => {
    let {
      delta
    } = _ref7;
    return update(delta);
  };
  return {
    start: () => sync__default["default"].update(passTimestamp, true),
    stop: () => sync.cancelSync.update(passTimestamp)
  };
};
function animate(_a) {
  var _b, _c;
  var {
      from,
      autoplay = true,
      driver = framesync,
      elapsed = 0,
      repeat: repeatMax = 0,
      repeatType = "loop",
      repeatDelay = 0,
      onPlay,
      onStop,
      onComplete,
      onRepeat,
      onUpdate
    } = _a,
    options = tslib.__rest(_a, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]);
  let {
    to
  } = options;
  let driverControls;
  let repeatCount = 0;
  let computedDuration = options.duration;
  let latest;
  let isComplete = false;
  let isForwardPlayback = true;
  let interpolateFromNumber;
  const animator = detectAnimationFromOptions(options);
  if ((_c = (_b = animator).needsInterpolation) === null || _c === void 0 ? void 0 : _c.call(_b, from, to)) {
    interpolateFromNumber = interpolate([0, 100], [from, to], {
      clamp: false
    });
    from = 0;
    to = 100;
  }
  const animation = animator(Object.assign(Object.assign({}, options), {
    from,
    to
  }));
  function repeat() {
    repeatCount++;
    if (repeatType === "reverse") {
      isForwardPlayback = repeatCount % 2 === 0;
      elapsed = reverseElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback);
    } else {
      elapsed = loopElapsed(elapsed, computedDuration, repeatDelay);
      if (repeatType === "mirror") animation.flipTarget();
    }
    isComplete = false;
    onRepeat && onRepeat();
  }
  function complete() {
    driverControls.stop();
    onComplete && onComplete();
  }
  function update(delta) {
    if (!isForwardPlayback) delta = -delta;
    elapsed += delta;
    if (!isComplete) {
      const state = animation.next(Math.max(0, elapsed));
      latest = state.value;
      if (interpolateFromNumber) latest = interpolateFromNumber(latest);
      isComplete = isForwardPlayback ? state.done : elapsed <= 0;
    }
    onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest);
    if (isComplete) {
      if (repeatCount === 0) computedDuration !== null && computedDuration !== void 0 ? computedDuration : computedDuration = elapsed;
      if (repeatCount < repeatMax) {
        hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat();
      } else {
        complete();
      }
    }
  }
  function play() {
    onPlay === null || onPlay === void 0 ? void 0 : onPlay();
    driverControls = driver(update);
    driverControls.start();
  }
  autoplay && play();
  return {
    stop: () => {
      onStop === null || onStop === void 0 ? void 0 : onStop();
      driverControls.stop();
    }
  };
}
function velocityPerSecond(velocity, frameDuration) {
  return frameDuration ? velocity * (1000 / frameDuration) : 0;
}
function inertia(_ref8) {
  let {
    from = 0,
    velocity = 0,
    min,
    max,
    power = 0.8,
    timeConstant = 750,
    bounceStiffness = 500,
    bounceDamping = 10,
    restDelta = 1,
    modifyTarget,
    driver,
    onUpdate,
    onComplete,
    onStop
  } = _ref8;
  let currentAnimation;
  function isOutOfBounds(v) {
    return min !== undefined && v < min || max !== undefined && v > max;
  }
  function boundaryNearest(v) {
    if (min === undefined) return max;
    if (max === undefined) return min;
    return Math.abs(min - v) < Math.abs(max - v) ? min : max;
  }
  function startAnimation(options) {
    currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop();
    currentAnimation = animate(Object.assign(Object.assign({}, options), {
      driver,
      onUpdate: v => {
        var _a;
        onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(v);
        (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, v);
      },
      onComplete,
      onStop
    }));
  }
  function startSpring(options) {
    startAnimation(Object.assign({
      type: "spring",
      stiffness: bounceStiffness,
      damping: bounceDamping,
      restDelta
    }, options));
  }
  if (isOutOfBounds(from)) {
    startSpring({
      from,
      velocity,
      to: boundaryNearest(from)
    });
  } else {
    let target = power * velocity + from;
    if (typeof modifyTarget !== "undefined") target = modifyTarget(target);
    const boundary = boundaryNearest(target);
    const heading = boundary === min ? -1 : 1;
    let prev;
    let current;
    const checkBoundary = v => {
      prev = current;
      current = v;
      velocity = velocityPerSecond(v - prev, sync.getFrameData().delta);
      if (heading === 1 && v > boundary || heading === -1 && v < boundary) {
        startSpring({
          from: v,
          to: boundary,
          velocity
        });
      }
    };
    startAnimation({
      type: "decay",
      from,
      velocity,
      timeConstant,
      power,
      restDelta,
      modifyTarget,
      onUpdate: isOutOfBounds(target) ? checkBoundary : undefined
    });
  }
  return {
    stop: () => currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop()
  };
}
const radiansToDegrees = radians => radians * 180 / Math.PI;
const angle = function (a) {
  let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : zeroPoint;
  return radiansToDegrees(Math.atan2(b.y - a.y, b.x - a.x));
};
const applyOffset = (from, to) => {
  let hasReceivedFrom = true;
  if (to === undefined) {
    to = from;
    hasReceivedFrom = false;
  }
  return v => {
    if (hasReceivedFrom) {
      return v - from + to;
    } else {
      from = v;
      hasReceivedFrom = true;
      return to;
    }
  };
};
const identity = v => v;
const createAttractor = function () {
  let alterDisplacement = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : identity;
  return (constant, origin, v) => {
    const displacement = origin - v;
    const springModifiedDisplacement = -(0 - constant + 1) * (0 - alterDisplacement(Math.abs(displacement)));
    return displacement <= 0 ? origin + springModifiedDisplacement : origin - springModifiedDisplacement;
  };
};
const attract = createAttractor();
const attractExpo = createAttractor(Math.sqrt);
const degreesToRadians = degrees => degrees * Math.PI / 180;
const isPoint = point => point.hasOwnProperty('x') && point.hasOwnProperty('y');
const isPoint3D = point => isPoint(point) && point.hasOwnProperty('z');
const distance1D = (a, b) => Math.abs(a - b);
function distance(a, b) {
  if (isNum(a) && isNum(b)) {
    return distance1D(a, b);
  } else if (isPoint(a) && isPoint(b)) {
    const xDelta = distance1D(a.x, b.x);
    const yDelta = distance1D(a.y, b.y);
    const zDelta = isPoint3D(a) && isPoint3D(b) ? distance1D(a.z, b.z) : 0;
    return Math.sqrt(Math.pow(xDelta, 2) + Math.pow(yDelta, 2) + Math.pow(zDelta, 2));
  }
}
const pointFromVector = (origin, angle, distance) => {
  angle = degreesToRadians(angle);
  return {
    x: distance * Math.cos(angle) + origin.x,
    y: distance * Math.sin(angle) + origin.y
  };
};
const toDecimal = function (num) {
  let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
  precision = Math.pow(10, precision);
  return Math.round(num * precision) / precision;
};
const smoothFrame = function (prevValue, nextValue, duration) {
  let smoothing = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
  return toDecimal(prevValue + duration * (nextValue - prevValue) / Math.max(smoothing, duration));
};
const smooth = function () {
  let strength = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 50;
  let previousValue = 0;
  let lastUpdated = 0;
  return v => {
    const currentFramestamp = sync.getFrameData().timestamp;
    const timeDelta = currentFramestamp !== lastUpdated ? currentFramestamp - lastUpdated : 0;
    const newValue = timeDelta ? smoothFrame(previousValue, v, timeDelta, strength) : previousValue;
    lastUpdated = currentFramestamp;
    previousValue = newValue;
    return newValue;
  };
};
const snap = points => {
  if (typeof points === 'number') {
    return v => Math.round(v / points) * points;
  } else {
    let i = 0;
    const numPoints = points.length;
    return v => {
      let lastDistance = Math.abs(points[0] - v);
      for (i = 1; i < numPoints; i++) {
        const point = points[i];
        const distance = Math.abs(point - v);
        if (distance === 0) return point;
        if (distance > lastDistance) return points[i - 1];
        if (i === numPoints - 1) return point;
        lastDistance = distance;
      }
    };
  }
};
function velocityPerFrame(xps, frameDuration) {
  return xps / (1000 / frameDuration);
}
const wrap = (min, max, v) => {
  const rangeSize = max - min;
  return ((v - min) % rangeSize + rangeSize) % rangeSize + min;
};
const a = (a1, a2) => 1.0 - 3.0 * a2 + 3.0 * a1;
const b = (a1, a2) => 3.0 * a2 - 6.0 * a1;
const c = a1 => 3.0 * a1;
const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;
const getSlope = (t, a1, a2) => 3.0 * a(a1, a2) * t * t + 2.0 * b(a1, a2) * t + c(a1);
const subdivisionPrecision = 0.0000001;
const subdivisionMaxIterations = 10;
function binarySubdivide(aX, aA, aB, mX1, mX2) {
  let currentX;
  let currentT;
  let i = 0;
  do {
    currentT = aA + (aB - aA) / 2.0;
    currentX = calcBezier(currentT, mX1, mX2) - aX;
    if (currentX > 0.0) {
      aB = currentT;
    } else {
      aA = currentT;
    }
  } while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations);
  return currentT;
}
const newtonIterations = 8;
const newtonMinSlope = 0.001;
function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
  for (let i = 0; i < newtonIterations; ++i) {
    const currentSlope = getSlope(aGuessT, mX1, mX2);
    if (currentSlope === 0.0) {
      return aGuessT;
    }
    const currentX = calcBezier(aGuessT, mX1, mX2) - aX;
    aGuessT -= currentX / currentSlope;
  }
  return aGuessT;
}
const kSplineTableSize = 11;
const kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
function cubicBezier(mX1, mY1, mX2, mY2) {
  if (mX1 === mY1 && mX2 === mY2) return linear;
  const sampleValues = new Float32Array(kSplineTableSize);
  for (let i = 0; i < kSplineTableSize; ++i) {
    sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
  }
  function getTForX(aX) {
    let intervalStart = 0.0;
    let currentSample = 1;
    const lastSample = kSplineTableSize - 1;
    for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {
      intervalStart += kSampleStepSize;
    }
    --currentSample;
    const dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);
    const guessForT = intervalStart + dist * kSampleStepSize;
    const initialSlope = getSlope(guessForT, mX1, mX2);
    if (initialSlope >= newtonMinSlope) {
      return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
    } else if (initialSlope === 0.0) {
      return guessForT;
    } else {
      return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
    }
  }
  return t => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
}
const steps = function (steps) {
  let direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'end';
  return progress => {
    progress = direction === 'end' ? Math.min(progress, 0.999) : Math.max(progress, 0.001);
    const expanded = progress * steps;
    const rounded = direction === 'end' ? Math.floor(expanded) : Math.ceil(expanded);
    return clamp(0, 1, rounded / steps);
  };
};
exports.angle = angle;
exports.animate = animate;
exports.anticipate = anticipate;
exports.applyOffset = applyOffset;
exports.attract = attract;
exports.attractExpo = attractExpo;
exports.backIn = backIn;
exports.backInOut = backInOut;
exports.backOut = backOut;
exports.bounceIn = bounceIn;
exports.bounceInOut = bounceInOut;
exports.bounceOut = bounceOut;
exports.circIn = circIn;
exports.circInOut = circInOut;
exports.circOut = circOut;
exports.clamp = clamp;
exports.createAnticipate = createAnticipate;
exports.createAttractor = createAttractor;
exports.createBackIn = createBackIn;
exports.createExpoIn = createExpoIn;
exports.cubicBezier = cubicBezier;
exports.decay = decay;
exports.degreesToRadians = degreesToRadians;
exports.distance = distance;
exports.easeIn = easeIn;
exports.easeInOut = easeInOut;
exports.easeOut = easeOut;
exports.inertia = inertia;
exports.interpolate = interpolate;
exports.isPoint = isPoint;
exports.isPoint3D = isPoint3D;
exports.keyframes = keyframes;
exports.linear = linear;
exports.mirrorEasing = mirrorEasing;
exports.mix = mix;
exports.mixColor = mixColor;
exports.mixComplex = mixComplex;
exports.pipe = pipe;
exports.pointFromVector = pointFromVector;
exports.progress = progress;
exports.radiansToDegrees = radiansToDegrees;
exports.reverseEasing = reverseEasing;
exports.smooth = smooth;
exports.smoothFrame = smoothFrame;
exports.snap = snap;
exports.spring = spring;
exports.steps = steps;
exports.toDecimal = toDecimal;
exports.velocityPerFrame = velocityPerFrame;
exports.velocityPerSecond = velocityPerSecond;
exports.wrap = wrap;

/***/ }),

/***/ "../../../node_modules/punycode.js/punycode.es6.js":
/*!*********************************************************!*\
  !*** ../../../node_modules/punycode.js/punycode.es6.js ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports) {



/** Highest positive signed 32-bit float value */
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.toUnicode = exports.toASCII = exports.encode = exports["default"] = exports.decode = void 0;
exports.ucs2decode = ucs2decode;
exports.ucs2encode = void 0;
const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1

/** Bootstring parameters */
const base = 36;
const tMin = 1;
const tMax = 26;
const skew = 38;
const damp = 700;
const initialBias = 72;
const initialN = 128; // 0x80
const delimiter = '-'; // '\x2D'

/** Regular expressions */
const regexPunycode = /^xn--/;
const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too.
const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators

/** Error messages */
const errors = {
  'overflow': 'Overflow: input needs wider integers to process',
  'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
  'invalid-input': 'Invalid input'
};

/** Convenience shortcuts */
const baseMinusTMin = base - tMin;
const floor = Math.floor;
const stringFromCharCode = String.fromCharCode;

/*--------------------------------------------------------------------------*/

/**
 * A generic error utility function.
 * @private
 * @param {String} type The error type.
 * @returns {Error} Throws a `RangeError` with the applicable error message.
 */
function error(type) {
  throw new RangeError(errors[type]);
}

/**
 * A generic `Array#map` utility function.
 * @private
 * @param {Array} array The array to iterate over.
 * @param {Function} callback The function that gets called for every array
 * item.
 * @returns {Array} A new array of values returned by the callback function.
 */
function map(array, callback) {
  const result = [];
  let length = array.length;
  while (length--) {
    result[length] = callback(array[length]);
  }
  return result;
}

/**
 * A simple `Array#map`-like wrapper to work with domain name strings or email
 * addresses.
 * @private
 * @param {String} domain The domain name or email address.
 * @param {Function} callback The function that gets called for every
 * character.
 * @returns {String} A new string of characters returned by the callback
 * function.
 */
function mapDomain(domain, callback) {
  const parts = domain.split('@');
  let result = '';
  if (parts.length > 1) {
    // In email addresses, only the domain name should be punycoded. Leave
    // the local part (i.e. everything up to `@`) intact.
    result = parts[0] + '@';
    domain = parts[1];
  }
  // Avoid `split(regex)` for IE8 compatibility. See #17.
  domain = domain.replace(regexSeparators, '\x2E');
  const labels = domain.split('.');
  const encoded = map(labels, callback).join('.');
  return result + encoded;
}

/**
 * Creates an array containing the numeric code points of each Unicode
 * character in the string. While JavaScript uses UCS-2 internally,
 * this function will convert a pair of surrogate halves (each of which
 * UCS-2 exposes as separate characters) into a single code point,
 * matching UTF-16.
 * @see `punycode.ucs2.encode`
 * @see <https://mathiasbynens.be/notes/javascript-encoding>
 * @memberOf punycode.ucs2
 * @name decode
 * @param {String} string The Unicode input string (UCS-2).
 * @returns {Array} The new array of code points.
 */
function ucs2decode(string) {
  const output = [];
  let counter = 0;
  const length = string.length;
  while (counter < length) {
    const value = string.charCodeAt(counter++);
    if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
      // It's a high surrogate, and there is a next character.
      const extra = string.charCodeAt(counter++);
      if ((extra & 0xFC00) == 0xDC00) {
        // Low surrogate.
        output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
      } else {
        // It's an unmatched surrogate; only append this code unit, in case the
        // next code unit is the high surrogate of a surrogate pair.
        output.push(value);
        counter--;
      }
    } else {
      output.push(value);
    }
  }
  return output;
}

/**
 * Creates a string based on an array of numeric code points.
 * @see `punycode.ucs2.decode`
 * @memberOf punycode.ucs2
 * @name encode
 * @param {Array} codePoints The array of numeric code points.
 * @returns {String} The new Unicode string (UCS-2).
 */
const ucs2encode = codePoints => String.fromCodePoint(...codePoints);

/**
 * Converts a basic code point into a digit/integer.
 * @see `digitToBasic()`
 * @private
 * @param {Number} codePoint The basic numeric code point value.
 * @returns {Number} The numeric value of a basic code point (for use in
 * representing integers) in the range `0` to `base - 1`, or `base` if
 * the code point does not represent a value.
 */
exports.ucs2encode = ucs2encode;
const basicToDigit = function (codePoint) {
  if (codePoint >= 0x30 && codePoint < 0x3A) {
    return 26 + (codePoint - 0x30);
  }
  if (codePoint >= 0x41 && codePoint < 0x5B) {
    return codePoint - 0x41;
  }
  if (codePoint >= 0x61 && codePoint < 0x7B) {
    return codePoint - 0x61;
  }
  return base;
};

/**
 * Converts a digit/integer into a basic code point.
 * @see `basicToDigit()`
 * @private
 * @param {Number} digit The numeric value of a basic code point.
 * @returns {Number} The basic code point whose value (when used for
 * representing integers) is `digit`, which needs to be in the range
 * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
 * used; else, the lowercase form is used. The behavior is undefined
 * if `flag` is non-zero and `digit` has no uppercase form.
 */
const digitToBasic = function (digit, flag) {
  //  0..25 map to ASCII a..z or A..Z
  // 26..35 map to ASCII 0..9
  return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
};

/**
 * Bias adaptation function as per section 3.4 of RFC 3492.
 * https://tools.ietf.org/html/rfc3492#section-3.4
 * @private
 */
const adapt = function (delta, numPoints, firstTime) {
  let k = 0;
  delta = firstTime ? floor(delta / damp) : delta >> 1;
  delta += floor(delta / numPoints);
  for /* no initialization */
  (; delta > baseMinusTMin * tMax >> 1; k += base) {
    delta = floor(delta / baseMinusTMin);
  }
  return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
};

/**
 * Converts a Punycode string of ASCII-only symbols to a string of Unicode
 * symbols.
 * @memberOf punycode
 * @param {String} input The Punycode string of ASCII-only symbols.
 * @returns {String} The resulting string of Unicode symbols.
 */
const decode = function (input) {
  // Don't use UCS-2.
  const output = [];
  const inputLength = input.length;
  let i = 0;
  let n = initialN;
  let bias = initialBias;

  // Handle the basic code points: let `basic` be the number of input code
  // points before the last delimiter, or `0` if there is none, then copy
  // the first basic code points to the output.

  let basic = input.lastIndexOf(delimiter);
  if (basic < 0) {
    basic = 0;
  }
  for (let j = 0; j < basic; ++j) {
    // if it's not a basic code point
    if (input.charCodeAt(j) >= 0x80) {
      error('not-basic');
    }
    output.push(input.charCodeAt(j));
  }

  // Main decoding loop: start just after the last delimiter if any basic code
  // points were copied; start at the beginning otherwise.

  for /* no final expression */
  (let index = basic > 0 ? basic + 1 : 0; index < inputLength;) {
    // `index` is the index of the next character to be consumed.
    // Decode a generalized variable-length integer into `delta`,
    // which gets added to `i`. The overflow checking is easier
    // if we increase `i` as we go, then subtract off its starting
    // value at the end to obtain `delta`.
    const oldi = i;
    for /* no condition */
    (let w = 1, k = base;; k += base) {
      if (index >= inputLength) {
        error('invalid-input');
      }
      const digit = basicToDigit(input.charCodeAt(index++));
      if (digit >= base) {
        error('invalid-input');
      }
      if (digit > floor((maxInt - i) / w)) {
        error('overflow');
      }
      i += digit * w;
      const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
      if (digit < t) {
        break;
      }
      const baseMinusT = base - t;
      if (w > floor(maxInt / baseMinusT)) {
        error('overflow');
      }
      w *= baseMinusT;
    }
    const out = output.length + 1;
    bias = adapt(i - oldi, out, oldi == 0);

    // `i` was supposed to wrap around from `out` to `0`,
    // incrementing `n` each time, so we'll fix that now:
    if (floor(i / out) > maxInt - n) {
      error('overflow');
    }
    n += floor(i / out);
    i %= out;

    // Insert `n` at position `i` of the output.
    output.splice(i++, 0, n);
  }
  return String.fromCodePoint(...output);
};

/**
 * Converts a string of Unicode symbols (e.g. a domain name label) to a
 * Punycode string of ASCII-only symbols.
 * @memberOf punycode
 * @param {String} input The string of Unicode symbols.
 * @returns {String} The resulting Punycode string of ASCII-only symbols.
 */
exports.decode = decode;
const encode = function (input) {
  const output = [];

  // Convert the input in UCS-2 to an array of Unicode code points.
  input = ucs2decode(input);

  // Cache the length.
  const inputLength = input.length;

  // Initialize the state.
  let n = initialN;
  let delta = 0;
  let bias = initialBias;

  // Handle the basic code points.
  for (const currentValue of input) {
    if (currentValue < 0x80) {
      output.push(stringFromCharCode(currentValue));
    }
  }
  const basicLength = output.length;
  let handledCPCount = basicLength;

  // `handledCPCount` is the number of code points that have been handled;
  // `basicLength` is the number of basic code points.

  // Finish the basic string with a delimiter unless it's empty.
  if (basicLength) {
    output.push(delimiter);
  }

  // Main encoding loop:
  while (handledCPCount < inputLength) {
    // All non-basic code points < n have been handled already. Find the next
    // larger one:
    let m = maxInt;
    for (const currentValue of input) {
      if (currentValue >= n && currentValue < m) {
        m = currentValue;
      }
    }

    // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
    // but guard against overflow.
    const handledCPCountPlusOne = handledCPCount + 1;
    if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
      error('overflow');
    }
    delta += (m - n) * handledCPCountPlusOne;
    n = m;
    for (const currentValue of input) {
      if (currentValue < n && ++delta > maxInt) {
        error('overflow');
      }
      if (currentValue === n) {
        // Represent delta as a generalized variable-length integer.
        let q = delta;
        for /* no condition */
        (let k = base;; k += base) {
          const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
          if (q < t) {
            break;
          }
          const qMinusT = q - t;
          const baseMinusT = base - t;
          output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
          q = floor(qMinusT / baseMinusT);
        }
        output.push(stringFromCharCode(digitToBasic(q, 0)));
        bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
        delta = 0;
        ++handledCPCount;
      }
    }
    ++delta;
    ++n;
  }
  return output.join('');
};

/**
 * Converts a Punycode string representing a domain name or an email address
 * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
 * it doesn't matter if you call it on a string that has already been
 * converted to Unicode.
 * @memberOf punycode
 * @param {String} input The Punycoded domain name or email address to
 * convert to Unicode.
 * @returns {String} The Unicode representation of the given Punycode
 * string.
 */
exports.encode = encode;
const toUnicode = function (input) {
  return mapDomain(input, function (string) {
    return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
  });
};

/**
 * Converts a Unicode string representing a domain name or an email address to
 * Punycode. Only the non-ASCII parts of the domain name will be converted,
 * i.e. it doesn't matter if you call it with a domain that's already in
 * ASCII.
 * @memberOf punycode
 * @param {String} input The domain name or email address to convert, as a
 * Unicode string.
 * @returns {String} The Punycode representation of the given domain name or
 * email address.
 */
exports.toUnicode = toUnicode;
const toASCII = function (input) {
  return mapDomain(input, function (string) {
    return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;
  });
};

/*--------------------------------------------------------------------------*/

/** Define the public API */
exports.toASCII = toASCII;
const punycode = {
  /**
   * A string representing the current Punycode.js version number.
   * @memberOf punycode
   * @type String
   */
  'version': '2.3.1',
  /**
   * An object of methods to convert from JavaScript's internal character
   * representation (UCS-2) to Unicode code points, and back.
   * @see <https://mathiasbynens.be/notes/javascript-encoding>
   * @memberOf punycode
   * @type Object
   */
  'ucs2': {
    'decode': ucs2decode,
    'encode': ucs2encode
  },
  'decode': decode,
  'encode': encode,
  'toASCII': toASCII,
  'toUnicode': toUnicode
};
var _default = punycode;
exports["default"] = _default;

/***/ }),

/***/ "../../../node_modules/react-remove-scroll-bar/dist/es2015/component.js":
/*!******************************************************************************!*\
  !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/component.js ***!
  \******************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.RemoveScrollBar = void 0;
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
var _reactStyleSingleton = __webpack_require__(/*! react-style-singleton */ "../../../node_modules/react-style-singleton/dist/es2015/index.js");
var _constants = __webpack_require__(/*! ./constants */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js");
var _utils = __webpack_require__(/*! ./utils */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var Style = (0, _reactStyleSingleton.styleSingleton)();
// important tip - once we measure scrollBar width and remove them
// we could not repeat this operation
// thus we are using style-singleton - only the first "yet correct" style will be applied.
var getStyles = function (_a, allowRelative, gapMode, important) {
  var left = _a.left,
    top = _a.top,
    right = _a.right,
    gap = _a.gap;
  if (gapMode === void 0) {
    gapMode = 'margin';
  }
  return "\n  .".concat(_constants.noScrollbarsClassName, " {\n   overflow: hidden ").concat(important, ";\n   padding-right: ").concat(gap, "px ").concat(important, ";\n  }\n  body {\n    overflow: hidden ").concat(important, ";\n    overscroll-behavior: contain;\n    ").concat([allowRelative && "position: relative ".concat(important, ";"), gapMode === 'margin' && "\n    padding-left: ".concat(left, "px;\n    padding-top: ").concat(top, "px;\n    padding-right: ").concat(right, "px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(gap, "px ").concat(important, ";\n    "), gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";")].filter(Boolean).join(''), "\n  }\n  \n  .").concat(_constants.zeroRightClassName, " {\n    right: ").concat(gap, "px ").concat(important, ";\n  }\n  \n  .").concat(_constants.fullWidthClassName, " {\n    margin-right: ").concat(gap, "px ").concat(important, ";\n  }\n  \n  .").concat(_constants.zeroRightClassName, " .").concat(_constants.zeroRightClassName, " {\n    right: 0 ").concat(important, ";\n  }\n  \n  .").concat(_constants.fullWidthClassName, " .").concat(_constants.fullWidthClassName, " {\n    margin-right: 0 ").concat(important, ";\n  }\n  \n  body {\n    ").concat(_constants.removedBarSizeVariable, ": ").concat(gap, "px;\n  }\n");
};
/**
 * Removes page scrollbar and blocks page scroll when mounted
 */
var RemoveScrollBar = function (props) {
  var noRelative = props.noRelative,
    noImportant = props.noImportant,
    _a = props.gapMode,
    gapMode = _a === void 0 ? 'margin' : _a;
  var gap = React.useMemo(function () {
    return (0, _utils.getGapWidth)(gapMode);
  }, [gapMode]);
  return /*#__PURE__*/React.createElement(Style, {
    styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '')
  });
};
exports.RemoveScrollBar = RemoveScrollBar;

/***/ }),

/***/ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js":
/*!******************************************************************************!*\
  !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js ***!
  \******************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.zeroRightClassName = exports.removedBarSizeVariable = exports.noScrollbarsClassName = exports.fullWidthClassName = void 0;
var zeroRightClassName = 'right-scroll-bar-position';
exports.zeroRightClassName = zeroRightClassName;
var fullWidthClassName = 'width-before-scroll-bar';
exports.fullWidthClassName = fullWidthClassName;
var noScrollbarsClassName = 'with-scroll-bars-hidden';
/**
 * Name of a CSS variable containing the amount of "hidden" scrollbar
 * ! might be undefined ! use will fallback!
 */
exports.noScrollbarsClassName = noScrollbarsClassName;
var removedBarSizeVariable = '--removed-body-scroll-bar-size';
exports.removedBarSizeVariable = removedBarSizeVariable;

/***/ }),

/***/ "../../../node_modules/react-remove-scroll-bar/dist/es2015/index.js":
/*!**************************************************************************!*\
  !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/index.js ***!
  \**************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "RemoveScrollBar", ({
  enumerable: true,
  get: function () {
    return _component.RemoveScrollBar;
  }
}));
Object.defineProperty(exports, "fullWidthClassName", ({
  enumerable: true,
  get: function () {
    return _constants.fullWidthClassName;
  }
}));
Object.defineProperty(exports, "getGapWidth", ({
  enumerable: true,
  get: function () {
    return _utils.getGapWidth;
  }
}));
Object.defineProperty(exports, "noScrollbarsClassName", ({
  enumerable: true,
  get: function () {
    return _constants.noScrollbarsClassName;
  }
}));
Object.defineProperty(exports, "removedBarSizeVariable", ({
  enumerable: true,
  get: function () {
    return _constants.removedBarSizeVariable;
  }
}));
Object.defineProperty(exports, "zeroRightClassName", ({
  enumerable: true,
  get: function () {
    return _constants.zeroRightClassName;
  }
}));
var _component = __webpack_require__(/*! ./component */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/component.js");
var _constants = __webpack_require__(/*! ./constants */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js");
var _utils = __webpack_require__(/*! ./utils */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js");

/***/ }),

/***/ "../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js":
/*!**************************************************************************!*\
  !*** ../../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js ***!
  \**************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.zeroGap = exports.getGapWidth = void 0;
var zeroGap = {
  left: 0,
  top: 0,
  right: 0,
  gap: 0
};
exports.zeroGap = zeroGap;
var parse = function (x) {
  return parseInt(x || '', 10) || 0;
};
var getOffset = function (gapMode) {
  var cs = window.getComputedStyle(document.body);
  if (true) {
    if (cs.overflowY === 'hidden') {
      console.error('react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body');
    }
  }
  var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
  var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
  var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
  return [parse(left), parse(top), parse(right)];
};
var getGapWidth = function (gapMode) {
  if (gapMode === void 0) {
    gapMode = 'margin';
  }
  if (typeof window === 'undefined') {
    return zeroGap;
  }
  var offsets = getOffset(gapMode);
  var documentWidth = document.documentElement.clientWidth;
  var windowWidth = window.innerWidth;
  return {
    left: offsets[0],
    top: offsets[1],
    right: offsets[2],
    gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
  };
};
exports.getGapWidth = getGapWidth;

/***/ }),

/***/ "../../../node_modules/react-remove-scroll/dist/es2015/Combination.js":
/*!****************************************************************************!*\
  !*** ../../../node_modules/react-remove-scroll/dist/es2015/Combination.js ***!
  \****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
var _UI = __webpack_require__(/*! ./UI */ "../../../node_modules/react-remove-scroll/dist/es2015/UI.js");
var _sidecar = _interopRequireDefault(__webpack_require__(/*! ./sidecar */ "../../../node_modules/react-remove-scroll/dist/es2015/sidecar.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var ReactRemoveScroll = /*#__PURE__*/React.forwardRef(function (props, ref) {
  return /*#__PURE__*/React.createElement(_UI.RemoveScroll, (0, _tslib.__assign)({}, props, {
    ref: ref,
    sideCar: _sidecar.default
  }));
});
ReactRemoveScroll.classNames = _UI.RemoveScroll.classNames;
var _default = ReactRemoveScroll;
exports["default"] = _default;

/***/ }),

/***/ "../../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js":
/*!***************************************************************************!*\
  !*** ../../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js ***!
  \***************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.RemoveScrollSideCar = RemoveScrollSideCar;
exports.getTouchXY = exports.getDeltaXY = void 0;
var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
var _reactRemoveScrollBar = __webpack_require__(/*! react-remove-scroll-bar */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/index.js");
var _reactStyleSingleton = __webpack_require__(/*! react-style-singleton */ "../../../node_modules/react-style-singleton/dist/es2015/index.js");
var _aggresiveCapture = __webpack_require__(/*! ./aggresiveCapture */ "../../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js");
var _handleScroll = __webpack_require__(/*! ./handleScroll */ "../../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var getTouchXY = function (event) {
  return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
};
exports.getTouchXY = getTouchXY;
var getDeltaXY = function (event) {
  return [event.deltaX, event.deltaY];
};
exports.getDeltaXY = getDeltaXY;
var extractRef = function (ref) {
  return ref && 'current' in ref ? ref.current : ref;
};
var deltaCompare = function (x, y) {
  return x[0] === y[0] && x[1] === y[1];
};
var generateStyle = function (id) {
  return "\n  .block-interactivity-".concat(id, " {pointer-events: none;}\n  .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
};
var idCounter = 0;
var lockStack = [];
function RemoveScrollSideCar(props) {
  var shouldPreventQueue = React.useRef([]);
  var touchStartRef = React.useRef([0, 0]);
  var activeAxis = React.useRef();
  var id = React.useState(idCounter++)[0];
  var Style = React.useState(function () {
    return (0, _reactStyleSingleton.styleSingleton)();
  })[0];
  var lastProps = React.useRef(props);
  React.useEffect(function () {
    lastProps.current = props;
  }, [props]);
  React.useEffect(function () {
    if (props.inert) {
      document.body.classList.add("block-interactivity-".concat(id));
      var allow_1 = (0, _tslib.__spreadArray)([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
      allow_1.forEach(function (el) {
        return el.classList.add("allow-interactivity-".concat(id));
      });
      return function () {
        document.body.classList.remove("block-interactivity-".concat(id));
        allow_1.forEach(function (el) {
          return el.classList.remove("allow-interactivity-".concat(id));
        });
      };
    }
    return;
  }, [props.inert, props.lockRef.current, props.shards]);
  var shouldCancelEvent = React.useCallback(function (event, parent) {
    if ('touches' in event && event.touches.length === 2) {
      return !lastProps.current.allowPinchZoom;
    }
    var touch = getTouchXY(event);
    var touchStart = touchStartRef.current;
    var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];
    var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];
    var currentAxis;
    var target = event.target;
    var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';
    // allow horizontal touch move on Range inputs. They will not cause any scroll
    if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
      return false;
    }
    var canBeScrolledInMainDirection = (0, _handleScroll.locationCouldBeScrolled)(moveDirection, target);
    if (!canBeScrolledInMainDirection) {
      return true;
    }
    if (canBeScrolledInMainDirection) {
      currentAxis = moveDirection;
    } else {
      currentAxis = moveDirection === 'v' ? 'h' : 'v';
      canBeScrolledInMainDirection = (0, _handleScroll.locationCouldBeScrolled)(moveDirection, target);
      // other axis might be not scrollable
    }

    if (!canBeScrolledInMainDirection) {
      return false;
    }
    if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {
      activeAxis.current = currentAxis;
    }
    if (!currentAxis) {
      return true;
    }
    var cancelingAxis = activeAxis.current || currentAxis;
    return (0, _handleScroll.handleScroll)(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);
  }, []);
  var shouldPrevent = React.useCallback(function (_event) {
    var event = _event;
    if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
      // not the last active
      return;
    }
    var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
    var sourceEvent = shouldPreventQueue.current.filter(function (e) {
      return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta);
    })[0];
    // self event, and should be canceled
    if (sourceEvent && sourceEvent.should) {
      if (event.cancelable) {
        event.preventDefault();
      }
      return;
    }
    // outside or shard event
    if (!sourceEvent) {
      var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function (node) {
        return node.contains(event.target);
      });
      var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
      if (shouldStop) {
        if (event.cancelable) {
          event.preventDefault();
        }
      }
    }
  }, []);
  var shouldCancel = React.useCallback(function (name, delta, target, should) {
    var event = {
      name: name,
      delta: delta,
      target: target,
      should: should
    };
    shouldPreventQueue.current.push(event);
    setTimeout(function () {
      shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) {
        return e !== event;
      });
    }, 1);
  }, []);
  var scrollTouchStart = React.useCallback(function (event) {
    touchStartRef.current = getTouchXY(event);
    activeAxis.current = undefined;
  }, []);
  var scrollWheel = React.useCallback(function (event) {
    shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
  }, []);
  var scrollTouchMove = React.useCallback(function (event) {
    shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
  }, []);
  React.useEffect(function () {
    lockStack.push(Style);
    props.setCallbacks({
      onScrollCapture: scrollWheel,
      onWheelCapture: scrollWheel,
      onTouchMoveCapture: scrollTouchMove
    });
    document.addEventListener('wheel', shouldPrevent, _aggresiveCapture.nonPassive);
    document.addEventListener('touchmove', shouldPrevent, _aggresiveCapture.nonPassive);
    document.addEventListener('touchstart', scrollTouchStart, _aggresiveCapture.nonPassive);
    return function () {
      lockStack = lockStack.filter(function (inst) {
        return inst !== Style;
      });
      document.removeEventListener('wheel', shouldPrevent, _aggresiveCapture.nonPassive);
      document.removeEventListener('touchmove', shouldPrevent, _aggresiveCapture.nonPassive);
      document.removeEventListener('touchstart', scrollTouchStart, _aggresiveCapture.nonPassive);
    };
  }, []);
  var removeScrollBar = props.removeScrollBar,
    inert = props.inert;
  return /*#__PURE__*/React.createElement(React.Fragment, null, inert ? /*#__PURE__*/React.createElement(Style, {
    styles: generateStyle(id)
  }) : null, removeScrollBar ? /*#__PURE__*/React.createElement(_reactRemoveScrollBar.RemoveScrollBar, {
    gapMode: "margin"
  }) : null);
}

/***/ }),

/***/ "../../../node_modules/react-remove-scroll/dist/es2015/UI.js":
/*!*******************************************************************!*\
  !*** ../../../node_modules/react-remove-scroll/dist/es2015/UI.js ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.RemoveScroll = void 0;
var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
var _constants = __webpack_require__(/*! react-remove-scroll-bar/constants */ "../../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js");
var _useCallbackRef = __webpack_require__(/*! use-callback-ref */ "../../../node_modules/use-callback-ref/dist/es2015/index.js");
var _medium = __webpack_require__(/*! ./medium */ "../../../node_modules/react-remove-scroll/dist/es2015/medium.js");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var nothing = function () {
  return;
};
/**
 * Removes scrollbar from the page and contain the scroll within the Lock
 */
var RemoveScroll = /*#__PURE__*/React.forwardRef(function (props, parentRef) {
  var ref = React.useRef(null);
  var _a = React.useState({
      onScrollCapture: nothing,
      onWheelCapture: nothing,
      onTouchMoveCapture: nothing
    }),
    callbacks = _a[0],
    setCallbacks = _a[1];
  var forwardProps = props.forwardProps,
    children = props.children,
    className = props.className,
    removeScrollBar = props.removeScrollBar,
    enabled = props.enabled,
    shards = props.shards,
    sideCar = props.sideCar,
    noIsolation = props.noIsolation,
    inert = props.inert,
    allowPinchZoom = props.allowPinchZoom,
    _b = props.as,
    Container = _b === void 0 ? 'div' : _b,
    rest = (0, _tslib.__rest)(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]);
  var SideCar = sideCar;
  var containerRef = (0, _useCallbackRef.useMergeRefs)([ref, parentRef]);
  var containerProps = (0, _tslib.__assign)((0, _tslib.__assign)({}, rest), callbacks);
  return /*#__PURE__*/React.createElement(React.Fragment, null, enabled && /*#__PURE__*/React.createElement(SideCar, {
    sideCar: _medium.effectCar,
    removeScrollBar: removeScrollBar,
    shards: shards,
    noIsolation: noIsolation,
    inert: inert,
    setCallbacks: setCallbacks,
    allowPinchZoom: !!allowPinchZoom,
    lockRef: ref
  }), forwardProps ? /*#__PURE__*/React.cloneElement(React.Children.only(children), (0, _tslib.__assign)((0, _tslib.__assign)({}, containerProps), {
    ref: containerRef
  })) : /*#__PURE__*/React.createElement(Container, (0, _tslib.__assign)({}, containerProps, {
    className: className,
    ref: containerRef
  }), children));
});
exports.RemoveScroll = RemoveScroll;
RemoveScroll.defaultProps = {
  enabled: true,
  removeScrollBar: true,
  inert: false
};
RemoveScroll.classNames = {
  fullWidth: _constants.fullWidthClassName,
  zeroRight: _constants.zeroRightClassName
};

/***/ }),

/***/ "../../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js":
/*!*********************************************************************************!*\
  !*** ../../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js ***!
  \*********************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.nonPassive = void 0;
var passiveSupported = false;
if (typeof window !== 'undefined') {
  try {
    var options = Object.defineProperty({}, 'passive', {
      get: function () {
        passiveSupported = true;
        return true;
      }
    });
    // @ts-ignore
    window.addEventListener('test', options, options);
    // @ts-ignore
    window.removeEventListener('test', options, options);
  } catch (err) {
    passiveSupported = false;
  }
}
var nonPassive = passiveSupported ? {
  passive: false
} : false;
exports.nonPassive = nonPassive;

/***/ }),

/***/ "../../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js":
/*!*****************************************************************************!*\
  !*** ../../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js ***!
  \*****************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.locationCouldBeScrolled = exports.handleScroll = void 0;
var alwaysContainsScroll = function (node) {
  // textarea will always _contain_ scroll inside self. It only can be hidden
  return node.tagName === 'TEXTAREA';
};
var elementCanBeScrolled = function (node, overflow) {
  var styles = window.getComputedStyle(node);
  return (
    // not-not-scrollable
    styles[overflow] !== 'hidden' &&
    // contains scroll inside self
    !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible')
  );
};
var elementCouldBeVScrolled = function (node) {
  return elementCanBeScrolled(node, 'overflowY');
};
var elementCouldBeHScrolled = function (node) {
  return elementCanBeScrolled(node, 'overflowX');
};
var locationCouldBeScrolled = function (axis, node) {
  var current = node;
  do {
    // Skip over shadow root
    if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {
      current = current.host;
    }
    var isScrollable = elementCouldBeScrolled(axis, current);
    if (isScrollable) {
      var _a = getScrollVariables(axis, current),
        s = _a[1],
        d = _a[2];
      if (s > d) {
        return true;
      }
    }
    current = current.parentNode;
  } while (current && current !== document.body);
  return false;
};
exports.locationCouldBeScrolled = locationCouldBeScrolled;
var getVScrollVariables = function (_a) {
  var scrollTop = _a.scrollTop,
    scrollHeight = _a.scrollHeight,
    clientHeight = _a.clientHeight;
  return [scrollTop, scrollHeight, clientHeight];
};
var getHScrollVariables = function (_a) {
  var scrollLeft = _a.scrollLeft,
    scrollWidth = _a.scrollWidth,
    clientWidth = _a.clientWidth;
  return [scrollLeft, scrollWidth, clientWidth];
};
var elementCouldBeScrolled = function (axis, node) {
  return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
};
var getScrollVariables = function (axis, node) {
  return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);
};
var getDirectionFactor = function (axis, direction) {
  /**
   * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
   * and then increasingly negative as you scroll towards the end of the content.
   * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
   */
  return axis === 'h' && direction === 'rtl' ? -1 : 1;
};
var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {
  var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
  var delta = directionFactor * sourceDelta;
  // find scrollable target
  var target = event.target;
  var targetInLock = endTarget.contains(target);
  var shouldCancelScroll = false;
  var isDeltaPositive = delta > 0;
  var availableScroll = 0;
  var availableScrollTop = 0;
  do {
    var _a = getScrollVariables(axis, target),
      position = _a[0],
      scroll_1 = _a[1],
      capacity = _a[2];
    var elementScroll = scroll_1 - capacity - directionFactor * position;
    if (position || elementScroll) {
      if (elementCouldBeScrolled(axis, target)) {
        availableScroll += elementScroll;
        availableScrollTop += position;
      }
    }
    target = target.parentNode;
  } while (
  // portaled content
  !targetInLock && target !== document.body ||
  // self content
  targetInLock && (endTarget.contains(target) || endTarget === target));
  if (isDeltaPositive && (noOverscroll && availableScroll === 0 || !noOverscroll && delta > availableScroll)) {
    shouldCancelScroll = true;
  } else if (!isDeltaPositive && (noOverscroll && availableScrollTop === 0 || !noOverscroll && -delta > availableScrollTop)) {
    shouldCancelScroll = true;
  }
  return shouldCancelScroll;
};
exports.handleScroll = handleScroll;

/***/ }),

/***/ "../../../node_modules/react-remove-scroll/dist/es2015/index.js":
/*!**********************************************************************!*\
  !*** ../../../node_modules/react-remove-scroll/dist/es2015/index.js ***!
  \**********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "RemoveScroll", ({
  enumerable: true,
  get: function () {
    return _Combination.default;
  }
}));
var _Combination = _interopRequireDefault(__webpack_require__(/*! ./Combination */ "../../../node_modules/react-remove-scroll/dist/es2015/Combination.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/***/ }),

/***/ "../../../node_modules/react-remove-scroll/dist/es2015/medium.js":
/*!***********************************************************************!*\
  !*** ../../../node_modules/react-remove-scroll/dist/es2015/medium.js ***!
  \***********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.effectCar = void 0;
var _useSidecar = __webpack_require__(/*! use-sidecar */ "../../../node_modules/use-sidecar/dist/es2015/index.js");
var effectCar = (0, _useSidecar.createSidecarMedium)();
exports.effectCar = effectCar;

/***/ }),

/***/ "../../../node_modules/react-remove-scroll/dist/es2015/sidecar.js":
/*!************************************************************************!*\
  !*** ../../../node_modules/react-remove-scroll/dist/es2015/sidecar.js ***!
  \************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _useSidecar = __webpack_require__(/*! use-sidecar */ "../../../node_modules/use-sidecar/dist/es2015/index.js");
var _SideEffect = __webpack_require__(/*! ./SideEffect */ "../../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js");
var _medium = __webpack_require__(/*! ./medium */ "../../../node_modules/react-remove-scroll/dist/es2015/medium.js");
var _default = (0, _useSidecar.exportSidecar)(_medium.effectCar, _SideEffect.RemoveScrollSideCar);
exports["default"] = _default;

/***/ }),

/***/ "../../../node_modules/react-style-singleton/dist/es2015/component.js":
/*!****************************************************************************!*\
  !*** ../../../node_modules/react-style-singleton/dist/es2015/component.js ***!
  \****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.styleSingleton = void 0;
var _hook = __webpack_require__(/*! ./hook */ "../../../node_modules/react-style-singleton/dist/es2015/hook.js");
/**
 * create a Component to add styles on demand
 * - styles are added when first instance is mounted
 * - styles are removed when the last instance is unmounted
 * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
 */
var styleSingleton = function () {
  var useStyle = (0, _hook.styleHookSingleton)();
  var Sheet = function (_a) {
    var styles = _a.styles,
      dynamic = _a.dynamic;
    useStyle(styles, dynamic);
    return null;
  };
  return Sheet;
};
exports.styleSingleton = styleSingleton;

/***/ }),

/***/ "../../../node_modules/react-style-singleton/dist/es2015/hook.js":
/*!***********************************************************************!*\
  !*** ../../../node_modules/react-style-singleton/dist/es2015/hook.js ***!
  \***********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.styleHookSingleton = void 0;
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
var _singleton = __webpack_require__(/*! ./singleton */ "../../../node_modules/react-style-singleton/dist/es2015/singleton.js");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * creates a hook to control style singleton
 * @see {@link styleSingleton} for a safer component version
 * @example
 * ```tsx
 * const useStyle = styleHookSingleton();
 * ///
 * useStyle('body { overflow: hidden}');
 */
var styleHookSingleton = function () {
  var sheet = (0, _singleton.stylesheetSingleton)();
  return function (styles, isDynamic) {
    React.useEffect(function () {
      sheet.add(styles);
      return function () {
        sheet.remove();
      };
    }, [styles && isDynamic]);
  };
};
exports.styleHookSingleton = styleHookSingleton;

/***/ }),

/***/ "../../../node_modules/react-style-singleton/dist/es2015/index.js":
/*!************************************************************************!*\
  !*** ../../../node_modules/react-style-singleton/dist/es2015/index.js ***!
  \************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "styleHookSingleton", ({
  enumerable: true,
  get: function () {
    return _hook.styleHookSingleton;
  }
}));
Object.defineProperty(exports, "styleSingleton", ({
  enumerable: true,
  get: function () {
    return _component.styleSingleton;
  }
}));
Object.defineProperty(exports, "stylesheetSingleton", ({
  enumerable: true,
  get: function () {
    return _singleton.stylesheetSingleton;
  }
}));
var _component = __webpack_require__(/*! ./component */ "../../../node_modules/react-style-singleton/dist/es2015/component.js");
var _singleton = __webpack_require__(/*! ./singleton */ "../../../node_modules/react-style-singleton/dist/es2015/singleton.js");
var _hook = __webpack_require__(/*! ./hook */ "../../../node_modules/react-style-singleton/dist/es2015/hook.js");

/***/ }),

/***/ "../../../node_modules/react-style-singleton/dist/es2015/singleton.js":
/*!****************************************************************************!*\
  !*** ../../../node_modules/react-style-singleton/dist/es2015/singleton.js ***!
  \****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.stylesheetSingleton = void 0;
var _getNonce = __webpack_require__(/*! get-nonce */ "../../../node_modules/get-nonce/dist/es2015/index.js");
function makeStyleTag() {
  if (!document) return null;
  var tag = document.createElement('style');
  tag.type = 'text/css';
  var nonce = (0, _getNonce.getNonce)();
  if (nonce) {
    tag.setAttribute('nonce', nonce);
  }
  return tag;
}
function injectStyles(tag, css) {
  // @ts-ignore
  if (tag.styleSheet) {
    // @ts-ignore
    tag.styleSheet.cssText = css;
  } else {
    tag.appendChild(document.createTextNode(css));
  }
}
function insertStyleTag(tag) {
  var head = document.head || document.getElementsByTagName('head')[0];
  head.appendChild(tag);
}
var stylesheetSingleton = function () {
  var counter = 0;
  var stylesheet = null;
  return {
    add: function (style) {
      if (counter == 0) {
        if (stylesheet = makeStyleTag()) {
          injectStyles(stylesheet, style);
          insertStyleTag(stylesheet);
        }
      }
      counter++;
    },
    remove: function () {
      counter--;
      if (!counter && stylesheet) {
        stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
        stylesheet = null;
      }
    }
  };
};
exports.stylesheetSingleton = stylesheetSingleton;

/***/ }),

/***/ "../../../node_modules/react/cjs/react-jsx-runtime.development.js":
/*!************************************************************************!*\
  !*** ../../../node_modules/react/cjs/react-jsx-runtime.development.js ***!
  \************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

/**
 * @license React
 * react-jsx-runtime.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */



if (true) {
  (function () {
    'use strict';

    var React = __webpack_require__(/*! react */ "react");

    // ATTENTION
    // When adding new symbols to this file,
    // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
    // The Symbol used to tag the ReactElement-like types.
    var REACT_ELEMENT_TYPE = Symbol.for('react.element');
    var REACT_PORTAL_TYPE = Symbol.for('react.portal');
    var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
    var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
    var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
    var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
    var REACT_CONTEXT_TYPE = Symbol.for('react.context');
    var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
    var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
    var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
    var REACT_MEMO_TYPE = Symbol.for('react.memo');
    var REACT_LAZY_TYPE = Symbol.for('react.lazy');
    var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
    var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
    var FAUX_ITERATOR_SYMBOL = '@@iterator';
    function getIteratorFn(maybeIterable) {
      if (maybeIterable === null || typeof maybeIterable !== 'object') {
        return null;
      }
      var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
      if (typeof maybeIterator === 'function') {
        return maybeIterator;
      }
      return null;
    }
    var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
    function error(format) {
      {
        {
          for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
            args[_key2 - 1] = arguments[_key2];
          }
          printWarning('error', format, args);
        }
      }
    }
    function printWarning(level, format, args) {
      // When changing this logic, you might want to also
      // update consoleWithStackDev.www.js as well.
      {
        var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
        var stack = ReactDebugCurrentFrame.getStackAddendum();
        if (stack !== '') {
          format += '%s';
          args = args.concat([stack]);
        } // eslint-disable-next-line react-internal/safe-string-coercion

        var argsWithFormat = args.map(function (item) {
          return String(item);
        }); // Careful: RN currently depends on this prefix

        argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
        // breaks IE9: https://github.com/facebook/react/issues/13610
        // eslint-disable-next-line react-internal/no-production-logging

        Function.prototype.apply.call(console[level], console, argsWithFormat);
      }
    }

    // -----------------------------------------------------------------------------

    var enableScopeAPI = false; // Experimental Create Event Handle API.
    var enableCacheElement = false;
    var enableTransitionTracing = false; // No known bugs, but needs performance testing

    var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
    // stuff. Intended to enable React core members to more easily debug scheduling
    // issues in DEV builds.

    var enableDebugTracing = false; // Track which Fiber(s) schedule render work.

    var REACT_MODULE_REFERENCE;
    {
      REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
    }
    function isValidElementType(type) {
      if (typeof type === 'string' || typeof type === 'function') {
        return true;
      } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).

      if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
        return true;
      }
      if (typeof type === 'object' && type !== null) {
        if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE ||
        // This needs to include all possible module reference object
        // types supported by any Flight configuration anywhere since
        // we don't know which Flight build this will end up being used
        // with.
        type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
          return true;
        }
      }
      return false;
    }
    function getWrappedName(outerType, innerType, wrapperName) {
      var displayName = outerType.displayName;
      if (displayName) {
        return displayName;
      }
      var functionName = innerType.displayName || innerType.name || '';
      return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
    } // Keep in sync with react-reconciler/getComponentNameFromFiber

    function getContextName(type) {
      return type.displayName || 'Context';
    } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.

    function getComponentNameFromType(type) {
      if (type == null) {
        // Host root, text node or just invalid type.
        return null;
      }
      {
        if (typeof type.tag === 'number') {
          error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
        }
      }
      if (typeof type === 'function') {
        return type.displayName || type.name || null;
      }
      if (typeof type === 'string') {
        return type;
      }
      switch (type) {
        case REACT_FRAGMENT_TYPE:
          return 'Fragment';
        case REACT_PORTAL_TYPE:
          return 'Portal';
        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';
      }
      if (typeof type === 'object') {
        switch (type.$$typeof) {
          case REACT_CONTEXT_TYPE:
            var context = type;
            return getContextName(context) + '.Consumer';
          case REACT_PROVIDER_TYPE:
            var provider = type;
            return getContextName(provider._context) + '.Provider';
          case REACT_FORWARD_REF_TYPE:
            return getWrappedName(type, type.render, 'ForwardRef');
          case REACT_MEMO_TYPE:
            var outerName = type.displayName || null;
            if (outerName !== null) {
              return outerName;
            }
            return getComponentNameFromType(type.type) || 'Memo';
          case REACT_LAZY_TYPE:
            {
              var lazyComponent = type;
              var payload = lazyComponent._payload;
              var init = lazyComponent._init;
              try {
                return getComponentNameFromType(init(payload));
              } catch (x) {
                return null;
              }
            }

          // eslint-disable-next-line no-fallthrough
        }
      }

      return null;
    }
    var assign = Object.assign;

    // Helpers to patch console.logs to avoid logging during side-effect free
    // replaying on render function. This currently only patches the object
    // lazily which won't cover if the log function was extracted eagerly.
    // We could also eagerly patch the method.
    var disabledDepth = 0;
    var prevLog;
    var prevInfo;
    var prevWarn;
    var prevError;
    var prevGroup;
    var prevGroupCollapsed;
    var prevGroupEnd;
    function disabledLog() {}
    disabledLog.__reactDisabledLog = true;
    function disableLogs() {
      {
        if (disabledDepth === 0) {
          /* eslint-disable react-internal/no-production-logging */
          prevLog = console.log;
          prevInfo = console.info;
          prevWarn = console.warn;
          prevError = console.error;
          prevGroup = console.group;
          prevGroupCollapsed = console.groupCollapsed;
          prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099

          var props = {
            configurable: true,
            enumerable: true,
            value: disabledLog,
            writable: true
          }; // $FlowFixMe Flow thinks console is immutable.

          Object.defineProperties(console, {
            info: props,
            log: props,
            warn: props,
            error: props,
            group: props,
            groupCollapsed: props,
            groupEnd: props
          });
          /* eslint-enable react-internal/no-production-logging */
        }

        disabledDepth++;
      }
    }
    function reenableLogs() {
      {
        disabledDepth--;
        if (disabledDepth === 0) {
          /* eslint-disable react-internal/no-production-logging */
          var props = {
            configurable: true,
            enumerable: true,
            writable: true
          }; // $FlowFixMe Flow thinks console is immutable.

          Object.defineProperties(console, {
            log: assign({}, props, {
              value: prevLog
            }),
            info: assign({}, props, {
              value: prevInfo
            }),
            warn: assign({}, props, {
              value: prevWarn
            }),
            error: assign({}, props, {
              value: prevError
            }),
            group: assign({}, props, {
              value: prevGroup
            }),
            groupCollapsed: assign({}, props, {
              value: prevGroupCollapsed
            }),
            groupEnd: assign({}, props, {
              value: prevGroupEnd
            })
          });
          /* eslint-enable react-internal/no-production-logging */
        }

        if (disabledDepth < 0) {
          error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
        }
      }
    }
    var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
    var prefix;
    function describeBuiltInComponentFrame(name, source, ownerFn) {
      {
        if (prefix === undefined) {
          // Extract the VM specific prefix used by each line.
          try {
            throw Error();
          } catch (x) {
            var match = x.stack.trim().match(/\n( *(at )?)/);
            prefix = match && match[1] || '';
          }
        } // We use the prefix to ensure our stacks line up with native stack frames.

        return '\n' + prefix + name;
      }
    }
    var reentry = false;
    var componentFrameCache;
    {
      var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
      componentFrameCache = new PossiblyWeakMap();
    }
    function describeNativeComponentFrame(fn, construct) {
      // If something asked for a stack inside a fake render, it should get ignored.
      if (!fn || reentry) {
        return '';
      }
      {
        var frame = componentFrameCache.get(fn);
        if (frame !== undefined) {
          return frame;
        }
      }
      var control;
      reentry = true;
      var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.

      Error.prepareStackTrace = undefined;
      var previousDispatcher;
      {
        previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
        // for warnings.

        ReactCurrentDispatcher.current = null;
        disableLogs();
      }
      try {
        // This should throw.
        if (construct) {
          // Something should be setting the props in the constructor.
          var Fake = function () {
            throw Error();
          }; // $FlowFixMe

          Object.defineProperty(Fake.prototype, 'props', {
            set: function () {
              // We use a throwing setter instead of frozen or non-writable props
              // because that won't throw in a non-strict mode function.
              throw Error();
            }
          });
          if (typeof Reflect === 'object' && Reflect.construct) {
            // We construct a different control for this case to include any extra
            // frames added by the construct call.
            try {
              Reflect.construct(Fake, []);
            } catch (x) {
              control = x;
            }
            Reflect.construct(fn, [], Fake);
          } else {
            try {
              Fake.call();
            } catch (x) {
              control = x;
            }
            fn.call(Fake.prototype);
          }
        } else {
          try {
            throw Error();
          } catch (x) {
            control = x;
          }
          fn();
        }
      } catch (sample) {
        // This is inlined manually because closure doesn't do it for us.
        if (sample && control && typeof sample.stack === 'string') {
          // This extracts the first frame from the sample that isn't also in the control.
          // Skipping one frame that we assume is the frame that calls the two.
          var sampleLines = sample.stack.split('\n');
          var controlLines = control.stack.split('\n');
          var s = sampleLines.length - 1;
          var c = controlLines.length - 1;
          while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
            // We expect at least one stack frame to be shared.
            // Typically this will be the root most one. However, stack frames may be
            // cut off due to maximum stack limits. In this case, one maybe cut off
            // earlier than the other. We assume that the sample is longer or the same
            // and there for cut off earlier. So we should find the root most frame in
            // the sample somewhere in the control.
            c--;
          }
          for (; s >= 1 && c >= 0; s--, c--) {
            // Next we find the first one that isn't the same which should be the
            // frame that called our sample function and the control.
            if (sampleLines[s] !== controlLines[c]) {
              // In V8, the first line is describing the message but other VMs don't.
              // If we're about to return the first line, and the control is also on the same
              // line, that's a pretty good indicator that our sample threw at same line as
              // the control. I.e. before we entered the sample frame. So we ignore this result.
              // This can happen if you passed a class to function component, or non-function.
              if (s !== 1 || c !== 1) {
                do {
                  s--;
                  c--; // We may still have similar intermediate frames from the construct call.
                  // The next one that isn't the same should be our match though.

                  if (c < 0 || sampleLines[s] !== controlLines[c]) {
                    // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
                    var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
                    // but we have a user-provided "displayName"
                    // splice it in to make the stack more readable.

                    if (fn.displayName && _frame.includes('<anonymous>')) {
                      _frame = _frame.replace('<anonymous>', fn.displayName);
                    }
                    {
                      if (typeof fn === 'function') {
                        componentFrameCache.set(fn, _frame);
                      }
                    } // Return the line we found.

                    return _frame;
                  }
                } while (s >= 1 && c >= 0);
              }
              break;
            }
          }
        }
      } finally {
        reentry = false;
        {
          ReactCurrentDispatcher.current = previousDispatcher;
          reenableLogs();
        }
        Error.prepareStackTrace = previousPrepareStackTrace;
      } // Fallback to just using the name if we couldn't make it throw.

      var name = fn ? fn.displayName || fn.name : '';
      var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
      {
        if (typeof fn === 'function') {
          componentFrameCache.set(fn, syntheticFrame);
        }
      }
      return syntheticFrame;
    }
    function describeFunctionComponentFrame(fn, source, ownerFn) {
      {
        return describeNativeComponentFrame(fn, false);
      }
    }
    function shouldConstruct(Component) {
      var prototype = Component.prototype;
      return !!(prototype && prototype.isReactComponent);
    }
    function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
      if (type == null) {
        return '';
      }
      if (typeof type === 'function') {
        {
          return describeNativeComponentFrame(type, shouldConstruct(type));
        }
      }
      if (typeof type === 'string') {
        return describeBuiltInComponentFrame(type);
      }
      switch (type) {
        case REACT_SUSPENSE_TYPE:
          return describeBuiltInComponentFrame('Suspense');
        case REACT_SUSPENSE_LIST_TYPE:
          return describeBuiltInComponentFrame('SuspenseList');
      }
      if (typeof type === 'object') {
        switch (type.$$typeof) {
          case REACT_FORWARD_REF_TYPE:
            return describeFunctionComponentFrame(type.render);
          case REACT_MEMO_TYPE:
            // Memo may contain any component type so we recursively resolve it.
            return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
          case REACT_LAZY_TYPE:
            {
              var lazyComponent = type;
              var payload = lazyComponent._payload;
              var init = lazyComponent._init;
              try {
                // Lazy may contain any component type so we recursively resolve it.
                return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
              } catch (x) {}
            }
        }
      }
      return '';
    }
    var hasOwnProperty = Object.prototype.hasOwnProperty;
    var loggedTypeFailures = {};
    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
    function setCurrentlyValidatingElement(element) {
      {
        if (element) {
          var owner = element._owner;
          var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
          ReactDebugCurrentFrame.setExtraStackFrame(stack);
        } else {
          ReactDebugCurrentFrame.setExtraStackFrame(null);
        }
      }
    }
    function checkPropTypes(typeSpecs, values, location, componentName, element) {
      {
        // $FlowFixMe This is okay but Flow doesn't know it.
        var has = Function.call.bind(hasOwnProperty);
        for (var typeSpecName in typeSpecs) {
          if (has(typeSpecs, typeSpecName)) {
            var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
            // fail the render phase where it didn't fail before. So we log it.
            // After these have been cleaned up, we'll let them throw.

            try {
              // This is intentionally an invariant that gets caught. It's the same
              // behavior as without this statement except with a better message.
              if (typeof typeSpecs[typeSpecName] !== 'function') {
                // eslint-disable-next-line react-internal/prod-error-codes
                var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
                err.name = 'Invariant Violation';
                throw err;
              }
              error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
            } catch (ex) {
              error$1 = ex;
            }
            if (error$1 && !(error$1 instanceof Error)) {
              setCurrentlyValidatingElement(element);
              error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
              setCurrentlyValidatingElement(null);
            }
            if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
              // Only monitor this failure once because there tends to be a lot of the
              // same error.
              loggedTypeFailures[error$1.message] = true;
              setCurrentlyValidatingElement(element);
              error('Failed %s type: %s', location, error$1.message);
              setCurrentlyValidatingElement(null);
            }
          }
        }
      }
    }
    var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare

    function isArray(a) {
      return isArrayImpl(a);
    }

    /*
     * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
     * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
     *
     * The functions in this module will throw an easier-to-understand,
     * easier-to-debug exception with a clear errors message message explaining the
     * problem. (Instead of a confusing exception thrown inside the implementation
     * of the `value` object).
     */
    // $FlowFixMe only called in DEV, so void return is not possible.
    function typeName(value) {
      {
        // toStringTag is needed for namespaced types like Temporal.Instant
        var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
        var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
        return type;
      }
    } // $FlowFixMe only called in DEV, so void return is not possible.

    function willCoercionThrow(value) {
      {
        try {
          testStringCoercion(value);
          return false;
        } catch (e) {
          return true;
        }
      }
    }
    function testStringCoercion(value) {
      // If you ended up here by following an exception call stack, here's what's
      // happened: you supplied an object or symbol value to React (as a prop, key,
      // DOM attribute, CSS property, string ref, etc.) and when React tried to
      // coerce it to a string using `'' + value`, an exception was thrown.
      //
      // The most common types that will cause this exception are `Symbol` instances
      // and Temporal objects like `Temporal.Instant`. But any object that has a
      // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
      // exception. (Library authors do this to prevent users from using built-in
      // numeric operators like `+` or comparison operators like `>=` because custom
      // methods are needed to perform accurate arithmetic or comparison.)
      //
      // To fix the problem, coerce this object or symbol value to a string before
      // passing it to React. The most reliable way is usually `String(value)`.
      //
      // To find which value is throwing, check the browser or debugger console.
      // Before this exception was thrown, there should be `console.error` output
      // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
      // problem and how that type was used: key, atrribute, input value prop, etc.
      // In most cases, this console output also shows the component and its
      // ancestor components where the exception happened.
      //
      // eslint-disable-next-line react-internal/safe-string-coercion
      return '' + value;
    }
    function checkKeyStringCoercion(value) {
      {
        if (willCoercionThrow(value)) {
          error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
          return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
        }
      }
    }

    var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
    var RESERVED_PROPS = {
      key: true,
      ref: true,
      __self: true,
      __source: true
    };
    var specialPropKeyWarningShown;
    var specialPropRefWarningShown;
    var didWarnAboutStringRefs;
    {
      didWarnAboutStringRefs = {};
    }
    function hasValidRef(config) {
      {
        if (hasOwnProperty.call(config, 'ref')) {
          var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
          if (getter && getter.isReactWarning) {
            return false;
          }
        }
      }
      return config.ref !== undefined;
    }
    function hasValidKey(config) {
      {
        if (hasOwnProperty.call(config, 'key')) {
          var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
          if (getter && getter.isReactWarning) {
            return false;
          }
        }
      }
      return config.key !== undefined;
    }
    function warnIfStringRefCannotBeAutoConverted(config, self) {
      {
        if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
          var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
          if (!didWarnAboutStringRefs[componentName]) {
            error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
            didWarnAboutStringRefs[componentName] = true;
          }
        }
      }
    }
    function defineKeyPropWarningGetter(props, displayName) {
      {
        var warnAboutAccessingKey = function () {
          if (!specialPropKeyWarningShown) {
            specialPropKeyWarningShown = true;
            error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
          }
        };
        warnAboutAccessingKey.isReactWarning = true;
        Object.defineProperty(props, 'key', {
          get: warnAboutAccessingKey,
          configurable: true
        });
      }
    }
    function defineRefPropWarningGetter(props, displayName) {
      {
        var warnAboutAccessingRef = function () {
          if (!specialPropRefWarningShown) {
            specialPropRefWarningShown = true;
            error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
          }
        };
        warnAboutAccessingRef.isReactWarning = true;
        Object.defineProperty(props, 'ref', {
          get: warnAboutAccessingRef,
          configurable: true
        });
      }
    }
    /**
     * Factory method to create a new React element. This no longer adheres to
     * the class pattern, so do not use new to call it. Also, instanceof check
     * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
     * if something is a React Element.
     *
     * @param {*} type
     * @param {*} props
     * @param {*} key
     * @param {string|object} ref
     * @param {*} owner
     * @param {*} self A *temporary* helper to detect places where `this` is
     * different from the `owner` when React.createElement is called, so that we
     * can warn. We want to get rid of owner and replace string `ref`s with arrow
     * functions, and as long as `this` and owner are the same, there will be no
     * change in behavior.
     * @param {*} source An annotation object (added by a transpiler or otherwise)
     * indicating filename, line number, and/or other information.
     * @internal
     */

    var ReactElement = function (type, key, ref, self, source, owner, props) {
      var element = {
        // This tag allows us to uniquely identify this as a React Element
        $$typeof: REACT_ELEMENT_TYPE,
        // Built-in properties that belong on the element
        type: type,
        key: key,
        ref: ref,
        props: props,
        // Record the component responsible for creating this element.
        _owner: owner
      };
      {
        // The validation flag is currently mutative. We put it on
        // an external backing store so that we can freeze the whole object.
        // This can be replaced with a WeakMap once they are implemented in
        // commonly used development environments.
        element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
        // the validation flag non-enumerable (where possible, which should
        // include every environment we run tests in), so the test framework
        // ignores it.

        Object.defineProperty(element._store, 'validated', {
          configurable: false,
          enumerable: false,
          writable: true,
          value: false
        }); // self and source are DEV only properties.

        Object.defineProperty(element, '_self', {
          configurable: false,
          enumerable: false,
          writable: false,
          value: self
        }); // Two elements created in two different places should be considered
        // equal for testing purposes and therefore we hide it from enumeration.

        Object.defineProperty(element, '_source', {
          configurable: false,
          enumerable: false,
          writable: false,
          value: source
        });
        if (Object.freeze) {
          Object.freeze(element.props);
          Object.freeze(element);
        }
      }
      return element;
    };
    /**
     * https://github.com/reactjs/rfcs/pull/107
     * @param {*} type
     * @param {object} props
     * @param {string} key
     */

    function jsxDEV(type, config, maybeKey, source, self) {
      {
        var propName; // Reserved names are extracted

        var props = {};
        var key = null;
        var ref = null; // Currently, key can be spread in as a prop. This causes a potential
        // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
        // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
        // but as an intermediary step, we will use jsxDEV for everything except
        // <div {...props} key="Hi" />, because we aren't currently able to tell if
        // key is explicitly declared to be undefined or not.

        if (maybeKey !== undefined) {
          {
            checkKeyStringCoercion(maybeKey);
          }
          key = '' + maybeKey;
        }
        if (hasValidKey(config)) {
          {
            checkKeyStringCoercion(config.key);
          }
          key = '' + config.key;
        }
        if (hasValidRef(config)) {
          ref = config.ref;
          warnIfStringRefCannotBeAutoConverted(config, self);
        } // Remaining properties are added to a new props object

        for (propName in config) {
          if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
            props[propName] = config[propName];
          }
        } // Resolve default props

        if (type && type.defaultProps) {
          var defaultProps = type.defaultProps;
          for (propName in defaultProps) {
            if (props[propName] === undefined) {
              props[propName] = defaultProps[propName];
            }
          }
        }
        if (key || ref) {
          var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
          if (key) {
            defineKeyPropWarningGetter(props, displayName);
          }
          if (ref) {
            defineRefPropWarningGetter(props, displayName);
          }
        }
        return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
      }
    }
    var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
    var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
    function setCurrentlyValidatingElement$1(element) {
      {
        if (element) {
          var owner = element._owner;
          var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
          ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
        } else {
          ReactDebugCurrentFrame$1.setExtraStackFrame(null);
        }
      }
    }
    var propTypesMisspellWarningShown;
    {
      propTypesMisspellWarningShown = false;
    }
    /**
     * Verifies the object is a ReactElement.
     * See https://reactjs.org/docs/react-api.html#isvalidelement
     * @param {?object} object
     * @return {boolean} True if `object` is a ReactElement.
     * @final
     */

    function isValidElement(object) {
      {
        return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
      }
    }
    function getDeclarationErrorAddendum() {
      {
        if (ReactCurrentOwner$1.current) {
          var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
          if (name) {
            return '\n\nCheck the render method of `' + name + '`.';
          }
        }
        return '';
      }
    }
    function getSourceInfoErrorAddendum(source) {
      {
        if (source !== undefined) {
          var fileName = source.fileName.replace(/^.*[\\\/]/, '');
          var lineNumber = source.lineNumber;
          return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
        }
        return '';
      }
    }
    /**
     * Warn if there's no key explicitly set on dynamic arrays of children or
     * object keys are not valid. This allows us to keep track of children between
     * updates.
     */

    var ownerHasKeyUseWarning = {};
    function getCurrentComponentErrorInfo(parentType) {
      {
        var info = getDeclarationErrorAddendum();
        if (!info) {
          var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
          if (parentName) {
            info = "\n\nCheck the top-level render call using <" + parentName + ">.";
          }
        }
        return info;
      }
    }
    /**
     * Warn if the element doesn't have an explicit key assigned to it.
     * This element is in an array. The array could grow and shrink or be
     * reordered. All children that haven't already been validated are required to
     * have a "key" property assigned to it. Error statuses are cached so a warning
     * will only be shown once.
     *
     * @internal
     * @param {ReactElement} element Element that requires a key.
     * @param {*} parentType element's parent's type.
     */

    function validateExplicitKey(element, parentType) {
      {
        if (!element._store || element._store.validated || element.key != null) {
          return;
        }
        element._store.validated = true;
        var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
        if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
          return;
        }
        ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
        // property, it may be the creator of the child that's responsible for
        // assigning it a key.

        var childOwner = '';
        if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
          // Give the component that originally created this child.
          childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
        }
        setCurrentlyValidatingElement$1(element);
        error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
        setCurrentlyValidatingElement$1(null);
      }
    }
    /**
     * Ensure that every element either is passed in a static location, in an
     * array with an explicit keys property defined, or in an object literal
     * with valid key property.
     *
     * @internal
     * @param {ReactNode} node Statically passed child of any type.
     * @param {*} parentType node's parent's type.
     */

    function validateChildKeys(node, parentType) {
      {
        if (typeof node !== 'object') {
          return;
        }
        if (isArray(node)) {
          for (var i = 0; i < node.length; i++) {
            var child = node[i];
            if (isValidElement(child)) {
              validateExplicitKey(child, parentType);
            }
          }
        } else if (isValidElement(node)) {
          // This element was passed in a valid location.
          if (node._store) {
            node._store.validated = true;
          }
        } else if (node) {
          var iteratorFn = getIteratorFn(node);
          if (typeof iteratorFn === 'function') {
            // Entry iterators used to provide implicit keys,
            // but now we print a separate warning for them later.
            if (iteratorFn !== node.entries) {
              var iterator = iteratorFn.call(node);
              var step;
              while (!(step = iterator.next()).done) {
                if (isValidElement(step.value)) {
                  validateExplicitKey(step.value, parentType);
                }
              }
            }
          }
        }
      }
    }
    /**
     * Given an element, validate that its props follow the propTypes definition,
     * provided by the type.
     *
     * @param {ReactElement} element
     */

    function validatePropTypes(element) {
      {
        var type = element.type;
        if (type === null || type === undefined || typeof type === 'string') {
          return;
        }
        var propTypes;
        if (typeof type === 'function') {
          propTypes = type.propTypes;
        } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE ||
        // Note: Memo only checks outer props here.
        // Inner props are checked in the reconciler.
        type.$$typeof === REACT_MEMO_TYPE)) {
          propTypes = type.propTypes;
        } else {
          return;
        }
        if (propTypes) {
          // Intentionally inside to avoid triggering lazy initializers:
          var name = getComponentNameFromType(type);
          checkPropTypes(propTypes, element.props, 'prop', name, element);
        } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
          propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:

          var _name = getComponentNameFromType(type);
          error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
        }
        if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
          error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
        }
      }
    }
    /**
     * Given a fragment, validate that it can only be provided with fragment props
     * @param {ReactElement} fragment
     */

    function validateFragmentProps(fragment) {
      {
        var keys = Object.keys(fragment.props);
        for (var i = 0; i < keys.length; i++) {
          var key = keys[i];
          if (key !== 'children' && key !== 'key') {
            setCurrentlyValidatingElement$1(fragment);
            error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
            setCurrentlyValidatingElement$1(null);
            break;
          }
        }
        if (fragment.ref !== null) {
          setCurrentlyValidatingElement$1(fragment);
          error('Invalid attribute `ref` supplied to `React.Fragment`.');
          setCurrentlyValidatingElement$1(null);
        }
      }
    }
    function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
      {
        var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
        // succeed and there will likely be errors in render.

        if (!validType) {
          var info = '';
          if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
            info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
          }
          var sourceInfo = getSourceInfoErrorAddendum(source);
          if (sourceInfo) {
            info += sourceInfo;
          } else {
            info += getDeclarationErrorAddendum();
          }
          var typeString;
          if (type === null) {
            typeString = 'null';
          } else if (isArray(type)) {
            typeString = 'array';
          } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
            typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
            info = ' Did you accidentally export a JSX literal instead of a component?';
          } else {
            typeString = typeof type;
          }
          error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
        }
        var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
        // TODO: Drop this when these are no longer allowed as the type argument.

        if (element == null) {
          return element;
        } // Skip key warning if the type isn't valid since our key validation logic
        // doesn't expect a non-string/function type and can throw confusing errors.
        // We don't want exception behavior to differ between dev and prod.
        // (Rendering will throw with a helpful message and as soon as the type is
        // fixed, the key warnings will appear.)

        if (validType) {
          var children = props.children;
          if (children !== undefined) {
            if (isStaticChildren) {
              if (isArray(children)) {
                for (var i = 0; i < children.length; i++) {
                  validateChildKeys(children[i], type);
                }
                if (Object.freeze) {
                  Object.freeze(children);
                }
              } else {
                error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
              }
            } else {
              validateChildKeys(children, type);
            }
          }
        }
        if (type === REACT_FRAGMENT_TYPE) {
          validateFragmentProps(element);
        } else {
          validatePropTypes(element);
        }
        return element;
      }
    } // These two functions exist to still get child warnings in dev
    // even with the prod transform. This means that jsxDEV is purely
    // opt-in behavior for better messages but that we won't stop
    // giving you warnings if you use production apis.

    function jsxWithValidationStatic(type, props, key) {
      {
        return jsxWithValidation(type, props, key, true);
      }
    }
    function jsxWithValidationDynamic(type, props, key) {
      {
        return jsxWithValidation(type, props, key, false);
      }
    }
    var jsx = jsxWithValidationDynamic; // we may want to special case jsxs internally to take advantage of static children.
    // for now we can ship identical prod functions

    var jsxs = jsxWithValidationStatic;
    exports.Fragment = REACT_FRAGMENT_TYPE;
    exports.jsx = jsx;
    exports.jsxs = jsxs;
  })();
}

/***/ }),

/***/ "../../../node_modules/react/jsx-runtime.js":
/*!**************************************************!*\
  !*** ../../../node_modules/react/jsx-runtime.js ***!
  \**************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



if (false) {} else {
  module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "../../../node_modules/react/cjs/react-jsx-runtime.development.js");
}

/***/ }),

/***/ "../../../node_modules/set-value/index.js":
/*!************************************************!*\
  !*** ../../../node_modules/set-value/index.js ***!
  \************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

/*!
 * set-value <https://github.com/jonschlinkert/set-value>
 *
 * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
 * Released under the MIT License.
 */



const {
  deleteProperty
} = Reflect;
const isPrimitive = __webpack_require__(/*! is-primitive */ "../../../node_modules/is-primitive/index.js");
const isPlainObject = __webpack_require__(/*! is-plain-object */ "../../../node_modules/is-plain-object/index.js");
const isObject = value => {
  return typeof value === 'object' && value !== null || typeof value === 'function';
};
const isUnsafeKey = key => {
  return key === '__proto__' || key === 'constructor' || key === 'prototype';
};
const validateKey = key => {
  if (!isPrimitive(key)) {
    throw new TypeError('Object keys must be strings or symbols');
  }
  if (isUnsafeKey(key)) {
    throw new Error(`Cannot set unsafe key: "${key}"`);
  }
};
const toStringKey = input => {
  return Array.isArray(input) ? input.flat().map(String).join(',') : input;
};
const createMemoKey = (input, options) => {
  if (typeof input !== 'string' || !options) return input;
  let key = input + ';';
  if (options.arrays !== undefined) key += `arrays=${options.arrays};`;
  if (options.separator !== undefined) key += `separator=${options.separator};`;
  if (options.split !== undefined) key += `split=${options.split};`;
  if (options.merge !== undefined) key += `merge=${options.merge};`;
  if (options.preservePaths !== undefined) key += `preservePaths=${options.preservePaths};`;
  return key;
};
const memoize = (input, options, fn) => {
  const key = toStringKey(options ? createMemoKey(input, options) : input);
  validateKey(key);
  const value = setValue.cache.get(key) || fn();
  setValue.cache.set(key, value);
  return value;
};
const splitString = function (input) {
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  const sep = options.separator || '.';
  const preserve = sep === '/' ? false : options.preservePaths;
  if (typeof input === 'string' && preserve !== false && /\//.test(input)) {
    return [input];
  }
  const parts = [];
  let part = '';
  const push = part => {
    let number;
    if (part.trim() !== '' && Number.isInteger(number = Number(part))) {
      parts.push(number);
    } else {
      parts.push(part);
    }
  };
  for (let i = 0; i < input.length; i++) {
    const value = input[i];
    if (value === '\\') {
      part += input[++i];
      continue;
    }
    if (value === sep) {
      push(part);
      part = '';
      continue;
    }
    part += value;
  }
  if (part) {
    push(part);
  }
  return parts;
};
const split = (input, options) => {
  if (options && typeof options.split === 'function') return options.split(input);
  if (typeof input === 'symbol') return [input];
  if (Array.isArray(input)) return input;
  return memoize(input, options, () => splitString(input, options));
};
const assignProp = (obj, prop, value, options) => {
  validateKey(prop);

  // Delete property when "value" is undefined
  if (value === undefined) {
    deleteProperty(obj, prop);
  } else if (options && options.merge) {
    const merge = options.merge === 'function' ? options.merge : Object.assign;

    // Only merge plain objects
    if (merge && isPlainObject(obj[prop]) && isPlainObject(value)) {
      obj[prop] = merge(obj[prop], value);
    } else {
      obj[prop] = value;
    }
  } else {
    obj[prop] = value;
  }
  return obj;
};
const setValue = (target, path, value, options) => {
  if (!path || !isObject(target)) return target;
  const keys = split(path, options);
  let obj = target;
  for (let i = 0; i < keys.length; i++) {
    const key = keys[i];
    const next = keys[i + 1];
    validateKey(key);
    if (next === undefined) {
      assignProp(obj, key, value, options);
      break;
    }
    if (typeof next === 'number' && !Array.isArray(obj[key])) {
      obj = obj[key] = [];
      continue;
    }
    if (!isObject(obj[key])) {
      obj[key] = {};
    }
    obj = obj[key];
  }
  return target;
};
setValue.split = split;
setValue.cache = new Map();
setValue.clear = () => {
  setValue.cache = new Map();
};
module.exports = setValue;

/***/ }),

/***/ "../../../node_modules/style-value-types/dist/valueTypes.cjs.js":
/*!**********************************************************************!*\
  !*** ../../../node_modules/style-value-types/dist/valueTypes.cjs.js ***!
  \**********************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
const clamp = (min, max) => v => Math.max(Math.min(v, max), min);
const sanitize = v => v % 1 ? Number(v.toFixed(5)) : v;
const floatRegex = /(-)?([\d]*\.?[\d])+/g;
const colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi;
const singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;
function isString(v) {
  return typeof v === 'string';
}
const number = {
  test: v => typeof v === 'number',
  parse: parseFloat,
  transform: v => v
};
const alpha = Object.assign(Object.assign({}, number), {
  transform: clamp(0, 1)
});
const scale = Object.assign(Object.assign({}, number), {
  default: 1
});
const createUnitType = unit => ({
  test: v => isString(v) && v.endsWith(unit) && v.split(' ').length === 1,
  parse: parseFloat,
  transform: v => `${v}${unit}`
});
const degrees = createUnitType('deg');
const percent = createUnitType('%');
const px = createUnitType('px');
const vh = createUnitType('vh');
const vw = createUnitType('vw');
const progressPercentage = Object.assign(Object.assign({}, percent), {
  parse: v => percent.parse(v) / 100,
  transform: v => percent.transform(v * 100)
});
const isColorString = (type, testProp) => v => {
  return Boolean(isString(v) && singleColorRegex.test(v) && v.startsWith(type) || testProp && Object.prototype.hasOwnProperty.call(v, testProp));
};
const splitColor = (aName, bName, cName) => v => {
  if (!isString(v)) return v;
  const [a, b, c, alpha] = v.match(floatRegex);
  return {
    [aName]: parseFloat(a),
    [bName]: parseFloat(b),
    [cName]: parseFloat(c),
    alpha: alpha !== undefined ? parseFloat(alpha) : 1
  };
};
const hsla = {
  test: isColorString('hsl', 'hue'),
  parse: splitColor('hue', 'saturation', 'lightness'),
  transform: _ref => {
    let {
      hue,
      saturation,
      lightness,
      alpha: alpha$1 = 1
    } = _ref;
    return 'hsla(' + Math.round(hue) + ', ' + percent.transform(sanitize(saturation)) + ', ' + percent.transform(sanitize(lightness)) + ', ' + sanitize(alpha.transform(alpha$1)) + ')';
  }
};
const clampRgbUnit = clamp(0, 255);
const rgbUnit = Object.assign(Object.assign({}, number), {
  transform: v => Math.round(clampRgbUnit(v))
});
const rgba = {
  test: isColorString('rgb', 'red'),
  parse: splitColor('red', 'green', 'blue'),
  transform: _ref2 => {
    let {
      red,
      green,
      blue,
      alpha: alpha$1 = 1
    } = _ref2;
    return 'rgba(' + rgbUnit.transform(red) + ', ' + rgbUnit.transform(green) + ', ' + rgbUnit.transform(blue) + ', ' + sanitize(alpha.transform(alpha$1)) + ')';
  }
};
function parseHex(v) {
  let r = '';
  let g = '';
  let b = '';
  let a = '';
  if (v.length > 5) {
    r = v.substr(1, 2);
    g = v.substr(3, 2);
    b = v.substr(5, 2);
    a = v.substr(7, 2);
  } else {
    r = v.substr(1, 1);
    g = v.substr(2, 1);
    b = v.substr(3, 1);
    a = v.substr(4, 1);
    r += r;
    g += g;
    b += b;
    a += a;
  }
  return {
    red: parseInt(r, 16),
    green: parseInt(g, 16),
    blue: parseInt(b, 16),
    alpha: a ? parseInt(a, 16) / 255 : 1
  };
}
const hex = {
  test: isColorString('#'),
  parse: parseHex,
  transform: rgba.transform
};
const color = {
  test: v => rgba.test(v) || hex.test(v) || hsla.test(v),
  parse: v => {
    if (rgba.test(v)) {
      return rgba.parse(v);
    } else if (hsla.test(v)) {
      return hsla.parse(v);
    } else {
      return hex.parse(v);
    }
  },
  transform: v => {
    return isString(v) ? v : v.hasOwnProperty('red') ? rgba.transform(v) : hsla.transform(v);
  }
};
const colorToken = '${c}';
const numberToken = '${n}';
function test(v) {
  var _a, _b, _c, _d;
  return isNaN(v) && isString(v) && ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0;
}
function analyse(v) {
  if (typeof v === 'number') v = `${v}`;
  const values = [];
  let numColors = 0;
  const colors = v.match(colorRegex);
  if (colors) {
    numColors = colors.length;
    v = v.replace(colorRegex, colorToken);
    values.push(...colors.map(color.parse));
  }
  const numbers = v.match(floatRegex);
  if (numbers) {
    v = v.replace(floatRegex, numberToken);
    values.push(...numbers.map(number.parse));
  }
  return {
    values,
    numColors,
    tokenised: v
  };
}
function parse(v) {
  return analyse(v).values;
}
function createTransformer(v) {
  const {
    values,
    numColors,
    tokenised
  } = analyse(v);
  const numValues = values.length;
  return v => {
    let output = tokenised;
    for (let i = 0; i < numValues; i++) {
      output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? color.transform(v[i]) : sanitize(v[i]));
    }
    return output;
  };
}
const convertNumbersToZero = v => typeof v === 'number' ? 0 : v;
function getAnimatableNone(v) {
  const parsed = parse(v);
  const transformer = createTransformer(v);
  return transformer(parsed.map(convertNumbersToZero));
}
const complex = {
  test,
  parse,
  createTransformer,
  getAnimatableNone
};
const maxDefaults = new Set(['brightness', 'contrast', 'saturate', 'opacity']);
function applyDefaultFilter(v) {
  let [name, value] = v.slice(0, -1).split('(');
  if (name === 'drop-shadow') return v;
  const [number] = value.match(floatRegex) || [];
  if (!number) return v;
  const unit = value.replace(number, '');
  let defaultValue = maxDefaults.has(name) ? 1 : 0;
  if (number !== value) defaultValue *= 100;
  return name + '(' + defaultValue + unit + ')';
}
const functionRegex = /([a-z-]*)\(.*?\)/g;
const filter = Object.assign(Object.assign({}, complex), {
  getAnimatableNone: v => {
    const functions = v.match(functionRegex);
    return functions ? functions.map(applyDefaultFilter).join(' ') : v;
  }
});
exports.alpha = alpha;
exports.color = color;
exports.complex = complex;
exports.degrees = degrees;
exports.filter = filter;
exports.hex = hex;
exports.hsla = hsla;
exports.number = number;
exports.percent = percent;
exports.progressPercentage = progressPercentage;
exports.px = px;
exports.rgbUnit = rgbUnit;
exports.rgba = rgba;
exports.scale = scale;
exports.vh = vh;
exports.vw = vw;

/***/ }),

/***/ "../../../node_modules/toggle-selection/index.js":
/*!*******************************************************!*\
  !*** ../../../node_modules/toggle-selection/index.js ***!
  \*******************************************************/
/***/ (function(module) {



module.exports = function () {
  var selection = document.getSelection();
  if (!selection.rangeCount) {
    return function () {};
  }
  var active = document.activeElement;
  var ranges = [];
  for (var i = 0; i < selection.rangeCount; i++) {
    ranges.push(selection.getRangeAt(i));
  }
  switch (active.tagName.toUpperCase()) {
    // .toUpperCase handles XHTML
    case 'INPUT':
    case 'TEXTAREA':
      active.blur();
      break;
    default:
      active = null;
      break;
  }
  selection.removeAllRanges();
  return function () {
    selection.type === 'Caret' && selection.removeAllRanges();
    if (!selection.rangeCount) {
      ranges.forEach(function (range) {
        selection.addRange(range);
      });
    }
    active && active.focus();
  };
};

/***/ }),

/***/ "../../../node_modules/tslib/tslib.es6.js":
/*!************************************************!*\
  !*** ../../../node_modules/tslib/tslib.es6.js ***!
  \************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.__assign = void 0;
exports.__asyncDelegator = __asyncDelegator;
exports.__asyncGenerator = __asyncGenerator;
exports.__asyncValues = __asyncValues;
exports.__await = __await;
exports.__awaiter = __awaiter;
exports.__classPrivateFieldGet = __classPrivateFieldGet;
exports.__classPrivateFieldIn = __classPrivateFieldIn;
exports.__classPrivateFieldSet = __classPrivateFieldSet;
exports.__createBinding = void 0;
exports.__decorate = __decorate;
exports.__exportStar = __exportStar;
exports.__extends = __extends;
exports.__generator = __generator;
exports.__importDefault = __importDefault;
exports.__importStar = __importStar;
exports.__makeTemplateObject = __makeTemplateObject;
exports.__metadata = __metadata;
exports.__param = __param;
exports.__read = __read;
exports.__rest = __rest;
exports.__spread = __spread;
exports.__spreadArray = __spreadArray;
exports.__spreadArrays = __spreadArrays;
exports.__values = __values;
/******************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */

var extendStatics = function (d, b) {
  extendStatics = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (d, b) {
    d.__proto__ = b;
  } || function (d, b) {
    for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
  };
  return extendStatics(d, b);
};
function __extends(d, b) {
  if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  extendStatics(d, b);
  function __() {
    this.constructor = d;
  }
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function () {
  exports.__assign = __assign = Object.assign || function __assign(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
      s = arguments[i];
      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
    }
    return t;
  };
  return __assign.apply(this, arguments);
};
exports.__assign = __assign;
function __rest(s, e) {
  var t = {};
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  }
  return t;
}
function __decorate(decorators, target, key, desc) {
  var c = arguments.length,
    r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
    d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
  return function (target, key) {
    decorator(target, key, paramIndex);
  };
}
function __metadata(metadataKey, metadataValue) {
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function (resolve) {
      resolve(value);
    });
  }
  return new (P || (P = Promise))(function (resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
}
function __generator(thisArg, body) {
  var _ = {
      label: 0,
      sent: function () {
        if (t[0] & 1) throw t[1];
        return t[1];
      },
      trys: [],
      ops: []
    },
    f,
    y,
    t,
    g;
  return g = {
    next: verb(0),
    "throw": verb(1),
    "return": verb(2)
  }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
    return this;
  }), g;
  function verb(n) {
    return function (v) {
      return step([n, v]);
    };
  }
  function step(op) {
    if (f) throw new TypeError("Generator is already executing.");
    while (_) try {
      if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
      if (y = 0, t) op = [op[0] & 2, t.value];
      switch (op[0]) {
        case 0:
        case 1:
          t = op;
          break;
        case 4:
          _.label++;
          return {
            value: op[1],
            done: false
          };
        case 5:
          _.label++;
          y = op[1];
          op = [0];
          continue;
        case 7:
          op = _.ops.pop();
          _.trys.pop();
          continue;
        default:
          if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
            _ = 0;
            continue;
          }
          if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
            _.label = op[1];
            break;
          }
          if (op[0] === 6 && _.label < t[1]) {
            _.label = t[1];
            t = op;
            break;
          }
          if (t && _.label < t[2]) {
            _.label = t[2];
            _.ops.push(op);
            break;
          }
          if (t[2]) _.ops.pop();
          _.trys.pop();
          continue;
      }
      op = body.call(thisArg, _);
    } catch (e) {
      op = [6, e];
      y = 0;
    } finally {
      f = t = 0;
    }
    if (op[0] & 5) throw op[1];
    return {
      value: op[0] ? op[1] : void 0,
      done: true
    };
  }
}
var __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];
};
exports.__createBinding = __createBinding;
function __exportStar(m, o) {
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
}
function __values(o) {
  var s = typeof Symbol === "function" && Symbol.iterator,
    m = s && o[s],
    i = 0;
  if (m) return m.call(o);
  if (o && typeof o.length === "number") return {
    next: function () {
      if (o && i >= o.length) o = void 0;
      return {
        value: o && o[i++],
        done: !o
      };
    }
  };
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
  var m = typeof Symbol === "function" && o[Symbol.iterator];
  if (!m) return o;
  var i = m.call(o),
    r,
    ar = [],
    e;
  try {
    while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
  } catch (error) {
    e = {
      error: error
    };
  } finally {
    try {
      if (r && !r.done && (m = i["return"])) m.call(i);
    } finally {
      if (e) throw e.error;
    }
  }
  return ar;
}

/** @deprecated */
function __spread() {
  for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
  return ar;
}

/** @deprecated */
function __spreadArrays() {
  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
  for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
  return r;
}
function __spreadArray(to, from, pack) {
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
    if (ar || !(i in from)) {
      if (!ar) ar = Array.prototype.slice.call(from, 0, i);
      ar[i] = from[i];
    }
  }
  return to.concat(ar || Array.prototype.slice.call(from));
}
function __await(v) {
  return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var g = generator.apply(thisArg, _arguments || []),
    i,
    q = [];
  return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
    return this;
  }, i;
  function verb(n) {
    if (g[n]) i[n] = function (v) {
      return new Promise(function (a, b) {
        q.push([n, v, a, b]) > 1 || resume(n, v);
      });
    };
  }
  function resume(n, v) {
    try {
      step(g[n](v));
    } catch (e) {
      settle(q[0][3], e);
    }
  }
  function step(r) {
    r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
  }
  function fulfill(value) {
    resume("next", value);
  }
  function reject(value) {
    resume("throw", value);
  }
  function settle(f, v) {
    if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
  }
}
function __asyncDelegator(o) {
  var i, p;
  return i = {}, verb("next"), verb("throw", function (e) {
    throw e;
  }), verb("return"), i[Symbol.iterator] = function () {
    return this;
  }, i;
  function verb(n, f) {
    i[n] = o[n] ? function (v) {
      return (p = !p) ? {
        value: __await(o[n](v)),
        done: n === "return"
      } : f ? f(v) : v;
    } : f;
  }
}
function __asyncValues(o) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var m = o[Symbol.asyncIterator],
    i;
  return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
    return this;
  }, i);
  function verb(n) {
    i[n] = o[n] && function (v) {
      return new Promise(function (resolve, reject) {
        v = o[n](v), settle(resolve, reject, v.done, v.value);
      });
    };
  }
  function settle(resolve, reject, d, v) {
    Promise.resolve(v).then(function (v) {
      resolve({
        value: v,
        done: d
      });
    }, reject);
  }
}
function __makeTemplateObject(cooked, raw) {
  if (Object.defineProperty) {
    Object.defineProperty(cooked, "raw", {
      value: raw
    });
  } else {
    cooked.raw = raw;
  }
  return cooked;
}
;
var __setModuleDefault = Object.create ? function (o, v) {
  Object.defineProperty(o, "default", {
    enumerable: true,
    value: v
  });
} : function (o, v) {
  o["default"] = v;
};
function __importStar(mod) {
  if (mod && mod.__esModule) return mod;
  var result = {};
  if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  __setModuleDefault(result, mod);
  return result;
}
function __importDefault(mod) {
  return mod && mod.__esModule ? mod : {
    default: mod
  };
}
function __classPrivateFieldGet(receiver, state, kind, f) {
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, state, value, kind, f) {
  if (kind === "m") throw new TypeError("Private method is not writable");
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
}
function __classPrivateFieldIn(state, receiver) {
  if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object");
  return typeof state === "function" ? receiver === state : state.has(receiver);
}

/***/ }),

/***/ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js":
/*!***********************************************************************!*\
  !*** ../../../node_modules/use-callback-ref/dist/es2015/assignRef.js ***!
  \***********************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.assignRef = assignRef;
/**
 * Assigns a value for a given ref, no matter of the ref format
 * @param {RefObject} ref - a callback function or ref object
 * @param value - a new value
 *
 * @see https://github.com/theKashey/use-callback-ref#assignref
 * @example
 * const refObject = useRef();
 * const refFn = (ref) => {....}
 *
 * assignRef(refObject, "refValue");
 * assignRef(refFn, "refValue");
 */
function assignRef(ref, value) {
  if (typeof ref === 'function') {
    ref(value);
  } else if (ref) {
    ref.current = value;
  }
  return ref;
}

/***/ }),

/***/ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js":
/*!***********************************************************************!*\
  !*** ../../../node_modules/use-callback-ref/dist/es2015/createRef.js ***!
  \***********************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.createCallbackRef = createCallbackRef;
/**
 * creates a Ref object with on change callback
 * @param callback
 * @returns {RefObject}
 *
 * @see {@link useCallbackRef}
 * @see https://reactjs.org/docs/refs-and-the-dom.html#creating-refs
 */
function createCallbackRef(callback) {
  var current = null;
  return {
    get current() {
      return current;
    },
    set current(value) {
      var last = current;
      if (last !== value) {
        current = value;
        callback(value, last);
      }
    }
  };
}

/***/ }),

/***/ "../../../node_modules/use-callback-ref/dist/es2015/index.js":
/*!*******************************************************************!*\
  !*** ../../../node_modules/use-callback-ref/dist/es2015/index.js ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "assignRef", ({
  enumerable: true,
  get: function () {
    return _assignRef.assignRef;
  }
}));
Object.defineProperty(exports, "createCallbackRef", ({
  enumerable: true,
  get: function () {
    return _createRef.createCallbackRef;
  }
}));
Object.defineProperty(exports, "mergeRefs", ({
  enumerable: true,
  get: function () {
    return _mergeRef.mergeRefs;
  }
}));
Object.defineProperty(exports, "refToCallback", ({
  enumerable: true,
  get: function () {
    return _refToCallback.refToCallback;
  }
}));
Object.defineProperty(exports, "transformRef", ({
  enumerable: true,
  get: function () {
    return _transformRef.transformRef;
  }
}));
Object.defineProperty(exports, "useCallbackRef", ({
  enumerable: true,
  get: function () {
    return _useRef.useCallbackRef;
  }
}));
Object.defineProperty(exports, "useMergeRefs", ({
  enumerable: true,
  get: function () {
    return _useMergeRef.useMergeRefs;
  }
}));
Object.defineProperty(exports, "useRefToCallback", ({
  enumerable: true,
  get: function () {
    return _refToCallback.useRefToCallback;
  }
}));
Object.defineProperty(exports, "useTransformRef", ({
  enumerable: true,
  get: function () {
    return _useTransformRef.useTransformRef;
  }
}));
var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js");
var _useRef = __webpack_require__(/*! ./useRef */ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js");
var _createRef = __webpack_require__(/*! ./createRef */ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js");
var _mergeRef = __webpack_require__(/*! ./mergeRef */ "../../../node_modules/use-callback-ref/dist/es2015/mergeRef.js");
var _useMergeRef = __webpack_require__(/*! ./useMergeRef */ "../../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js");
var _useTransformRef = __webpack_require__(/*! ./useTransformRef */ "../../../node_modules/use-callback-ref/dist/es2015/useTransformRef.js");
var _transformRef = __webpack_require__(/*! ./transformRef */ "../../../node_modules/use-callback-ref/dist/es2015/transformRef.js");
var _refToCallback = __webpack_require__(/*! ./refToCallback */ "../../../node_modules/use-callback-ref/dist/es2015/refToCallback.js");

/***/ }),

/***/ "../../../node_modules/use-callback-ref/dist/es2015/mergeRef.js":
/*!**********************************************************************!*\
  !*** ../../../node_modules/use-callback-ref/dist/es2015/mergeRef.js ***!
  \**********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.mergeRefs = mergeRefs;
var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js");
var _createRef = __webpack_require__(/*! ./createRef */ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js");
/**
 * Merges two or more refs together providing a single interface to set their value
 * @param {RefObject|Ref} refs
 * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
 *
 * @see {@link useMergeRefs} to be used in ReactComponents
 * @example
 * const Component = React.forwardRef((props, ref) => {
 *   const ownRef = useRef();
 *   const domRef = mergeRefs([ref, ownRef]); // 👈 merge together
 *   return <div ref={domRef}>...</div>
 * }
 */
function mergeRefs(refs) {
  return (0, _createRef.createCallbackRef)(function (newValue) {
    return refs.forEach(function (ref) {
      return (0, _assignRef.assignRef)(ref, newValue);
    });
  });
}

/***/ }),

/***/ "../../../node_modules/use-callback-ref/dist/es2015/refToCallback.js":
/*!***************************************************************************!*\
  !*** ../../../node_modules/use-callback-ref/dist/es2015/refToCallback.js ***!
  \***************************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.refToCallback = refToCallback;
exports.useRefToCallback = useRefToCallback;
/**
 * Unmemoized version of {@link useRefToCallback}
 * @see {@link useRefToCallback}
 * @param ref
 */
function refToCallback(ref) {
  return function (newValue) {
    if (typeof ref === 'function') {
      ref(newValue);
    } else if (ref) {
      ref.current = newValue;
    }
  };
}
var nullCallback = function () {
  return null;
};
// lets maintain a weak ref to, well, ref :)
// not using `kashe` to keep this package small
var weakMem = new WeakMap();
var weakMemoize = function (ref) {
  var usedRef = ref || nullCallback;
  var storedRef = weakMem.get(usedRef);
  if (storedRef) {
    return storedRef;
  }
  var cb = refToCallback(usedRef);
  weakMem.set(usedRef, cb);
  return cb;
};
/**
 * Transforms a given `ref` into `callback`.
 *
 * To transform `callback` into ref use {@link useCallbackRef|useCallbackRef(undefined, callback)}
 *
 * @param {ReactRef} ref
 * @returns {Function}
 *
 * @see https://github.com/theKashey/use-callback-ref#reftocallback
 *
 * @example
 * const ref = useRef(0);
 * const setRef = useRefToCallback(ref);
 * 👉 setRef(10);
 * ✅ ref.current === 10
 */
function useRefToCallback(ref) {
  return weakMemoize(ref);
}

/***/ }),

/***/ "../../../node_modules/use-callback-ref/dist/es2015/transformRef.js":
/*!**************************************************************************!*\
  !*** ../../../node_modules/use-callback-ref/dist/es2015/transformRef.js ***!
  \**************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.transformRef = transformRef;
var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js");
var _createRef = __webpack_require__(/*! ./createRef */ "../../../node_modules/use-callback-ref/dist/es2015/createRef.js");
/**
 * Transforms one ref to another
 * @example
 * ```tsx
 * const ResizableWithRef = forwardRef((props, ref) =>
 *   <Resizable {...props} ref={transformRef(ref, i => i ? i.resizable : null)}/>
 * );
 * ```
 */
function transformRef(ref, transformer) {
  return (0, _createRef.createCallbackRef)(function (value) {
    return (0, _assignRef.assignRef)(ref, transformer(value));
  });
}

/***/ }),

/***/ "../../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js":
/*!*************************************************************************!*\
  !*** ../../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js ***!
  \*************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.useMergeRefs = useMergeRefs;
var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js");
var _useRef = __webpack_require__(/*! ./useRef */ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js");
/**
 * Merges two or more refs together providing a single interface to set their value
 * @param {RefObject|Ref} refs
 * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
 *
 * @see {@link mergeRefs} a version without buit-in memoization
 * @see https://github.com/theKashey/use-callback-ref#usemergerefs
 * @example
 * const Component = React.forwardRef((props, ref) => {
 *   const ownRef = useRef();
 *   const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
 *   return <div ref={domRef}>...</div>
 * }
 */
function useMergeRefs(refs, defaultValue) {
  return (0, _useRef.useCallbackRef)(defaultValue || null, function (newValue) {
    return refs.forEach(function (ref) {
      return (0, _assignRef.assignRef)(ref, newValue);
    });
  });
}

/***/ }),

/***/ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js":
/*!********************************************************************!*\
  !*** ../../../node_modules/use-callback-ref/dist/es2015/useRef.js ***!
  \********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.useCallbackRef = useCallbackRef;
var _react = __webpack_require__(/*! react */ "react");
/**
 * creates a MutableRef with ref change callback
 * @param initialValue - initial ref value
 * @param {Function} callback - a callback to run when value changes
 *
 * @example
 * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
 * ref.current = 1;
 * // prints 0 -> 1
 *
 * @see https://reactjs.org/docs/hooks-reference.html#useref
 * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
 * @returns {MutableRefObject}
 */
function useCallbackRef(initialValue, callback) {
  var ref = (0, _react.useState)(function () {
    return {
      // value
      value: initialValue,
      // last callback
      callback: callback,
      // "memoized" public interface
      facade: {
        get current() {
          return ref.value;
        },
        set current(value) {
          var last = ref.value;
          if (last !== value) {
            ref.value = value;
            ref.callback(value, last);
          }
        }
      }
    };
  })[0];
  // update callback
  ref.callback = callback;
  return ref.facade;
}

/***/ }),

/***/ "../../../node_modules/use-callback-ref/dist/es2015/useTransformRef.js":
/*!*****************************************************************************!*\
  !*** ../../../node_modules/use-callback-ref/dist/es2015/useTransformRef.js ***!
  \*****************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.useTransformRef = useTransformRef;
var _assignRef = __webpack_require__(/*! ./assignRef */ "../../../node_modules/use-callback-ref/dist/es2015/assignRef.js");
var _useRef = __webpack_require__(/*! ./useRef */ "../../../node_modules/use-callback-ref/dist/es2015/useRef.js");
/**
 * Create a _lense_ on Ref, making it possible to transform ref value
 * @param {ReactRef} ref
 * @param {Function} transformer. 👉 Ref would be __NOT updated__ on `transformer` update.
 * @returns {RefObject}
 *
 * @see https://github.com/theKashey/use-callback-ref#usetransformref-to-replace-reactuseimperativehandle
 * @example
 *
 * const ResizableWithRef = forwardRef((props, ref) =>
 *  <Resizable {...props} ref={useTransformRef(ref, i => i ? i.resizable : null)}/>
 * );
 */
function useTransformRef(ref, transformer) {
  return (0, _useRef.useCallbackRef)(null, function (value) {
    return (0, _assignRef.assignRef)(ref, transformer(value));
  });
}

/***/ }),

/***/ "../../../node_modules/use-sidecar/dist/es2015/config.js":
/*!***************************************************************!*\
  !*** ../../../node_modules/use-sidecar/dist/es2015/config.js ***!
  \***************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.setConfig = exports.config = void 0;
var config = {
  onError: function (e) {
    return console.error(e);
  }
};
exports.config = config;
var setConfig = function (conf) {
  Object.assign(config, conf);
};
exports.setConfig = setConfig;

/***/ }),

/***/ "../../../node_modules/use-sidecar/dist/es2015/env.js":
/*!************************************************************!*\
  !*** ../../../node_modules/use-sidecar/dist/es2015/env.js ***!
  \************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.env = void 0;
var _detectNodeEs = __webpack_require__(/*! detect-node-es */ "../../../node_modules/detect-node-es/esm/browser.js");
var env = {
  isNode: _detectNodeEs.isNode,
  forceCache: false
};
exports.env = env;

/***/ }),

/***/ "../../../node_modules/use-sidecar/dist/es2015/exports.js":
/*!****************************************************************!*\
  !*** ../../../node_modules/use-sidecar/dist/es2015/exports.js ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.exportSidecar = exportSidecar;
var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var SideCar = function (_a) {
  var sideCar = _a.sideCar,
    rest = (0, _tslib.__rest)(_a, ["sideCar"]);
  if (!sideCar) {
    throw new Error('Sidecar: please provide `sideCar` property to import the right car');
  }
  var Target = sideCar.read();
  if (!Target) {
    throw new Error('Sidecar medium not found');
  }
  return /*#__PURE__*/React.createElement(Target, (0, _tslib.__assign)({}, rest));
};
SideCar.isSideCarExport = true;
function exportSidecar(medium, exported) {
  medium.useMedium(exported);
  return SideCar;
}

/***/ }),

/***/ "../../../node_modules/use-sidecar/dist/es2015/hoc.js":
/*!************************************************************!*\
  !*** ../../../node_modules/use-sidecar/dist/es2015/hoc.js ***!
  \************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.sidecar = sidecar;
var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
var _hook = __webpack_require__(/*! ./hook */ "../../../node_modules/use-sidecar/dist/es2015/hook.js");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
// eslint-disable-next-line @typescript-eslint/ban-types
function sidecar(importer, errorComponent) {
  var ErrorCase = function () {
    return errorComponent;
  };
  return function Sidecar(props) {
    var _a = (0, _hook.useSidecar)(importer, props.sideCar),
      Car = _a[0],
      error = _a[1];
    if (error && errorComponent) {
      return ErrorCase;
    }
    // @ts-expect-error type shenanigans
    return Car ? /*#__PURE__*/React.createElement(Car, (0, _tslib.__assign)({}, props)) : null;
  };
}

/***/ }),

/***/ "../../../node_modules/use-sidecar/dist/es2015/hook.js":
/*!*************************************************************!*\
  !*** ../../../node_modules/use-sidecar/dist/es2015/hook.js ***!
  \*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.useSidecar = useSidecar;
var _react = __webpack_require__(/*! react */ "react");
var _env = __webpack_require__(/*! ./env */ "../../../node_modules/use-sidecar/dist/es2015/env.js");
var cache = new WeakMap();
var NO_OPTIONS = {};
function useSidecar(importer, effect) {
  var options = effect && effect.options || NO_OPTIONS;
  if (_env.env.isNode && !options.ssr) {
    return [null, null];
  }
  // eslint-disable-next-line react-hooks/rules-of-hooks
  return useRealSidecar(importer, effect);
}
function useRealSidecar(importer, effect) {
  var options = effect && effect.options || NO_OPTIONS;
  var couldUseCache = _env.env.forceCache || _env.env.isNode && !!options.ssr || !options.async;
  var _a = (0, _react.useState)(couldUseCache ? function () {
      return cache.get(importer);
    } : undefined),
    Car = _a[0],
    setCar = _a[1];
  var _b = (0, _react.useState)(null),
    error = _b[0],
    setError = _b[1];
  (0, _react.useEffect)(function () {
    if (!Car) {
      importer().then(function (car) {
        var resolved = effect ? effect.read() : car.default || car;
        if (!resolved) {
          console.error('Sidecar error: with importer', importer);
          var error_1;
          if (effect) {
            console.error('Sidecar error: with medium', effect);
            error_1 = new Error('Sidecar medium was not found');
          } else {
            error_1 = new Error('Sidecar was not found in exports');
          }
          setError(function () {
            return error_1;
          });
          throw error_1;
        }
        cache.set(importer, resolved);
        setCar(function () {
          return resolved;
        });
      }, function (e) {
        return setError(function () {
          return e;
        });
      });
    }
  }, []);
  return [Car, error];
}

/***/ }),

/***/ "../../../node_modules/use-sidecar/dist/es2015/index.js":
/*!**************************************************************!*\
  !*** ../../../node_modules/use-sidecar/dist/es2015/index.js ***!
  \**************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "createMedium", ({
  enumerable: true,
  get: function () {
    return _medium.createMedium;
  }
}));
Object.defineProperty(exports, "createSidecarMedium", ({
  enumerable: true,
  get: function () {
    return _medium.createSidecarMedium;
  }
}));
Object.defineProperty(exports, "exportSidecar", ({
  enumerable: true,
  get: function () {
    return _exports.exportSidecar;
  }
}));
Object.defineProperty(exports, "renderCar", ({
  enumerable: true,
  get: function () {
    return _renderProp.renderCar;
  }
}));
Object.defineProperty(exports, "setConfig", ({
  enumerable: true,
  get: function () {
    return _config.setConfig;
  }
}));
Object.defineProperty(exports, "sidecar", ({
  enumerable: true,
  get: function () {
    return _hoc.sidecar;
  }
}));
Object.defineProperty(exports, "useSidecar", ({
  enumerable: true,
  get: function () {
    return _hook.useSidecar;
  }
}));
var _hoc = __webpack_require__(/*! ./hoc */ "../../../node_modules/use-sidecar/dist/es2015/hoc.js");
var _hook = __webpack_require__(/*! ./hook */ "../../../node_modules/use-sidecar/dist/es2015/hook.js");
var _config = __webpack_require__(/*! ./config */ "../../../node_modules/use-sidecar/dist/es2015/config.js");
var _medium = __webpack_require__(/*! ./medium */ "../../../node_modules/use-sidecar/dist/es2015/medium.js");
var _renderProp = __webpack_require__(/*! ./renderProp */ "../../../node_modules/use-sidecar/dist/es2015/renderProp.js");
var _exports = __webpack_require__(/*! ./exports */ "../../../node_modules/use-sidecar/dist/es2015/exports.js");

/***/ }),

/***/ "../../../node_modules/use-sidecar/dist/es2015/medium.js":
/*!***************************************************************!*\
  !*** ../../../node_modules/use-sidecar/dist/es2015/medium.js ***!
  \***************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.createMedium = createMedium;
exports.createSidecarMedium = createSidecarMedium;
var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
function ItoI(a) {
  return a;
}
function innerCreateMedium(defaults, middleware) {
  if (middleware === void 0) {
    middleware = ItoI;
  }
  var buffer = [];
  var assigned = false;
  var medium = {
    read: function () {
      if (assigned) {
        throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');
      }
      if (buffer.length) {
        return buffer[buffer.length - 1];
      }
      return defaults;
    },
    useMedium: function (data) {
      var item = middleware(data, assigned);
      buffer.push(item);
      return function () {
        buffer = buffer.filter(function (x) {
          return x !== item;
        });
      };
    },
    assignSyncMedium: function (cb) {
      assigned = true;
      while (buffer.length) {
        var cbs = buffer;
        buffer = [];
        cbs.forEach(cb);
      }
      buffer = {
        push: function (x) {
          return cb(x);
        },
        filter: function () {
          return buffer;
        }
      };
    },
    assignMedium: function (cb) {
      assigned = true;
      var pendingQueue = [];
      if (buffer.length) {
        var cbs = buffer;
        buffer = [];
        cbs.forEach(cb);
        pendingQueue = buffer;
      }
      var executeQueue = function () {
        var cbs = pendingQueue;
        pendingQueue = [];
        cbs.forEach(cb);
      };
      var cycle = function () {
        return Promise.resolve().then(executeQueue);
      };
      cycle();
      buffer = {
        push: function (x) {
          pendingQueue.push(x);
          cycle();
        },
        filter: function (filter) {
          pendingQueue = pendingQueue.filter(filter);
          return buffer;
        }
      };
    }
  };
  return medium;
}
function createMedium(defaults, middleware) {
  if (middleware === void 0) {
    middleware = ItoI;
  }
  return innerCreateMedium(defaults, middleware);
}
// eslint-disable-next-line @typescript-eslint/ban-types
function createSidecarMedium(options) {
  if (options === void 0) {
    options = {};
  }
  var medium = innerCreateMedium(null);
  medium.options = (0, _tslib.__assign)({
    async: true,
    ssr: false
  }, options);
  return medium;
}

/***/ }),

/***/ "../../../node_modules/use-sidecar/dist/es2015/renderProp.js":
/*!*******************************************************************!*\
  !*** ../../../node_modules/use-sidecar/dist/es2015/renderProp.js ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.renderCar = renderCar;
var _tslib = __webpack_require__(/*! tslib */ "../../../node_modules/tslib/tslib.es6.js");
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function renderCar(WrappedComponent, defaults) {
  function State(_a) {
    var stateRef = _a.stateRef,
      props = _a.props;
    var renderTarget = (0, React.useCallback)(function SideTarget() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      (0, React.useLayoutEffect)(function () {
        stateRef.current(args);
      });
      return null;
    }, []);
    // @ts-ignore
    return /*#__PURE__*/React.createElement(WrappedComponent, (0, _tslib.__assign)({}, props, {
      children: renderTarget
    }));
  }
  var Children = /*#__PURE__*/React.memo(function (_a) {
    var stateRef = _a.stateRef,
      defaultState = _a.defaultState,
      children = _a.children;
    var _b = (0, React.useState)(defaultState.current),
      state = _b[0],
      setState = _b[1];
    (0, React.useEffect)(function () {
      stateRef.current = setState;
    }, []);
    return children.apply(void 0, state);
  }, function () {
    return true;
  });
  return function Combiner(props) {
    var defaultState = React.useRef(defaults(props));
    var ref = React.useRef(function (state) {
      return defaultState.current = state;
    });
    return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(State, {
      stateRef: ref,
      props: props
    }), /*#__PURE__*/React.createElement(Children, {
      stateRef: ref,
      defaultState: defaultState,
      children: props.children
    }));
  };
}

/***/ }),

/***/ "../../../node_modules/vscode-languageserver-types/lib/esm/main.js":
/*!*************************************************************************!*\
  !*** ../../../node_modules/vscode-languageserver-types/lib/esm/main.js ***!
  \*************************************************************************/
/***/ (function(__unused_webpack_module, exports) {

/* --------------------------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 * ------------------------------------------------------------------------------------------ */


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.uinteger = exports.integer = exports.WorkspaceSymbol = exports.WorkspaceFolder = exports.WorkspaceEdit = exports.WorkspaceChange = exports.VersionedTextDocumentIdentifier = exports.URI = exports.TextEdit = exports.TextDocumentItem = exports.TextDocumentIdentifier = exports.TextDocumentEdit = exports.TextDocument = exports.SymbolTag = exports.SymbolKind = exports.SymbolInformation = exports.SignatureInformation = exports.SemanticTokens = exports.SemanticTokenTypes = exports.SemanticTokenModifiers = exports.SelectionRange = exports.RenameFile = exports.Range = exports.Position = exports.ParameterInformation = exports.OptionalVersionedTextDocumentIdentifier = exports.MarkupKind = exports.MarkupContent = exports.MarkedString = exports.LocationLink = exports.Location = exports.InsertTextMode = exports.InsertTextFormat = exports.InsertReplaceEdit = exports.InlineValueVariableLookup = exports.InlineValueText = exports.InlineValueEvaluatableExpression = exports.InlineValueContext = exports.InlayHintLabelPart = exports.InlayHintKind = exports.InlayHint = exports.Hover = exports.FormattingOptions = exports.FoldingRangeKind = exports.FoldingRange = exports.EOL = exports.DocumentUri = exports.DocumentSymbol = exports.DocumentLink = exports.DocumentHighlightKind = exports.DocumentHighlight = exports.DiagnosticTag = exports.DiagnosticSeverity = exports.DiagnosticRelatedInformation = exports.Diagnostic = exports.DeleteFile = exports.CreateFile = exports.CompletionList = exports.CompletionItemTag = exports.CompletionItemLabelDetails = exports.CompletionItemKind = exports.CompletionItem = exports.Command = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.CodeLens = exports.CodeDescription = exports.CodeActionTriggerKind = exports.CodeActionKind = exports.CodeActionContext = exports.CodeAction = exports.ChangeAnnotationIdentifier = exports.ChangeAnnotation = exports.AnnotatedTextEdit = void 0;
var DocumentUri;
exports.DocumentUri = DocumentUri;
(function (DocumentUri) {
  function is(value) {
    return typeof value === 'string';
  }
  DocumentUri.is = is;
})(DocumentUri || (exports.DocumentUri = DocumentUri = {}));
var URI;
exports.URI = URI;
(function (URI) {
  function is(value) {
    return typeof value === 'string';
  }
  URI.is = is;
})(URI || (exports.URI = URI = {}));
var integer;
exports.integer = integer;
(function (integer) {
  integer.MIN_VALUE = -2147483648;
  integer.MAX_VALUE = 2147483647;
  function is(value) {
    return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;
  }
  integer.is = is;
})(integer || (exports.integer = integer = {}));
var uinteger;
exports.uinteger = uinteger;
(function (uinteger) {
  uinteger.MIN_VALUE = 0;
  uinteger.MAX_VALUE = 2147483647;
  function is(value) {
    return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;
  }
  uinteger.is = is;
})(uinteger || (exports.uinteger = uinteger = {}));
/**
 * The Position namespace provides helper functions to work with
 * [Position](#Position) literals.
 */
var Position;
exports.Position = Position;
(function (Position) {
  /**
   * Creates a new Position literal from the given line and character.
   * @param line The position's line.
   * @param character The position's character.
   */
  function create(line, character) {
    if (line === Number.MAX_VALUE) {
      line = uinteger.MAX_VALUE;
    }
    if (character === Number.MAX_VALUE) {
      character = uinteger.MAX_VALUE;
    }
    return {
      line: line,
      character: character
    };
  }
  Position.create = create;
  /**
   * Checks whether the given literal conforms to the [Position](#Position) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
  }
  Position.is = is;
})(Position || (exports.Position = Position = {}));
/**
 * The Range namespace provides helper functions to work with
 * [Range](#Range) literals.
 */
var Range;
exports.Range = Range;
(function (Range) {
  function create(one, two, three, four) {
    if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
      return {
        start: Position.create(one, two),
        end: Position.create(three, four)
      };
    } else if (Position.is(one) && Position.is(two)) {
      return {
        start: one,
        end: two
      };
    } else {
      throw new Error("Range#create called with invalid arguments[".concat(one, ", ").concat(two, ", ").concat(three, ", ").concat(four, "]"));
    }
  }
  Range.create = create;
  /**
   * Checks whether the given literal conforms to the [Range](#Range) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
  }
  Range.is = is;
})(Range || (exports.Range = Range = {}));
/**
 * The Location namespace provides helper functions to work with
 * [Location](#Location) literals.
 */
var Location;
exports.Location = Location;
(function (Location) {
  /**
   * Creates a Location literal.
   * @param uri The location's uri.
   * @param range The location's range.
   */
  function create(uri, range) {
    return {
      uri: uri,
      range: range
    };
  }
  Location.create = create;
  /**
   * Checks whether the given literal conforms to the [Location](#Location) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
  }
  Location.is = is;
})(Location || (exports.Location = Location = {}));
/**
 * The LocationLink namespace provides helper functions to work with
 * [LocationLink](#LocationLink) literals.
 */
var LocationLink;
exports.LocationLink = LocationLink;
(function (LocationLink) {
  /**
   * Creates a LocationLink literal.
   * @param targetUri The definition's uri.
   * @param targetRange The full range of the definition.
   * @param targetSelectionRange The span of the symbol definition at the target.
   * @param originSelectionRange The span of the symbol being defined in the originating source file.
   */
  function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
    return {
      targetUri: targetUri,
      targetRange: targetRange,
      targetSelectionRange: targetSelectionRange,
      originSelectionRange: originSelectionRange
    };
  }
  LocationLink.create = create;
  /**
   * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri) && Range.is(candidate.targetSelectionRange) && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
  }
  LocationLink.is = is;
})(LocationLink || (exports.LocationLink = LocationLink = {}));
/**
 * The Color namespace provides helper functions to work with
 * [Color](#Color) literals.
 */
var Color;
exports.Color = Color;
(function (Color) {
  /**
   * Creates a new Color literal.
   */
  function create(red, green, blue, alpha) {
    return {
      red: red,
      green: green,
      blue: blue,
      alpha: alpha
    };
  }
  Color.create = create;
  /**
   * Checks whether the given literal conforms to the [Color](#Color) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1) && Is.numberRange(candidate.green, 0, 1) && Is.numberRange(candidate.blue, 0, 1) && Is.numberRange(candidate.alpha, 0, 1);
  }
  Color.is = is;
})(Color || (exports.Color = Color = {}));
/**
 * The ColorInformation namespace provides helper functions to work with
 * [ColorInformation](#ColorInformation) literals.
 */
var ColorInformation;
exports.ColorInformation = ColorInformation;
(function (ColorInformation) {
  /**
   * Creates a new ColorInformation literal.
   */
  function create(range, color) {
    return {
      range: range,
      color: color
    };
  }
  ColorInformation.create = create;
  /**
   * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color);
  }
  ColorInformation.is = is;
})(ColorInformation || (exports.ColorInformation = ColorInformation = {}));
/**
 * The Color namespace provides helper functions to work with
 * [ColorPresentation](#ColorPresentation) literals.
 */
var ColorPresentation;
exports.ColorPresentation = ColorPresentation;
(function (ColorPresentation) {
  /**
   * Creates a new ColorInformation literal.
   */
  function create(label, textEdit, additionalTextEdits) {
    return {
      label: label,
      textEdit: textEdit,
      additionalTextEdits: additionalTextEdits
    };
  }
  ColorPresentation.create = create;
  /**
   * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate)) && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
  }
  ColorPresentation.is = is;
})(ColorPresentation || (exports.ColorPresentation = ColorPresentation = {}));
/**
 * A set of predefined range kinds.
 */
var FoldingRangeKind;
exports.FoldingRangeKind = FoldingRangeKind;
(function (FoldingRangeKind) {
  /**
   * Folding range for a comment
   */
  FoldingRangeKind.Comment = 'comment';
  /**
   * Folding range for a imports or includes
   */
  FoldingRangeKind.Imports = 'imports';
  /**
   * Folding range for a region (e.g. `#region`)
   */
  FoldingRangeKind.Region = 'region';
})(FoldingRangeKind || (exports.FoldingRangeKind = FoldingRangeKind = {}));
/**
 * The folding range namespace provides helper functions to work with
 * [FoldingRange](#FoldingRange) literals.
 */
var FoldingRange;
exports.FoldingRange = FoldingRange;
(function (FoldingRange) {
  /**
   * Creates a new FoldingRange literal.
   */
  function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {
    var result = {
      startLine: startLine,
      endLine: endLine
    };
    if (Is.defined(startCharacter)) {
      result.startCharacter = startCharacter;
    }
    if (Is.defined(endCharacter)) {
      result.endCharacter = endCharacter;
    }
    if (Is.defined(kind)) {
      result.kind = kind;
    }
    if (Is.defined(collapsedText)) {
      result.collapsedText = collapsedText;
    }
    return result;
  }
  FoldingRange.create = create;
  /**
   * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine) && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter)) && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter)) && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
  }
  FoldingRange.is = is;
})(FoldingRange || (exports.FoldingRange = FoldingRange = {}));
/**
 * The DiagnosticRelatedInformation namespace provides helper functions to work with
 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
 */
var DiagnosticRelatedInformation;
exports.DiagnosticRelatedInformation = DiagnosticRelatedInformation;
(function (DiagnosticRelatedInformation) {
  /**
   * Creates a new DiagnosticRelatedInformation literal.
   */
  function create(location, message) {
    return {
      location: location,
      message: message
    };
  }
  DiagnosticRelatedInformation.create = create;
  /**
   * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
  }
  DiagnosticRelatedInformation.is = is;
})(DiagnosticRelatedInformation || (exports.DiagnosticRelatedInformation = DiagnosticRelatedInformation = {}));
/**
 * The diagnostic's severity.
 */
var DiagnosticSeverity;
exports.DiagnosticSeverity = DiagnosticSeverity;
(function (DiagnosticSeverity) {
  /**
   * Reports an error.
   */
  DiagnosticSeverity.Error = 1;
  /**
   * Reports a warning.
   */
  DiagnosticSeverity.Warning = 2;
  /**
   * Reports an information.
   */
  DiagnosticSeverity.Information = 3;
  /**
   * Reports a hint.
   */
  DiagnosticSeverity.Hint = 4;
})(DiagnosticSeverity || (exports.DiagnosticSeverity = DiagnosticSeverity = {}));
/**
 * The diagnostic tags.
 *
 * @since 3.15.0
 */
var DiagnosticTag;
exports.DiagnosticTag = DiagnosticTag;
(function (DiagnosticTag) {
  /**
   * Unused or unnecessary code.
   *
   * Clients are allowed to render diagnostics with this tag faded out instead of having
   * an error squiggle.
   */
  DiagnosticTag.Unnecessary = 1;
  /**
   * Deprecated or obsolete code.
   *
   * Clients are allowed to rendered diagnostics with this tag strike through.
   */
  DiagnosticTag.Deprecated = 2;
})(DiagnosticTag || (exports.DiagnosticTag = DiagnosticTag = {}));
/**
 * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.
 *
 * @since 3.16.0
 */
var CodeDescription;
exports.CodeDescription = CodeDescription;
(function (CodeDescription) {
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && Is.string(candidate.href);
  }
  CodeDescription.is = is;
})(CodeDescription || (exports.CodeDescription = CodeDescription = {}));
/**
 * The Diagnostic namespace provides helper functions to work with
 * [Diagnostic](#Diagnostic) literals.
 */
var Diagnostic;
exports.Diagnostic = Diagnostic;
(function (Diagnostic) {
  /**
   * Creates a new Diagnostic literal.
   */
  function create(range, message, severity, code, source, relatedInformation) {
    var result = {
      range: range,
      message: message
    };
    if (Is.defined(severity)) {
      result.severity = severity;
    }
    if (Is.defined(code)) {
      result.code = code;
    }
    if (Is.defined(source)) {
      result.source = source;
    }
    if (Is.defined(relatedInformation)) {
      result.relatedInformation = relatedInformation;
    }
    return result;
  }
  Diagnostic.create = create;
  /**
   * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
   */
  function is(value) {
    var _a;
    var candidate = value;
    return Is.defined(candidate) && Range.is(candidate.range) && Is.string(candidate.message) && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) && (Is.undefined(candidate.codeDescription) || Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)) && (Is.string(candidate.source) || Is.undefined(candidate.source)) && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
  }
  Diagnostic.is = is;
})(Diagnostic || (exports.Diagnostic = Diagnostic = {}));
/**
 * The Command namespace provides helper functions to work with
 * [Command](#Command) literals.
 */
var Command;
exports.Command = Command;
(function (Command) {
  /**
   * Creates a new Command literal.
   */
  function create(title, command) {
    var args = [];
    for (var _i = 2; _i < arguments.length; _i++) {
      args[_i - 2] = arguments[_i];
    }
    var result = {
      title: title,
      command: command
    };
    if (Is.defined(args) && args.length > 0) {
      result.arguments = args;
    }
    return result;
  }
  Command.create = create;
  /**
   * Checks whether the given literal conforms to the [Command](#Command) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
  }
  Command.is = is;
})(Command || (exports.Command = Command = {}));
/**
 * The TextEdit namespace provides helper function to create replace,
 * insert and delete edits more easily.
 */
var TextEdit;
exports.TextEdit = TextEdit;
(function (TextEdit) {
  /**
   * Creates a replace text edit.
   * @param range The range of text to be replaced.
   * @param newText The new text.
   */
  function replace(range, newText) {
    return {
      range: range,
      newText: newText
    };
  }
  TextEdit.replace = replace;
  /**
   * Creates a insert text edit.
   * @param position The position to insert the text at.
   * @param newText The text to be inserted.
   */
  function insert(position, newText) {
    return {
      range: {
        start: position,
        end: position
      },
      newText: newText
    };
  }
  TextEdit.insert = insert;
  /**
   * Creates a delete text edit.
   * @param range The range of text to be deleted.
   */
  function del(range) {
    return {
      range: range,
      newText: ''
    };
  }
  TextEdit.del = del;
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && Is.string(candidate.newText) && Range.is(candidate.range);
  }
  TextEdit.is = is;
})(TextEdit || (exports.TextEdit = TextEdit = {}));
var ChangeAnnotation;
exports.ChangeAnnotation = ChangeAnnotation;
(function (ChangeAnnotation) {
  function create(label, needsConfirmation, description) {
    var result = {
      label: label
    };
    if (needsConfirmation !== undefined) {
      result.needsConfirmation = needsConfirmation;
    }
    if (description !== undefined) {
      result.description = description;
    }
    return result;
  }
  ChangeAnnotation.create = create;
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && Is.string(candidate.label) && (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) && (Is.string(candidate.description) || candidate.description === undefined);
  }
  ChangeAnnotation.is = is;
})(ChangeAnnotation || (exports.ChangeAnnotation = ChangeAnnotation = {}));
var ChangeAnnotationIdentifier;
exports.ChangeAnnotationIdentifier = ChangeAnnotationIdentifier;
(function (ChangeAnnotationIdentifier) {
  function is(value) {
    var candidate = value;
    return Is.string(candidate);
  }
  ChangeAnnotationIdentifier.is = is;
})(ChangeAnnotationIdentifier || (exports.ChangeAnnotationIdentifier = ChangeAnnotationIdentifier = {}));
var AnnotatedTextEdit;
exports.AnnotatedTextEdit = AnnotatedTextEdit;
(function (AnnotatedTextEdit) {
  /**
   * Creates an annotated replace text edit.
   *
   * @param range The range of text to be replaced.
   * @param newText The new text.
   * @param annotation The annotation.
   */
  function replace(range, newText, annotation) {
    return {
      range: range,
      newText: newText,
      annotationId: annotation
    };
  }
  AnnotatedTextEdit.replace = replace;
  /**
   * Creates an annotated insert text edit.
   *
   * @param position The position to insert the text at.
   * @param newText The text to be inserted.
   * @param annotation The annotation.
   */
  function insert(position, newText, annotation) {
    return {
      range: {
        start: position,
        end: position
      },
      newText: newText,
      annotationId: annotation
    };
  }
  AnnotatedTextEdit.insert = insert;
  /**
   * Creates an annotated delete text edit.
   *
   * @param range The range of text to be deleted.
   * @param annotation The annotation.
   */
  function del(range, annotation) {
    return {
      range: range,
      newText: '',
      annotationId: annotation
    };
  }
  AnnotatedTextEdit.del = del;
  function is(value) {
    var candidate = value;
    return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
  }
  AnnotatedTextEdit.is = is;
})(AnnotatedTextEdit || (exports.AnnotatedTextEdit = AnnotatedTextEdit = {}));
/**
 * The TextDocumentEdit namespace provides helper function to create
 * an edit that manipulates a text document.
 */
var TextDocumentEdit;
exports.TextDocumentEdit = TextDocumentEdit;
(function (TextDocumentEdit) {
  /**
   * Creates a new `TextDocumentEdit`
   */
  function create(textDocument, edits) {
    return {
      textDocument: textDocument,
      edits: edits
    };
  }
  TextDocumentEdit.create = create;
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument) && Array.isArray(candidate.edits);
  }
  TextDocumentEdit.is = is;
})(TextDocumentEdit || (exports.TextDocumentEdit = TextDocumentEdit = {}));
var CreateFile;
exports.CreateFile = CreateFile;
(function (CreateFile) {
  function create(uri, options, annotation) {
    var result = {
      kind: 'create',
      uri: uri
    };
    if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
      result.options = options;
    }
    if (annotation !== undefined) {
      result.annotationId = annotation;
    }
    return result;
  }
  CreateFile.create = create;
  function is(value) {
    var candidate = value;
    return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined || (candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
  }
  CreateFile.is = is;
})(CreateFile || (exports.CreateFile = CreateFile = {}));
var RenameFile;
exports.RenameFile = RenameFile;
(function (RenameFile) {
  function create(oldUri, newUri, options, annotation) {
    var result = {
      kind: 'rename',
      oldUri: oldUri,
      newUri: newUri
    };
    if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
      result.options = options;
    }
    if (annotation !== undefined) {
      result.annotationId = annotation;
    }
    return result;
  }
  RenameFile.create = create;
  function is(value) {
    var candidate = value;
    return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined || (candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
  }
  RenameFile.is = is;
})(RenameFile || (exports.RenameFile = RenameFile = {}));
var DeleteFile;
exports.DeleteFile = DeleteFile;
(function (DeleteFile) {
  function create(uri, options, annotation) {
    var result = {
      kind: 'delete',
      uri: uri
    };
    if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
      result.options = options;
    }
    if (annotation !== undefined) {
      result.annotationId = annotation;
    }
    return result;
  }
  DeleteFile.create = create;
  function is(value) {
    var candidate = value;
    return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined || (candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
  }
  DeleteFile.is = is;
})(DeleteFile || (exports.DeleteFile = DeleteFile = {}));
var WorkspaceEdit;
exports.WorkspaceEdit = WorkspaceEdit;
(function (WorkspaceEdit) {
  function is(value) {
    var candidate = value;
    return candidate && (candidate.changes !== undefined || candidate.documentChanges !== undefined) && (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {
      if (Is.string(change.kind)) {
        return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
      } else {
        return TextDocumentEdit.is(change);
      }
    }));
  }
  WorkspaceEdit.is = is;
})(WorkspaceEdit || (exports.WorkspaceEdit = WorkspaceEdit = {}));
var TextEditChangeImpl = /** @class */function () {
  function TextEditChangeImpl(edits, changeAnnotations) {
    this.edits = edits;
    this.changeAnnotations = changeAnnotations;
  }
  TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {
    var edit;
    var id;
    if (annotation === undefined) {
      edit = TextEdit.insert(position, newText);
    } else if (ChangeAnnotationIdentifier.is(annotation)) {
      id = annotation;
      edit = AnnotatedTextEdit.insert(position, newText, annotation);
    } else {
      this.assertChangeAnnotations(this.changeAnnotations);
      id = this.changeAnnotations.manage(annotation);
      edit = AnnotatedTextEdit.insert(position, newText, id);
    }
    this.edits.push(edit);
    if (id !== undefined) {
      return id;
    }
  };
  TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {
    var edit;
    var id;
    if (annotation === undefined) {
      edit = TextEdit.replace(range, newText);
    } else if (ChangeAnnotationIdentifier.is(annotation)) {
      id = annotation;
      edit = AnnotatedTextEdit.replace(range, newText, annotation);
    } else {
      this.assertChangeAnnotations(this.changeAnnotations);
      id = this.changeAnnotations.manage(annotation);
      edit = AnnotatedTextEdit.replace(range, newText, id);
    }
    this.edits.push(edit);
    if (id !== undefined) {
      return id;
    }
  };
  TextEditChangeImpl.prototype.delete = function (range, annotation) {
    var edit;
    var id;
    if (annotation === undefined) {
      edit = TextEdit.del(range);
    } else if (ChangeAnnotationIdentifier.is(annotation)) {
      id = annotation;
      edit = AnnotatedTextEdit.del(range, annotation);
    } else {
      this.assertChangeAnnotations(this.changeAnnotations);
      id = this.changeAnnotations.manage(annotation);
      edit = AnnotatedTextEdit.del(range, id);
    }
    this.edits.push(edit);
    if (id !== undefined) {
      return id;
    }
  };
  TextEditChangeImpl.prototype.add = function (edit) {
    this.edits.push(edit);
  };
  TextEditChangeImpl.prototype.all = function () {
    return this.edits;
  };
  TextEditChangeImpl.prototype.clear = function () {
    this.edits.splice(0, this.edits.length);
  };
  TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {
    if (value === undefined) {
      throw new Error("Text edit change is not configured to manage change annotations.");
    }
  };
  return TextEditChangeImpl;
}();
/**
 * A helper class
 */
var ChangeAnnotations = /** @class */function () {
  function ChangeAnnotations(annotations) {
    this._annotations = annotations === undefined ? Object.create(null) : annotations;
    this._counter = 0;
    this._size = 0;
  }
  ChangeAnnotations.prototype.all = function () {
    return this._annotations;
  };
  Object.defineProperty(ChangeAnnotations.prototype, "size", {
    get: function () {
      return this._size;
    },
    enumerable: false,
    configurable: true
  });
  ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {
    var id;
    if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
      id = idOrAnnotation;
    } else {
      id = this.nextId();
      annotation = idOrAnnotation;
    }
    if (this._annotations[id] !== undefined) {
      throw new Error("Id ".concat(id, " is already in use."));
    }
    if (annotation === undefined) {
      throw new Error("No annotation provided for id ".concat(id));
    }
    this._annotations[id] = annotation;
    this._size++;
    return id;
  };
  ChangeAnnotations.prototype.nextId = function () {
    this._counter++;
    return this._counter.toString();
  };
  return ChangeAnnotations;
}();
/**
 * A workspace change helps constructing changes to a workspace.
 */
var WorkspaceChange = /** @class */function () {
  function WorkspaceChange(workspaceEdit) {
    var _this = this;
    this._textEditChanges = Object.create(null);
    if (workspaceEdit !== undefined) {
      this._workspaceEdit = workspaceEdit;
      if (workspaceEdit.documentChanges) {
        this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
        workspaceEdit.changeAnnotations = this._changeAnnotations.all();
        workspaceEdit.documentChanges.forEach(function (change) {
          if (TextDocumentEdit.is(change)) {
            var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
            _this._textEditChanges[change.textDocument.uri] = textEditChange;
          }
        });
      } else if (workspaceEdit.changes) {
        Object.keys(workspaceEdit.changes).forEach(function (key) {
          var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
          _this._textEditChanges[key] = textEditChange;
        });
      }
    } else {
      this._workspaceEdit = {};
    }
  }
  Object.defineProperty(WorkspaceChange.prototype, "edit", {
    /**
     * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
     * use to be returned from a workspace edit operation like rename.
     */
    get: function () {
      this.initDocumentChanges();
      if (this._changeAnnotations !== undefined) {
        if (this._changeAnnotations.size === 0) {
          this._workspaceEdit.changeAnnotations = undefined;
        } else {
          this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
        }
      }
      return this._workspaceEdit;
    },
    enumerable: false,
    configurable: true
  });
  WorkspaceChange.prototype.getTextEditChange = function (key) {
    if (OptionalVersionedTextDocumentIdentifier.is(key)) {
      this.initDocumentChanges();
      if (this._workspaceEdit.documentChanges === undefined) {
        throw new Error('Workspace edit is not configured for document changes.');
      }
      var textDocument = {
        uri: key.uri,
        version: key.version
      };
      var result = this._textEditChanges[textDocument.uri];
      if (!result) {
        var edits = [];
        var textDocumentEdit = {
          textDocument: textDocument,
          edits: edits
        };
        this._workspaceEdit.documentChanges.push(textDocumentEdit);
        result = new TextEditChangeImpl(edits, this._changeAnnotations);
        this._textEditChanges[textDocument.uri] = result;
      }
      return result;
    } else {
      this.initChanges();
      if (this._workspaceEdit.changes === undefined) {
        throw new Error('Workspace edit is not configured for normal text edit changes.');
      }
      var result = this._textEditChanges[key];
      if (!result) {
        var edits = [];
        this._workspaceEdit.changes[key] = edits;
        result = new TextEditChangeImpl(edits);
        this._textEditChanges[key] = result;
      }
      return result;
    }
  };
  WorkspaceChange.prototype.initDocumentChanges = function () {
    if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
      this._changeAnnotations = new ChangeAnnotations();
      this._workspaceEdit.documentChanges = [];
      this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
    }
  };
  WorkspaceChange.prototype.initChanges = function () {
    if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
      this._workspaceEdit.changes = Object.create(null);
    }
  };
  WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {
    this.initDocumentChanges();
    if (this._workspaceEdit.documentChanges === undefined) {
      throw new Error('Workspace edit is not configured for document changes.');
    }
    var annotation;
    if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
      annotation = optionsOrAnnotation;
    } else {
      options = optionsOrAnnotation;
    }
    var operation;
    var id;
    if (annotation === undefined) {
      operation = CreateFile.create(uri, options);
    } else {
      id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
      operation = CreateFile.create(uri, options, id);
    }
    this._workspaceEdit.documentChanges.push(operation);
    if (id !== undefined) {
      return id;
    }
  };
  WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {
    this.initDocumentChanges();
    if (this._workspaceEdit.documentChanges === undefined) {
      throw new Error('Workspace edit is not configured for document changes.');
    }
    var annotation;
    if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
      annotation = optionsOrAnnotation;
    } else {
      options = optionsOrAnnotation;
    }
    var operation;
    var id;
    if (annotation === undefined) {
      operation = RenameFile.create(oldUri, newUri, options);
    } else {
      id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
      operation = RenameFile.create(oldUri, newUri, options, id);
    }
    this._workspaceEdit.documentChanges.push(operation);
    if (id !== undefined) {
      return id;
    }
  };
  WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {
    this.initDocumentChanges();
    if (this._workspaceEdit.documentChanges === undefined) {
      throw new Error('Workspace edit is not configured for document changes.');
    }
    var annotation;
    if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
      annotation = optionsOrAnnotation;
    } else {
      options = optionsOrAnnotation;
    }
    var operation;
    var id;
    if (annotation === undefined) {
      operation = DeleteFile.create(uri, options);
    } else {
      id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
      operation = DeleteFile.create(uri, options, id);
    }
    this._workspaceEdit.documentChanges.push(operation);
    if (id !== undefined) {
      return id;
    }
  };
  return WorkspaceChange;
}();
exports.WorkspaceChange = WorkspaceChange;
/**
 * The TextDocumentIdentifier namespace provides helper functions to work with
 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
 */
var TextDocumentIdentifier;
exports.TextDocumentIdentifier = TextDocumentIdentifier;
(function (TextDocumentIdentifier) {
  /**
   * Creates a new TextDocumentIdentifier literal.
   * @param uri The document's uri.
   */
  function create(uri) {
    return {
      uri: uri
    };
  }
  TextDocumentIdentifier.create = create;
  /**
   * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Is.string(candidate.uri);
  }
  TextDocumentIdentifier.is = is;
})(TextDocumentIdentifier || (exports.TextDocumentIdentifier = TextDocumentIdentifier = {}));
/**
 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
 */
var VersionedTextDocumentIdentifier;
exports.VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier;
(function (VersionedTextDocumentIdentifier) {
  /**
   * Creates a new VersionedTextDocumentIdentifier literal.
   * @param uri The document's uri.
   * @param version The document's version.
   */
  function create(uri, version) {
    return {
      uri: uri,
      version: version
    };
  }
  VersionedTextDocumentIdentifier.create = create;
  /**
   * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
  }
  VersionedTextDocumentIdentifier.is = is;
})(VersionedTextDocumentIdentifier || (exports.VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier = {}));
/**
 * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with
 * [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals.
 */
var OptionalVersionedTextDocumentIdentifier;
exports.OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier;
(function (OptionalVersionedTextDocumentIdentifier) {
  /**
   * Creates a new OptionalVersionedTextDocumentIdentifier literal.
   * @param uri The document's uri.
   * @param version The document's version.
   */
  function create(uri, version) {
    return {
      uri: uri,
      version: version
    };
  }
  OptionalVersionedTextDocumentIdentifier.create = create;
  /**
   * Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
  }
  OptionalVersionedTextDocumentIdentifier.is = is;
})(OptionalVersionedTextDocumentIdentifier || (exports.OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier = {}));
/**
 * The TextDocumentItem namespace provides helper functions to work with
 * [TextDocumentItem](#TextDocumentItem) literals.
 */
var TextDocumentItem;
exports.TextDocumentItem = TextDocumentItem;
(function (TextDocumentItem) {
  /**
   * Creates a new TextDocumentItem literal.
   * @param uri The document's uri.
   * @param languageId The document's language identifier.
   * @param version The document's version number.
   * @param text The document's text.
   */
  function create(uri, languageId, version, text) {
    return {
      uri: uri,
      languageId: languageId,
      version: version,
      text: text
    };
  }
  TextDocumentItem.create = create;
  /**
   * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
  }
  TextDocumentItem.is = is;
})(TextDocumentItem || (exports.TextDocumentItem = TextDocumentItem = {}));
/**
 * Describes the content type that a client supports in various
 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
 *
 * Please note that `MarkupKinds` must not start with a `$`. This kinds
 * are reserved for internal usage.
 */
var MarkupKind;
exports.MarkupKind = MarkupKind;
(function (MarkupKind) {
  /**
   * Plain text is supported as a content format
   */
  MarkupKind.PlainText = 'plaintext';
  /**
   * Markdown is supported as a content format
   */
  MarkupKind.Markdown = 'markdown';
  /**
   * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
   */
  function is(value) {
    var candidate = value;
    return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
  }
  MarkupKind.is = is;
})(MarkupKind || (exports.MarkupKind = MarkupKind = {}));
var MarkupContent;
exports.MarkupContent = MarkupContent;
(function (MarkupContent) {
  /**
   * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
  }
  MarkupContent.is = is;
})(MarkupContent || (exports.MarkupContent = MarkupContent = {}));
/**
 * The kind of a completion entry.
 */
var CompletionItemKind;
exports.CompletionItemKind = CompletionItemKind;
(function (CompletionItemKind) {
  CompletionItemKind.Text = 1;
  CompletionItemKind.Method = 2;
  CompletionItemKind.Function = 3;
  CompletionItemKind.Constructor = 4;
  CompletionItemKind.Field = 5;
  CompletionItemKind.Variable = 6;
  CompletionItemKind.Class = 7;
  CompletionItemKind.Interface = 8;
  CompletionItemKind.Module = 9;
  CompletionItemKind.Property = 10;
  CompletionItemKind.Unit = 11;
  CompletionItemKind.Value = 12;
  CompletionItemKind.Enum = 13;
  CompletionItemKind.Keyword = 14;
  CompletionItemKind.Snippet = 15;
  CompletionItemKind.Color = 16;
  CompletionItemKind.File = 17;
  CompletionItemKind.Reference = 18;
  CompletionItemKind.Folder = 19;
  CompletionItemKind.EnumMember = 20;
  CompletionItemKind.Constant = 21;
  CompletionItemKind.Struct = 22;
  CompletionItemKind.Event = 23;
  CompletionItemKind.Operator = 24;
  CompletionItemKind.TypeParameter = 25;
})(CompletionItemKind || (exports.CompletionItemKind = CompletionItemKind = {}));
/**
 * Defines whether the insert text in a completion item should be interpreted as
 * plain text or a snippet.
 */
var InsertTextFormat;
exports.InsertTextFormat = InsertTextFormat;
(function (InsertTextFormat) {
  /**
   * The primary text to be inserted is treated as a plain string.
   */
  InsertTextFormat.PlainText = 1;
  /**
   * The primary text to be inserted is treated as a snippet.
   *
   * A snippet can define tab stops and placeholders with `$1`, `$2`
   * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
   * the end of the snippet. Placeholders with equal identifiers are linked,
   * that is typing in one will update others too.
   *
   * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
   */
  InsertTextFormat.Snippet = 2;
})(InsertTextFormat || (exports.InsertTextFormat = InsertTextFormat = {}));
/**
 * Completion item tags are extra annotations that tweak the rendering of a completion
 * item.
 *
 * @since 3.15.0
 */
var CompletionItemTag;
exports.CompletionItemTag = CompletionItemTag;
(function (CompletionItemTag) {
  /**
   * Render a completion as obsolete, usually using a strike-out.
   */
  CompletionItemTag.Deprecated = 1;
})(CompletionItemTag || (exports.CompletionItemTag = CompletionItemTag = {}));
/**
 * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
 *
 * @since 3.16.0
 */
var InsertReplaceEdit;
exports.InsertReplaceEdit = InsertReplaceEdit;
(function (InsertReplaceEdit) {
  /**
   * Creates a new insert / replace edit
   */
  function create(newText, insert, replace) {
    return {
      newText: newText,
      insert: insert,
      replace: replace
    };
  }
  InsertReplaceEdit.create = create;
  /**
   * Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.
   */
  function is(value) {
    var candidate = value;
    return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
  }
  InsertReplaceEdit.is = is;
})(InsertReplaceEdit || (exports.InsertReplaceEdit = InsertReplaceEdit = {}));
/**
 * How whitespace and indentation is handled during completion
 * item insertion.
 *
 * @since 3.16.0
 */
var InsertTextMode;
exports.InsertTextMode = InsertTextMode;
(function (InsertTextMode) {
  /**
   * The insertion or replace strings is taken as it is. If the
   * value is multi line the lines below the cursor will be
   * inserted using the indentation defined in the string value.
   * The client will not apply any kind of adjustments to the
   * string.
   */
  InsertTextMode.asIs = 1;
  /**
   * The editor adjusts leading whitespace of new lines so that
   * they match the indentation up to the cursor of the line for
   * which the item is accepted.
   *
   * Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
   * multi line completion item is indented using 2 tabs and all
   * following lines inserted will be indented using 2 tabs as well.
   */
  InsertTextMode.adjustIndentation = 2;
})(InsertTextMode || (exports.InsertTextMode = InsertTextMode = {}));
var CompletionItemLabelDetails;
exports.CompletionItemLabelDetails = CompletionItemLabelDetails;
(function (CompletionItemLabelDetails) {
  function is(value) {
    var candidate = value;
    return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) && (Is.string(candidate.description) || candidate.description === undefined);
  }
  CompletionItemLabelDetails.is = is;
})(CompletionItemLabelDetails || (exports.CompletionItemLabelDetails = CompletionItemLabelDetails = {}));
/**
 * The CompletionItem namespace provides functions to deal with
 * completion items.
 */
var CompletionItem;
exports.CompletionItem = CompletionItem;
(function (CompletionItem) {
  /**
   * Create a completion item and seed it with a label.
   * @param label The completion item's label
   */
  function create(label) {
    return {
      label: label
    };
  }
  CompletionItem.create = create;
})(CompletionItem || (exports.CompletionItem = CompletionItem = {}));
/**
 * The CompletionList namespace provides functions to deal with
 * completion lists.
 */
var CompletionList;
exports.CompletionList = CompletionList;
(function (CompletionList) {
  /**
   * Creates a new completion list.
   *
   * @param items The completion items.
   * @param isIncomplete The list is not complete.
   */
  function create(items, isIncomplete) {
    return {
      items: items ? items : [],
      isIncomplete: !!isIncomplete
    };
  }
  CompletionList.create = create;
})(CompletionList || (exports.CompletionList = CompletionList = {}));
var MarkedString;
exports.MarkedString = MarkedString;
(function (MarkedString) {
  /**
   * Creates a marked string from plain text.
   *
   * @param plainText The plain text.
   */
  function fromPlainText(plainText) {
    return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
  }

  MarkedString.fromPlainText = fromPlainText;
  /**
   * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
   */
  function is(value) {
    var candidate = value;
    return Is.string(candidate) || Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value);
  }
  MarkedString.is = is;
})(MarkedString || (exports.MarkedString = MarkedString = {}));
var Hover;
exports.Hover = Hover;
(function (Hover) {
  /**
   * Checks whether the given value conforms to the [Hover](#Hover) interface.
   */
  function is(value) {
    var candidate = value;
    return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) || MarkedString.is(candidate.contents) || Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
  }
  Hover.is = is;
})(Hover || (exports.Hover = Hover = {}));
/**
 * The ParameterInformation namespace provides helper functions to work with
 * [ParameterInformation](#ParameterInformation) literals.
 */
var ParameterInformation;
exports.ParameterInformation = ParameterInformation;
(function (ParameterInformation) {
  /**
   * Creates a new parameter information literal.
   *
   * @param label A label string.
   * @param documentation A doc string.
   */
  function create(label, documentation) {
    return documentation ? {
      label: label,
      documentation: documentation
    } : {
      label: label
    };
  }
  ParameterInformation.create = create;
})(ParameterInformation || (exports.ParameterInformation = ParameterInformation = {}));
/**
 * The SignatureInformation namespace provides helper functions to work with
 * [SignatureInformation](#SignatureInformation) literals.
 */
var SignatureInformation;
exports.SignatureInformation = SignatureInformation;
(function (SignatureInformation) {
  function create(label, documentation) {
    var parameters = [];
    for (var _i = 2; _i < arguments.length; _i++) {
      parameters[_i - 2] = arguments[_i];
    }
    var result = {
      label: label
    };
    if (Is.defined(documentation)) {
      result.documentation = documentation;
    }
    if (Is.defined(parameters)) {
      result.parameters = parameters;
    } else {
      result.parameters = [];
    }
    return result;
  }
  SignatureInformation.create = create;
})(SignatureInformation || (exports.SignatureInformation = SignatureInformation = {}));
/**
 * A document highlight kind.
 */
var DocumentHighlightKind;
exports.DocumentHighlightKind = DocumentHighlightKind;
(function (DocumentHighlightKind) {
  /**
   * A textual occurrence.
   */
  DocumentHighlightKind.Text = 1;
  /**
   * Read-access of a symbol, like reading a variable.
   */
  DocumentHighlightKind.Read = 2;
  /**
   * Write-access of a symbol, like writing to a variable.
   */
  DocumentHighlightKind.Write = 3;
})(DocumentHighlightKind || (exports.DocumentHighlightKind = DocumentHighlightKind = {}));
/**
 * DocumentHighlight namespace to provide helper functions to work with
 * [DocumentHighlight](#DocumentHighlight) literals.
 */
var DocumentHighlight;
exports.DocumentHighlight = DocumentHighlight;
(function (DocumentHighlight) {
  /**
   * Create a DocumentHighlight object.
   * @param range The range the highlight applies to.
   * @param kind The highlight kind
   */
  function create(range, kind) {
    var result = {
      range: range
    };
    if (Is.number(kind)) {
      result.kind = kind;
    }
    return result;
  }
  DocumentHighlight.create = create;
})(DocumentHighlight || (exports.DocumentHighlight = DocumentHighlight = {}));
/**
 * A symbol kind.
 */
var SymbolKind;
exports.SymbolKind = SymbolKind;
(function (SymbolKind) {
  SymbolKind.File = 1;
  SymbolKind.Module = 2;
  SymbolKind.Namespace = 3;
  SymbolKind.Package = 4;
  SymbolKind.Class = 5;
  SymbolKind.Method = 6;
  SymbolKind.Property = 7;
  SymbolKind.Field = 8;
  SymbolKind.Constructor = 9;
  SymbolKind.Enum = 10;
  SymbolKind.Interface = 11;
  SymbolKind.Function = 12;
  SymbolKind.Variable = 13;
  SymbolKind.Constant = 14;
  SymbolKind.String = 15;
  SymbolKind.Number = 16;
  SymbolKind.Boolean = 17;
  SymbolKind.Array = 18;
  SymbolKind.Object = 19;
  SymbolKind.Key = 20;
  SymbolKind.Null = 21;
  SymbolKind.EnumMember = 22;
  SymbolKind.Struct = 23;
  SymbolKind.Event = 24;
  SymbolKind.Operator = 25;
  SymbolKind.TypeParameter = 26;
})(SymbolKind || (exports.SymbolKind = SymbolKind = {}));
/**
 * Symbol tags are extra annotations that tweak the rendering of a symbol.
 * @since 3.16
 */
var SymbolTag;
exports.SymbolTag = SymbolTag;
(function (SymbolTag) {
  /**
   * Render a symbol as obsolete, usually using a strike-out.
   */
  SymbolTag.Deprecated = 1;
})(SymbolTag || (exports.SymbolTag = SymbolTag = {}));
var SymbolInformation;
exports.SymbolInformation = SymbolInformation;
(function (SymbolInformation) {
  /**
   * Creates a new symbol information literal.
   *
   * @param name The name of the symbol.
   * @param kind The kind of the symbol.
   * @param range The range of the location of the symbol.
   * @param uri The resource of the location of symbol.
   * @param containerName The name of the symbol containing the symbol.
   */
  function create(name, kind, range, uri, containerName) {
    var result = {
      name: name,
      kind: kind,
      location: {
        uri: uri,
        range: range
      }
    };
    if (containerName) {
      result.containerName = containerName;
    }
    return result;
  }
  SymbolInformation.create = create;
})(SymbolInformation || (exports.SymbolInformation = SymbolInformation = {}));
var WorkspaceSymbol;
exports.WorkspaceSymbol = WorkspaceSymbol;
(function (WorkspaceSymbol) {
  /**
   * Create a new workspace symbol.
   *
   * @param name The name of the symbol.
   * @param kind The kind of the symbol.
   * @param uri The resource of the location of the symbol.
   * @param range An options range of the location.
   * @returns A WorkspaceSymbol.
   */
  function create(name, kind, uri, range) {
    return range !== undefined ? {
      name: name,
      kind: kind,
      location: {
        uri: uri,
        range: range
      }
    } : {
      name: name,
      kind: kind,
      location: {
        uri: uri
      }
    };
  }
  WorkspaceSymbol.create = create;
})(WorkspaceSymbol || (exports.WorkspaceSymbol = WorkspaceSymbol = {}));
var DocumentSymbol;
exports.DocumentSymbol = DocumentSymbol;
(function (DocumentSymbol) {
  /**
   * Creates a new symbol information literal.
   *
   * @param name The name of the symbol.
   * @param detail The detail of the symbol.
   * @param kind The kind of the symbol.
   * @param range The range of the symbol.
   * @param selectionRange The selectionRange of the symbol.
   * @param children Children of the symbol.
   */
  function create(name, detail, kind, range, selectionRange, children) {
    var result = {
      name: name,
      detail: detail,
      kind: kind,
      range: range,
      selectionRange: selectionRange
    };
    if (children !== undefined) {
      result.children = children;
    }
    return result;
  }
  DocumentSymbol.create = create;
  /**
   * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
   */
  function is(value) {
    var candidate = value;
    return candidate && Is.string(candidate.name) && Is.number(candidate.kind) && Range.is(candidate.range) && Range.is(candidate.selectionRange) && (candidate.detail === undefined || Is.string(candidate.detail)) && (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) && (candidate.children === undefined || Array.isArray(candidate.children)) && (candidate.tags === undefined || Array.isArray(candidate.tags));
  }
  DocumentSymbol.is = is;
})(DocumentSymbol || (exports.DocumentSymbol = DocumentSymbol = {}));
/**
 * A set of predefined code action kinds
 */
var CodeActionKind;
exports.CodeActionKind = CodeActionKind;
(function (CodeActionKind) {
  /**
   * Empty kind.
   */
  CodeActionKind.Empty = '';
  /**
   * Base kind for quickfix actions: 'quickfix'
   */
  CodeActionKind.QuickFix = 'quickfix';
  /**
   * Base kind for refactoring actions: 'refactor'
   */
  CodeActionKind.Refactor = 'refactor';
  /**
   * Base kind for refactoring extraction actions: 'refactor.extract'
   *
   * Example extract actions:
   *
   * - Extract method
   * - Extract function
   * - Extract variable
   * - Extract interface from class
   * - ...
   */
  CodeActionKind.RefactorExtract = 'refactor.extract';
  /**
   * Base kind for refactoring inline actions: 'refactor.inline'
   *
   * Example inline actions:
   *
   * - Inline function
   * - Inline variable
   * - Inline constant
   * - ...
   */
  CodeActionKind.RefactorInline = 'refactor.inline';
  /**
   * Base kind for refactoring rewrite actions: 'refactor.rewrite'
   *
   * Example rewrite actions:
   *
   * - Convert JavaScript function to class
   * - Add or remove parameter
   * - Encapsulate field
   * - Make method static
   * - Move method to base class
   * - ...
   */
  CodeActionKind.RefactorRewrite = 'refactor.rewrite';
  /**
   * Base kind for source actions: `source`
   *
   * Source code actions apply to the entire file.
   */
  CodeActionKind.Source = 'source';
  /**
   * Base kind for an organize imports source action: `source.organizeImports`
   */
  CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
  /**
   * Base kind for auto-fix source actions: `source.fixAll`.
   *
   * Fix all actions automatically fix errors that have a clear fix that do not require user input.
   * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
   *
   * @since 3.15.0
   */
  CodeActionKind.SourceFixAll = 'source.fixAll';
})(CodeActionKind || (exports.CodeActionKind = CodeActionKind = {}));
/**
 * The reason why code actions were requested.
 *
 * @since 3.17.0
 */
var CodeActionTriggerKind;
exports.CodeActionTriggerKind = CodeActionTriggerKind;
(function (CodeActionTriggerKind) {
  /**
   * Code actions were explicitly requested by the user or by an extension.
   */
  CodeActionTriggerKind.Invoked = 1;
  /**
   * Code actions were requested automatically.
   *
   * This typically happens when current selection in a file changes, but can
   * also be triggered when file content changes.
   */
  CodeActionTriggerKind.Automatic = 2;
})(CodeActionTriggerKind || (exports.CodeActionTriggerKind = CodeActionTriggerKind = {}));
/**
 * The CodeActionContext namespace provides helper functions to work with
 * [CodeActionContext](#CodeActionContext) literals.
 */
var CodeActionContext;
exports.CodeActionContext = CodeActionContext;
(function (CodeActionContext) {
  /**
   * Creates a new CodeActionContext literal.
   */
  function create(diagnostics, only, triggerKind) {
    var result = {
      diagnostics: diagnostics
    };
    if (only !== undefined && only !== null) {
      result.only = only;
    }
    if (triggerKind !== undefined && triggerKind !== null) {
      result.triggerKind = triggerKind;
    }
    return result;
  }
  CodeActionContext.create = create;
  /**
   * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string)) && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);
  }
  CodeActionContext.is = is;
})(CodeActionContext || (exports.CodeActionContext = CodeActionContext = {}));
var CodeAction;
exports.CodeAction = CodeAction;
(function (CodeAction) {
  function create(title, kindOrCommandOrEdit, kind) {
    var result = {
      title: title
    };
    var checkKind = true;
    if (typeof kindOrCommandOrEdit === 'string') {
      checkKind = false;
      result.kind = kindOrCommandOrEdit;
    } else if (Command.is(kindOrCommandOrEdit)) {
      result.command = kindOrCommandOrEdit;
    } else {
      result.edit = kindOrCommandOrEdit;
    }
    if (checkKind && kind !== undefined) {
      result.kind = kind;
    }
    return result;
  }
  CodeAction.create = create;
  function is(value) {
    var candidate = value;
    return candidate && Is.string(candidate.title) && (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) && (candidate.kind === undefined || Is.string(candidate.kind)) && (candidate.edit !== undefined || candidate.command !== undefined) && (candidate.command === undefined || Command.is(candidate.command)) && (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) && (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));
  }
  CodeAction.is = is;
})(CodeAction || (exports.CodeAction = CodeAction = {}));
/**
 * The CodeLens namespace provides helper functions to work with
 * [CodeLens](#CodeLens) literals.
 */
var CodeLens;
exports.CodeLens = CodeLens;
(function (CodeLens) {
  /**
   * Creates a new CodeLens literal.
   */
  function create(range, data) {
    var result = {
      range: range
    };
    if (Is.defined(data)) {
      result.data = data;
    }
    return result;
  }
  CodeLens.create = create;
  /**
   * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
  }
  CodeLens.is = is;
})(CodeLens || (exports.CodeLens = CodeLens = {}));
/**
 * The FormattingOptions namespace provides helper functions to work with
 * [FormattingOptions](#FormattingOptions) literals.
 */
var FormattingOptions;
exports.FormattingOptions = FormattingOptions;
(function (FormattingOptions) {
  /**
   * Creates a new FormattingOptions literal.
   */
  function create(tabSize, insertSpaces) {
    return {
      tabSize: tabSize,
      insertSpaces: insertSpaces
    };
  }
  FormattingOptions.create = create;
  /**
   * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
  }
  FormattingOptions.is = is;
})(FormattingOptions || (exports.FormattingOptions = FormattingOptions = {}));
/**
 * The DocumentLink namespace provides helper functions to work with
 * [DocumentLink](#DocumentLink) literals.
 */
var DocumentLink;
exports.DocumentLink = DocumentLink;
(function (DocumentLink) {
  /**
   * Creates a new DocumentLink literal.
   */
  function create(range, target, data) {
    return {
      range: range,
      target: target,
      data: data
    };
  }
  DocumentLink.create = create;
  /**
   * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
  }
  DocumentLink.is = is;
})(DocumentLink || (exports.DocumentLink = DocumentLink = {}));
/**
 * The SelectionRange namespace provides helper function to work with
 * SelectionRange literals.
 */
var SelectionRange;
exports.SelectionRange = SelectionRange;
(function (SelectionRange) {
  /**
   * Creates a new SelectionRange
   * @param range the range.
   * @param parent an optional parent.
   */
  function create(range, parent) {
    return {
      range: range,
      parent: parent
    };
  }
  SelectionRange.create = create;
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
  }
  SelectionRange.is = is;
})(SelectionRange || (exports.SelectionRange = SelectionRange = {}));
/**
 * A set of predefined token types. This set is not fixed
 * an clients can specify additional token types via the
 * corresponding client capabilities.
 *
 * @since 3.16.0
 */
var SemanticTokenTypes;
exports.SemanticTokenTypes = SemanticTokenTypes;
(function (SemanticTokenTypes) {
  SemanticTokenTypes["namespace"] = "namespace";
  /**
   * Represents a generic type. Acts as a fallback for types which can't be mapped to
   * a specific type like class or enum.
   */
  SemanticTokenTypes["type"] = "type";
  SemanticTokenTypes["class"] = "class";
  SemanticTokenTypes["enum"] = "enum";
  SemanticTokenTypes["interface"] = "interface";
  SemanticTokenTypes["struct"] = "struct";
  SemanticTokenTypes["typeParameter"] = "typeParameter";
  SemanticTokenTypes["parameter"] = "parameter";
  SemanticTokenTypes["variable"] = "variable";
  SemanticTokenTypes["property"] = "property";
  SemanticTokenTypes["enumMember"] = "enumMember";
  SemanticTokenTypes["event"] = "event";
  SemanticTokenTypes["function"] = "function";
  SemanticTokenTypes["method"] = "method";
  SemanticTokenTypes["macro"] = "macro";
  SemanticTokenTypes["keyword"] = "keyword";
  SemanticTokenTypes["modifier"] = "modifier";
  SemanticTokenTypes["comment"] = "comment";
  SemanticTokenTypes["string"] = "string";
  SemanticTokenTypes["number"] = "number";
  SemanticTokenTypes["regexp"] = "regexp";
  SemanticTokenTypes["operator"] = "operator";
  /**
   * @since 3.17.0
   */
  SemanticTokenTypes["decorator"] = "decorator";
})(SemanticTokenTypes || (exports.SemanticTokenTypes = SemanticTokenTypes = {}));
/**
 * A set of predefined token modifiers. This set is not fixed
 * an clients can specify additional token types via the
 * corresponding client capabilities.
 *
 * @since 3.16.0
 */
var SemanticTokenModifiers;
exports.SemanticTokenModifiers = SemanticTokenModifiers;
(function (SemanticTokenModifiers) {
  SemanticTokenModifiers["declaration"] = "declaration";
  SemanticTokenModifiers["definition"] = "definition";
  SemanticTokenModifiers["readonly"] = "readonly";
  SemanticTokenModifiers["static"] = "static";
  SemanticTokenModifiers["deprecated"] = "deprecated";
  SemanticTokenModifiers["abstract"] = "abstract";
  SemanticTokenModifiers["async"] = "async";
  SemanticTokenModifiers["modification"] = "modification";
  SemanticTokenModifiers["documentation"] = "documentation";
  SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
})(SemanticTokenModifiers || (exports.SemanticTokenModifiers = SemanticTokenModifiers = {}));
/**
 * @since 3.16.0
 */
var SemanticTokens;
exports.SemanticTokens = SemanticTokens;
(function (SemanticTokens) {
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') && Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
  }
  SemanticTokens.is = is;
})(SemanticTokens || (exports.SemanticTokens = SemanticTokens = {}));
/**
 * The InlineValueText namespace provides functions to deal with InlineValueTexts.
 *
 * @since 3.17.0
 */
var InlineValueText;
exports.InlineValueText = InlineValueText;
(function (InlineValueText) {
  /**
   * Creates a new InlineValueText literal.
   */
  function create(range, text) {
    return {
      range: range,
      text: text
    };
  }
  InlineValueText.create = create;
  function is(value) {
    var candidate = value;
    return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);
  }
  InlineValueText.is = is;
})(InlineValueText || (exports.InlineValueText = InlineValueText = {}));
/**
 * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups.
 *
 * @since 3.17.0
 */
var InlineValueVariableLookup;
exports.InlineValueVariableLookup = InlineValueVariableLookup;
(function (InlineValueVariableLookup) {
  /**
   * Creates a new InlineValueText literal.
   */
  function create(range, variableName, caseSensitiveLookup) {
    return {
      range: range,
      variableName: variableName,
      caseSensitiveLookup: caseSensitiveLookup
    };
  }
  InlineValueVariableLookup.create = create;
  function is(value) {
    var candidate = value;
    return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup) && (Is.string(candidate.variableName) || candidate.variableName === undefined);
  }
  InlineValueVariableLookup.is = is;
})(InlineValueVariableLookup || (exports.InlineValueVariableLookup = InlineValueVariableLookup = {}));
/**
 * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression.
 *
 * @since 3.17.0
 */
var InlineValueEvaluatableExpression;
exports.InlineValueEvaluatableExpression = InlineValueEvaluatableExpression;
(function (InlineValueEvaluatableExpression) {
  /**
   * Creates a new InlineValueEvaluatableExpression literal.
   */
  function create(range, expression) {
    return {
      range: range,
      expression: expression
    };
  }
  InlineValueEvaluatableExpression.create = create;
  function is(value) {
    var candidate = value;
    return candidate !== undefined && candidate !== null && Range.is(candidate.range) && (Is.string(candidate.expression) || candidate.expression === undefined);
  }
  InlineValueEvaluatableExpression.is = is;
})(InlineValueEvaluatableExpression || (exports.InlineValueEvaluatableExpression = InlineValueEvaluatableExpression = {}));
/**
 * The InlineValueContext namespace provides helper functions to work with
 * [InlineValueContext](#InlineValueContext) literals.
 *
 * @since 3.17.0
 */
var InlineValueContext;
exports.InlineValueContext = InlineValueContext;
(function (InlineValueContext) {
  /**
   * Creates a new InlineValueContext literal.
   */
  function create(frameId, stoppedLocation) {
    return {
      frameId: frameId,
      stoppedLocation: stoppedLocation
    };
  }
  InlineValueContext.create = create;
  /**
   * Checks whether the given literal conforms to the [InlineValueContext](#InlineValueContext) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Range.is(value.stoppedLocation);
  }
  InlineValueContext.is = is;
})(InlineValueContext || (exports.InlineValueContext = InlineValueContext = {}));
/**
 * Inlay hint kinds.
 *
 * @since 3.17.0
 */
var InlayHintKind;
exports.InlayHintKind = InlayHintKind;
(function (InlayHintKind) {
  /**
   * An inlay hint that for a type annotation.
   */
  InlayHintKind.Type = 1;
  /**
   * An inlay hint that is for a parameter.
   */
  InlayHintKind.Parameter = 2;
  function is(value) {
    return value === 1 || value === 2;
  }
  InlayHintKind.is = is;
})(InlayHintKind || (exports.InlayHintKind = InlayHintKind = {}));
var InlayHintLabelPart;
exports.InlayHintLabelPart = InlayHintLabelPart;
(function (InlayHintLabelPart) {
  function create(value) {
    return {
      value: value
    };
  }
  InlayHintLabelPart.create = create;
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.location === undefined || Location.is(candidate.location)) && (candidate.command === undefined || Command.is(candidate.command));
  }
  InlayHintLabelPart.is = is;
})(InlayHintLabelPart || (exports.InlayHintLabelPart = InlayHintLabelPart = {}));
var InlayHint;
exports.InlayHint = InlayHint;
(function (InlayHint) {
  function create(position, label, kind) {
    var result = {
      position: position,
      label: label
    };
    if (kind !== undefined) {
      result.kind = kind;
    }
    return result;
  }
  InlayHint.create = create;
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && Position.is(candidate.position) && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is)) && (candidate.kind === undefined || InlayHintKind.is(candidate.kind)) && candidate.textEdits === undefined || Is.typedArray(candidate.textEdits, TextEdit.is) && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip)) && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft)) && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight));
  }
  InlayHint.is = is;
})(InlayHint || (exports.InlayHint = InlayHint = {}));
var WorkspaceFolder;
exports.WorkspaceFolder = WorkspaceFolder;
(function (WorkspaceFolder) {
  function is(value) {
    var candidate = value;
    return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name);
  }
  WorkspaceFolder.is = is;
})(WorkspaceFolder || (exports.WorkspaceFolder = WorkspaceFolder = {}));
var EOL = ['\n', '\r\n', '\r'];
/**
 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
 */
exports.EOL = EOL;
var TextDocument;
exports.TextDocument = TextDocument;
(function (TextDocument) {
  /**
   * Creates a new ITextDocument literal from the given uri and content.
   * @param uri The document's uri.
   * @param languageId The document's language Id.
   * @param version The document's version.
   * @param content The document's content.
   */
  function create(uri, languageId, version, content) {
    return new FullTextDocument(uri, languageId, version, content);
  }
  TextDocument.create = create;
  /**
   * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
   */
  function is(value) {
    var candidate = value;
    return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount) && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
  }
  TextDocument.is = is;
  function applyEdits(document, edits) {
    var text = document.getText();
    var sortedEdits = mergeSort(edits, function (a, b) {
      var diff = a.range.start.line - b.range.start.line;
      if (diff === 0) {
        return a.range.start.character - b.range.start.character;
      }
      return diff;
    });
    var lastModifiedOffset = text.length;
    for (var i = sortedEdits.length - 1; i >= 0; i--) {
      var e = sortedEdits[i];
      var startOffset = document.offsetAt(e.range.start);
      var endOffset = document.offsetAt(e.range.end);
      if (endOffset <= lastModifiedOffset) {
        text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
      } else {
        throw new Error('Overlapping edit');
      }
      lastModifiedOffset = startOffset;
    }
    return text;
  }
  TextDocument.applyEdits = applyEdits;
  function mergeSort(data, compare) {
    if (data.length <= 1) {
      // sorted
      return data;
    }
    var p = data.length / 2 | 0;
    var left = data.slice(0, p);
    var right = data.slice(p);
    mergeSort(left, compare);
    mergeSort(right, compare);
    var leftIdx = 0;
    var rightIdx = 0;
    var i = 0;
    while (leftIdx < left.length && rightIdx < right.length) {
      var ret = compare(left[leftIdx], right[rightIdx]);
      if (ret <= 0) {
        // smaller_equal -> take left to preserve order
        data[i++] = left[leftIdx++];
      } else {
        // greater -> take right
        data[i++] = right[rightIdx++];
      }
    }
    while (leftIdx < left.length) {
      data[i++] = left[leftIdx++];
    }
    while (rightIdx < right.length) {
      data[i++] = right[rightIdx++];
    }
    return data;
  }
})(TextDocument || (exports.TextDocument = TextDocument = {}));
/**
 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
 */
var FullTextDocument = /** @class */function () {
  function FullTextDocument(uri, languageId, version, content) {
    this._uri = uri;
    this._languageId = languageId;
    this._version = version;
    this._content = content;
    this._lineOffsets = undefined;
  }
  Object.defineProperty(FullTextDocument.prototype, "uri", {
    get: function () {
      return this._uri;
    },
    enumerable: false,
    configurable: true
  });
  Object.defineProperty(FullTextDocument.prototype, "languageId", {
    get: function () {
      return this._languageId;
    },
    enumerable: false,
    configurable: true
  });
  Object.defineProperty(FullTextDocument.prototype, "version", {
    get: function () {
      return this._version;
    },
    enumerable: false,
    configurable: true
  });
  FullTextDocument.prototype.getText = function (range) {
    if (range) {
      var start = this.offsetAt(range.start);
      var end = this.offsetAt(range.end);
      return this._content.substring(start, end);
    }
    return this._content;
  };
  FullTextDocument.prototype.update = function (event, version) {
    this._content = event.text;
    this._version = version;
    this._lineOffsets = undefined;
  };
  FullTextDocument.prototype.getLineOffsets = function () {
    if (this._lineOffsets === undefined) {
      var lineOffsets = [];
      var text = this._content;
      var isLineStart = true;
      for (var i = 0; i < text.length; i++) {
        if (isLineStart) {
          lineOffsets.push(i);
          isLineStart = false;
        }
        var ch = text.charAt(i);
        isLineStart = ch === '\r' || ch === '\n';
        if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
          i++;
        }
      }
      if (isLineStart && text.length > 0) {
        lineOffsets.push(text.length);
      }
      this._lineOffsets = lineOffsets;
    }
    return this._lineOffsets;
  };
  FullTextDocument.prototype.positionAt = function (offset) {
    offset = Math.max(Math.min(offset, this._content.length), 0);
    var lineOffsets = this.getLineOffsets();
    var low = 0,
      high = lineOffsets.length;
    if (high === 0) {
      return Position.create(0, offset);
    }
    while (low < high) {
      var mid = Math.floor((low + high) / 2);
      if (lineOffsets[mid] > offset) {
        high = mid;
      } else {
        low = mid + 1;
      }
    }
    // low is the least x for which the line offset is larger than the current offset
    // or array.length if no line offset is larger than the current offset
    var line = low - 1;
    return Position.create(line, offset - lineOffsets[line]);
  };
  FullTextDocument.prototype.offsetAt = function (position) {
    var lineOffsets = this.getLineOffsets();
    if (position.line >= lineOffsets.length) {
      return this._content.length;
    } else if (position.line < 0) {
      return 0;
    }
    var lineOffset = lineOffsets[position.line];
    var nextLineOffset = position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : this._content.length;
    return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
  };
  Object.defineProperty(FullTextDocument.prototype, "lineCount", {
    get: function () {
      return this.getLineOffsets().length;
    },
    enumerable: false,
    configurable: true
  });
  return FullTextDocument;
}();
var Is;
(function (Is) {
  var toString = Object.prototype.toString;
  function defined(value) {
    return typeof value !== 'undefined';
  }
  Is.defined = defined;
  function undefined(value) {
    return typeof value === 'undefined';
  }
  Is.undefined = undefined;
  function boolean(value) {
    return value === true || value === false;
  }
  Is.boolean = boolean;
  function string(value) {
    return toString.call(value) === '[object String]';
  }
  Is.string = string;
  function number(value) {
    return toString.call(value) === '[object Number]';
  }
  Is.number = number;
  function numberRange(value, min, max) {
    return toString.call(value) === '[object Number]' && min <= value && value <= max;
  }
  Is.numberRange = numberRange;
  function integer(value) {
    return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;
  }
  Is.integer = integer;
  function uinteger(value) {
    return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;
  }
  Is.uinteger = uinteger;
  function func(value) {
    return toString.call(value) === '[object Function]';
  }
  Is.func = func;
  function objectLiteral(value) {
    // Strictly speaking class instances pass this check as well. Since the LSP
    // doesn't use classes we ignore this for now. If we do we need to add something
    // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
    return value !== null && typeof value === 'object';
  }
  Is.objectLiteral = objectLiteral;
  function typedArray(value, check) {
    return Array.isArray(value) && value.every(check);
  }
  Is.typedArray = typedArray;
})(Is || (Is = {}));

/***/ }),

/***/ "../../graphiql-react/dist/SchemaReference.cjs.js":
/*!********************************************************!*\
  !*** ../../graphiql-react/dist/SchemaReference.cjs.js ***!
  \********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var m = Object.defineProperty;
var l = (n, r) => m(n, "name", {
  value: r,
  configurable: !0
});
const t = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"),
  s = __webpack_require__(/*! ./forEachState.cjs.js */ "../../graphiql-react/dist/forEachState.cjs.js");
function o(n, r) {
  const e = {
    schema: n,
    type: null,
    parentType: null,
    inputType: null,
    directiveDef: null,
    fieldDef: null,
    argDef: null,
    argDefs: null,
    objectFieldDefs: null
  };
  return s.forEachState(r, i => {
    var a, c;
    switch (i.kind) {
      case "Query":
      case "ShortQuery":
        e.type = n.getQueryType();
        break;
      case "Mutation":
        e.type = n.getMutationType();
        break;
      case "Subscription":
        e.type = n.getSubscriptionType();
        break;
      case "InlineFragment":
      case "FragmentDefinition":
        i.type && (e.type = n.getType(i.type));
        break;
      case "Field":
      case "AliasedField":
        e.fieldDef = e.type && i.name ? T(n, e.parentType, i.name) : null, e.type = (a = e.fieldDef) === null || a === void 0 ? void 0 : a.type;
        break;
      case "SelectionSet":
        e.parentType = e.type ? t.getNamedType(e.type) : null;
        break;
      case "Directive":
        e.directiveDef = i.name ? n.getDirective(i.name) : null;
        break;
      case "Arguments":
        const f = i.prevState ? i.prevState.kind === "Field" ? e.fieldDef : i.prevState.kind === "Directive" ? e.directiveDef : i.prevState.kind === "AliasedField" ? i.prevState.name && T(n, e.parentType, i.prevState.name) : null : null;
        e.argDefs = f ? f.args : null;
        break;
      case "Argument":
        if (e.argDef = null, e.argDefs) {
          for (let u = 0; u < e.argDefs.length; u++) if (e.argDefs[u].name === i.name) {
            e.argDef = e.argDefs[u];
            break;
          }
        }
        e.inputType = (c = e.argDef) === null || c === void 0 ? void 0 : c.type;
        break;
      case "EnumValue":
        const d = e.inputType ? t.getNamedType(e.inputType) : null;
        e.enumValue = d instanceof t.GraphQLEnumType ? b(d.getValues(), u => u.value === i.name) : null;
        break;
      case "ListValue":
        const g = e.inputType ? t.getNullableType(e.inputType) : null;
        e.inputType = g instanceof t.GraphQLList ? g.ofType : null;
        break;
      case "ObjectValue":
        const y = e.inputType ? t.getNamedType(e.inputType) : null;
        e.objectFieldDefs = y instanceof t.GraphQLInputObjectType ? y.getFields() : null;
        break;
      case "ObjectField":
        const p = i.name && e.objectFieldDefs ? e.objectFieldDefs[i.name] : null;
        e.inputType = p == null ? void 0 : p.type;
        break;
      case "NamedType":
        e.type = i.name ? n.getType(i.name) : null;
        break;
    }
  }), e;
}
l(o, "getTypeInfo");
function T(n, r, e) {
  if (e === t.SchemaMetaFieldDef.name && n.getQueryType() === r) return t.SchemaMetaFieldDef;
  if (e === t.TypeMetaFieldDef.name && n.getQueryType() === r) return t.TypeMetaFieldDef;
  if (e === t.TypeNameMetaFieldDef.name && t.isCompositeType(r)) return t.TypeNameMetaFieldDef;
  if (r && r.getFields) return r.getFields()[e];
}
l(T, "getFieldDef");
function b(n, r) {
  for (let e = 0; e < n.length; e++) if (r(n[e])) return n[e];
}
l(b, "find");
function v(n) {
  return {
    kind: "Field",
    schema: n.schema,
    field: n.fieldDef,
    type: D(n.fieldDef) ? null : n.parentType
  };
}
l(v, "getFieldReference");
function F(n) {
  return {
    kind: "Directive",
    schema: n.schema,
    directive: n.directiveDef
  };
}
l(F, "getDirectiveReference");
function k(n) {
  return n.directiveDef ? {
    kind: "Argument",
    schema: n.schema,
    argument: n.argDef,
    directive: n.directiveDef
  } : {
    kind: "Argument",
    schema: n.schema,
    argument: n.argDef,
    field: n.fieldDef,
    type: D(n.fieldDef) ? null : n.parentType
  };
}
l(k, "getArgumentReference");
function S(n) {
  return {
    kind: "EnumValue",
    value: n.enumValue || void 0,
    type: n.inputType ? t.getNamedType(n.inputType) : void 0
  };
}
l(S, "getEnumValueReference");
function h(n, r) {
  return {
    kind: "Type",
    schema: n.schema,
    type: r || n.type
  };
}
l(h, "getTypeReference");
function D(n) {
  return n.name.slice(0, 2) === "__";
}
l(D, "isMetaField");
exports.getArgumentReference = k;
exports.getDirectiveReference = F;
exports.getEnumValueReference = S;
exports.getFieldReference = v;
exports.getTypeInfo = o;
exports.getTypeReference = h;

/***/ }),

/***/ "../../graphiql-react/dist/brace-fold.cjs.js":
/*!***************************************************!*\
  !*** ../../graphiql-react/dist/brace-fold.cjs.js ***!
  \***************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var S = Object.defineProperty;
var y = (d, L) => S(d, "name", {
  value: L,
  configurable: !0
});
const _ = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
function m(d, L) {
  for (var e = 0; e < L.length; e++) {
    const g = L[e];
    if (typeof g != "string" && !Array.isArray(g)) {
      for (const t in g) if (t !== "default" && !(t in d)) {
        const a = Object.getOwnPropertyDescriptor(g, t);
        a && Object.defineProperty(d, t, a.get ? a : {
          enumerable: !0,
          get: () => g[t]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(d, Symbol.toStringTag, {
    value: "Module"
  }));
}
y(m, "_mergeNamespaces");
var I = {
  exports: {}
};
(function (d, L) {
  (function (e) {
    e(_.requireCodemirror());
  })(function (e) {
    function g(t) {
      return function (a, f) {
        var n = f.line,
          o = a.getLine(n);
        function v(l) {
          for (var u, c = f.ch, h = 0;;) {
            var b = c <= 0 ? -1 : o.lastIndexOf(l[0], c - 1);
            if (b == -1) {
              if (h == 1) break;
              h = 1, c = o.length;
              continue;
            }
            if (h == 1 && b < f.ch) break;
            if (u = a.getTokenTypeAt(e.Pos(n, b + 1)), !/^(comment|string)/.test(u)) return {
              ch: b + 1,
              tokenType: u,
              pair: l
            };
            c = b - 1;
          }
        }
        y(v, "findOpening");
        function k(l) {
          var u = 1,
            c = a.lastLine(),
            h,
            b = l.ch,
            j;
          e: for (var T = n; T <= c; ++T) for (var A = a.getLine(T), p = T == n ? b : 0;;) {
            var F = A.indexOf(l.pair[0], p),
              O = A.indexOf(l.pair[1], p);
            if (F < 0 && (F = A.length), O < 0 && (O = A.length), p = Math.min(F, O), p == A.length) break;
            if (a.getTokenTypeAt(e.Pos(T, p + 1)) == l.tokenType) {
              if (p == F) ++u;else if (! --u) {
                h = T, j = p;
                break e;
              }
            }
            ++p;
          }
          return h == null || n == h ? null : {
            from: e.Pos(n, b),
            to: e.Pos(h, j)
          };
        }
        y(k, "findRange");
        for (var i = [], r = 0; r < t.length; r++) {
          var s = v(t[r]);
          s && i.push(s);
        }
        i.sort(function (l, u) {
          return l.ch - u.ch;
        });
        for (var r = 0; r < i.length; r++) {
          var P = k(i[r]);
          if (P) return P;
        }
        return null;
      };
    }
    y(g, "bracketFolding"), e.registerHelper("fold", "brace", g([["{", "}"], ["[", "]"]])), e.registerHelper("fold", "brace-paren", g([["{", "}"], ["[", "]"], ["(", ")"]])), e.registerHelper("fold", "import", function (t, a) {
      function f(r) {
        if (r < t.firstLine() || r > t.lastLine()) return null;
        var s = t.getTokenAt(e.Pos(r, 1));
        if (/\S/.test(s.string) || (s = t.getTokenAt(e.Pos(r, s.end + 1))), s.type != "keyword" || s.string != "import") return null;
        for (var P = r, l = Math.min(t.lastLine(), r + 10); P <= l; ++P) {
          var u = t.getLine(P),
            c = u.indexOf(";");
          if (c != -1) return {
            startCh: s.end,
            end: e.Pos(P, c)
          };
        }
      }
      y(f, "hasImport");
      var n = a.line,
        o = f(n),
        v;
      if (!o || f(n - 1) || (v = f(n - 2)) && v.end.line == n - 1) return null;
      for (var k = o.end;;) {
        var i = f(k.line + 1);
        if (i == null) break;
        k = i.end;
      }
      return {
        from: t.clipPos(e.Pos(n, o.startCh + 1)),
        to: k
      };
    }), e.registerHelper("fold", "include", function (t, a) {
      function f(i) {
        if (i < t.firstLine() || i > t.lastLine()) return null;
        var r = t.getTokenAt(e.Pos(i, 1));
        if (/\S/.test(r.string) || (r = t.getTokenAt(e.Pos(i, r.end + 1))), r.type == "meta" && r.string.slice(0, 8) == "#include") return r.start + 8;
      }
      y(f, "hasInclude");
      var n = a.line,
        o = f(n);
      if (o == null || f(n - 1) != null) return null;
      for (var v = n;;) {
        var k = f(v + 1);
        if (k == null) break;
        ++v;
      }
      return {
        from: e.Pos(n, o + 1),
        to: t.clipPos(e.Pos(v))
      };
    });
  });
})();
var H = I.exports;
const q = _.getDefaultExportFromCjs(H),
  w = m({
    __proto__: null,
    default: q
  }, [H]);
exports.braceFold = w;

/***/ }),

/***/ "../../graphiql-react/dist/closebrackets.cjs.js":
/*!******************************************************!*\
  !*** ../../graphiql-react/dist/closebrackets.cjs.js ***!
  \******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var G = Object.defineProperty;
var f = (S, P) => G(S, "name", {
  value: P,
  configurable: !0
});
const q = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
function H(S, P) {
  for (var a = 0; a < P.length; a++) {
    const c = P[a];
    if (typeof c != "string" && !Array.isArray(c)) {
      for (const i in c) if (i !== "default" && !(i in S)) {
        const v = Object.getOwnPropertyDescriptor(c, i);
        v && Object.defineProperty(S, i, v.get ? v : {
          enumerable: !0,
          get: () => c[i]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(S, Symbol.toStringTag, {
    value: "Module"
  }));
}
f(H, "_mergeNamespaces");
var J = {
  exports: {}
};
(function (S, P) {
  (function (a) {
    a(q.requireCodemirror());
  })(function (a) {
    var c = {
        pairs: `()[]{}''""`,
        closeBefore: `)]}'":;>`,
        triples: "",
        explode: "[]{}"
      },
      i = a.Pos;
    a.defineOption("autoCloseBrackets", !1, function (e, t, n) {
      n && n != a.Init && (e.removeKeyMap(B), e.state.closeBrackets = null), t && (_(v(t, "pairs")), e.state.closeBrackets = t, e.addKeyMap(B));
    });
    function v(e, t) {
      return t == "pairs" && typeof e == "string" ? e : typeof e == "object" && e[t] != null ? e[t] : c[t];
    }
    f(v, "getOption");
    var B = {
      Backspace: L,
      Enter: W
    };
    function _(e) {
      for (var t = 0; t < e.length; t++) {
        var n = e.charAt(t),
          s = "'" + n + "'";
        B[s] || (B[s] = K(n));
      }
    }
    f(_, "ensureBound"), _(c.pairs + "`");
    function K(e) {
      return function (t) {
        return z(t, e);
      };
    }
    f(K, "handler");
    function x(e) {
      var t = e.state.closeBrackets;
      if (!t || t.override) return t;
      var n = e.getModeAt(e.getCursor());
      return n.closeBrackets || t;
    }
    f(x, "getConfig");
    function L(e) {
      var t = x(e);
      if (!t || e.getOption("disableInput")) return a.Pass;
      for (var n = v(t, "pairs"), s = e.listSelections(), r = 0; r < s.length; r++) {
        if (!s[r].empty()) return a.Pass;
        var h = w(e, s[r].head);
        if (!h || n.indexOf(h) % 2 != 0) return a.Pass;
      }
      for (var r = s.length - 1; r >= 0; r--) {
        var o = s[r].head;
        e.replaceRange("", i(o.line, o.ch - 1), i(o.line, o.ch + 1), "+delete");
      }
    }
    f(L, "handleBackspace");
    function W(e) {
      var t = x(e),
        n = t && v(t, "explode");
      if (!n || e.getOption("disableInput")) return a.Pass;
      for (var s = e.listSelections(), r = 0; r < s.length; r++) {
        if (!s[r].empty()) return a.Pass;
        var h = w(e, s[r].head);
        if (!h || n.indexOf(h) % 2 != 0) return a.Pass;
      }
      e.operation(function () {
        var o = e.lineSeparator() || `
`;
        e.replaceSelection(o + o, null), O(e, -1), s = e.listSelections();
        for (var g = 0; g < s.length; g++) {
          var A = s[g].head.line;
          e.indentLine(A, null, !0), e.indentLine(A + 1, null, !0);
        }
      });
    }
    f(W, "handleEnter");
    function O(e, t) {
      for (var n = [], s = e.listSelections(), r = 0, h = 0; h < s.length; h++) {
        var o = s[h];
        o.head == e.getCursor() && (r = h);
        var g = o.head.ch || t > 0 ? {
          line: o.head.line,
          ch: o.head.ch + t
        } : {
          line: o.head.line - 1
        };
        n.push({
          anchor: g,
          head: g
        });
      }
      e.setSelections(n, r);
    }
    f(O, "moveSel");
    function $(e) {
      var t = a.cmpPos(e.anchor, e.head) > 0;
      return {
        anchor: new i(e.anchor.line, e.anchor.ch + (t ? -1 : 1)),
        head: new i(e.head.line, e.head.ch + (t ? 1 : -1))
      };
    }
    f($, "contractSelection");
    function z(e, t) {
      var n = x(e);
      if (!n || e.getOption("disableInput")) return a.Pass;
      var s = v(n, "pairs"),
        r = s.indexOf(t);
      if (r == -1) return a.Pass;
      for (var h = v(n, "closeBefore"), o = v(n, "triples"), g = s.charAt(r + 1) == t, A = e.listSelections(), R = r % 2 == 0, b, j = 0; j < A.length; j++) {
        var I = A[j],
          l = I.head,
          u,
          y = e.getRange(l, i(l.line, l.ch + 1));
        if (R && !I.empty()) u = "surround";else if ((g || !R) && y == t) g && N(e, l) ? u = "both" : o.indexOf(t) >= 0 && e.getRange(l, i(l.line, l.ch + 3)) == t + t + t ? u = "skipThree" : u = "skip";else if (g && l.ch > 1 && o.indexOf(t) >= 0 && e.getRange(i(l.line, l.ch - 2), l) == t + t) {
          if (l.ch > 2 && /\bstring/.test(e.getTokenTypeAt(i(l.line, l.ch - 2)))) return a.Pass;
          u = "addFour";
        } else if (g) {
          var F = l.ch == 0 ? " " : e.getRange(i(l.line, l.ch - 1), l);
          if (!a.isWordChar(y) && F != t && !a.isWordChar(F)) u = "both";else return a.Pass;
        } else if (R && (y.length === 0 || /\s/.test(y) || h.indexOf(y) > -1)) u = "both";else return a.Pass;
        if (!b) b = u;else if (b != u) return a.Pass;
      }
      var k = r % 2 ? s.charAt(r - 1) : t,
        E = r % 2 ? t : s.charAt(r + 1);
      e.operation(function () {
        if (b == "skip") O(e, 1);else if (b == "skipThree") O(e, 3);else if (b == "surround") {
          for (var p = e.getSelections(), d = 0; d < p.length; d++) p[d] = k + p[d] + E;
          e.replaceSelections(p, "around"), p = e.listSelections().slice();
          for (var d = 0; d < p.length; d++) p[d] = $(p[d]);
          e.setSelections(p);
        } else b == "both" ? (e.replaceSelection(k + E, null), e.triggerElectric(k + E), O(e, -1)) : b == "addFour" && (e.replaceSelection(k + k + k + k, "before"), O(e, 1));
      });
    }
    f(z, "handleChar");
    function w(e, t) {
      var n = e.getRange(i(t.line, t.ch - 1), i(t.line, t.ch + 1));
      return n.length == 2 ? n : null;
    }
    f(w, "charsAround");
    function N(e, t) {
      var n = e.getTokenAt(i(t.line, t.ch + 1));
      return /\bstring/.test(n.type) && n.start == t.ch && (t.ch == 0 || !/\bstring/.test(e.getTokenTypeAt(t)));
    }
    f(N, "stringStartsAfter");
  });
})();
var D = J.exports;
const Q = q.getDefaultExportFromCjs(D),
  T = H({
    __proto__: null,
    default: Q
  }, [D]);
exports.closebrackets = T;

/***/ }),

/***/ "../../graphiql-react/dist/codemirror.cjs.js":
/*!***************************************************!*\
  !*** ../../graphiql-react/dist/codemirror.cjs.js ***!
  \***************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var u = Object.defineProperty;
var n = (r, t) => u(r, "name", {
  value: t,
  configurable: !0
});
const s = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
function a(r, t) {
  for (var i = 0; i < t.length; i++) {
    const e = t[i];
    if (typeof e != "string" && !Array.isArray(e)) {
      for (const o in e) if (o !== "default" && !(o in r)) {
        const c = Object.getOwnPropertyDescriptor(e, o);
        c && Object.defineProperty(r, o, c.get ? c : {
          enumerable: !0,
          get: () => e[o]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, {
    value: "Module"
  }));
}
n(a, "_mergeNamespaces");
var d = s.requireCodemirror();
const f = s.getDefaultExportFromCjs(d),
  l = a({
    __proto__: null,
    default: f
  }, [d]);
exports.CodeMirror = f;
exports.codemirror = l;

/***/ }),

/***/ "../../graphiql-react/dist/codemirror.cjs2.js":
/*!****************************************************!*\
  !*** ../../graphiql-react/dist/codemirror.cjs2.js ***!
  \****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var su = Object.defineProperty;
var u = (He, Dn) => su(He, "name", {
  value: Dn,
  configurable: !0
});
var uu = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof __webpack_require__.g < "u" ? __webpack_require__.g : typeof self < "u" ? self : {};
function fu(He) {
  return He && He.__esModule && Object.prototype.hasOwnProperty.call(He, "default") ? He.default : He;
}
u(fu, "getDefaultExportFromCjs");
var Mn = {
    exports: {}
  },
  Ko;
function hu() {
  return Ko || (Ko = 1, function (He, Dn) {
    (function (ie, Lr) {
      He.exports = Lr();
    })(uu, function () {
      var ie = navigator.userAgent,
        Lr = navigator.platform,
        Fe = /gecko\/\d/i.test(ie),
        Nn = /MSIE \d/.test(ie),
        An = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ie),
        kr = /Edge\/(\d+)/.exec(ie),
        O = Nn || An || kr,
        I = O && (Nn ? document.documentMode || 6 : +(kr || An)[1]),
        ne = !kr && /WebKit\//.test(ie),
        _o = ne && /Qt\/\d+\.\d+/.test(ie),
        Tr = !kr && /Chrome\//.test(ie),
        we = /Opera\//.test(ie),
        Mr = /Apple Computer/.test(navigator.vendor),
        Xo = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ie),
        Yo = /PhantomJS/.test(ie),
        Ut = Mr && (/Mobile\/\w+/.test(ie) || navigator.maxTouchPoints > 2),
        Dr = /Android/.test(ie),
        Kt = Ut || Dr || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ie),
        me = Ut || /Mac/.test(Lr),
        qo = /\bCrOS\b/.test(ie),
        Zo = /win/i.test(Lr),
        et = we && ie.match(/Version\/(\d*\.\d*)/);
      et && (et = Number(et[1])), et && et >= 15 && (we = !1, ne = !0);
      var On = me && (_o || we && (et == null || et < 12.11)),
        ci = Fe || O && I >= 9;
      function mt(e) {
        return new RegExp("(^|\\s)" + e + "(?:$|\\s)\\s*");
      }
      u(mt, "classTest");
      var tt = u(function (e, t) {
        var i = e.className,
          r = mt(t).exec(i);
        if (r) {
          var n = i.slice(r.index + r[0].length);
          e.className = i.slice(0, r.index) + (n ? r[1] + n : "");
        }
      }, "rmClass");
      function Ue(e) {
        for (var t = e.childNodes.length; t > 0; --t) e.removeChild(e.firstChild);
        return e;
      }
      u(Ue, "removeChildren");
      function ve(e, t) {
        return Ue(e).appendChild(t);
      }
      u(ve, "removeChildrenAndAdd");
      function T(e, t, i, r) {
        var n = document.createElement(e);
        if (i && (n.className = i), r && (n.style.cssText = r), typeof t == "string") n.appendChild(document.createTextNode(t));else if (t) for (var l = 0; l < t.length; ++l) n.appendChild(t[l]);
        return n;
      }
      u(T, "elt");
      function bt(e, t, i, r) {
        var n = T(e, t, i, r);
        return n.setAttribute("role", "presentation"), n;
      }
      u(bt, "eltP");
      var rt;
      document.createRange ? rt = u(function (e, t, i, r) {
        var n = document.createRange();
        return n.setEnd(r || e, i), n.setStart(e, t), n;
      }, "range") : rt = u(function (e, t, i) {
        var r = document.body.createTextRange();
        try {
          r.moveToElementText(e.parentNode);
        } catch {
          return r;
        }
        return r.collapse(!0), r.moveEnd("character", i), r.moveStart("character", t), r;
      }, "range");
      function Ke(e, t) {
        if (t.nodeType == 3 && (t = t.parentNode), e.contains) return e.contains(t);
        do if (t.nodeType == 11 && (t = t.host), t == e) return !0; while (t = t.parentNode);
      }
      u(Ke, "contains");
      function be() {
        var e;
        try {
          e = document.activeElement;
        } catch {
          e = document.body || null;
        }
        for (; e && e.shadowRoot && e.shadowRoot.activeElement;) e = e.shadowRoot.activeElement;
        return e;
      }
      u(be, "activeElt");
      function it(e, t) {
        var i = e.className;
        mt(t).test(i) || (e.className += (i ? " " : "") + t);
      }
      u(it, "addClass");
      function di(e, t) {
        for (var i = e.split(" "), r = 0; r < i.length; r++) i[r] && !mt(i[r]).test(t) && (t += " " + i[r]);
        return t;
      }
      u(di, "joinClasses");
      var _t = u(function (e) {
        e.select();
      }, "selectInput");
      Ut ? _t = u(function (e) {
        e.selectionStart = 0, e.selectionEnd = e.value.length;
      }, "selectInput") : O && (_t = u(function (e) {
        try {
          e.select();
        } catch {}
      }, "selectInput"));
      function pi(e) {
        var t = Array.prototype.slice.call(arguments, 1);
        return function () {
          return e.apply(null, t);
        };
      }
      u(pi, "bind");
      function nt(e, t, i) {
        t || (t = {});
        for (var r in e) e.hasOwnProperty(r) && (i !== !1 || !t.hasOwnProperty(r)) && (t[r] = e[r]);
        return t;
      }
      u(nt, "copyObj");
      function xe(e, t, i, r, n) {
        t == null && (t = e.search(/[^\s\u00a0]/), t == -1 && (t = e.length));
        for (var l = r || 0, o = n || 0;;) {
          var a = e.indexOf("	", l);
          if (a < 0 || a >= t) return o + (t - l);
          o += a - l, o += i - o % i, l = a + 1;
        }
      }
      u(xe, "countColumn");
      var _e = u(function () {
        this.id = null, this.f = null, this.time = 0, this.handler = pi(this.onTimeout, this);
      }, "Delayed");
      _e.prototype.onTimeout = function (e) {
        e.id = 0, e.time <= +new Date() ? e.f() : setTimeout(e.handler, e.time - +new Date());
      }, _e.prototype.set = function (e, t) {
        this.f = t;
        var i = +new Date() + e;
        (!this.id || i < this.time) && (clearTimeout(this.id), this.id = setTimeout(this.handler, e), this.time = i);
      };
      function ee(e, t) {
        for (var i = 0; i < e.length; ++i) if (e[i] == t) return i;
        return -1;
      }
      u(ee, "indexOf");
      var Wn = 50,
        Nr = {
          toString: function () {
            return "CodeMirror.Pass";
          }
        },
        Me = {
          scroll: !1
        },
        vi = {
          origin: "*mouse"
        },
        Xt = {
          origin: "+move"
        };
      function gi(e, t, i) {
        for (var r = 0, n = 0;;) {
          var l = e.indexOf("	", r);
          l == -1 && (l = e.length);
          var o = l - r;
          if (l == e.length || n + o >= t) return r + Math.min(o, t - n);
          if (n += l - r, n += i - n % i, r = l + 1, n >= t) return r;
        }
      }
      u(gi, "findColumn");
      var Ar = [""];
      function yi(e) {
        for (; Ar.length <= e;) Ar.push(H(Ar) + " ");
        return Ar[e];
      }
      u(yi, "spaceStr");
      function H(e) {
        return e[e.length - 1];
      }
      u(H, "lst");
      function Or(e, t) {
        for (var i = [], r = 0; r < e.length; r++) i[r] = t(e[r], r);
        return i;
      }
      u(Or, "map");
      function Qo(e, t, i) {
        for (var r = 0, n = i(t); r < e.length && i(e[r]) <= n;) r++;
        e.splice(r, 0, t);
      }
      u(Qo, "insertSorted");
      function Hn() {}
      u(Hn, "nothing");
      function Fn(e, t) {
        var i;
        return Object.create ? i = Object.create(e) : (Hn.prototype = e, i = new Hn()), t && nt(t, i), i;
      }
      u(Fn, "createObj");
      var Jo = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
      function mi(e) {
        return /\w/.test(e) || e > "" && (e.toUpperCase() != e.toLowerCase() || Jo.test(e));
      }
      u(mi, "isWordCharBasic");
      function Wr(e, t) {
        return t ? t.source.indexOf("\\w") > -1 && mi(e) ? !0 : t.test(e) : mi(e);
      }
      u(Wr, "isWordChar");
      function Pn(e) {
        for (var t in e) if (e.hasOwnProperty(t) && e[t]) return !1;
        return !0;
      }
      u(Pn, "isEmpty");
      var jo = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;
      function bi(e) {
        return e.charCodeAt(0) >= 768 && jo.test(e);
      }
      u(bi, "isExtendingChar");
      function En(e, t, i) {
        for (; (i < 0 ? t > 0 : t < e.length) && bi(e.charAt(t));) t += i;
        return t;
      }
      u(En, "skipExtendingChars");
      function Yt(e, t, i) {
        for (var r = t > i ? -1 : 1;;) {
          if (t == i) return t;
          var n = (t + i) / 2,
            l = r < 0 ? Math.ceil(n) : Math.floor(n);
          if (l == t) return e(l) ? t : i;
          e(l) ? i = l : t = l + r;
        }
      }
      u(Yt, "findFirst");
      function Vo(e, t, i, r) {
        if (!e) return r(t, i, "ltr", 0);
        for (var n = !1, l = 0; l < e.length; ++l) {
          var o = e[l];
          (o.from < i && o.to > t || t == i && o.to == t) && (r(Math.max(o.from, t), Math.min(o.to, i), o.level == 1 ? "rtl" : "ltr", l), n = !0);
        }
        n || r(t, i, "ltr");
      }
      u(Vo, "iterateBidiSections");
      var qt = null;
      function Zt(e, t, i) {
        var _r2;
        var r;
        qt = null;
        for (var n = 0; n < e.length; ++n) {
          var l = e[n];
          if (l.from < t && l.to > t) return n;
          l.to == t && (l.from != l.to && i == "before" ? r = n : qt = n), l.from == t && (l.from != l.to && i != "before" ? r = n : qt = n);
        }
        return (_r2 = r) !== null && _r2 !== void 0 ? _r2 : qt;
      }
      u(Zt, "getBidiPartAt");
      var $o = function () {
        var e = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",
          t = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";
        function i(f) {
          return f <= 247 ? e.charAt(f) : 1424 <= f && f <= 1524 ? "R" : 1536 <= f && f <= 1785 ? t.charAt(f - 1536) : 1774 <= f && f <= 2220 ? "r" : 8192 <= f && f <= 8203 ? "w" : f == 8204 ? "b" : "L";
        }
        u(i, "charType");
        var r = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,
          n = /[stwN]/,
          l = /[LRr]/,
          o = /[Lb1n]/,
          a = /[1n]/;
        function s(f, h, c) {
          this.level = f, this.from = h, this.to = c;
        }
        return u(s, "BidiSpan"), function (f, h) {
          var c = h == "ltr" ? "L" : "R";
          if (f.length == 0 || h == "ltr" && !r.test(f)) return !1;
          for (var p = f.length, d = [], v = 0; v < p; ++v) d.push(i(f.charCodeAt(v)));
          for (var g = 0, m = c; g < p; ++g) {
            var b = d[g];
            b == "m" ? d[g] = m : m = b;
          }
          for (var C = 0, x = c; C < p; ++C) {
            var w = d[C];
            w == "1" && x == "r" ? d[C] = "n" : l.test(w) && (x = w, w == "r" && (d[C] = "R"));
          }
          for (var k = 1, L = d[0]; k < p - 1; ++k) {
            var A = d[k];
            A == "+" && L == "1" && d[k + 1] == "1" ? d[k] = "1" : A == "," && L == d[k + 1] && (L == "1" || L == "n") && (d[k] = L), L = A;
          }
          for (var E = 0; E < p; ++E) {
            var j = d[E];
            if (j == ",") d[E] = "N";else if (j == "%") {
              var B = void 0;
              for (B = E + 1; B < p && d[B] == "%"; ++B);
              for (var pe = E && d[E - 1] == "!" || B < p && d[B] == "1" ? "1" : "N", fe = E; fe < B; ++fe) d[fe] = pe;
              E = B - 1;
            }
          }
          for (var _ = 0, he = c; _ < p; ++_) {
            var $ = d[_];
            he == "L" && $ == "1" ? d[_] = "L" : l.test($) && (he = $);
          }
          for (var Y = 0; Y < p; ++Y) if (n.test(d[Y])) {
            var X = void 0;
            for (X = Y + 1; X < p && n.test(d[X]); ++X);
            for (var z = (Y ? d[Y - 1] : c) == "L", ce = (X < p ? d[X] : c) == "L", zt = z == ce ? z ? "L" : "R" : c, $e = Y; $e < X; ++$e) d[$e] = zt;
            Y = X - 1;
          }
          for (var re = [], We, V = 0; V < p;) if (o.test(d[V])) {
            var kn = V;
            for (++V; V < p && o.test(d[V]); ++V);
            re.push(new s(0, kn, V));
          } else {
            var Ge = V,
              gt = re.length,
              yt = h == "rtl" ? 1 : 0;
            for (++V; V < p && d[V] != "L"; ++V);
            for (var oe = Ge; oe < V;) if (a.test(d[oe])) {
              Ge < oe && (re.splice(gt, 0, new s(1, Ge, oe)), gt += yt);
              var Gt = oe;
              for (++oe; oe < V && a.test(d[oe]); ++oe);
              re.splice(gt, 0, new s(2, Gt, oe)), gt += yt, Ge = oe;
            } else ++oe;
            Ge < V && re.splice(gt, 0, new s(1, Ge, V));
          }
          return h == "ltr" && (re[0].level == 1 && (We = f.match(/^\s+/)) && (re[0].from = We[0].length, re.unshift(new s(0, 0, We[0].length))), H(re).level == 1 && (We = f.match(/\s+$/)) && (H(re).to -= We[0].length, re.push(new s(0, p - We[0].length, p)))), h == "rtl" ? re.reverse() : re;
        };
      }();
      function Pe(e, t) {
        var i = e.order;
        return i == null && (i = e.order = $o(e.text, t)), i;
      }
      u(Pe, "getOrder");
      var In = [],
        M = u(function (e, t, i) {
          if (e.addEventListener) e.addEventListener(t, i, !1);else if (e.attachEvent) e.attachEvent("on" + t, i);else {
            var r = e._handlers || (e._handlers = {});
            r[t] = (r[t] || In).concat(i);
          }
        }, "on");
      function xi(e, t) {
        return e._handlers && e._handlers[t] || In;
      }
      u(xi, "getHandlers");
      function ge(e, t, i) {
        if (e.removeEventListener) e.removeEventListener(t, i, !1);else if (e.detachEvent) e.detachEvent("on" + t, i);else {
          var r = e._handlers,
            n = r && r[t];
          if (n) {
            var l = ee(n, i);
            l > -1 && (r[t] = n.slice(0, l).concat(n.slice(l + 1)));
          }
        }
      }
      u(ge, "off");
      function U(e, t) {
        var i = xi(e, t);
        if (i.length) for (var r = Array.prototype.slice.call(arguments, 2), n = 0; n < i.length; ++n) i[n].apply(null, r);
      }
      u(U, "signal");
      function q(e, t, i) {
        return typeof t == "string" && (t = {
          type: t,
          preventDefault: function () {
            this.defaultPrevented = !0;
          }
        }), U(e, i || t.type, e, t), Ci(t) || t.codemirrorIgnore;
      }
      u(q, "signalDOMEvent");
      function Rn(e) {
        var t = e._handlers && e._handlers.cursorActivity;
        if (t) for (var i = e.curOp.cursorActivityHandlers || (e.curOp.cursorActivityHandlers = []), r = 0; r < t.length; ++r) ee(i, t[r]) == -1 && i.push(t[r]);
      }
      u(Rn, "signalCursorActivity");
      function Ce(e, t) {
        return xi(e, t).length > 0;
      }
      u(Ce, "hasHandler");
      function xt(e) {
        e.prototype.on = function (t, i) {
          M(this, t, i);
        }, e.prototype.off = function (t, i) {
          ge(this, t, i);
        };
      }
      u(xt, "eventMixin");
      function ae(e) {
        e.preventDefault ? e.preventDefault() : e.returnValue = !1;
      }
      u(ae, "e_preventDefault");
      function Bn(e) {
        e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0;
      }
      u(Bn, "e_stopPropagation");
      function Ci(e) {
        return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == !1;
      }
      u(Ci, "e_defaultPrevented");
      function Qt(e) {
        ae(e), Bn(e);
      }
      u(Qt, "e_stop");
      function wi(e) {
        return e.target || e.srcElement;
      }
      u(wi, "e_target");
      function zn(e) {
        var t = e.which;
        return t == null && (e.button & 1 ? t = 1 : e.button & 2 ? t = 3 : e.button & 4 && (t = 2)), me && e.ctrlKey && t == 1 && (t = 3), t;
      }
      u(zn, "e_button");
      var ea = function () {
          if (O && I < 9) return !1;
          var e = T("div");
          return "draggable" in e || "dragDrop" in e;
        }(),
        Si;
      function ta(e) {
        if (Si == null) {
          var t = T("span", "​");
          ve(e, T("span", [t, document.createTextNode("x")])), e.firstChild.offsetHeight != 0 && (Si = t.offsetWidth <= 1 && t.offsetHeight > 2 && !(O && I < 8));
        }
        var i = Si ? T("span", "​") : T("span", " ", null, "display: inline-block; width: 1px; margin-right: -1px");
        return i.setAttribute("cm-text", ""), i;
      }
      u(ta, "zeroWidthElement");
      var Li;
      function ra(e) {
        if (Li != null) return Li;
        var t = ve(e, document.createTextNode("AخA")),
          i = rt(t, 0, 1).getBoundingClientRect(),
          r = rt(t, 1, 2).getBoundingClientRect();
        return Ue(e), !i || i.left == i.right ? !1 : Li = r.right - i.right < 3;
      }
      u(ra, "hasBadBidiRects");
      var ki = `

b`.split(/\n/).length != 3 ? function (e) {
          for (var t = 0, i = [], r = e.length; t <= r;) {
            var n = e.indexOf(`
`, t);
            n == -1 && (n = e.length);
            var l = e.slice(t, e.charAt(n - 1) == "\r" ? n - 1 : n),
              o = l.indexOf("\r");
            o != -1 ? (i.push(l.slice(0, o)), t += o + 1) : (i.push(l), t = n + 1);
          }
          return i;
        } : function (e) {
          return e.split(/\r\n?|\n/);
        },
        ia = window.getSelection ? function (e) {
          try {
            return e.selectionStart != e.selectionEnd;
          } catch {
            return !1;
          }
        } : function (e) {
          var t;
          try {
            t = e.ownerDocument.selection.createRange();
          } catch {}
          return !t || t.parentElement() != e ? !1 : t.compareEndPoints("StartToEnd", t) != 0;
        },
        na = function () {
          var e = T("div");
          return "oncopy" in e ? !0 : (e.setAttribute("oncopy", "return;"), typeof e.oncopy == "function");
        }(),
        Ti = null;
      function la(e) {
        if (Ti != null) return Ti;
        var t = ve(e, T("span", "x")),
          i = t.getBoundingClientRect(),
          r = rt(t, 0, 1).getBoundingClientRect();
        return Ti = Math.abs(i.left - r.left) > 1;
      }
      u(la, "hasBadZoomedRects");
      var Mi = {},
        Ct = {};
      function oa(e, t) {
        arguments.length > 2 && (t.dependencies = Array.prototype.slice.call(arguments, 2)), Mi[e] = t;
      }
      u(oa, "defineMode");
      function aa(e, t) {
        Ct[e] = t;
      }
      u(aa, "defineMIME");
      function Hr(e) {
        if (typeof e == "string" && Ct.hasOwnProperty(e)) e = Ct[e];else if (e && typeof e.name == "string" && Ct.hasOwnProperty(e.name)) {
          var t = Ct[e.name];
          typeof t == "string" && (t = {
            name: t
          }), e = Fn(t, e), e.name = t.name;
        } else {
          if (typeof e == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(e)) return Hr("application/xml");
          if (typeof e == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(e)) return Hr("application/json");
        }
        return typeof e == "string" ? {
          name: e
        } : e || {
          name: "null"
        };
      }
      u(Hr, "resolveMode");
      function Di(e, t) {
        t = Hr(t);
        var i = Mi[t.name];
        if (!i) return Di(e, "text/plain");
        var r = i(e, t);
        if (wt.hasOwnProperty(t.name)) {
          var n = wt[t.name];
          for (var l in n) n.hasOwnProperty(l) && (r.hasOwnProperty(l) && (r["_" + l] = r[l]), r[l] = n[l]);
        }
        if (r.name = t.name, t.helperType && (r.helperType = t.helperType), t.modeProps) for (var o in t.modeProps) r[o] = t.modeProps[o];
        return r;
      }
      u(Di, "getMode");
      var wt = {};
      function sa(e, t) {
        var i = wt.hasOwnProperty(e) ? wt[e] : wt[e] = {};
        nt(t, i);
      }
      u(sa, "extendMode");
      function lt(e, t) {
        if (t === !0) return t;
        if (e.copyState) return e.copyState(t);
        var i = {};
        for (var r in t) {
          var n = t[r];
          n instanceof Array && (n = n.concat([])), i[r] = n;
        }
        return i;
      }
      u(lt, "copyState");
      function Ni(e, t) {
        for (var i; e.innerMode && (i = e.innerMode(t), !(!i || i.mode == e));) t = i.state, e = i.mode;
        return i || {
          mode: e,
          state: t
        };
      }
      u(Ni, "innerMode");
      function Gn(e, t, i) {
        return e.startState ? e.startState(t, i) : !0;
      }
      u(Gn, "startState");
      var K = u(function (e, t, i) {
        this.pos = this.start = 0, this.string = e, this.tabSize = t || 8, this.lastColumnPos = this.lastColumnValue = 0, this.lineStart = 0, this.lineOracle = i;
      }, "StringStream");
      K.prototype.eol = function () {
        return this.pos >= this.string.length;
      }, K.prototype.sol = function () {
        return this.pos == this.lineStart;
      }, K.prototype.peek = function () {
        return this.string.charAt(this.pos) || void 0;
      }, K.prototype.next = function () {
        if (this.pos < this.string.length) return this.string.charAt(this.pos++);
      }, K.prototype.eat = function (e) {
        var t = this.string.charAt(this.pos),
          i;
        if (typeof e == "string" ? i = t == e : i = t && (e.test ? e.test(t) : e(t)), i) return ++this.pos, t;
      }, K.prototype.eatWhile = function (e) {
        for (var t = this.pos; this.eat(e););
        return this.pos > t;
      }, K.prototype.eatSpace = function () {
        for (var e = this.pos; /[\s\u00a0]/.test(this.string.charAt(this.pos));) ++this.pos;
        return this.pos > e;
      }, K.prototype.skipToEnd = function () {
        this.pos = this.string.length;
      }, K.prototype.skipTo = function (e) {
        var t = this.string.indexOf(e, this.pos);
        if (t > -1) return this.pos = t, !0;
      }, K.prototype.backUp = function (e) {
        this.pos -= e;
      }, K.prototype.column = function () {
        return this.lastColumnPos < this.start && (this.lastColumnValue = xe(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue), this.lastColumnPos = this.start), this.lastColumnValue - (this.lineStart ? xe(this.string, this.lineStart, this.tabSize) : 0);
      }, K.prototype.indentation = function () {
        return xe(this.string, null, this.tabSize) - (this.lineStart ? xe(this.string, this.lineStart, this.tabSize) : 0);
      }, K.prototype.match = function (e, t, i) {
        if (typeof e == "string") {
          var r = u(function (o) {
              return i ? o.toLowerCase() : o;
            }, "cased"),
            n = this.string.substr(this.pos, e.length);
          if (r(n) == r(e)) return t !== !1 && (this.pos += e.length), !0;
        } else {
          var l = this.string.slice(this.pos).match(e);
          return l && l.index > 0 ? null : (l && t !== !1 && (this.pos += l[0].length), l);
        }
      }, K.prototype.current = function () {
        return this.string.slice(this.start, this.pos);
      }, K.prototype.hideFirstChars = function (e, t) {
        this.lineStart += e;
        try {
          return t();
        } finally {
          this.lineStart -= e;
        }
      }, K.prototype.lookAhead = function (e) {
        var t = this.lineOracle;
        return t && t.lookAhead(e);
      }, K.prototype.baseToken = function () {
        var e = this.lineOracle;
        return e && e.baseToken(this.pos);
      };
      function S(e, t) {
        if (t -= e.first, t < 0 || t >= e.size) throw new Error("There is no line " + (t + e.first) + " in the document.");
        for (var i = e; !i.lines;) for (var r = 0;; ++r) {
          var n = i.children[r],
            l = n.chunkSize();
          if (t < l) {
            i = n;
            break;
          }
          t -= l;
        }
        return i.lines[t];
      }
      u(S, "getLine");
      function ot(e, t, i) {
        var r = [],
          n = t.line;
        return e.iter(t.line, i.line + 1, function (l) {
          var o = l.text;
          n == i.line && (o = o.slice(0, i.ch)), n == t.line && (o = o.slice(t.ch)), r.push(o), ++n;
        }), r;
      }
      u(ot, "getBetween");
      function Ai(e, t, i) {
        var r = [];
        return e.iter(t, i, function (n) {
          r.push(n.text);
        }), r;
      }
      u(Ai, "getLines");
      function De(e, t) {
        var i = t - e.height;
        if (i) for (var r = e; r; r = r.parent) r.height += i;
      }
      u(De, "updateLineHeight");
      function F(e) {
        if (e.parent == null) return null;
        for (var t = e.parent, i = ee(t.lines, e), r = t.parent; r; t = r, r = r.parent) for (var n = 0; r.children[n] != t; ++n) i += r.children[n].chunkSize();
        return i + t.first;
      }
      u(F, "lineNo");
      function at(e, t) {
        var i = e.first;
        e: do {
          for (var r = 0; r < e.children.length; ++r) {
            var n = e.children[r],
              l = n.height;
            if (t < l) {
              e = n;
              continue e;
            }
            t -= l, i += n.chunkSize();
          }
          return i;
        } while (!e.lines);
        for (var o = 0; o < e.lines.length; ++o) {
          var a = e.lines[o],
            s = a.height;
          if (t < s) break;
          t -= s;
        }
        return i + o;
      }
      u(at, "lineAtHeight");
      function Jt(e, t) {
        return t >= e.first && t < e.first + e.size;
      }
      u(Jt, "isLine");
      function Oi(e, t) {
        return String(e.lineNumberFormatter(t + e.firstLineNumber));
      }
      u(Oi, "lineNumberFor");
      function y(e, t, i) {
        if (i === void 0 && (i = null), !(this instanceof y)) return new y(e, t, i);
        this.line = e, this.ch = t, this.sticky = i;
      }
      u(y, "Pos");
      function D(e, t) {
        return e.line - t.line || e.ch - t.ch;
      }
      u(D, "cmp");
      function Wi(e, t) {
        return e.sticky == t.sticky && D(e, t) == 0;
      }
      u(Wi, "equalCursorPos");
      function Hi(e) {
        return y(e.line, e.ch);
      }
      u(Hi, "copyPos");
      function Fr(e, t) {
        return D(e, t) < 0 ? t : e;
      }
      u(Fr, "maxPos");
      function Pr(e, t) {
        return D(e, t) < 0 ? e : t;
      }
      u(Pr, "minPos");
      function Un(e, t) {
        return Math.max(e.first, Math.min(t, e.first + e.size - 1));
      }
      u(Un, "clipLine");
      function N(e, t) {
        if (t.line < e.first) return y(e.first, 0);
        var i = e.first + e.size - 1;
        return t.line > i ? y(i, S(e, i).text.length) : ua(t, S(e, t.line).text.length);
      }
      u(N, "clipPos");
      function ua(e, t) {
        var i = e.ch;
        return i == null || i > t ? y(e.line, t) : i < 0 ? y(e.line, 0) : e;
      }
      u(ua, "clipToLen");
      function Kn(e, t) {
        for (var i = [], r = 0; r < t.length; r++) i[r] = N(e, t[r]);
        return i;
      }
      u(Kn, "clipPosArray");
      var Er = u(function (e, t) {
          this.state = e, this.lookAhead = t;
        }, "SavedContext"),
        Ne = u(function (e, t, i, r) {
          this.state = t, this.doc = e, this.line = i, this.maxLookAhead = r || 0, this.baseTokens = null, this.baseTokenPos = 1;
        }, "Context");
      Ne.prototype.lookAhead = function (e) {
        var t = this.doc.getLine(this.line + e);
        return t != null && e > this.maxLookAhead && (this.maxLookAhead = e), t;
      }, Ne.prototype.baseToken = function (e) {
        if (!this.baseTokens) return null;
        for (; this.baseTokens[this.baseTokenPos] <= e;) this.baseTokenPos += 2;
        var t = this.baseTokens[this.baseTokenPos + 1];
        return {
          type: t && t.replace(/( |^)overlay .*/, ""),
          size: this.baseTokens[this.baseTokenPos] - e
        };
      }, Ne.prototype.nextLine = function () {
        this.line++, this.maxLookAhead > 0 && this.maxLookAhead--;
      }, Ne.fromSaved = function (e, t, i) {
        return t instanceof Er ? new Ne(e, lt(e.mode, t.state), i, t.lookAhead) : new Ne(e, lt(e.mode, t), i);
      }, Ne.prototype.save = function (e) {
        var t = e !== !1 ? lt(this.doc.mode, this.state) : this.state;
        return this.maxLookAhead > 0 ? new Er(t, this.maxLookAhead) : t;
      };
      function _n(e, t, i, r) {
        var n = [e.state.modeGen],
          l = {};
        Jn(e, t.text, e.doc.mode, i, function (f, h) {
          return n.push(f, h);
        }, l, r);
        for (var o = i.state, a = u(function (f) {
            i.baseTokens = n;
            var h = e.state.overlays[f],
              c = 1,
              p = 0;
            i.state = !0, Jn(e, t.text, h.mode, i, function (d, v) {
              for (var g = c; p < d;) {
                var m = n[c];
                m > d && n.splice(c, 1, d, n[c + 1], m), c += 2, p = Math.min(d, m);
              }
              if (v) if (h.opaque) n.splice(g, c - g, d, "overlay " + v), c = g + 2;else for (; g < c; g += 2) {
                var b = n[g + 1];
                n[g + 1] = (b ? b + " " : "") + "overlay " + v;
              }
            }, l), i.state = o, i.baseTokens = null, i.baseTokenPos = 1;
          }, "loop"), s = 0; s < e.state.overlays.length; ++s) a(s);
        return {
          styles: n,
          classes: l.bgClass || l.textClass ? l : null
        };
      }
      u(_n, "highlightLine");
      function Xn(e, t, i) {
        if (!t.styles || t.styles[0] != e.state.modeGen) {
          var r = jt(e, F(t)),
            n = t.text.length > e.options.maxHighlightLength && lt(e.doc.mode, r.state),
            l = _n(e, t, r);
          n && (r.state = n), t.stateAfter = r.save(!n), t.styles = l.styles, l.classes ? t.styleClasses = l.classes : t.styleClasses && (t.styleClasses = null), i === e.doc.highlightFrontier && (e.doc.modeFrontier = Math.max(e.doc.modeFrontier, ++e.doc.highlightFrontier));
        }
        return t.styles;
      }
      u(Xn, "getLineStyles");
      function jt(e, t, i) {
        var r = e.doc,
          n = e.display;
        if (!r.mode.startState) return new Ne(r, !0, t);
        var l = fa(e, t, i),
          o = l > r.first && S(r, l - 1).stateAfter,
          a = o ? Ne.fromSaved(r, o, l) : new Ne(r, Gn(r.mode), l);
        return r.iter(l, t, function (s) {
          Fi(e, s.text, a);
          var f = a.line;
          s.stateAfter = f == t - 1 || f % 5 == 0 || f >= n.viewFrom && f < n.viewTo ? a.save() : null, a.nextLine();
        }), i && (r.modeFrontier = a.line), a;
      }
      u(jt, "getContextBefore");
      function Fi(e, t, i, r) {
        var n = e.doc.mode,
          l = new K(t, e.options.tabSize, i);
        for (l.start = l.pos = r || 0, t == "" && Yn(n, i.state); !l.eol();) Pi(n, l, i.state), l.start = l.pos;
      }
      u(Fi, "processLine");
      function Yn(e, t) {
        if (e.blankLine) return e.blankLine(t);
        if (e.innerMode) {
          var i = Ni(e, t);
          if (i.mode.blankLine) return i.mode.blankLine(i.state);
        }
      }
      u(Yn, "callBlankLine");
      function Pi(e, t, i, r) {
        for (var n = 0; n < 10; n++) {
          r && (r[0] = Ni(e, i).mode);
          var l = e.token(t, i);
          if (t.pos > t.start) return l;
        }
        throw new Error("Mode " + e.name + " failed to advance stream.");
      }
      u(Pi, "readToken");
      var qn = u(function (e, t, i) {
        this.start = e.start, this.end = e.pos, this.string = e.current(), this.type = t || null, this.state = i;
      }, "Token");
      function Zn(e, t, i, r) {
        var n = e.doc,
          l = n.mode,
          o;
        t = N(n, t);
        var a = S(n, t.line),
          s = jt(e, t.line, i),
          f = new K(a.text, e.options.tabSize, s),
          h;
        for (r && (h = []); (r || f.pos < t.ch) && !f.eol();) f.start = f.pos, o = Pi(l, f, s.state), r && h.push(new qn(f, o, lt(n.mode, s.state)));
        return r ? h : new qn(f, o, s.state);
      }
      u(Zn, "takeToken");
      function Qn(e, t) {
        if (e) for (;;) {
          var i = e.match(/(?:^|\s+)line-(background-)?(\S+)/);
          if (!i) break;
          e = e.slice(0, i.index) + e.slice(i.index + i[0].length);
          var r = i[1] ? "bgClass" : "textClass";
          t[r] == null ? t[r] = i[2] : new RegExp("(?:^|\\s)" + i[2] + "(?:$|\\s)").test(t[r]) || (t[r] += " " + i[2]);
        }
        return e;
      }
      u(Qn, "extractLineClasses");
      function Jn(e, t, i, r, n, l, o) {
        var a = i.flattenSpans;
        a == null && (a = e.options.flattenSpans);
        var s = 0,
          f = null,
          h = new K(t, e.options.tabSize, r),
          c,
          p = e.options.addModeClass && [null];
        for (t == "" && Qn(Yn(i, r.state), l); !h.eol();) {
          if (h.pos > e.options.maxHighlightLength ? (a = !1, o && Fi(e, t, r, h.pos), h.pos = t.length, c = null) : c = Qn(Pi(i, h, r.state, p), l), p) {
            var d = p[0].name;
            d && (c = "m-" + (c ? d + " " + c : d));
          }
          if (!a || f != c) {
            for (; s < h.start;) s = Math.min(h.start, s + 5e3), n(s, f);
            f = c;
          }
          h.start = h.pos;
        }
        for (; s < h.pos;) {
          var v = Math.min(h.pos, s + 5e3);
          n(v, f), s = v;
        }
      }
      u(Jn, "runMode");
      function fa(e, t, i) {
        for (var r, n, l = e.doc, o = i ? -1 : t - (e.doc.mode.innerMode ? 1e3 : 100), a = t; a > o; --a) {
          if (a <= l.first) return l.first;
          var s = S(l, a - 1),
            f = s.stateAfter;
          if (f && (!i || a + (f instanceof Er ? f.lookAhead : 0) <= l.modeFrontier)) return a;
          var h = xe(s.text, null, e.options.tabSize);
          (n == null || r > h) && (n = a - 1, r = h);
        }
        return n;
      }
      u(fa, "findStartLine");
      function ha(e, t) {
        if (e.modeFrontier = Math.min(e.modeFrontier, t), !(e.highlightFrontier < t - 10)) {
          for (var i = e.first, r = t - 1; r > i; r--) {
            var n = S(e, r).stateAfter;
            if (n && (!(n instanceof Er) || r + n.lookAhead < t)) {
              i = r + 1;
              break;
            }
          }
          e.highlightFrontier = Math.min(e.highlightFrontier, i);
        }
      }
      u(ha, "retreatFrontier");
      var jn = !1,
        Ee = !1;
      function ca() {
        jn = !0;
      }
      u(ca, "seeReadOnlySpans");
      function da() {
        Ee = !0;
      }
      u(da, "seeCollapsedSpans");
      function Ir(e, t, i) {
        this.marker = e, this.from = t, this.to = i;
      }
      u(Ir, "MarkedSpan");
      function Vt(e, t) {
        if (e) for (var i = 0; i < e.length; ++i) {
          var r = e[i];
          if (r.marker == t) return r;
        }
      }
      u(Vt, "getMarkedSpanFor");
      function pa(e, t) {
        for (var i, r = 0; r < e.length; ++r) e[r] != t && (i || (i = [])).push(e[r]);
        return i;
      }
      u(pa, "removeMarkedSpan");
      function va(e, t, i) {
        var r = i && window.WeakSet && (i.markedSpans || (i.markedSpans = new WeakSet()));
        r && e.markedSpans && r.has(e.markedSpans) ? e.markedSpans.push(t) : (e.markedSpans = e.markedSpans ? e.markedSpans.concat([t]) : [t], r && r.add(e.markedSpans)), t.marker.attachLine(e);
      }
      u(va, "addMarkedSpan");
      function ga(e, t, i) {
        var r;
        if (e) for (var n = 0; n < e.length; ++n) {
          var l = e[n],
            o = l.marker,
            a = l.from == null || (o.inclusiveLeft ? l.from <= t : l.from < t);
          if (a || l.from == t && o.type == "bookmark" && (!i || !l.marker.insertLeft)) {
            var s = l.to == null || (o.inclusiveRight ? l.to >= t : l.to > t);
            (r || (r = [])).push(new Ir(o, l.from, s ? null : l.to));
          }
        }
        return r;
      }
      u(ga, "markedSpansBefore");
      function ya(e, t, i) {
        var r;
        if (e) for (var n = 0; n < e.length; ++n) {
          var l = e[n],
            o = l.marker,
            a = l.to == null || (o.inclusiveRight ? l.to >= t : l.to > t);
          if (a || l.from == t && o.type == "bookmark" && (!i || l.marker.insertLeft)) {
            var s = l.from == null || (o.inclusiveLeft ? l.from <= t : l.from < t);
            (r || (r = [])).push(new Ir(o, s ? null : l.from - t, l.to == null ? null : l.to - t));
          }
        }
        return r;
      }
      u(ya, "markedSpansAfter");
      function Ei(e, t) {
        if (t.full) return null;
        var i = Jt(e, t.from.line) && S(e, t.from.line).markedSpans,
          r = Jt(e, t.to.line) && S(e, t.to.line).markedSpans;
        if (!i && !r) return null;
        var n = t.from.ch,
          l = t.to.ch,
          o = D(t.from, t.to) == 0,
          a = ga(i, n, o),
          s = ya(r, l, o),
          f = t.text.length == 1,
          h = H(t.text).length + (f ? n : 0);
        if (a) for (var c = 0; c < a.length; ++c) {
          var p = a[c];
          if (p.to == null) {
            var d = Vt(s, p.marker);
            d ? f && (p.to = d.to == null ? null : d.to + h) : p.to = n;
          }
        }
        if (s) for (var v = 0; v < s.length; ++v) {
          var g = s[v];
          if (g.to != null && (g.to += h), g.from == null) {
            var m = Vt(a, g.marker);
            m || (g.from = h, f && (a || (a = [])).push(g));
          } else g.from += h, f && (a || (a = [])).push(g);
        }
        a && (a = Vn(a)), s && s != a && (s = Vn(s));
        var b = [a];
        if (!f) {
          var C = t.text.length - 2,
            x;
          if (C > 0 && a) for (var w = 0; w < a.length; ++w) a[w].to == null && (x || (x = [])).push(new Ir(a[w].marker, null, null));
          for (var k = 0; k < C; ++k) b.push(x);
          b.push(s);
        }
        return b;
      }
      u(Ei, "stretchSpansOverChange");
      function Vn(e) {
        for (var t = 0; t < e.length; ++t) {
          var i = e[t];
          i.from != null && i.from == i.to && i.marker.clearWhenEmpty !== !1 && e.splice(t--, 1);
        }
        return e.length ? e : null;
      }
      u(Vn, "clearEmptySpans");
      function ma(e, t, i) {
        var r = null;
        if (e.iter(t.line, i.line + 1, function (d) {
          if (d.markedSpans) for (var v = 0; v < d.markedSpans.length; ++v) {
            var g = d.markedSpans[v].marker;
            g.readOnly && (!r || ee(r, g) == -1) && (r || (r = [])).push(g);
          }
        }), !r) return null;
        for (var n = [{
            from: t,
            to: i
          }], l = 0; l < r.length; ++l) for (var o = r[l], a = o.find(0), s = 0; s < n.length; ++s) {
          var f = n[s];
          if (!(D(f.to, a.from) < 0 || D(f.from, a.to) > 0)) {
            var h = [s, 1],
              c = D(f.from, a.from),
              p = D(f.to, a.to);
            (c < 0 || !o.inclusiveLeft && !c) && h.push({
              from: f.from,
              to: a.from
            }), (p > 0 || !o.inclusiveRight && !p) && h.push({
              from: a.to,
              to: f.to
            }), n.splice.apply(n, h), s += h.length - 3;
          }
        }
        return n;
      }
      u(ma, "removeReadOnlyRanges");
      function $n(e) {
        var t = e.markedSpans;
        if (t) {
          for (var i = 0; i < t.length; ++i) t[i].marker.detachLine(e);
          e.markedSpans = null;
        }
      }
      u($n, "detachMarkedSpans");
      function el(e, t) {
        if (t) {
          for (var i = 0; i < t.length; ++i) t[i].marker.attachLine(e);
          e.markedSpans = t;
        }
      }
      u(el, "attachMarkedSpans");
      function Rr(e) {
        return e.inclusiveLeft ? -1 : 0;
      }
      u(Rr, "extraLeft");
      function Br(e) {
        return e.inclusiveRight ? 1 : 0;
      }
      u(Br, "extraRight");
      function Ii(e, t) {
        var i = e.lines.length - t.lines.length;
        if (i != 0) return i;
        var r = e.find(),
          n = t.find(),
          l = D(r.from, n.from) || Rr(e) - Rr(t);
        if (l) return -l;
        var o = D(r.to, n.to) || Br(e) - Br(t);
        return o || t.id - e.id;
      }
      u(Ii, "compareCollapsedMarkers");
      function tl(e, t) {
        var i = Ee && e.markedSpans,
          r;
        if (i) for (var n = void 0, l = 0; l < i.length; ++l) n = i[l], n.marker.collapsed && (t ? n.from : n.to) == null && (!r || Ii(r, n.marker) < 0) && (r = n.marker);
        return r;
      }
      u(tl, "collapsedSpanAtSide");
      function rl(e) {
        return tl(e, !0);
      }
      u(rl, "collapsedSpanAtStart");
      function zr(e) {
        return tl(e, !1);
      }
      u(zr, "collapsedSpanAtEnd");
      function ba(e, t) {
        var i = Ee && e.markedSpans,
          r;
        if (i) for (var n = 0; n < i.length; ++n) {
          var l = i[n];
          l.marker.collapsed && (l.from == null || l.from < t) && (l.to == null || l.to > t) && (!r || Ii(r, l.marker) < 0) && (r = l.marker);
        }
        return r;
      }
      u(ba, "collapsedSpanAround");
      function il(e, t, i, r, n) {
        var l = S(e, t),
          o = Ee && l.markedSpans;
        if (o) for (var a = 0; a < o.length; ++a) {
          var s = o[a];
          if (s.marker.collapsed) {
            var f = s.marker.find(0),
              h = D(f.from, i) || Rr(s.marker) - Rr(n),
              c = D(f.to, r) || Br(s.marker) - Br(n);
            if (!(h >= 0 && c <= 0 || h <= 0 && c >= 0) && (h <= 0 && (s.marker.inclusiveRight && n.inclusiveLeft ? D(f.to, i) >= 0 : D(f.to, i) > 0) || h >= 0 && (s.marker.inclusiveRight && n.inclusiveLeft ? D(f.from, r) <= 0 : D(f.from, r) < 0))) return !0;
          }
        }
      }
      u(il, "conflictingCollapsedRange");
      function Se(e) {
        for (var t; t = rl(e);) e = t.find(-1, !0).line;
        return e;
      }
      u(Se, "visualLine");
      function xa(e) {
        for (var t; t = zr(e);) e = t.find(1, !0).line;
        return e;
      }
      u(xa, "visualLineEnd");
      function Ca(e) {
        for (var t, i; t = zr(e);) e = t.find(1, !0).line, (i || (i = [])).push(e);
        return i;
      }
      u(Ca, "visualLineContinued");
      function Ri(e, t) {
        var i = S(e, t),
          r = Se(i);
        return i == r ? t : F(r);
      }
      u(Ri, "visualLineNo");
      function nl(e, t) {
        if (t > e.lastLine()) return t;
        var i = S(e, t),
          r;
        if (!Xe(e, i)) return t;
        for (; r = zr(i);) i = r.find(1, !0).line;
        return F(i) + 1;
      }
      u(nl, "visualLineEndNo");
      function Xe(e, t) {
        var i = Ee && t.markedSpans;
        if (i) {
          for (var r = void 0, n = 0; n < i.length; ++n) if (r = i[n], !!r.marker.collapsed) {
            if (r.from == null) return !0;
            if (!r.marker.widgetNode && r.from == 0 && r.marker.inclusiveLeft && Bi(e, t, r)) return !0;
          }
        }
      }
      u(Xe, "lineIsHidden");
      function Bi(e, t, i) {
        if (i.to == null) {
          var r = i.marker.find(1, !0);
          return Bi(e, r.line, Vt(r.line.markedSpans, i.marker));
        }
        if (i.marker.inclusiveRight && i.to == t.text.length) return !0;
        for (var n = void 0, l = 0; l < t.markedSpans.length; ++l) if (n = t.markedSpans[l], n.marker.collapsed && !n.marker.widgetNode && n.from == i.to && (n.to == null || n.to != i.from) && (n.marker.inclusiveLeft || i.marker.inclusiveRight) && Bi(e, t, n)) return !0;
      }
      u(Bi, "lineIsHiddenInner");
      function Ie(e) {
        e = Se(e);
        for (var t = 0, i = e.parent, r = 0; r < i.lines.length; ++r) {
          var n = i.lines[r];
          if (n == e) break;
          t += n.height;
        }
        for (var l = i.parent; l; i = l, l = i.parent) for (var o = 0; o < l.children.length; ++o) {
          var a = l.children[o];
          if (a == i) break;
          t += a.height;
        }
        return t;
      }
      u(Ie, "heightAtLine");
      function Gr(e) {
        if (e.height == 0) return 0;
        for (var t = e.text.length, i, r = e; i = rl(r);) {
          var n = i.find(0, !0);
          r = n.from.line, t += n.from.ch - n.to.ch;
        }
        for (r = e; i = zr(r);) {
          var l = i.find(0, !0);
          t -= r.text.length - l.from.ch, r = l.to.line, t += r.text.length - l.to.ch;
        }
        return t;
      }
      u(Gr, "lineLength");
      function zi(e) {
        var t = e.display,
          i = e.doc;
        t.maxLine = S(i, i.first), t.maxLineLength = Gr(t.maxLine), t.maxLineChanged = !0, i.iter(function (r) {
          var n = Gr(r);
          n > t.maxLineLength && (t.maxLineLength = n, t.maxLine = r);
        });
      }
      u(zi, "findMaxLine");
      var St = u(function (e, t, i) {
        this.text = e, el(this, t), this.height = i ? i(this) : 1;
      }, "Line");
      St.prototype.lineNo = function () {
        return F(this);
      }, xt(St);
      function wa(e, t, i, r) {
        e.text = t, e.stateAfter && (e.stateAfter = null), e.styles && (e.styles = null), e.order != null && (e.order = null), $n(e), el(e, i);
        var n = r ? r(e) : 1;
        n != e.height && De(e, n);
      }
      u(wa, "updateLine");
      function Sa(e) {
        e.parent = null, $n(e);
      }
      u(Sa, "cleanUpLine");
      var La = {},
        ka = {};
      function ll(e, t) {
        if (!e || /^\s*$/.test(e)) return null;
        var i = t.addModeClass ? ka : La;
        return i[e] || (i[e] = e.replace(/\S+/g, "cm-$&"));
      }
      u(ll, "interpretTokenStyle");
      function ol(e, t) {
        var i = bt("span", null, null, ne ? "padding-right: .1px" : null),
          r = {
            pre: bt("pre", [i], "CodeMirror-line"),
            content: i,
            col: 0,
            pos: 0,
            cm: e,
            trailingSpace: !1,
            splitSpaces: e.getOption("lineWrapping")
          };
        t.measure = {};
        for (var n = 0; n <= (t.rest ? t.rest.length : 0); n++) {
          var l = n ? t.rest[n - 1] : t.line,
            o = void 0;
          r.pos = 0, r.addToken = Ma, ra(e.display.measure) && (o = Pe(l, e.doc.direction)) && (r.addToken = Na(r.addToken, o)), r.map = [];
          var a = t != e.display.externalMeasured && F(l);
          Aa(l, r, Xn(e, l, a)), l.styleClasses && (l.styleClasses.bgClass && (r.bgClass = di(l.styleClasses.bgClass, r.bgClass || "")), l.styleClasses.textClass && (r.textClass = di(l.styleClasses.textClass, r.textClass || ""))), r.map.length == 0 && r.map.push(0, 0, r.content.appendChild(ta(e.display.measure))), n == 0 ? (t.measure.map = r.map, t.measure.cache = {}) : ((t.measure.maps || (t.measure.maps = [])).push(r.map), (t.measure.caches || (t.measure.caches = [])).push({}));
        }
        if (ne) {
          var s = r.content.lastChild;
          (/\bcm-tab\b/.test(s.className) || s.querySelector && s.querySelector(".cm-tab")) && (r.content.className = "cm-tab-wrap-hack");
        }
        return U(e, "renderLine", e, t.line, r.pre), r.pre.className && (r.textClass = di(r.pre.className, r.textClass || "")), r;
      }
      u(ol, "buildLineContent");
      function Ta(e) {
        var t = T("span", "•", "cm-invalidchar");
        return t.title = "\\u" + e.charCodeAt(0).toString(16), t.setAttribute("aria-label", t.title), t;
      }
      u(Ta, "defaultSpecialCharPlaceholder");
      function Ma(e, t, i, r, n, l, o) {
        if (t) {
          var a = e.splitSpaces ? Da(t, e.trailingSpace) : t,
            s = e.cm.state.specialChars,
            f = !1,
            h;
          if (!s.test(t)) e.col += t.length, h = document.createTextNode(a), e.map.push(e.pos, e.pos + t.length, h), O && I < 9 && (f = !0), e.pos += t.length;else {
            h = document.createDocumentFragment();
            for (var c = 0;;) {
              s.lastIndex = c;
              var p = s.exec(t),
                d = p ? p.index - c : t.length - c;
              if (d) {
                var v = document.createTextNode(a.slice(c, c + d));
                O && I < 9 ? h.appendChild(T("span", [v])) : h.appendChild(v), e.map.push(e.pos, e.pos + d, v), e.col += d, e.pos += d;
              }
              if (!p) break;
              c += d + 1;
              var g = void 0;
              if (p[0] == "	") {
                var m = e.cm.options.tabSize,
                  b = m - e.col % m;
                g = h.appendChild(T("span", yi(b), "cm-tab")), g.setAttribute("role", "presentation"), g.setAttribute("cm-text", "	"), e.col += b;
              } else p[0] == "\r" || p[0] == `
` ? (g = h.appendChild(T("span", p[0] == "\r" ? "␍" : "␤", "cm-invalidchar")), g.setAttribute("cm-text", p[0]), e.col += 1) : (g = e.cm.options.specialCharPlaceholder(p[0]), g.setAttribute("cm-text", p[0]), O && I < 9 ? h.appendChild(T("span", [g])) : h.appendChild(g), e.col += 1);
              e.map.push(e.pos, e.pos + 1, g), e.pos++;
            }
          }
          if (e.trailingSpace = a.charCodeAt(t.length - 1) == 32, i || r || n || f || l || o) {
            var C = i || "";
            r && (C += r), n && (C += n);
            var x = T("span", [h], C, l);
            if (o) for (var w in o) o.hasOwnProperty(w) && w != "style" && w != "class" && x.setAttribute(w, o[w]);
            return e.content.appendChild(x);
          }
          e.content.appendChild(h);
        }
      }
      u(Ma, "buildToken");
      function Da(e, t) {
        if (e.length > 1 && !/  /.test(e)) return e;
        for (var i = t, r = "", n = 0; n < e.length; n++) {
          var l = e.charAt(n);
          l == " " && i && (n == e.length - 1 || e.charCodeAt(n + 1) == 32) && (l = " "), r += l, i = l == " ";
        }
        return r;
      }
      u(Da, "splitSpaces");
      function Na(e, t) {
        return function (i, r, n, l, o, a, s) {
          n = n ? n + " cm-force-border" : "cm-force-border";
          for (var f = i.pos, h = f + r.length;;) {
            for (var c = void 0, p = 0; p < t.length && (c = t[p], !(c.to > f && c.from <= f)); p++);
            if (c.to >= h) return e(i, r, n, l, o, a, s);
            e(i, r.slice(0, c.to - f), n, l, null, a, s), l = null, r = r.slice(c.to - f), f = c.to;
          }
        };
      }
      u(Na, "buildTokenBadBidi");
      function al(e, t, i, r) {
        var n = !r && i.widgetNode;
        n && e.map.push(e.pos, e.pos + t, n), !r && e.cm.display.input.needsContentAttribute && (n || (n = e.content.appendChild(document.createElement("span"))), n.setAttribute("cm-marker", i.id)), n && (e.cm.display.input.setUneditable(n), e.content.appendChild(n)), e.pos += t, e.trailingSpace = !1;
      }
      u(al, "buildCollapsedSpan");
      function Aa(e, t, i) {
        var r = e.markedSpans,
          n = e.text,
          l = 0;
        if (!r) {
          for (var o = 1; o < i.length; o += 2) t.addToken(t, n.slice(l, l = i[o]), ll(i[o + 1], t.cm.options));
          return;
        }
        for (var a = n.length, s = 0, f = 1, h = "", c, p, d = 0, v, g, m, b, C;;) {
          if (d == s) {
            v = g = m = p = "", C = null, b = null, d = 1 / 0;
            for (var x = [], w = void 0, k = 0; k < r.length; ++k) {
              var L = r[k],
                A = L.marker;
              if (A.type == "bookmark" && L.from == s && A.widgetNode) x.push(A);else if (L.from <= s && (L.to == null || L.to > s || A.collapsed && L.to == s && L.from == s)) {
                if (L.to != null && L.to != s && d > L.to && (d = L.to, g = ""), A.className && (v += " " + A.className), A.css && (p = (p ? p + ";" : "") + A.css), A.startStyle && L.from == s && (m += " " + A.startStyle), A.endStyle && L.to == d && (w || (w = [])).push(A.endStyle, L.to), A.title && ((C || (C = {})).title = A.title), A.attributes) for (var E in A.attributes) (C || (C = {}))[E] = A.attributes[E];
                A.collapsed && (!b || Ii(b.marker, A) < 0) && (b = L);
              } else L.from > s && d > L.from && (d = L.from);
            }
            if (w) for (var j = 0; j < w.length; j += 2) w[j + 1] == d && (g += " " + w[j]);
            if (!b || b.from == s) for (var B = 0; B < x.length; ++B) al(t, 0, x[B]);
            if (b && (b.from || 0) == s) {
              if (al(t, (b.to == null ? a + 1 : b.to) - s, b.marker, b.from == null), b.to == null) return;
              b.to == s && (b = !1);
            }
          }
          if (s >= a) break;
          for (var pe = Math.min(a, d);;) {
            if (h) {
              var fe = s + h.length;
              if (!b) {
                var _ = fe > pe ? h.slice(0, pe - s) : h;
                t.addToken(t, _, c ? c + v : v, m, s + _.length == d ? g : "", p, C);
              }
              if (fe >= pe) {
                h = h.slice(pe - s), s = pe;
                break;
              }
              s = fe, m = "";
            }
            h = n.slice(l, l = i[f++]), c = ll(i[f++], t.cm.options);
          }
        }
      }
      u(Aa, "insertLineContent");
      function sl(e, t, i) {
        this.line = t, this.rest = Ca(t), this.size = this.rest ? F(H(this.rest)) - i + 1 : 1, this.node = this.text = null, this.hidden = Xe(e, t);
      }
      u(sl, "LineView");
      function Ur(e, t, i) {
        for (var r = [], n, l = t; l < i; l = n) {
          var o = new sl(e.doc, S(e.doc, l), l);
          n = l + o.size, r.push(o);
        }
        return r;
      }
      u(Ur, "buildViewArray");
      var Lt = null;
      function Oa(e) {
        Lt ? Lt.ops.push(e) : e.ownsGroup = Lt = {
          ops: [e],
          delayedCallbacks: []
        };
      }
      u(Oa, "pushOperation");
      function Wa(e) {
        var t = e.delayedCallbacks,
          i = 0;
        do {
          for (; i < t.length; i++) t[i].call(null);
          for (var r = 0; r < e.ops.length; r++) {
            var n = e.ops[r];
            if (n.cursorActivityHandlers) for (; n.cursorActivityCalled < n.cursorActivityHandlers.length;) n.cursorActivityHandlers[n.cursorActivityCalled++].call(null, n.cm);
          }
        } while (i < t.length);
      }
      u(Wa, "fireCallbacksForOps");
      function Ha(e, t) {
        var i = e.ownsGroup;
        if (i) try {
          Wa(i);
        } finally {
          Lt = null, t(i);
        }
      }
      u(Ha, "finishOperation");
      var $t = null;
      function Z(e, t) {
        var i = xi(e, t);
        if (i.length) {
          var r = Array.prototype.slice.call(arguments, 2),
            n;
          Lt ? n = Lt.delayedCallbacks : $t ? n = $t : (n = $t = [], setTimeout(Fa, 0));
          for (var l = u(function (a) {
              n.push(function () {
                return i[a].apply(null, r);
              });
            }, "loop"), o = 0; o < i.length; ++o) l(o);
        }
      }
      u(Z, "signalLater");
      function Fa() {
        var e = $t;
        $t = null;
        for (var t = 0; t < e.length; ++t) e[t]();
      }
      u(Fa, "fireOrphanDelayed");
      function ul(e, t, i, r) {
        for (var n = 0; n < t.changes.length; n++) {
          var l = t.changes[n];
          l == "text" ? Ea(e, t) : l == "gutter" ? hl(e, t, i, r) : l == "class" ? Gi(e, t) : l == "widget" && Ia(e, t, r);
        }
        t.changes = null;
      }
      u(ul, "updateLineForChanges");
      function er(e) {
        return e.node == e.text && (e.node = T("div", null, null, "position: relative"), e.text.parentNode && e.text.parentNode.replaceChild(e.node, e.text), e.node.appendChild(e.text), O && I < 8 && (e.node.style.zIndex = 2)), e.node;
      }
      u(er, "ensureLineWrapped");
      function Pa(e, t) {
        var i = t.bgClass ? t.bgClass + " " + (t.line.bgClass || "") : t.line.bgClass;
        if (i && (i += " CodeMirror-linebackground"), t.background) i ? t.background.className = i : (t.background.parentNode.removeChild(t.background), t.background = null);else if (i) {
          var r = er(t);
          t.background = r.insertBefore(T("div", null, i), r.firstChild), e.display.input.setUneditable(t.background);
        }
      }
      u(Pa, "updateLineBackground");
      function fl(e, t) {
        var i = e.display.externalMeasured;
        return i && i.line == t.line ? (e.display.externalMeasured = null, t.measure = i.measure, i.built) : ol(e, t);
      }
      u(fl, "getLineContent");
      function Ea(e, t) {
        var i = t.text.className,
          r = fl(e, t);
        t.text == t.node && (t.node = r.pre), t.text.parentNode.replaceChild(r.pre, t.text), t.text = r.pre, r.bgClass != t.bgClass || r.textClass != t.textClass ? (t.bgClass = r.bgClass, t.textClass = r.textClass, Gi(e, t)) : i && (t.text.className = i);
      }
      u(Ea, "updateLineText");
      function Gi(e, t) {
        Pa(e, t), t.line.wrapClass ? er(t).className = t.line.wrapClass : t.node != t.text && (t.node.className = "");
        var i = t.textClass ? t.textClass + " " + (t.line.textClass || "") : t.line.textClass;
        t.text.className = i || "";
      }
      u(Gi, "updateLineClasses");
      function hl(e, t, i, r) {
        if (t.gutter && (t.node.removeChild(t.gutter), t.gutter = null), t.gutterBackground && (t.node.removeChild(t.gutterBackground), t.gutterBackground = null), t.line.gutterClass) {
          var n = er(t);
          t.gutterBackground = T("div", null, "CodeMirror-gutter-background " + t.line.gutterClass, "left: " + (e.options.fixedGutter ? r.fixedPos : -r.gutterTotalWidth) + "px; width: " + r.gutterTotalWidth + "px"), e.display.input.setUneditable(t.gutterBackground), n.insertBefore(t.gutterBackground, t.text);
        }
        var l = t.line.gutterMarkers;
        if (e.options.lineNumbers || l) {
          var o = er(t),
            a = t.gutter = T("div", null, "CodeMirror-gutter-wrapper", "left: " + (e.options.fixedGutter ? r.fixedPos : -r.gutterTotalWidth) + "px");
          if (a.setAttribute("aria-hidden", "true"), e.display.input.setUneditable(a), o.insertBefore(a, t.text), t.line.gutterClass && (a.className += " " + t.line.gutterClass), e.options.lineNumbers && (!l || !l["CodeMirror-linenumbers"]) && (t.lineNumber = a.appendChild(T("div", Oi(e.options, i), "CodeMirror-linenumber CodeMirror-gutter-elt", "left: " + r.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + e.display.lineNumInnerWidth + "px"))), l) for (var s = 0; s < e.display.gutterSpecs.length; ++s) {
            var f = e.display.gutterSpecs[s].className,
              h = l.hasOwnProperty(f) && l[f];
            h && a.appendChild(T("div", [h], "CodeMirror-gutter-elt", "left: " + r.gutterLeft[f] + "px; width: " + r.gutterWidth[f] + "px"));
          }
        }
      }
      u(hl, "updateLineGutter");
      function Ia(e, t, i) {
        t.alignable && (t.alignable = null);
        for (var r = mt("CodeMirror-linewidget"), n = t.node.firstChild, l = void 0; n; n = l) l = n.nextSibling, r.test(n.className) && t.node.removeChild(n);
        cl(e, t, i);
      }
      u(Ia, "updateLineWidgets");
      function Ra(e, t, i, r) {
        var n = fl(e, t);
        return t.text = t.node = n.pre, n.bgClass && (t.bgClass = n.bgClass), n.textClass && (t.textClass = n.textClass), Gi(e, t), hl(e, t, i, r), cl(e, t, r), t.node;
      }
      u(Ra, "buildLineElement");
      function cl(e, t, i) {
        if (dl(e, t.line, t, i, !0), t.rest) for (var r = 0; r < t.rest.length; r++) dl(e, t.rest[r], t, i, !1);
      }
      u(cl, "insertLineWidgets");
      function dl(e, t, i, r, n) {
        if (t.widgets) for (var l = er(i), o = 0, a = t.widgets; o < a.length; ++o) {
          var s = a[o],
            f = T("div", [s.node], "CodeMirror-linewidget" + (s.className ? " " + s.className : ""));
          s.handleMouseEvents || f.setAttribute("cm-ignore-events", "true"), Ba(s, f, i, r), e.display.input.setUneditable(f), n && s.above ? l.insertBefore(f, i.gutter || i.text) : l.appendChild(f), Z(s, "redraw");
        }
      }
      u(dl, "insertLineWidgetsFor");
      function Ba(e, t, i, r) {
        if (e.noHScroll) {
          (i.alignable || (i.alignable = [])).push(t);
          var n = r.wrapperWidth;
          t.style.left = r.fixedPos + "px", e.coverGutter || (n -= r.gutterTotalWidth, t.style.paddingLeft = r.gutterTotalWidth + "px"), t.style.width = n + "px";
        }
        e.coverGutter && (t.style.zIndex = 5, t.style.position = "relative", e.noHScroll || (t.style.marginLeft = -r.gutterTotalWidth + "px"));
      }
      u(Ba, "positionLineWidget");
      function tr(e) {
        if (e.height != null) return e.height;
        var t = e.doc.cm;
        if (!t) return 0;
        if (!Ke(document.body, e.node)) {
          var i = "position: relative;";
          e.coverGutter && (i += "margin-left: -" + t.display.gutters.offsetWidth + "px;"), e.noHScroll && (i += "width: " + t.display.wrapper.clientWidth + "px;"), ve(t.display.measure, T("div", [e.node], null, i));
        }
        return e.height = e.node.parentNode.offsetHeight;
      }
      u(tr, "widgetHeight");
      function Re(e, t) {
        for (var i = wi(t); i != e.wrapper; i = i.parentNode) if (!i || i.nodeType == 1 && i.getAttribute("cm-ignore-events") == "true" || i.parentNode == e.sizer && i != e.mover) return !0;
      }
      u(Re, "eventInWidget");
      function Kr(e) {
        return e.lineSpace.offsetTop;
      }
      u(Kr, "paddingTop");
      function Ui(e) {
        return e.mover.offsetHeight - e.lineSpace.offsetHeight;
      }
      u(Ui, "paddingVert");
      function pl(e) {
        if (e.cachedPaddingH) return e.cachedPaddingH;
        var t = ve(e.measure, T("pre", "x", "CodeMirror-line-like")),
          i = window.getComputedStyle ? window.getComputedStyle(t) : t.currentStyle,
          r = {
            left: parseInt(i.paddingLeft),
            right: parseInt(i.paddingRight)
          };
        return !isNaN(r.left) && !isNaN(r.right) && (e.cachedPaddingH = r), r;
      }
      u(pl, "paddingH");
      function Ae(e) {
        return Wn - e.display.nativeBarWidth;
      }
      u(Ae, "scrollGap");
      function st(e) {
        return e.display.scroller.clientWidth - Ae(e) - e.display.barWidth;
      }
      u(st, "displayWidth");
      function Ki(e) {
        return e.display.scroller.clientHeight - Ae(e) - e.display.barHeight;
      }
      u(Ki, "displayHeight");
      function za(e, t, i) {
        var r = e.options.lineWrapping,
          n = r && st(e);
        if (!t.measure.heights || r && t.measure.width != n) {
          var l = t.measure.heights = [];
          if (r) {
            t.measure.width = n;
            for (var o = t.text.firstChild.getClientRects(), a = 0; a < o.length - 1; a++) {
              var s = o[a],
                f = o[a + 1];
              Math.abs(s.bottom - f.bottom) > 2 && l.push((s.bottom + f.top) / 2 - i.top);
            }
          }
          l.push(i.bottom - i.top);
        }
      }
      u(za, "ensureLineHeights");
      function vl(e, t, i) {
        if (e.line == t) return {
          map: e.measure.map,
          cache: e.measure.cache
        };
        if (e.rest) {
          for (var r = 0; r < e.rest.length; r++) if (e.rest[r] == t) return {
            map: e.measure.maps[r],
            cache: e.measure.caches[r]
          };
          for (var n = 0; n < e.rest.length; n++) if (F(e.rest[n]) > i) return {
            map: e.measure.maps[n],
            cache: e.measure.caches[n],
            before: !0
          };
        }
      }
      u(vl, "mapFromLineView");
      function Ga(e, t) {
        t = Se(t);
        var i = F(t),
          r = e.display.externalMeasured = new sl(e.doc, t, i);
        r.lineN = i;
        var n = r.built = ol(e, r);
        return r.text = n.pre, ve(e.display.lineMeasure, n.pre), r;
      }
      u(Ga, "updateExternalMeasurement");
      function gl(e, t, i, r) {
        return Oe(e, kt(e, t), i, r);
      }
      u(gl, "measureChar");
      function _i(e, t) {
        if (t >= e.display.viewFrom && t < e.display.viewTo) return e.display.view[ht(e, t)];
        var i = e.display.externalMeasured;
        if (i && t >= i.lineN && t < i.lineN + i.size) return i;
      }
      u(_i, "findViewForLine");
      function kt(e, t) {
        var i = F(t),
          r = _i(e, i);
        r && !r.text ? r = null : r && r.changes && (ul(e, r, i, Qi(e)), e.curOp.forceUpdate = !0), r || (r = Ga(e, t));
        var n = vl(r, t, i);
        return {
          line: t,
          view: r,
          rect: null,
          map: n.map,
          cache: n.cache,
          before: n.before,
          hasHeights: !1
        };
      }
      u(kt, "prepareMeasureForLine");
      function Oe(e, t, i, r, n) {
        t.before && (i = -1);
        var l = i + (r || ""),
          o;
        return t.cache.hasOwnProperty(l) ? o = t.cache[l] : (t.rect || (t.rect = t.view.text.getBoundingClientRect()), t.hasHeights || (za(e, t.view, t.rect), t.hasHeights = !0), o = Ka(e, t, i, r), o.bogus || (t.cache[l] = o)), {
          left: o.left,
          right: o.right,
          top: n ? o.rtop : o.top,
          bottom: n ? o.rbottom : o.bottom
        };
      }
      u(Oe, "measureCharPrepared");
      var yl = {
        left: 0,
        right: 0,
        top: 0,
        bottom: 0
      };
      function ml(e, t, i) {
        for (var r, n, l, o, a, s, f = 0; f < e.length; f += 3) if (a = e[f], s = e[f + 1], t < a ? (n = 0, l = 1, o = "left") : t < s ? (n = t - a, l = n + 1) : (f == e.length - 3 || t == s && e[f + 3] > t) && (l = s - a, n = l - 1, t >= s && (o = "right")), n != null) {
          if (r = e[f + 2], a == s && i == (r.insertLeft ? "left" : "right") && (o = i), i == "left" && n == 0) for (; f && e[f - 2] == e[f - 3] && e[f - 1].insertLeft;) r = e[(f -= 3) + 2], o = "left";
          if (i == "right" && n == s - a) for (; f < e.length - 3 && e[f + 3] == e[f + 4] && !e[f + 5].insertLeft;) r = e[(f += 3) + 2], o = "right";
          break;
        }
        return {
          node: r,
          start: n,
          end: l,
          collapse: o,
          coverStart: a,
          coverEnd: s
        };
      }
      u(ml, "nodeAndOffsetInLineMap");
      function Ua(e, t) {
        var i = yl;
        if (t == "left") for (var r = 0; r < e.length && (i = e[r]).left == i.right; r++);else for (var n = e.length - 1; n >= 0 && (i = e[n]).left == i.right; n--);
        return i;
      }
      u(Ua, "getUsefulRect");
      function Ka(e, t, i, r) {
        var n = ml(t.map, i, r),
          l = n.node,
          o = n.start,
          a = n.end,
          s = n.collapse,
          f;
        if (l.nodeType == 3) {
          for (var h = 0; h < 4; h++) {
            for (; o && bi(t.line.text.charAt(n.coverStart + o));) --o;
            for (; n.coverStart + a < n.coverEnd && bi(t.line.text.charAt(n.coverStart + a));) ++a;
            if (O && I < 9 && o == 0 && a == n.coverEnd - n.coverStart ? f = l.parentNode.getBoundingClientRect() : f = Ua(rt(l, o, a).getClientRects(), r), f.left || f.right || o == 0) break;
            a = o, o = o - 1, s = "right";
          }
          O && I < 11 && (f = _a(e.display.measure, f));
        } else {
          o > 0 && (s = r = "right");
          var c;
          e.options.lineWrapping && (c = l.getClientRects()).length > 1 ? f = c[r == "right" ? c.length - 1 : 0] : f = l.getBoundingClientRect();
        }
        if (O && I < 9 && !o && (!f || !f.left && !f.right)) {
          var p = l.parentNode.getClientRects()[0];
          p ? f = {
            left: p.left,
            right: p.left + Mt(e.display),
            top: p.top,
            bottom: p.bottom
          } : f = yl;
        }
        for (var d = f.top - t.rect.top, v = f.bottom - t.rect.top, g = (d + v) / 2, m = t.view.measure.heights, b = 0; b < m.length - 1 && !(g < m[b]); b++);
        var C = b ? m[b - 1] : 0,
          x = m[b],
          w = {
            left: (s == "right" ? f.right : f.left) - t.rect.left,
            right: (s == "left" ? f.left : f.right) - t.rect.left,
            top: C,
            bottom: x
          };
        return !f.left && !f.right && (w.bogus = !0), e.options.singleCursorHeightPerLine || (w.rtop = d, w.rbottom = v), w;
      }
      u(Ka, "measureCharInner");
      function _a(e, t) {
        if (!window.screen || screen.logicalXDPI == null || screen.logicalXDPI == screen.deviceXDPI || !la(e)) return t;
        var i = screen.logicalXDPI / screen.deviceXDPI,
          r = screen.logicalYDPI / screen.deviceYDPI;
        return {
          left: t.left * i,
          right: t.right * i,
          top: t.top * r,
          bottom: t.bottom * r
        };
      }
      u(_a, "maybeUpdateRectForZooming");
      function bl(e) {
        if (e.measure && (e.measure.cache = {}, e.measure.heights = null, e.rest)) for (var t = 0; t < e.rest.length; t++) e.measure.caches[t] = {};
      }
      u(bl, "clearLineMeasurementCacheFor");
      function xl(e) {
        e.display.externalMeasure = null, Ue(e.display.lineMeasure);
        for (var t = 0; t < e.display.view.length; t++) bl(e.display.view[t]);
      }
      u(xl, "clearLineMeasurementCache");
      function rr(e) {
        xl(e), e.display.cachedCharWidth = e.display.cachedTextHeight = e.display.cachedPaddingH = null, e.options.lineWrapping || (e.display.maxLineChanged = !0), e.display.lineNumChars = null;
      }
      u(rr, "clearCaches");
      function Cl() {
        return Tr && Dr ? -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) : window.pageXOffset || (document.documentElement || document.body).scrollLeft;
      }
      u(Cl, "pageScrollX");
      function wl() {
        return Tr && Dr ? -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) : window.pageYOffset || (document.documentElement || document.body).scrollTop;
      }
      u(wl, "pageScrollY");
      function Xi(e) {
        var t = Se(e),
          i = t.widgets,
          r = 0;
        if (i) for (var n = 0; n < i.length; ++n) i[n].above && (r += tr(i[n]));
        return r;
      }
      u(Xi, "widgetTopHeight");
      function _r(e, t, i, r, n) {
        if (!n) {
          var l = Xi(t);
          i.top += l, i.bottom += l;
        }
        if (r == "line") return i;
        r || (r = "local");
        var o = Ie(t);
        if (r == "local" ? o += Kr(e.display) : o -= e.display.viewOffset, r == "page" || r == "window") {
          var a = e.display.lineSpace.getBoundingClientRect();
          o += a.top + (r == "window" ? 0 : wl());
          var s = a.left + (r == "window" ? 0 : Cl());
          i.left += s, i.right += s;
        }
        return i.top += o, i.bottom += o, i;
      }
      u(_r, "intoCoordSystem");
      function Sl(e, t, i) {
        if (i == "div") return t;
        var r = t.left,
          n = t.top;
        if (i == "page") r -= Cl(), n -= wl();else if (i == "local" || !i) {
          var l = e.display.sizer.getBoundingClientRect();
          r += l.left, n += l.top;
        }
        var o = e.display.lineSpace.getBoundingClientRect();
        return {
          left: r - o.left,
          top: n - o.top
        };
      }
      u(Sl, "fromCoordSystem");
      function Xr(e, t, i, r, n) {
        return r || (r = S(e.doc, t.line)), _r(e, r, gl(e, r, t.ch, n), i);
      }
      u(Xr, "charCoords");
      function Le(e, t, i, r, n, l) {
        r = r || S(e.doc, t.line), n || (n = kt(e, r));
        function o(v, g) {
          var m = Oe(e, n, v, g ? "right" : "left", l);
          return g ? m.left = m.right : m.right = m.left, _r(e, r, m, i);
        }
        u(o, "get");
        var a = Pe(r, e.doc.direction),
          s = t.ch,
          f = t.sticky;
        if (s >= r.text.length ? (s = r.text.length, f = "before") : s <= 0 && (s = 0, f = "after"), !a) return o(f == "before" ? s - 1 : s, f == "before");
        function h(v, g, m) {
          var b = a[g],
            C = b.level == 1;
          return o(m ? v - 1 : v, C != m);
        }
        u(h, "getBidi");
        var c = Zt(a, s, f),
          p = qt,
          d = h(s, c, f == "before");
        return p != null && (d.other = h(s, p, f != "before")), d;
      }
      u(Le, "cursorCoords");
      function Ll(e, t) {
        var i = 0;
        t = N(e.doc, t), e.options.lineWrapping || (i = Mt(e.display) * t.ch);
        var r = S(e.doc, t.line),
          n = Ie(r) + Kr(e.display);
        return {
          left: i,
          right: i,
          top: n,
          bottom: n + r.height
        };
      }
      u(Ll, "estimateCoords");
      function Yi(e, t, i, r, n) {
        var l = y(e, t, i);
        return l.xRel = n, r && (l.outside = r), l;
      }
      u(Yi, "PosWithInfo");
      function qi(e, t, i) {
        var r = e.doc;
        if (i += e.display.viewOffset, i < 0) return Yi(r.first, 0, null, -1, -1);
        var n = at(r, i),
          l = r.first + r.size - 1;
        if (n > l) return Yi(r.first + r.size - 1, S(r, l).text.length, null, 1, 1);
        t < 0 && (t = 0);
        for (var o = S(r, n);;) {
          var a = Xa(e, o, n, t, i),
            s = ba(o, a.ch + (a.xRel > 0 || a.outside > 0 ? 1 : 0));
          if (!s) return a;
          var f = s.find(1);
          if (f.line == n) return f;
          o = S(r, n = f.line);
        }
      }
      u(qi, "coordsChar");
      function kl(e, t, i, r) {
        r -= Xi(t);
        var n = t.text.length,
          l = Yt(function (o) {
            return Oe(e, i, o - 1).bottom <= r;
          }, n, 0);
        return n = Yt(function (o) {
          return Oe(e, i, o).top > r;
        }, l, n), {
          begin: l,
          end: n
        };
      }
      u(kl, "wrappedLineExtent");
      function Tl(e, t, i, r) {
        i || (i = kt(e, t));
        var n = _r(e, t, Oe(e, i, r), "line").top;
        return kl(e, t, i, n);
      }
      u(Tl, "wrappedLineExtentChar");
      function Zi(e, t, i, r) {
        return e.bottom <= i ? !1 : e.top > i ? !0 : (r ? e.left : e.right) > t;
      }
      u(Zi, "boxIsAfter");
      function Xa(e, t, i, r, n) {
        n -= Ie(t);
        var l = kt(e, t),
          o = Xi(t),
          a = 0,
          s = t.text.length,
          f = !0,
          h = Pe(t, e.doc.direction);
        if (h) {
          var c = (e.options.lineWrapping ? qa : Ya)(e, t, i, l, h, r, n);
          f = c.level != 1, a = f ? c.from : c.to - 1, s = f ? c.to : c.from - 1;
        }
        var p = null,
          d = null,
          v = Yt(function (k) {
            var L = Oe(e, l, k);
            return L.top += o, L.bottom += o, Zi(L, r, n, !1) ? (L.top <= n && L.left <= r && (p = k, d = L), !0) : !1;
          }, a, s),
          g,
          m,
          b = !1;
        if (d) {
          var C = r - d.left < d.right - r,
            x = C == f;
          v = p + (x ? 0 : 1), m = x ? "after" : "before", g = C ? d.left : d.right;
        } else {
          !f && (v == s || v == a) && v++, m = v == 0 ? "after" : v == t.text.length ? "before" : Oe(e, l, v - (f ? 1 : 0)).bottom + o <= n == f ? "after" : "before";
          var w = Le(e, y(i, v, m), "line", t, l);
          g = w.left, b = n < w.top ? -1 : n >= w.bottom ? 1 : 0;
        }
        return v = En(t.text, v, 1), Yi(i, v, m, b, r - g);
      }
      u(Xa, "coordsCharInner");
      function Ya(e, t, i, r, n, l, o) {
        var a = Yt(function (c) {
            var p = n[c],
              d = p.level != 1;
            return Zi(Le(e, y(i, d ? p.to : p.from, d ? "before" : "after"), "line", t, r), l, o, !0);
          }, 0, n.length - 1),
          s = n[a];
        if (a > 0) {
          var f = s.level != 1,
            h = Le(e, y(i, f ? s.from : s.to, f ? "after" : "before"), "line", t, r);
          Zi(h, l, o, !0) && h.top > o && (s = n[a - 1]);
        }
        return s;
      }
      u(Ya, "coordsBidiPart");
      function qa(e, t, i, r, n, l, o) {
        var a = kl(e, t, r, o),
          s = a.begin,
          f = a.end;
        /\s/.test(t.text.charAt(f - 1)) && f--;
        for (var h = null, c = null, p = 0; p < n.length; p++) {
          var d = n[p];
          if (!(d.from >= f || d.to <= s)) {
            var v = d.level != 1,
              g = Oe(e, r, v ? Math.min(f, d.to) - 1 : Math.max(s, d.from)).right,
              m = g < l ? l - g + 1e9 : g - l;
            (!h || c > m) && (h = d, c = m);
          }
        }
        return h || (h = n[n.length - 1]), h.from < s && (h = {
          from: s,
          to: h.to,
          level: h.level
        }), h.to > f && (h = {
          from: h.from,
          to: f,
          level: h.level
        }), h;
      }
      u(qa, "coordsBidiPartWrapped");
      var ut;
      function Tt(e) {
        if (e.cachedTextHeight != null) return e.cachedTextHeight;
        if (ut == null) {
          ut = T("pre", null, "CodeMirror-line-like");
          for (var t = 0; t < 49; ++t) ut.appendChild(document.createTextNode("x")), ut.appendChild(T("br"));
          ut.appendChild(document.createTextNode("x"));
        }
        ve(e.measure, ut);
        var i = ut.offsetHeight / 50;
        return i > 3 && (e.cachedTextHeight = i), Ue(e.measure), i || 1;
      }
      u(Tt, "textHeight");
      function Mt(e) {
        if (e.cachedCharWidth != null) return e.cachedCharWidth;
        var t = T("span", "xxxxxxxxxx"),
          i = T("pre", [t], "CodeMirror-line-like");
        ve(e.measure, i);
        var r = t.getBoundingClientRect(),
          n = (r.right - r.left) / 10;
        return n > 2 && (e.cachedCharWidth = n), n || 10;
      }
      u(Mt, "charWidth");
      function Qi(e) {
        for (var t = e.display, i = {}, r = {}, n = t.gutters.clientLeft, l = t.gutters.firstChild, o = 0; l; l = l.nextSibling, ++o) {
          var a = e.display.gutterSpecs[o].className;
          i[a] = l.offsetLeft + l.clientLeft + n, r[a] = l.clientWidth;
        }
        return {
          fixedPos: Ji(t),
          gutterTotalWidth: t.gutters.offsetWidth,
          gutterLeft: i,
          gutterWidth: r,
          wrapperWidth: t.wrapper.clientWidth
        };
      }
      u(Qi, "getDimensions");
      function Ji(e) {
        return e.scroller.getBoundingClientRect().left - e.sizer.getBoundingClientRect().left;
      }
      u(Ji, "compensateForHScroll");
      function Ml(e) {
        var t = Tt(e.display),
          i = e.options.lineWrapping,
          r = i && Math.max(5, e.display.scroller.clientWidth / Mt(e.display) - 3);
        return function (n) {
          if (Xe(e.doc, n)) return 0;
          var l = 0;
          if (n.widgets) for (var o = 0; o < n.widgets.length; o++) n.widgets[o].height && (l += n.widgets[o].height);
          return i ? l + (Math.ceil(n.text.length / r) || 1) * t : l + t;
        };
      }
      u(Ml, "estimateHeight");
      function ji(e) {
        var t = e.doc,
          i = Ml(e);
        t.iter(function (r) {
          var n = i(r);
          n != r.height && De(r, n);
        });
      }
      u(ji, "estimateLineHeights");
      function ft(e, t, i, r) {
        var n = e.display;
        if (!i && wi(t).getAttribute("cm-not-content") == "true") return null;
        var l,
          o,
          a = n.lineSpace.getBoundingClientRect();
        try {
          l = t.clientX - a.left, o = t.clientY - a.top;
        } catch {
          return null;
        }
        var s = qi(e, l, o),
          f;
        if (r && s.xRel > 0 && (f = S(e.doc, s.line).text).length == s.ch) {
          var h = xe(f, f.length, e.options.tabSize) - f.length;
          s = y(s.line, Math.max(0, Math.round((l - pl(e.display).left) / Mt(e.display)) - h));
        }
        return s;
      }
      u(ft, "posFromMouse");
      function ht(e, t) {
        if (t >= e.display.viewTo || (t -= e.display.viewFrom, t < 0)) return null;
        for (var i = e.display.view, r = 0; r < i.length; r++) if (t -= i[r].size, t < 0) return r;
      }
      u(ht, "findViewIndex");
      function se(e, t, i, r) {
        t == null && (t = e.doc.first), i == null && (i = e.doc.first + e.doc.size), r || (r = 0);
        var n = e.display;
        if (r && i < n.viewTo && (n.updateLineNumbers == null || n.updateLineNumbers > t) && (n.updateLineNumbers = t), e.curOp.viewChanged = !0, t >= n.viewTo) Ee && Ri(e.doc, t) < n.viewTo && qe(e);else if (i <= n.viewFrom) Ee && nl(e.doc, i + r) > n.viewFrom ? qe(e) : (n.viewFrom += r, n.viewTo += r);else if (t <= n.viewFrom && i >= n.viewTo) qe(e);else if (t <= n.viewFrom) {
          var l = Yr(e, i, i + r, 1);
          l ? (n.view = n.view.slice(l.index), n.viewFrom = l.lineN, n.viewTo += r) : qe(e);
        } else if (i >= n.viewTo) {
          var o = Yr(e, t, t, -1);
          o ? (n.view = n.view.slice(0, o.index), n.viewTo = o.lineN) : qe(e);
        } else {
          var a = Yr(e, t, t, -1),
            s = Yr(e, i, i + r, 1);
          a && s ? (n.view = n.view.slice(0, a.index).concat(Ur(e, a.lineN, s.lineN)).concat(n.view.slice(s.index)), n.viewTo += r) : qe(e);
        }
        var f = n.externalMeasured;
        f && (i < f.lineN ? f.lineN += r : t < f.lineN + f.size && (n.externalMeasured = null));
      }
      u(se, "regChange");
      function Ye(e, t, i) {
        e.curOp.viewChanged = !0;
        var r = e.display,
          n = e.display.externalMeasured;
        if (n && t >= n.lineN && t < n.lineN + n.size && (r.externalMeasured = null), !(t < r.viewFrom || t >= r.viewTo)) {
          var l = r.view[ht(e, t)];
          if (l.node != null) {
            var o = l.changes || (l.changes = []);
            ee(o, i) == -1 && o.push(i);
          }
        }
      }
      u(Ye, "regLineChange");
      function qe(e) {
        e.display.viewFrom = e.display.viewTo = e.doc.first, e.display.view = [], e.display.viewOffset = 0;
      }
      u(qe, "resetView");
      function Yr(e, t, i, r) {
        var n = ht(e, t),
          l,
          o = e.display.view;
        if (!Ee || i == e.doc.first + e.doc.size) return {
          index: n,
          lineN: i
        };
        for (var a = e.display.viewFrom, s = 0; s < n; s++) a += o[s].size;
        if (a != t) {
          if (r > 0) {
            if (n == o.length - 1) return null;
            l = a + o[n].size - t, n++;
          } else l = a - t;
          t += l, i += l;
        }
        for (; Ri(e.doc, i) != i;) {
          if (n == (r < 0 ? 0 : o.length - 1)) return null;
          i += r * o[n - (r < 0 ? 1 : 0)].size, n += r;
        }
        return {
          index: n,
          lineN: i
        };
      }
      u(Yr, "viewCuttingPoint");
      function Za(e, t, i) {
        var r = e.display,
          n = r.view;
        n.length == 0 || t >= r.viewTo || i <= r.viewFrom ? (r.view = Ur(e, t, i), r.viewFrom = t) : (r.viewFrom > t ? r.view = Ur(e, t, r.viewFrom).concat(r.view) : r.viewFrom < t && (r.view = r.view.slice(ht(e, t))), r.viewFrom = t, r.viewTo < i ? r.view = r.view.concat(Ur(e, r.viewTo, i)) : r.viewTo > i && (r.view = r.view.slice(0, ht(e, i)))), r.viewTo = i;
      }
      u(Za, "adjustView");
      function Dl(e) {
        for (var t = e.display.view, i = 0, r = 0; r < t.length; r++) {
          var n = t[r];
          !n.hidden && (!n.node || n.changes) && ++i;
        }
        return i;
      }
      u(Dl, "countDirtyView");
      function ir(e) {
        e.display.input.showSelection(e.display.input.prepareSelection());
      }
      u(ir, "updateSelection");
      function Nl(e, t) {
        t === void 0 && (t = !0);
        var i = e.doc,
          r = {},
          n = r.cursors = document.createDocumentFragment(),
          l = r.selection = document.createDocumentFragment(),
          o = e.options.$customCursor;
        o && (t = !0);
        for (var a = 0; a < i.sel.ranges.length; a++) if (!(!t && a == i.sel.primIndex)) {
          var s = i.sel.ranges[a];
          if (!(s.from().line >= e.display.viewTo || s.to().line < e.display.viewFrom)) {
            var f = s.empty();
            if (o) {
              var h = o(e, s);
              h && Vi(e, h, n);
            } else (f || e.options.showCursorWhenSelecting) && Vi(e, s.head, n);
            f || Qa(e, s, l);
          }
        }
        return r;
      }
      u(Nl, "prepareSelection");
      function Vi(e, t, i) {
        var r = Le(e, t, "div", null, null, !e.options.singleCursorHeightPerLine),
          n = i.appendChild(T("div", " ", "CodeMirror-cursor"));
        if (n.style.left = r.left + "px", n.style.top = r.top + "px", n.style.height = Math.max(0, r.bottom - r.top) * e.options.cursorHeight + "px", /\bcm-fat-cursor\b/.test(e.getWrapperElement().className)) {
          var l = Xr(e, t, "div", null, null),
            o = l.right - l.left;
          n.style.width = (o > 0 ? o : e.defaultCharWidth()) + "px";
        }
        if (r.other) {
          var a = i.appendChild(T("div", " ", "CodeMirror-cursor CodeMirror-secondarycursor"));
          a.style.display = "", a.style.left = r.other.left + "px", a.style.top = r.other.top + "px", a.style.height = (r.other.bottom - r.other.top) * .85 + "px";
        }
      }
      u(Vi, "drawSelectionCursor");
      function qr(e, t) {
        return e.top - t.top || e.left - t.left;
      }
      u(qr, "cmpCoords");
      function Qa(e, t, i) {
        var r = e.display,
          n = e.doc,
          l = document.createDocumentFragment(),
          o = pl(e.display),
          a = o.left,
          s = Math.max(r.sizerWidth, st(e) - r.sizer.offsetLeft) - o.right,
          f = n.direction == "ltr";
        function h(x, w, k, L) {
          w < 0 && (w = 0), w = Math.round(w), L = Math.round(L), l.appendChild(T("div", null, "CodeMirror-selected", "position: absolute; left: " + x + `px;
                             top: ` + w + "px; width: " + (k !== null && k !== void 0 ? k : s - x) + `px;
                             height: ` + (L - w) + "px"));
        }
        u(h, "add");
        function c(x, w, k) {
          var L = S(n, x),
            A = L.text.length,
            E,
            j;
          function B(_, he) {
            return Xr(e, y(x, _), "div", L, he);
          }
          u(B, "coords");
          function pe(_, he, $) {
            var Y = Tl(e, L, null, _),
              X = he == "ltr" == ($ == "after") ? "left" : "right",
              z = $ == "after" ? Y.begin : Y.end - (/\s/.test(L.text.charAt(Y.end - 1)) ? 2 : 1);
            return B(z, X)[X];
          }
          u(pe, "wrapX");
          var fe = Pe(L, n.direction);
          return Vo(fe, w || 0, k !== null && k !== void 0 ? k : A, function (_, he, $, Y) {
            var X = $ == "ltr",
              z = B(_, X ? "left" : "right"),
              ce = B(he - 1, X ? "right" : "left"),
              zt = w == null && _ == 0,
              $e = k == null && he == A,
              re = Y == 0,
              We = !fe || Y == fe.length - 1;
            if (ce.top - z.top <= 3) {
              var V = (f ? zt : $e) && re,
                kn = (f ? $e : zt) && We,
                Ge = V ? a : (X ? z : ce).left,
                gt = kn ? s : (X ? ce : z).right;
              h(Ge, z.top, gt - Ge, z.bottom);
            } else {
              var yt, oe, Gt, Tn;
              X ? (yt = f && zt && re ? a : z.left, oe = f ? s : pe(_, $, "before"), Gt = f ? a : pe(he, $, "after"), Tn = f && $e && We ? s : ce.right) : (yt = f ? pe(_, $, "before") : a, oe = !f && zt && re ? s : z.right, Gt = !f && $e && We ? a : ce.left, Tn = f ? pe(he, $, "after") : s), h(yt, z.top, oe - yt, z.bottom), z.bottom < ce.top && h(a, z.bottom, null, ce.top), h(Gt, ce.top, Tn - Gt, ce.bottom);
            }
            (!E || qr(z, E) < 0) && (E = z), qr(ce, E) < 0 && (E = ce), (!j || qr(z, j) < 0) && (j = z), qr(ce, j) < 0 && (j = ce);
          }), {
            start: E,
            end: j
          };
        }
        u(c, "drawForLine");
        var p = t.from(),
          d = t.to();
        if (p.line == d.line) c(p.line, p.ch, d.ch);else {
          var v = S(n, p.line),
            g = S(n, d.line),
            m = Se(v) == Se(g),
            b = c(p.line, p.ch, m ? v.text.length + 1 : null).end,
            C = c(d.line, m ? 0 : null, d.ch).start;
          m && (b.top < C.top - 2 ? (h(b.right, b.top, null, b.bottom), h(a, C.top, C.left, C.bottom)) : h(b.right, b.top, C.left - b.right, b.bottom)), b.bottom < C.top && h(a, b.bottom, null, C.top);
        }
        i.appendChild(l);
      }
      u(Qa, "drawSelectionRange");
      function $i(e) {
        if (e.state.focused) {
          var t = e.display;
          clearInterval(t.blinker);
          var i = !0;
          t.cursorDiv.style.visibility = "", e.options.cursorBlinkRate > 0 ? t.blinker = setInterval(function () {
            e.hasFocus() || Dt(e), t.cursorDiv.style.visibility = (i = !i) ? "" : "hidden";
          }, e.options.cursorBlinkRate) : e.options.cursorBlinkRate < 0 && (t.cursorDiv.style.visibility = "hidden");
        }
      }
      u($i, "restartBlink");
      function Al(e) {
        e.hasFocus() || (e.display.input.focus(), e.state.focused || tn(e));
      }
      u(Al, "ensureFocus");
      function en(e) {
        e.state.delayingBlurEvent = !0, setTimeout(function () {
          e.state.delayingBlurEvent && (e.state.delayingBlurEvent = !1, e.state.focused && Dt(e));
        }, 100);
      }
      u(en, "delayBlurEvent");
      function tn(e, t) {
        e.state.delayingBlurEvent && !e.state.draggingText && (e.state.delayingBlurEvent = !1), e.options.readOnly != "nocursor" && (e.state.focused || (U(e, "focus", e, t), e.state.focused = !0, it(e.display.wrapper, "CodeMirror-focused"), !e.curOp && e.display.selForContextMenu != e.doc.sel && (e.display.input.reset(), ne && setTimeout(function () {
          return e.display.input.reset(!0);
        }, 20)), e.display.input.receivedFocus()), $i(e));
      }
      u(tn, "onFocus");
      function Dt(e, t) {
        e.state.delayingBlurEvent || (e.state.focused && (U(e, "blur", e, t), e.state.focused = !1, tt(e.display.wrapper, "CodeMirror-focused")), clearInterval(e.display.blinker), setTimeout(function () {
          e.state.focused || (e.display.shift = !1);
        }, 150));
      }
      u(Dt, "onBlur");
      function Zr(e) {
        for (var t = e.display, i = t.lineDiv.offsetTop, r = Math.max(0, t.scroller.getBoundingClientRect().top), n = t.lineDiv.getBoundingClientRect().top, l = 0, o = 0; o < t.view.length; o++) {
          var a = t.view[o],
            s = e.options.lineWrapping,
            f = void 0,
            h = 0;
          if (!a.hidden) {
            if (n += a.line.height, O && I < 8) {
              var c = a.node.offsetTop + a.node.offsetHeight;
              f = c - i, i = c;
            } else {
              var p = a.node.getBoundingClientRect();
              f = p.bottom - p.top, !s && a.text.firstChild && (h = a.text.firstChild.getBoundingClientRect().right - p.left - 1);
            }
            var d = a.line.height - f;
            if ((d > .005 || d < -.005) && (n < r && (l -= d), De(a.line, f), Ol(a.line), a.rest)) for (var v = 0; v < a.rest.length; v++) Ol(a.rest[v]);
            if (h > e.display.sizerWidth) {
              var g = Math.ceil(h / Mt(e.display));
              g > e.display.maxLineLength && (e.display.maxLineLength = g, e.display.maxLine = a.line, e.display.maxLineChanged = !0);
            }
          }
        }
        Math.abs(l) > 2 && (t.scroller.scrollTop += l);
      }
      u(Zr, "updateHeightsInViewport");
      function Ol(e) {
        if (e.widgets) for (var t = 0; t < e.widgets.length; ++t) {
          var i = e.widgets[t],
            r = i.node.parentNode;
          r && (i.height = r.offsetHeight);
        }
      }
      u(Ol, "updateWidgetHeight");
      function Qr(e, t, i) {
        var r = i && i.top != null ? Math.max(0, i.top) : e.scroller.scrollTop;
        r = Math.floor(r - Kr(e));
        var n = i && i.bottom != null ? i.bottom : r + e.wrapper.clientHeight,
          l = at(t, r),
          o = at(t, n);
        if (i && i.ensure) {
          var a = i.ensure.from.line,
            s = i.ensure.to.line;
          a < l ? (l = a, o = at(t, Ie(S(t, a)) + e.wrapper.clientHeight)) : Math.min(s, t.lastLine()) >= o && (l = at(t, Ie(S(t, s)) - e.wrapper.clientHeight), o = s);
        }
        return {
          from: l,
          to: Math.max(o, l + 1)
        };
      }
      u(Qr, "visibleLines");
      function Ja(e, t) {
        if (!q(e, "scrollCursorIntoView")) {
          var i = e.display,
            r = i.sizer.getBoundingClientRect(),
            n = null;
          if (t.top + r.top < 0 ? n = !0 : t.bottom + r.top > (window.innerHeight || document.documentElement.clientHeight) && (n = !1), n != null && !Yo) {
            var l = T("div", "​", null, `position: absolute;
                         top: ` + (t.top - i.viewOffset - Kr(e.display)) + `px;
                         height: ` + (t.bottom - t.top + Ae(e) + i.barHeight) + `px;
                         left: ` + t.left + "px; width: " + Math.max(2, t.right - t.left) + "px;");
            e.display.lineSpace.appendChild(l), l.scrollIntoView(n), e.display.lineSpace.removeChild(l);
          }
        }
      }
      u(Ja, "maybeScrollWindow");
      function ja(e, t, i, r) {
        r == null && (r = 0);
        var n;
        !e.options.lineWrapping && t == i && (i = t.sticky == "before" ? y(t.line, t.ch + 1, "before") : t, t = t.ch ? y(t.line, t.sticky == "before" ? t.ch - 1 : t.ch, "after") : t);
        for (var l = 0; l < 5; l++) {
          var o = !1,
            a = Le(e, t),
            s = !i || i == t ? a : Le(e, i);
          n = {
            left: Math.min(a.left, s.left),
            top: Math.min(a.top, s.top) - r,
            right: Math.max(a.left, s.left),
            bottom: Math.max(a.bottom, s.bottom) + r
          };
          var f = rn(e, n),
            h = e.doc.scrollTop,
            c = e.doc.scrollLeft;
          if (f.scrollTop != null && (lr(e, f.scrollTop), Math.abs(e.doc.scrollTop - h) > 1 && (o = !0)), f.scrollLeft != null && (ct(e, f.scrollLeft), Math.abs(e.doc.scrollLeft - c) > 1 && (o = !0)), !o) break;
        }
        return n;
      }
      u(ja, "scrollPosIntoView");
      function Va(e, t) {
        var i = rn(e, t);
        i.scrollTop != null && lr(e, i.scrollTop), i.scrollLeft != null && ct(e, i.scrollLeft);
      }
      u(Va, "scrollIntoView");
      function rn(e, t) {
        var i = e.display,
          r = Tt(e.display);
        t.top < 0 && (t.top = 0);
        var n = e.curOp && e.curOp.scrollTop != null ? e.curOp.scrollTop : i.scroller.scrollTop,
          l = Ki(e),
          o = {};
        t.bottom - t.top > l && (t.bottom = t.top + l);
        var a = e.doc.height + Ui(i),
          s = t.top < r,
          f = t.bottom > a - r;
        if (t.top < n) o.scrollTop = s ? 0 : t.top;else if (t.bottom > n + l) {
          var h = Math.min(t.top, (f ? a : t.bottom) - l);
          h != n && (o.scrollTop = h);
        }
        var c = e.options.fixedGutter ? 0 : i.gutters.offsetWidth,
          p = e.curOp && e.curOp.scrollLeft != null ? e.curOp.scrollLeft : i.scroller.scrollLeft - c,
          d = st(e) - i.gutters.offsetWidth,
          v = t.right - t.left > d;
        return v && (t.right = t.left + d), t.left < 10 ? o.scrollLeft = 0 : t.left < p ? o.scrollLeft = Math.max(0, t.left + c - (v ? 0 : 10)) : t.right > d + p - 3 && (o.scrollLeft = t.right + (v ? 0 : 10) - d), o;
      }
      u(rn, "calculateScrollPos");
      function nn(e, t) {
        t != null && (Jr(e), e.curOp.scrollTop = (e.curOp.scrollTop == null ? e.doc.scrollTop : e.curOp.scrollTop) + t);
      }
      u(nn, "addToScrollTop");
      function Nt(e) {
        Jr(e);
        var t = e.getCursor();
        e.curOp.scrollToPos = {
          from: t,
          to: t,
          margin: e.options.cursorScrollMargin
        };
      }
      u(Nt, "ensureCursorVisible");
      function nr(e, t, i) {
        (t != null || i != null) && Jr(e), t != null && (e.curOp.scrollLeft = t), i != null && (e.curOp.scrollTop = i);
      }
      u(nr, "scrollToCoords");
      function $a(e, t) {
        Jr(e), e.curOp.scrollToPos = t;
      }
      u($a, "scrollToRange");
      function Jr(e) {
        var t = e.curOp.scrollToPos;
        if (t) {
          e.curOp.scrollToPos = null;
          var i = Ll(e, t.from),
            r = Ll(e, t.to);
          Wl(e, i, r, t.margin);
        }
      }
      u(Jr, "resolveScrollToPos");
      function Wl(e, t, i, r) {
        var n = rn(e, {
          left: Math.min(t.left, i.left),
          top: Math.min(t.top, i.top) - r,
          right: Math.max(t.right, i.right),
          bottom: Math.max(t.bottom, i.bottom) + r
        });
        nr(e, n.scrollLeft, n.scrollTop);
      }
      u(Wl, "scrollToCoordsRange");
      function lr(e, t) {
        Math.abs(e.doc.scrollTop - t) < 2 || (Fe || on(e, {
          top: t
        }), Hl(e, t, !0), Fe && on(e), sr(e, 100));
      }
      u(lr, "updateScrollTop");
      function Hl(e, t, i) {
        t = Math.max(0, Math.min(e.display.scroller.scrollHeight - e.display.scroller.clientHeight, t)), !(e.display.scroller.scrollTop == t && !i) && (e.doc.scrollTop = t, e.display.scrollbars.setScrollTop(t), e.display.scroller.scrollTop != t && (e.display.scroller.scrollTop = t));
      }
      u(Hl, "setScrollTop");
      function ct(e, t, i, r) {
        t = Math.max(0, Math.min(t, e.display.scroller.scrollWidth - e.display.scroller.clientWidth)), !((i ? t == e.doc.scrollLeft : Math.abs(e.doc.scrollLeft - t) < 2) && !r) && (e.doc.scrollLeft = t, Rl(e), e.display.scroller.scrollLeft != t && (e.display.scroller.scrollLeft = t), e.display.scrollbars.setScrollLeft(t));
      }
      u(ct, "setScrollLeft");
      function or(e) {
        var t = e.display,
          i = t.gutters.offsetWidth,
          r = Math.round(e.doc.height + Ui(e.display));
        return {
          clientHeight: t.scroller.clientHeight,
          viewHeight: t.wrapper.clientHeight,
          scrollWidth: t.scroller.scrollWidth,
          clientWidth: t.scroller.clientWidth,
          viewWidth: t.wrapper.clientWidth,
          barLeft: e.options.fixedGutter ? i : 0,
          docHeight: r,
          scrollHeight: r + Ae(e) + t.barHeight,
          nativeBarWidth: t.nativeBarWidth,
          gutterWidth: i
        };
      }
      u(or, "measureForScrollbars");
      var dt = u(function (e, t, i) {
        this.cm = i;
        var r = this.vert = T("div", [T("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"),
          n = this.horiz = T("div", [T("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
        r.tabIndex = n.tabIndex = -1, e(r), e(n), M(r, "scroll", function () {
          r.clientHeight && t(r.scrollTop, "vertical");
        }), M(n, "scroll", function () {
          n.clientWidth && t(n.scrollLeft, "horizontal");
        }), this.checkedZeroWidth = !1, O && I < 8 && (this.horiz.style.minHeight = this.vert.style.minWidth = "18px");
      }, "NativeScrollbars");
      dt.prototype.update = function (e) {
        var t = e.scrollWidth > e.clientWidth + 1,
          i = e.scrollHeight > e.clientHeight + 1,
          r = e.nativeBarWidth;
        if (i) {
          this.vert.style.display = "block", this.vert.style.bottom = t ? r + "px" : "0";
          var n = e.viewHeight - (t ? r : 0);
          this.vert.firstChild.style.height = Math.max(0, e.scrollHeight - e.clientHeight + n) + "px";
        } else this.vert.scrollTop = 0, this.vert.style.display = "", this.vert.firstChild.style.height = "0";
        if (t) {
          this.horiz.style.display = "block", this.horiz.style.right = i ? r + "px" : "0", this.horiz.style.left = e.barLeft + "px";
          var l = e.viewWidth - e.barLeft - (i ? r : 0);
          this.horiz.firstChild.style.width = Math.max(0, e.scrollWidth - e.clientWidth + l) + "px";
        } else this.horiz.style.display = "", this.horiz.firstChild.style.width = "0";
        return !this.checkedZeroWidth && e.clientHeight > 0 && (r == 0 && this.zeroWidthHack(), this.checkedZeroWidth = !0), {
          right: i ? r : 0,
          bottom: t ? r : 0
        };
      }, dt.prototype.setScrollLeft = function (e) {
        this.horiz.scrollLeft != e && (this.horiz.scrollLeft = e), this.disableHoriz && this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz");
      }, dt.prototype.setScrollTop = function (e) {
        this.vert.scrollTop != e && (this.vert.scrollTop = e), this.disableVert && this.enableZeroWidthBar(this.vert, this.disableVert, "vert");
      }, dt.prototype.zeroWidthHack = function () {
        var e = me && !Xo ? "12px" : "18px";
        this.horiz.style.height = this.vert.style.width = e, this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none", this.disableHoriz = new _e(), this.disableVert = new _e();
      }, dt.prototype.enableZeroWidthBar = function (e, t, i) {
        e.style.pointerEvents = "auto";
        function r() {
          var n = e.getBoundingClientRect(),
            l = i == "vert" ? document.elementFromPoint(n.right - 1, (n.top + n.bottom) / 2) : document.elementFromPoint((n.right + n.left) / 2, n.bottom - 1);
          l != e ? e.style.pointerEvents = "none" : t.set(1e3, r);
        }
        u(r, "maybeDisable"), t.set(1e3, r);
      }, dt.prototype.clear = function () {
        var e = this.horiz.parentNode;
        e.removeChild(this.horiz), e.removeChild(this.vert);
      };
      var ar = u(function () {}, "NullScrollbars");
      ar.prototype.update = function () {
        return {
          bottom: 0,
          right: 0
        };
      }, ar.prototype.setScrollLeft = function () {}, ar.prototype.setScrollTop = function () {}, ar.prototype.clear = function () {};
      function At(e, t) {
        t || (t = or(e));
        var i = e.display.barWidth,
          r = e.display.barHeight;
        Fl(e, t);
        for (var n = 0; n < 4 && i != e.display.barWidth || r != e.display.barHeight; n++) i != e.display.barWidth && e.options.lineWrapping && Zr(e), Fl(e, or(e)), i = e.display.barWidth, r = e.display.barHeight;
      }
      u(At, "updateScrollbars");
      function Fl(e, t) {
        var i = e.display,
          r = i.scrollbars.update(t);
        i.sizer.style.paddingRight = (i.barWidth = r.right) + "px", i.sizer.style.paddingBottom = (i.barHeight = r.bottom) + "px", i.heightForcer.style.borderBottom = r.bottom + "px solid transparent", r.right && r.bottom ? (i.scrollbarFiller.style.display = "block", i.scrollbarFiller.style.height = r.bottom + "px", i.scrollbarFiller.style.width = r.right + "px") : i.scrollbarFiller.style.display = "", r.bottom && e.options.coverGutterNextToScrollbar && e.options.fixedGutter ? (i.gutterFiller.style.display = "block", i.gutterFiller.style.height = r.bottom + "px", i.gutterFiller.style.width = t.gutterWidth + "px") : i.gutterFiller.style.display = "";
      }
      u(Fl, "updateScrollbarsInner");
      var Pl = {
        native: dt,
        null: ar
      };
      function El(e) {
        e.display.scrollbars && (e.display.scrollbars.clear(), e.display.scrollbars.addClass && tt(e.display.wrapper, e.display.scrollbars.addClass)), e.display.scrollbars = new Pl[e.options.scrollbarStyle](function (t) {
          e.display.wrapper.insertBefore(t, e.display.scrollbarFiller), M(t, "mousedown", function () {
            e.state.focused && setTimeout(function () {
              return e.display.input.focus();
            }, 0);
          }), t.setAttribute("cm-not-content", "true");
        }, function (t, i) {
          i == "horizontal" ? ct(e, t) : lr(e, t);
        }, e), e.display.scrollbars.addClass && it(e.display.wrapper, e.display.scrollbars.addClass);
      }
      u(El, "initScrollbars");
      var es = 0;
      function pt(e) {
        e.curOp = {
          cm: e,
          viewChanged: !1,
          startHeight: e.doc.height,
          forceUpdate: !1,
          updateInput: 0,
          typing: !1,
          changeObjs: null,
          cursorActivityHandlers: null,
          cursorActivityCalled: 0,
          selectionChanged: !1,
          updateMaxLine: !1,
          scrollLeft: null,
          scrollTop: null,
          scrollToPos: null,
          focus: !1,
          id: ++es,
          markArrays: null
        }, Oa(e.curOp);
      }
      u(pt, "startOperation");
      function vt(e) {
        var t = e.curOp;
        t && Ha(t, function (i) {
          for (var r = 0; r < i.ops.length; r++) i.ops[r].cm.curOp = null;
          ts(i);
        });
      }
      u(vt, "endOperation");
      function ts(e) {
        for (var t = e.ops, i = 0; i < t.length; i++) rs(t[i]);
        for (var r = 0; r < t.length; r++) is(t[r]);
        for (var n = 0; n < t.length; n++) ns(t[n]);
        for (var l = 0; l < t.length; l++) ls(t[l]);
        for (var o = 0; o < t.length; o++) os(t[o]);
      }
      u(ts, "endOperations");
      function rs(e) {
        var t = e.cm,
          i = t.display;
        ss(t), e.updateMaxLine && zi(t), e.mustUpdate = e.viewChanged || e.forceUpdate || e.scrollTop != null || e.scrollToPos && (e.scrollToPos.from.line < i.viewFrom || e.scrollToPos.to.line >= i.viewTo) || i.maxLineChanged && t.options.lineWrapping, e.update = e.mustUpdate && new jr(t, e.mustUpdate && {
          top: e.scrollTop,
          ensure: e.scrollToPos
        }, e.forceUpdate);
      }
      u(rs, "endOperation_R1");
      function is(e) {
        e.updatedDisplay = e.mustUpdate && ln(e.cm, e.update);
      }
      u(is, "endOperation_W1");
      function ns(e) {
        var t = e.cm,
          i = t.display;
        e.updatedDisplay && Zr(t), e.barMeasure = or(t), i.maxLineChanged && !t.options.lineWrapping && (e.adjustWidthTo = gl(t, i.maxLine, i.maxLine.text.length).left + 3, t.display.sizerWidth = e.adjustWidthTo, e.barMeasure.scrollWidth = Math.max(i.scroller.clientWidth, i.sizer.offsetLeft + e.adjustWidthTo + Ae(t) + t.display.barWidth), e.maxScrollLeft = Math.max(0, i.sizer.offsetLeft + e.adjustWidthTo - st(t))), (e.updatedDisplay || e.selectionChanged) && (e.preparedSelection = i.input.prepareSelection());
      }
      u(ns, "endOperation_R2");
      function ls(e) {
        var t = e.cm;
        e.adjustWidthTo != null && (t.display.sizer.style.minWidth = e.adjustWidthTo + "px", e.maxScrollLeft < t.doc.scrollLeft && ct(t, Math.min(t.display.scroller.scrollLeft, e.maxScrollLeft), !0), t.display.maxLineChanged = !1);
        var i = e.focus && e.focus == be();
        e.preparedSelection && t.display.input.showSelection(e.preparedSelection, i), (e.updatedDisplay || e.startHeight != t.doc.height) && At(t, e.barMeasure), e.updatedDisplay && sn(t, e.barMeasure), e.selectionChanged && $i(t), t.state.focused && e.updateInput && t.display.input.reset(e.typing), i && Al(e.cm);
      }
      u(ls, "endOperation_W2");
      function os(e) {
        var t = e.cm,
          i = t.display,
          r = t.doc;
        if (e.updatedDisplay && Il(t, e.update), i.wheelStartX != null && (e.scrollTop != null || e.scrollLeft != null || e.scrollToPos) && (i.wheelStartX = i.wheelStartY = null), e.scrollTop != null && Hl(t, e.scrollTop, e.forceScroll), e.scrollLeft != null && ct(t, e.scrollLeft, !0, !0), e.scrollToPos) {
          var n = ja(t, N(r, e.scrollToPos.from), N(r, e.scrollToPos.to), e.scrollToPos.margin);
          Ja(t, n);
        }
        var l = e.maybeHiddenMarkers,
          o = e.maybeUnhiddenMarkers;
        if (l) for (var a = 0; a < l.length; ++a) l[a].lines.length || U(l[a], "hide");
        if (o) for (var s = 0; s < o.length; ++s) o[s].lines.length && U(o[s], "unhide");
        i.wrapper.offsetHeight && (r.scrollTop = t.display.scroller.scrollTop), e.changeObjs && U(t, "changes", t, e.changeObjs), e.update && e.update.finish();
      }
      u(os, "endOperation_finish");
      function de(e, t) {
        if (e.curOp) return t();
        pt(e);
        try {
          return t();
        } finally {
          vt(e);
        }
      }
      u(de, "runInOp");
      function Q(e, t) {
        return function () {
          if (e.curOp) return t.apply(e, arguments);
          pt(e);
          try {
            return t.apply(e, arguments);
          } finally {
            vt(e);
          }
        };
      }
      u(Q, "operation");
      function le(e) {
        return function () {
          if (this.curOp) return e.apply(this, arguments);
          pt(this);
          try {
            return e.apply(this, arguments);
          } finally {
            vt(this);
          }
        };
      }
      u(le, "methodOp");
      function J(e) {
        return function () {
          var t = this.cm;
          if (!t || t.curOp) return e.apply(this, arguments);
          pt(t);
          try {
            return e.apply(this, arguments);
          } finally {
            vt(t);
          }
        };
      }
      u(J, "docMethodOp");
      function sr(e, t) {
        e.doc.highlightFrontier < e.display.viewTo && e.state.highlight.set(t, pi(as, e));
      }
      u(sr, "startWorker");
      function as(e) {
        var t = e.doc;
        if (!(t.highlightFrontier >= e.display.viewTo)) {
          var i = +new Date() + e.options.workTime,
            r = jt(e, t.highlightFrontier),
            n = [];
          t.iter(r.line, Math.min(t.first + t.size, e.display.viewTo + 500), function (l) {
            if (r.line >= e.display.viewFrom) {
              var o = l.styles,
                a = l.text.length > e.options.maxHighlightLength ? lt(t.mode, r.state) : null,
                s = _n(e, l, r, !0);
              a && (r.state = a), l.styles = s.styles;
              var f = l.styleClasses,
                h = s.classes;
              h ? l.styleClasses = h : f && (l.styleClasses = null);
              for (var c = !o || o.length != l.styles.length || f != h && (!f || !h || f.bgClass != h.bgClass || f.textClass != h.textClass), p = 0; !c && p < o.length; ++p) c = o[p] != l.styles[p];
              c && n.push(r.line), l.stateAfter = r.save(), r.nextLine();
            } else l.text.length <= e.options.maxHighlightLength && Fi(e, l.text, r), l.stateAfter = r.line % 5 == 0 ? r.save() : null, r.nextLine();
            if (+new Date() > i) return sr(e, e.options.workDelay), !0;
          }), t.highlightFrontier = r.line, t.modeFrontier = Math.max(t.modeFrontier, r.line), n.length && de(e, function () {
            for (var l = 0; l < n.length; l++) Ye(e, n[l], "text");
          });
        }
      }
      u(as, "highlightWorker");
      var jr = u(function (e, t, i) {
        var r = e.display;
        this.viewport = t, this.visible = Qr(r, e.doc, t), this.editorIsHidden = !r.wrapper.offsetWidth, this.wrapperHeight = r.wrapper.clientHeight, this.wrapperWidth = r.wrapper.clientWidth, this.oldDisplayWidth = st(e), this.force = i, this.dims = Qi(e), this.events = [];
      }, "DisplayUpdate");
      jr.prototype.signal = function (e, t) {
        Ce(e, t) && this.events.push(arguments);
      }, jr.prototype.finish = function () {
        for (var e = 0; e < this.events.length; e++) U.apply(null, this.events[e]);
      };
      function ss(e) {
        var t = e.display;
        !t.scrollbarsClipped && t.scroller.offsetWidth && (t.nativeBarWidth = t.scroller.offsetWidth - t.scroller.clientWidth, t.heightForcer.style.height = Ae(e) + "px", t.sizer.style.marginBottom = -t.nativeBarWidth + "px", t.sizer.style.borderRightWidth = Ae(e) + "px", t.scrollbarsClipped = !0);
      }
      u(ss, "maybeClipScrollbars");
      function us(e) {
        if (e.hasFocus()) return null;
        var t = be();
        if (!t || !Ke(e.display.lineDiv, t)) return null;
        var i = {
          activeElt: t
        };
        if (window.getSelection) {
          var r = window.getSelection();
          r.anchorNode && r.extend && Ke(e.display.lineDiv, r.anchorNode) && (i.anchorNode = r.anchorNode, i.anchorOffset = r.anchorOffset, i.focusNode = r.focusNode, i.focusOffset = r.focusOffset);
        }
        return i;
      }
      u(us, "selectionSnapshot");
      function fs(e) {
        if (!(!e || !e.activeElt || e.activeElt == be()) && (e.activeElt.focus(), !/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName) && e.anchorNode && Ke(document.body, e.anchorNode) && Ke(document.body, e.focusNode))) {
          var t = window.getSelection(),
            i = document.createRange();
          i.setEnd(e.anchorNode, e.anchorOffset), i.collapse(!1), t.removeAllRanges(), t.addRange(i), t.extend(e.focusNode, e.focusOffset);
        }
      }
      u(fs, "restoreSelection");
      function ln(e, t) {
        var i = e.display,
          r = e.doc;
        if (t.editorIsHidden) return qe(e), !1;
        if (!t.force && t.visible.from >= i.viewFrom && t.visible.to <= i.viewTo && (i.updateLineNumbers == null || i.updateLineNumbers >= i.viewTo) && i.renderedView == i.view && Dl(e) == 0) return !1;
        Bl(e) && (qe(e), t.dims = Qi(e));
        var n = r.first + r.size,
          l = Math.max(t.visible.from - e.options.viewportMargin, r.first),
          o = Math.min(n, t.visible.to + e.options.viewportMargin);
        i.viewFrom < l && l - i.viewFrom < 20 && (l = Math.max(r.first, i.viewFrom)), i.viewTo > o && i.viewTo - o < 20 && (o = Math.min(n, i.viewTo)), Ee && (l = Ri(e.doc, l), o = nl(e.doc, o));
        var a = l != i.viewFrom || o != i.viewTo || i.lastWrapHeight != t.wrapperHeight || i.lastWrapWidth != t.wrapperWidth;
        Za(e, l, o), i.viewOffset = Ie(S(e.doc, i.viewFrom)), e.display.mover.style.top = i.viewOffset + "px";
        var s = Dl(e);
        if (!a && s == 0 && !t.force && i.renderedView == i.view && (i.updateLineNumbers == null || i.updateLineNumbers >= i.viewTo)) return !1;
        var f = us(e);
        return s > 4 && (i.lineDiv.style.display = "none"), hs(e, i.updateLineNumbers, t.dims), s > 4 && (i.lineDiv.style.display = ""), i.renderedView = i.view, fs(f), Ue(i.cursorDiv), Ue(i.selectionDiv), i.gutters.style.height = i.sizer.style.minHeight = 0, a && (i.lastWrapHeight = t.wrapperHeight, i.lastWrapWidth = t.wrapperWidth, sr(e, 400)), i.updateLineNumbers = null, !0;
      }
      u(ln, "updateDisplayIfNeeded");
      function Il(e, t) {
        for (var i = t.viewport, r = !0;; r = !1) {
          if (!r || !e.options.lineWrapping || t.oldDisplayWidth == st(e)) {
            if (i && i.top != null && (i = {
              top: Math.min(e.doc.height + Ui(e.display) - Ki(e), i.top)
            }), t.visible = Qr(e.display, e.doc, i), t.visible.from >= e.display.viewFrom && t.visible.to <= e.display.viewTo) break;
          } else r && (t.visible = Qr(e.display, e.doc, i));
          if (!ln(e, t)) break;
          Zr(e);
          var n = or(e);
          ir(e), At(e, n), sn(e, n), t.force = !1;
        }
        t.signal(e, "update", e), (e.display.viewFrom != e.display.reportedViewFrom || e.display.viewTo != e.display.reportedViewTo) && (t.signal(e, "viewportChange", e, e.display.viewFrom, e.display.viewTo), e.display.reportedViewFrom = e.display.viewFrom, e.display.reportedViewTo = e.display.viewTo);
      }
      u(Il, "postUpdateDisplay");
      function on(e, t) {
        var i = new jr(e, t);
        if (ln(e, i)) {
          Zr(e), Il(e, i);
          var r = or(e);
          ir(e), At(e, r), sn(e, r), i.finish();
        }
      }
      u(on, "updateDisplaySimple");
      function hs(e, t, i) {
        var r = e.display,
          n = e.options.lineNumbers,
          l = r.lineDiv,
          o = l.firstChild;
        function a(v) {
          var g = v.nextSibling;
          return ne && me && e.display.currentWheelTarget == v ? v.style.display = "none" : v.parentNode.removeChild(v), g;
        }
        u(a, "rm");
        for (var s = r.view, f = r.viewFrom, h = 0; h < s.length; h++) {
          var c = s[h];
          if (!c.hidden) if (!c.node || c.node.parentNode != l) {
            var p = Ra(e, c, f, i);
            l.insertBefore(p, o);
          } else {
            for (; o != c.node;) o = a(o);
            var d = n && t != null && t <= f && c.lineNumber;
            c.changes && (ee(c.changes, "gutter") > -1 && (d = !1), ul(e, c, f, i)), d && (Ue(c.lineNumber), c.lineNumber.appendChild(document.createTextNode(Oi(e.options, f)))), o = c.node.nextSibling;
          }
          f += c.size;
        }
        for (; o;) o = a(o);
      }
      u(hs, "patchDisplay");
      function an(e) {
        var t = e.gutters.offsetWidth;
        e.sizer.style.marginLeft = t + "px", Z(e, "gutterChanged", e);
      }
      u(an, "updateGutterSpace");
      function sn(e, t) {
        e.display.sizer.style.minHeight = t.docHeight + "px", e.display.heightForcer.style.top = t.docHeight + "px", e.display.gutters.style.height = t.docHeight + e.display.barHeight + Ae(e) + "px";
      }
      u(sn, "setDocumentHeight");
      function Rl(e) {
        var t = e.display,
          i = t.view;
        if (!(!t.alignWidgets && (!t.gutters.firstChild || !e.options.fixedGutter))) {
          for (var r = Ji(t) - t.scroller.scrollLeft + e.doc.scrollLeft, n = t.gutters.offsetWidth, l = r + "px", o = 0; o < i.length; o++) if (!i[o].hidden) {
            e.options.fixedGutter && (i[o].gutter && (i[o].gutter.style.left = l), i[o].gutterBackground && (i[o].gutterBackground.style.left = l));
            var a = i[o].alignable;
            if (a) for (var s = 0; s < a.length; s++) a[s].style.left = l;
          }
          e.options.fixedGutter && (t.gutters.style.left = r + n + "px");
        }
      }
      u(Rl, "alignHorizontally");
      function Bl(e) {
        if (!e.options.lineNumbers) return !1;
        var t = e.doc,
          i = Oi(e.options, t.first + t.size - 1),
          r = e.display;
        if (i.length != r.lineNumChars) {
          var n = r.measure.appendChild(T("div", [T("div", i)], "CodeMirror-linenumber CodeMirror-gutter-elt")),
            l = n.firstChild.offsetWidth,
            o = n.offsetWidth - l;
          return r.lineGutter.style.width = "", r.lineNumInnerWidth = Math.max(l, r.lineGutter.offsetWidth - o) + 1, r.lineNumWidth = r.lineNumInnerWidth + o, r.lineNumChars = r.lineNumInnerWidth ? i.length : -1, r.lineGutter.style.width = r.lineNumWidth + "px", an(e.display), !0;
        }
        return !1;
      }
      u(Bl, "maybeUpdateLineNumberWidth");
      function un(e, t) {
        for (var i = [], r = !1, n = 0; n < e.length; n++) {
          var l = e[n],
            o = null;
          if (typeof l != "string" && (o = l.style, l = l.className), l == "CodeMirror-linenumbers") if (t) r = !0;else continue;
          i.push({
            className: l,
            style: o
          });
        }
        return t && !r && i.push({
          className: "CodeMirror-linenumbers",
          style: null
        }), i;
      }
      u(un, "getGutters");
      function zl(e) {
        var t = e.gutters,
          i = e.gutterSpecs;
        Ue(t), e.lineGutter = null;
        for (var r = 0; r < i.length; ++r) {
          var n = i[r],
            l = n.className,
            o = n.style,
            a = t.appendChild(T("div", null, "CodeMirror-gutter " + l));
          o && (a.style.cssText = o), l == "CodeMirror-linenumbers" && (e.lineGutter = a, a.style.width = (e.lineNumWidth || 1) + "px");
        }
        t.style.display = i.length ? "" : "none", an(e);
      }
      u(zl, "renderGutters");
      function ur(e) {
        zl(e.display), se(e), Rl(e);
      }
      u(ur, "updateGutters");
      function cs(e, t, i, r) {
        var n = this;
        this.input = i, n.scrollbarFiller = T("div", null, "CodeMirror-scrollbar-filler"), n.scrollbarFiller.setAttribute("cm-not-content", "true"), n.gutterFiller = T("div", null, "CodeMirror-gutter-filler"), n.gutterFiller.setAttribute("cm-not-content", "true"), n.lineDiv = bt("div", null, "CodeMirror-code"), n.selectionDiv = T("div", null, null, "position: relative; z-index: 1"), n.cursorDiv = T("div", null, "CodeMirror-cursors"), n.measure = T("div", null, "CodeMirror-measure"), n.lineMeasure = T("div", null, "CodeMirror-measure"), n.lineSpace = bt("div", [n.measure, n.lineMeasure, n.selectionDiv, n.cursorDiv, n.lineDiv], null, "position: relative; outline: none");
        var l = bt("div", [n.lineSpace], "CodeMirror-lines");
        n.mover = T("div", [l], null, "position: relative"), n.sizer = T("div", [n.mover], "CodeMirror-sizer"), n.sizerWidth = null, n.heightForcer = T("div", null, null, "position: absolute; height: " + Wn + "px; width: 1px;"), n.gutters = T("div", null, "CodeMirror-gutters"), n.lineGutter = null, n.scroller = T("div", [n.sizer, n.heightForcer, n.gutters], "CodeMirror-scroll"), n.scroller.setAttribute("tabIndex", "-1"), n.wrapper = T("div", [n.scrollbarFiller, n.gutterFiller, n.scroller], "CodeMirror"), n.wrapper.setAttribute("translate", "no"), O && I < 8 && (n.gutters.style.zIndex = -1, n.scroller.style.paddingRight = 0), !ne && !(Fe && Kt) && (n.scroller.draggable = !0), e && (e.appendChild ? e.appendChild(n.wrapper) : e(n.wrapper)), n.viewFrom = n.viewTo = t.first, n.reportedViewFrom = n.reportedViewTo = t.first, n.view = [], n.renderedView = null, n.externalMeasured = null, n.viewOffset = 0, n.lastWrapHeight = n.lastWrapWidth = 0, n.updateLineNumbers = null, n.nativeBarWidth = n.barHeight = n.barWidth = 0, n.scrollbarsClipped = !1, n.lineNumWidth = n.lineNumInnerWidth = n.lineNumChars = null, n.alignWidgets = !1, n.cachedCharWidth = n.cachedTextHeight = n.cachedPaddingH = null, n.maxLine = null, n.maxLineLength = 0, n.maxLineChanged = !1, n.wheelDX = n.wheelDY = n.wheelStartX = n.wheelStartY = null, n.shift = !1, n.selForContextMenu = null, n.activeTouch = null, n.gutterSpecs = un(r.gutters, r.lineNumbers), zl(n), i.init(n);
      }
      u(cs, "Display");
      var Vr = 0,
        Be = null;
      O ? Be = -.53 : Fe ? Be = 15 : Tr ? Be = -.7 : Mr && (Be = -1 / 3);
      function Gl(e) {
        var t = e.wheelDeltaX,
          i = e.wheelDeltaY;
        return t == null && e.detail && e.axis == e.HORIZONTAL_AXIS && (t = e.detail), i == null && e.detail && e.axis == e.VERTICAL_AXIS ? i = e.detail : i == null && (i = e.wheelDelta), {
          x: t,
          y: i
        };
      }
      u(Gl, "wheelEventDelta");
      function ds(e) {
        var t = Gl(e);
        return t.x *= Be, t.y *= Be, t;
      }
      u(ds, "wheelEventPixels");
      function Ul(e, t) {
        var i = Gl(t),
          r = i.x,
          n = i.y,
          l = Be;
        t.deltaMode === 0 && (r = t.deltaX, n = t.deltaY, l = 1);
        var o = e.display,
          a = o.scroller,
          s = a.scrollWidth > a.clientWidth,
          f = a.scrollHeight > a.clientHeight;
        if (r && s || n && f) {
          if (n && me && ne) {
            e: for (var h = t.target, c = o.view; h != a; h = h.parentNode) for (var p = 0; p < c.length; p++) if (c[p].node == h) {
              e.display.currentWheelTarget = h;
              break e;
            }
          }
          if (r && !Fe && !we && l != null) {
            n && f && lr(e, Math.max(0, a.scrollTop + n * l)), ct(e, Math.max(0, a.scrollLeft + r * l)), (!n || n && f) && ae(t), o.wheelStartX = null;
            return;
          }
          if (n && l != null) {
            var d = n * l,
              v = e.doc.scrollTop,
              g = v + o.wrapper.clientHeight;
            d < 0 ? v = Math.max(0, v + d - 50) : g = Math.min(e.doc.height, g + d + 50), on(e, {
              top: v,
              bottom: g
            });
          }
          Vr < 20 && t.deltaMode !== 0 && (o.wheelStartX == null ? (o.wheelStartX = a.scrollLeft, o.wheelStartY = a.scrollTop, o.wheelDX = r, o.wheelDY = n, setTimeout(function () {
            if (o.wheelStartX != null) {
              var m = a.scrollLeft - o.wheelStartX,
                b = a.scrollTop - o.wheelStartY,
                C = b && o.wheelDY && b / o.wheelDY || m && o.wheelDX && m / o.wheelDX;
              o.wheelStartX = o.wheelStartY = null, C && (Be = (Be * Vr + C) / (Vr + 1), ++Vr);
            }
          }, 200)) : (o.wheelDX += r, o.wheelDY += n));
        }
      }
      u(Ul, "onScrollWheel");
      var ye = u(function (e, t) {
        this.ranges = e, this.primIndex = t;
      }, "Selection");
      ye.prototype.primary = function () {
        return this.ranges[this.primIndex];
      }, ye.prototype.equals = function (e) {
        if (e == this) return !0;
        if (e.primIndex != this.primIndex || e.ranges.length != this.ranges.length) return !1;
        for (var t = 0; t < this.ranges.length; t++) {
          var i = this.ranges[t],
            r = e.ranges[t];
          if (!Wi(i.anchor, r.anchor) || !Wi(i.head, r.head)) return !1;
        }
        return !0;
      }, ye.prototype.deepCopy = function () {
        for (var e = [], t = 0; t < this.ranges.length; t++) e[t] = new W(Hi(this.ranges[t].anchor), Hi(this.ranges[t].head));
        return new ye(e, this.primIndex);
      }, ye.prototype.somethingSelected = function () {
        for (var e = 0; e < this.ranges.length; e++) if (!this.ranges[e].empty()) return !0;
        return !1;
      }, ye.prototype.contains = function (e, t) {
        t || (t = e);
        for (var i = 0; i < this.ranges.length; i++) {
          var r = this.ranges[i];
          if (D(t, r.from()) >= 0 && D(e, r.to()) <= 0) return i;
        }
        return -1;
      };
      var W = u(function (e, t) {
        this.anchor = e, this.head = t;
      }, "Range");
      W.prototype.from = function () {
        return Pr(this.anchor, this.head);
      }, W.prototype.to = function () {
        return Fr(this.anchor, this.head);
      }, W.prototype.empty = function () {
        return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;
      };
      function ke(e, t, i) {
        var r = e && e.options.selectionsMayTouch,
          n = t[i];
        t.sort(function (p, d) {
          return D(p.from(), d.from());
        }), i = ee(t, n);
        for (var l = 1; l < t.length; l++) {
          var o = t[l],
            a = t[l - 1],
            s = D(a.to(), o.from());
          if (r && !o.empty() ? s > 0 : s >= 0) {
            var f = Pr(a.from(), o.from()),
              h = Fr(a.to(), o.to()),
              c = a.empty() ? o.from() == o.head : a.from() == a.head;
            l <= i && --i, t.splice(--l, 2, new W(c ? h : f, c ? f : h));
          }
        }
        return new ye(t, i);
      }
      u(ke, "normalizeSelection");
      function Ze(e, t) {
        return new ye([new W(e, t || e)], 0);
      }
      u(Ze, "simpleSelection");
      function Qe(e) {
        return e.text ? y(e.from.line + e.text.length - 1, H(e.text).length + (e.text.length == 1 ? e.from.ch : 0)) : e.to;
      }
      u(Qe, "changeEnd");
      function Kl(e, t) {
        if (D(e, t.from) < 0) return e;
        if (D(e, t.to) <= 0) return Qe(t);
        var i = e.line + t.text.length - (t.to.line - t.from.line) - 1,
          r = e.ch;
        return e.line == t.to.line && (r += Qe(t).ch - t.to.ch), y(i, r);
      }
      u(Kl, "adjustForChange");
      function fn(e, t) {
        for (var i = [], r = 0; r < e.sel.ranges.length; r++) {
          var n = e.sel.ranges[r];
          i.push(new W(Kl(n.anchor, t), Kl(n.head, t)));
        }
        return ke(e.cm, i, e.sel.primIndex);
      }
      u(fn, "computeSelAfterChange");
      function _l(e, t, i) {
        return e.line == t.line ? y(i.line, e.ch - t.ch + i.ch) : y(i.line + (e.line - t.line), e.ch);
      }
      u(_l, "offsetPos");
      function ps(e, t, i) {
        for (var r = [], n = y(e.first, 0), l = n, o = 0; o < t.length; o++) {
          var a = t[o],
            s = _l(a.from, n, l),
            f = _l(Qe(a), n, l);
          if (n = a.to, l = f, i == "around") {
            var h = e.sel.ranges[o],
              c = D(h.head, h.anchor) < 0;
            r[o] = new W(c ? f : s, c ? s : f);
          } else r[o] = new W(s, s);
        }
        return new ye(r, e.sel.primIndex);
      }
      u(ps, "computeReplacedSel");
      function hn(e) {
        e.doc.mode = Di(e.options, e.doc.modeOption), fr(e);
      }
      u(hn, "loadMode");
      function fr(e) {
        e.doc.iter(function (t) {
          t.stateAfter && (t.stateAfter = null), t.styles && (t.styles = null);
        }), e.doc.modeFrontier = e.doc.highlightFrontier = e.doc.first, sr(e, 100), e.state.modeGen++, e.curOp && se(e);
      }
      u(fr, "resetModeState");
      function Xl(e, t) {
        return t.from.ch == 0 && t.to.ch == 0 && H(t.text) == "" && (!e.cm || e.cm.options.wholeLineUpdateBefore);
      }
      u(Xl, "isWholeLineUpdate");
      function cn(e, t, i, r) {
        function n(C) {
          return i ? i[C] : null;
        }
        u(n, "spansFor");
        function l(C, x, w) {
          wa(C, x, w, r), Z(C, "change", C, t);
        }
        u(l, "update");
        function o(C, x) {
          for (var w = [], k = C; k < x; ++k) w.push(new St(f[k], n(k), r));
          return w;
        }
        u(o, "linesFor");
        var a = t.from,
          s = t.to,
          f = t.text,
          h = S(e, a.line),
          c = S(e, s.line),
          p = H(f),
          d = n(f.length - 1),
          v = s.line - a.line;
        if (t.full) e.insert(0, o(0, f.length)), e.remove(f.length, e.size - f.length);else if (Xl(e, t)) {
          var g = o(0, f.length - 1);
          l(c, c.text, d), v && e.remove(a.line, v), g.length && e.insert(a.line, g);
        } else if (h == c) {
          if (f.length == 1) l(h, h.text.slice(0, a.ch) + p + h.text.slice(s.ch), d);else {
            var m = o(1, f.length - 1);
            m.push(new St(p + h.text.slice(s.ch), d, r)), l(h, h.text.slice(0, a.ch) + f[0], n(0)), e.insert(a.line + 1, m);
          }
        } else if (f.length == 1) l(h, h.text.slice(0, a.ch) + f[0] + c.text.slice(s.ch), n(0)), e.remove(a.line + 1, v);else {
          l(h, h.text.slice(0, a.ch) + f[0], n(0)), l(c, p + c.text.slice(s.ch), d);
          var b = o(1, f.length - 1);
          v > 1 && e.remove(a.line + 1, v - 1), e.insert(a.line + 1, b);
        }
        Z(e, "change", e, t);
      }
      u(cn, "updateDoc");
      function Je(e, t, i) {
        function r(n, l, o) {
          if (n.linked) for (var a = 0; a < n.linked.length; ++a) {
            var s = n.linked[a];
            if (s.doc != l) {
              var f = o && s.sharedHist;
              i && !f || (t(s.doc, f), r(s.doc, n, f));
            }
          }
        }
        u(r, "propagate"), r(e, null, !0);
      }
      u(Je, "linkedDocs");
      function Yl(e, t) {
        if (t.cm) throw new Error("This document is already in use.");
        e.doc = t, t.cm = e, ji(e), hn(e), ql(e), e.options.direction = t.direction, e.options.lineWrapping || zi(e), e.options.mode = t.modeOption, se(e);
      }
      u(Yl, "attachDoc");
      function ql(e) {
        (e.doc.direction == "rtl" ? it : tt)(e.display.lineDiv, "CodeMirror-rtl");
      }
      u(ql, "setDirectionClass");
      function vs(e) {
        de(e, function () {
          ql(e), se(e);
        });
      }
      u(vs, "directionChanged");
      function $r(e) {
        this.done = [], this.undone = [], this.undoDepth = e ? e.undoDepth : 1 / 0, this.lastModTime = this.lastSelTime = 0, this.lastOp = this.lastSelOp = null, this.lastOrigin = this.lastSelOrigin = null, this.generation = this.maxGeneration = e ? e.maxGeneration : 1;
      }
      u($r, "History");
      function dn(e, t) {
        var i = {
          from: Hi(t.from),
          to: Qe(t),
          text: ot(e, t.from, t.to)
        };
        return Jl(e, i, t.from.line, t.to.line + 1), Je(e, function (r) {
          return Jl(r, i, t.from.line, t.to.line + 1);
        }, !0), i;
      }
      u(dn, "historyChangeFromChange");
      function Zl(e) {
        for (; e.length;) {
          var t = H(e);
          if (t.ranges) e.pop();else break;
        }
      }
      u(Zl, "clearSelectionEvents");
      function gs(e, t) {
        if (t) return Zl(e.done), H(e.done);
        if (e.done.length && !H(e.done).ranges) return H(e.done);
        if (e.done.length > 1 && !e.done[e.done.length - 2].ranges) return e.done.pop(), H(e.done);
      }
      u(gs, "lastChangeEvent");
      function Ql(e, t, i, r) {
        var n = e.history;
        n.undone.length = 0;
        var l = +new Date(),
          o,
          a;
        if ((n.lastOp == r || n.lastOrigin == t.origin && t.origin && (t.origin.charAt(0) == "+" && n.lastModTime > l - (e.cm ? e.cm.options.historyEventDelay : 500) || t.origin.charAt(0) == "*")) && (o = gs(n, n.lastOp == r))) a = H(o.changes), D(t.from, t.to) == 0 && D(t.from, a.to) == 0 ? a.to = Qe(t) : o.changes.push(dn(e, t));else {
          var s = H(n.done);
          for ((!s || !s.ranges) && ei(e.sel, n.done), o = {
            changes: [dn(e, t)],
            generation: n.generation
          }, n.done.push(o); n.done.length > n.undoDepth;) n.done.shift(), n.done[0].ranges || n.done.shift();
        }
        n.done.push(i), n.generation = ++n.maxGeneration, n.lastModTime = n.lastSelTime = l, n.lastOp = n.lastSelOp = r, n.lastOrigin = n.lastSelOrigin = t.origin, a || U(e, "historyAdded");
      }
      u(Ql, "addChangeToHistory");
      function ys(e, t, i, r) {
        var n = t.charAt(0);
        return n == "*" || n == "+" && i.ranges.length == r.ranges.length && i.somethingSelected() == r.somethingSelected() && new Date() - e.history.lastSelTime <= (e.cm ? e.cm.options.historyEventDelay : 500);
      }
      u(ys, "selectionEventCanBeMerged");
      function ms(e, t, i, r) {
        var n = e.history,
          l = r && r.origin;
        i == n.lastSelOp || l && n.lastSelOrigin == l && (n.lastModTime == n.lastSelTime && n.lastOrigin == l || ys(e, l, H(n.done), t)) ? n.done[n.done.length - 1] = t : ei(t, n.done), n.lastSelTime = +new Date(), n.lastSelOrigin = l, n.lastSelOp = i, r && r.clearRedo !== !1 && Zl(n.undone);
      }
      u(ms, "addSelectionToHistory");
      function ei(e, t) {
        var i = H(t);
        i && i.ranges && i.equals(e) || t.push(e);
      }
      u(ei, "pushSelectionToHistory");
      function Jl(e, t, i, r) {
        var n = t["spans_" + e.id],
          l = 0;
        e.iter(Math.max(e.first, i), Math.min(e.first + e.size, r), function (o) {
          o.markedSpans && ((n || (n = t["spans_" + e.id] = {}))[l] = o.markedSpans), ++l;
        });
      }
      u(Jl, "attachLocalSpans");
      function bs(e) {
        if (!e) return null;
        for (var t, i = 0; i < e.length; ++i) e[i].marker.explicitlyCleared ? t || (t = e.slice(0, i)) : t && t.push(e[i]);
        return t ? t.length ? t : null : e;
      }
      u(bs, "removeClearedSpans");
      function xs(e, t) {
        var i = t["spans_" + e.id];
        if (!i) return null;
        for (var r = [], n = 0; n < t.text.length; ++n) r.push(bs(i[n]));
        return r;
      }
      u(xs, "getOldSpans");
      function jl(e, t) {
        var i = xs(e, t),
          r = Ei(e, t);
        if (!i) return r;
        if (!r) return i;
        for (var n = 0; n < i.length; ++n) {
          var l = i[n],
            o = r[n];
          if (l && o) e: for (var a = 0; a < o.length; ++a) {
            for (var s = o[a], f = 0; f < l.length; ++f) if (l[f].marker == s.marker) continue e;
            l.push(s);
          } else o && (i[n] = o);
        }
        return i;
      }
      u(jl, "mergeOldSpans");
      function Ot(e, t, i) {
        for (var r = [], n = 0; n < e.length; ++n) {
          var l = e[n];
          if (l.ranges) {
            r.push(i ? ye.prototype.deepCopy.call(l) : l);
            continue;
          }
          var o = l.changes,
            a = [];
          r.push({
            changes: a
          });
          for (var s = 0; s < o.length; ++s) {
            var f = o[s],
              h = void 0;
            if (a.push({
              from: f.from,
              to: f.to,
              text: f.text
            }), t) for (var c in f) (h = c.match(/^spans_(\d+)$/)) && ee(t, Number(h[1])) > -1 && (H(a)[c] = f[c], delete f[c]);
          }
        }
        return r;
      }
      u(Ot, "copyHistoryArray");
      function pn(e, t, i, r) {
        if (r) {
          var n = e.anchor;
          if (i) {
            var l = D(t, n) < 0;
            l != D(i, n) < 0 ? (n = t, t = i) : l != D(t, i) < 0 && (t = i);
          }
          return new W(n, t);
        } else return new W(i || t, t);
      }
      u(pn, "extendRange");
      function ti(e, t, i, r, n) {
        n == null && (n = e.cm && (e.cm.display.shift || e.extend)), te(e, new ye([pn(e.sel.primary(), t, i, n)], 0), r);
      }
      u(ti, "extendSelection");
      function Vl(e, t, i) {
        for (var r = [], n = e.cm && (e.cm.display.shift || e.extend), l = 0; l < e.sel.ranges.length; l++) r[l] = pn(e.sel.ranges[l], t[l], null, n);
        var o = ke(e.cm, r, e.sel.primIndex);
        te(e, o, i);
      }
      u(Vl, "extendSelections");
      function vn(e, t, i, r) {
        var n = e.sel.ranges.slice(0);
        n[t] = i, te(e, ke(e.cm, n, e.sel.primIndex), r);
      }
      u(vn, "replaceOneSelection");
      function $l(e, t, i, r) {
        te(e, Ze(t, i), r);
      }
      u($l, "setSimpleSelection");
      function Cs(e, t, i) {
        var r = {
          ranges: t.ranges,
          update: function (n) {
            this.ranges = [];
            for (var l = 0; l < n.length; l++) this.ranges[l] = new W(N(e, n[l].anchor), N(e, n[l].head));
          },
          origin: i && i.origin
        };
        return U(e, "beforeSelectionChange", e, r), e.cm && U(e.cm, "beforeSelectionChange", e.cm, r), r.ranges != t.ranges ? ke(e.cm, r.ranges, r.ranges.length - 1) : t;
      }
      u(Cs, "filterSelectionChange");
      function eo(e, t, i) {
        var r = e.history.done,
          n = H(r);
        n && n.ranges ? (r[r.length - 1] = t, ri(e, t, i)) : te(e, t, i);
      }
      u(eo, "setSelectionReplaceHistory");
      function te(e, t, i) {
        ri(e, t, i), ms(e, e.sel, e.cm ? e.cm.curOp.id : NaN, i);
      }
      u(te, "setSelection");
      function ri(e, t, i) {
        (Ce(e, "beforeSelectionChange") || e.cm && Ce(e.cm, "beforeSelectionChange")) && (t = Cs(e, t, i));
        var r = i && i.bias || (D(t.primary().head, e.sel.primary().head) < 0 ? -1 : 1);
        to(e, io(e, t, r, !0)), !(i && i.scroll === !1) && e.cm && e.cm.getOption("readOnly") != "nocursor" && Nt(e.cm);
      }
      u(ri, "setSelectionNoUndo");
      function to(e, t) {
        t.equals(e.sel) || (e.sel = t, e.cm && (e.cm.curOp.updateInput = 1, e.cm.curOp.selectionChanged = !0, Rn(e.cm)), Z(e, "cursorActivity", e));
      }
      u(to, "setSelectionInner");
      function ro(e) {
        to(e, io(e, e.sel, null, !1));
      }
      u(ro, "reCheckSelection");
      function io(e, t, i, r) {
        for (var n, l = 0; l < t.ranges.length; l++) {
          var o = t.ranges[l],
            a = t.ranges.length == e.sel.ranges.length && e.sel.ranges[l],
            s = ii(e, o.anchor, a && a.anchor, i, r),
            f = ii(e, o.head, a && a.head, i, r);
          (n || s != o.anchor || f != o.head) && (n || (n = t.ranges.slice(0, l)), n[l] = new W(s, f));
        }
        return n ? ke(e.cm, n, t.primIndex) : t;
      }
      u(io, "skipAtomicInSelection");
      function Wt(e, t, i, r, n) {
        var l = S(e, t.line);
        if (l.markedSpans) for (var o = 0; o < l.markedSpans.length; ++o) {
          var a = l.markedSpans[o],
            s = a.marker,
            f = "selectLeft" in s ? !s.selectLeft : s.inclusiveLeft,
            h = "selectRight" in s ? !s.selectRight : s.inclusiveRight;
          if ((a.from == null || (f ? a.from <= t.ch : a.from < t.ch)) && (a.to == null || (h ? a.to >= t.ch : a.to > t.ch))) {
            if (n && (U(s, "beforeCursorEnter"), s.explicitlyCleared)) if (l.markedSpans) {
              --o;
              continue;
            } else break;
            if (!s.atomic) continue;
            if (i) {
              var c = s.find(r < 0 ? 1 : -1),
                p = void 0;
              if ((r < 0 ? h : f) && (c = no(e, c, -r, c && c.line == t.line ? l : null)), c && c.line == t.line && (p = D(c, i)) && (r < 0 ? p < 0 : p > 0)) return Wt(e, c, t, r, n);
            }
            var d = s.find(r < 0 ? -1 : 1);
            return (r < 0 ? f : h) && (d = no(e, d, r, d.line == t.line ? l : null)), d ? Wt(e, d, t, r, n) : null;
          }
        }
        return t;
      }
      u(Wt, "skipAtomicInner");
      function ii(e, t, i, r, n) {
        var l = r || 1,
          o = Wt(e, t, i, l, n) || !n && Wt(e, t, i, l, !0) || Wt(e, t, i, -l, n) || !n && Wt(e, t, i, -l, !0);
        return o || (e.cantEdit = !0, y(e.first, 0));
      }
      u(ii, "skipAtomic");
      function no(e, t, i, r) {
        return i < 0 && t.ch == 0 ? t.line > e.first ? N(e, y(t.line - 1)) : null : i > 0 && t.ch == (r || S(e, t.line)).text.length ? t.line < e.first + e.size - 1 ? y(t.line + 1, 0) : null : new y(t.line, t.ch + i);
      }
      u(no, "movePos");
      function lo(e) {
        e.setSelection(y(e.firstLine(), 0), y(e.lastLine()), Me);
      }
      u(lo, "selectAll");
      function oo(e, t, i) {
        var r = {
          canceled: !1,
          from: t.from,
          to: t.to,
          text: t.text,
          origin: t.origin,
          cancel: function () {
            return r.canceled = !0;
          }
        };
        return i && (r.update = function (n, l, o, a) {
          n && (r.from = N(e, n)), l && (r.to = N(e, l)), o && (r.text = o), a !== void 0 && (r.origin = a);
        }), U(e, "beforeChange", e, r), e.cm && U(e.cm, "beforeChange", e.cm, r), r.canceled ? (e.cm && (e.cm.curOp.updateInput = 2), null) : {
          from: r.from,
          to: r.to,
          text: r.text,
          origin: r.origin
        };
      }
      u(oo, "filterChange");
      function Ht(e, t, i) {
        if (e.cm) {
          if (!e.cm.curOp) return Q(e.cm, Ht)(e, t, i);
          if (e.cm.state.suppressEdits) return;
        }
        if (!((Ce(e, "beforeChange") || e.cm && Ce(e.cm, "beforeChange")) && (t = oo(e, t, !0), !t))) {
          var r = jn && !i && ma(e, t.from, t.to);
          if (r) for (var n = r.length - 1; n >= 0; --n) ao(e, {
            from: r[n].from,
            to: r[n].to,
            text: n ? [""] : t.text,
            origin: t.origin
          });else ao(e, t);
        }
      }
      u(Ht, "makeChange");
      function ao(e, t) {
        if (!(t.text.length == 1 && t.text[0] == "" && D(t.from, t.to) == 0)) {
          var i = fn(e, t);
          Ql(e, t, i, e.cm ? e.cm.curOp.id : NaN), hr(e, t, i, Ei(e, t));
          var r = [];
          Je(e, function (n, l) {
            !l && ee(r, n.history) == -1 && (ho(n.history, t), r.push(n.history)), hr(n, t, null, Ei(n, t));
          });
        }
      }
      u(ao, "makeChangeInner");
      function ni(e, t, i) {
        var r = e.cm && e.cm.state.suppressEdits;
        if (!(r && !i)) {
          for (var n = e.history, l, o = e.sel, a = t == "undo" ? n.done : n.undone, s = t == "undo" ? n.undone : n.done, f = 0; f < a.length && (l = a[f], !(i ? l.ranges && !l.equals(e.sel) : !l.ranges)); f++);
          if (f != a.length) {
            for (n.lastOrigin = n.lastSelOrigin = null;;) if (l = a.pop(), l.ranges) {
              if (ei(l, s), i && !l.equals(e.sel)) {
                te(e, l, {
                  clearRedo: !1
                });
                return;
              }
              o = l;
            } else if (r) {
              a.push(l);
              return;
            } else break;
            var h = [];
            ei(o, s), s.push({
              changes: h,
              generation: n.generation
            }), n.generation = l.generation || ++n.maxGeneration;
            for (var c = Ce(e, "beforeChange") || e.cm && Ce(e.cm, "beforeChange"), p = u(function (g) {
                var m = l.changes[g];
                if (m.origin = t, c && !oo(e, m, !1)) return a.length = 0, {};
                h.push(dn(e, m));
                var b = g ? fn(e, m) : H(a);
                hr(e, m, b, jl(e, m)), !g && e.cm && e.cm.scrollIntoView({
                  from: m.from,
                  to: Qe(m)
                });
                var C = [];
                Je(e, function (x, w) {
                  !w && ee(C, x.history) == -1 && (ho(x.history, m), C.push(x.history)), hr(x, m, null, jl(x, m));
                });
              }, "loop"), d = l.changes.length - 1; d >= 0; --d) {
              var v = p(d);
              if (v) return v.v;
            }
          }
        }
      }
      u(ni, "makeChangeFromHistory");
      function so(e, t) {
        if (t != 0 && (e.first += t, e.sel = new ye(Or(e.sel.ranges, function (n) {
          return new W(y(n.anchor.line + t, n.anchor.ch), y(n.head.line + t, n.head.ch));
        }), e.sel.primIndex), e.cm)) {
          se(e.cm, e.first, e.first - t, t);
          for (var i = e.cm.display, r = i.viewFrom; r < i.viewTo; r++) Ye(e.cm, r, "gutter");
        }
      }
      u(so, "shiftDoc");
      function hr(e, t, i, r) {
        if (e.cm && !e.cm.curOp) return Q(e.cm, hr)(e, t, i, r);
        if (t.to.line < e.first) {
          so(e, t.text.length - 1 - (t.to.line - t.from.line));
          return;
        }
        if (!(t.from.line > e.lastLine())) {
          if (t.from.line < e.first) {
            var n = t.text.length - 1 - (e.first - t.from.line);
            so(e, n), t = {
              from: y(e.first, 0),
              to: y(t.to.line + n, t.to.ch),
              text: [H(t.text)],
              origin: t.origin
            };
          }
          var l = e.lastLine();
          t.to.line > l && (t = {
            from: t.from,
            to: y(l, S(e, l).text.length),
            text: [t.text[0]],
            origin: t.origin
          }), t.removed = ot(e, t.from, t.to), i || (i = fn(e, t)), e.cm ? ws(e.cm, t, r) : cn(e, t, r), ri(e, i, Me), e.cantEdit && ii(e, y(e.firstLine(), 0)) && (e.cantEdit = !1);
        }
      }
      u(hr, "makeChangeSingleDoc");
      function ws(e, t, i) {
        var r = e.doc,
          n = e.display,
          l = t.from,
          o = t.to,
          a = !1,
          s = l.line;
        e.options.lineWrapping || (s = F(Se(S(r, l.line))), r.iter(s, o.line + 1, function (d) {
          if (d == n.maxLine) return a = !0, !0;
        })), r.sel.contains(t.from, t.to) > -1 && Rn(e), cn(r, t, i, Ml(e)), e.options.lineWrapping || (r.iter(s, l.line + t.text.length, function (d) {
          var v = Gr(d);
          v > n.maxLineLength && (n.maxLine = d, n.maxLineLength = v, n.maxLineChanged = !0, a = !1);
        }), a && (e.curOp.updateMaxLine = !0)), ha(r, l.line), sr(e, 400);
        var f = t.text.length - (o.line - l.line) - 1;
        t.full ? se(e) : l.line == o.line && t.text.length == 1 && !Xl(e.doc, t) ? Ye(e, l.line, "text") : se(e, l.line, o.line + 1, f);
        var h = Ce(e, "changes"),
          c = Ce(e, "change");
        if (c || h) {
          var p = {
            from: l,
            to: o,
            text: t.text,
            removed: t.removed,
            origin: t.origin
          };
          c && Z(e, "change", e, p), h && (e.curOp.changeObjs || (e.curOp.changeObjs = [])).push(p);
        }
        e.display.selForContextMenu = null;
      }
      u(ws, "makeChangeSingleDocInEditor");
      function Ft(e, t, i, r, n) {
        var l;
        r || (r = i), D(r, i) < 0 && (l = [r, i], i = l[0], r = l[1]), typeof t == "string" && (t = e.splitLines(t)), Ht(e, {
          from: i,
          to: r,
          text: t,
          origin: n
        });
      }
      u(Ft, "replaceRange");
      function uo(e, t, i, r) {
        i < e.line ? e.line += r : t < e.line && (e.line = t, e.ch = 0);
      }
      u(uo, "rebaseHistSelSingle");
      function fo(e, t, i, r) {
        for (var n = 0; n < e.length; ++n) {
          var l = e[n],
            o = !0;
          if (l.ranges) {
            l.copied || (l = e[n] = l.deepCopy(), l.copied = !0);
            for (var a = 0; a < l.ranges.length; a++) uo(l.ranges[a].anchor, t, i, r), uo(l.ranges[a].head, t, i, r);
            continue;
          }
          for (var s = 0; s < l.changes.length; ++s) {
            var f = l.changes[s];
            if (i < f.from.line) f.from = y(f.from.line + r, f.from.ch), f.to = y(f.to.line + r, f.to.ch);else if (t <= f.to.line) {
              o = !1;
              break;
            }
          }
          o || (e.splice(0, n + 1), n = 0);
        }
      }
      u(fo, "rebaseHistArray");
      function ho(e, t) {
        var i = t.from.line,
          r = t.to.line,
          n = t.text.length - (r - i) - 1;
        fo(e.done, i, r, n), fo(e.undone, i, r, n);
      }
      u(ho, "rebaseHist");
      function cr(e, t, i, r) {
        var n = t,
          l = t;
        return typeof t == "number" ? l = S(e, Un(e, t)) : n = F(t), n == null ? null : (r(l, n) && e.cm && Ye(e.cm, n, i), l);
      }
      u(cr, "changeLine");
      function dr(e) {
        this.lines = e, this.parent = null;
        for (var t = 0, i = 0; i < e.length; ++i) e[i].parent = this, t += e[i].height;
        this.height = t;
      }
      u(dr, "LeafChunk"), dr.prototype = {
        chunkSize: function () {
          return this.lines.length;
        },
        removeInner: function (e, t) {
          for (var i = e, r = e + t; i < r; ++i) {
            var n = this.lines[i];
            this.height -= n.height, Sa(n), Z(n, "delete");
          }
          this.lines.splice(e, t);
        },
        collapse: function (e) {
          e.push.apply(e, this.lines);
        },
        insertInner: function (e, t, i) {
          this.height += i, this.lines = this.lines.slice(0, e).concat(t).concat(this.lines.slice(e));
          for (var r = 0; r < t.length; ++r) t[r].parent = this;
        },
        iterN: function (e, t, i) {
          for (var r = e + t; e < r; ++e) if (i(this.lines[e])) return !0;
        }
      };
      function pr(e) {
        this.children = e;
        for (var t = 0, i = 0, r = 0; r < e.length; ++r) {
          var n = e[r];
          t += n.chunkSize(), i += n.height, n.parent = this;
        }
        this.size = t, this.height = i, this.parent = null;
      }
      u(pr, "BranchChunk"), pr.prototype = {
        chunkSize: function () {
          return this.size;
        },
        removeInner: function (e, t) {
          this.size -= t;
          for (var i = 0; i < this.children.length; ++i) {
            var r = this.children[i],
              n = r.chunkSize();
            if (e < n) {
              var l = Math.min(t, n - e),
                o = r.height;
              if (r.removeInner(e, l), this.height -= o - r.height, n == l && (this.children.splice(i--, 1), r.parent = null), (t -= l) == 0) break;
              e = 0;
            } else e -= n;
          }
          if (this.size - t < 25 && (this.children.length > 1 || !(this.children[0] instanceof dr))) {
            var a = [];
            this.collapse(a), this.children = [new dr(a)], this.children[0].parent = this;
          }
        },
        collapse: function (e) {
          for (var t = 0; t < this.children.length; ++t) this.children[t].collapse(e);
        },
        insertInner: function (e, t, i) {
          this.size += t.length, this.height += i;
          for (var r = 0; r < this.children.length; ++r) {
            var n = this.children[r],
              l = n.chunkSize();
            if (e <= l) {
              if (n.insertInner(e, t, i), n.lines && n.lines.length > 50) {
                for (var o = n.lines.length % 25 + 25, a = o; a < n.lines.length;) {
                  var s = new dr(n.lines.slice(a, a += 25));
                  n.height -= s.height, this.children.splice(++r, 0, s), s.parent = this;
                }
                n.lines = n.lines.slice(0, o), this.maybeSpill();
              }
              break;
            }
            e -= l;
          }
        },
        maybeSpill: function () {
          if (!(this.children.length <= 10)) {
            var e = this;
            do {
              var t = e.children.splice(e.children.length - 5, 5),
                i = new pr(t);
              if (e.parent) {
                e.size -= i.size, e.height -= i.height;
                var n = ee(e.parent.children, e);
                e.parent.children.splice(n + 1, 0, i);
              } else {
                var r = new pr(e.children);
                r.parent = e, e.children = [r, i], e = r;
              }
              i.parent = e.parent;
            } while (e.children.length > 10);
            e.parent.maybeSpill();
          }
        },
        iterN: function (e, t, i) {
          for (var r = 0; r < this.children.length; ++r) {
            var n = this.children[r],
              l = n.chunkSize();
            if (e < l) {
              var o = Math.min(t, l - e);
              if (n.iterN(e, o, i)) return !0;
              if ((t -= o) == 0) break;
              e = 0;
            } else e -= l;
          }
        }
      };
      var vr = u(function (e, t, i) {
        if (i) for (var r in i) i.hasOwnProperty(r) && (this[r] = i[r]);
        this.doc = e, this.node = t;
      }, "LineWidget");
      vr.prototype.clear = function () {
        var e = this.doc.cm,
          t = this.line.widgets,
          i = this.line,
          r = F(i);
        if (!(r == null || !t)) {
          for (var n = 0; n < t.length; ++n) t[n] == this && t.splice(n--, 1);
          t.length || (i.widgets = null);
          var l = tr(this);
          De(i, Math.max(0, i.height - l)), e && (de(e, function () {
            co(e, i, -l), Ye(e, r, "widget");
          }), Z(e, "lineWidgetCleared", e, this, r));
        }
      }, vr.prototype.changed = function () {
        var e = this,
          t = this.height,
          i = this.doc.cm,
          r = this.line;
        this.height = null;
        var n = tr(this) - t;
        n && (Xe(this.doc, r) || De(r, r.height + n), i && de(i, function () {
          i.curOp.forceUpdate = !0, co(i, r, n), Z(i, "lineWidgetChanged", i, e, F(r));
        }));
      }, xt(vr);
      function co(e, t, i) {
        Ie(t) < (e.curOp && e.curOp.scrollTop || e.doc.scrollTop) && nn(e, i);
      }
      u(co, "adjustScrollWhenAboveVisible");
      function Ss(e, t, i, r) {
        var n = new vr(e, i, r),
          l = e.cm;
        return l && n.noHScroll && (l.display.alignWidgets = !0), cr(e, t, "widget", function (o) {
          var a = o.widgets || (o.widgets = []);
          if (n.insertAt == null ? a.push(n) : a.splice(Math.min(a.length, Math.max(0, n.insertAt)), 0, n), n.line = o, l && !Xe(e, o)) {
            var s = Ie(o) < e.scrollTop;
            De(o, o.height + tr(n)), s && nn(l, n.height), l.curOp.forceUpdate = !0;
          }
          return !0;
        }), l && Z(l, "lineWidgetAdded", l, n, typeof t == "number" ? t : F(t)), n;
      }
      u(Ss, "addLineWidget");
      var po = 0,
        je = u(function (e, t) {
          this.lines = [], this.type = t, this.doc = e, this.id = ++po;
        }, "TextMarker");
      je.prototype.clear = function () {
        if (!this.explicitlyCleared) {
          var e = this.doc.cm,
            t = e && !e.curOp;
          if (t && pt(e), Ce(this, "clear")) {
            var i = this.find();
            i && Z(this, "clear", i.from, i.to);
          }
          for (var r = null, n = null, l = 0; l < this.lines.length; ++l) {
            var o = this.lines[l],
              a = Vt(o.markedSpans, this);
            e && !this.collapsed ? Ye(e, F(o), "text") : e && (a.to != null && (n = F(o)), a.from != null && (r = F(o))), o.markedSpans = pa(o.markedSpans, a), a.from == null && this.collapsed && !Xe(this.doc, o) && e && De(o, Tt(e.display));
          }
          if (e && this.collapsed && !e.options.lineWrapping) for (var s = 0; s < this.lines.length; ++s) {
            var f = Se(this.lines[s]),
              h = Gr(f);
            h > e.display.maxLineLength && (e.display.maxLine = f, e.display.maxLineLength = h, e.display.maxLineChanged = !0);
          }
          r != null && e && this.collapsed && se(e, r, n + 1), this.lines.length = 0, this.explicitlyCleared = !0, this.atomic && this.doc.cantEdit && (this.doc.cantEdit = !1, e && ro(e.doc)), e && Z(e, "markerCleared", e, this, r, n), t && vt(e), this.parent && this.parent.clear();
        }
      }, je.prototype.find = function (e, t) {
        e == null && this.type == "bookmark" && (e = 1);
        for (var i, r, n = 0; n < this.lines.length; ++n) {
          var l = this.lines[n],
            o = Vt(l.markedSpans, this);
          if (o.from != null && (i = y(t ? l : F(l), o.from), e == -1)) return i;
          if (o.to != null && (r = y(t ? l : F(l), o.to), e == 1)) return r;
        }
        return i && {
          from: i,
          to: r
        };
      }, je.prototype.changed = function () {
        var e = this,
          t = this.find(-1, !0),
          i = this,
          r = this.doc.cm;
        !t || !r || de(r, function () {
          var n = t.line,
            l = F(t.line),
            o = _i(r, l);
          if (o && (bl(o), r.curOp.selectionChanged = r.curOp.forceUpdate = !0), r.curOp.updateMaxLine = !0, !Xe(i.doc, n) && i.height != null) {
            var a = i.height;
            i.height = null;
            var s = tr(i) - a;
            s && De(n, n.height + s);
          }
          Z(r, "markerChanged", r, e);
        });
      }, je.prototype.attachLine = function (e) {
        if (!this.lines.length && this.doc.cm) {
          var t = this.doc.cm.curOp;
          (!t.maybeHiddenMarkers || ee(t.maybeHiddenMarkers, this) == -1) && (t.maybeUnhiddenMarkers || (t.maybeUnhiddenMarkers = [])).push(this);
        }
        this.lines.push(e);
      }, je.prototype.detachLine = function (e) {
        if (this.lines.splice(ee(this.lines, e), 1), !this.lines.length && this.doc.cm) {
          var t = this.doc.cm.curOp;
          (t.maybeHiddenMarkers || (t.maybeHiddenMarkers = [])).push(this);
        }
      }, xt(je);
      function Pt(e, t, i, r, n) {
        if (r && r.shared) return Ls(e, t, i, r, n);
        if (e.cm && !e.cm.curOp) return Q(e.cm, Pt)(e, t, i, r, n);
        var l = new je(e, n),
          o = D(t, i);
        if (r && nt(r, l, !1), o > 0 || o == 0 && l.clearWhenEmpty !== !1) return l;
        if (l.replacedWith && (l.collapsed = !0, l.widgetNode = bt("span", [l.replacedWith], "CodeMirror-widget"), r.handleMouseEvents || l.widgetNode.setAttribute("cm-ignore-events", "true"), r.insertLeft && (l.widgetNode.insertLeft = !0)), l.collapsed) {
          if (il(e, t.line, t, i, l) || t.line != i.line && il(e, i.line, t, i, l)) throw new Error("Inserting collapsed marker partially overlapping an existing one");
          da();
        }
        l.addToHistory && Ql(e, {
          from: t,
          to: i,
          origin: "markText"
        }, e.sel, NaN);
        var a = t.line,
          s = e.cm,
          f;
        if (e.iter(a, i.line + 1, function (c) {
          s && l.collapsed && !s.options.lineWrapping && Se(c) == s.display.maxLine && (f = !0), l.collapsed && a != t.line && De(c, 0), va(c, new Ir(l, a == t.line ? t.ch : null, a == i.line ? i.ch : null), e.cm && e.cm.curOp), ++a;
        }), l.collapsed && e.iter(t.line, i.line + 1, function (c) {
          Xe(e, c) && De(c, 0);
        }), l.clearOnEnter && M(l, "beforeCursorEnter", function () {
          return l.clear();
        }), l.readOnly && (ca(), (e.history.done.length || e.history.undone.length) && e.clearHistory()), l.collapsed && (l.id = ++po, l.atomic = !0), s) {
          if (f && (s.curOp.updateMaxLine = !0), l.collapsed) se(s, t.line, i.line + 1);else if (l.className || l.startStyle || l.endStyle || l.css || l.attributes || l.title) for (var h = t.line; h <= i.line; h++) Ye(s, h, "text");
          l.atomic && ro(s.doc), Z(s, "markerAdded", s, l);
        }
        return l;
      }
      u(Pt, "markText");
      var gr = u(function (e, t) {
        this.markers = e, this.primary = t;
        for (var i = 0; i < e.length; ++i) e[i].parent = this;
      }, "SharedTextMarker");
      gr.prototype.clear = function () {
        if (!this.explicitlyCleared) {
          this.explicitlyCleared = !0;
          for (var e = 0; e < this.markers.length; ++e) this.markers[e].clear();
          Z(this, "clear");
        }
      }, gr.prototype.find = function (e, t) {
        return this.primary.find(e, t);
      }, xt(gr);
      function Ls(e, t, i, r, n) {
        r = nt(r), r.shared = !1;
        var l = [Pt(e, t, i, r, n)],
          o = l[0],
          a = r.widgetNode;
        return Je(e, function (s) {
          a && (r.widgetNode = a.cloneNode(!0)), l.push(Pt(s, N(s, t), N(s, i), r, n));
          for (var f = 0; f < s.linked.length; ++f) if (s.linked[f].isParent) return;
          o = H(l);
        }), new gr(l, o);
      }
      u(Ls, "markTextShared");
      function vo(e) {
        return e.findMarks(y(e.first, 0), e.clipPos(y(e.lastLine())), function (t) {
          return t.parent;
        });
      }
      u(vo, "findSharedMarkers");
      function ks(e, t) {
        for (var i = 0; i < t.length; i++) {
          var r = t[i],
            n = r.find(),
            l = e.clipPos(n.from),
            o = e.clipPos(n.to);
          if (D(l, o)) {
            var a = Pt(e, l, o, r.primary, r.primary.type);
            r.markers.push(a), a.parent = r;
          }
        }
      }
      u(ks, "copySharedMarkers");
      function Ts(e) {
        for (var t = u(function (r) {
            var n = e[r],
              l = [n.primary.doc];
            Je(n.primary.doc, function (s) {
              return l.push(s);
            });
            for (var o = 0; o < n.markers.length; o++) {
              var a = n.markers[o];
              ee(l, a.doc) == -1 && (a.parent = null, n.markers.splice(o--, 1));
            }
          }, "loop"), i = 0; i < e.length; i++) t(i);
      }
      u(Ts, "detachSharedMarkers");
      var Ms = 0,
        ue = u(function (e, t, i, r, n) {
          if (!(this instanceof ue)) return new ue(e, t, i, r, n);
          i == null && (i = 0), pr.call(this, [new dr([new St("", null)])]), this.first = i, this.scrollTop = this.scrollLeft = 0, this.cantEdit = !1, this.cleanGeneration = 1, this.modeFrontier = this.highlightFrontier = i;
          var l = y(i, 0);
          this.sel = Ze(l), this.history = new $r(null), this.id = ++Ms, this.modeOption = t, this.lineSep = r, this.direction = n == "rtl" ? "rtl" : "ltr", this.extend = !1, typeof e == "string" && (e = this.splitLines(e)), cn(this, {
            from: l,
            to: l,
            text: e
          }), te(this, Ze(l), Me);
        }, "Doc");
      ue.prototype = Fn(pr.prototype, {
        constructor: ue,
        iter: function (e, t, i) {
          i ? this.iterN(e - this.first, t - e, i) : this.iterN(this.first, this.first + this.size, e);
        },
        insert: function (e, t) {
          for (var i = 0, r = 0; r < t.length; ++r) i += t[r].height;
          this.insertInner(e - this.first, t, i);
        },
        remove: function (e, t) {
          this.removeInner(e - this.first, t);
        },
        getValue: function (e) {
          var t = Ai(this, this.first, this.first + this.size);
          return e === !1 ? t : t.join(e || this.lineSeparator());
        },
        setValue: J(function (e) {
          var t = y(this.first, 0),
            i = this.first + this.size - 1;
          Ht(this, {
            from: t,
            to: y(i, S(this, i).text.length),
            text: this.splitLines(e),
            origin: "setValue",
            full: !0
          }, !0), this.cm && nr(this.cm, 0, 0), te(this, Ze(t), Me);
        }),
        replaceRange: function (e, t, i, r) {
          t = N(this, t), i = i ? N(this, i) : t, Ft(this, e, t, i, r);
        },
        getRange: function (e, t, i) {
          var r = ot(this, N(this, e), N(this, t));
          return i === !1 ? r : i === "" ? r.join("") : r.join(i || this.lineSeparator());
        },
        getLine: function (e) {
          var t = this.getLineHandle(e);
          return t && t.text;
        },
        getLineHandle: function (e) {
          if (Jt(this, e)) return S(this, e);
        },
        getLineNumber: function (e) {
          return F(e);
        },
        getLineHandleVisualStart: function (e) {
          return typeof e == "number" && (e = S(this, e)), Se(e);
        },
        lineCount: function () {
          return this.size;
        },
        firstLine: function () {
          return this.first;
        },
        lastLine: function () {
          return this.first + this.size - 1;
        },
        clipPos: function (e) {
          return N(this, e);
        },
        getCursor: function (e) {
          var t = this.sel.primary(),
            i;
          return e == null || e == "head" ? i = t.head : e == "anchor" ? i = t.anchor : e == "end" || e == "to" || e === !1 ? i = t.to() : i = t.from(), i;
        },
        listSelections: function () {
          return this.sel.ranges;
        },
        somethingSelected: function () {
          return this.sel.somethingSelected();
        },
        setCursor: J(function (e, t, i) {
          $l(this, N(this, typeof e == "number" ? y(e, t || 0) : e), null, i);
        }),
        setSelection: J(function (e, t, i) {
          $l(this, N(this, e), N(this, t || e), i);
        }),
        extendSelection: J(function (e, t, i) {
          ti(this, N(this, e), t && N(this, t), i);
        }),
        extendSelections: J(function (e, t) {
          Vl(this, Kn(this, e), t);
        }),
        extendSelectionsBy: J(function (e, t) {
          var i = Or(this.sel.ranges, e);
          Vl(this, Kn(this, i), t);
        }),
        setSelections: J(function (e, t, i) {
          if (e.length) {
            for (var r = [], n = 0; n < e.length; n++) r[n] = new W(N(this, e[n].anchor), N(this, e[n].head || e[n].anchor));
            t == null && (t = Math.min(e.length - 1, this.sel.primIndex)), te(this, ke(this.cm, r, t), i);
          }
        }),
        addSelection: J(function (e, t, i) {
          var r = this.sel.ranges.slice(0);
          r.push(new W(N(this, e), N(this, t || e))), te(this, ke(this.cm, r, r.length - 1), i);
        }),
        getSelection: function (e) {
          for (var t = this.sel.ranges, i, r = 0; r < t.length; r++) {
            var n = ot(this, t[r].from(), t[r].to());
            i = i ? i.concat(n) : n;
          }
          return e === !1 ? i : i.join(e || this.lineSeparator());
        },
        getSelections: function (e) {
          for (var t = [], i = this.sel.ranges, r = 0; r < i.length; r++) {
            var n = ot(this, i[r].from(), i[r].to());
            e !== !1 && (n = n.join(e || this.lineSeparator())), t[r] = n;
          }
          return t;
        },
        replaceSelection: function (e, t, i) {
          for (var r = [], n = 0; n < this.sel.ranges.length; n++) r[n] = e;
          this.replaceSelections(r, t, i || "+input");
        },
        replaceSelections: J(function (e, t, i) {
          for (var r = [], n = this.sel, l = 0; l < n.ranges.length; l++) {
            var o = n.ranges[l];
            r[l] = {
              from: o.from(),
              to: o.to(),
              text: this.splitLines(e[l]),
              origin: i
            };
          }
          for (var a = t && t != "end" && ps(this, r, t), s = r.length - 1; s >= 0; s--) Ht(this, r[s]);
          a ? eo(this, a) : this.cm && Nt(this.cm);
        }),
        undo: J(function () {
          ni(this, "undo");
        }),
        redo: J(function () {
          ni(this, "redo");
        }),
        undoSelection: J(function () {
          ni(this, "undo", !0);
        }),
        redoSelection: J(function () {
          ni(this, "redo", !0);
        }),
        setExtending: function (e) {
          this.extend = e;
        },
        getExtending: function () {
          return this.extend;
        },
        historySize: function () {
          for (var e = this.history, t = 0, i = 0, r = 0; r < e.done.length; r++) e.done[r].ranges || ++t;
          for (var n = 0; n < e.undone.length; n++) e.undone[n].ranges || ++i;
          return {
            undo: t,
            redo: i
          };
        },
        clearHistory: function () {
          var e = this;
          this.history = new $r(this.history), Je(this, function (t) {
            return t.history = e.history;
          }, !0);
        },
        markClean: function () {
          this.cleanGeneration = this.changeGeneration(!0);
        },
        changeGeneration: function (e) {
          return e && (this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null), this.history.generation;
        },
        isClean: function (e) {
          return this.history.generation == (e || this.cleanGeneration);
        },
        getHistory: function () {
          return {
            done: Ot(this.history.done),
            undone: Ot(this.history.undone)
          };
        },
        setHistory: function (e) {
          var t = this.history = new $r(this.history);
          t.done = Ot(e.done.slice(0), null, !0), t.undone = Ot(e.undone.slice(0), null, !0);
        },
        setGutterMarker: J(function (e, t, i) {
          return cr(this, e, "gutter", function (r) {
            var n = r.gutterMarkers || (r.gutterMarkers = {});
            return n[t] = i, !i && Pn(n) && (r.gutterMarkers = null), !0;
          });
        }),
        clearGutter: J(function (e) {
          var t = this;
          this.iter(function (i) {
            i.gutterMarkers && i.gutterMarkers[e] && cr(t, i, "gutter", function () {
              return i.gutterMarkers[e] = null, Pn(i.gutterMarkers) && (i.gutterMarkers = null), !0;
            });
          });
        }),
        lineInfo: function (e) {
          var t;
          if (typeof e == "number") {
            if (!Jt(this, e) || (t = e, e = S(this, e), !e)) return null;
          } else if (t = F(e), t == null) return null;
          return {
            line: t,
            handle: e,
            text: e.text,
            gutterMarkers: e.gutterMarkers,
            textClass: e.textClass,
            bgClass: e.bgClass,
            wrapClass: e.wrapClass,
            widgets: e.widgets
          };
        },
        addLineClass: J(function (e, t, i) {
          return cr(this, e, t == "gutter" ? "gutter" : "class", function (r) {
            var n = t == "text" ? "textClass" : t == "background" ? "bgClass" : t == "gutter" ? "gutterClass" : "wrapClass";
            if (!r[n]) r[n] = i;else {
              if (mt(i).test(r[n])) return !1;
              r[n] += " " + i;
            }
            return !0;
          });
        }),
        removeLineClass: J(function (e, t, i) {
          return cr(this, e, t == "gutter" ? "gutter" : "class", function (r) {
            var n = t == "text" ? "textClass" : t == "background" ? "bgClass" : t == "gutter" ? "gutterClass" : "wrapClass",
              l = r[n];
            if (l) {
              if (i == null) r[n] = null;else {
                var o = l.match(mt(i));
                if (!o) return !1;
                var a = o.index + o[0].length;
                r[n] = l.slice(0, o.index) + (!o.index || a == l.length ? "" : " ") + l.slice(a) || null;
              }
            } else return !1;
            return !0;
          });
        }),
        addLineWidget: J(function (e, t, i) {
          return Ss(this, e, t, i);
        }),
        removeLineWidget: function (e) {
          e.clear();
        },
        markText: function (e, t, i) {
          return Pt(this, N(this, e), N(this, t), i, i && i.type || "range");
        },
        setBookmark: function (e, t) {
          var i = {
            replacedWith: t && (t.nodeType == null ? t.widget : t),
            insertLeft: t && t.insertLeft,
            clearWhenEmpty: !1,
            shared: t && t.shared,
            handleMouseEvents: t && t.handleMouseEvents
          };
          return e = N(this, e), Pt(this, e, e, i, "bookmark");
        },
        findMarksAt: function (e) {
          e = N(this, e);
          var t = [],
            i = S(this, e.line).markedSpans;
          if (i) for (var r = 0; r < i.length; ++r) {
            var n = i[r];
            (n.from == null || n.from <= e.ch) && (n.to == null || n.to >= e.ch) && t.push(n.marker.parent || n.marker);
          }
          return t;
        },
        findMarks: function (e, t, i) {
          e = N(this, e), t = N(this, t);
          var r = [],
            n = e.line;
          return this.iter(e.line, t.line + 1, function (l) {
            var o = l.markedSpans;
            if (o) for (var a = 0; a < o.length; a++) {
              var s = o[a];
              !(s.to != null && n == e.line && e.ch >= s.to || s.from == null && n != e.line || s.from != null && n == t.line && s.from >= t.ch) && (!i || i(s.marker)) && r.push(s.marker.parent || s.marker);
            }
            ++n;
          }), r;
        },
        getAllMarks: function () {
          var e = [];
          return this.iter(function (t) {
            var i = t.markedSpans;
            if (i) for (var r = 0; r < i.length; ++r) i[r].from != null && e.push(i[r].marker);
          }), e;
        },
        posFromIndex: function (e) {
          var t,
            i = this.first,
            r = this.lineSeparator().length;
          return this.iter(function (n) {
            var l = n.text.length + r;
            if (l > e) return t = e, !0;
            e -= l, ++i;
          }), N(this, y(i, t));
        },
        indexFromPos: function (e) {
          e = N(this, e);
          var t = e.ch;
          if (e.line < this.first || e.ch < 0) return 0;
          var i = this.lineSeparator().length;
          return this.iter(this.first, e.line, function (r) {
            t += r.text.length + i;
          }), t;
        },
        copy: function (e) {
          var t = new ue(Ai(this, this.first, this.first + this.size), this.modeOption, this.first, this.lineSep, this.direction);
          return t.scrollTop = this.scrollTop, t.scrollLeft = this.scrollLeft, t.sel = this.sel, t.extend = !1, e && (t.history.undoDepth = this.history.undoDepth, t.setHistory(this.getHistory())), t;
        },
        linkedDoc: function (e) {
          e || (e = {});
          var t = this.first,
            i = this.first + this.size;
          e.from != null && e.from > t && (t = e.from), e.to != null && e.to < i && (i = e.to);
          var r = new ue(Ai(this, t, i), e.mode || this.modeOption, t, this.lineSep, this.direction);
          return e.sharedHist && (r.history = this.history), (this.linked || (this.linked = [])).push({
            doc: r,
            sharedHist: e.sharedHist
          }), r.linked = [{
            doc: this,
            isParent: !0,
            sharedHist: e.sharedHist
          }], ks(r, vo(this)), r;
        },
        unlinkDoc: function (e) {
          if (e instanceof R && (e = e.doc), this.linked) for (var t = 0; t < this.linked.length; ++t) {
            var i = this.linked[t];
            if (i.doc == e) {
              this.linked.splice(t, 1), e.unlinkDoc(this), Ts(vo(this));
              break;
            }
          }
          if (e.history == this.history) {
            var r = [e.id];
            Je(e, function (n) {
              return r.push(n.id);
            }, !0), e.history = new $r(null), e.history.done = Ot(this.history.done, r), e.history.undone = Ot(this.history.undone, r);
          }
        },
        iterLinkedDocs: function (e) {
          Je(this, e);
        },
        getMode: function () {
          return this.mode;
        },
        getEditor: function () {
          return this.cm;
        },
        splitLines: function (e) {
          return this.lineSep ? e.split(this.lineSep) : ki(e);
        },
        lineSeparator: function () {
          return this.lineSep || `
`;
        },
        setDirection: J(function (e) {
          e != "rtl" && (e = "ltr"), e != this.direction && (this.direction = e, this.iter(function (t) {
            return t.order = null;
          }), this.cm && vs(this.cm));
        })
      }), ue.prototype.eachLine = ue.prototype.iter;
      var go = 0;
      function Ds(e) {
        var t = this;
        if (yo(t), !(q(t, e) || Re(t.display, e))) {
          ae(e), O && (go = +new Date());
          var i = ft(t, e, !0),
            r = e.dataTransfer.files;
          if (!(!i || t.isReadOnly())) if (r && r.length && window.FileReader && window.File) for (var n = r.length, l = Array(n), o = 0, a = u(function () {
              ++o == n && Q(t, function () {
                i = N(t.doc, i);
                var d = {
                  from: i,
                  to: i,
                  text: t.doc.splitLines(l.filter(function (v) {
                    return v != null;
                  }).join(t.doc.lineSeparator())),
                  origin: "paste"
                };
                Ht(t.doc, d), eo(t.doc, Ze(N(t.doc, i), N(t.doc, Qe(d))));
              })();
            }, "markAsReadAndPasteIfAllFilesAreRead"), s = u(function (d, v) {
              if (t.options.allowDropFileTypes && ee(t.options.allowDropFileTypes, d.type) == -1) {
                a();
                return;
              }
              var g = new FileReader();
              g.onerror = function () {
                return a();
              }, g.onload = function () {
                var m = g.result;
                if (/[\x00-\x08\x0e-\x1f]{2}/.test(m)) {
                  a();
                  return;
                }
                l[v] = m, a();
              }, g.readAsText(d);
            }, "readTextFromFile"), f = 0; f < r.length; f++) s(r[f], f);else {
            if (t.state.draggingText && t.doc.sel.contains(i) > -1) {
              t.state.draggingText(e), setTimeout(function () {
                return t.display.input.focus();
              }, 20);
              return;
            }
            try {
              var h = e.dataTransfer.getData("Text");
              if (h) {
                var c;
                if (t.state.draggingText && !t.state.draggingText.copy && (c = t.listSelections()), ri(t.doc, Ze(i, i)), c) for (var p = 0; p < c.length; ++p) Ft(t.doc, "", c[p].anchor, c[p].head, "drag");
                t.replaceSelection(h, "around", "paste"), t.display.input.focus();
              }
            } catch {}
          }
        }
      }
      u(Ds, "onDrop");
      function Ns(e, t) {
        if (O && (!e.state.draggingText || +new Date() - go < 100)) {
          Qt(t);
          return;
        }
        if (!(q(e, t) || Re(e.display, t)) && (t.dataTransfer.setData("Text", e.getSelection()), t.dataTransfer.effectAllowed = "copyMove", t.dataTransfer.setDragImage && !Mr)) {
          var i = T("img", null, null, "position: fixed; left: 0; top: 0;");
          i.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", we && (i.width = i.height = 1, e.display.wrapper.appendChild(i), i._top = i.offsetTop), t.dataTransfer.setDragImage(i, 0, 0), we && i.parentNode.removeChild(i);
        }
      }
      u(Ns, "onDragStart");
      function As(e, t) {
        var i = ft(e, t);
        if (i) {
          var r = document.createDocumentFragment();
          Vi(e, i, r), e.display.dragCursor || (e.display.dragCursor = T("div", null, "CodeMirror-cursors CodeMirror-dragcursors"), e.display.lineSpace.insertBefore(e.display.dragCursor, e.display.cursorDiv)), ve(e.display.dragCursor, r);
        }
      }
      u(As, "onDragOver");
      function yo(e) {
        e.display.dragCursor && (e.display.lineSpace.removeChild(e.display.dragCursor), e.display.dragCursor = null);
      }
      u(yo, "clearDragCursor");
      function mo(e) {
        if (document.getElementsByClassName) {
          for (var t = document.getElementsByClassName("CodeMirror"), i = [], r = 0; r < t.length; r++) {
            var n = t[r].CodeMirror;
            n && i.push(n);
          }
          i.length && i[0].operation(function () {
            for (var l = 0; l < i.length; l++) e(i[l]);
          });
        }
      }
      u(mo, "forEachCodeMirror");
      var bo = !1;
      function Os() {
        bo || (Ws(), bo = !0);
      }
      u(Os, "ensureGlobalHandlers");
      function Ws() {
        var e;
        M(window, "resize", function () {
          e == null && (e = setTimeout(function () {
            e = null, mo(Hs);
          }, 100));
        }), M(window, "blur", function () {
          return mo(Dt);
        });
      }
      u(Ws, "registerGlobalHandlers");
      function Hs(e) {
        var t = e.display;
        t.cachedCharWidth = t.cachedTextHeight = t.cachedPaddingH = null, t.scrollbarsClipped = !1, e.setSize();
      }
      u(Hs, "onResize");
      for (var Ve = {
          3: "Pause",
          8: "Backspace",
          9: "Tab",
          13: "Enter",
          16: "Shift",
          17: "Ctrl",
          18: "Alt",
          19: "Pause",
          20: "CapsLock",
          27: "Esc",
          32: "Space",
          33: "PageUp",
          34: "PageDown",
          35: "End",
          36: "Home",
          37: "Left",
          38: "Up",
          39: "Right",
          40: "Down",
          44: "PrintScrn",
          45: "Insert",
          46: "Delete",
          59: ";",
          61: "=",
          91: "Mod",
          92: "Mod",
          93: "Mod",
          106: "*",
          107: "=",
          109: "-",
          110: ".",
          111: "/",
          145: "ScrollLock",
          173: "-",
          186: ";",
          187: "=",
          188: ",",
          189: "-",
          190: ".",
          191: "/",
          192: "`",
          219: "[",
          220: "\\",
          221: "]",
          222: "'",
          224: "Mod",
          63232: "Up",
          63233: "Down",
          63234: "Left",
          63235: "Right",
          63272: "Delete",
          63273: "Home",
          63275: "End",
          63276: "PageUp",
          63277: "PageDown",
          63302: "Insert"
        }, yr = 0; yr < 10; yr++) Ve[yr + 48] = Ve[yr + 96] = String(yr);
      for (var li = 65; li <= 90; li++) Ve[li] = String.fromCharCode(li);
      for (var mr = 1; mr <= 12; mr++) Ve[mr + 111] = Ve[mr + 63235] = "F" + mr;
      var ze = {};
      ze.basic = {
        Left: "goCharLeft",
        Right: "goCharRight",
        Up: "goLineUp",
        Down: "goLineDown",
        End: "goLineEnd",
        Home: "goLineStartSmart",
        PageUp: "goPageUp",
        PageDown: "goPageDown",
        Delete: "delCharAfter",
        Backspace: "delCharBefore",
        "Shift-Backspace": "delCharBefore",
        Tab: "defaultTab",
        "Shift-Tab": "indentAuto",
        Enter: "newlineAndIndent",
        Insert: "toggleOverwrite",
        Esc: "singleSelection"
      }, ze.pcDefault = {
        "Ctrl-A": "selectAll",
        "Ctrl-D": "deleteLine",
        "Ctrl-Z": "undo",
        "Shift-Ctrl-Z": "redo",
        "Ctrl-Y": "redo",
        "Ctrl-Home": "goDocStart",
        "Ctrl-End": "goDocEnd",
        "Ctrl-Up": "goLineUp",
        "Ctrl-Down": "goLineDown",
        "Ctrl-Left": "goGroupLeft",
        "Ctrl-Right": "goGroupRight",
        "Alt-Left": "goLineStart",
        "Alt-Right": "goLineEnd",
        "Ctrl-Backspace": "delGroupBefore",
        "Ctrl-Delete": "delGroupAfter",
        "Ctrl-S": "save",
        "Ctrl-F": "find",
        "Ctrl-G": "findNext",
        "Shift-Ctrl-G": "findPrev",
        "Shift-Ctrl-F": "replace",
        "Shift-Ctrl-R": "replaceAll",
        "Ctrl-[": "indentLess",
        "Ctrl-]": "indentMore",
        "Ctrl-U": "undoSelection",
        "Shift-Ctrl-U": "redoSelection",
        "Alt-U": "redoSelection",
        fallthrough: "basic"
      }, ze.emacsy = {
        "Ctrl-F": "goCharRight",
        "Ctrl-B": "goCharLeft",
        "Ctrl-P": "goLineUp",
        "Ctrl-N": "goLineDown",
        "Ctrl-A": "goLineStart",
        "Ctrl-E": "goLineEnd",
        "Ctrl-V": "goPageDown",
        "Shift-Ctrl-V": "goPageUp",
        "Ctrl-D": "delCharAfter",
        "Ctrl-H": "delCharBefore",
        "Alt-Backspace": "delWordBefore",
        "Ctrl-K": "killLine",
        "Ctrl-T": "transposeChars",
        "Ctrl-O": "openLine"
      }, ze.macDefault = {
        "Cmd-A": "selectAll",
        "Cmd-D": "deleteLine",
        "Cmd-Z": "undo",
        "Shift-Cmd-Z": "redo",
        "Cmd-Y": "redo",
        "Cmd-Home": "goDocStart",
        "Cmd-Up": "goDocStart",
        "Cmd-End": "goDocEnd",
        "Cmd-Down": "goDocEnd",
        "Alt-Left": "goGroupLeft",
        "Alt-Right": "goGroupRight",
        "Cmd-Left": "goLineLeft",
        "Cmd-Right": "goLineRight",
        "Alt-Backspace": "delGroupBefore",
        "Ctrl-Alt-Backspace": "delGroupAfter",
        "Alt-Delete": "delGroupAfter",
        "Cmd-S": "save",
        "Cmd-F": "find",
        "Cmd-G": "findNext",
        "Shift-Cmd-G": "findPrev",
        "Cmd-Alt-F": "replace",
        "Shift-Cmd-Alt-F": "replaceAll",
        "Cmd-[": "indentLess",
        "Cmd-]": "indentMore",
        "Cmd-Backspace": "delWrappedLineLeft",
        "Cmd-Delete": "delWrappedLineRight",
        "Cmd-U": "undoSelection",
        "Shift-Cmd-U": "redoSelection",
        "Ctrl-Up": "goDocStart",
        "Ctrl-Down": "goDocEnd",
        fallthrough: ["basic", "emacsy"]
      }, ze.default = me ? ze.macDefault : ze.pcDefault;
      function Fs(e) {
        var t = e.split(/-(?!$)/);
        e = t[t.length - 1];
        for (var i, r, n, l, o = 0; o < t.length - 1; o++) {
          var a = t[o];
          if (/^(cmd|meta|m)$/i.test(a)) l = !0;else if (/^a(lt)?$/i.test(a)) i = !0;else if (/^(c|ctrl|control)$/i.test(a)) r = !0;else if (/^s(hift)?$/i.test(a)) n = !0;else throw new Error("Unrecognized modifier name: " + a);
        }
        return i && (e = "Alt-" + e), r && (e = "Ctrl-" + e), l && (e = "Cmd-" + e), n && (e = "Shift-" + e), e;
      }
      u(Fs, "normalizeKeyName");
      function Ps(e) {
        var t = {};
        for (var i in e) if (e.hasOwnProperty(i)) {
          var r = e[i];
          if (/^(name|fallthrough|(de|at)tach)$/.test(i)) continue;
          if (r == "...") {
            delete e[i];
            continue;
          }
          for (var n = Or(i.split(" "), Fs), l = 0; l < n.length; l++) {
            var o = void 0,
              a = void 0;
            l == n.length - 1 ? (a = n.join(" "), o = r) : (a = n.slice(0, l + 1).join(" "), o = "...");
            var s = t[a];
            if (!s) t[a] = o;else if (s != o) throw new Error("Inconsistent bindings for " + a);
          }
          delete e[i];
        }
        for (var f in t) e[f] = t[f];
        return e;
      }
      u(Ps, "normalizeKeyMap");
      function Et(e, t, i, r) {
        t = oi(t);
        var n = t.call ? t.call(e, r) : t[e];
        if (n === !1) return "nothing";
        if (n === "...") return "multi";
        if (n != null && i(n)) return "handled";
        if (t.fallthrough) {
          if (Object.prototype.toString.call(t.fallthrough) != "[object Array]") return Et(e, t.fallthrough, i, r);
          for (var l = 0; l < t.fallthrough.length; l++) {
            var o = Et(e, t.fallthrough[l], i, r);
            if (o) return o;
          }
        }
      }
      u(Et, "lookupKey");
      function xo(e) {
        var t = typeof e == "string" ? e : Ve[e.keyCode];
        return t == "Ctrl" || t == "Alt" || t == "Shift" || t == "Mod";
      }
      u(xo, "isModifierKey");
      function Co(e, t, i) {
        var r = e;
        return t.altKey && r != "Alt" && (e = "Alt-" + e), (On ? t.metaKey : t.ctrlKey) && r != "Ctrl" && (e = "Ctrl-" + e), (On ? t.ctrlKey : t.metaKey) && r != "Mod" && (e = "Cmd-" + e), !i && t.shiftKey && r != "Shift" && (e = "Shift-" + e), e;
      }
      u(Co, "addModifierNames");
      function wo(e, t) {
        if (we && e.keyCode == 34 && e.char) return !1;
        var i = Ve[e.keyCode];
        return i == null || e.altGraphKey ? !1 : (e.keyCode == 3 && e.code && (i = e.code), Co(i, e, t));
      }
      u(wo, "keyName");
      function oi(e) {
        return typeof e == "string" ? ze[e] : e;
      }
      u(oi, "getKeyMap");
      function It(e, t) {
        for (var i = e.doc.sel.ranges, r = [], n = 0; n < i.length; n++) {
          for (var l = t(i[n]); r.length && D(l.from, H(r).to) <= 0;) {
            var o = r.pop();
            if (D(o.from, l.from) < 0) {
              l.from = o.from;
              break;
            }
          }
          r.push(l);
        }
        de(e, function () {
          for (var a = r.length - 1; a >= 0; a--) Ft(e.doc, "", r[a].from, r[a].to, "+delete");
          Nt(e);
        });
      }
      u(It, "deleteNearSelection");
      function gn(e, t, i) {
        var r = En(e.text, t + i, i);
        return r < 0 || r > e.text.length ? null : r;
      }
      u(gn, "moveCharLogically");
      function yn(e, t, i) {
        var r = gn(e, t.ch, i);
        return r == null ? null : new y(t.line, r, i < 0 ? "after" : "before");
      }
      u(yn, "moveLogically");
      function mn(e, t, i, r, n) {
        if (e) {
          t.doc.direction == "rtl" && (n = -n);
          var l = Pe(i, t.doc.direction);
          if (l) {
            var o = n < 0 ? H(l) : l[0],
              a = n < 0 == (o.level == 1),
              s = a ? "after" : "before",
              f;
            if (o.level > 0 || t.doc.direction == "rtl") {
              var h = kt(t, i);
              f = n < 0 ? i.text.length - 1 : 0;
              var c = Oe(t, h, f).top;
              f = Yt(function (p) {
                return Oe(t, h, p).top == c;
              }, n < 0 == (o.level == 1) ? o.from : o.to - 1, f), s == "before" && (f = gn(i, f, 1));
            } else f = n < 0 ? o.to : o.from;
            return new y(r, f, s);
          }
        }
        return new y(r, n < 0 ? i.text.length : 0, n < 0 ? "before" : "after");
      }
      u(mn, "endOfLine");
      function Es(e, t, i, r) {
        var n = Pe(t, e.doc.direction);
        if (!n) return yn(t, i, r);
        i.ch >= t.text.length ? (i.ch = t.text.length, i.sticky = "before") : i.ch <= 0 && (i.ch = 0, i.sticky = "after");
        var l = Zt(n, i.ch, i.sticky),
          o = n[l];
        if (e.doc.direction == "ltr" && o.level % 2 == 0 && (r > 0 ? o.to > i.ch : o.from < i.ch)) return yn(t, i, r);
        var a = u(function (b, C) {
            return gn(t, b instanceof y ? b.ch : b, C);
          }, "mv"),
          s,
          f = u(function (b) {
            return e.options.lineWrapping ? (s = s || kt(e, t), Tl(e, t, s, b)) : {
              begin: 0,
              end: t.text.length
            };
          }, "getWrappedLineExtent"),
          h = f(i.sticky == "before" ? a(i, -1) : i.ch);
        if (e.doc.direction == "rtl" || o.level == 1) {
          var c = o.level == 1 == r < 0,
            p = a(i, c ? 1 : -1);
          if (p != null && (c ? p <= o.to && p <= h.end : p >= o.from && p >= h.begin)) {
            var d = c ? "before" : "after";
            return new y(i.line, p, d);
          }
        }
        var v = u(function (b, C, x) {
            for (var w = u(function (E, j) {
              return j ? new y(i.line, a(E, 1), "before") : new y(i.line, E, "after");
            }, "getRes"); b >= 0 && b < n.length; b += C) {
              var k = n[b],
                L = C > 0 == (k.level != 1),
                A = L ? x.begin : a(x.end, -1);
              if (k.from <= A && A < k.to || (A = L ? k.from : a(k.to, -1), x.begin <= A && A < x.end)) return w(A, L);
            }
          }, "searchInVisualLine"),
          g = v(l + r, r, h);
        if (g) return g;
        var m = r > 0 ? h.end : a(h.begin, -1);
        return m != null && !(r > 0 && m == t.text.length) && (g = v(r > 0 ? 0 : n.length - 1, r, f(m)), g) ? g : null;
      }
      u(Es, "moveVisually");
      var br = {
        selectAll: lo,
        singleSelection: function (e) {
          return e.setSelection(e.getCursor("anchor"), e.getCursor("head"), Me);
        },
        killLine: function (e) {
          return It(e, function (t) {
            if (t.empty()) {
              var i = S(e.doc, t.head.line).text.length;
              return t.head.ch == i && t.head.line < e.lastLine() ? {
                from: t.head,
                to: y(t.head.line + 1, 0)
              } : {
                from: t.head,
                to: y(t.head.line, i)
              };
            } else return {
              from: t.from(),
              to: t.to()
            };
          });
        },
        deleteLine: function (e) {
          return It(e, function (t) {
            return {
              from: y(t.from().line, 0),
              to: N(e.doc, y(t.to().line + 1, 0))
            };
          });
        },
        delLineLeft: function (e) {
          return It(e, function (t) {
            return {
              from: y(t.from().line, 0),
              to: t.from()
            };
          });
        },
        delWrappedLineLeft: function (e) {
          return It(e, function (t) {
            var i = e.charCoords(t.head, "div").top + 5,
              r = e.coordsChar({
                left: 0,
                top: i
              }, "div");
            return {
              from: r,
              to: t.from()
            };
          });
        },
        delWrappedLineRight: function (e) {
          return It(e, function (t) {
            var i = e.charCoords(t.head, "div").top + 5,
              r = e.coordsChar({
                left: e.display.lineDiv.offsetWidth + 100,
                top: i
              }, "div");
            return {
              from: t.from(),
              to: r
            };
          });
        },
        undo: function (e) {
          return e.undo();
        },
        redo: function (e) {
          return e.redo();
        },
        undoSelection: function (e) {
          return e.undoSelection();
        },
        redoSelection: function (e) {
          return e.redoSelection();
        },
        goDocStart: function (e) {
          return e.extendSelection(y(e.firstLine(), 0));
        },
        goDocEnd: function (e) {
          return e.extendSelection(y(e.lastLine()));
        },
        goLineStart: function (e) {
          return e.extendSelectionsBy(function (t) {
            return So(e, t.head.line);
          }, {
            origin: "+move",
            bias: 1
          });
        },
        goLineStartSmart: function (e) {
          return e.extendSelectionsBy(function (t) {
            return Lo(e, t.head);
          }, {
            origin: "+move",
            bias: 1
          });
        },
        goLineEnd: function (e) {
          return e.extendSelectionsBy(function (t) {
            return Is(e, t.head.line);
          }, {
            origin: "+move",
            bias: -1
          });
        },
        goLineRight: function (e) {
          return e.extendSelectionsBy(function (t) {
            var i = e.cursorCoords(t.head, "div").top + 5;
            return e.coordsChar({
              left: e.display.lineDiv.offsetWidth + 100,
              top: i
            }, "div");
          }, Xt);
        },
        goLineLeft: function (e) {
          return e.extendSelectionsBy(function (t) {
            var i = e.cursorCoords(t.head, "div").top + 5;
            return e.coordsChar({
              left: 0,
              top: i
            }, "div");
          }, Xt);
        },
        goLineLeftSmart: function (e) {
          return e.extendSelectionsBy(function (t) {
            var i = e.cursorCoords(t.head, "div").top + 5,
              r = e.coordsChar({
                left: 0,
                top: i
              }, "div");
            return r.ch < e.getLine(r.line).search(/\S/) ? Lo(e, t.head) : r;
          }, Xt);
        },
        goLineUp: function (e) {
          return e.moveV(-1, "line");
        },
        goLineDown: function (e) {
          return e.moveV(1, "line");
        },
        goPageUp: function (e) {
          return e.moveV(-1, "page");
        },
        goPageDown: function (e) {
          return e.moveV(1, "page");
        },
        goCharLeft: function (e) {
          return e.moveH(-1, "char");
        },
        goCharRight: function (e) {
          return e.moveH(1, "char");
        },
        goColumnLeft: function (e) {
          return e.moveH(-1, "column");
        },
        goColumnRight: function (e) {
          return e.moveH(1, "column");
        },
        goWordLeft: function (e) {
          return e.moveH(-1, "word");
        },
        goGroupRight: function (e) {
          return e.moveH(1, "group");
        },
        goGroupLeft: function (e) {
          return e.moveH(-1, "group");
        },
        goWordRight: function (e) {
          return e.moveH(1, "word");
        },
        delCharBefore: function (e) {
          return e.deleteH(-1, "codepoint");
        },
        delCharAfter: function (e) {
          return e.deleteH(1, "char");
        },
        delWordBefore: function (e) {
          return e.deleteH(-1, "word");
        },
        delWordAfter: function (e) {
          return e.deleteH(1, "word");
        },
        delGroupBefore: function (e) {
          return e.deleteH(-1, "group");
        },
        delGroupAfter: function (e) {
          return e.deleteH(1, "group");
        },
        indentAuto: function (e) {
          return e.indentSelection("smart");
        },
        indentMore: function (e) {
          return e.indentSelection("add");
        },
        indentLess: function (e) {
          return e.indentSelection("subtract");
        },
        insertTab: function (e) {
          return e.replaceSelection("	");
        },
        insertSoftTab: function (e) {
          for (var t = [], i = e.listSelections(), r = e.options.tabSize, n = 0; n < i.length; n++) {
            var l = i[n].from(),
              o = xe(e.getLine(l.line), l.ch, r);
            t.push(yi(r - o % r));
          }
          e.replaceSelections(t);
        },
        defaultTab: function (e) {
          e.somethingSelected() ? e.indentSelection("add") : e.execCommand("insertTab");
        },
        transposeChars: function (e) {
          return de(e, function () {
            for (var t = e.listSelections(), i = [], r = 0; r < t.length; r++) if (t[r].empty()) {
              var n = t[r].head,
                l = S(e.doc, n.line).text;
              if (l) {
                if (n.ch == l.length && (n = new y(n.line, n.ch - 1)), n.ch > 0) n = new y(n.line, n.ch + 1), e.replaceRange(l.charAt(n.ch - 1) + l.charAt(n.ch - 2), y(n.line, n.ch - 2), n, "+transpose");else if (n.line > e.doc.first) {
                  var o = S(e.doc, n.line - 1).text;
                  o && (n = new y(n.line, 1), e.replaceRange(l.charAt(0) + e.doc.lineSeparator() + o.charAt(o.length - 1), y(n.line - 1, o.length - 1), n, "+transpose"));
                }
              }
              i.push(new W(n, n));
            }
            e.setSelections(i);
          });
        },
        newlineAndIndent: function (e) {
          return de(e, function () {
            for (var t = e.listSelections(), i = t.length - 1; i >= 0; i--) e.replaceRange(e.doc.lineSeparator(), t[i].anchor, t[i].head, "+input");
            t = e.listSelections();
            for (var r = 0; r < t.length; r++) e.indentLine(t[r].from().line, null, !0);
            Nt(e);
          });
        },
        openLine: function (e) {
          return e.replaceSelection(`
`, "start");
        },
        toggleOverwrite: function (e) {
          return e.toggleOverwrite();
        }
      };
      function So(e, t) {
        var i = S(e.doc, t),
          r = Se(i);
        return r != i && (t = F(r)), mn(!0, e, r, t, 1);
      }
      u(So, "lineStart");
      function Is(e, t) {
        var i = S(e.doc, t),
          r = xa(i);
        return r != i && (t = F(r)), mn(!0, e, i, t, -1);
      }
      u(Is, "lineEnd");
      function Lo(e, t) {
        var i = So(e, t.line),
          r = S(e.doc, i.line),
          n = Pe(r, e.doc.direction);
        if (!n || n[0].level == 0) {
          var l = Math.max(i.ch, r.text.search(/\S/)),
            o = t.line == i.line && t.ch <= l && t.ch;
          return y(i.line, o ? 0 : l, i.sticky);
        }
        return i;
      }
      u(Lo, "lineStartSmart");
      function ai(e, t, i) {
        if (typeof t == "string" && (t = br[t], !t)) return !1;
        e.display.input.ensurePolled();
        var r = e.display.shift,
          n = !1;
        try {
          e.isReadOnly() && (e.state.suppressEdits = !0), i && (e.display.shift = !1), n = t(e) != Nr;
        } finally {
          e.display.shift = r, e.state.suppressEdits = !1;
        }
        return n;
      }
      u(ai, "doHandleBinding");
      function Rs(e, t, i) {
        for (var r = 0; r < e.state.keyMaps.length; r++) {
          var n = Et(t, e.state.keyMaps[r], i, e);
          if (n) return n;
        }
        return e.options.extraKeys && Et(t, e.options.extraKeys, i, e) || Et(t, e.options.keyMap, i, e);
      }
      u(Rs, "lookupKeyForEditor");
      var Bs = new _e();
      function xr(e, t, i, r) {
        var n = e.state.keySeq;
        if (n) {
          if (xo(t)) return "handled";
          if (/\'$/.test(t) ? e.state.keySeq = null : Bs.set(50, function () {
            e.state.keySeq == n && (e.state.keySeq = null, e.display.input.reset());
          }), ko(e, n + " " + t, i, r)) return !0;
        }
        return ko(e, t, i, r);
      }
      u(xr, "dispatchKey");
      function ko(e, t, i, r) {
        var n = Rs(e, t, r);
        return n == "multi" && (e.state.keySeq = t), n == "handled" && Z(e, "keyHandled", e, t, i), (n == "handled" || n == "multi") && (ae(i), $i(e)), !!n;
      }
      u(ko, "dispatchKeyInner");
      function To(e, t) {
        var i = wo(t, !0);
        return i ? t.shiftKey && !e.state.keySeq ? xr(e, "Shift-" + i, t, function (r) {
          return ai(e, r, !0);
        }) || xr(e, i, t, function (r) {
          if (typeof r == "string" ? /^go[A-Z]/.test(r) : r.motion) return ai(e, r);
        }) : xr(e, i, t, function (r) {
          return ai(e, r);
        }) : !1;
      }
      u(To, "handleKeyBinding");
      function zs(e, t, i) {
        return xr(e, "'" + i + "'", t, function (r) {
          return ai(e, r, !0);
        });
      }
      u(zs, "handleCharBinding");
      var bn = null;
      function Mo(e) {
        var t = this;
        if (!(e.target && e.target != t.display.input.getField()) && (t.curOp.focus = be(), !q(t, e))) {
          O && I < 11 && e.keyCode == 27 && (e.returnValue = !1);
          var i = e.keyCode;
          t.display.shift = i == 16 || e.shiftKey;
          var r = To(t, e);
          we && (bn = r ? i : null, !r && i == 88 && !na && (me ? e.metaKey : e.ctrlKey) && t.replaceSelection("", null, "cut")), Fe && !me && !r && i == 46 && e.shiftKey && !e.ctrlKey && document.execCommand && document.execCommand("cut"), i == 18 && !/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className) && Gs(t);
        }
      }
      u(Mo, "onKeyDown");
      function Gs(e) {
        var t = e.display.lineDiv;
        it(t, "CodeMirror-crosshair");
        function i(r) {
          (r.keyCode == 18 || !r.altKey) && (tt(t, "CodeMirror-crosshair"), ge(document, "keyup", i), ge(document, "mouseover", i));
        }
        u(i, "up"), M(document, "keyup", i), M(document, "mouseover", i);
      }
      u(Gs, "showCrossHair");
      function Do(e) {
        e.keyCode == 16 && (this.doc.sel.shift = !1), q(this, e);
      }
      u(Do, "onKeyUp");
      function No(e) {
        var t = this;
        if (!(e.target && e.target != t.display.input.getField()) && !(Re(t.display, e) || q(t, e) || e.ctrlKey && !e.altKey || me && e.metaKey)) {
          var i = e.keyCode,
            r = e.charCode;
          if (we && i == bn) {
            bn = null, ae(e);
            return;
          }
          if (!(we && (!e.which || e.which < 10) && To(t, e))) {
            var n = String.fromCharCode(r !== null && r !== void 0 ? r : i);
            n != "\b" && (zs(t, e, n) || t.display.input.onKeyPress(e));
          }
        }
      }
      u(No, "onKeyPress");
      var Us = 400,
        xn = u(function (e, t, i) {
          this.time = e, this.pos = t, this.button = i;
        }, "PastClick");
      xn.prototype.compare = function (e, t, i) {
        return this.time + Us > e && D(t, this.pos) == 0 && i == this.button;
      };
      var Cr, wr;
      function Ks(e, t) {
        var i = +new Date();
        return wr && wr.compare(i, e, t) ? (Cr = wr = null, "triple") : Cr && Cr.compare(i, e, t) ? (wr = new xn(i, e, t), Cr = null, "double") : (Cr = new xn(i, e, t), wr = null, "single");
      }
      u(Ks, "clickRepeat");
      function Ao(e) {
        var t = this,
          i = t.display;
        if (!(q(t, e) || i.activeTouch && i.input.supportsTouch())) {
          if (i.input.ensurePolled(), i.shift = e.shiftKey, Re(i, e)) {
            ne || (i.scroller.draggable = !1, setTimeout(function () {
              return i.scroller.draggable = !0;
            }, 100));
            return;
          }
          if (!Cn(t, e)) {
            var r = ft(t, e),
              n = zn(e),
              l = r ? Ks(r, n) : "single";
            window.focus(), n == 1 && t.state.selectingText && t.state.selectingText(e), !(r && _s(t, n, r, l, e)) && (n == 1 ? r ? Ys(t, r, l, e) : wi(e) == i.scroller && ae(e) : n == 2 ? (r && ti(t.doc, r), setTimeout(function () {
              return i.input.focus();
            }, 20)) : n == 3 && (ci ? t.display.input.onContextMenu(e) : en(t)));
          }
        }
      }
      u(Ao, "onMouseDown");
      function _s(e, t, i, r, n) {
        var l = "Click";
        return r == "double" ? l = "Double" + l : r == "triple" && (l = "Triple" + l), l = (t == 1 ? "Left" : t == 2 ? "Middle" : "Right") + l, xr(e, Co(l, n), n, function (o) {
          if (typeof o == "string" && (o = br[o]), !o) return !1;
          var a = !1;
          try {
            e.isReadOnly() && (e.state.suppressEdits = !0), a = o(e, i) != Nr;
          } finally {
            e.state.suppressEdits = !1;
          }
          return a;
        });
      }
      u(_s, "handleMappedButton");
      function Xs(e, t, i) {
        var r = e.getOption("configureMouse"),
          n = r ? r(e, t, i) : {};
        if (n.unit == null) {
          var l = qo ? i.shiftKey && i.metaKey : i.altKey;
          n.unit = l ? "rectangle" : t == "single" ? "char" : t == "double" ? "word" : "line";
        }
        return (n.extend == null || e.doc.extend) && (n.extend = e.doc.extend || i.shiftKey), n.addNew == null && (n.addNew = me ? i.metaKey : i.ctrlKey), n.moveOnDrag == null && (n.moveOnDrag = !(me ? i.altKey : i.ctrlKey)), n;
      }
      u(Xs, "configureMouse");
      function Ys(e, t, i, r) {
        O ? setTimeout(pi(Al, e), 0) : e.curOp.focus = be();
        var n = Xs(e, i, r),
          l = e.doc.sel,
          o;
        e.options.dragDrop && ea && !e.isReadOnly() && i == "single" && (o = l.contains(t)) > -1 && (D((o = l.ranges[o]).from(), t) < 0 || t.xRel > 0) && (D(o.to(), t) > 0 || t.xRel < 0) ? qs(e, r, t, n) : Zs(e, r, t, n);
      }
      u(Ys, "leftButtonDown");
      function qs(e, t, i, r) {
        var n = e.display,
          l = !1,
          o = Q(e, function (f) {
            ne && (n.scroller.draggable = !1), e.state.draggingText = !1, e.state.delayingBlurEvent && (e.hasFocus() ? e.state.delayingBlurEvent = !1 : en(e)), ge(n.wrapper.ownerDocument, "mouseup", o), ge(n.wrapper.ownerDocument, "mousemove", a), ge(n.scroller, "dragstart", s), ge(n.scroller, "drop", o), l || (ae(f), r.addNew || ti(e.doc, i, null, null, r.extend), ne && !Mr || O && I == 9 ? setTimeout(function () {
              n.wrapper.ownerDocument.body.focus({
                preventScroll: !0
              }), n.input.focus();
            }, 20) : n.input.focus());
          }),
          a = u(function (f) {
            l = l || Math.abs(t.clientX - f.clientX) + Math.abs(t.clientY - f.clientY) >= 10;
          }, "mouseMove"),
          s = u(function () {
            return l = !0;
          }, "dragStart");
        ne && (n.scroller.draggable = !0), e.state.draggingText = o, o.copy = !r.moveOnDrag, M(n.wrapper.ownerDocument, "mouseup", o), M(n.wrapper.ownerDocument, "mousemove", a), M(n.scroller, "dragstart", s), M(n.scroller, "drop", o), e.state.delayingBlurEvent = !0, setTimeout(function () {
          return n.input.focus();
        }, 20), n.scroller.dragDrop && n.scroller.dragDrop();
      }
      u(qs, "leftButtonStartDrag");
      function Oo(e, t, i) {
        if (i == "char") return new W(t, t);
        if (i == "word") return e.findWordAt(t);
        if (i == "line") return new W(y(t.line, 0), N(e.doc, y(t.line + 1, 0)));
        var r = i(e, t);
        return new W(r.from, r.to);
      }
      u(Oo, "rangeForUnit");
      function Zs(e, t, i, r) {
        O && en(e);
        var n = e.display,
          l = e.doc;
        ae(t);
        var o,
          a,
          s = l.sel,
          f = s.ranges;
        if (r.addNew && !r.extend ? (a = l.sel.contains(i), a > -1 ? o = f[a] : o = new W(i, i)) : (o = l.sel.primary(), a = l.sel.primIndex), r.unit == "rectangle") r.addNew || (o = new W(i, i)), i = ft(e, t, !0, !0), a = -1;else {
          var h = Oo(e, i, r.unit);
          r.extend ? o = pn(o, h.anchor, h.head, r.extend) : o = h;
        }
        r.addNew ? a == -1 ? (a = f.length, te(l, ke(e, f.concat([o]), a), {
          scroll: !1,
          origin: "*mouse"
        })) : f.length > 1 && f[a].empty() && r.unit == "char" && !r.extend ? (te(l, ke(e, f.slice(0, a).concat(f.slice(a + 1)), 0), {
          scroll: !1,
          origin: "*mouse"
        }), s = l.sel) : vn(l, a, o, vi) : (a = 0, te(l, new ye([o], 0), vi), s = l.sel);
        var c = i;
        function p(x) {
          if (D(c, x) != 0) if (c = x, r.unit == "rectangle") {
            for (var w = [], k = e.options.tabSize, L = xe(S(l, i.line).text, i.ch, k), A = xe(S(l, x.line).text, x.ch, k), E = Math.min(L, A), j = Math.max(L, A), B = Math.min(i.line, x.line), pe = Math.min(e.lastLine(), Math.max(i.line, x.line)); B <= pe; B++) {
              var fe = S(l, B).text,
                _ = gi(fe, E, k);
              E == j ? w.push(new W(y(B, _), y(B, _))) : fe.length > _ && w.push(new W(y(B, _), y(B, gi(fe, j, k))));
            }
            w.length || w.push(new W(i, i)), te(l, ke(e, s.ranges.slice(0, a).concat(w), a), {
              origin: "*mouse",
              scroll: !1
            }), e.scrollIntoView(x);
          } else {
            var he = o,
              $ = Oo(e, x, r.unit),
              Y = he.anchor,
              X;
            D($.anchor, Y) > 0 ? (X = $.head, Y = Pr(he.from(), $.anchor)) : (X = $.anchor, Y = Fr(he.to(), $.head));
            var z = s.ranges.slice(0);
            z[a] = Qs(e, new W(N(l, Y), X)), te(l, ke(e, z, a), vi);
          }
        }
        u(p, "extendTo");
        var d = n.wrapper.getBoundingClientRect(),
          v = 0;
        function g(x) {
          var w = ++v,
            k = ft(e, x, !0, r.unit == "rectangle");
          if (k) if (D(k, c) != 0) {
            e.curOp.focus = be(), p(k);
            var L = Qr(n, l);
            (k.line >= L.to || k.line < L.from) && setTimeout(Q(e, function () {
              v == w && g(x);
            }), 150);
          } else {
            var A = x.clientY < d.top ? -20 : x.clientY > d.bottom ? 20 : 0;
            A && setTimeout(Q(e, function () {
              v == w && (n.scroller.scrollTop += A, g(x));
            }), 50);
          }
        }
        u(g, "extend");
        function m(x) {
          e.state.selectingText = !1, v = 1 / 0, x && (ae(x), n.input.focus()), ge(n.wrapper.ownerDocument, "mousemove", b), ge(n.wrapper.ownerDocument, "mouseup", C), l.history.lastSelOrigin = null;
        }
        u(m, "done");
        var b = Q(e, function (x) {
            x.buttons === 0 || !zn(x) ? m(x) : g(x);
          }),
          C = Q(e, m);
        e.state.selectingText = C, M(n.wrapper.ownerDocument, "mousemove", b), M(n.wrapper.ownerDocument, "mouseup", C);
      }
      u(Zs, "leftButtonSelect");
      function Qs(e, t) {
        var i = t.anchor,
          r = t.head,
          n = S(e.doc, i.line);
        if (D(i, r) == 0 && i.sticky == r.sticky) return t;
        var l = Pe(n);
        if (!l) return t;
        var o = Zt(l, i.ch, i.sticky),
          a = l[o];
        if (a.from != i.ch && a.to != i.ch) return t;
        var s = o + (a.from == i.ch == (a.level != 1) ? 0 : 1);
        if (s == 0 || s == l.length) return t;
        var f;
        if (r.line != i.line) f = (r.line - i.line) * (e.doc.direction == "ltr" ? 1 : -1) > 0;else {
          var h = Zt(l, r.ch, r.sticky),
            c = h - o || (r.ch - i.ch) * (a.level == 1 ? -1 : 1);
          h == s - 1 || h == s ? f = c < 0 : f = c > 0;
        }
        var p = l[s + (f ? -1 : 0)],
          d = f == (p.level == 1),
          v = d ? p.from : p.to,
          g = d ? "after" : "before";
        return i.ch == v && i.sticky == g ? t : new W(new y(i.line, v, g), r);
      }
      u(Qs, "bidiSimplify");
      function Wo(e, t, i, r) {
        var n, l;
        if (t.touches) n = t.touches[0].clientX, l = t.touches[0].clientY;else try {
          n = t.clientX, l = t.clientY;
        } catch {
          return !1;
        }
        if (n >= Math.floor(e.display.gutters.getBoundingClientRect().right)) return !1;
        r && ae(t);
        var o = e.display,
          a = o.lineDiv.getBoundingClientRect();
        if (l > a.bottom || !Ce(e, i)) return Ci(t);
        l -= a.top - o.viewOffset;
        for (var s = 0; s < e.display.gutterSpecs.length; ++s) {
          var f = o.gutters.childNodes[s];
          if (f && f.getBoundingClientRect().right >= n) {
            var h = at(e.doc, l),
              c = e.display.gutterSpecs[s];
            return U(e, i, e, h, c.className, t), Ci(t);
          }
        }
      }
      u(Wo, "gutterEvent");
      function Cn(e, t) {
        return Wo(e, t, "gutterClick", !0);
      }
      u(Cn, "clickInGutter");
      function Ho(e, t) {
        Re(e.display, t) || Js(e, t) || q(e, t, "contextmenu") || ci || e.display.input.onContextMenu(t);
      }
      u(Ho, "onContextMenu");
      function Js(e, t) {
        return Ce(e, "gutterContextMenu") ? Wo(e, t, "gutterContextMenu", !1) : !1;
      }
      u(Js, "contextMenuInGutter");
      function Fo(e) {
        e.display.wrapper.className = e.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + e.options.theme.replace(/(^|\s)\s*/g, " cm-s-"), rr(e);
      }
      u(Fo, "themeChanged");
      var Rt = {
          toString: function () {
            return "CodeMirror.Init";
          }
        },
        Po = {},
        si = {};
      function js(e) {
        var t = e.optionHandlers;
        function i(r, n, l, o) {
          e.defaults[r] = n, l && (t[r] = o ? function (a, s, f) {
            f != Rt && l(a, s, f);
          } : l);
        }
        u(i, "option"), e.defineOption = i, e.Init = Rt, i("value", "", function (r, n) {
          return r.setValue(n);
        }, !0), i("mode", null, function (r, n) {
          r.doc.modeOption = n, hn(r);
        }, !0), i("indentUnit", 2, hn, !0), i("indentWithTabs", !1), i("smartIndent", !0), i("tabSize", 4, function (r) {
          fr(r), rr(r), se(r);
        }, !0), i("lineSeparator", null, function (r, n) {
          if (r.doc.lineSep = n, !!n) {
            var l = [],
              o = r.doc.first;
            r.doc.iter(function (s) {
              for (var f = 0;;) {
                var h = s.text.indexOf(n, f);
                if (h == -1) break;
                f = h + n.length, l.push(y(o, h));
              }
              o++;
            });
            for (var a = l.length - 1; a >= 0; a--) Ft(r.doc, n, l[a], y(l[a].line, l[a].ch + n.length));
          }
        }), i("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function (r, n, l) {
          r.state.specialChars = new RegExp(n.source + (n.test("	") ? "" : "|	"), "g"), l != Rt && r.refresh();
        }), i("specialCharPlaceholder", Ta, function (r) {
          return r.refresh();
        }, !0), i("electricChars", !0), i("inputStyle", Kt ? "contenteditable" : "textarea", function () {
          throw new Error("inputStyle can not (yet) be changed in a running editor");
        }, !0), i("spellcheck", !1, function (r, n) {
          return r.getInputField().spellcheck = n;
        }, !0), i("autocorrect", !1, function (r, n) {
          return r.getInputField().autocorrect = n;
        }, !0), i("autocapitalize", !1, function (r, n) {
          return r.getInputField().autocapitalize = n;
        }, !0), i("rtlMoveVisually", !Zo), i("wholeLineUpdateBefore", !0), i("theme", "default", function (r) {
          Fo(r), ur(r);
        }, !0), i("keyMap", "default", function (r, n, l) {
          var o = oi(n),
            a = l != Rt && oi(l);
          a && a.detach && a.detach(r, o), o.attach && o.attach(r, a || null);
        }), i("extraKeys", null), i("configureMouse", null), i("lineWrapping", !1, $s, !0), i("gutters", [], function (r, n) {
          r.display.gutterSpecs = un(n, r.options.lineNumbers), ur(r);
        }, !0), i("fixedGutter", !0, function (r, n) {
          r.display.gutters.style.left = n ? Ji(r.display) + "px" : "0", r.refresh();
        }, !0), i("coverGutterNextToScrollbar", !1, function (r) {
          return At(r);
        }, !0), i("scrollbarStyle", "native", function (r) {
          El(r), At(r), r.display.scrollbars.setScrollTop(r.doc.scrollTop), r.display.scrollbars.setScrollLeft(r.doc.scrollLeft);
        }, !0), i("lineNumbers", !1, function (r, n) {
          r.display.gutterSpecs = un(r.options.gutters, n), ur(r);
        }, !0), i("firstLineNumber", 1, ur, !0), i("lineNumberFormatter", function (r) {
          return r;
        }, ur, !0), i("showCursorWhenSelecting", !1, ir, !0), i("resetSelectionOnContextMenu", !0), i("lineWiseCopyCut", !0), i("pasteLinesPerSelection", !0), i("selectionsMayTouch", !1), i("readOnly", !1, function (r, n) {
          n == "nocursor" && (Dt(r), r.display.input.blur()), r.display.input.readOnlyChanged(n);
        }), i("screenReaderLabel", null, function (r, n) {
          n = n === "" ? null : n, r.display.input.screenReaderLabelChanged(n);
        }), i("disableInput", !1, function (r, n) {
          n || r.display.input.reset();
        }, !0), i("dragDrop", !0, Vs), i("allowDropFileTypes", null), i("cursorBlinkRate", 530), i("cursorScrollMargin", 0), i("cursorHeight", 1, ir, !0), i("singleCursorHeightPerLine", !0, ir, !0), i("workTime", 100), i("workDelay", 100), i("flattenSpans", !0, fr, !0), i("addModeClass", !1, fr, !0), i("pollInterval", 100), i("undoDepth", 200, function (r, n) {
          return r.doc.history.undoDepth = n;
        }), i("historyEventDelay", 1250), i("viewportMargin", 10, function (r) {
          return r.refresh();
        }, !0), i("maxHighlightLength", 1e4, fr, !0), i("moveInputWithCursor", !0, function (r, n) {
          n || r.display.input.resetPosition();
        }), i("tabindex", null, function (r, n) {
          return r.display.input.getField().tabIndex = n || "";
        }), i("autofocus", null), i("direction", "ltr", function (r, n) {
          return r.doc.setDirection(n);
        }, !0), i("phrases", null);
      }
      u(js, "defineOptions");
      function Vs(e, t, i) {
        var r = i && i != Rt;
        if (!t != !r) {
          var n = e.display.dragFunctions,
            l = t ? M : ge;
          l(e.display.scroller, "dragstart", n.start), l(e.display.scroller, "dragenter", n.enter), l(e.display.scroller, "dragover", n.over), l(e.display.scroller, "dragleave", n.leave), l(e.display.scroller, "drop", n.drop);
        }
      }
      u(Vs, "dragDropChanged");
      function $s(e) {
        e.options.lineWrapping ? (it(e.display.wrapper, "CodeMirror-wrap"), e.display.sizer.style.minWidth = "", e.display.sizerWidth = null) : (tt(e.display.wrapper, "CodeMirror-wrap"), zi(e)), ji(e), se(e), rr(e), setTimeout(function () {
          return At(e);
        }, 100);
      }
      u($s, "wrappingChanged");
      function R(e, t) {
        var i = this;
        if (!(this instanceof R)) return new R(e, t);
        this.options = t = t ? nt(t) : {}, nt(Po, t, !1);
        var r = t.value;
        typeof r == "string" ? r = new ue(r, t.mode, null, t.lineSeparator, t.direction) : t.mode && (r.modeOption = t.mode), this.doc = r;
        var n = new R.inputStyles[t.inputStyle](this),
          l = this.display = new cs(e, r, n, t);
        l.wrapper.CodeMirror = this, Fo(this), t.lineWrapping && (this.display.wrapper.className += " CodeMirror-wrap"), El(this), this.state = {
          keyMaps: [],
          overlays: [],
          modeGen: 0,
          overwrite: !1,
          delayingBlurEvent: !1,
          focused: !1,
          suppressEdits: !1,
          pasteIncoming: -1,
          cutIncoming: -1,
          selectingText: !1,
          draggingText: !1,
          highlight: new _e(),
          keySeq: null,
          specialChars: null
        }, t.autofocus && !Kt && l.input.focus(), O && I < 11 && setTimeout(function () {
          return i.display.input.reset(!0);
        }, 20), eu(this), Os(), pt(this), this.curOp.forceUpdate = !0, Yl(this, r), t.autofocus && !Kt || this.hasFocus() ? setTimeout(function () {
          i.hasFocus() && !i.state.focused && tn(i);
        }, 20) : Dt(this);
        for (var o in si) si.hasOwnProperty(o) && si[o](this, t[o], Rt);
        Bl(this), t.finishInit && t.finishInit(this);
        for (var a = 0; a < wn.length; ++a) wn[a](this);
        vt(this), ne && t.lineWrapping && getComputedStyle(l.lineDiv).textRendering == "optimizelegibility" && (l.lineDiv.style.textRendering = "auto");
      }
      u(R, "CodeMirror"), R.defaults = Po, R.optionHandlers = si;
      function eu(e) {
        var t = e.display;
        M(t.scroller, "mousedown", Q(e, Ao)), O && I < 11 ? M(t.scroller, "dblclick", Q(e, function (s) {
          if (!q(e, s)) {
            var f = ft(e, s);
            if (!(!f || Cn(e, s) || Re(e.display, s))) {
              ae(s);
              var h = e.findWordAt(f);
              ti(e.doc, h.anchor, h.head);
            }
          }
        })) : M(t.scroller, "dblclick", function (s) {
          return q(e, s) || ae(s);
        }), M(t.scroller, "contextmenu", function (s) {
          return Ho(e, s);
        }), M(t.input.getField(), "contextmenu", function (s) {
          t.scroller.contains(s.target) || Ho(e, s);
        });
        var i,
          r = {
            end: 0
          };
        function n() {
          t.activeTouch && (i = setTimeout(function () {
            return t.activeTouch = null;
          }, 1e3), r = t.activeTouch, r.end = +new Date());
        }
        u(n, "finishTouch");
        function l(s) {
          if (s.touches.length != 1) return !1;
          var f = s.touches[0];
          return f.radiusX <= 1 && f.radiusY <= 1;
        }
        u(l, "isMouseLikeTouchEvent");
        function o(s, f) {
          if (f.left == null) return !0;
          var h = f.left - s.left,
            c = f.top - s.top;
          return h * h + c * c > 20 * 20;
        }
        u(o, "farAway"), M(t.scroller, "touchstart", function (s) {
          if (!q(e, s) && !l(s) && !Cn(e, s)) {
            t.input.ensurePolled(), clearTimeout(i);
            var f = +new Date();
            t.activeTouch = {
              start: f,
              moved: !1,
              prev: f - r.end <= 300 ? r : null
            }, s.touches.length == 1 && (t.activeTouch.left = s.touches[0].pageX, t.activeTouch.top = s.touches[0].pageY);
          }
        }), M(t.scroller, "touchmove", function () {
          t.activeTouch && (t.activeTouch.moved = !0);
        }), M(t.scroller, "touchend", function (s) {
          var f = t.activeTouch;
          if (f && !Re(t, s) && f.left != null && !f.moved && new Date() - f.start < 300) {
            var h = e.coordsChar(t.activeTouch, "page"),
              c;
            !f.prev || o(f, f.prev) ? c = new W(h, h) : !f.prev.prev || o(f, f.prev.prev) ? c = e.findWordAt(h) : c = new W(y(h.line, 0), N(e.doc, y(h.line + 1, 0))), e.setSelection(c.anchor, c.head), e.focus(), ae(s);
          }
          n();
        }), M(t.scroller, "touchcancel", n), M(t.scroller, "scroll", function () {
          t.scroller.clientHeight && (lr(e, t.scroller.scrollTop), ct(e, t.scroller.scrollLeft, !0), U(e, "scroll", e));
        }), M(t.scroller, "mousewheel", function (s) {
          return Ul(e, s);
        }), M(t.scroller, "DOMMouseScroll", function (s) {
          return Ul(e, s);
        }), M(t.wrapper, "scroll", function () {
          return t.wrapper.scrollTop = t.wrapper.scrollLeft = 0;
        }), t.dragFunctions = {
          enter: function (s) {
            q(e, s) || Qt(s);
          },
          over: function (s) {
            q(e, s) || (As(e, s), Qt(s));
          },
          start: function (s) {
            return Ns(e, s);
          },
          drop: Q(e, Ds),
          leave: function (s) {
            q(e, s) || yo(e);
          }
        };
        var a = t.input.getField();
        M(a, "keyup", function (s) {
          return Do.call(e, s);
        }), M(a, "keydown", Q(e, Mo)), M(a, "keypress", Q(e, No)), M(a, "focus", function (s) {
          return tn(e, s);
        }), M(a, "blur", function (s) {
          return Dt(e, s);
        });
      }
      u(eu, "registerEventHandlers");
      var wn = [];
      R.defineInitHook = function (e) {
        return wn.push(e);
      };
      function Sr(e, t, i, r) {
        var n = e.doc,
          l;
        i == null && (i = "add"), i == "smart" && (n.mode.indent ? l = jt(e, t).state : i = "prev");
        var o = e.options.tabSize,
          a = S(n, t),
          s = xe(a.text, null, o);
        a.stateAfter && (a.stateAfter = null);
        var f = a.text.match(/^\s*/)[0],
          h;
        if (!r && !/\S/.test(a.text)) h = 0, i = "not";else if (i == "smart" && (h = n.mode.indent(l, a.text.slice(f.length), a.text), h == Nr || h > 150)) {
          if (!r) return;
          i = "prev";
        }
        i == "prev" ? t > n.first ? h = xe(S(n, t - 1).text, null, o) : h = 0 : i == "add" ? h = s + e.options.indentUnit : i == "subtract" ? h = s - e.options.indentUnit : typeof i == "number" && (h = s + i), h = Math.max(0, h);
        var c = "",
          p = 0;
        if (e.options.indentWithTabs) for (var d = Math.floor(h / o); d; --d) p += o, c += "	";
        if (p < h && (c += yi(h - p)), c != f) return Ft(n, c, y(t, 0), y(t, f.length), "+input"), a.stateAfter = null, !0;
        for (var v = 0; v < n.sel.ranges.length; v++) {
          var g = n.sel.ranges[v];
          if (g.head.line == t && g.head.ch < f.length) {
            var m = y(t, f.length);
            vn(n, v, new W(m, m));
            break;
          }
        }
      }
      u(Sr, "indentLine");
      var Te = null;
      function ui(e) {
        Te = e;
      }
      u(ui, "setLastCopied");
      function Sn(e, t, i, r, n) {
        var l = e.doc;
        e.display.shift = !1, r || (r = l.sel);
        var o = +new Date() - 200,
          a = n == "paste" || e.state.pasteIncoming > o,
          s = ki(t),
          f = null;
        if (a && r.ranges.length > 1) if (Te && Te.text.join(`
`) == t) {
          if (r.ranges.length % Te.text.length == 0) {
            f = [];
            for (var h = 0; h < Te.text.length; h++) f.push(l.splitLines(Te.text[h]));
          }
        } else s.length == r.ranges.length && e.options.pasteLinesPerSelection && (f = Or(s, function (b) {
          return [b];
        }));
        for (var c = e.curOp.updateInput, p = r.ranges.length - 1; p >= 0; p--) {
          var d = r.ranges[p],
            v = d.from(),
            g = d.to();
          d.empty() && (i && i > 0 ? v = y(v.line, v.ch - i) : e.state.overwrite && !a ? g = y(g.line, Math.min(S(l, g.line).text.length, g.ch + H(s).length)) : a && Te && Te.lineWise && Te.text.join(`
`) == s.join(`
`) && (v = g = y(v.line, 0)));
          var m = {
            from: v,
            to: g,
            text: f ? f[p % f.length] : s,
            origin: n || (a ? "paste" : e.state.cutIncoming > o ? "cut" : "+input")
          };
          Ht(e.doc, m), Z(e, "inputRead", e, m);
        }
        t && !a && Io(e, t), Nt(e), e.curOp.updateInput < 2 && (e.curOp.updateInput = c), e.curOp.typing = !0, e.state.pasteIncoming = e.state.cutIncoming = -1;
      }
      u(Sn, "applyTextInput");
      function Eo(e, t) {
        var i = e.clipboardData && e.clipboardData.getData("Text");
        if (i) return e.preventDefault(), !t.isReadOnly() && !t.options.disableInput && de(t, function () {
          return Sn(t, i, 0, null, "paste");
        }), !0;
      }
      u(Eo, "handlePaste");
      function Io(e, t) {
        if (!(!e.options.electricChars || !e.options.smartIndent)) for (var i = e.doc.sel, r = i.ranges.length - 1; r >= 0; r--) {
          var n = i.ranges[r];
          if (!(n.head.ch > 100 || r && i.ranges[r - 1].head.line == n.head.line)) {
            var l = e.getModeAt(n.head),
              o = !1;
            if (l.electricChars) {
              for (var a = 0; a < l.electricChars.length; a++) if (t.indexOf(l.electricChars.charAt(a)) > -1) {
                o = Sr(e, n.head.line, "smart");
                break;
              }
            } else l.electricInput && l.electricInput.test(S(e.doc, n.head.line).text.slice(0, n.head.ch)) && (o = Sr(e, n.head.line, "smart"));
            o && Z(e, "electricInput", e, n.head.line);
          }
        }
      }
      u(Io, "triggerElectric");
      function Ro(e) {
        for (var t = [], i = [], r = 0; r < e.doc.sel.ranges.length; r++) {
          var n = e.doc.sel.ranges[r].head.line,
            l = {
              anchor: y(n, 0),
              head: y(n + 1, 0)
            };
          i.push(l), t.push(e.getRange(l.anchor, l.head));
        }
        return {
          text: t,
          ranges: i
        };
      }
      u(Ro, "copyableRanges");
      function Bo(e, t, i, r) {
        e.setAttribute("autocorrect", i ? "" : "off"), e.setAttribute("autocapitalize", r ? "" : "off"), e.setAttribute("spellcheck", !!t);
      }
      u(Bo, "disableBrowserMagic");
      function zo() {
        var e = T("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),
          t = T("div", [e], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
        return ne ? e.style.width = "1000px" : e.setAttribute("wrap", "off"), Ut && (e.style.border = "1px solid black"), Bo(e), t;
      }
      u(zo, "hiddenTextarea");
      function tu(e) {
        var t = e.optionHandlers,
          i = e.helpers = {};
        e.prototype = {
          constructor: e,
          focus: function () {
            window.focus(), this.display.input.focus();
          },
          setOption: function (r, n) {
            var l = this.options,
              o = l[r];
            l[r] == n && r != "mode" || (l[r] = n, t.hasOwnProperty(r) && Q(this, t[r])(this, n, o), U(this, "optionChange", this, r));
          },
          getOption: function (r) {
            return this.options[r];
          },
          getDoc: function () {
            return this.doc;
          },
          addKeyMap: function (r, n) {
            this.state.keyMaps[n ? "push" : "unshift"](oi(r));
          },
          removeKeyMap: function (r) {
            for (var n = this.state.keyMaps, l = 0; l < n.length; ++l) if (n[l] == r || n[l].name == r) return n.splice(l, 1), !0;
          },
          addOverlay: le(function (r, n) {
            var l = r.token ? r : e.getMode(this.options, r);
            if (l.startState) throw new Error("Overlays may not be stateful.");
            Qo(this.state.overlays, {
              mode: l,
              modeSpec: r,
              opaque: n && n.opaque,
              priority: n && n.priority || 0
            }, function (o) {
              return o.priority;
            }), this.state.modeGen++, se(this);
          }),
          removeOverlay: le(function (r) {
            for (var n = this.state.overlays, l = 0; l < n.length; ++l) {
              var o = n[l].modeSpec;
              if (o == r || typeof r == "string" && o.name == r) {
                n.splice(l, 1), this.state.modeGen++, se(this);
                return;
              }
            }
          }),
          indentLine: le(function (r, n, l) {
            typeof n != "string" && typeof n != "number" && (n == null ? n = this.options.smartIndent ? "smart" : "prev" : n = n ? "add" : "subtract"), Jt(this.doc, r) && Sr(this, r, n, l);
          }),
          indentSelection: le(function (r) {
            for (var n = this.doc.sel.ranges, l = -1, o = 0; o < n.length; o++) {
              var a = n[o];
              if (a.empty()) a.head.line > l && (Sr(this, a.head.line, r, !0), l = a.head.line, o == this.doc.sel.primIndex && Nt(this));else {
                var s = a.from(),
                  f = a.to(),
                  h = Math.max(l, s.line);
                l = Math.min(this.lastLine(), f.line - (f.ch ? 0 : 1)) + 1;
                for (var c = h; c < l; ++c) Sr(this, c, r);
                var p = this.doc.sel.ranges;
                s.ch == 0 && n.length == p.length && p[o].from().ch > 0 && vn(this.doc, o, new W(s, p[o].to()), Me);
              }
            }
          }),
          getTokenAt: function (r, n) {
            return Zn(this, r, n);
          },
          getLineTokens: function (r, n) {
            return Zn(this, y(r), n, !0);
          },
          getTokenTypeAt: function (r) {
            r = N(this.doc, r);
            var n = Xn(this, S(this.doc, r.line)),
              l = 0,
              o = (n.length - 1) / 2,
              a = r.ch,
              s;
            if (a == 0) s = n[2];else for (;;) {
              var f = l + o >> 1;
              if ((f ? n[f * 2 - 1] : 0) >= a) o = f;else if (n[f * 2 + 1] < a) l = f + 1;else {
                s = n[f * 2 + 2];
                break;
              }
            }
            var h = s ? s.indexOf("overlay ") : -1;
            return h < 0 ? s : h == 0 ? null : s.slice(0, h - 1);
          },
          getModeAt: function (r) {
            var n = this.doc.mode;
            return n.innerMode ? e.innerMode(n, this.getTokenAt(r).state).mode : n;
          },
          getHelper: function (r, n) {
            return this.getHelpers(r, n)[0];
          },
          getHelpers: function (r, n) {
            var l = [];
            if (!i.hasOwnProperty(n)) return l;
            var o = i[n],
              a = this.getModeAt(r);
            if (typeof a[n] == "string") o[a[n]] && l.push(o[a[n]]);else if (a[n]) for (var s = 0; s < a[n].length; s++) {
              var f = o[a[n][s]];
              f && l.push(f);
            } else a.helperType && o[a.helperType] ? l.push(o[a.helperType]) : o[a.name] && l.push(o[a.name]);
            for (var h = 0; h < o._global.length; h++) {
              var c = o._global[h];
              c.pred(a, this) && ee(l, c.val) == -1 && l.push(c.val);
            }
            return l;
          },
          getStateAfter: function (r, n) {
            var _r3;
            var l = this.doc;
            return r = Un(l, (_r3 = r) !== null && _r3 !== void 0 ? _r3 : l.first + l.size - 1), jt(this, r + 1, n).state;
          },
          cursorCoords: function (r, n) {
            var l,
              o = this.doc.sel.primary();
            return r == null ? l = o.head : typeof r == "object" ? l = N(this.doc, r) : l = r ? o.from() : o.to(), Le(this, l, n || "page");
          },
          charCoords: function (r, n) {
            return Xr(this, N(this.doc, r), n || "page");
          },
          coordsChar: function (r, n) {
            return r = Sl(this, r, n || "page"), qi(this, r.left, r.top);
          },
          lineAtHeight: function (r, n) {
            return r = Sl(this, {
              top: r,
              left: 0
            }, n || "page").top, at(this.doc, r + this.display.viewOffset);
          },
          heightAtLine: function (r, n, l) {
            var o = !1,
              a;
            if (typeof r == "number") {
              var s = this.doc.first + this.doc.size - 1;
              r < this.doc.first ? r = this.doc.first : r > s && (r = s, o = !0), a = S(this.doc, r);
            } else a = r;
            return _r(this, a, {
              top: 0,
              left: 0
            }, n || "page", l || o).top + (o ? this.doc.height - Ie(a) : 0);
          },
          defaultTextHeight: function () {
            return Tt(this.display);
          },
          defaultCharWidth: function () {
            return Mt(this.display);
          },
          getViewport: function () {
            return {
              from: this.display.viewFrom,
              to: this.display.viewTo
            };
          },
          addWidget: function (r, n, l, o, a) {
            var s = this.display;
            r = Le(this, N(this.doc, r));
            var f = r.bottom,
              h = r.left;
            if (n.style.position = "absolute", n.setAttribute("cm-ignore-events", "true"), this.display.input.setUneditable(n), s.sizer.appendChild(n), o == "over") f = r.top;else if (o == "above" || o == "near") {
              var c = Math.max(s.wrapper.clientHeight, this.doc.height),
                p = Math.max(s.sizer.clientWidth, s.lineSpace.clientWidth);
              (o == "above" || r.bottom + n.offsetHeight > c) && r.top > n.offsetHeight ? f = r.top - n.offsetHeight : r.bottom + n.offsetHeight <= c && (f = r.bottom), h + n.offsetWidth > p && (h = p - n.offsetWidth);
            }
            n.style.top = f + "px", n.style.left = n.style.right = "", a == "right" ? (h = s.sizer.clientWidth - n.offsetWidth, n.style.right = "0px") : (a == "left" ? h = 0 : a == "middle" && (h = (s.sizer.clientWidth - n.offsetWidth) / 2), n.style.left = h + "px"), l && Va(this, {
              left: h,
              top: f,
              right: h + n.offsetWidth,
              bottom: f + n.offsetHeight
            });
          },
          triggerOnKeyDown: le(Mo),
          triggerOnKeyPress: le(No),
          triggerOnKeyUp: Do,
          triggerOnMouseDown: le(Ao),
          execCommand: function (r) {
            if (br.hasOwnProperty(r)) return br[r].call(null, this);
          },
          triggerElectric: le(function (r) {
            Io(this, r);
          }),
          findPosH: function (r, n, l, o) {
            var a = 1;
            n < 0 && (a = -1, n = -n);
            for (var s = N(this.doc, r), f = 0; f < n && (s = Ln(this.doc, s, a, l, o), !s.hitSide); ++f);
            return s;
          },
          moveH: le(function (r, n) {
            var l = this;
            this.extendSelectionsBy(function (o) {
              return l.display.shift || l.doc.extend || o.empty() ? Ln(l.doc, o.head, r, n, l.options.rtlMoveVisually) : r < 0 ? o.from() : o.to();
            }, Xt);
          }),
          deleteH: le(function (r, n) {
            var l = this.doc.sel,
              o = this.doc;
            l.somethingSelected() ? o.replaceSelection("", null, "+delete") : It(this, function (a) {
              var s = Ln(o, a.head, r, n, !1);
              return r < 0 ? {
                from: s,
                to: a.head
              } : {
                from: a.head,
                to: s
              };
            });
          }),
          findPosV: function (r, n, l, o) {
            var a = 1,
              s = o;
            n < 0 && (a = -1, n = -n);
            for (var f = N(this.doc, r), h = 0; h < n; ++h) {
              var c = Le(this, f, "div");
              if (s == null ? s = c.left : c.left = s, f = Go(this, c, a, l), f.hitSide) break;
            }
            return f;
          },
          moveV: le(function (r, n) {
            var l = this,
              o = this.doc,
              a = [],
              s = !this.display.shift && !o.extend && o.sel.somethingSelected();
            if (o.extendSelectionsBy(function (h) {
              if (s) return r < 0 ? h.from() : h.to();
              var c = Le(l, h.head, "div");
              h.goalColumn != null && (c.left = h.goalColumn), a.push(c.left);
              var p = Go(l, c, r, n);
              return n == "page" && h == o.sel.primary() && nn(l, Xr(l, p, "div").top - c.top), p;
            }, Xt), a.length) for (var f = 0; f < o.sel.ranges.length; f++) o.sel.ranges[f].goalColumn = a[f];
          }),
          findWordAt: function (r) {
            var n = this.doc,
              l = S(n, r.line).text,
              o = r.ch,
              a = r.ch;
            if (l) {
              var s = this.getHelper(r, "wordChars");
              (r.sticky == "before" || a == l.length) && o ? --o : ++a;
              for (var f = l.charAt(o), h = Wr(f, s) ? function (c) {
                  return Wr(c, s);
                } : /\s/.test(f) ? function (c) {
                  return /\s/.test(c);
                } : function (c) {
                  return !/\s/.test(c) && !Wr(c);
                }; o > 0 && h(l.charAt(o - 1));) --o;
              for (; a < l.length && h(l.charAt(a));) ++a;
            }
            return new W(y(r.line, o), y(r.line, a));
          },
          toggleOverwrite: function (r) {
            r != null && r == this.state.overwrite || ((this.state.overwrite = !this.state.overwrite) ? it(this.display.cursorDiv, "CodeMirror-overwrite") : tt(this.display.cursorDiv, "CodeMirror-overwrite"), U(this, "overwriteToggle", this, this.state.overwrite));
          },
          hasFocus: function () {
            return this.display.input.getField() == be();
          },
          isReadOnly: function () {
            return !!(this.options.readOnly || this.doc.cantEdit);
          },
          scrollTo: le(function (r, n) {
            nr(this, r, n);
          }),
          getScrollInfo: function () {
            var r = this.display.scroller;
            return {
              left: r.scrollLeft,
              top: r.scrollTop,
              height: r.scrollHeight - Ae(this) - this.display.barHeight,
              width: r.scrollWidth - Ae(this) - this.display.barWidth,
              clientHeight: Ki(this),
              clientWidth: st(this)
            };
          },
          scrollIntoView: le(function (r, n) {
            r == null ? (r = {
              from: this.doc.sel.primary().head,
              to: null
            }, n == null && (n = this.options.cursorScrollMargin)) : typeof r == "number" ? r = {
              from: y(r, 0),
              to: null
            } : r.from == null && (r = {
              from: r,
              to: null
            }), r.to || (r.to = r.from), r.margin = n || 0, r.from.line != null ? $a(this, r) : Wl(this, r.from, r.to, r.margin);
          }),
          setSize: le(function (r, n) {
            var l = this,
              o = u(function (s) {
                return typeof s == "number" || /^\d+$/.test(String(s)) ? s + "px" : s;
              }, "interpret");
            r != null && (this.display.wrapper.style.width = o(r)), n != null && (this.display.wrapper.style.height = o(n)), this.options.lineWrapping && xl(this);
            var a = this.display.viewFrom;
            this.doc.iter(a, this.display.viewTo, function (s) {
              if (s.widgets) {
                for (var f = 0; f < s.widgets.length; f++) if (s.widgets[f].noHScroll) {
                  Ye(l, a, "widget");
                  break;
                }
              }
              ++a;
            }), this.curOp.forceUpdate = !0, U(this, "refresh", this);
          }),
          operation: function (r) {
            return de(this, r);
          },
          startOperation: function () {
            return pt(this);
          },
          endOperation: function () {
            return vt(this);
          },
          refresh: le(function () {
            var r = this.display.cachedTextHeight;
            se(this), this.curOp.forceUpdate = !0, rr(this), nr(this, this.doc.scrollLeft, this.doc.scrollTop), an(this.display), (r == null || Math.abs(r - Tt(this.display)) > .5 || this.options.lineWrapping) && ji(this), U(this, "refresh", this);
          }),
          swapDoc: le(function (r) {
            var n = this.doc;
            return n.cm = null, this.state.selectingText && this.state.selectingText(), Yl(this, r), rr(this), this.display.input.reset(), nr(this, r.scrollLeft, r.scrollTop), this.curOp.forceScroll = !0, Z(this, "swapDoc", this, n), n;
          }),
          phrase: function (r) {
            var n = this.options.phrases;
            return n && Object.prototype.hasOwnProperty.call(n, r) ? n[r] : r;
          },
          getInputField: function () {
            return this.display.input.getField();
          },
          getWrapperElement: function () {
            return this.display.wrapper;
          },
          getScrollerElement: function () {
            return this.display.scroller;
          },
          getGutterElement: function () {
            return this.display.gutters;
          }
        }, xt(e), e.registerHelper = function (r, n, l) {
          i.hasOwnProperty(r) || (i[r] = e[r] = {
            _global: []
          }), i[r][n] = l;
        }, e.registerGlobalHelper = function (r, n, l, o) {
          e.registerHelper(r, n, o), i[r]._global.push({
            pred: l,
            val: o
          });
        };
      }
      u(tu, "addEditorMethods");
      function Ln(e, t, i, r, n) {
        var l = t,
          o = i,
          a = S(e, t.line),
          s = n && e.direction == "rtl" ? -i : i;
        function f() {
          var C = t.line + s;
          return C < e.first || C >= e.first + e.size ? !1 : (t = new y(C, t.ch, t.sticky), a = S(e, C));
        }
        u(f, "findNextLine");
        function h(C) {
          var x;
          if (r == "codepoint") {
            var w = a.text.charCodeAt(t.ch + (i > 0 ? 0 : -1));
            if (isNaN(w)) x = null;else {
              var k = i > 0 ? w >= 55296 && w < 56320 : w >= 56320 && w < 57343;
              x = new y(t.line, Math.max(0, Math.min(a.text.length, t.ch + i * (k ? 2 : 1))), -i);
            }
          } else n ? x = Es(e.cm, a, t, i) : x = yn(a, t, i);
          if (x == null) {
            if (!C && f()) t = mn(n, e.cm, a, t.line, s);else return !1;
          } else t = x;
          return !0;
        }
        if (u(h, "moveOnce"), r == "char" || r == "codepoint") h();else if (r == "column") h(!0);else if (r == "word" || r == "group") for (var c = null, p = r == "group", d = e.cm && e.cm.getHelper(t, "wordChars"), v = !0; !(i < 0 && !h(!v)); v = !1) {
          var g = a.text.charAt(t.ch) || `
`,
            m = Wr(g, d) ? "w" : p && g == `
` ? "n" : !p || /\s/.test(g) ? null : "p";
          if (p && !v && !m && (m = "s"), c && c != m) {
            i < 0 && (i = 1, h(), t.sticky = "after");
            break;
          }
          if (m && (c = m), i > 0 && !h(!v)) break;
        }
        var b = ii(e, t, l, o, !0);
        return Wi(l, b) && (b.hitSide = !0), b;
      }
      u(Ln, "findPosH");
      function Go(e, t, i, r) {
        var n = e.doc,
          l = t.left,
          o;
        if (r == "page") {
          var a = Math.min(e.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight),
            s = Math.max(a - .5 * Tt(e.display), 3);
          o = (i > 0 ? t.bottom : t.top) + i * s;
        } else r == "line" && (o = i > 0 ? t.bottom + 3 : t.top - 3);
        for (var f; f = qi(e, l, o), !!f.outside;) {
          if (i < 0 ? o <= 0 : o >= n.height) {
            f.hitSide = !0;
            break;
          }
          o += i * 5;
        }
        return f;
      }
      u(Go, "findPosV");
      var P = u(function (e) {
        this.cm = e, this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null, this.polling = new _e(), this.composing = null, this.gracePeriod = !1, this.readDOMTimeout = null;
      }, "ContentEditableInput");
      P.prototype.init = function (e) {
        var t = this,
          i = this,
          r = i.cm,
          n = i.div = e.lineDiv;
        n.contentEditable = !0, Bo(n, r.options.spellcheck, r.options.autocorrect, r.options.autocapitalize);
        function l(a) {
          for (var s = a.target; s; s = s.parentNode) {
            if (s == n) return !0;
            if (/\bCodeMirror-(?:line)?widget\b/.test(s.className)) break;
          }
          return !1;
        }
        u(l, "belongsToInput"), M(n, "paste", function (a) {
          !l(a) || q(r, a) || Eo(a, r) || I <= 11 && setTimeout(Q(r, function () {
            return t.updateFromDOM();
          }), 20);
        }), M(n, "compositionstart", function (a) {
          t.composing = {
            data: a.data,
            done: !1
          };
        }), M(n, "compositionupdate", function (a) {
          t.composing || (t.composing = {
            data: a.data,
            done: !1
          });
        }), M(n, "compositionend", function (a) {
          t.composing && (a.data != t.composing.data && t.readFromDOMSoon(), t.composing.done = !0);
        }), M(n, "touchstart", function () {
          return i.forceCompositionEnd();
        }), M(n, "input", function () {
          t.composing || t.readFromDOMSoon();
        });
        function o(a) {
          if (!(!l(a) || q(r, a))) {
            if (r.somethingSelected()) ui({
              lineWise: !1,
              text: r.getSelections()
            }), a.type == "cut" && r.replaceSelection("", null, "cut");else if (r.options.lineWiseCopyCut) {
              var s = Ro(r);
              ui({
                lineWise: !0,
                text: s.text
              }), a.type == "cut" && r.operation(function () {
                r.setSelections(s.ranges, 0, Me), r.replaceSelection("", null, "cut");
              });
            } else return;
            if (a.clipboardData) {
              a.clipboardData.clearData();
              var f = Te.text.join(`
`);
              if (a.clipboardData.setData("Text", f), a.clipboardData.getData("Text") == f) {
                a.preventDefault();
                return;
              }
            }
            var h = zo(),
              c = h.firstChild;
            r.display.lineSpace.insertBefore(h, r.display.lineSpace.firstChild), c.value = Te.text.join(`
`);
            var p = be();
            _t(c), setTimeout(function () {
              r.display.lineSpace.removeChild(h), p.focus(), p == n && i.showPrimarySelection();
            }, 50);
          }
        }
        u(o, "onCopyCut"), M(n, "copy", o), M(n, "cut", o);
      }, P.prototype.screenReaderLabelChanged = function (e) {
        e ? this.div.setAttribute("aria-label", e) : this.div.removeAttribute("aria-label");
      }, P.prototype.prepareSelection = function () {
        var e = Nl(this.cm, !1);
        return e.focus = be() == this.div, e;
      }, P.prototype.showSelection = function (e, t) {
        !e || !this.cm.display.view.length || ((e.focus || t) && this.showPrimarySelection(), this.showMultipleSelections(e));
      }, P.prototype.getSelection = function () {
        return this.cm.display.wrapper.ownerDocument.getSelection();
      }, P.prototype.showPrimarySelection = function () {
        var e = this.getSelection(),
          t = this.cm,
          i = t.doc.sel.primary(),
          r = i.from(),
          n = i.to();
        if (t.display.viewTo == t.display.viewFrom || r.line >= t.display.viewTo || n.line < t.display.viewFrom) {
          e.removeAllRanges();
          return;
        }
        var l = fi(t, e.anchorNode, e.anchorOffset),
          o = fi(t, e.focusNode, e.focusOffset);
        if (!(l && !l.bad && o && !o.bad && D(Pr(l, o), r) == 0 && D(Fr(l, o), n) == 0)) {
          var a = t.display.view,
            s = r.line >= t.display.viewFrom && Uo(t, r) || {
              node: a[0].measure.map[2],
              offset: 0
            },
            f = n.line < t.display.viewTo && Uo(t, n);
          if (!f) {
            var h = a[a.length - 1].measure,
              c = h.maps ? h.maps[h.maps.length - 1] : h.map;
            f = {
              node: c[c.length - 1],
              offset: c[c.length - 2] - c[c.length - 3]
            };
          }
          if (!s || !f) {
            e.removeAllRanges();
            return;
          }
          var p = e.rangeCount && e.getRangeAt(0),
            d;
          try {
            d = rt(s.node, s.offset, f.offset, f.node);
          } catch {}
          d && (!Fe && t.state.focused ? (e.collapse(s.node, s.offset), d.collapsed || (e.removeAllRanges(), e.addRange(d))) : (e.removeAllRanges(), e.addRange(d)), p && e.anchorNode == null ? e.addRange(p) : Fe && this.startGracePeriod()), this.rememberSelection();
        }
      }, P.prototype.startGracePeriod = function () {
        var e = this;
        clearTimeout(this.gracePeriod), this.gracePeriod = setTimeout(function () {
          e.gracePeriod = !1, e.selectionChanged() && e.cm.operation(function () {
            return e.cm.curOp.selectionChanged = !0;
          });
        }, 20);
      }, P.prototype.showMultipleSelections = function (e) {
        ve(this.cm.display.cursorDiv, e.cursors), ve(this.cm.display.selectionDiv, e.selection);
      }, P.prototype.rememberSelection = function () {
        var e = this.getSelection();
        this.lastAnchorNode = e.anchorNode, this.lastAnchorOffset = e.anchorOffset, this.lastFocusNode = e.focusNode, this.lastFocusOffset = e.focusOffset;
      }, P.prototype.selectionInEditor = function () {
        var e = this.getSelection();
        if (!e.rangeCount) return !1;
        var t = e.getRangeAt(0).commonAncestorContainer;
        return Ke(this.div, t);
      }, P.prototype.focus = function () {
        this.cm.options.readOnly != "nocursor" && ((!this.selectionInEditor() || be() != this.div) && this.showSelection(this.prepareSelection(), !0), this.div.focus());
      }, P.prototype.blur = function () {
        this.div.blur();
      }, P.prototype.getField = function () {
        return this.div;
      }, P.prototype.supportsTouch = function () {
        return !0;
      }, P.prototype.receivedFocus = function () {
        var e = this,
          t = this;
        this.selectionInEditor() ? setTimeout(function () {
          return e.pollSelection();
        }, 20) : de(this.cm, function () {
          return t.cm.curOp.selectionChanged = !0;
        });
        function i() {
          t.cm.state.focused && (t.pollSelection(), t.polling.set(t.cm.options.pollInterval, i));
        }
        u(i, "poll"), this.polling.set(this.cm.options.pollInterval, i);
      }, P.prototype.selectionChanged = function () {
        var e = this.getSelection();
        return e.anchorNode != this.lastAnchorNode || e.anchorOffset != this.lastAnchorOffset || e.focusNode != this.lastFocusNode || e.focusOffset != this.lastFocusOffset;
      }, P.prototype.pollSelection = function () {
        if (!(this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged())) {
          var e = this.getSelection(),
            t = this.cm;
          if (Dr && Tr && this.cm.display.gutterSpecs.length && ru(e.anchorNode)) {
            this.cm.triggerOnKeyDown({
              type: "keydown",
              keyCode: 8,
              preventDefault: Math.abs
            }), this.blur(), this.focus();
            return;
          }
          if (!this.composing) {
            this.rememberSelection();
            var i = fi(t, e.anchorNode, e.anchorOffset),
              r = fi(t, e.focusNode, e.focusOffset);
            i && r && de(t, function () {
              te(t.doc, Ze(i, r), Me), (i.bad || r.bad) && (t.curOp.selectionChanged = !0);
            });
          }
        }
      }, P.prototype.pollContent = function () {
        this.readDOMTimeout != null && (clearTimeout(this.readDOMTimeout), this.readDOMTimeout = null);
        var e = this.cm,
          t = e.display,
          i = e.doc.sel.primary(),
          r = i.from(),
          n = i.to();
        if (r.ch == 0 && r.line > e.firstLine() && (r = y(r.line - 1, S(e.doc, r.line - 1).length)), n.ch == S(e.doc, n.line).text.length && n.line < e.lastLine() && (n = y(n.line + 1, 0)), r.line < t.viewFrom || n.line > t.viewTo - 1) return !1;
        var l, o, a;
        r.line == t.viewFrom || (l = ht(e, r.line)) == 0 ? (o = F(t.view[0].line), a = t.view[0].node) : (o = F(t.view[l].line), a = t.view[l - 1].node.nextSibling);
        var s = ht(e, n.line),
          f,
          h;
        if (s == t.view.length - 1 ? (f = t.viewTo - 1, h = t.lineDiv.lastChild) : (f = F(t.view[s + 1].line) - 1, h = t.view[s + 1].node.previousSibling), !a) return !1;
        for (var c = e.doc.splitLines(iu(e, a, h, o, f)), p = ot(e.doc, y(o, 0), y(f, S(e.doc, f).text.length)); c.length > 1 && p.length > 1;) if (H(c) == H(p)) c.pop(), p.pop(), f--;else if (c[0] == p[0]) c.shift(), p.shift(), o++;else break;
        for (var d = 0, v = 0, g = c[0], m = p[0], b = Math.min(g.length, m.length); d < b && g.charCodeAt(d) == m.charCodeAt(d);) ++d;
        for (var C = H(c), x = H(p), w = Math.min(C.length - (c.length == 1 ? d : 0), x.length - (p.length == 1 ? d : 0)); v < w && C.charCodeAt(C.length - v - 1) == x.charCodeAt(x.length - v - 1);) ++v;
        if (c.length == 1 && p.length == 1 && o == r.line) for (; d && d > r.ch && C.charCodeAt(C.length - v - 1) == x.charCodeAt(x.length - v - 1);) d--, v++;
        c[c.length - 1] = C.slice(0, C.length - v).replace(/^\u200b+/, ""), c[0] = c[0].slice(d).replace(/\u200b+$/, "");
        var k = y(o, d),
          L = y(f, p.length ? H(p).length - v : 0);
        if (c.length > 1 || c[0] || D(k, L)) return Ft(e.doc, c, k, L, "+input"), !0;
      }, P.prototype.ensurePolled = function () {
        this.forceCompositionEnd();
      }, P.prototype.reset = function () {
        this.forceCompositionEnd();
      }, P.prototype.forceCompositionEnd = function () {
        this.composing && (clearTimeout(this.readDOMTimeout), this.composing = null, this.updateFromDOM(), this.div.blur(), this.div.focus());
      }, P.prototype.readFromDOMSoon = function () {
        var e = this;
        this.readDOMTimeout == null && (this.readDOMTimeout = setTimeout(function () {
          if (e.readDOMTimeout = null, e.composing) if (e.composing.done) e.composing = null;else return;
          e.updateFromDOM();
        }, 80));
      }, P.prototype.updateFromDOM = function () {
        var e = this;
        (this.cm.isReadOnly() || !this.pollContent()) && de(this.cm, function () {
          return se(e.cm);
        });
      }, P.prototype.setUneditable = function (e) {
        e.contentEditable = "false";
      }, P.prototype.onKeyPress = function (e) {
        e.charCode == 0 || this.composing || (e.preventDefault(), this.cm.isReadOnly() || Q(this.cm, Sn)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0));
      }, P.prototype.readOnlyChanged = function (e) {
        this.div.contentEditable = String(e != "nocursor");
      }, P.prototype.onContextMenu = function () {}, P.prototype.resetPosition = function () {}, P.prototype.needsContentAttribute = !0;
      function Uo(e, t) {
        var i = _i(e, t.line);
        if (!i || i.hidden) return null;
        var r = S(e.doc, t.line),
          n = vl(i, r, t.line),
          l = Pe(r, e.doc.direction),
          o = "left";
        if (l) {
          var a = Zt(l, t.ch);
          o = a % 2 ? "right" : "left";
        }
        var s = ml(n.map, t.ch, o);
        return s.offset = s.collapse == "right" ? s.end : s.start, s;
      }
      u(Uo, "posToDOM");
      function ru(e) {
        for (var t = e; t; t = t.parentNode) if (/CodeMirror-gutter-wrapper/.test(t.className)) return !0;
        return !1;
      }
      u(ru, "isInGutter");
      function Bt(e, t) {
        return t && (e.bad = !0), e;
      }
      u(Bt, "badPos");
      function iu(e, t, i, r, n) {
        var l = "",
          o = !1,
          a = e.doc.lineSeparator(),
          s = !1;
        function f(d) {
          return function (v) {
            return v.id == d;
          };
        }
        u(f, "recognizeMarker");
        function h() {
          o && (l += a, s && (l += a), o = s = !1);
        }
        u(h, "close");
        function c(d) {
          d && (h(), l += d);
        }
        u(c, "addText");
        function p(d) {
          if (d.nodeType == 1) {
            var v = d.getAttribute("cm-text");
            if (v) {
              c(v);
              return;
            }
            var g = d.getAttribute("cm-marker"),
              m;
            if (g) {
              var b = e.findMarks(y(r, 0), y(n + 1, 0), f(+g));
              b.length && (m = b[0].find(0)) && c(ot(e.doc, m.from, m.to).join(a));
              return;
            }
            if (d.getAttribute("contenteditable") == "false") return;
            var C = /^(pre|div|p|li|table|br)$/i.test(d.nodeName);
            if (!/^br$/i.test(d.nodeName) && d.textContent.length == 0) return;
            C && h();
            for (var x = 0; x < d.childNodes.length; x++) p(d.childNodes[x]);
            /^(pre|p)$/i.test(d.nodeName) && (s = !0), C && (o = !0);
          } else d.nodeType == 3 && c(d.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
        }
        for (u(p, "walk"); p(t), t != i;) t = t.nextSibling, s = !1;
        return l;
      }
      u(iu, "domTextBetween");
      function fi(e, t, i) {
        var r;
        if (t == e.display.lineDiv) {
          if (r = e.display.lineDiv.childNodes[i], !r) return Bt(e.clipPos(y(e.display.viewTo - 1)), !0);
          t = null, i = 0;
        } else for (r = t;; r = r.parentNode) {
          if (!r || r == e.display.lineDiv) return null;
          if (r.parentNode && r.parentNode == e.display.lineDiv) break;
        }
        for (var n = 0; n < e.display.view.length; n++) {
          var l = e.display.view[n];
          if (l.node == r) return nu(l, t, i);
        }
      }
      u(fi, "domToPos");
      function nu(e, t, i) {
        var r = e.text.firstChild,
          n = !1;
        if (!t || !Ke(r, t)) return Bt(y(F(e.line), 0), !0);
        if (t == r && (n = !0, t = r.childNodes[i], i = 0, !t)) {
          var l = e.rest ? H(e.rest) : e.line;
          return Bt(y(F(l), l.text.length), n);
        }
        var o = t.nodeType == 3 ? t : null,
          a = t;
        for (!o && t.childNodes.length == 1 && t.firstChild.nodeType == 3 && (o = t.firstChild, i && (i = o.nodeValue.length)); a.parentNode != r;) a = a.parentNode;
        var s = e.measure,
          f = s.maps;
        function h(m, b, C) {
          for (var x = -1; x < (f ? f.length : 0); x++) for (var w = x < 0 ? s.map : f[x], k = 0; k < w.length; k += 3) {
            var L = w[k + 2];
            if (L == m || L == b) {
              var A = F(x < 0 ? e.line : e.rest[x]),
                E = w[k] + C;
              return (C < 0 || L != m) && (E = w[k + (C ? 1 : 0)]), y(A, E);
            }
          }
        }
        u(h, "find");
        var c = h(o, a, i);
        if (c) return Bt(c, n);
        for (var p = a.nextSibling, d = o ? o.nodeValue.length - i : 0; p; p = p.nextSibling) {
          if (c = h(p, p.firstChild, 0), c) return Bt(y(c.line, c.ch - d), n);
          d += p.textContent.length;
        }
        for (var v = a.previousSibling, g = i; v; v = v.previousSibling) {
          if (c = h(v, v.firstChild, -1), c) return Bt(y(c.line, c.ch + g), n);
          g += v.textContent.length;
        }
      }
      u(nu, "locateNodeInLineView");
      var G = u(function (e) {
        this.cm = e, this.prevInput = "", this.pollingFast = !1, this.polling = new _e(), this.hasSelection = !1, this.composing = null;
      }, "TextareaInput");
      G.prototype.init = function (e) {
        var t = this,
          i = this,
          r = this.cm;
        this.createField(e);
        var n = this.textarea;
        e.wrapper.insertBefore(this.wrapper, e.wrapper.firstChild), Ut && (n.style.width = "0px"), M(n, "input", function () {
          O && I >= 9 && t.hasSelection && (t.hasSelection = null), i.poll();
        }), M(n, "paste", function (o) {
          q(r, o) || Eo(o, r) || (r.state.pasteIncoming = +new Date(), i.fastPoll());
        });
        function l(o) {
          if (!q(r, o)) {
            if (r.somethingSelected()) ui({
              lineWise: !1,
              text: r.getSelections()
            });else if (r.options.lineWiseCopyCut) {
              var a = Ro(r);
              ui({
                lineWise: !0,
                text: a.text
              }), o.type == "cut" ? r.setSelections(a.ranges, null, Me) : (i.prevInput = "", n.value = a.text.join(`
`), _t(n));
            } else return;
            o.type == "cut" && (r.state.cutIncoming = +new Date());
          }
        }
        u(l, "prepareCopyCut"), M(n, "cut", l), M(n, "copy", l), M(e.scroller, "paste", function (o) {
          if (!(Re(e, o) || q(r, o))) {
            if (!n.dispatchEvent) {
              r.state.pasteIncoming = +new Date(), i.focus();
              return;
            }
            var a = new Event("paste");
            a.clipboardData = o.clipboardData, n.dispatchEvent(a);
          }
        }), M(e.lineSpace, "selectstart", function (o) {
          Re(e, o) || ae(o);
        }), M(n, "compositionstart", function () {
          var o = r.getCursor("from");
          i.composing && i.composing.range.clear(), i.composing = {
            start: o,
            range: r.markText(o, r.getCursor("to"), {
              className: "CodeMirror-composing"
            })
          };
        }), M(n, "compositionend", function () {
          i.composing && (i.poll(), i.composing.range.clear(), i.composing = null);
        });
      }, G.prototype.createField = function (e) {
        this.wrapper = zo(), this.textarea = this.wrapper.firstChild;
      }, G.prototype.screenReaderLabelChanged = function (e) {
        e ? this.textarea.setAttribute("aria-label", e) : this.textarea.removeAttribute("aria-label");
      }, G.prototype.prepareSelection = function () {
        var e = this.cm,
          t = e.display,
          i = e.doc,
          r = Nl(e);
        if (e.options.moveInputWithCursor) {
          var n = Le(e, i.sel.primary().head, "div"),
            l = t.wrapper.getBoundingClientRect(),
            o = t.lineDiv.getBoundingClientRect();
          r.teTop = Math.max(0, Math.min(t.wrapper.clientHeight - 10, n.top + o.top - l.top)), r.teLeft = Math.max(0, Math.min(t.wrapper.clientWidth - 10, n.left + o.left - l.left));
        }
        return r;
      }, G.prototype.showSelection = function (e) {
        var t = this.cm,
          i = t.display;
        ve(i.cursorDiv, e.cursors), ve(i.selectionDiv, e.selection), e.teTop != null && (this.wrapper.style.top = e.teTop + "px", this.wrapper.style.left = e.teLeft + "px");
      }, G.prototype.reset = function (e) {
        if (!(this.contextMenuPending || this.composing)) {
          var t = this.cm;
          if (t.somethingSelected()) {
            this.prevInput = "";
            var i = t.getSelection();
            this.textarea.value = i, t.state.focused && _t(this.textarea), O && I >= 9 && (this.hasSelection = i);
          } else e || (this.prevInput = this.textarea.value = "", O && I >= 9 && (this.hasSelection = null));
        }
      }, G.prototype.getField = function () {
        return this.textarea;
      }, G.prototype.supportsTouch = function () {
        return !1;
      }, G.prototype.focus = function () {
        if (this.cm.options.readOnly != "nocursor" && (!Kt || be() != this.textarea)) try {
          this.textarea.focus();
        } catch {}
      }, G.prototype.blur = function () {
        this.textarea.blur();
      }, G.prototype.resetPosition = function () {
        this.wrapper.style.top = this.wrapper.style.left = 0;
      }, G.prototype.receivedFocus = function () {
        this.slowPoll();
      }, G.prototype.slowPoll = function () {
        var e = this;
        this.pollingFast || this.polling.set(this.cm.options.pollInterval, function () {
          e.poll(), e.cm.state.focused && e.slowPoll();
        });
      }, G.prototype.fastPoll = function () {
        var e = !1,
          t = this;
        t.pollingFast = !0;
        function i() {
          var r = t.poll();
          !r && !e ? (e = !0, t.polling.set(60, i)) : (t.pollingFast = !1, t.slowPoll());
        }
        u(i, "p"), t.polling.set(20, i);
      }, G.prototype.poll = function () {
        var e = this,
          t = this.cm,
          i = this.textarea,
          r = this.prevInput;
        if (this.contextMenuPending || !t.state.focused || ia(i) && !r && !this.composing || t.isReadOnly() || t.options.disableInput || t.state.keySeq) return !1;
        var n = i.value;
        if (n == r && !t.somethingSelected()) return !1;
        if (O && I >= 9 && this.hasSelection === n || me && /[\uf700-\uf7ff]/.test(n)) return t.display.input.reset(), !1;
        if (t.doc.sel == t.display.selForContextMenu) {
          var l = n.charCodeAt(0);
          if (l == 8203 && !r && (r = "​"), l == 8666) return this.reset(), this.cm.execCommand("undo");
        }
        for (var o = 0, a = Math.min(r.length, n.length); o < a && r.charCodeAt(o) == n.charCodeAt(o);) ++o;
        return de(t, function () {
          Sn(t, n.slice(o), r.length - o, null, e.composing ? "*compose" : null), n.length > 1e3 || n.indexOf(`
`) > -1 ? i.value = e.prevInput = "" : e.prevInput = n, e.composing && (e.composing.range.clear(), e.composing.range = t.markText(e.composing.start, t.getCursor("to"), {
            className: "CodeMirror-composing"
          }));
        }), !0;
      }, G.prototype.ensurePolled = function () {
        this.pollingFast && this.poll() && (this.pollingFast = !1);
      }, G.prototype.onKeyPress = function () {
        O && I >= 9 && (this.hasSelection = null), this.fastPoll();
      }, G.prototype.onContextMenu = function (e) {
        var t = this,
          i = t.cm,
          r = i.display,
          n = t.textarea;
        t.contextMenuPending && t.contextMenuPending();
        var l = ft(i, e),
          o = r.scroller.scrollTop;
        if (!l || we) return;
        var a = i.options.resetSelectionOnContextMenu;
        a && i.doc.sel.contains(l) == -1 && Q(i, te)(i.doc, Ze(l), Me);
        var s = n.style.cssText,
          f = t.wrapper.style.cssText,
          h = t.wrapper.offsetParent.getBoundingClientRect();
        t.wrapper.style.cssText = "position: static", n.style.cssText = `position: absolute; width: 30px; height: 30px;
      top: ` + (e.clientY - h.top - 5) + "px; left: " + (e.clientX - h.left - 5) + `px;
      z-index: 1000; background: ` + (O ? "rgba(255, 255, 255, .05)" : "transparent") + `;
      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;
        var c;
        ne && (c = window.scrollY), r.input.focus(), ne && window.scrollTo(null, c), r.input.reset(), i.somethingSelected() || (n.value = t.prevInput = " "), t.contextMenuPending = d, r.selForContextMenu = i.doc.sel, clearTimeout(r.detectingSelectAll);
        function p() {
          if (n.selectionStart != null) {
            var g = i.somethingSelected(),
              m = "​" + (g ? n.value : "");
            n.value = "⇚", n.value = m, t.prevInput = g ? "" : "​", n.selectionStart = 1, n.selectionEnd = m.length, r.selForContextMenu = i.doc.sel;
          }
        }
        u(p, "prepareSelectAllHack");
        function d() {
          if (t.contextMenuPending == d && (t.contextMenuPending = !1, t.wrapper.style.cssText = f, n.style.cssText = s, O && I < 9 && r.scrollbars.setScrollTop(r.scroller.scrollTop = o), n.selectionStart != null)) {
            (!O || O && I < 9) && p();
            var g = 0,
              m = u(function () {
                r.selForContextMenu == i.doc.sel && n.selectionStart == 0 && n.selectionEnd > 0 && t.prevInput == "​" ? Q(i, lo)(i) : g++ < 10 ? r.detectingSelectAll = setTimeout(m, 500) : (r.selForContextMenu = null, r.input.reset());
              }, "poll");
            r.detectingSelectAll = setTimeout(m, 200);
          }
        }
        if (u(d, "rehide"), O && I >= 9 && p(), ci) {
          Qt(e);
          var v = u(function () {
            ge(window, "mouseup", v), setTimeout(d, 20);
          }, "mouseup");
          M(window, "mouseup", v);
        } else setTimeout(d, 50);
      }, G.prototype.readOnlyChanged = function (e) {
        e || this.reset(), this.textarea.disabled = e == "nocursor", this.textarea.readOnly = !!e;
      }, G.prototype.setUneditable = function () {}, G.prototype.needsContentAttribute = !1;
      function lu(e, t) {
        if (t = t ? nt(t) : {}, t.value = e.value, !t.tabindex && e.tabIndex && (t.tabindex = e.tabIndex), !t.placeholder && e.placeholder && (t.placeholder = e.placeholder), t.autofocus == null) {
          var i = be();
          t.autofocus = i == e || e.getAttribute("autofocus") != null && i == document.body;
        }
        function r() {
          e.value = a.getValue();
        }
        u(r, "save");
        var n;
        if (e.form && (M(e.form, "submit", r), !t.leaveSubmitMethodAlone)) {
          var l = e.form;
          n = l.submit;
          try {
            var o = l.submit = function () {
              r(), l.submit = n, l.submit(), l.submit = o;
            };
          } catch {}
        }
        t.finishInit = function (s) {
          s.save = r, s.getTextArea = function () {
            return e;
          }, s.toTextArea = function () {
            s.toTextArea = isNaN, r(), e.parentNode.removeChild(s.getWrapperElement()), e.style.display = "", e.form && (ge(e.form, "submit", r), !t.leaveSubmitMethodAlone && typeof e.form.submit == "function" && (e.form.submit = n));
          };
        }, e.style.display = "none";
        var a = R(function (s) {
          return e.parentNode.insertBefore(s, e.nextSibling);
        }, t);
        return a;
      }
      u(lu, "fromTextArea");
      function ou(e) {
        e.off = ge, e.on = M, e.wheelEventPixels = ds, e.Doc = ue, e.splitLines = ki, e.countColumn = xe, e.findColumn = gi, e.isWordChar = mi, e.Pass = Nr, e.signal = U, e.Line = St, e.changeEnd = Qe, e.scrollbarModel = Pl, e.Pos = y, e.cmpPos = D, e.modes = Mi, e.mimeModes = Ct, e.resolveMode = Hr, e.getMode = Di, e.modeExtensions = wt, e.extendMode = sa, e.copyState = lt, e.startState = Gn, e.innerMode = Ni, e.commands = br, e.keyMap = ze, e.keyName = wo, e.isModifierKey = xo, e.lookupKey = Et, e.normalizeKeyMap = Ps, e.StringStream = K, e.SharedTextMarker = gr, e.TextMarker = je, e.LineWidget = vr, e.e_preventDefault = ae, e.e_stopPropagation = Bn, e.e_stop = Qt, e.addClass = it, e.contains = Ke, e.rmClass = tt, e.keyNames = Ve;
      }
      u(ou, "addLegacyProps"), js(R), tu(R);
      var au = "iter insert remove copy getEditor constructor".split(" ");
      for (var hi in ue.prototype) ue.prototype.hasOwnProperty(hi) && ee(au, hi) < 0 && (R.prototype[hi] = function (e) {
        return function () {
          return e.apply(this.doc, arguments);
        };
      }(ue.prototype[hi]));
      return xt(ue), R.inputStyles = {
        textarea: G,
        contenteditable: P
      }, R.defineMode = function (e) {
        !R.defaults.mode && e != "null" && (R.defaults.mode = e), oa.apply(this, arguments);
      }, R.defineMIME = aa, R.defineMode("null", function () {
        return {
          token: function (e) {
            return e.skipToEnd();
          }
        };
      }), R.defineMIME("text/plain", "null"), R.defineExtension = function (e, t) {
        R.prototype[e] = t;
      }, R.defineDocExtension = function (e, t) {
        ue.prototype[e] = t;
      }, R.fromTextArea = lu, ou(R), R.version = "5.65.3", R;
    });
  }(Mn)), Mn.exports;
}
u(hu, "requireCodemirror");
exports.getDefaultExportFromCjs = fu;
exports.requireCodemirror = hu;

/***/ }),

/***/ "../../graphiql-react/dist/comment.cjs.js":
/*!************************************************!*\
  !*** ../../graphiql-react/dist/comment.cjs.js ***!
  \************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var G = Object.defineProperty;
var I = (p, E) => G(p, "name", {
  value: E,
  configurable: !0
});
const z = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
function H(p, E) {
  for (var u = 0; u < E.length; u++) {
    const C = E[u];
    if (typeof C != "string" && !Array.isArray(C)) {
      for (const s in C) if (s !== "default" && !(s in p)) {
        const r = Object.getOwnPropertyDescriptor(C, s);
        r && Object.defineProperty(p, s, r.get ? r : {
          enumerable: !0,
          get: () => C[s]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(p, Symbol.toStringTag, {
    value: "Module"
  }));
}
I(H, "_mergeNamespaces");
var J = {
  exports: {}
};
(function (p, E) {
  (function (u) {
    u(z.requireCodemirror());
  })(function (u) {
    var C = {},
      s = /[^\s\u00a0]/,
      r = u.Pos,
      F = u.cmpPos;
    function D(t) {
      var l = t.search(s);
      return l == -1 ? 0 : l;
    }
    I(D, "firstNonWS"), u.commands.toggleComment = function (t) {
      t.toggleComment();
    }, u.defineExtension("toggleComment", function (t) {
      t || (t = C);
      for (var l = this, n = 1 / 0, e = this.listSelections(), f = null, m = e.length - 1; m >= 0; m--) {
        var a = e[m].from(),
          i = e[m].to();
        a.line >= n || (i.line >= n && (i = r(n, 0)), n = a.line, f == null ? l.uncomment(a, i, t) ? f = "un" : (l.lineComment(a, i, t), f = "line") : f == "un" ? l.uncomment(a, i, t) : l.lineComment(a, i, t));
      }
    });
    function w(t, l, n) {
      return /\bstring\b/.test(t.getTokenTypeAt(r(l.line, 0))) && !/^[\'\"\`]/.test(n);
    }
    I(w, "probablyInsideString");
    function P(t, l) {
      var n = t.getMode();
      return n.useInnerComments === !1 || !n.innerMode ? n : t.getModeAt(l);
    }
    I(P, "getMode"), u.defineExtension("lineComment", function (t, l, n) {
      n || (n = C);
      var e = this,
        f = P(e, t),
        m = e.getLine(t.line);
      if (!(m == null || w(e, t, m))) {
        var a = n.lineComment || f.lineComment;
        if (!a) {
          (n.blockCommentStart || f.blockCommentStart) && (n.fullLines = !0, e.blockComment(t, l, n));
          return;
        }
        var i = Math.min(l.ch != 0 || l.line == t.line ? l.line + 1 : l.line, e.lastLine() + 1),
          k = n.padding == null ? " " : n.padding,
          g = n.commentBlankLines || t.line == l.line;
        e.operation(function () {
          if (n.indent) {
            for (var d = null, c = t.line; c < i; ++c) {
              var v = e.getLine(c),
                h = v.slice(0, D(v));
              (d == null || d.length > h.length) && (d = h);
            }
            for (var c = t.line; c < i; ++c) {
              var v = e.getLine(c),
                o = d.length;
              !g && !s.test(v) || (v.slice(0, o) != d && (o = D(v)), e.replaceRange(d + a + k, r(c, 0), r(c, o)));
            }
          } else for (var c = t.line; c < i; ++c) (g || s.test(e.getLine(c))) && e.replaceRange(a + k, r(c, 0));
        });
      }
    }), u.defineExtension("blockComment", function (t, l, n) {
      n || (n = C);
      var e = this,
        f = P(e, t),
        m = n.blockCommentStart || f.blockCommentStart,
        a = n.blockCommentEnd || f.blockCommentEnd;
      if (!m || !a) {
        (n.lineComment || f.lineComment) && n.fullLines != !1 && e.lineComment(t, l, n);
        return;
      }
      if (!/\bcomment\b/.test(e.getTokenTypeAt(r(t.line, 0)))) {
        var i = Math.min(l.line, e.lastLine());
        i != t.line && l.ch == 0 && s.test(e.getLine(i)) && --i;
        var k = n.padding == null ? " " : n.padding;
        t.line > i || e.operation(function () {
          if (n.fullLines != !1) {
            var g = s.test(e.getLine(i));
            e.replaceRange(k + a, r(i)), e.replaceRange(m + k, r(t.line, 0));
            var d = n.blockCommentLead || f.blockCommentLead;
            if (d != null) for (var c = t.line + 1; c <= i; ++c) (c != i || g) && e.replaceRange(d + k, r(c, 0));
          } else {
            var v = F(e.getCursor("to"), l) == 0,
              h = !e.somethingSelected();
            e.replaceRange(a, l), v && e.setSelection(h ? l : e.getCursor("from"), l), e.replaceRange(m, t);
          }
        });
      }
    }), u.defineExtension("uncomment", function (t, l, n) {
      n || (n = C);
      var e = this,
        f = P(e, t),
        m = Math.min(l.ch != 0 || l.line == t.line ? l.line : l.line - 1, e.lastLine()),
        a = Math.min(t.line, m),
        i = n.lineComment || f.lineComment,
        k = [],
        g = n.padding == null ? " " : n.padding,
        d;
      e: {
        if (!i) break e;
        for (var c = a; c <= m; ++c) {
          var v = e.getLine(c),
            h = v.indexOf(i);
          if (h > -1 && !/comment/.test(e.getTokenTypeAt(r(c, h + 1))) && (h = -1), h == -1 && s.test(v) || h > -1 && s.test(v.slice(0, h))) break e;
          k.push(v);
        }
        if (e.operation(function () {
          for (var b = a; b <= m; ++b) {
            var x = k[b - a],
              O = x.indexOf(i),
              L = O + i.length;
            O < 0 || (x.slice(L, L + g.length) == g && (L += g.length), d = !0, e.replaceRange("", r(b, O), r(b, L)));
          }
        }), d) return !0;
      }
      var o = n.blockCommentStart || f.blockCommentStart,
        S = n.blockCommentEnd || f.blockCommentEnd;
      if (!o || !S) return !1;
      var q = n.blockCommentLead || f.blockCommentLead,
        A = e.getLine(a),
        j = A.indexOf(o);
      if (j == -1) return !1;
      var _ = m == a ? A : e.getLine(m),
        y = _.indexOf(S, m == a ? j + o.length : 0),
        N = r(a, j + 1),
        W = r(m, y + 1);
      if (y == -1 || !/comment/.test(e.getTokenTypeAt(N)) || !/comment/.test(e.getTokenTypeAt(W)) || e.getRange(N, W, `
`).indexOf(S) > -1) return !1;
      var R = A.lastIndexOf(o, t.ch),
        T = R == -1 ? -1 : A.slice(0, t.ch).indexOf(S, R + o.length);
      if (R != -1 && T != -1 && T + S.length != t.ch) return !1;
      T = _.indexOf(S, l.ch);
      var $ = _.slice(l.ch).lastIndexOf(o, T - l.ch);
      return R = T == -1 || $ == -1 ? -1 : l.ch + $, T != -1 && R != -1 && R != l.ch ? !1 : (e.operation(function () {
        e.replaceRange("", r(m, y - (g && _.slice(y - g.length, y) == g ? g.length : 0)), r(m, y + S.length));
        var b = j + o.length;
        if (g && A.slice(b, b + g.length) == g && (b += g.length), e.replaceRange("", r(a, j), r(a, b)), q) for (var x = a + 1; x <= m; ++x) {
          var O = e.getLine(x),
            L = O.indexOf(q);
          if (!(L == -1 || s.test(O.slice(0, L)))) {
            var M = L + q.length;
            g && O.slice(M, M + g.length) == g && (M += g.length), e.replaceRange("", r(x, L), r(x, M));
          }
        }
      }), !0);
    });
  });
})();
var B = J.exports;
const K = z.getDefaultExportFromCjs(B),
  Q = H({
    __proto__: null,
    default: K
  }, [B]);
exports.comment = Q;

/***/ }),

/***/ "../../graphiql-react/dist/dialog.cjs.js":
/*!***********************************************!*\
  !*** ../../graphiql-react/dist/dialog.cjs.js ***!
  \***********************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var E = Object.defineProperty;
var g = (v, m) => E(v, "name", {
  value: m,
  configurable: !0
});
const b = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
function O(v, m) {
  for (var n = 0; n < m.length; n++) {
    const r = m[n];
    if (typeof r != "string" && !Array.isArray(r)) {
      for (const c in r) if (c !== "default" && !(c in v)) {
        const u = Object.getOwnPropertyDescriptor(r, c);
        u && Object.defineProperty(v, c, u.get ? u : {
          enumerable: !0,
          get: () => r[c]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(v, Symbol.toStringTag, {
    value: "Module"
  }));
}
g(O, "_mergeNamespaces");
var T = {
  exports: {}
};
(function (v, m) {
  (function (n) {
    n(b.requireCodemirror());
  })(function (n) {
    function r(u, f, e) {
      var a = u.getWrapperElement(),
        l;
      return l = a.appendChild(document.createElement("div")), e ? l.className = "CodeMirror-dialog CodeMirror-dialog-bottom" : l.className = "CodeMirror-dialog CodeMirror-dialog-top", typeof f == "string" ? l.innerHTML = f : l.appendChild(f), n.addClass(a, "dialog-opened"), l;
    }
    g(r, "dialogDiv");
    function c(u, f) {
      u.state.currentNotificationClose && u.state.currentNotificationClose(), u.state.currentNotificationClose = f;
    }
    g(c, "closeNotification"), n.defineExtension("openDialog", function (u, f, e) {
      e || (e = {}), c(this, null);
      var a = r(this, u, e.bottom),
        l = !1,
        s = this;
      function i(t) {
        if (typeof t == "string") o.value = t;else {
          if (l) return;
          l = !0, n.rmClass(a.parentNode, "dialog-opened"), a.parentNode.removeChild(a), s.focus(), e.onClose && e.onClose(a);
        }
      }
      g(i, "close");
      var o = a.getElementsByTagName("input")[0],
        d;
      return o ? (o.focus(), e.value && (o.value = e.value, e.selectValueOnOpen !== !1 && o.select()), e.onInput && n.on(o, "input", function (t) {
        e.onInput(t, o.value, i);
      }), e.onKeyUp && n.on(o, "keyup", function (t) {
        e.onKeyUp(t, o.value, i);
      }), n.on(o, "keydown", function (t) {
        e && e.onKeyDown && e.onKeyDown(t, o.value, i) || ((t.keyCode == 27 || e.closeOnEnter !== !1 && t.keyCode == 13) && (o.blur(), n.e_stop(t), i()), t.keyCode == 13 && f(o.value, t));
      }), e.closeOnBlur !== !1 && n.on(a, "focusout", function (t) {
        t.relatedTarget !== null && i();
      })) : (d = a.getElementsByTagName("button")[0]) && (n.on(d, "click", function () {
        i(), s.focus();
      }), e.closeOnBlur !== !1 && n.on(d, "blur", i), d.focus()), i;
    }), n.defineExtension("openConfirm", function (u, f, e) {
      c(this, null);
      var a = r(this, u, e && e.bottom),
        l = a.getElementsByTagName("button"),
        s = !1,
        i = this,
        o = 1;
      function d() {
        s || (s = !0, n.rmClass(a.parentNode, "dialog-opened"), a.parentNode.removeChild(a), i.focus());
      }
      g(d, "close"), l[0].focus();
      for (var t = 0; t < l.length; ++t) {
        var p = l[t];
        (function (N) {
          n.on(p, "click", function (h) {
            n.e_preventDefault(h), d(), N && N(i);
          });
        })(f[t]), n.on(p, "blur", function () {
          --o, setTimeout(function () {
            o <= 0 && d();
          }, 200);
        }), n.on(p, "focus", function () {
          ++o;
        });
      }
    }), n.defineExtension("openNotification", function (u, f) {
      c(this, i);
      var e = r(this, u, f && f.bottom),
        a = !1,
        l,
        s = f && typeof f.duration < "u" ? f.duration : 5e3;
      function i() {
        a || (a = !0, clearTimeout(l), n.rmClass(e.parentNode, "dialog-opened"), e.parentNode.removeChild(e));
      }
      return g(i, "close"), n.on(e, "click", function (o) {
        n.e_preventDefault(o), i();
      }), s && (l = setTimeout(i, s)), i;
    });
  });
})();
var y = T.exports;
const x = b.getDefaultExportFromCjs(y),
  k = O({
    __proto__: null,
    default: x
  }, [y]);
exports.dialog = k;
exports.dialogExports = y;

/***/ }),

/***/ "../../graphiql-react/dist/foldgutter.cjs.js":
/*!***************************************************!*\
  !*** ../../graphiql-react/dist/foldgutter.cjs.js ***!
  \***************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var z = Object.defineProperty;
var u = (O, k) => z(O, "name", {
  value: k,
  configurable: !0
});
const G = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
function L(O, k) {
  for (var i = 0; i < k.length; i++) {
    const s = k[i];
    if (typeof s != "string" && !Array.isArray(s)) {
      for (const p in s) if (p !== "default" && !(p in O)) {
        const w = Object.getOwnPropertyDescriptor(s, p);
        w && Object.defineProperty(O, p, w.get ? w : {
          enumerable: !0,
          get: () => s[p]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(O, Symbol.toStringTag, {
    value: "Module"
  }));
}
u(L, "_mergeNamespaces");
var j = {
    exports: {}
  },
  U = {
    exports: {}
  },
  N;
function q() {
  return N || (N = 1, function (O, k) {
    (function (i) {
      i(G.requireCodemirror());
    })(function (i) {
      function s(t, o, f, a) {
        if (f && f.call) {
          var g = f;
          f = null;
        } else var g = v(t, f, "rangeFinder");
        typeof o == "number" && (o = i.Pos(o, 0));
        var y = v(t, f, "minFoldSize");
        function x(l) {
          var r = g(t, o);
          if (!r || r.to.line - r.from.line < y) return null;
          if (a === "fold") return r;
          for (var c = t.findMarksAt(r.from), h = 0; h < c.length; ++h) if (c[h].__isFold) {
            if (!l) return null;
            r.cleared = !0, c[h].clear();
          }
          return r;
        }
        u(x, "getRange");
        var d = x(!0);
        if (v(t, f, "scanUp")) for (; !d && o.line > t.firstLine();) o = i.Pos(o.line - 1, 0), d = x(!1);
        if (!(!d || d.cleared || a === "unfold")) {
          var e = p(t, f, d);
          i.on(e, "mousedown", function (l) {
            n.clear(), i.e_preventDefault(l);
          });
          var n = t.markText(d.from, d.to, {
            replacedWith: e,
            clearOnEnter: v(t, f, "clearOnEnter"),
            __isFold: !0
          });
          n.on("clear", function (l, r) {
            i.signal(t, "unfold", t, l, r);
          }), i.signal(t, "fold", t, d.from, d.to);
        }
      }
      u(s, "doFold");
      function p(t, o, f) {
        var a = v(t, o, "widget");
        if (typeof a == "function" && (a = a(f.from, f.to)), typeof a == "string") {
          var g = document.createTextNode(a);
          a = document.createElement("span"), a.appendChild(g), a.className = "CodeMirror-foldmarker";
        } else a && (a = a.cloneNode(!0));
        return a;
      }
      u(p, "makeWidget"), i.newFoldFunction = function (t, o) {
        return function (f, a) {
          s(f, a, {
            rangeFinder: t,
            widget: o
          });
        };
      }, i.defineExtension("foldCode", function (t, o, f) {
        s(this, t, o, f);
      }), i.defineExtension("isFolded", function (t) {
        for (var o = this.findMarksAt(t), f = 0; f < o.length; ++f) if (o[f].__isFold) return !0;
      }), i.commands.toggleFold = function (t) {
        t.foldCode(t.getCursor());
      }, i.commands.fold = function (t) {
        t.foldCode(t.getCursor(), null, "fold");
      }, i.commands.unfold = function (t) {
        t.foldCode(t.getCursor(), {
          scanUp: !1
        }, "unfold");
      }, i.commands.foldAll = function (t) {
        t.operation(function () {
          for (var o = t.firstLine(), f = t.lastLine(); o <= f; o++) t.foldCode(i.Pos(o, 0), {
            scanUp: !1
          }, "fold");
        });
      }, i.commands.unfoldAll = function (t) {
        t.operation(function () {
          for (var o = t.firstLine(), f = t.lastLine(); o <= f; o++) t.foldCode(i.Pos(o, 0), {
            scanUp: !1
          }, "unfold");
        });
      }, i.registerHelper("fold", "combine", function () {
        var t = Array.prototype.slice.call(arguments, 0);
        return function (o, f) {
          for (var a = 0; a < t.length; ++a) {
            var g = t[a](o, f);
            if (g) return g;
          }
        };
      }), i.registerHelper("fold", "auto", function (t, o) {
        for (var f = t.getHelpers(o, "fold"), a = 0; a < f.length; a++) {
          var g = f[a](t, o);
          if (g) return g;
        }
      });
      var w = {
        rangeFinder: i.fold.auto,
        widget: "↔",
        minFoldSize: 0,
        scanUp: !1,
        clearOnEnter: !0
      };
      i.defineOption("foldOptions", null);
      function v(t, o, f) {
        if (o && o[f] !== void 0) return o[f];
        var a = t.options.foldOptions;
        return a && a[f] !== void 0 ? a[f] : w[f];
      }
      u(v, "getOption"), i.defineExtension("foldOption", function (t, o) {
        return v(this, t, o);
      });
    });
  }()), U.exports;
}
u(q, "requireFoldcode");
(function (O, k) {
  (function (i) {
    i(G.requireCodemirror(), q());
  })(function (i) {
    i.defineOption("foldGutter", !1, function (e, n, l) {
      l && l != i.Init && (e.clearGutter(e.state.foldGutter.options.gutter), e.state.foldGutter = null, e.off("gutterClick", g), e.off("changes", y), e.off("viewportChange", x), e.off("fold", d), e.off("unfold", d), e.off("swapDoc", y)), n && (e.state.foldGutter = new p(w(n)), a(e), e.on("gutterClick", g), e.on("changes", y), e.on("viewportChange", x), e.on("fold", d), e.on("unfold", d), e.on("swapDoc", y));
    });
    var s = i.Pos;
    function p(e) {
      this.options = e, this.from = this.to = 0;
    }
    u(p, "State");
    function w(e) {
      return e === !0 && (e = {}), e.gutter == null && (e.gutter = "CodeMirror-foldgutter"), e.indicatorOpen == null && (e.indicatorOpen = "CodeMirror-foldgutter-open"), e.indicatorFolded == null && (e.indicatorFolded = "CodeMirror-foldgutter-folded"), e;
    }
    u(w, "parseOptions");
    function v(e, n) {
      for (var l = e.findMarks(s(n, 0), s(n + 1, 0)), r = 0; r < l.length; ++r) if (l[r].__isFold) {
        var c = l[r].find(-1);
        if (c && c.line === n) return l[r];
      }
    }
    u(v, "isFolded");
    function t(e) {
      if (typeof e == "string") {
        var n = document.createElement("div");
        return n.className = e + " CodeMirror-guttermarker-subtle", n;
      } else return e.cloneNode(!0);
    }
    u(t, "marker");
    function o(e, n, l) {
      var r = e.state.foldGutter.options,
        c = n - 1,
        h = e.foldOption(r, "minFoldSize"),
        E = e.foldOption(r, "rangeFinder"),
        S = typeof r.indicatorFolded == "string" && f(r.indicatorFolded),
        T = typeof r.indicatorOpen == "string" && f(r.indicatorOpen);
      e.eachLine(n, l, function (b) {
        ++c;
        var _ = null,
          F = b.gutterMarkers;
        if (F && (F = F[r.gutter]), v(e, c)) {
          if (S && F && S.test(F.className)) return;
          _ = t(r.indicatorFolded);
        } else {
          var A = s(c, 0),
            m = E && E(e, A);
          if (m && m.to.line - m.from.line >= h) {
            if (T && F && T.test(F.className)) return;
            _ = t(r.indicatorOpen);
          }
        }
        !_ && !F || e.setGutterMarker(b, r.gutter, _);
      });
    }
    u(o, "updateFoldInfo");
    function f(e) {
      return new RegExp("(^|\\s)" + e + "(?:$|\\s)\\s*");
    }
    u(f, "classTest");
    function a(e) {
      var n = e.getViewport(),
        l = e.state.foldGutter;
      l && (e.operation(function () {
        o(e, n.from, n.to);
      }), l.from = n.from, l.to = n.to);
    }
    u(a, "updateInViewport");
    function g(e, n, l) {
      var r = e.state.foldGutter;
      if (r) {
        var c = r.options;
        if (l == c.gutter) {
          var h = v(e, n);
          h ? h.clear() : e.foldCode(s(n, 0), c);
        }
      }
    }
    u(g, "onGutterClick");
    function y(e) {
      var n = e.state.foldGutter;
      if (n) {
        var l = n.options;
        n.from = n.to = 0, clearTimeout(n.changeUpdate), n.changeUpdate = setTimeout(function () {
          a(e);
        }, l.foldOnChangeTimeSpan || 600);
      }
    }
    u(y, "onChange");
    function x(e) {
      var n = e.state.foldGutter;
      if (n) {
        var l = n.options;
        clearTimeout(n.changeUpdate), n.changeUpdate = setTimeout(function () {
          var r = e.getViewport();
          n.from == n.to || r.from - n.to > 20 || n.from - r.to > 20 ? a(e) : e.operation(function () {
            r.from < n.from && (o(e, r.from, n.from), n.from = r.from), r.to > n.to && (o(e, n.to, r.to), n.to = r.to);
          });
        }, l.updateViewportTimeSpan || 400);
      }
    }
    u(x, "onViewportChange");
    function d(e, n) {
      var l = e.state.foldGutter;
      if (l) {
        var r = n.line;
        r >= l.from && r < l.to && o(e, r, r + 1);
      }
    }
    u(d, "onFold");
  });
})();
var P = j.exports;
const C = G.getDefaultExportFromCjs(P),
  D = L({
    __proto__: null,
    default: C
  }, [P]);
exports.foldgutter = D;

/***/ }),

/***/ "../../graphiql-react/dist/forEachState.cjs.js":
/*!*****************************************************!*\
  !*** ../../graphiql-react/dist/forEachState.cjs.js ***!
  \*****************************************************/
/***/ (function(__unused_webpack_module, exports) {



var c = Object.defineProperty;
var r = (e, a) => c(e, "name", {
  value: a,
  configurable: !0
});
function l(e, a) {
  const i = [];
  let t = e;
  for (; t != null && t.kind;) i.push(t), t = t.prevState;
  for (let o = i.length - 1; o >= 0; o--) a(i[o]);
}
r(l, "forEachState");
exports.forEachState = l;

/***/ }),

/***/ "../../graphiql-react/dist/hint.cjs.js":
/*!*********************************************!*\
  !*** ../../graphiql-react/dist/hint.cjs.js ***!
  \*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {



const s = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js");
__webpack_require__(/*! ./show-hint.cjs.js */ "../../graphiql-react/dist/show-hint.cjs.js");
const c = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js");
__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
s.CodeMirror.registerHelper("hint", "graphql", (r, a) => {
  const {
    schema: i,
    externalFragments: u
  } = a;
  if (!i) return;
  const n = r.getCursor(),
    t = r.getTokenAt(n),
    l = t.type !== null && /"|\w/.test(t.string[0]) ? t.start : t.end,
    g = new c.Position(n.line, l),
    e = {
      list: c.getAutocompleteSuggestions(i, r.getValue(), g, t, u).map(o => ({
        text: o.label,
        type: o.type,
        description: o.documentation,
        isDeprecated: o.isDeprecated,
        deprecationReason: o.deprecationReason
      })),
      from: {
        line: n.line,
        ch: l
      },
      to: {
        line: n.line,
        ch: t.end
      }
    };
  return e != null && e.list && e.list.length > 0 && (e.from = s.CodeMirror.Pos(e.from.line, e.from.ch), e.to = s.CodeMirror.Pos(e.to.line, e.to.ch), s.CodeMirror.signal(r, "hasCompletion", r, e, t)), e;
});

/***/ }),

/***/ "../../graphiql-react/dist/hint.cjs2.js":
/*!**********************************************!*\
  !*** ../../graphiql-react/dist/hint.cjs2.js ***!
  \**********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {



var g = Object.defineProperty;
var p = (i, n) => g(i, "name", {
  value: n,
  configurable: !0
});
const d = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"),
  a = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"),
  b = __webpack_require__(/*! ./forEachState.cjs.js */ "../../graphiql-react/dist/forEachState.cjs.js");
__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
function f(i, n, t) {
  const r = x(t, m(n.string));
  if (!r) return;
  const e = n.type !== null && /"|\w/.test(n.string[0]) ? n.start : n.end;
  return {
    list: r,
    from: {
      line: i.line,
      ch: e
    },
    to: {
      line: i.line,
      ch: n.end
    }
  };
}
p(f, "hintList");
function x(i, n) {
  if (!n) return y(i, o => !o.isDeprecated);
  const t = i.map(o => ({
    proximity: L(m(o.text), n),
    entry: o
  }));
  return y(y(t, o => o.proximity <= 2), o => !o.entry.isDeprecated).sort((o, l) => (o.entry.isDeprecated ? 1 : 0) - (l.entry.isDeprecated ? 1 : 0) || o.proximity - l.proximity || o.entry.text.length - l.entry.text.length).map(o => o.entry);
}
p(x, "filterAndSortList");
function y(i, n) {
  const t = i.filter(n);
  return t.length === 0 ? i : t;
}
p(y, "filterNonEmpty");
function m(i) {
  return i.toLowerCase().replaceAll(/\W/g, "");
}
p(m, "normalizeText");
function L(i, n) {
  let t = T(n, i);
  return i.length > n.length && (t -= i.length - n.length - 1, t += i.indexOf(n) === 0 ? 0 : .5), t;
}
p(L, "getProximity");
function T(i, n) {
  let t, r;
  const e = [],
    o = i.length,
    l = n.length;
  for (t = 0; t <= o; t++) e[t] = [t];
  for (r = 1; r <= l; r++) e[0][r] = r;
  for (t = 1; t <= o; t++) for (r = 1; r <= l; r++) {
    const u = i[t - 1] === n[r - 1] ? 0 : 1;
    e[t][r] = Math.min(e[t - 1][r] + 1, e[t][r - 1] + 1, e[t - 1][r - 1] + u), t > 1 && r > 1 && i[t - 1] === n[r - 2] && i[t - 2] === n[r - 1] && (e[t][r] = Math.min(e[t][r], e[t - 2][r - 2] + u));
  }
  return e[o][l];
}
p(T, "lexicalDistance");
d.CodeMirror.registerHelper("hint", "graphql-variables", (i, n) => {
  const t = i.getCursor(),
    r = i.getTokenAt(t),
    e = V(t, r, n);
  return e != null && e.list && e.list.length > 0 && (e.from = d.CodeMirror.Pos(e.from.line, e.from.ch), e.to = d.CodeMirror.Pos(e.to.line, e.to.ch), d.CodeMirror.signal(i, "hasCompletion", i, e, r)), e;
});
function V(i, n, t) {
  const r = n.state.kind === "Invalid" ? n.state.prevState : n.state,
    {
      kind: e,
      step: o
    } = r;
  if (e === "Document" && o === 0) return f(i, n, [{
    text: "{"
  }]);
  const {
    variableToType: l
  } = t;
  if (!l) return;
  const u = j(l, n.state);
  if (e === "Document" || e === "Variable" && o === 0) {
    const c = Object.keys(l);
    return f(i, n, c.map(s => ({
      text: `"${s}": `,
      type: l[s]
    })));
  }
  if ((e === "ObjectValue" || e === "ObjectField" && o === 0) && u.fields) {
    const c = Object.keys(u.fields).map(s => u.fields[s]);
    return f(i, n, c.map(s => ({
      text: `"${s.name}": `,
      type: s.type,
      description: s.description
    })));
  }
  if (e === "StringValue" || e === "NumberValue" || e === "BooleanValue" || e === "NullValue" || e === "ListValue" && o === 1 || e === "ObjectField" && o === 2 || e === "Variable" && o === 2) {
    const c = u.type ? a.getNamedType(u.type) : void 0;
    if (c instanceof a.GraphQLInputObjectType) return f(i, n, [{
      text: "{"
    }]);
    if (c instanceof a.GraphQLEnumType) {
      const s = c.getValues();
      return f(i, n, s.map(h => ({
        text: `"${h.name}"`,
        type: c,
        description: h.description
      })));
    }
    if (c === a.GraphQLBoolean) return f(i, n, [{
      text: "true",
      type: a.GraphQLBoolean,
      description: "Not false."
    }, {
      text: "false",
      type: a.GraphQLBoolean,
      description: "Not true."
    }]);
  }
}
p(V, "getVariablesHint");
function j(i, n) {
  const t = {
    type: null,
    fields: null
  };
  return b.forEachState(n, r => {
    switch (r.kind) {
      case "Variable":
        {
          t.type = i[r.name];
          break;
        }
      case "ListValue":
        {
          const e = t.type ? a.getNullableType(t.type) : void 0;
          t.type = e instanceof a.GraphQLList ? e.ofType : null;
          break;
        }
      case "ObjectValue":
        {
          const e = t.type ? a.getNamedType(t.type) : void 0;
          t.fields = e instanceof a.GraphQLInputObjectType ? e.getFields() : null;
          break;
        }
      case "ObjectField":
        {
          const e = r.name && t.fields ? t.fields[r.name] : null;
          t.type = e == null ? void 0 : e.type;
          break;
        }
    }
  }), t;
}
p(j, "getTypeInfo");

/***/ }),

/***/ "../../graphiql-react/dist/index.js":
/*!******************************************!*\
  !*** ../../graphiql-react/dist/index.js ***!
  \******************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var Tn = Object.defineProperty;
var a = (e, t) => Tn(e, "name", {
  value: t,
  configurable: !0
});
Object.defineProperty(exports, Symbol.toStringTag, {
  value: "Module"
});
const r = __webpack_require__(/*! react/jsx-runtime */ "../../../node_modules/react/jsx-runtime.js"),
  l = __webpack_require__(/*! react */ "react"),
  _ = __webpack_require__(/*! clsx */ "../../../node_modules/clsx/dist/clsx.m.js"),
  M = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"),
  B = __webpack_require__(/*! @graphiql/toolkit */ "../../graphiql-toolkit/esm/index.js"),
  kt = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"),
  Mn = __webpack_require__(/*! set-value */ "../../../node_modules/set-value/index.js"),
  Rn = __webpack_require__(/*! copy-to-clipboard */ "../../../node_modules/copy-to-clipboard/index.js"),
  Pn = __webpack_require__(/*! @radix-ui/react-dialog */ "../../../node_modules/@radix-ui/react-dialog/dist/index.js"),
  qn = __webpack_require__(/*! @radix-ui/react-visually-hidden */ "../../../node_modules/@radix-ui/react-visually-hidden/dist/index.js"),
  xe = __webpack_require__(/*! @radix-ui/react-dropdown-menu */ "../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js"),
  Vn = __webpack_require__(/*! markdown-it */ "../node_modules/markdown-it/dist/index.cjs.js"),
  Nt = __webpack_require__(/*! framer-motion */ "../../../node_modules/framer-motion/dist/cjs/index.js"),
  In = __webpack_require__(/*! @radix-ui/react-tooltip */ "../../../node_modules/@radix-ui/react-tooltip/dist/index.js"),
  ae = __webpack_require__(/*! @headlessui/react */ "../../../node_modules/@headlessui/react/dist/index.cjs"),
  yt = __webpack_require__(/*! react-dom */ "react-dom");
function nt(e) {
  const t = Object.create(null, {
    [Symbol.toStringTag]: {
      value: "Module"
    }
  });
  if (e) {
    for (const n in e) if (n !== "default") {
      const s = Object.getOwnPropertyDescriptor(e, n);
      Object.defineProperty(t, n, s.get ? s : {
        enumerable: !0,
        get: () => e[n]
      });
    }
  }
  return t.default = e, Object.freeze(t);
}
a(nt, "_interopNamespaceDefault");
const u = nt(l),
  re = nt(Pn),
  pe = nt(In);
function le(e) {
  const t = l.createContext(null);
  return t.displayName = e, t;
}
a(le, "createNullableContext");
function ie(e) {
  function t(n) {
    var o;
    const s = l.useContext(e);
    if (s === null && n != null && n.nonNull) throw new Error(`Tried to use \`${((o = n.caller) == null ? void 0 : o.name) || t.caller.name}\` without the necessary context. Make sure to render the \`${e.displayName}Provider\` component higher up the tree.`);
    return s;
  }
  return a(t, "useGivenContext"), Object.defineProperty(t, "name", {
    value: `use${e.displayName}`
  }), t;
}
a(ie, "createContextHook");
const rt = le("StorageContext");
function Tt(e) {
  const t = l.useRef(!0),
    [n, s] = l.useState(new B.StorageAPI(e.storage));
  return l.useEffect(() => {
    t.current ? t.current = !1 : s(new B.StorageAPI(e.storage));
  }, [e.storage]), r.jsx(rt.Provider, {
    value: n,
    children: e.children
  });
}
a(Tt, "StorageContextProvider");
const se = ie(rt),
  Hn = a(_ref => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 14 14",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",
      stroke: "currentColor",
      strokeWidth: 1.2
    }), u.createElement("rect", {
      x: 6,
      y: 6,
      width: 2,
      height: 2,
      rx: 1,
      fill: "currentColor"
    }));
  }, "SvgArgument"),
  Dn = a(_ref2 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref2;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 14 9",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M1 1L7 7L13 1",
      stroke: "currentColor",
      strokeWidth: 1.5
    }));
  }, "SvgChevronDown"),
  An = a(_ref3 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref3;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 7 10",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M6 1.04819L2 5.04819L6 9.04819",
      stroke: "currentColor",
      strokeWidth: 1.75
    }));
  }, "SvgChevronLeft"),
  On = a(_ref4 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref4;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 14 9",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M13 8L7 2L1 8",
      stroke: "currentColor",
      strokeWidth: 1.5
    }));
  }, "SvgChevronUp"),
  Fn = a(_ref5 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref5;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 14 14",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M1 1L12.9998 12.9997",
      stroke: "currentColor",
      strokeWidth: 1.5
    }), u.createElement("path", {
      d: "M13 1L1.00079 13.0003",
      stroke: "currentColor",
      strokeWidth: 1.5
    }));
  }, "SvgClose"),
  Bn = a(_ref6 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref6;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "-2 -2 22 22",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M11.25 14.2105V15.235C11.25 16.3479 10.3479 17.25 9.23501 17.25H2.76499C1.65214 17.25 0.75 16.3479 0.75 15.235L0.75 8.76499C0.75 7.65214 1.65214 6.75 2.76499 6.75L3.78947 6.75",
      stroke: "currentColor",
      strokeWidth: 1.5
    }), u.createElement("rect", {
      x: 6.75,
      y: .75,
      width: 10.5,
      height: 10.5,
      rx: 2.2069,
      stroke: "currentColor",
      strokeWidth: 1.5
    }));
  }, "SvgCopy"),
  Wn = a(_ref7 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref7;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 14 14",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",
      stroke: "currentColor",
      strokeWidth: 1.2
    }), u.createElement("path", {
      d: "M5 9L9 5",
      stroke: "currentColor",
      strokeWidth: 1.2
    }), u.createElement("path", {
      d: "M5 5L9 9",
      stroke: "currentColor",
      strokeWidth: 1.2
    }));
  }, "SvgDeprecatedArgument"),
  _n = a(_ref8 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref8;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 12 12",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M4 8L8 4",
      stroke: "currentColor",
      strokeWidth: 1.2
    }), u.createElement("path", {
      d: "M4 4L8 8",
      stroke: "currentColor",
      strokeWidth: 1.2
    }), u.createElement("path", {
      fillRule: "evenodd",
      clipRule: "evenodd",
      d: "M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",
      fill: "currentColor"
    }));
  }, "SvgDeprecatedEnumValue"),
  Zn = a(_ref9 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref9;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 12 12",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("rect", {
      x: .6,
      y: .6,
      width: 10.8,
      height: 10.8,
      rx: 3.4,
      stroke: "currentColor",
      strokeWidth: 1.2
    }), u.createElement("path", {
      d: "M4 8L8 4",
      stroke: "currentColor",
      strokeWidth: 1.2
    }), u.createElement("path", {
      d: "M4 4L8 8",
      stroke: "currentColor",
      strokeWidth: 1.2
    }));
  }, "SvgDeprecatedField"),
  $n = a(_ref10 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref10;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0.5 12 12",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("rect", {
      x: 7,
      y: 5.5,
      width: 2,
      height: 2,
      rx: 1,
      transform: "rotate(90 7 5.5)",
      fill: "currentColor"
    }), u.createElement("path", {
      fillRule: "evenodd",
      clipRule: "evenodd",
      d: "M10.8 9L10.8 9.5C10.8 10.4941 9.99411 11.3 9 11.3L3 11.3C2.00589 11.3 1.2 10.4941 1.2 9.5L1.2 9L-3.71547e-07 9L-3.93402e-07 9.5C-4.65826e-07 11.1569 1.34314 12.5 3 12.5L9 12.5C10.6569 12.5 12 11.1569 12 9.5L12 9L10.8 9ZM10.8 4L12 4L12 3.5C12 1.84315 10.6569 0.5 9 0.5L3 0.5C1.34315 0.5 -5.87117e-08 1.84315 -1.31135e-07 3.5L-1.5299e-07 4L1.2 4L1.2 3.5C1.2 2.50589 2.00589 1.7 3 1.7L9 1.7C9.99411 1.7 10.8 2.50589 10.8 3.5L10.8 4Z",
      fill: "currentColor"
    }));
  }, "SvgDirective"),
  Gn = a(_ref11 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref11;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 20 24",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H17.25C17.8023 0.75 18.25 1.19772 18.25 1.75V5.25",
      stroke: "currentColor",
      strokeWidth: 1.5
    }), u.createElement("path", {
      d: "M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H18.25C18.8023 5.25 19.25 5.69771 19.25 6.25V22.25C19.25 22.8023 18.8023 23.25 18.25 23.25H3C1.75736 23.25 0.75 22.2426 0.75 21V3Z",
      stroke: "currentColor",
      strokeWidth: 1.5
    }), u.createElement("path", {
      fillRule: "evenodd",
      clipRule: "evenodd",
      d: "M3 5.25C1.75736 5.25 0.75 4.24264 0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H3ZM13 11L6 11V12.5L13 12.5V11Z",
      fill: "currentColor"
    }));
  }, "SvgDocsFilled"),
  Qn = a(_ref12 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref12;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 20 24",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H17.25M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H16.25C16.8023 0.75 17.25 1.19772 17.25 1.75V5.25M0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H17.25",
      stroke: "currentColor",
      strokeWidth: 1.5
    }), u.createElement("line", {
      x1: 13,
      y1: 11.75,
      x2: 6,
      y2: 11.75,
      stroke: "currentColor",
      strokeWidth: 1.5
    }));
  }, "SvgDocs"),
  zn = a(_ref13 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref13;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 12 12",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("rect", {
      x: 5,
      y: 5,
      width: 2,
      height: 2,
      rx: 1,
      fill: "currentColor"
    }), u.createElement("path", {
      fillRule: "evenodd",
      clipRule: "evenodd",
      d: "M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",
      fill: "currentColor"
    }));
  }, "SvgEnumValue"),
  Un = a(_ref14 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref14;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 12 13",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("rect", {
      x: .6,
      y: 1.1,
      width: 10.8,
      height: 10.8,
      rx: 2.4,
      stroke: "currentColor",
      strokeWidth: 1.2
    }), u.createElement("rect", {
      x: 5,
      y: 5.5,
      width: 2,
      height: 2,
      rx: 1,
      fill: "currentColor"
    }));
  }, "SvgField"),
  Kn = a(_ref15 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref15;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 24 20",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M1.59375 9.52344L4.87259 12.9944L8.07872 9.41249",
      stroke: "currentColor",
      strokeWidth: 1.5,
      strokeLinecap: "square"
    }), u.createElement("path", {
      d: "M13.75 5.25V10.75H18.75",
      stroke: "currentColor",
      strokeWidth: 1.5,
      strokeLinecap: "square"
    }), u.createElement("path", {
      d: "M4.95427 11.9332C4.55457 10.0629 4.74441 8.11477 5.49765 6.35686C6.25089 4.59894 7.5305 3.11772 9.16034 2.11709C10.7902 1.11647 12.6901 0.645626 14.5986 0.769388C16.5071 0.893151 18.3303 1.60543 19.8172 2.80818C21.3042 4.01093 22.3818 5.64501 22.9017 7.48548C23.4216 9.32595 23.3582 11.2823 22.7203 13.0853C22.0824 14.8883 20.9013 16.4492 19.3396 17.5532C17.778 18.6572 15.9125 19.25 14 19.25",
      stroke: "currentColor",
      strokeWidth: 1.5
    }));
  }, "SvgHistory"),
  Jn = a(_ref16 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref16;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 12 12",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("circle", {
      cx: 6,
      cy: 6,
      r: 5.4,
      stroke: "currentColor",
      strokeWidth: 1.2,
      strokeDasharray: "4.241025 4.241025",
      transform: "rotate(22.5)",
      "transform-origin": "center"
    }), u.createElement("circle", {
      cx: 6,
      cy: 6,
      r: 1,
      fill: "currentColor"
    }));
  }, "SvgImplements"),
  Yn = a(_ref17 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref17;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 19 18",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M1.5 14.5653C1.5 15.211 1.75652 15.8303 2.21314 16.2869C2.66975 16.7435 3.28905 17 3.9348 17C4.58054 17 5.19984 16.7435 5.65646 16.2869C6.11307 15.8303 6.36959 15.211 6.36959 14.5653V12.1305H3.9348C3.28905 12.1305 2.66975 12.387 2.21314 12.8437C1.75652 13.3003 1.5 13.9195 1.5 14.5653Z",
      stroke: "currentColor",
      strokeWidth: 1.125,
      strokeLinecap: "round",
      strokeLinejoin: "round"
    }), u.createElement("path", {
      d: "M3.9348 1.00063C3.28905 1.00063 2.66975 1.25715 2.21314 1.71375C1.75652 2.17035 1.5 2.78964 1.5 3.43537C1.5 4.0811 1.75652 4.70038 2.21314 5.15698C2.66975 5.61358 3.28905 5.8701 3.9348 5.8701H6.36959V3.43537C6.36959 2.78964 6.11307 2.17035 5.65646 1.71375C5.19984 1.25715 4.58054 1.00063 3.9348 1.00063Z",
      stroke: "currentColor",
      strokeWidth: 1.125,
      strokeLinecap: "round",
      strokeLinejoin: "round"
    }), u.createElement("path", {
      d: "M15.0652 12.1305H12.6304V14.5653C12.6304 15.0468 12.7732 15.5175 13.0407 15.9179C13.3083 16.3183 13.6885 16.6304 14.1334 16.8147C14.5783 16.9989 15.0679 17.0472 15.5402 16.9532C16.0125 16.8593 16.4464 16.6274 16.7869 16.2869C17.1274 15.9464 17.3593 15.5126 17.4532 15.0403C17.5472 14.568 17.4989 14.0784 17.3147 13.6335C17.1304 13.1886 16.8183 12.8084 16.4179 12.5409C16.0175 12.2733 15.5468 12.1305 15.0652 12.1305Z",
      stroke: "currentColor",
      strokeWidth: 1.125,
      strokeLinecap: "round",
      strokeLinejoin: "round"
    }), u.createElement("path", {
      d: "M12.6318 5.86775H6.36955V12.1285H12.6318V5.86775Z",
      stroke: "currentColor",
      strokeWidth: 1.125,
      strokeLinecap: "round",
      strokeLinejoin: "round"
    }), u.createElement("path", {
      d: "M17.5 3.43473C17.5 2.789 17.2435 2.16972 16.7869 1.71312C16.3303 1.25652 15.711 1 15.0652 1C14.4195 1 13.8002 1.25652 13.3435 1.71312C12.8869 2.16972 12.6304 2.789 12.6304 3.43473V5.86946H15.0652C15.711 5.86946 16.3303 5.61295 16.7869 5.15635C17.2435 4.69975 17.5 4.08046 17.5 3.43473Z",
      stroke: "currentColor",
      strokeWidth: 1.125,
      strokeLinecap: "round",
      strokeLinejoin: "round"
    }));
  }, "SvgKeyboardShortcut"),
  Xn = a(_ref18 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref18;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 13 13",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("circle", {
      cx: 5,
      cy: 5,
      r: 4.35,
      stroke: "currentColor",
      strokeWidth: 1.3
    }), u.createElement("line", {
      x1: 8.45962,
      y1: 8.54038,
      x2: 11.7525,
      y2: 11.8333,
      stroke: "currentColor",
      strokeWidth: 1.3
    }));
  }, "SvgMagnifyingGlass"),
  er = a(_ref19 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref19;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "-2 -2 22 22",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M17.2492 6V2.9569C17.2492 1.73806 16.2611 0.75 15.0423 0.75L2.9569 0.75C1.73806 0.75 0.75 1.73806 0.75 2.9569L0.75 6",
      stroke: "currentColor",
      strokeWidth: 1.5
    }), u.createElement("path", {
      d: "M0.749873 12V15.0431C0.749873 16.2619 1.73794 17.25 2.95677 17.25H15.0421C16.261 17.25 17.249 16.2619 17.249 15.0431V12",
      stroke: "currentColor",
      strokeWidth: 1.5
    }), u.createElement("path", {
      d: "M6 4.5L9 7.5L12 4.5",
      stroke: "currentColor",
      strokeWidth: 1.5
    }), u.createElement("path", {
      d: "M12 13.5L9 10.5L6 13.5",
      stroke: "currentColor",
      strokeWidth: 1.5
    }));
  }, "SvgMerge"),
  tr = a(_ref20 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref20;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 14 14",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M0.75 13.25L0.0554307 12.967C-0.0593528 13.2488 0.00743073 13.5719 0.224488 13.7851C0.441545 13.9983 0.765869 14.0592 1.04549 13.9393L0.75 13.25ZM12.8214 1.83253L12.2911 2.36286L12.2911 2.36286L12.8214 1.83253ZM12.8214 3.90194L13.3517 4.43227L12.8214 3.90194ZM10.0981 1.17859L9.56773 0.648259L10.0981 1.17859ZM12.1675 1.17859L12.6978 0.648258L12.6978 0.648257L12.1675 1.17859ZM2.58049 8.75697L3.27506 9.03994L2.58049 8.75697ZM2.70066 8.57599L3.23099 9.10632L2.70066 8.57599ZM5.2479 11.4195L4.95355 10.7297L5.2479 11.4195ZM5.42036 11.303L4.89003 10.7727L5.42036 11.303ZM4.95355 10.7297C4.08882 11.0987 3.41842 11.362 2.73535 11.6308C2.05146 11.9 1.35588 12.1743 0.454511 12.5607L1.04549 13.9393C1.92476 13.5624 2.60256 13.2951 3.28469 13.0266C3.96762 12.7578 4.65585 12.4876 5.54225 12.1093L4.95355 10.7297ZM1.44457 13.533L3.27506 9.03994L1.88592 8.474L0.0554307 12.967L1.44457 13.533ZM3.23099 9.10632L10.6284 1.70892L9.56773 0.648259L2.17033 8.04566L3.23099 9.10632ZM11.6371 1.70892L12.2911 2.36286L13.3517 1.3022L12.6978 0.648258L11.6371 1.70892ZM12.2911 3.37161L4.89003 10.7727L5.95069 11.8333L13.3517 4.43227L12.2911 3.37161ZM12.2911 2.36286C12.5696 2.64142 12.5696 3.09305 12.2911 3.37161L13.3517 4.43227C14.2161 3.56792 14.2161 2.16654 13.3517 1.3022L12.2911 2.36286ZM10.6284 1.70892C10.9069 1.43036 11.3586 1.43036 11.6371 1.70892L12.6978 0.648257C11.8335 -0.216088 10.4321 -0.216084 9.56773 0.648259L10.6284 1.70892ZM3.27506 9.03994C3.26494 9.06479 3.24996 9.08735 3.23099 9.10632L2.17033 8.04566C2.04793 8.16806 1.95123 8.31369 1.88592 8.474L3.27506 9.03994ZM5.54225 12.1093C5.69431 12.0444 5.83339 11.9506 5.95069 11.8333L4.89003 10.7727C4.90863 10.7541 4.92988 10.7398 4.95355 10.7297L5.54225 12.1093Z",
      fill: "currentColor"
    }), u.createElement("path", {
      d: "M11.5 4.5L9.5 2.5",
      stroke: "currentColor",
      strokeWidth: 1.4026,
      strokeLinecap: "round",
      strokeLinejoin: "round"
    }), u.createElement("path", {
      d: "M5.5 10.5L3.5 8.5",
      stroke: "currentColor",
      strokeWidth: 1.4026,
      strokeLinecap: "round",
      strokeLinejoin: "round"
    }));
  }, "SvgPen"),
  nr = a(_ref21 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref21;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 16 18",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M1.32226e-07 1.6609C7.22332e-08 0.907329 0.801887 0.424528 1.46789 0.777117L15.3306 8.11621C16.0401 8.49182 16.0401 9.50818 15.3306 9.88379L1.46789 17.2229C0.801886 17.5755 1.36076e-06 17.0927 1.30077e-06 16.3391L1.32226e-07 1.6609Z",
      fill: "currentColor"
    }));
  }, "SvgPlay"),
  rr = a(_ref22 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref22;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 10 16",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      fillRule: "evenodd",
      clipRule: "evenodd",
      d: "M4.25 9.25V13.5H5.75V9.25L10 9.25V7.75L5.75 7.75V3.5H4.25V7.75L0 7.75V9.25L4.25 9.25Z",
      fill: "currentColor"
    }));
  }, "SvgPlus"),
  sr = a(_ref23 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref23;
    return u.createElement("svg", {
      width: 25,
      height: 25,
      viewBox: "0 0 25 25",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M10.2852 24.0745L13.7139 18.0742",
      stroke: "currentColor",
      strokeWidth: 1.5625
    }), u.createElement("path", {
      d: "M14.5742 24.0749L17.1457 19.7891",
      stroke: "currentColor",
      strokeWidth: 1.5625
    }), u.createElement("path", {
      d: "M19.4868 24.0735L20.7229 21.7523C21.3259 20.6143 21.5457 19.3122 21.3496 18.0394C21.1535 16.7666 20.5519 15.591 19.6342 14.6874L23.7984 6.87853C24.0123 6.47728 24.0581 6.00748 23.9256 5.57249C23.7932 5.1375 23.4933 4.77294 23.0921 4.55901C22.6908 4.34509 22.221 4.29932 21.7861 4.43178C21.3511 4.56424 20.9865 4.86408 20.7726 5.26533L16.6084 13.0742C15.3474 12.8142 14.0362 12.9683 12.8699 13.5135C11.7035 14.0586 10.7443 14.9658 10.135 16.1L6 24.0735",
      stroke: "currentColor",
      strokeWidth: 1.5625
    }), u.createElement("path", {
      d: "M4 15L5 13L7 12L5 11L4 9L3 11L1 12L3 13L4 15Z",
      stroke: "currentColor",
      strokeWidth: 1.5625,
      strokeLinejoin: "round"
    }), u.createElement("path", {
      d: "M11.5 8L12.6662 5.6662L15 4.5L12.6662 3.3338L11.5 1L10.3338 3.3338L8 4.5L10.3338 5.6662L11.5 8Z",
      stroke: "currentColor",
      strokeWidth: 1.5625,
      strokeLinejoin: "round"
    }));
  }, "SvgPrettify"),
  or = a(_ref24 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref24;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 16 16",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M4.75 9.25H1.25V12.75",
      stroke: "currentColor",
      strokeWidth: 1,
      strokeLinecap: "square"
    }), u.createElement("path", {
      d: "M11.25 6.75H14.75V3.25",
      stroke: "currentColor",
      strokeWidth: 1,
      strokeLinecap: "square"
    }), u.createElement("path", {
      d: "M14.1036 6.65539C13.8 5.27698 13.0387 4.04193 11.9437 3.15131C10.8487 2.26069 9.48447 1.76694 8.0731 1.75043C6.66173 1.73392 5.28633 2.19563 4.17079 3.0604C3.05526 3.92516 2.26529 5.14206 1.92947 6.513",
      stroke: "currentColor",
      strokeWidth: 1
    }), u.createElement("path", {
      d: "M1.89635 9.34461C2.20001 10.723 2.96131 11.9581 4.05631 12.8487C5.15131 13.7393 6.51553 14.2331 7.9269 14.2496C9.33827 14.2661 10.7137 13.8044 11.8292 12.9396C12.9447 12.0748 13.7347 10.8579 14.0705 9.487",
      stroke: "currentColor",
      strokeWidth: 1
    }));
  }, "SvgReload"),
  lr = a(_ref25 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref25;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 13 13",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("rect", {
      x: .6,
      y: .6,
      width: 11.8,
      height: 11.8,
      rx: 5.9,
      stroke: "currentColor",
      strokeWidth: 1.2
    }), u.createElement("path", {
      d: "M4.25 7.5C4.25 6 5.75 5 6.5 6.5C7.25 8 8.75 7 8.75 5.5",
      stroke: "currentColor",
      strokeWidth: 1.2
    }));
  }, "SvgRootType"),
  ir = a(_ref26 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref26;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 21 20",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      fillRule: "evenodd",
      clipRule: "evenodd",
      d: "M9.29186 1.92702C9.06924 1.82745 8.87014 1.68202 8.70757 1.50024L7.86631 0.574931C7.62496 0.309957 7.30773 0.12592 6.95791 0.0479385C6.60809 -0.0300431 6.24274 0.00182978 5.91171 0.139208C5.58068 0.276585 5.3001 0.512774 5.10828 0.815537C4.91645 1.1183 4.82272 1.47288 4.83989 1.83089L4.90388 3.08019C4.91612 3.32348 4.87721 3.56662 4.78968 3.79394C4.70215 4.02126 4.56794 4.2277 4.39571 4.39994C4.22347 4.57219 4.01704 4.7064 3.78974 4.79394C3.56243 4.88147 3.3193 4.92038 3.07603 4.90814L1.8308 4.84414C1.47162 4.82563 1.11553 4.91881 0.811445 5.11086C0.507359 5.30292 0.270203 5.58443 0.132561 5.91671C-0.00508149 6.249 -0.0364554 6.61576 0.0427496 6.9666C0.121955 7.31744 0.307852 7.63514 0.5749 7.87606L1.50016 8.71204C1.68193 8.87461 1.82735 9.07373 1.92692 9.29636C2.02648 9.51898 2.07794 9.76012 2.07794 10.004C2.07794 10.2479 2.02648 10.489 1.92692 10.7116C1.82735 10.9343 1.68193 11.1334 1.50016 11.296L0.5749 12.1319C0.309856 12.3729 0.125575 12.6898 0.0471809 13.0393C-0.0312128 13.3888 9.64098e-05 13.754 0.13684 14.0851C0.273583 14.4162 0.509106 14.6971 0.811296 14.8894C1.11349 15.0817 1.46764 15.1762 1.82546 15.1599L3.0707 15.0959C3.31397 15.0836 3.5571 15.1225 3.7844 15.2101C4.01171 15.2976 4.21814 15.4318 4.39037 15.6041C4.56261 15.7763 4.69682 15.9827 4.78435 16.2101C4.87188 16.4374 4.91078 16.6805 4.89855 16.9238L4.83455 18.1691C4.81605 18.5283 4.90921 18.8844 5.10126 19.1885C5.2933 19.4926 5.5748 19.7298 5.90707 19.8674C6.23934 20.0051 6.60608 20.0365 6.9569 19.9572C7.30772 19.878 7.6254 19.6921 7.86631 19.4251L8.7129 18.4998C8.87547 18.318 9.07458 18.1725 9.29719 18.073C9.51981 17.9734 9.76093 17.9219 10.0048 17.9219C10.2487 17.9219 10.4898 17.9734 10.7124 18.073C10.935 18.1725 11.1341 18.318 11.2967 18.4998L12.1326 19.4251C12.3735 19.6921 12.6912 19.878 13.042 19.9572C13.3929 20.0365 13.7596 20.0051 14.0919 19.8674C14.4241 19.7298 14.7056 19.4926 14.8977 19.1885C15.0897 18.8844 15.1829 18.5283 15.1644 18.1691L15.1004 16.9238C15.0882 16.6805 15.1271 16.4374 15.2146 16.2101C15.3021 15.9827 15.4363 15.7763 15.6086 15.6041C15.7808 15.4318 15.9872 15.2976 16.2145 15.2101C16.4418 15.1225 16.685 15.0836 16.9282 15.0959L18.1735 15.1599C18.5326 15.1784 18.8887 15.0852 19.1928 14.8931C19.4969 14.7011 19.7341 14.4196 19.8717 14.0873C20.0093 13.755 20.0407 13.3882 19.9615 13.0374C19.8823 12.6866 19.6964 12.3689 19.4294 12.1279L18.5041 11.292C18.3223 11.1294 18.1769 10.9303 18.0774 10.7076C17.9778 10.485 17.9263 10.2439 17.9263 10C17.9263 9.75612 17.9778 9.51499 18.0774 9.29236C18.1769 9.06973 18.3223 8.87062 18.5041 8.70804L19.4294 7.87206C19.6964 7.63114 19.8823 7.31344 19.9615 6.9626C20.0407 6.61176 20.0093 6.245 19.8717 5.91271C19.7341 5.58043 19.4969 5.29892 19.1928 5.10686C18.8887 4.91481 18.5326 4.82163 18.1735 4.84014L16.9282 4.90414C16.685 4.91638 16.4418 4.87747 16.2145 4.78994C15.9872 4.7024 15.7808 4.56818 15.6086 4.39594C15.4363 4.2237 15.3021 4.01726 15.2146 3.78994C15.1271 3.56262 15.0882 3.31948 15.1004 3.07619L15.1644 1.83089C15.1829 1.4717 15.0897 1.11559 14.8977 0.811487C14.7056 0.507385 14.4241 0.270217 14.0919 0.132568C13.7596 -0.00508182 13.3929 -0.0364573 13.042 0.0427519C12.6912 0.121961 12.3735 0.307869 12.1326 0.574931L11.2914 1.50024C11.1288 1.68202 10.9297 1.82745 10.7071 1.92702C10.4845 2.02659 10.2433 2.07805 9.99947 2.07805C9.7556 2.07805 9.51448 2.02659 9.29186 1.92702ZM14.3745 10C14.3745 12.4162 12.4159 14.375 9.99977 14.375C7.58365 14.375 5.625 12.4162 5.625 10C5.625 7.58375 7.58365 5.625 9.99977 5.625C12.4159 5.625 14.3745 7.58375 14.3745 10Z",
      fill: "currentColor"
    }));
  }, "SvgSettings"),
  ar = a(_ref27 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref27;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 14 14",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",
      fill: "currentColor",
      stroke: "currentColor"
    }));
  }, "SvgStarFilled"),
  cr = a(_ref28 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref28;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 14 14",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",
      stroke: "currentColor",
      strokeWidth: 1.5
    }));
  }, "SvgStar"),
  ur = a(_ref29 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref29;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 16 16",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("rect", {
      width: 16,
      height: 16,
      rx: 2,
      fill: "currentColor"
    }));
  }, "SvgStop"),
  dr = a(_ref30 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref30;
    return u.createElement("svg", {
      width: "1em",
      height: "5em",
      xmlns: "http://www.w3.org/2000/svg",
      fillRule: "evenodd",
      "aria-hidden": "true",
      viewBox: "0 0 23 23",
      style: {
        height: "1.5em"
      },
      clipRule: "evenodd",
      "aria-labelledby": t,
      ...n
    }, e === void 0 ? u.createElement("title", {
      id: t
    }, "trash icon") : e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("path", {
      d: "M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-7 7.586l3.293-3.293 1.414 1.414-3.293 3.293 3.293 3.293-1.414 1.414-3.293-3.293-3.293 3.293-1.414-1.414 3.293-3.293-3.293-3.293 1.414-1.414 3.293 3.293zm2-10.586h-4v1h4v-1z",
      fill: "currentColor",
      strokeWidth: .25,
      stroke: "currentColor"
    }));
  }, "SvgTrash"),
  hr = a(_ref31 => {
    let {
      title: e,
      titleId: t,
      ...n
    } = _ref31;
    return u.createElement("svg", {
      height: "1em",
      viewBox: "0 0 13 13",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg",
      "aria-labelledby": t,
      ...n
    }, e ? u.createElement("title", {
      id: t
    }, e) : null, u.createElement("rect", {
      x: .6,
      y: .6,
      width: 11.8,
      height: 11.8,
      rx: 5.9,
      stroke: "currentColor",
      strokeWidth: 1.2
    }), u.createElement("rect", {
      x: 5.5,
      y: 5.5,
      width: 2,
      height: 2,
      rx: 1,
      fill: "currentColor"
    }));
  }, "SvgType"),
  Mt = V(Hn),
  mr = V(Dn),
  Rt = V(An),
  fr = V(On),
  Fe = V(Fn),
  pr = V(Bn),
  Pt = V(Wn),
  qt = V(_n),
  Vt = V(Zn),
  It = V($n),
  Ht = V(Gn, "filled docs icon"),
  Dt = V(Qn),
  At = V(zn),
  Ot = V(Un),
  Ft = V(Kn),
  Bt = V(Jn),
  gr = V(Yn),
  Wt = V(Xn),
  xr = V(er),
  _t = V(tr),
  Zt = V(nr),
  Cr = V(rr),
  vr = V(sr),
  yr = V(or),
  $t = V(lr),
  br = V(ir),
  Gt = V(ar, "filled star icon"),
  Qt = V(cr),
  zt = V(ur),
  Ut = V(dr, "trash icon"),
  ge = V(hr);
function V(e) {
  let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : e.name.replace("Svg", "").replaceAll(/([A-Z])/g, " $1").trimStart().toLowerCase() + " icon";
  return e.defaultProps = {
    title: t
  }, e;
}
a(V, "generateIcon");
const Q = l.forwardRef((e, t) => r.jsx("button", {
  ...e,
  ref: t,
  className: _.clsx("graphiql-un-styled", e.className)
}));
Q.displayName = "UnStyledButton";
const me = l.forwardRef((e, t) => r.jsx("button", {
  ...e,
  ref: t,
  className: _.clsx("graphiql-button", {
    success: "graphiql-button-success",
    error: "graphiql-button-error"
  }[e.state], e.className)
}));
me.displayName = "Button";
const Kt = l.forwardRef((e, t) => r.jsx("div", {
  ...e,
  ref: t,
  className: _.clsx("graphiql-button-group", e.className)
}));
Kt.displayName = "ButtonGroup";
const ye = a((e, t) => Object.entries(t).reduce((n, _ref32) => {
  let [s, o] = _ref32;
  return n[s] = o, n;
}, e), "createComponentGroup");
const Jt = l.forwardRef((e, t) => r.jsx(re.Close, {
  asChild: !0,
  children: r.jsxs(Q, {
    ...e,
    ref: t,
    type: "button",
    className: _.clsx("graphiql-dialog-close", e.className),
    children: [r.jsx(qn.Root, {
      children: "Close dialog"
    }), r.jsx(Fe, {})]
  })
}));
Jt.displayName = "Dialog.Close";
function Yt(_ref33) {
  let {
    children: e,
    ...t
  } = _ref33;
  return r.jsx(re.Root, {
    ...t,
    children: r.jsxs(re.Portal, {
      children: [r.jsx(re.Overlay, {
        className: "graphiql-dialog-overlay"
      }), r.jsx(re.Content, {
        className: "graphiql-dialog",
        children: e
      })]
    })
  });
}
a(Yt, "DialogRoot");
const wr = ye(Yt, {
  Close: Jt,
  Title: re.Title,
  Trigger: re.Trigger,
  Description: re.Description
});
const Xt = l.forwardRef((e, t) => r.jsx(xe.Trigger, {
  asChild: !0,
  children: r.jsx("button", {
    ...e,
    ref: t,
    className: _.clsx("graphiql-un-styled", e.className)
  })
}));
Xt.displayName = "DropdownMenuButton";
function Er(_ref34) {
  let {
    children: e,
    align: t = "start",
    sideOffset: n = 5,
    className: s,
    ...o
  } = _ref34;
  return r.jsx(xe.Portal, {
    children: r.jsx(xe.Content, {
      align: t,
      sideOffset: n,
      className: _.clsx("graphiql-dropdown-content", s),
      ...o,
      children: e
    })
  });
}
a(Er, "Content");
const Sr = a(_ref35 => {
    let {
      className: e,
      children: t,
      ...n
    } = _ref35;
    return r.jsx(xe.Item, {
      className: _.clsx("graphiql-dropdown-item", e),
      ...n,
      children: t
    });
  }, "Item"),
  ee = ye(xe.Root, {
    Button: Xt,
    Item: Sr,
    Content: Er
  }),
  Re = new Vn({
    breaks: !0,
    linkify: !0
  });
const K = l.forwardRef((_ref36, o) => {
  let {
    children: e,
    onlyShowFirstChild: t,
    type: n,
    ...s
  } = _ref36;
  return r.jsx("div", {
    ...s,
    ref: o,
    className: _.clsx(`graphiql-markdown-${n}`, t && "graphiql-markdown-preview", s.className),
    dangerouslySetInnerHTML: {
      __html: Re.render(e)
    }
  });
});
K.displayName = "MarkdownContent";
const st = l.forwardRef((e, t) => r.jsx("div", {
  ...e,
  ref: t,
  className: _.clsx("graphiql-spinner", e.className)
}));
st.displayName = "Spinner";
function en(_ref37) {
  let {
    children: e,
    align: t = "start",
    side: n = "bottom",
    sideOffset: s = 5,
    label: o
  } = _ref37;
  return r.jsxs(pe.Root, {
    children: [r.jsx(pe.Trigger, {
      asChild: !0,
      children: e
    }), r.jsx(pe.Portal, {
      children: r.jsx(pe.Content, {
        className: "graphiql-tooltip",
        align: t,
        side: n,
        sideOffset: s,
        children: o
      })
    })]
  });
}
a(en, "TooltipRoot");
const J = ye(en, {
  Provider: pe.Provider
});
const tn = l.forwardRef((_ref38, c) => {
  let {
    isActive: e,
    value: t,
    children: n,
    className: s,
    ...o
  } = _ref38;
  return r.jsx(Nt.Reorder.Item, {
    ...o,
    ref: c,
    value: t,
    "aria-selected": e ? "true" : void 0,
    role: "tab",
    className: _.clsx("graphiql-tab", e && "graphiql-tab-active", s),
    children: n
  });
});
tn.displayName = "Tab";
const nn = l.forwardRef((e, t) => r.jsx(Q, {
  ...e,
  ref: t,
  type: "button",
  className: _.clsx("graphiql-tab-button", e.className),
  children: e.children
}));
nn.displayName = "Tab.Button";
const rn = l.forwardRef((e, t) => r.jsx(J, {
  label: "Close Tab",
  children: r.jsx(Q, {
    "aria-label": "Close Tab",
    ...e,
    ref: t,
    type: "button",
    className: _.clsx("graphiql-tab-close", e.className),
    children: r.jsx(Fe, {})
  })
}));
rn.displayName = "Tab.Close";
const Lr = ye(tn, {
    Button: nn,
    Close: rn
  }),
  sn = l.forwardRef((_ref39, c) => {
    let {
      values: e,
      onReorder: t,
      children: n,
      className: s,
      ...o
    } = _ref39;
    return r.jsx(Nt.Reorder.Group, {
      ...o,
      ref: c,
      values: e,
      onReorder: t,
      axis: "x",
      role: "tablist",
      className: _.clsx("graphiql-tabs", s),
      children: n
    });
  });
sn.displayName = "Tabs";
const ot = le("HistoryContext");
function on(e) {
  var y;
  const t = se(),
    n = l.useRef(new B.HistoryStore(t || new B.StorageAPI(null), e.maxHistoryLength || jr)),
    [s, o] = l.useState(((y = n.current) == null ? void 0 : y.queries) || []),
    c = l.useCallback(h => {
      var x;
      (x = n.current) == null || x.updateHistory(h), o(n.current.queries);
    }, []),
    i = l.useCallback((h, x) => {
      n.current.editLabel(h, x), o(n.current.queries);
    }, []),
    d = l.useCallback(h => {
      n.current.toggleFavorite(h), o(n.current.queries);
    }, []),
    g = l.useCallback(h => h, []),
    m = l.useCallback(function (h) {
      let x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
      n.current.deleteHistory(h, x), o(n.current.queries);
    }, []),
    p = l.useMemo(() => ({
      addToHistory: c,
      editLabel: i,
      items: s,
      toggleFavorite: d,
      setActive: g,
      deleteFromHistory: m
    }), [c, i, s, d, g, m]);
  return r.jsx(ot.Provider, {
    value: p,
    children: e.children
  });
}
a(on, "HistoryContextProvider");
const be = ie(ot),
  jr = 20;
function ln() {
  const {
    items: e,
    deleteFromHistory: t
  } = be({
    nonNull: !0
  });
  let n = e.slice().map((d, g) => ({
    ...d,
    index: g
  })).reverse();
  const s = n.filter(d => d.favorite);
  s.length && (n = n.filter(d => !d.favorite));
  const [o, c] = l.useState(null);
  l.useEffect(() => {
    o && setTimeout(() => {
      c(null);
    }, 2e3);
  }, [o]);
  const i = l.useCallback(() => {
    try {
      for (const d of n) t(d, !0);
      c("success");
    } catch {
      c("error");
    }
  }, [t, n]);
  return r.jsxs("section", {
    "aria-label": "History",
    className: "graphiql-history",
    children: [r.jsxs("div", {
      className: "graphiql-history-header",
      children: ["History", (o || n.length > 0) && r.jsx(me, {
        type: "button",
        state: o || void 0,
        disabled: !n.length,
        onClick: i,
        children: {
          success: "Cleared",
          error: "Failed to Clear"
        }[o] || "Clear"
      })]
    }), !!s.length && r.jsx("ul", {
      className: "graphiql-history-items",
      children: s.map(d => r.jsx(Pe, {
        item: d
      }, d.index))
    }), !!s.length && !!n.length && r.jsx("div", {
      className: "graphiql-history-item-spacer"
    }), !!n.length && r.jsx("ul", {
      className: "graphiql-history-items",
      children: n.map(d => r.jsx(Pe, {
        item: d
      }, d.index))
    })]
  });
}
a(ln, "History");
function Pe(e) {
  const {
      editLabel: t,
      toggleFavorite: n,
      deleteFromHistory: s,
      setActive: o
    } = be({
      nonNull: !0,
      caller: Pe
    }),
    {
      headerEditor: c,
      queryEditor: i,
      variableEditor: d
    } = Z({
      nonNull: !0,
      caller: Pe
    }),
    g = l.useRef(null),
    m = l.useRef(null),
    [p, y] = l.useState(!1);
  l.useEffect(() => {
    var b;
    p && ((b = g.current) == null || b.focus());
  }, [p]);
  const h = e.item.label || e.item.operationName || kr(e.item.query),
    x = l.useCallback(() => {
      var T;
      y(!1);
      const {
        index: b,
        ...w
      } = e.item;
      t({
        ...w,
        label: (T = g.current) == null ? void 0 : T.value
      }, b);
    }, [t, e.item]),
    f = l.useCallback(() => {
      y(!1);
    }, []),
    C = l.useCallback(b => {
      b.stopPropagation(), y(!0);
    }, []),
    E = l.useCallback(() => {
      const {
        query: b,
        variables: w,
        headers: T
      } = e.item;
      i == null || i.setValue(b !== null && b !== void 0 ? b : ""), d == null || d.setValue(w !== null && w !== void 0 ? w : ""), c == null || c.setValue(T !== null && T !== void 0 ? T : ""), o(e.item);
    }, [c, e.item, i, o, d]),
    k = l.useCallback(b => {
      b.stopPropagation(), s(e.item);
    }, [e.item, s]),
    L = l.useCallback(b => {
      b.stopPropagation(), n(e.item);
    }, [e.item, n]);
  return r.jsx("li", {
    className: _.clsx("graphiql-history-item", p && "editable"),
    children: p ? r.jsxs(r.Fragment, {
      children: [r.jsx("input", {
        type: "text",
        defaultValue: e.item.label,
        ref: g,
        onKeyDown: b => {
          b.key === "Esc" ? y(!1) : b.key === "Enter" && (y(!1), t({
            ...e.item,
            label: b.currentTarget.value
          }));
        },
        placeholder: "Type a label"
      }), r.jsx(Q, {
        type: "button",
        ref: m,
        onClick: x,
        children: "Save"
      }), r.jsx(Q, {
        type: "button",
        ref: m,
        onClick: f,
        children: r.jsx(Fe, {})
      })]
    }) : r.jsxs(r.Fragment, {
      children: [r.jsx(J, {
        label: "Set active",
        children: r.jsx(Q, {
          type: "button",
          className: "graphiql-history-item-label",
          onClick: E,
          "aria-label": "Set active",
          children: h
        })
      }), r.jsx(J, {
        label: "Edit label",
        children: r.jsx(Q, {
          type: "button",
          className: "graphiql-history-item-action",
          onClick: C,
          "aria-label": "Edit label",
          children: r.jsx(_t, {
            "aria-hidden": "true"
          })
        })
      }), r.jsx(J, {
        label: e.item.favorite ? "Remove favorite" : "Add favorite",
        children: r.jsx(Q, {
          type: "button",
          className: "graphiql-history-item-action",
          onClick: L,
          "aria-label": e.item.favorite ? "Remove favorite" : "Add favorite",
          children: e.item.favorite ? r.jsx(Gt, {
            "aria-hidden": "true"
          }) : r.jsx(Qt, {
            "aria-hidden": "true"
          })
        })
      }), r.jsx(J, {
        label: "Delete from history",
        children: r.jsx(Q, {
          type: "button",
          className: "graphiql-history-item-action",
          onClick: k,
          "aria-label": "Delete from history",
          children: r.jsx(Ut, {
            "aria-hidden": "true"
          })
        })
      })]
    })
  });
}
a(Pe, "HistoryItem");
function kr(e) {
  return e == null ? void 0 : e.split(`
`).map(t => t.replace(/#(.*)/, "")).join(" ").replaceAll("{", " { ").replaceAll("}", " } ").replaceAll(/[\s]{2,}/g, " ");
}
a(kr, "formatQuery");
const lt = le("ExecutionContext");
function qe(_ref40) {
  let {
    fetcher: e,
    getDefaultFieldNames: t,
    children: n,
    operationName: s
  } = _ref40;
  if (!e) throw new TypeError("The `ExecutionContextProvider` component requires a `fetcher` function to be passed as prop.");
  const {
      externalFragments: o,
      headerEditor: c,
      queryEditor: i,
      responseEditor: d,
      variableEditor: g,
      updateActiveTabValues: m
    } = Z({
      nonNull: !0,
      caller: qe
    }),
    p = be(),
    y = He({
      getDefaultFieldNames: t,
      caller: qe
    }),
    [h, x] = l.useState(!1),
    [f, C] = l.useState(null),
    E = l.useRef(0),
    k = l.useCallback(() => {
      f == null || f.unsubscribe(), x(!1), C(null);
    }, [f]),
    L = l.useCallback(async () => {
      var _ref41;
      if (!i || !d) return;
      if (f) {
        k();
        return;
      }
      const T = a(N => {
        d.setValue(N), m({
          response: N
        });
      }, "setResponse");
      E.current += 1;
      const A = E.current;
      let F = y() || i.getValue();
      const I = g == null ? void 0 : g.getValue();
      let H;
      try {
        H = bt({
          json: I,
          errorMessageParse: "Variables are invalid JSON",
          errorMessageType: "Variables are not a JSON object."
        });
      } catch (N) {
        T(N instanceof Error ? N.message : `${N}`);
        return;
      }
      const O = c == null ? void 0 : c.getValue();
      let D;
      try {
        D = bt({
          json: O,
          errorMessageParse: "Headers are invalid JSON",
          errorMessageType: "Headers are not a JSON object."
        });
      } catch (N) {
        T(N instanceof Error ? N.message : `${N}`);
        return;
      }
      if (o) {
        const N = i.documentAST ? kt.getFragmentDependenciesForAST(i.documentAST, o) : [];
        N.length > 0 && (F += `
` + N.map(P => M.print(P)).join(`
`));
      }
      T(""), x(!0);
      const q = (_ref41 = s !== null && s !== void 0 ? s : i.operationName) !== null && _ref41 !== void 0 ? _ref41 : void 0;
      p == null || p.addToHistory({
        query: F,
        variables: I,
        headers: O,
        operationName: q
      });
      try {
        var _D, _i$documentAST;
        let N = {
          data: {}
        };
        const P = a(v => {
            if (A !== E.current) return;
            let j = Array.isArray(v) ? v : !1;
            if (!j && typeof v == "object" && v !== null && "hasNext" in v && (j = [v]), j) {
              const R = {
                  data: N.data
                },
                $ = [...((N == null ? void 0 : N.errors) || []), ...j.flatMap(z => z.errors).filter(Boolean)];
              $.length && (R.errors = $);
              for (const z of j) {
                const {
                  path: vt,
                  data: Le,
                  errors: ms,
                  ...Nn
                } = z;
                if (vt) {
                  if (!Le) throw new Error(`Expected part to contain a data property, but got ${z}`);
                  Mn(R.data, vt, Le, {
                    merge: !0
                  });
                } else Le && (R.data = Le);
                N = {
                  ...R,
                  ...Nn
                };
              }
              x(!1), T(B.formatResult(N));
            } else {
              const R = B.formatResult(v);
              x(!1), T(R);
            }
          }, "handleResponse"),
          S = e({
            query: F,
            variables: H,
            operationName: q
          }, {
            headers: (_D = D) !== null && _D !== void 0 ? _D : void 0,
            documentAST: (_i$documentAST = i.documentAST) !== null && _i$documentAST !== void 0 ? _i$documentAST : void 0
          }),
          W = await Promise.resolve(S);
        if (B.isObservable(W)) C(W.subscribe({
          next(v) {
            P(v);
          },
          error(v) {
            x(!1), v && T(B.formatError(v)), C(null);
          },
          complete() {
            x(!1), C(null);
          }
        }));else if (B.isAsyncIterable(W)) {
          C({
            unsubscribe: () => {
              var v, j;
              return (j = (v = W[Symbol.asyncIterator]()).return) == null ? void 0 : j.call(v);
            }
          });
          for await (const v of W) P(v);
          x(!1), C(null);
        } else P(W);
      } catch (N) {
        x(!1), T(B.formatError(N)), C(null);
      }
    }, [y, o, e, c, p, s, i, d, k, f, m, g]),
    b = !!f,
    w = l.useMemo(() => ({
      isFetching: h,
      isSubscribed: b,
      operationName: s !== null && s !== void 0 ? s : null,
      run: L,
      stop: k
    }), [h, b, s, L, k]);
  return r.jsx(lt.Provider, {
    value: w,
    children: n
  });
}
a(qe, "ExecutionContextProvider");
const we = ie(lt);
function bt(_ref42) {
  let {
    json: e,
    errorMessageParse: t,
    errorMessageType: n
  } = _ref42;
  let s;
  try {
    s = e && e.trim() !== "" ? JSON.parse(e) : void 0;
  } catch (c) {
    throw new Error(`${t}: ${c instanceof Error ? c.message : c}.`);
  }
  const o = typeof s == "object" && s !== null && !Array.isArray(s);
  if (s !== void 0 && !o) throw new Error(n);
  return s;
}
a(bt, "tryParseJsonObject");
const Be = "graphiql",
  We = "sublime";
let an = !1;
typeof window == "object" && (an = window.navigator.platform.toLowerCase().indexOf("mac") === 0);
const _e = {
  [an ? "Cmd-F" : "Ctrl-F"]: "findPersistent",
  "Cmd-G": "findPersistent",
  "Ctrl-G": "findPersistent",
  "Ctrl-Left": "goSubwordLeft",
  "Ctrl-Right": "goSubwordRight",
  "Alt-Left": "goGroupLeft",
  "Alt-Right": "goGroupRight"
};
async function Ee(e, t) {
  const n = await Promise.resolve().then(() => __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js")).then(s => s.codemirror).then(s => typeof s == "function" ? s : s.default);
  return await Promise.all((t == null ? void 0 : t.useCommonAddons) === !1 ? e : [Promise.resolve().then(() => __webpack_require__(/*! ./show-hint.cjs.js */ "../../graphiql-react/dist/show-hint.cjs.js")).then(s => s.showHint), Promise.resolve().then(() => __webpack_require__(/*! ./matchbrackets.cjs.js */ "../../graphiql-react/dist/matchbrackets.cjs.js")).then(s => s.matchbrackets), Promise.resolve().then(() => __webpack_require__(/*! ./closebrackets.cjs.js */ "../../graphiql-react/dist/closebrackets.cjs.js")).then(s => s.closebrackets), Promise.resolve().then(() => __webpack_require__(/*! ./brace-fold.cjs.js */ "../../graphiql-react/dist/brace-fold.cjs.js")).then(s => s.braceFold), Promise.resolve().then(() => __webpack_require__(/*! ./foldgutter.cjs.js */ "../../graphiql-react/dist/foldgutter.cjs.js")).then(s => s.foldgutter), Promise.resolve().then(() => __webpack_require__(/*! ./lint.cjs.js */ "../../graphiql-react/dist/lint.cjs.js")).then(s => s.lint), Promise.resolve().then(() => __webpack_require__(/*! ./searchcursor.cjs.js */ "../../graphiql-react/dist/searchcursor.cjs.js")).then(s => s.searchcursor), Promise.resolve().then(() => __webpack_require__(/*! ./jump-to-line.cjs.js */ "../../graphiql-react/dist/jump-to-line.cjs.js")).then(s => s.jumpToLine), Promise.resolve().then(() => __webpack_require__(/*! ./dialog.cjs.js */ "../../graphiql-react/dist/dialog.cjs.js")).then(s => s.dialog), Promise.resolve().then(() => __webpack_require__(/*! ./sublime.cjs.js */ "../../graphiql-react/dist/sublime.cjs.js")).then(s => s.sublime), ...e]), n;
}
a(Ee, "importCodeMirror");
const Nr = a(e => e ? M.print(e) : "", "printDefault");
function it(_ref43) {
  let {
    field: e
  } = _ref43;
  if (!("defaultValue" in e) || e.defaultValue === void 0) return null;
  const t = M.astFromValue(e.defaultValue, e.type);
  return t ? r.jsxs(r.Fragment, {
    children: [" = ", r.jsx("span", {
      className: "graphiql-doc-explorer-default-value",
      children: Nr(t)
    })]
  }) : null;
}
a(it, "DefaultValue");
const at = le("SchemaContext");
function ct(e) {
  if (!e.fetcher) throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");
  const {
      initialHeaders: t,
      headerEditor: n
    } = Z({
      nonNull: !0,
      caller: ct
    }),
    [s, o] = l.useState(),
    [c, i] = l.useState(!1),
    [d, g] = l.useState(null),
    m = l.useRef(0);
  l.useEffect(() => {
    o(M.isSchema(e.schema) || e.schema === null || e.schema === void 0 ? e.schema : void 0), m.current++;
  }, [e.schema]);
  const p = l.useRef(t);
  l.useEffect(() => {
    n && (p.current = n.getValue());
  });
  const {
      introspectionQuery: y,
      introspectionQueryName: h,
      introspectionQuerySansSubscriptions: x
    } = Tr({
      inputValueDeprecation: e.inputValueDeprecation,
      introspectionQueryName: e.introspectionQueryName,
      schemaDescription: e.schemaDescription
    }),
    {
      fetcher: f,
      onSchemaChange: C,
      dangerouslyAssumeSchemaIsValid: E,
      children: k
    } = e,
    L = l.useCallback(() => {
      if (M.isSchema(e.schema) || e.schema === null) return;
      const T = ++m.current,
        A = e.schema;
      async function F() {
        if (A) return A;
        const I = Mr(p.current);
        if (!I.isValidJSON) {
          g("Introspection failed as headers are invalid.");
          return;
        }
        const H = I.headers ? {
            headers: I.headers
          } : {},
          O = B.fetcherReturnToPromise(f({
            query: y,
            operationName: h
          }, H));
        if (!B.isPromise(O)) {
          g("Fetcher did not return a Promise for introspection.");
          return;
        }
        i(!0), g(null);
        let D = await O;
        if (typeof D != "object" || D === null || !("data" in D)) {
          const N = B.fetcherReturnToPromise(f({
            query: x,
            operationName: h
          }, H));
          if (!B.isPromise(N)) throw new Error("Fetcher did not return a Promise for introspection.");
          D = await N;
        }
        if (i(!1), D != null && D.data && "__schema" in D.data) return D.data;
        const q = typeof D == "string" ? D : B.formatResult(D);
        g(q);
      }
      a(F, "fetchIntrospectionData"), F().then(I => {
        if (!(T !== m.current || !I)) try {
          const H = M.buildClientSchema(I);
          o(H), C == null || C(H);
        } catch (H) {
          g(B.formatError(H));
        }
      }).catch(I => {
        T === m.current && (g(B.formatError(I)), i(!1));
      });
    }, [f, h, y, x, C, e.schema]);
  l.useEffect(() => {
    L();
  }, [L]), l.useEffect(() => {
    function T(A) {
      A.ctrlKey && A.key === "R" && L();
    }
    return a(T, "triggerIntrospection"), window.addEventListener("keydown", T), () => window.removeEventListener("keydown", T);
  });
  const b = l.useMemo(() => !s || E ? [] : M.validateSchema(s), [s, E]),
    w = l.useMemo(() => ({
      fetchError: d,
      introspect: L,
      isFetching: c,
      schema: s,
      validationErrors: b
    }), [d, L, c, s, b]);
  return r.jsx(at.Provider, {
    value: w,
    children: k
  });
}
a(ct, "SchemaContextProvider");
const X = ie(at);
function Tr(_ref44) {
  let {
    inputValueDeprecation: e,
    introspectionQueryName: t,
    schemaDescription: n
  } = _ref44;
  return l.useMemo(() => {
    const s = t || "IntrospectionQuery";
    let o = M.getIntrospectionQuery({
      inputValueDeprecation: e,
      schemaDescription: n
    });
    t && (o = o.replace("query IntrospectionQuery", `query ${s}`));
    const c = o.replace("subscriptionType { name }", "");
    return {
      introspectionQueryName: s,
      introspectionQuery: o,
      introspectionQuerySansSubscriptions: c
    };
  }, [e, t, n]);
}
a(Tr, "useIntrospectionQuery");
function Mr(e) {
  let t = null,
    n = !0;
  try {
    e && (t = JSON.parse(e));
  } catch {
    n = !1;
  }
  return {
    headers: t,
    isValidJSON: n
  };
}
a(Mr, "parseHeaderString");
const je = {
    name: "Docs"
  },
  ut = le("ExplorerContext");
function dt(e) {
  const {
      schema: t,
      validationErrors: n
    } = X({
      nonNull: !0,
      caller: dt
    }),
    [s, o] = l.useState([je]),
    c = l.useCallback(m => {
      o(p => p.at(-1).def === m.def ? p : [...p, m]);
    }, []),
    i = l.useCallback(() => {
      o(m => m.length > 1 ? m.slice(0, -1) : m);
    }, []),
    d = l.useCallback(() => {
      o(m => m.length === 1 ? m : [je]);
    }, []);
  l.useEffect(() => {
    t == null || n.length > 0 ? d() : o(m => {
      if (m.length === 1) return m;
      const p = [je];
      let y = null;
      for (const h of m) if (h !== je) if (h.def) {
        if (M.isNamedType(h.def)) {
          const x = t.getType(h.def.name);
          if (x) p.push({
            name: h.name,
            def: x
          }), y = x;else break;
        } else {
          if (y === null) break;
          if (M.isObjectType(y) || M.isInputObjectType(y)) {
            const x = y.getFields()[h.name];
            if (x) p.push({
              name: h.name,
              def: x
            });else break;
          } else {
            if (M.isScalarType(y) || M.isEnumType(y) || M.isInterfaceType(y) || M.isUnionType(y)) break;
            {
              const x = y;
              if (x.args.find(C => C.name === h.name)) p.push({
                name: h.name,
                def: x
              });else break;
            }
          }
        }
      } else y = null, p.push(h);
      return p;
    });
  }, [d, t, n]);
  const g = l.useMemo(() => ({
    explorerNavStack: s,
    push: c,
    pop: i,
    reset: d
  }), [s, c, i, d]);
  return r.jsx(ut.Provider, {
    value: g,
    children: e.children
  });
}
a(dt, "ExplorerContextProvider");
const te = ie(ut);
function Ve(e, t) {
  return M.isNonNullType(e) ? r.jsxs(r.Fragment, {
    children: [Ve(e.ofType, t), "!"]
  }) : M.isListType(e) ? r.jsxs(r.Fragment, {
    children: ["[", Ve(e.ofType, t), "]"]
  }) : t(e);
}
a(Ve, "renderType");
function U(e) {
  const {
    push: t
  } = te({
    nonNull: !0,
    caller: U
  });
  return e.type ? Ve(e.type, n => r.jsx("a", {
    className: "graphiql-doc-explorer-type-name",
    onClick: s => {
      s.preventDefault(), t({
        name: n.name,
        def: n
      });
    },
    href: "#",
    children: n.name
  })) : null;
}
a(U, "TypeLink");
function Ce(_ref45) {
  let {
    arg: e,
    showDefaultValue: t,
    inline: n
  } = _ref45;
  const s = r.jsxs("span", {
    children: [r.jsx("span", {
      className: "graphiql-doc-explorer-argument-name",
      children: e.name
    }), ": ", r.jsx(U, {
      type: e.type
    }), t !== !1 && r.jsx(it, {
      field: e
    })]
  });
  return n ? s : r.jsxs("div", {
    className: "graphiql-doc-explorer-argument",
    children: [s, e.description ? r.jsx(K, {
      type: "description",
      children: e.description
    }) : null, e.deprecationReason ? r.jsxs("div", {
      className: "graphiql-doc-explorer-argument-deprecation",
      children: [r.jsx("div", {
        className: "graphiql-doc-explorer-argument-deprecation-label",
        children: "Deprecated"
      }), r.jsx(K, {
        type: "deprecation",
        children: e.deprecationReason
      })]
    }) : null]
  });
}
a(Ce, "Argument");
function ht(e) {
  var _e$preview;
  return e.children ? r.jsxs("div", {
    className: "graphiql-doc-explorer-deprecation",
    children: [r.jsx("div", {
      className: "graphiql-doc-explorer-deprecation-label",
      children: "Deprecated"
    }), r.jsx(K, {
      type: "deprecation",
      onlyShowFirstChild: (_e$preview = e.preview) !== null && _e$preview !== void 0 ? _e$preview : !0,
      children: e.children
    })]
  }) : null;
}
a(ht, "DeprecationReason");
function cn(_ref46) {
  let {
    directive: e
  } = _ref46;
  return r.jsxs("span", {
    className: "graphiql-doc-explorer-directive",
    children: ["@", e.name.value]
  });
}
a(cn, "Directive");
function G(e) {
  const t = Rr[e.title];
  return r.jsxs("div", {
    children: [r.jsxs("div", {
      className: "graphiql-doc-explorer-section-title",
      children: [r.jsx(t, {}), e.title]
    }), r.jsx("div", {
      className: "graphiql-doc-explorer-section-content",
      children: e.children
    })]
  });
}
a(G, "ExplorerSection");
const Rr = {
  Arguments: Mt,
  "Deprecated Arguments": Pt,
  "Deprecated Enum Values": qt,
  "Deprecated Fields": Vt,
  Directives: It,
  "Enum Values": At,
  Fields: Ot,
  Implements: Bt,
  Implementations: ge,
  "Possible Types": ge,
  "Root Types": $t,
  Type: ge,
  "All Schema Types": ge
};
function un(e) {
  return r.jsxs(r.Fragment, {
    children: [e.field.description ? r.jsx(K, {
      type: "description",
      children: e.field.description
    }) : null, r.jsx(ht, {
      preview: !1,
      children: e.field.deprecationReason
    }), r.jsx(G, {
      title: "Type",
      children: r.jsx(U, {
        type: e.field.type
      })
    }), r.jsx(Pr, {
      field: e.field
    }), r.jsx(qr, {
      field: e.field
    })]
  });
}
a(un, "FieldDocumentation");
function Pr(_ref47) {
  let {
    field: e
  } = _ref47;
  const [t, n] = l.useState(!1),
    s = l.useCallback(() => {
      n(!0);
    }, []);
  if (!("args" in e)) return null;
  const o = [],
    c = [];
  for (const i of e.args) i.deprecationReason ? c.push(i) : o.push(i);
  return r.jsxs(r.Fragment, {
    children: [o.length > 0 ? r.jsx(G, {
      title: "Arguments",
      children: o.map(i => r.jsx(Ce, {
        arg: i
      }, i.name))
    }) : null, c.length > 0 ? t || o.length === 0 ? r.jsx(G, {
      title: "Deprecated Arguments",
      children: c.map(i => r.jsx(Ce, {
        arg: i
      }, i.name))
    }) : r.jsx(me, {
      type: "button",
      onClick: s,
      children: "Show Deprecated Arguments"
    }) : null]
  });
}
a(Pr, "Arguments");
function qr(_ref48) {
  let {
    field: e
  } = _ref48;
  var n;
  const t = ((n = e.astNode) == null ? void 0 : n.directives) || [];
  return !t || t.length === 0 ? null : r.jsx(G, {
    title: "Directives",
    children: t.map(s => r.jsx("div", {
      children: r.jsx(cn, {
        directive: s
      })
    }, s.name.value))
  });
}
a(qr, "Directives");
function dn(e) {
  var i, d, g, m;
  const t = e.schema.getQueryType(),
    n = (d = (i = e.schema).getMutationType) == null ? void 0 : d.call(i),
    s = (m = (g = e.schema).getSubscriptionType) == null ? void 0 : m.call(g),
    o = e.schema.getTypeMap(),
    c = [t == null ? void 0 : t.name, n == null ? void 0 : n.name, s == null ? void 0 : s.name];
  return r.jsxs(r.Fragment, {
    children: [r.jsx(K, {
      type: "description",
      children: e.schema.description || "A GraphQL schema provides a root type for each kind of operation."
    }), r.jsxs(G, {
      title: "Root Types",
      children: [t ? r.jsxs("div", {
        children: [r.jsx("span", {
          className: "graphiql-doc-explorer-root-type",
          children: "query"
        }), ": ", r.jsx(U, {
          type: t
        })]
      }) : null, n && r.jsxs("div", {
        children: [r.jsx("span", {
          className: "graphiql-doc-explorer-root-type",
          children: "mutation"
        }), ": ", r.jsx(U, {
          type: n
        })]
      }), s && r.jsxs("div", {
        children: [r.jsx("span", {
          className: "graphiql-doc-explorer-root-type",
          children: "subscription"
        }), ": ", r.jsx(U, {
          type: s
        })]
      })]
    }), r.jsx(G, {
      title: "All Schema Types",
      children: o && r.jsx("div", {
        children: Object.values(o).map(p => c.includes(p.name) || p.name.startsWith("__") ? null : r.jsx("div", {
          children: r.jsx(U, {
            type: p
          })
        }, p.name))
      })
    })]
  });
}
a(dn, "SchemaDocumentation");
function ue(e, t) {
  let n;
  return function () {
    for (var _len = arguments.length, s = new Array(_len), _key = 0; _key < _len; _key++) {
      s[_key] = arguments[_key];
    }
    n && window.clearTimeout(n), n = window.setTimeout(() => {
      n = null, t(...s);
    }, e);
  };
}
a(ue, "debounce");
function mt() {
  const {
      explorerNavStack: e,
      push: t
    } = te({
      nonNull: !0,
      caller: mt
    }),
    n = l.useRef(null),
    s = Ke(),
    [o, c] = l.useState(""),
    [i, d] = l.useState(s(o)),
    g = l.useMemo(() => ue(200, f => {
      d(s(f));
    }), [s]);
  l.useEffect(() => {
    g(o);
  }, [g, o]), l.useEffect(() => {
    function f(C) {
      var E;
      C.metaKey && C.key === "k" && ((E = n.current) == null || E.focus());
    }
    return a(f, "handleKeyDown"), window.addEventListener("keydown", f), () => window.removeEventListener("keydown", f);
  }, []);
  const m = e.at(-1),
    p = l.useCallback(f => {
      t("field" in f ? {
        name: f.field.name,
        def: f.field
      } : {
        name: f.type.name,
        def: f.type
      });
    }, [t]),
    y = l.useRef(!1),
    h = l.useCallback(f => {
      y.current = f.type === "focus";
    }, []);
  return e.length === 1 || M.isObjectType(m.def) || M.isInterfaceType(m.def) || M.isInputObjectType(m.def) ? r.jsxs(ae.Combobox, {
    as: "div",
    className: "graphiql-doc-explorer-search",
    onChange: p,
    "data-state": y ? void 0 : "idle",
    "aria-label": `Search ${m.name}...`,
    children: [r.jsxs("div", {
      className: "graphiql-doc-explorer-search-input",
      onClick: () => {
        var f;
        (f = n.current) == null || f.focus();
      },
      children: [r.jsx(Wt, {}), r.jsx(ae.Combobox.Input, {
        autoComplete: "off",
        onFocus: h,
        onBlur: h,
        onChange: f => c(f.target.value),
        placeholder: "⌘ K",
        ref: n,
        value: o,
        "data-cy": "doc-explorer-input"
      })]
    }), y.current && r.jsxs(ae.Combobox.Options, {
      "data-cy": "doc-explorer-list",
      children: [i.within.length + i.types.length + i.fields.length === 0 ? r.jsx("li", {
        className: "graphiql-doc-explorer-search-empty",
        children: "No results found"
      }) : i.within.map((f, C) => r.jsx(ae.Combobox.Option, {
        value: f,
        "data-cy": "doc-explorer-option",
        children: r.jsx(wt, {
          field: f.field,
          argument: f.argument
        })
      }, `within-${C}`)), i.within.length > 0 && i.types.length + i.fields.length > 0 ? r.jsx("div", {
        className: "graphiql-doc-explorer-search-divider",
        children: "Other results"
      }) : null, i.types.map((f, C) => r.jsx(ae.Combobox.Option, {
        value: f,
        "data-cy": "doc-explorer-option",
        children: r.jsx(Je, {
          type: f.type
        })
      }, `type-${C}`)), i.fields.map((f, C) => r.jsxs(ae.Combobox.Option, {
        value: f,
        "data-cy": "doc-explorer-option",
        children: [r.jsx(Je, {
          type: f.type
        }), ".", r.jsx(wt, {
          field: f.field,
          argument: f.argument
        })]
      }, `field-${C}`))]
    })]
  }) : null;
}
a(mt, "Search");
function Ke(e) {
  const {
      explorerNavStack: t
    } = te({
      nonNull: !0,
      caller: e || Ke
    }),
    {
      schema: n
    } = X({
      nonNull: !0,
      caller: e || Ke
    }),
    s = t.at(-1);
  return l.useCallback(o => {
    const c = {
      within: [],
      types: [],
      fields: []
    };
    if (!n) return c;
    const i = s.def,
      d = n.getTypeMap();
    let g = Object.keys(d);
    i && (g = g.filter(m => m !== i.name), g.unshift(i.name));
    for (const m of g) {
      if (c.within.length + c.types.length + c.fields.length >= 100) break;
      const p = d[m];
      if (i !== p && Qe(m, o) && c.types.push({
        type: p
      }), !M.isObjectType(p) && !M.isInterfaceType(p) && !M.isInputObjectType(p)) continue;
      const y = p.getFields();
      for (const h in y) {
        const x = y[h];
        let f;
        if (!Qe(h, o)) if ("args" in x) {
          if (f = x.args.filter(C => Qe(C.name, o)), f.length === 0) continue;
        } else continue;
        c[i === p ? "within" : "fields"].push(...(f ? f.map(C => ({
          type: p,
          field: x,
          argument: C
        })) : [{
          type: p,
          field: x
        }]));
      }
    }
    return c;
  }, [s.def, n]);
}
a(Ke, "useSearchResults");
function Qe(e, t) {
  try {
    const n = t.replaceAll(/[^_0-9A-Za-z]/g, s => "\\" + s);
    return e.search(new RegExp(n, "i")) !== -1;
  } catch {
    return e.toLowerCase().includes(t.toLowerCase());
  }
}
a(Qe, "isMatch");
function Je(e) {
  return r.jsx("span", {
    className: "graphiql-doc-explorer-search-type",
    children: e.type.name
  });
}
a(Je, "Type");
function wt(_ref49) {
  let {
    field: e,
    argument: t
  } = _ref49;
  return r.jsxs(r.Fragment, {
    children: [r.jsx("span", {
      className: "graphiql-doc-explorer-search-field",
      children: e.name
    }), t ? r.jsxs(r.Fragment, {
      children: ["(", r.jsx("span", {
        className: "graphiql-doc-explorer-search-argument",
        children: t.name
      }), ":", " ", Ve(t.type, n => r.jsx(Je, {
        type: n
      })), ")"]
    }) : null]
  });
}
a(wt, "Field$1");
function hn(e) {
  const {
    push: t
  } = te({
    nonNull: !0
  });
  return r.jsx("a", {
    className: "graphiql-doc-explorer-field-name",
    onClick: n => {
      n.preventDefault(), t({
        name: e.field.name,
        def: e.field
      });
    },
    href: "#",
    children: e.field.name
  });
}
a(hn, "FieldLink");
function mn(e) {
  return M.isNamedType(e.type) ? r.jsxs(r.Fragment, {
    children: [e.type.description ? r.jsx(K, {
      type: "description",
      children: e.type.description
    }) : null, r.jsx(Vr, {
      type: e.type
    }), r.jsx(Ir, {
      type: e.type
    }), r.jsx(Hr, {
      type: e.type
    }), r.jsx(Dr, {
      type: e.type
    })]
  }) : null;
}
a(mn, "TypeDocumentation");
function Vr(_ref50) {
  let {
    type: e
  } = _ref50;
  return M.isObjectType(e) && e.getInterfaces().length > 0 ? r.jsx(G, {
    title: "Implements",
    children: e.getInterfaces().map(n => r.jsx("div", {
      children: r.jsx(U, {
        type: n
      })
    }, n.name))
  }) : null;
}
a(Vr, "ImplementsInterfaces");
function Ir(_ref51) {
  let {
    type: e
  } = _ref51;
  const [t, n] = l.useState(!1),
    s = l.useCallback(() => {
      n(!0);
    }, []);
  if (!M.isObjectType(e) && !M.isInterfaceType(e) && !M.isInputObjectType(e)) return null;
  const o = e.getFields(),
    c = [],
    i = [];
  for (const d of Object.keys(o).map(g => o[g])) d.deprecationReason ? i.push(d) : c.push(d);
  return r.jsxs(r.Fragment, {
    children: [c.length > 0 ? r.jsx(G, {
      title: "Fields",
      children: c.map(d => r.jsx(Et, {
        field: d
      }, d.name))
    }) : null, i.length > 0 ? t || c.length === 0 ? r.jsx(G, {
      title: "Deprecated Fields",
      children: i.map(d => r.jsx(Et, {
        field: d
      }, d.name))
    }) : r.jsx(me, {
      type: "button",
      onClick: s,
      children: "Show Deprecated Fields"
    }) : null]
  });
}
a(Ir, "Fields");
function Et(_ref52) {
  let {
    field: e
  } = _ref52;
  const t = "args" in e ? e.args.filter(n => !n.deprecationReason) : [];
  return r.jsxs("div", {
    className: "graphiql-doc-explorer-item",
    children: [r.jsxs("div", {
      children: [r.jsx(hn, {
        field: e
      }), t.length > 0 ? r.jsxs(r.Fragment, {
        children: ["(", r.jsx("span", {
          children: t.map(n => t.length === 1 ? r.jsx(Ce, {
            arg: n,
            inline: !0
          }, n.name) : r.jsx("div", {
            className: "graphiql-doc-explorer-argument-multiple",
            children: r.jsx(Ce, {
              arg: n,
              inline: !0
            })
          }, n.name))
        }), ")"]
      }) : null, ": ", r.jsx(U, {
        type: e.type
      }), r.jsx(it, {
        field: e
      })]
    }), e.description ? r.jsx(K, {
      type: "description",
      onlyShowFirstChild: !0,
      children: e.description
    }) : null, r.jsx(ht, {
      children: e.deprecationReason
    })]
  });
}
a(Et, "Field");
function Hr(_ref53) {
  let {
    type: e
  } = _ref53;
  const [t, n] = l.useState(!1),
    s = l.useCallback(() => {
      n(!0);
    }, []);
  if (!M.isEnumType(e)) return null;
  const o = [],
    c = [];
  for (const i of e.getValues()) i.deprecationReason ? c.push(i) : o.push(i);
  return r.jsxs(r.Fragment, {
    children: [o.length > 0 ? r.jsx(G, {
      title: "Enum Values",
      children: o.map(i => r.jsx(St, {
        value: i
      }, i.name))
    }) : null, c.length > 0 ? t || o.length === 0 ? r.jsx(G, {
      title: "Deprecated Enum Values",
      children: c.map(i => r.jsx(St, {
        value: i
      }, i.name))
    }) : r.jsx(me, {
      type: "button",
      onClick: s,
      children: "Show Deprecated Values"
    }) : null]
  });
}
a(Hr, "EnumValues");
function St(_ref54) {
  let {
    value: e
  } = _ref54;
  return r.jsxs("div", {
    className: "graphiql-doc-explorer-item",
    children: [r.jsx("div", {
      className: "graphiql-doc-explorer-enum-value",
      children: e.name
    }), e.description ? r.jsx(K, {
      type: "description",
      children: e.description
    }) : null, e.deprecationReason ? r.jsx(K, {
      type: "deprecation",
      children: e.deprecationReason
    }) : null]
  });
}
a(St, "EnumValue");
function Dr(_ref55) {
  let {
    type: e
  } = _ref55;
  const {
    schema: t
  } = X({
    nonNull: !0
  });
  return !t || !M.isAbstractType(e) ? null : r.jsx(G, {
    title: M.isInterfaceType(e) ? "Implementations" : "Possible Types",
    children: t.getPossibleTypes(e).map(n => r.jsx("div", {
      children: r.jsx(U, {
        type: n
      })
    }, n.name))
  });
}
a(Dr, "PossibleTypes");
function Ie() {
  const {
      fetchError: e,
      isFetching: t,
      schema: n,
      validationErrors: s
    } = X({
      nonNull: !0,
      caller: Ie
    }),
    {
      explorerNavStack: o,
      pop: c
    } = te({
      nonNull: !0,
      caller: Ie
    }),
    i = o.at(-1);
  let d = null;
  e ? d = r.jsx("div", {
    className: "graphiql-doc-explorer-error",
    children: "Error fetching schema"
  }) : s.length > 0 ? d = r.jsxs("div", {
    className: "graphiql-doc-explorer-error",
    children: ["Schema is invalid: ", s[0].message]
  }) : t ? d = r.jsx(st, {}) : n ? o.length === 1 ? d = r.jsx(dn, {
    schema: n
  }) : M.isType(i.def) ? d = r.jsx(mn, {
    type: i.def
  }) : i.def && (d = r.jsx(un, {
    field: i.def
  })) : d = r.jsx("div", {
    className: "graphiql-doc-explorer-error",
    children: "No GraphQL schema available"
  });
  let g;
  return o.length > 1 && (g = o.at(-2).name), r.jsxs("section", {
    className: "graphiql-doc-explorer",
    "aria-label": "Documentation Explorer",
    children: [r.jsxs("div", {
      className: "graphiql-doc-explorer-header",
      children: [r.jsxs("div", {
        className: "graphiql-doc-explorer-header-content",
        children: [g && r.jsxs("a", {
          href: "#",
          className: "graphiql-doc-explorer-back",
          onClick: m => {
            m.preventDefault(), c();
          },
          "aria-label": `Go back to ${g}`,
          children: [r.jsx(Rt, {}), g]
        }), r.jsx("div", {
          className: "graphiql-doc-explorer-title",
          children: i.name
        })]
      }), r.jsx(mt, {}, i.name)]
    }), r.jsx("div", {
      className: "graphiql-doc-explorer-content",
      children: d
    })]
  });
}
a(Ie, "DocExplorer");
const de = {
    title: "Documentation Explorer",
    icon: a(function () {
      const t = Ze();
      return (t == null ? void 0 : t.visiblePlugin) === de ? r.jsx(Ht, {}) : r.jsx(Dt, {});
    }, "Icon"),
    content: Ie
  },
  Ye = {
    title: "History",
    icon: Ft,
    content: ln
  },
  ft = le("PluginContext");
function fn(e) {
  const t = se(),
    n = te(),
    s = be(),
    o = !!n,
    c = !!s,
    i = l.useMemo(() => {
      const x = [],
        f = {};
      o && (x.push(de), f[de.title] = !0), c && (x.push(Ye), f[Ye.title] = !0);
      for (const C of e.plugins || []) {
        if (typeof C.title != "string" || !C.title) throw new Error("All GraphiQL plugins must have a unique title");
        if (f[C.title]) throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${C.title}'`);
        x.push(C), f[C.title] = !0;
      }
      return x;
    }, [o, c, e.plugins]),
    [d, g] = l.useState(() => {
      const x = t == null ? void 0 : t.get(Lt),
        f = i.find(C => C.title === x);
      return f || (x && (t == null || t.set(Lt, "")), e.visiblePlugin && i.find(C => (typeof e.visiblePlugin == "string" ? C.title : C) === e.visiblePlugin) || null);
    }),
    {
      onTogglePluginVisibility: m,
      children: p
    } = e,
    y = l.useCallback(x => {
      const f = x && i.find(C => (typeof x == "string" ? C.title : C) === x) || null;
      g(C => f === C ? C : (m == null || m(f), f));
    }, [m, i]);
  l.useEffect(() => {
    e.visiblePlugin && y(e.visiblePlugin);
  }, [i, e.visiblePlugin, y]);
  const h = l.useMemo(() => ({
    plugins: i,
    setVisiblePlugin: y,
    visiblePlugin: d
  }), [i, y, d]);
  return r.jsx(ft.Provider, {
    value: h,
    children: p
  });
}
a(fn, "PluginContextProvider");
const Ze = ie(ft),
  Lt = "visiblePlugin";
function Ar(e, t, n, s, o, c) {
  Ee([], {
    useCommonAddons: !1
  }).then(d => {
    let g, m, p, y, h, x, f, C, E;
    d.on(t, "select", (k, L) => {
      if (!g) {
        const b = L.parentNode;
        g = document.createElement("div"), g.className = "CodeMirror-hint-information", b.append(g);
        const w = document.createElement("header");
        w.className = "CodeMirror-hint-information-header", g.append(w), m = document.createElement("span"), m.className = "CodeMirror-hint-information-field-name", w.append(m), p = document.createElement("span"), p.className = "CodeMirror-hint-information-type-name-pill", w.append(p), y = document.createElement("span"), p.append(y), h = document.createElement("a"), h.className = "CodeMirror-hint-information-type-name", h.href = "javascript:void 0", h.addEventListener("click", i), p.append(h), x = document.createElement("span"), p.append(x), f = document.createElement("div"), f.className = "CodeMirror-hint-information-description", g.append(f), C = document.createElement("div"), C.className = "CodeMirror-hint-information-deprecation", g.append(C);
        const T = document.createElement("span");
        T.className = "CodeMirror-hint-information-deprecation-label", T.textContent = "Deprecated", C.append(T), E = document.createElement("div"), E.className = "CodeMirror-hint-information-deprecation-reason", C.append(E);
        const A = parseInt(window.getComputedStyle(g).paddingBottom.replace(/px$/, ""), 10) || 0,
          F = parseInt(window.getComputedStyle(g).maxHeight.replace(/px$/, ""), 10) || 0,
          I = a(() => {
            g && (g.style.paddingTop = b.scrollTop + A + "px", g.style.maxHeight = b.scrollTop + F + "px");
          }, "handleScroll");
        b.addEventListener("scroll", I);
        let H;
        b.addEventListener("DOMNodeRemoved", H = a(O => {
          O.target === b && (b.removeEventListener("scroll", I), b.removeEventListener("DOMNodeRemoved", H), g && g.removeEventListener("click", i), g = null, m = null, p = null, y = null, h = null, x = null, f = null, C = null, E = null, H = null);
        }, "onRemoveFn"));
      }
      if (m && (m.textContent = k.text), p && y && h && x) if (k.type) {
        p.style.display = "inline";
        const b = a(w => {
          M.isNonNullType(w) ? (x.textContent = "!" + x.textContent, b(w.ofType)) : M.isListType(w) ? (y.textContent += "[", x.textContent = "]" + x.textContent, b(w.ofType)) : h.textContent = w.name;
        }, "renderType");
        y.textContent = "", x.textContent = "", b(k.type);
      } else y.textContent = "", h.textContent = "", x.textContent = "", p.style.display = "none";
      f && (k.description ? (f.style.display = "block", f.innerHTML = Re.render(k.description)) : (f.style.display = "none", f.innerHTML = "")), C && E && (k.deprecationReason ? (C.style.display = "block", E.innerHTML = Re.render(k.deprecationReason)) : (C.style.display = "none", E.innerHTML = ""));
    });
  });
  function i(d) {
    if (!n || !s || !o || !(d.currentTarget instanceof HTMLElement)) return;
    const g = d.currentTarget.textContent || "",
      m = n.getType(g);
    m && (o.setVisiblePlugin(de), s.push({
      name: m.name,
      def: m
    }), c == null || c(m));
  }
  a(i, "onClickHintInformation");
}
a(Ar, "onHasCompletion");
function ke(e, t) {
  l.useEffect(() => {
    e && typeof t == "string" && t !== e.getValue() && e.setValue(t);
  }, [e, t]);
}
a(ke, "useSynchronizeValue");
function $e(e, t, n) {
  l.useEffect(() => {
    e && e.setOption(t, n);
  }, [e, t, n]);
}
a($e, "useSynchronizeOption");
function pn(e, t, n, s, o) {
  const {
      updateActiveTabValues: c
    } = Z({
      nonNull: !0,
      caller: o
    }),
    i = se();
  l.useEffect(() => {
    if (!e) return;
    const d = ue(500, p => {
        !i || n === null || i.set(n, p);
      }),
      g = ue(100, p => {
        c({
          [s]: p
        });
      }),
      m = a((p, y) => {
        if (!y) return;
        const h = p.getValue();
        d(h), g(h), t == null || t(h);
      }, "handleChange");
    return e.on("change", m), () => e.off("change", m);
  }, [t, e, i, n, s, c]);
}
a(pn, "useChangeHandler");
function gn(e, t, n) {
  const {
      schema: s
    } = X({
      nonNull: !0,
      caller: n
    }),
    o = te(),
    c = Ze();
  l.useEffect(() => {
    if (!e) return;
    const i = a((d, g) => {
      Ar(d, g, s, o, c, m => {
        t == null || t({
          kind: "Type",
          type: m,
          schema: s || void 0
        });
      });
    }, "handleCompletion");
    return e.on("hasCompletion", i), () => e.off("hasCompletion", i);
  }, [t, e, o, c, s]);
}
a(gn, "useCompletion");
function Y(e, t, n) {
  l.useEffect(() => {
    if (e) {
      for (const s of t) e.removeKeyMap(s);
      if (n) {
        const s = {};
        for (const o of t) s[o] = () => n();
        e.addKeyMap(s);
      }
    }
  }, [e, t, n]);
}
a(Y, "useKeyMap");
function pt() {
  let {
    caller: e,
    onCopyQuery: t
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  const {
    queryEditor: n
  } = Z({
    nonNull: !0,
    caller: e || pt
  });
  return l.useCallback(() => {
    if (!n) return;
    const s = n.getValue();
    Rn(s), t == null || t(s);
  }, [n, t]);
}
a(pt, "useCopyQuery");
function he() {
  let {
    caller: e
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  const {
      queryEditor: t
    } = Z({
      nonNull: !0,
      caller: e || he
    }),
    {
      schema: n
    } = X({
      nonNull: !0,
      caller: he
    });
  return l.useCallback(() => {
    const s = t == null ? void 0 : t.documentAST,
      o = t == null ? void 0 : t.getValue();
    !s || !o || t.setValue(M.print(B.mergeAst(s, n)));
  }, [t, n]);
}
a(he, "useMergeQuery");
function Se() {
  let {
    caller: e
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  const {
    queryEditor: t,
    headerEditor: n,
    variableEditor: s
  } = Z({
    nonNull: !0,
    caller: e || Se
  });
  return l.useCallback(() => {
    if (s) {
      const o = s.getValue();
      try {
        const c = JSON.stringify(JSON.parse(o), null, 2);
        c !== o && s.setValue(c);
      } catch {}
    }
    if (n) {
      const o = n.getValue();
      try {
        const c = JSON.stringify(JSON.parse(o), null, 2);
        c !== o && n.setValue(c);
      } catch {}
    }
    if (t) {
      const o = t.getValue(),
        c = M.print(M.parse(o));
      c !== o && t.setValue(c);
    }
  }, [t, s, n]);
}
a(Se, "usePrettifyEditors");
function He() {
  let {
    getDefaultFieldNames: e,
    caller: t
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  const {
      schema: n
    } = X({
      nonNull: !0,
      caller: t || He
    }),
    {
      queryEditor: s
    } = Z({
      nonNull: !0,
      caller: t || He
    });
  return l.useCallback(() => {
    if (!s) return;
    const o = s.getValue(),
      {
        insertions: c,
        result: i
      } = B.fillLeafs(n, o, e);
    return c && c.length > 0 && s.operation(() => {
      const d = s.getCursor(),
        g = s.indexFromPos(d);
      s.setValue(i || "");
      let m = 0;
      const p = c.map(_ref56 => {
        let {
          index: h,
          string: x
        } = _ref56;
        return s.markText(s.posFromIndex(h + m), s.posFromIndex(h + (m += x.length)), {
          className: "auto-inserted-leaf",
          clearOnEnter: !0,
          title: "Automatically added leaf fields"
        });
      });
      setTimeout(() => {
        for (const h of p) h.clear();
      }, 7e3);
      let y = g;
      for (const {
        index: h,
        string: x
      } of c) h < g && (y += x.length);
      s.setCursor(s.posFromIndex(y));
    }), i;
  }, [e, s, n]);
}
a(He, "useAutoCompleteLeafs");
const Ge = a(e => {
    var _ref57;
    const n = Z({
      nonNull: !0
    })[`${e}Editor`];
    let s = "";
    const o = (_ref57 = n == null ? void 0 : n.getValue()) !== null && _ref57 !== void 0 ? _ref57 : !1;
    o && o.length > 0 && (s = o);
    const c = l.useCallback(i => n == null ? void 0 : n.setValue(i), [n]);
    return l.useMemo(() => [s, c], [s, c]);
  }, "useEditorState"),
  Or = a(() => Ge("query"), "useOperationsEditorState"),
  Fr = a(() => Ge("variable"), "useVariablesEditorState"),
  Br = a(() => Ge("header"), "useHeadersEditorState");
function Wr(_ref58) {
  let [e, t] = _ref58;
  const n = l.useRef({
      pending: null,
      last: e
    }),
    [s, o] = l.useState(e);
  l.useEffect(() => {
    n.current.last === e || (n.current.last = e, n.current.pending === null ? o(e) : n.current.pending === e ? (n.current.pending = null, e !== s && (n.current.pending = s, t(s))) : (n.current.pending = null, o(e)));
  }, [e, s, t]);
  const c = l.useCallback(i => {
    o(i), n.current.pending === null && n.current.last !== i && (n.current.pending = i, t(i));
  }, [t]);
  return l.useMemo(() => [s, c], [s, c]);
}
a(Wr, "useOptimisticState");
function ce() {
  let {
    editorTheme: e = Be,
    keyMap: t = We,
    onEdit: n,
    readOnly: s = !1
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  let o = arguments.length > 1 ? arguments[1] : undefined;
  const {
      initialHeaders: c,
      headerEditor: i,
      setHeaderEditor: d,
      shouldPersistHeaders: g
    } = Z({
      nonNull: !0,
      caller: o || ce
    }),
    m = we(),
    p = he({
      caller: o || ce
    }),
    y = Se({
      caller: o || ce
    }),
    h = l.useRef(null);
  return l.useEffect(() => {
    let x = !0;
    return Ee([Promise.resolve().then(() => __webpack_require__(/*! ./javascript.cjs.js */ "../../graphiql-react/dist/javascript.cjs.js")).then(f => f.javascript)]).then(f => {
      if (!x) return;
      const C = h.current;
      if (!C) return;
      const E = f(C, {
        value: c,
        lineNumbers: !0,
        tabSize: 2,
        mode: {
          name: "javascript",
          json: !0
        },
        theme: e,
        autoCloseBrackets: !0,
        matchBrackets: !0,
        showCursorWhenSelecting: !0,
        readOnly: s ? "nocursor" : !1,
        foldGutter: !0,
        gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
        extraKeys: _e
      });
      E.addKeyMap({
        "Cmd-Space"() {
          E.showHint({
            completeSingle: !1,
            container: C
          });
        },
        "Ctrl-Space"() {
          E.showHint({
            completeSingle: !1,
            container: C
          });
        },
        "Alt-Space"() {
          E.showHint({
            completeSingle: !1,
            container: C
          });
        },
        "Shift-Space"() {
          E.showHint({
            completeSingle: !1,
            container: C
          });
        }
      }), E.on("keyup", (k, L) => {
        const {
            code: b,
            key: w,
            shiftKey: T
          } = L,
          A = b.startsWith("Key"),
          F = !T && b.startsWith("Digit");
        (A || F || w === "_" || w === '"') && k.execCommand("autocomplete");
      }), d(E);
    }), () => {
      x = !1;
    };
  }, [e, c, s, d]), $e(i, "keyMap", t), pn(i, n, g ? Me : null, "headers", ce), Y(i, ["Cmd-Enter", "Ctrl-Enter"], m == null ? void 0 : m.run), Y(i, ["Shift-Ctrl-P"], y), Y(i, ["Shift-Ctrl-M"], p), h;
}
a(ce, "useHeaderEditor");
const Me = "headers",
  _r = Array.from({
    length: 11
  }, (e, t) => String.fromCharCode(8192 + t)).concat(["\u2028", "\u2029", " ", " "]),
  Zr = new RegExp("[" + _r.join("") + "]", "g");
function $r(e) {
  return e.replace(Zr, " ");
}
a($r, "normalizeWhitespace");
function ne() {
  let {
    editorTheme: e = Be,
    keyMap: t = We,
    onClickReference: n,
    onCopyQuery: s,
    onEdit: o,
    readOnly: c = !1
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  let i = arguments.length > 1 ? arguments[1] : undefined;
  const {
      schema: d
    } = X({
      nonNull: !0,
      caller: i || ne
    }),
    {
      externalFragments: g,
      initialQuery: m,
      queryEditor: p,
      setOperationName: y,
      setQueryEditor: h,
      validationRules: x,
      variableEditor: f,
      updateActiveTabValues: C
    } = Z({
      nonNull: !0,
      caller: i || ne
    }),
    E = we(),
    k = se(),
    L = te(),
    b = Ze(),
    w = pt({
      caller: i || ne,
      onCopyQuery: s
    }),
    T = he({
      caller: i || ne
    }),
    A = Se({
      caller: i || ne
    }),
    F = l.useRef(null),
    I = l.useRef(),
    H = l.useRef(() => {});
  l.useEffect(() => {
    H.current = q => {
      if (!(!L || !b)) {
        switch (b.setVisiblePlugin(de), q.kind) {
          case "Type":
            {
              L.push({
                name: q.type.name,
                def: q.type
              });
              break;
            }
          case "Field":
            {
              L.push({
                name: q.field.name,
                def: q.field
              });
              break;
            }
          case "Argument":
            {
              q.field && L.push({
                name: q.field.name,
                def: q.field
              });
              break;
            }
          case "EnumValue":
            {
              q.type && L.push({
                name: q.type.name,
                def: q.type
              });
              break;
            }
        }
        n == null || n(q);
      }
    };
  }, [L, n, b]), l.useEffect(() => {
    let q = !0;
    return Ee([Promise.resolve().then(() => __webpack_require__(/*! ./comment.cjs.js */ "../../graphiql-react/dist/comment.cjs.js")).then(N => N.comment), Promise.resolve().then(() => __webpack_require__(/*! ./search.cjs.js */ "../../graphiql-react/dist/search.cjs.js")).then(N => N.search), Promise.resolve().then(() => __webpack_require__(/*! ./hint.cjs.js */ "../../graphiql-react/dist/hint.cjs.js")), Promise.resolve().then(() => __webpack_require__(/*! ./lint.cjs2.js */ "../../graphiql-react/dist/lint.cjs2.js")), Promise.resolve().then(() => __webpack_require__(/*! ./info.cjs.js */ "../../graphiql-react/dist/info.cjs.js")), Promise.resolve().then(() => __webpack_require__(/*! ./jump.cjs.js */ "../../graphiql-react/dist/jump.cjs.js")), Promise.resolve().then(() => __webpack_require__(/*! ./mode.cjs.js */ "../../graphiql-react/dist/mode.cjs.js"))]).then(N => {
      if (!q) return;
      I.current = N;
      const P = F.current;
      if (!P) return;
      const S = N(P, {
        value: m,
        lineNumbers: !0,
        tabSize: 2,
        foldGutter: !0,
        mode: "graphql",
        theme: e,
        autoCloseBrackets: !0,
        matchBrackets: !0,
        showCursorWhenSelecting: !0,
        readOnly: c ? "nocursor" : !1,
        lint: {
          schema: void 0,
          validationRules: null,
          externalFragments: void 0
        },
        hintOptions: {
          schema: void 0,
          closeOnUnfocus: !1,
          completeSingle: !1,
          container: P,
          externalFragments: void 0
        },
        info: {
          schema: void 0,
          renderDescription: v => Re.render(v),
          onClick(v) {
            H.current(v);
          }
        },
        jump: {
          schema: void 0,
          onClick(v) {
            H.current(v);
          }
        },
        gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
        extraKeys: {
          ..._e,
          "Cmd-S"() {},
          "Ctrl-S"() {}
        }
      });
      S.addKeyMap({
        "Cmd-Space"() {
          S.showHint({
            completeSingle: !0,
            container: P
          });
        },
        "Ctrl-Space"() {
          S.showHint({
            completeSingle: !0,
            container: P
          });
        },
        "Alt-Space"() {
          S.showHint({
            completeSingle: !0,
            container: P
          });
        },
        "Shift-Space"() {
          S.showHint({
            completeSingle: !0,
            container: P
          });
        },
        "Shift-Alt-Space"() {
          S.showHint({
            completeSingle: !0,
            container: P
          });
        }
      }), S.on("keyup", (v, j) => {
        Ur.test(j.key) && v.execCommand("autocomplete");
      });
      let W = !1;
      S.on("startCompletion", () => {
        W = !0;
      }), S.on("endCompletion", () => {
        W = !1;
      }), S.on("keydown", (v, j) => {
        j.key === "Escape" && W && j.stopPropagation();
      }), S.on("beforeChange", (v, j) => {
        var R;
        if (j.origin === "paste") {
          const $ = j.text.map($r);
          (R = j.update) == null || R.call(j, j.from, j.to, $);
        }
      }), S.documentAST = null, S.operationName = null, S.operations = null, S.variableToType = null, h(S);
    }), () => {
      q = !1;
    };
  }, [e, m, c, h]), $e(p, "keyMap", t), l.useEffect(() => {
    if (!p) return;
    function q(P) {
      var _P$operations, _P$operationName, _ref59, _ref60;
      var v;
      const S = kt.getOperationFacts(d, P.getValue()),
        W = B.getSelectedOperationName((_P$operations = P.operations) !== null && _P$operations !== void 0 ? _P$operations : void 0, (_P$operationName = P.operationName) !== null && _P$operationName !== void 0 ? _P$operationName : void 0, S == null ? void 0 : S.operations);
      return P.documentAST = (_ref59 = S == null ? void 0 : S.documentAST) !== null && _ref59 !== void 0 ? _ref59 : null, P.operationName = W !== null && W !== void 0 ? W : null, P.operations = (_ref60 = S == null ? void 0 : S.operations) !== null && _ref60 !== void 0 ? _ref60 : null, f && (f.state.lint.linterOptions.variableToType = S == null ? void 0 : S.variableToType, f.options.lint.variableToType = S == null ? void 0 : S.variableToType, f.options.hintOptions.variableToType = S == null ? void 0 : S.variableToType, (v = I.current) == null || v.signal(f, "change", f)), S ? {
        ...S,
        operationName: W
      } : null;
    }
    a(q, "getAndUpdateOperationFacts");
    const N = ue(100, P => {
      var _ref61;
      const S = P.getValue();
      k == null || k.set(xn, S);
      const W = P.operationName,
        v = q(P);
      (v == null ? void 0 : v.operationName) !== void 0 && (k == null || k.set(Kr, v.operationName)), o == null || o(S, v == null ? void 0 : v.documentAST), v != null && v.operationName && W !== v.operationName && y(v.operationName), C({
        query: S,
        operationName: (_ref61 = v == null ? void 0 : v.operationName) !== null && _ref61 !== void 0 ? _ref61 : null
      });
    });
    return q(p), p.on("change", N), () => p.off("change", N);
  }, [o, p, d, y, k, f, C]), Gr(p, d !== null && d !== void 0 ? d : null, I), Qr(p, x !== null && x !== void 0 ? x : null, I), zr(p, g, I), gn(p, n || null, ne);
  const O = E == null ? void 0 : E.run,
    D = l.useCallback(() => {
      var P;
      if (!O || !p || !p.operations || !p.hasFocus()) {
        O == null || O();
        return;
      }
      const q = p.indexFromPos(p.getCursor());
      let N;
      for (const S of p.operations) S.loc && S.loc.start <= q && S.loc.end >= q && (N = (P = S.name) == null ? void 0 : P.value);
      N && N !== p.operationName && y(N), O();
    }, [p, O, y]);
  return Y(p, ["Cmd-Enter", "Ctrl-Enter"], D), Y(p, ["Shift-Ctrl-C"], w), Y(p, ["Shift-Ctrl-P", "Shift-Ctrl-F"], A), Y(p, ["Shift-Ctrl-M"], T), F;
}
a(ne, "useQueryEditor");
function Gr(e, t, n) {
  l.useEffect(() => {
    if (!e) return;
    const s = e.options.lint.schema !== t;
    e.state.lint.linterOptions.schema = t, e.options.lint.schema = t, e.options.hintOptions.schema = t, e.options.info.schema = t, e.options.jump.schema = t, s && n.current && n.current.signal(e, "change", e);
  }, [e, t, n]);
}
a(Gr, "useSynchronizeSchema");
function Qr(e, t, n) {
  l.useEffect(() => {
    if (!e) return;
    const s = e.options.lint.validationRules !== t;
    e.state.lint.linterOptions.validationRules = t, e.options.lint.validationRules = t, s && n.current && n.current.signal(e, "change", e);
  }, [e, t, n]);
}
a(Qr, "useSynchronizeValidationRules");
function zr(e, t, n) {
  const s = l.useMemo(() => [...t.values()], [t]);
  l.useEffect(() => {
    if (!e) return;
    const o = e.options.lint.externalFragments !== s;
    e.state.lint.linterOptions.externalFragments = s, e.options.lint.externalFragments = s, e.options.hintOptions.externalFragments = s, o && n.current && n.current.signal(e, "change", e);
  }, [e, s, n]);
}
a(zr, "useSynchronizeExternalFragments");
const Ur = /^[a-zA-Z0-9_@(]$/,
  xn = "query",
  Kr = "operationName";
function Jr(_ref62) {
  let {
    defaultQuery: e,
    defaultHeaders: t,
    headers: n,
    defaultTabs: s,
    query: o,
    variables: c,
    storage: i,
    shouldPersistHeaders: d
  } = _ref62;
  const g = i == null ? void 0 : i.get(ve);
  try {
    if (!g) throw new Error("Storage for tabs is empty");
    const m = JSON.parse(g),
      p = d ? n : void 0;
    if (Yr(m)) {
      const y = De({
        query: o,
        variables: c,
        headers: p
      });
      let h = -1;
      for (let x = 0; x < m.tabs.length; x++) {
        const f = m.tabs[x];
        f.hash = De({
          query: f.query,
          variables: f.variables,
          headers: f.headers
        }), f.hash === y && (h = x);
      }
      if (h >= 0) m.activeTabIndex = h;else {
        const x = o ? gt(o) : null;
        m.tabs.push({
          id: bn(),
          hash: y,
          title: x || xt,
          query: o,
          variables: c,
          headers: n,
          operationName: x,
          response: null
        }), m.activeTabIndex = m.tabs.length - 1;
      }
      return m;
    }
    throw new Error("Storage for tabs is invalid");
  } catch {
    return {
      activeTabIndex: 0,
      tabs: (s || [{
        query: o !== null && o !== void 0 ? o : e,
        variables: c,
        headers: n !== null && n !== void 0 ? n : t
      }]).map(vn)
    };
  }
}
a(Jr, "getDefaultTabState");
function Yr(e) {
  return e && typeof e == "object" && !Array.isArray(e) && es(e, "activeTabIndex") && "tabs" in e && Array.isArray(e.tabs) && e.tabs.every(Xr);
}
a(Yr, "isTabsState");
function Xr(e) {
  return e && typeof e == "object" && !Array.isArray(e) && jt(e, "id") && jt(e, "title") && fe(e, "query") && fe(e, "variables") && fe(e, "headers") && fe(e, "operationName") && fe(e, "response");
}
a(Xr, "isTabState");
function es(e, t) {
  return t in e && typeof e[t] == "number";
}
a(es, "hasNumberKey");
function jt(e, t) {
  return t in e && typeof e[t] == "string";
}
a(jt, "hasStringKey");
function fe(e, t) {
  return t in e && (typeof e[t] == "string" || e[t] === null);
}
a(fe, "hasStringOrNullKey");
function ts(_ref63) {
  let {
    queryEditor: e,
    variableEditor: t,
    headerEditor: n,
    responseEditor: s
  } = _ref63;
  return l.useCallback(o => {
    var _ref64, _ref65, _ref66, _ref67, _ref68;
    const c = (_ref64 = e == null ? void 0 : e.getValue()) !== null && _ref64 !== void 0 ? _ref64 : null,
      i = (_ref65 = t == null ? void 0 : t.getValue()) !== null && _ref65 !== void 0 ? _ref65 : null,
      d = (_ref66 = n == null ? void 0 : n.getValue()) !== null && _ref66 !== void 0 ? _ref66 : null,
      g = (_ref67 = e == null ? void 0 : e.operationName) !== null && _ref67 !== void 0 ? _ref67 : null,
      m = (_ref68 = s == null ? void 0 : s.getValue()) !== null && _ref68 !== void 0 ? _ref68 : null;
    return yn(o, {
      query: c,
      variables: i,
      headers: d,
      response: m,
      operationName: g
    });
  }, [e, t, n, s]);
}
a(ts, "useSynchronizeActiveTabValues");
function Cn(e) {
  let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
  return JSON.stringify(e, (n, s) => n === "hash" || n === "response" || !t && n === "headers" ? null : s);
}
a(Cn, "serializeTabState");
function ns(_ref69) {
  let {
    storage: e,
    shouldPersistHeaders: t
  } = _ref69;
  const n = l.useMemo(() => ue(500, s => {
    e == null || e.set(ve, s);
  }), [e]);
  return l.useCallback(s => {
    n(Cn(s, t));
  }, [t, n]);
}
a(ns, "useStoreTabs");
function rs(_ref70) {
  let {
    queryEditor: e,
    variableEditor: t,
    headerEditor: n,
    responseEditor: s
  } = _ref70;
  return l.useCallback(_ref71 => {
    let {
      query: o,
      variables: c,
      headers: i,
      response: d
    } = _ref71;
    e == null || e.setValue(o !== null && o !== void 0 ? o : ""), t == null || t.setValue(c !== null && c !== void 0 ? c : ""), n == null || n.setValue(i !== null && i !== void 0 ? i : ""), s == null || s.setValue(d !== null && d !== void 0 ? d : "");
  }, [n, e, s, t]);
}
a(rs, "useSetEditorValues");
function vn() {
  let {
    query: e = null,
    variables: t = null,
    headers: n = null
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  return {
    id: bn(),
    hash: De({
      query: e,
      variables: t,
      headers: n
    }),
    title: e && gt(e) || xt,
    query: e,
    variables: t,
    headers: n,
    operationName: null,
    response: null
  };
}
a(vn, "createTab");
function yn(e, t) {
  return {
    ...e,
    tabs: e.tabs.map((n, s) => {
      if (s !== e.activeTabIndex) return n;
      const o = {
        ...n,
        ...t
      };
      return {
        ...o,
        hash: De(o),
        title: o.operationName || (o.query ? gt(o.query) : void 0) || xt
      };
    })
  };
}
a(yn, "setPropertiesInActiveTab");
function bn() {
  const e = a(() => Math.floor((1 + Math.random()) * 65536).toString(16).slice(1), "s4");
  return `${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`;
}
a(bn, "guid");
function De(e) {
  var _e$query, _e$variables, _e$headers;
  return [(_e$query = e.query) !== null && _e$query !== void 0 ? _e$query : "", (_e$variables = e.variables) !== null && _e$variables !== void 0 ? _e$variables : "", (_e$headers = e.headers) !== null && _e$headers !== void 0 ? _e$headers : ""].join("|");
}
a(De, "hashFromTabContents");
function gt(e) {
  var _ref72;
  const n = /^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(e);
  return (_ref72 = n == null ? void 0 : n[2]) !== null && _ref72 !== void 0 ? _ref72 : null;
}
a(gt, "fuzzyExtractOperationName");
function ss(e) {
  const t = e == null ? void 0 : e.get(ve);
  if (t) {
    const n = JSON.parse(t);
    e == null || e.set(ve, JSON.stringify(n, (s, o) => s === "headers" ? null : o));
  }
}
a(ss, "clearHeadersFromTabs");
const xt = "<untitled>",
  ve = "tabState";
function oe() {
  let {
    editorTheme: e = Be,
    keyMap: t = We,
    onClickReference: n,
    onEdit: s,
    readOnly: o = !1
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  let c = arguments.length > 1 ? arguments[1] : undefined;
  const {
      initialVariables: i,
      variableEditor: d,
      setVariableEditor: g
    } = Z({
      nonNull: !0,
      caller: c || oe
    }),
    m = we(),
    p = he({
      caller: c || oe
    }),
    y = Se({
      caller: c || oe
    }),
    h = l.useRef(null),
    x = l.useRef();
  return l.useEffect(() => {
    let f = !0;
    return Ee([Promise.resolve().then(() => __webpack_require__(/*! ./hint.cjs2.js */ "../../graphiql-react/dist/hint.cjs2.js")), Promise.resolve().then(() => __webpack_require__(/*! ./lint.cjs3.js */ "../../graphiql-react/dist/lint.cjs3.js")), Promise.resolve().then(() => __webpack_require__(/*! ./mode.cjs2.js */ "../../graphiql-react/dist/mode.cjs2.js"))]).then(C => {
      if (!f) return;
      x.current = C;
      const E = h.current;
      if (!E) return;
      const k = C(E, {
        value: i,
        lineNumbers: !0,
        tabSize: 2,
        mode: "graphql-variables",
        theme: e,
        autoCloseBrackets: !0,
        matchBrackets: !0,
        showCursorWhenSelecting: !0,
        readOnly: o ? "nocursor" : !1,
        foldGutter: !0,
        lint: {
          variableToType: void 0
        },
        hintOptions: {
          closeOnUnfocus: !1,
          completeSingle: !1,
          container: E,
          variableToType: void 0
        },
        gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
        extraKeys: _e
      });
      k.addKeyMap({
        "Cmd-Space"() {
          k.showHint({
            completeSingle: !1,
            container: E
          });
        },
        "Ctrl-Space"() {
          k.showHint({
            completeSingle: !1,
            container: E
          });
        },
        "Alt-Space"() {
          k.showHint({
            completeSingle: !1,
            container: E
          });
        },
        "Shift-Space"() {
          k.showHint({
            completeSingle: !1,
            container: E
          });
        }
      }), k.on("keyup", (L, b) => {
        const {
            code: w,
            key: T,
            shiftKey: A
          } = b,
          F = w.startsWith("Key"),
          I = !A && w.startsWith("Digit");
        (F || I || T === "_" || T === '"') && L.execCommand("autocomplete");
      }), g(k);
    }), () => {
      f = !1;
    };
  }, [e, i, o, g]), $e(d, "keyMap", t), pn(d, s, wn, "variables", oe), gn(d, n || null, oe), Y(d, ["Cmd-Enter", "Ctrl-Enter"], m == null ? void 0 : m.run), Y(d, ["Shift-Ctrl-P"], y), Y(d, ["Shift-Ctrl-M"], p), h;
}
a(oe, "useVariableEditor");
const wn = "variables",
  Ct = le("EditorContext");
function En(e) {
  const t = se(),
    [n, s] = l.useState(null),
    [o, c] = l.useState(null),
    [i, d] = l.useState(null),
    [g, m] = l.useState(null),
    [p, y] = l.useState(() => {
      const v = (t == null ? void 0 : t.get(ze)) !== null;
      return e.shouldPersistHeaders !== !1 && v ? (t == null ? void 0 : t.get(ze)) === "true" : !!e.shouldPersistHeaders;
    });
  ke(n, e.headers), ke(o, e.query), ke(i, e.response), ke(g, e.variables);
  const h = ns({
      storage: t,
      shouldPersistHeaders: p
    }),
    [x] = l.useState(() => {
      var _ref73, _e$query2, _ref74, _e$variables2, _ref75, _e$headers2, _e$response, _ref76, _ref77;
      const v = (_ref73 = (_e$query2 = e.query) !== null && _e$query2 !== void 0 ? _e$query2 : t == null ? void 0 : t.get(xn)) !== null && _ref73 !== void 0 ? _ref73 : null,
        j = (_ref74 = (_e$variables2 = e.variables) !== null && _e$variables2 !== void 0 ? _e$variables2 : t == null ? void 0 : t.get(wn)) !== null && _ref74 !== void 0 ? _ref74 : null,
        R = (_ref75 = (_e$headers2 = e.headers) !== null && _e$headers2 !== void 0 ? _e$headers2 : t == null ? void 0 : t.get(Me)) !== null && _ref75 !== void 0 ? _ref75 : null,
        $ = (_e$response = e.response) !== null && _e$response !== void 0 ? _e$response : "",
        z = Jr({
          query: v,
          variables: j,
          headers: R,
          defaultTabs: e.defaultTabs,
          defaultQuery: e.defaultQuery || os,
          defaultHeaders: e.defaultHeaders,
          storage: t,
          shouldPersistHeaders: p
        });
      return h(z), {
        query: (_ref76 = v !== null && v !== void 0 ? v : z.activeTabIndex === 0 ? z.tabs[0].query : null) !== null && _ref76 !== void 0 ? _ref76 : "",
        variables: j !== null && j !== void 0 ? j : "",
        headers: (_ref77 = R !== null && R !== void 0 ? R : e.defaultHeaders) !== null && _ref77 !== void 0 ? _ref77 : "",
        response: $,
        tabState: z
      };
    }),
    [f, C] = l.useState(x.tabState),
    E = l.useCallback(v => {
      if (v) {
        var _ref78;
        t == null || t.set(Me, (_ref78 = n == null ? void 0 : n.getValue()) !== null && _ref78 !== void 0 ? _ref78 : "");
        const j = Cn(f, !0);
        t == null || t.set(ve, j);
      } else t == null || t.set(Me, ""), ss(t);
      y(v), t == null || t.set(ze, v.toString());
    }, [t, f, n]),
    k = l.useRef();
  l.useEffect(() => {
    const v = !!e.shouldPersistHeaders;
    (k == null ? void 0 : k.current) !== v && (E(v), k.current = v);
  }, [e.shouldPersistHeaders, E]);
  const L = ts({
      queryEditor: o,
      variableEditor: g,
      headerEditor: n,
      responseEditor: i
    }),
    b = rs({
      queryEditor: o,
      variableEditor: g,
      headerEditor: n,
      responseEditor: i
    }),
    {
      onTabChange: w,
      defaultHeaders: T,
      children: A
    } = e,
    F = l.useCallback(() => {
      C(v => {
        const j = L(v),
          R = {
            tabs: [...j.tabs, vn({
              headers: T
            })],
            activeTabIndex: j.tabs.length
          };
        return h(R), b(R.tabs[R.activeTabIndex]), w == null || w(R), R;
      });
    }, [T, w, b, h, L]),
    I = l.useCallback(v => {
      C(j => {
        const R = {
          ...j,
          activeTabIndex: v
        };
        return h(R), b(R.tabs[R.activeTabIndex]), w == null || w(R), R;
      });
    }, [w, b, h]),
    H = l.useCallback(v => {
      C(j => {
        const R = j.tabs[j.activeTabIndex],
          $ = {
            tabs: v,
            activeTabIndex: v.indexOf(R)
          };
        return h($), b($.tabs[$.activeTabIndex]), w == null || w($), $;
      });
    }, [w, b, h]),
    O = l.useCallback(v => {
      C(j => {
        const R = {
          tabs: j.tabs.filter(($, z) => v !== z),
          activeTabIndex: Math.max(j.activeTabIndex - 1, 0)
        };
        return h(R), b(R.tabs[R.activeTabIndex]), w == null || w(R), R;
      });
    }, [w, b, h]),
    D = l.useCallback(v => {
      C(j => {
        const R = yn(j, v);
        return h(R), w == null || w(R), R;
      });
    }, [w, h]),
    {
      onEditOperationName: q
    } = e,
    N = l.useCallback(v => {
      o && (o.operationName = v, D({
        operationName: v
      }), q == null || q(v));
    }, [q, o, D]),
    P = l.useMemo(() => {
      const v = new Map();
      if (Array.isArray(e.externalFragments)) for (const j of e.externalFragments) v.set(j.name.value, j);else if (typeof e.externalFragments == "string") M.visit(M.parse(e.externalFragments, {}), {
        FragmentDefinition(j) {
          v.set(j.name.value, j);
        }
      });else if (e.externalFragments) throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects.");
      return v;
    }, [e.externalFragments]),
    S = l.useMemo(() => e.validationRules || [], [e.validationRules]),
    W = l.useMemo(() => ({
      ...f,
      addTab: F,
      changeTab: I,
      moveTab: H,
      closeTab: O,
      updateActiveTabValues: D,
      headerEditor: n,
      queryEditor: o,
      responseEditor: i,
      variableEditor: g,
      setHeaderEditor: s,
      setQueryEditor: c,
      setResponseEditor: d,
      setVariableEditor: m,
      setOperationName: N,
      initialQuery: x.query,
      initialVariables: x.variables,
      initialHeaders: x.headers,
      initialResponse: x.response,
      externalFragments: P,
      validationRules: S,
      shouldPersistHeaders: p,
      setShouldPersistHeaders: E
    }), [f, F, I, H, O, D, n, o, i, g, N, x, P, S, p, E]);
  return r.jsx(Ct.Provider, {
    value: W,
    children: A
  });
}
a(En, "EditorContextProvider");
const Z = ie(Ct),
  ze = "shouldPersistHeaders",
  os = `# Welcome to GraphiQL
#
# GraphiQL is an in-browser tool for writing, validating, and
# testing GraphQL queries.
#
# Type queries into this side of the screen, and you will see intelligent
# typeaheads aware of the current GraphQL type schema and live syntax and
# validation errors highlighted within the text.
#
# GraphQL queries typically start with a "{" character. Lines that start
# with a # are ignored.
#
# An example GraphQL query might look like:
#
#     {
#       field(arg: "value") {
#         subField
#       }
#     }
#
# Keyboard shortcuts:
#
#   Prettify query:  Shift-Ctrl-P (or press the prettify button)
#
#  Merge fragments:  Shift-Ctrl-M (or press the merge button)
#
#        Run Query:  Ctrl-Enter (or press the play button)
#
#    Auto Complete:  Ctrl-Space (or just start typing)
#

`;
function Xe(_ref79) {
  let {
    isHidden: e,
    ...t
  } = _ref79;
  const {
      headerEditor: n
    } = Z({
      nonNull: !0,
      caller: Xe
    }),
    s = ce(t, Xe);
  return l.useEffect(() => {
    e || n == null || n.refresh();
  }, [n, e]), r.jsx("div", {
    className: _.clsx("graphiql-editor", e && "hidden"),
    ref: s
  });
}
a(Xe, "HeaderEditor");
function Ae(e) {
  var g;
  const [t, n] = l.useState({
      width: null,
      height: null
    }),
    [s, o] = l.useState(null),
    c = l.useRef(null),
    i = (g = Sn(e.token)) == null ? void 0 : g.href;
  l.useEffect(() => {
    if (c.current) {
      if (!i) {
        n({
          width: null,
          height: null
        }), o(null);
        return;
      }
      fetch(i, {
        method: "HEAD"
      }).then(m => {
        o(m.headers.get("Content-Type"));
      }).catch(() => {
        o(null);
      });
    }
  }, [i]);
  const d = t.width !== null && t.height !== null ? r.jsxs("div", {
    children: [t.width, "x", t.height, s === null ? null : " " + s]
  }) : null;
  return r.jsxs("div", {
    children: [r.jsx("img", {
      onLoad: () => {
        var _ref80, _ref81;
        var m, p;
        n({
          width: (_ref80 = (m = c.current) == null ? void 0 : m.naturalWidth) !== null && _ref80 !== void 0 ? _ref80 : null,
          height: (_ref81 = (p = c.current) == null ? void 0 : p.naturalHeight) !== null && _ref81 !== void 0 ? _ref81 : null
        });
      },
      ref: c,
      src: i
    }), d]
  });
}
a(Ae, "ImagePreview");
Ae.shouldRender = a(function (t) {
  const n = Sn(t);
  return n ? ls(n) : !1;
}, "shouldRender");
function Sn(e) {
  if (e.type !== "string") return;
  const t = e.string.slice(1).slice(0, -1).trim();
  try {
    const {
      location: n
    } = window;
    return new URL(t, n.protocol + "//" + n.host);
  } catch {
    return;
  }
}
a(Sn, "tokenToURL");
function ls(e) {
  return /(bmp|gif|jpeg|jpg|png|svg)$/.test(e.pathname);
}
a(ls, "isImageURL");
function Ln(e) {
  const t = ne(e, Ln);
  return r.jsx("div", {
    className: "graphiql-editor",
    ref: t
  });
}
a(Ln, "QueryEditor");
function Oe() {
  let {
    responseTooltip: e,
    editorTheme: t = Be,
    keyMap: n = We
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  let s = arguments.length > 1 ? arguments[1] : undefined;
  const {
      fetchError: o,
      validationErrors: c
    } = X({
      nonNull: !0,
      caller: s || Oe
    }),
    {
      initialResponse: i,
      responseEditor: d,
      setResponseEditor: g
    } = Z({
      nonNull: !0,
      caller: s || Oe
    }),
    m = l.useRef(null),
    p = l.useRef(e);
  return l.useEffect(() => {
    p.current = e;
  }, [e]), l.useEffect(() => {
    let y = !0;
    return Ee([Promise.resolve().then(() => __webpack_require__(/*! ./foldgutter.cjs.js */ "../../graphiql-react/dist/foldgutter.cjs.js")).then(h => h.foldgutter), Promise.resolve().then(() => __webpack_require__(/*! ./brace-fold.cjs.js */ "../../graphiql-react/dist/brace-fold.cjs.js")).then(h => h.braceFold), Promise.resolve().then(() => __webpack_require__(/*! ./dialog.cjs.js */ "../../graphiql-react/dist/dialog.cjs.js")).then(h => h.dialog), Promise.resolve().then(() => __webpack_require__(/*! ./search.cjs.js */ "../../graphiql-react/dist/search.cjs.js")).then(h => h.search), Promise.resolve().then(() => __webpack_require__(/*! ./searchcursor.cjs.js */ "../../graphiql-react/dist/searchcursor.cjs.js")).then(h => h.searchcursor), Promise.resolve().then(() => __webpack_require__(/*! ./jump-to-line.cjs.js */ "../../graphiql-react/dist/jump-to-line.cjs.js")).then(h => h.jumpToLine), Promise.resolve().then(() => __webpack_require__(/*! ./sublime.cjs.js */ "../../graphiql-react/dist/sublime.cjs.js")).then(h => h.sublime), Promise.resolve().then(() => __webpack_require__(/*! ./mode.cjs3.js */ "../../graphiql-react/dist/mode.cjs3.js")), Promise.resolve().then(() => __webpack_require__(/*! ./info-addon.cjs.js */ "../../graphiql-react/dist/info-addon.cjs.js"))], {
      useCommonAddons: !1
    }).then(h => {
      if (!y) return;
      const x = document.createElement("div");
      h.registerHelper("info", "graphql-results", (E, k, L, b) => {
        const w = [],
          T = p.current;
        return T && w.push(r.jsx(T, {
          pos: b,
          token: E
        })), Ae.shouldRender(E) && w.push(r.jsx(Ae, {
          token: E
        }, "image-preview")), w.length ? (yt.render(w, x), x) : (yt.unmountComponentAtNode(x), null);
      });
      const f = m.current;
      if (!f) return;
      const C = h(f, {
        value: i,
        lineWrapping: !0,
        readOnly: !0,
        theme: t,
        mode: "graphql-results",
        foldGutter: !0,
        gutters: ["CodeMirror-foldgutter"],
        info: !0,
        extraKeys: _e
      });
      g(C);
    }), () => {
      y = !1;
    };
  }, [t, i, g]), $e(d, "keyMap", n), l.useEffect(() => {
    o && (d == null || d.setValue(o)), c.length > 0 && (d == null || d.setValue(B.formatError(c)));
  }, [d, o, c]), m;
}
a(Oe, "useResponseEditor");
function jn(e) {
  const t = Oe(e, jn);
  return r.jsx("section", {
    className: "result-window",
    "aria-label": "Result Window",
    "aria-live": "polite",
    "aria-atomic": "true",
    ref: t
  });
}
a(jn, "ResponseEditor");
function et(_ref82) {
  let {
    isHidden: e,
    ...t
  } = _ref82;
  const {
      variableEditor: n
    } = Z({
      nonNull: !0,
      caller: et
    }),
    s = oe(t, et);
  return l.useEffect(() => {
    n && !e && n.refresh();
  }, [n, e]), r.jsx("div", {
    className: _.clsx("graphiql-editor", e && "hidden"),
    ref: s
  });
}
a(et, "VariableEditor");
function is(_ref83) {
  let {
    children: e,
    dangerouslyAssumeSchemaIsValid: t,
    defaultQuery: n,
    defaultHeaders: s,
    defaultTabs: o,
    externalFragments: c,
    fetcher: i,
    getDefaultFieldNames: d,
    headers: g,
    inputValueDeprecation: m,
    introspectionQueryName: p,
    maxHistoryLength: y,
    onEditOperationName: h,
    onSchemaChange: x,
    onTabChange: f,
    onTogglePluginVisibility: C,
    operationName: E,
    plugins: k,
    query: L,
    response: b,
    schema: w,
    schemaDescription: T,
    shouldPersistHeaders: A,
    storage: F,
    validationRules: I,
    variables: H,
    visiblePlugin: O
  } = _ref83;
  return r.jsx(Tt, {
    storage: F,
    children: r.jsx(on, {
      maxHistoryLength: y,
      children: r.jsx(En, {
        defaultQuery: n,
        defaultHeaders: s,
        defaultTabs: o,
        externalFragments: c,
        headers: g,
        onEditOperationName: h,
        onTabChange: f,
        query: L,
        response: b,
        shouldPersistHeaders: A,
        validationRules: I,
        variables: H,
        children: r.jsx(ct, {
          dangerouslyAssumeSchemaIsValid: t,
          fetcher: i,
          inputValueDeprecation: m,
          introspectionQueryName: p,
          onSchemaChange: x,
          schema: w,
          schemaDescription: T,
          children: r.jsx(qe, {
            getDefaultFieldNames: d,
            fetcher: i,
            operationName: E,
            children: r.jsx(dt, {
              children: r.jsx(fn, {
                onTogglePluginVisibility: C,
                plugins: k,
                visiblePlugin: O,
                children: e
              })
            })
          })
        })
      })
    })
  });
}
a(is, "GraphiQLProvider");
function as() {
  const e = se(),
    [t, n] = l.useState(() => {
      if (!e) return null;
      const o = e.get(Ue);
      switch (o) {
        case "light":
          return "light";
        case "dark":
          return "dark";
        default:
          return typeof o == "string" && e.set(Ue, ""), null;
      }
    });
  l.useLayoutEffect(() => {
    typeof window > "u" || (document.body.classList.remove("graphiql-light", "graphiql-dark"), t && document.body.classList.add(`graphiql-${t}`));
  }, [t]);
  const s = l.useCallback(o => {
    e == null || e.set(Ue, o || ""), n(o);
  }, [e]);
  return l.useMemo(() => ({
    theme: t,
    setTheme: s
  }), [t, s]);
}
a(as, "useTheme");
const Ue = "theme";
function cs(_ref84) {
  let {
    defaultSizeRelation: e = us,
    direction: t,
    initiallyHidden: n,
    onHiddenElementChange: s,
    sizeThresholdFirst: o = 100,
    sizeThresholdSecond: c = 100,
    storageKey: i
  } = _ref84;
  const d = se(),
    g = l.useMemo(() => ue(500, L => {
      i && (d == null || d.set(i, L));
    }), [d, i]),
    [m, p] = l.useState(() => {
      const L = i && (d == null ? void 0 : d.get(i));
      return L === Ne || n === "first" ? "first" : L === Te || n === "second" ? "second" : null;
    }),
    y = l.useCallback(L => {
      L !== m && (p(L), s == null || s(L));
    }, [m, s]),
    h = l.useRef(null),
    x = l.useRef(null),
    f = l.useRef(null),
    C = l.useRef(`${e}`);
  l.useLayoutEffect(() => {
    const L = i && (d == null ? void 0 : d.get(i)) || C.current;
    h.current && (h.current.style.display = "flex", h.current.style.flex = L === Ne || L === Te ? C.current : L), f.current && (f.current.style.display = "flex", f.current.style.flex = "1"), x.current && (x.current.style.display = "flex");
  }, [t, d, i]);
  const E = l.useCallback(L => {
      const b = L === "first" ? h.current : f.current;
      if (b && (b.style.left = "-1000px", b.style.position = "absolute", b.style.opacity = "0", b.style.height = "500px", b.style.width = "500px", h.current)) {
        const w = parseFloat(h.current.style.flex);
        (!Number.isFinite(w) || w < 1) && (h.current.style.flex = "1");
      }
    }, []),
    k = l.useCallback(L => {
      const b = L === "first" ? h.current : f.current;
      if (b && (b.style.width = "", b.style.height = "", b.style.opacity = "", b.style.position = "", b.style.left = "", d && i)) {
        const w = d.get(i);
        h.current && w !== Ne && w !== Te && (h.current.style.flex = w || C.current);
      }
    }, [d, i]);
  return l.useLayoutEffect(() => {
    m === "first" ? E("first") : k("first"), m === "second" ? E("second") : k("second");
  }, [m, E, k]), l.useEffect(() => {
    if (!x.current || !h.current || !f.current) return;
    const L = x.current,
      b = h.current,
      w = b.parentElement,
      T = t === "horizontal" ? "clientX" : "clientY",
      A = t === "horizontal" ? "left" : "top",
      F = t === "horizontal" ? "right" : "bottom",
      I = t === "horizontal" ? "clientWidth" : "clientHeight";
    function H(D) {
      D.preventDefault();
      const q = D[T] - L.getBoundingClientRect()[A];
      function N(S) {
        if (S.buttons === 0) return P();
        const W = S[T] - w.getBoundingClientRect()[A] - q,
          v = w.getBoundingClientRect()[F] - S[T] + q - L[I];
        if (W < o) y("first"), g(Ne);else if (v < c) y("second"), g(Te);else {
          y(null);
          const j = `${W / v}`;
          b.style.flex = j, g(j);
        }
      }
      a(N, "handleMouseMove");
      function P() {
        document.removeEventListener("mousemove", N), document.removeEventListener("mouseup", P);
      }
      a(P, "handleMouseUp"), document.addEventListener("mousemove", N), document.addEventListener("mouseup", P);
    }
    a(H, "handleMouseDown"), L.addEventListener("mousedown", H);
    function O() {
      h.current && (h.current.style.flex = C.current), g(C.current), y(null);
    }
    return a(O, "reset"), L.addEventListener("dblclick", O), () => {
      L.removeEventListener("mousedown", H), L.removeEventListener("dblclick", O);
    };
  }, [t, y, o, c, g]), l.useMemo(() => ({
    dragBarRef: x,
    hiddenElement: m,
    firstRef: h,
    setHiddenElement: p,
    secondRef: f
  }), [m, p]);
}
a(cs, "useDragResize");
const us = 1,
  Ne = "hide-first",
  Te = "hide-second";
const kn = l.forwardRef((_ref85, s) => {
  let {
    label: e,
    onClick: t,
    ...n
  } = _ref85;
  const [o, c] = l.useState(null),
    i = l.useCallback(d => {
      try {
        t == null || t(d), c(null);
      } catch (g) {
        c(g instanceof Error ? g : new Error(`Toolbar button click failed: ${g}`));
      }
    }, [t]);
  return r.jsx(J, {
    label: e,
    children: r.jsx(Q, {
      ...n,
      ref: s,
      type: "button",
      className: _.clsx("graphiql-toolbar-button", o && "error", n.className),
      onClick: i,
      "aria-label": o ? o.message : e,
      "aria-invalid": o ? "true" : n["aria-invalid"]
    })
  });
});
kn.displayName = "ToolbarButton";
function tt() {
  const {
      queryEditor: e,
      setOperationName: t
    } = Z({
      nonNull: !0,
      caller: tt
    }),
    {
      isFetching: n,
      isSubscribed: s,
      operationName: o,
      run: c,
      stop: i
    } = we({
      nonNull: !0,
      caller: tt
    }),
    d = (e == null ? void 0 : e.operations) || [],
    g = d.length > 1 && typeof o != "string",
    m = n || s,
    p = `${m ? "Stop" : "Execute"} query (Ctrl-Enter)`,
    y = {
      type: "button",
      className: "graphiql-execute-button",
      children: m ? r.jsx(zt, {}) : r.jsx(Zt, {}),
      "aria-label": p
    };
  return g && !m ? r.jsxs(ee, {
    children: [r.jsx(J, {
      label: p,
      children: r.jsx(ee.Button, {
        ...y
      })
    }), r.jsx(ee.Content, {
      children: d.map((h, x) => {
        const f = h.name ? h.name.value : `<Unnamed ${h.operation}>`;
        return r.jsx(ee.Item, {
          onSelect: () => {
            var E;
            const C = (E = h.name) == null ? void 0 : E.value;
            e && C && C !== e.operationName && t(C), c();
          },
          children: f
        }, `${f}-${x}`);
      })
    })]
  }) : r.jsx(J, {
    label: p,
    children: r.jsx("button", {
      ...y,
      onClick: () => {
        m ? i() : c();
      }
    })
  });
}
a(tt, "ExecuteButton");
const ds = a(_ref86 => {
    let {
      button: e,
      children: t,
      label: n,
      ...s
    } = _ref86;
    return r.jsxs(ee, {
      ...s,
      children: [r.jsx(J, {
        label: n,
        children: r.jsx(ee.Button, {
          className: _.clsx("graphiql-un-styled graphiql-toolbar-menu", s.className),
          "aria-label": n,
          children: e
        })
      }), r.jsx(ee.Content, {
        children: t
      })]
    });
  }, "ToolbarMenuRoot"),
  hs = ye(ds, {
    Item: ee.Item
  });
exports.Argument = Ce;
exports.ArgumentIcon = Mt;
exports.Button = me;
exports.ButtonGroup = Kt;
exports.ChevronDownIcon = mr;
exports.ChevronLeftIcon = Rt;
exports.ChevronUpIcon = fr;
exports.CloseIcon = Fe;
exports.CopyIcon = pr;
exports.DOC_EXPLORER_PLUGIN = de;
exports.DefaultValue = it;
exports.DeprecatedArgumentIcon = Pt;
exports.DeprecatedEnumValueIcon = qt;
exports.DeprecatedFieldIcon = Vt;
exports.DeprecationReason = ht;
exports.Dialog = wr;
exports.DialogRoot = Yt;
exports.Directive = cn;
exports.DirectiveIcon = It;
exports.DocExplorer = Ie;
exports.DocsFilledIcon = Ht;
exports.DocsIcon = Dt;
exports.DropdownMenu = ee;
exports.EditorContext = Ct;
exports.EditorContextProvider = En;
exports.EnumValueIcon = At;
exports.ExecuteButton = tt;
exports.ExecutionContext = lt;
exports.ExecutionContextProvider = qe;
exports.ExplorerContext = ut;
exports.ExplorerContextProvider = dt;
exports.ExplorerSection = G;
exports.FieldDocumentation = un;
exports.FieldIcon = Ot;
exports.FieldLink = hn;
exports.GraphiQLProvider = is;
exports.HISTORY_PLUGIN = Ye;
exports.HeaderEditor = Xe;
exports.History = ln;
exports.HistoryContext = ot;
exports.HistoryContextProvider = on;
exports.HistoryIcon = Ft;
exports.ImagePreview = Ae;
exports.ImplementsIcon = Bt;
exports.KeyboardShortcutIcon = gr;
exports.MagnifyingGlassIcon = Wt;
exports.MarkdownContent = K;
exports.MergeIcon = xr;
exports.PenIcon = _t;
exports.PlayIcon = Zt;
exports.PluginContext = ft;
exports.PluginContextProvider = fn;
exports.PlusIcon = Cr;
exports.PrettifyIcon = vr;
exports.QueryEditor = Ln;
exports.ReloadIcon = yr;
exports.ResponseEditor = jn;
exports.RootTypeIcon = $t;
exports.SchemaContext = at;
exports.SchemaContextProvider = ct;
exports.SchemaDocumentation = dn;
exports.Search = mt;
exports.SettingsIcon = br;
exports.Spinner = st;
exports.StarFilledIcon = Gt;
exports.StarIcon = Qt;
exports.StopIcon = zt;
exports.StorageContext = rt;
exports.StorageContextProvider = Tt;
exports.Tab = Lr;
exports.Tabs = sn;
exports.ToolbarButton = kn;
exports.ToolbarMenu = hs;
exports.Tooltip = J;
exports.TooltipRoot = en;
exports.TrashIcon = Ut;
exports.TypeDocumentation = mn;
exports.TypeIcon = ge;
exports.TypeLink = U;
exports.UnStyledButton = Q;
exports.VariableEditor = et;
exports.useAutoCompleteLeafs = He;
exports.useCopyQuery = pt;
exports.useDragResize = cs;
exports.useEditorContext = Z;
exports.useEditorState = Ge;
exports.useExecutionContext = we;
exports.useExplorerContext = te;
exports.useHeaderEditor = ce;
exports.useHeadersEditorState = Br;
exports.useHistoryContext = be;
exports.useMergeQuery = he;
exports.useOperationsEditorState = Or;
exports.useOptimisticState = Wr;
exports.usePluginContext = Ze;
exports.usePrettifyEditors = Se;
exports.useQueryEditor = ne;
exports.useResponseEditor = Oe;
exports.useSchemaContext = X;
exports.useStorageContext = se;
exports.useTheme = as;
exports.useVariableEditor = oe;
exports.useVariablesEditorState = Fr;

/***/ }),

/***/ "../../graphiql-react/dist/info-addon.cjs.js":
/*!***************************************************!*\
  !*** ../../graphiql-react/dist/info-addon.cjs.js ***!
  \***************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {



var M = Object.defineProperty;
var i = (e, t) => M(e, "name", {
  value: t,
  configurable: !0
});
const r = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js");
__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
r.CodeMirror.defineOption("info", !1, (e, t, n) => {
  if (n && n !== r.CodeMirror.Init) {
    const o = e.state.info.onMouseOver;
    r.CodeMirror.off(e.getWrapperElement(), "mouseover", o), clearTimeout(e.state.info.hoverTimeout), delete e.state.info;
  }
  if (t) {
    const o = e.state.info = g(t);
    o.onMouseOver = h.bind(null, e), r.CodeMirror.on(e.getWrapperElement(), "mouseover", o.onMouseOver);
  }
});
function g(e) {
  return {
    options: e instanceof Function ? {
      render: e
    } : e === !0 ? {} : e
  };
}
i(g, "createState");
function T(e) {
  const {
    options: t
  } = e.state.info;
  return (t == null ? void 0 : t.hoverTime) || 500;
}
i(T, "getHoverTime");
function h(e, t) {
  const n = e.state.info,
    o = t.target || t.srcElement;
  if (!(o instanceof HTMLElement) || o.nodeName !== "SPAN" || n.hoverTimeout !== void 0) return;
  const s = o.getBoundingClientRect(),
    u = i(function () {
      clearTimeout(n.hoverTimeout), n.hoverTimeout = setTimeout(p, d);
    }, "onMouseMove"),
    f = i(function () {
      r.CodeMirror.off(document, "mousemove", u), r.CodeMirror.off(e.getWrapperElement(), "mouseout", f), clearTimeout(n.hoverTimeout), n.hoverTimeout = void 0;
    }, "onMouseOut"),
    p = i(function () {
      r.CodeMirror.off(document, "mousemove", u), r.CodeMirror.off(e.getWrapperElement(), "mouseout", f), n.hoverTimeout = void 0, C(e, s);
    }, "onHover"),
    d = T(e);
  n.hoverTimeout = setTimeout(p, d), r.CodeMirror.on(document, "mousemove", u), r.CodeMirror.on(e.getWrapperElement(), "mouseout", f);
}
i(h, "onMouseOver");
function C(e, t) {
  const n = e.coordsChar({
      left: (t.left + t.right) / 2,
      top: (t.top + t.bottom) / 2
    }, "window"),
    o = e.state.info,
    {
      options: s
    } = o,
    u = s.render || e.getHelper(n, "info");
  if (u) {
    const f = e.getTokenAt(n, !0);
    if (f) {
      const p = u(f, s, e, n);
      p && w(e, t, p);
    }
  }
}
i(C, "onMouseHover");
function w(e, t, n) {
  const o = document.createElement("div");
  o.className = "CodeMirror-info", o.append(n), document.body.append(o);
  const s = o.getBoundingClientRect(),
    u = window.getComputedStyle(o),
    f = s.right - s.left + parseFloat(u.marginLeft) + parseFloat(u.marginRight),
    p = s.bottom - s.top + parseFloat(u.marginTop) + parseFloat(u.marginBottom);
  let d = t.bottom;
  p > window.innerHeight - t.bottom - 15 && t.top > window.innerHeight - t.bottom && (d = t.top - p), d < 0 && (d = t.bottom);
  let m = Math.max(0, window.innerWidth - f - 15);
  m > t.left && (m = t.left), o.style.opacity = "1", o.style.top = d + "px", o.style.left = m + "px";
  let l;
  const c = i(function () {
      clearTimeout(l);
    }, "onMouseOverPopup"),
    a = i(function () {
      clearTimeout(l), l = setTimeout(v, 200);
    }, "onMouseOut"),
    v = i(function () {
      r.CodeMirror.off(o, "mouseover", c), r.CodeMirror.off(o, "mouseout", a), r.CodeMirror.off(e.getWrapperElement(), "mouseout", a), o.style.opacity ? (o.style.opacity = "0", setTimeout(() => {
        o.parentNode && o.remove();
      }, 600)) : o.parentNode && o.remove();
    }, "hidePopup");
  r.CodeMirror.on(o, "mouseover", c), r.CodeMirror.on(o, "mouseout", a), r.CodeMirror.on(e.getWrapperElement(), "mouseout", a);
}
i(w, "showPopup");

/***/ }),

/***/ "../../graphiql-react/dist/info.cjs.js":
/*!*********************************************!*\
  !*** ../../graphiql-react/dist/info.cjs.js ***!
  \*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {



var v = Object.defineProperty;
var l = (a, e) => v(a, "name", {
  value: e,
  configurable: !0
});
const s = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"),
  D = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"),
  m = __webpack_require__(/*! ./SchemaReference.cjs.js */ "../../graphiql-react/dist/SchemaReference.cjs.js");
__webpack_require__(/*! ./info-addon.cjs.js */ "../../graphiql-react/dist/info-addon.cjs.js");
__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
__webpack_require__(/*! ./forEachState.cjs.js */ "../../graphiql-react/dist/forEachState.cjs.js");
D.CodeMirror.registerHelper("info", "graphql", (a, e) => {
  if (!e.schema || !a.state) return;
  const {
      kind: c,
      step: n
    } = a.state,
    r = m.getTypeInfo(e.schema, a.state);
  if (c === "Field" && n === 0 && r.fieldDef || c === "AliasedField" && n === 2 && r.fieldDef) {
    const i = document.createElement("div");
    i.className = "CodeMirror-info-header", E(i, r, e);
    const d = document.createElement("div");
    return d.append(i), o(d, e, r.fieldDef), d;
  }
  if (c === "Directive" && n === 1 && r.directiveDef) {
    const i = document.createElement("div");
    i.className = "CodeMirror-info-header", h(i, r, e);
    const d = document.createElement("div");
    return d.append(i), o(d, e, r.directiveDef), d;
  }
  if (c === "Argument" && n === 0 && r.argDef) {
    const i = document.createElement("div");
    i.className = "CodeMirror-info-header", T(i, r, e);
    const d = document.createElement("div");
    return d.append(i), o(d, e, r.argDef), d;
  }
  if (c === "EnumValue" && r.enumValue && r.enumValue.description) {
    const i = document.createElement("div");
    i.className = "CodeMirror-info-header", g(i, r, e);
    const d = document.createElement("div");
    return d.append(i), o(d, e, r.enumValue), d;
  }
  if (c === "NamedType" && r.type && r.type.description) {
    const i = document.createElement("div");
    i.className = "CodeMirror-info-header", u(i, r, e, r.type);
    const d = document.createElement("div");
    return d.append(i), o(d, e, r.type), d;
  }
});
function E(a, e, c) {
  N(a, e, c), p(a, e, c, e.type);
}
l(E, "renderField");
function N(a, e, c) {
  var n;
  const r = ((n = e.fieldDef) === null || n === void 0 ? void 0 : n.name) || "";
  t(a, r, "field-name", c, m.getFieldReference(e));
}
l(N, "renderQualifiedField");
function h(a, e, c) {
  var n;
  const r = "@" + (((n = e.directiveDef) === null || n === void 0 ? void 0 : n.name) || "");
  t(a, r, "directive-name", c, m.getDirectiveReference(e));
}
l(h, "renderDirective");
function T(a, e, c) {
  var n;
  const r = ((n = e.argDef) === null || n === void 0 ? void 0 : n.name) || "";
  t(a, r, "arg-name", c, m.getArgumentReference(e)), p(a, e, c, e.inputType);
}
l(T, "renderArg");
function g(a, e, c) {
  var n;
  const r = ((n = e.enumValue) === null || n === void 0 ? void 0 : n.name) || "";
  u(a, e, c, e.inputType), t(a, "."), t(a, r, "enum-value", c, m.getEnumValueReference(e));
}
l(g, "renderEnumValue");
function p(a, e, c, n) {
  const r = document.createElement("span");
  r.className = "type-name-pill", n instanceof s.GraphQLNonNull ? (u(r, e, c, n.ofType), t(r, "!")) : n instanceof s.GraphQLList ? (t(r, "["), u(r, e, c, n.ofType), t(r, "]")) : t(r, (n == null ? void 0 : n.name) || "", "type-name", c, m.getTypeReference(e, n)), a.append(r);
}
l(p, "renderTypeAnnotation");
function u(a, e, c, n) {
  n instanceof s.GraphQLNonNull ? (u(a, e, c, n.ofType), t(a, "!")) : n instanceof s.GraphQLList ? (t(a, "["), u(a, e, c, n.ofType), t(a, "]")) : t(a, (n == null ? void 0 : n.name) || "", "type-name", c, m.getTypeReference(e, n));
}
l(u, "renderType");
function o(a, e, c) {
  const {
    description: n
  } = c;
  if (n) {
    const r = document.createElement("div");
    r.className = "info-description", e.renderDescription ? r.innerHTML = e.renderDescription(n) : r.append(document.createTextNode(n)), a.append(r);
  }
  L(a, e, c);
}
l(o, "renderDescription");
function L(a, e, c) {
  const n = c.deprecationReason;
  if (n) {
    const r = document.createElement("div");
    r.className = "info-deprecation", a.append(r);
    const i = document.createElement("span");
    i.className = "info-deprecation-label", i.append(document.createTextNode("Deprecated")), r.append(i);
    const d = document.createElement("div");
    d.className = "info-deprecation-reason", e.renderDescription ? d.innerHTML = e.renderDescription(n) : d.append(document.createTextNode(n)), r.append(d);
  }
}
l(L, "renderDeprecation");
function t(a, e) {
  let c = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
  let n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {
    onClick: null
  };
  let r = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
  if (c) {
    const {
      onClick: i
    } = n;
    let d;
    i ? (d = document.createElement("a"), d.href = "javascript:void 0", d.addEventListener("click", f => {
      f.preventDefault(), i(r, f);
    })) : d = document.createElement("span"), d.className = c, d.append(document.createTextNode(e)), a.append(d);
  } else a.append(document.createTextNode(e));
}
l(t, "text");

/***/ }),

/***/ "../../graphiql-react/dist/javascript.cjs.js":
/*!***************************************************!*\
  !*** ../../graphiql-react/dist/javascript.cjs.js ***!
  \***************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var ve = Object.defineProperty;
var f = (F, W) => ve(F, "name", {
  value: W,
  configurable: !0
});
const Dr = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
function ge(F, W) {
  for (var w = 0; w < W.length; w++) {
    const M = W[w];
    if (typeof M != "string" && !Array.isArray(M)) {
      for (const h in M) if (h !== "default" && !(h in F)) {
        const A = Object.getOwnPropertyDescriptor(M, h);
        A && Object.defineProperty(F, h, A.get ? A : {
          enumerable: !0,
          get: () => M[h]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(F, Symbol.toStringTag, {
    value: "Module"
  }));
}
f(ge, "_mergeNamespaces");
var ye = {
  exports: {}
};
(function (F, W) {
  (function (w) {
    w(Dr.requireCodemirror());
  })(function (w) {
    w.defineMode("javascript", function (M, h) {
      var A = M.indentUnit,
        vr = h.statementIndent,
        rr = h.jsonld,
        O = h.json || rr,
        gr = h.trackScope !== !1,
        k = h.typescript,
        er = h.wordCharacters || /[\w$\xa1-\uffff]/,
        yr = function () {
          function r(y) {
            return {
              type: y,
              style: "keyword"
            };
          }
          f(r, "kw");
          var e = r("keyword a"),
            t = r("keyword b"),
            a = r("keyword c"),
            o = r("keyword d"),
            d = r("operator"),
            p = {
              type: "atom",
              style: "atom"
            };
          return {
            if: r("if"),
            while: e,
            with: e,
            else: t,
            do: t,
            try: t,
            finally: t,
            return: o,
            break: o,
            continue: o,
            new: r("new"),
            delete: a,
            void: a,
            throw: a,
            debugger: r("debugger"),
            var: r("var"),
            const: r("var"),
            let: r("var"),
            function: r("function"),
            catch: r("catch"),
            for: r("for"),
            switch: r("switch"),
            case: r("case"),
            default: r("default"),
            in: d,
            typeof: d,
            instanceof: d,
            true: p,
            false: p,
            null: p,
            undefined: p,
            NaN: p,
            Infinity: p,
            this: r("this"),
            class: r("class"),
            super: r("atom"),
            yield: a,
            export: r("export"),
            import: r("import"),
            extends: a,
            await: a
          };
        }(),
        jr = /[+\-*&%=<>!?|~^@]/,
        Lr = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
      function Qr(r) {
        for (var e = !1, t, a = !1; (t = r.next()) != null;) {
          if (!e) {
            if (t == "/" && !a) return;
            t == "[" ? a = !0 : a && t == "]" && (a = !1);
          }
          e = !e && t == "\\";
        }
      }
      f(Qr, "readRegexp");
      var K, nr;
      function x(r, e, t) {
        return K = r, nr = t, e;
      }
      f(x, "ret");
      function $(r, e) {
        var t = r.next();
        if (t == '"' || t == "'") return e.tokenize = Rr(t), e.tokenize(r, e);
        if (t == "." && r.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) return x("number", "number");
        if (t == "." && r.match("..")) return x("spread", "meta");
        if (/[\[\]{}\(\),;\:\.]/.test(t)) return x(t);
        if (t == "=" && r.eat(">")) return x("=>", "operator");
        if (t == "0" && r.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) return x("number", "number");
        if (/\d/.test(t)) return r.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/), x("number", "number");
        if (t == "/") return r.eat("*") ? (e.tokenize = tr, tr(r, e)) : r.eat("/") ? (r.skipToEnd(), x("comment", "comment")) : Fr(r, e, 1) ? (Qr(r), r.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/), x("regexp", "string-2")) : (r.eat("="), x("operator", "operator", r.current()));
        if (t == "`") return e.tokenize = H, H(r, e);
        if (t == "#" && r.peek() == "!") return r.skipToEnd(), x("meta", "meta");
        if (t == "#" && r.eatWhile(er)) return x("variable", "property");
        if (t == "<" && r.match("!--") || t == "-" && r.match("->") && !/\S/.test(r.string.slice(0, r.start))) return r.skipToEnd(), x("comment", "comment");
        if (jr.test(t)) return (t != ">" || !e.lexical || e.lexical.type != ">") && (r.eat("=") ? (t == "!" || t == "=") && r.eat("=") : /[<>*+\-|&?]/.test(t) && (r.eat(t), t == ">" && r.eat(t))), t == "?" && r.eat(".") ? x(".") : x("operator", "operator", r.current());
        if (er.test(t)) {
          r.eatWhile(er);
          var a = r.current();
          if (e.lastType != ".") {
            if (yr.propertyIsEnumerable(a)) {
              var o = yr[a];
              return x(o.type, o.style, a);
            }
            if (a == "async" && r.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, !1)) return x("async", "keyword", a);
          }
          return x("variable", "variable", a);
        }
      }
      f($, "tokenBase");
      function Rr(r) {
        return function (e, t) {
          var a = !1,
            o;
          if (rr && e.peek() == "@" && e.match(Lr)) return t.tokenize = $, x("jsonld-keyword", "meta");
          for (; (o = e.next()) != null && !(o == r && !a);) a = !a && o == "\\";
          return a || (t.tokenize = $), x("string", "string");
        };
      }
      f(Rr, "tokenString");
      function tr(r, e) {
        for (var t = !1, a; a = r.next();) {
          if (a == "/" && t) {
            e.tokenize = $;
            break;
          }
          t = a == "*";
        }
        return x("comment", "comment");
      }
      f(tr, "tokenComment");
      function H(r, e) {
        for (var t = !1, a; (a = r.next()) != null;) {
          if (!t && (a == "`" || a == "$" && r.eat("{"))) {
            e.tokenize = $;
            break;
          }
          t = !t && a == "\\";
        }
        return x("quasi", "string-2", r.current());
      }
      f(H, "tokenQuasi");
      var Ur = "([{}])";
      function dr(r, e) {
        e.fatArrowAt && (e.fatArrowAt = null);
        var t = r.string.indexOf("=>", r.start);
        if (!(t < 0)) {
          if (k) {
            var a = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(r.string.slice(r.start, t));
            a && (t = a.index);
          }
          for (var o = 0, d = !1, p = t - 1; p >= 0; --p) {
            var y = r.string.charAt(p),
              V = Ur.indexOf(y);
            if (V >= 0 && V < 3) {
              if (!o) {
                ++p;
                break;
              }
              if (--o == 0) {
                y == "(" && (d = !0);
                break;
              }
            } else if (V >= 3 && V < 6) ++o;else if (er.test(y)) d = !0;else if (/["'\/`]/.test(y)) for (;; --p) {
              if (p == 0) return;
              var he = r.string.charAt(p - 1);
              if (he == y && r.string.charAt(p - 2) != "\\") {
                p--;
                break;
              }
            } else if (d && !o) {
              ++p;
              break;
            }
          }
          d && !o && (e.fatArrowAt = p);
        }
      }
      f(dr, "findFatArrow");
      var Wr = {
        atom: !0,
        number: !0,
        variable: !0,
        string: !0,
        regexp: !0,
        this: !0,
        import: !0,
        "jsonld-keyword": !0
      };
      function Er(r, e, t, a, o, d) {
        this.indented = r, this.column = e, this.type = t, this.prev = o, this.info = d, a != null && (this.align = a);
      }
      f(Er, "JSLexical");
      function Kr(r, e) {
        if (!gr) return !1;
        for (var t = r.localVars; t; t = t.next) if (t.name == e) return !0;
        for (var a = r.context; a; a = a.prev) for (var t = a.vars; t; t = t.next) if (t.name == e) return !0;
      }
      f(Kr, "inScope");
      function Tr(r, e, t, a, o) {
        var d = r.cc;
        for (i.state = r, i.stream = o, i.marked = null, i.cc = d, i.style = e, r.lexical.hasOwnProperty("align") || (r.lexical.align = !0);;) {
          var p = d.length ? d.pop() : O ? b : v;
          if (p(t, a)) {
            for (; d.length && d[d.length - 1].lex;) d.pop()();
            return i.marked ? i.marked : t == "variable" && Kr(r, a) ? "variable-2" : e;
          }
        }
      }
      f(Tr, "parseJS");
      var i = {
        state: null,
        column: null,
        marked: null,
        cc: null
      };
      function s() {
        for (var r = arguments.length - 1; r >= 0; r--) i.cc.push(arguments[r]);
      }
      f(s, "pass");
      function n() {
        return s.apply(null, arguments), !0;
      }
      f(n, "cont");
      function mr(r, e) {
        for (var t = e; t; t = t.next) if (t.name == r) return !0;
        return !1;
      }
      f(mr, "inList");
      function D(r) {
        var e = i.state;
        if (i.marked = "def", !!gr) {
          if (e.context) {
            if (e.lexical.info == "var" && e.context && e.context.block) {
              var t = Ar(r, e.context);
              if (t != null) {
                e.context = t;
                return;
              }
            } else if (!mr(r, e.localVars)) {
              e.localVars = new X(r, e.localVars);
              return;
            }
          }
          h.globalVars && !mr(r, e.globalVars) && (e.globalVars = new X(r, e.globalVars));
        }
      }
      f(D, "register");
      function Ar(r, e) {
        if (e) {
          if (e.block) {
            var t = Ar(r, e.prev);
            return t ? t == e.prev ? e : new G(t, e.vars, !0) : null;
          } else return mr(r, e.vars) ? e : new G(e.prev, new X(r, e.vars), !1);
        } else return null;
      }
      f(Ar, "registerVarScoped");
      function ir(r) {
        return r == "public" || r == "private" || r == "protected" || r == "abstract" || r == "readonly";
      }
      f(ir, "isModifier");
      function G(r, e, t) {
        this.prev = r, this.vars = e, this.block = t;
      }
      f(G, "Context");
      function X(r, e) {
        this.name = r, this.next = e;
      }
      f(X, "Var");
      var Hr = new X("this", new X("arguments", null));
      function q() {
        i.state.context = new G(i.state.context, i.state.localVars, !1), i.state.localVars = Hr;
      }
      f(q, "pushcontext");
      function fr() {
        i.state.context = new G(i.state.context, i.state.localVars, !0), i.state.localVars = null;
      }
      f(fr, "pushblockcontext"), q.lex = fr.lex = !0;
      function E() {
        i.state.localVars = i.state.context.vars, i.state.context = i.state.context.prev;
      }
      f(E, "popcontext"), E.lex = !0;
      function c(r, e) {
        var t = f(function () {
          var a = i.state,
            o = a.indented;
          if (a.lexical.type == "stat") o = a.lexical.indented;else for (var d = a.lexical; d && d.type == ")" && d.align; d = d.prev) o = d.indented;
          a.lexical = new Er(o, i.stream.column(), r, null, a.lexical, e);
        }, "result");
        return t.lex = !0, t;
      }
      f(c, "pushlex");
      function u() {
        var r = i.state;
        r.lexical.prev && (r.lexical.type == ")" && (r.indented = r.lexical.indented), r.lexical = r.lexical.prev);
      }
      f(u, "poplex"), u.lex = !0;
      function l(r) {
        function e(t) {
          return t == r ? n() : r == ";" || t == "}" || t == ")" || t == "]" ? s() : n(e);
        }
        return f(e, "exp"), e;
      }
      f(l, "expect");
      function v(r, e) {
        return r == "var" ? n(c("vardef", e), xr, l(";"), u) : r == "keyword a" ? n(c("form"), pr, v, u) : r == "keyword b" ? n(c("form"), v, u) : r == "keyword d" ? i.stream.match(/^\s*$/, !1) ? n() : n(c("stat"), J, l(";"), u) : r == "debugger" ? n(l(";")) : r == "{" ? n(c("}"), fr, or, u, E) : r == ";" ? n() : r == "if" ? (i.state.lexical.info == "else" && i.state.cc[i.state.cc.length - 1] == u && i.state.cc.pop()(), n(c("form"), pr, v, u, Mr)) : r == "function" ? n(z) : r == "for" ? n(c("form"), fr, Or, v, E, u) : r == "class" || k && e == "interface" ? (i.marked = "keyword", n(c("form", r == "class" ? r : e), qr, u)) : r == "variable" ? k && e == "declare" ? (i.marked = "keyword", n(v)) : k && (e == "module" || e == "enum" || e == "type") && i.stream.match(/^\s*\w/, !1) ? (i.marked = "keyword", e == "enum" ? n(Pr) : e == "type" ? n($r, l("operator"), m, l(";")) : n(c("form"), T, l("{"), c("}"), or, u, u)) : k && e == "namespace" ? (i.marked = "keyword", n(c("form"), b, v, u)) : k && e == "abstract" ? (i.marked = "keyword", n(v)) : n(c("stat"), re) : r == "switch" ? n(c("form"), pr, l("{"), c("}", "switch"), fr, or, u, u, E) : r == "case" ? n(b, l(":")) : r == "default" ? n(l(":")) : r == "catch" ? n(c("form"), q, Gr, v, u, E) : r == "export" ? n(c("stat"), me, u) : r == "import" ? n(c("stat"), pe, u) : r == "async" ? n(v) : e == "@" ? n(b, v) : s(c("stat"), b, l(";"), u);
      }
      f(v, "statement");
      function Gr(r) {
        if (r == "(") return n(P, l(")"));
      }
      f(Gr, "maybeCatchBinding");
      function b(r, e) {
        return Vr(r, e, !1);
      }
      f(b, "expression");
      function j(r, e) {
        return Vr(r, e, !0);
      }
      f(j, "expressionNoComma");
      function pr(r) {
        return r != "(" ? s() : n(c(")"), J, l(")"), u);
      }
      f(pr, "parenExpr");
      function Vr(r, e, t) {
        if (i.state.fatArrowAt == i.stream.start) {
          var a = t ? Sr : Ir;
          if (r == "(") return n(q, c(")"), g(P, ")"), u, l("=>"), a, E);
          if (r == "variable") return s(q, T, l("=>"), a, E);
        }
        var o = t ? L : N;
        return Wr.hasOwnProperty(r) ? n(o) : r == "function" ? n(z, o) : r == "class" || k && e == "interface" ? (i.marked = "keyword", n(c("form"), de, u)) : r == "keyword c" || r == "async" ? n(t ? j : b) : r == "(" ? n(c(")"), J, l(")"), u, o) : r == "operator" || r == "spread" ? n(t ? j : b) : r == "[" ? n(c("]"), be, u, o) : r == "{" ? Y(ur, "}", null, o) : r == "quasi" ? s(ar, o) : r == "new" ? n(Yr(t)) : n();
      }
      f(Vr, "expressionInner");
      function J(r) {
        return r.match(/[;\}\)\],]/) ? s() : s(b);
      }
      f(J, "maybeexpression");
      function N(r, e) {
        return r == "," ? n(J) : L(r, e, !1);
      }
      f(N, "maybeoperatorComma");
      function L(r, e, t) {
        var a = t == !1 ? N : L,
          o = t == !1 ? b : j;
        if (r == "=>") return n(q, t ? Sr : Ir, E);
        if (r == "operator") return /\+\+|--/.test(e) || k && e == "!" ? n(a) : k && e == "<" && i.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, !1) ? n(c(">"), g(m, ">"), u, a) : e == "?" ? n(b, l(":"), o) : n(o);
        if (r == "quasi") return s(ar, a);
        if (r != ";") {
          if (r == "(") return Y(j, ")", "call", a);
          if (r == ".") return n(ee, a);
          if (r == "[") return n(c("]"), J, l("]"), u, a);
          if (k && e == "as") return i.marked = "keyword", n(m, a);
          if (r == "regexp") return i.state.lastType = i.marked = "operator", i.stream.backUp(i.stream.pos - i.stream.start - 1), n(o);
        }
      }
      f(L, "maybeoperatorNoComma");
      function ar(r, e) {
        return r != "quasi" ? s() : e.slice(e.length - 2) != "${" ? n(ar) : n(J, Xr);
      }
      f(ar, "quasi");
      function Xr(r) {
        if (r == "}") return i.marked = "string-2", i.state.tokenize = H, n(ar);
      }
      f(Xr, "continueQuasi");
      function Ir(r) {
        return dr(i.stream, i.state), s(r == "{" ? v : b);
      }
      f(Ir, "arrowBody");
      function Sr(r) {
        return dr(i.stream, i.state), s(r == "{" ? v : j);
      }
      f(Sr, "arrowBodyNoComma");
      function Yr(r) {
        return function (e) {
          return e == "." ? n(r ? Cr : Zr) : e == "variable" && k ? n(ue, r ? L : N) : s(r ? j : b);
        };
      }
      f(Yr, "maybeTarget");
      function Zr(r, e) {
        if (e == "target") return i.marked = "keyword", n(N);
      }
      f(Zr, "target");
      function Cr(r, e) {
        if (e == "target") return i.marked = "keyword", n(L);
      }
      f(Cr, "targetNoComma");
      function re(r) {
        return r == ":" ? n(u, v) : s(N, l(";"), u);
      }
      f(re, "maybelabel");
      function ee(r) {
        if (r == "variable") return i.marked = "property", n();
      }
      f(ee, "property");
      function ur(r, e) {
        if (r == "async") return i.marked = "property", n(ur);
        if (r == "variable" || i.style == "keyword") {
          if (i.marked = "property", e == "get" || e == "set") return n(ne);
          var t;
          return k && i.state.fatArrowAt == i.stream.start && (t = i.stream.match(/^\s*:\s*/, !1)) && (i.state.fatArrowAt = i.stream.pos + t[0].length), n(B);
        } else {
          if (r == "number" || r == "string") return i.marked = rr ? "property" : i.style + " property", n(B);
          if (r == "jsonld-keyword") return n(B);
          if (k && ir(e)) return i.marked = "keyword", n(ur);
          if (r == "[") return n(b, Q, l("]"), B);
          if (r == "spread") return n(j, B);
          if (e == "*") return i.marked = "keyword", n(ur);
          if (r == ":") return s(B);
        }
      }
      f(ur, "objprop");
      function ne(r) {
        return r != "variable" ? s(B) : (i.marked = "property", n(z));
      }
      f(ne, "getterSetter");
      function B(r) {
        if (r == ":") return n(j);
        if (r == "(") return s(z);
      }
      f(B, "afterprop");
      function g(r, e, t) {
        function a(o, d) {
          if (t ? t.indexOf(o) > -1 : o == ",") {
            var p = i.state.lexical;
            return p.info == "call" && (p.pos = (p.pos || 0) + 1), n(function (y, V) {
              return y == e || V == e ? s() : s(r);
            }, a);
          }
          return o == e || d == e ? n() : t && t.indexOf(";") > -1 ? s(r) : n(l(e));
        }
        return f(a, "proceed"), function (o, d) {
          return o == e || d == e ? n() : s(r, a);
        };
      }
      f(g, "commasep");
      function Y(r, e, t) {
        for (var a = 3; a < arguments.length; a++) i.cc.push(arguments[a]);
        return n(c(e, t), g(r, e), u);
      }
      f(Y, "contCommasep");
      function or(r) {
        return r == "}" ? n() : s(v, or);
      }
      f(or, "block");
      function Q(r, e) {
        if (k) {
          if (r == ":") return n(m);
          if (e == "?") return n(Q);
        }
      }
      f(Q, "maybetype");
      function te(r, e) {
        if (k && (r == ":" || e == "in")) return n(m);
      }
      f(te, "maybetypeOrIn");
      function _r(r) {
        if (k && r == ":") return i.stream.match(/^\s*\w+\s+is\b/, !1) ? n(b, ie, m) : n(m);
      }
      f(_r, "mayberettype");
      function ie(r, e) {
        if (e == "is") return i.marked = "keyword", n();
      }
      f(ie, "isKW");
      function m(r, e) {
        if (e == "keyof" || e == "typeof" || e == "infer" || e == "readonly") return i.marked = "keyword", n(e == "typeof" ? j : m);
        if (r == "variable" || e == "void") return i.marked = "type", n(I);
        if (e == "|" || e == "&") return n(m);
        if (r == "string" || r == "number" || r == "atom") return n(I);
        if (r == "[") return n(c("]"), g(m, "]", ","), u, I);
        if (r == "{") return n(c("}"), kr, u, I);
        if (r == "(") return n(g(wr, ")"), fe, I);
        if (r == "<") return n(g(m, ">"), m);
        if (r == "quasi") return s(br, I);
      }
      f(m, "typeexpr");
      function fe(r) {
        if (r == "=>") return n(m);
      }
      f(fe, "maybeReturnType");
      function kr(r) {
        return r.match(/[\}\)\]]/) ? n() : r == "," || r == ";" ? n(kr) : s(Z, kr);
      }
      f(kr, "typeprops");
      function Z(r, e) {
        if (r == "variable" || i.style == "keyword") return i.marked = "property", n(Z);
        if (e == "?" || r == "number" || r == "string") return n(Z);
        if (r == ":") return n(m);
        if (r == "[") return n(l("variable"), te, l("]"), Z);
        if (r == "(") return s(U, Z);
        if (!r.match(/[;\}\)\],]/)) return n();
      }
      f(Z, "typeprop");
      function br(r, e) {
        return r != "quasi" ? s() : e.slice(e.length - 2) != "${" ? n(br) : n(m, ae);
      }
      f(br, "quasiType");
      function ae(r) {
        if (r == "}") return i.marked = "string-2", i.state.tokenize = H, n(br);
      }
      f(ae, "continueQuasiType");
      function wr(r, e) {
        return r == "variable" && i.stream.match(/^\s*[?:]/, !1) || e == "?" ? n(wr) : r == ":" ? n(m) : r == "spread" ? n(wr) : s(m);
      }
      f(wr, "typearg");
      function I(r, e) {
        if (e == "<") return n(c(">"), g(m, ">"), u, I);
        if (e == "|" || r == "." || e == "&") return n(m);
        if (r == "[") return n(m, l("]"), I);
        if (e == "extends" || e == "implements") return i.marked = "keyword", n(m);
        if (e == "?") return n(m, l(":"), m);
      }
      f(I, "afterType");
      function ue(r, e) {
        if (e == "<") return n(c(">"), g(m, ">"), u, I);
      }
      f(ue, "maybeTypeArgs");
      function sr() {
        return s(m, oe);
      }
      f(sr, "typeparam");
      function oe(r, e) {
        if (e == "=") return n(m);
      }
      f(oe, "maybeTypeDefault");
      function xr(r, e) {
        return e == "enum" ? (i.marked = "keyword", n(Pr)) : s(T, Q, _, ce);
      }
      f(xr, "vardef");
      function T(r, e) {
        if (k && ir(e)) return i.marked = "keyword", n(T);
        if (r == "variable") return D(e), n();
        if (r == "spread") return n(T);
        if (r == "[") return Y(se, "]");
        if (r == "{") return Y(zr, "}");
      }
      f(T, "pattern");
      function zr(r, e) {
        return r == "variable" && !i.stream.match(/^\s*:/, !1) ? (D(e), n(_)) : (r == "variable" && (i.marked = "property"), r == "spread" ? n(T) : r == "}" ? s() : r == "[" ? n(b, l("]"), l(":"), zr) : n(l(":"), T, _));
      }
      f(zr, "proppattern");
      function se() {
        return s(T, _);
      }
      f(se, "eltpattern");
      function _(r, e) {
        if (e == "=") return n(j);
      }
      f(_, "maybeAssign");
      function ce(r) {
        if (r == ",") return n(xr);
      }
      f(ce, "vardefCont");
      function Mr(r, e) {
        if (r == "keyword b" && e == "else") return n(c("form", "else"), v, u);
      }
      f(Mr, "maybeelse");
      function Or(r, e) {
        if (e == "await") return n(Or);
        if (r == "(") return n(c(")"), le, u);
      }
      f(Or, "forspec");
      function le(r) {
        return r == "var" ? n(xr, R) : r == "variable" ? n(R) : s(R);
      }
      f(le, "forspec1");
      function R(r, e) {
        return r == ")" ? n() : r == ";" ? n(R) : e == "in" || e == "of" ? (i.marked = "keyword", n(b, R)) : s(b, R);
      }
      f(R, "forspec2");
      function z(r, e) {
        if (e == "*") return i.marked = "keyword", n(z);
        if (r == "variable") return D(e), n(z);
        if (r == "(") return n(q, c(")"), g(P, ")"), u, _r, v, E);
        if (k && e == "<") return n(c(">"), g(sr, ">"), u, z);
      }
      f(z, "functiondef");
      function U(r, e) {
        if (e == "*") return i.marked = "keyword", n(U);
        if (r == "variable") return D(e), n(U);
        if (r == "(") return n(q, c(")"), g(P, ")"), u, _r, E);
        if (k && e == "<") return n(c(">"), g(sr, ">"), u, U);
      }
      f(U, "functiondecl");
      function $r(r, e) {
        if (r == "keyword" || r == "variable") return i.marked = "type", n($r);
        if (e == "<") return n(c(">"), g(sr, ">"), u);
      }
      f($r, "typename");
      function P(r, e) {
        return e == "@" && n(b, P), r == "spread" ? n(P) : k && ir(e) ? (i.marked = "keyword", n(P)) : k && r == "this" ? n(Q, _) : s(T, Q, _);
      }
      f(P, "funarg");
      function de(r, e) {
        return r == "variable" ? qr(r, e) : cr(r, e);
      }
      f(de, "classExpression");
      function qr(r, e) {
        if (r == "variable") return D(e), n(cr);
      }
      f(qr, "className");
      function cr(r, e) {
        if (e == "<") return n(c(">"), g(sr, ">"), u, cr);
        if (e == "extends" || e == "implements" || k && r == ",") return e == "implements" && (i.marked = "keyword"), n(k ? m : b, cr);
        if (r == "{") return n(c("}"), S, u);
      }
      f(cr, "classNameAfter");
      function S(r, e) {
        if (r == "async" || r == "variable" && (e == "static" || e == "get" || e == "set" || k && ir(e)) && i.stream.match(/^\s+[\w$\xa1-\uffff]/, !1)) return i.marked = "keyword", n(S);
        if (r == "variable" || i.style == "keyword") return i.marked = "property", n(C, S);
        if (r == "number" || r == "string") return n(C, S);
        if (r == "[") return n(b, Q, l("]"), C, S);
        if (e == "*") return i.marked = "keyword", n(S);
        if (k && r == "(") return s(U, S);
        if (r == ";" || r == ",") return n(S);
        if (r == "}") return n();
        if (e == "@") return n(b, S);
      }
      f(S, "classBody");
      function C(r, e) {
        if (e == "!" || e == "?") return n(C);
        if (r == ":") return n(m, _);
        if (e == "=") return n(j);
        var t = i.state.lexical.prev,
          a = t && t.info == "interface";
        return s(a ? U : z);
      }
      f(C, "classfield");
      function me(r, e) {
        return e == "*" ? (i.marked = "keyword", n(hr, l(";"))) : e == "default" ? (i.marked = "keyword", n(b, l(";"))) : r == "{" ? n(g(Nr, "}"), hr, l(";")) : s(v);
      }
      f(me, "afterExport");
      function Nr(r, e) {
        if (e == "as") return i.marked = "keyword", n(l("variable"));
        if (r == "variable") return s(j, Nr);
      }
      f(Nr, "exportField");
      function pe(r) {
        return r == "string" ? n() : r == "(" ? s(b) : r == "." ? s(N) : s(lr, Br, hr);
      }
      f(pe, "afterImport");
      function lr(r, e) {
        return r == "{" ? Y(lr, "}") : (r == "variable" && D(e), e == "*" && (i.marked = "keyword"), n(ke));
      }
      f(lr, "importSpec");
      function Br(r) {
        if (r == ",") return n(lr, Br);
      }
      f(Br, "maybeMoreImports");
      function ke(r, e) {
        if (e == "as") return i.marked = "keyword", n(lr);
      }
      f(ke, "maybeAs");
      function hr(r, e) {
        if (e == "from") return i.marked = "keyword", n(b);
      }
      f(hr, "maybeFrom");
      function be(r) {
        return r == "]" ? n() : s(g(j, "]"));
      }
      f(be, "arrayLiteral");
      function Pr() {
        return s(c("form"), T, l("{"), c("}"), g(we, "}"), u, u);
      }
      f(Pr, "enumdef");
      function we() {
        return s(T, _);
      }
      f(we, "enummember");
      function xe(r, e) {
        return r.lastType == "operator" || r.lastType == "," || jr.test(e.charAt(0)) || /[,.]/.test(e.charAt(0));
      }
      f(xe, "isContinuedStatement");
      function Fr(r, e, t) {
        return e.tokenize == $ && /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType) || e.lastType == "quasi" && /\{\s*$/.test(r.string.slice(0, r.pos - (t || 0)));
      }
      return f(Fr, "expressionAllowed"), {
        startState: function (r) {
          var e = {
            tokenize: $,
            lastType: "sof",
            cc: [],
            lexical: new Er((r || 0) - A, 0, "block", !1),
            localVars: h.localVars,
            context: h.localVars && new G(null, null, !1),
            indented: r || 0
          };
          return h.globalVars && typeof h.globalVars == "object" && (e.globalVars = h.globalVars), e;
        },
        token: function (r, e) {
          if (r.sol() && (e.lexical.hasOwnProperty("align") || (e.lexical.align = !1), e.indented = r.indentation(), dr(r, e)), e.tokenize != tr && r.eatSpace()) return null;
          var t = e.tokenize(r, e);
          return K == "comment" ? t : (e.lastType = K == "operator" && (nr == "++" || nr == "--") ? "incdec" : K, Tr(e, t, K, nr, r));
        },
        indent: function (r, e) {
          if (r.tokenize == tr || r.tokenize == H) return w.Pass;
          if (r.tokenize != $) return 0;
          var t = e && e.charAt(0),
            a = r.lexical,
            o;
          if (!/^\s*else\b/.test(e)) for (var d = r.cc.length - 1; d >= 0; --d) {
            var p = r.cc[d];
            if (p == u) a = a.prev;else if (p != Mr && p != E) break;
          }
          for (; (a.type == "stat" || a.type == "form") && (t == "}" || (o = r.cc[r.cc.length - 1]) && (o == N || o == L) && !/^[,\.=+\-*:?[\(]/.test(e));) a = a.prev;
          vr && a.type == ")" && a.prev.type == "stat" && (a = a.prev);
          var y = a.type,
            V = t == y;
          return y == "vardef" ? a.indented + (r.lastType == "operator" || r.lastType == "," ? a.info.length + 1 : 0) : y == "form" && t == "{" ? a.indented : y == "form" ? a.indented + A : y == "stat" ? a.indented + (xe(r, e) ? vr || A : 0) : a.info == "switch" && !V && h.doubleIndentSwitch != !1 ? a.indented + (/^(?:case|default)\b/.test(e) ? A : 2 * A) : a.align ? a.column + (V ? 0 : 1) : a.indented + (V ? 0 : A);
        },
        electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
        blockCommentStart: O ? null : "/*",
        blockCommentEnd: O ? null : "*/",
        blockCommentContinue: O ? null : " * ",
        lineComment: O ? null : "//",
        fold: "brace",
        closeBrackets: "()[]{}''\"\"``",
        helperType: O ? "json" : "javascript",
        jsonldMode: rr,
        jsonMode: O,
        expressionAllowed: Fr,
        skipExpression: function (r) {
          Tr(r, "atom", "atom", "true", new w.StringStream("", 2, null));
        }
      };
    }), w.registerHelper("wordChars", "javascript", /[\w$]/), w.defineMIME("text/javascript", "javascript"), w.defineMIME("text/ecmascript", "javascript"), w.defineMIME("application/javascript", "javascript"), w.defineMIME("application/x-javascript", "javascript"), w.defineMIME("application/ecmascript", "javascript"), w.defineMIME("application/json", {
      name: "javascript",
      json: !0
    }), w.defineMIME("application/x-json", {
      name: "javascript",
      json: !0
    }), w.defineMIME("application/manifest+json", {
      name: "javascript",
      json: !0
    }), w.defineMIME("application/ld+json", {
      name: "javascript",
      jsonld: !0
    }), w.defineMIME("text/typescript", {
      name: "javascript",
      typescript: !0
    }), w.defineMIME("application/typescript", {
      name: "javascript",
      typescript: !0
    });
  });
})();
var Jr = ye.exports;
const je = Dr.getDefaultExportFromCjs(Jr),
  Ee = ge({
    __proto__: null,
    default: je
  }, [Jr]);
exports.javascript = Ee;

/***/ }),

/***/ "../../graphiql-react/dist/jump-to-line.cjs.js":
/*!*****************************************************!*\
  !*** ../../graphiql-react/dist/jump-to-line.cjs.js ***!
  \*****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var m = Object.defineProperty;
var c = (u, p) => m(u, "name", {
  value: p,
  configurable: !0
});
const f = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"),
  g = __webpack_require__(/*! ./dialog.cjs.js */ "../../graphiql-react/dist/dialog.cjs.js");
function h(u, p) {
  for (var o = 0; o < p.length; o++) {
    const s = p[o];
    if (typeof s != "string" && !Array.isArray(s)) {
      for (const i in s) if (i !== "default" && !(i in u)) {
        const a = Object.getOwnPropertyDescriptor(s, i);
        a && Object.defineProperty(u, i, a.get ? a : {
          enumerable: !0,
          get: () => s[i]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(u, Symbol.toStringTag, {
    value: "Module"
  }));
}
c(h, "_mergeNamespaces");
var b = {
  exports: {}
};
(function (u, p) {
  (function (o) {
    o(f.requireCodemirror(), g.dialogExports);
  })(function (o) {
    o.defineOption("search", {
      bottom: !1
    });
    function s(e, r, n, t, l) {
      e.openDialog ? e.openDialog(r, l, {
        value: t,
        selectValueOnOpen: !0,
        bottom: e.options.search.bottom
      }) : l(prompt(n, t));
    }
    c(s, "dialog");
    function i(e) {
      return e.phrase("Jump to line:") + ' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">' + e.phrase("(Use line:column or scroll% syntax)") + "</span>";
    }
    c(i, "getJumpDialog");
    function a(e, r) {
      var n = Number(r);
      return /^[-+]/.test(r) ? e.getCursor().line + n : n - 1;
    }
    c(a, "interpretLine"), o.commands.jumpToLine = function (e) {
      var r = e.getCursor();
      s(e, i(e), e.phrase("Jump to line:"), r.line + 1 + ":" + r.ch, function (n) {
        if (n) {
          var t;
          if (t = /^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(n)) e.setCursor(a(e, t[1]), Number(t[2]));else if (t = /^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(n)) {
            var l = Math.round(e.lineCount() * Number(t[1]) / 100);
            /^[-+]/.test(t[1]) && (l = r.line + l + 1), e.setCursor(l - 1, r.ch);
          } else (t = /^\s*\:?\s*([\+\-]?\d+)\s*/.exec(n)) && e.setCursor(a(e, t[1]), r.ch);
        }
      });
    }, o.keyMap.default["Alt-G"] = "jumpToLine";
  });
})();
var d = b.exports;
const j = f.getDefaultExportFromCjs(d),
  y = h({
    __proto__: null,
    default: j
  }, [d]);
exports.jumpToLine = y;

/***/ }),

/***/ "../../graphiql-react/dist/jump.cjs.js":
/*!*********************************************!*\
  !*** ../../graphiql-react/dist/jump.cjs.js ***!
  \*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {



var c = Object.defineProperty;
var s = (e, r) => c(e, "name", {
  value: r,
  configurable: !0
});
const u = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"),
  d = __webpack_require__(/*! ./SchemaReference.cjs.js */ "../../graphiql-react/dist/SchemaReference.cjs.js");
__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
__webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
__webpack_require__(/*! ./forEachState.cjs.js */ "../../graphiql-react/dist/forEachState.cjs.js");
u.CodeMirror.defineOption("jump", !1, (e, r, n) => {
  if (n && n !== u.CodeMirror.Init) {
    const t = e.state.jump.onMouseOver;
    u.CodeMirror.off(e.getWrapperElement(), "mouseover", t);
    const i = e.state.jump.onMouseOut;
    u.CodeMirror.off(e.getWrapperElement(), "mouseout", i), u.CodeMirror.off(document, "keydown", e.state.jump.onKeyDown), delete e.state.jump;
  }
  if (r) {
    const t = e.state.jump = {
      options: r,
      onMouseOver: M.bind(null, e),
      onMouseOut: m.bind(null, e),
      onKeyDown: g.bind(null, e)
    };
    u.CodeMirror.on(e.getWrapperElement(), "mouseover", t.onMouseOver), u.CodeMirror.on(e.getWrapperElement(), "mouseout", t.onMouseOut), u.CodeMirror.on(document, "keydown", t.onKeyDown);
  }
});
function M(e, r) {
  const n = r.target || r.srcElement;
  if (!(n instanceof HTMLElement) || (n == null ? void 0 : n.nodeName) !== "SPAN") return;
  const t = n.getBoundingClientRect(),
    i = {
      left: (t.left + t.right) / 2,
      top: (t.top + t.bottom) / 2
    };
  e.state.jump.cursor = i, e.state.jump.isHoldingModifier && l(e);
}
s(M, "onMouseOver");
function m(e) {
  if (!e.state.jump.isHoldingModifier && e.state.jump.cursor) {
    e.state.jump.cursor = null;
    return;
  }
  e.state.jump.isHoldingModifier && e.state.jump.marker && p(e);
}
s(m, "onMouseOut");
function g(e, r) {
  if (e.state.jump.isHoldingModifier || !k(r.key)) return;
  e.state.jump.isHoldingModifier = !0, e.state.jump.cursor && l(e);
  const n = s(o => {
      o.code === r.code && (e.state.jump.isHoldingModifier = !1, e.state.jump.marker && p(e), u.CodeMirror.off(document, "keyup", n), u.CodeMirror.off(document, "click", t), e.off("mousedown", i));
    }, "onKeyUp"),
    t = s(o => {
      const {
        destination: a,
        options: f
      } = e.state.jump;
      a && f.onClick(a, o);
    }, "onClick"),
    i = s((o, a) => {
      e.state.jump.destination && (a.codemirrorIgnore = !0);
    }, "onMouseDown");
  u.CodeMirror.on(document, "keyup", n), u.CodeMirror.on(document, "click", t), e.on("mousedown", i);
}
s(g, "onKeyDown");
const j = typeof navigator < "u" && navigator && navigator.appVersion.includes("Mac");
function k(e) {
  return e === (j ? "Meta" : "Control");
}
s(k, "isJumpModifier");
function l(e) {
  if (e.state.jump.marker) return;
  const {
      cursor: r,
      options: n
    } = e.state.jump,
    t = e.coordsChar(r),
    i = e.getTokenAt(t, !0),
    o = n.getDestination || e.getHelper(t, "jump");
  if (o) {
    const a = o(i, n, e);
    if (a) {
      const f = e.markText({
        line: t.line,
        ch: i.start
      }, {
        line: t.line,
        ch: i.end
      }, {
        className: "CodeMirror-jump-token"
      });
      e.state.jump.marker = f, e.state.jump.destination = a;
    }
  }
}
s(l, "enableJumpMode");
function p(e) {
  const {
    marker: r
  } = e.state.jump;
  e.state.jump.marker = null, e.state.jump.destination = null, r.clear();
}
s(p, "disableJumpMode");
u.CodeMirror.registerHelper("jump", "graphql", (e, r) => {
  if (!r.schema || !r.onClick || !e.state) return;
  const {
      state: n
    } = e,
    {
      kind: t,
      step: i
    } = n,
    o = d.getTypeInfo(r.schema, n);
  if (t === "Field" && i === 0 && o.fieldDef || t === "AliasedField" && i === 2 && o.fieldDef) return d.getFieldReference(o);
  if (t === "Directive" && i === 1 && o.directiveDef) return d.getDirectiveReference(o);
  if (t === "Argument" && i === 0 && o.argDef) return d.getArgumentReference(o);
  if (t === "EnumValue" && o.enumValue) return d.getEnumValueReference(o);
  if (t === "NamedType" && o.type) return d.getTypeReference(o);
});

/***/ }),

/***/ "../../graphiql-react/dist/lint.cjs.js":
/*!*********************************************!*\
  !*** ../../graphiql-react/dist/lint.cjs.js ***!
  \*********************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var W = Object.defineProperty;
var s = (h, v) => W(h, "name", {
  value: v,
  configurable: !0
});
const x = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
function q(h, v) {
  for (var l = 0; l < v.length; l++) {
    const u = v[l];
    if (typeof u != "string" && !Array.isArray(u)) {
      for (const g in u) if (g !== "default" && !(g in h)) {
        const c = Object.getOwnPropertyDescriptor(u, g);
        c && Object.defineProperty(h, g, c.get ? c : {
          enumerable: !0,
          get: () => u[g]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(h, Symbol.toStringTag, {
    value: "Module"
  }));
}
s(q, "_mergeNamespaces");
var B = {
  exports: {}
};
(function (h, v) {
  (function (l) {
    l(x.requireCodemirror());
  })(function (l) {
    var u = "CodeMirror-lint-markers",
      g = "CodeMirror-lint-line-";
    function c(t, e, r) {
      var n = document.createElement("div");
      n.className = "CodeMirror-lint-tooltip cm-s-" + t.options.theme, n.appendChild(r.cloneNode(!0)), t.state.lint.options.selfContain ? t.getWrapperElement().appendChild(n) : document.body.appendChild(n);
      function i(o) {
        if (!n.parentNode) return l.off(document, "mousemove", i);
        n.style.top = Math.max(0, o.clientY - n.offsetHeight - 5) + "px", n.style.left = o.clientX + 5 + "px";
      }
      return s(i, "position"), l.on(document, "mousemove", i), i(e), n.style.opacity != null && (n.style.opacity = 1), n;
    }
    s(c, "showTooltip");
    function L(t) {
      t.parentNode && t.parentNode.removeChild(t);
    }
    s(L, "rm");
    function A(t) {
      t.parentNode && (t.style.opacity == null && L(t), t.style.opacity = 0, setTimeout(function () {
        L(t);
      }, 600));
    }
    s(A, "hideTooltip");
    function M(t, e, r, n) {
      var i = c(t, e, r);
      function o() {
        l.off(n, "mouseout", o), i && (A(i), i = null);
      }
      s(o, "hide");
      var a = setInterval(function () {
        if (i) for (var f = n;; f = f.parentNode) {
          if (f && f.nodeType == 11 && (f = f.host), f == document.body) return;
          if (!f) {
            o();
            break;
          }
        }
        if (!i) return clearInterval(a);
      }, 400);
      l.on(n, "mouseout", o);
    }
    s(M, "showTooltipFor");
    function F(t, e, r) {
      this.marked = [], e instanceof Function && (e = {
        getAnnotations: e
      }), (!e || e === !0) && (e = {}), this.options = {}, this.linterOptions = e.options || {};
      for (var n in C) this.options[n] = C[n];
      for (var n in e) C.hasOwnProperty(n) ? e[n] != null && (this.options[n] = e[n]) : e.options || (this.linterOptions[n] = e[n]);
      this.timeout = null, this.hasGutter = r, this.onMouseOver = function (i) {
        U(t, i);
      }, this.waitingFor = 0;
    }
    s(F, "LintState");
    var C = {
      highlightLines: !1,
      tooltips: !0,
      delay: 500,
      lintOnChange: !0,
      getAnnotations: null,
      async: !1,
      selfContain: null,
      formatAnnotation: null,
      onUpdateLinting: null
    };
    function E(t) {
      var e = t.state.lint;
      e.hasGutter && t.clearGutter(u), e.options.highlightLines && G(t);
      for (var r = 0; r < e.marked.length; ++r) e.marked[r].clear();
      e.marked.length = 0;
    }
    s(E, "clearMarks");
    function G(t) {
      t.eachLine(function (e) {
        var r = e.wrapClass && /\bCodeMirror-lint-line-\w+\b/.exec(e.wrapClass);
        r && t.removeLineClass(e, "wrap", r[0]);
      });
    }
    s(G, "clearErrorLines");
    function I(t, e, r, n, i) {
      var o = document.createElement("div"),
        a = o;
      return o.className = "CodeMirror-lint-marker CodeMirror-lint-marker-" + r, n && (a = o.appendChild(document.createElement("div")), a.className = "CodeMirror-lint-marker CodeMirror-lint-marker-multiple"), i != !1 && l.on(a, "mouseover", function (f) {
        M(t, f, e, a);
      }), o;
    }
    s(I, "makeMarker");
    function D(t, e) {
      return t == "error" ? t : e;
    }
    s(D, "getMaxSeverity");
    function j(t) {
      for (var e = [], r = 0; r < t.length; ++r) {
        var n = t[r],
          i = n.from.line;
        (e[i] || (e[i] = [])).push(n);
      }
      return e;
    }
    s(j, "groupByLine");
    function N(t) {
      var e = t.severity;
      e || (e = "error");
      var r = document.createElement("div");
      return r.className = "CodeMirror-lint-message CodeMirror-lint-message-" + e, typeof t.messageHTML < "u" ? r.innerHTML = t.messageHTML : r.appendChild(document.createTextNode(t.message)), r;
    }
    s(N, "annotationTooltip");
    function H(t, e) {
      var r = t.state.lint,
        n = ++r.waitingFor;
      function i() {
        n = -1, t.off("change", i);
      }
      s(i, "abort"), t.on("change", i), e(t.getValue(), function (o, a) {
        t.off("change", i), r.waitingFor == n && (a && o instanceof l && (o = a), t.operation(function () {
          O(t, o);
        }));
      }, r.linterOptions, t);
    }
    s(H, "lintAsync");
    function k(t) {
      var e = t.state.lint;
      if (e) {
        var r = e.options,
          n = r.getAnnotations || t.getHelper(l.Pos(0, 0), "lint");
        if (n) if (r.async || n.async) H(t, n);else {
          var i = n(t.getValue(), e.linterOptions, t);
          if (!i) return;
          i.then ? i.then(function (o) {
            t.operation(function () {
              O(t, o);
            });
          }) : t.operation(function () {
            O(t, i);
          });
        }
      }
    }
    s(k, "startLinting");
    function O(t, e) {
      var r = t.state.lint;
      if (r) {
        var n = r.options;
        E(t);
        for (var i = j(e), o = 0; o < i.length; ++o) {
          var a = i[o];
          if (a) {
            var f = [];
            a = a.filter(function (w) {
              return f.indexOf(w.message) > -1 ? !1 : f.push(w.message);
            });
            for (var p = null, m = r.hasGutter && document.createDocumentFragment(), T = 0; T < a.length; ++T) {
              var d = a[T],
                y = d.severity;
              y || (y = "error"), p = D(p, y), n.formatAnnotation && (d = n.formatAnnotation(d)), r.hasGutter && m.appendChild(N(d)), d.to && r.marked.push(t.markText(d.from, d.to, {
                className: "CodeMirror-lint-mark CodeMirror-lint-mark-" + y,
                __annotation: d
              }));
            }
            r.hasGutter && t.setGutterMarker(o, u, I(t, m, p, i[o].length > 1, n.tooltips)), n.highlightLines && t.addLineClass(o, "wrap", g + p);
          }
        }
        n.onUpdateLinting && n.onUpdateLinting(e, i, t);
      }
    }
    s(O, "updateLinting");
    function b(t) {
      var e = t.state.lint;
      e && (clearTimeout(e.timeout), e.timeout = setTimeout(function () {
        k(t);
      }, e.options.delay));
    }
    s(b, "onChange");
    function P(t, e, r) {
      for (var n = r.target || r.srcElement, i = document.createDocumentFragment(), o = 0; o < e.length; o++) {
        var a = e[o];
        i.appendChild(N(a));
      }
      M(t, r, i, n);
    }
    s(P, "popupTooltips");
    function U(t, e) {
      var r = e.target || e.srcElement;
      if (/\bCodeMirror-lint-mark-/.test(r.className)) {
        for (var n = r.getBoundingClientRect(), i = (n.left + n.right) / 2, o = (n.top + n.bottom) / 2, a = t.findMarksAt(t.coordsChar({
            left: i,
            top: o
          }, "client")), f = [], p = 0; p < a.length; ++p) {
          var m = a[p].__annotation;
          m && f.push(m);
        }
        f.length && P(t, f, e);
      }
    }
    s(U, "onMouseOver"), l.defineOption("lint", !1, function (t, e, r) {
      if (r && r != l.Init && (E(t), t.state.lint.options.lintOnChange !== !1 && t.off("change", b), l.off(t.getWrapperElement(), "mouseover", t.state.lint.onMouseOver), clearTimeout(t.state.lint.timeout), delete t.state.lint), e) {
        for (var n = t.getOption("gutters"), i = !1, o = 0; o < n.length; ++o) n[o] == u && (i = !0);
        var a = t.state.lint = new F(t, e, i);
        a.options.lintOnChange && t.on("change", b), a.options.tooltips != !1 && a.options.tooltips != "gutter" && l.on(t.getWrapperElement(), "mouseover", a.onMouseOver), k(t);
      }
    }), l.defineExtension("performLint", function () {
      k(this);
    });
  });
})();
var _ = B.exports;
const R = x.getDefaultExportFromCjs(_),
  V = q({
    __proto__: null,
    default: R
  }, [_]);
exports.lint = V;

/***/ }),

/***/ "../../graphiql-react/dist/lint.cjs2.js":
/*!**********************************************!*\
  !*** ../../graphiql-react/dist/lint.cjs2.js ***!
  \**********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {



const t = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"),
  c = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js");
__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
const a = ["error", "warning", "information", "hint"],
  g = {
    "GraphQL: Validation": "validation",
    "GraphQL: Deprecation": "deprecation",
    "GraphQL: Syntax": "syntax"
  };
t.CodeMirror.registerHelper("lint", "graphql", (n, s) => {
  const {
    schema: r,
    validationRules: i,
    externalFragments: o
  } = s;
  return c.getDiagnostics(n, r, i, void 0, o).map(e => ({
    message: e.message,
    severity: e.severity ? a[e.severity - 1] : a[0],
    type: e.source ? g[e.source] : void 0,
    from: t.CodeMirror.Pos(e.range.start.line, e.range.start.character),
    to: t.CodeMirror.Pos(e.range.end.line, e.range.end.character)
  }));
});

/***/ }),

/***/ "../../graphiql-react/dist/lint.cjs3.js":
/*!**********************************************!*\
  !*** ../../graphiql-react/dist/lint.cjs3.js ***!
  \**********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {



var V = Object.defineProperty;
var t = (e, n) => V(e, "name", {
  value: n,
  configurable: !0
});
const I = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"),
  b = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
function C(e) {
  d = e, E = e.length, s = u = N = -1, o(), y();
  const n = q();
  return p("EOF"), n;
}
t(C, "jsonParse");
let d, E, s, u, N, r, l;
function q() {
  const e = s,
    n = [];
  if (p("{"), !x("}")) {
    do n.push(M()); while (x(","));
    p("}");
  }
  return {
    kind: "Object",
    start: e,
    end: N,
    members: n
  };
}
t(q, "parseObj");
function M() {
  const e = s,
    n = l === "String" ? G() : null;
  p("String"), p(":");
  const i = B();
  return {
    kind: "Member",
    start: e,
    end: N,
    key: n,
    value: i
  };
}
t(M, "parseMember");
function v() {
  const e = s,
    n = [];
  if (p("["), !x("]")) {
    do n.push(B()); while (x(","));
    p("]");
  }
  return {
    kind: "Array",
    start: e,
    end: N,
    values: n
  };
}
t(v, "parseArr");
function B() {
  switch (l) {
    case "[":
      return v();
    case "{":
      return q();
    case "String":
    case "Number":
    case "Boolean":
    case "Null":
      const e = G();
      return y(), e;
  }
  p("Value");
}
t(B, "parseVal");
function G() {
  return {
    kind: l,
    start: s,
    end: u,
    value: JSON.parse(d.slice(s, u))
  };
}
t(G, "curToken");
function p(e) {
  if (l === e) {
    y();
    return;
  }
  let n;
  if (l === "EOF") n = "[end of file]";else if (u - s > 1) n = "`" + d.slice(s, u) + "`";else {
    const i = d.slice(s).match(/^.+?\b/);
    n = "`" + (i ? i[0] : d[s]) + "`";
  }
  throw k(`Expected ${e} but found ${n}.`);
}
t(p, "expect");
class j extends Error {
  constructor(n, i) {
    super(n), this.position = i;
  }
}
t(j, "JSONSyntaxError");
function k(e) {
  return new j(e, {
    start: s,
    end: u
  });
}
t(k, "syntaxError");
function x(e) {
  if (l === e) return y(), !0;
}
t(x, "skip");
function o() {
  return u < E && (u++, r = u === E ? 0 : d.charCodeAt(u)), r;
}
t(o, "ch");
function y() {
  for (N = u; r === 9 || r === 10 || r === 13 || r === 32;) o();
  if (r === 0) {
    l = "EOF";
    return;
  }
  switch (s = u, r) {
    case 34:
      return l = "String", D();
    case 45:
    case 48:
    case 49:
    case 50:
    case 51:
    case 52:
    case 53:
    case 54:
    case 55:
    case 56:
    case 57:
      return l = "Number", H();
    case 102:
      if (d.slice(s, s + 5) !== "false") break;
      u += 4, o(), l = "Boolean";
      return;
    case 110:
      if (d.slice(s, s + 4) !== "null") break;
      u += 3, o(), l = "Null";
      return;
    case 116:
      if (d.slice(s, s + 4) !== "true") break;
      u += 3, o(), l = "Boolean";
      return;
  }
  l = d[s], o();
}
t(y, "lex");
function D() {
  for (o(); r !== 34 && r > 31;) if (r === 92) switch (r = o(), r) {
    case 34:
    case 47:
    case 92:
    case 98:
    case 102:
    case 110:
    case 114:
    case 116:
      o();
      break;
    case 117:
      o(), w(), w(), w(), w();
      break;
    default:
      throw k("Bad character escape sequence.");
  } else {
    if (u === E) throw k("Unterminated string.");
    o();
  }
  if (r === 34) {
    o();
    return;
  }
  throw k("Unterminated string.");
}
t(D, "readString");
function w() {
  if (r >= 48 && r <= 57 || r >= 65 && r <= 70 || r >= 97 && r <= 102) return o();
  throw k("Expected hexadecimal digit.");
}
t(w, "readHex");
function H() {
  r === 45 && o(), r === 48 ? o() : $(), r === 46 && (o(), $()), (r === 69 || r === 101) && (r = o(), (r === 43 || r === 45) && o(), $());
}
t(H, "readNumber");
function $() {
  if (r < 48 || r > 57) throw k("Expected decimal digit.");
  do o(); while (r >= 48 && r <= 57);
}
t($, "readDigits");
I.CodeMirror.registerHelper("lint", "graphql-variables", (e, n, i) => {
  if (!e) return [];
  let f;
  try {
    f = C(e);
  } catch (c) {
    if (c instanceof j) return [F(i, c.position, c.message)];
    throw c;
  }
  const {
    variableToType: a
  } = n;
  return a ? U(i, a, f) : [];
});
function U(e, n, i) {
  var f;
  const a = [];
  for (const c of i.members) if (c) {
    const h = (f = c.key) === null || f === void 0 ? void 0 : f.value,
      m = n[h];
    if (m) for (const [O, Q] of g(m, c.value)) a.push(F(e, O, Q));else a.push(F(e, c.key, `Variable "$${h}" does not appear in any GraphQL query.`));
  }
  return a;
}
t(U, "validateVariables");
function g(e, n) {
  if (!e || !n) return [];
  if (e instanceof b.GraphQLNonNull) return n.kind === "Null" ? [[n, `Type "${e}" is non-nullable and cannot be null.`]] : g(e.ofType, n);
  if (n.kind === "Null") return [];
  if (e instanceof b.GraphQLList) {
    const i = e.ofType;
    if (n.kind === "Array") {
      const f = n.values || [];
      return L(f, a => g(i, a));
    }
    return g(i, n);
  }
  if (e instanceof b.GraphQLInputObjectType) {
    if (n.kind !== "Object") return [[n, `Type "${e}" must be an Object.`]];
    const i = Object.create(null),
      f = L(n.members, a => {
        var c;
        const h = (c = a == null ? void 0 : a.key) === null || c === void 0 ? void 0 : c.value;
        i[h] = !0;
        const m = e.getFields()[h];
        if (!m) return [[a.key, `Type "${e}" does not have a field "${h}".`]];
        const O = m ? m.type : void 0;
        return g(O, a.value);
      });
    for (const a of Object.keys(e.getFields())) {
      const c = e.getFields()[a];
      !i[a] && c.type instanceof b.GraphQLNonNull && !c.defaultValue && f.push([n, `Object of type "${e}" is missing required field "${a}".`]);
    }
    return f;
  }
  return e.name === "Boolean" && n.kind !== "Boolean" || e.name === "String" && n.kind !== "String" || e.name === "ID" && n.kind !== "Number" && n.kind !== "String" || e.name === "Float" && n.kind !== "Number" || e.name === "Int" && (n.kind !== "Number" || (n.value | 0) !== n.value) ? [[n, `Expected value of type "${e}".`]] : (e instanceof b.GraphQLEnumType || e instanceof b.GraphQLScalarType) && (n.kind !== "String" && n.kind !== "Number" && n.kind !== "Boolean" && n.kind !== "Null" || _(e.parseValue(n.value))) ? [[n, `Expected value of type "${e}".`]] : [];
}
t(g, "validateValue");
function F(e, n, i) {
  return {
    message: i,
    severity: "error",
    type: "validation",
    from: e.posFromIndex(n.start),
    to: e.posFromIndex(n.end)
  };
}
t(F, "lintError");
function _(e) {
  return e == null || e !== e;
}
t(_, "isNullish");
function L(e, n) {
  return Array.prototype.concat.apply([], e.map(n));
}
t(L, "mapCat");

/***/ }),

/***/ "../../graphiql-react/dist/matchbrackets.cjs.js":
/*!******************************************************!*\
  !*** ../../graphiql-react/dist/matchbrackets.cjs.js ***!
  \******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var i = Object.defineProperty;
var s = (e, c) => i(e, "name", {
  value: c,
  configurable: !0
});
const u = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"),
  f = __webpack_require__(/*! ./matchbrackets.cjs2.js */ "../../graphiql-react/dist/matchbrackets.cjs2.js");
function b(e, c) {
  for (var o = 0; o < c.length; o++) {
    const t = c[o];
    if (typeof t != "string" && !Array.isArray(t)) {
      for (const r in t) if (r !== "default" && !(r in e)) {
        const a = Object.getOwnPropertyDescriptor(t, r);
        a && Object.defineProperty(e, r, a.get ? a : {
          enumerable: !0,
          get: () => t[r]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, {
    value: "Module"
  }));
}
s(b, "_mergeNamespaces");
var n = f.requireMatchbrackets();
const l = u.getDefaultExportFromCjs(n),
  m = b({
    __proto__: null,
    default: l
  }, [n]);
exports.matchbrackets = m;

/***/ }),

/***/ "../../graphiql-react/dist/matchbrackets.cjs2.js":
/*!*******************************************************!*\
  !*** ../../graphiql-react/dist/matchbrackets.cjs2.js ***!
  \*******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var R = Object.defineProperty;
var f = (L, y) => R(L, "name", {
  value: y,
  configurable: !0
});
const F = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
var T = {
    exports: {}
  },
  E;
function I() {
  return E || (E = 1, function (L, y) {
    (function (o) {
      o(F.requireCodemirror());
    })(function (o) {
      var S = /MSIE \d/.test(navigator.userAgent) && (document.documentMode == null || document.documentMode < 8),
        g = o.Pos,
        B = {
          "(": ")>",
          ")": "(<",
          "[": "]>",
          "]": "[<",
          "{": "}>",
          "}": "{<",
          "<": ">>",
          ">": "<<"
        };
      function A(t) {
        return t && t.bracketRegex || /[(){}[\]]/;
      }
      f(A, "bracketRegex");
      function b(t, r, e) {
        var s = t.getLineHandle(r.line),
          n = r.ch - 1,
          h = e && e.afterCursor;
        h == null && (h = /(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));
        var l = A(e),
          u = !h && n >= 0 && l.test(s.text.charAt(n)) && B[s.text.charAt(n)] || l.test(s.text.charAt(n + 1)) && B[s.text.charAt(++n)];
        if (!u) return null;
        var a = u.charAt(1) == ">" ? 1 : -1;
        if (e && e.strict && a > 0 != (n == r.ch)) return null;
        var k = t.getTokenTypeAt(g(r.line, n + 1)),
          i = H(t, g(r.line, n + (a > 0 ? 1 : 0)), a, k, e);
        return i == null ? null : {
          from: g(r.line, n),
          to: i && i.pos,
          match: i && i.ch == u.charAt(0),
          forward: a > 0
        };
      }
      f(b, "findMatchingBracket");
      function H(t, r, e, s, n) {
        for (var h = n && n.maxScanLineLength || 1e4, l = n && n.maxScanLines || 1e3, u = [], a = A(n), k = e > 0 ? Math.min(r.line + l, t.lastLine() + 1) : Math.max(t.firstLine() - 1, r.line - l), i = r.line; i != k; i += e) {
          var c = t.getLine(i);
          if (c) {
            var v = e > 0 ? 0 : c.length - 1,
              q = e > 0 ? c.length : -1;
            if (!(c.length > h)) for (i == r.line && (v = r.ch - (e < 0 ? 1 : 0)); v != q; v += e) {
              var d = c.charAt(v);
              if (a.test(d) && (s === void 0 || (t.getTokenTypeAt(g(i, v + 1)) || "") == (s || ""))) {
                var m = B[d];
                if (m && m.charAt(1) == ">" == e > 0) u.push(d);else if (u.length) u.pop();else return {
                  pos: g(i, v),
                  ch: d
                };
              }
            }
          }
        }
        return i - e == (e > 0 ? t.lastLine() : t.firstLine()) ? !1 : null;
      }
      f(H, "scanForBracket");
      function M(t, r, e) {
        for (var s = t.state.matchBrackets.maxHighlightLineLength || 1e3, n = e && e.highlightNonMatching, h = [], l = t.listSelections(), u = 0; u < l.length; u++) {
          var a = l[u].empty() && b(t, l[u].head, e);
          if (a && (a.match || n !== !1) && t.getLine(a.from.line).length <= s) {
            var k = a.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
            h.push(t.markText(a.from, g(a.from.line, a.from.ch + 1), {
              className: k
            })), a.to && t.getLine(a.to.line).length <= s && h.push(t.markText(a.to, g(a.to.line, a.to.ch + 1), {
              className: k
            }));
          }
        }
        if (h.length) {
          S && t.state.focused && t.focus();
          var i = f(function () {
            t.operation(function () {
              for (var c = 0; c < h.length; c++) h[c].clear();
            });
          }, "clear");
          if (r) setTimeout(i, 800);else return i;
        }
      }
      f(M, "matchBrackets");
      function x(t) {
        t.operation(function () {
          t.state.matchBrackets.currentlyHighlighted && (t.state.matchBrackets.currentlyHighlighted(), t.state.matchBrackets.currentlyHighlighted = null), t.state.matchBrackets.currentlyHighlighted = M(t, !1, t.state.matchBrackets);
        });
      }
      f(x, "doMatchBrackets");
      function p(t) {
        t.state.matchBrackets && t.state.matchBrackets.currentlyHighlighted && (t.state.matchBrackets.currentlyHighlighted(), t.state.matchBrackets.currentlyHighlighted = null);
      }
      f(p, "clearHighlighted"), o.defineOption("matchBrackets", !1, function (t, r, e) {
        e && e != o.Init && (t.off("cursorActivity", x), t.off("focus", x), t.off("blur", p), p(t)), r && (t.state.matchBrackets = typeof r == "object" ? r : {}, t.on("cursorActivity", x), t.on("focus", x), t.on("blur", p));
      }), o.defineExtension("matchBrackets", function () {
        M(this, !0);
      }), o.defineExtension("findMatchingBracket", function (t, r, e) {
        return (e || typeof r == "boolean") && (e ? (e.strict = r, r = e) : r = r ? {
          strict: !0
        } : null), b(this, t, r);
      }), o.defineExtension("scanForBracket", function (t, r, e, s) {
        return H(this, t, r, e, s);
      });
    });
  }()), T.exports;
}
f(I, "requireMatchbrackets");
exports.requireMatchbrackets = I;

/***/ }),

/***/ "../../graphiql-react/dist/mode-indent.cjs.js":
/*!****************************************************!*\
  !*** ../../graphiql-react/dist/mode-indent.cjs.js ***!
  \****************************************************/
/***/ (function(__unused_webpack_module, exports) {



var o = Object.defineProperty;
var v = (n, t) => o(n, "name", {
  value: t,
  configurable: !0
});
function s(n, t) {
  var e, i;
  const {
    levels: l,
    indentLevel: d
  } = n;
  return ((!l || l.length === 0 ? d : l.at(-1) - (!((e = this.electricInput) === null || e === void 0) && e.test(t) ? 1 : 0)) || 0) * (((i = this.config) === null || i === void 0 ? void 0 : i.indentUnit) || 0);
}
v(s, "indent");
exports.indent = s;

/***/ }),

/***/ "../../graphiql-react/dist/mode.cjs.js":
/*!*********************************************!*\
  !*** ../../graphiql-react/dist/mode.cjs.js ***!
  \*********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {



var n = Object.defineProperty;
var s = (e, r) => n(e, "name", {
  value: r,
  configurable: !0
});
const o = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"),
  t = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"),
  i = __webpack_require__(/*! ./mode-indent.cjs.js */ "../../graphiql-react/dist/mode-indent.cjs.js");
__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
const l = s(e => {
  const r = t.onlineParser({
    eatWhitespace: a => a.eatWhile(t.isIgnored),
    lexRules: t.LexRules,
    parseRules: t.ParseRules,
    editorConfig: {
      tabSize: e.tabSize
    }
  });
  return {
    config: e,
    startState: r.startState,
    token: r.token,
    indent: i.indent,
    electricInput: /^\s*[})\]]/,
    fold: "brace",
    lineComment: "#",
    closeBrackets: {
      pairs: '()[]{}""',
      explode: "()[]{}"
    }
  };
}, "graphqlModeFactory");
o.CodeMirror.defineMode("graphql", l);

/***/ }),

/***/ "../../graphiql-react/dist/mode.cjs2.js":
/*!**********************************************!*\
  !*** ../../graphiql-react/dist/mode.cjs2.js ***!
  \**********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {



var n = Object.defineProperty;
var u = (t, r) => n(t, "name", {
  value: r,
  configurable: !0
});
const i = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"),
  e = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"),
  s = __webpack_require__(/*! ./mode-indent.cjs.js */ "../../graphiql-react/dist/mode-indent.cjs.js");
__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
i.CodeMirror.defineMode("graphql-variables", t => {
  const r = e.onlineParser({
    eatWhitespace: a => a.eatSpace(),
    lexRules: c,
    parseRules: o,
    editorConfig: {
      tabSize: t.tabSize
    }
  });
  return {
    config: t,
    startState: r.startState,
    token: r.token,
    indent: s.indent,
    electricInput: /^\s*[}\]]/,
    fold: "brace",
    closeBrackets: {
      pairs: '[]{}""',
      explode: "[]{}"
    }
  };
});
const c = {
    Punctuation: /^\[|]|\{|\}|:|,/,
    Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,
    String: /^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,
    Keyword: /^true|false|null/
  },
  o = {
    Document: [e.p("{"), e.list("Variable", e.opt(e.p(","))), e.p("}")],
    Variable: [l("variable"), e.p(":"), "Value"],
    Value(t) {
      switch (t.kind) {
        case "Number":
          return "NumberValue";
        case "String":
          return "StringValue";
        case "Punctuation":
          switch (t.value) {
            case "[":
              return "ListValue";
            case "{":
              return "ObjectValue";
          }
          return null;
        case "Keyword":
          switch (t.value) {
            case "true":
            case "false":
              return "BooleanValue";
            case "null":
              return "NullValue";
          }
          return null;
      }
    },
    NumberValue: [e.t("Number", "number")],
    StringValue: [e.t("String", "string")],
    BooleanValue: [e.t("Keyword", "builtin")],
    NullValue: [e.t("Keyword", "keyword")],
    ListValue: [e.p("["), e.list("Value", e.opt(e.p(","))), e.p("]")],
    ObjectValue: [e.p("{"), e.list("ObjectField", e.opt(e.p(","))), e.p("}")],
    ObjectField: [l("attribute"), e.p(":"), "Value"]
  };
function l(t) {
  return {
    style: t,
    match: r => r.kind === "String",
    update(r, a) {
      r.name = a.value.slice(1, -1);
    }
  };
}
u(l, "namedKey");

/***/ }),

/***/ "../../graphiql-react/dist/mode.cjs3.js":
/*!**********************************************!*\
  !*** ../../graphiql-react/dist/mode.cjs3.js ***!
  \**********************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {



const a = __webpack_require__(/*! ./codemirror.cjs.js */ "../../graphiql-react/dist/codemirror.cjs.js"),
  e = __webpack_require__(/*! graphql-language-service */ "../../graphql-language-service/esm/index.js"),
  l = __webpack_require__(/*! ./mode-indent.cjs.js */ "../../graphiql-react/dist/mode-indent.cjs.js");
__webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
a.CodeMirror.defineMode("graphql-results", r => {
  const t = e.onlineParser({
    eatWhitespace: u => u.eatSpace(),
    lexRules: n,
    parseRules: s,
    editorConfig: {
      tabSize: r.tabSize
    }
  });
  return {
    config: r,
    startState: t.startState,
    token: t.token,
    indent: l.indent,
    electricInput: /^\s*[}\]]/,
    fold: "brace",
    closeBrackets: {
      pairs: '[]{}""',
      explode: "[]{}"
    }
  };
});
const n = {
    Punctuation: /^\[|]|\{|\}|:|,/,
    Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,
    String: /^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,
    Keyword: /^true|false|null/
  },
  s = {
    Document: [e.p("{"), e.list("Entry", e.p(",")), e.p("}")],
    Entry: [e.t("String", "def"), e.p(":"), "Value"],
    Value(r) {
      switch (r.kind) {
        case "Number":
          return "NumberValue";
        case "String":
          return "StringValue";
        case "Punctuation":
          switch (r.value) {
            case "[":
              return "ListValue";
            case "{":
              return "ObjectValue";
          }
          return null;
        case "Keyword":
          switch (r.value) {
            case "true":
            case "false":
              return "BooleanValue";
            case "null":
              return "NullValue";
          }
          return null;
      }
    },
    NumberValue: [e.t("Number", "number")],
    StringValue: [e.t("String", "string")],
    BooleanValue: [e.t("Keyword", "builtin")],
    NullValue: [e.t("Keyword", "keyword")],
    ListValue: [e.p("["), e.list("Value", e.p(",")), e.p("]")],
    ObjectValue: [e.p("{"), e.list("ObjectField", e.p(",")), e.p("}")],
    ObjectField: [e.t("String", "property"), e.p(":"), "Value"]
  };

/***/ }),

/***/ "../../graphiql-react/dist/search.cjs.js":
/*!***********************************************!*\
  !*** ../../graphiql-react/dist/search.cjs.js ***!
  \***********************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var K = Object.defineProperty;
var a = (S, O) => K(S, "name", {
  value: O,
  configurable: !0
});
const Q = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"),
  L = __webpack_require__(/*! ./searchcursor.cjs2.js */ "../../graphiql-react/dist/searchcursor.cjs2.js"),
  z = __webpack_require__(/*! ./dialog.cjs.js */ "../../graphiql-react/dist/dialog.cjs.js");
function U(S, O) {
  for (var i = 0; i < O.length; i++) {
    const y = O[i];
    if (typeof y != "string" && !Array.isArray(y)) {
      for (const v in y) if (v !== "default" && !(v in S)) {
        const h = Object.getOwnPropertyDescriptor(y, v);
        h && Object.defineProperty(S, v, h.get ? h : {
          enumerable: !0,
          get: () => y[v]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(S, Symbol.toStringTag, {
    value: "Module"
  }));
}
a(U, "_mergeNamespaces");
var B = {
  exports: {}
};
(function (S, O) {
  (function (i) {
    i(Q.requireCodemirror(), L.requireSearchcursor(), z.dialogExports);
  })(function (i) {
    i.defineOption("search", {
      bottom: !1
    });
    function y(e, n) {
      return typeof e == "string" ? e = new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), n ? "gi" : "g") : e.global || (e = new RegExp(e.source, e.ignoreCase ? "gi" : "g")), {
        token: function (t) {
          e.lastIndex = t.pos;
          var o = e.exec(t.string);
          if (o && o.index == t.pos) return t.pos += o[0].length || 1, "searching";
          o ? t.pos = o.index : t.skipToEnd();
        }
      };
    }
    a(y, "searchOverlay");
    function v() {
      this.posFrom = this.posTo = this.lastQuery = this.query = null, this.overlay = null;
    }
    a(v, "SearchState");
    function h(e) {
      return e.state.search || (e.state.search = new v());
    }
    a(h, "getSearchState");
    function m(e) {
      return typeof e == "string" && e == e.toLowerCase();
    }
    a(m, "queryCaseInsensitive");
    function N(e, n, t) {
      return e.getSearchCursor(n, t, {
        caseFold: m(n),
        multiline: !0
      });
    }
    a(N, "getSearchCursor");
    function j(e, n, t, o, r) {
      e.openDialog(n, o, {
        value: t,
        selectValueOnOpen: !0,
        closeOnEnter: !1,
        onClose: function () {
          w(e);
        },
        onKeyDown: r,
        bottom: e.options.search.bottom
      });
    }
    a(j, "persistentDialog");
    function D(e, n, t, o, r) {
      e.openDialog ? e.openDialog(n, r, {
        value: o,
        selectValueOnOpen: !0,
        bottom: e.options.search.bottom
      }) : r(prompt(t, o));
    }
    a(D, "dialog");
    function k(e, n, t, o) {
      e.openConfirm ? e.openConfirm(n, o) : confirm(t) && o[0]();
    }
    a(k, "confirmDialog");
    function C(e) {
      return e.replace(/\\([nrt\\])/g, function (n, t) {
        return t == "n" ? `
` : t == "r" ? "\r" : t == "t" ? "	" : t == "\\" ? "\\" : n;
      });
    }
    a(C, "parseString");
    function T(e) {
      var n = e.match(/^\/(.*)\/([a-z]*)$/);
      if (n) try {
        e = new RegExp(n[1], n[2].indexOf("i") == -1 ? "" : "i");
      } catch {} else e = C(e);
      return (typeof e == "string" ? e == "" : e.test("")) && (e = /x^/), e;
    }
    a(T, "parseQuery");
    function P(e, n, t) {
      n.queryText = t, n.query = T(t), e.removeOverlay(n.overlay, m(n.query)), n.overlay = y(n.query, m(n.query)), e.addOverlay(n.overlay), e.showMatchesOnScrollbar && (n.annotate && (n.annotate.clear(), n.annotate = null), n.annotate = e.showMatchesOnScrollbar(n.query, m(n.query)));
    }
    a(P, "startSearch");
    function b(e, n, t, o) {
      var r = h(e);
      if (r.query) return R(e, n);
      var s = e.getSelection() || r.lastQuery;
      if (s instanceof RegExp && s.source == "x^" && (s = null), t && e.openDialog) {
        var c = null,
          u = a(function (f, x) {
            i.e_stop(x), f && (f != r.queryText && (P(e, r, f), r.posFrom = r.posTo = e.getCursor()), c && (c.style.opacity = 1), R(e, x.shiftKey, function (d, g) {
              var p;
              g.line < 3 && document.querySelector && (p = e.display.wrapper.querySelector(".CodeMirror-dialog")) && p.getBoundingClientRect().bottom - 4 > e.cursorCoords(g, "window").top && ((c = p).style.opacity = .4);
            }));
          }, "searchNext");
        j(e, E(e), s, u, function (f, x) {
          var d = i.keyName(f),
            g = e.getOption("extraKeys"),
            p = g && g[d] || i.keyMap[e.getOption("keyMap")][d];
          p == "findNext" || p == "findPrev" || p == "findPersistentNext" || p == "findPersistentPrev" ? (i.e_stop(f), P(e, h(e), x), e.execCommand(p)) : (p == "find" || p == "findPersistent") && (i.e_stop(f), u(x, f));
        }), o && s && (P(e, r, s), R(e, n));
      } else D(e, E(e), "Search for:", s, function (f) {
        f && !r.query && e.operation(function () {
          P(e, r, f), r.posFrom = r.posTo = e.getCursor(), R(e, n);
        });
      });
    }
    a(b, "doSearch");
    function R(e, n, t) {
      e.operation(function () {
        var o = h(e),
          r = N(e, o.query, n ? o.posFrom : o.posTo);
        !r.find(n) && (r = N(e, o.query, n ? i.Pos(e.lastLine()) : i.Pos(e.firstLine(), 0)), !r.find(n)) || (e.setSelection(r.from(), r.to()), e.scrollIntoView({
          from: r.from(),
          to: r.to()
        }, 20), o.posFrom = r.from(), o.posTo = r.to(), t && t(r.from(), r.to()));
      });
    }
    a(R, "findNext");
    function w(e) {
      e.operation(function () {
        var n = h(e);
        n.lastQuery = n.query, n.query && (n.query = n.queryText = null, e.removeOverlay(n.overlay), n.annotate && (n.annotate.clear(), n.annotate = null));
      });
    }
    a(w, "clearSearch");
    function l(e, n) {
      var t = e ? document.createElement(e) : document.createDocumentFragment();
      for (var o in n) t[o] = n[o];
      for (var r = 2; r < arguments.length; r++) {
        var s = arguments[r];
        t.appendChild(typeof s == "string" ? document.createTextNode(s) : s);
      }
      return t;
    }
    a(l, "el");
    function E(e) {
      return l("", null, l("span", {
        className: "CodeMirror-search-label"
      }, e.phrase("Search:")), " ", l("input", {
        type: "text",
        style: "width: 10em",
        className: "CodeMirror-search-field"
      }), " ", l("span", {
        style: "color: #888",
        className: "CodeMirror-search-hint"
      }, e.phrase("(Use /re/ syntax for regexp search)")));
    }
    a(E, "getQueryDialog");
    function A(e) {
      return l("", null, " ", l("input", {
        type: "text",
        style: "width: 10em",
        className: "CodeMirror-search-field"
      }), " ", l("span", {
        style: "color: #888",
        className: "CodeMirror-search-hint"
      }, e.phrase("(Use /re/ syntax for regexp search)")));
    }
    a(A, "getReplaceQueryDialog");
    function I(e) {
      return l("", null, l("span", {
        className: "CodeMirror-search-label"
      }, e.phrase("With:")), " ", l("input", {
        type: "text",
        style: "width: 10em",
        className: "CodeMirror-search-field"
      }));
    }
    a(I, "getReplacementQueryDialog");
    function V(e) {
      return l("", null, l("span", {
        className: "CodeMirror-search-label"
      }, e.phrase("Replace?")), " ", l("button", {}, e.phrase("Yes")), " ", l("button", {}, e.phrase("No")), " ", l("button", {}, e.phrase("All")), " ", l("button", {}, e.phrase("Stop")));
    }
    a(V, "getDoReplaceConfirm");
    function _(e, n, t) {
      e.operation(function () {
        for (var o = N(e, n); o.findNext();) if (typeof n != "string") {
          var r = e.getRange(o.from(), o.to()).match(n);
          o.replace(t.replace(/\$(\d)/g, function (s, c) {
            return r[c];
          }));
        } else o.replace(t);
      });
    }
    a(_, "replaceAll");
    function F(e, n) {
      if (!e.getOption("readOnly")) {
        var t = e.getSelection() || h(e).lastQuery,
          o = n ? e.phrase("Replace all:") : e.phrase("Replace:"),
          r = l("", null, l("span", {
            className: "CodeMirror-search-label"
          }, o), A(e));
        D(e, r, o, t, function (s) {
          s && (s = T(s), D(e, I(e), e.phrase("Replace with:"), "", function (c) {
            if (c = C(c), n) _(e, s, c);else {
              w(e);
              var u = N(e, s, e.getCursor("from")),
                f = a(function () {
                  var d = u.from(),
                    g;
                  !(g = u.findNext()) && (u = N(e, s), !(g = u.findNext()) || d && u.from().line == d.line && u.from().ch == d.ch) || (e.setSelection(u.from(), u.to()), e.scrollIntoView({
                    from: u.from(),
                    to: u.to()
                  }), k(e, V(e), e.phrase("Replace?"), [function () {
                    x(g);
                  }, f, function () {
                    _(e, s, c);
                  }]));
                }, "advance"),
                x = a(function (d) {
                  u.replace(typeof s == "string" ? c : c.replace(/\$(\d)/g, function (g, p) {
                    return d[p];
                  })), f();
                }, "doReplace");
              f();
            }
          }));
        });
      }
    }
    a(F, "replace"), i.commands.find = function (e) {
      w(e), b(e);
    }, i.commands.findPersistent = function (e) {
      w(e), b(e, !1, !0);
    }, i.commands.findPersistentNext = function (e) {
      b(e, !1, !0, !0);
    }, i.commands.findPersistentPrev = function (e) {
      b(e, !0, !0, !0);
    }, i.commands.findNext = b, i.commands.findPrev = function (e) {
      b(e, !0);
    }, i.commands.clearSearch = w, i.commands.replace = F, i.commands.replaceAll = function (e) {
      F(e, !0);
    };
  });
})();
var $ = B.exports;
const W = Q.getDefaultExportFromCjs($),
  Y = U({
    __proto__: null,
    default: W
  }, [$]);
exports.search = Y;

/***/ }),

/***/ "../../graphiql-react/dist/searchcursor.cjs.js":
/*!*****************************************************!*\
  !*** ../../graphiql-react/dist/searchcursor.cjs.js ***!
  \*****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var n = Object.defineProperty;
var u = (r, o) => n(r, "name", {
  value: o,
  configurable: !0
});
const i = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"),
  f = __webpack_require__(/*! ./searchcursor.cjs2.js */ "../../graphiql-react/dist/searchcursor.cjs2.js");
function l(r, o) {
  for (var c = 0; c < o.length; c++) {
    const e = o[c];
    if (typeof e != "string" && !Array.isArray(e)) {
      for (const t in e) if (t !== "default" && !(t in r)) {
        const s = Object.getOwnPropertyDescriptor(e, t);
        s && Object.defineProperty(r, t, s.get ? s : {
          enumerable: !0,
          get: () => e[t]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, {
    value: "Module"
  }));
}
u(l, "_mergeNamespaces");
var a = f.requireSearchcursor();
const g = i.getDefaultExportFromCjs(a),
  p = l({
    __proto__: null,
    default: g
  }, [a]);
exports.searchcursor = p;

/***/ }),

/***/ "../../graphiql-react/dist/searchcursor.cjs2.js":
/*!******************************************************!*\
  !*** ../../graphiql-react/dist/searchcursor.cjs2.js ***!
  \******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var W = Object.defineProperty;
var o = (d, E) => W(d, "name", {
  value: E,
  configurable: !0
});
const G = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
var N = {
    exports: {}
  },
  b;
function H() {
  return b || (b = 1, function (d, E) {
    (function (m) {
      m(G.requireCodemirror());
    })(function (m) {
      var a = m.Pos;
      function B(e) {
        var t = e.flags;
        return t !== null && t !== void 0 ? t : (e.ignoreCase ? "i" : "") + (e.global ? "g" : "") + (e.multiline ? "m" : "");
      }
      o(B, "regexpFlags");
      function F(e, t) {
        for (var n = B(e), r = n, l = 0; l < t.length; l++) r.indexOf(t.charAt(l)) == -1 && (r += t.charAt(l));
        return n == r ? e : new RegExp(e.source, r);
      }
      o(F, "ensureFlags");
      function R(e) {
        return /\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source);
      }
      o(R, "maybeMultiline");
      function I(e, t, n) {
        t = F(t, "g");
        for (var r = n.line, l = n.ch, i = e.lastLine(); r <= i; r++, l = 0) {
          t.lastIndex = l;
          var h = e.getLine(r),
            f = t.exec(h);
          if (f) return {
            from: a(r, f.index),
            to: a(r, f.index + f[0].length),
            match: f
          };
        }
      }
      o(I, "searchRegexpForward");
      function j(e, t, n) {
        if (!R(t)) return I(e, t, n);
        t = F(t, "gm");
        for (var r, l = 1, i = n.line, h = e.lastLine(); i <= h;) {
          for (var f = 0; f < l && !(i > h); f++) {
            var p = e.getLine(i++);
            r = r == null ? p : r + `
` + p;
          }
          l = l * 2, t.lastIndex = n.ch;
          var u = t.exec(r);
          if (u) {
            var s = r.slice(0, u.index).split(`
`),
              c = u[0].split(`
`),
              g = n.line + s.length - 1,
              v = s[s.length - 1].length;
            return {
              from: a(g, v),
              to: a(g + c.length - 1, c.length == 1 ? v + c[0].length : c[c.length - 1].length),
              match: u
            };
          }
        }
      }
      o(j, "searchRegexpForwardMultiline");
      function z(e, t, n) {
        for (var r, l = 0; l <= e.length;) {
          t.lastIndex = l;
          var i = t.exec(e);
          if (!i) break;
          var h = i.index + i[0].length;
          if (h > e.length - n) break;
          (!r || h > r.index + r[0].length) && (r = i), l = i.index + 1;
        }
        return r;
      }
      o(z, "lastMatchIn");
      function D(e, t, n) {
        t = F(t, "g");
        for (var r = n.line, l = n.ch, i = e.firstLine(); r >= i; r--, l = -1) {
          var h = e.getLine(r),
            f = z(h, t, l < 0 ? 0 : h.length - l);
          if (f) return {
            from: a(r, f.index),
            to: a(r, f.index + f[0].length),
            match: f
          };
        }
      }
      o(D, "searchRegexpBackward");
      function A(e, t, n) {
        if (!R(t)) return D(e, t, n);
        t = F(t, "gm");
        for (var r, l = 1, i = e.getLine(n.line).length - n.ch, h = n.line, f = e.firstLine(); h >= f;) {
          for (var p = 0; p < l && h >= f; p++) {
            var u = e.getLine(h--);
            r = r == null ? u : u + `
` + r;
          }
          l *= 2;
          var s = z(r, t, i);
          if (s) {
            var c = r.slice(0, s.index).split(`
`),
              g = s[0].split(`
`),
              v = h + c.length,
              x = c[c.length - 1].length;
            return {
              from: a(v, x),
              to: a(v + g.length - 1, g.length == 1 ? x + g[0].length : g[g.length - 1].length),
              match: s
            };
          }
        }
      }
      o(A, "searchRegexpBackwardMultiline");
      var P, k;
      String.prototype.normalize ? (P = o(function (e) {
        return e.normalize("NFD").toLowerCase();
      }, "doFold"), k = o(function (e) {
        return e.normalize("NFD");
      }, "noFold")) : (P = o(function (e) {
        return e.toLowerCase();
      }, "doFold"), k = o(function (e) {
        return e;
      }, "noFold"));
      function L(e, t, n, r) {
        if (e.length == t.length) return n;
        for (var l = 0, i = n + Math.max(0, e.length - t.length);;) {
          if (l == i) return l;
          var h = l + i >> 1,
            f = r(e.slice(0, h)).length;
          if (f == n) return h;
          f > n ? i = h : l = h + 1;
        }
      }
      o(L, "adjustPos");
      function y(e, t, n, r) {
        if (!t.length) return null;
        var l = r ? P : k,
          i = l(t).split(/\r|\n\r?/);
        t: for (var h = n.line, f = n.ch, p = e.lastLine() + 1 - i.length; h <= p; h++, f = 0) {
          var u = e.getLine(h).slice(f),
            s = l(u);
          if (i.length == 1) {
            var c = s.indexOf(i[0]);
            if (c == -1) continue t;
            var n = L(u, s, c, l) + f;
            return {
              from: a(h, L(u, s, c, l) + f),
              to: a(h, L(u, s, c + i[0].length, l) + f)
            };
          } else {
            var g = s.length - i[0].length;
            if (s.slice(g) != i[0]) continue t;
            for (var v = 1; v < i.length - 1; v++) if (l(e.getLine(h + v)) != i[v]) continue t;
            var x = e.getLine(h + i.length - 1),
              O = l(x),
              S = i[i.length - 1];
            if (O.slice(0, S.length) != S) continue t;
            return {
              from: a(h, L(u, s, g, l) + f),
              to: a(h + i.length - 1, L(x, O, S.length, l))
            };
          }
        }
      }
      o(y, "searchStringForward");
      function C(e, t, n, r) {
        if (!t.length) return null;
        var l = r ? P : k,
          i = l(t).split(/\r|\n\r?/);
        t: for (var h = n.line, f = n.ch, p = e.firstLine() - 1 + i.length; h >= p; h--, f = -1) {
          var u = e.getLine(h);
          f > -1 && (u = u.slice(0, f));
          var s = l(u);
          if (i.length == 1) {
            var c = s.lastIndexOf(i[0]);
            if (c == -1) continue t;
            return {
              from: a(h, L(u, s, c, l)),
              to: a(h, L(u, s, c + i[0].length, l))
            };
          } else {
            var g = i[i.length - 1];
            if (s.slice(0, g.length) != g) continue t;
            for (var v = 1, n = h - i.length + 1; v < i.length - 1; v++) if (l(e.getLine(n + v)) != i[v]) continue t;
            var x = e.getLine(h + 1 - i.length),
              O = l(x);
            if (O.slice(O.length - i[0].length) != i[0]) continue t;
            return {
              from: a(h + 1 - i.length, L(x, O, x.length - i[0].length, l)),
              to: a(h, L(u, s, g.length, l))
            };
          }
        }
      }
      o(C, "searchStringBackward");
      function w(e, t, n, r) {
        this.atOccurrence = !1, this.afterEmptyMatch = !1, this.doc = e, n = n ? e.clipPos(n) : a(0, 0), this.pos = {
          from: n,
          to: n
        };
        var l;
        typeof r == "object" ? l = r.caseFold : (l = r, r = null), typeof t == "string" ? (l == null && (l = !1), this.matches = function (i, h) {
          return (i ? C : y)(e, t, h, l);
        }) : (t = F(t, "gm"), !r || r.multiline !== !1 ? this.matches = function (i, h) {
          return (i ? A : j)(e, t, h);
        } : this.matches = function (i, h) {
          return (i ? D : I)(e, t, h);
        });
      }
      o(w, "SearchCursor"), w.prototype = {
        findNext: function () {
          return this.find(!1);
        },
        findPrevious: function () {
          return this.find(!0);
        },
        find: function (e) {
          var t = this.doc.clipPos(e ? this.pos.from : this.pos.to);
          if (this.afterEmptyMatch && this.atOccurrence && (t = a(t.line, t.ch), e ? (t.ch--, t.ch < 0 && (t.line--, t.ch = (this.doc.getLine(t.line) || "").length)) : (t.ch++, t.ch > (this.doc.getLine(t.line) || "").length && (t.ch = 0, t.line++)), m.cmpPos(t, this.doc.clipPos(t)) != 0)) return this.atOccurrence = !1;
          var n = this.matches(e, t);
          if (this.afterEmptyMatch = n && m.cmpPos(n.from, n.to) == 0, n) return this.pos = n, this.atOccurrence = !0, this.pos.match || !0;
          var r = a(e ? this.doc.firstLine() : this.doc.lastLine() + 1, 0);
          return this.pos = {
            from: r,
            to: r
          }, this.atOccurrence = !1;
        },
        from: function () {
          if (this.atOccurrence) return this.pos.from;
        },
        to: function () {
          if (this.atOccurrence) return this.pos.to;
        },
        replace: function (e, t) {
          if (this.atOccurrence) {
            var n = m.splitLines(e);
            this.doc.replaceRange(n, this.pos.from, this.pos.to, t), this.pos.to = a(this.pos.from.line + n.length - 1, n[n.length - 1].length + (n.length == 1 ? this.pos.from.ch : 0));
          }
        }
      }, m.defineExtension("getSearchCursor", function (e, t, n) {
        return new w(this.doc, e, t, n);
      }), m.defineDocExtension("getSearchCursor", function (e, t, n) {
        return new w(this, e, t, n);
      }), m.defineExtension("selectMatches", function (e, t) {
        for (var n = [], r = this.getSearchCursor(e, this.getCursor("from"), t); r.findNext() && !(m.cmpPos(r.to(), this.getCursor("to")) > 0);) n.push({
          anchor: r.from(),
          head: r.to()
        });
        n.length && this.setSelections(n, 0);
      });
    });
  }()), N.exports;
}
o(H, "requireSearchcursor");
exports.requireSearchcursor = H;

/***/ }),

/***/ "../../graphiql-react/dist/show-hint.cjs.js":
/*!**************************************************!*\
  !*** ../../graphiql-react/dist/show-hint.cjs.js ***!
  \**************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var ct = Object.defineProperty;
var p = (H, A) => ct(H, "name", {
  value: A,
  configurable: !0
});
const G = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js");
function lt(H, A) {
  for (var r = 0; r < A.length; r++) {
    const w = A[r];
    if (typeof w != "string" && !Array.isArray(w)) {
      for (const v in w) if (v !== "default" && !(v in H)) {
        const b = Object.getOwnPropertyDescriptor(w, v);
        b && Object.defineProperty(H, v, b.get ? b : {
          enumerable: !0,
          get: () => w[v]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(H, Symbol.toStringTag, {
    value: "Module"
  }));
}
p(lt, "_mergeNamespaces");
var ht = {
  exports: {}
};
(function (H, A) {
  (function (r) {
    r(G.requireCodemirror());
  })(function (r) {
    var w = "CodeMirror-hint",
      v = "CodeMirror-hint-active";
    r.showHint = function (t, e, i) {
      if (!e) return t.showHint(i);
      i && i.async && (e.async = !0);
      var n = {
        hint: e
      };
      if (i) for (var s in i) n[s] = i[s];
      return t.showHint(n);
    }, r.defineExtension("showHint", function (t) {
      t = tt(this, this.getCursor("start"), t);
      var e = this.listSelections();
      if (!(e.length > 1)) {
        if (this.somethingSelected()) {
          if (!t.hint.supportsSelection) return;
          for (var i = 0; i < e.length; i++) if (e[i].head.line != e[i].anchor.line) return;
        }
        this.state.completionActive && this.state.completionActive.close();
        var n = this.state.completionActive = new b(this, t);
        n.options.hint && (r.signal(this, "startCompletion", this), n.update(!0));
      }
    }), r.defineExtension("closeHint", function () {
      this.state.completionActive && this.state.completionActive.close();
    });
    function b(t, e) {
      if (this.cm = t, this.options = e, this.widget = null, this.debounce = 0, this.tick = 0, this.startPos = this.cm.getCursor("start"), this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length, this.options.updateOnCursorActivity) {
        var i = this;
        t.on("cursorActivity", this.activityFunc = function () {
          i.cursorActivity();
        });
      }
    }
    p(b, "Completion");
    var Q = window.requestAnimationFrame || function (t) {
        return setTimeout(t, 1e3 / 60);
      },
      Z = window.cancelAnimationFrame || clearTimeout;
    b.prototype = {
      close: function () {
        this.active() && (this.cm.state.completionActive = null, this.tick = null, this.options.updateOnCursorActivity && this.cm.off("cursorActivity", this.activityFunc), this.widget && this.data && r.signal(this.data, "close"), this.widget && this.widget.close(), r.signal(this.cm, "endCompletion", this.cm));
      },
      active: function () {
        return this.cm.state.completionActive == this;
      },
      pick: function (t, e) {
        var i = t.list[e],
          n = this;
        this.cm.operation(function () {
          i.hint ? i.hint(n.cm, t, i) : n.cm.replaceRange(_(i), i.from || t.from, i.to || t.to, "complete"), r.signal(t, "pick", i), n.cm.scrollIntoView();
        }), this.options.closeOnPick && this.close();
      },
      cursorActivity: function () {
        this.debounce && (Z(this.debounce), this.debounce = 0);
        var t = this.startPos;
        this.data && (t = this.data.from);
        var e = this.cm.getCursor(),
          i = this.cm.getLine(e.line);
        if (e.line != this.startPos.line || i.length - e.ch != this.startLen - this.startPos.ch || e.ch < t.ch || this.cm.somethingSelected() || !e.ch || this.options.closeCharacters.test(i.charAt(e.ch - 1))) this.close();else {
          var n = this;
          this.debounce = Q(function () {
            n.update();
          }), this.widget && this.widget.disable();
        }
      },
      update: function (t) {
        if (this.tick != null) {
          var e = this,
            i = ++this.tick;
          U(this.options.hint, this.cm, this.options, function (n) {
            e.tick == i && e.finishUpdate(n, t);
          });
        }
      },
      finishUpdate: function (t, e) {
        this.data && r.signal(this.data, "update");
        var i = this.widget && this.widget.picked || e && this.options.completeSingle;
        this.widget && this.widget.close(), this.data = t, t && t.list.length && (i && t.list.length == 1 ? this.pick(t, 0) : (this.widget = new K(this, t), r.signal(t, "shown")));
      }
    };
    function tt(t, e, i) {
      var n = t.options.hintOptions,
        s = {};
      for (var c in D) s[c] = D[c];
      if (n) for (var c in n) n[c] !== void 0 && (s[c] = n[c]);
      if (i) for (var c in i) i[c] !== void 0 && (s[c] = i[c]);
      return s.hint.resolve && (s.hint = s.hint.resolve(t, e)), s;
    }
    p(tt, "parseOptions");
    function _(t) {
      return typeof t == "string" ? t : t.text;
    }
    p(_, "getText");
    function et(t, e) {
      var i = {
          Up: function () {
            e.moveFocus(-1);
          },
          Down: function () {
            e.moveFocus(1);
          },
          PageUp: function () {
            e.moveFocus(-e.menuSize() + 1, !0);
          },
          PageDown: function () {
            e.moveFocus(e.menuSize() - 1, !0);
          },
          Home: function () {
            e.setFocus(0);
          },
          End: function () {
            e.setFocus(e.length - 1);
          },
          Enter: e.pick,
          Tab: e.pick,
          Esc: e.close
        },
        n = /Mac/.test(navigator.platform);
      n && (i["Ctrl-P"] = function () {
        e.moveFocus(-1);
      }, i["Ctrl-N"] = function () {
        e.moveFocus(1);
      });
      var s = t.options.customKeys,
        c = s ? {} : i;
      function o(u, l) {
        var a;
        typeof l != "string" ? a = p(function (S) {
          return l(S, e);
        }, "bound") : i.hasOwnProperty(l) ? a = i[l] : a = l, c[u] = a;
      }
      if (p(o, "addBinding"), s) for (var f in s) s.hasOwnProperty(f) && o(f, s[f]);
      var h = t.options.extraKeys;
      if (h) for (var f in h) h.hasOwnProperty(f) && o(f, h[f]);
      return c;
    }
    p(et, "buildKeyMap");
    function B(t, e) {
      for (; e && e != t;) {
        if (e.nodeName.toUpperCase() === "LI" && e.parentNode == t) return e;
        e = e.parentNode;
      }
    }
    p(B, "getHintElement");
    function K(t, e) {
      this.id = "cm-complete-" + Math.floor(Math.random(1e6)), this.completion = t, this.data = e, this.picked = !1;
      var i = this,
        n = t.cm,
        s = n.getInputField().ownerDocument,
        c = s.defaultView || s.parentWindow,
        o = this.hints = s.createElement("ul");
      o.setAttribute("role", "listbox"), o.setAttribute("aria-expanded", "true"), o.id = this.id;
      var f = t.cm.options.theme;
      o.className = "CodeMirror-hints " + f, this.selectedHint = e.selectedHint || 0;
      for (var h = e.list, u = 0; u < h.length; ++u) {
        var l = o.appendChild(s.createElement("li")),
          a = h[u],
          S = w + (u != this.selectedHint ? "" : " " + v);
        a.className != null && (S = a.className + " " + S), l.className = S, u == this.selectedHint && l.setAttribute("aria-selected", "true"), l.id = this.id + "-" + u, l.setAttribute("role", "option"), a.render ? a.render(l, e, a) : l.appendChild(s.createTextNode(a.displayText || _(a))), l.hintId = u;
      }
      var T = t.options.container || s.body,
        y = n.cursorCoords(t.options.alignWithWord ? e.from : null),
        k = y.left,
        O = y.bottom,
        j = !0,
        F = 0,
        E = 0;
      if (T !== s.body) {
        var st = ["absolute", "relative", "fixed"].indexOf(c.getComputedStyle(T).position) !== -1,
          W = st ? T : T.offsetParent,
          M = W.getBoundingClientRect(),
          q = s.body.getBoundingClientRect();
        F = M.left - q.left - W.scrollLeft, E = M.top - q.top - W.scrollTop;
      }
      o.style.left = k - F + "px", o.style.top = O - E + "px";
      var N = c.innerWidth || Math.max(s.body.offsetWidth, s.documentElement.offsetWidth),
        L = c.innerHeight || Math.max(s.body.offsetHeight, s.documentElement.offsetHeight);
      T.appendChild(o), n.getInputField().setAttribute("aria-autocomplete", "list"), n.getInputField().setAttribute("aria-owns", this.id), n.getInputField().setAttribute("aria-activedescendant", this.id + "-" + this.selectedHint);
      var m = t.options.moveOnOverlap ? o.getBoundingClientRect() : new DOMRect(),
        z = t.options.paddingForScrollbar ? o.scrollHeight > o.clientHeight + 1 : !1,
        x;
      setTimeout(function () {
        x = n.getScrollInfo();
      });
      var ot = m.bottom - L;
      if (ot > 0) {
        var P = m.bottom - m.top,
          rt = y.top - (y.bottom - m.top);
        if (rt - P > 0) o.style.top = (O = y.top - P - E) + "px", j = !1;else if (P > L) {
          o.style.height = L - 5 + "px", o.style.top = (O = y.bottom - m.top - E) + "px";
          var V = n.getCursor();
          e.from.ch != V.ch && (y = n.cursorCoords(V), o.style.left = (k = y.left - F) + "px", m = o.getBoundingClientRect());
        }
      }
      var C = m.right - N;
      if (z && (C += n.display.nativeBarWidth), C > 0 && (m.right - m.left > N && (o.style.width = N - 5 + "px", C -= m.right - m.left - N), o.style.left = (k = y.left - C - F) + "px"), z) for (var I = o.firstChild; I; I = I.nextSibling) I.style.paddingRight = n.display.nativeBarWidth + "px";
      if (n.addKeyMap(this.keyMap = et(t, {
        moveFocus: function (d, g) {
          i.changeActive(i.selectedHint + d, g);
        },
        setFocus: function (d) {
          i.changeActive(d);
        },
        menuSize: function () {
          return i.screenAmount();
        },
        length: h.length,
        close: function () {
          t.close();
        },
        pick: function () {
          i.pick();
        },
        data: e
      })), t.options.closeOnUnfocus) {
        var Y;
        n.on("blur", this.onBlur = function () {
          Y = setTimeout(function () {
            t.close();
          }, 100);
        }), n.on("focus", this.onFocus = function () {
          clearTimeout(Y);
        });
      }
      n.on("scroll", this.onScroll = function () {
        var d = n.getScrollInfo(),
          g = n.getWrapperElement().getBoundingClientRect();
        x || (x = n.getScrollInfo());
        var X = O + x.top - d.top,
          R = X - (c.pageYOffset || (s.documentElement || s.body).scrollTop);
        if (j || (R += o.offsetHeight), R <= g.top || R >= g.bottom) return t.close();
        o.style.top = X + "px", o.style.left = k + x.left - d.left + "px";
      }), r.on(o, "dblclick", function (d) {
        var g = B(o, d.target || d.srcElement);
        g && g.hintId != null && (i.changeActive(g.hintId), i.pick());
      }), r.on(o, "click", function (d) {
        var g = B(o, d.target || d.srcElement);
        g && g.hintId != null && (i.changeActive(g.hintId), t.options.completeOnSingleClick && i.pick());
      }), r.on(o, "mousedown", function () {
        setTimeout(function () {
          n.focus();
        }, 20);
      });
      var $ = this.getSelectedHintRange();
      return ($.from !== 0 || $.to !== 0) && this.scrollToActive(), r.signal(e, "select", h[this.selectedHint], o.childNodes[this.selectedHint]), !0;
    }
    p(K, "Widget"), K.prototype = {
      close: function () {
        if (this.completion.widget == this) {
          this.completion.widget = null, this.hints.parentNode && this.hints.parentNode.removeChild(this.hints), this.completion.cm.removeKeyMap(this.keyMap);
          var t = this.completion.cm.getInputField();
          t.removeAttribute("aria-activedescendant"), t.removeAttribute("aria-owns");
          var e = this.completion.cm;
          this.completion.options.closeOnUnfocus && (e.off("blur", this.onBlur), e.off("focus", this.onFocus)), e.off("scroll", this.onScroll);
        }
      },
      disable: function () {
        this.completion.cm.removeKeyMap(this.keyMap);
        var t = this;
        this.keyMap = {
          Enter: function () {
            t.picked = !0;
          }
        }, this.completion.cm.addKeyMap(this.keyMap);
      },
      pick: function () {
        this.completion.pick(this.data, this.selectedHint);
      },
      changeActive: function (t, e) {
        if (t >= this.data.list.length ? t = e ? this.data.list.length - 1 : 0 : t < 0 && (t = e ? 0 : this.data.list.length - 1), this.selectedHint != t) {
          var i = this.hints.childNodes[this.selectedHint];
          i && (i.className = i.className.replace(" " + v, ""), i.removeAttribute("aria-selected")), i = this.hints.childNodes[this.selectedHint = t], i.className += " " + v, i.setAttribute("aria-selected", "true"), this.completion.cm.getInputField().setAttribute("aria-activedescendant", i.id), this.scrollToActive(), r.signal(this.data, "select", this.data.list[this.selectedHint], i);
        }
      },
      scrollToActive: function () {
        var t = this.getSelectedHintRange(),
          e = this.hints.childNodes[t.from],
          i = this.hints.childNodes[t.to],
          n = this.hints.firstChild;
        e.offsetTop < this.hints.scrollTop ? this.hints.scrollTop = e.offsetTop - n.offsetTop : i.offsetTop + i.offsetHeight > this.hints.scrollTop + this.hints.clientHeight && (this.hints.scrollTop = i.offsetTop + i.offsetHeight - this.hints.clientHeight + n.offsetTop);
      },
      screenAmount: function () {
        return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1;
      },
      getSelectedHintRange: function () {
        var t = this.completion.options.scrollMargin || 0;
        return {
          from: Math.max(0, this.selectedHint - t),
          to: Math.min(this.data.list.length - 1, this.selectedHint + t)
        };
      }
    };
    function it(t, e) {
      if (!t.somethingSelected()) return e;
      for (var i = [], n = 0; n < e.length; n++) e[n].supportsSelection && i.push(e[n]);
      return i;
    }
    p(it, "applicableHelpers");
    function U(t, e, i, n) {
      if (t.async) t(e, n, i);else {
        var s = t(e, i);
        s && s.then ? s.then(n) : n(s);
      }
    }
    p(U, "fetchHints");
    function nt(t, e) {
      var i = t.getHelpers(e, "hint"),
        n;
      if (i.length) {
        var s = p(function (c, o, f) {
          var h = it(c, i);
          function u(l) {
            if (l == h.length) return o(null);
            U(h[l], c, f, function (a) {
              a && a.list.length > 0 ? o(a) : u(l + 1);
            });
          }
          p(u, "run"), u(0);
        }, "resolved");
        return s.async = !0, s.supportsSelection = !0, s;
      } else return (n = t.getHelper(t.getCursor(), "hintWords")) ? function (c) {
        return r.hint.fromList(c, {
          words: n
        });
      } : r.hint.anyword ? function (c, o) {
        return r.hint.anyword(c, o);
      } : function () {};
    }
    p(nt, "resolveAutoHints"), r.registerHelper("hint", "auto", {
      resolve: nt
    }), r.registerHelper("hint", "fromList", function (t, e) {
      var i = t.getCursor(),
        n = t.getTokenAt(i),
        s,
        c = r.Pos(i.line, n.start),
        o = i;
      n.start < i.ch && /\w/.test(n.string.charAt(i.ch - n.start - 1)) ? s = n.string.substr(0, i.ch - n.start) : (s = "", c = i);
      for (var f = [], h = 0; h < e.words.length; h++) {
        var u = e.words[h];
        u.slice(0, s.length) == s && f.push(u);
      }
      if (f.length) return {
        list: f,
        from: c,
        to: o
      };
    }), r.commands.autocomplete = r.showHint;
    var D = {
      hint: r.hint.auto,
      completeSingle: !0,
      alignWithWord: !0,
      closeCharacters: /[\s()\[\]{};:>,]/,
      closeOnPick: !0,
      closeOnUnfocus: !0,
      updateOnCursorActivity: !0,
      completeOnSingleClick: !0,
      container: null,
      customKeys: null,
      extraKeys: null,
      paddingForScrollbar: !0,
      moveOnOverlap: !0
    };
    r.defineOption("hintOptions", null);
  });
})();
var J = ht.exports;
const at = G.getDefaultExportFromCjs(J),
  ft = lt({
    __proto__: null,
    default: at
  }, [J]);
exports.showHint = ft;

/***/ }),

/***/ "../../graphiql-react/dist/sublime.cjs.js":
/*!************************************************!*\
  !*** ../../graphiql-react/dist/sublime.cjs.js ***!
  \************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



var _ = Object.defineProperty;
var v = (m, B) => _(m, "name", {
  value: B,
  configurable: !0
});
const E = __webpack_require__(/*! ./codemirror.cjs2.js */ "../../graphiql-react/dist/codemirror.cjs2.js"),
  Y = __webpack_require__(/*! ./searchcursor.cjs2.js */ "../../graphiql-react/dist/searchcursor.cjs2.js"),
  z = __webpack_require__(/*! ./matchbrackets.cjs2.js */ "../../graphiql-react/dist/matchbrackets.cjs2.js");
function J(m, B) {
  for (var h = 0; h < B.length; h++) {
    const a = B[h];
    if (typeof a != "string" && !Array.isArray(a)) {
      for (const f in a) if (f !== "default" && !(f in m)) {
        const A = Object.getOwnPropertyDescriptor(a, f);
        A && Object.defineProperty(m, f, A.get ? A : {
          enumerable: !0,
          get: () => a[f]
        });
      }
    }
  }
  return Object.freeze(Object.defineProperty(m, Symbol.toStringTag, {
    value: "Module"
  }));
}
v(J, "_mergeNamespaces");
var G = {
  exports: {}
};
(function (m, B) {
  (function (h) {
    h(E.requireCodemirror(), Y.requireSearchcursor(), z.requireMatchbrackets());
  })(function (h) {
    var a = h.commands,
      f = h.Pos;
    function A(e, t, n) {
      if (n < 0 && t.ch == 0) return e.clipPos(f(t.line - 1));
      var r = e.getLine(t.line);
      if (n > 0 && t.ch >= r.length) return e.clipPos(f(t.line + 1, 0));
      for (var l = "start", i, o = t.ch, s = o, u = n < 0 ? 0 : r.length, d = 0; s != u; s += n, d++) {
        var p = r.charAt(n < 0 ? s - 1 : s),
          c = p != "_" && h.isWordChar(p) ? "w" : "o";
        if (c == "w" && p.toUpperCase() == p && (c = "W"), l == "start") c != "o" ? (l = "in", i = c) : o = s + n;else if (l == "in" && i != c) {
          if (i == "w" && c == "W" && n < 0 && s--, i == "W" && c == "w" && n > 0) if (s == o + 1) {
            i = "w";
            continue;
          } else s--;
          break;
        }
      }
      return f(t.line, s);
    }
    v(A, "findPosSubword");
    function T(e, t) {
      e.extendSelectionsBy(function (n) {
        return e.display.shift || e.doc.extend || n.empty() ? A(e.doc, n.head, t) : t < 0 ? n.from() : n.to();
      });
    }
    v(T, "moveSubword"), a.goSubwordLeft = function (e) {
      T(e, -1);
    }, a.goSubwordRight = function (e) {
      T(e, 1);
    }, a.scrollLineUp = function (e) {
      var t = e.getScrollInfo();
      if (!e.somethingSelected()) {
        var n = e.lineAtHeight(t.top + t.clientHeight, "local");
        e.getCursor().line >= n && e.execCommand("goLineUp");
      }
      e.scrollTo(null, t.top - e.defaultTextHeight());
    }, a.scrollLineDown = function (e) {
      var t = e.getScrollInfo();
      if (!e.somethingSelected()) {
        var n = e.lineAtHeight(t.top, "local") + 1;
        e.getCursor().line <= n && e.execCommand("goLineDown");
      }
      e.scrollTo(null, t.top + e.defaultTextHeight());
    }, a.splitSelectionByLine = function (e) {
      for (var t = e.listSelections(), n = [], r = 0; r < t.length; r++) for (var l = t[r].from(), i = t[r].to(), o = l.line; o <= i.line; ++o) i.line > l.line && o == i.line && i.ch == 0 || n.push({
        anchor: o == l.line ? l : f(o, 0),
        head: o == i.line ? i : f(o)
      });
      e.setSelections(n, 0);
    }, a.singleSelectionTop = function (e) {
      var t = e.listSelections()[0];
      e.setSelection(t.anchor, t.head, {
        scroll: !1
      });
    }, a.selectLine = function (e) {
      for (var t = e.listSelections(), n = [], r = 0; r < t.length; r++) {
        var l = t[r];
        n.push({
          anchor: f(l.from().line, 0),
          head: f(l.to().line + 1, 0)
        });
      }
      e.setSelections(n);
    };
    function x(e, t) {
      if (e.isReadOnly()) return h.Pass;
      e.operation(function () {
        for (var n = e.listSelections().length, r = [], l = -1, i = 0; i < n; i++) {
          var o = e.listSelections()[i].head;
          if (!(o.line <= l)) {
            var s = f(o.line + (t ? 0 : 1), 0);
            e.replaceRange(`
`, s, null, "+insertLine"), e.indentLine(s.line, null, !0), r.push({
              head: s,
              anchor: s
            }), l = o.line + 1;
          }
        }
        e.setSelections(r);
      }), e.execCommand("indentAuto");
    }
    v(x, "insertLine"), a.insertLineAfter = function (e) {
      return x(e, !1);
    }, a.insertLineBefore = function (e) {
      return x(e, !0);
    };
    function K(e, t) {
      for (var n = t.ch, r = n, l = e.getLine(t.line); n && h.isWordChar(l.charAt(n - 1));) --n;
      for (; r < l.length && h.isWordChar(l.charAt(r));) ++r;
      return {
        from: f(t.line, n),
        to: f(t.line, r),
        word: l.slice(n, r)
      };
    }
    v(K, "wordAt"), a.selectNextOccurrence = function (e) {
      var t = e.getCursor("from"),
        n = e.getCursor("to"),
        r = e.state.sublimeFindFullWord == e.doc.sel;
      if (h.cmpPos(t, n) == 0) {
        var l = K(e, t);
        if (!l.word) return;
        e.setSelection(l.from, l.to), r = !0;
      } else {
        var i = e.getRange(t, n),
          o = r ? new RegExp("\\b" + i + "\\b") : i,
          s = e.getSearchCursor(o, n),
          u = s.findNext();
        if (u || (s = e.getSearchCursor(o, f(e.firstLine(), 0)), u = s.findNext()), !u || H(e.listSelections(), s.from(), s.to())) return;
        e.addSelection(s.from(), s.to());
      }
      r && (e.state.sublimeFindFullWord = e.doc.sel);
    }, a.skipAndSelectNextOccurrence = function (e) {
      var t = e.getCursor("anchor"),
        n = e.getCursor("head");
      a.selectNextOccurrence(e), h.cmpPos(t, n) != 0 && e.doc.setSelections(e.doc.listSelections().filter(function (r) {
        return r.anchor != t || r.head != n;
      }));
    };
    function y(e, t) {
      for (var n = e.listSelections(), r = [], l = 0; l < n.length; l++) {
        var i = n[l],
          o = e.findPosV(i.anchor, t, "line", i.anchor.goalColumn),
          s = e.findPosV(i.head, t, "line", i.head.goalColumn);
        o.goalColumn = i.anchor.goalColumn != null ? i.anchor.goalColumn : e.cursorCoords(i.anchor, "div").left, s.goalColumn = i.head.goalColumn != null ? i.head.goalColumn : e.cursorCoords(i.head, "div").left;
        var u = {
          anchor: o,
          head: s
        };
        r.push(i), r.push(u);
      }
      e.setSelections(r);
    }
    v(y, "addCursorToSelection"), a.addCursorToPrevLine = function (e) {
      y(e, -1);
    }, a.addCursorToNextLine = function (e) {
      y(e, 1);
    };
    function H(e, t, n) {
      for (var r = 0; r < e.length; r++) if (h.cmpPos(e[r].from(), t) == 0 && h.cmpPos(e[r].to(), n) == 0) return !0;
      return !1;
    }
    v(H, "isSelectedRange");
    var P = "(){}[]";
    function U(e) {
      for (var t = e.listSelections(), n = [], r = 0; r < t.length; r++) {
        var l = t[r],
          i = l.head,
          o = e.scanForBracket(i, -1);
        if (!o) return !1;
        for (;;) {
          var s = e.scanForBracket(i, 1);
          if (!s) return !1;
          if (s.ch == P.charAt(P.indexOf(o.ch) + 1)) {
            var u = f(o.pos.line, o.pos.ch + 1);
            if (h.cmpPos(u, l.from()) == 0 && h.cmpPos(s.pos, l.to()) == 0) {
              if (o = e.scanForBracket(o.pos, -1), !o) return !1;
            } else {
              n.push({
                anchor: u,
                head: s.pos
              });
              break;
            }
          }
          i = f(s.pos.line, s.pos.ch + 1);
        }
      }
      return e.setSelections(n), !0;
    }
    v(U, "selectBetweenBrackets"), a.selectScope = function (e) {
      U(e) || e.execCommand("selectAll");
    }, a.selectBetweenBrackets = function (e) {
      if (!U(e)) return h.Pass;
    };
    function I(e) {
      return e ? /\bpunctuation\b/.test(e) ? e : void 0 : null;
    }
    v(I, "puncType"), a.goToBracket = function (e) {
      e.extendSelectionsBy(function (t) {
        var n = e.scanForBracket(t.head, 1, I(e.getTokenTypeAt(t.head)));
        if (n && h.cmpPos(n.pos, t.head) != 0) return n.pos;
        var r = e.scanForBracket(t.head, -1, I(e.getTokenTypeAt(f(t.head.line, t.head.ch + 1))));
        return r && f(r.pos.line, r.pos.ch + 1) || t.head;
      });
    }, a.swapLineUp = function (e) {
      if (e.isReadOnly()) return h.Pass;
      for (var t = e.listSelections(), n = [], r = e.firstLine() - 1, l = [], i = 0; i < t.length; i++) {
        var o = t[i],
          s = o.from().line - 1,
          u = o.to().line;
        l.push({
          anchor: f(o.anchor.line - 1, o.anchor.ch),
          head: f(o.head.line - 1, o.head.ch)
        }), o.to().ch == 0 && !o.empty() && --u, s > r ? n.push(s, u) : n.length && (n[n.length - 1] = u), r = u;
      }
      e.operation(function () {
        for (var d = 0; d < n.length; d += 2) {
          var p = n[d],
            c = n[d + 1],
            b = e.getLine(p);
          e.replaceRange("", f(p, 0), f(p + 1, 0), "+swapLine"), c > e.lastLine() ? e.replaceRange(`
` + b, f(e.lastLine()), null, "+swapLine") : e.replaceRange(b + `
`, f(c, 0), null, "+swapLine");
        }
        e.setSelections(l), e.scrollIntoView();
      });
    }, a.swapLineDown = function (e) {
      if (e.isReadOnly()) return h.Pass;
      for (var t = e.listSelections(), n = [], r = e.lastLine() + 1, l = t.length - 1; l >= 0; l--) {
        var i = t[l],
          o = i.to().line + 1,
          s = i.from().line;
        i.to().ch == 0 && !i.empty() && o--, o < r ? n.push(o, s) : n.length && (n[n.length - 1] = s), r = s;
      }
      e.operation(function () {
        for (var u = n.length - 2; u >= 0; u -= 2) {
          var d = n[u],
            p = n[u + 1],
            c = e.getLine(d);
          d == e.lastLine() ? e.replaceRange("", f(d - 1), f(d), "+swapLine") : e.replaceRange("", f(d, 0), f(d + 1, 0), "+swapLine"), e.replaceRange(c + `
`, f(p, 0), null, "+swapLine");
        }
        e.scrollIntoView();
      });
    }, a.toggleCommentIndented = function (e) {
      e.toggleComment({
        indent: !0
      });
    }, a.joinLines = function (e) {
      for (var t = e.listSelections(), n = [], r = 0; r < t.length; r++) {
        for (var l = t[r], i = l.from(), o = i.line, s = l.to().line; r < t.length - 1 && t[r + 1].from().line == s;) s = t[++r].to().line;
        n.push({
          start: o,
          end: s,
          anchor: !l.empty() && i
        });
      }
      e.operation(function () {
        for (var u = 0, d = [], p = 0; p < n.length; p++) {
          for (var c = n[p], b = c.anchor && f(c.anchor.line - u, c.anchor.ch), w, g = c.start; g <= c.end; g++) {
            var S = g - u;
            g == c.end && (w = f(S, e.getLine(S).length + 1)), S < e.lastLine() && (e.replaceRange(" ", f(S), f(S + 1, /^\s*/.exec(e.getLine(S + 1))[0].length)), ++u);
          }
          d.push({
            anchor: b || w,
            head: w
          });
        }
        e.setSelections(d, 0);
      });
    }, a.duplicateLine = function (e) {
      e.operation(function () {
        for (var t = e.listSelections().length, n = 0; n < t; n++) {
          var r = e.listSelections()[n];
          r.empty() ? e.replaceRange(e.getLine(r.head.line) + `
`, f(r.head.line, 0)) : e.replaceRange(e.getRange(r.from(), r.to()), r.from());
        }
        e.scrollIntoView();
      });
    };
    function R(e, t, n) {
      if (e.isReadOnly()) return h.Pass;
      for (var r = e.listSelections(), l = [], i, o = 0; o < r.length; o++) {
        var s = r[o];
        if (!s.empty()) {
          for (var u = s.from().line, d = s.to().line; o < r.length - 1 && r[o + 1].from().line == d;) d = r[++o].to().line;
          r[o].to().ch || d--, l.push(u, d);
        }
      }
      l.length ? i = !0 : l.push(e.firstLine(), e.lastLine()), e.operation(function () {
        for (var p = [], c = 0; c < l.length; c += 2) {
          var b = l[c],
            w = l[c + 1],
            g = f(b, 0),
            S = f(w),
            F = e.getRange(g, S, !1);
          t ? F.sort(function (k, L) {
            return k < L ? -n : k == L ? 0 : n;
          }) : F.sort(function (k, L) {
            var W = k.toUpperCase(),
              M = L.toUpperCase();
            return W != M && (k = W, L = M), k < L ? -n : k == L ? 0 : n;
          }), e.replaceRange(F, g, S), i && p.push({
            anchor: g,
            head: f(w + 1, 0)
          });
        }
        i && e.setSelections(p, 0);
      });
    }
    v(R, "sortLines"), a.sortLines = function (e) {
      R(e, !0, 1);
    }, a.reverseSortLines = function (e) {
      R(e, !0, -1);
    }, a.sortLinesInsensitive = function (e) {
      R(e, !1, 1);
    }, a.reverseSortLinesInsensitive = function (e) {
      R(e, !1, -1);
    }, a.nextBookmark = function (e) {
      var t = e.state.sublimeBookmarks;
      if (t) for (; t.length;) {
        var n = t.shift(),
          r = n.find();
        if (r) return t.push(n), e.setSelection(r.from, r.to);
      }
    }, a.prevBookmark = function (e) {
      var t = e.state.sublimeBookmarks;
      if (t) for (; t.length;) {
        t.unshift(t.pop());
        var n = t[t.length - 1].find();
        if (!n) t.pop();else return e.setSelection(n.from, n.to);
      }
    }, a.toggleBookmark = function (e) {
      for (var t = e.listSelections(), n = e.state.sublimeBookmarks || (e.state.sublimeBookmarks = []), r = 0; r < t.length; r++) {
        for (var l = t[r].from(), i = t[r].to(), o = t[r].empty() ? e.findMarksAt(l) : e.findMarks(l, i), s = 0; s < o.length; s++) if (o[s].sublimeBookmark) {
          o[s].clear();
          for (var u = 0; u < n.length; u++) n[u] == o[s] && n.splice(u--, 1);
          break;
        }
        s == o.length && n.push(e.markText(l, i, {
          sublimeBookmark: !0,
          clearWhenEmpty: !1
        }));
      }
    }, a.clearBookmarks = function (e) {
      var t = e.state.sublimeBookmarks;
      if (t) for (var n = 0; n < t.length; n++) t[n].clear();
      t.length = 0;
    }, a.selectBookmarks = function (e) {
      var t = e.state.sublimeBookmarks,
        n = [];
      if (t) for (var r = 0; r < t.length; r++) {
        var l = t[r].find();
        l ? n.push({
          anchor: l.from,
          head: l.to
        }) : t.splice(r--, 0);
      }
      n.length && e.setSelections(n, 0);
    };
    function D(e, t) {
      e.operation(function () {
        for (var n = e.listSelections(), r = [], l = [], i = 0; i < n.length; i++) {
          var o = n[i];
          o.empty() ? (r.push(i), l.push("")) : l.push(t(e.getRange(o.from(), o.to())));
        }
        e.replaceSelections(l, "around", "case");
        for (var i = r.length - 1, s; i >= 0; i--) {
          var o = n[r[i]];
          if (!(s && h.cmpPos(o.head, s) > 0)) {
            var u = K(e, o.head);
            s = u.from, e.replaceRange(t(u.word), u.from, u.to);
          }
        }
      });
    }
    v(D, "modifyWordOrSelection"), a.smartBackspace = function (e) {
      if (e.somethingSelected()) return h.Pass;
      e.operation(function () {
        for (var t = e.listSelections(), n = e.getOption("indentUnit"), r = t.length - 1; r >= 0; r--) {
          var l = t[r].head,
            i = e.getRange({
              line: l.line,
              ch: 0
            }, l),
            o = h.countColumn(i, null, e.getOption("tabSize")),
            s = e.findPosH(l, -1, "char", !1);
          if (i && !/\S/.test(i) && o % n == 0) {
            var u = new f(l.line, h.findColumn(i, o - n, n));
            u.ch != l.ch && (s = u);
          }
          e.replaceRange("", s, l, "+delete");
        }
      });
    }, a.delLineRight = function (e) {
      e.operation(function () {
        for (var t = e.listSelections(), n = t.length - 1; n >= 0; n--) e.replaceRange("", t[n].anchor, f(t[n].to().line), "+delete");
        e.scrollIntoView();
      });
    }, a.upcaseAtCursor = function (e) {
      D(e, function (t) {
        return t.toUpperCase();
      });
    }, a.downcaseAtCursor = function (e) {
      D(e, function (t) {
        return t.toLowerCase();
      });
    }, a.setSublimeMark = function (e) {
      e.state.sublimeMark && e.state.sublimeMark.clear(), e.state.sublimeMark = e.setBookmark(e.getCursor());
    }, a.selectToSublimeMark = function (e) {
      var t = e.state.sublimeMark && e.state.sublimeMark.find();
      t && e.setSelection(e.getCursor(), t);
    }, a.deleteToSublimeMark = function (e) {
      var t = e.state.sublimeMark && e.state.sublimeMark.find();
      if (t) {
        var n = e.getCursor(),
          r = t;
        if (h.cmpPos(n, r) > 0) {
          var l = r;
          r = n, n = l;
        }
        e.state.sublimeKilled = e.getRange(n, r), e.replaceRange("", n, r);
      }
    }, a.swapWithSublimeMark = function (e) {
      var t = e.state.sublimeMark && e.state.sublimeMark.find();
      t && (e.state.sublimeMark.clear(), e.state.sublimeMark = e.setBookmark(e.getCursor()), e.setCursor(t));
    }, a.sublimeYank = function (e) {
      e.state.sublimeKilled != null && e.replaceSelection(e.state.sublimeKilled, null, "paste");
    }, a.showInCenter = function (e) {
      var t = e.cursorCoords(null, "local");
      e.scrollTo(null, (t.top + t.bottom) / 2 - e.getScrollInfo().clientHeight / 2);
    };
    function N(e) {
      var t = e.getCursor("from"),
        n = e.getCursor("to");
      if (h.cmpPos(t, n) == 0) {
        var r = K(e, t);
        if (!r.word) return;
        t = r.from, n = r.to;
      }
      return {
        from: t,
        to: n,
        query: e.getRange(t, n),
        word: r
      };
    }
    v(N, "getTarget");
    function O(e, t) {
      var n = N(e);
      if (n) {
        var r = n.query,
          l = e.getSearchCursor(r, t ? n.to : n.from);
        (t ? l.findNext() : l.findPrevious()) ? e.setSelection(l.from(), l.to()) : (l = e.getSearchCursor(r, t ? f(e.firstLine(), 0) : e.clipPos(f(e.lastLine()))), (t ? l.findNext() : l.findPrevious()) ? e.setSelection(l.from(), l.to()) : n.word && e.setSelection(n.from, n.to));
      }
    }
    v(O, "findAndGoTo"), a.findUnder = function (e) {
      O(e, !0);
    }, a.findUnderPrevious = function (e) {
      O(e, !1);
    }, a.findAllUnder = function (e) {
      var t = N(e);
      if (t) {
        for (var n = e.getSearchCursor(t.query), r = [], l = -1; n.findNext();) r.push({
          anchor: n.from(),
          head: n.to()
        }), n.from().line <= t.from.line && n.from().ch <= t.from.ch && l++;
        e.setSelections(r, l);
      }
    };
    var C = h.keyMap;
    C.macSublime = {
      "Cmd-Left": "goLineStartSmart",
      "Shift-Tab": "indentLess",
      "Shift-Ctrl-K": "deleteLine",
      "Alt-Q": "wrapLines",
      "Ctrl-Left": "goSubwordLeft",
      "Ctrl-Right": "goSubwordRight",
      "Ctrl-Alt-Up": "scrollLineUp",
      "Ctrl-Alt-Down": "scrollLineDown",
      "Cmd-L": "selectLine",
      "Shift-Cmd-L": "splitSelectionByLine",
      Esc: "singleSelectionTop",
      "Cmd-Enter": "insertLineAfter",
      "Shift-Cmd-Enter": "insertLineBefore",
      "Cmd-D": "selectNextOccurrence",
      "Shift-Cmd-Space": "selectScope",
      "Shift-Cmd-M": "selectBetweenBrackets",
      "Cmd-M": "goToBracket",
      "Cmd-Ctrl-Up": "swapLineUp",
      "Cmd-Ctrl-Down": "swapLineDown",
      "Cmd-/": "toggleCommentIndented",
      "Cmd-J": "joinLines",
      "Shift-Cmd-D": "duplicateLine",
      F5: "sortLines",
      "Shift-F5": "reverseSortLines",
      "Cmd-F5": "sortLinesInsensitive",
      "Shift-Cmd-F5": "reverseSortLinesInsensitive",
      F2: "nextBookmark",
      "Shift-F2": "prevBookmark",
      "Cmd-F2": "toggleBookmark",
      "Shift-Cmd-F2": "clearBookmarks",
      "Alt-F2": "selectBookmarks",
      Backspace: "smartBackspace",
      "Cmd-K Cmd-D": "skipAndSelectNextOccurrence",
      "Cmd-K Cmd-K": "delLineRight",
      "Cmd-K Cmd-U": "upcaseAtCursor",
      "Cmd-K Cmd-L": "downcaseAtCursor",
      "Cmd-K Cmd-Space": "setSublimeMark",
      "Cmd-K Cmd-A": "selectToSublimeMark",
      "Cmd-K Cmd-W": "deleteToSublimeMark",
      "Cmd-K Cmd-X": "swapWithSublimeMark",
      "Cmd-K Cmd-Y": "sublimeYank",
      "Cmd-K Cmd-C": "showInCenter",
      "Cmd-K Cmd-G": "clearBookmarks",
      "Cmd-K Cmd-Backspace": "delLineLeft",
      "Cmd-K Cmd-1": "foldAll",
      "Cmd-K Cmd-0": "unfoldAll",
      "Cmd-K Cmd-J": "unfoldAll",
      "Ctrl-Shift-Up": "addCursorToPrevLine",
      "Ctrl-Shift-Down": "addCursorToNextLine",
      "Cmd-F3": "findUnder",
      "Shift-Cmd-F3": "findUnderPrevious",
      "Alt-F3": "findAllUnder",
      "Shift-Cmd-[": "fold",
      "Shift-Cmd-]": "unfold",
      "Cmd-I": "findIncremental",
      "Shift-Cmd-I": "findIncrementalReverse",
      "Cmd-H": "replace",
      F3: "findNext",
      "Shift-F3": "findPrev",
      fallthrough: "macDefault"
    }, h.normalizeKeyMap(C.macSublime), C.pcSublime = {
      "Shift-Tab": "indentLess",
      "Shift-Ctrl-K": "deleteLine",
      "Alt-Q": "wrapLines",
      "Ctrl-T": "transposeChars",
      "Alt-Left": "goSubwordLeft",
      "Alt-Right": "goSubwordRight",
      "Ctrl-Up": "scrollLineUp",
      "Ctrl-Down": "scrollLineDown",
      "Ctrl-L": "selectLine",
      "Shift-Ctrl-L": "splitSelectionByLine",
      Esc: "singleSelectionTop",
      "Ctrl-Enter": "insertLineAfter",
      "Shift-Ctrl-Enter": "insertLineBefore",
      "Ctrl-D": "selectNextOccurrence",
      "Shift-Ctrl-Space": "selectScope",
      "Shift-Ctrl-M": "selectBetweenBrackets",
      "Ctrl-M": "goToBracket",
      "Shift-Ctrl-Up": "swapLineUp",
      "Shift-Ctrl-Down": "swapLineDown",
      "Ctrl-/": "toggleCommentIndented",
      "Ctrl-J": "joinLines",
      "Shift-Ctrl-D": "duplicateLine",
      F9: "sortLines",
      "Shift-F9": "reverseSortLines",
      "Ctrl-F9": "sortLinesInsensitive",
      "Shift-Ctrl-F9": "reverseSortLinesInsensitive",
      F2: "nextBookmark",
      "Shift-F2": "prevBookmark",
      "Ctrl-F2": "toggleBookmark",
      "Shift-Ctrl-F2": "clearBookmarks",
      "Alt-F2": "selectBookmarks",
      Backspace: "smartBackspace",
      "Ctrl-K Ctrl-D": "skipAndSelectNextOccurrence",
      "Ctrl-K Ctrl-K": "delLineRight",
      "Ctrl-K Ctrl-U": "upcaseAtCursor",
      "Ctrl-K Ctrl-L": "downcaseAtCursor",
      "Ctrl-K Ctrl-Space": "setSublimeMark",
      "Ctrl-K Ctrl-A": "selectToSublimeMark",
      "Ctrl-K Ctrl-W": "deleteToSublimeMark",
      "Ctrl-K Ctrl-X": "swapWithSublimeMark",
      "Ctrl-K Ctrl-Y": "sublimeYank",
      "Ctrl-K Ctrl-C": "showInCenter",
      "Ctrl-K Ctrl-G": "clearBookmarks",
      "Ctrl-K Ctrl-Backspace": "delLineLeft",
      "Ctrl-K Ctrl-1": "foldAll",
      "Ctrl-K Ctrl-0": "unfoldAll",
      "Ctrl-K Ctrl-J": "unfoldAll",
      "Ctrl-Alt-Up": "addCursorToPrevLine",
      "Ctrl-Alt-Down": "addCursorToNextLine",
      "Ctrl-F3": "findUnder",
      "Shift-Ctrl-F3": "findUnderPrevious",
      "Alt-F3": "findAllUnder",
      "Shift-Ctrl-[": "fold",
      "Shift-Ctrl-]": "unfold",
      "Ctrl-I": "findIncremental",
      "Shift-Ctrl-I": "findIncrementalReverse",
      "Ctrl-H": "replace",
      F3: "findNext",
      "Shift-F3": "findPrev",
      fallthrough: "pcDefault"
    }, h.normalizeKeyMap(C.pcSublime);
    var V = C.default == C.macDefault;
    C.sublime = V ? C.macSublime : C.pcSublime;
  });
})();
var q = G.exports;
const Q = E.getDefaultExportFromCjs(q),
  X = J({
    __proto__: null,
    default: Q
  }, [q]);
exports.sublime = X;

/***/ }),

/***/ "../../graphiql-toolkit/esm/async-helpers/index.js":
/*!*********************************************************!*\
  !*** ../../graphiql-toolkit/esm/async-helpers/index.js ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.fetcherReturnToPromise = fetcherReturnToPromise;
exports.isAsyncIterable = isAsyncIterable;
exports.isObservable = isObservable;
exports.isPromise = isPromise;
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function (resolve) {
      resolve(value);
    });
  }
  return new (P || (P = Promise))(function (resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
};
function isPromise(value) {
  return typeof value === 'object' && value !== null && typeof value.then === 'function';
}
function observableToPromise(observable) {
  return new Promise((resolve, reject) => {
    const subscription = observable.subscribe({
      next(v) {
        resolve(v);
        subscription.unsubscribe();
      },
      error: reject,
      complete() {
        reject(new Error('no value resolved'));
      }
    });
  });
}
function isObservable(value) {
  return typeof value === 'object' && value !== null && 'subscribe' in value && typeof value.subscribe === 'function';
}
function isAsyncIterable(input) {
  return typeof input === 'object' && input !== null && (input[Symbol.toStringTag] === 'AsyncGenerator' || Symbol.asyncIterator in input);
}
function asyncIterableToPromise(input) {
  var _a;
  return __awaiter(this, void 0, void 0, function* () {
    const iteratorReturn = (_a = ('return' in input ? input : input[Symbol.asyncIterator]()).return) === null || _a === void 0 ? void 0 : _a.bind(input);
    const iteratorNext = ('next' in input ? input : input[Symbol.asyncIterator]()).next.bind(input);
    const result = yield iteratorNext();
    void (iteratorReturn === null || iteratorReturn === void 0 ? void 0 : iteratorReturn());
    return result.value;
  });
}
function fetcherReturnToPromise(fetcherResult) {
  return __awaiter(this, void 0, void 0, function* () {
    const result = yield fetcherResult;
    if (isAsyncIterable(result)) {
      return asyncIterableToPromise(result);
    }
    if (isObservable(result)) {
      return observableToPromise(result);
    }
    return result;
  });
}

/***/ }),

/***/ "../../graphiql-toolkit/esm/create-fetcher/createFetcher.js":
/*!******************************************************************!*\
  !*** ../../graphiql-toolkit/esm/create-fetcher/createFetcher.js ***!
  \******************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.createGraphiQLFetcher = createGraphiQLFetcher;
var _lib = __webpack_require__(/*! ./lib */ "../../graphiql-toolkit/esm/create-fetcher/lib.js");
function createGraphiQLFetcher(options) {
  let httpFetch;
  if (typeof window !== 'undefined' && window.fetch) {
    httpFetch = window.fetch;
  }
  if ((options === null || options === void 0 ? void 0 : options.enableIncrementalDelivery) === null || options.enableIncrementalDelivery !== false) {
    options.enableIncrementalDelivery = true;
  }
  if (options.fetch) {
    httpFetch = options.fetch;
  }
  if (!httpFetch) {
    throw new Error('No valid fetcher implementation available');
  }
  const simpleFetcher = (0, _lib.createSimpleFetcher)(options, httpFetch);
  const httpFetcher = options.enableIncrementalDelivery ? (0, _lib.createMultipartFetcher)(options, httpFetch) : simpleFetcher;
  return (graphQLParams, fetcherOpts) => {
    if (graphQLParams.operationName === 'IntrospectionQuery') {
      return (options.schemaFetcher || simpleFetcher)(graphQLParams, fetcherOpts);
    }
    const isSubscription = (fetcherOpts === null || fetcherOpts === void 0 ? void 0 : fetcherOpts.documentAST) ? (0, _lib.isSubscriptionWithName)(fetcherOpts.documentAST, graphQLParams.operationName || undefined) : false;
    if (isSubscription) {
      const wsFetcher = (0, _lib.getWsFetcher)(options, fetcherOpts);
      if (!wsFetcher) {
        throw new Error(`Your GraphiQL createFetcher is not properly configured for websocket subscriptions yet. ${options.subscriptionUrl ? `Provided URL ${options.subscriptionUrl} failed` : 'Please provide subscriptionUrl, wsClient or legacyClient option first.'}`);
      }
      return wsFetcher(graphQLParams);
    }
    return httpFetcher(graphQLParams, fetcherOpts);
  };
}

/***/ }),

/***/ "../../graphiql-toolkit/esm/create-fetcher/index.js":
/*!**********************************************************!*\
  !*** ../../graphiql-toolkit/esm/create-fetcher/index.js ***!
  \**********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
var _exportNames = {
  createGraphiQLFetcher: true
};
Object.defineProperty(exports, "createGraphiQLFetcher", ({
  enumerable: true,
  get: function () {
    return _createFetcher.createGraphiQLFetcher;
  }
}));
var _types = __webpack_require__(/*! ./types */ "../../graphiql-toolkit/esm/create-fetcher/types.js");
Object.keys(_types).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _types[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _types[key];
    }
  });
});
var _createFetcher = __webpack_require__(/*! ./createFetcher */ "../../graphiql-toolkit/esm/create-fetcher/createFetcher.js");

/***/ }),

/***/ "../../graphiql-toolkit/esm/create-fetcher/lib.js":
/*!********************************************************!*\
  !*** ../../graphiql-toolkit/esm/create-fetcher/lib.js ***!
  \********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isSubscriptionWithName = exports.getWsFetcher = exports.createWebsocketsFetcherFromUrl = exports.createWebsocketsFetcherFromClient = exports.createSimpleFetcher = exports.createMultipartFetcher = exports.createLegacyWebsocketsFetcher = void 0;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
var _meros = __webpack_require__(/*! meros */ "../../../node_modules/meros/browser/index.mjs");
var _pushPullAsyncIterableIterator = __webpack_require__(/*! @n1ru4l/push-pull-async-iterable-iterator */ "../../../node_modules/@n1ru4l/push-pull-async-iterable-iterator/index.js");
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function (resolve) {
      resolve(value);
    });
  }
  return new (P || (P = Promise))(function (resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
};
var __await = void 0 && (void 0).__await || function (v) {
  return this instanceof __await ? (this.v = v, this) : new __await(v);
};
var __asyncValues = void 0 && (void 0).__asyncValues || function (o) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var m = o[Symbol.asyncIterator],
    i;
  return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
    return this;
  }, i);
  function verb(n) {
    i[n] = o[n] && function (v) {
      return new Promise(function (resolve, reject) {
        v = o[n](v), settle(resolve, reject, v.done, v.value);
      });
    };
  }
  function settle(resolve, reject, d, v) {
    Promise.resolve(v).then(function (v) {
      resolve({
        value: v,
        done: d
      });
    }, reject);
  }
};
var __asyncGenerator = void 0 && (void 0).__asyncGenerator || function (thisArg, _arguments, generator) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var g = generator.apply(thisArg, _arguments || []),
    i,
    q = [];
  return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () {
    return this;
  }, i;
  function verb(n) {
    if (g[n]) i[n] = function (v) {
      return new Promise(function (a, b) {
        q.push([n, v, a, b]) > 1 || resume(n, v);
      });
    };
  }
  function resume(n, v) {
    try {
      step(g[n](v));
    } catch (e) {
      settle(q[0][3], e);
    }
  }
  function step(r) {
    r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
  }
  function fulfill(value) {
    resume("next", value);
  }
  function reject(value) {
    resume("throw", value);
  }
  function settle(f, v) {
    if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
  }
};
const errorHasCode = err => {
  return typeof err === 'object' && err !== null && 'code' in err;
};
const isSubscriptionWithName = (document, name) => {
  let isSubscription = false;
  (0, _graphql.visit)(document, {
    OperationDefinition(node) {
      var _a;
      if (name === ((_a = node.name) === null || _a === void 0 ? void 0 : _a.value) && node.operation === 'subscription') {
        isSubscription = true;
      }
    }
  });
  return isSubscription;
};
exports.isSubscriptionWithName = isSubscriptionWithName;
const createSimpleFetcher = (options, httpFetch) => (graphQLParams, fetcherOpts) => __awaiter(void 0, void 0, void 0, function* () {
  const data = yield httpFetch(options.url, {
    method: 'POST',
    body: JSON.stringify(graphQLParams),
    headers: Object.assign(Object.assign({
      'content-type': 'application/json'
    }, options.headers), fetcherOpts === null || fetcherOpts === void 0 ? void 0 : fetcherOpts.headers)
  });
  return data.json();
});
exports.createSimpleFetcher = createSimpleFetcher;
const createWebsocketsFetcherFromUrl = (url, connectionParams) => {
  let wsClient;
  try {
    const {
      createClient
    } = __webpack_require__(/*! graphql-ws */ "../../../node_modules/graphql-ws/lib/index.js");
    wsClient = createClient({
      url,
      connectionParams
    });
    return createWebsocketsFetcherFromClient(wsClient);
  } catch (err) {
    if (errorHasCode(err) && err.code === 'MODULE_NOT_FOUND') {
      throw new Error("You need to install the 'graphql-ws' package to use websockets when passing a 'subscriptionUrl'");
    }
    console.error(`Error creating websocket client for ${url}`, err);
  }
};
exports.createWebsocketsFetcherFromUrl = createWebsocketsFetcherFromUrl;
const createWebsocketsFetcherFromClient = wsClient => graphQLParams => (0, _pushPullAsyncIterableIterator.makeAsyncIterableIteratorFromSink)(sink => wsClient.subscribe(graphQLParams, Object.assign(Object.assign({}, sink), {
  error(err) {
    if (err instanceof CloseEvent) {
      sink.error(new Error(`Socket closed with event ${err.code} ${err.reason || ''}`.trim()));
    } else {
      sink.error(err);
    }
  }
})));
exports.createWebsocketsFetcherFromClient = createWebsocketsFetcherFromClient;
const createLegacyWebsocketsFetcher = legacyWsClient => graphQLParams => {
  const observable = legacyWsClient.request(graphQLParams);
  return (0, _pushPullAsyncIterableIterator.makeAsyncIterableIteratorFromSink)(sink => observable.subscribe(sink).unsubscribe);
};
exports.createLegacyWebsocketsFetcher = createLegacyWebsocketsFetcher;
const createMultipartFetcher = (options, httpFetch) => function (graphQLParams, fetcherOpts) {
  return __asyncGenerator(this, arguments, function* () {
    var e_1, _a;
    const response = yield __await(httpFetch(options.url, {
      method: 'POST',
      body: JSON.stringify(graphQLParams),
      headers: Object.assign(Object.assign({
        'content-type': 'application/json',
        accept: 'application/json, multipart/mixed'
      }, options.headers), fetcherOpts === null || fetcherOpts === void 0 ? void 0 : fetcherOpts.headers)
    }).then(r => (0, _meros.meros)(r, {
      multiple: true
    })));
    if (!(0, _pushPullAsyncIterableIterator.isAsyncIterable)(response)) {
      return yield __await(yield yield __await(response.json()));
    }
    try {
      for (var response_1 = __asyncValues(response), response_1_1; response_1_1 = yield __await(response_1.next()), !response_1_1.done;) {
        const chunk = response_1_1.value;
        if (chunk.some(part => !part.json)) {
          const message = chunk.map(part => `Headers::\n${part.headers}\n\nBody::\n${part.body}`);
          throw new Error(`Expected multipart chunks to be of json type. got:\n${message}`);
        }
        yield yield __await(chunk.map(part => part.body));
      }
    } catch (e_1_1) {
      e_1 = {
        error: e_1_1
      };
    } finally {
      try {
        if (response_1_1 && !response_1_1.done && (_a = response_1.return)) yield __await(_a.call(response_1));
      } finally {
        if (e_1) throw e_1.error;
      }
    }
  });
};
exports.createMultipartFetcher = createMultipartFetcher;
const getWsFetcher = (options, fetcherOpts) => {
  if (options.wsClient) {
    return createWebsocketsFetcherFromClient(options.wsClient);
  }
  if (options.subscriptionUrl) {
    return createWebsocketsFetcherFromUrl(options.subscriptionUrl, Object.assign(Object.assign({}, options.wsConnectionParams), fetcherOpts === null || fetcherOpts === void 0 ? void 0 : fetcherOpts.headers));
  }
  const legacyWebsocketsClient = options.legacyClient || options.legacyWsClient;
  if (legacyWebsocketsClient) {
    return createLegacyWebsocketsFetcher(legacyWebsocketsClient);
  }
};
exports.getWsFetcher = getWsFetcher;

/***/ }),

/***/ "../../graphiql-toolkit/esm/create-fetcher/types.js":
/*!**********************************************************!*\
  !*** ../../graphiql-toolkit/esm/create-fetcher/types.js ***!
  \**********************************************************/
/***/ (function(__unused_webpack_module, exports) {



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

/***/ }),

/***/ "../../graphiql-toolkit/esm/format/index.js":
/*!**************************************************!*\
  !*** ../../graphiql-toolkit/esm/format/index.js ***!
  \**************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.formatError = formatError;
exports.formatResult = formatResult;
function stringify(obj) {
  return JSON.stringify(obj, null, 2);
}
function formatSingleError(error) {
  return Object.assign(Object.assign({}, error), {
    message: error.message,
    stack: error.stack
  });
}
function handleSingleError(error) {
  if (error instanceof Error) {
    return formatSingleError(error);
  }
  return error;
}
function formatError(error) {
  if (Array.isArray(error)) {
    return stringify({
      errors: error.map(e => handleSingleError(e))
    });
  }
  return stringify({
    errors: [handleSingleError(error)]
  });
}
function formatResult(result) {
  return stringify(result);
}

/***/ }),

/***/ "../../graphiql-toolkit/esm/graphql-helpers/auto-complete.js":
/*!*******************************************************************!*\
  !*** ../../graphiql-toolkit/esm/graphql-helpers/auto-complete.js ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.fillLeafs = fillLeafs;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
function fillLeafs(schema, docString, getDefaultFieldNames) {
  const insertions = [];
  if (!schema || !docString) {
    return {
      insertions,
      result: docString
    };
  }
  let ast;
  try {
    ast = (0, _graphql.parse)(docString);
  } catch (_a) {
    return {
      insertions,
      result: docString
    };
  }
  const fieldNameFn = getDefaultFieldNames || defaultGetDefaultFieldNames;
  const typeInfo = new _graphql.TypeInfo(schema);
  (0, _graphql.visit)(ast, {
    leave(node) {
      typeInfo.leave(node);
    },
    enter(node) {
      typeInfo.enter(node);
      if (node.kind === 'Field' && !node.selectionSet) {
        const fieldType = typeInfo.getType();
        const selectionSet = buildSelectionSet(isFieldType(fieldType), fieldNameFn);
        if (selectionSet && node.loc) {
          const indent = getIndentation(docString, node.loc.start);
          insertions.push({
            index: node.loc.end,
            string: ' ' + (0, _graphql.print)(selectionSet).replaceAll('\n', '\n' + indent)
          });
        }
      }
    }
  });
  return {
    insertions,
    result: withInsertions(docString, insertions)
  };
}
function defaultGetDefaultFieldNames(type) {
  if (!('getFields' in type)) {
    return [];
  }
  const fields = type.getFields();
  if (fields.id) {
    return ['id'];
  }
  if (fields.edges) {
    return ['edges'];
  }
  if (fields.node) {
    return ['node'];
  }
  const leafFieldNames = [];
  for (const fieldName of Object.keys(fields)) {
    if ((0, _graphql.isLeafType)(fields[fieldName].type)) {
      leafFieldNames.push(fieldName);
    }
  }
  return leafFieldNames;
}
function buildSelectionSet(type, getDefaultFieldNames) {
  const namedType = (0, _graphql.getNamedType)(type);
  if (!type || (0, _graphql.isLeafType)(type)) {
    return;
  }
  const fieldNames = getDefaultFieldNames(namedType);
  if (!Array.isArray(fieldNames) || fieldNames.length === 0 || !('getFields' in namedType)) {
    return;
  }
  return {
    kind: _graphql.Kind.SELECTION_SET,
    selections: fieldNames.map(fieldName => {
      const fieldDef = namedType.getFields()[fieldName];
      const fieldType = fieldDef ? fieldDef.type : null;
      return {
        kind: _graphql.Kind.FIELD,
        name: {
          kind: _graphql.Kind.NAME,
          value: fieldName
        },
        selectionSet: buildSelectionSet(fieldType, getDefaultFieldNames)
      };
    })
  };
}
function withInsertions(initial, insertions) {
  if (insertions.length === 0) {
    return initial;
  }
  let edited = '';
  let prevIndex = 0;
  for (const {
    index,
    string
  } of insertions) {
    edited += initial.slice(prevIndex, index) + string;
    prevIndex = index;
  }
  edited += initial.slice(prevIndex);
  return edited;
}
function getIndentation(str, index) {
  let indentStart = index;
  let indentEnd = index;
  while (indentStart) {
    const c = str.charCodeAt(indentStart - 1);
    if (c === 10 || c === 13 || c === 0x2028 || c === 0x2029) {
      break;
    }
    indentStart--;
    if (c !== 9 && c !== 11 && c !== 12 && c !== 32 && c !== 160) {
      indentEnd = indentStart;
    }
  }
  return str.slice(indentStart, indentEnd);
}
function isFieldType(fieldType) {
  if (fieldType) {
    return fieldType;
  }
}

/***/ }),

/***/ "../../graphiql-toolkit/esm/graphql-helpers/index.js":
/*!***********************************************************!*\
  !*** ../../graphiql-toolkit/esm/graphql-helpers/index.js ***!
  \***********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
var _autoComplete = __webpack_require__(/*! ./auto-complete */ "../../graphiql-toolkit/esm/graphql-helpers/auto-complete.js");
Object.keys(_autoComplete).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (key in exports && exports[key] === _autoComplete[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _autoComplete[key];
    }
  });
});
var _mergeAst = __webpack_require__(/*! ./merge-ast */ "../../graphiql-toolkit/esm/graphql-helpers/merge-ast.js");
Object.keys(_mergeAst).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (key in exports && exports[key] === _mergeAst[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _mergeAst[key];
    }
  });
});
var _operationName = __webpack_require__(/*! ./operation-name */ "../../graphiql-toolkit/esm/graphql-helpers/operation-name.js");
Object.keys(_operationName).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (key in exports && exports[key] === _operationName[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _operationName[key];
    }
  });
});

/***/ }),

/***/ "../../graphiql-toolkit/esm/graphql-helpers/merge-ast.js":
/*!***************************************************************!*\
  !*** ../../graphiql-toolkit/esm/graphql-helpers/merge-ast.js ***!
  \***************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.mergeAst = mergeAst;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
function uniqueBy(array, iteratee) {
  var _a;
  const FilteredMap = new Map();
  const result = [];
  for (const item of array) {
    if (item.kind === 'Field') {
      const uniqueValue = iteratee(item);
      const existing = FilteredMap.get(uniqueValue);
      if ((_a = item.directives) === null || _a === void 0 ? void 0 : _a.length) {
        const itemClone = Object.assign({}, item);
        result.push(itemClone);
      } else if ((existing === null || existing === void 0 ? void 0 : existing.selectionSet) && item.selectionSet) {
        existing.selectionSet.selections = [...existing.selectionSet.selections, ...item.selectionSet.selections];
      } else if (!existing) {
        const itemClone = Object.assign({}, item);
        FilteredMap.set(uniqueValue, itemClone);
        result.push(itemClone);
      }
    } else {
      result.push(item);
    }
  }
  return result;
}
function inlineRelevantFragmentSpreads(fragmentDefinitions, selections, selectionSetType) {
  var _a;
  const selectionSetTypeName = selectionSetType ? (0, _graphql.getNamedType)(selectionSetType).name : null;
  const outputSelections = [];
  const seenSpreads = [];
  for (let selection of selections) {
    if (selection.kind === 'FragmentSpread') {
      const fragmentName = selection.name.value;
      if (!selection.directives || selection.directives.length === 0) {
        if (seenSpreads.includes(fragmentName)) {
          continue;
        } else {
          seenSpreads.push(fragmentName);
        }
      }
      const fragmentDefinition = fragmentDefinitions[selection.name.value];
      if (fragmentDefinition) {
        const {
          typeCondition,
          directives,
          selectionSet
        } = fragmentDefinition;
        selection = {
          kind: _graphql.Kind.INLINE_FRAGMENT,
          typeCondition,
          directives,
          selectionSet
        };
      }
    }
    if (selection.kind === _graphql.Kind.INLINE_FRAGMENT && (!selection.directives || ((_a = selection.directives) === null || _a === void 0 ? void 0 : _a.length) === 0)) {
      const fragmentTypeName = selection.typeCondition ? selection.typeCondition.name.value : null;
      if (!fragmentTypeName || fragmentTypeName === selectionSetTypeName) {
        outputSelections.push(...inlineRelevantFragmentSpreads(fragmentDefinitions, selection.selectionSet.selections, selectionSetType));
        continue;
      }
    }
    outputSelections.push(selection);
  }
  return outputSelections;
}
function mergeAst(documentAST, schema) {
  const typeInfo = schema ? new _graphql.TypeInfo(schema) : null;
  const fragmentDefinitions = Object.create(null);
  for (const definition of documentAST.definitions) {
    if (definition.kind === _graphql.Kind.FRAGMENT_DEFINITION) {
      fragmentDefinitions[definition.name.value] = definition;
    }
  }
  const flattenVisitors = {
    SelectionSet(node) {
      const selectionSetType = typeInfo ? typeInfo.getParentType() : null;
      let {
        selections
      } = node;
      selections = inlineRelevantFragmentSpreads(fragmentDefinitions, selections, selectionSetType);
      return Object.assign(Object.assign({}, node), {
        selections
      });
    },
    FragmentDefinition() {
      return null;
    }
  };
  const flattenedAST = (0, _graphql.visit)(documentAST, typeInfo ? (0, _graphql.visitWithTypeInfo)(typeInfo, flattenVisitors) : flattenVisitors);
  const deduplicateVisitors = {
    SelectionSet(node) {
      let {
        selections
      } = node;
      selections = uniqueBy(selections, selection => selection.alias ? selection.alias.value : selection.name.value);
      return Object.assign(Object.assign({}, node), {
        selections
      });
    },
    FragmentDefinition() {
      return null;
    }
  };
  return (0, _graphql.visit)(flattenedAST, deduplicateVisitors);
}

/***/ }),

/***/ "../../graphiql-toolkit/esm/graphql-helpers/operation-name.js":
/*!********************************************************************!*\
  !*** ../../graphiql-toolkit/esm/graphql-helpers/operation-name.js ***!
  \********************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getSelectedOperationName = getSelectedOperationName;
function getSelectedOperationName(prevOperations, prevSelectedOperationName, operations) {
  if (!operations || operations.length < 1) {
    return;
  }
  const names = operations.map(op => {
    var _a;
    return (_a = op.name) === null || _a === void 0 ? void 0 : _a.value;
  });
  if (prevSelectedOperationName && names.includes(prevSelectedOperationName)) {
    return prevSelectedOperationName;
  }
  if (prevSelectedOperationName && prevOperations) {
    const prevNames = prevOperations.map(op => {
      var _a;
      return (_a = op.name) === null || _a === void 0 ? void 0 : _a.value;
    });
    const prevIndex = prevNames.indexOf(prevSelectedOperationName);
    if (prevIndex !== -1 && prevIndex < names.length) {
      return names[prevIndex];
    }
  }
  return names[0];
}

/***/ }),

/***/ "../../graphiql-toolkit/esm/index.js":
/*!*******************************************!*\
  !*** ../../graphiql-toolkit/esm/index.js ***!
  \*******************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
var _asyncHelpers = __webpack_require__(/*! ./async-helpers */ "../../graphiql-toolkit/esm/async-helpers/index.js");
Object.keys(_asyncHelpers).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (key in exports && exports[key] === _asyncHelpers[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _asyncHelpers[key];
    }
  });
});
var _createFetcher = __webpack_require__(/*! ./create-fetcher */ "../../graphiql-toolkit/esm/create-fetcher/index.js");
Object.keys(_createFetcher).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (key in exports && exports[key] === _createFetcher[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _createFetcher[key];
    }
  });
});
var _format = __webpack_require__(/*! ./format */ "../../graphiql-toolkit/esm/format/index.js");
Object.keys(_format).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (key in exports && exports[key] === _format[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _format[key];
    }
  });
});
var _graphqlHelpers = __webpack_require__(/*! ./graphql-helpers */ "../../graphiql-toolkit/esm/graphql-helpers/index.js");
Object.keys(_graphqlHelpers).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (key in exports && exports[key] === _graphqlHelpers[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _graphqlHelpers[key];
    }
  });
});
var _storage = __webpack_require__(/*! ./storage */ "../../graphiql-toolkit/esm/storage/index.js");
Object.keys(_storage).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (key in exports && exports[key] === _storage[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _storage[key];
    }
  });
});

/***/ }),

/***/ "../../graphiql-toolkit/esm/storage/base.js":
/*!**************************************************!*\
  !*** ../../graphiql-toolkit/esm/storage/base.js ***!
  \**************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.StorageAPI = void 0;
function isQuotaError(storage, e) {
  return e instanceof DOMException && (e.code === 22 || e.code === 1014 || e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') && storage.length !== 0;
}
class StorageAPI {
  constructor(storage) {
    if (storage) {
      this.storage = storage;
    } else if (storage === null) {
      this.storage = null;
    } else if (typeof window === 'undefined') {
      this.storage = null;
    } else {
      this.storage = {
        getItem: window.localStorage.getItem.bind(window.localStorage),
        setItem: window.localStorage.setItem.bind(window.localStorage),
        removeItem: window.localStorage.removeItem.bind(window.localStorage),
        get length() {
          let keys = 0;
          for (const key in window.localStorage) {
            if (key.indexOf(`${STORAGE_NAMESPACE}:`) === 0) {
              keys += 1;
            }
          }
          return keys;
        },
        clear() {
          for (const key in window.localStorage) {
            if (key.indexOf(`${STORAGE_NAMESPACE}:`) === 0) {
              window.localStorage.removeItem(key);
            }
          }
        }
      };
    }
  }
  get(name) {
    if (!this.storage) {
      return null;
    }
    const key = `${STORAGE_NAMESPACE}:${name}`;
    const value = this.storage.getItem(key);
    if (value === 'null' || value === 'undefined') {
      this.storage.removeItem(key);
      return null;
    }
    return value || null;
  }
  set(name, value) {
    let quotaError = false;
    let error = null;
    if (this.storage) {
      const key = `${STORAGE_NAMESPACE}:${name}`;
      if (value) {
        try {
          this.storage.setItem(key, value);
        } catch (e) {
          error = e instanceof Error ? e : new Error(`${e}`);
          quotaError = isQuotaError(this.storage, e);
        }
      } else {
        this.storage.removeItem(key);
      }
    }
    return {
      isQuotaError: quotaError,
      error
    };
  }
  clear() {
    if (this.storage) {
      this.storage.clear();
    }
  }
}
exports.StorageAPI = StorageAPI;
const STORAGE_NAMESPACE = 'graphiql';

/***/ }),

/***/ "../../graphiql-toolkit/esm/storage/custom.js":
/*!****************************************************!*\
  !*** ../../graphiql-toolkit/esm/storage/custom.js ***!
  \****************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.createLocalStorage = createLocalStorage;
function createLocalStorage(_ref) {
  let {
    namespace
  } = _ref;
  const storageKeyPrefix = `${namespace}:`;
  const getStorageKey = key => `${storageKeyPrefix}${key}`;
  const storage = {
    setItem: (key, value) => localStorage.setItem(getStorageKey(key), value),
    getItem: key => localStorage.getItem(getStorageKey(key)),
    removeItem: key => localStorage.removeItem(getStorageKey(key)),
    get length() {
      let keys = 0;
      for (const key in window.localStorage) {
        if (key.indexOf(storageKeyPrefix) === 0) {
          keys += 1;
        }
      }
      return keys;
    },
    clear() {
      for (const key in window.localStorage) {
        if (key.indexOf(storageKeyPrefix) === 0) {
          window.localStorage.removeItem(key);
        }
      }
    }
  };
  return storage;
}

/***/ }),

/***/ "../../graphiql-toolkit/esm/storage/history.js":
/*!*****************************************************!*\
  !*** ../../graphiql-toolkit/esm/storage/history.js ***!
  \*****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.HistoryStore = void 0;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
var _query = __webpack_require__(/*! ./query */ "../../graphiql-toolkit/esm/storage/query.js");
const MAX_QUERY_SIZE = 100000;
class HistoryStore {
  constructor(storage, maxHistoryLength) {
    var _this = this;
    this.storage = storage;
    this.maxHistoryLength = maxHistoryLength;
    this.updateHistory = _ref => {
      let {
        query,
        variables,
        headers,
        operationName
      } = _ref;
      if (!this.shouldSaveQuery(query, variables, headers, this.history.fetchRecent())) {
        return;
      }
      this.history.push({
        query,
        variables,
        headers,
        operationName
      });
      const historyQueries = this.history.items;
      const favoriteQueries = this.favorite.items;
      this.queries = historyQueries.concat(favoriteQueries);
    };
    this.deleteHistory = function (_ref2) {
      let {
        query,
        variables,
        headers,
        operationName,
        favorite
      } = _ref2;
      let clearFavorites = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      function deleteFromStore(store) {
        const found = store.items.find(x => x.query === query && x.variables === variables && x.headers === headers && x.operationName === operationName);
        if (found) {
          store.delete(found);
        }
      }
      if (favorite || clearFavorites) {
        deleteFromStore(_this.favorite);
      }
      if (!favorite || clearFavorites) {
        deleteFromStore(_this.history);
      }
      _this.queries = [..._this.history.items, ..._this.favorite.items];
    };
    this.history = new _query.QueryStore('queries', this.storage, this.maxHistoryLength);
    this.favorite = new _query.QueryStore('favorites', this.storage, null);
    this.queries = [...this.history.fetchAll(), ...this.favorite.fetchAll()];
  }
  shouldSaveQuery(query, variables, headers, lastQuerySaved) {
    if (!query) {
      return false;
    }
    try {
      (0, _graphql.parse)(query);
    } catch (_a) {
      return false;
    }
    if (query.length > MAX_QUERY_SIZE) {
      return false;
    }
    if (!lastQuerySaved) {
      return true;
    }
    if (JSON.stringify(query) === JSON.stringify(lastQuerySaved.query)) {
      if (JSON.stringify(variables) === JSON.stringify(lastQuerySaved.variables)) {
        if (JSON.stringify(headers) === JSON.stringify(lastQuerySaved.headers)) {
          return false;
        }
        if (headers && !lastQuerySaved.headers) {
          return false;
        }
      }
      if (variables && !lastQuerySaved.variables) {
        return false;
      }
    }
    return true;
  }
  toggleFavorite(_ref3) {
    let {
      query,
      variables,
      headers,
      operationName,
      label,
      favorite
    } = _ref3;
    const item = {
      query,
      variables,
      headers,
      operationName,
      label
    };
    if (favorite) {
      item.favorite = false;
      this.favorite.delete(item);
      this.history.push(item);
    } else {
      item.favorite = true;
      this.favorite.push(item);
      this.history.delete(item);
    }
    this.queries = [...this.history.items, ...this.favorite.items];
  }
  editLabel(_ref4, index) {
    let {
      query,
      variables,
      headers,
      operationName,
      label,
      favorite
    } = _ref4;
    const item = {
      query,
      variables,
      headers,
      operationName,
      label
    };
    if (favorite) {
      this.favorite.edit(Object.assign(Object.assign({}, item), {
        favorite
      }), index);
    } else {
      this.history.edit(item, index);
    }
    this.queries = [...this.history.items, ...this.favorite.items];
  }
}
exports.HistoryStore = HistoryStore;

/***/ }),

/***/ "../../graphiql-toolkit/esm/storage/index.js":
/*!***************************************************!*\
  !*** ../../graphiql-toolkit/esm/storage/index.js ***!
  \***************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
var _base = __webpack_require__(/*! ./base */ "../../graphiql-toolkit/esm/storage/base.js");
Object.keys(_base).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (key in exports && exports[key] === _base[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _base[key];
    }
  });
});
var _history = __webpack_require__(/*! ./history */ "../../graphiql-toolkit/esm/storage/history.js");
Object.keys(_history).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (key in exports && exports[key] === _history[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _history[key];
    }
  });
});
var _query = __webpack_require__(/*! ./query */ "../../graphiql-toolkit/esm/storage/query.js");
Object.keys(_query).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (key in exports && exports[key] === _query[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _query[key];
    }
  });
});
var _custom = __webpack_require__(/*! ./custom */ "../../graphiql-toolkit/esm/storage/custom.js");
Object.keys(_custom).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (key in exports && exports[key] === _custom[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _custom[key];
    }
  });
});

/***/ }),

/***/ "../../graphiql-toolkit/esm/storage/query.js":
/*!***************************************************!*\
  !*** ../../graphiql-toolkit/esm/storage/query.js ***!
  \***************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.QueryStore = void 0;
class QueryStore {
  constructor(key, storage) {
    let maxSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
    this.key = key;
    this.storage = storage;
    this.maxSize = maxSize;
    this.items = this.fetchAll();
  }
  get length() {
    return this.items.length;
  }
  contains(item) {
    return this.items.some(x => x.query === item.query && x.variables === item.variables && x.headers === item.headers && x.operationName === item.operationName);
  }
  edit(item, index) {
    if (typeof index === 'number' && this.items[index]) {
      const found = this.items[index];
      if (found.query === item.query && found.variables === item.variables && found.headers === item.headers && found.operationName === item.operationName) {
        this.items.splice(index, 1, item);
        this.save();
        return;
      }
    }
    const itemIndex = this.items.findIndex(x => x.query === item.query && x.variables === item.variables && x.headers === item.headers && x.operationName === item.operationName);
    if (itemIndex !== -1) {
      this.items.splice(itemIndex, 1, item);
      this.save();
    }
  }
  delete(item) {
    const itemIndex = this.items.findIndex(x => x.query === item.query && x.variables === item.variables && x.headers === item.headers && x.operationName === item.operationName);
    if (itemIndex !== -1) {
      this.items.splice(itemIndex, 1);
      this.save();
    }
  }
  fetchRecent() {
    return this.items.at(-1);
  }
  fetchAll() {
    const raw = this.storage.get(this.key);
    if (raw) {
      return JSON.parse(raw)[this.key];
    }
    return [];
  }
  push(item) {
    const items = [...this.items, item];
    if (this.maxSize && items.length > this.maxSize) {
      items.shift();
    }
    for (let attempts = 0; attempts < 5; attempts++) {
      const response = this.storage.set(this.key, JSON.stringify({
        [this.key]: items
      }));
      if (!(response === null || response === void 0 ? void 0 : response.error)) {
        this.items = items;
      } else if (response.isQuotaError && this.maxSize) {
        items.shift();
      } else {
        return;
      }
    }
  }
  save() {
    this.storage.set(this.key, JSON.stringify({
      [this.key]: this.items
    }));
  }
}
exports.QueryStore = QueryStore;

/***/ }),

/***/ "../node_modules/linkify-it/build/index.cjs.js":
/*!*****************************************************!*\
  !*** ../node_modules/linkify-it/build/index.cjs.js ***!
  \*****************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var uc_micro = __webpack_require__(/*! uc.micro */ "../node_modules/uc.micro/build/index.cjs.js");
function reFactory(opts) {
  const re = {};
  opts = opts || {};
  re.src_Any = uc_micro.Any.source;
  re.src_Cc = uc_micro.Cc.source;
  re.src_Z = uc_micro.Z.source;
  re.src_P = uc_micro.P.source;

  // \p{\Z\P\Cc\CF} (white spaces + control + format + punctuation)
  re.src_ZPCc = [re.src_Z, re.src_P, re.src_Cc].join('|');

  // \p{\Z\Cc} (white spaces + control)
  re.src_ZCc = [re.src_Z, re.src_Cc].join('|');

  // Experimental. List of chars, completely prohibited in links
  // because can separate it from other part of text
  const text_separators = '[><\uff5c]';

  // All possible word characters (everything without punctuation, spaces & controls)
  // Defined via punctuation & spaces to save space
  // Should be something like \p{\L\N\S\M} (\w but without `_`)
  re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')';
  // The same as abothe but without [0-9]
  // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';

  re.src_ip4 = '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';

  // Prohibit any of "@/[]()" in user/pass to avoid wrong domain fetch.
  re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\[\\]()]).)+@)?';
  re.src_port = '(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?';
  re.src_host_terminator = '(?=$|' + text_separators + '|' + re.src_ZPCc + ')' + '(?!' + (opts['---'] ? '-(?!--)|' : '-|') + '_|:\\d|\\.-|\\.(?!$|' + re.src_ZPCc + '))';
  re.src_path = '(?:' + '[/?#]' + '(?:' + '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\]{}.,"\'?!\\-;]).|' + '\\[(?:(?!' + re.src_ZCc + '|\\]).)*\\]|' + '\\((?:(?!' + re.src_ZCc + '|[)]).)*\\)|' + '\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\}|' + '\\"(?:(?!' + re.src_ZCc + '|["]).)+\\"|' + "\\'(?:(?!" + re.src_ZCc + "|[']).)+\\'|" +
  // allow `I'm_king` if no pair found
  "\\'(?=" + re.src_pseudo_letter + '|[-])|' +
  // google has many dots in "google search" links (#66, #81).
  // github has ... in commit range links,
  // Restrict to
  // - english
  // - percent-encoded
  // - parts of file path
  // - params separator
  // until more examples found.
  '\\.{2,}[a-zA-Z0-9%/&]|' + '\\.(?!' + re.src_ZCc + '|[.]|$)|' + (opts['---'] ? '\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate
  : '\\-+|') +
  // allow `,,,` in paths
  ',(?!' + re.src_ZCc + '|$)|' +
  // allow `;` if not followed by space-like char
  ';(?!' + re.src_ZCc + '|$)|' +
  // allow `!!!` in paths, but not at the end
  '\\!+(?!' + re.src_ZCc + '|[!]|$)|' + '\\?(?!' + re.src_ZCc + '|[?]|$)' + ')+' + '|\\/' + ')?';

  // Allow anything in markdown spec, forbid quote (") at the first position
  // because emails enclosed in quotes are far more common
  re.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*';
  re.src_xn = 'xn--[a-z0-9\\-]{1,59}';

  // More to read about domain names
  // http://serverfault.com/questions/638260/

  re.src_domain_root =
  // Allow letters & digits (http://test1)
  '(?:' + re.src_xn + '|' + re.src_pseudo_letter + '{1,63}' + ')';
  re.src_domain = '(?:' + re.src_xn + '|' + '(?:' + re.src_pseudo_letter + ')' + '|' + '(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' + ')';
  re.src_host = '(?:' +
  // Don't need IP check, because digits are already allowed in normal domain names
  //   src_ip4 +
  // '|' +
  '(?:(?:(?:' + re.src_domain + ')\\.)*' + re.src_domain /* _root */ + ')' + ')';
  re.tpl_host_fuzzy = '(?:' + re.src_ip4 + '|' + '(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))' + ')';
  re.tpl_host_no_ip_fuzzy = '(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))';
  re.src_host_strict = re.src_host + re.src_host_terminator;
  re.tpl_host_fuzzy_strict = re.tpl_host_fuzzy + re.src_host_terminator;
  re.src_host_port_strict = re.src_host + re.src_port + re.src_host_terminator;
  re.tpl_host_port_fuzzy_strict = re.tpl_host_fuzzy + re.src_port + re.src_host_terminator;
  re.tpl_host_port_no_ip_fuzzy_strict = re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator;

  //
  // Main rules
  //

  // Rude test fuzzy links by host, for quick deny
  re.tpl_host_fuzzy_test = 'localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))';
  re.tpl_email_fuzzy = '(^|' + text_separators + '|"|\\(|' + re.src_ZCc + ')' + '(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';
  re.tpl_link_fuzzy =
  // Fuzzy link can't be prepended with .:/\- and non punctuation.
  // but can start with > (markdown blockquote)
  '(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' + '((?![$+<=>^`|\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')';
  re.tpl_link_no_ip_fuzzy =
  // Fuzzy link can't be prepended with .:/\- and non punctuation.
  // but can start with > (markdown blockquote)
  '(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' + '((?![$+<=>^`|\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';
  return re;
}

//
// Helpers
//

// Merge objects
//
function assign(obj /* from1, from2, from3, ... */) {
  const sources = Array.prototype.slice.call(arguments, 1);
  sources.forEach(function (source) {
    if (!source) {
      return;
    }
    Object.keys(source).forEach(function (key) {
      obj[key] = source[key];
    });
  });
  return obj;
}
function _class(obj) {
  return Object.prototype.toString.call(obj);
}
function isString(obj) {
  return _class(obj) === '[object String]';
}
function isObject(obj) {
  return _class(obj) === '[object Object]';
}
function isRegExp(obj) {
  return _class(obj) === '[object RegExp]';
}
function isFunction(obj) {
  return _class(obj) === '[object Function]';
}
function escapeRE(str) {
  return str.replace(/[.?*+^$[\]\\(){}|-]/g, '\\$&');
}

//

const defaultOptions = {
  fuzzyLink: true,
  fuzzyEmail: true,
  fuzzyIP: false
};
function isOptionsObj(obj) {
  return Object.keys(obj || {}).reduce(function (acc, k) {
    /* eslint-disable-next-line no-prototype-builtins */
    return acc || defaultOptions.hasOwnProperty(k);
  }, false);
}
const defaultSchemas = {
  'http:': {
    validate: function (text, pos, self) {
      const tail = text.slice(pos);
      if (!self.re.http) {
        // compile lazily, because "host"-containing variables can change on tlds update.
        self.re.http = new RegExp('^\\/\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i');
      }
      if (self.re.http.test(tail)) {
        return tail.match(self.re.http)[0].length;
      }
      return 0;
    }
  },
  'https:': 'http:',
  'ftp:': 'http:',
  '//': {
    validate: function (text, pos, self) {
      const tail = text.slice(pos);
      if (!self.re.no_http) {
        // compile lazily, because "host"-containing variables can change on tlds update.
        self.re.no_http = new RegExp('^' + self.re.src_auth +
        // Don't allow single-level domains, because of false positives like '//test'
        // with code comments
        '(?:localhost|(?:(?:' + self.re.src_domain + ')\\.)+' + self.re.src_domain_root + ')' + self.re.src_port + self.re.src_host_terminator + self.re.src_path, 'i');
      }
      if (self.re.no_http.test(tail)) {
        // should not be `://` & `///`, that protects from errors in protocol name
        if (pos >= 3 && text[pos - 3] === ':') {
          return 0;
        }
        if (pos >= 3 && text[pos - 3] === '/') {
          return 0;
        }
        return tail.match(self.re.no_http)[0].length;
      }
      return 0;
    }
  },
  'mailto:': {
    validate: function (text, pos, self) {
      const tail = text.slice(pos);
      if (!self.re.mailto) {
        self.re.mailto = new RegExp('^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i');
      }
      if (self.re.mailto.test(tail)) {
        return tail.match(self.re.mailto)[0].length;
      }
      return 0;
    }
  }
};

// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)
/* eslint-disable-next-line max-len */
const tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';

// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead
const tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|');
function resetScanCache(self) {
  self.__index__ = -1;
  self.__text_cache__ = '';
}
function createValidator(re) {
  return function (text, pos) {
    const tail = text.slice(pos);
    if (re.test(tail)) {
      return tail.match(re)[0].length;
    }
    return 0;
  };
}
function createNormalizer() {
  return function (match, self) {
    self.normalize(match);
  };
}

// Schemas compiler. Build regexps.
//
function compile(self) {
  // Load & clone RE patterns.
  const re = self.re = reFactory(self.__opts__);

  // Define dynamic patterns
  const tlds = self.__tlds__.slice();
  self.onCompile();
  if (!self.__tlds_replaced__) {
    tlds.push(tlds_2ch_src_re);
  }
  tlds.push(re.src_xn);
  re.src_tlds = tlds.join('|');
  function untpl(tpl) {
    return tpl.replace('%TLDS%', re.src_tlds);
  }
  re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');
  re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');
  re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');
  re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');

  //
  // Compile each schema
  //

  const aliases = [];
  self.__compiled__ = {}; // Reset compiled data

  function schemaError(name, val) {
    throw new Error('(LinkifyIt) Invalid schema "' + name + '": ' + val);
  }
  Object.keys(self.__schemas__).forEach(function (name) {
    const val = self.__schemas__[name];

    // skip disabled methods
    if (val === null) {
      return;
    }
    const compiled = {
      validate: null,
      link: null
    };
    self.__compiled__[name] = compiled;
    if (isObject(val)) {
      if (isRegExp(val.validate)) {
        compiled.validate = createValidator(val.validate);
      } else if (isFunction(val.validate)) {
        compiled.validate = val.validate;
      } else {
        schemaError(name, val);
      }
      if (isFunction(val.normalize)) {
        compiled.normalize = val.normalize;
      } else if (!val.normalize) {
        compiled.normalize = createNormalizer();
      } else {
        schemaError(name, val);
      }
      return;
    }
    if (isString(val)) {
      aliases.push(name);
      return;
    }
    schemaError(name, val);
  });

  //
  // Compile postponed aliases
  //

  aliases.forEach(function (alias) {
    if (!self.__compiled__[self.__schemas__[alias]]) {
      // Silently fail on missed schemas to avoid errons on disable.
      // schemaError(alias, self.__schemas__[alias]);
      return;
    }
    self.__compiled__[alias].validate = self.__compiled__[self.__schemas__[alias]].validate;
    self.__compiled__[alias].normalize = self.__compiled__[self.__schemas__[alias]].normalize;
  });

  //
  // Fake record for guessed links
  //
  self.__compiled__[''] = {
    validate: null,
    normalize: createNormalizer()
  };

  //
  // Build schema condition
  //
  const slist = Object.keys(self.__compiled__).filter(function (name) {
    // Filter disabled & fake schemas
    return name.length > 0 && self.__compiled__[name];
  }).map(escapeRE).join('|');
  // (?!_) cause 1.5x slowdown
  self.re.schema_test = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');
  self.re.schema_search = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');
  self.re.schema_at_start = RegExp('^' + self.re.schema_search.source, 'i');
  self.re.pretest = RegExp('(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@', 'i');

  //
  // Cleanup
  //

  resetScanCache(self);
}

/**
 * class Match
 *
 * Match result. Single element of array, returned by [[LinkifyIt#match]]
 **/
function Match(self, shift) {
  const start = self.__index__;
  const end = self.__last_index__;
  const text = self.__text_cache__.slice(start, end);

  /**
   * Match#schema -> String
   *
   * Prefix (protocol) for matched string.
   **/
  this.schema = self.__schema__.toLowerCase();
  /**
   * Match#index -> Number
   *
   * First position of matched string.
   **/
  this.index = start + shift;
  /**
   * Match#lastIndex -> Number
   *
   * Next position after matched string.
   **/
  this.lastIndex = end + shift;
  /**
   * Match#raw -> String
   *
   * Matched string.
   **/
  this.raw = text;
  /**
   * Match#text -> String
   *
   * Notmalized text of matched string.
   **/
  this.text = text;
  /**
   * Match#url -> String
   *
   * Normalized url of matched string.
   **/
  this.url = text;
}
function createMatch(self, shift) {
  const match = new Match(self, shift);
  self.__compiled__[match.schema].normalize(match, self);
  return match;
}

/**
 * class LinkifyIt
 **/

/**
 * new LinkifyIt(schemas, options)
 * - schemas (Object): Optional. Additional schemas to validate (prefix/validator)
 * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
 *
 * Creates new linkifier instance with optional additional schemas.
 * Can be called without `new` keyword for convenience.
 *
 * By default understands:
 *
 * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links
 * - "fuzzy" links and emails (example.com, foo@bar.com).
 *
 * `schemas` is an object, where each key/value describes protocol/rule:
 *
 * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`
 *   for example). `linkify-it` makes shure that prefix is not preceeded with
 *   alphanumeric char and symbols. Only whitespaces and punctuation allowed.
 * - __value__ - rule to check tail after link prefix
 *   - _String_ - just alias to existing rule
 *   - _Object_
 *     - _validate_ - validator function (should return matched length on success),
 *       or `RegExp`.
 *     - _normalize_ - optional function to normalize text & url of matched result
 *       (for example, for @twitter mentions).
 *
 * `options`:
 *
 * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.
 * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts
 *   like version numbers. Default `false`.
 * - __fuzzyEmail__ - recognize emails without `mailto:` prefix.
 *
 **/
function LinkifyIt(schemas, options) {
  if (!(this instanceof LinkifyIt)) {
    return new LinkifyIt(schemas, options);
  }
  if (!options) {
    if (isOptionsObj(schemas)) {
      options = schemas;
      schemas = {};
    }
  }
  this.__opts__ = assign({}, defaultOptions, options);

  // Cache last tested result. Used to skip repeating steps on next `match` call.
  this.__index__ = -1;
  this.__last_index__ = -1; // Next scan position
  this.__schema__ = '';
  this.__text_cache__ = '';
  this.__schemas__ = assign({}, defaultSchemas, schemas);
  this.__compiled__ = {};
  this.__tlds__ = tlds_default;
  this.__tlds_replaced__ = false;
  this.re = {};
  compile(this);
}

/** chainable
 * LinkifyIt#add(schema, definition)
 * - schema (String): rule name (fixed pattern prefix)
 * - definition (String|RegExp|Object): schema definition
 *
 * Add new rule definition. See constructor description for details.
 **/
LinkifyIt.prototype.add = function add(schema, definition) {
  this.__schemas__[schema] = definition;
  compile(this);
  return this;
};

/** chainable
 * LinkifyIt#set(options)
 * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
 *
 * Set recognition options for links without schema.
 **/
LinkifyIt.prototype.set = function set(options) {
  this.__opts__ = assign(this.__opts__, options);
  return this;
};

/**
 * LinkifyIt#test(text) -> Boolean
 *
 * Searches linkifiable pattern and returns `true` on success or `false` on fail.
 **/
LinkifyIt.prototype.test = function test(text) {
  // Reset scan cache
  this.__text_cache__ = text;
  this.__index__ = -1;
  if (!text.length) {
    return false;
  }
  let m, ml, me, len, shift, next, re, tld_pos, at_pos;

  // try to scan for link with schema - that's the most simple rule
  if (this.re.schema_test.test(text)) {
    re = this.re.schema_search;
    re.lastIndex = 0;
    while ((m = re.exec(text)) !== null) {
      len = this.testSchemaAt(text, m[2], re.lastIndex);
      if (len) {
        this.__schema__ = m[2];
        this.__index__ = m.index + m[1].length;
        this.__last_index__ = m.index + m[0].length + len;
        break;
      }
    }
  }
  if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {
    // guess schemaless links
    tld_pos = text.search(this.re.host_fuzzy_test);
    if (tld_pos >= 0) {
      // if tld is located after found link - no need to check fuzzy pattern
      if (this.__index__ < 0 || tld_pos < this.__index__) {
        if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {
          shift = ml.index + ml[1].length;
          if (this.__index__ < 0 || shift < this.__index__) {
            this.__schema__ = '';
            this.__index__ = shift;
            this.__last_index__ = ml.index + ml[0].length;
          }
        }
      }
    }
  }
  if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {
    // guess schemaless emails
    at_pos = text.indexOf('@');
    if (at_pos >= 0) {
      // We can't skip this check, because this cases are possible:
      // 192.168.1.1@gmail.com, my.in@example.com
      if ((me = text.match(this.re.email_fuzzy)) !== null) {
        shift = me.index + me[1].length;
        next = me.index + me[0].length;
        if (this.__index__ < 0 || shift < this.__index__ || shift === this.__index__ && next > this.__last_index__) {
          this.__schema__ = 'mailto:';
          this.__index__ = shift;
          this.__last_index__ = next;
        }
      }
    }
  }
  return this.__index__ >= 0;
};

/**
 * LinkifyIt#pretest(text) -> Boolean
 *
 * Very quick check, that can give false positives. Returns true if link MAY BE
 * can exists. Can be used for speed optimization, when you need to check that
 * link NOT exists.
 **/
LinkifyIt.prototype.pretest = function pretest(text) {
  return this.re.pretest.test(text);
};

/**
 * LinkifyIt#testSchemaAt(text, name, position) -> Number
 * - text (String): text to scan
 * - name (String): rule (schema) name
 * - position (Number): text offset to check from
 *
 * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly
 * at given position. Returns length of found pattern (0 on fail).
 **/
LinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) {
  // If not supported schema check requested - terminate
  if (!this.__compiled__[schema.toLowerCase()]) {
    return 0;
  }
  return this.__compiled__[schema.toLowerCase()].validate(text, pos, this);
};

/**
 * LinkifyIt#match(text) -> Array|null
 *
 * Returns array of found link descriptions or `null` on fail. We strongly
 * recommend to use [[LinkifyIt#test]] first, for best speed.
 *
 * ##### Result match description
 *
 * - __schema__ - link schema, can be empty for fuzzy links, or `//` for
 *   protocol-neutral  links.
 * - __index__ - offset of matched text
 * - __lastIndex__ - index of next char after mathch end
 * - __raw__ - matched text
 * - __text__ - normalized text
 * - __url__ - link, generated from matched text
 **/
LinkifyIt.prototype.match = function match(text) {
  const result = [];
  let shift = 0;

  // Try to take previous element from cache, if .test() called before
  if (this.__index__ >= 0 && this.__text_cache__ === text) {
    result.push(createMatch(this, shift));
    shift = this.__last_index__;
  }

  // Cut head if cache was used
  let tail = shift ? text.slice(shift) : text;

  // Scan string until end reached
  while (this.test(tail)) {
    result.push(createMatch(this, shift));
    tail = tail.slice(this.__last_index__);
    shift += this.__last_index__;
  }
  if (result.length) {
    return result;
  }
  return null;
};

/**
 * LinkifyIt#matchAtStart(text) -> Match|null
 *
 * Returns fully-formed (not fuzzy) link if it starts at the beginning
 * of the string, and null otherwise.
 **/
LinkifyIt.prototype.matchAtStart = function matchAtStart(text) {
  // Reset scan cache
  this.__text_cache__ = text;
  this.__index__ = -1;
  if (!text.length) return null;
  const m = this.re.schema_at_start.exec(text);
  if (!m) return null;
  const len = this.testSchemaAt(text, m[2], m[0].length);
  if (!len) return null;
  this.__schema__ = m[2];
  this.__index__ = m.index + m[1].length;
  this.__last_index__ = m.index + m[0].length + len;
  return createMatch(this, 0);
};

/** chainable
 * LinkifyIt#tlds(list [, keepOld]) -> this
 * - list (Array): list of tlds
 * - keepOld (Boolean): merge with current list if `true` (`false` by default)
 *
 * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)
 * to avoid false positives. By default this algorythm used:
 *
 * - hostname with any 2-letter root zones are ok.
 * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф
 *   are ok.
 * - encoded (`xn--...`) root zones are ok.
 *
 * If list is replaced, then exact match for 2-chars root zones will be checked.
 **/
LinkifyIt.prototype.tlds = function tlds(list, keepOld) {
  list = Array.isArray(list) ? list : [list];
  if (!keepOld) {
    this.__tlds__ = list.slice();
    this.__tlds_replaced__ = true;
    compile(this);
    return this;
  }
  this.__tlds__ = this.__tlds__.concat(list).sort().filter(function (el, idx, arr) {
    return el !== arr[idx - 1];
  }).reverse();
  compile(this);
  return this;
};

/**
 * LinkifyIt#normalize(match)
 *
 * Default normalizer (if schema does not define it's own).
 **/
LinkifyIt.prototype.normalize = function normalize(match) {
  // Do minimal possible changes by default. Need to collect feedback prior
  // to move forward https://github.com/markdown-it/linkify-it/issues/1

  if (!match.schema) {
    match.url = 'http://' + match.url;
  }
  if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {
    match.url = 'mailto:' + match.url;
  }
};

/**
 * LinkifyIt#onCompile()
 *
 * Override to modify basic RegExp-s.
 **/
LinkifyIt.prototype.onCompile = function onCompile() {};
module.exports = LinkifyIt;

/***/ }),

/***/ "../node_modules/markdown-it/dist/index.cjs.js":
/*!*****************************************************!*\
  !*** ../node_modules/markdown-it/dist/index.cjs.js ***!
  \*****************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



var mdurl = __webpack_require__(/*! mdurl */ "../node_modules/mdurl/build/index.cjs.js");
var ucmicro = __webpack_require__(/*! uc.micro */ "../node_modules/uc.micro/build/index.cjs.js");
var entities = __webpack_require__(/*! entities */ "../../../node_modules/entities/lib/index.js");
var LinkifyIt = __webpack_require__(/*! linkify-it */ "../node_modules/linkify-it/build/index.cjs.js");
var punycode = __webpack_require__(/*! punycode.js */ "../../../node_modules/punycode.js/punycode.es6.js");
function _interopNamespaceDefault(e) {
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () {
            return e[k];
          }
        });
      }
    });
  }
  n.default = e;
  return Object.freeze(n);
}
var mdurl__namespace = /*#__PURE__*/_interopNamespaceDefault(mdurl);
var ucmicro__namespace = /*#__PURE__*/_interopNamespaceDefault(ucmicro);

// Utilities
//

function _class(obj) {
  return Object.prototype.toString.call(obj);
}
function isString(obj) {
  return _class(obj) === '[object String]';
}
const _hasOwnProperty = Object.prototype.hasOwnProperty;
function has(object, key) {
  return _hasOwnProperty.call(object, key);
}

// Merge objects
//
function assign(obj /* from1, from2, from3, ... */) {
  const sources = Array.prototype.slice.call(arguments, 1);
  sources.forEach(function (source) {
    if (!source) {
      return;
    }
    if (typeof source !== 'object') {
      throw new TypeError(source + 'must be object');
    }
    Object.keys(source).forEach(function (key) {
      obj[key] = source[key];
    });
  });
  return obj;
}

// Remove element from array and put another array at those position.
// Useful for some operations with tokens
function arrayReplaceAt(src, pos, newElements) {
  return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));
}
function isValidEntityCode(c) {
  /* eslint no-bitwise:0 */
  // broken sequence
  if (c >= 0xD800 && c <= 0xDFFF) {
    return false;
  }
  // never used
  if (c >= 0xFDD0 && c <= 0xFDEF) {
    return false;
  }
  if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) {
    return false;
  }
  // control codes
  if (c >= 0x00 && c <= 0x08) {
    return false;
  }
  if (c === 0x0B) {
    return false;
  }
  if (c >= 0x0E && c <= 0x1F) {
    return false;
  }
  if (c >= 0x7F && c <= 0x9F) {
    return false;
  }
  // out of range
  if (c > 0x10FFFF) {
    return false;
  }
  return true;
}
function fromCodePoint(c) {
  /* eslint no-bitwise:0 */
  if (c > 0xffff) {
    c -= 0x10000;
    const surrogate1 = 0xd800 + (c >> 10);
    const surrogate2 = 0xdc00 + (c & 0x3ff);
    return String.fromCharCode(surrogate1, surrogate2);
  }
  return String.fromCharCode(c);
}
const UNESCAPE_MD_RE = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g;
const ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;
const UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi');
const DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;
function replaceEntityPattern(match, name) {
  if (name.charCodeAt(0) === 0x23 /* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {
    const code = name[1].toLowerCase() === 'x' ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);
    if (isValidEntityCode(code)) {
      return fromCodePoint(code);
    }
    return match;
  }
  const decoded = entities.decodeHTML(match);
  if (decoded !== match) {
    return decoded;
  }
  return match;
}

/* function replaceEntities(str) {
  if (str.indexOf('&') < 0) { return str; }

  return str.replace(ENTITY_RE, replaceEntityPattern);
} */

function unescapeMd(str) {
  if (str.indexOf('\\') < 0) {
    return str;
  }
  return str.replace(UNESCAPE_MD_RE, '$1');
}
function unescapeAll(str) {
  if (str.indexOf('\\') < 0 && str.indexOf('&') < 0) {
    return str;
  }
  return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {
    if (escaped) {
      return escaped;
    }
    return replaceEntityPattern(match, entity);
  });
}
const HTML_ESCAPE_TEST_RE = /[&<>"]/;
const HTML_ESCAPE_REPLACE_RE = /[&<>"]/g;
const HTML_REPLACEMENTS = {
  '&': '&amp;',
  '<': '&lt;',
  '>': '&gt;',
  '"': '&quot;'
};
function replaceUnsafeChar(ch) {
  return HTML_REPLACEMENTS[ch];
}
function escapeHtml(str) {
  if (HTML_ESCAPE_TEST_RE.test(str)) {
    return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);
  }
  return str;
}
const REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g;
function escapeRE(str) {
  return str.replace(REGEXP_ESCAPE_RE, '\\$&');
}
function isSpace(code) {
  switch (code) {
    case 0x09:
    case 0x20:
      return true;
  }
  return false;
}

// Zs (unicode class) || [\t\f\v\r\n]
function isWhiteSpace(code) {
  if (code >= 0x2000 && code <= 0x200A) {
    return true;
  }
  switch (code) {
    case 0x09: // \t
    case 0x0A: // \n
    case 0x0B: // \v
    case 0x0C: // \f
    case 0x0D: // \r
    case 0x20:
    case 0xA0:
    case 0x1680:
    case 0x202F:
    case 0x205F:
    case 0x3000:
      return true;
  }
  return false;
}

/* eslint-disable max-len */

// Currently without astral characters support.
function isPunctChar(ch) {
  return ucmicro__namespace.P.test(ch) || ucmicro__namespace.S.test(ch);
}

// Markdown ASCII punctuation characters.
//
// !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
// http://spec.commonmark.org/0.15/#ascii-punctuation-character
//
// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.
//
function isMdAsciiPunct(ch) {
  switch (ch) {
    case 0x21 /* ! */:
    case 0x22 /* " */:
    case 0x23 /* # */:
    case 0x24 /* $ */:
    case 0x25 /* % */:
    case 0x26 /* & */:
    case 0x27 /* ' */:
    case 0x28 /* ( */:
    case 0x29 /* ) */:
    case 0x2A /* * */:
    case 0x2B /* + */:
    case 0x2C /* , */:
    case 0x2D /* - */:
    case 0x2E /* . */:
    case 0x2F /* / */:
    case 0x3A /* : */:
    case 0x3B /* ; */:
    case 0x3C /* < */:
    case 0x3D /* = */:
    case 0x3E /* > */:
    case 0x3F /* ? */:
    case 0x40 /* @ */:
    case 0x5B /* [ */:
    case 0x5C /* \ */:
    case 0x5D /* ] */:
    case 0x5E /* ^ */:
    case 0x5F /* _ */:
    case 0x60 /* ` */:
    case 0x7B /* { */:
    case 0x7C /* | */:
    case 0x7D /* } */:
    case 0x7E /* ~ */:
      return true;
    default:
      return false;
  }
}

// Hepler to unify [reference labels].
//
function normalizeReference(str) {
  // Trim and collapse whitespace
  //
  str = str.trim().replace(/\s+/g, ' ');

  // In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug
  // fixed in v12 (couldn't find any details).
  //
  // So treat this one as a special case
  // (remove this when node v10 is no longer supported).
  //
  if ('ẞ'.toLowerCase() === 'Ṿ') {
    str = str.replace(/ẞ/g, 'ß');
  }

  // .toLowerCase().toUpperCase() should get rid of all differences
  // between letter variants.
  //
  // Simple .toLowerCase() doesn't normalize 125 code points correctly,
  // and .toUpperCase doesn't normalize 6 of them (list of exceptions:
  // İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently
  // uppercased versions).
  //
  // Here's an example showing how it happens. Lets take greek letter omega:
  // uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ)
  //
  // Unicode entries:
  // 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8;
  // 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398
  // 03D1;GREEK THETA SYMBOL;Ll;0;L;<compat> 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398
  // 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L;<compat> 0398;;;;N;;;;03B8;
  //
  // Case-insensitive comparison should treat all of them as equivalent.
  //
  // But .toLowerCase() doesn't change ϑ (it's already lowercase),
  // and .toUpperCase() doesn't change ϴ (already uppercase).
  //
  // Applying first lower then upper case normalizes any character:
  // '\u0398\u03f4\u03b8\u03d1'.toLowerCase().toUpperCase() === '\u0398\u0398\u0398\u0398'
  //
  // Note: this is equivalent to unicode case folding; unicode normalization
  // is a different step that is not required here.
  //
  // Final result should be uppercased, because it's later stored in an object
  // (this avoid a conflict with Object.prototype members,
  // most notably, `__proto__`)
  //
  return str.toLowerCase().toUpperCase();
}

// Re-export libraries commonly used in both markdown-it and its plugins,
// so plugins won't have to depend on them explicitly, which reduces their
// bundled size (e.g. a browser build).
//
const lib = {
  mdurl: mdurl__namespace,
  ucmicro: ucmicro__namespace
};
var utils = /*#__PURE__*/Object.freeze({
  __proto__: null,
  arrayReplaceAt: arrayReplaceAt,
  assign: assign,
  escapeHtml: escapeHtml,
  escapeRE: escapeRE,
  fromCodePoint: fromCodePoint,
  has: has,
  isMdAsciiPunct: isMdAsciiPunct,
  isPunctChar: isPunctChar,
  isSpace: isSpace,
  isString: isString,
  isValidEntityCode: isValidEntityCode,
  isWhiteSpace: isWhiteSpace,
  lib: lib,
  normalizeReference: normalizeReference,
  unescapeAll: unescapeAll,
  unescapeMd: unescapeMd
});

// Parse link label
//
// this function assumes that first character ("[") already matches;
// returns the end of the label
//

function parseLinkLabel(state, start, disableNested) {
  let level, found, marker, prevPos;
  const max = state.posMax;
  const oldPos = state.pos;
  state.pos = start + 1;
  level = 1;
  while (state.pos < max) {
    marker = state.src.charCodeAt(state.pos);
    if (marker === 0x5D /* ] */) {
      level--;
      if (level === 0) {
        found = true;
        break;
      }
    }
    prevPos = state.pos;
    state.md.inline.skipToken(state);
    if (marker === 0x5B /* [ */) {
      if (prevPos === state.pos - 1) {
        // increase level if we find text `[`, which is not a part of any token
        level++;
      } else if (disableNested) {
        state.pos = oldPos;
        return -1;
      }
    }
  }
  let labelEnd = -1;
  if (found) {
    labelEnd = state.pos;
  }

  // restore old state
  state.pos = oldPos;
  return labelEnd;
}

// Parse link destination
//

function parseLinkDestination(str, start, max) {
  let code;
  let pos = start;
  const result = {
    ok: false,
    pos: 0,
    str: ''
  };
  if (str.charCodeAt(pos) === 0x3C /* < */) {
    pos++;
    while (pos < max) {
      code = str.charCodeAt(pos);
      if (code === 0x0A /* \n */) {
        return result;
      }
      if (code === 0x3C /* < */) {
        return result;
      }
      if (code === 0x3E /* > */) {
        result.pos = pos + 1;
        result.str = unescapeAll(str.slice(start + 1, pos));
        result.ok = true;
        return result;
      }
      if (code === 0x5C /* \ */ && pos + 1 < max) {
        pos += 2;
        continue;
      }
      pos++;
    }

    // no closing '>'
    return result;
  }

  // this should be ... } else { ... branch

  let level = 0;
  while (pos < max) {
    code = str.charCodeAt(pos);
    if (code === 0x20) {
      break;
    }

    // ascii control characters
    if (code < 0x20 || code === 0x7F) {
      break;
    }
    if (code === 0x5C /* \ */ && pos + 1 < max) {
      if (str.charCodeAt(pos + 1) === 0x20) {
        break;
      }
      pos += 2;
      continue;
    }
    if (code === 0x28 /* ( */) {
      level++;
      if (level > 32) {
        return result;
      }
    }
    if (code === 0x29 /* ) */) {
      if (level === 0) {
        break;
      }
      level--;
    }
    pos++;
  }
  if (start === pos) {
    return result;
  }
  if (level !== 0) {
    return result;
  }
  result.str = unescapeAll(str.slice(start, pos));
  result.pos = pos;
  result.ok = true;
  return result;
}

// Parse link title
//

// Parse link title within `str` in [start, max] range,
// or continue previous parsing if `prev_state` is defined (equal to result of last execution).
//
function parseLinkTitle(str, start, max, prev_state) {
  let code;
  let pos = start;
  const state = {
    // if `true`, this is a valid link title
    ok: false,
    // if `true`, this link can be continued on the next line
    can_continue: false,
    // if `ok`, it's the position of the first character after the closing marker
    pos: 0,
    // if `ok`, it's the unescaped title
    str: '',
    // expected closing marker character code
    marker: 0
  };
  if (prev_state) {
    // this is a continuation of a previous parseLinkTitle call on the next line,
    // used in reference links only
    state.str = prev_state.str;
    state.marker = prev_state.marker;
  } else {
    if (pos >= max) {
      return state;
    }
    let marker = str.charCodeAt(pos);
    if (marker !== 0x22 /* " */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) {
      return state;
    }
    start++;
    pos++;

    // if opening marker is "(", switch it to closing marker ")"
    if (marker === 0x28) {
      marker = 0x29;
    }
    state.marker = marker;
  }
  while (pos < max) {
    code = str.charCodeAt(pos);
    if (code === state.marker) {
      state.pos = pos + 1;
      state.str += unescapeAll(str.slice(start, pos));
      state.ok = true;
      return state;
    } else if (code === 0x28 /* ( */ && state.marker === 0x29 /* ) */) {
      return state;
    } else if (code === 0x5C /* \ */ && pos + 1 < max) {
      pos++;
    }
    pos++;
  }

  // no closing marker found, but this link title may continue on the next line (for references)
  state.can_continue = true;
  state.str += unescapeAll(str.slice(start, pos));
  return state;
}

// Just a shortcut for bulk export

var helpers = /*#__PURE__*/Object.freeze({
  __proto__: null,
  parseLinkDestination: parseLinkDestination,
  parseLinkLabel: parseLinkLabel,
  parseLinkTitle: parseLinkTitle
});

/**
 * class Renderer
 *
 * Generates HTML from parsed token stream. Each instance has independent
 * copy of rules. Those can be rewritten with ease. Also, you can add new
 * rules if you create plugin and adds new token types.
 **/

const default_rules = {};
default_rules.code_inline = function (tokens, idx, options, env, slf) {
  const token = tokens[idx];
  return '<code' + slf.renderAttrs(token) + '>' + escapeHtml(token.content) + '</code>';
};
default_rules.code_block = function (tokens, idx, options, env, slf) {
  const token = tokens[idx];
  return '<pre' + slf.renderAttrs(token) + '><code>' + escapeHtml(tokens[idx].content) + '</code></pre>\n';
};
default_rules.fence = function (tokens, idx, options, env, slf) {
  const token = tokens[idx];
  const info = token.info ? unescapeAll(token.info).trim() : '';
  let langName = '';
  let langAttrs = '';
  if (info) {
    const arr = info.split(/(\s+)/g);
    langName = arr[0];
    langAttrs = arr.slice(2).join('');
  }
  let highlighted;
  if (options.highlight) {
    highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content);
  } else {
    highlighted = escapeHtml(token.content);
  }
  if (highlighted.indexOf('<pre') === 0) {
    return highlighted + '\n';
  }

  // If language exists, inject class gently, without modifying original token.
  // May be, one day we will add .deepClone() for token and simplify this part, but
  // now we prefer to keep things local.
  if (info) {
    const i = token.attrIndex('class');
    const tmpAttrs = token.attrs ? token.attrs.slice() : [];
    if (i < 0) {
      tmpAttrs.push(['class', options.langPrefix + langName]);
    } else {
      tmpAttrs[i] = tmpAttrs[i].slice();
      tmpAttrs[i][1] += ' ' + options.langPrefix + langName;
    }

    // Fake token just to render attributes
    const tmpToken = {
      attrs: tmpAttrs
    };
    return `<pre><code${slf.renderAttrs(tmpToken)}>${highlighted}</code></pre>\n`;
  }
  return `<pre><code${slf.renderAttrs(token)}>${highlighted}</code></pre>\n`;
};
default_rules.image = function (tokens, idx, options, env, slf) {
  const token = tokens[idx];

  // "alt" attr MUST be set, even if empty. Because it's mandatory and
  // should be placed on proper position for tests.
  //
  // Replace content with actual value

  token.attrs[token.attrIndex('alt')][1] = slf.renderInlineAsText(token.children, options, env);
  return slf.renderToken(tokens, idx, options);
};
default_rules.hardbreak = function (tokens, idx, options /*, env */) {
  return options.xhtmlOut ? '<br />\n' : '<br>\n';
};
default_rules.softbreak = function (tokens, idx, options /*, env */) {
  return options.breaks ? options.xhtmlOut ? '<br />\n' : '<br>\n' : '\n';
};
default_rules.text = function (tokens, idx /*, options, env */) {
  return escapeHtml(tokens[idx].content);
};
default_rules.html_block = function (tokens, idx /*, options, env */) {
  return tokens[idx].content;
};
default_rules.html_inline = function (tokens, idx /*, options, env */) {
  return tokens[idx].content;
};

/**
 * new Renderer()
 *
 * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.
 **/
function Renderer() {
  /**
   * Renderer#rules -> Object
   *
   * Contains render rules for tokens. Can be updated and extended.
   *
   * ##### Example
   *
   * ```javascript
   * var md = require('markdown-it')();
   *
   * md.renderer.rules.strong_open  = function () { return '<b>'; };
   * md.renderer.rules.strong_close = function () { return '</b>'; };
   *
   * var result = md.renderInline(...);
   * ```
   *
   * Each rule is called as independent static function with fixed signature:
   *
   * ```javascript
   * function my_token_render(tokens, idx, options, env, renderer) {
   *   // ...
   *   return renderedHTML;
   * }
   * ```
   *
   * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs)
   * for more details and examples.
   **/
  this.rules = assign({}, default_rules);
}

/**
 * Renderer.renderAttrs(token) -> String
 *
 * Render token attributes to string.
 **/
Renderer.prototype.renderAttrs = function renderAttrs(token) {
  let i, l, result;
  if (!token.attrs) {
    return '';
  }
  result = '';
  for (i = 0, l = token.attrs.length; i < l; i++) {
    result += ' ' + escapeHtml(token.attrs[i][0]) + '="' + escapeHtml(token.attrs[i][1]) + '"';
  }
  return result;
};

/**
 * Renderer.renderToken(tokens, idx, options) -> String
 * - tokens (Array): list of tokens
 * - idx (Numbed): token index to render
 * - options (Object): params of parser instance
 *
 * Default token renderer. Can be overriden by custom function
 * in [[Renderer#rules]].
 **/
Renderer.prototype.renderToken = function renderToken(tokens, idx, options) {
  const token = tokens[idx];
  let result = '';

  // Tight list paragraphs
  if (token.hidden) {
    return '';
  }

  // Insert a newline between hidden paragraph and subsequent opening
  // block-level tag.
  //
  // For example, here we should insert a newline before blockquote:
  //  - a
  //    >
  //
  if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {
    result += '\n';
  }

  // Add token name, e.g. `<img`
  result += (token.nesting === -1 ? '</' : '<') + token.tag;

  // Encode attributes, e.g. `<img src="foo"`
  result += this.renderAttrs(token);

  // Add a slash for self-closing tags, e.g. `<img src="foo" /`
  if (token.nesting === 0 && options.xhtmlOut) {
    result += ' /';
  }

  // Check if we need to add a newline after this tag
  let needLf = false;
  if (token.block) {
    needLf = true;
    if (token.nesting === 1) {
      if (idx + 1 < tokens.length) {
        const nextToken = tokens[idx + 1];
        if (nextToken.type === 'inline' || nextToken.hidden) {
          // Block-level tag containing an inline tag.
          //
          needLf = false;
        } else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {
          // Opening tag + closing tag of the same type. E.g. `<li></li>`.
          //
          needLf = false;
        }
      }
    }
  }
  result += needLf ? '>\n' : '>';
  return result;
};

/**
 * Renderer.renderInline(tokens, options, env) -> String
 * - tokens (Array): list on block tokens to render
 * - options (Object): params of parser instance
 * - env (Object): additional data from parsed input (references, for example)
 *
 * The same as [[Renderer.render]], but for single token of `inline` type.
 **/
Renderer.prototype.renderInline = function (tokens, options, env) {
  let result = '';
  const rules = this.rules;
  for (let i = 0, len = tokens.length; i < len; i++) {
    const type = tokens[i].type;
    if (typeof rules[type] !== 'undefined') {
      result += rules[type](tokens, i, options, env, this);
    } else {
      result += this.renderToken(tokens, i, options);
    }
  }
  return result;
};

/** internal
 * Renderer.renderInlineAsText(tokens, options, env) -> String
 * - tokens (Array): list on block tokens to render
 * - options (Object): params of parser instance
 * - env (Object): additional data from parsed input (references, for example)
 *
 * Special kludge for image `alt` attributes to conform CommonMark spec.
 * Don't try to use it! Spec requires to show `alt` content with stripped markup,
 * instead of simple escaping.
 **/
Renderer.prototype.renderInlineAsText = function (tokens, options, env) {
  let result = '';
  for (let i = 0, len = tokens.length; i < len; i++) {
    switch (tokens[i].type) {
      case 'text':
        result += tokens[i].content;
        break;
      case 'image':
        result += this.renderInlineAsText(tokens[i].children, options, env);
        break;
      case 'html_inline':
      case 'html_block':
        result += tokens[i].content;
        break;
      case 'softbreak':
      case 'hardbreak':
        result += '\n';
        break;
      // all other tokens are skipped
    }
  }

  return result;
};

/**
 * Renderer.render(tokens, options, env) -> String
 * - tokens (Array): list on block tokens to render
 * - options (Object): params of parser instance
 * - env (Object): additional data from parsed input (references, for example)
 *
 * Takes token stream and generates HTML. Probably, you will never need to call
 * this method directly.
 **/
Renderer.prototype.render = function (tokens, options, env) {
  let result = '';
  const rules = this.rules;
  for (let i = 0, len = tokens.length; i < len; i++) {
    const type = tokens[i].type;
    if (type === 'inline') {
      result += this.renderInline(tokens[i].children, options, env);
    } else if (typeof rules[type] !== 'undefined') {
      result += rules[type](tokens, i, options, env, this);
    } else {
      result += this.renderToken(tokens, i, options, env);
    }
  }
  return result;
};

/**
 * class Ruler
 *
 * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and
 * [[MarkdownIt#inline]] to manage sequences of functions (rules):
 *
 * - keep rules in defined order
 * - assign the name to each rule
 * - enable/disable rules
 * - add/replace rules
 * - allow assign rules to additional named chains (in the same)
 * - cacheing lists of active rules
 *
 * You will not need use this class directly until write plugins. For simple
 * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and
 * [[MarkdownIt.use]].
 **/

/**
 * new Ruler()
 **/
function Ruler() {
  // List of added rules. Each element is:
  //
  // {
  //   name: XXX,
  //   enabled: Boolean,
  //   fn: Function(),
  //   alt: [ name2, name3 ]
  // }
  //
  this.__rules__ = [];

  // Cached rule chains.
  //
  // First level - chain name, '' for default.
  // Second level - diginal anchor for fast filtering by charcodes.
  //
  this.__cache__ = null;
}

// Helper methods, should not be used directly

// Find rule index by name
//
Ruler.prototype.__find__ = function (name) {
  for (let i = 0; i < this.__rules__.length; i++) {
    if (this.__rules__[i].name === name) {
      return i;
    }
  }
  return -1;
};

// Build rules lookup cache
//
Ruler.prototype.__compile__ = function () {
  const self = this;
  const chains = [''];

  // collect unique names
  self.__rules__.forEach(function (rule) {
    if (!rule.enabled) {
      return;
    }
    rule.alt.forEach(function (altName) {
      if (chains.indexOf(altName) < 0) {
        chains.push(altName);
      }
    });
  });
  self.__cache__ = {};
  chains.forEach(function (chain) {
    self.__cache__[chain] = [];
    self.__rules__.forEach(function (rule) {
      if (!rule.enabled) {
        return;
      }
      if (chain && rule.alt.indexOf(chain) < 0) {
        return;
      }
      self.__cache__[chain].push(rule.fn);
    });
  });
};

/**
 * Ruler.at(name, fn [, options])
 * - name (String): rule name to replace.
 * - fn (Function): new rule function.
 * - options (Object): new rule options (not mandatory).
 *
 * Replace rule by name with new function & options. Throws error if name not
 * found.
 *
 * ##### Options:
 *
 * - __alt__ - array with names of "alternate" chains.
 *
 * ##### Example
 *
 * Replace existing typographer replacement rule with new one:
 *
 * ```javascript
 * var md = require('markdown-it')();
 *
 * md.core.ruler.at('replacements', function replace(state) {
 *   //...
 * });
 * ```
 **/
Ruler.prototype.at = function (name, fn, options) {
  const index = this.__find__(name);
  const opt = options || {};
  if (index === -1) {
    throw new Error('Parser rule not found: ' + name);
  }
  this.__rules__[index].fn = fn;
  this.__rules__[index].alt = opt.alt || [];
  this.__cache__ = null;
};

/**
 * Ruler.before(beforeName, ruleName, fn [, options])
 * - beforeName (String): new rule will be added before this one.
 * - ruleName (String): name of added rule.
 * - fn (Function): rule function.
 * - options (Object): rule options (not mandatory).
 *
 * Add new rule to chain before one with given name. See also
 * [[Ruler.after]], [[Ruler.push]].
 *
 * ##### Options:
 *
 * - __alt__ - array with names of "alternate" chains.
 *
 * ##### Example
 *
 * ```javascript
 * var md = require('markdown-it')();
 *
 * md.block.ruler.before('paragraph', 'my_rule', function replace(state) {
 *   //...
 * });
 * ```
 **/
Ruler.prototype.before = function (beforeName, ruleName, fn, options) {
  const index = this.__find__(beforeName);
  const opt = options || {};
  if (index === -1) {
    throw new Error('Parser rule not found: ' + beforeName);
  }
  this.__rules__.splice(index, 0, {
    name: ruleName,
    enabled: true,
    fn,
    alt: opt.alt || []
  });
  this.__cache__ = null;
};

/**
 * Ruler.after(afterName, ruleName, fn [, options])
 * - afterName (String): new rule will be added after this one.
 * - ruleName (String): name of added rule.
 * - fn (Function): rule function.
 * - options (Object): rule options (not mandatory).
 *
 * Add new rule to chain after one with given name. See also
 * [[Ruler.before]], [[Ruler.push]].
 *
 * ##### Options:
 *
 * - __alt__ - array with names of "alternate" chains.
 *
 * ##### Example
 *
 * ```javascript
 * var md = require('markdown-it')();
 *
 * md.inline.ruler.after('text', 'my_rule', function replace(state) {
 *   //...
 * });
 * ```
 **/
Ruler.prototype.after = function (afterName, ruleName, fn, options) {
  const index = this.__find__(afterName);
  const opt = options || {};
  if (index === -1) {
    throw new Error('Parser rule not found: ' + afterName);
  }
  this.__rules__.splice(index + 1, 0, {
    name: ruleName,
    enabled: true,
    fn,
    alt: opt.alt || []
  });
  this.__cache__ = null;
};

/**
 * Ruler.push(ruleName, fn [, options])
 * - ruleName (String): name of added rule.
 * - fn (Function): rule function.
 * - options (Object): rule options (not mandatory).
 *
 * Push new rule to the end of chain. See also
 * [[Ruler.before]], [[Ruler.after]].
 *
 * ##### Options:
 *
 * - __alt__ - array with names of "alternate" chains.
 *
 * ##### Example
 *
 * ```javascript
 * var md = require('markdown-it')();
 *
 * md.core.ruler.push('my_rule', function replace(state) {
 *   //...
 * });
 * ```
 **/
Ruler.prototype.push = function (ruleName, fn, options) {
  const opt = options || {};
  this.__rules__.push({
    name: ruleName,
    enabled: true,
    fn,
    alt: opt.alt || []
  });
  this.__cache__ = null;
};

/**
 * Ruler.enable(list [, ignoreInvalid]) -> Array
 * - list (String|Array): list of rule names to enable.
 * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
 *
 * Enable rules with given names. If any rule name not found - throw Error.
 * Errors can be disabled by second param.
 *
 * Returns list of found rule names (if no exception happened).
 *
 * See also [[Ruler.disable]], [[Ruler.enableOnly]].
 **/
Ruler.prototype.enable = function (list, ignoreInvalid) {
  if (!Array.isArray(list)) {
    list = [list];
  }
  const result = [];

  // Search by name and enable
  list.forEach(function (name) {
    const idx = this.__find__(name);
    if (idx < 0) {
      if (ignoreInvalid) {
        return;
      }
      throw new Error('Rules manager: invalid rule name ' + name);
    }
    this.__rules__[idx].enabled = true;
    result.push(name);
  }, this);
  this.__cache__ = null;
  return result;
};

/**
 * Ruler.enableOnly(list [, ignoreInvalid])
 * - list (String|Array): list of rule names to enable (whitelist).
 * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
 *
 * Enable rules with given names, and disable everything else. If any rule name
 * not found - throw Error. Errors can be disabled by second param.
 *
 * See also [[Ruler.disable]], [[Ruler.enable]].
 **/
Ruler.prototype.enableOnly = function (list, ignoreInvalid) {
  if (!Array.isArray(list)) {
    list = [list];
  }
  this.__rules__.forEach(function (rule) {
    rule.enabled = false;
  });
  this.enable(list, ignoreInvalid);
};

/**
 * Ruler.disable(list [, ignoreInvalid]) -> Array
 * - list (String|Array): list of rule names to disable.
 * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
 *
 * Disable rules with given names. If any rule name not found - throw Error.
 * Errors can be disabled by second param.
 *
 * Returns list of found rule names (if no exception happened).
 *
 * See also [[Ruler.enable]], [[Ruler.enableOnly]].
 **/
Ruler.prototype.disable = function (list, ignoreInvalid) {
  if (!Array.isArray(list)) {
    list = [list];
  }
  const result = [];

  // Search by name and disable
  list.forEach(function (name) {
    const idx = this.__find__(name);
    if (idx < 0) {
      if (ignoreInvalid) {
        return;
      }
      throw new Error('Rules manager: invalid rule name ' + name);
    }
    this.__rules__[idx].enabled = false;
    result.push(name);
  }, this);
  this.__cache__ = null;
  return result;
};

/**
 * Ruler.getRules(chainName) -> Array
 *
 * Return array of active functions (rules) for given chain name. It analyzes
 * rules configuration, compiles caches if not exists and returns result.
 *
 * Default chain name is `''` (empty string). It can't be skipped. That's
 * done intentionally, to keep signature monomorphic for high speed.
 **/
Ruler.prototype.getRules = function (chainName) {
  if (this.__cache__ === null) {
    this.__compile__();
  }

  // Chain can be empty, if rules disabled. But we still have to return Array.
  return this.__cache__[chainName] || [];
};

// Token class

/**
 * class Token
 **/

/**
 * new Token(type, tag, nesting)
 *
 * Create new token and fill passed properties.
 **/
function Token(type, tag, nesting) {
  /**
   * Token#type -> String
   *
   * Type of the token (string, e.g. "paragraph_open")
   **/
  this.type = type;

  /**
   * Token#tag -> String
   *
   * html tag name, e.g. "p"
   **/
  this.tag = tag;

  /**
   * Token#attrs -> Array
   *
   * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`
   **/
  this.attrs = null;

  /**
   * Token#map -> Array
   *
   * Source map info. Format: `[ line_begin, line_end ]`
   **/
  this.map = null;

  /**
   * Token#nesting -> Number
   *
   * Level change (number in {-1, 0, 1} set), where:
   *
   * -  `1` means the tag is opening
   * -  `0` means the tag is self-closing
   * - `-1` means the tag is closing
   **/
  this.nesting = nesting;

  /**
   * Token#level -> Number
   *
   * nesting level, the same as `state.level`
   **/
  this.level = 0;

  /**
   * Token#children -> Array
   *
   * An array of child nodes (inline and img tokens)
   **/
  this.children = null;

  /**
   * Token#content -> String
   *
   * In a case of self-closing tag (code, html, fence, etc.),
   * it has contents of this tag.
   **/
  this.content = '';

  /**
   * Token#markup -> String
   *
   * '*' or '_' for emphasis, fence string for fence, etc.
   **/
  this.markup = '';

  /**
   * Token#info -> String
   *
   * Additional information:
   *
   * - Info string for "fence" tokens
   * - The value "auto" for autolink "link_open" and "link_close" tokens
   * - The string value of the item marker for ordered-list "list_item_open" tokens
   **/
  this.info = '';

  /**
   * Token#meta -> Object
   *
   * A place for plugins to store an arbitrary data
   **/
  this.meta = null;

  /**
   * Token#block -> Boolean
   *
   * True for block-level tokens, false for inline tokens.
   * Used in renderer to calculate line breaks
   **/
  this.block = false;

  /**
   * Token#hidden -> Boolean
   *
   * If it's true, ignore this element when rendering. Used for tight lists
   * to hide paragraphs.
   **/
  this.hidden = false;
}

/**
 * Token.attrIndex(name) -> Number
 *
 * Search attribute index by name.
 **/
Token.prototype.attrIndex = function attrIndex(name) {
  if (!this.attrs) {
    return -1;
  }
  const attrs = this.attrs;
  for (let i = 0, len = attrs.length; i < len; i++) {
    if (attrs[i][0] === name) {
      return i;
    }
  }
  return -1;
};

/**
 * Token.attrPush(attrData)
 *
 * Add `[ name, value ]` attribute to list. Init attrs if necessary
 **/
Token.prototype.attrPush = function attrPush(attrData) {
  if (this.attrs) {
    this.attrs.push(attrData);
  } else {
    this.attrs = [attrData];
  }
};

/**
 * Token.attrSet(name, value)
 *
 * Set `name` attribute to `value`. Override old value if exists.
 **/
Token.prototype.attrSet = function attrSet(name, value) {
  const idx = this.attrIndex(name);
  const attrData = [name, value];
  if (idx < 0) {
    this.attrPush(attrData);
  } else {
    this.attrs[idx] = attrData;
  }
};

/**
 * Token.attrGet(name)
 *
 * Get the value of attribute `name`, or null if it does not exist.
 **/
Token.prototype.attrGet = function attrGet(name) {
  const idx = this.attrIndex(name);
  let value = null;
  if (idx >= 0) {
    value = this.attrs[idx][1];
  }
  return value;
};

/**
 * Token.attrJoin(name, value)
 *
 * Join value to existing attribute via space. Or create new attribute if not
 * exists. Useful to operate with token classes.
 **/
Token.prototype.attrJoin = function attrJoin(name, value) {
  const idx = this.attrIndex(name);
  if (idx < 0) {
    this.attrPush([name, value]);
  } else {
    this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value;
  }
};

// Core state object
//

function StateCore(src, md, env) {
  this.src = src;
  this.env = env;
  this.tokens = [];
  this.inlineMode = false;
  this.md = md; // link to parser instance
}

// re-export Token class to use in core rules
StateCore.prototype.Token = Token;

// Normalize input string

// https://spec.commonmark.org/0.29/#line-ending
const NEWLINES_RE = /\r\n?|\n/g;
const NULL_RE = /\0/g;
function normalize(state) {
  let str;

  // Normalize newlines
  str = state.src.replace(NEWLINES_RE, '\n');

  // Replace NULL characters
  str = str.replace(NULL_RE, '\uFFFD');
  state.src = str;
}
function block(state) {
  let token;
  if (state.inlineMode) {
    token = new state.Token('inline', '', 0);
    token.content = state.src;
    token.map = [0, 1];
    token.children = [];
    state.tokens.push(token);
  } else {
    state.md.block.parse(state.src, state.md, state.env, state.tokens);
  }
}
function inline(state) {
  const tokens = state.tokens;

  // Parse inlines
  for (let i = 0, l = tokens.length; i < l; i++) {
    const tok = tokens[i];
    if (tok.type === 'inline') {
      state.md.inline.parse(tok.content, state.md, state.env, tok.children);
    }
  }
}

// Replace link-like texts with link nodes.
//
// Currently restricted by `md.validateLink()` to http/https/ftp
//

function isLinkOpen$1(str) {
  return /^<a[>\s]/i.test(str);
}
function isLinkClose$1(str) {
  return /^<\/a\s*>/i.test(str);
}
function linkify$1(state) {
  const blockTokens = state.tokens;
  if (!state.md.options.linkify) {
    return;
  }
  for (let j = 0, l = blockTokens.length; j < l; j++) {
    if (blockTokens[j].type !== 'inline' || !state.md.linkify.pretest(blockTokens[j].content)) {
      continue;
    }
    let tokens = blockTokens[j].children;
    let htmlLinkLevel = 0;

    // We scan from the end, to keep position when new tags added.
    // Use reversed logic in links start/end match
    for (let i = tokens.length - 1; i >= 0; i--) {
      const currentToken = tokens[i];

      // Skip content of markdown links
      if (currentToken.type === 'link_close') {
        i--;
        while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {
          i--;
        }
        continue;
      }

      // Skip content of html tag links
      if (currentToken.type === 'html_inline') {
        if (isLinkOpen$1(currentToken.content) && htmlLinkLevel > 0) {
          htmlLinkLevel--;
        }
        if (isLinkClose$1(currentToken.content)) {
          htmlLinkLevel++;
        }
      }
      if (htmlLinkLevel > 0) {
        continue;
      }
      if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {
        const text = currentToken.content;
        let links = state.md.linkify.match(text);

        // Now split string to nodes
        const nodes = [];
        let level = currentToken.level;
        let lastPos = 0;

        // forbid escape sequence at the start of the string,
        // this avoids http\://example.com/ from being linkified as
        // http:<a href="//example.com/">//example.com/</a>
        if (links.length > 0 && links[0].index === 0 && i > 0 && tokens[i - 1].type === 'text_special') {
          links = links.slice(1);
        }
        for (let ln = 0; ln < links.length; ln++) {
          const url = links[ln].url;
          const fullUrl = state.md.normalizeLink(url);
          if (!state.md.validateLink(fullUrl)) {
            continue;
          }
          let urlText = links[ln].text;

          // Linkifier might send raw hostnames like "example.com", where url
          // starts with domain name. So we prepend http:// in those cases,
          // and remove it afterwards.
          //
          if (!links[ln].schema) {
            urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\/\//, '');
          } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {
            urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '');
          } else {
            urlText = state.md.normalizeLinkText(urlText);
          }
          const pos = links[ln].index;
          if (pos > lastPos) {
            const token = new state.Token('text', '', 0);
            token.content = text.slice(lastPos, pos);
            token.level = level;
            nodes.push(token);
          }
          const token_o = new state.Token('link_open', 'a', 1);
          token_o.attrs = [['href', fullUrl]];
          token_o.level = level++;
          token_o.markup = 'linkify';
          token_o.info = 'auto';
          nodes.push(token_o);
          const token_t = new state.Token('text', '', 0);
          token_t.content = urlText;
          token_t.level = level;
          nodes.push(token_t);
          const token_c = new state.Token('link_close', 'a', -1);
          token_c.level = --level;
          token_c.markup = 'linkify';
          token_c.info = 'auto';
          nodes.push(token_c);
          lastPos = links[ln].lastIndex;
        }
        if (lastPos < text.length) {
          const token = new state.Token('text', '', 0);
          token.content = text.slice(lastPos);
          token.level = level;
          nodes.push(token);
        }

        // replace current node
        blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);
      }
    }
  }
}

// Simple typographic replacements
//
// (c) (C) → ©
// (tm) (TM) → ™
// (r) (R) → ®
// +- → ±
// ... → … (also ?.... → ?.., !.... → !..)
// ???????? → ???, !!!!! → !!!, `,,` → `,`
// -- → &ndash;, --- → &mdash;
//

// TODO:
// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾
// - multiplications 2 x 4 -> 2 × 4

const RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/;

// Workaround for phantomjs - need regex without /g flag,
// or root check will fail every second time
const SCOPED_ABBR_TEST_RE = /\((c|tm|r)\)/i;
const SCOPED_ABBR_RE = /\((c|tm|r)\)/ig;
const SCOPED_ABBR = {
  c: '©',
  r: '®',
  tm: '™'
};
function replaceFn(match, name) {
  return SCOPED_ABBR[name.toLowerCase()];
}
function replace_scoped(inlineTokens) {
  let inside_autolink = 0;
  for (let i = inlineTokens.length - 1; i >= 0; i--) {
    const token = inlineTokens[i];
    if (token.type === 'text' && !inside_autolink) {
      token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);
    }
    if (token.type === 'link_open' && token.info === 'auto') {
      inside_autolink--;
    }
    if (token.type === 'link_close' && token.info === 'auto') {
      inside_autolink++;
    }
  }
}
function replace_rare(inlineTokens) {
  let inside_autolink = 0;
  for (let i = inlineTokens.length - 1; i >= 0; i--) {
    const token = inlineTokens[i];
    if (token.type === 'text' && !inside_autolink) {
      if (RARE_RE.test(token.content)) {
        token.content = token.content.replace(/\+-/g, '±')
        // .., ..., ....... -> …
        // but ?..... & !..... -> ?.. & !..
        .replace(/\.{2,}/g, '…').replace(/([?!])…/g, '$1..').replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')
        // em-dash
        .replace(/(^|[^-])---(?=[^-]|$)/mg, '$1\u2014')
        // en-dash
        .replace(/(^|\s)--(?=\s|$)/mg, '$1\u2013').replace(/(^|[^-\s])--(?=[^-\s]|$)/mg, '$1\u2013');
      }
    }
    if (token.type === 'link_open' && token.info === 'auto') {
      inside_autolink--;
    }
    if (token.type === 'link_close' && token.info === 'auto') {
      inside_autolink++;
    }
  }
}
function replace(state) {
  let blkIdx;
  if (!state.md.options.typographer) {
    return;
  }
  for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
    if (state.tokens[blkIdx].type !== 'inline') {
      continue;
    }
    if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {
      replace_scoped(state.tokens[blkIdx].children);
    }
    if (RARE_RE.test(state.tokens[blkIdx].content)) {
      replace_rare(state.tokens[blkIdx].children);
    }
  }
}

// Convert straight quotation marks to typographic ones
//

const QUOTE_TEST_RE = /['"]/;
const QUOTE_RE = /['"]/g;
const APOSTROPHE = '\u2019'; /* ’ */

function replaceAt(str, index, ch) {
  return str.slice(0, index) + ch + str.slice(index + 1);
}
function process_inlines(tokens, state) {
  let j;
  const stack = [];
  for (let i = 0; i < tokens.length; i++) {
    const token = tokens[i];
    const thisLevel = tokens[i].level;
    for (j = stack.length - 1; j >= 0; j--) {
      if (stack[j].level <= thisLevel) {
        break;
      }
    }
    stack.length = j + 1;
    if (token.type !== 'text') {
      continue;
    }
    let text = token.content;
    let pos = 0;
    let max = text.length;

    /* eslint no-labels:0,block-scoped-var:0 */
    OUTER: while (pos < max) {
      QUOTE_RE.lastIndex = pos;
      const t = QUOTE_RE.exec(text);
      if (!t) {
        break;
      }
      let canOpen = true;
      let canClose = true;
      pos = t.index + 1;
      const isSingle = t[0] === "'";

      // Find previous character,
      // default to space if it's the beginning of the line
      //
      let lastChar = 0x20;
      if (t.index - 1 >= 0) {
        lastChar = text.charCodeAt(t.index - 1);
      } else {
        for (j = i - 1; j >= 0; j--) {
          if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // lastChar defaults to 0x20
          if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'

          lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);
          break;
        }
      }

      // Find next character,
      // default to space if it's the end of the line
      //
      let nextChar = 0x20;
      if (pos < max) {
        nextChar = text.charCodeAt(pos);
      } else {
        for (j = i + 1; j < tokens.length; j++) {
          if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // nextChar defaults to 0x20
          if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'

          nextChar = tokens[j].content.charCodeAt(0);
          break;
        }
      }
      const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
      const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
      const isLastWhiteSpace = isWhiteSpace(lastChar);
      const isNextWhiteSpace = isWhiteSpace(nextChar);
      if (isNextWhiteSpace) {
        canOpen = false;
      } else if (isNextPunctChar) {
        if (!(isLastWhiteSpace || isLastPunctChar)) {
          canOpen = false;
        }
      }
      if (isLastWhiteSpace) {
        canClose = false;
      } else if (isLastPunctChar) {
        if (!(isNextWhiteSpace || isNextPunctChar)) {
          canClose = false;
        }
      }
      if (nextChar === 0x22 /* " */ && t[0] === '"') {
        if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) {
          // special case: 1"" - count first quote as an inch
          canClose = canOpen = false;
        }
      }
      if (canOpen && canClose) {
        // Replace quotes in the middle of punctuation sequence, but not
        // in the middle of the words, i.e.:
        //
        // 1. foo " bar " baz - not replaced
        // 2. foo-"-bar-"-baz - replaced
        // 3. foo"bar"baz     - not replaced
        //
        canOpen = isLastPunctChar;
        canClose = isNextPunctChar;
      }
      if (!canOpen && !canClose) {
        // middle of word
        if (isSingle) {
          token.content = replaceAt(token.content, t.index, APOSTROPHE);
        }
        continue;
      }
      if (canClose) {
        // this could be a closing quote, rewind the stack to get a match
        for (j = stack.length - 1; j >= 0; j--) {
          let item = stack[j];
          if (stack[j].level < thisLevel) {
            break;
          }
          if (item.single === isSingle && stack[j].level === thisLevel) {
            item = stack[j];
            let openQuote;
            let closeQuote;
            if (isSingle) {
              openQuote = state.md.options.quotes[2];
              closeQuote = state.md.options.quotes[3];
            } else {
              openQuote = state.md.options.quotes[0];
              closeQuote = state.md.options.quotes[1];
            }

            // replace token.content *before* tokens[item.token].content,
            // because, if they are pointing at the same token, replaceAt
            // could mess up indices when quote length != 1
            token.content = replaceAt(token.content, t.index, closeQuote);
            tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, openQuote);
            pos += closeQuote.length - 1;
            if (item.token === i) {
              pos += openQuote.length - 1;
            }
            text = token.content;
            max = text.length;
            stack.length = j;
            continue OUTER;
          }
        }
      }
      if (canOpen) {
        stack.push({
          token: i,
          pos: t.index,
          single: isSingle,
          level: thisLevel
        });
      } else if (canClose && isSingle) {
        token.content = replaceAt(token.content, t.index, APOSTROPHE);
      }
    }
  }
}
function smartquotes(state) {
  /* eslint max-depth:0 */
  if (!state.md.options.typographer) {
    return;
  }
  for (let blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
    if (state.tokens[blkIdx].type !== 'inline' || !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {
      continue;
    }
    process_inlines(state.tokens[blkIdx].children, state);
  }
}

// Join raw text tokens with the rest of the text
//
// This is set as a separate rule to provide an opportunity for plugins
// to run text replacements after text join, but before escape join.
//
// For example, `\:)` shouldn't be replaced with an emoji.
//

function text_join(state) {
  let curr, last;
  const blockTokens = state.tokens;
  const l = blockTokens.length;
  for (let j = 0; j < l; j++) {
    if (blockTokens[j].type !== 'inline') continue;
    const tokens = blockTokens[j].children;
    const max = tokens.length;
    for (curr = 0; curr < max; curr++) {
      if (tokens[curr].type === 'text_special') {
        tokens[curr].type = 'text';
      }
    }
    for (curr = last = 0; curr < max; curr++) {
      if (tokens[curr].type === 'text' && curr + 1 < max && tokens[curr + 1].type === 'text') {
        // collapse two adjacent text nodes
        tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;
      } else {
        if (curr !== last) {
          tokens[last] = tokens[curr];
        }
        last++;
      }
    }
    if (curr !== last) {
      tokens.length = last;
    }
  }
}

/** internal
 * class Core
 *
 * Top-level rules executor. Glues block/inline parsers and does intermediate
 * transformations.
 **/

const _rules$2 = [['normalize', normalize], ['block', block], ['inline', inline], ['linkify', linkify$1], ['replacements', replace], ['smartquotes', smartquotes],
// `text_join` finds `text_special` tokens (for escape sequences)
// and joins them with the rest of the text
['text_join', text_join]];

/**
 * new Core()
 **/
function Core() {
  /**
   * Core#ruler -> Ruler
   *
   * [[Ruler]] instance. Keep configuration of core rules.
   **/
  this.ruler = new Ruler();
  for (let i = 0; i < _rules$2.length; i++) {
    this.ruler.push(_rules$2[i][0], _rules$2[i][1]);
  }
}

/**
 * Core.process(state)
 *
 * Executes core chain rules.
 **/
Core.prototype.process = function (state) {
  const rules = this.ruler.getRules('');
  for (let i = 0, l = rules.length; i < l; i++) {
    rules[i](state);
  }
};
Core.prototype.State = StateCore;

// Parser state class

function StateBlock(src, md, env, tokens) {
  this.src = src;

  // link to parser instance
  this.md = md;
  this.env = env;

  //
  // Internal state vartiables
  //

  this.tokens = tokens;
  this.bMarks = []; // line begin offsets for fast jumps
  this.eMarks = []; // line end offsets for fast jumps
  this.tShift = []; // offsets of the first non-space characters (tabs not expanded)
  this.sCount = []; // indents for each line (tabs expanded)

  // An amount of virtual spaces (tabs expanded) between beginning
  // of each line (bMarks) and real beginning of that line.
  //
  // It exists only as a hack because blockquotes override bMarks
  // losing information in the process.
  //
  // It's used only when expanding tabs, you can think about it as
  // an initial tab length, e.g. bsCount=21 applied to string `\t123`
  // means first tab should be expanded to 4-21%4 === 3 spaces.
  //
  this.bsCount = [];

  // block parser variables

  // required block content indent (for example, if we are
  // inside a list, it would be positioned after list marker)
  this.blkIndent = 0;
  this.line = 0; // line index in src
  this.lineMax = 0; // lines count
  this.tight = false; // loose/tight mode for lists
  this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)
  this.listIndent = -1; // indent of the current list block (-1 if there isn't any)

  // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'
  // used in lists to determine if they interrupt a paragraph
  this.parentType = 'root';
  this.level = 0;

  // Create caches
  // Generate markers.
  const s = this.src;
  for (let start = 0, pos = 0, indent = 0, offset = 0, len = s.length, indent_found = false; pos < len; pos++) {
    const ch = s.charCodeAt(pos);
    if (!indent_found) {
      if (isSpace(ch)) {
        indent++;
        if (ch === 0x09) {
          offset += 4 - offset % 4;
        } else {
          offset++;
        }
        continue;
      } else {
        indent_found = true;
      }
    }
    if (ch === 0x0A || pos === len - 1) {
      if (ch !== 0x0A) {
        pos++;
      }
      this.bMarks.push(start);
      this.eMarks.push(pos);
      this.tShift.push(indent);
      this.sCount.push(offset);
      this.bsCount.push(0);
      indent_found = false;
      indent = 0;
      offset = 0;
      start = pos + 1;
    }
  }

  // Push fake entry to simplify cache bounds checks
  this.bMarks.push(s.length);
  this.eMarks.push(s.length);
  this.tShift.push(0);
  this.sCount.push(0);
  this.bsCount.push(0);
  this.lineMax = this.bMarks.length - 1; // don't count last fake line
}

// Push new token to "stream".
//
StateBlock.prototype.push = function (type, tag, nesting) {
  const token = new Token(type, tag, nesting);
  token.block = true;
  if (nesting < 0) this.level--; // closing tag
  token.level = this.level;
  if (nesting > 0) this.level++; // opening tag

  this.tokens.push(token);
  return token;
};
StateBlock.prototype.isEmpty = function isEmpty(line) {
  return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];
};
StateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {
  for (let max = this.lineMax; from < max; from++) {
    if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {
      break;
    }
  }
  return from;
};

// Skip spaces from given position.
StateBlock.prototype.skipSpaces = function skipSpaces(pos) {
  for (let max = this.src.length; pos < max; pos++) {
    const ch = this.src.charCodeAt(pos);
    if (!isSpace(ch)) {
      break;
    }
  }
  return pos;
};

// Skip spaces from given position in reverse.
StateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) {
  if (pos <= min) {
    return pos;
  }
  while (pos > min) {
    if (!isSpace(this.src.charCodeAt(--pos))) {
      return pos + 1;
    }
  }
  return pos;
};

// Skip char codes from given position
StateBlock.prototype.skipChars = function skipChars(pos, code) {
  for (let max = this.src.length; pos < max; pos++) {
    if (this.src.charCodeAt(pos) !== code) {
      break;
    }
  }
  return pos;
};

// Skip char codes reverse from given position - 1
StateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {
  if (pos <= min) {
    return pos;
  }
  while (pos > min) {
    if (code !== this.src.charCodeAt(--pos)) {
      return pos + 1;
    }
  }
  return pos;
};

// cut lines range from source.
StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {
  if (begin >= end) {
    return '';
  }
  const queue = new Array(end - begin);
  for (let i = 0, line = begin; line < end; line++, i++) {
    let lineIndent = 0;
    const lineStart = this.bMarks[line];
    let first = lineStart;
    let last;
    if (line + 1 < end || keepLastLF) {
      // No need for bounds check because we have fake entry on tail.
      last = this.eMarks[line] + 1;
    } else {
      last = this.eMarks[line];
    }
    while (first < last && lineIndent < indent) {
      const ch = this.src.charCodeAt(first);
      if (isSpace(ch)) {
        if (ch === 0x09) {
          lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;
        } else {
          lineIndent++;
        }
      } else if (first - lineStart < this.tShift[line]) {
        // patched tShift masked characters to look like spaces (blockquotes, list markers)
        lineIndent++;
      } else {
        break;
      }
      first++;
    }
    if (lineIndent > indent) {
      // partially expanding tabs in code blocks, e.g '\t\tfoobar'
      // with indent=2 becomes '  \tfoobar'
      queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last);
    } else {
      queue[i] = this.src.slice(first, last);
    }
  }
  return queue.join('');
};

// re-export Token class to use in block rules
StateBlock.prototype.Token = Token;

// GFM table, https://github.github.com/gfm/#tables-extension-

// Limit the amount of empty autocompleted cells in a table,
// see https://github.com/markdown-it/markdown-it/issues/1000,
//
// Both pulldown-cmark and commonmark-hs limit the number of cells this way to ~200k.
// We set it to 65k, which can expand user input by a factor of x370
// (256x256 square is 1.8kB expanded into 650kB).
const MAX_AUTOCOMPLETED_CELLS = 0x10000;
function getLine(state, line) {
  const pos = state.bMarks[line] + state.tShift[line];
  const max = state.eMarks[line];
  return state.src.slice(pos, max);
}
function escapedSplit(str) {
  const result = [];
  const max = str.length;
  let pos = 0;
  let ch = str.charCodeAt(pos);
  let isEscaped = false;
  let lastPos = 0;
  let current = '';
  while (pos < max) {
    if (ch === 0x7c /* | */) {
      if (!isEscaped) {
        // pipe separating cells, '|'
        result.push(current + str.substring(lastPos, pos));
        current = '';
        lastPos = pos + 1;
      } else {
        // escaped pipe, '\|'
        current += str.substring(lastPos, pos - 1);
        lastPos = pos;
      }
    }
    isEscaped = ch === 0x5c /* \ */;
    pos++;
    ch = str.charCodeAt(pos);
  }
  result.push(current + str.substring(lastPos));
  return result;
}
function table(state, startLine, endLine, silent) {
  // should have at least two lines
  if (startLine + 2 > endLine) {
    return false;
  }
  let nextLine = startLine + 1;
  if (state.sCount[nextLine] < state.blkIndent) {
    return false;
  }

  // if it's indented more than 3 spaces, it should be a code block
  if (state.sCount[nextLine] - state.blkIndent >= 4) {
    return false;
  }

  // first character of the second line should be '|', '-', ':',
  // and no other characters are allowed but spaces;
  // basically, this is the equivalent of /^[-:|][-:|\s]*$/ regexp

  let pos = state.bMarks[nextLine] + state.tShift[nextLine];
  if (pos >= state.eMarks[nextLine]) {
    return false;
  }
  const firstCh = state.src.charCodeAt(pos++);
  if (firstCh !== 0x7C /* | */ && firstCh !== 0x2D /* - */ && firstCh !== 0x3A /* : */) {
    return false;
  }
  if (pos >= state.eMarks[nextLine]) {
    return false;
  }
  const secondCh = state.src.charCodeAt(pos++);
  if (secondCh !== 0x7C /* | */ && secondCh !== 0x2D /* - */ && secondCh !== 0x3A /* : */ && !isSpace(secondCh)) {
    return false;
  }

  // if first character is '-', then second character must not be a space
  // (due to parsing ambiguity with list)
  if (firstCh === 0x2D /* - */ && isSpace(secondCh)) {
    return false;
  }
  while (pos < state.eMarks[nextLine]) {
    const ch = state.src.charCodeAt(pos);
    if (ch !== 0x7C /* | */ && ch !== 0x2D /* - */ && ch !== 0x3A /* : */ && !isSpace(ch)) {
      return false;
    }
    pos++;
  }
  let lineText = getLine(state, startLine + 1);
  let columns = lineText.split('|');
  const aligns = [];
  for (let i = 0; i < columns.length; i++) {
    const t = columns[i].trim();
    if (!t) {
      // allow empty columns before and after table, but not in between columns;
      // e.g. allow ` |---| `, disallow ` ---||--- `
      if (i === 0 || i === columns.length - 1) {
        continue;
      } else {
        return false;
      }
    }
    if (!/^:?-+:?$/.test(t)) {
      return false;
    }
    if (t.charCodeAt(t.length - 1) === 0x3A /* : */) {
      aligns.push(t.charCodeAt(0) === 0x3A /* : */ ? 'center' : 'right');
    } else if (t.charCodeAt(0) === 0x3A /* : */) {
      aligns.push('left');
    } else {
      aligns.push('');
    }
  }
  lineText = getLine(state, startLine).trim();
  if (lineText.indexOf('|') === -1) {
    return false;
  }
  if (state.sCount[startLine] - state.blkIndent >= 4) {
    return false;
  }
  columns = escapedSplit(lineText);
  if (columns.length && columns[0] === '') columns.shift();
  if (columns.length && columns[columns.length - 1] === '') columns.pop();

  // header row will define an amount of columns in the entire table,
  // and align row should be exactly the same (the rest of the rows can differ)
  const columnCount = columns.length;
  if (columnCount === 0 || columnCount !== aligns.length) {
    return false;
  }
  if (silent) {
    return true;
  }
  const oldParentType = state.parentType;
  state.parentType = 'table';

  // use 'blockquote' lists for termination because it's
  // the most similar to tables
  const terminatorRules = state.md.block.ruler.getRules('blockquote');
  const token_to = state.push('table_open', 'table', 1);
  const tableLines = [startLine, 0];
  token_to.map = tableLines;
  const token_tho = state.push('thead_open', 'thead', 1);
  token_tho.map = [startLine, startLine + 1];
  const token_htro = state.push('tr_open', 'tr', 1);
  token_htro.map = [startLine, startLine + 1];
  for (let i = 0; i < columns.length; i++) {
    const token_ho = state.push('th_open', 'th', 1);
    if (aligns[i]) {
      token_ho.attrs = [['style', 'text-align:' + aligns[i]]];
    }
    const token_il = state.push('inline', '', 0);
    token_il.content = columns[i].trim();
    token_il.children = [];
    state.push('th_close', 'th', -1);
  }
  state.push('tr_close', 'tr', -1);
  state.push('thead_close', 'thead', -1);
  let tbodyLines;
  let autocompletedCells = 0;
  for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {
    if (state.sCount[nextLine] < state.blkIndent) {
      break;
    }
    let terminate = false;
    for (let i = 0, l = terminatorRules.length; i < l; i++) {
      if (terminatorRules[i](state, nextLine, endLine, true)) {
        terminate = true;
        break;
      }
    }
    if (terminate) {
      break;
    }
    lineText = getLine(state, nextLine).trim();
    if (!lineText) {
      break;
    }
    if (state.sCount[nextLine] - state.blkIndent >= 4) {
      break;
    }
    columns = escapedSplit(lineText);
    if (columns.length && columns[0] === '') columns.shift();
    if (columns.length && columns[columns.length - 1] === '') columns.pop();

    // note: autocomplete count can be negative if user specifies more columns than header,
    // but that does not affect intended use (which is limiting expansion)
    autocompletedCells += columnCount - columns.length;
    if (autocompletedCells > MAX_AUTOCOMPLETED_CELLS) {
      break;
    }
    if (nextLine === startLine + 2) {
      const token_tbo = state.push('tbody_open', 'tbody', 1);
      token_tbo.map = tbodyLines = [startLine + 2, 0];
    }
    const token_tro = state.push('tr_open', 'tr', 1);
    token_tro.map = [nextLine, nextLine + 1];
    for (let i = 0; i < columnCount; i++) {
      const token_tdo = state.push('td_open', 'td', 1);
      if (aligns[i]) {
        token_tdo.attrs = [['style', 'text-align:' + aligns[i]]];
      }
      const token_il = state.push('inline', '', 0);
      token_il.content = columns[i] ? columns[i].trim() : '';
      token_il.children = [];
      state.push('td_close', 'td', -1);
    }
    state.push('tr_close', 'tr', -1);
  }
  if (tbodyLines) {
    state.push('tbody_close', 'tbody', -1);
    tbodyLines[1] = nextLine;
  }
  state.push('table_close', 'table', -1);
  tableLines[1] = nextLine;
  state.parentType = oldParentType;
  state.line = nextLine;
  return true;
}

// Code block (4 spaces padded)

function code(state, startLine, endLine /*, silent */) {
  if (state.sCount[startLine] - state.blkIndent < 4) {
    return false;
  }
  let nextLine = startLine + 1;
  let last = nextLine;
  while (nextLine < endLine) {
    if (state.isEmpty(nextLine)) {
      nextLine++;
      continue;
    }
    if (state.sCount[nextLine] - state.blkIndent >= 4) {
      nextLine++;
      last = nextLine;
      continue;
    }
    break;
  }
  state.line = last;
  const token = state.push('code_block', 'code', 0);
  token.content = state.getLines(startLine, last, 4 + state.blkIndent, false) + '\n';
  token.map = [startLine, state.line];
  return true;
}

// fences (``` lang, ~~~ lang)

function fence(state, startLine, endLine, silent) {
  let pos = state.bMarks[startLine] + state.tShift[startLine];
  let max = state.eMarks[startLine];

  // if it's indented more than 3 spaces, it should be a code block
  if (state.sCount[startLine] - state.blkIndent >= 4) {
    return false;
  }
  if (pos + 3 > max) {
    return false;
  }
  const marker = state.src.charCodeAt(pos);
  if (marker !== 0x7E /* ~ */ && marker !== 0x60 /* ` */) {
    return false;
  }

  // scan marker length
  let mem = pos;
  pos = state.skipChars(pos, marker);
  let len = pos - mem;
  if (len < 3) {
    return false;
  }
  const markup = state.src.slice(mem, pos);
  const params = state.src.slice(pos, max);
  if (marker === 0x60 /* ` */) {
    if (params.indexOf(String.fromCharCode(marker)) >= 0) {
      return false;
    }
  }

  // Since start is found, we can report success here in validation mode
  if (silent) {
    return true;
  }

  // search end of block
  let nextLine = startLine;
  let haveEndMarker = false;
  for (;;) {
    nextLine++;
    if (nextLine >= endLine) {
      // unclosed block should be autoclosed by end of document.
      // also block seems to be autoclosed by end of parent
      break;
    }
    pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];
    max = state.eMarks[nextLine];
    if (pos < max && state.sCount[nextLine] < state.blkIndent) {
      // non-empty line with negative indent should stop the list:
      // - ```
      //  test
      break;
    }
    if (state.src.charCodeAt(pos) !== marker) {
      continue;
    }
    if (state.sCount[nextLine] - state.blkIndent >= 4) {
      // closing fence should be indented less than 4 spaces
      continue;
    }
    pos = state.skipChars(pos, marker);

    // closing code fence must be at least as long as the opening one
    if (pos - mem < len) {
      continue;
    }

    // make sure tail has spaces only
    pos = state.skipSpaces(pos);
    if (pos < max) {
      continue;
    }
    haveEndMarker = true;
    // found!
    break;
  }

  // If a fence has heading spaces, they should be removed from its inner block
  len = state.sCount[startLine];
  state.line = nextLine + (haveEndMarker ? 1 : 0);
  const token = state.push('fence', 'code', 0);
  token.info = params;
  token.content = state.getLines(startLine + 1, nextLine, len, true);
  token.markup = markup;
  token.map = [startLine, state.line];
  return true;
}

// Block quotes

function blockquote(state, startLine, endLine, silent) {
  let pos = state.bMarks[startLine] + state.tShift[startLine];
  let max = state.eMarks[startLine];
  const oldLineMax = state.lineMax;

  // if it's indented more than 3 spaces, it should be a code block
  if (state.sCount[startLine] - state.blkIndent >= 4) {
    return false;
  }

  // check the block quote marker
  if (state.src.charCodeAt(pos) !== 0x3E /* > */) {
    return false;
  }

  // we know that it's going to be a valid blockquote,
  // so no point trying to find the end of it in silent mode
  if (silent) {
    return true;
  }
  const oldBMarks = [];
  const oldBSCount = [];
  const oldSCount = [];
  const oldTShift = [];
  const terminatorRules = state.md.block.ruler.getRules('blockquote');
  const oldParentType = state.parentType;
  state.parentType = 'blockquote';
  let lastLineEmpty = false;
  let nextLine;

  // Search the end of the block
  //
  // Block ends with either:
  //  1. an empty line outside:
  //     ```
  //     > test
  //
  //     ```
  //  2. an empty line inside:
  //     ```
  //     >
  //     test
  //     ```
  //  3. another tag:
  //     ```
  //     > test
  //      - - -
  //     ```
  for (nextLine = startLine; nextLine < endLine; nextLine++) {
    // check if it's outdented, i.e. it's inside list item and indented
    // less than said list item:
    //
    // ```
    // 1. anything
    //    > current blockquote
    // 2. checking this line
    // ```
    const isOutdented = state.sCount[nextLine] < state.blkIndent;
    pos = state.bMarks[nextLine] + state.tShift[nextLine];
    max = state.eMarks[nextLine];
    if (pos >= max) {
      // Case 1: line is not inside the blockquote, and this line is empty.
      break;
    }
    if (state.src.charCodeAt(pos++) === 0x3E /* > */ && !isOutdented) {
      // This line is inside the blockquote.

      // set offset past spaces and ">"
      let initial = state.sCount[nextLine] + 1;
      let spaceAfterMarker;
      let adjustTab;

      // skip one optional space after '>'
      if (state.src.charCodeAt(pos) === 0x20 /* space */) {
        // ' >   test '
        //     ^ -- position start of line here:
        pos++;
        initial++;
        adjustTab = false;
        spaceAfterMarker = true;
      } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {
        spaceAfterMarker = true;
        if ((state.bsCount[nextLine] + initial) % 4 === 3) {
          // '  >\t  test '
          //       ^ -- position start of line here (tab has width===1)
          pos++;
          initial++;
          adjustTab = false;
        } else {
          // ' >\t  test '
          //    ^ -- position start of line here + shift bsCount slightly
          //         to make extra space appear
          adjustTab = true;
        }
      } else {
        spaceAfterMarker = false;
      }
      let offset = initial;
      oldBMarks.push(state.bMarks[nextLine]);
      state.bMarks[nextLine] = pos;
      while (pos < max) {
        const ch = state.src.charCodeAt(pos);
        if (isSpace(ch)) {
          if (ch === 0x09) {
            offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;
          } else {
            offset++;
          }
        } else {
          break;
        }
        pos++;
      }
      lastLineEmpty = pos >= max;
      oldBSCount.push(state.bsCount[nextLine]);
      state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);
      oldSCount.push(state.sCount[nextLine]);
      state.sCount[nextLine] = offset - initial;
      oldTShift.push(state.tShift[nextLine]);
      state.tShift[nextLine] = pos - state.bMarks[nextLine];
      continue;
    }

    // Case 2: line is not inside the blockquote, and the last line was empty.
    if (lastLineEmpty) {
      break;
    }

    // Case 3: another tag found.
    let terminate = false;
    for (let i = 0, l = terminatorRules.length; i < l; i++) {
      if (terminatorRules[i](state, nextLine, endLine, true)) {
        terminate = true;
        break;
      }
    }
    if (terminate) {
      // Quirk to enforce "hard termination mode" for paragraphs;
      // normally if you call `tokenize(state, startLine, nextLine)`,
      // paragraphs will look below nextLine for paragraph continuation,
      // but if blockquote is terminated by another tag, they shouldn't
      state.lineMax = nextLine;
      if (state.blkIndent !== 0) {
        // state.blkIndent was non-zero, we now set it to zero,
        // so we need to re-calculate all offsets to appear as
        // if indent wasn't changed
        oldBMarks.push(state.bMarks[nextLine]);
        oldBSCount.push(state.bsCount[nextLine]);
        oldTShift.push(state.tShift[nextLine]);
        oldSCount.push(state.sCount[nextLine]);
        state.sCount[nextLine] -= state.blkIndent;
      }
      break;
    }
    oldBMarks.push(state.bMarks[nextLine]);
    oldBSCount.push(state.bsCount[nextLine]);
    oldTShift.push(state.tShift[nextLine]);
    oldSCount.push(state.sCount[nextLine]);

    // A negative indentation means that this is a paragraph continuation
    //
    state.sCount[nextLine] = -1;
  }
  const oldIndent = state.blkIndent;
  state.blkIndent = 0;
  const token_o = state.push('blockquote_open', 'blockquote', 1);
  token_o.markup = '>';
  const lines = [startLine, 0];
  token_o.map = lines;
  state.md.block.tokenize(state, startLine, nextLine);
  const token_c = state.push('blockquote_close', 'blockquote', -1);
  token_c.markup = '>';
  state.lineMax = oldLineMax;
  state.parentType = oldParentType;
  lines[1] = state.line;

  // Restore original tShift; this might not be necessary since the parser
  // has already been here, but just to make sure we can do that.
  for (let i = 0; i < oldTShift.length; i++) {
    state.bMarks[i + startLine] = oldBMarks[i];
    state.tShift[i + startLine] = oldTShift[i];
    state.sCount[i + startLine] = oldSCount[i];
    state.bsCount[i + startLine] = oldBSCount[i];
  }
  state.blkIndent = oldIndent;
  return true;
}

// Horizontal rule

function hr(state, startLine, endLine, silent) {
  const max = state.eMarks[startLine];
  // if it's indented more than 3 spaces, it should be a code block
  if (state.sCount[startLine] - state.blkIndent >= 4) {
    return false;
  }
  let pos = state.bMarks[startLine] + state.tShift[startLine];
  const marker = state.src.charCodeAt(pos++);

  // Check hr marker
  if (marker !== 0x2A /* * */ && marker !== 0x2D /* - */ && marker !== 0x5F /* _ */) {
    return false;
  }

  // markers can be mixed with spaces, but there should be at least 3 of them

  let cnt = 1;
  while (pos < max) {
    const ch = state.src.charCodeAt(pos++);
    if (ch !== marker && !isSpace(ch)) {
      return false;
    }
    if (ch === marker) {
      cnt++;
    }
  }
  if (cnt < 3) {
    return false;
  }
  if (silent) {
    return true;
  }
  state.line = startLine + 1;
  const token = state.push('hr', 'hr', 0);
  token.map = [startLine, state.line];
  token.markup = Array(cnt + 1).join(String.fromCharCode(marker));
  return true;
}

// Lists

// Search `[-+*][\n ]`, returns next pos after marker on success
// or -1 on fail.
function skipBulletListMarker(state, startLine) {
  const max = state.eMarks[startLine];
  let pos = state.bMarks[startLine] + state.tShift[startLine];
  const marker = state.src.charCodeAt(pos++);
  // Check bullet
  if (marker !== 0x2A /* * */ && marker !== 0x2D /* - */ && marker !== 0x2B /* + */) {
    return -1;
  }
  if (pos < max) {
    const ch = state.src.charCodeAt(pos);
    if (!isSpace(ch)) {
      // " -test " - is not a list item
      return -1;
    }
  }
  return pos;
}

// Search `\d+[.)][\n ]`, returns next pos after marker on success
// or -1 on fail.
function skipOrderedListMarker(state, startLine) {
  const start = state.bMarks[startLine] + state.tShift[startLine];
  const max = state.eMarks[startLine];
  let pos = start;

  // List marker should have at least 2 chars (digit + dot)
  if (pos + 1 >= max) {
    return -1;
  }
  let ch = state.src.charCodeAt(pos++);
  if (ch < 0x30 /* 0 */ || ch > 0x39 /* 9 */) {
    return -1;
  }
  for (;;) {
    // EOL -> fail
    if (pos >= max) {
      return -1;
    }
    ch = state.src.charCodeAt(pos++);
    if (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) {
      // List marker should have no more than 9 digits
      // (prevents integer overflow in browsers)
      if (pos - start >= 10) {
        return -1;
      }
      continue;
    }

    // found valid marker
    if (ch === 0x29 /* ) */ || ch === 0x2e /* . */) {
      break;
    }
    return -1;
  }
  if (pos < max) {
    ch = state.src.charCodeAt(pos);
    if (!isSpace(ch)) {
      // " 1.test " - is not a list item
      return -1;
    }
  }
  return pos;
}
function markTightParagraphs(state, idx) {
  const level = state.level + 2;
  for (let i = idx + 2, l = state.tokens.length - 2; i < l; i++) {
    if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {
      state.tokens[i + 2].hidden = true;
      state.tokens[i].hidden = true;
      i += 2;
    }
  }
}
function list(state, startLine, endLine, silent) {
  let max, pos, start, token;
  let nextLine = startLine;
  let tight = true;

  // if it's indented more than 3 spaces, it should be a code block
  if (state.sCount[nextLine] - state.blkIndent >= 4) {
    return false;
  }

  // Special case:
  //  - item 1
  //   - item 2
  //    - item 3
  //     - item 4
  //      - this one is a paragraph continuation
  if (state.listIndent >= 0 && state.sCount[nextLine] - state.listIndent >= 4 && state.sCount[nextLine] < state.blkIndent) {
    return false;
  }
  let isTerminatingParagraph = false;

  // limit conditions when list can interrupt
  // a paragraph (validation mode only)
  if (silent && state.parentType === 'paragraph') {
    // Next list item should still terminate previous list item;
    //
    // This code can fail if plugins use blkIndent as well as lists,
    // but I hope the spec gets fixed long before that happens.
    //
    if (state.sCount[nextLine] >= state.blkIndent) {
      isTerminatingParagraph = true;
    }
  }

  // Detect list type and position after marker
  let isOrdered;
  let markerValue;
  let posAfterMarker;
  if ((posAfterMarker = skipOrderedListMarker(state, nextLine)) >= 0) {
    isOrdered = true;
    start = state.bMarks[nextLine] + state.tShift[nextLine];
    markerValue = Number(state.src.slice(start, posAfterMarker - 1));

    // If we're starting a new ordered list right after
    // a paragraph, it should start with 1.
    if (isTerminatingParagraph && markerValue !== 1) return false;
  } else if ((posAfterMarker = skipBulletListMarker(state, nextLine)) >= 0) {
    isOrdered = false;
  } else {
    return false;
  }

  // If we're starting a new unordered list right after
  // a paragraph, first line should not be empty.
  if (isTerminatingParagraph) {
    if (state.skipSpaces(posAfterMarker) >= state.eMarks[nextLine]) return false;
  }

  // For validation mode we can terminate immediately
  if (silent) {
    return true;
  }

  // We should terminate list on style change. Remember first one to compare.
  const markerCharCode = state.src.charCodeAt(posAfterMarker - 1);

  // Start list
  const listTokIdx = state.tokens.length;
  if (isOrdered) {
    token = state.push('ordered_list_open', 'ol', 1);
    if (markerValue !== 1) {
      token.attrs = [['start', markerValue]];
    }
  } else {
    token = state.push('bullet_list_open', 'ul', 1);
  }
  const listLines = [nextLine, 0];
  token.map = listLines;
  token.markup = String.fromCharCode(markerCharCode);

  //
  // Iterate list items
  //

  let prevEmptyEnd = false;
  const terminatorRules = state.md.block.ruler.getRules('list');
  const oldParentType = state.parentType;
  state.parentType = 'list';
  while (nextLine < endLine) {
    pos = posAfterMarker;
    max = state.eMarks[nextLine];
    const initial = state.sCount[nextLine] + posAfterMarker - (state.bMarks[nextLine] + state.tShift[nextLine]);
    let offset = initial;
    while (pos < max) {
      const ch = state.src.charCodeAt(pos);
      if (ch === 0x09) {
        offset += 4 - (offset + state.bsCount[nextLine]) % 4;
      } else if (ch === 0x20) {
        offset++;
      } else {
        break;
      }
      pos++;
    }
    const contentStart = pos;
    let indentAfterMarker;
    if (contentStart >= max) {
      // trimming space in "-    \n  3" case, indent is 1 here
      indentAfterMarker = 1;
    } else {
      indentAfterMarker = offset - initial;
    }

    // If we have more than 4 spaces, the indent is 1
    // (the rest is just indented code block)
    if (indentAfterMarker > 4) {
      indentAfterMarker = 1;
    }

    // "  -  test"
    //  ^^^^^ - calculating total length of this thing
    const indent = initial + indentAfterMarker;

    // Run subparser & write tokens
    token = state.push('list_item_open', 'li', 1);
    token.markup = String.fromCharCode(markerCharCode);
    const itemLines = [nextLine, 0];
    token.map = itemLines;
    if (isOrdered) {
      token.info = state.src.slice(start, posAfterMarker - 1);
    }

    // change current state, then restore it after parser subcall
    const oldTight = state.tight;
    const oldTShift = state.tShift[nextLine];
    const oldSCount = state.sCount[nextLine];

    //  - example list
    // ^ listIndent position will be here
    //   ^ blkIndent position will be here
    //
    const oldListIndent = state.listIndent;
    state.listIndent = state.blkIndent;
    state.blkIndent = indent;
    state.tight = true;
    state.tShift[nextLine] = contentStart - state.bMarks[nextLine];
    state.sCount[nextLine] = offset;
    if (contentStart >= max && state.isEmpty(nextLine + 1)) {
      // workaround for this case
      // (list item is empty, list terminates before "foo"):
      // ~~~~~~~~
      //   -
      //
      //     foo
      // ~~~~~~~~
      state.line = Math.min(state.line + 2, endLine);
    } else {
      state.md.block.tokenize(state, nextLine, endLine, true);
    }

    // If any of list item is tight, mark list as tight
    if (!state.tight || prevEmptyEnd) {
      tight = false;
    }
    // Item become loose if finish with empty line,
    // but we should filter last element, because it means list finish
    prevEmptyEnd = state.line - nextLine > 1 && state.isEmpty(state.line - 1);
    state.blkIndent = state.listIndent;
    state.listIndent = oldListIndent;
    state.tShift[nextLine] = oldTShift;
    state.sCount[nextLine] = oldSCount;
    state.tight = oldTight;
    token = state.push('list_item_close', 'li', -1);
    token.markup = String.fromCharCode(markerCharCode);
    nextLine = state.line;
    itemLines[1] = nextLine;
    if (nextLine >= endLine) {
      break;
    }

    //
    // Try to check if list is terminated or continued.
    //
    if (state.sCount[nextLine] < state.blkIndent) {
      break;
    }

    // if it's indented more than 3 spaces, it should be a code block
    if (state.sCount[nextLine] - state.blkIndent >= 4) {
      break;
    }

    // fail if terminating block found
    let terminate = false;
    for (let i = 0, l = terminatorRules.length; i < l; i++) {
      if (terminatorRules[i](state, nextLine, endLine, true)) {
        terminate = true;
        break;
      }
    }
    if (terminate) {
      break;
    }

    // fail if list has another type
    if (isOrdered) {
      posAfterMarker = skipOrderedListMarker(state, nextLine);
      if (posAfterMarker < 0) {
        break;
      }
      start = state.bMarks[nextLine] + state.tShift[nextLine];
    } else {
      posAfterMarker = skipBulletListMarker(state, nextLine);
      if (posAfterMarker < 0) {
        break;
      }
    }
    if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) {
      break;
    }
  }

  // Finalize list
  if (isOrdered) {
    token = state.push('ordered_list_close', 'ol', -1);
  } else {
    token = state.push('bullet_list_close', 'ul', -1);
  }
  token.markup = String.fromCharCode(markerCharCode);
  listLines[1] = nextLine;
  state.line = nextLine;
  state.parentType = oldParentType;

  // mark paragraphs tight if needed
  if (tight) {
    markTightParagraphs(state, listTokIdx);
  }
  return true;
}
function reference(state, startLine, _endLine, silent) {
  let pos = state.bMarks[startLine] + state.tShift[startLine];
  let max = state.eMarks[startLine];
  let nextLine = startLine + 1;

  // if it's indented more than 3 spaces, it should be a code block
  if (state.sCount[startLine] - state.blkIndent >= 4) {
    return false;
  }
  if (state.src.charCodeAt(pos) !== 0x5B /* [ */) {
    return false;
  }
  function getNextLine(nextLine) {
    const endLine = state.lineMax;
    if (nextLine >= endLine || state.isEmpty(nextLine)) {
      // empty line or end of input
      return null;
    }
    let isContinuation = false;

    // this would be a code block normally, but after paragraph
    // it's considered a lazy continuation regardless of what's there
    if (state.sCount[nextLine] - state.blkIndent > 3) {
      isContinuation = true;
    }

    // quirk for blockquotes, this line should already be checked by that rule
    if (state.sCount[nextLine] < 0) {
      isContinuation = true;
    }
    if (!isContinuation) {
      const terminatorRules = state.md.block.ruler.getRules('reference');
      const oldParentType = state.parentType;
      state.parentType = 'reference';

      // Some tags can terminate paragraph without empty line.
      let terminate = false;
      for (let i = 0, l = terminatorRules.length; i < l; i++) {
        if (terminatorRules[i](state, nextLine, endLine, true)) {
          terminate = true;
          break;
        }
      }
      state.parentType = oldParentType;
      if (terminate) {
        // terminated by another block
        return null;
      }
    }
    const pos = state.bMarks[nextLine] + state.tShift[nextLine];
    const max = state.eMarks[nextLine];

    // max + 1 explicitly includes the newline
    return state.src.slice(pos, max + 1);
  }
  let str = state.src.slice(pos, max + 1);
  max = str.length;
  let labelEnd = -1;
  for (pos = 1; pos < max; pos++) {
    const ch = str.charCodeAt(pos);
    if (ch === 0x5B /* [ */) {
      return false;
    } else if (ch === 0x5D /* ] */) {
      labelEnd = pos;
      break;
    } else if (ch === 0x0A /* \n */) {
      const lineContent = getNextLine(nextLine);
      if (lineContent !== null) {
        str += lineContent;
        max = str.length;
        nextLine++;
      }
    } else if (ch === 0x5C /* \ */) {
      pos++;
      if (pos < max && str.charCodeAt(pos) === 0x0A) {
        const lineContent = getNextLine(nextLine);
        if (lineContent !== null) {
          str += lineContent;
          max = str.length;
          nextLine++;
        }
      }
    }
  }
  if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A /* : */) {
    return false;
  }

  // [label]:   destination   'title'
  //         ^^^ skip optional whitespace here
  for (pos = labelEnd + 2; pos < max; pos++) {
    const ch = str.charCodeAt(pos);
    if (ch === 0x0A) {
      const lineContent = getNextLine(nextLine);
      if (lineContent !== null) {
        str += lineContent;
        max = str.length;
        nextLine++;
      }
    } else if (isSpace(ch)) ;else {
      break;
    }
  }

  // [label]:   destination   'title'
  //            ^^^^^^^^^^^ parse this
  const destRes = state.md.helpers.parseLinkDestination(str, pos, max);
  if (!destRes.ok) {
    return false;
  }
  const href = state.md.normalizeLink(destRes.str);
  if (!state.md.validateLink(href)) {
    return false;
  }
  pos = destRes.pos;

  // save cursor state, we could require to rollback later
  const destEndPos = pos;
  const destEndLineNo = nextLine;

  // [label]:   destination   'title'
  //                       ^^^ skipping those spaces
  const start = pos;
  for (; pos < max; pos++) {
    const ch = str.charCodeAt(pos);
    if (ch === 0x0A) {
      const lineContent = getNextLine(nextLine);
      if (lineContent !== null) {
        str += lineContent;
        max = str.length;
        nextLine++;
      }
    } else if (isSpace(ch)) ;else {
      break;
    }
  }

  // [label]:   destination   'title'
  //                          ^^^^^^^ parse this
  let titleRes = state.md.helpers.parseLinkTitle(str, pos, max);
  while (titleRes.can_continue) {
    const lineContent = getNextLine(nextLine);
    if (lineContent === null) break;
    str += lineContent;
    pos = max;
    max = str.length;
    nextLine++;
    titleRes = state.md.helpers.parseLinkTitle(str, pos, max, titleRes);
  }
  let title;
  if (pos < max && start !== pos && titleRes.ok) {
    title = titleRes.str;
    pos = titleRes.pos;
  } else {
    title = '';
    pos = destEndPos;
    nextLine = destEndLineNo;
  }

  // skip trailing spaces until the rest of the line
  while (pos < max) {
    const ch = str.charCodeAt(pos);
    if (!isSpace(ch)) {
      break;
    }
    pos++;
  }
  if (pos < max && str.charCodeAt(pos) !== 0x0A) {
    if (title) {
      // garbage at the end of the line after title,
      // but it could still be a valid reference if we roll back
      title = '';
      pos = destEndPos;
      nextLine = destEndLineNo;
      while (pos < max) {
        const ch = str.charCodeAt(pos);
        if (!isSpace(ch)) {
          break;
        }
        pos++;
      }
    }
  }
  if (pos < max && str.charCodeAt(pos) !== 0x0A) {
    // garbage at the end of the line
    return false;
  }
  const label = normalizeReference(str.slice(1, labelEnd));
  if (!label) {
    // CommonMark 0.20 disallows empty labels
    return false;
  }

  // Reference can not terminate anything. This check is for safety only.
  /* istanbul ignore if */
  if (silent) {
    return true;
  }
  if (typeof state.env.references === 'undefined') {
    state.env.references = {};
  }
  if (typeof state.env.references[label] === 'undefined') {
    state.env.references[label] = {
      title,
      href
    };
  }
  state.line = nextLine;
  return true;
}

// List of valid html blocks names, according to commonmark spec
// https://spec.commonmark.org/0.30/#html-blocks

var block_names = ['address', 'article', 'aside', 'base', 'basefont', 'blockquote', 'body', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dialog', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hr', 'html', 'iframe', 'legend', 'li', 'link', 'main', 'menu', 'menuitem', 'nav', 'noframes', 'ol', 'optgroup', 'option', 'p', 'param', 'search', 'section', 'summary', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul'];

// Regexps to match html elements

const attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*';
const unquoted = '[^"\'=<>`\\x00-\\x20]+';
const single_quoted = "'[^']*'";
const double_quoted = '"[^"]*"';
const attr_value = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')';
const attribute = '(?:\\s+' + attr_name + '(?:\\s*=\\s*' + attr_value + ')?)';
const open_tag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>';
const close_tag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>';
const comment = '<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->';
const processing = '<[?][\\s\\S]*?[?]>';
const declaration = '<![A-Za-z][^>]*>';
const cdata = '<!\\[CDATA\\[[\\s\\S]*?\\]\\]>';
const HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment + '|' + processing + '|' + declaration + '|' + cdata + ')');
const HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')');

// HTML block

// An array of opening and corresponding closing sequences for html tags,
// last argument defines whether it can terminate a paragraph or not
//
const HTML_SEQUENCES = [[/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, true], [/^<!--/, /-->/, true], [/^<\?/, /\?>/, true], [/^<![A-Z]/, />/, true], [/^<!\[CDATA\[/, /\]\]>/, true], [new RegExp('^</?(' + block_names.join('|') + ')(?=(\\s|/?>|$))', 'i'), /^$/, true], [new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\s*$'), /^$/, false]];
function html_block(state, startLine, endLine, silent) {
  let pos = state.bMarks[startLine] + state.tShift[startLine];
  let max = state.eMarks[startLine];

  // if it's indented more than 3 spaces, it should be a code block
  if (state.sCount[startLine] - state.blkIndent >= 4) {
    return false;
  }
  if (!state.md.options.html) {
    return false;
  }
  if (state.src.charCodeAt(pos) !== 0x3C /* < */) {
    return false;
  }
  let lineText = state.src.slice(pos, max);
  let i = 0;
  for (; i < HTML_SEQUENCES.length; i++) {
    if (HTML_SEQUENCES[i][0].test(lineText)) {
      break;
    }
  }
  if (i === HTML_SEQUENCES.length) {
    return false;
  }
  if (silent) {
    // true if this sequence can be a terminator, false otherwise
    return HTML_SEQUENCES[i][2];
  }
  let nextLine = startLine + 1;

  // If we are here - we detected HTML block.
  // Let's roll down till block end.
  if (!HTML_SEQUENCES[i][1].test(lineText)) {
    for (; nextLine < endLine; nextLine++) {
      if (state.sCount[nextLine] < state.blkIndent) {
        break;
      }
      pos = state.bMarks[nextLine] + state.tShift[nextLine];
      max = state.eMarks[nextLine];
      lineText = state.src.slice(pos, max);
      if (HTML_SEQUENCES[i][1].test(lineText)) {
        if (lineText.length !== 0) {
          nextLine++;
        }
        break;
      }
    }
  }
  state.line = nextLine;
  const token = state.push('html_block', '', 0);
  token.map = [startLine, nextLine];
  token.content = state.getLines(startLine, nextLine, state.blkIndent, true);
  return true;
}

// heading (#, ##, ...)

function heading(state, startLine, endLine, silent) {
  let pos = state.bMarks[startLine] + state.tShift[startLine];
  let max = state.eMarks[startLine];

  // if it's indented more than 3 spaces, it should be a code block
  if (state.sCount[startLine] - state.blkIndent >= 4) {
    return false;
  }
  let ch = state.src.charCodeAt(pos);
  if (ch !== 0x23 /* # */ || pos >= max) {
    return false;
  }

  // count heading level
  let level = 1;
  ch = state.src.charCodeAt(++pos);
  while (ch === 0x23 /* # */ && pos < max && level <= 6) {
    level++;
    ch = state.src.charCodeAt(++pos);
  }
  if (level > 6 || pos < max && !isSpace(ch)) {
    return false;
  }
  if (silent) {
    return true;
  }

  // Let's cut tails like '    ###  ' from the end of string

  max = state.skipSpacesBack(max, pos);
  const tmp = state.skipCharsBack(max, 0x23, pos); // #
  if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {
    max = tmp;
  }
  state.line = startLine + 1;
  const token_o = state.push('heading_open', 'h' + String(level), 1);
  token_o.markup = '########'.slice(0, level);
  token_o.map = [startLine, state.line];
  const token_i = state.push('inline', '', 0);
  token_i.content = state.src.slice(pos, max).trim();
  token_i.map = [startLine, state.line];
  token_i.children = [];
  const token_c = state.push('heading_close', 'h' + String(level), -1);
  token_c.markup = '########'.slice(0, level);
  return true;
}

// lheading (---, ===)

function lheading(state, startLine, endLine /*, silent */) {
  const terminatorRules = state.md.block.ruler.getRules('paragraph');

  // if it's indented more than 3 spaces, it should be a code block
  if (state.sCount[startLine] - state.blkIndent >= 4) {
    return false;
  }
  const oldParentType = state.parentType;
  state.parentType = 'paragraph'; // use paragraph to match terminatorRules

  // jump line-by-line until empty one or EOF
  let level = 0;
  let marker;
  let nextLine = startLine + 1;
  for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
    // this would be a code block normally, but after paragraph
    // it's considered a lazy continuation regardless of what's there
    if (state.sCount[nextLine] - state.blkIndent > 3) {
      continue;
    }

    //
    // Check for underline in setext header
    //
    if (state.sCount[nextLine] >= state.blkIndent) {
      let pos = state.bMarks[nextLine] + state.tShift[nextLine];
      const max = state.eMarks[nextLine];
      if (pos < max) {
        marker = state.src.charCodeAt(pos);
        if (marker === 0x2D /* - */ || marker === 0x3D /* = */) {
          pos = state.skipChars(pos, marker);
          pos = state.skipSpaces(pos);
          if (pos >= max) {
            level = marker === 0x3D /* = */ ? 1 : 2;
            break;
          }
        }
      }
    }

    // quirk for blockquotes, this line should already be checked by that rule
    if (state.sCount[nextLine] < 0) {
      continue;
    }

    // Some tags can terminate paragraph without empty line.
    let terminate = false;
    for (let i = 0, l = terminatorRules.length; i < l; i++) {
      if (terminatorRules[i](state, nextLine, endLine, true)) {
        terminate = true;
        break;
      }
    }
    if (terminate) {
      break;
    }
  }
  if (!level) {
    // Didn't find valid underline
    return false;
  }
  const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
  state.line = nextLine + 1;
  const token_o = state.push('heading_open', 'h' + String(level), 1);
  token_o.markup = String.fromCharCode(marker);
  token_o.map = [startLine, state.line];
  const token_i = state.push('inline', '', 0);
  token_i.content = content;
  token_i.map = [startLine, state.line - 1];
  token_i.children = [];
  const token_c = state.push('heading_close', 'h' + String(level), -1);
  token_c.markup = String.fromCharCode(marker);
  state.parentType = oldParentType;
  return true;
}

// Paragraph

function paragraph(state, startLine, endLine) {
  const terminatorRules = state.md.block.ruler.getRules('paragraph');
  const oldParentType = state.parentType;
  let nextLine = startLine + 1;
  state.parentType = 'paragraph';

  // jump line-by-line until empty one or EOF
  for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {
    // this would be a code block normally, but after paragraph
    // it's considered a lazy continuation regardless of what's there
    if (state.sCount[nextLine] - state.blkIndent > 3) {
      continue;
    }

    // quirk for blockquotes, this line should already be checked by that rule
    if (state.sCount[nextLine] < 0) {
      continue;
    }

    // Some tags can terminate paragraph without empty line.
    let terminate = false;
    for (let i = 0, l = terminatorRules.length; i < l; i++) {
      if (terminatorRules[i](state, nextLine, endLine, true)) {
        terminate = true;
        break;
      }
    }
    if (terminate) {
      break;
    }
  }
  const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();
  state.line = nextLine;
  const token_o = state.push('paragraph_open', 'p', 1);
  token_o.map = [startLine, state.line];
  const token_i = state.push('inline', '', 0);
  token_i.content = content;
  token_i.map = [startLine, state.line];
  token_i.children = [];
  state.push('paragraph_close', 'p', -1);
  state.parentType = oldParentType;
  return true;
}

/** internal
 * class ParserBlock
 *
 * Block-level tokenizer.
 **/

const _rules$1 = [
// First 2 params - rule name & source. Secondary array - list of rules,
// which can be terminated by this one.
['table', table, ['paragraph', 'reference']], ['code', code], ['fence', fence, ['paragraph', 'reference', 'blockquote', 'list']], ['blockquote', blockquote, ['paragraph', 'reference', 'blockquote', 'list']], ['hr', hr, ['paragraph', 'reference', 'blockquote', 'list']], ['list', list, ['paragraph', 'reference', 'blockquote']], ['reference', reference], ['html_block', html_block, ['paragraph', 'reference', 'blockquote']], ['heading', heading, ['paragraph', 'reference', 'blockquote']], ['lheading', lheading], ['paragraph', paragraph]];

/**
 * new ParserBlock()
 **/
function ParserBlock() {
  /**
   * ParserBlock#ruler -> Ruler
   *
   * [[Ruler]] instance. Keep configuration of block rules.
   **/
  this.ruler = new Ruler();
  for (let i = 0; i < _rules$1.length; i++) {
    this.ruler.push(_rules$1[i][0], _rules$1[i][1], {
      alt: (_rules$1[i][2] || []).slice()
    });
  }
}

// Generate tokens for input range
//
ParserBlock.prototype.tokenize = function (state, startLine, endLine) {
  const rules = this.ruler.getRules('');
  const len = rules.length;
  const maxNesting = state.md.options.maxNesting;
  let line = startLine;
  let hasEmptyLines = false;
  while (line < endLine) {
    state.line = line = state.skipEmptyLines(line);
    if (line >= endLine) {
      break;
    }

    // Termination condition for nested calls.
    // Nested calls currently used for blockquotes & lists
    if (state.sCount[line] < state.blkIndent) {
      break;
    }

    // If nesting level exceeded - skip tail to the end. That's not ordinary
    // situation and we should not care about content.
    if (state.level >= maxNesting) {
      state.line = endLine;
      break;
    }

    // Try all possible rules.
    // On success, rule should:
    //
    // - update `state.line`
    // - update `state.tokens`
    // - return true
    const prevLine = state.line;
    let ok = false;
    for (let i = 0; i < len; i++) {
      ok = rules[i](state, line, endLine, false);
      if (ok) {
        if (prevLine >= state.line) {
          throw new Error("block rule didn't increment state.line");
        }
        break;
      }
    }

    // this can only happen if user disables paragraph rule
    if (!ok) throw new Error('none of the block rules matched');

    // set state.tight if we had an empty line before current tag
    // i.e. latest empty line should not count
    state.tight = !hasEmptyLines;

    // paragraph might "eat" one newline after it in nested lists
    if (state.isEmpty(state.line - 1)) {
      hasEmptyLines = true;
    }
    line = state.line;
    if (line < endLine && state.isEmpty(line)) {
      hasEmptyLines = true;
      line++;
      state.line = line;
    }
  }
};

/**
 * ParserBlock.parse(str, md, env, outTokens)
 *
 * Process input string and push block tokens into `outTokens`
 **/
ParserBlock.prototype.parse = function (src, md, env, outTokens) {
  if (!src) {
    return;
  }
  const state = new this.State(src, md, env, outTokens);
  this.tokenize(state, state.line, state.lineMax);
};
ParserBlock.prototype.State = StateBlock;

// Inline parser state

function StateInline(src, md, env, outTokens) {
  this.src = src;
  this.env = env;
  this.md = md;
  this.tokens = outTokens;
  this.tokens_meta = Array(outTokens.length);
  this.pos = 0;
  this.posMax = this.src.length;
  this.level = 0;
  this.pending = '';
  this.pendingLevel = 0;

  // Stores { start: end } pairs. Useful for backtrack
  // optimization of pairs parse (emphasis, strikes).
  this.cache = {};

  // List of emphasis-like delimiters for current tag
  this.delimiters = [];

  // Stack of delimiter lists for upper level tags
  this._prev_delimiters = [];

  // backtick length => last seen position
  this.backticks = {};
  this.backticksScanned = false;

  // Counter used to disable inline linkify-it execution
  // inside <a> and markdown links
  this.linkLevel = 0;
}

// Flush pending text
//
StateInline.prototype.pushPending = function () {
  const token = new Token('text', '', 0);
  token.content = this.pending;
  token.level = this.pendingLevel;
  this.tokens.push(token);
  this.pending = '';
  return token;
};

// Push new token to "stream".
// If pending text exists - flush it as text token
//
StateInline.prototype.push = function (type, tag, nesting) {
  if (this.pending) {
    this.pushPending();
  }
  const token = new Token(type, tag, nesting);
  let token_meta = null;
  if (nesting < 0) {
    // closing tag
    this.level--;
    this.delimiters = this._prev_delimiters.pop();
  }
  token.level = this.level;
  if (nesting > 0) {
    // opening tag
    this.level++;
    this._prev_delimiters.push(this.delimiters);
    this.delimiters = [];
    token_meta = {
      delimiters: this.delimiters
    };
  }
  this.pendingLevel = this.level;
  this.tokens.push(token);
  this.tokens_meta.push(token_meta);
  return token;
};

// Scan a sequence of emphasis-like markers, and determine whether
// it can start an emphasis sequence or end an emphasis sequence.
//
//  - start - position to scan from (it should point at a valid marker);
//  - canSplitWord - determine if these markers can be found inside a word
//
StateInline.prototype.scanDelims = function (start, canSplitWord) {
  const max = this.posMax;
  const marker = this.src.charCodeAt(start);

  // treat beginning of the line as a whitespace
  const lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20;
  let pos = start;
  while (pos < max && this.src.charCodeAt(pos) === marker) {
    pos++;
  }
  const count = pos - start;

  // treat end of the line as a whitespace
  const nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20;
  const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar));
  const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar));
  const isLastWhiteSpace = isWhiteSpace(lastChar);
  const isNextWhiteSpace = isWhiteSpace(nextChar);
  const left_flanking = !isNextWhiteSpace && (!isNextPunctChar || isLastWhiteSpace || isLastPunctChar);
  const right_flanking = !isLastWhiteSpace && (!isLastPunctChar || isNextWhiteSpace || isNextPunctChar);
  const can_open = left_flanking && (canSplitWord || !right_flanking || isLastPunctChar);
  const can_close = right_flanking && (canSplitWord || !left_flanking || isNextPunctChar);
  return {
    can_open,
    can_close,
    length: count
  };
};

// re-export Token class to use in block rules
StateInline.prototype.Token = Token;

// Skip text characters for text token, place those to pending buffer
// and increment current pos

// Rule to skip pure text
// '{}$%@~+=:' reserved for extentions

// !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~

// !!!! Don't confuse with "Markdown ASCII Punctuation" chars
// http://spec.commonmark.org/0.15/#ascii-punctuation-character
function isTerminatorChar(ch) {
  switch (ch) {
    case 0x0A /* \n */:
    case 0x21 /* ! */:
    case 0x23 /* # */:
    case 0x24 /* $ */:
    case 0x25 /* % */:
    case 0x26 /* & */:
    case 0x2A /* * */:
    case 0x2B /* + */:
    case 0x2D /* - */:
    case 0x3A /* : */:
    case 0x3C /* < */:
    case 0x3D /* = */:
    case 0x3E /* > */:
    case 0x40 /* @ */:
    case 0x5B /* [ */:
    case 0x5C /* \ */:
    case 0x5D /* ] */:
    case 0x5E /* ^ */:
    case 0x5F /* _ */:
    case 0x60 /* ` */:
    case 0x7B /* { */:
    case 0x7D /* } */:
    case 0x7E /* ~ */:
      return true;
    default:
      return false;
  }
}
function text(state, silent) {
  let pos = state.pos;
  while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {
    pos++;
  }
  if (pos === state.pos) {
    return false;
  }
  if (!silent) {
    state.pending += state.src.slice(state.pos, pos);
  }
  state.pos = pos;
  return true;
}

// Alternative implementation, for memory.
//
// It costs 10% of performance, but allows extend terminators list, if place it
// to `ParserInline` property. Probably, will switch to it sometime, such
// flexibility required.

/*
var TERMINATOR_RE = /[\n!#$%&*+\-:<=>@[\\\]^_`{}~]/;

module.exports = function text(state, silent) {
  var pos = state.pos,
      idx = state.src.slice(pos).search(TERMINATOR_RE);

  // first char is terminator -> empty text
  if (idx === 0) { return false; }

  // no terminator -> text till end of string
  if (idx < 0) {
    if (!silent) { state.pending += state.src.slice(pos); }
    state.pos = state.src.length;
    return true;
  }

  if (!silent) { state.pending += state.src.slice(pos, pos + idx); }

  state.pos += idx;

  return true;
}; */

// Process links like https://example.org/

// RFC3986: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
const SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;
function linkify(state, silent) {
  if (!state.md.options.linkify) return false;
  if (state.linkLevel > 0) return false;
  const pos = state.pos;
  const max = state.posMax;
  if (pos + 3 > max) return false;
  if (state.src.charCodeAt(pos) !== 0x3A /* : */) return false;
  if (state.src.charCodeAt(pos + 1) !== 0x2F /* / */) return false;
  if (state.src.charCodeAt(pos + 2) !== 0x2F /* / */) return false;
  const match = state.pending.match(SCHEME_RE);
  if (!match) return false;
  const proto = match[1];
  const link = state.md.linkify.matchAtStart(state.src.slice(pos - proto.length));
  if (!link) return false;
  let url = link.url;

  // invalid link, but still detected by linkify somehow;
  // need to check to prevent infinite loop below
  if (url.length <= proto.length) return false;

  // disallow '*' at the end of the link (conflicts with emphasis)
  url = url.replace(/\*+$/, '');
  const fullUrl = state.md.normalizeLink(url);
  if (!state.md.validateLink(fullUrl)) return false;
  if (!silent) {
    state.pending = state.pending.slice(0, -proto.length);
    const token_o = state.push('link_open', 'a', 1);
    token_o.attrs = [['href', fullUrl]];
    token_o.markup = 'linkify';
    token_o.info = 'auto';
    const token_t = state.push('text', '', 0);
    token_t.content = state.md.normalizeLinkText(url);
    const token_c = state.push('link_close', 'a', -1);
    token_c.markup = 'linkify';
    token_c.info = 'auto';
  }
  state.pos += url.length - proto.length;
  return true;
}

// Proceess '\n'

function newline(state, silent) {
  let pos = state.pos;
  if (state.src.charCodeAt(pos) !== 0x0A /* \n */) {
    return false;
  }
  const pmax = state.pending.length - 1;
  const max = state.posMax;

  // '  \n' -> hardbreak
  // Lookup in pending chars is bad practice! Don't copy to other rules!
  // Pending string is stored in concat mode, indexed lookups will cause
  // convertion to flat mode.
  if (!silent) {
    if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {
      if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {
        // Find whitespaces tail of pending chars.
        let ws = pmax - 1;
        while (ws >= 1 && state.pending.charCodeAt(ws - 1) === 0x20) ws--;
        state.pending = state.pending.slice(0, ws);
        state.push('hardbreak', 'br', 0);
      } else {
        state.pending = state.pending.slice(0, -1);
        state.push('softbreak', 'br', 0);
      }
    } else {
      state.push('softbreak', 'br', 0);
    }
  }
  pos++;

  // skip heading spaces for next line
  while (pos < max && isSpace(state.src.charCodeAt(pos))) {
    pos++;
  }
  state.pos = pos;
  return true;
}

// Process escaped chars and hardbreaks

const ESCAPED = [];
for (let i = 0; i < 256; i++) {
  ESCAPED.push(0);
}
'\\!"#$%&\'()*+,./:;<=>?@[]^_`{|}~-'.split('').forEach(function (ch) {
  ESCAPED[ch.charCodeAt(0)] = 1;
});
function escape(state, silent) {
  let pos = state.pos;
  const max = state.posMax;
  if (state.src.charCodeAt(pos) !== 0x5C /* \ */) return false;
  pos++;

  // '\' at the end of the inline block
  if (pos >= max) return false;
  let ch1 = state.src.charCodeAt(pos);
  if (ch1 === 0x0A) {
    if (!silent) {
      state.push('hardbreak', 'br', 0);
    }
    pos++;
    // skip leading whitespaces from next line
    while (pos < max) {
      ch1 = state.src.charCodeAt(pos);
      if (!isSpace(ch1)) break;
      pos++;
    }
    state.pos = pos;
    return true;
  }
  let escapedStr = state.src[pos];
  if (ch1 >= 0xD800 && ch1 <= 0xDBFF && pos + 1 < max) {
    const ch2 = state.src.charCodeAt(pos + 1);
    if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {
      escapedStr += state.src[pos + 1];
      pos++;
    }
  }
  const origStr = '\\' + escapedStr;
  if (!silent) {
    const token = state.push('text_special', '', 0);
    if (ch1 < 256 && ESCAPED[ch1] !== 0) {
      token.content = escapedStr;
    } else {
      token.content = origStr;
    }
    token.markup = origStr;
    token.info = 'escape';
  }
  state.pos = pos + 1;
  return true;
}

// Parse backticks

function backtick(state, silent) {
  let pos = state.pos;
  const ch = state.src.charCodeAt(pos);
  if (ch !== 0x60 /* ` */) {
    return false;
  }
  const start = pos;
  pos++;
  const max = state.posMax;

  // scan marker length
  while (pos < max && state.src.charCodeAt(pos) === 0x60 /* ` */) {
    pos++;
  }
  const marker = state.src.slice(start, pos);
  const openerLength = marker.length;
  if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) {
    if (!silent) state.pending += marker;
    state.pos += openerLength;
    return true;
  }
  let matchEnd = pos;
  let matchStart;

  // Nothing found in the cache, scan until the end of the line (or until marker is found)
  while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {
    matchEnd = matchStart + 1;

    // scan marker length
    while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60 /* ` */) {
      matchEnd++;
    }
    const closerLength = matchEnd - matchStart;
    if (closerLength === openerLength) {
      // Found matching closer length.
      if (!silent) {
        const token = state.push('code_inline', 'code', 0);
        token.markup = marker;
        token.content = state.src.slice(pos, matchStart).replace(/\n/g, ' ').replace(/^ (.+) $/, '$1');
      }
      state.pos = matchEnd;
      return true;
    }

    // Some different length found, put it in cache as upper limit of where closer can be found
    state.backticks[closerLength] = matchStart;
  }

  // Scanned through the end, didn't find anything
  state.backticksScanned = true;
  if (!silent) state.pending += marker;
  state.pos += openerLength;
  return true;
}

// ~~strike through~~
//

// Insert each marker as a separate text token, and add it to delimiter list
//
function strikethrough_tokenize(state, silent) {
  const start = state.pos;
  const marker = state.src.charCodeAt(start);
  if (silent) {
    return false;
  }
  if (marker !== 0x7E /* ~ */) {
    return false;
  }
  const scanned = state.scanDelims(state.pos, true);
  let len = scanned.length;
  const ch = String.fromCharCode(marker);
  if (len < 2) {
    return false;
  }
  let token;
  if (len % 2) {
    token = state.push('text', '', 0);
    token.content = ch;
    len--;
  }
  for (let i = 0; i < len; i += 2) {
    token = state.push('text', '', 0);
    token.content = ch + ch;
    state.delimiters.push({
      marker,
      length: 0,
      // disable "rule of 3" length checks meant for emphasis
      token: state.tokens.length - 1,
      end: -1,
      open: scanned.can_open,
      close: scanned.can_close
    });
  }
  state.pos += scanned.length;
  return true;
}
function postProcess$1(state, delimiters) {
  let token;
  const loneMarkers = [];
  const max = delimiters.length;
  for (let i = 0; i < max; i++) {
    const startDelim = delimiters[i];
    if (startDelim.marker !== 0x7E /* ~ */) {
      continue;
    }
    if (startDelim.end === -1) {
      continue;
    }
    const endDelim = delimiters[startDelim.end];
    token = state.tokens[startDelim.token];
    token.type = 's_open';
    token.tag = 's';
    token.nesting = 1;
    token.markup = '~~';
    token.content = '';
    token = state.tokens[endDelim.token];
    token.type = 's_close';
    token.tag = 's';
    token.nesting = -1;
    token.markup = '~~';
    token.content = '';
    if (state.tokens[endDelim.token - 1].type === 'text' && state.tokens[endDelim.token - 1].content === '~') {
      loneMarkers.push(endDelim.token - 1);
    }
  }

  // If a marker sequence has an odd number of characters, it's splitted
  // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the
  // start of the sequence.
  //
  // So, we have to move all those markers after subsequent s_close tags.
  //
  while (loneMarkers.length) {
    const i = loneMarkers.pop();
    let j = i + 1;
    while (j < state.tokens.length && state.tokens[j].type === 's_close') {
      j++;
    }
    j--;
    if (i !== j) {
      token = state.tokens[j];
      state.tokens[j] = state.tokens[i];
      state.tokens[i] = token;
    }
  }
}

// Walk through delimiter list and replace text tokens with tags
//
function strikethrough_postProcess(state) {
  const tokens_meta = state.tokens_meta;
  const max = state.tokens_meta.length;
  postProcess$1(state, state.delimiters);
  for (let curr = 0; curr < max; curr++) {
    if (tokens_meta[curr] && tokens_meta[curr].delimiters) {
      postProcess$1(state, tokens_meta[curr].delimiters);
    }
  }
}
var r_strikethrough = {
  tokenize: strikethrough_tokenize,
  postProcess: strikethrough_postProcess
};

// Process *this* and _that_
//

// Insert each marker as a separate text token, and add it to delimiter list
//
function emphasis_tokenize(state, silent) {
  const start = state.pos;
  const marker = state.src.charCodeAt(start);
  if (silent) {
    return false;
  }
  if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) {
    return false;
  }
  const scanned = state.scanDelims(state.pos, marker === 0x2A);
  for (let i = 0; i < scanned.length; i++) {
    const token = state.push('text', '', 0);
    token.content = String.fromCharCode(marker);
    state.delimiters.push({
      // Char code of the starting marker (number).
      //
      marker,
      // Total length of these series of delimiters.
      //
      length: scanned.length,
      // A position of the token this delimiter corresponds to.
      //
      token: state.tokens.length - 1,
      // If this delimiter is matched as a valid opener, `end` will be
      // equal to its position, otherwise it's `-1`.
      //
      end: -1,
      // Boolean flags that determine if this delimiter could open or close
      // an emphasis.
      //
      open: scanned.can_open,
      close: scanned.can_close
    });
  }
  state.pos += scanned.length;
  return true;
}
function postProcess(state, delimiters) {
  const max = delimiters.length;
  for (let i = max - 1; i >= 0; i--) {
    const startDelim = delimiters[i];
    if (startDelim.marker !== 0x5F /* _ */ && startDelim.marker !== 0x2A /* * */) {
      continue;
    }

    // Process only opening markers
    if (startDelim.end === -1) {
      continue;
    }
    const endDelim = delimiters[startDelim.end];

    // If the previous delimiter has the same marker and is adjacent to this one,
    // merge those into one strong delimiter.
    //
    // `<em><em>whatever</em></em>` -> `<strong>whatever</strong>`
    //
    const isStrong = i > 0 && delimiters[i - 1].end === startDelim.end + 1 &&
    // check that first two markers match and adjacent
    delimiters[i - 1].marker === startDelim.marker && delimiters[i - 1].token === startDelim.token - 1 &&
    // check that last two markers are adjacent (we can safely assume they match)
    delimiters[startDelim.end + 1].token === endDelim.token + 1;
    const ch = String.fromCharCode(startDelim.marker);
    const token_o = state.tokens[startDelim.token];
    token_o.type = isStrong ? 'strong_open' : 'em_open';
    token_o.tag = isStrong ? 'strong' : 'em';
    token_o.nesting = 1;
    token_o.markup = isStrong ? ch + ch : ch;
    token_o.content = '';
    const token_c = state.tokens[endDelim.token];
    token_c.type = isStrong ? 'strong_close' : 'em_close';
    token_c.tag = isStrong ? 'strong' : 'em';
    token_c.nesting = -1;
    token_c.markup = isStrong ? ch + ch : ch;
    token_c.content = '';
    if (isStrong) {
      state.tokens[delimiters[i - 1].token].content = '';
      state.tokens[delimiters[startDelim.end + 1].token].content = '';
      i--;
    }
  }
}

// Walk through delimiter list and replace text tokens with tags
//
function emphasis_post_process(state) {
  const tokens_meta = state.tokens_meta;
  const max = state.tokens_meta.length;
  postProcess(state, state.delimiters);
  for (let curr = 0; curr < max; curr++) {
    if (tokens_meta[curr] && tokens_meta[curr].delimiters) {
      postProcess(state, tokens_meta[curr].delimiters);
    }
  }
}
var r_emphasis = {
  tokenize: emphasis_tokenize,
  postProcess: emphasis_post_process
};

// Process [link](<to> "stuff")

function link(state, silent) {
  let code, label, res, ref;
  let href = '';
  let title = '';
  let start = state.pos;
  let parseReference = true;
  if (state.src.charCodeAt(state.pos) !== 0x5B /* [ */) {
    return false;
  }
  const oldPos = state.pos;
  const max = state.posMax;
  const labelStart = state.pos + 1;
  const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true);

  // parser failed to find ']', so it's not a valid link
  if (labelEnd < 0) {
    return false;
  }
  let pos = labelEnd + 1;
  if (pos < max && state.src.charCodeAt(pos) === 0x28 /* ( */) {
    //
    // Inline link
    //

    // might have found a valid shortcut link, disable reference parsing
    parseReference = false;

    // [link](  <href>  "title"  )
    //        ^^ skipping these spaces
    pos++;
    for (; pos < max; pos++) {
      code = state.src.charCodeAt(pos);
      if (!isSpace(code) && code !== 0x0A) {
        break;
      }
    }
    if (pos >= max) {
      return false;
    }

    // [link](  <href>  "title"  )
    //          ^^^^^^ parsing link destination
    start = pos;
    res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);
    if (res.ok) {
      href = state.md.normalizeLink(res.str);
      if (state.md.validateLink(href)) {
        pos = res.pos;
      } else {
        href = '';
      }

      // [link](  <href>  "title"  )
      //                ^^ skipping these spaces
      start = pos;
      for (; pos < max; pos++) {
        code = state.src.charCodeAt(pos);
        if (!isSpace(code) && code !== 0x0A) {
          break;
        }
      }

      // [link](  <href>  "title"  )
      //                  ^^^^^^^ parsing link title
      res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);
      if (pos < max && start !== pos && res.ok) {
        title = res.str;
        pos = res.pos;

        // [link](  <href>  "title"  )
        //                         ^^ skipping these spaces
        for (; pos < max; pos++) {
          code = state.src.charCodeAt(pos);
          if (!isSpace(code) && code !== 0x0A) {
            break;
          }
        }
      }
    }
    if (pos >= max || state.src.charCodeAt(pos) !== 0x29 /* ) */) {
      // parsing a valid shortcut link failed, fallback to reference
      parseReference = true;
    }
    pos++;
  }
  if (parseReference) {
    //
    // Link reference
    //
    if (typeof state.env.references === 'undefined') {
      return false;
    }
    if (pos < max && state.src.charCodeAt(pos) === 0x5B /* [ */) {
      start = pos + 1;
      pos = state.md.helpers.parseLinkLabel(state, pos);
      if (pos >= 0) {
        label = state.src.slice(start, pos++);
      } else {
        pos = labelEnd + 1;
      }
    } else {
      pos = labelEnd + 1;
    }

    // covers label === '' and label === undefined
    // (collapsed reference link and shortcut reference link respectively)
    if (!label) {
      label = state.src.slice(labelStart, labelEnd);
    }
    ref = state.env.references[normalizeReference(label)];
    if (!ref) {
      state.pos = oldPos;
      return false;
    }
    href = ref.href;
    title = ref.title;
  }

  //
  // We found the end of the link, and know for a fact it's a valid link;
  // so all that's left to do is to call tokenizer.
  //
  if (!silent) {
    state.pos = labelStart;
    state.posMax = labelEnd;
    const token_o = state.push('link_open', 'a', 1);
    const attrs = [['href', href]];
    token_o.attrs = attrs;
    if (title) {
      attrs.push(['title', title]);
    }
    state.linkLevel++;
    state.md.inline.tokenize(state);
    state.linkLevel--;
    state.push('link_close', 'a', -1);
  }
  state.pos = pos;
  state.posMax = max;
  return true;
}

// Process ![image](<src> "title")

function image(state, silent) {
  let code, content, label, pos, ref, res, title, start;
  let href = '';
  const oldPos = state.pos;
  const max = state.posMax;
  if (state.src.charCodeAt(state.pos) !== 0x21 /* ! */) {
    return false;
  }
  if (state.src.charCodeAt(state.pos + 1) !== 0x5B /* [ */) {
    return false;
  }
  const labelStart = state.pos + 2;
  const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false);

  // parser failed to find ']', so it's not a valid link
  if (labelEnd < 0) {
    return false;
  }
  pos = labelEnd + 1;
  if (pos < max && state.src.charCodeAt(pos) === 0x28 /* ( */) {
    //
    // Inline link
    //

    // [link](  <href>  "title"  )
    //        ^^ skipping these spaces
    pos++;
    for (; pos < max; pos++) {
      code = state.src.charCodeAt(pos);
      if (!isSpace(code) && code !== 0x0A) {
        break;
      }
    }
    if (pos >= max) {
      return false;
    }

    // [link](  <href>  "title"  )
    //          ^^^^^^ parsing link destination
    start = pos;
    res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);
    if (res.ok) {
      href = state.md.normalizeLink(res.str);
      if (state.md.validateLink(href)) {
        pos = res.pos;
      } else {
        href = '';
      }
    }

    // [link](  <href>  "title"  )
    //                ^^ skipping these spaces
    start = pos;
    for (; pos < max; pos++) {
      code = state.src.charCodeAt(pos);
      if (!isSpace(code) && code !== 0x0A) {
        break;
      }
    }

    // [link](  <href>  "title"  )
    //                  ^^^^^^^ parsing link title
    res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);
    if (pos < max && start !== pos && res.ok) {
      title = res.str;
      pos = res.pos;

      // [link](  <href>  "title"  )
      //                         ^^ skipping these spaces
      for (; pos < max; pos++) {
        code = state.src.charCodeAt(pos);
        if (!isSpace(code) && code !== 0x0A) {
          break;
        }
      }
    } else {
      title = '';
    }
    if (pos >= max || state.src.charCodeAt(pos) !== 0x29 /* ) */) {
      state.pos = oldPos;
      return false;
    }
    pos++;
  } else {
    //
    // Link reference
    //
    if (typeof state.env.references === 'undefined') {
      return false;
    }
    if (pos < max && state.src.charCodeAt(pos) === 0x5B /* [ */) {
      start = pos + 1;
      pos = state.md.helpers.parseLinkLabel(state, pos);
      if (pos >= 0) {
        label = state.src.slice(start, pos++);
      } else {
        pos = labelEnd + 1;
      }
    } else {
      pos = labelEnd + 1;
    }

    // covers label === '' and label === undefined
    // (collapsed reference link and shortcut reference link respectively)
    if (!label) {
      label = state.src.slice(labelStart, labelEnd);
    }
    ref = state.env.references[normalizeReference(label)];
    if (!ref) {
      state.pos = oldPos;
      return false;
    }
    href = ref.href;
    title = ref.title;
  }

  //
  // We found the end of the link, and know for a fact it's a valid link;
  // so all that's left to do is to call tokenizer.
  //
  if (!silent) {
    content = state.src.slice(labelStart, labelEnd);
    const tokens = [];
    state.md.inline.parse(content, state.md, state.env, tokens);
    const token = state.push('image', 'img', 0);
    const attrs = [['src', href], ['alt', '']];
    token.attrs = attrs;
    token.children = tokens;
    token.content = content;
    if (title) {
      attrs.push(['title', title]);
    }
  }
  state.pos = pos;
  state.posMax = max;
  return true;
}

// Process autolinks '<protocol:...>'

/* eslint max-len:0 */
const EMAIL_RE = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/;
/* eslint-disable-next-line no-control-regex */
const AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;
function autolink(state, silent) {
  let pos = state.pos;
  if (state.src.charCodeAt(pos) !== 0x3C /* < */) {
    return false;
  }
  const start = state.pos;
  const max = state.posMax;
  for (;;) {
    if (++pos >= max) return false;
    const ch = state.src.charCodeAt(pos);
    if (ch === 0x3C /* < */) return false;
    if (ch === 0x3E /* > */) break;
  }
  const url = state.src.slice(start + 1, pos);
  if (AUTOLINK_RE.test(url)) {
    const fullUrl = state.md.normalizeLink(url);
    if (!state.md.validateLink(fullUrl)) {
      return false;
    }
    if (!silent) {
      const token_o = state.push('link_open', 'a', 1);
      token_o.attrs = [['href', fullUrl]];
      token_o.markup = 'autolink';
      token_o.info = 'auto';
      const token_t = state.push('text', '', 0);
      token_t.content = state.md.normalizeLinkText(url);
      const token_c = state.push('link_close', 'a', -1);
      token_c.markup = 'autolink';
      token_c.info = 'auto';
    }
    state.pos += url.length + 2;
    return true;
  }
  if (EMAIL_RE.test(url)) {
    const fullUrl = state.md.normalizeLink('mailto:' + url);
    if (!state.md.validateLink(fullUrl)) {
      return false;
    }
    if (!silent) {
      const token_o = state.push('link_open', 'a', 1);
      token_o.attrs = [['href', fullUrl]];
      token_o.markup = 'autolink';
      token_o.info = 'auto';
      const token_t = state.push('text', '', 0);
      token_t.content = state.md.normalizeLinkText(url);
      const token_c = state.push('link_close', 'a', -1);
      token_c.markup = 'autolink';
      token_c.info = 'auto';
    }
    state.pos += url.length + 2;
    return true;
  }
  return false;
}

// Process html tags

function isLinkOpen(str) {
  return /^<a[>\s]/i.test(str);
}
function isLinkClose(str) {
  return /^<\/a\s*>/i.test(str);
}
function isLetter(ch) {
  /* eslint no-bitwise:0 */
  const lc = ch | 0x20; // to lower case
  return lc >= 0x61 /* a */ && lc <= 0x7a /* z */;
}

function html_inline(state, silent) {
  if (!state.md.options.html) {
    return false;
  }

  // Check start
  const max = state.posMax;
  const pos = state.pos;
  if (state.src.charCodeAt(pos) !== 0x3C /* < */ || pos + 2 >= max) {
    return false;
  }

  // Quick fail on second char
  const ch = state.src.charCodeAt(pos + 1);
  if (ch !== 0x21 /* ! */ && ch !== 0x3F /* ? */ && ch !== 0x2F /* / */ && !isLetter(ch)) {
    return false;
  }
  const match = state.src.slice(pos).match(HTML_TAG_RE);
  if (!match) {
    return false;
  }
  if (!silent) {
    const token = state.push('html_inline', '', 0);
    token.content = match[0];
    if (isLinkOpen(token.content)) state.linkLevel++;
    if (isLinkClose(token.content)) state.linkLevel--;
  }
  state.pos += match[0].length;
  return true;
}

// Process html entity - &#123;, &#xAF;, &quot;, ...

const DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i;
const NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;
function entity(state, silent) {
  const pos = state.pos;
  const max = state.posMax;
  if (state.src.charCodeAt(pos) !== 0x26 /* & */) return false;
  if (pos + 1 >= max) return false;
  const ch = state.src.charCodeAt(pos + 1);
  if (ch === 0x23 /* # */) {
    const match = state.src.slice(pos).match(DIGITAL_RE);
    if (match) {
      if (!silent) {
        const code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);
        const token = state.push('text_special', '', 0);
        token.content = isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);
        token.markup = match[0];
        token.info = 'entity';
      }
      state.pos += match[0].length;
      return true;
    }
  } else {
    const match = state.src.slice(pos).match(NAMED_RE);
    if (match) {
      const decoded = entities.decodeHTML(match[0]);
      if (decoded !== match[0]) {
        if (!silent) {
          const token = state.push('text_special', '', 0);
          token.content = decoded;
          token.markup = match[0];
          token.info = 'entity';
        }
        state.pos += match[0].length;
        return true;
      }
    }
  }
  return false;
}

// For each opening emphasis-like marker find a matching closing one
//

function processDelimiters(delimiters) {
  const openersBottom = {};
  const max = delimiters.length;
  if (!max) return;

  // headerIdx is the first delimiter of the current (where closer is) delimiter run
  let headerIdx = 0;
  let lastTokenIdx = -2; // needs any value lower than -1
  const jumps = [];
  for (let closerIdx = 0; closerIdx < max; closerIdx++) {
    const closer = delimiters[closerIdx];
    jumps.push(0);

    // markers belong to same delimiter run if:
    //  - they have adjacent tokens
    //  - AND markers are the same
    //
    if (delimiters[headerIdx].marker !== closer.marker || lastTokenIdx !== closer.token - 1) {
      headerIdx = closerIdx;
    }
    lastTokenIdx = closer.token;

    // Length is only used for emphasis-specific "rule of 3",
    // if it's not defined (in strikethrough or 3rd party plugins),
    // we can default it to 0 to disable those checks.
    //
    closer.length = closer.length || 0;
    if (!closer.close) continue;

    // Previously calculated lower bounds (previous fails)
    // for each marker, each delimiter length modulo 3,
    // and for whether this closer can be an opener;
    // https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460
    /* eslint-disable-next-line no-prototype-builtins */
    if (!openersBottom.hasOwnProperty(closer.marker)) {
      openersBottom[closer.marker] = [-1, -1, -1, -1, -1, -1];
    }
    const minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + closer.length % 3];
    let openerIdx = headerIdx - jumps[headerIdx] - 1;
    let newMinOpenerIdx = openerIdx;
    for (; openerIdx > minOpenerIdx; openerIdx -= jumps[openerIdx] + 1) {
      const opener = delimiters[openerIdx];
      if (opener.marker !== closer.marker) continue;
      if (opener.open && opener.end < 0) {
        let isOddMatch = false;

        // from spec:
        //
        // If one of the delimiters can both open and close emphasis, then the
        // sum of the lengths of the delimiter runs containing the opening and
        // closing delimiters must not be a multiple of 3 unless both lengths
        // are multiples of 3.
        //
        if (opener.close || closer.open) {
          if ((opener.length + closer.length) % 3 === 0) {
            if (opener.length % 3 !== 0 || closer.length % 3 !== 0) {
              isOddMatch = true;
            }
          }
        }
        if (!isOddMatch) {
          // If previous delimiter cannot be an opener, we can safely skip
          // the entire sequence in future checks. This is required to make
          // sure algorithm has linear complexity (see *_*_*_*_*_... case).
          //
          const lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open ? jumps[openerIdx - 1] + 1 : 0;
          jumps[closerIdx] = closerIdx - openerIdx + lastJump;
          jumps[openerIdx] = lastJump;
          closer.open = false;
          opener.end = closerIdx;
          opener.close = false;
          newMinOpenerIdx = -1;
          // treat next token as start of run,
          // it optimizes skips in **<...>**a**<...>** pathological case
          lastTokenIdx = -2;
          break;
        }
      }
    }
    if (newMinOpenerIdx !== -1) {
      // If match for this delimiter run failed, we want to set lower bound for
      // future lookups. This is required to make sure algorithm has linear
      // complexity.
      //
      // See details here:
      // https://github.com/commonmark/cmark/issues/178#issuecomment-270417442
      //
      openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length || 0) % 3] = newMinOpenerIdx;
    }
  }
}
function link_pairs(state) {
  const tokens_meta = state.tokens_meta;
  const max = state.tokens_meta.length;
  processDelimiters(state.delimiters);
  for (let curr = 0; curr < max; curr++) {
    if (tokens_meta[curr] && tokens_meta[curr].delimiters) {
      processDelimiters(tokens_meta[curr].delimiters);
    }
  }
}

// Clean up tokens after emphasis and strikethrough postprocessing:
// merge adjacent text nodes into one and re-calculate all token levels
//
// This is necessary because initially emphasis delimiter markers (*, _, ~)
// are treated as their own separate text tokens. Then emphasis rule either
// leaves them as text (needed to merge with adjacent text) or turns them
// into opening/closing tags (which messes up levels inside).
//

function fragments_join(state) {
  let curr, last;
  let level = 0;
  const tokens = state.tokens;
  const max = state.tokens.length;
  for (curr = last = 0; curr < max; curr++) {
    // re-calculate levels after emphasis/strikethrough turns some text nodes
    // into opening/closing tags
    if (tokens[curr].nesting < 0) level--; // closing tag
    tokens[curr].level = level;
    if (tokens[curr].nesting > 0) level++; // opening tag

    if (tokens[curr].type === 'text' && curr + 1 < max && tokens[curr + 1].type === 'text') {
      // collapse two adjacent text nodes
      tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;
    } else {
      if (curr !== last) {
        tokens[last] = tokens[curr];
      }
      last++;
    }
  }
  if (curr !== last) {
    tokens.length = last;
  }
}

/** internal
 * class ParserInline
 *
 * Tokenizes paragraph content.
 **/

// Parser rules

const _rules = [['text', text], ['linkify', linkify], ['newline', newline], ['escape', escape], ['backticks', backtick], ['strikethrough', r_strikethrough.tokenize], ['emphasis', r_emphasis.tokenize], ['link', link], ['image', image], ['autolink', autolink], ['html_inline', html_inline], ['entity', entity]];

// `rule2` ruleset was created specifically for emphasis/strikethrough
// post-processing and may be changed in the future.
//
// Don't use this for anything except pairs (plugins working with `balance_pairs`).
//
const _rules2 = [['balance_pairs', link_pairs], ['strikethrough', r_strikethrough.postProcess], ['emphasis', r_emphasis.postProcess],
// rules for pairs separate '**' into its own text tokens, which may be left unused,
// rule below merges unused segments back with the rest of the text
['fragments_join', fragments_join]];

/**
 * new ParserInline()
 **/
function ParserInline() {
  /**
   * ParserInline#ruler -> Ruler
   *
   * [[Ruler]] instance. Keep configuration of inline rules.
   **/
  this.ruler = new Ruler();
  for (let i = 0; i < _rules.length; i++) {
    this.ruler.push(_rules[i][0], _rules[i][1]);
  }

  /**
   * ParserInline#ruler2 -> Ruler
   *
   * [[Ruler]] instance. Second ruler used for post-processing
   * (e.g. in emphasis-like rules).
   **/
  this.ruler2 = new Ruler();
  for (let i = 0; i < _rules2.length; i++) {
    this.ruler2.push(_rules2[i][0], _rules2[i][1]);
  }
}

// Skip single token by running all rules in validation mode;
// returns `true` if any rule reported success
//
ParserInline.prototype.skipToken = function (state) {
  const pos = state.pos;
  const rules = this.ruler.getRules('');
  const len = rules.length;
  const maxNesting = state.md.options.maxNesting;
  const cache = state.cache;
  if (typeof cache[pos] !== 'undefined') {
    state.pos = cache[pos];
    return;
  }
  let ok = false;
  if (state.level < maxNesting) {
    for (let i = 0; i < len; i++) {
      // Increment state.level and decrement it later to limit recursion.
      // It's harmless to do here, because no tokens are created. But ideally,
      // we'd need a separate private state variable for this purpose.
      //
      state.level++;
      ok = rules[i](state, true);
      state.level--;
      if (ok) {
        if (pos >= state.pos) {
          throw new Error("inline rule didn't increment state.pos");
        }
        break;
      }
    }
  } else {
    // Too much nesting, just skip until the end of the paragraph.
    //
    // NOTE: this will cause links to behave incorrectly in the following case,
    //       when an amount of `[` is exactly equal to `maxNesting + 1`:
    //
    //       [[[[[[[[[[[[[[[[[[[[[foo]()
    //
    // TODO: remove this workaround when CM standard will allow nested links
    //       (we can replace it by preventing links from being parsed in
    //       validation mode)
    //
    state.pos = state.posMax;
  }
  if (!ok) {
    state.pos++;
  }
  cache[pos] = state.pos;
};

// Generate tokens for input range
//
ParserInline.prototype.tokenize = function (state) {
  const rules = this.ruler.getRules('');
  const len = rules.length;
  const end = state.posMax;
  const maxNesting = state.md.options.maxNesting;
  while (state.pos < end) {
    // Try all possible rules.
    // On success, rule should:
    //
    // - update `state.pos`
    // - update `state.tokens`
    // - return true
    const prevPos = state.pos;
    let ok = false;
    if (state.level < maxNesting) {
      for (let i = 0; i < len; i++) {
        ok = rules[i](state, false);
        if (ok) {
          if (prevPos >= state.pos) {
            throw new Error("inline rule didn't increment state.pos");
          }
          break;
        }
      }
    }
    if (ok) {
      if (state.pos >= end) {
        break;
      }
      continue;
    }
    state.pending += state.src[state.pos++];
  }
  if (state.pending) {
    state.pushPending();
  }
};

/**
 * ParserInline.parse(str, md, env, outTokens)
 *
 * Process input string and push inline tokens into `outTokens`
 **/
ParserInline.prototype.parse = function (str, md, env, outTokens) {
  const state = new this.State(str, md, env, outTokens);
  this.tokenize(state);
  const rules = this.ruler2.getRules('');
  const len = rules.length;
  for (let i = 0; i < len; i++) {
    rules[i](state);
  }
};
ParserInline.prototype.State = StateInline;

// markdown-it default options

var cfg_default = {
  options: {
    // Enable HTML tags in source
    html: false,
    // Use '/' to close single tags (<br />)
    xhtmlOut: false,
    // Convert '\n' in paragraphs into <br>
    breaks: false,
    // CSS language prefix for fenced blocks
    langPrefix: 'language-',
    // autoconvert URL-like texts to links
    linkify: false,
    // Enable some language-neutral replacements + quotes beautification
    typographer: false,
    // Double + single quotes replacement pairs, when typographer enabled,
    // and smartquotes on. Could be either a String or an Array.
    //
    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
    // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
    quotes: '\u201c\u201d\u2018\u2019',
    /* “”‘’ */

    // Highlighter function. Should return escaped HTML,
    // or '' if the source string is not changed and should be escaped externaly.
    // If result starts with <pre... internal wrapper is skipped.
    //
    // function (/*str, lang*/) { return ''; }
    //
    highlight: null,
    // Internal protection, recursion limit
    maxNesting: 100
  },
  components: {
    core: {},
    block: {},
    inline: {}
  }
};

// "Zero" preset, with nothing enabled. Useful for manual configuring of simple
// modes. For example, to parse bold/italic only.

var cfg_zero = {
  options: {
    // Enable HTML tags in source
    html: false,
    // Use '/' to close single tags (<br />)
    xhtmlOut: false,
    // Convert '\n' in paragraphs into <br>
    breaks: false,
    // CSS language prefix for fenced blocks
    langPrefix: 'language-',
    // autoconvert URL-like texts to links
    linkify: false,
    // Enable some language-neutral replacements + quotes beautification
    typographer: false,
    // Double + single quotes replacement pairs, when typographer enabled,
    // and smartquotes on. Could be either a String or an Array.
    //
    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
    // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
    quotes: '\u201c\u201d\u2018\u2019',
    /* “”‘’ */

    // Highlighter function. Should return escaped HTML,
    // or '' if the source string is not changed and should be escaped externaly.
    // If result starts with <pre... internal wrapper is skipped.
    //
    // function (/*str, lang*/) { return ''; }
    //
    highlight: null,
    // Internal protection, recursion limit
    maxNesting: 20
  },
  components: {
    core: {
      rules: ['normalize', 'block', 'inline', 'text_join']
    },
    block: {
      rules: ['paragraph']
    },
    inline: {
      rules: ['text'],
      rules2: ['balance_pairs', 'fragments_join']
    }
  }
};

// Commonmark default options

var cfg_commonmark = {
  options: {
    // Enable HTML tags in source
    html: true,
    // Use '/' to close single tags (<br />)
    xhtmlOut: true,
    // Convert '\n' in paragraphs into <br>
    breaks: false,
    // CSS language prefix for fenced blocks
    langPrefix: 'language-',
    // autoconvert URL-like texts to links
    linkify: false,
    // Enable some language-neutral replacements + quotes beautification
    typographer: false,
    // Double + single quotes replacement pairs, when typographer enabled,
    // and smartquotes on. Could be either a String or an Array.
    //
    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
    // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
    quotes: '\u201c\u201d\u2018\u2019',
    /* “”‘’ */

    // Highlighter function. Should return escaped HTML,
    // or '' if the source string is not changed and should be escaped externaly.
    // If result starts with <pre... internal wrapper is skipped.
    //
    // function (/*str, lang*/) { return ''; }
    //
    highlight: null,
    // Internal protection, recursion limit
    maxNesting: 20
  },
  components: {
    core: {
      rules: ['normalize', 'block', 'inline', 'text_join']
    },
    block: {
      rules: ['blockquote', 'code', 'fence', 'heading', 'hr', 'html_block', 'lheading', 'list', 'reference', 'paragraph']
    },
    inline: {
      rules: ['autolink', 'backticks', 'emphasis', 'entity', 'escape', 'html_inline', 'image', 'link', 'newline', 'text'],
      rules2: ['balance_pairs', 'emphasis', 'fragments_join']
    }
  }
};

// Main parser class

const config = {
  default: cfg_default,
  zero: cfg_zero,
  commonmark: cfg_commonmark
};

//
// This validator can prohibit more than really needed to prevent XSS. It's a
// tradeoff to keep code simple and to be secure by default.
//
// If you need different setup - override validator method as you wish. Or
// replace it with dummy function and use external sanitizer.
//

const BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;
const GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|webp);/;
function validateLink(url) {
  // url should be normalized at this point, and existing entities are decoded
  const str = url.trim().toLowerCase();
  return BAD_PROTO_RE.test(str) ? GOOD_DATA_RE.test(str) : true;
}
const RECODE_HOSTNAME_FOR = ['http:', 'https:', 'mailto:'];
function normalizeLink(url) {
  const parsed = mdurl__namespace.parse(url, true);
  if (parsed.hostname) {
    // Encode hostnames in urls like:
    // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
    //
    // We don't encode unknown schemas, because it's likely that we encode
    // something we shouldn't (e.g. `skype:name` treated as `skype:host`)
    //
    if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
      try {
        parsed.hostname = punycode.toASCII(parsed.hostname);
      } catch (er) {/**/}
    }
  }
  return mdurl__namespace.encode(mdurl__namespace.format(parsed));
}
function normalizeLinkText(url) {
  const parsed = mdurl__namespace.parse(url, true);
  if (parsed.hostname) {
    // Encode hostnames in urls like:
    // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
    //
    // We don't encode unknown schemas, because it's likely that we encode
    // something we shouldn't (e.g. `skype:name` treated as `skype:host`)
    //
    if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {
      try {
        parsed.hostname = punycode.toUnicode(parsed.hostname);
      } catch (er) {/**/}
    }
  }

  // add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720
  return mdurl__namespace.decode(mdurl__namespace.format(parsed), mdurl__namespace.decode.defaultChars + '%');
}

/**
 * class MarkdownIt
 *
 * Main parser/renderer class.
 *
 * ##### Usage
 *
 * ```javascript
 * // node.js, "classic" way:
 * var MarkdownIt = require('markdown-it'),
 *     md = new MarkdownIt();
 * var result = md.render('# markdown-it rulezz!');
 *
 * // node.js, the same, but with sugar:
 * var md = require('markdown-it')();
 * var result = md.render('# markdown-it rulezz!');
 *
 * // browser without AMD, added to "window" on script load
 * // Note, there are no dash.
 * var md = window.markdownit();
 * var result = md.render('# markdown-it rulezz!');
 * ```
 *
 * Single line rendering, without paragraph wrap:
 *
 * ```javascript
 * var md = require('markdown-it')();
 * var result = md.renderInline('__markdown-it__ rulezz!');
 * ```
 **/

/**
 * new MarkdownIt([presetName, options])
 * - presetName (String): optional, `commonmark` / `zero`
 * - options (Object)
 *
 * Creates parser instanse with given config. Can be called without `new`.
 *
 * ##### presetName
 *
 * MarkdownIt provides named presets as a convenience to quickly
 * enable/disable active syntax rules and options for common use cases.
 *
 * - ["commonmark"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.mjs) -
 *   configures parser to strict [CommonMark](http://commonmark.org/) mode.
 * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.mjs) -
 *   similar to GFM, used when no preset name given. Enables all available rules,
 *   but still without html, typographer & autolinker.
 * - ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.mjs) -
 *   all rules disabled. Useful to quickly setup your config via `.enable()`.
 *   For example, when you need only `bold` and `italic` markup and nothing else.
 *
 * ##### options:
 *
 * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!
 *   That's not safe! You may need external sanitizer to protect output from XSS.
 *   It's better to extend features via plugins, instead of enabling HTML.
 * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags
 *   (`<br />`). This is needed only for full CommonMark compatibility. In real
 *   world you will need HTML output.
 * - __breaks__ - `false`. Set `true` to convert `\n` in paragraphs into `<br>`.
 * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.
 *   Can be useful for external highlighters.
 * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.
 * - __typographer__  - `false`. Set `true` to enable [some language-neutral
 *   replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.mjs) +
 *   quotes beautification (smartquotes).
 * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement
 *   pairs, when typographer enabled and smartquotes on. For example, you can
 *   use `'«»„“'` for Russian, `'„“‚‘'` for German, and
 *   `['«\xA0', '\xA0»', '‹\xA0', '\xA0›']` for French (including nbsp).
 * - __highlight__ - `null`. Highlighter function for fenced code blocks.
 *   Highlighter `function (str, lang)` should return escaped HTML. It can also
 *   return empty string if the source was not changed and should be escaped
 *   externaly. If result starts with <pre... internal wrapper is skipped.
 *
 * ##### Example
 *
 * ```javascript
 * // commonmark mode
 * var md = require('markdown-it')('commonmark');
 *
 * // default mode
 * var md = require('markdown-it')();
 *
 * // enable everything
 * var md = require('markdown-it')({
 *   html: true,
 *   linkify: true,
 *   typographer: true
 * });
 * ```
 *
 * ##### Syntax highlighting
 *
 * ```js
 * var hljs = require('highlight.js') // https://highlightjs.org/
 *
 * var md = require('markdown-it')({
 *   highlight: function (str, lang) {
 *     if (lang && hljs.getLanguage(lang)) {
 *       try {
 *         return hljs.highlight(str, { language: lang, ignoreIllegals: true }).value;
 *       } catch (__) {}
 *     }
 *
 *     return ''; // use external default escaping
 *   }
 * });
 * ```
 *
 * Or with full wrapper override (if you need assign class to `<pre>` or `<code>`):
 *
 * ```javascript
 * var hljs = require('highlight.js') // https://highlightjs.org/
 *
 * // Actual default values
 * var md = require('markdown-it')({
 *   highlight: function (str, lang) {
 *     if (lang && hljs.getLanguage(lang)) {
 *       try {
 *         return '<pre><code class="hljs">' +
 *                hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
 *                '</code></pre>';
 *       } catch (__) {}
 *     }
 *
 *     return '<pre><code class="hljs">' + md.utils.escapeHtml(str) + '</code></pre>';
 *   }
 * });
 * ```
 *
 **/
function MarkdownIt(presetName, options) {
  if (!(this instanceof MarkdownIt)) {
    return new MarkdownIt(presetName, options);
  }
  if (!options) {
    if (!isString(presetName)) {
      options = presetName || {};
      presetName = 'default';
    }
  }

  /**
   * MarkdownIt#inline -> ParserInline
   *
   * Instance of [[ParserInline]]. You may need it to add new rules when
   * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
   * [[MarkdownIt.enable]].
   **/
  this.inline = new ParserInline();

  /**
   * MarkdownIt#block -> ParserBlock
   *
   * Instance of [[ParserBlock]]. You may need it to add new rules when
   * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
   * [[MarkdownIt.enable]].
   **/
  this.block = new ParserBlock();

  /**
   * MarkdownIt#core -> Core
   *
   * Instance of [[Core]] chain executor. You may need it to add new rules when
   * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
   * [[MarkdownIt.enable]].
   **/
  this.core = new Core();

  /**
   * MarkdownIt#renderer -> Renderer
   *
   * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering
   * rules for new token types, generated by plugins.
   *
   * ##### Example
   *
   * ```javascript
   * var md = require('markdown-it')();
   *
   * function myToken(tokens, idx, options, env, self) {
   *   //...
   *   return result;
   * };
   *
   * md.renderer.rules['my_token'] = myToken
   * ```
   *
   * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs).
   **/
  this.renderer = new Renderer();

  /**
   * MarkdownIt#linkify -> LinkifyIt
   *
   * [linkify-it](https://github.com/markdown-it/linkify-it) instance.
   * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.mjs)
   * rule.
   **/
  this.linkify = new LinkifyIt();

  /**
   * MarkdownIt#validateLink(url) -> Boolean
   *
   * Link validation function. CommonMark allows too much in links. By default
   * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas
   * except some embedded image types.
   *
   * You can change this behaviour:
   *
   * ```javascript
   * var md = require('markdown-it')();
   * // enable everything
   * md.validateLink = function () { return true; }
   * ```
   **/
  this.validateLink = validateLink;

  /**
   * MarkdownIt#normalizeLink(url) -> String
   *
   * Function used to encode link url to a machine-readable format,
   * which includes url-encoding, punycode, etc.
   **/
  this.normalizeLink = normalizeLink;

  /**
   * MarkdownIt#normalizeLinkText(url) -> String
   *
   * Function used to decode link url to a human-readable format`
   **/
  this.normalizeLinkText = normalizeLinkText;

  // Expose utils & helpers for easy acces from plugins

  /**
   * MarkdownIt#utils -> utils
   *
   * Assorted utility functions, useful to write plugins. See details
   * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.mjs).
   **/
  this.utils = utils;

  /**
   * MarkdownIt#helpers -> helpers
   *
   * Link components parser functions, useful to write plugins. See details
   * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).
   **/
  this.helpers = assign({}, helpers);
  this.options = {};
  this.configure(presetName);
  if (options) {
    this.set(options);
  }
}

/** chainable
 * MarkdownIt.set(options)
 *
 * Set parser options (in the same format as in constructor). Probably, you
 * will never need it, but you can change options after constructor call.
 *
 * ##### Example
 *
 * ```javascript
 * var md = require('markdown-it')()
 *             .set({ html: true, breaks: true })
 *             .set({ typographer, true });
 * ```
 *
 * __Note:__ To achieve the best possible performance, don't modify a
 * `markdown-it` instance options on the fly. If you need multiple configurations
 * it's best to create multiple instances and initialize each with separate
 * config.
 **/
MarkdownIt.prototype.set = function (options) {
  assign(this.options, options);
  return this;
};

/** chainable, internal
 * MarkdownIt.configure(presets)
 *
 * Batch load of all options and compenent settings. This is internal method,
 * and you probably will not need it. But if you will - see available presets
 * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)
 *
 * We strongly recommend to use presets instead of direct config loads. That
 * will give better compatibility with next versions.
 **/
MarkdownIt.prototype.configure = function (presets) {
  const self = this;
  if (isString(presets)) {
    const presetName = presets;
    presets = config[presetName];
    if (!presets) {
      throw new Error('Wrong `markdown-it` preset "' + presetName + '", check name');
    }
  }
  if (!presets) {
    throw new Error('Wrong `markdown-it` preset, can\'t be empty');
  }
  if (presets.options) {
    self.set(presets.options);
  }
  if (presets.components) {
    Object.keys(presets.components).forEach(function (name) {
      if (presets.components[name].rules) {
        self[name].ruler.enableOnly(presets.components[name].rules);
      }
      if (presets.components[name].rules2) {
        self[name].ruler2.enableOnly(presets.components[name].rules2);
      }
    });
  }
  return this;
};

/** chainable
 * MarkdownIt.enable(list, ignoreInvalid)
 * - list (String|Array): rule name or list of rule names to enable
 * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
 *
 * Enable list or rules. It will automatically find appropriate components,
 * containing rules with given names. If rule not found, and `ignoreInvalid`
 * not set - throws exception.
 *
 * ##### Example
 *
 * ```javascript
 * var md = require('markdown-it')()
 *             .enable(['sub', 'sup'])
 *             .disable('smartquotes');
 * ```
 **/
MarkdownIt.prototype.enable = function (list, ignoreInvalid) {
  let result = [];
  if (!Array.isArray(list)) {
    list = [list];
  }
  ['core', 'block', 'inline'].forEach(function (chain) {
    result = result.concat(this[chain].ruler.enable(list, true));
  }, this);
  result = result.concat(this.inline.ruler2.enable(list, true));
  const missed = list.filter(function (name) {
    return result.indexOf(name) < 0;
  });
  if (missed.length && !ignoreInvalid) {
    throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed);
  }
  return this;
};

/** chainable
 * MarkdownIt.disable(list, ignoreInvalid)
 * - list (String|Array): rule name or list of rule names to disable.
 * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
 *
 * The same as [[MarkdownIt.enable]], but turn specified rules off.
 **/
MarkdownIt.prototype.disable = function (list, ignoreInvalid) {
  let result = [];
  if (!Array.isArray(list)) {
    list = [list];
  }
  ['core', 'block', 'inline'].forEach(function (chain) {
    result = result.concat(this[chain].ruler.disable(list, true));
  }, this);
  result = result.concat(this.inline.ruler2.disable(list, true));
  const missed = list.filter(function (name) {
    return result.indexOf(name) < 0;
  });
  if (missed.length && !ignoreInvalid) {
    throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed);
  }
  return this;
};

/** chainable
 * MarkdownIt.use(plugin, params)
 *
 * Load specified plugin with given params into current parser instance.
 * It's just a sugar to call `plugin(md, params)` with curring.
 *
 * ##### Example
 *
 * ```javascript
 * var iterator = require('markdown-it-for-inline');
 * var md = require('markdown-it')()
 *             .use(iterator, 'foo_replace', 'text', function (tokens, idx) {
 *               tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');
 *             });
 * ```
 **/
MarkdownIt.prototype.use = function (plugin /*, params, ... */) {
  const args = [this].concat(Array.prototype.slice.call(arguments, 1));
  plugin.apply(plugin, args);
  return this;
};

/** internal
 * MarkdownIt.parse(src, env) -> Array
 * - src (String): source string
 * - env (Object): environment sandbox
 *
 * Parse input string and return list of block tokens (special token type
 * "inline" will contain list of inline tokens). You should not call this
 * method directly, until you write custom renderer (for example, to produce
 * AST).
 *
 * `env` is used to pass data between "distributed" rules and return additional
 * metadata like reference info, needed for the renderer. It also can be used to
 * inject data in specific cases. Usually, you will be ok to pass `{}`,
 * and then pass updated object to renderer.
 **/
MarkdownIt.prototype.parse = function (src, env) {
  if (typeof src !== 'string') {
    throw new Error('Input data should be a String');
  }
  const state = new this.core.State(src, this, env);
  this.core.process(state);
  return state.tokens;
};

/**
 * MarkdownIt.render(src [, env]) -> String
 * - src (String): source string
 * - env (Object): environment sandbox
 *
 * Render markdown string into html. It does all magic for you :).
 *
 * `env` can be used to inject additional metadata (`{}` by default).
 * But you will not need it with high probability. See also comment
 * in [[MarkdownIt.parse]].
 **/
MarkdownIt.prototype.render = function (src, env) {
  env = env || {};
  return this.renderer.render(this.parse(src, env), this.options, env);
};

/** internal
 * MarkdownIt.parseInline(src, env) -> Array
 * - src (String): source string
 * - env (Object): environment sandbox
 *
 * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the
 * block tokens list with the single `inline` element, containing parsed inline
 * tokens in `children` property. Also updates `env` object.
 **/
MarkdownIt.prototype.parseInline = function (src, env) {
  const state = new this.core.State(src, this, env);
  state.inlineMode = true;
  this.core.process(state);
  return state.tokens;
};

/**
 * MarkdownIt.renderInline(src [, env]) -> String
 * - src (String): source string
 * - env (Object): environment sandbox
 *
 * Similar to [[MarkdownIt.render]] but for single paragraph content. Result
 * will NOT be wrapped into `<p>` tags.
 **/
MarkdownIt.prototype.renderInline = function (src, env) {
  env = env || {};
  return this.renderer.render(this.parseInline(src, env), this.options, env);
};
module.exports = MarkdownIt;

/***/ }),

/***/ "../node_modules/mdurl/build/index.cjs.js":
/*!************************************************!*\
  !*** ../node_modules/mdurl/build/index.cjs.js ***!
  \************************************************/
/***/ (function(__unused_webpack_module, exports) {



/* eslint-disable no-bitwise */
const decodeCache = {};
function getDecodeCache(exclude) {
  let cache = decodeCache[exclude];
  if (cache) {
    return cache;
  }
  cache = decodeCache[exclude] = [];
  for (let i = 0; i < 128; i++) {
    const ch = String.fromCharCode(i);
    cache.push(ch);
  }
  for (let i = 0; i < exclude.length; i++) {
    const ch = exclude.charCodeAt(i);
    cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2);
  }
  return cache;
}

// Decode percent-encoded string.
//
function decode(string, exclude) {
  if (typeof exclude !== 'string') {
    exclude = decode.defaultChars;
  }
  const cache = getDecodeCache(exclude);
  return string.replace(/(%[a-f0-9]{2})+/gi, function (seq) {
    let result = '';
    for (let i = 0, l = seq.length; i < l; i += 3) {
      const b1 = parseInt(seq.slice(i + 1, i + 3), 16);
      if (b1 < 0x80) {
        result += cache[b1];
        continue;
      }
      if ((b1 & 0xE0) === 0xC0 && i + 3 < l) {
        // 110xxxxx 10xxxxxx
        const b2 = parseInt(seq.slice(i + 4, i + 6), 16);
        if ((b2 & 0xC0) === 0x80) {
          const chr = b1 << 6 & 0x7C0 | b2 & 0x3F;
          if (chr < 0x80) {
            result += '\ufffd\ufffd';
          } else {
            result += String.fromCharCode(chr);
          }
          i += 3;
          continue;
        }
      }
      if ((b1 & 0xF0) === 0xE0 && i + 6 < l) {
        // 1110xxxx 10xxxxxx 10xxxxxx
        const b2 = parseInt(seq.slice(i + 4, i + 6), 16);
        const b3 = parseInt(seq.slice(i + 7, i + 9), 16);
        if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {
          const chr = b1 << 12 & 0xF000 | b2 << 6 & 0xFC0 | b3 & 0x3F;
          if (chr < 0x800 || chr >= 0xD800 && chr <= 0xDFFF) {
            result += '\ufffd\ufffd\ufffd';
          } else {
            result += String.fromCharCode(chr);
          }
          i += 6;
          continue;
        }
      }
      if ((b1 & 0xF8) === 0xF0 && i + 9 < l) {
        // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx
        const b2 = parseInt(seq.slice(i + 4, i + 6), 16);
        const b3 = parseInt(seq.slice(i + 7, i + 9), 16);
        const b4 = parseInt(seq.slice(i + 10, i + 12), 16);
        if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {
          let chr = b1 << 18 & 0x1C0000 | b2 << 12 & 0x3F000 | b3 << 6 & 0xFC0 | b4 & 0x3F;
          if (chr < 0x10000 || chr > 0x10FFFF) {
            result += '\ufffd\ufffd\ufffd\ufffd';
          } else {
            chr -= 0x10000;
            result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF));
          }
          i += 9;
          continue;
        }
      }
      result += '\ufffd';
    }
    return result;
  });
}
decode.defaultChars = ';/?:@&=+$,#';
decode.componentChars = '';
const encodeCache = {};

// Create a lookup array where anything but characters in `chars` string
// and alphanumeric chars is percent-encoded.
//
function getEncodeCache(exclude) {
  let cache = encodeCache[exclude];
  if (cache) {
    return cache;
  }
  cache = encodeCache[exclude] = [];
  for (let i = 0; i < 128; i++) {
    const ch = String.fromCharCode(i);
    if (/^[0-9a-z]$/i.test(ch)) {
      // always allow unencoded alphanumeric characters
      cache.push(ch);
    } else {
      cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2));
    }
  }
  for (let i = 0; i < exclude.length; i++) {
    cache[exclude.charCodeAt(i)] = exclude[i];
  }
  return cache;
}

// Encode unsafe characters with percent-encoding, skipping already
// encoded sequences.
//
//  - string       - string to encode
//  - exclude      - list of characters to ignore (in addition to a-zA-Z0-9)
//  - keepEscaped  - don't encode '%' in a correct escape sequence (default: true)
//
function encode(string, exclude, keepEscaped) {
  if (typeof exclude !== 'string') {
    // encode(string, keepEscaped)
    keepEscaped = exclude;
    exclude = encode.defaultChars;
  }
  if (typeof keepEscaped === 'undefined') {
    keepEscaped = true;
  }
  const cache = getEncodeCache(exclude);
  let result = '';
  for (let i = 0, l = string.length; i < l; i++) {
    const code = string.charCodeAt(i);
    if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {
      if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {
        result += string.slice(i, i + 3);
        i += 2;
        continue;
      }
    }
    if (code < 128) {
      result += cache[code];
      continue;
    }
    if (code >= 0xD800 && code <= 0xDFFF) {
      if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {
        const nextCode = string.charCodeAt(i + 1);
        if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {
          result += encodeURIComponent(string[i] + string[i + 1]);
          i++;
          continue;
        }
      }
      result += '%EF%BF%BD';
      continue;
    }
    result += encodeURIComponent(string[i]);
  }
  return result;
}
encode.defaultChars = ";/?:@&=+$,-_.!~*'()#";
encode.componentChars = "-_.!~*'()";
function format(url) {
  let result = '';
  result += url.protocol || '';
  result += url.slashes ? '//' : '';
  result += url.auth ? url.auth + '@' : '';
  if (url.hostname && url.hostname.indexOf(':') !== -1) {
    // ipv6 address
    result += '[' + url.hostname + ']';
  } else {
    result += url.hostname || '';
  }
  result += url.port ? ':' + url.port : '';
  result += url.pathname || '';
  result += url.search || '';
  result += url.hash || '';
  return result;
}

// Copyright Joyent, Inc. and other Node contributors.
//
// 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.

//
// Changes from joyent/node:
//
// 1. No leading slash in paths,
//    e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`
//
// 2. Backslashes are not replaced with slashes,
//    so `http:\\example.org\` is treated like a relative path
//
// 3. Trailing colon is treated like a part of the path,
//    i.e. in `http://example.org:foo` pathname is `:foo`
//
// 4. Nothing is URL-encoded in the resulting object,
//    (in joyent/node some chars in auth and paths are encoded)
//
// 5. `url.parse()` does not have `parseQueryString` argument
//
// 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,
//    which can be constructed using other parts of the url.
//

function Url() {
  this.protocol = null;
  this.slashes = null;
  this.auth = null;
  this.port = null;
  this.hostname = null;
  this.hash = null;
  this.search = null;
  this.pathname = null;
}

// Reference: RFC 3986, RFC 1808, RFC 2396

// define these here so at least they only have to be
// compiled once on the first module load.
const protocolPattern = /^([a-z0-9.+-]+:)/i;
const portPattern = /:[0-9]*$/;

// Special case for a simple path URL
/* eslint-disable-next-line no-useless-escape */
const simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/;

// RFC 2396: characters reserved for delimiting URLs.
// We actually just auto-escape these.
const delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'];

// RFC 2396: characters not allowed for various reasons.
const unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims);

// Allowed by RFCs, but cause of XSS attacks.  Always escape these.
const autoEscape = ['\''].concat(unwise);
// Characters that are never ever allowed in a hostname.
// Note that any invalid chars are also handled, but these
// are the ones that are *expected* to be seen, so we fast-path
// them.
const nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape);
const hostEndingChars = ['/', '?', '#'];
const hostnameMaxLen = 255;
const hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/;
const hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/;
// protocols that can allow "unsafe" and "unwise" chars.
// protocols that never have a hostname.
const hostlessProtocol = {
  javascript: true,
  'javascript:': true
};
// protocols that always contain a // bit.
const slashedProtocol = {
  http: true,
  https: true,
  ftp: true,
  gopher: true,
  file: true,
  'http:': true,
  'https:': true,
  'ftp:': true,
  'gopher:': true,
  'file:': true
};
function urlParse(url, slashesDenoteHost) {
  if (url && url instanceof Url) return url;
  const u = new Url();
  u.parse(url, slashesDenoteHost);
  return u;
}
Url.prototype.parse = function (url, slashesDenoteHost) {
  let lowerProto, hec, slashes;
  let rest = url;

  // trim before proceeding.
  // This is to support parse stuff like "  http://foo.com  \n"
  rest = rest.trim();
  if (!slashesDenoteHost && url.split('#').length === 1) {
    // Try fast path regexp
    const simplePath = simplePathPattern.exec(rest);
    if (simplePath) {
      this.pathname = simplePath[1];
      if (simplePath[2]) {
        this.search = simplePath[2];
      }
      return this;
    }
  }
  let proto = protocolPattern.exec(rest);
  if (proto) {
    proto = proto[0];
    lowerProto = proto.toLowerCase();
    this.protocol = proto;
    rest = rest.substr(proto.length);
  }

  // figure out if it's got a host
  // user@server is *always* interpreted as a hostname, and url
  // resolution will treat //foo/bar as host=foo,path=bar because that's
  // how the browser resolves relative URLs.
  /* eslint-disable-next-line no-useless-escape */
  if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
    slashes = rest.substr(0, 2) === '//';
    if (slashes && !(proto && hostlessProtocol[proto])) {
      rest = rest.substr(2);
      this.slashes = true;
    }
  }
  if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) {
    // there's a hostname.
    // the first instance of /, ?, ;, or # ends the host.
    //
    // If there is an @ in the hostname, then non-host chars *are* allowed
    // to the left of the last @ sign, unless some host-ending character
    // comes *before* the @-sign.
    // URLs are obnoxious.
    //
    // ex:
    // http://a@b@c/ => user:a@b host:c
    // http://a@b?@c => user:a host:c path:/?@c

    // v0.12 TODO(isaacs): This is not quite how Chrome does things.
    // Review our test case against browsers more comprehensively.

    // find the first instance of any hostEndingChars
    let hostEnd = -1;
    for (let i = 0; i < hostEndingChars.length; i++) {
      hec = rest.indexOf(hostEndingChars[i]);
      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
        hostEnd = hec;
      }
    }

    // at this point, either we have an explicit point where the
    // auth portion cannot go past, or the last @ char is the decider.
    let auth, atSign;
    if (hostEnd === -1) {
      // atSign can be anywhere.
      atSign = rest.lastIndexOf('@');
    } else {
      // atSign must be in auth portion.
      // http://a@b/c@d => host:b auth:a path:/c@d
      atSign = rest.lastIndexOf('@', hostEnd);
    }

    // Now we have a portion which is definitely the auth.
    // Pull that off.
    if (atSign !== -1) {
      auth = rest.slice(0, atSign);
      rest = rest.slice(atSign + 1);
      this.auth = auth;
    }

    // the host is the remaining to the left of the first non-host char
    hostEnd = -1;
    for (let i = 0; i < nonHostChars.length; i++) {
      hec = rest.indexOf(nonHostChars[i]);
      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {
        hostEnd = hec;
      }
    }
    // if we still have not hit it, then the entire thing is a host.
    if (hostEnd === -1) {
      hostEnd = rest.length;
    }
    if (rest[hostEnd - 1] === ':') {
      hostEnd--;
    }
    const host = rest.slice(0, hostEnd);
    rest = rest.slice(hostEnd);

    // pull out port.
    this.parseHost(host);

    // we've indicated that there is a hostname,
    // so even if it's empty, it has to be present.
    this.hostname = this.hostname || '';

    // if hostname begins with [ and ends with ]
    // assume that it's an IPv6 address.
    const ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']';

    // validate a little.
    if (!ipv6Hostname) {
      const hostparts = this.hostname.split(/\./);
      for (let i = 0, l = hostparts.length; i < l; i++) {
        const part = hostparts[i];
        if (!part) {
          continue;
        }
        if (!part.match(hostnamePartPattern)) {
          let newpart = '';
          for (let j = 0, k = part.length; j < k; j++) {
            if (part.charCodeAt(j) > 127) {
              // we replace non-ASCII char with a temporary placeholder
              // we need this to make sure size of hostname is not
              // broken by replacing non-ASCII by nothing
              newpart += 'x';
            } else {
              newpart += part[j];
            }
          }
          // we test again with ASCII char only
          if (!newpart.match(hostnamePartPattern)) {
            const validParts = hostparts.slice(0, i);
            const notHost = hostparts.slice(i + 1);
            const bit = part.match(hostnamePartStart);
            if (bit) {
              validParts.push(bit[1]);
              notHost.unshift(bit[2]);
            }
            if (notHost.length) {
              rest = notHost.join('.') + rest;
            }
            this.hostname = validParts.join('.');
            break;
          }
        }
      }
    }
    if (this.hostname.length > hostnameMaxLen) {
      this.hostname = '';
    }

    // strip [ and ] from the hostname
    // the host field still retains them, though
    if (ipv6Hostname) {
      this.hostname = this.hostname.substr(1, this.hostname.length - 2);
    }
  }

  // chop off from the tail first.
  const hash = rest.indexOf('#');
  if (hash !== -1) {
    // got a fragment string.
    this.hash = rest.substr(hash);
    rest = rest.slice(0, hash);
  }
  const qm = rest.indexOf('?');
  if (qm !== -1) {
    this.search = rest.substr(qm);
    rest = rest.slice(0, qm);
  }
  if (rest) {
    this.pathname = rest;
  }
  if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {
    this.pathname = '';
  }
  return this;
};
Url.prototype.parseHost = function (host) {
  let port = portPattern.exec(host);
  if (port) {
    port = port[0];
    if (port !== ':') {
      this.port = port.substr(1);
    }
    host = host.substr(0, host.length - port.length);
  }
  if (host) {
    this.hostname = host;
  }
};
exports.decode = decode;
exports.encode = encode;
exports.format = format;
exports.parse = urlParse;

/***/ }),

/***/ "../node_modules/uc.micro/build/index.cjs.js":
/*!***************************************************!*\
  !*** ../node_modules/uc.micro/build/index.cjs.js ***!
  \***************************************************/
/***/ (function(__unused_webpack_module, exports) {



var regex$5 = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
var regex$4 = /[\0-\x1F\x7F-\x9F]/;
var regex$3 = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;
var regex$2 = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;
var regex$1 = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;
var regex = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;
exports.Any = regex$5;
exports.Cc = regex$4;
exports.Cf = regex$3;
exports.P = regex$2;
exports.S = regex$1;
exports.Z = regex;

/***/ }),

/***/ "./components/GraphiQL.tsx":
/*!*********************************!*\
  !*** ./components/GraphiQL.tsx ***!
  \*********************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.GraphiQL = GraphiQL;
exports.GraphiQLInterface = GraphiQLInterface;
var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
var _react2 = __webpack_require__(/*! @graphiql/react */ "../../graphiql-react/dist/index.js");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /**
                                                                                                                                                                                                                                                                                                                                                     *  Copyright (c) 2020 GraphQL Contributors.
                                                                                                                                                                                                                                                                                                                                                     *
                                                                                                                                                                                                                                                                                                                                                     *  This source code is licensed under the MIT license found in the
                                                                                                                                                                                                                                                                                                                                                     *  LICENSE file in the root directory of this source tree.
                                                                                                                                                                                                                                                                                                                                                     */
const majorVersion = parseInt(_react.default.version.slice(0, 2), 10);
if (majorVersion < 16) {
  throw new Error(['GraphiQL 0.18.0 and after is not compatible with React 15 or below.', 'If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:', 'https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49'].join('\n'));
}

/**
 * API docs for this live here:
 *
 * https://graphiql-test.netlify.app/typedoc/modules/graphiql.html#graphiqlprops
 */

/**
 * The top-level React component for GraphiQL, intended to encompass the entire
 * browser viewport.
 *
 * @see https://github.com/graphql/graphiql#usage
 */

function GraphiQL(_ref) {
  var _props$disableTabs;
  let {
    dangerouslyAssumeSchemaIsValid,
    defaultQuery,
    defaultTabs,
    externalFragments,
    fetcher,
    getDefaultFieldNames,
    headers,
    inputValueDeprecation,
    introspectionQueryName,
    maxHistoryLength,
    onEditOperationName,
    onSchemaChange,
    onTabChange,
    onTogglePluginVisibility,
    operationName,
    plugins,
    query,
    response,
    schema,
    schemaDescription,
    shouldPersistHeaders,
    storage,
    validationRules,
    variables,
    visiblePlugin,
    defaultHeaders,
    ...props
  } = _ref;
  // Ensure props are correct
  if (typeof fetcher !== 'function') {
    throw new TypeError('The `GraphiQL` component requires a `fetcher` function to be passed as prop.');
  }
  return /*#__PURE__*/_react.default.createElement(_react2.GraphiQLProvider, {
    getDefaultFieldNames: getDefaultFieldNames,
    dangerouslyAssumeSchemaIsValid: dangerouslyAssumeSchemaIsValid,
    defaultQuery: defaultQuery,
    defaultHeaders: defaultHeaders,
    defaultTabs: defaultTabs,
    externalFragments: externalFragments,
    fetcher: fetcher,
    headers: headers,
    inputValueDeprecation: inputValueDeprecation,
    introspectionQueryName: introspectionQueryName,
    maxHistoryLength: maxHistoryLength,
    onEditOperationName: onEditOperationName,
    onSchemaChange: onSchemaChange,
    onTabChange: onTabChange,
    onTogglePluginVisibility: onTogglePluginVisibility,
    plugins: plugins,
    visiblePlugin: visiblePlugin,
    operationName: operationName,
    query: query,
    response: response,
    schema: schema,
    schemaDescription: schemaDescription,
    shouldPersistHeaders: shouldPersistHeaders,
    storage: storage,
    validationRules: validationRules,
    variables: variables
  }, /*#__PURE__*/_react.default.createElement(GraphiQLInterface, _extends({
    showPersistHeadersSettings: shouldPersistHeaders !== false,
    disableTabs: (_props$disableTabs = props.disableTabs) !== null && _props$disableTabs !== void 0 ? _props$disableTabs : false
  }, props)));
}

// Export main windows/panes to be used separately if desired.
GraphiQL.Logo = GraphiQLLogo;
GraphiQL.Toolbar = GraphiQLToolbar;
GraphiQL.Footer = GraphiQLFooter;
function GraphiQLInterface(props) {
  var _props$isHeadersEdito, _pluginContext$visibl, _props$toolbar, _props$toolbar2;
  const isHeadersEditorEnabled = (_props$isHeadersEdito = props.isHeadersEditorEnabled) !== null && _props$isHeadersEdito !== void 0 ? _props$isHeadersEdito : true;
  const editorContext = (0, _react2.useEditorContext)({
    nonNull: true
  });
  const executionContext = (0, _react2.useExecutionContext)({
    nonNull: true
  });
  const schemaContext = (0, _react2.useSchemaContext)({
    nonNull: true
  });
  const storageContext = (0, _react2.useStorageContext)();
  const pluginContext = (0, _react2.usePluginContext)();
  const copy = (0, _react2.useCopyQuery)({
    onCopyQuery: props.onCopyQuery
  });
  const merge = (0, _react2.useMergeQuery)();
  const prettify = (0, _react2.usePrettifyEditors)();
  const {
    theme,
    setTheme
  } = (0, _react2.useTheme)();
  const PluginContent = pluginContext === null || pluginContext === void 0 ? void 0 : (_pluginContext$visibl = pluginContext.visiblePlugin) === null || _pluginContext$visibl === void 0 ? void 0 : _pluginContext$visibl.content;
  const pluginResize = (0, _react2.useDragResize)({
    defaultSizeRelation: 1 / 3,
    direction: 'horizontal',
    initiallyHidden: pluginContext !== null && pluginContext !== void 0 && pluginContext.visiblePlugin ? undefined : 'first',
    onHiddenElementChange(resizableElement) {
      if (resizableElement === 'first') {
        pluginContext === null || pluginContext === void 0 ? void 0 : pluginContext.setVisiblePlugin(null);
      }
    },
    sizeThresholdSecond: 200,
    storageKey: 'docExplorerFlex'
  });
  const editorResize = (0, _react2.useDragResize)({
    direction: 'horizontal',
    storageKey: 'editorFlex'
  });
  const editorToolsResize = (0, _react2.useDragResize)({
    defaultSizeRelation: 3,
    direction: 'vertical',
    initiallyHidden: (() => {
      if (props.defaultEditorToolsVisibility === 'variables' || props.defaultEditorToolsVisibility === 'headers') {
        return;
      }
      if (typeof props.defaultEditorToolsVisibility === 'boolean') {
        return props.defaultEditorToolsVisibility ? undefined : 'second';
      }
      return editorContext.initialVariables || editorContext.initialHeaders ? undefined : 'second';
    })(),
    sizeThresholdSecond: 60,
    storageKey: 'secondaryEditorFlex'
  });
  const [activeSecondaryEditor, setActiveSecondaryEditor] = (0, _react.useState)(() => {
    if (props.defaultEditorToolsVisibility === 'variables' || props.defaultEditorToolsVisibility === 'headers') {
      return props.defaultEditorToolsVisibility;
    }
    return !editorContext.initialVariables && editorContext.initialHeaders && isHeadersEditorEnabled ? 'headers' : 'variables';
  });
  const [showDialog, setShowDialog] = (0, _react.useState)(null);
  const [clearStorageStatus, setClearStorageStatus] = (0, _react.useState)(null);
  const children = _react.default.Children.toArray(props.children);
  const logo = children.find(child => isChildComponentType(child, GraphiQL.Logo)) || /*#__PURE__*/_react.default.createElement(GraphiQL.Logo, null);
  const toolbar = children.find(child => isChildComponentType(child, GraphiQL.Toolbar)) || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_react2.ToolbarButton, {
    onClick: prettify,
    label: "Prettify query (Shift-Ctrl-P)"
  }, /*#__PURE__*/_react.default.createElement(_react2.PrettifyIcon, {
    className: "graphiql-toolbar-icon",
    "aria-hidden": "true"
  })), /*#__PURE__*/_react.default.createElement(_react2.ToolbarButton, {
    onClick: merge,
    label: "Merge fragments into query (Shift-Ctrl-M)"
  }, /*#__PURE__*/_react.default.createElement(_react2.MergeIcon, {
    className: "graphiql-toolbar-icon",
    "aria-hidden": "true"
  })), /*#__PURE__*/_react.default.createElement(_react2.ToolbarButton, {
    onClick: copy,
    label: "Copy query (Shift-Ctrl-C)"
  }, /*#__PURE__*/_react.default.createElement(_react2.CopyIcon, {
    className: "graphiql-toolbar-icon",
    "aria-hidden": "true"
  })), ((_props$toolbar = props.toolbar) === null || _props$toolbar === void 0 ? void 0 : _props$toolbar.additionalContent) && props.toolbar.additionalContent, ((_props$toolbar2 = props.toolbar) === null || _props$toolbar2 === void 0 ? void 0 : _props$toolbar2.additionalComponent) && /*#__PURE__*/_react.default.createElement(props.toolbar.additionalComponent, null));
  const footer = children.find(child => isChildComponentType(child, GraphiQL.Footer));
  const onClickReference = (0, _react.useCallback)(() => {
    if (pluginResize.hiddenElement === 'first') {
      pluginResize.setHiddenElement(null);
    }
  }, [pluginResize]);
  const handleClearData = (0, _react.useCallback)(() => {
    try {
      storageContext === null || storageContext === void 0 ? void 0 : storageContext.clear();
      setClearStorageStatus('success');
    } catch {
      setClearStorageStatus('error');
    }
  }, [storageContext]);
  const handlePersistHeaders = (0, _react.useCallback)(event => {
    editorContext.setShouldPersistHeaders(event.currentTarget.dataset.value === 'true');
  }, [editorContext]);
  const handleChangeTheme = (0, _react.useCallback)(event => {
    const selectedTheme = event.currentTarget.dataset.theme;
    setTheme(selectedTheme || null);
  }, [setTheme]);
  const handleAddTab = editorContext.addTab;
  const handleRefetchSchema = schemaContext.introspect;
  const handleReorder = editorContext.moveTab;
  const handleShowDialog = (0, _react.useCallback)(event => {
    setShowDialog(event.currentTarget.dataset.value);
  }, []);
  const handlePluginClick = (0, _react.useCallback)(e => {
    const context = pluginContext;
    const pluginIndex = Number(e.currentTarget.dataset.index);
    const plugin = context.plugins.find((_, index) => pluginIndex === index);
    const isVisible = plugin === context.visiblePlugin;
    if (isVisible) {
      context.setVisiblePlugin(null);
      pluginResize.setHiddenElement('first');
    } else {
      context.setVisiblePlugin(plugin);
      pluginResize.setHiddenElement(null);
    }
  }, [pluginContext, pluginResize]);
  const handleToolsTabClick = (0, _react.useCallback)(event => {
    if (editorToolsResize.hiddenElement === 'second') {
      editorToolsResize.setHiddenElement(null);
    }
    setActiveSecondaryEditor(event.currentTarget.dataset.name);
  }, [editorToolsResize]);
  const toggleEditorTools = (0, _react.useCallback)(() => {
    editorToolsResize.setHiddenElement(editorToolsResize.hiddenElement === 'second' ? null : 'second');
  }, [editorToolsResize]);
  const handleOpenShortKeysDialog = (0, _react.useCallback)(isOpen => {
    if (!isOpen) {
      setShowDialog(null);
    }
  }, []);
  const handleOpenSettingsDialog = (0, _react.useCallback)(isOpen => {
    if (!isOpen) {
      setShowDialog(null);
      setClearStorageStatus(null);
    }
  }, []);
  const addTab = /*#__PURE__*/_react.default.createElement(_react2.Tooltip, {
    label: "Add tab"
  }, /*#__PURE__*/_react.default.createElement(_react2.UnStyledButton, {
    type: "button",
    className: "graphiql-tab-add",
    onClick: handleAddTab,
    "aria-label": "Add tab"
  }, /*#__PURE__*/_react.default.createElement(_react2.PlusIcon, {
    "aria-hidden": "true"
  })));
  return /*#__PURE__*/_react.default.createElement(_react2.Tooltip.Provider, null, /*#__PURE__*/_react.default.createElement("div", {
    "data-testid": "graphiql-container",
    className: "graphiql-container"
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-sidebar"
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-sidebar-section"
  }, pluginContext === null || pluginContext === void 0 ? void 0 : pluginContext.plugins.map((plugin, index) => {
    const isVisible = plugin === pluginContext.visiblePlugin;
    const label = `${isVisible ? 'Hide' : 'Show'} ${plugin.title}`;
    const Icon = plugin.icon;
    return /*#__PURE__*/_react.default.createElement(_react2.Tooltip, {
      key: plugin.title,
      label: label
    }, /*#__PURE__*/_react.default.createElement(_react2.UnStyledButton, {
      type: "button",
      className: isVisible ? 'active' : '',
      onClick: handlePluginClick,
      "data-index": index,
      "aria-label": label
    }, /*#__PURE__*/_react.default.createElement(Icon, {
      "aria-hidden": "true"
    })));
  })), /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-sidebar-section"
  }, /*#__PURE__*/_react.default.createElement(_react2.Tooltip, {
    label: "Re-fetch GraphQL schema"
  }, /*#__PURE__*/_react.default.createElement(_react2.UnStyledButton, {
    type: "button",
    disabled: schemaContext.isFetching,
    onClick: handleRefetchSchema,
    "aria-label": "Re-fetch GraphQL schema"
  }, /*#__PURE__*/_react.default.createElement(_react2.ReloadIcon, {
    className: schemaContext.isFetching ? 'graphiql-spin' : '',
    "aria-hidden": "true"
  }))), /*#__PURE__*/_react.default.createElement(_react2.Tooltip, {
    label: "Open short keys dialog"
  }, /*#__PURE__*/_react.default.createElement(_react2.UnStyledButton, {
    type: "button",
    "data-value": "short-keys",
    onClick: handleShowDialog,
    "aria-label": "Open short keys dialog"
  }, /*#__PURE__*/_react.default.createElement(_react2.KeyboardShortcutIcon, {
    "aria-hidden": "true"
  }))), /*#__PURE__*/_react.default.createElement(_react2.Tooltip, {
    label: "Open settings dialog"
  }, /*#__PURE__*/_react.default.createElement(_react2.UnStyledButton, {
    type: "button",
    "data-value": "settings",
    onClick: handleShowDialog,
    "aria-label": "Open settings dialog"
  }, /*#__PURE__*/_react.default.createElement(_react2.SettingsIcon, {
    "aria-hidden": "true"
  }))))), /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-main"
  }, /*#__PURE__*/_react.default.createElement("div", {
    ref: pluginResize.firstRef,
    style: {
      // Make sure the container shrinks when containing long
      // non-breaking texts
      minWidth: '200px'
    }
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-plugin"
  }, PluginContent ? /*#__PURE__*/_react.default.createElement(PluginContent, null) : null)), (pluginContext === null || pluginContext === void 0 ? void 0 : pluginContext.visiblePlugin) && /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-horizontal-drag-bar",
    ref: pluginResize.dragBarRef
  }), /*#__PURE__*/_react.default.createElement("div", {
    ref: pluginResize.secondRef,
    className: "graphiql-sessions"
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-session-header"
  }, props.disableTabs ? null : /*#__PURE__*/_react.default.createElement(_react2.Tabs, {
    values: editorContext.tabs,
    onReorder: handleReorder,
    "aria-label": "Select active operation"
  }, editorContext.tabs.length > 1 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, editorContext.tabs.map((tab, index) => /*#__PURE__*/_react.default.createElement(_react2.Tab, {
    key: tab.id,
    value: tab,
    isActive: index === editorContext.activeTabIndex
  }, /*#__PURE__*/_react.default.createElement(_react2.Tab.Button, {
    "aria-controls": "graphiql-session",
    id: `graphiql-session-tab-${index}`,
    onClick: () => {
      executionContext.stop();
      editorContext.changeTab(index);
    }
  }, tab.title), /*#__PURE__*/_react.default.createElement(_react2.Tab.Close, {
    onClick: () => {
      if (editorContext.activeTabIndex === index) {
        executionContext.stop();
      }
      editorContext.closeTab(index);
    }
  }))), addTab)), /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-session-header-right"
  }, editorContext.tabs.length === 1 && addTab, logo)), /*#__PURE__*/_react.default.createElement("div", {
    role: "tabpanel",
    id: "graphiql-session",
    className: "graphiql-session",
    "aria-labelledby": `graphiql-session-tab-${editorContext.activeTabIndex}`
  }, /*#__PURE__*/_react.default.createElement("div", {
    ref: editorResize.firstRef
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: `graphiql-editors${editorContext.tabs.length === 1 ? ' full-height' : ''}`
  }, /*#__PURE__*/_react.default.createElement("div", {
    ref: editorToolsResize.firstRef
  }, /*#__PURE__*/_react.default.createElement("section", {
    className: "graphiql-query-editor",
    "aria-label": "Query Editor"
  }, /*#__PURE__*/_react.default.createElement(_react2.QueryEditor, {
    editorTheme: props.editorTheme,
    keyMap: props.keyMap,
    onClickReference: onClickReference,
    onCopyQuery: props.onCopyQuery,
    onEdit: props.onEditQuery,
    readOnly: props.readOnly
  }), /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-toolbar",
    role: "toolbar",
    "aria-label": "Editor Commands"
  }, /*#__PURE__*/_react.default.createElement(_react2.ExecuteButton, null), toolbar))), /*#__PURE__*/_react.default.createElement("div", {
    ref: editorToolsResize.dragBarRef
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-editor-tools"
  }, /*#__PURE__*/_react.default.createElement(_react2.UnStyledButton, {
    type: "button",
    className: activeSecondaryEditor === 'variables' && editorToolsResize.hiddenElement !== 'second' ? 'active' : '',
    onClick: handleToolsTabClick,
    "data-name": "variables"
  }, "Variables"), isHeadersEditorEnabled && /*#__PURE__*/_react.default.createElement(_react2.UnStyledButton, {
    type: "button",
    className: activeSecondaryEditor === 'headers' && editorToolsResize.hiddenElement !== 'second' ? 'active' : '',
    onClick: handleToolsTabClick,
    "data-name": "headers"
  }, "Headers"), /*#__PURE__*/_react.default.createElement(_react2.Tooltip, {
    label: editorToolsResize.hiddenElement === 'second' ? 'Show editor tools' : 'Hide editor tools'
  }, /*#__PURE__*/_react.default.createElement(_react2.UnStyledButton, {
    type: "button",
    onClick: toggleEditorTools,
    "aria-label": editorToolsResize.hiddenElement === 'second' ? 'Show editor tools' : 'Hide editor tools',
    className: "graphiql-toggle-editor-tools"
  }, editorToolsResize.hiddenElement === 'second' ? /*#__PURE__*/_react.default.createElement(_react2.ChevronUpIcon, {
    className: "graphiql-chevron-icon",
    "aria-hidden": "true"
  }) : /*#__PURE__*/_react.default.createElement(_react2.ChevronDownIcon, {
    className: "graphiql-chevron-icon",
    "aria-hidden": "true"
  }))))), /*#__PURE__*/_react.default.createElement("div", {
    ref: editorToolsResize.secondRef
  }, /*#__PURE__*/_react.default.createElement("section", {
    className: "graphiql-editor-tool",
    "aria-label": activeSecondaryEditor === 'variables' ? 'Variables' : 'Headers'
  }, /*#__PURE__*/_react.default.createElement(_react2.VariableEditor, {
    editorTheme: props.editorTheme,
    isHidden: activeSecondaryEditor !== 'variables',
    keyMap: props.keyMap,
    onEdit: props.onEditVariables,
    onClickReference: onClickReference,
    readOnly: props.readOnly
  }), isHeadersEditorEnabled && /*#__PURE__*/_react.default.createElement(_react2.HeaderEditor, {
    editorTheme: props.editorTheme,
    isHidden: activeSecondaryEditor !== 'headers',
    keyMap: props.keyMap,
    onEdit: props.onEditHeaders,
    readOnly: props.readOnly
  }))))), /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-horizontal-drag-bar",
    ref: editorResize.dragBarRef
  }), /*#__PURE__*/_react.default.createElement("div", {
    ref: editorResize.secondRef
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-response"
  }, executionContext.isFetching ? /*#__PURE__*/_react.default.createElement(_react2.Spinner, null) : null, /*#__PURE__*/_react.default.createElement(_react2.ResponseEditor, {
    editorTheme: props.editorTheme,
    responseTooltip: props.responseTooltip,
    keyMap: props.keyMap
  }), footer))))), /*#__PURE__*/_react.default.createElement(_react2.Dialog, {
    open: showDialog === 'short-keys',
    onOpenChange: handleOpenShortKeysDialog
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-dialog-header"
  }, /*#__PURE__*/_react.default.createElement(_react2.Dialog.Title, {
    className: "graphiql-dialog-title"
  }, "Short Keys"), /*#__PURE__*/_react.default.createElement(_react2.Dialog.Close, null)), /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-dialog-section"
  }, /*#__PURE__*/_react.default.createElement(ShortKeys, {
    keyMap: props.keyMap || 'sublime'
  }))), /*#__PURE__*/_react.default.createElement(_react2.Dialog, {
    open: showDialog === 'settings',
    onOpenChange: handleOpenSettingsDialog
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-dialog-header"
  }, /*#__PURE__*/_react.default.createElement(_react2.Dialog.Title, {
    className: "graphiql-dialog-title"
  }, "Settings"), /*#__PURE__*/_react.default.createElement(_react2.Dialog.Close, null)), props.showPersistHeadersSettings ? /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-dialog-section"
  }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-dialog-section-title"
  }, "Persist headers"), /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-dialog-section-caption"
  }, "Save headers upon reloading.", ' ', /*#__PURE__*/_react.default.createElement("span", {
    className: "graphiql-warning-text"
  }, "Only enable if you trust this device."))), /*#__PURE__*/_react.default.createElement(_react2.ButtonGroup, null, /*#__PURE__*/_react.default.createElement(_react2.Button, {
    type: "button",
    id: "enable-persist-headers",
    className: editorContext.shouldPersistHeaders ? 'active' : '',
    "data-value": "true",
    onClick: handlePersistHeaders
  }, "On"), /*#__PURE__*/_react.default.createElement(_react2.Button, {
    type: "button",
    id: "disable-persist-headers",
    className: editorContext.shouldPersistHeaders ? '' : 'active',
    onClick: handlePersistHeaders
  }, "Off"))) : null, /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-dialog-section"
  }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-dialog-section-title"
  }, "Theme"), /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-dialog-section-caption"
  }, "Adjust how the interface looks like.")), /*#__PURE__*/_react.default.createElement(_react2.ButtonGroup, null, /*#__PURE__*/_react.default.createElement(_react2.Button, {
    type: "button",
    className: theme === null ? 'active' : '',
    onClick: handleChangeTheme
  }, "System"), /*#__PURE__*/_react.default.createElement(_react2.Button, {
    type: "button",
    className: theme === 'light' ? 'active' : '',
    "data-theme": "light",
    onClick: handleChangeTheme
  }, "Light"), /*#__PURE__*/_react.default.createElement(_react2.Button, {
    type: "button",
    className: theme === 'dark' ? 'active' : '',
    "data-theme": "dark",
    onClick: handleChangeTheme
  }, "Dark"))), storageContext ? /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-dialog-section"
  }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-dialog-section-title"
  }, "Clear storage"), /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-dialog-section-caption"
  }, "Remove all locally stored data and start fresh.")), /*#__PURE__*/_react.default.createElement(_react2.Button, {
    type: "button",
    state: clearStorageStatus || undefined,
    disabled: clearStorageStatus === 'success',
    onClick: handleClearData
  }, {
    success: 'Cleared data',
    error: 'Failed'
  }[clearStorageStatus] || 'Clear data')) : null)));
}
const modifier = typeof window !== 'undefined' && window.navigator.platform.toLowerCase().indexOf('mac') === 0 ? 'Cmd' : 'Ctrl';
const SHORT_KEYS = Object.entries({
  'Search in editor': [modifier, 'F'],
  'Search in documentation': [modifier, 'K'],
  'Execute query': [modifier, 'Enter'],
  'Prettify editors': ['Ctrl', 'Shift', 'P'],
  'Merge fragments definitions into operation definition': ['Ctrl', 'Shift', 'M'],
  'Copy query': ['Ctrl', 'Shift', 'C'],
  'Re-fetch schema using introspection': ['Ctrl', 'Shift', 'R']
});
function ShortKeys(_ref2) {
  let {
    keyMap
  } = _ref2;
  return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("table", {
    className: "graphiql-table"
  }, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "Short Key"), /*#__PURE__*/_react.default.createElement("th", null, "Function"))), /*#__PURE__*/_react.default.createElement("tbody", null, SHORT_KEYS.map(_ref3 => {
    let [title, keys] = _ref3;
    return /*#__PURE__*/_react.default.createElement("tr", {
      key: title
    }, /*#__PURE__*/_react.default.createElement("td", null, keys.map((key, index, array) => /*#__PURE__*/_react.default.createElement(_react.Fragment, {
      key: key
    }, /*#__PURE__*/_react.default.createElement("code", {
      className: "graphiql-key"
    }, key), index !== array.length - 1 && ' + '))), /*#__PURE__*/_react.default.createElement("td", null, title));
  }))), /*#__PURE__*/_react.default.createElement("p", null, "The editors use", ' ', /*#__PURE__*/_react.default.createElement("a", {
    href: "https://codemirror.net/5/doc/manual.html#keymaps",
    target: "_blank",
    rel: "noopener noreferrer"
  }, "CodeMirror Key Maps"), ' ', "that add more short keys. This instance of Graph", /*#__PURE__*/_react.default.createElement("em", null, "i"), "QL uses", ' ', /*#__PURE__*/_react.default.createElement("code", null, keyMap), "."));
}

// Configure the UI by providing this Component as a child of GraphiQL.
function GraphiQLLogo(props) {
  return /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-logo"
  }, props.children || /*#__PURE__*/_react.default.createElement("a", {
    className: "graphiql-logo-link",
    href: "https://github.com/graphql/graphiql",
    target: "_blank",
    rel: "noreferrer"
  }, "Graph", /*#__PURE__*/_react.default.createElement("em", null, "i"), "QL"));
}
GraphiQLLogo.displayName = 'GraphiQLLogo';

// Configure the UI by providing this Component as a child of GraphiQL.
function GraphiQLToolbar(props) {
  // eslint-disable-next-line react/jsx-no-useless-fragment
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, props.children);
}
GraphiQLToolbar.displayName = 'GraphiQLToolbar';

// Configure the UI by providing this Component as a child of GraphiQL.
function GraphiQLFooter(props) {
  return /*#__PURE__*/_react.default.createElement("div", {
    className: "graphiql-footer"
  }, props.children);
}
GraphiQLFooter.displayName = 'GraphiQLFooter';

// Determines if the React child is of the same type of the provided React component
function isChildComponentType(child, component) {
  var _child$type;
  if (child !== null && child !== void 0 && (_child$type = child.type) !== null && _child$type !== void 0 && _child$type.displayName && child.type.displayName === component.displayName) {
    return true;
  }
  return child.type === component;
}

/***/ }),

/***/ "../../graphql-language-service/esm/index.js":
/*!***************************************************!*\
  !*** ../../graphql-language-service/esm/index.js ***!
  \***************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "CharacterStream", ({
  enumerable: true,
  get: function () {
    return _parser.CharacterStream;
  }
}));
Object.defineProperty(exports, "CompletionItemKind", ({
  enumerable: true,
  get: function () {
    return _types.CompletionItemKind;
  }
}));
Object.defineProperty(exports, "DIAGNOSTIC_SEVERITY", ({
  enumerable: true,
  get: function () {
    return _interface.DIAGNOSTIC_SEVERITY;
  }
}));
Object.defineProperty(exports, "FileChangeTypeKind", ({
  enumerable: true,
  get: function () {
    return _types.FileChangeTypeKind;
  }
}));
Object.defineProperty(exports, "LexRules", ({
  enumerable: true,
  get: function () {
    return _parser.LexRules;
  }
}));
Object.defineProperty(exports, "ParseRules", ({
  enumerable: true,
  get: function () {
    return _parser.ParseRules;
  }
}));
Object.defineProperty(exports, "Position", ({
  enumerable: true,
  get: function () {
    return _utils.Position;
  }
}));
Object.defineProperty(exports, "Range", ({
  enumerable: true,
  get: function () {
    return _utils.Range;
  }
}));
Object.defineProperty(exports, "RuleKinds", ({
  enumerable: true,
  get: function () {
    return _parser.RuleKinds;
  }
}));
Object.defineProperty(exports, "SEVERITY", ({
  enumerable: true,
  get: function () {
    return _interface.SEVERITY;
  }
}));
Object.defineProperty(exports, "SuggestionCommand", ({
  enumerable: true,
  get: function () {
    return _interface.SuggestionCommand;
  }
}));
Object.defineProperty(exports, "canUseDirective", ({
  enumerable: true,
  get: function () {
    return _interface.canUseDirective;
  }
}));
Object.defineProperty(exports, "collectVariables", ({
  enumerable: true,
  get: function () {
    return _utils.collectVariables;
  }
}));
Object.defineProperty(exports, "getASTNodeAtPosition", ({
  enumerable: true,
  get: function () {
    return _utils.getASTNodeAtPosition;
  }
}));
Object.defineProperty(exports, "getAutocompleteSuggestions", ({
  enumerable: true,
  get: function () {
    return _interface.getAutocompleteSuggestions;
  }
}));
Object.defineProperty(exports, "getDefinitionQueryResultForDefinitionNode", ({
  enumerable: true,
  get: function () {
    return _interface.getDefinitionQueryResultForDefinitionNode;
  }
}));
Object.defineProperty(exports, "getDefinitionQueryResultForField", ({
  enumerable: true,
  get: function () {
    return _interface.getDefinitionQueryResultForField;
  }
}));
Object.defineProperty(exports, "getDefinitionQueryResultForFragmentSpread", ({
  enumerable: true,
  get: function () {
    return _interface.getDefinitionQueryResultForFragmentSpread;
  }
}));
Object.defineProperty(exports, "getDefinitionQueryResultForNamedType", ({
  enumerable: true,
  get: function () {
    return _interface.getDefinitionQueryResultForNamedType;
  }
}));
Object.defineProperty(exports, "getDefinitionState", ({
  enumerable: true,
  get: function () {
    return _interface.getDefinitionState;
  }
}));
Object.defineProperty(exports, "getDiagnostics", ({
  enumerable: true,
  get: function () {
    return _interface.getDiagnostics;
  }
}));
Object.defineProperty(exports, "getFieldDef", ({
  enumerable: true,
  get: function () {
    return _interface.getFieldDef;
  }
}));
Object.defineProperty(exports, "getFragmentDefinitions", ({
  enumerable: true,
  get: function () {
    return _interface.getFragmentDefinitions;
  }
}));
Object.defineProperty(exports, "getFragmentDependencies", ({
  enumerable: true,
  get: function () {
    return _utils.getFragmentDependencies;
  }
}));
Object.defineProperty(exports, "getFragmentDependenciesForAST", ({
  enumerable: true,
  get: function () {
    return _utils.getFragmentDependenciesForAST;
  }
}));
Object.defineProperty(exports, "getHoverInformation", ({
  enumerable: true,
  get: function () {
    return _interface.getHoverInformation;
  }
}));
Object.defineProperty(exports, "getOperationASTFacts", ({
  enumerable: true,
  get: function () {
    return _utils.getOperationASTFacts;
  }
}));
Object.defineProperty(exports, "getOperationFacts", ({
  enumerable: true,
  get: function () {
    return _utils.getOperationFacts;
  }
}));
Object.defineProperty(exports, "getOutline", ({
  enumerable: true,
  get: function () {
    return _interface.getOutline;
  }
}));
Object.defineProperty(exports, "getQueryFacts", ({
  enumerable: true,
  get: function () {
    return _utils.getQueryFacts;
  }
}));
Object.defineProperty(exports, "getRange", ({
  enumerable: true,
  get: function () {
    return _interface.getRange;
  }
}));
Object.defineProperty(exports, "getTokenAtPosition", ({
  enumerable: true,
  get: function () {
    return _interface.getTokenAtPosition;
  }
}));
Object.defineProperty(exports, "getTypeInfo", ({
  enumerable: true,
  get: function () {
    return _interface.getTypeInfo;
  }
}));
Object.defineProperty(exports, "getVariableCompletions", ({
  enumerable: true,
  get: function () {
    return _interface.getVariableCompletions;
  }
}));
Object.defineProperty(exports, "getVariablesJSONSchema", ({
  enumerable: true,
  get: function () {
    return _utils.getVariablesJSONSchema;
  }
}));
Object.defineProperty(exports, "isIgnored", ({
  enumerable: true,
  get: function () {
    return _parser.isIgnored;
  }
}));
Object.defineProperty(exports, "list", ({
  enumerable: true,
  get: function () {
    return _parser.list;
  }
}));
Object.defineProperty(exports, "offsetToPosition", ({
  enumerable: true,
  get: function () {
    return _utils.offsetToPosition;
  }
}));
Object.defineProperty(exports, "onlineParser", ({
  enumerable: true,
  get: function () {
    return _parser.onlineParser;
  }
}));
Object.defineProperty(exports, "opt", ({
  enumerable: true,
  get: function () {
    return _parser.opt;
  }
}));
Object.defineProperty(exports, "p", ({
  enumerable: true,
  get: function () {
    return _parser.p;
  }
}));
Object.defineProperty(exports, "pointToOffset", ({
  enumerable: true,
  get: function () {
    return _utils.pointToOffset;
  }
}));
Object.defineProperty(exports, "t", ({
  enumerable: true,
  get: function () {
    return _parser.t;
  }
}));
Object.defineProperty(exports, "validateQuery", ({
  enumerable: true,
  get: function () {
    return _interface.validateQuery;
  }
}));
Object.defineProperty(exports, "validateWithCustomRules", ({
  enumerable: true,
  get: function () {
    return _utils.validateWithCustomRules;
  }
}));
var _interface = __webpack_require__(/*! ./interface */ "../../graphql-language-service/esm/interface/index.js");
var _parser = __webpack_require__(/*! ./parser */ "../../graphql-language-service/esm/parser/index.js");
var _types = __webpack_require__(/*! ./types */ "../../graphql-language-service/esm/types.js");
var _utils = __webpack_require__(/*! ./utils */ "../../graphql-language-service/esm/utils/index.js");

/***/ }),

/***/ "../../graphql-language-service/esm/interface/autocompleteUtils.js":
/*!*************************************************************************!*\
  !*** ../../graphql-language-service/esm/interface/autocompleteUtils.js ***!
  \*************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.forEachState = forEachState;
exports.getDefinitionState = getDefinitionState;
exports.getFieldDef = getFieldDef;
exports.hintList = hintList;
exports.objectValues = objectValues;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
function getDefinitionState(tokenState) {
  let definitionState;
  forEachState(tokenState, state => {
    switch (state.kind) {
      case 'Query':
      case 'ShortQuery':
      case 'Mutation':
      case 'Subscription':
      case 'FragmentDefinition':
        definitionState = state;
        break;
    }
  });
  return definitionState;
}
function getFieldDef(schema, type, fieldName) {
  if (fieldName === _graphql.SchemaMetaFieldDef.name && schema.getQueryType() === type) {
    return _graphql.SchemaMetaFieldDef;
  }
  if (fieldName === _graphql.TypeMetaFieldDef.name && schema.getQueryType() === type) {
    return _graphql.TypeMetaFieldDef;
  }
  if (fieldName === _graphql.TypeNameMetaFieldDef.name && (0, _graphql.isCompositeType)(type)) {
    return _graphql.TypeNameMetaFieldDef;
  }
  if ('getFields' in type) {
    return type.getFields()[fieldName];
  }
  return null;
}
function forEachState(stack, fn) {
  const reverseStateStack = [];
  let state = stack;
  while (state === null || state === void 0 ? void 0 : state.kind) {
    reverseStateStack.push(state);
    state = state.prevState;
  }
  for (let i = reverseStateStack.length - 1; i >= 0; i--) {
    fn(reverseStateStack[i]);
  }
}
function objectValues(object) {
  const keys = Object.keys(object);
  const len = keys.length;
  const values = new Array(len);
  for (let i = 0; i < len; ++i) {
    values[i] = object[keys[i]];
  }
  return values;
}
function hintList(token, list) {
  return filterAndSortList(list, normalizeText(token.string));
}
function filterAndSortList(list, text) {
  if (!text) {
    return filterNonEmpty(list, entry => !entry.isDeprecated);
  }
  const byProximity = list.map(entry => ({
    proximity: getProximity(normalizeText(entry.label), text),
    entry
  }));
  return filterNonEmpty(filterNonEmpty(byProximity, pair => pair.proximity <= 2), pair => !pair.entry.isDeprecated).sort((a, b) => (a.entry.isDeprecated ? 1 : 0) - (b.entry.isDeprecated ? 1 : 0) || a.proximity - b.proximity || a.entry.label.length - b.entry.label.length).map(pair => pair.entry);
}
function filterNonEmpty(array, predicate) {
  const filtered = array.filter(predicate);
  return filtered.length === 0 ? array : filtered;
}
function normalizeText(text) {
  return text.toLowerCase().replaceAll(/\W/g, '');
}
function getProximity(suggestion, text) {
  let proximity = lexicalDistance(text, suggestion);
  if (suggestion.length > text.length) {
    proximity -= suggestion.length - text.length - 1;
    proximity += suggestion.indexOf(text) === 0 ? 0 : 0.5;
  }
  return proximity;
}
function lexicalDistance(a, b) {
  let i;
  let j;
  const d = [];
  const aLength = a.length;
  const bLength = b.length;
  for (i = 0; i <= aLength; i++) {
    d[i] = [i];
  }
  for (j = 1; j <= bLength; j++) {
    d[0][j] = j;
  }
  for (i = 1; i <= aLength; i++) {
    for (j = 1; j <= bLength; j++) {
      const cost = a[i - 1] === b[j - 1] ? 0 : 1;
      d[i][j] = Math.min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost);
      if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {
        d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + cost);
      }
    }
  }
  return d[aLength][bLength];
}

/***/ }),

/***/ "../../graphql-language-service/esm/interface/getAutocompleteSuggestions.js":
/*!**********************************************************************************!*\
  !*** ../../graphql-language-service/esm/interface/getAutocompleteSuggestions.js ***!
  \**********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.SuggestionCommand = exports.GraphQLDocumentMode = void 0;
exports.canUseDirective = canUseDirective;
exports.getAutocompleteSuggestions = getAutocompleteSuggestions;
exports.getFragmentDefinitions = getFragmentDefinitions;
exports.getTokenAtPosition = getTokenAtPosition;
exports.getTypeInfo = getTypeInfo;
exports.getVariableCompletions = getVariableCompletions;
exports.runOnlineParser = runOnlineParser;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
var _types = __webpack_require__(/*! ../types */ "../../graphql-language-service/esm/types.js");
var _parser = __webpack_require__(/*! ../parser */ "../../graphql-language-service/esm/parser/index.js");
var _autocompleteUtils = __webpack_require__(/*! ./autocompleteUtils */ "../../graphql-language-service/esm/interface/autocompleteUtils.js");
const SuggestionCommand = {
  command: 'editor.action.triggerSuggest',
  title: 'Suggestions'
};
exports.SuggestionCommand = SuggestionCommand;
const collectFragmentDefs = op => {
  const externalFragments = [];
  if (op) {
    try {
      (0, _graphql.visit)((0, _graphql.parse)(op), {
        FragmentDefinition(def) {
          externalFragments.push(def);
        }
      });
    } catch (_a) {
      return [];
    }
  }
  return externalFragments;
};
const typeSystemKinds = [_graphql.Kind.SCHEMA_DEFINITION, _graphql.Kind.OPERATION_TYPE_DEFINITION, _graphql.Kind.SCALAR_TYPE_DEFINITION, _graphql.Kind.OBJECT_TYPE_DEFINITION, _graphql.Kind.INTERFACE_TYPE_DEFINITION, _graphql.Kind.UNION_TYPE_DEFINITION, _graphql.Kind.ENUM_TYPE_DEFINITION, _graphql.Kind.INPUT_OBJECT_TYPE_DEFINITION, _graphql.Kind.DIRECTIVE_DEFINITION, _graphql.Kind.SCHEMA_EXTENSION, _graphql.Kind.SCALAR_TYPE_EXTENSION, _graphql.Kind.OBJECT_TYPE_EXTENSION, _graphql.Kind.INTERFACE_TYPE_EXTENSION, _graphql.Kind.UNION_TYPE_EXTENSION, _graphql.Kind.ENUM_TYPE_EXTENSION, _graphql.Kind.INPUT_OBJECT_TYPE_EXTENSION];
const hasTypeSystemDefinitions = sdl => {
  let hasTypeSystemDef = false;
  if (sdl) {
    try {
      (0, _graphql.visit)((0, _graphql.parse)(sdl), {
        enter(node) {
          if (node.kind === 'Document') {
            return;
          }
          if (typeSystemKinds.includes(node.kind)) {
            hasTypeSystemDef = true;
            return _graphql.BREAK;
          }
          return false;
        }
      });
    } catch (_a) {
      return hasTypeSystemDef;
    }
  }
  return hasTypeSystemDef;
};
function getAutocompleteSuggestions(schema, queryText, cursor, contextToken, fragmentDefs, options) {
  var _a;
  const opts = Object.assign(Object.assign({}, options), {
    schema
  });
  const token = contextToken || getTokenAtPosition(queryText, cursor, 1);
  const state = token.state.kind === 'Invalid' ? token.state.prevState : token.state;
  const mode = (options === null || options === void 0 ? void 0 : options.mode) || getDocumentMode(queryText, options === null || options === void 0 ? void 0 : options.uri);
  if (!state) {
    return [];
  }
  const {
    kind,
    step,
    prevState
  } = state;
  const typeInfo = getTypeInfo(schema, token.state);
  if (kind === _parser.RuleKinds.DOCUMENT) {
    if (mode === GraphQLDocumentMode.TYPE_SYSTEM) {
      return getSuggestionsForTypeSystemDefinitions(token);
    }
    return getSuggestionsForExecutableDefinitions(token);
  }
  if (kind === _parser.RuleKinds.EXTEND_DEF) {
    return getSuggestionsForExtensionDefinitions(token);
  }
  if (((_a = prevState === null || prevState === void 0 ? void 0 : prevState.prevState) === null || _a === void 0 ? void 0 : _a.kind) === _parser.RuleKinds.EXTENSION_DEFINITION && state.name) {
    return (0, _autocompleteUtils.hintList)(token, []);
  }
  if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _graphql.Kind.SCALAR_TYPE_EXTENSION) {
    return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(_graphql.isScalarType).map(type => ({
      label: type.name,
      kind: _types.CompletionItemKind.Function
    })));
  }
  if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _graphql.Kind.OBJECT_TYPE_EXTENSION) {
    return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(type => (0, _graphql.isObjectType)(type) && !type.name.startsWith('__')).map(type => ({
      label: type.name,
      kind: _types.CompletionItemKind.Function
    })));
  }
  if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _graphql.Kind.INTERFACE_TYPE_EXTENSION) {
    return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(_graphql.isInterfaceType).map(type => ({
      label: type.name,
      kind: _types.CompletionItemKind.Function
    })));
  }
  if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _graphql.Kind.UNION_TYPE_EXTENSION) {
    return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(_graphql.isUnionType).map(type => ({
      label: type.name,
      kind: _types.CompletionItemKind.Function
    })));
  }
  if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _graphql.Kind.ENUM_TYPE_EXTENSION) {
    return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(type => (0, _graphql.isEnumType)(type) && !type.name.startsWith('__')).map(type => ({
      label: type.name,
      kind: _types.CompletionItemKind.Function
    })));
  }
  if ((prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _graphql.Kind.INPUT_OBJECT_TYPE_EXTENSION) {
    return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(_graphql.isInputObjectType).map(type => ({
      label: type.name,
      kind: _types.CompletionItemKind.Function
    })));
  }
  if (kind === _parser.RuleKinds.IMPLEMENTS || kind === _parser.RuleKinds.NAMED_TYPE && (prevState === null || prevState === void 0 ? void 0 : prevState.kind) === _parser.RuleKinds.IMPLEMENTS) {
    return getSuggestionsForImplements(token, state, schema, queryText, typeInfo);
  }
  if (kind === _parser.RuleKinds.SELECTION_SET || kind === _parser.RuleKinds.FIELD || kind === _parser.RuleKinds.ALIASED_FIELD) {
    return getSuggestionsForFieldNames(token, typeInfo, opts);
  }
  if (kind === _parser.RuleKinds.ARGUMENTS || kind === _parser.RuleKinds.ARGUMENT && step === 0) {
    const {
      argDefs
    } = typeInfo;
    if (argDefs) {
      return (0, _autocompleteUtils.hintList)(token, argDefs.map(argDef => {
        var _a;
        return {
          label: argDef.name,
          insertText: argDef.name + ': ',
          command: SuggestionCommand,
          detail: String(argDef.type),
          documentation: (_a = argDef.description) !== null && _a !== void 0 ? _a : undefined,
          kind: _types.CompletionItemKind.Variable,
          type: argDef.type
        };
      }));
    }
  }
  if ((kind === _parser.RuleKinds.OBJECT_VALUE || kind === _parser.RuleKinds.OBJECT_FIELD && step === 0) && typeInfo.objectFieldDefs) {
    const objectFields = (0, _autocompleteUtils.objectValues)(typeInfo.objectFieldDefs);
    const completionKind = kind === _parser.RuleKinds.OBJECT_VALUE ? _types.CompletionItemKind.Value : _types.CompletionItemKind.Field;
    return (0, _autocompleteUtils.hintList)(token, objectFields.map(field => {
      var _a;
      return {
        label: field.name,
        detail: String(field.type),
        documentation: (_a = field.description) !== null && _a !== void 0 ? _a : undefined,
        kind: completionKind,
        type: field.type
      };
    }));
  }
  if (kind === _parser.RuleKinds.ENUM_VALUE || kind === _parser.RuleKinds.LIST_VALUE && step === 1 || kind === _parser.RuleKinds.OBJECT_FIELD && step === 2 || kind === _parser.RuleKinds.ARGUMENT && step === 2) {
    return getSuggestionsForInputValues(token, typeInfo, queryText, schema);
  }
  if (kind === _parser.RuleKinds.VARIABLE && step === 1) {
    const namedInputType = (0, _graphql.getNamedType)(typeInfo.inputType);
    const variableDefinitions = getVariableCompletions(queryText, schema, token);
    return (0, _autocompleteUtils.hintList)(token, variableDefinitions.filter(v => v.detail === (namedInputType === null || namedInputType === void 0 ? void 0 : namedInputType.name)));
  }
  if (kind === _parser.RuleKinds.TYPE_CONDITION && step === 1 || kind === _parser.RuleKinds.NAMED_TYPE && prevState != null && prevState.kind === _parser.RuleKinds.TYPE_CONDITION) {
    return getSuggestionsForFragmentTypeConditions(token, typeInfo, schema, kind);
  }
  if (kind === _parser.RuleKinds.FRAGMENT_SPREAD && step === 1) {
    return getSuggestionsForFragmentSpread(token, typeInfo, schema, queryText, Array.isArray(fragmentDefs) ? fragmentDefs : collectFragmentDefs(fragmentDefs));
  }
  const unwrappedState = unwrapType(state);
  if (mode === GraphQLDocumentMode.TYPE_SYSTEM && !unwrappedState.needsAdvance && kind === _parser.RuleKinds.NAMED_TYPE || kind === _parser.RuleKinds.LIST_TYPE) {
    if (unwrappedState.kind === _parser.RuleKinds.FIELD_DEF) {
      return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(type => (0, _graphql.isOutputType)(type) && !type.name.startsWith('__')).map(type => ({
        label: type.name,
        kind: _types.CompletionItemKind.Function
      })));
    }
    if (unwrappedState.kind === _parser.RuleKinds.INPUT_VALUE_DEF) {
      return (0, _autocompleteUtils.hintList)(token, Object.values(schema.getTypeMap()).filter(type => (0, _graphql.isInputType)(type) && !type.name.startsWith('__')).map(type => ({
        label: type.name,
        kind: _types.CompletionItemKind.Function
      })));
    }
  }
  if (kind === _parser.RuleKinds.VARIABLE_DEFINITION && step === 2 || kind === _parser.RuleKinds.LIST_TYPE && step === 1 || kind === _parser.RuleKinds.NAMED_TYPE && prevState && (prevState.kind === _parser.RuleKinds.VARIABLE_DEFINITION || prevState.kind === _parser.RuleKinds.LIST_TYPE || prevState.kind === _parser.RuleKinds.NON_NULL_TYPE)) {
    return getSuggestionsForVariableDefinition(token, schema, kind);
  }
  if (kind === _parser.RuleKinds.DIRECTIVE) {
    return getSuggestionsForDirective(token, state, schema, kind);
  }
  return [];
}
const insertSuffix = ' {\n  $1\n}';
const getInsertText = field => {
  const {
    type
  } = field;
  if ((0, _graphql.isCompositeType)(type)) {
    return insertSuffix;
  }
  if ((0, _graphql.isListType)(type) && (0, _graphql.isCompositeType)(type.ofType)) {
    return insertSuffix;
  }
  if ((0, _graphql.isNonNullType)(type)) {
    if ((0, _graphql.isCompositeType)(type.ofType)) {
      return insertSuffix;
    }
    if ((0, _graphql.isListType)(type.ofType) && (0, _graphql.isCompositeType)(type.ofType.ofType)) {
      return insertSuffix;
    }
  }
  return null;
};
function getSuggestionsForTypeSystemDefinitions(token) {
  return (0, _autocompleteUtils.hintList)(token, [{
    label: 'extend',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'type',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'interface',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'union',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'input',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'scalar',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'schema',
    kind: _types.CompletionItemKind.Function
  }]);
}
function getSuggestionsForExecutableDefinitions(token) {
  return (0, _autocompleteUtils.hintList)(token, [{
    label: 'query',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'mutation',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'subscription',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'fragment',
    kind: _types.CompletionItemKind.Function
  }, {
    label: '{',
    kind: _types.CompletionItemKind.Constructor
  }]);
}
function getSuggestionsForExtensionDefinitions(token) {
  return (0, _autocompleteUtils.hintList)(token, [{
    label: 'type',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'interface',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'union',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'input',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'scalar',
    kind: _types.CompletionItemKind.Function
  }, {
    label: 'schema',
    kind: _types.CompletionItemKind.Function
  }]);
}
function getSuggestionsForFieldNames(token, typeInfo, options) {
  var _a;
  if (typeInfo.parentType) {
    const {
      parentType
    } = typeInfo;
    let fields = [];
    if ('getFields' in parentType) {
      fields = (0, _autocompleteUtils.objectValues)(parentType.getFields());
    }
    if ((0, _graphql.isCompositeType)(parentType)) {
      fields.push(_graphql.TypeNameMetaFieldDef);
    }
    if (parentType === ((_a = options === null || options === void 0 ? void 0 : options.schema) === null || _a === void 0 ? void 0 : _a.getQueryType())) {
      fields.push(_graphql.SchemaMetaFieldDef, _graphql.TypeMetaFieldDef);
    }
    return (0, _autocompleteUtils.hintList)(token, fields.map((field, index) => {
      var _a;
      const suggestion = {
        sortText: String(index) + field.name,
        label: field.name,
        detail: String(field.type),
        documentation: (_a = field.description) !== null && _a !== void 0 ? _a : undefined,
        deprecated: Boolean(field.deprecationReason),
        isDeprecated: Boolean(field.deprecationReason),
        deprecationReason: field.deprecationReason,
        kind: _types.CompletionItemKind.Field,
        type: field.type
      };
      if (options === null || options === void 0 ? void 0 : options.fillLeafsOnComplete) {
        const insertText = getInsertText(field);
        if (insertText) {
          suggestion.insertText = field.name + insertText;
          suggestion.insertTextFormat = _types.InsertTextFormat.Snippet;
          suggestion.command = SuggestionCommand;
        }
      }
      return suggestion;
    }));
  }
  return [];
}
function getSuggestionsForInputValues(token, typeInfo, queryText, schema) {
  const namedInputType = (0, _graphql.getNamedType)(typeInfo.inputType);
  const queryVariables = getVariableCompletions(queryText, schema, token).filter(v => v.detail === namedInputType.name);
  if (namedInputType instanceof _graphql.GraphQLEnumType) {
    const values = namedInputType.getValues();
    return (0, _autocompleteUtils.hintList)(token, values.map(value => {
      var _a;
      return {
        label: value.name,
        detail: String(namedInputType),
        documentation: (_a = value.description) !== null && _a !== void 0 ? _a : undefined,
        deprecated: Boolean(value.deprecationReason),
        isDeprecated: Boolean(value.deprecationReason),
        deprecationReason: value.deprecationReason,
        kind: _types.CompletionItemKind.EnumMember,
        type: namedInputType
      };
    }).concat(queryVariables));
  }
  if (namedInputType === _graphql.GraphQLBoolean) {
    return (0, _autocompleteUtils.hintList)(token, queryVariables.concat([{
      label: 'true',
      detail: String(_graphql.GraphQLBoolean),
      documentation: 'Not false.',
      kind: _types.CompletionItemKind.Variable,
      type: _graphql.GraphQLBoolean
    }, {
      label: 'false',
      detail: String(_graphql.GraphQLBoolean),
      documentation: 'Not true.',
      kind: _types.CompletionItemKind.Variable,
      type: _graphql.GraphQLBoolean
    }]));
  }
  return queryVariables;
}
function getSuggestionsForImplements(token, tokenState, schema, documentText, typeInfo) {
  if (tokenState.needsSeparator) {
    return [];
  }
  const typeMap = schema.getTypeMap();
  const schemaInterfaces = (0, _autocompleteUtils.objectValues)(typeMap).filter(_graphql.isInterfaceType);
  const schemaInterfaceNames = schemaInterfaces.map(_ref => {
    let {
      name
    } = _ref;
    return name;
  });
  const inlineInterfaces = new Set();
  runOnlineParser(documentText, (_, state) => {
    var _a, _b, _c, _d, _e;
    if (state.name) {
      if (state.kind === _parser.RuleKinds.INTERFACE_DEF && !schemaInterfaceNames.includes(state.name)) {
        inlineInterfaces.add(state.name);
      }
      if (state.kind === _parser.RuleKinds.NAMED_TYPE && ((_a = state.prevState) === null || _a === void 0 ? void 0 : _a.kind) === _parser.RuleKinds.IMPLEMENTS) {
        if (typeInfo.interfaceDef) {
          const existingType = (_b = typeInfo.interfaceDef) === null || _b === void 0 ? void 0 : _b.getInterfaces().find(_ref2 => {
            let {
              name
            } = _ref2;
            return name === state.name;
          });
          if (existingType) {
            return;
          }
          const type = schema.getType(state.name);
          const interfaceConfig = (_c = typeInfo.interfaceDef) === null || _c === void 0 ? void 0 : _c.toConfig();
          typeInfo.interfaceDef = new _graphql.GraphQLInterfaceType(Object.assign(Object.assign({}, interfaceConfig), {
            interfaces: [...interfaceConfig.interfaces, type || new _graphql.GraphQLInterfaceType({
              name: state.name,
              fields: {}
            })]
          }));
        } else if (typeInfo.objectTypeDef) {
          const existingType = (_d = typeInfo.objectTypeDef) === null || _d === void 0 ? void 0 : _d.getInterfaces().find(_ref3 => {
            let {
              name
            } = _ref3;
            return name === state.name;
          });
          if (existingType) {
            return;
          }
          const type = schema.getType(state.name);
          const objectTypeConfig = (_e = typeInfo.objectTypeDef) === null || _e === void 0 ? void 0 : _e.toConfig();
          typeInfo.objectTypeDef = new _graphql.GraphQLObjectType(Object.assign(Object.assign({}, objectTypeConfig), {
            interfaces: [...objectTypeConfig.interfaces, type || new _graphql.GraphQLInterfaceType({
              name: state.name,
              fields: {}
            })]
          }));
        }
      }
    }
  });
  const currentTypeToExtend = typeInfo.interfaceDef || typeInfo.objectTypeDef;
  const siblingInterfaces = (currentTypeToExtend === null || currentTypeToExtend === void 0 ? void 0 : currentTypeToExtend.getInterfaces()) || [];
  const siblingInterfaceNames = siblingInterfaces.map(_ref4 => {
    let {
      name
    } = _ref4;
    return name;
  });
  const possibleInterfaces = schemaInterfaces.concat([...inlineInterfaces].map(name => ({
    name
  }))).filter(_ref5 => {
    let {
      name
    } = _ref5;
    return name !== (currentTypeToExtend === null || currentTypeToExtend === void 0 ? void 0 : currentTypeToExtend.name) && !siblingInterfaceNames.includes(name);
  });
  return (0, _autocompleteUtils.hintList)(token, possibleInterfaces.map(type => {
    const result = {
      label: type.name,
      kind: _types.CompletionItemKind.Interface,
      type
    };
    if (type === null || type === void 0 ? void 0 : type.description) {
      result.documentation = type.description;
    }
    return result;
  }));
}
function getSuggestionsForFragmentTypeConditions(token, typeInfo, schema, _kind) {
  let possibleTypes;
  if (typeInfo.parentType) {
    if ((0, _graphql.isAbstractType)(typeInfo.parentType)) {
      const abstractType = (0, _graphql.assertAbstractType)(typeInfo.parentType);
      const possibleObjTypes = schema.getPossibleTypes(abstractType);
      const possibleIfaceMap = Object.create(null);
      for (const type of possibleObjTypes) {
        for (const iface of type.getInterfaces()) {
          possibleIfaceMap[iface.name] = iface;
        }
      }
      possibleTypes = possibleObjTypes.concat((0, _autocompleteUtils.objectValues)(possibleIfaceMap));
    } else {
      possibleTypes = [typeInfo.parentType];
    }
  } else {
    const typeMap = schema.getTypeMap();
    possibleTypes = (0, _autocompleteUtils.objectValues)(typeMap).filter(type => (0, _graphql.isCompositeType)(type) && !type.name.startsWith('__'));
  }
  return (0, _autocompleteUtils.hintList)(token, possibleTypes.map(type => {
    const namedType = (0, _graphql.getNamedType)(type);
    return {
      label: String(type),
      documentation: (namedType === null || namedType === void 0 ? void 0 : namedType.description) || '',
      kind: _types.CompletionItemKind.Field
    };
  }));
}
function getSuggestionsForFragmentSpread(token, typeInfo, schema, queryText, fragmentDefs) {
  if (!queryText) {
    return [];
  }
  const typeMap = schema.getTypeMap();
  const defState = (0, _autocompleteUtils.getDefinitionState)(token.state);
  const fragments = getFragmentDefinitions(queryText);
  if (fragmentDefs && fragmentDefs.length > 0) {
    fragments.push(...fragmentDefs);
  }
  const relevantFrags = fragments.filter(frag => typeMap[frag.typeCondition.name.value] && !(defState && defState.kind === _parser.RuleKinds.FRAGMENT_DEFINITION && defState.name === frag.name.value) && (0, _graphql.isCompositeType)(typeInfo.parentType) && (0, _graphql.isCompositeType)(typeMap[frag.typeCondition.name.value]) && (0, _graphql.doTypesOverlap)(schema, typeInfo.parentType, typeMap[frag.typeCondition.name.value]));
  return (0, _autocompleteUtils.hintList)(token, relevantFrags.map(frag => ({
    label: frag.name.value,
    detail: String(typeMap[frag.typeCondition.name.value]),
    documentation: `fragment ${frag.name.value} on ${frag.typeCondition.name.value}`,
    kind: _types.CompletionItemKind.Field,
    type: typeMap[frag.typeCondition.name.value]
  })));
}
const getParentDefinition = (state, kind) => {
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
  if (((_a = state.prevState) === null || _a === void 0 ? void 0 : _a.kind) === kind) {
    return state.prevState;
  }
  if (((_c = (_b = state.prevState) === null || _b === void 0 ? void 0 : _b.prevState) === null || _c === void 0 ? void 0 : _c.kind) === kind) {
    return state.prevState.prevState;
  }
  if (((_f = (_e = (_d = state.prevState) === null || _d === void 0 ? void 0 : _d.prevState) === null || _e === void 0 ? void 0 : _e.prevState) === null || _f === void 0 ? void 0 : _f.kind) === kind) {
    return state.prevState.prevState.prevState;
  }
  if (((_k = (_j = (_h = (_g = state.prevState) === null || _g === void 0 ? void 0 : _g.prevState) === null || _h === void 0 ? void 0 : _h.prevState) === null || _j === void 0 ? void 0 : _j.prevState) === null || _k === void 0 ? void 0 : _k.kind) === kind) {
    return state.prevState.prevState.prevState.prevState;
  }
};
function getVariableCompletions(queryText, schema, token) {
  let variableName = null;
  let variableType;
  const definitions = Object.create({});
  runOnlineParser(queryText, (_, state) => {
    if ((state === null || state === void 0 ? void 0 : state.kind) === _parser.RuleKinds.VARIABLE && state.name) {
      variableName = state.name;
    }
    if ((state === null || state === void 0 ? void 0 : state.kind) === _parser.RuleKinds.NAMED_TYPE && variableName) {
      const parentDefinition = getParentDefinition(state, _parser.RuleKinds.TYPE);
      if (parentDefinition === null || parentDefinition === void 0 ? void 0 : parentDefinition.type) {
        variableType = schema.getType(parentDefinition === null || parentDefinition === void 0 ? void 0 : parentDefinition.type);
      }
    }
    if (variableName && variableType && !definitions[variableName]) {
      definitions[variableName] = {
        detail: variableType.toString(),
        insertText: token.string === '$' ? variableName : '$' + variableName,
        label: variableName,
        type: variableType,
        kind: _types.CompletionItemKind.Variable
      };
      variableName = null;
      variableType = null;
    }
  });
  return (0, _autocompleteUtils.objectValues)(definitions);
}
function getFragmentDefinitions(queryText) {
  const fragmentDefs = [];
  runOnlineParser(queryText, (_, state) => {
    if (state.kind === _parser.RuleKinds.FRAGMENT_DEFINITION && state.name && state.type) {
      fragmentDefs.push({
        kind: _parser.RuleKinds.FRAGMENT_DEFINITION,
        name: {
          kind: _graphql.Kind.NAME,
          value: state.name
        },
        selectionSet: {
          kind: _parser.RuleKinds.SELECTION_SET,
          selections: []
        },
        typeCondition: {
          kind: _parser.RuleKinds.NAMED_TYPE,
          name: {
            kind: _graphql.Kind.NAME,
            value: state.type
          }
        }
      });
    }
  });
  return fragmentDefs;
}
function getSuggestionsForVariableDefinition(token, schema, _kind) {
  const inputTypeMap = schema.getTypeMap();
  const inputTypes = (0, _autocompleteUtils.objectValues)(inputTypeMap).filter(_graphql.isInputType);
  return (0, _autocompleteUtils.hintList)(token, inputTypes.map(type => ({
    label: type.name,
    documentation: type.description,
    kind: _types.CompletionItemKind.Variable
  })));
}
function getSuggestionsForDirective(token, state, schema, _kind) {
  var _a;
  if ((_a = state.prevState) === null || _a === void 0 ? void 0 : _a.kind) {
    const directives = schema.getDirectives().filter(directive => canUseDirective(state.prevState, directive));
    return (0, _autocompleteUtils.hintList)(token, directives.map(directive => ({
      label: directive.name,
      documentation: directive.description || '',
      kind: _types.CompletionItemKind.Function
    })));
  }
  return [];
}
function getTokenAtPosition(queryText, cursor) {
  let offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
  let styleAtCursor = null;
  let stateAtCursor = null;
  let stringAtCursor = null;
  const token = runOnlineParser(queryText, (stream, state, style, index) => {
    if (index !== cursor.line || stream.getCurrentPosition() + offset < cursor.character + 1) {
      return;
    }
    styleAtCursor = style;
    stateAtCursor = Object.assign({}, state);
    stringAtCursor = stream.current();
    return 'BREAK';
  });
  return {
    start: token.start,
    end: token.end,
    string: stringAtCursor || token.string,
    state: stateAtCursor || token.state,
    style: styleAtCursor || token.style
  };
}
function runOnlineParser(queryText, callback) {
  const lines = queryText.split('\n');
  const parser = (0, _parser.onlineParser)();
  let state = parser.startState();
  let style = '';
  let stream = new _parser.CharacterStream('');
  for (let i = 0; i < lines.length; i++) {
    stream = new _parser.CharacterStream(lines[i]);
    while (!stream.eol()) {
      style = parser.token(stream, state);
      const code = callback(stream, state, style, i);
      if (code === 'BREAK') {
        break;
      }
    }
    callback(stream, state, style, i);
    if (!state.kind) {
      state = parser.startState();
    }
  }
  return {
    start: stream.getStartOfToken(),
    end: stream.getCurrentPosition(),
    string: stream.current(),
    state,
    style
  };
}
function canUseDirective(state, directive) {
  if (!(state === null || state === void 0 ? void 0 : state.kind)) {
    return false;
  }
  const {
    kind,
    prevState
  } = state;
  const {
    locations
  } = directive;
  switch (kind) {
    case _parser.RuleKinds.QUERY:
      return locations.includes(_graphql.DirectiveLocation.QUERY);
    case _parser.RuleKinds.MUTATION:
      return locations.includes(_graphql.DirectiveLocation.MUTATION);
    case _parser.RuleKinds.SUBSCRIPTION:
      return locations.includes(_graphql.DirectiveLocation.SUBSCRIPTION);
    case _parser.RuleKinds.FIELD:
    case _parser.RuleKinds.ALIASED_FIELD:
      return locations.includes(_graphql.DirectiveLocation.FIELD);
    case _parser.RuleKinds.FRAGMENT_DEFINITION:
      return locations.includes(_graphql.DirectiveLocation.FRAGMENT_DEFINITION);
    case _parser.RuleKinds.FRAGMENT_SPREAD:
      return locations.includes(_graphql.DirectiveLocation.FRAGMENT_SPREAD);
    case _parser.RuleKinds.INLINE_FRAGMENT:
      return locations.includes(_graphql.DirectiveLocation.INLINE_FRAGMENT);
    case _parser.RuleKinds.SCHEMA_DEF:
      return locations.includes(_graphql.DirectiveLocation.SCHEMA);
    case _parser.RuleKinds.SCALAR_DEF:
      return locations.includes(_graphql.DirectiveLocation.SCALAR);
    case _parser.RuleKinds.OBJECT_TYPE_DEF:
      return locations.includes(_graphql.DirectiveLocation.OBJECT);
    case _parser.RuleKinds.FIELD_DEF:
      return locations.includes(_graphql.DirectiveLocation.FIELD_DEFINITION);
    case _parser.RuleKinds.INTERFACE_DEF:
      return locations.includes(_graphql.DirectiveLocation.INTERFACE);
    case _parser.RuleKinds.UNION_DEF:
      return locations.includes(_graphql.DirectiveLocation.UNION);
    case _parser.RuleKinds.ENUM_DEF:
      return locations.includes(_graphql.DirectiveLocation.ENUM);
    case _parser.RuleKinds.ENUM_VALUE:
      return locations.includes(_graphql.DirectiveLocation.ENUM_VALUE);
    case _parser.RuleKinds.INPUT_DEF:
      return locations.includes(_graphql.DirectiveLocation.INPUT_OBJECT);
    case _parser.RuleKinds.INPUT_VALUE_DEF:
      const prevStateKind = prevState === null || prevState === void 0 ? void 0 : prevState.kind;
      switch (prevStateKind) {
        case _parser.RuleKinds.ARGUMENTS_DEF:
          return locations.includes(_graphql.DirectiveLocation.ARGUMENT_DEFINITION);
        case _parser.RuleKinds.INPUT_DEF:
          return locations.includes(_graphql.DirectiveLocation.INPUT_FIELD_DEFINITION);
      }
  }
  return false;
}
function getTypeInfo(schema, tokenState) {
  let argDef;
  let argDefs;
  let directiveDef;
  let enumValue;
  let fieldDef;
  let inputType;
  let objectTypeDef;
  let objectFieldDefs;
  let parentType;
  let type;
  let interfaceDef;
  (0, _autocompleteUtils.forEachState)(tokenState, state => {
    var _a;
    switch (state.kind) {
      case _parser.RuleKinds.QUERY:
      case 'ShortQuery':
        type = schema.getQueryType();
        break;
      case _parser.RuleKinds.MUTATION:
        type = schema.getMutationType();
        break;
      case _parser.RuleKinds.SUBSCRIPTION:
        type = schema.getSubscriptionType();
        break;
      case _parser.RuleKinds.INLINE_FRAGMENT:
      case _parser.RuleKinds.FRAGMENT_DEFINITION:
        if (state.type) {
          type = schema.getType(state.type);
        }
        break;
      case _parser.RuleKinds.FIELD:
      case _parser.RuleKinds.ALIASED_FIELD:
        {
          if (!type || !state.name) {
            fieldDef = null;
          } else {
            fieldDef = parentType ? (0, _autocompleteUtils.getFieldDef)(schema, parentType, state.name) : null;
            type = fieldDef ? fieldDef.type : null;
          }
          break;
        }
      case _parser.RuleKinds.SELECTION_SET:
        parentType = (0, _graphql.getNamedType)(type);
        break;
      case _parser.RuleKinds.DIRECTIVE:
        directiveDef = state.name ? schema.getDirective(state.name) : null;
        break;
      case _parser.RuleKinds.INTERFACE_DEF:
        if (state.name) {
          objectTypeDef = null;
          interfaceDef = new _graphql.GraphQLInterfaceType({
            name: state.name,
            interfaces: [],
            fields: {}
          });
        }
        break;
      case _parser.RuleKinds.OBJECT_TYPE_DEF:
        if (state.name) {
          interfaceDef = null;
          objectTypeDef = new _graphql.GraphQLObjectType({
            name: state.name,
            interfaces: [],
            fields: {}
          });
        }
        break;
      case _parser.RuleKinds.ARGUMENTS:
        {
          if (state.prevState) {
            switch (state.prevState.kind) {
              case _parser.RuleKinds.FIELD:
                argDefs = fieldDef && fieldDef.args;
                break;
              case _parser.RuleKinds.DIRECTIVE:
                argDefs = directiveDef && directiveDef.args;
                break;
              case _parser.RuleKinds.ALIASED_FIELD:
                {
                  const name = (_a = state.prevState) === null || _a === void 0 ? void 0 : _a.name;
                  if (!name) {
                    argDefs = null;
                    break;
                  }
                  const field = parentType ? (0, _autocompleteUtils.getFieldDef)(schema, parentType, name) : null;
                  if (!field) {
                    argDefs = null;
                    break;
                  }
                  argDefs = field.args;
                  break;
                }
              default:
                argDefs = null;
                break;
            }
          } else {
            argDefs = null;
          }
          break;
        }
      case _parser.RuleKinds.ARGUMENT:
        if (argDefs) {
          for (let i = 0; i < argDefs.length; i++) {
            if (argDefs[i].name === state.name) {
              argDef = argDefs[i];
              break;
            }
          }
        }
        inputType = argDef === null || argDef === void 0 ? void 0 : argDef.type;
        break;
      case _parser.RuleKinds.ENUM_VALUE:
        const enumType = (0, _graphql.getNamedType)(inputType);
        enumValue = enumType instanceof _graphql.GraphQLEnumType ? enumType.getValues().find(val => val.value === state.name) : null;
        break;
      case _parser.RuleKinds.LIST_VALUE:
        const nullableType = (0, _graphql.getNullableType)(inputType);
        inputType = nullableType instanceof _graphql.GraphQLList ? nullableType.ofType : null;
        break;
      case _parser.RuleKinds.OBJECT_VALUE:
        const objectType = (0, _graphql.getNamedType)(inputType);
        objectFieldDefs = objectType instanceof _graphql.GraphQLInputObjectType ? objectType.getFields() : null;
        break;
      case _parser.RuleKinds.OBJECT_FIELD:
        const objectField = state.name && objectFieldDefs ? objectFieldDefs[state.name] : null;
        inputType = objectField === null || objectField === void 0 ? void 0 : objectField.type;
        break;
      case _parser.RuleKinds.NAMED_TYPE:
        if (state.name) {
          type = schema.getType(state.name);
        }
        break;
    }
  });
  return {
    argDef,
    argDefs,
    directiveDef,
    enumValue,
    fieldDef,
    inputType,
    objectFieldDefs,
    parentType,
    type,
    interfaceDef,
    objectTypeDef
  };
}
var GraphQLDocumentMode;
exports.GraphQLDocumentMode = GraphQLDocumentMode;
(function (GraphQLDocumentMode) {
  GraphQLDocumentMode["TYPE_SYSTEM"] = "TYPE_SYSTEM";
  GraphQLDocumentMode["EXECUTABLE"] = "EXECUTABLE";
})(GraphQLDocumentMode || (exports.GraphQLDocumentMode = GraphQLDocumentMode = {}));
function getDocumentMode(documentText, uri) {
  if (uri === null || uri === void 0 ? void 0 : uri.endsWith('.graphqls')) {
    return GraphQLDocumentMode.TYPE_SYSTEM;
  }
  return hasTypeSystemDefinitions(documentText) ? GraphQLDocumentMode.TYPE_SYSTEM : GraphQLDocumentMode.EXECUTABLE;
}
function unwrapType(state) {
  if (state.prevState && state.kind && [_parser.RuleKinds.NAMED_TYPE, _parser.RuleKinds.LIST_TYPE, _parser.RuleKinds.TYPE, _parser.RuleKinds.NON_NULL_TYPE].includes(state.kind)) {
    return unwrapType(state.prevState);
  }
  return state;
}

/***/ }),

/***/ "../../graphql-language-service/esm/interface/getDefinition.js":
/*!*********************************************************************!*\
  !*** ../../graphql-language-service/esm/interface/getDefinition.js ***!
  \*********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.LANGUAGE = void 0;
exports.getDefinitionQueryResultForDefinitionNode = getDefinitionQueryResultForDefinitionNode;
exports.getDefinitionQueryResultForField = getDefinitionQueryResultForField;
exports.getDefinitionQueryResultForFragmentSpread = getDefinitionQueryResultForFragmentSpread;
exports.getDefinitionQueryResultForNamedType = getDefinitionQueryResultForNamedType;
var _utils = __webpack_require__(/*! ../utils */ "../../graphql-language-service/esm/utils/index.js");
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function (resolve) {
      resolve(value);
    });
  }
  return new (P || (P = Promise))(function (resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
};
const LANGUAGE = 'GraphQL';
exports.LANGUAGE = LANGUAGE;
function assert(value, message) {
  if (!value) {
    throw new Error(message);
  }
}
function getRange(text, node) {
  const location = node.loc;
  assert(location, 'Expected ASTNode to have a location.');
  return (0, _utils.locToRange)(text, location);
}
function getPosition(text, node) {
  const location = node.loc;
  assert(location, 'Expected ASTNode to have a location.');
  return (0, _utils.offsetToPosition)(text, location.start);
}
function getDefinitionQueryResultForNamedType(text, node, dependencies) {
  return __awaiter(this, void 0, void 0, function* () {
    const name = node.name.value;
    const defNodes = dependencies.filter(_ref => {
      let {
        definition
      } = _ref;
      return definition.name && definition.name.value === name;
    });
    if (defNodes.length === 0) {
      throw new Error(`Definition not found for GraphQL type ${name}`);
    }
    const definitions = defNodes.map(_ref2 => {
      let {
        filePath,
        content,
        definition
      } = _ref2;
      return getDefinitionForNodeDefinition(filePath || '', content, definition);
    });
    return {
      definitions,
      queryRange: definitions.map(_ => getRange(text, node))
    };
  });
}
function getDefinitionQueryResultForField(fieldName, typeName, dependencies) {
  var _a;
  return __awaiter(this, void 0, void 0, function* () {
    const defNodes = dependencies.filter(_ref3 => {
      let {
        definition
      } = _ref3;
      return definition.name && definition.name.value === typeName;
    });
    if (defNodes.length === 0) {
      throw new Error(`Definition not found for GraphQL type ${typeName}`);
    }
    const definitions = [];
    for (const {
      filePath,
      content,
      definition
    } of defNodes) {
      const fieldDefinition = (_a = definition.fields) === null || _a === void 0 ? void 0 : _a.find(item => item.name.value === fieldName);
      if (fieldDefinition == null) {
        continue;
      }
      definitions.push(getDefinitionForFieldDefinition(filePath || '', content, fieldDefinition));
    }
    return {
      definitions,
      queryRange: []
    };
  });
}
function getDefinitionQueryResultForFragmentSpread(text, fragment, dependencies) {
  return __awaiter(this, void 0, void 0, function* () {
    const name = fragment.name.value;
    const defNodes = dependencies.filter(_ref4 => {
      let {
        definition
      } = _ref4;
      return definition.name.value === name;
    });
    if (defNodes.length === 0) {
      throw new Error(`Definition not found for GraphQL fragment ${name}`);
    }
    const definitions = defNodes.map(_ref5 => {
      let {
        filePath,
        content,
        definition
      } = _ref5;
      return getDefinitionForFragmentDefinition(filePath || '', content, definition);
    });
    return {
      definitions,
      queryRange: definitions.map(_ => getRange(text, fragment))
    };
  });
}
function getDefinitionQueryResultForDefinitionNode(path, text, definition) {
  return {
    definitions: [getDefinitionForFragmentDefinition(path, text, definition)],
    queryRange: definition.name ? [getRange(text, definition.name)] : []
  };
}
function getDefinitionForFragmentDefinition(path, text, definition) {
  const {
    name
  } = definition;
  if (!name) {
    throw new Error('Expected ASTNode to have a Name.');
  }
  return {
    path,
    position: getPosition(text, definition),
    range: getRange(text, definition),
    name: name.value || '',
    language: LANGUAGE,
    projectRoot: path
  };
}
function getDefinitionForNodeDefinition(path, text, definition) {
  const {
    name
  } = definition;
  assert(name, 'Expected ASTNode to have a Name.');
  return {
    path,
    position: getPosition(text, definition),
    range: getRange(text, definition),
    name: name.value || '',
    language: LANGUAGE,
    projectRoot: path
  };
}
function getDefinitionForFieldDefinition(path, text, definition) {
  const {
    name
  } = definition;
  assert(name, 'Expected ASTNode to have a Name.');
  return {
    path,
    position: getPosition(text, definition),
    range: getRange(text, definition),
    name: name.value || '',
    language: LANGUAGE,
    projectRoot: path
  };
}

/***/ }),

/***/ "../../graphql-language-service/esm/interface/getDiagnostics.js":
/*!**********************************************************************!*\
  !*** ../../graphql-language-service/esm/interface/getDiagnostics.js ***!
  \**********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.SEVERITY = exports.DIAGNOSTIC_SEVERITY = void 0;
exports.getDiagnostics = getDiagnostics;
exports.getRange = getRange;
exports.validateQuery = validateQuery;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
var _parser = __webpack_require__(/*! ../parser */ "../../graphql-language-service/esm/parser/index.js");
var _utils = __webpack_require__(/*! ../utils */ "../../graphql-language-service/esm/utils/index.js");
const SEVERITY = {
  Error: 'Error',
  Warning: 'Warning',
  Information: 'Information',
  Hint: 'Hint'
};
exports.SEVERITY = SEVERITY;
const DIAGNOSTIC_SEVERITY = {
  [SEVERITY.Error]: 1,
  [SEVERITY.Warning]: 2,
  [SEVERITY.Information]: 3,
  [SEVERITY.Hint]: 4
};
exports.DIAGNOSTIC_SEVERITY = DIAGNOSTIC_SEVERITY;
const invariant = (condition, message) => {
  if (!condition) {
    throw new Error(message);
  }
};
function getDiagnostics(query) {
  let schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  let customRules = arguments.length > 2 ? arguments[2] : undefined;
  let isRelayCompatMode = arguments.length > 3 ? arguments[3] : undefined;
  let externalFragments = arguments.length > 4 ? arguments[4] : undefined;
  var _a, _b;
  let ast = null;
  let fragments = '';
  if (externalFragments) {
    fragments = typeof externalFragments === 'string' ? externalFragments : externalFragments.reduce((acc, node) => acc + (0, _graphql.print)(node) + '\n\n', '');
  }
  const enhancedQuery = fragments ? `${query}\n\n${fragments}` : query;
  try {
    ast = (0, _graphql.parse)(enhancedQuery);
  } catch (error) {
    if (error instanceof _graphql.GraphQLError) {
      const range = getRange((_b = (_a = error.locations) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : {
        line: 0,
        column: 0
      }, enhancedQuery);
      return [{
        severity: DIAGNOSTIC_SEVERITY.Error,
        message: error.message,
        source: 'GraphQL: Syntax',
        range
      }];
    }
    throw error;
  }
  return validateQuery(ast, schema, customRules, isRelayCompatMode);
}
function validateQuery(ast) {
  let schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  let customRules = arguments.length > 2 ? arguments[2] : undefined;
  let isRelayCompatMode = arguments.length > 3 ? arguments[3] : undefined;
  if (!schema) {
    return [];
  }
  const validationErrorAnnotations = (0, _utils.validateWithCustomRules)(schema, ast, customRules, isRelayCompatMode).flatMap(error => annotations(error, DIAGNOSTIC_SEVERITY.Error, 'Validation'));
  const deprecationWarningAnnotations = (0, _graphql.validate)(schema, ast, [_graphql.NoDeprecatedCustomRule]).flatMap(error => annotations(error, DIAGNOSTIC_SEVERITY.Warning, 'Deprecation'));
  return validationErrorAnnotations.concat(deprecationWarningAnnotations);
}
function annotations(error, severity, type) {
  if (!error.nodes) {
    return [];
  }
  const highlightedNodes = [];
  for (const [i, node] of error.nodes.entries()) {
    const highlightNode = node.kind !== 'Variable' && 'name' in node && node.name !== undefined ? node.name : 'variable' in node && node.variable !== undefined ? node.variable : node;
    if (highlightNode) {
      invariant(error.locations, 'GraphQL validation error requires locations.');
      const loc = error.locations[i];
      const highlightLoc = getLocation(highlightNode);
      const end = loc.column + (highlightLoc.end - highlightLoc.start);
      highlightedNodes.push({
        source: `GraphQL: ${type}`,
        message: error.message,
        severity,
        range: new _utils.Range(new _utils.Position(loc.line - 1, loc.column - 1), new _utils.Position(loc.line - 1, end))
      });
    }
  }
  return highlightedNodes;
}
function getRange(location, queryText) {
  const parser = (0, _parser.onlineParser)();
  const state = parser.startState();
  const lines = queryText.split('\n');
  invariant(lines.length >= location.line, 'Query text must have more lines than where the error happened');
  let stream = null;
  for (let i = 0; i < location.line; i++) {
    stream = new _parser.CharacterStream(lines[i]);
    while (!stream.eol()) {
      const style = parser.token(stream, state);
      if (style === 'invalidchar') {
        break;
      }
    }
  }
  invariant(stream, 'Expected Parser stream to be available.');
  const line = location.line - 1;
  const start = stream.getStartOfToken();
  const end = stream.getCurrentPosition();
  return new _utils.Range(new _utils.Position(line, start), new _utils.Position(line, end));
}
function getLocation(node) {
  const typeCastedNode = node;
  const location = typeCastedNode.loc;
  invariant(location, 'Expected ASTNode to have a location.');
  return location;
}

/***/ }),

/***/ "../../graphql-language-service/esm/interface/getHoverInformation.js":
/*!***************************************************************************!*\
  !*** ../../graphql-language-service/esm/interface/getHoverInformation.js ***!
  \***************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getHoverInformation = getHoverInformation;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
var _getAutocompleteSuggestions = __webpack_require__(/*! ./getAutocompleteSuggestions */ "../../graphql-language-service/esm/interface/getAutocompleteSuggestions.js");
function getHoverInformation(schema, queryText, cursor, contextToken, config) {
  const token = contextToken || (0, _getAutocompleteSuggestions.getTokenAtPosition)(queryText, cursor);
  if (!schema || !token || !token.state) {
    return '';
  }
  const {
    kind,
    step
  } = token.state;
  const typeInfo = (0, _getAutocompleteSuggestions.getTypeInfo)(schema, token.state);
  const options = Object.assign(Object.assign({}, config), {
    schema
  });
  if (kind === 'Field' && step === 0 && typeInfo.fieldDef || kind === 'AliasedField' && step === 2 && typeInfo.fieldDef) {
    const into = [];
    renderMdCodeStart(into, options);
    renderField(into, typeInfo, options);
    renderMdCodeEnd(into, options);
    renderDescription(into, options, typeInfo.fieldDef);
    return into.join('').trim();
  }
  if (kind === 'Directive' && step === 1 && typeInfo.directiveDef) {
    const into = [];
    renderMdCodeStart(into, options);
    renderDirective(into, typeInfo, options);
    renderMdCodeEnd(into, options);
    renderDescription(into, options, typeInfo.directiveDef);
    return into.join('').trim();
  }
  if (kind === 'Argument' && step === 0 && typeInfo.argDef) {
    const into = [];
    renderMdCodeStart(into, options);
    renderArg(into, typeInfo, options);
    renderMdCodeEnd(into, options);
    renderDescription(into, options, typeInfo.argDef);
    return into.join('').trim();
  }
  if (kind === 'EnumValue' && typeInfo.enumValue && 'description' in typeInfo.enumValue) {
    const into = [];
    renderMdCodeStart(into, options);
    renderEnumValue(into, typeInfo, options);
    renderMdCodeEnd(into, options);
    renderDescription(into, options, typeInfo.enumValue);
    return into.join('').trim();
  }
  if (kind === 'NamedType' && typeInfo.type && 'description' in typeInfo.type) {
    const into = [];
    renderMdCodeStart(into, options);
    renderType(into, typeInfo, options, typeInfo.type);
    renderMdCodeEnd(into, options);
    renderDescription(into, options, typeInfo.type);
    return into.join('').trim();
  }
  return '';
}
function renderMdCodeStart(into, options) {
  if (options.useMarkdown) {
    text(into, '```graphql\n');
  }
}
function renderMdCodeEnd(into, options) {
  if (options.useMarkdown) {
    text(into, '\n```');
  }
}
function renderField(into, typeInfo, options) {
  renderQualifiedField(into, typeInfo, options);
  renderTypeAnnotation(into, typeInfo, options, typeInfo.type);
}
function renderQualifiedField(into, typeInfo, options) {
  if (!typeInfo.fieldDef) {
    return;
  }
  const fieldName = typeInfo.fieldDef.name;
  if (fieldName.slice(0, 2) !== '__') {
    renderType(into, typeInfo, options, typeInfo.parentType);
    text(into, '.');
  }
  text(into, fieldName);
}
function renderDirective(into, typeInfo, _options) {
  if (!typeInfo.directiveDef) {
    return;
  }
  const name = '@' + typeInfo.directiveDef.name;
  text(into, name);
}
function renderArg(into, typeInfo, options) {
  if (typeInfo.directiveDef) {
    renderDirective(into, typeInfo, options);
  } else if (typeInfo.fieldDef) {
    renderQualifiedField(into, typeInfo, options);
  }
  if (!typeInfo.argDef) {
    return;
  }
  const {
    name
  } = typeInfo.argDef;
  text(into, '(');
  text(into, name);
  renderTypeAnnotation(into, typeInfo, options, typeInfo.inputType);
  text(into, ')');
}
function renderTypeAnnotation(into, typeInfo, options, t) {
  text(into, ': ');
  renderType(into, typeInfo, options, t);
}
function renderEnumValue(into, typeInfo, options) {
  if (!typeInfo.enumValue) {
    return;
  }
  const {
    name
  } = typeInfo.enumValue;
  renderType(into, typeInfo, options, typeInfo.inputType);
  text(into, '.');
  text(into, name);
}
function renderType(into, typeInfo, options, t) {
  if (!t) {
    return;
  }
  if (t instanceof _graphql.GraphQLNonNull) {
    renderType(into, typeInfo, options, t.ofType);
    text(into, '!');
  } else if (t instanceof _graphql.GraphQLList) {
    text(into, '[');
    renderType(into, typeInfo, options, t.ofType);
    text(into, ']');
  } else {
    text(into, t.name);
  }
}
function renderDescription(into, options, def) {
  if (!def) {
    return;
  }
  const description = typeof def.description === 'string' ? def.description : null;
  if (description) {
    text(into, '\n\n');
    text(into, description);
  }
  renderDeprecation(into, options, def);
}
function renderDeprecation(into, _options, def) {
  if (!def) {
    return;
  }
  const reason = def.deprecationReason || null;
  if (!reason) {
    return;
  }
  text(into, '\n\n');
  text(into, 'Deprecated: ');
  text(into, reason);
}
function text(into, content) {
  into.push(content);
}

/***/ }),

/***/ "../../graphql-language-service/esm/interface/getOutline.js":
/*!******************************************************************!*\
  !*** ../../graphql-language-service/esm/interface/getOutline.js ***!
  \******************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getOutline = getOutline;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
var _utils = __webpack_require__(/*! ../utils */ "../../graphql-language-service/esm/utils/index.js");
const {
  INLINE_FRAGMENT
} = _graphql.Kind;
const OUTLINEABLE_KINDS = {
  Field: true,
  OperationDefinition: true,
  Document: true,
  SelectionSet: true,
  Name: true,
  FragmentDefinition: true,
  FragmentSpread: true,
  InlineFragment: true,
  ObjectTypeDefinition: true,
  InputObjectTypeDefinition: true,
  InterfaceTypeDefinition: true,
  EnumTypeDefinition: true,
  EnumValueDefinition: true,
  InputValueDefinition: true,
  FieldDefinition: true
};
function getOutline(documentText) {
  let ast;
  try {
    ast = (0, _graphql.parse)(documentText);
  } catch (_a) {
    return null;
  }
  const visitorFns = outlineTreeConverter(documentText);
  const outlineTrees = (0, _graphql.visit)(ast, {
    leave(node) {
      if (visitorFns !== undefined && node.kind in visitorFns) {
        return visitorFns[node.kind](node);
      }
      return null;
    }
  });
  return {
    outlineTrees
  };
}
function outlineTreeConverter(docText) {
  const meta = node => {
    return {
      representativeName: node.name,
      startPosition: (0, _utils.offsetToPosition)(docText, node.loc.start),
      endPosition: (0, _utils.offsetToPosition)(docText, node.loc.end),
      kind: node.kind,
      children: node.selectionSet || node.fields || node.values || node.arguments || []
    };
  };
  return {
    Field(node) {
      const tokenizedText = node.alias ? [buildToken('plain', node.alias), buildToken('plain', ': ')] : [];
      tokenizedText.push(buildToken('plain', node.name));
      return Object.assign({
        tokenizedText
      }, meta(node));
    },
    OperationDefinition: node => Object.assign({
      tokenizedText: [buildToken('keyword', node.operation), buildToken('whitespace', ' '), buildToken('class-name', node.name)]
    }, meta(node)),
    Document: node => node.definitions,
    SelectionSet: node => concatMap(node.selections, child => {
      return child.kind === INLINE_FRAGMENT ? child.selectionSet : child;
    }),
    Name: node => node.value,
    FragmentDefinition: node => Object.assign({
      tokenizedText: [buildToken('keyword', 'fragment'), buildToken('whitespace', ' '), buildToken('class-name', node.name)]
    }, meta(node)),
    InterfaceTypeDefinition: node => Object.assign({
      tokenizedText: [buildToken('keyword', 'interface'), buildToken('whitespace', ' '), buildToken('class-name', node.name)]
    }, meta(node)),
    EnumTypeDefinition: node => Object.assign({
      tokenizedText: [buildToken('keyword', 'enum'), buildToken('whitespace', ' '), buildToken('class-name', node.name)]
    }, meta(node)),
    EnumValueDefinition: node => Object.assign({
      tokenizedText: [buildToken('plain', node.name)]
    }, meta(node)),
    ObjectTypeDefinition: node => Object.assign({
      tokenizedText: [buildToken('keyword', 'type'), buildToken('whitespace', ' '), buildToken('class-name', node.name)]
    }, meta(node)),
    InputObjectTypeDefinition: node => Object.assign({
      tokenizedText: [buildToken('keyword', 'input'), buildToken('whitespace', ' '), buildToken('class-name', node.name)]
    }, meta(node)),
    FragmentSpread: node => Object.assign({
      tokenizedText: [buildToken('plain', '...'), buildToken('class-name', node.name)]
    }, meta(node)),
    InputValueDefinition(node) {
      return Object.assign({
        tokenizedText: [buildToken('plain', node.name)]
      }, meta(node));
    },
    FieldDefinition(node) {
      return Object.assign({
        tokenizedText: [buildToken('plain', node.name)]
      }, meta(node));
    },
    InlineFragment: node => node.selectionSet
  };
}
function buildToken(kind, value) {
  return {
    kind,
    value
  };
}
function concatMap(arr, fn) {
  const res = [];
  for (let i = 0; i < arr.length; i++) {
    const x = fn(arr[i], i);
    if (Array.isArray(x)) {
      res.push(...x);
    } else {
      res.push(x);
    }
  }
  return res;
}

/***/ }),

/***/ "../../graphql-language-service/esm/interface/index.js":
/*!*************************************************************!*\
  !*** ../../graphql-language-service/esm/interface/index.js ***!
  \*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
var _exportNames = {
  getOutline: true,
  getHoverInformation: true
};
Object.defineProperty(exports, "getHoverInformation", ({
  enumerable: true,
  get: function () {
    return _getHoverInformation.getHoverInformation;
  }
}));
Object.defineProperty(exports, "getOutline", ({
  enumerable: true,
  get: function () {
    return _getOutline.getOutline;
  }
}));
var _autocompleteUtils = __webpack_require__(/*! ./autocompleteUtils */ "../../graphql-language-service/esm/interface/autocompleteUtils.js");
Object.keys(_autocompleteUtils).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _autocompleteUtils[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _autocompleteUtils[key];
    }
  });
});
var _getAutocompleteSuggestions = __webpack_require__(/*! ./getAutocompleteSuggestions */ "../../graphql-language-service/esm/interface/getAutocompleteSuggestions.js");
Object.keys(_getAutocompleteSuggestions).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _getAutocompleteSuggestions[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _getAutocompleteSuggestions[key];
    }
  });
});
var _getDefinition = __webpack_require__(/*! ./getDefinition */ "../../graphql-language-service/esm/interface/getDefinition.js");
Object.keys(_getDefinition).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _getDefinition[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _getDefinition[key];
    }
  });
});
var _getDiagnostics = __webpack_require__(/*! ./getDiagnostics */ "../../graphql-language-service/esm/interface/getDiagnostics.js");
Object.keys(_getDiagnostics).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _getDiagnostics[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _getDiagnostics[key];
    }
  });
});
var _getOutline = __webpack_require__(/*! ./getOutline */ "../../graphql-language-service/esm/interface/getOutline.js");
var _getHoverInformation = __webpack_require__(/*! ./getHoverInformation */ "../../graphql-language-service/esm/interface/getHoverInformation.js");

/***/ }),

/***/ "../../graphql-language-service/esm/parser/CharacterStream.js":
/*!********************************************************************!*\
  !*** ../../graphql-language-service/esm/parser/CharacterStream.js ***!
  \********************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
class CharacterStream {
  constructor(sourceText) {
    var _this = this;
    this._start = 0;
    this._pos = 0;
    this.getStartOfToken = () => this._start;
    this.getCurrentPosition = () => this._pos;
    this.eol = () => this._sourceText.length === this._pos;
    this.sol = () => this._pos === 0;
    this.peek = () => {
      return this._sourceText.charAt(this._pos) || null;
    };
    this.next = () => {
      const char = this._sourceText.charAt(this._pos);
      this._pos++;
      return char;
    };
    this.eat = pattern => {
      const isMatched = this._testNextCharacter(pattern);
      if (isMatched) {
        this._start = this._pos;
        this._pos++;
        return this._sourceText.charAt(this._pos - 1);
      }
      return undefined;
    };
    this.eatWhile = match => {
      let isMatched = this._testNextCharacter(match);
      let didEat = false;
      if (isMatched) {
        didEat = isMatched;
        this._start = this._pos;
      }
      while (isMatched) {
        this._pos++;
        isMatched = this._testNextCharacter(match);
        didEat = true;
      }
      return didEat;
    };
    this.eatSpace = () => this.eatWhile(/[\s\u00a0]/);
    this.skipToEnd = () => {
      this._pos = this._sourceText.length;
    };
    this.skipTo = position => {
      this._pos = position;
    };
    this.match = function (pattern) {
      let consume = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
      let caseFold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
      let token = null;
      let match = null;
      if (typeof pattern === 'string') {
        const regex = new RegExp(pattern, caseFold ? 'i' : 'g');
        match = regex.test(_this._sourceText.slice(_this._pos, _this._pos + pattern.length));
        token = pattern;
      } else if (pattern instanceof RegExp) {
        match = _this._sourceText.slice(_this._pos).match(pattern);
        token = match === null || match === void 0 ? void 0 : match[0];
      }
      if (match != null && (typeof pattern === 'string' || match instanceof Array && _this._sourceText.startsWith(match[0], _this._pos))) {
        if (consume) {
          _this._start = _this._pos;
          if (token && token.length) {
            _this._pos += token.length;
          }
        }
        return match;
      }
      return false;
    };
    this.backUp = num => {
      this._pos -= num;
    };
    this.column = () => this._pos;
    this.indentation = () => {
      const match = this._sourceText.match(/\s*/);
      let indent = 0;
      if (match && match.length !== 0) {
        const whiteSpaces = match[0];
        let pos = 0;
        while (whiteSpaces.length > pos) {
          if (whiteSpaces.charCodeAt(pos) === 9) {
            indent += 2;
          } else {
            indent++;
          }
          pos++;
        }
      }
      return indent;
    };
    this.current = () => this._sourceText.slice(this._start, this._pos);
    this._sourceText = sourceText;
  }
  _testNextCharacter(pattern) {
    const character = this._sourceText.charAt(this._pos);
    let isMatched = false;
    if (typeof pattern === 'string') {
      isMatched = character === pattern;
    } else {
      isMatched = pattern instanceof RegExp ? pattern.test(character) : pattern(character);
    }
    return isMatched;
  }
}
exports["default"] = CharacterStream;

/***/ }),

/***/ "../../graphql-language-service/esm/parser/RuleHelpers.js":
/*!****************************************************************!*\
  !*** ../../graphql-language-service/esm/parser/RuleHelpers.js ***!
  \****************************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.butNot = butNot;
exports.list = list;
exports.opt = opt;
exports.p = p;
exports.t = t;
function opt(ofRule) {
  return {
    ofRule
  };
}
function list(ofRule, separator) {
  return {
    ofRule,
    isList: true,
    separator
  };
}
function butNot(rule, exclusions) {
  const ruleMatch = rule.match;
  rule.match = token => {
    let check = false;
    if (ruleMatch) {
      check = ruleMatch(token);
    }
    return check && exclusions.every(exclusion => exclusion.match && !exclusion.match(token));
  };
  return rule;
}
function t(kind, style) {
  return {
    style,
    match: token => token.kind === kind
  };
}
function p(value, style) {
  return {
    style: style || 'punctuation',
    match: token => token.kind === 'Punctuation' && token.value === value
  };
}

/***/ }),

/***/ "../../graphql-language-service/esm/parser/Rules.js":
/*!**********************************************************!*\
  !*** ../../graphql-language-service/esm/parser/Rules.js ***!
  \**********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isIgnored = exports.ParseRules = exports.LexRules = void 0;
var _RuleHelpers = __webpack_require__(/*! ./RuleHelpers */ "../../graphql-language-service/esm/parser/RuleHelpers.js");
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
const isIgnored = ch => ch === ' ' || ch === '\t' || ch === ',' || ch === '\n' || ch === '\r' || ch === '\uFEFF' || ch === '\u00A0';
exports.isIgnored = isIgnored;
const LexRules = {
  Name: /^[_A-Za-z][_0-9A-Za-z]*/,
  Punctuation: /^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,
  Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,
  String: /^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,
  Comment: /^#.*/
};
exports.LexRules = LexRules;
const ParseRules = {
  Document: [(0, _RuleHelpers.list)('Definition')],
  Definition(token) {
    switch (token.value) {
      case '{':
        return 'ShortQuery';
      case 'query':
        return 'Query';
      case 'mutation':
        return 'Mutation';
      case 'subscription':
        return 'Subscription';
      case 'fragment':
        return _graphql.Kind.FRAGMENT_DEFINITION;
      case 'schema':
        return 'SchemaDef';
      case 'scalar':
        return 'ScalarDef';
      case 'type':
        return 'ObjectTypeDef';
      case 'interface':
        return 'InterfaceDef';
      case 'union':
        return 'UnionDef';
      case 'enum':
        return 'EnumDef';
      case 'input':
        return 'InputDef';
      case 'extend':
        return 'ExtendDef';
      case 'directive':
        return 'DirectiveDef';
    }
  },
  ShortQuery: ['SelectionSet'],
  Query: [word('query'), (0, _RuleHelpers.opt)(name('def')), (0, _RuleHelpers.opt)('VariableDefinitions'), (0, _RuleHelpers.list)('Directive'), 'SelectionSet'],
  Mutation: [word('mutation'), (0, _RuleHelpers.opt)(name('def')), (0, _RuleHelpers.opt)('VariableDefinitions'), (0, _RuleHelpers.list)('Directive'), 'SelectionSet'],
  Subscription: [word('subscription'), (0, _RuleHelpers.opt)(name('def')), (0, _RuleHelpers.opt)('VariableDefinitions'), (0, _RuleHelpers.list)('Directive'), 'SelectionSet'],
  VariableDefinitions: [(0, _RuleHelpers.p)('('), (0, _RuleHelpers.list)('VariableDefinition'), (0, _RuleHelpers.p)(')')],
  VariableDefinition: ['Variable', (0, _RuleHelpers.p)(':'), 'Type', (0, _RuleHelpers.opt)('DefaultValue')],
  Variable: [(0, _RuleHelpers.p)('$', 'variable'), name('variable')],
  DefaultValue: [(0, _RuleHelpers.p)('='), 'Value'],
  SelectionSet: [(0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('Selection'), (0, _RuleHelpers.p)('}')],
  Selection(token, stream) {
    return token.value === '...' ? stream.match(/[\s\u00a0,]*(on\b|@|{)/, false) ? 'InlineFragment' : 'FragmentSpread' : stream.match(/[\s\u00a0,]*:/, false) ? 'AliasedField' : 'Field';
  },
  AliasedField: [name('property'), (0, _RuleHelpers.p)(':'), name('qualifier'), (0, _RuleHelpers.opt)('Arguments'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.opt)('SelectionSet')],
  Field: [name('property'), (0, _RuleHelpers.opt)('Arguments'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.opt)('SelectionSet')],
  Arguments: [(0, _RuleHelpers.p)('('), (0, _RuleHelpers.list)('Argument'), (0, _RuleHelpers.p)(')')],
  Argument: [name('attribute'), (0, _RuleHelpers.p)(':'), 'Value'],
  FragmentSpread: [(0, _RuleHelpers.p)('...'), name('def'), (0, _RuleHelpers.list)('Directive')],
  InlineFragment: [(0, _RuleHelpers.p)('...'), (0, _RuleHelpers.opt)('TypeCondition'), (0, _RuleHelpers.list)('Directive'), 'SelectionSet'],
  FragmentDefinition: [word('fragment'), (0, _RuleHelpers.opt)((0, _RuleHelpers.butNot)(name('def'), [word('on')])), 'TypeCondition', (0, _RuleHelpers.list)('Directive'), 'SelectionSet'],
  TypeCondition: [word('on'), 'NamedType'],
  Value(token) {
    switch (token.kind) {
      case 'Number':
        return 'NumberValue';
      case 'String':
        return 'StringValue';
      case 'Punctuation':
        switch (token.value) {
          case '[':
            return 'ListValue';
          case '{':
            return 'ObjectValue';
          case '$':
            return 'Variable';
          case '&':
            return 'NamedType';
        }
        return null;
      case 'Name':
        switch (token.value) {
          case 'true':
          case 'false':
            return 'BooleanValue';
        }
        if (token.value === 'null') {
          return 'NullValue';
        }
        return 'EnumValue';
    }
  },
  NumberValue: [(0, _RuleHelpers.t)('Number', 'number')],
  StringValue: [{
    style: 'string',
    match: token => token.kind === 'String',
    update(state, token) {
      if (token.value.startsWith('"""')) {
        state.inBlockstring = !token.value.slice(3).endsWith('"""');
      }
    }
  }],
  BooleanValue: [(0, _RuleHelpers.t)('Name', 'builtin')],
  NullValue: [(0, _RuleHelpers.t)('Name', 'keyword')],
  EnumValue: [name('string-2')],
  ListValue: [(0, _RuleHelpers.p)('['), (0, _RuleHelpers.list)('Value'), (0, _RuleHelpers.p)(']')],
  ObjectValue: [(0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('ObjectField'), (0, _RuleHelpers.p)('}')],
  ObjectField: [name('attribute'), (0, _RuleHelpers.p)(':'), 'Value'],
  Type(token) {
    return token.value === '[' ? 'ListType' : 'NonNullType';
  },
  ListType: [(0, _RuleHelpers.p)('['), 'Type', (0, _RuleHelpers.p)(']'), (0, _RuleHelpers.opt)((0, _RuleHelpers.p)('!'))],
  NonNullType: ['NamedType', (0, _RuleHelpers.opt)((0, _RuleHelpers.p)('!'))],
  NamedType: [type('atom')],
  Directive: [(0, _RuleHelpers.p)('@', 'meta'), name('meta'), (0, _RuleHelpers.opt)('Arguments')],
  DirectiveDef: [word('directive'), (0, _RuleHelpers.p)('@', 'meta'), name('meta'), (0, _RuleHelpers.opt)('ArgumentsDef'), word('on'), (0, _RuleHelpers.list)('DirectiveLocation', (0, _RuleHelpers.p)('|'))],
  InterfaceDef: [word('interface'), name('atom'), (0, _RuleHelpers.opt)('Implements'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('FieldDef'), (0, _RuleHelpers.p)('}')],
  Implements: [word('implements'), (0, _RuleHelpers.list)('NamedType', (0, _RuleHelpers.p)('&'))],
  DirectiveLocation: [name('string-2')],
  SchemaDef: [word('schema'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('OperationTypeDef'), (0, _RuleHelpers.p)('}')],
  OperationTypeDef: [name('keyword'), (0, _RuleHelpers.p)(':'), name('atom')],
  ScalarDef: [word('scalar'), name('atom'), (0, _RuleHelpers.list)('Directive')],
  ObjectTypeDef: [word('type'), name('atom'), (0, _RuleHelpers.opt)('Implements'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('FieldDef'), (0, _RuleHelpers.p)('}')],
  FieldDef: [name('property'), (0, _RuleHelpers.opt)('ArgumentsDef'), (0, _RuleHelpers.p)(':'), 'Type', (0, _RuleHelpers.list)('Directive')],
  ArgumentsDef: [(0, _RuleHelpers.p)('('), (0, _RuleHelpers.list)('InputValueDef'), (0, _RuleHelpers.p)(')')],
  InputValueDef: [name('attribute'), (0, _RuleHelpers.p)(':'), 'Type', (0, _RuleHelpers.opt)('DefaultValue'), (0, _RuleHelpers.list)('Directive')],
  UnionDef: [word('union'), name('atom'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.p)('='), (0, _RuleHelpers.list)('UnionMember', (0, _RuleHelpers.p)('|'))],
  UnionMember: ['NamedType'],
  EnumDef: [word('enum'), name('atom'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('EnumValueDef'), (0, _RuleHelpers.p)('}')],
  EnumValueDef: [name('string-2'), (0, _RuleHelpers.list)('Directive')],
  InputDef: [word('input'), name('atom'), (0, _RuleHelpers.list)('Directive'), (0, _RuleHelpers.p)('{'), (0, _RuleHelpers.list)('InputValueDef'), (0, _RuleHelpers.p)('}')],
  ExtendDef: [word('extend'), 'ExtensionDefinition'],
  ExtensionDefinition(token) {
    switch (token.value) {
      case 'schema':
        return _graphql.Kind.SCHEMA_EXTENSION;
      case 'scalar':
        return _graphql.Kind.SCALAR_TYPE_EXTENSION;
      case 'type':
        return _graphql.Kind.OBJECT_TYPE_EXTENSION;
      case 'interface':
        return _graphql.Kind.INTERFACE_TYPE_EXTENSION;
      case 'union':
        return _graphql.Kind.UNION_TYPE_EXTENSION;
      case 'enum':
        return _graphql.Kind.ENUM_TYPE_EXTENSION;
      case 'input':
        return _graphql.Kind.INPUT_OBJECT_TYPE_EXTENSION;
    }
  },
  [_graphql.Kind.SCHEMA_EXTENSION]: ['SchemaDef'],
  [_graphql.Kind.SCALAR_TYPE_EXTENSION]: ['ScalarDef'],
  [_graphql.Kind.OBJECT_TYPE_EXTENSION]: ['ObjectTypeDef'],
  [_graphql.Kind.INTERFACE_TYPE_EXTENSION]: ['InterfaceDef'],
  [_graphql.Kind.UNION_TYPE_EXTENSION]: ['UnionDef'],
  [_graphql.Kind.ENUM_TYPE_EXTENSION]: ['EnumDef'],
  [_graphql.Kind.INPUT_OBJECT_TYPE_EXTENSION]: ['InputDef']
};
exports.ParseRules = ParseRules;
function word(value) {
  return {
    style: 'keyword',
    match: token => token.kind === 'Name' && token.value === value
  };
}
function name(style) {
  return {
    style,
    match: token => token.kind === 'Name',
    update(state, token) {
      state.name = token.value;
    }
  };
}
function type(style) {
  return {
    style,
    match: token => token.kind === 'Name',
    update(state, token) {
      var _a;
      if ((_a = state.prevState) === null || _a === void 0 ? void 0 : _a.prevState) {
        state.name = token.value;
        state.prevState.prevState.type = token.value;
      }
    }
  };
}

/***/ }),

/***/ "../../graphql-language-service/esm/parser/index.js":
/*!**********************************************************!*\
  !*** ../../graphql-language-service/esm/parser/index.js ***!
  \**********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
var _exportNames = {
  CharacterStream: true,
  LexRules: true,
  ParseRules: true,
  isIgnored: true,
  butNot: true,
  list: true,
  opt: true,
  p: true,
  t: true,
  onlineParser: true
};
Object.defineProperty(exports, "CharacterStream", ({
  enumerable: true,
  get: function () {
    return _CharacterStream.default;
  }
}));
Object.defineProperty(exports, "LexRules", ({
  enumerable: true,
  get: function () {
    return _Rules.LexRules;
  }
}));
Object.defineProperty(exports, "ParseRules", ({
  enumerable: true,
  get: function () {
    return _Rules.ParseRules;
  }
}));
Object.defineProperty(exports, "butNot", ({
  enumerable: true,
  get: function () {
    return _RuleHelpers.butNot;
  }
}));
Object.defineProperty(exports, "isIgnored", ({
  enumerable: true,
  get: function () {
    return _Rules.isIgnored;
  }
}));
Object.defineProperty(exports, "list", ({
  enumerable: true,
  get: function () {
    return _RuleHelpers.list;
  }
}));
Object.defineProperty(exports, "onlineParser", ({
  enumerable: true,
  get: function () {
    return _onlineParser.default;
  }
}));
Object.defineProperty(exports, "opt", ({
  enumerable: true,
  get: function () {
    return _RuleHelpers.opt;
  }
}));
Object.defineProperty(exports, "p", ({
  enumerable: true,
  get: function () {
    return _RuleHelpers.p;
  }
}));
Object.defineProperty(exports, "t", ({
  enumerable: true,
  get: function () {
    return _RuleHelpers.t;
  }
}));
var _CharacterStream = _interopRequireDefault(__webpack_require__(/*! ./CharacterStream */ "../../graphql-language-service/esm/parser/CharacterStream.js"));
var _Rules = __webpack_require__(/*! ./Rules */ "../../graphql-language-service/esm/parser/Rules.js");
var _RuleHelpers = __webpack_require__(/*! ./RuleHelpers */ "../../graphql-language-service/esm/parser/RuleHelpers.js");
var _onlineParser = _interopRequireDefault(__webpack_require__(/*! ./onlineParser */ "../../graphql-language-service/esm/parser/onlineParser.js"));
var _types = __webpack_require__(/*! ./types */ "../../graphql-language-service/esm/parser/types.js");
Object.keys(_types).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _types[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _types[key];
    }
  });
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/***/ }),

/***/ "../../graphql-language-service/esm/parser/onlineParser.js":
/*!*****************************************************************!*\
  !*** ../../graphql-language-service/esm/parser/onlineParser.js ***!
  \*****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = onlineParser;
var _Rules = __webpack_require__(/*! ./Rules */ "../../graphql-language-service/esm/parser/Rules.js");
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
function onlineParser() {
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
    eatWhitespace: stream => stream.eatWhile(_Rules.isIgnored),
    lexRules: _Rules.LexRules,
    parseRules: _Rules.ParseRules,
    editorConfig: {}
  };
  return {
    startState() {
      const initialState = {
        level: 0,
        step: 0,
        name: null,
        kind: null,
        type: null,
        rule: null,
        needsSeparator: false,
        prevState: null
      };
      pushRule(options.parseRules, initialState, _graphql.Kind.DOCUMENT);
      return initialState;
    },
    token(stream, state) {
      return getToken(stream, state, options);
    }
  };
}
function getToken(stream, state, options) {
  var _a;
  if (state.inBlockstring) {
    if (stream.match(/.*"""/)) {
      state.inBlockstring = false;
      return 'string';
    }
    stream.skipToEnd();
    return 'string';
  }
  const {
    lexRules,
    parseRules,
    eatWhitespace,
    editorConfig
  } = options;
  if (state.rule && state.rule.length === 0) {
    popRule(state);
  } else if (state.needsAdvance) {
    state.needsAdvance = false;
    advanceRule(state, true);
  }
  if (stream.sol()) {
    const tabSize = (editorConfig === null || editorConfig === void 0 ? void 0 : editorConfig.tabSize) || 2;
    state.indentLevel = Math.floor(stream.indentation() / tabSize);
  }
  if (eatWhitespace(stream)) {
    return 'ws';
  }
  const token = lex(lexRules, stream);
  if (!token) {
    const matchedSomething = stream.match(/\S+/);
    if (!matchedSomething) {
      stream.match(/\s/);
    }
    pushRule(SpecialParseRules, state, 'Invalid');
    return 'invalidchar';
  }
  if (token.kind === 'Comment') {
    pushRule(SpecialParseRules, state, 'Comment');
    return 'comment';
  }
  const backupState = assign({}, state);
  if (token.kind === 'Punctuation') {
    if (/^[{([]/.test(token.value)) {
      if (state.indentLevel !== undefined) {
        state.levels = (state.levels || []).concat(state.indentLevel + 1);
      }
    } else if (/^[})\]]/.test(token.value)) {
      const levels = state.levels = (state.levels || []).slice(0, -1);
      if (state.indentLevel && levels.length > 0 && levels.at(-1) < state.indentLevel) {
        state.indentLevel = levels.at(-1);
      }
    }
  }
  while (state.rule) {
    let expected = typeof state.rule === 'function' ? state.step === 0 ? state.rule(token, stream) : null : state.rule[state.step];
    if (state.needsSeparator) {
      expected = expected === null || expected === void 0 ? void 0 : expected.separator;
    }
    if (expected) {
      if (expected.ofRule) {
        expected = expected.ofRule;
      }
      if (typeof expected === 'string') {
        pushRule(parseRules, state, expected);
        continue;
      }
      if ((_a = expected.match) === null || _a === void 0 ? void 0 : _a.call(expected, token)) {
        if (expected.update) {
          expected.update(state, token);
        }
        if (token.kind === 'Punctuation') {
          advanceRule(state, true);
        } else {
          state.needsAdvance = true;
        }
        return expected.style;
      }
    }
    unsuccessful(state);
  }
  assign(state, backupState);
  pushRule(SpecialParseRules, state, 'Invalid');
  return 'invalidchar';
}
function assign(to, from) {
  const keys = Object.keys(from);
  for (let i = 0; i < keys.length; i++) {
    to[keys[i]] = from[keys[i]];
  }
  return to;
}
const SpecialParseRules = {
  Invalid: [],
  Comment: []
};
function pushRule(rules, state, ruleKind) {
  if (!rules[ruleKind]) {
    throw new TypeError('Unknown rule: ' + ruleKind);
  }
  state.prevState = Object.assign({}, state);
  state.kind = ruleKind;
  state.name = null;
  state.type = null;
  state.rule = rules[ruleKind];
  state.step = 0;
  state.needsSeparator = false;
}
function popRule(state) {
  if (!state.prevState) {
    return;
  }
  state.kind = state.prevState.kind;
  state.name = state.prevState.name;
  state.type = state.prevState.type;
  state.rule = state.prevState.rule;
  state.step = state.prevState.step;
  state.needsSeparator = state.prevState.needsSeparator;
  state.prevState = state.prevState.prevState;
}
function advanceRule(state, successful) {
  var _a;
  if (isList(state) && state.rule) {
    const step = state.rule[state.step];
    if (step.separator) {
      const {
        separator
      } = step;
      state.needsSeparator = !state.needsSeparator;
      if (!state.needsSeparator && separator.ofRule) {
        return;
      }
    }
    if (successful) {
      return;
    }
  }
  state.needsSeparator = false;
  state.step++;
  while (state.rule && !(Array.isArray(state.rule) && state.step < state.rule.length)) {
    popRule(state);
    if (state.rule) {
      if (isList(state)) {
        if ((_a = state.rule) === null || _a === void 0 ? void 0 : _a[state.step].separator) {
          state.needsSeparator = !state.needsSeparator;
        }
      } else {
        state.needsSeparator = false;
        state.step++;
      }
    }
  }
}
function isList(state) {
  const step = Array.isArray(state.rule) && typeof state.rule[state.step] !== 'string' && state.rule[state.step];
  return step && step.isList;
}
function unsuccessful(state) {
  while (state.rule && !(Array.isArray(state.rule) && state.rule[state.step].ofRule)) {
    popRule(state);
  }
  if (state.rule) {
    advanceRule(state, false);
  }
}
function lex(lexRules, stream) {
  const kinds = Object.keys(lexRules);
  for (let i = 0; i < kinds.length; i++) {
    const match = stream.match(lexRules[kinds[i]]);
    if (match && match instanceof Array) {
      return {
        kind: kinds[i],
        value: match[0]
      };
    }
  }
}

/***/ }),

/***/ "../../graphql-language-service/esm/parser/types.js":
/*!**********************************************************!*\
  !*** ../../graphql-language-service/esm/parser/types.js ***!
  \**********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.RuleKinds = exports.AdditionalRuleKinds = void 0;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
const AdditionalRuleKinds = {
  ALIASED_FIELD: 'AliasedField',
  ARGUMENTS: 'Arguments',
  SHORT_QUERY: 'ShortQuery',
  QUERY: 'Query',
  MUTATION: 'Mutation',
  SUBSCRIPTION: 'Subscription',
  TYPE_CONDITION: 'TypeCondition',
  INVALID: 'Invalid',
  COMMENT: 'Comment',
  SCHEMA_DEF: 'SchemaDef',
  SCALAR_DEF: 'ScalarDef',
  OBJECT_TYPE_DEF: 'ObjectTypeDef',
  OBJECT_VALUE: 'ObjectValue',
  LIST_VALUE: 'ListValue',
  INTERFACE_DEF: 'InterfaceDef',
  UNION_DEF: 'UnionDef',
  ENUM_DEF: 'EnumDef',
  ENUM_VALUE: 'EnumValue',
  FIELD_DEF: 'FieldDef',
  INPUT_DEF: 'InputDef',
  INPUT_VALUE_DEF: 'InputValueDef',
  ARGUMENTS_DEF: 'ArgumentsDef',
  EXTEND_DEF: 'ExtendDef',
  EXTENSION_DEFINITION: 'ExtensionDefinition',
  DIRECTIVE_DEF: 'DirectiveDef',
  IMPLEMENTS: 'Implements',
  VARIABLE_DEFINITIONS: 'VariableDefinitions',
  TYPE: 'Type'
};
exports.AdditionalRuleKinds = AdditionalRuleKinds;
const RuleKinds = Object.assign(Object.assign({}, _graphql.Kind), AdditionalRuleKinds);
exports.RuleKinds = RuleKinds;

/***/ }),

/***/ "../../graphql-language-service/esm/types.js":
/*!***************************************************!*\
  !*** ../../graphql-language-service/esm/types.js ***!
  \***************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.FileChangeTypeKind = exports.CompletionItemKind = void 0;
Object.defineProperty(exports, "InsertTextFormat", ({
  enumerable: true,
  get: function () {
    return _vscodeLanguageserverTypes.InsertTextFormat;
  }
}));
var _vscodeLanguageserverTypes = __webpack_require__(/*! vscode-languageserver-types */ "../../../node_modules/vscode-languageserver-types/lib/esm/main.js");
const FileChangeTypeKind = {
  Created: 1,
  Changed: 2,
  Deleted: 3
};
exports.FileChangeTypeKind = FileChangeTypeKind;
var CompletionItemKind;
exports.CompletionItemKind = CompletionItemKind;
(function (CompletionItemKind) {
  CompletionItemKind.Text = 1;
  CompletionItemKind.Method = 2;
  CompletionItemKind.Function = 3;
  CompletionItemKind.Constructor = 4;
  CompletionItemKind.Field = 5;
  CompletionItemKind.Variable = 6;
  CompletionItemKind.Class = 7;
  CompletionItemKind.Interface = 8;
  CompletionItemKind.Module = 9;
  CompletionItemKind.Property = 10;
  CompletionItemKind.Unit = 11;
  CompletionItemKind.Value = 12;
  CompletionItemKind.Enum = 13;
  CompletionItemKind.Keyword = 14;
  CompletionItemKind.Snippet = 15;
  CompletionItemKind.Color = 16;
  CompletionItemKind.File = 17;
  CompletionItemKind.Reference = 18;
  CompletionItemKind.Folder = 19;
  CompletionItemKind.EnumMember = 20;
  CompletionItemKind.Constant = 21;
  CompletionItemKind.Struct = 22;
  CompletionItemKind.Event = 23;
  CompletionItemKind.Operator = 24;
  CompletionItemKind.TypeParameter = 25;
})(CompletionItemKind || (exports.CompletionItemKind = CompletionItemKind = {}));

/***/ }),

/***/ "../../graphql-language-service/esm/utils/Range.js":
/*!*********************************************************!*\
  !*** ../../graphql-language-service/esm/utils/Range.js ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.Range = exports.Position = void 0;
exports.locToRange = locToRange;
exports.offsetToPosition = offsetToPosition;
class Range {
  constructor(start, end) {
    this.containsPosition = position => {
      if (this.start.line === position.line) {
        return this.start.character <= position.character;
      }
      if (this.end.line === position.line) {
        return this.end.character >= position.character;
      }
      return this.start.line <= position.line && this.end.line >= position.line;
    };
    this.start = start;
    this.end = end;
  }
  setStart(line, character) {
    this.start = new Position(line, character);
  }
  setEnd(line, character) {
    this.end = new Position(line, character);
  }
}
exports.Range = Range;
class Position {
  constructor(line, character) {
    this.lessThanOrEqualTo = position => this.line < position.line || this.line === position.line && this.character <= position.character;
    this.line = line;
    this.character = character;
  }
  setLine(line) {
    this.line = line;
  }
  setCharacter(character) {
    this.character = character;
  }
}
exports.Position = Position;
function offsetToPosition(text, loc) {
  const EOL = '\n';
  const buf = text.slice(0, loc);
  const lines = buf.split(EOL).length - 1;
  const lastLineIndex = buf.lastIndexOf(EOL);
  return new Position(lines, loc - lastLineIndex - 1);
}
function locToRange(text, loc) {
  const start = offsetToPosition(text, loc.start);
  const end = offsetToPosition(text, loc.end);
  return new Range(start, end);
}

/***/ }),

/***/ "../../graphql-language-service/esm/utils/collectVariables.js":
/*!********************************************************************!*\
  !*** ../../graphql-language-service/esm/utils/collectVariables.js ***!
  \********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.collectVariables = collectVariables;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
function collectVariables(schema, documentAST) {
  const variableToType = Object.create(null);
  for (const definition of documentAST.definitions) {
    if (definition.kind === 'OperationDefinition') {
      const {
        variableDefinitions
      } = definition;
      if (variableDefinitions) {
        for (const {
          variable,
          type
        } of variableDefinitions) {
          const inputType = (0, _graphql.typeFromAST)(schema, type);
          if (inputType) {
            variableToType[variable.name.value] = inputType;
          } else if (type.kind === _graphql.Kind.NAMED_TYPE && type.name.value === 'Float') {
            variableToType[variable.name.value] = _graphql.GraphQLFloat;
          }
        }
      }
    }
  }
  return variableToType;
}

/***/ }),

/***/ "../../graphql-language-service/esm/utils/fragmentDependencies.js":
/*!************************************************************************!*\
  !*** ../../graphql-language-service/esm/utils/fragmentDependencies.js ***!
  \************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getFragmentDependenciesForAST = exports.getFragmentDependencies = void 0;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
var _nullthrows = _interopRequireDefault(__webpack_require__(/*! nullthrows */ "../../../node_modules/nullthrows/nullthrows.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const getFragmentDependencies = (operationString, fragmentDefinitions) => {
  if (!fragmentDefinitions) {
    return [];
  }
  let parsedOperation;
  try {
    parsedOperation = (0, _graphql.parse)(operationString);
  } catch (_a) {
    return [];
  }
  return getFragmentDependenciesForAST(parsedOperation, fragmentDefinitions);
};
exports.getFragmentDependencies = getFragmentDependencies;
const getFragmentDependenciesForAST = (parsedOperation, fragmentDefinitions) => {
  if (!fragmentDefinitions) {
    return [];
  }
  const existingFrags = new Map();
  const referencedFragNames = new Set();
  (0, _graphql.visit)(parsedOperation, {
    FragmentDefinition(node) {
      existingFrags.set(node.name.value, true);
    },
    FragmentSpread(node) {
      if (!referencedFragNames.has(node.name.value)) {
        referencedFragNames.add(node.name.value);
      }
    }
  });
  const asts = new Set();
  for (const name of referencedFragNames) {
    if (!existingFrags.has(name) && fragmentDefinitions.has(name)) {
      asts.add((0, _nullthrows.default)(fragmentDefinitions.get(name)));
    }
  }
  const referencedFragments = [];
  for (const ast of asts) {
    (0, _graphql.visit)(ast, {
      FragmentSpread(node) {
        if (!referencedFragNames.has(node.name.value) && fragmentDefinitions.get(node.name.value)) {
          asts.add((0, _nullthrows.default)(fragmentDefinitions.get(node.name.value)));
          referencedFragNames.add(node.name.value);
        }
      }
    });
    if (!existingFrags.has(ast.name.value)) {
      referencedFragments.push(ast);
    }
  }
  return referencedFragments;
};
exports.getFragmentDependenciesForAST = getFragmentDependenciesForAST;

/***/ }),

/***/ "../../graphql-language-service/esm/utils/getASTNodeAtPosition.js":
/*!************************************************************************!*\
  !*** ../../graphql-language-service/esm/utils/getASTNodeAtPosition.js ***!
  \************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getASTNodeAtPosition = getASTNodeAtPosition;
exports.pointToOffset = pointToOffset;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
function getASTNodeAtPosition(query, ast, point) {
  const offset = pointToOffset(query, point);
  let nodeContainingPosition;
  (0, _graphql.visit)(ast, {
    enter(node) {
      if (node.kind !== 'Name' && node.loc && node.loc.start <= offset && offset <= node.loc.end) {
        nodeContainingPosition = node;
      } else {
        return false;
      }
    },
    leave(node) {
      if (node.loc && node.loc.start <= offset && offset <= node.loc.end) {
        return false;
      }
    }
  });
  return nodeContainingPosition;
}
function pointToOffset(text, point) {
  const linesUntilPosition = text.split('\n').slice(0, point.line);
  return point.character + linesUntilPosition.map(line => line.length + 1).reduce((a, b) => a + b, 0);
}

/***/ }),

/***/ "../../graphql-language-service/esm/utils/getOperationFacts.js":
/*!*********************************************************************!*\
  !*** ../../graphql-language-service/esm/utils/getOperationFacts.js ***!
  \*********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = getOperationFacts;
exports.getOperationASTFacts = getOperationASTFacts;
exports.getQueryFacts = void 0;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
var _collectVariables = __webpack_require__(/*! ./collectVariables */ "../../graphql-language-service/esm/utils/collectVariables.js");
function getOperationASTFacts(documentAST, schema) {
  const variableToType = schema ? (0, _collectVariables.collectVariables)(schema, documentAST) : undefined;
  const operations = [];
  (0, _graphql.visit)(documentAST, {
    OperationDefinition(node) {
      operations.push(node);
    }
  });
  return {
    variableToType,
    operations
  };
}
function getOperationFacts(schema, documentString) {
  if (!documentString) {
    return;
  }
  try {
    const documentAST = (0, _graphql.parse)(documentString);
    return Object.assign(Object.assign({}, getOperationASTFacts(documentAST, schema)), {
      documentAST
    });
  } catch (_a) {
    return;
  }
}
const getQueryFacts = getOperationFacts;
exports.getQueryFacts = getQueryFacts;

/***/ }),

/***/ "../../graphql-language-service/esm/utils/getVariablesJSONSchema.js":
/*!**************************************************************************!*\
  !*** ../../graphql-language-service/esm/utils/getVariablesJSONSchema.js ***!
  \**************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.defaultJSONSchemaOptions = void 0;
exports.getVariablesJSONSchema = getVariablesJSONSchema;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
const defaultJSONSchemaOptions = {
  useMarkdownDescription: false
};
exports.defaultJSONSchemaOptions = defaultJSONSchemaOptions;
function text(into, newText) {
  into.push(newText);
}
function renderType(into, t) {
  if ((0, _graphql.isNonNullType)(t)) {
    renderType(into, t.ofType);
    text(into, '!');
  } else if ((0, _graphql.isListType)(t)) {
    text(into, '[');
    renderType(into, t.ofType);
    text(into, ']');
  } else {
    text(into, t.name);
  }
}
function renderDefinitionDescription(t, useMarkdown, description) {
  const into = [];
  const type = 'type' in t ? t.type : t;
  if ('type' in t && t.description) {
    text(into, t.description);
    text(into, '\n\n');
  }
  text(into, renderTypeToString(type, useMarkdown));
  if (description) {
    text(into, '\n');
    text(into, description);
  } else if (!(0, _graphql.isScalarType)(type) && 'description' in type && type.description) {
    text(into, '\n');
    text(into, type.description);
  } else if ('ofType' in type && !(0, _graphql.isScalarType)(type.ofType) && 'description' in type.ofType && type.ofType.description) {
    text(into, '\n');
    text(into, type.ofType.description);
  }
  return into.join('');
}
function renderTypeToString(t, useMarkdown) {
  const into = [];
  if (useMarkdown) {
    text(into, '```graphql\n');
  }
  renderType(into, t);
  if (useMarkdown) {
    text(into, '\n```');
  }
  return into.join('');
}
const defaultScalarTypesMap = {
  Int: {
    type: 'integer'
  },
  String: {
    type: 'string'
  },
  Float: {
    type: 'number'
  },
  ID: {
    type: 'string'
  },
  Boolean: {
    type: 'boolean'
  },
  DateTime: {
    type: 'string'
  }
};
class Marker {
  constructor() {
    this.set = new Set();
  }
  mark(name) {
    if (this.set.has(name)) {
      return false;
    }
    this.set.add(name);
    return true;
  }
}
function getJSONSchemaFromGraphQLType(fieldOrType, options) {
  var _a, _b;
  let definition = Object.create(null);
  const definitions = Object.create(null);
  const isField = ('type' in fieldOrType);
  const type = isField ? fieldOrType.type : fieldOrType;
  const baseType = (0, _graphql.isNonNullType)(type) ? type.ofType : type;
  const required = (0, _graphql.isNonNullType)(type);
  if ((0, _graphql.isScalarType)(baseType)) {
    if ((_a = options === null || options === void 0 ? void 0 : options.scalarSchemas) === null || _a === void 0 ? void 0 : _a[baseType.name]) {
      definition = JSON.parse(JSON.stringify(options.scalarSchemas[baseType.name]));
    } else {
      definition.type = ['string', 'number', 'boolean', 'integer'];
    }
    if (!required) {
      if (Array.isArray(definition.type)) {
        definition.type.push('null');
      } else if (definition.type) {
        definition.type = [definition.type, 'null'];
      } else if (definition.enum) {
        definition.enum.push(null);
      } else if (definition.oneOf) {
        definition.oneOf.push({
          type: 'null'
        });
      } else {
        definition = {
          oneOf: [definition, {
            type: 'null'
          }]
        };
      }
    }
  } else if ((0, _graphql.isEnumType)(baseType)) {
    definition.enum = baseType.getValues().map(val => val.name);
    if (!required) {
      definition.enum.push(null);
    }
  } else if ((0, _graphql.isListType)(baseType)) {
    if (required) {
      definition.type = 'array';
    } else {
      definition.type = ['array', 'null'];
    }
    const {
      definition: def,
      definitions: defs
    } = getJSONSchemaFromGraphQLType(baseType.ofType, options);
    definition.items = def;
    if (defs) {
      for (const defName of Object.keys(defs)) {
        definitions[defName] = defs[defName];
      }
    }
  } else if ((0, _graphql.isInputObjectType)(baseType)) {
    if (required) {
      definition.$ref = `#/definitions/${baseType.name}`;
    } else {
      definition.oneOf = [{
        $ref: `#/definitions/${baseType.name}`
      }, {
        type: 'null'
      }];
    }
    if ((_b = options === null || options === void 0 ? void 0 : options.definitionMarker) === null || _b === void 0 ? void 0 : _b.mark(baseType.name)) {
      const fields = baseType.getFields();
      const fieldDef = {
        type: 'object',
        properties: {},
        required: []
      };
      fieldDef.description = renderDefinitionDescription(baseType);
      if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) {
        fieldDef.markdownDescription = renderDefinitionDescription(baseType, true);
      }
      for (const fieldName of Object.keys(fields)) {
        const field = fields[fieldName];
        const {
          required: fieldRequired,
          definition: fieldDefinition,
          definitions: typeDefinitions
        } = getJSONSchemaFromGraphQLType(field, options);
        fieldDef.properties[fieldName] = fieldDefinition;
        if (fieldRequired) {
          fieldDef.required.push(fieldName);
        }
        if (typeDefinitions) {
          for (const [defName, value] of Object.entries(typeDefinitions)) {
            definitions[defName] = value;
          }
        }
      }
      definitions[baseType.name] = fieldDef;
    }
  }
  if ('defaultValue' in fieldOrType && fieldOrType.defaultValue !== undefined) {
    definition.default = fieldOrType.defaultValue;
  }
  const {
    description
  } = definition;
  definition.description = renderDefinitionDescription(fieldOrType, false, description);
  if (options === null || options === void 0 ? void 0 : options.useMarkdownDescription) {
    definition.markdownDescription = renderDefinitionDescription(fieldOrType, true, description);
  }
  return {
    required,
    definition,
    definitions
  };
}
function getVariablesJSONSchema(variableToType, options) {
  var _a;
  const jsonSchema = {
    $schema: 'http://json-schema.org/draft-04/schema',
    type: 'object',
    properties: {},
    required: []
  };
  const runtimeOptions = Object.assign(Object.assign({}, options), {
    definitionMarker: new Marker(),
    scalarSchemas: Object.assign(Object.assign({}, defaultScalarTypesMap), options === null || options === void 0 ? void 0 : options.scalarSchemas)
  });
  if (variableToType) {
    for (const [variableName, type] of Object.entries(variableToType)) {
      const {
        definition,
        required,
        definitions
      } = getJSONSchemaFromGraphQLType(type, runtimeOptions);
      jsonSchema.properties[variableName] = definition;
      if (required) {
        (_a = jsonSchema.required) === null || _a === void 0 ? void 0 : _a.push(variableName);
      }
      if (definitions) {
        jsonSchema.definitions = Object.assign(Object.assign({}, jsonSchema === null || jsonSchema === void 0 ? void 0 : jsonSchema.definitions), definitions);
      }
    }
  }
  return jsonSchema;
}

/***/ }),

/***/ "../../graphql-language-service/esm/utils/index.js":
/*!*********************************************************!*\
  !*** ../../graphql-language-service/esm/utils/index.js ***!
  \*********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "Position", ({
  enumerable: true,
  get: function () {
    return _Range.Position;
  }
}));
Object.defineProperty(exports, "Range", ({
  enumerable: true,
  get: function () {
    return _Range.Range;
  }
}));
Object.defineProperty(exports, "collectVariables", ({
  enumerable: true,
  get: function () {
    return _collectVariables.collectVariables;
  }
}));
Object.defineProperty(exports, "getASTNodeAtPosition", ({
  enumerable: true,
  get: function () {
    return _getASTNodeAtPosition.getASTNodeAtPosition;
  }
}));
Object.defineProperty(exports, "getFragmentDependencies", ({
  enumerable: true,
  get: function () {
    return _fragmentDependencies.getFragmentDependencies;
  }
}));
Object.defineProperty(exports, "getFragmentDependenciesForAST", ({
  enumerable: true,
  get: function () {
    return _fragmentDependencies.getFragmentDependenciesForAST;
  }
}));
Object.defineProperty(exports, "getOperationASTFacts", ({
  enumerable: true,
  get: function () {
    return _getOperationFacts.getOperationASTFacts;
  }
}));
Object.defineProperty(exports, "getOperationFacts", ({
  enumerable: true,
  get: function () {
    return _getOperationFacts.default;
  }
}));
Object.defineProperty(exports, "getQueryFacts", ({
  enumerable: true,
  get: function () {
    return _getOperationFacts.getQueryFacts;
  }
}));
Object.defineProperty(exports, "getVariablesJSONSchema", ({
  enumerable: true,
  get: function () {
    return _getVariablesJSONSchema.getVariablesJSONSchema;
  }
}));
Object.defineProperty(exports, "locToRange", ({
  enumerable: true,
  get: function () {
    return _Range.locToRange;
  }
}));
Object.defineProperty(exports, "offsetToPosition", ({
  enumerable: true,
  get: function () {
    return _Range.offsetToPosition;
  }
}));
Object.defineProperty(exports, "pointToOffset", ({
  enumerable: true,
  get: function () {
    return _getASTNodeAtPosition.pointToOffset;
  }
}));
Object.defineProperty(exports, "validateWithCustomRules", ({
  enumerable: true,
  get: function () {
    return _validateWithCustomRules.validateWithCustomRules;
  }
}));
var _fragmentDependencies = __webpack_require__(/*! ./fragmentDependencies */ "../../graphql-language-service/esm/utils/fragmentDependencies.js");
var _getVariablesJSONSchema = __webpack_require__(/*! ./getVariablesJSONSchema */ "../../graphql-language-service/esm/utils/getVariablesJSONSchema.js");
var _getASTNodeAtPosition = __webpack_require__(/*! ./getASTNodeAtPosition */ "../../graphql-language-service/esm/utils/getASTNodeAtPosition.js");
var _Range = __webpack_require__(/*! ./Range */ "../../graphql-language-service/esm/utils/Range.js");
var _validateWithCustomRules = __webpack_require__(/*! ./validateWithCustomRules */ "../../graphql-language-service/esm/utils/validateWithCustomRules.js");
var _collectVariables = __webpack_require__(/*! ./collectVariables */ "../../graphql-language-service/esm/utils/collectVariables.js");
var _getOperationFacts = _interopRequireWildcard(__webpack_require__(/*! ./getOperationFacts */ "../../graphql-language-service/esm/utils/getOperationFacts.js"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

/***/ }),

/***/ "../../graphql-language-service/esm/utils/validateWithCustomRules.js":
/*!***************************************************************************!*\
  !*** ../../graphql-language-service/esm/utils/validateWithCustomRules.js ***!
  \***************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.validateWithCustomRules = validateWithCustomRules;
var _graphql = __webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs");
const specifiedSDLRules = [_graphql.LoneSchemaDefinitionRule, _graphql.UniqueOperationTypesRule, _graphql.UniqueTypeNamesRule, _graphql.UniqueEnumValueNamesRule, _graphql.UniqueFieldDefinitionNamesRule, _graphql.UniqueDirectiveNamesRule, _graphql.KnownTypeNamesRule, _graphql.KnownDirectivesRule, _graphql.UniqueDirectivesPerLocationRule, _graphql.PossibleTypeExtensionsRule, _graphql.UniqueArgumentNamesRule, _graphql.UniqueInputFieldNamesRule];
function validateWithCustomRules(schema, ast, customRules, isRelayCompatMode, isSchemaDocument) {
  const rules = _graphql.specifiedRules.filter(rule => {
    if (rule === _graphql.NoUnusedFragmentsRule || rule === _graphql.ExecutableDefinitionsRule) {
      return false;
    }
    if (isRelayCompatMode && rule === _graphql.KnownFragmentNamesRule) {
      return false;
    }
    return true;
  });
  if (customRules) {
    Array.prototype.push.apply(rules, customRules);
  }
  if (isSchemaDocument) {
    Array.prototype.push.apply(rules, specifiedSDLRules);
  }
  const errors = (0, _graphql.validate)(schema, ast, rules);
  return errors.filter(error => {
    if (error.message.includes('Unknown directive') && error.nodes) {
      const node = error.nodes[0];
      if (node && node.kind === _graphql.Kind.DIRECTIVE) {
        const name = node.name.value;
        if (name === 'arguments' || name === 'argumentDefinitions') {
          return false;
        }
      }
    }
    return true;
  });
}

/***/ }),

/***/ "./style.css":
/*!*******************!*\
  !*** ./style.css ***!
  \*******************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "../../graphiql-react/dist/style.css":
/*!*******************************************!*\
  !*** ../../graphiql-react/dist/style.css ***!
  \*******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "../../graphiql-react/font/fira-code.css":
/*!***********************************************!*\
  !*** ../../graphiql-react/font/fira-code.css ***!
  \***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "../../graphiql-react/font/roboto.css":
/*!********************************************!*\
  !*** ../../graphiql-react/font/roboto.css ***!
  \********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ }),

/***/ "react":
/*!************************!*\
  !*** external "React" ***!
  \************************/
/***/ (function(module) {

module.exports = window["React"];

/***/ }),

/***/ "react-dom":
/*!***************************!*\
  !*** external "ReactDOM" ***!
  \***************************/
/***/ (function(module) {

module.exports = window["ReactDOM"];

/***/ }),

/***/ "../../../node_modules/@headlessui/react/dist/headlessui.dev.cjs":
/*!***********************************************************************!*\
  !*** ../../../node_modules/@headlessui/react/dist/headlessui.dev.cjs ***!
  \***********************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {


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 __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __publicField = (obj, key, value) => {
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  return value;
};

// src/index.ts
var src_exports = {};
__export(src_exports, {
  Combobox: () => Combobox,
  Dialog: () => Dialog,
  Disclosure: () => Disclosure,
  FocusTrap: () => FocusTrap,
  Listbox: () => Listbox,
  Menu: () => Menu,
  Popover: () => Popover,
  Portal: () => Portal,
  RadioGroup: () => RadioGroup,
  Switch: () => Switch,
  Tab: () => Tab,
  Transition: () => Transition
});
module.exports = __toCommonJS(src_exports);

// src/components/combobox/combobox.tsx
var import_react19 = __toESM(__webpack_require__(/*! react */ "react"), 1);

// src/hooks/use-computed.ts
var import_react3 = __webpack_require__(/*! react */ "react");

// src/hooks/use-iso-morphic-effect.ts
var import_react = __webpack_require__(/*! react */ "react");

// src/utils/env.ts
var Env = class {
  constructor() {
    __publicField(this, "current", this.detect());
    __publicField(this, "handoffState", "pending");
    __publicField(this, "currentId", 0);
  }
  set(env2) {
    if (this.current === env2)
      return;
    this.handoffState = "pending";
    this.currentId = 0;
    this.current = env2;
  }
  reset() {
    this.set(this.detect());
  }
  nextId() {
    return ++this.currentId;
  }
  get isServer() {
    return this.current === "server";
  }
  get isClient() {
    return this.current === "client";
  }
  detect() {
    if (typeof window === "undefined" || typeof document === "undefined") {
      return "server";
    }
    return "client";
  }
  handoff() {
    if (this.handoffState === "pending") {
      this.handoffState = "complete";
    }
  }
  get isHandoffComplete() {
    return this.handoffState === "complete";
  }
};
var env = new Env();

// src/hooks/use-iso-morphic-effect.ts
var useIsoMorphicEffect = (effect, deps) => {
  if (env.isServer) {
    (0, import_react.useEffect)(effect, deps);
  } else {
    (0, import_react.useLayoutEffect)(effect, deps);
  }
};

// src/hooks/use-latest-value.ts
var import_react2 = __webpack_require__(/*! react */ "react");
function useLatestValue(value) {
  let cache = (0, import_react2.useRef)(value);
  useIsoMorphicEffect(() => {
    cache.current = value;
  }, [value]);
  return cache;
}

// src/hooks/use-computed.ts
function useComputed(cb, dependencies) {
  let [value, setValue] = (0, import_react3.useState)(cb);
  let cbRef = useLatestValue(cb);
  useIsoMorphicEffect(() => setValue(cbRef.current), [cbRef, setValue, ...dependencies]);
  return value;
}

// src/hooks/use-disposables.ts
var import_react4 = __webpack_require__(/*! react */ "react");

// src/utils/micro-task.ts
function microTask(cb) {
  if (typeof queueMicrotask === "function") {
    queueMicrotask(cb);
  } else {
    Promise.resolve().then(cb).catch(
      (e) => setTimeout(() => {
        throw e;
      })
    );
  }
}

// src/utils/disposables.ts
function disposables() {
  let _disposables = [];
  let api = {
    addEventListener(element, name, listener, options) {
      element.addEventListener(name, listener, options);
      return api.add(() => element.removeEventListener(name, listener, options));
    },
    requestAnimationFrame(...args) {
      let raf = requestAnimationFrame(...args);
      return api.add(() => cancelAnimationFrame(raf));
    },
    nextFrame(...args) {
      return api.requestAnimationFrame(() => {
        return api.requestAnimationFrame(...args);
      });
    },
    setTimeout(...args) {
      let timer = setTimeout(...args);
      return api.add(() => clearTimeout(timer));
    },
    microTask(...args) {
      let task = { current: true };
      microTask(() => {
        if (task.current) {
          args[0]();
        }
      });
      return api.add(() => {
        task.current = false;
      });
    },
    style(node, property, value) {
      let previous = node.style.getPropertyValue(property);
      Object.assign(node.style, { [property]: value });
      return this.add(() => {
        Object.assign(node.style, { [property]: previous });
      });
    },
    group(cb) {
      let d = disposables();
      cb(d);
      return this.add(() => d.dispose());
    },
    add(cb) {
      _disposables.push(cb);
      return () => {
        let idx = _disposables.indexOf(cb);
        if (idx >= 0) {
          for (let dispose of _disposables.splice(idx, 1)) {
            dispose();
          }
        }
      };
    },
    dispose() {
      for (let dispose of _disposables.splice(0)) {
        dispose();
      }
    }
  };
  return api;
}

// src/hooks/use-disposables.ts
function useDisposables() {
  let [d] = (0, import_react4.useState)(disposables);
  (0, import_react4.useEffect)(() => () => d.dispose(), [d]);
  return d;
}

// src/hooks/use-event.ts
var import_react5 = __toESM(__webpack_require__(/*! react */ "react"), 1);
var useEvent = (
  // TODO: Add React.useEvent ?? once the useEvent hook is available
  function useEvent2(cb) {
    let cache = useLatestValue(cb);
    return import_react5.default.useCallback((...args) => cache.current(...args), [cache]);
  }
);

// src/hooks/use-id.ts
var import_react7 = __toESM(__webpack_require__(/*! react */ "react"), 1);

// src/hooks/use-server-handoff-complete.ts
var import_react6 = __webpack_require__(/*! react */ "react");
function useServerHandoffComplete() {
  let [complete, setComplete] = (0, import_react6.useState)(env.isHandoffComplete);
  if (complete && env.isHandoffComplete === false) {
    setComplete(false);
  }
  (0, import_react6.useEffect)(() => {
    if (complete === true)
      return;
    setComplete(true);
  }, [complete]);
  (0, import_react6.useEffect)(() => env.handoff(), []);
  return complete;
}

// src/hooks/use-id.ts
var _a;
var useId = (
  // Prefer React's `useId` if it's available.
  // @ts-expect-error - `useId` doesn't exist in React < 18.
  (_a = import_react7.default.useId) != null ? _a : function useId2() {
    let ready = useServerHandoffComplete();
    let [id, setId] = import_react7.default.useState(ready ? () => env.nextId() : null);
    useIsoMorphicEffect(() => {
      if (id === null)
        setId(env.nextId());
    }, [id]);
    return id != null ? "" + id : void 0;
  }
);

// src/hooks/use-outside-click.ts
var import_react10 = __webpack_require__(/*! react */ "react");

// src/utils/match.ts
function match(value, lookup, ...args) {
  if (value in lookup) {
    let returnValue = lookup[value];
    return typeof returnValue === "function" ? returnValue(...args) : returnValue;
  }
  let error = new Error(
    `Tried to handle "${value}" but there is no handler defined. Only defined handlers are: ${Object.keys(
      lookup
    ).map((key) => `"${key}"`).join(", ")}.`
  );
  if (Error.captureStackTrace)
    Error.captureStackTrace(error, match);
  throw error;
}

// src/utils/owner.ts
function getOwnerDocument(element) {
  if (env.isServer)
    return null;
  if (element instanceof Node)
    return element.ownerDocument;
  if (element == null ? void 0 : element.hasOwnProperty("current")) {
    if (element.current instanceof Node)
      return element.current.ownerDocument;
  }
  return document;
}

// src/utils/focus-management.ts
var focusableSelector = [
  "[contentEditable=true]",
  "[tabindex]",
  "a[href]",
  "area[href]",
  "button:not([disabled])",
  "iframe",
  "input:not([disabled])",
  "select:not([disabled])",
  "textarea:not([disabled])"
].map(
   false ? (
    // TODO: Remove this once JSDOM fixes the issue where an element that is
    // "hidden" can be the document.activeElement, because this is not possible
    // in real browsers.
    0
  ) : (selector) => `${selector}:not([tabindex='-1'])`
).join(",");
function getFocusableElements(container = document.body) {
  if (container == null)
    return [];
  return Array.from(container.querySelectorAll(focusableSelector)).sort(
    // We want to move `tabIndex={0}` to the end of the list, this is what the browser does as well.
    (a, z) => Math.sign((a.tabIndex || Number.MAX_SAFE_INTEGER) - (z.tabIndex || Number.MAX_SAFE_INTEGER))
  );
}
function isFocusableElement(element, mode = 0 /* Strict */) {
  var _a3;
  if (element === ((_a3 = getOwnerDocument(element)) == null ? void 0 : _a3.body))
    return false;
  return match(mode, {
    [0 /* Strict */]() {
      return element.matches(focusableSelector);
    },
    [1 /* Loose */]() {
      let next = element;
      while (next !== null) {
        if (next.matches(focusableSelector))
          return true;
        next = next.parentElement;
      }
      return false;
    }
  });
}
function restoreFocusIfNecessary(element) {
  let ownerDocument = getOwnerDocument(element);
  disposables().nextFrame(() => {
    if (ownerDocument && !isFocusableElement(ownerDocument.activeElement, 0 /* Strict */)) {
      focusElement(element);
    }
  });
}
if (typeof window !== "undefined" && typeof document !== "undefined") {
  document.addEventListener(
    "keydown",
    (event) => {
      if (event.metaKey || event.altKey || event.ctrlKey) {
        return;
      }
      document.documentElement.dataset.headlessuiFocusVisible = "";
    },
    true
  );
  document.addEventListener(
    "click",
    (event) => {
      if (event.detail === 1 /* Mouse */) {
        delete document.documentElement.dataset.headlessuiFocusVisible;
      } else if (event.detail === 0 /* Keyboard */) {
        document.documentElement.dataset.headlessuiFocusVisible = "";
      }
    },
    true
  );
}
function focusElement(element) {
  element == null ? void 0 : element.focus({ preventScroll: true });
}
var selectableSelector = ["textarea", "input"].join(",");
function isSelectableElement(element) {
  var _a3, _b;
  return (_b = (_a3 = element == null ? void 0 : element.matches) == null ? void 0 : _a3.call(element, selectableSelector)) != null ? _b : false;
}
function sortByDomNode(nodes, resolveKey = (i) => i) {
  return nodes.slice().sort((aItem, zItem) => {
    let a = resolveKey(aItem);
    let z = resolveKey(zItem);
    if (a === null || z === null)
      return 0;
    let position = a.compareDocumentPosition(z);
    if (position & Node.DOCUMENT_POSITION_FOLLOWING)
      return -1;
    if (position & Node.DOCUMENT_POSITION_PRECEDING)
      return 1;
    return 0;
  });
}
function focusFrom(current, focus) {
  return focusIn(getFocusableElements(), focus, { relativeTo: current });
}
function focusIn(container, focus, {
  sorted = true,
  relativeTo = null,
  skipElements = []
} = {}) {
  let ownerDocument = Array.isArray(container) ? container.length > 0 ? container[0].ownerDocument : document : container.ownerDocument;
  let elements = Array.isArray(container) ? sorted ? sortByDomNode(container) : container : getFocusableElements(container);
  if (skipElements.length > 0 && elements.length > 1) {
    elements = elements.filter((x) => !skipElements.includes(x));
  }
  relativeTo = relativeTo != null ? relativeTo : ownerDocument.activeElement;
  let direction = (() => {
    if (focus & (1 /* First */ | 4 /* Next */))
      return 1 /* Next */;
    if (focus & (2 /* Previous */ | 8 /* Last */))
      return -1 /* Previous */;
    throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
  })();
  let startIndex = (() => {
    if (focus & 1 /* First */)
      return 0;
    if (focus & 2 /* Previous */)
      return Math.max(0, elements.indexOf(relativeTo)) - 1;
    if (focus & 4 /* Next */)
      return Math.max(0, elements.indexOf(relativeTo)) + 1;
    if (focus & 8 /* Last */)
      return elements.length - 1;
    throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
  })();
  let focusOptions = focus & 32 /* NoScroll */ ? { preventScroll: true } : {};
  let offset = 0;
  let total = elements.length;
  let next = void 0;
  do {
    if (offset >= total || offset + total <= 0)
      return 0 /* Error */;
    let nextIdx = startIndex + offset;
    if (focus & 16 /* WrapAround */) {
      nextIdx = (nextIdx + total) % total;
    } else {
      if (nextIdx < 0)
        return 3 /* Underflow */;
      if (nextIdx >= total)
        return 1 /* Overflow */;
    }
    next = elements[nextIdx];
    next == null ? void 0 : next.focus(focusOptions);
    offset += direction;
  } while (next !== ownerDocument.activeElement);
  if (focus & (4 /* Next */ | 2 /* Previous */) && isSelectableElement(next)) {
    next.select();
  }
  return 2 /* Success */;
}

// src/hooks/use-document-event.ts
var import_react8 = __webpack_require__(/*! react */ "react");
function useDocumentEvent(type, listener, options) {
  let listenerRef = useLatestValue(listener);
  (0, import_react8.useEffect)(() => {
    function handler(event) {
      listenerRef.current(event);
    }
    document.addEventListener(type, handler, options);
    return () => document.removeEventListener(type, handler, options);
  }, [type, options]);
}

// src/hooks/use-window-event.ts
var import_react9 = __webpack_require__(/*! react */ "react");
function useWindowEvent(type, listener, options) {
  let listenerRef = useLatestValue(listener);
  (0, import_react9.useEffect)(() => {
    function handler(event) {
      listenerRef.current(event);
    }
    window.addEventListener(type, handler, options);
    return () => window.removeEventListener(type, handler, options);
  }, [type, options]);
}

// src/hooks/use-outside-click.ts
function useOutsideClick(containers, cb, enabled = true) {
  let enabledRef = (0, import_react10.useRef)(false);
  (0, import_react10.useEffect)(
     false ? 0 : () => {
      requestAnimationFrame(() => {
        enabledRef.current = enabled;
      });
    },
    [enabled]
  );
  function handleOutsideClick(event, resolveTarget) {
    if (!enabledRef.current)
      return;
    if (event.defaultPrevented)
      return;
    let target = resolveTarget(event);
    if (target === null) {
      return;
    }
    if (!target.getRootNode().contains(target))
      return;
    let _containers = function resolve(containers2) {
      if (typeof containers2 === "function") {
        return resolve(containers2());
      }
      if (Array.isArray(containers2)) {
        return containers2;
      }
      if (containers2 instanceof Set) {
        return containers2;
      }
      return [containers2];
    }(containers);
    for (let container of _containers) {
      if (container === null)
        continue;
      let domNode = container instanceof HTMLElement ? container : container.current;
      if (domNode == null ? void 0 : domNode.contains(target)) {
        return;
      }
      if (event.composed && event.composedPath().includes(domNode)) {
        return;
      }
    }
    if (
      // This check alllows us to know whether or not we clicked on a "focusable" element like a
      // button or an input. This is a backwards compatibility check so that you can open a <Menu
      // /> and click on another <Menu /> which should close Menu A and open Menu B. We might
      // revisit that so that you will require 2 clicks instead.
      !isFocusableElement(target, 1 /* Loose */) && // This could be improved, but the `Combobox.Button` adds tabIndex={-1} to make it
      // unfocusable via the keyboard so that tabbing to the next item from the input doesn't
      // first go to the button.
      target.tabIndex !== -1
    ) {
      event.preventDefault();
    }
    return cb(event, target);
  }
  let initialClickTarget = (0, import_react10.useRef)(null);
  useDocumentEvent(
    "mousedown",
    (event) => {
      var _a3, _b;
      if (enabledRef.current) {
        initialClickTarget.current = ((_b = (_a3 = event.composedPath) == null ? void 0 : _a3.call(event)) == null ? void 0 : _b[0]) || event.target;
      }
    },
    true
  );
  useDocumentEvent(
    "click",
    (event) => {
      if (!initialClickTarget.current) {
        return;
      }
      handleOutsideClick(event, () => {
        return initialClickTarget.current;
      });
      initialClickTarget.current = null;
    },
    // We will use the `capture` phase so that layers in between with `event.stopPropagation()`
    // don't "cancel" this outside click check. E.g.: A `Menu` inside a `DialogPanel` if the `Menu`
    // is open, and you click outside of it in the `DialogPanel` the `Menu` should close. However,
    // the `DialogPanel` has a `onClick(e) { e.stopPropagation() }` which would cancel this.
    true
  );
  useWindowEvent(
    "blur",
    (event) => handleOutsideClick(
      event,
      () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null
    ),
    true
  );
}

// src/hooks/use-resolve-button-type.ts
var import_react11 = __webpack_require__(/*! react */ "react");
function resolveType(props) {
  var _a3;
  if (props.type)
    return props.type;
  let tag = (_a3 = props.as) != null ? _a3 : "button";
  if (typeof tag === "string" && tag.toLowerCase() === "button")
    return "button";
  return void 0;
}
function useResolveButtonType(props, ref) {
  let [type, setType] = (0, import_react11.useState)(() => resolveType(props));
  useIsoMorphicEffect(() => {
    setType(resolveType(props));
  }, [props.type, props.as]);
  useIsoMorphicEffect(() => {
    if (type)
      return;
    if (!ref.current)
      return;
    if (ref.current instanceof HTMLButtonElement && !ref.current.hasAttribute("type")) {
      setType("button");
    }
  }, [type, ref]);
  return type;
}

// src/hooks/use-sync-refs.ts
var import_react12 = __webpack_require__(/*! react */ "react");
var Optional = Symbol();
function optionalRef(cb, isOptional = true) {
  return Object.assign(cb, { [Optional]: isOptional });
}
function useSyncRefs(...refs) {
  let cache = (0, import_react12.useRef)(refs);
  (0, import_react12.useEffect)(() => {
    cache.current = refs;
  }, [refs]);
  let syncRefs = useEvent((value) => {
    for (let ref of cache.current) {
      if (ref == null)
        continue;
      if (typeof ref === "function")
        ref(value);
      else
        ref.current = value;
    }
  });
  return refs.every(
    (ref) => ref == null || // @ts-expect-error
    (ref == null ? void 0 : ref[Optional])
  ) ? void 0 : syncRefs;
}

// src/hooks/use-tree-walker.ts
var import_react13 = __webpack_require__(/*! react */ "react");
function useTreeWalker({
  container,
  accept,
  walk,
  enabled = true
}) {
  let acceptRef = (0, import_react13.useRef)(accept);
  let walkRef = (0, import_react13.useRef)(walk);
  (0, import_react13.useEffect)(() => {
    acceptRef.current = accept;
    walkRef.current = walk;
  }, [accept, walk]);
  useIsoMorphicEffect(() => {
    if (!container)
      return;
    if (!enabled)
      return;
    let ownerDocument = getOwnerDocument(container);
    if (!ownerDocument)
      return;
    let accept2 = acceptRef.current;
    let walk2 = walkRef.current;
    let acceptNode = Object.assign((node) => accept2(node), { acceptNode: accept2 });
    let walker = ownerDocument.createTreeWalker(
      container,
      NodeFilter.SHOW_ELEMENT,
      acceptNode,
      // @ts-expect-error This `false` is a simple small fix for older browsers
      false
    );
    while (walker.nextNode())
      walk2(walker.currentNode);
  }, [container, enabled, acceptRef, walkRef]);
}

// src/utils/calculate-active-index.ts
function assertNever(x) {
  throw new Error("Unexpected object: " + x);
}
function calculateActiveIndex(action, resolvers) {
  let items = resolvers.resolveItems();
  if (items.length <= 0)
    return null;
  let currentActiveIndex = resolvers.resolveActiveIndex();
  let activeIndex = currentActiveIndex != null ? currentActiveIndex : -1;
  let nextActiveIndex = (() => {
    switch (action.focus) {
      case 0 /* First */:
        return items.findIndex((item) => !resolvers.resolveDisabled(item));
      case 1 /* Previous */: {
        let idx = items.slice().reverse().findIndex((item, idx2, all) => {
          if (activeIndex !== -1 && all.length - idx2 - 1 >= activeIndex)
            return false;
          return !resolvers.resolveDisabled(item);
        });
        if (idx === -1)
          return idx;
        return items.length - 1 - idx;
      }
      case 2 /* Next */:
        return items.findIndex((item, idx) => {
          if (idx <= activeIndex)
            return false;
          return !resolvers.resolveDisabled(item);
        });
      case 3 /* Last */: {
        let idx = items.slice().reverse().findIndex((item) => !resolvers.resolveDisabled(item));
        if (idx === -1)
          return idx;
        return items.length - 1 - idx;
      }
      case 4 /* Specific */:
        return items.findIndex((item) => resolvers.resolveId(item) === action.id);
      case 5 /* Nothing */:
        return null;
      default:
        assertNever(action);
    }
  })();
  return nextActiveIndex === -1 ? currentActiveIndex : nextActiveIndex;
}

// src/utils/render.ts
var import_react14 = __webpack_require__(/*! react */ "react");

// src/utils/class-names.ts
function classNames(...classes) {
  return classes.filter(Boolean).join(" ");
}

// src/utils/render.ts
function render({
  ourProps,
  theirProps,
  slot,
  defaultTag,
  features,
  visible = true,
  name
}) {
  let props = mergeProps(theirProps, ourProps);
  if (visible)
    return _render(props, slot, defaultTag, name);
  let featureFlags = features != null ? features : 0 /* None */;
  if (featureFlags & 2 /* Static */) {
    let { static: isStatic = false, ...rest } = props;
    if (isStatic)
      return _render(rest, slot, defaultTag, name);
  }
  if (featureFlags & 1 /* RenderStrategy */) {
    let { unmount = true, ...rest } = props;
    let strategy = unmount ? 0 /* Unmount */ : 1 /* Hidden */;
    return match(strategy, {
      [0 /* Unmount */]() {
        return null;
      },
      [1 /* Hidden */]() {
        return _render(
          { ...rest, ...{ hidden: true, style: { display: "none" } } },
          slot,
          defaultTag,
          name
        );
      }
    });
  }
  return _render(props, slot, defaultTag, name);
}
function _render(props, slot = {}, tag, name) {
  let {
    as: Component = tag,
    children,
    refName = "ref",
    ...rest
  } = omit(props, ["unmount", "static"]);
  let refRelatedProps = props.ref !== void 0 ? { [refName]: props.ref } : {};
  let resolvedChildren = typeof children === "function" ? children(slot) : children;
  if ("className" in rest && rest.className && typeof rest.className === "function") {
    rest.className = rest.className(slot);
  }
  let dataAttributes = {};
  if (slot) {
    let exposeState = false;
    let states = [];
    for (let [k, v] of Object.entries(slot)) {
      if (typeof v === "boolean") {
        exposeState = true;
      }
      if (v === true) {
        states.push(k);
      }
    }
    if (exposeState)
      dataAttributes[`data-headlessui-state`] = states.join(" ");
  }
  if (Component === import_react14.Fragment) {
    if (Object.keys(compact(rest)).length > 0) {
      if (!(0, import_react14.isValidElement)(resolvedChildren) || Array.isArray(resolvedChildren) && resolvedChildren.length > 1) {
        throw new Error(
          [
            'Passing props on "Fragment"!',
            "",
            `The current component <${name} /> is rendering a "Fragment".`,
            `However we need to passthrough the following props:`,
            Object.keys(rest).map((line) => `  - ${line}`).join("\n"),
            "",
            "You can apply a few solutions:",
            [
              'Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',
              "Render a single element as the child so that we can forward the props onto that element."
            ].map((line) => `  - ${line}`).join("\n")
          ].join("\n")
        );
      }
      let childProps = resolvedChildren.props;
      let newClassName = typeof (childProps == null ? void 0 : childProps.className) === "function" ? (...args) => classNames(childProps == null ? void 0 : childProps.className(...args), rest.className) : classNames(childProps == null ? void 0 : childProps.className, rest.className);
      let classNameProps = newClassName ? { className: newClassName } : {};
      return (0, import_react14.cloneElement)(
        resolvedChildren,
        Object.assign(
          {},
          // Filter out undefined values so that they don't override the existing values
          mergeProps(resolvedChildren.props, compact(omit(rest, ["ref"]))),
          dataAttributes,
          refRelatedProps,
          mergeRefs(resolvedChildren.ref, refRelatedProps.ref),
          classNameProps
        )
      );
    }
  }
  return (0, import_react14.createElement)(
    Component,
    Object.assign(
      {},
      omit(rest, ["ref"]),
      Component !== import_react14.Fragment && refRelatedProps,
      Component !== import_react14.Fragment && dataAttributes
    ),
    resolvedChildren
  );
}
function mergeRefs(...refs) {
  return {
    ref: refs.every((ref) => ref == null) ? void 0 : (value) => {
      for (let ref of refs) {
        if (ref == null)
          continue;
        if (typeof ref === "function")
          ref(value);
        else
          ref.current = value;
      }
    }
  };
}
function mergeProps(...listOfProps) {
  var _a3;
  if (listOfProps.length === 0)
    return {};
  if (listOfProps.length === 1)
    return listOfProps[0];
  let target = {};
  let eventHandlers = {};
  for (let props of listOfProps) {
    for (let prop in props) {
      if (prop.startsWith("on") && typeof props[prop] === "function") {
        (_a3 = eventHandlers[prop]) != null ? _a3 : eventHandlers[prop] = [];
        eventHandlers[prop].push(props[prop]);
      } else {
        target[prop] = props[prop];
      }
    }
  }
  if (target.disabled || target["aria-disabled"]) {
    return Object.assign(
      target,
      // Set all event listeners that we collected to `undefined`. This is
      // important because of the `cloneElement` from above, which merges the
      // existing and new props, they don't just override therefore we have to
      // explicitly nullify them.
      Object.fromEntries(Object.keys(eventHandlers).map((eventName) => [eventName, void 0]))
    );
  }
  for (let eventName in eventHandlers) {
    Object.assign(target, {
      [eventName](event, ...args) {
        let handlers = eventHandlers[eventName];
        for (let handler of handlers) {
          if ((event instanceof Event || (event == null ? void 0 : event.nativeEvent) instanceof Event) && event.defaultPrevented) {
            return;
          }
          handler(event, ...args);
        }
      }
    });
  }
  return target;
}
function forwardRefWithAs(component) {
  var _a3;
  return Object.assign((0, import_react14.forwardRef)(component), {
    displayName: (_a3 = component.displayName) != null ? _a3 : component.name
  });
}
function compact(object) {
  let clone = Object.assign({}, object);
  for (let key in clone) {
    if (clone[key] === void 0)
      delete clone[key];
  }
  return clone;
}
function omit(object, keysToOmit = []) {
  let clone = Object.assign({}, object);
  for (let key of keysToOmit) {
    if (key in clone)
      delete clone[key];
  }
  return clone;
}

// src/utils/bugs.ts
function isDisabledReactIssue7711(element) {
  let parent = element.parentElement;
  let legend = null;
  while (parent && !(parent instanceof HTMLFieldSetElement)) {
    if (parent instanceof HTMLLegendElement)
      legend = parent;
    parent = parent.parentElement;
  }
  let isParentDisabled = (parent == null ? void 0 : parent.getAttribute("disabled")) === "";
  if (isParentDisabled && isFirstLegend(legend))
    return false;
  return isParentDisabled;
}
function isFirstLegend(element) {
  if (!element)
    return false;
  let previous = element.previousElementSibling;
  while (previous !== null) {
    if (previous instanceof HTMLLegendElement)
      return false;
    previous = previous.previousElementSibling;
  }
  return true;
}

// src/utils/form.ts
function objectToFormEntries(source = {}, parentKey = null, entries = []) {
  for (let [key, value] of Object.entries(source)) {
    append(entries, composeKey(parentKey, key), value);
  }
  return entries;
}
function composeKey(parent, key) {
  return parent ? parent + "[" + key + "]" : key;
}
function append(entries, key, value) {
  if (Array.isArray(value)) {
    for (let [subkey, subvalue] of value.entries()) {
      append(entries, composeKey(key, subkey.toString()), subvalue);
    }
  } else if (value instanceof Date) {
    entries.push([key, value.toISOString()]);
  } else if (typeof value === "boolean") {
    entries.push([key, value ? "1" : "0"]);
  } else if (typeof value === "string") {
    entries.push([key, value]);
  } else if (typeof value === "number") {
    entries.push([key, `${value}`]);
  } else if (value === null || value === void 0) {
    entries.push([key, ""]);
  } else {
    objectToFormEntries(value, key, entries);
  }
}
function attemptSubmit(element) {
  var _a3;
  let form = (_a3 = element == null ? void 0 : element.form) != null ? _a3 : element.closest("form");
  if (!form)
    return;
  for (let element2 of form.elements) {
    if (element2.tagName === "INPUT" && element2.type === "submit" || element2.tagName === "BUTTON" && element2.type === "submit" || element2.nodeName === "INPUT" && element2.type === "image") {
      element2.click();
      return;
    }
  }
}

// src/internal/hidden.tsx
var DEFAULT_VISUALLY_HIDDEN_TAG = "div";
function VisuallyHidden(props, ref) {
  let { features = 1 /* None */, ...theirProps } = props;
  let ourProps = {
    ref,
    "aria-hidden": (features & 2 /* Focusable */) === 2 /* Focusable */ ? true : void 0,
    style: {
      position: "fixed",
      top: 1,
      left: 1,
      width: 1,
      height: 0,
      padding: 0,
      margin: -1,
      overflow: "hidden",
      clip: "rect(0, 0, 0, 0)",
      whiteSpace: "nowrap",
      borderWidth: "0",
      ...(features & 4 /* Hidden */) === 4 /* Hidden */ && !((features & 2 /* Focusable */) === 2 /* Focusable */) && { display: "none" }
    }
  };
  return render({
    ourProps,
    theirProps,
    slot: {},
    defaultTag: DEFAULT_VISUALLY_HIDDEN_TAG,
    name: "Hidden"
  });
}
var Hidden = forwardRefWithAs(VisuallyHidden);

// src/internal/open-closed.tsx
var import_react15 = __toESM(__webpack_require__(/*! react */ "react"), 1);
var Context = (0, import_react15.createContext)(null);
Context.displayName = "OpenClosedContext";
function useOpenClosed() {
  return (0, import_react15.useContext)(Context);
}
function OpenClosedProvider({ value, children }) {
  return /* @__PURE__ */ import_react15.default.createElement(Context.Provider, { value }, children);
}

// src/hooks/use-controllable.ts
var import_react16 = __webpack_require__(/*! react */ "react");
function useControllable(controlledValue, onChange, defaultValue) {
  let [internalValue, setInternalValue] = (0, import_react16.useState)(defaultValue);
  let isControlled = controlledValue !== void 0;
  let wasControlled = (0, import_react16.useRef)(isControlled);
  let didWarnOnUncontrolledToControlled = (0, import_react16.useRef)(false);
  let didWarnOnControlledToUncontrolled = (0, import_react16.useRef)(false);
  if (isControlled && !wasControlled.current && !didWarnOnUncontrolledToControlled.current) {
    didWarnOnUncontrolledToControlled.current = true;
    wasControlled.current = isControlled;
    console.error(
      "A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen."
    );
  } else if (!isControlled && wasControlled.current && !didWarnOnControlledToUncontrolled.current) {
    didWarnOnControlledToUncontrolled.current = true;
    wasControlled.current = isControlled;
    console.error(
      "A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen."
    );
  }
  return [
    isControlled ? controlledValue : internalValue,
    useEvent((value) => {
      if (isControlled) {
        return onChange == null ? void 0 : onChange(value);
      } else {
        setInternalValue(value);
        return onChange == null ? void 0 : onChange(value);
      }
    })
  ];
}

// src/hooks/use-watch.ts
var import_react17 = __webpack_require__(/*! react */ "react");
function useWatch(cb, dependencies) {
  let track = (0, import_react17.useRef)([]);
  let action = useEvent(cb);
  (0, import_react17.useEffect)(() => {
    let oldValues = [...track.current];
    for (let [idx, value] of dependencies.entries()) {
      if (track.current[idx] !== value) {
        let returnValue = action(dependencies, oldValues);
        track.current = dependencies;
        return returnValue;
      }
    }
  }, [action, ...dependencies]);
}

// src/hooks/use-tracked-pointer.ts
var import_react18 = __webpack_require__(/*! react */ "react");
function eventToPosition(evt) {
  return [evt.screenX, evt.screenY];
}
function useTrackedPointer() {
  let lastPos = (0, import_react18.useRef)([-1, -1]);
  return {
    wasMoved(evt) {
      if (false) {}
      let newPos = eventToPosition(evt);
      if (lastPos.current[0] === newPos[0] && lastPos.current[1] === newPos[1]) {
        return false;
      }
      lastPos.current = newPos;
      return true;
    },
    update(evt) {
      lastPos.current = eventToPosition(evt);
    }
  };
}

// src/utils/platform.ts
function isIOS() {
  return (
    // Check if it is an iPhone
    /iPhone/gi.test(window.navigator.platform) || // Check if it is an iPad. iPad reports itself as "MacIntel", but we can check if it is a touch
    // screen. Let's hope that Apple doesn't release a touch screen Mac (or maybe this would then
    // work as expected 🤔).
    /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0
  );
}
function isAndroid() {
  return /Android/gi.test(window.navigator.userAgent);
}
function isMobile() {
  return isIOS() || isAndroid();
}

// src/components/combobox/combobox.tsx
function adjustOrderedState(state, adjustment = (i) => i) {
  let currentActiveOption = state.activeOptionIndex !== null ? state.options[state.activeOptionIndex] : null;
  let sortedOptions = sortByDomNode(
    adjustment(state.options.slice()),
    (option) => option.dataRef.current.domRef.current
  );
  let adjustedActiveOptionIndex = currentActiveOption ? sortedOptions.indexOf(currentActiveOption) : null;
  if (adjustedActiveOptionIndex === -1) {
    adjustedActiveOptionIndex = null;
  }
  return {
    options: sortedOptions,
    activeOptionIndex: adjustedActiveOptionIndex
  };
}
var reducers = {
  [1 /* CloseCombobox */](state) {
    var _a3;
    if ((_a3 = state.dataRef.current) == null ? void 0 : _a3.disabled)
      return state;
    if (state.comboboxState === 1 /* Closed */)
      return state;
    return { ...state, activeOptionIndex: null, comboboxState: 1 /* Closed */ };
  },
  [0 /* OpenCombobox */](state) {
    var _a3;
    if ((_a3 = state.dataRef.current) == null ? void 0 : _a3.disabled)
      return state;
    if (state.comboboxState === 0 /* Open */)
      return state;
    let activeOptionIndex = state.activeOptionIndex;
    if (state.dataRef.current) {
      let { isSelected } = state.dataRef.current;
      let optionIdx = state.options.findIndex((option) => isSelected(option.dataRef.current.value));
      if (optionIdx !== -1) {
        activeOptionIndex = optionIdx;
      }
    }
    return { ...state, comboboxState: 0 /* Open */, activeOptionIndex };
  },
  [2 /* GoToOption */](state, action) {
    var _a3, _b, _c, _d;
    if ((_a3 = state.dataRef.current) == null ? void 0 : _a3.disabled)
      return state;
    if (((_b = state.dataRef.current) == null ? void 0 : _b.optionsRef.current) && !((_c = state.dataRef.current) == null ? void 0 : _c.optionsPropsRef.current.static) && state.comboboxState === 1 /* Closed */) {
      return state;
    }
    let adjustedState = adjustOrderedState(state);
    if (adjustedState.activeOptionIndex === null) {
      let localActiveOptionIndex = adjustedState.options.findIndex(
        (option) => !option.dataRef.current.disabled
      );
      if (localActiveOptionIndex !== -1) {
        adjustedState.activeOptionIndex = localActiveOptionIndex;
      }
    }
    let activeOptionIndex = calculateActiveIndex(action, {
      resolveItems: () => adjustedState.options,
      resolveActiveIndex: () => adjustedState.activeOptionIndex,
      resolveId: (item) => item.id,
      resolveDisabled: (item) => item.dataRef.current.disabled
    });
    return {
      ...state,
      ...adjustedState,
      activeOptionIndex,
      activationTrigger: (_d = action.trigger) != null ? _d : 1 /* Other */
    };
  },
  [3 /* RegisterOption */]: (state, action) => {
    var _a3, _b;
    let option = { id: action.id, dataRef: action.dataRef };
    let adjustedState = adjustOrderedState(state, (options) => [...options, option]);
    if (state.activeOptionIndex === null) {
      if ((_a3 = state.dataRef.current) == null ? void 0 : _a3.isSelected(action.dataRef.current.value)) {
        adjustedState.activeOptionIndex = adjustedState.options.indexOf(option);
      }
    }
    let nextState = {
      ...state,
      ...adjustedState,
      activationTrigger: 1 /* Other */
    };
    if (((_b = state.dataRef.current) == null ? void 0 : _b.__demoMode) && state.dataRef.current.value === void 0) {
      nextState.activeOptionIndex = 0;
    }
    return nextState;
  },
  [4 /* UnregisterOption */]: (state, action) => {
    let adjustedState = adjustOrderedState(state, (options) => {
      let idx = options.findIndex((a) => a.id === action.id);
      if (idx !== -1)
        options.splice(idx, 1);
      return options;
    });
    return {
      ...state,
      ...adjustedState,
      activationTrigger: 1 /* Other */
    };
  },
  [5 /* RegisterLabel */]: (state, action) => {
    return {
      ...state,
      labelId: action.id
    };
  }
};
var ComboboxActionsContext = (0, import_react19.createContext)(null);
ComboboxActionsContext.displayName = "ComboboxActionsContext";
function useActions(component) {
  let context = (0, import_react19.useContext)(ComboboxActionsContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <Combobox /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useActions);
    throw err;
  }
  return context;
}
var ComboboxDataContext = (0, import_react19.createContext)(null);
ComboboxDataContext.displayName = "ComboboxDataContext";
function useData(component) {
  let context = (0, import_react19.useContext)(ComboboxDataContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <Combobox /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useData);
    throw err;
  }
  return context;
}
function stateReducer(state, action) {
  return match(action.type, reducers, state, action);
}
var DEFAULT_COMBOBOX_TAG = import_react19.Fragment;
function ComboboxFn(props, ref) {
  let {
    value: controlledValue,
    defaultValue,
    onChange: controlledOnChange,
    form: formName,
    name,
    by = (a, z) => a === z,
    disabled = false,
    __demoMode = false,
    nullable = false,
    multiple = false,
    ...theirProps
  } = props;
  let [value = multiple ? [] : void 0, theirOnChange] = useControllable(
    controlledValue,
    controlledOnChange,
    defaultValue
  );
  let [state, dispatch] = (0, import_react19.useReducer)(stateReducer, {
    dataRef: (0, import_react19.createRef)(),
    comboboxState: __demoMode ? 0 /* Open */ : 1 /* Closed */,
    options: [],
    activeOptionIndex: null,
    activationTrigger: 1 /* Other */,
    labelId: null
  });
  let defaultToFirstOption = (0, import_react19.useRef)(false);
  let optionsPropsRef = (0, import_react19.useRef)({ static: false, hold: false });
  let labelRef = (0, import_react19.useRef)(null);
  let inputRef = (0, import_react19.useRef)(null);
  let buttonRef = (0, import_react19.useRef)(null);
  let optionsRef = (0, import_react19.useRef)(null);
  let compare = useEvent(
    // @ts-expect-error Eventually we'll want to tackle this, but for now this will do.
    typeof by === "string" ? (a, z) => {
      let property = by;
      return (a == null ? void 0 : a[property]) === (z == null ? void 0 : z[property]);
    } : by
  );
  let isSelected = (0, import_react19.useCallback)(
    (compareValue) => match(data.mode, {
      [1 /* Multi */]: () => value.some((option) => compare(option, compareValue)),
      [0 /* Single */]: () => compare(value, compareValue)
    }),
    [value]
  );
  let data = (0, import_react19.useMemo)(
    () => ({
      ...state,
      optionsPropsRef,
      labelRef,
      inputRef,
      buttonRef,
      optionsRef,
      value,
      defaultValue,
      disabled,
      mode: multiple ? 1 /* Multi */ : 0 /* Single */,
      get activeOptionIndex() {
        if (defaultToFirstOption.current && state.activeOptionIndex === null && state.options.length > 0) {
          let localActiveOptionIndex = state.options.findIndex(
            (option) => !option.dataRef.current.disabled
          );
          if (localActiveOptionIndex !== -1) {
            return localActiveOptionIndex;
          }
        }
        return state.activeOptionIndex;
      },
      compare,
      isSelected,
      nullable,
      __demoMode
    }),
    [value, defaultValue, disabled, multiple, nullable, __demoMode, state]
  );
  let lastActiveOption = (0, import_react19.useRef)(
    data.activeOptionIndex !== null ? data.options[data.activeOptionIndex] : null
  );
  (0, import_react19.useEffect)(() => {
    let currentActiveOption = data.activeOptionIndex !== null ? data.options[data.activeOptionIndex] : null;
    if (lastActiveOption.current !== currentActiveOption) {
      lastActiveOption.current = currentActiveOption;
    }
  });
  useIsoMorphicEffect(() => {
    state.dataRef.current = data;
  }, [data]);
  useOutsideClick(
    [data.buttonRef, data.inputRef, data.optionsRef],
    () => actions.closeCombobox(),
    data.comboboxState === 0 /* Open */
  );
  let slot = (0, import_react19.useMemo)(
    () => ({
      open: data.comboboxState === 0 /* Open */,
      disabled,
      activeIndex: data.activeOptionIndex,
      activeOption: data.activeOptionIndex === null ? null : data.options[data.activeOptionIndex].dataRef.current.value,
      value
    }),
    [data, disabled, value]
  );
  let selectOption = useEvent((id) => {
    let option = data.options.find((item) => item.id === id);
    if (!option)
      return;
    onChange(option.dataRef.current.value);
  });
  let selectActiveOption = useEvent(() => {
    if (data.activeOptionIndex !== null) {
      let { dataRef, id } = data.options[data.activeOptionIndex];
      onChange(dataRef.current.value);
      actions.goToOption(4 /* Specific */, id);
    }
  });
  let openCombobox = useEvent(() => {
    dispatch({ type: 0 /* OpenCombobox */ });
    defaultToFirstOption.current = true;
  });
  let closeCombobox = useEvent(() => {
    dispatch({ type: 1 /* CloseCombobox */ });
    defaultToFirstOption.current = false;
  });
  let goToOption = useEvent((focus, id, trigger) => {
    defaultToFirstOption.current = false;
    if (focus === 4 /* Specific */) {
      return dispatch({ type: 2 /* GoToOption */, focus: 4 /* Specific */, id, trigger });
    }
    return dispatch({ type: 2 /* GoToOption */, focus, trigger });
  });
  let registerOption = useEvent((id, dataRef) => {
    dispatch({ type: 3 /* RegisterOption */, id, dataRef });
    return () => {
      var _a3;
      if (((_a3 = lastActiveOption.current) == null ? void 0 : _a3.id) === id) {
        defaultToFirstOption.current = true;
      }
      dispatch({ type: 4 /* UnregisterOption */, id });
    };
  });
  let registerLabel = useEvent((id) => {
    dispatch({ type: 5 /* RegisterLabel */, id });
    return () => dispatch({ type: 5 /* RegisterLabel */, id: null });
  });
  let onChange = useEvent((value2) => {
    return match(data.mode, {
      [0 /* Single */]() {
        return theirOnChange == null ? void 0 : theirOnChange(value2);
      },
      [1 /* Multi */]() {
        let copy = data.value.slice();
        let idx = copy.findIndex((item) => compare(item, value2));
        if (idx === -1) {
          copy.push(value2);
        } else {
          copy.splice(idx, 1);
        }
        return theirOnChange == null ? void 0 : theirOnChange(copy);
      }
    });
  });
  let actions = (0, import_react19.useMemo)(
    () => ({
      onChange,
      registerOption,
      registerLabel,
      goToOption,
      closeCombobox,
      openCombobox,
      selectActiveOption,
      selectOption
    }),
    []
  );
  let ourProps = ref === null ? {} : { ref };
  let form = (0, import_react19.useRef)(null);
  let d = useDisposables();
  (0, import_react19.useEffect)(() => {
    if (!form.current)
      return;
    if (defaultValue === void 0)
      return;
    d.addEventListener(form.current, "reset", () => {
      onChange(defaultValue);
    });
  }, [
    form,
    onChange
    /* Explicitly ignoring `defaultValue` */
  ]);
  return /* @__PURE__ */ import_react19.default.createElement(ComboboxActionsContext.Provider, { value: actions }, /* @__PURE__ */ import_react19.default.createElement(ComboboxDataContext.Provider, { value: data }, /* @__PURE__ */ import_react19.default.createElement(
    OpenClosedProvider,
    {
      value: match(data.comboboxState, {
        [0 /* Open */]: 1 /* Open */,
        [1 /* Closed */]: 2 /* Closed */
      })
    },
    name != null && value != null && objectToFormEntries({ [name]: value }).map(([name2, value2], idx) => /* @__PURE__ */ import_react19.default.createElement(
      Hidden,
      {
        features: 4 /* Hidden */,
        ref: idx === 0 ? (element) => {
          var _a3;
          form.current = (_a3 = element == null ? void 0 : element.closest("form")) != null ? _a3 : null;
        } : void 0,
        ...compact({
          key: name2,
          as: "input",
          type: "hidden",
          hidden: true,
          readOnly: true,
          form: formName,
          name: name2,
          value: value2
        })
      }
    )),
    render({
      ourProps,
      theirProps,
      slot,
      defaultTag: DEFAULT_COMBOBOX_TAG,
      name: "Combobox"
    })
  )));
}
var DEFAULT_INPUT_TAG = "input";
function InputFn(props, ref) {
  var _a3, _b, _c, _d;
  let internalId = useId();
  let {
    id = `headlessui-combobox-input-${internalId}`,
    onChange,
    displayValue,
    // @ts-ignore: We know this MAY NOT exist for a given tag but we only care when it _does_ exist.
    type = "text",
    ...theirProps
  } = props;
  let data = useData("Combobox.Input");
  let actions = useActions("Combobox.Input");
  let inputRef = useSyncRefs(data.inputRef, ref);
  let isTyping = (0, import_react19.useRef)(false);
  let d = useDisposables();
  let currentDisplayValue = function() {
    var _a4;
    if (typeof displayValue === "function" && data.value !== void 0) {
      return (_a4 = displayValue(data.value)) != null ? _a4 : "";
    } else if (typeof data.value === "string") {
      return data.value;
    } else {
      return "";
    }
  }();
  useWatch(
    ([currentDisplayValue2, state], [oldCurrentDisplayValue, oldState]) => {
      if (isTyping.current)
        return;
      if (!data.inputRef.current)
        return;
      if (oldState === 0 /* Open */ && state === 1 /* Closed */) {
        data.inputRef.current.value = currentDisplayValue2;
      } else if (currentDisplayValue2 !== oldCurrentDisplayValue) {
        data.inputRef.current.value = currentDisplayValue2;
      }
    },
    [currentDisplayValue, data.comboboxState]
  );
  useWatch(
    ([newState], [oldState]) => {
      if (newState === 0 /* Open */ && oldState === 1 /* Closed */) {
        let input = data.inputRef.current;
        if (!input)
          return;
        let currentValue = input.value;
        let { selectionStart, selectionEnd, selectionDirection } = input;
        input.value = "";
        input.value = currentValue;
        if (selectionDirection !== null) {
          input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
        } else {
          input.setSelectionRange(selectionStart, selectionEnd);
        }
      }
    },
    [data.comboboxState]
  );
  let isComposing = (0, import_react19.useRef)(false);
  let composedChangeEvent = (0, import_react19.useRef)(null);
  let handleCompositionStart = useEvent(() => {
    isComposing.current = true;
  });
  let handleCompositionEnd = useEvent(() => {
    d.nextFrame(() => {
      isComposing.current = false;
      if (composedChangeEvent.current) {
        actions.openCombobox();
        onChange == null ? void 0 : onChange(composedChangeEvent.current);
        composedChangeEvent.current = null;
      }
    });
  });
  let handleKeyDown = useEvent((event) => {
    isTyping.current = true;
    switch (event.key) {
      case "Backspace" /* Backspace */:
      case "Delete" /* Delete */:
        if (data.mode !== 0 /* Single */)
          return;
        if (!data.nullable)
          return;
        let input = event.currentTarget;
        d.requestAnimationFrame(() => {
          if (input.value === "") {
            actions.onChange(null);
            if (data.optionsRef.current) {
              data.optionsRef.current.scrollTop = 0;
            }
            actions.goToOption(5 /* Nothing */);
          }
        });
        break;
      case "Enter" /* Enter */:
        isTyping.current = false;
        if (data.comboboxState !== 0 /* Open */)
          return;
        if (isComposing.current)
          return;
        event.preventDefault();
        event.stopPropagation();
        if (data.activeOptionIndex === null) {
          actions.closeCombobox();
          return;
        }
        actions.selectActiveOption();
        if (data.mode === 0 /* Single */) {
          actions.closeCombobox();
        }
        break;
      case "ArrowDown" /* ArrowDown */:
        isTyping.current = false;
        event.preventDefault();
        event.stopPropagation();
        return match(data.comboboxState, {
          [0 /* Open */]: () => {
            actions.goToOption(2 /* Next */);
          },
          [1 /* Closed */]: () => {
            actions.openCombobox();
          }
        });
      case "ArrowUp" /* ArrowUp */:
        isTyping.current = false;
        event.preventDefault();
        event.stopPropagation();
        return match(data.comboboxState, {
          [0 /* Open */]: () => {
            actions.goToOption(1 /* Previous */);
          },
          [1 /* Closed */]: () => {
            actions.openCombobox();
            d.nextFrame(() => {
              if (!data.value) {
                actions.goToOption(3 /* Last */);
              }
            });
          }
        });
      case "Home" /* Home */:
        if (event.shiftKey) {
          break;
        }
        isTyping.current = false;
        event.preventDefault();
        event.stopPropagation();
        return actions.goToOption(0 /* First */);
      case "PageUp" /* PageUp */:
        isTyping.current = false;
        event.preventDefault();
        event.stopPropagation();
        return actions.goToOption(0 /* First */);
      case "End" /* End */:
        if (event.shiftKey) {
          break;
        }
        isTyping.current = false;
        event.preventDefault();
        event.stopPropagation();
        return actions.goToOption(3 /* Last */);
      case "PageDown" /* PageDown */:
        isTyping.current = false;
        event.preventDefault();
        event.stopPropagation();
        return actions.goToOption(3 /* Last */);
      case "Escape" /* Escape */:
        isTyping.current = false;
        if (data.comboboxState !== 0 /* Open */)
          return;
        event.preventDefault();
        if (data.optionsRef.current && !data.optionsPropsRef.current.static) {
          event.stopPropagation();
        }
        return actions.closeCombobox();
      case "Tab" /* Tab */:
        isTyping.current = false;
        if (data.comboboxState !== 0 /* Open */)
          return;
        if (data.mode === 0 /* Single */)
          actions.selectActiveOption();
        actions.closeCombobox();
        break;
    }
  });
  let handleChange = useEvent((event) => {
    if (isComposing.current) {
      composedChangeEvent.current = event;
      return;
    }
    actions.openCombobox();
    onChange == null ? void 0 : onChange(event);
  });
  let handleBlur = useEvent(() => {
    isTyping.current = false;
  });
  let labelledby = useComputed(() => {
    if (!data.labelId)
      return void 0;
    return [data.labelId].join(" ");
  }, [data.labelId]);
  let slot = (0, import_react19.useMemo)(
    () => ({ open: data.comboboxState === 0 /* Open */, disabled: data.disabled }),
    [data]
  );
  let ourProps = {
    ref: inputRef,
    id,
    role: "combobox",
    type,
    "aria-controls": (_a3 = data.optionsRef.current) == null ? void 0 : _a3.id,
    "aria-expanded": data.disabled ? void 0 : data.comboboxState === 0 /* Open */,
    "aria-activedescendant": data.activeOptionIndex === null ? void 0 : (_b = data.options[data.activeOptionIndex]) == null ? void 0 : _b.id,
    "aria-labelledby": labelledby,
    "aria-autocomplete": "list",
    defaultValue: (_d = (_c = props.defaultValue) != null ? _c : data.defaultValue !== void 0 ? displayValue == null ? void 0 : displayValue(data.defaultValue) : null) != null ? _d : data.defaultValue,
    disabled: data.disabled,
    onCompositionStart: handleCompositionStart,
    onCompositionEnd: handleCompositionEnd,
    onKeyDown: handleKeyDown,
    onChange: handleChange,
    onBlur: handleBlur
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_INPUT_TAG,
    name: "Combobox.Input"
  });
}
var DEFAULT_BUTTON_TAG = "button";
function ButtonFn(props, ref) {
  var _a3;
  let data = useData("Combobox.Button");
  let actions = useActions("Combobox.Button");
  let buttonRef = useSyncRefs(data.buttonRef, ref);
  let internalId = useId();
  let { id = `headlessui-combobox-button-${internalId}`, ...theirProps } = props;
  let d = useDisposables();
  let handleKeyDown = useEvent((event) => {
    switch (event.key) {
      case "ArrowDown" /* ArrowDown */:
        event.preventDefault();
        event.stopPropagation();
        if (data.comboboxState === 1 /* Closed */) {
          actions.openCombobox();
        }
        return d.nextFrame(() => {
          var _a4;
          return (_a4 = data.inputRef.current) == null ? void 0 : _a4.focus({ preventScroll: true });
        });
      case "ArrowUp" /* ArrowUp */:
        event.preventDefault();
        event.stopPropagation();
        if (data.comboboxState === 1 /* Closed */) {
          actions.openCombobox();
          d.nextFrame(() => {
            if (!data.value) {
              actions.goToOption(3 /* Last */);
            }
          });
        }
        return d.nextFrame(() => {
          var _a4;
          return (_a4 = data.inputRef.current) == null ? void 0 : _a4.focus({ preventScroll: true });
        });
      case "Escape" /* Escape */:
        if (data.comboboxState !== 0 /* Open */)
          return;
        event.preventDefault();
        if (data.optionsRef.current && !data.optionsPropsRef.current.static) {
          event.stopPropagation();
        }
        actions.closeCombobox();
        return d.nextFrame(() => {
          var _a4;
          return (_a4 = data.inputRef.current) == null ? void 0 : _a4.focus({ preventScroll: true });
        });
      default:
        return;
    }
  });
  let handleClick = useEvent((event) => {
    if (isDisabledReactIssue7711(event.currentTarget))
      return event.preventDefault();
    if (data.comboboxState === 0 /* Open */) {
      actions.closeCombobox();
    } else {
      event.preventDefault();
      actions.openCombobox();
    }
    d.nextFrame(() => {
      var _a4;
      return (_a4 = data.inputRef.current) == null ? void 0 : _a4.focus({ preventScroll: true });
    });
  });
  let labelledby = useComputed(() => {
    if (!data.labelId)
      return void 0;
    return [data.labelId, id].join(" ");
  }, [data.labelId, id]);
  let slot = (0, import_react19.useMemo)(
    () => ({
      open: data.comboboxState === 0 /* Open */,
      disabled: data.disabled,
      value: data.value
    }),
    [data]
  );
  let ourProps = {
    ref: buttonRef,
    id,
    type: useResolveButtonType(props, data.buttonRef),
    tabIndex: -1,
    "aria-haspopup": "listbox",
    "aria-controls": (_a3 = data.optionsRef.current) == null ? void 0 : _a3.id,
    "aria-expanded": data.disabled ? void 0 : data.comboboxState === 0 /* Open */,
    "aria-labelledby": labelledby,
    disabled: data.disabled,
    onClick: handleClick,
    onKeyDown: handleKeyDown
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_BUTTON_TAG,
    name: "Combobox.Button"
  });
}
var DEFAULT_LABEL_TAG = "label";
function LabelFn(props, ref) {
  let internalId = useId();
  let { id = `headlessui-combobox-label-${internalId}`, ...theirProps } = props;
  let data = useData("Combobox.Label");
  let actions = useActions("Combobox.Label");
  let labelRef = useSyncRefs(data.labelRef, ref);
  useIsoMorphicEffect(() => actions.registerLabel(id), [id]);
  let handleClick = useEvent(() => {
    var _a3;
    return (_a3 = data.inputRef.current) == null ? void 0 : _a3.focus({ preventScroll: true });
  });
  let slot = (0, import_react19.useMemo)(
    () => ({ open: data.comboboxState === 0 /* Open */, disabled: data.disabled }),
    [data]
  );
  let ourProps = { ref: labelRef, id, onClick: handleClick };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_LABEL_TAG,
    name: "Combobox.Label"
  });
}
var DEFAULT_OPTIONS_TAG = "ul";
var OptionsRenderFeatures = 1 /* RenderStrategy */ | 2 /* Static */;
function OptionsFn(props, ref) {
  let internalId = useId();
  let { id = `headlessui-combobox-options-${internalId}`, hold = false, ...theirProps } = props;
  let data = useData("Combobox.Options");
  let optionsRef = useSyncRefs(data.optionsRef, ref);
  let usesOpenClosedState = useOpenClosed();
  let visible = (() => {
    if (usesOpenClosedState !== null) {
      return (usesOpenClosedState & 1 /* Open */) === 1 /* Open */;
    }
    return data.comboboxState === 0 /* Open */;
  })();
  useIsoMorphicEffect(() => {
    var _a3;
    data.optionsPropsRef.current.static = (_a3 = props.static) != null ? _a3 : false;
  }, [data.optionsPropsRef, props.static]);
  useIsoMorphicEffect(() => {
    data.optionsPropsRef.current.hold = hold;
  }, [data.optionsPropsRef, hold]);
  useTreeWalker({
    container: data.optionsRef.current,
    enabled: data.comboboxState === 0 /* Open */,
    accept(node) {
      if (node.getAttribute("role") === "option")
        return NodeFilter.FILTER_REJECT;
      if (node.hasAttribute("role"))
        return NodeFilter.FILTER_SKIP;
      return NodeFilter.FILTER_ACCEPT;
    },
    walk(node) {
      node.setAttribute("role", "none");
    }
  });
  let labelledby = useComputed(
    () => {
      var _a3, _b;
      return (_b = data.labelId) != null ? _b : (_a3 = data.buttonRef.current) == null ? void 0 : _a3.id;
    },
    [data.labelId, data.buttonRef.current]
  );
  let slot = (0, import_react19.useMemo)(
    () => ({ open: data.comboboxState === 0 /* Open */ }),
    [data]
  );
  let ourProps = {
    "aria-labelledby": labelledby,
    role: "listbox",
    "aria-multiselectable": data.mode === 1 /* Multi */ ? true : void 0,
    id,
    ref: optionsRef
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_OPTIONS_TAG,
    features: OptionsRenderFeatures,
    visible,
    name: "Combobox.Options"
  });
}
var DEFAULT_OPTION_TAG = "li";
function OptionFn(props, ref) {
  var _a3, _b;
  let internalId = useId();
  let {
    id = `headlessui-combobox-option-${internalId}`,
    disabled = false,
    value,
    ...theirProps
  } = props;
  let data = useData("Combobox.Option");
  let actions = useActions("Combobox.Option");
  let active = data.activeOptionIndex !== null ? data.options[data.activeOptionIndex].id === id : false;
  let selected = data.isSelected(value);
  let internalOptionRef = (0, import_react19.useRef)(null);
  let bag = useLatestValue({
    disabled,
    value,
    domRef: internalOptionRef,
    textValue: (_b = (_a3 = internalOptionRef.current) == null ? void 0 : _a3.textContent) == null ? void 0 : _b.toLowerCase()
  });
  let optionRef = useSyncRefs(ref, internalOptionRef);
  let select = useEvent(() => actions.selectOption(id));
  useIsoMorphicEffect(() => actions.registerOption(id, bag), [bag, id]);
  let enableScrollIntoView = (0, import_react19.useRef)(data.__demoMode ? false : true);
  useIsoMorphicEffect(() => {
    if (!data.__demoMode)
      return;
    let d = disposables();
    d.requestAnimationFrame(() => {
      enableScrollIntoView.current = true;
    });
    return d.dispose;
  }, []);
  useIsoMorphicEffect(() => {
    if (data.comboboxState !== 0 /* Open */)
      return;
    if (!active)
      return;
    if (!enableScrollIntoView.current)
      return;
    if (data.activationTrigger === 0 /* Pointer */)
      return;
    let d = disposables();
    d.requestAnimationFrame(() => {
      var _a4, _b2;
      (_b2 = (_a4 = internalOptionRef.current) == null ? void 0 : _a4.scrollIntoView) == null ? void 0 : _b2.call(_a4, { block: "nearest" });
    });
    return d.dispose;
  }, [
    internalOptionRef,
    active,
    data.comboboxState,
    data.activationTrigger,
    /* We also want to trigger this when the position of the active item changes so that we can re-trigger the scrollIntoView */
    data.activeOptionIndex
  ]);
  let handleClick = useEvent((event) => {
    if (disabled)
      return event.preventDefault();
    select();
    if (data.mode === 0 /* Single */) {
      actions.closeCombobox();
    }
    if (!isMobile()) {
      requestAnimationFrame(() => {
        var _a4;
        return (_a4 = data.inputRef.current) == null ? void 0 : _a4.focus();
      });
    }
  });
  let handleFocus = useEvent(() => {
    if (disabled)
      return actions.goToOption(5 /* Nothing */);
    actions.goToOption(4 /* Specific */, id);
  });
  let pointer = useTrackedPointer();
  let handleEnter = useEvent((evt) => pointer.update(evt));
  let handleMove = useEvent((evt) => {
    if (!pointer.wasMoved(evt))
      return;
    if (disabled)
      return;
    if (active)
      return;
    actions.goToOption(4 /* Specific */, id, 0 /* Pointer */);
  });
  let handleLeave = useEvent((evt) => {
    if (!pointer.wasMoved(evt))
      return;
    if (disabled)
      return;
    if (!active)
      return;
    if (data.optionsPropsRef.current.hold)
      return;
    actions.goToOption(5 /* Nothing */);
  });
  let slot = (0, import_react19.useMemo)(
    () => ({ active, selected, disabled }),
    [active, selected, disabled]
  );
  let ourProps = {
    id,
    ref: optionRef,
    role: "option",
    tabIndex: disabled === true ? void 0 : -1,
    "aria-disabled": disabled === true ? true : void 0,
    // According to the WAI-ARIA best practices, we should use aria-checked for
    // multi-select,but Voice-Over disagrees. So we use aria-checked instead for
    // both single and multi-select.
    "aria-selected": selected,
    disabled: void 0,
    // Never forward the `disabled` prop
    onClick: handleClick,
    onFocus: handleFocus,
    onPointerEnter: handleEnter,
    onMouseEnter: handleEnter,
    onPointerMove: handleMove,
    onMouseMove: handleMove,
    onPointerLeave: handleLeave,
    onMouseLeave: handleLeave
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_OPTION_TAG,
    name: "Combobox.Option"
  });
}
var ComboboxRoot = forwardRefWithAs(ComboboxFn);
var Button = forwardRefWithAs(ButtonFn);
var Input = forwardRefWithAs(InputFn);
var Label = forwardRefWithAs(LabelFn);
var Options = forwardRefWithAs(OptionsFn);
var Option = forwardRefWithAs(OptionFn);
var Combobox = Object.assign(ComboboxRoot, { Input, Button, Label, Options, Option });

// src/components/dialog/dialog.tsx
var import_react31 = __toESM(__webpack_require__(/*! react */ "react"), 1);

// src/components/focus-trap/focus-trap.tsx
var import_react25 = __toESM(__webpack_require__(/*! react */ "react"), 1);

// src/hooks/use-tab-direction.ts
var import_react20 = __webpack_require__(/*! react */ "react");
function useTabDirection() {
  let direction = (0, import_react20.useRef)(0 /* Forwards */);
  useWindowEvent(
    "keydown",
    (event) => {
      if (event.key === "Tab") {
        direction.current = event.shiftKey ? 1 /* Backwards */ : 0 /* Forwards */;
      }
    },
    true
  );
  return direction;
}

// src/hooks/use-is-mounted.ts
var import_react21 = __webpack_require__(/*! react */ "react");
function useIsMounted() {
  let mounted = (0, import_react21.useRef)(false);
  useIsoMorphicEffect(() => {
    mounted.current = true;
    return () => {
      mounted.current = false;
    };
  }, []);
  return mounted;
}

// src/hooks/use-owner.ts
var import_react22 = __webpack_require__(/*! react */ "react");
function useOwnerDocument(...args) {
  return (0, import_react22.useMemo)(() => getOwnerDocument(...args), [...args]);
}

// src/hooks/use-event-listener.ts
var import_react23 = __webpack_require__(/*! react */ "react");
function useEventListener(element, type, listener, options) {
  let listenerRef = useLatestValue(listener);
  (0, import_react23.useEffect)(() => {
    element = element != null ? element : window;
    function handler(event) {
      listenerRef.current(event);
    }
    element.addEventListener(type, handler, options);
    return () => element.removeEventListener(type, handler, options);
  }, [element, type, options]);
}

// src/utils/document-ready.ts
function onDocumentReady(cb) {
  function check() {
    if (document.readyState === "loading")
      return;
    cb();
    document.removeEventListener("DOMContentLoaded", check);
  }
  if (typeof window !== "undefined" && typeof document !== "undefined") {
    document.addEventListener("DOMContentLoaded", check);
    check();
  }
}

// src/hooks/use-on-unmount.ts
var import_react24 = __webpack_require__(/*! react */ "react");
function useOnUnmount(cb) {
  let stableCb = useEvent(cb);
  let trulyUnmounted = (0, import_react24.useRef)(false);
  (0, import_react24.useEffect)(() => {
    trulyUnmounted.current = false;
    return () => {
      trulyUnmounted.current = true;
      microTask(() => {
        if (!trulyUnmounted.current)
          return;
        stableCb();
      });
    };
  }, [stableCb]);
}

// src/components/focus-trap/focus-trap.tsx
function resolveContainers(containers) {
  if (!containers)
    return /* @__PURE__ */ new Set();
  if (typeof containers === "function")
    return new Set(containers());
  let all = /* @__PURE__ */ new Set();
  for (let container of containers.current) {
    if (container.current instanceof HTMLElement) {
      all.add(container.current);
    }
  }
  return all;
}
var DEFAULT_FOCUS_TRAP_TAG = "div";
var Features3 = /* @__PURE__ */ ((Features4) => {
  Features4[Features4["None"] = 1] = "None";
  Features4[Features4["InitialFocus"] = 2] = "InitialFocus";
  Features4[Features4["TabLock"] = 4] = "TabLock";
  Features4[Features4["FocusLock"] = 8] = "FocusLock";
  Features4[Features4["RestoreFocus"] = 16] = "RestoreFocus";
  Features4[Features4["All"] = 30] = "All";
  return Features4;
})(Features3 || {});
function FocusTrapFn(props, ref) {
  let container = (0, import_react25.useRef)(null);
  let focusTrapRef = useSyncRefs(container, ref);
  let { initialFocus, containers, features = 30 /* All */, ...theirProps } = props;
  if (!useServerHandoffComplete()) {
    features = 1 /* None */;
  }
  let ownerDocument = useOwnerDocument(container);
  useRestoreFocus({ ownerDocument }, Boolean(features & 16 /* RestoreFocus */));
  let previousActiveElement = useInitialFocus(
    { ownerDocument, container, initialFocus },
    Boolean(features & 2 /* InitialFocus */)
  );
  useFocusLock(
    { ownerDocument, container, containers, previousActiveElement },
    Boolean(features & 8 /* FocusLock */)
  );
  let direction = useTabDirection();
  let handleFocus = useEvent((e) => {
    let el = container.current;
    if (!el)
      return;
    let wrapper =  false ? 0 : (cb) => cb();
    wrapper(() => {
      match(direction.current, {
        [0 /* Forwards */]: () => {
          focusIn(el, 1 /* First */, { skipElements: [e.relatedTarget] });
        },
        [1 /* Backwards */]: () => {
          focusIn(el, 8 /* Last */, { skipElements: [e.relatedTarget] });
        }
      });
    });
  });
  let d = useDisposables();
  let recentlyUsedTabKey = (0, import_react25.useRef)(false);
  let ourProps = {
    ref: focusTrapRef,
    onKeyDown(e) {
      if (e.key == "Tab") {
        recentlyUsedTabKey.current = true;
        d.requestAnimationFrame(() => {
          recentlyUsedTabKey.current = false;
        });
      }
    },
    onBlur(e) {
      let allContainers = resolveContainers(containers);
      if (container.current instanceof HTMLElement)
        allContainers.add(container.current);
      let relatedTarget = e.relatedTarget;
      if (!(relatedTarget instanceof HTMLElement))
        return;
      if (relatedTarget.dataset.headlessuiFocusGuard === "true") {
        return;
      }
      if (!contains(allContainers, relatedTarget)) {
        if (recentlyUsedTabKey.current) {
          focusIn(
            container.current,
            match(direction.current, {
              [0 /* Forwards */]: () => 4 /* Next */,
              [1 /* Backwards */]: () => 2 /* Previous */
            }) | 16 /* WrapAround */,
            { relativeTo: e.target }
          );
        } else if (e.target instanceof HTMLElement) {
          focusElement(e.target);
        }
      }
    }
  };
  return /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, Boolean(features & 4 /* TabLock */) && /* @__PURE__ */ import_react25.default.createElement(
    Hidden,
    {
      as: "button",
      type: "button",
      "data-headlessui-focus-guard": true,
      onFocus: handleFocus,
      features: 2 /* Focusable */
    }
  ), render({
    ourProps,
    theirProps,
    defaultTag: DEFAULT_FOCUS_TRAP_TAG,
    name: "FocusTrap"
  }), Boolean(features & 4 /* TabLock */) && /* @__PURE__ */ import_react25.default.createElement(
    Hidden,
    {
      as: "button",
      type: "button",
      "data-headlessui-focus-guard": true,
      onFocus: handleFocus,
      features: 2 /* Focusable */
    }
  ));
}
var FocusTrapRoot = forwardRefWithAs(FocusTrapFn);
var FocusTrap = Object.assign(FocusTrapRoot, {
  features: Features3
});
var history = [];
onDocumentReady(() => {
  function handle(e) {
    if (!(e.target instanceof HTMLElement))
      return;
    if (e.target === document.body)
      return;
    if (history[0] === e.target)
      return;
    history.unshift(e.target);
    history = history.filter((x) => x != null && x.isConnected);
    history.splice(10);
  }
  window.addEventListener("click", handle, { capture: true });
  window.addEventListener("mousedown", handle, { capture: true });
  window.addEventListener("focus", handle, { capture: true });
  document.body.addEventListener("click", handle, { capture: true });
  document.body.addEventListener("mousedown", handle, { capture: true });
  document.body.addEventListener("focus", handle, { capture: true });
});
function useRestoreElement(enabled = true) {
  let localHistory = (0, import_react25.useRef)(history.slice());
  useWatch(
    ([newEnabled], [oldEnabled]) => {
      if (oldEnabled === true && newEnabled === false) {
        microTask(() => {
          localHistory.current.splice(0);
        });
      }
      if (oldEnabled === false && newEnabled === true) {
        localHistory.current = history.slice();
      }
    },
    [enabled, history, localHistory]
  );
  return useEvent(() => {
    var _a3;
    return (_a3 = localHistory.current.find((x) => x != null && x.isConnected)) != null ? _a3 : null;
  });
}
function useRestoreFocus({ ownerDocument }, enabled) {
  let getRestoreElement = useRestoreElement(enabled);
  useWatch(() => {
    if (enabled)
      return;
    if ((ownerDocument == null ? void 0 : ownerDocument.activeElement) === (ownerDocument == null ? void 0 : ownerDocument.body)) {
      focusElement(getRestoreElement());
    }
  }, [enabled]);
  useOnUnmount(() => {
    if (!enabled)
      return;
    focusElement(getRestoreElement());
  });
}
function useInitialFocus({
  ownerDocument,
  container,
  initialFocus
}, enabled) {
  let previousActiveElement = (0, import_react25.useRef)(null);
  let mounted = useIsMounted();
  useWatch(() => {
    if (!enabled)
      return;
    let containerElement = container.current;
    if (!containerElement)
      return;
    microTask(() => {
      if (!mounted.current) {
        return;
      }
      let activeElement = ownerDocument == null ? void 0 : ownerDocument.activeElement;
      if (initialFocus == null ? void 0 : initialFocus.current) {
        if ((initialFocus == null ? void 0 : initialFocus.current) === activeElement) {
          previousActiveElement.current = activeElement;
          return;
        }
      } else if (containerElement.contains(activeElement)) {
        previousActiveElement.current = activeElement;
        return;
      }
      if (initialFocus == null ? void 0 : initialFocus.current) {
        focusElement(initialFocus.current);
      } else {
        if (focusIn(containerElement, 1 /* First */) === 0 /* Error */) {
          console.warn("There are no focusable elements inside the <FocusTrap />");
        }
      }
      previousActiveElement.current = ownerDocument == null ? void 0 : ownerDocument.activeElement;
    });
  }, [enabled]);
  return previousActiveElement;
}
function useFocusLock({
  ownerDocument,
  container,
  containers,
  previousActiveElement
}, enabled) {
  let mounted = useIsMounted();
  useEventListener(
    ownerDocument == null ? void 0 : ownerDocument.defaultView,
    "focus",
    (event) => {
      if (!enabled)
        return;
      if (!mounted.current)
        return;
      let allContainers = resolveContainers(containers);
      if (container.current instanceof HTMLElement)
        allContainers.add(container.current);
      let previous = previousActiveElement.current;
      if (!previous)
        return;
      let toElement = event.target;
      if (toElement && toElement instanceof HTMLElement) {
        if (!contains(allContainers, toElement)) {
          event.preventDefault();
          event.stopPropagation();
          focusElement(previous);
        } else {
          previousActiveElement.current = toElement;
          focusElement(toElement);
        }
      } else {
        focusElement(previousActiveElement.current);
      }
    },
    true
  );
}
function contains(containers, element) {
  for (let container of containers) {
    if (container.contains(element))
      return true;
  }
  return false;
}

// src/components/portal/portal.tsx
var import_react27 = __toESM(__webpack_require__(/*! react */ "react"), 1);
var import_react_dom = __webpack_require__(/*! react-dom */ "react-dom");

// src/internal/portal-force-root.tsx
var import_react26 = __toESM(__webpack_require__(/*! react */ "react"), 1);
var ForcePortalRootContext = (0, import_react26.createContext)(false);
function usePortalRoot() {
  return (0, import_react26.useContext)(ForcePortalRootContext);
}
function ForcePortalRoot(props) {
  return /* @__PURE__ */ import_react26.default.createElement(ForcePortalRootContext.Provider, { value: props.force }, props.children);
}

// src/components/portal/portal.tsx
function usePortalTarget(ref) {
  let forceInRoot = usePortalRoot();
  let groupTarget = (0, import_react27.useContext)(PortalGroupContext);
  let ownerDocument = useOwnerDocument(ref);
  let [target, setTarget] = (0, import_react27.useState)(() => {
    if (!forceInRoot && groupTarget !== null)
      return null;
    if (env.isServer)
      return null;
    let existingRoot = ownerDocument == null ? void 0 : ownerDocument.getElementById("headlessui-portal-root");
    if (existingRoot)
      return existingRoot;
    if (ownerDocument === null)
      return null;
    let root = ownerDocument.createElement("div");
    root.setAttribute("id", "headlessui-portal-root");
    return ownerDocument.body.appendChild(root);
  });
  (0, import_react27.useEffect)(() => {
    if (target === null)
      return;
    if (!(ownerDocument == null ? void 0 : ownerDocument.body.contains(target))) {
      ownerDocument == null ? void 0 : ownerDocument.body.appendChild(target);
    }
  }, [target, ownerDocument]);
  (0, import_react27.useEffect)(() => {
    if (forceInRoot)
      return;
    if (groupTarget === null)
      return;
    setTarget(groupTarget.current);
  }, [groupTarget, setTarget, forceInRoot]);
  return target;
}
var DEFAULT_PORTAL_TAG = import_react27.Fragment;
function PortalFn(props, ref) {
  let theirProps = props;
  let internalPortalRootRef = (0, import_react27.useRef)(null);
  let portalRef = useSyncRefs(
    optionalRef((ref2) => {
      internalPortalRootRef.current = ref2;
    }),
    ref
  );
  let ownerDocument = useOwnerDocument(internalPortalRootRef);
  let target = usePortalTarget(internalPortalRootRef);
  let [element] = (0, import_react27.useState)(
    () => {
      var _a3;
      return env.isServer ? null : (_a3 = ownerDocument == null ? void 0 : ownerDocument.createElement("div")) != null ? _a3 : null;
    }
  );
  let parent = (0, import_react27.useContext)(PortalParentContext);
  let ready = useServerHandoffComplete();
  useIsoMorphicEffect(() => {
    if (!target || !element)
      return;
    if (!target.contains(element)) {
      element.setAttribute("data-headlessui-portal", "");
      target.appendChild(element);
    }
  }, [target, element]);
  useIsoMorphicEffect(() => {
    if (!element)
      return;
    if (!parent)
      return;
    return parent.register(element);
  }, [parent, element]);
  useOnUnmount(() => {
    var _a3;
    if (!target || !element)
      return;
    if (element instanceof Node && target.contains(element)) {
      target.removeChild(element);
    }
    if (target.childNodes.length <= 0) {
      (_a3 = target.parentElement) == null ? void 0 : _a3.removeChild(target);
    }
  });
  if (!ready)
    return null;
  let ourProps = { ref: portalRef };
  return !target || !element ? null : (0, import_react_dom.createPortal)(
    render({
      ourProps,
      theirProps,
      defaultTag: DEFAULT_PORTAL_TAG,
      name: "Portal"
    }),
    element
  );
}
var DEFAULT_GROUP_TAG = import_react27.Fragment;
var PortalGroupContext = (0, import_react27.createContext)(null);
function GroupFn(props, ref) {
  let { target, ...theirProps } = props;
  let groupRef = useSyncRefs(ref);
  let ourProps = { ref: groupRef };
  return /* @__PURE__ */ import_react27.default.createElement(PortalGroupContext.Provider, { value: target }, render({
    ourProps,
    theirProps,
    defaultTag: DEFAULT_GROUP_TAG,
    name: "Popover.Group"
  }));
}
var PortalParentContext = (0, import_react27.createContext)(null);
function useNestedPortals() {
  let parent = (0, import_react27.useContext)(PortalParentContext);
  let portals = (0, import_react27.useRef)([]);
  let register = useEvent((portal) => {
    portals.current.push(portal);
    if (parent)
      parent.register(portal);
    return () => unregister(portal);
  });
  let unregister = useEvent((portal) => {
    let idx = portals.current.indexOf(portal);
    if (idx !== -1)
      portals.current.splice(idx, 1);
    if (parent)
      parent.unregister(portal);
  });
  let api = (0, import_react27.useMemo)(
    () => ({ register, unregister, portals }),
    [register, unregister, portals]
  );
  return [
    portals,
    (0, import_react27.useMemo)(() => {
      return function PortalWrapper({ children }) {
        return /* @__PURE__ */ import_react27.default.createElement(PortalParentContext.Provider, { value: api }, children);
      };
    }, [api])
  ];
}
var PortalRoot = forwardRefWithAs(PortalFn);
var Group = forwardRefWithAs(GroupFn);
var Portal = Object.assign(PortalRoot, { Group });

// src/components/description/description.tsx
var import_react28 = __toESM(__webpack_require__(/*! react */ "react"), 1);
var DescriptionContext = (0, import_react28.createContext)(null);
function useDescriptionContext() {
  let context = (0, import_react28.useContext)(DescriptionContext);
  if (context === null) {
    let err = new Error(
      "You used a <Description /> component, but it is not inside a relevant parent."
    );
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useDescriptionContext);
    throw err;
  }
  return context;
}
function useDescriptions() {
  let [descriptionIds, setDescriptionIds] = (0, import_react28.useState)([]);
  return [
    // The actual id's as string or undefined
    descriptionIds.length > 0 ? descriptionIds.join(" ") : void 0,
    // The provider component
    (0, import_react28.useMemo)(() => {
      return function DescriptionProvider(props) {
        let register = useEvent((value) => {
          setDescriptionIds((existing) => [...existing, value]);
          return () => setDescriptionIds((existing) => {
            let clone = existing.slice();
            let idx = clone.indexOf(value);
            if (idx !== -1)
              clone.splice(idx, 1);
            return clone;
          });
        });
        let contextBag = (0, import_react28.useMemo)(
          () => ({ register, slot: props.slot, name: props.name, props: props.props }),
          [register, props.slot, props.name, props.props]
        );
        return /* @__PURE__ */ import_react28.default.createElement(DescriptionContext.Provider, { value: contextBag }, props.children);
      };
    }, [setDescriptionIds])
  ];
}
var DEFAULT_DESCRIPTION_TAG = "p";
function DescriptionFn(props, ref) {
  let internalId = useId();
  let { id = `headlessui-description-${internalId}`, ...theirProps } = props;
  let context = useDescriptionContext();
  let descriptionRef = useSyncRefs(ref);
  useIsoMorphicEffect(() => context.register(id), [id, context.register]);
  let ourProps = { ref: descriptionRef, ...context.props, id };
  return render({
    ourProps,
    theirProps,
    slot: context.slot || {},
    defaultTag: DEFAULT_DESCRIPTION_TAG,
    name: context.name || "Description"
  });
}
var DescriptionRoot = forwardRefWithAs(DescriptionFn);
var Description = Object.assign(DescriptionRoot, {
  //
});

// src/internal/stack-context.tsx
var import_react29 = __toESM(__webpack_require__(/*! react */ "react"), 1);
var StackContext = (0, import_react29.createContext)(() => {
});
StackContext.displayName = "StackContext";
function useStackContext() {
  return (0, import_react29.useContext)(StackContext);
}
function StackProvider({
  children,
  onUpdate,
  type,
  element,
  enabled
}) {
  let parentUpdate = useStackContext();
  let notify = useEvent((...args) => {
    onUpdate == null ? void 0 : onUpdate(...args);
    parentUpdate(...args);
  });
  useIsoMorphicEffect(() => {
    let shouldNotify = enabled === void 0 || enabled === true;
    shouldNotify && notify(0 /* Add */, type, element);
    return () => {
      shouldNotify && notify(1 /* Remove */, type, element);
    };
  }, [notify, type, element, enabled]);
  return /* @__PURE__ */ import_react29.default.createElement(StackContext.Provider, { value: notify }, children);
}

// src/use-sync-external-store-shim/index.ts
var React11 = __toESM(__webpack_require__(/*! react */ "react"), 1);

// src/use-sync-external-store-shim/useSyncExternalStoreShimClient.ts
var React10 = __toESM(__webpack_require__(/*! react */ "react"), 1);
function isPolyfill(x, y) {
  return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
}
var is = typeof Object.is === "function" ? Object.is : isPolyfill;
var { useState: useState8, useEffect: useEffect14, useLayoutEffect: useLayoutEffect2, useDebugValue } = React10;
var didWarnOld18Alpha = false;
var didWarnUncachedGetSnapshot = false;
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
  if (true) {
    if (!didWarnOld18Alpha) {
      if ("startTransition" in React10) {
        didWarnOld18Alpha = true;
        console.error(
          "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
        );
      }
    }
  }
  const value = getSnapshot();
  if (true) {
    if (!didWarnUncachedGetSnapshot) {
      const cachedValue = getSnapshot();
      if (!is(value, cachedValue)) {
        console.error("The result of getSnapshot should be cached to avoid an infinite loop");
        didWarnUncachedGetSnapshot = true;
      }
    }
  }
  const [{ inst }, forceUpdate] = useState8({ inst: { value, getSnapshot } });
  useLayoutEffect2(() => {
    inst.value = value;
    inst.getSnapshot = getSnapshot;
    if (checkIfSnapshotChanged(inst)) {
      forceUpdate({ inst });
    }
  }, [subscribe, value, getSnapshot]);
  useEffect14(() => {
    if (checkIfSnapshotChanged(inst)) {
      forceUpdate({ inst });
    }
    const handleStoreChange = () => {
      if (checkIfSnapshotChanged(inst)) {
        forceUpdate({ inst });
      }
    };
    return subscribe(handleStoreChange);
  }, [subscribe]);
  useDebugValue(value);
  return value;
}
function checkIfSnapshotChanged(inst) {
  const latestGetSnapshot = inst.getSnapshot;
  const prevValue = inst.value;
  try {
    const nextValue = latestGetSnapshot();
    return !is(prevValue, nextValue);
  } catch (error) {
    return true;
  }
}

// src/use-sync-external-store-shim/useSyncExternalStoreShimServer.ts
function useSyncExternalStore2(subscribe, getSnapshot, getServerSnapshot) {
  return getSnapshot();
}

// src/use-sync-external-store-shim/index.ts
var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
var isServerEnvironment = !canUseDOM;
var shim = isServerEnvironment ? useSyncExternalStore2 : useSyncExternalStore;
var useSyncExternalStore3 = "useSyncExternalStore" in React11 ? ((r) => r.useSyncExternalStore)(React11) : shim;

// src/hooks/use-store.ts
function useStore(store) {
  return useSyncExternalStore3(store.subscribe, store.getSnapshot, store.getSnapshot);
}

// src/utils/store.ts
function createStore(initial, actions) {
  let state = initial();
  let listeners = /* @__PURE__ */ new Set();
  return {
    getSnapshot() {
      return state;
    },
    subscribe(onChange) {
      listeners.add(onChange);
      return () => listeners.delete(onChange);
    },
    dispatch(key, ...args) {
      let newState = actions[key].call(state, ...args);
      if (newState) {
        state = newState;
        listeners.forEach((listener) => listener());
      }
    }
  };
}

// src/hooks/document-overflow/adjust-scrollbar-padding.ts
function adjustScrollbarPadding() {
  let scrollbarWidthBefore;
  return {
    before({ doc }) {
      var _a3;
      let documentElement = doc.documentElement;
      let ownerWindow = (_a3 = doc.defaultView) != null ? _a3 : window;
      scrollbarWidthBefore = ownerWindow.innerWidth - documentElement.clientWidth;
    },
    after({ doc, d }) {
      let documentElement = doc.documentElement;
      let scrollbarWidthAfter = documentElement.clientWidth - documentElement.offsetWidth;
      let scrollbarWidth = scrollbarWidthBefore - scrollbarWidthAfter;
      d.style(documentElement, "paddingRight", `${scrollbarWidth}px`);
    }
  };
}

// src/hooks/document-overflow/handle-ios-locking.ts
function handleIOSLocking() {
  if (!isIOS()) {
    return {};
  }
  let scrollPosition;
  return {
    before() {
      scrollPosition = window.pageYOffset;
    },
    after({ doc, d, meta }) {
      function inAllowedContainer(el) {
        return meta.containers.flatMap((resolve) => resolve()).some((container) => container.contains(el));
      }
      d.style(doc.body, "marginTop", `-${scrollPosition}px`);
      window.scrollTo(0, 0);
      let scrollToElement = null;
      d.addEventListener(
        doc,
        "click",
        (e) => {
          if (!(e.target instanceof HTMLElement)) {
            return;
          }
          try {
            let anchor = e.target.closest("a");
            if (!anchor)
              return;
            let { hash } = new URL(anchor.href);
            let el = doc.querySelector(hash);
            if (el && !inAllowedContainer(el)) {
              scrollToElement = el;
            }
          } catch (err) {
          }
        },
        true
      );
      d.addEventListener(
        doc,
        "touchmove",
        (e) => {
          if (e.target instanceof HTMLElement && !inAllowedContainer(e.target)) {
            e.preventDefault();
          }
        },
        { passive: false }
      );
      d.add(() => {
        window.scrollTo(0, window.pageYOffset + scrollPosition);
        if (scrollToElement && scrollToElement.isConnected) {
          scrollToElement.scrollIntoView({ block: "nearest" });
          scrollToElement = null;
        }
      });
    }
  };
}

// src/hooks/document-overflow/prevent-scroll.ts
function preventScroll() {
  return {
    before({ doc, d }) {
      d.style(doc.documentElement, "overflow", "hidden");
    }
  };
}

// src/hooks/document-overflow/overflow-store.ts
function buildMeta(fns) {
  let tmp = {};
  for (let fn of fns) {
    Object.assign(tmp, fn(tmp));
  }
  return tmp;
}
var overflows = createStore(() => /* @__PURE__ */ new Map(), {
  PUSH(doc, meta) {
    var _a3;
    let entry = (_a3 = this.get(doc)) != null ? _a3 : {
      doc,
      count: 0,
      d: disposables(),
      meta: /* @__PURE__ */ new Set()
    };
    entry.count++;
    entry.meta.add(meta);
    this.set(doc, entry);
    return this;
  },
  POP(doc, meta) {
    let entry = this.get(doc);
    if (entry) {
      entry.count--;
      entry.meta.delete(meta);
    }
    return this;
  },
  SCROLL_PREVENT({ doc, d, meta }) {
    let ctx = {
      doc,
      d,
      meta: buildMeta(meta)
    };
    let steps = [
      handleIOSLocking(),
      adjustScrollbarPadding(),
      preventScroll()
    ];
    steps.forEach(({ before }) => before == null ? void 0 : before(ctx));
    steps.forEach(({ after }) => after == null ? void 0 : after(ctx));
  },
  SCROLL_ALLOW({ d }) {
    d.dispose();
  },
  TEARDOWN({ doc }) {
    this.delete(doc);
  }
});
overflows.subscribe(() => {
  let docs = overflows.getSnapshot();
  let styles = /* @__PURE__ */ new Map();
  for (let [doc] of docs) {
    styles.set(doc, doc.documentElement.style.overflow);
  }
  for (let entry of docs.values()) {
    let isHidden = styles.get(entry.doc) === "hidden";
    let isLocked = entry.count !== 0;
    let willChange = isLocked && !isHidden || !isLocked && isHidden;
    if (willChange) {
      overflows.dispatch(entry.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", entry);
    }
    if (entry.count === 0) {
      overflows.dispatch("TEARDOWN", entry);
    }
  }
});

// src/hooks/document-overflow/use-document-overflow.ts
function useDocumentOverflowLockedEffect(doc, shouldBeLocked, meta) {
  let store = useStore(overflows);
  let entry = doc ? store.get(doc) : void 0;
  let locked = entry ? entry.count > 0 : false;
  useIsoMorphicEffect(() => {
    if (!doc || !shouldBeLocked) {
      return;
    }
    overflows.dispatch("PUSH", doc, meta);
    return () => overflows.dispatch("POP", doc, meta);
  }, [shouldBeLocked, doc]);
  return locked;
}

// src/hooks/use-inert.tsx
var originals = /* @__PURE__ */ new Map();
var counts = /* @__PURE__ */ new Map();
function useInert(node, enabled = true) {
  useIsoMorphicEffect(() => {
    var _a3;
    if (!enabled)
      return;
    let element = typeof node === "function" ? node() : node.current;
    if (!element)
      return;
    function cleanup() {
      var _a4;
      if (!element)
        return;
      let count2 = (_a4 = counts.get(element)) != null ? _a4 : 1;
      if (count2 === 1)
        counts.delete(element);
      else
        counts.set(element, count2 - 1);
      if (count2 !== 1)
        return;
      let original = originals.get(element);
      if (!original)
        return;
      if (original["aria-hidden"] === null)
        element.removeAttribute("aria-hidden");
      else
        element.setAttribute("aria-hidden", original["aria-hidden"]);
      element.inert = original.inert;
      originals.delete(element);
    }
    let count = (_a3 = counts.get(element)) != null ? _a3 : 0;
    counts.set(element, count + 1);
    if (count !== 0)
      return cleanup;
    originals.set(element, {
      "aria-hidden": element.getAttribute("aria-hidden"),
      inert: element.inert
    });
    element.setAttribute("aria-hidden", "true");
    element.inert = true;
    return cleanup;
  }, [node, enabled]);
}

// src/hooks/use-root-containers.tsx
var import_react30 = __toESM(__webpack_require__(/*! react */ "react"), 1);
function useRootContainers({
  defaultContainers = [],
  portals
} = {}) {
  let mainTreeNodeRef = (0, import_react30.useRef)(null);
  let ownerDocument = useOwnerDocument(mainTreeNodeRef);
  let resolveContainers2 = useEvent(() => {
    var _a3;
    let containers = [];
    for (let container of defaultContainers) {
      if (container === null)
        continue;
      if (container instanceof HTMLElement) {
        containers.push(container);
      } else if ("current" in container && container.current instanceof HTMLElement) {
        containers.push(container.current);
      }
    }
    if (portals == null ? void 0 : portals.current) {
      for (let portal of portals.current) {
        containers.push(portal);
      }
    }
    for (let container of (_a3 = ownerDocument == null ? void 0 : ownerDocument.querySelectorAll("html > *, body > *")) != null ? _a3 : []) {
      if (container === document.body)
        continue;
      if (container === document.head)
        continue;
      if (!(container instanceof HTMLElement))
        continue;
      if (container.id === "headlessui-portal-root")
        continue;
      if (container.contains(mainTreeNodeRef.current))
        continue;
      if (containers.some((defaultContainer) => container.contains(defaultContainer)))
        continue;
      containers.push(container);
    }
    return containers;
  });
  return {
    resolveContainers: resolveContainers2,
    contains: useEvent(
      (element) => resolveContainers2().some((container) => container.contains(element))
    ),
    mainTreeNodeRef,
    MainTreeNode: (0, import_react30.useMemo)(() => {
      return function MainTreeNode() {
        return /* @__PURE__ */ import_react30.default.createElement(Hidden, { features: 4 /* Hidden */, ref: mainTreeNodeRef });
      };
    }, [mainTreeNodeRef])
  };
}

// src/components/dialog/dialog.tsx
var reducers2 = {
  [0 /* SetTitleId */](state, action) {
    if (state.titleId === action.id)
      return state;
    return { ...state, titleId: action.id };
  }
};
var DialogContext = (0, import_react31.createContext)(null);
DialogContext.displayName = "DialogContext";
function useDialogContext(component) {
  let context = (0, import_react31.useContext)(DialogContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <Dialog /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useDialogContext);
    throw err;
  }
  return context;
}
function useScrollLock(ownerDocument, enabled, resolveAllowedContainers = () => [document.body]) {
  useDocumentOverflowLockedEffect(ownerDocument, enabled, (meta) => {
    var _a3;
    return {
      containers: [...(_a3 = meta.containers) != null ? _a3 : [], resolveAllowedContainers]
    };
  });
}
function stateReducer2(state, action) {
  return match(action.type, reducers2, state, action);
}
var DEFAULT_DIALOG_TAG = "div";
var DialogRenderFeatures = 1 /* RenderStrategy */ | 2 /* Static */;
function DialogFn(props, ref) {
  var _a3;
  let internalId = useId();
  let {
    id = `headlessui-dialog-${internalId}`,
    open,
    onClose,
    initialFocus,
    __demoMode = false,
    ...theirProps
  } = props;
  let [nestedDialogCount, setNestedDialogCount] = (0, import_react31.useState)(0);
  let usesOpenClosedState = useOpenClosed();
  if (open === void 0 && usesOpenClosedState !== null) {
    open = (usesOpenClosedState & 1 /* Open */) === 1 /* Open */;
  }
  let internalDialogRef = (0, import_react31.useRef)(null);
  let dialogRef = useSyncRefs(internalDialogRef, ref);
  let ownerDocument = useOwnerDocument(internalDialogRef);
  let hasOpen = props.hasOwnProperty("open") || usesOpenClosedState !== null;
  let hasOnClose = props.hasOwnProperty("onClose");
  if (!hasOpen && !hasOnClose) {
    throw new Error(
      `You have to provide an \`open\` and an \`onClose\` prop to the \`Dialog\` component.`
    );
  }
  if (!hasOpen) {
    throw new Error(
      `You provided an \`onClose\` prop to the \`Dialog\`, but forgot an \`open\` prop.`
    );
  }
  if (!hasOnClose) {
    throw new Error(
      `You provided an \`open\` prop to the \`Dialog\`, but forgot an \`onClose\` prop.`
    );
  }
  if (typeof open !== "boolean") {
    throw new Error(
      `You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${open}`
    );
  }
  if (typeof onClose !== "function") {
    throw new Error(
      `You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${onClose}`
    );
  }
  let dialogState = open ? 0 /* Open */ : 1 /* Closed */;
  let [state, dispatch] = (0, import_react31.useReducer)(stateReducer2, {
    titleId: null,
    descriptionId: null,
    panelRef: (0, import_react31.createRef)()
  });
  let close = useEvent(() => onClose(false));
  let setTitleId = useEvent((id2) => dispatch({ type: 0 /* SetTitleId */, id: id2 }));
  let ready = useServerHandoffComplete();
  let enabled = ready ? __demoMode ? false : dialogState === 0 /* Open */ : false;
  let hasNestedDialogs = nestedDialogCount > 1;
  let hasParentDialog = (0, import_react31.useContext)(DialogContext) !== null;
  let [portals, PortalWrapper] = useNestedPortals();
  let {
    resolveContainers: resolveRootContainers,
    mainTreeNodeRef,
    MainTreeNode
  } = useRootContainers({
    portals,
    defaultContainers: [(_a3 = state.panelRef.current) != null ? _a3 : internalDialogRef.current]
  });
  let position = !hasNestedDialogs ? "leaf" : "parent";
  let isClosing = usesOpenClosedState !== null ? (usesOpenClosedState & 4 /* Closing */) === 4 /* Closing */ : false;
  let inertOthersEnabled = (() => {
    if (hasParentDialog)
      return false;
    if (isClosing)
      return false;
    return enabled;
  })();
  let resolveRootOfMainTreeNode = (0, import_react31.useCallback)(() => {
    var _a4, _b;
    return (_b = Array.from((_a4 = ownerDocument == null ? void 0 : ownerDocument.querySelectorAll("body > *")) != null ? _a4 : []).find((root) => {
      if (root.id === "headlessui-portal-root")
        return false;
      return root.contains(mainTreeNodeRef.current) && root instanceof HTMLElement;
    })) != null ? _b : null;
  }, [mainTreeNodeRef]);
  useInert(resolveRootOfMainTreeNode, inertOthersEnabled);
  let inertParentDialogs = (() => {
    if (hasNestedDialogs)
      return true;
    return enabled;
  })();
  let resolveRootOfParentDialog = (0, import_react31.useCallback)(() => {
    var _a4, _b;
    return (_b = Array.from((_a4 = ownerDocument == null ? void 0 : ownerDocument.querySelectorAll("[data-headlessui-portal]")) != null ? _a4 : []).find(
      (root) => root.contains(mainTreeNodeRef.current) && root instanceof HTMLElement
    )) != null ? _b : null;
  }, [mainTreeNodeRef]);
  useInert(resolveRootOfParentDialog, inertParentDialogs);
  let outsideClickEnabled = (() => {
    if (!enabled)
      return false;
    if (hasNestedDialogs)
      return false;
    return true;
  })();
  useOutsideClick(resolveRootContainers, close, outsideClickEnabled);
  let escapeToCloseEnabled = (() => {
    if (hasNestedDialogs)
      return false;
    if (dialogState !== 0 /* Open */)
      return false;
    return true;
  })();
  useEventListener(ownerDocument == null ? void 0 : ownerDocument.defaultView, "keydown", (event) => {
    if (!escapeToCloseEnabled)
      return;
    if (event.defaultPrevented)
      return;
    if (event.key !== "Escape" /* Escape */)
      return;
    event.preventDefault();
    event.stopPropagation();
    close();
  });
  let scrollLockEnabled = (() => {
    if (isClosing)
      return false;
    if (dialogState !== 0 /* Open */)
      return false;
    if (hasParentDialog)
      return false;
    return true;
  })();
  useScrollLock(ownerDocument, scrollLockEnabled, resolveRootContainers);
  (0, import_react31.useEffect)(() => {
    if (dialogState !== 0 /* Open */)
      return;
    if (!internalDialogRef.current)
      return;
    let observer = new ResizeObserver((entries) => {
      for (let entry of entries) {
        let rect = entry.target.getBoundingClientRect();
        if (rect.x === 0 && rect.y === 0 && rect.width === 0 && rect.height === 0) {
          close();
        }
      }
    });
    observer.observe(internalDialogRef.current);
    return () => observer.disconnect();
  }, [dialogState, internalDialogRef, close]);
  let [describedby, DescriptionProvider] = useDescriptions();
  let contextBag = (0, import_react31.useMemo)(
    () => [{ dialogState, close, setTitleId }, state],
    [dialogState, state, close, setTitleId]
  );
  let slot = (0, import_react31.useMemo)(
    () => ({ open: dialogState === 0 /* Open */ }),
    [dialogState]
  );
  let ourProps = {
    ref: dialogRef,
    id,
    role: "dialog",
    "aria-modal": dialogState === 0 /* Open */ ? true : void 0,
    "aria-labelledby": state.titleId,
    "aria-describedby": describedby
  };
  return /* @__PURE__ */ import_react31.default.createElement(
    StackProvider,
    {
      type: "Dialog",
      enabled: dialogState === 0 /* Open */,
      element: internalDialogRef,
      onUpdate: useEvent((message, type) => {
        if (type !== "Dialog")
          return;
        match(message, {
          [0 /* Add */]: () => setNestedDialogCount((count) => count + 1),
          [1 /* Remove */]: () => setNestedDialogCount((count) => count - 1)
        });
      })
    },
    /* @__PURE__ */ import_react31.default.createElement(ForcePortalRoot, { force: true }, /* @__PURE__ */ import_react31.default.createElement(Portal, null, /* @__PURE__ */ import_react31.default.createElement(DialogContext.Provider, { value: contextBag }, /* @__PURE__ */ import_react31.default.createElement(Portal.Group, { target: internalDialogRef }, /* @__PURE__ */ import_react31.default.createElement(ForcePortalRoot, { force: false }, /* @__PURE__ */ import_react31.default.createElement(DescriptionProvider, { slot, name: "Dialog.Description" }, /* @__PURE__ */ import_react31.default.createElement(
      FocusTrap,
      {
        initialFocus,
        containers: resolveRootContainers,
        features: enabled ? match(position, {
          parent: FocusTrap.features.RestoreFocus,
          leaf: FocusTrap.features.All & ~FocusTrap.features.FocusLock
        }) : FocusTrap.features.None
      },
      /* @__PURE__ */ import_react31.default.createElement(PortalWrapper, null, render({
        ourProps,
        theirProps,
        slot,
        defaultTag: DEFAULT_DIALOG_TAG,
        features: DialogRenderFeatures,
        visible: dialogState === 0 /* Open */,
        name: "Dialog"
      }))
    ))))))),
    /* @__PURE__ */ import_react31.default.createElement(MainTreeNode, null)
  );
}
var DEFAULT_OVERLAY_TAG = "div";
function OverlayFn(props, ref) {
  let internalId = useId();
  let { id = `headlessui-dialog-overlay-${internalId}`, ...theirProps } = props;
  let [{ dialogState, close }] = useDialogContext("Dialog.Overlay");
  let overlayRef = useSyncRefs(ref);
  let handleClick = useEvent((event) => {
    if (event.target !== event.currentTarget)
      return;
    if (isDisabledReactIssue7711(event.currentTarget))
      return event.preventDefault();
    event.preventDefault();
    event.stopPropagation();
    close();
  });
  let slot = (0, import_react31.useMemo)(
    () => ({ open: dialogState === 0 /* Open */ }),
    [dialogState]
  );
  let ourProps = {
    ref: overlayRef,
    id,
    "aria-hidden": true,
    onClick: handleClick
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_OVERLAY_TAG,
    name: "Dialog.Overlay"
  });
}
var DEFAULT_BACKDROP_TAG = "div";
function BackdropFn(props, ref) {
  let internalId = useId();
  let { id = `headlessui-dialog-backdrop-${internalId}`, ...theirProps } = props;
  let [{ dialogState }, state] = useDialogContext("Dialog.Backdrop");
  let backdropRef = useSyncRefs(ref);
  (0, import_react31.useEffect)(() => {
    if (state.panelRef.current === null) {
      throw new Error(
        `A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.`
      );
    }
  }, [state.panelRef]);
  let slot = (0, import_react31.useMemo)(
    () => ({ open: dialogState === 0 /* Open */ }),
    [dialogState]
  );
  let ourProps = {
    ref: backdropRef,
    id,
    "aria-hidden": true
  };
  return /* @__PURE__ */ import_react31.default.createElement(ForcePortalRoot, { force: true }, /* @__PURE__ */ import_react31.default.createElement(Portal, null, render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_BACKDROP_TAG,
    name: "Dialog.Backdrop"
  })));
}
var DEFAULT_PANEL_TAG = "div";
function PanelFn(props, ref) {
  let internalId = useId();
  let { id = `headlessui-dialog-panel-${internalId}`, ...theirProps } = props;
  let [{ dialogState }, state] = useDialogContext("Dialog.Panel");
  let panelRef = useSyncRefs(ref, state.panelRef);
  let slot = (0, import_react31.useMemo)(
    () => ({ open: dialogState === 0 /* Open */ }),
    [dialogState]
  );
  let handleClick = useEvent((event) => {
    event.stopPropagation();
  });
  let ourProps = {
    ref: panelRef,
    id,
    onClick: handleClick
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_PANEL_TAG,
    name: "Dialog.Panel"
  });
}
var DEFAULT_TITLE_TAG = "h2";
function TitleFn(props, ref) {
  let internalId = useId();
  let { id = `headlessui-dialog-title-${internalId}`, ...theirProps } = props;
  let [{ dialogState, setTitleId }] = useDialogContext("Dialog.Title");
  let titleRef = useSyncRefs(ref);
  (0, import_react31.useEffect)(() => {
    setTitleId(id);
    return () => setTitleId(null);
  }, [id, setTitleId]);
  let slot = (0, import_react31.useMemo)(
    () => ({ open: dialogState === 0 /* Open */ }),
    [dialogState]
  );
  let ourProps = { ref: titleRef, id };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_TITLE_TAG,
    name: "Dialog.Title"
  });
}
var DialogRoot = forwardRefWithAs(DialogFn);
var Backdrop = forwardRefWithAs(BackdropFn);
var Panel = forwardRefWithAs(PanelFn);
var Overlay = forwardRefWithAs(OverlayFn);
var Title = forwardRefWithAs(TitleFn);
var Dialog = Object.assign(DialogRoot, {
  Backdrop,
  Panel,
  Overlay,
  Title,
  Description
});

// src/components/disclosure/disclosure.tsx
var import_react33 = __toESM(__webpack_require__(/*! react */ "react"), 1);

// src/utils/start-transition.ts
var import_react32 = __toESM(__webpack_require__(/*! react */ "react"), 1);
var _a2;
var startTransition = (
  // Prefer React's `startTransition` if it's available.
  // @ts-expect-error - `startTransition` doesn't exist in React < 18.
  (_a2 = import_react32.default.startTransition) != null ? _a2 : function startTransition2(cb) {
    cb();
  }
);

// src/components/disclosure/disclosure.tsx
var reducers3 = {
  [0 /* ToggleDisclosure */]: (state) => ({
    ...state,
    disclosureState: match(state.disclosureState, {
      [0 /* Open */]: 1 /* Closed */,
      [1 /* Closed */]: 0 /* Open */
    })
  }),
  [1 /* CloseDisclosure */]: (state) => {
    if (state.disclosureState === 1 /* Closed */)
      return state;
    return { ...state, disclosureState: 1 /* Closed */ };
  },
  [4 /* LinkPanel */](state) {
    if (state.linkedPanel === true)
      return state;
    return { ...state, linkedPanel: true };
  },
  [5 /* UnlinkPanel */](state) {
    if (state.linkedPanel === false)
      return state;
    return { ...state, linkedPanel: false };
  },
  [2 /* SetButtonId */](state, action) {
    if (state.buttonId === action.buttonId)
      return state;
    return { ...state, buttonId: action.buttonId };
  },
  [3 /* SetPanelId */](state, action) {
    if (state.panelId === action.panelId)
      return state;
    return { ...state, panelId: action.panelId };
  }
};
var DisclosureContext = (0, import_react33.createContext)(null);
DisclosureContext.displayName = "DisclosureContext";
function useDisclosureContext(component) {
  let context = (0, import_react33.useContext)(DisclosureContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <Disclosure /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useDisclosureContext);
    throw err;
  }
  return context;
}
var DisclosureAPIContext = (0, import_react33.createContext)(null);
DisclosureAPIContext.displayName = "DisclosureAPIContext";
function useDisclosureAPIContext(component) {
  let context = (0, import_react33.useContext)(DisclosureAPIContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <Disclosure /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useDisclosureAPIContext);
    throw err;
  }
  return context;
}
var DisclosurePanelContext = (0, import_react33.createContext)(null);
DisclosurePanelContext.displayName = "DisclosurePanelContext";
function useDisclosurePanelContext() {
  return (0, import_react33.useContext)(DisclosurePanelContext);
}
function stateReducer3(state, action) {
  return match(action.type, reducers3, state, action);
}
var DEFAULT_DISCLOSURE_TAG = import_react33.Fragment;
function DisclosureFn(props, ref) {
  let { defaultOpen = false, ...theirProps } = props;
  let internalDisclosureRef = (0, import_react33.useRef)(null);
  let disclosureRef = useSyncRefs(
    ref,
    optionalRef(
      (ref2) => {
        internalDisclosureRef.current = ref2;
      },
      props.as === void 0 || // @ts-expect-error The `as` prop _can_ be a Fragment
      props.as === import_react33.Fragment
    )
  );
  let panelRef = (0, import_react33.useRef)(null);
  let buttonRef = (0, import_react33.useRef)(null);
  let reducerBag = (0, import_react33.useReducer)(stateReducer3, {
    disclosureState: defaultOpen ? 0 /* Open */ : 1 /* Closed */,
    linkedPanel: false,
    buttonRef,
    panelRef,
    buttonId: null,
    panelId: null
  });
  let [{ disclosureState, buttonId }, dispatch] = reducerBag;
  let close = useEvent((focusableElement) => {
    dispatch({ type: 1 /* CloseDisclosure */ });
    let ownerDocument = getOwnerDocument(internalDisclosureRef);
    if (!ownerDocument)
      return;
    if (!buttonId)
      return;
    let restoreElement = (() => {
      if (!focusableElement)
        return ownerDocument.getElementById(buttonId);
      if (focusableElement instanceof HTMLElement)
        return focusableElement;
      if (focusableElement.current instanceof HTMLElement)
        return focusableElement.current;
      return ownerDocument.getElementById(buttonId);
    })();
    restoreElement == null ? void 0 : restoreElement.focus();
  });
  let api = (0, import_react33.useMemo)(() => ({ close }), [close]);
  let slot = (0, import_react33.useMemo)(
    () => ({ open: disclosureState === 0 /* Open */, close }),
    [disclosureState, close]
  );
  let ourProps = {
    ref: disclosureRef
  };
  return /* @__PURE__ */ import_react33.default.createElement(DisclosureContext.Provider, { value: reducerBag }, /* @__PURE__ */ import_react33.default.createElement(DisclosureAPIContext.Provider, { value: api }, /* @__PURE__ */ import_react33.default.createElement(
    OpenClosedProvider,
    {
      value: match(disclosureState, {
        [0 /* Open */]: 1 /* Open */,
        [1 /* Closed */]: 2 /* Closed */
      })
    },
    render({
      ourProps,
      theirProps,
      slot,
      defaultTag: DEFAULT_DISCLOSURE_TAG,
      name: "Disclosure"
    })
  )));
}
var DEFAULT_BUTTON_TAG2 = "button";
function ButtonFn2(props, ref) {
  let internalId = useId();
  let { id = `headlessui-disclosure-button-${internalId}`, ...theirProps } = props;
  let [state, dispatch] = useDisclosureContext("Disclosure.Button");
  let panelContext = useDisclosurePanelContext();
  let isWithinPanel = panelContext === null ? false : panelContext === state.panelId;
  let internalButtonRef = (0, import_react33.useRef)(null);
  let buttonRef = useSyncRefs(internalButtonRef, ref, !isWithinPanel ? state.buttonRef : null);
  (0, import_react33.useEffect)(() => {
    if (isWithinPanel)
      return;
    dispatch({ type: 2 /* SetButtonId */, buttonId: id });
    return () => {
      dispatch({ type: 2 /* SetButtonId */, buttonId: null });
    };
  }, [id, dispatch, isWithinPanel]);
  let handleKeyDown = useEvent((event) => {
    var _a3;
    if (isWithinPanel) {
      if (state.disclosureState === 1 /* Closed */)
        return;
      switch (event.key) {
        case " " /* Space */:
        case "Enter" /* Enter */:
          event.preventDefault();
          event.stopPropagation();
          dispatch({ type: 0 /* ToggleDisclosure */ });
          (_a3 = state.buttonRef.current) == null ? void 0 : _a3.focus();
          break;
      }
    } else {
      switch (event.key) {
        case " " /* Space */:
        case "Enter" /* Enter */:
          event.preventDefault();
          event.stopPropagation();
          dispatch({ type: 0 /* ToggleDisclosure */ });
          break;
      }
    }
  });
  let handleKeyUp = useEvent((event) => {
    switch (event.key) {
      case " " /* Space */:
        event.preventDefault();
        break;
    }
  });
  let handleClick = useEvent((event) => {
    var _a3;
    if (isDisabledReactIssue7711(event.currentTarget))
      return;
    if (props.disabled)
      return;
    if (isWithinPanel) {
      dispatch({ type: 0 /* ToggleDisclosure */ });
      (_a3 = state.buttonRef.current) == null ? void 0 : _a3.focus();
    } else {
      dispatch({ type: 0 /* ToggleDisclosure */ });
    }
  });
  let slot = (0, import_react33.useMemo)(
    () => ({ open: state.disclosureState === 0 /* Open */ }),
    [state]
  );
  let type = useResolveButtonType(props, internalButtonRef);
  let ourProps = isWithinPanel ? { ref: buttonRef, type, onKeyDown: handleKeyDown, onClick: handleClick } : {
    ref: buttonRef,
    id,
    type,
    "aria-expanded": props.disabled ? void 0 : state.disclosureState === 0 /* Open */,
    "aria-controls": state.linkedPanel ? state.panelId : void 0,
    onKeyDown: handleKeyDown,
    onKeyUp: handleKeyUp,
    onClick: handleClick
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_BUTTON_TAG2,
    name: "Disclosure.Button"
  });
}
var DEFAULT_PANEL_TAG2 = "div";
var PanelRenderFeatures = 1 /* RenderStrategy */ | 2 /* Static */;
function PanelFn2(props, ref) {
  let internalId = useId();
  let { id = `headlessui-disclosure-panel-${internalId}`, ...theirProps } = props;
  let [state, dispatch] = useDisclosureContext("Disclosure.Panel");
  let { close } = useDisclosureAPIContext("Disclosure.Panel");
  let panelRef = useSyncRefs(ref, state.panelRef, (el) => {
    startTransition(() => dispatch({ type: el ? 4 /* LinkPanel */ : 5 /* UnlinkPanel */ }));
  });
  (0, import_react33.useEffect)(() => {
    dispatch({ type: 3 /* SetPanelId */, panelId: id });
    return () => {
      dispatch({ type: 3 /* SetPanelId */, panelId: null });
    };
  }, [id, dispatch]);
  let usesOpenClosedState = useOpenClosed();
  let visible = (() => {
    if (usesOpenClosedState !== null) {
      return (usesOpenClosedState & 1 /* Open */) === 1 /* Open */;
    }
    return state.disclosureState === 0 /* Open */;
  })();
  let slot = (0, import_react33.useMemo)(
    () => ({ open: state.disclosureState === 0 /* Open */, close }),
    [state, close]
  );
  let ourProps = {
    ref: panelRef,
    id
  };
  return /* @__PURE__ */ import_react33.default.createElement(DisclosurePanelContext.Provider, { value: state.panelId }, render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_PANEL_TAG2,
    features: PanelRenderFeatures,
    visible,
    name: "Disclosure.Panel"
  }));
}
var DisclosureRoot = forwardRefWithAs(DisclosureFn);
var Button2 = forwardRefWithAs(ButtonFn2);
var Panel2 = forwardRefWithAs(PanelFn2);
var Disclosure = Object.assign(DisclosureRoot, { Button: Button2, Panel: Panel2 });

// src/components/listbox/listbox.tsx
var import_react35 = __toESM(__webpack_require__(/*! react */ "react"), 1);

// src/hooks/use-text-value.ts
var import_react34 = __webpack_require__(/*! react */ "react");

// src/utils/get-text-value.ts
var emojiRegex = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
function getTextContents(element) {
  var _a3, _b;
  let currentInnerText = (_a3 = element.innerText) != null ? _a3 : "";
  let copy = element.cloneNode(true);
  if (!(copy instanceof HTMLElement)) {
    return currentInnerText;
  }
  let dropped = false;
  for (let child of copy.querySelectorAll('[hidden],[aria-hidden],[role="img"]')) {
    child.remove();
    dropped = true;
  }
  let value = dropped ? (_b = copy.innerText) != null ? _b : "" : currentInnerText;
  if (emojiRegex.test(value)) {
    value = value.replace(emojiRegex, "");
  }
  return value;
}
function getTextValue(element) {
  let label = element.getAttribute("aria-label");
  if (typeof label === "string")
    return label.trim();
  let labelledby = element.getAttribute("aria-labelledby");
  if (labelledby) {
    let labels = labelledby.split(" ").map((labelledby2) => {
      let labelEl = document.getElementById(labelledby2);
      if (labelEl) {
        let label2 = labelEl.getAttribute("aria-label");
        if (typeof label2 === "string")
          return label2.trim();
        return getTextContents(labelEl).trim();
      }
      return null;
    }).filter(Boolean);
    if (labels.length > 0)
      return labels.join(", ");
  }
  return getTextContents(element).trim();
}

// src/hooks/use-text-value.ts
function useTextValue(element) {
  let cacheKey = (0, import_react34.useRef)("");
  let cacheValue = (0, import_react34.useRef)("");
  return useEvent(() => {
    let el = element.current;
    if (!el)
      return "";
    let currentKey = el.innerText;
    if (cacheKey.current === currentKey) {
      return cacheValue.current;
    }
    let value = getTextValue(el).trim().toLowerCase();
    cacheKey.current = currentKey;
    cacheValue.current = value;
    return value;
  });
}

// src/components/listbox/listbox.tsx
function adjustOrderedState2(state, adjustment = (i) => i) {
  let currentActiveOption = state.activeOptionIndex !== null ? state.options[state.activeOptionIndex] : null;
  let sortedOptions = sortByDomNode(
    adjustment(state.options.slice()),
    (option) => option.dataRef.current.domRef.current
  );
  let adjustedActiveOptionIndex = currentActiveOption ? sortedOptions.indexOf(currentActiveOption) : null;
  if (adjustedActiveOptionIndex === -1) {
    adjustedActiveOptionIndex = null;
  }
  return {
    options: sortedOptions,
    activeOptionIndex: adjustedActiveOptionIndex
  };
}
var reducers4 = {
  [1 /* CloseListbox */](state) {
    if (state.dataRef.current.disabled)
      return state;
    if (state.listboxState === 1 /* Closed */)
      return state;
    return { ...state, activeOptionIndex: null, listboxState: 1 /* Closed */ };
  },
  [0 /* OpenListbox */](state) {
    if (state.dataRef.current.disabled)
      return state;
    if (state.listboxState === 0 /* Open */)
      return state;
    let activeOptionIndex = state.activeOptionIndex;
    let { isSelected } = state.dataRef.current;
    let optionIdx = state.options.findIndex((option) => isSelected(option.dataRef.current.value));
    if (optionIdx !== -1) {
      activeOptionIndex = optionIdx;
    }
    return { ...state, listboxState: 0 /* Open */, activeOptionIndex };
  },
  [2 /* GoToOption */](state, action) {
    var _a3;
    if (state.dataRef.current.disabled)
      return state;
    if (state.listboxState === 1 /* Closed */)
      return state;
    let adjustedState = adjustOrderedState2(state);
    let activeOptionIndex = calculateActiveIndex(action, {
      resolveItems: () => adjustedState.options,
      resolveActiveIndex: () => adjustedState.activeOptionIndex,
      resolveId: (option) => option.id,
      resolveDisabled: (option) => option.dataRef.current.disabled
    });
    return {
      ...state,
      ...adjustedState,
      searchQuery: "",
      activeOptionIndex,
      activationTrigger: (_a3 = action.trigger) != null ? _a3 : 1 /* Other */
    };
  },
  [3 /* Search */]: (state, action) => {
    if (state.dataRef.current.disabled)
      return state;
    if (state.listboxState === 1 /* Closed */)
      return state;
    let wasAlreadySearching = state.searchQuery !== "";
    let offset = wasAlreadySearching ? 0 : 1;
    let searchQuery = state.searchQuery + action.value.toLowerCase();
    let reOrderedOptions = state.activeOptionIndex !== null ? state.options.slice(state.activeOptionIndex + offset).concat(state.options.slice(0, state.activeOptionIndex + offset)) : state.options;
    let matchingOption = reOrderedOptions.find(
      (option) => {
        var _a3;
        return !option.dataRef.current.disabled && ((_a3 = option.dataRef.current.textValue) == null ? void 0 : _a3.startsWith(searchQuery));
      }
    );
    let matchIdx = matchingOption ? state.options.indexOf(matchingOption) : -1;
    if (matchIdx === -1 || matchIdx === state.activeOptionIndex)
      return { ...state, searchQuery };
    return {
      ...state,
      searchQuery,
      activeOptionIndex: matchIdx,
      activationTrigger: 1 /* Other */
    };
  },
  [4 /* ClearSearch */](state) {
    if (state.dataRef.current.disabled)
      return state;
    if (state.listboxState === 1 /* Closed */)
      return state;
    if (state.searchQuery === "")
      return state;
    return { ...state, searchQuery: "" };
  },
  [5 /* RegisterOption */]: (state, action) => {
    let option = { id: action.id, dataRef: action.dataRef };
    let adjustedState = adjustOrderedState2(state, (options) => [...options, option]);
    if (state.activeOptionIndex === null) {
      if (state.dataRef.current.isSelected(action.dataRef.current.value)) {
        adjustedState.activeOptionIndex = adjustedState.options.indexOf(option);
      }
    }
    return { ...state, ...adjustedState };
  },
  [6 /* UnregisterOption */]: (state, action) => {
    let adjustedState = adjustOrderedState2(state, (options) => {
      let idx = options.findIndex((a) => a.id === action.id);
      if (idx !== -1)
        options.splice(idx, 1);
      return options;
    });
    return {
      ...state,
      ...adjustedState,
      activationTrigger: 1 /* Other */
    };
  },
  [7 /* RegisterLabel */]: (state, action) => {
    return {
      ...state,
      labelId: action.id
    };
  }
};
var ListboxActionsContext = (0, import_react35.createContext)(null);
ListboxActionsContext.displayName = "ListboxActionsContext";
function useActions2(component) {
  let context = (0, import_react35.useContext)(ListboxActionsContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <Listbox /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useActions2);
    throw err;
  }
  return context;
}
var ListboxDataContext = (0, import_react35.createContext)(null);
ListboxDataContext.displayName = "ListboxDataContext";
function useData2(component) {
  let context = (0, import_react35.useContext)(ListboxDataContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <Listbox /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useData2);
    throw err;
  }
  return context;
}
function stateReducer4(state, action) {
  return match(action.type, reducers4, state, action);
}
var DEFAULT_LISTBOX_TAG = import_react35.Fragment;
function ListboxFn(props, ref) {
  let {
    value: controlledValue,
    defaultValue,
    form: formName,
    name,
    onChange: controlledOnChange,
    by = (a, z) => a === z,
    disabled = false,
    horizontal = false,
    multiple = false,
    ...theirProps
  } = props;
  const orientation = horizontal ? "horizontal" : "vertical";
  let listboxRef = useSyncRefs(ref);
  let [value = multiple ? [] : void 0, theirOnChange] = useControllable(
    controlledValue,
    controlledOnChange,
    defaultValue
  );
  let [state, dispatch] = (0, import_react35.useReducer)(stateReducer4, {
    dataRef: (0, import_react35.createRef)(),
    listboxState: 1 /* Closed */,
    options: [],
    searchQuery: "",
    labelId: null,
    activeOptionIndex: null,
    activationTrigger: 1 /* Other */
  });
  let optionsPropsRef = (0, import_react35.useRef)({ static: false, hold: false });
  let labelRef = (0, import_react35.useRef)(null);
  let buttonRef = (0, import_react35.useRef)(null);
  let optionsRef = (0, import_react35.useRef)(null);
  let compare = useEvent(
    typeof by === "string" ? (a, z) => {
      let property = by;
      return (a == null ? void 0 : a[property]) === (z == null ? void 0 : z[property]);
    } : by
  );
  let isSelected = (0, import_react35.useCallback)(
    (compareValue) => match(data.mode, {
      [1 /* Multi */]: () => value.some((option) => compare(option, compareValue)),
      [0 /* Single */]: () => compare(value, compareValue)
    }),
    [value]
  );
  let data = (0, import_react35.useMemo)(
    () => ({
      ...state,
      value,
      disabled,
      mode: multiple ? 1 /* Multi */ : 0 /* Single */,
      orientation,
      compare,
      isSelected,
      optionsPropsRef,
      labelRef,
      buttonRef,
      optionsRef
    }),
    [value, disabled, multiple, state]
  );
  useIsoMorphicEffect(() => {
    state.dataRef.current = data;
  }, [data]);
  useOutsideClick(
    [data.buttonRef, data.optionsRef],
    (event, target) => {
      var _a3;
      dispatch({ type: 1 /* CloseListbox */ });
      if (!isFocusableElement(target, 1 /* Loose */)) {
        event.preventDefault();
        (_a3 = data.buttonRef.current) == null ? void 0 : _a3.focus();
      }
    },
    data.listboxState === 0 /* Open */
  );
  let slot = (0, import_react35.useMemo)(
    () => ({ open: data.listboxState === 0 /* Open */, disabled, value }),
    [data, disabled, value]
  );
  let selectOption = useEvent((id) => {
    let option = data.options.find((item) => item.id === id);
    if (!option)
      return;
    onChange(option.dataRef.current.value);
  });
  let selectActiveOption = useEvent(() => {
    if (data.activeOptionIndex !== null) {
      let { dataRef, id } = data.options[data.activeOptionIndex];
      onChange(dataRef.current.value);
      dispatch({ type: 2 /* GoToOption */, focus: 4 /* Specific */, id });
    }
  });
  let openListbox = useEvent(() => dispatch({ type: 0 /* OpenListbox */ }));
  let closeListbox = useEvent(() => dispatch({ type: 1 /* CloseListbox */ }));
  let goToOption = useEvent((focus, id, trigger) => {
    if (focus === 4 /* Specific */) {
      return dispatch({ type: 2 /* GoToOption */, focus: 4 /* Specific */, id, trigger });
    }
    return dispatch({ type: 2 /* GoToOption */, focus, trigger });
  });
  let registerOption = useEvent((id, dataRef) => {
    dispatch({ type: 5 /* RegisterOption */, id, dataRef });
    return () => dispatch({ type: 6 /* UnregisterOption */, id });
  });
  let registerLabel = useEvent((id) => {
    dispatch({ type: 7 /* RegisterLabel */, id });
    return () => dispatch({ type: 7 /* RegisterLabel */, id: null });
  });
  let onChange = useEvent((value2) => {
    return match(data.mode, {
      [0 /* Single */]() {
        return theirOnChange == null ? void 0 : theirOnChange(value2);
      },
      [1 /* Multi */]() {
        let copy = data.value.slice();
        let idx = copy.findIndex((item) => compare(item, value2));
        if (idx === -1) {
          copy.push(value2);
        } else {
          copy.splice(idx, 1);
        }
        return theirOnChange == null ? void 0 : theirOnChange(copy);
      }
    });
  });
  let search = useEvent((value2) => dispatch({ type: 3 /* Search */, value: value2 }));
  let clearSearch = useEvent(() => dispatch({ type: 4 /* ClearSearch */ }));
  let actions = (0, import_react35.useMemo)(
    () => ({
      onChange,
      registerOption,
      registerLabel,
      goToOption,
      closeListbox,
      openListbox,
      selectActiveOption,
      selectOption,
      search,
      clearSearch
    }),
    []
  );
  let ourProps = { ref: listboxRef };
  let form = (0, import_react35.useRef)(null);
  let d = useDisposables();
  (0, import_react35.useEffect)(() => {
    if (!form.current)
      return;
    if (defaultValue === void 0)
      return;
    d.addEventListener(form.current, "reset", () => {
      onChange(defaultValue);
    });
  }, [
    form,
    onChange
    /* Explicitly ignoring `defaultValue` */
  ]);
  return /* @__PURE__ */ import_react35.default.createElement(ListboxActionsContext.Provider, { value: actions }, /* @__PURE__ */ import_react35.default.createElement(ListboxDataContext.Provider, { value: data }, /* @__PURE__ */ import_react35.default.createElement(
    OpenClosedProvider,
    {
      value: match(data.listboxState, {
        [0 /* Open */]: 1 /* Open */,
        [1 /* Closed */]: 2 /* Closed */
      })
    },
    name != null && value != null && objectToFormEntries({ [name]: value }).map(([name2, value2], idx) => /* @__PURE__ */ import_react35.default.createElement(
      Hidden,
      {
        features: 4 /* Hidden */,
        ref: idx === 0 ? (element) => {
          var _a3;
          form.current = (_a3 = element == null ? void 0 : element.closest("form")) != null ? _a3 : null;
        } : void 0,
        ...compact({
          key: name2,
          as: "input",
          type: "hidden",
          hidden: true,
          readOnly: true,
          form: formName,
          name: name2,
          value: value2
        })
      }
    )),
    render({ ourProps, theirProps, slot, defaultTag: DEFAULT_LISTBOX_TAG, name: "Listbox" })
  )));
}
var DEFAULT_BUTTON_TAG3 = "button";
function ButtonFn3(props, ref) {
  var _a3;
  let internalId = useId();
  let { id = `headlessui-listbox-button-${internalId}`, ...theirProps } = props;
  let data = useData2("Listbox.Button");
  let actions = useActions2("Listbox.Button");
  let buttonRef = useSyncRefs(data.buttonRef, ref);
  let d = useDisposables();
  let handleKeyDown = useEvent((event) => {
    switch (event.key) {
      case " " /* Space */:
      case "Enter" /* Enter */:
      case "ArrowDown" /* ArrowDown */:
        event.preventDefault();
        actions.openListbox();
        d.nextFrame(() => {
          if (!data.value)
            actions.goToOption(0 /* First */);
        });
        break;
      case "ArrowUp" /* ArrowUp */:
        event.preventDefault();
        actions.openListbox();
        d.nextFrame(() => {
          if (!data.value)
            actions.goToOption(3 /* Last */);
        });
        break;
    }
  });
  let handleKeyUp = useEvent((event) => {
    switch (event.key) {
      case " " /* Space */:
        event.preventDefault();
        break;
    }
  });
  let handleClick = useEvent((event) => {
    if (isDisabledReactIssue7711(event.currentTarget))
      return event.preventDefault();
    if (data.listboxState === 0 /* Open */) {
      actions.closeListbox();
      d.nextFrame(() => {
        var _a4;
        return (_a4 = data.buttonRef.current) == null ? void 0 : _a4.focus({ preventScroll: true });
      });
    } else {
      event.preventDefault();
      actions.openListbox();
    }
  });
  let labelledby = useComputed(() => {
    if (!data.labelId)
      return void 0;
    return [data.labelId, id].join(" ");
  }, [data.labelId, id]);
  let slot = (0, import_react35.useMemo)(
    () => ({
      open: data.listboxState === 0 /* Open */,
      disabled: data.disabled,
      value: data.value
    }),
    [data]
  );
  let ourProps = {
    ref: buttonRef,
    id,
    type: useResolveButtonType(props, data.buttonRef),
    "aria-haspopup": "listbox",
    "aria-controls": (_a3 = data.optionsRef.current) == null ? void 0 : _a3.id,
    "aria-expanded": data.disabled ? void 0 : data.listboxState === 0 /* Open */,
    "aria-labelledby": labelledby,
    disabled: data.disabled,
    onKeyDown: handleKeyDown,
    onKeyUp: handleKeyUp,
    onClick: handleClick
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_BUTTON_TAG3,
    name: "Listbox.Button"
  });
}
var DEFAULT_LABEL_TAG2 = "label";
function LabelFn2(props, ref) {
  let internalId = useId();
  let { id = `headlessui-listbox-label-${internalId}`, ...theirProps } = props;
  let data = useData2("Listbox.Label");
  let actions = useActions2("Listbox.Label");
  let labelRef = useSyncRefs(data.labelRef, ref);
  useIsoMorphicEffect(() => actions.registerLabel(id), [id]);
  let handleClick = useEvent(() => {
    var _a3;
    return (_a3 = data.buttonRef.current) == null ? void 0 : _a3.focus({ preventScroll: true });
  });
  let slot = (0, import_react35.useMemo)(
    () => ({ open: data.listboxState === 0 /* Open */, disabled: data.disabled }),
    [data]
  );
  let ourProps = { ref: labelRef, id, onClick: handleClick };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_LABEL_TAG2,
    name: "Listbox.Label"
  });
}
var DEFAULT_OPTIONS_TAG2 = "ul";
var OptionsRenderFeatures2 = 1 /* RenderStrategy */ | 2 /* Static */;
function OptionsFn2(props, ref) {
  var _a3;
  let internalId = useId();
  let { id = `headlessui-listbox-options-${internalId}`, ...theirProps } = props;
  let data = useData2("Listbox.Options");
  let actions = useActions2("Listbox.Options");
  let optionsRef = useSyncRefs(data.optionsRef, ref);
  let d = useDisposables();
  let searchDisposables = useDisposables();
  let usesOpenClosedState = useOpenClosed();
  let visible = (() => {
    if (usesOpenClosedState !== null) {
      return (usesOpenClosedState & 1 /* Open */) === 1 /* Open */;
    }
    return data.listboxState === 0 /* Open */;
  })();
  (0, import_react35.useEffect)(() => {
    var _a4;
    let container = data.optionsRef.current;
    if (!container)
      return;
    if (data.listboxState !== 0 /* Open */)
      return;
    if (container === ((_a4 = getOwnerDocument(container)) == null ? void 0 : _a4.activeElement))
      return;
    container.focus({ preventScroll: true });
  }, [data.listboxState, data.optionsRef]);
  let handleKeyDown = useEvent((event) => {
    searchDisposables.dispose();
    switch (event.key) {
      case " " /* Space */:
        if (data.searchQuery !== "") {
          event.preventDefault();
          event.stopPropagation();
          return actions.search(event.key);
        }
      case "Enter" /* Enter */:
        event.preventDefault();
        event.stopPropagation();
        if (data.activeOptionIndex !== null) {
          let { dataRef } = data.options[data.activeOptionIndex];
          actions.onChange(dataRef.current.value);
        }
        if (data.mode === 0 /* Single */) {
          actions.closeListbox();
          disposables().nextFrame(() => {
            var _a4;
            return (_a4 = data.buttonRef.current) == null ? void 0 : _a4.focus({ preventScroll: true });
          });
        }
        break;
      case match(data.orientation, { vertical: "ArrowDown" /* ArrowDown */, horizontal: "ArrowRight" /* ArrowRight */ }):
        event.preventDefault();
        event.stopPropagation();
        return actions.goToOption(2 /* Next */);
      case match(data.orientation, { vertical: "ArrowUp" /* ArrowUp */, horizontal: "ArrowLeft" /* ArrowLeft */ }):
        event.preventDefault();
        event.stopPropagation();
        return actions.goToOption(1 /* Previous */);
      case "Home" /* Home */:
      case "PageUp" /* PageUp */:
        event.preventDefault();
        event.stopPropagation();
        return actions.goToOption(0 /* First */);
      case "End" /* End */:
      case "PageDown" /* PageDown */:
        event.preventDefault();
        event.stopPropagation();
        return actions.goToOption(3 /* Last */);
      case "Escape" /* Escape */:
        event.preventDefault();
        event.stopPropagation();
        actions.closeListbox();
        return d.nextFrame(() => {
          var _a4;
          return (_a4 = data.buttonRef.current) == null ? void 0 : _a4.focus({ preventScroll: true });
        });
      case "Tab" /* Tab */:
        event.preventDefault();
        event.stopPropagation();
        break;
      default:
        if (event.key.length === 1) {
          actions.search(event.key);
          searchDisposables.setTimeout(() => actions.clearSearch(), 350);
        }
        break;
    }
  });
  let labelledby = useComputed(
    () => {
      var _a4, _b, _c;
      return (_c = (_a4 = data.labelRef.current) == null ? void 0 : _a4.id) != null ? _c : (_b = data.buttonRef.current) == null ? void 0 : _b.id;
    },
    [data.labelRef.current, data.buttonRef.current]
  );
  let slot = (0, import_react35.useMemo)(
    () => ({ open: data.listboxState === 0 /* Open */ }),
    [data]
  );
  let ourProps = {
    "aria-activedescendant": data.activeOptionIndex === null ? void 0 : (_a3 = data.options[data.activeOptionIndex]) == null ? void 0 : _a3.id,
    "aria-multiselectable": data.mode === 1 /* Multi */ ? true : void 0,
    "aria-labelledby": labelledby,
    "aria-orientation": data.orientation,
    id,
    onKeyDown: handleKeyDown,
    role: "listbox",
    tabIndex: 0,
    ref: optionsRef
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_OPTIONS_TAG2,
    features: OptionsRenderFeatures2,
    visible,
    name: "Listbox.Options"
  });
}
var DEFAULT_OPTION_TAG2 = "li";
function OptionFn2(props, ref) {
  let internalId = useId();
  let {
    id = `headlessui-listbox-option-${internalId}`,
    disabled = false,
    value,
    ...theirProps
  } = props;
  let data = useData2("Listbox.Option");
  let actions = useActions2("Listbox.Option");
  let active = data.activeOptionIndex !== null ? data.options[data.activeOptionIndex].id === id : false;
  let selected = data.isSelected(value);
  let internalOptionRef = (0, import_react35.useRef)(null);
  let getTextValue2 = useTextValue(internalOptionRef);
  let bag = useLatestValue({
    disabled,
    value,
    domRef: internalOptionRef,
    get textValue() {
      return getTextValue2();
    }
  });
  let optionRef = useSyncRefs(ref, internalOptionRef);
  useIsoMorphicEffect(() => {
    if (data.listboxState !== 0 /* Open */)
      return;
    if (!active)
      return;
    if (data.activationTrigger === 0 /* Pointer */)
      return;
    let d = disposables();
    d.requestAnimationFrame(() => {
      var _a3, _b;
      (_b = (_a3 = internalOptionRef.current) == null ? void 0 : _a3.scrollIntoView) == null ? void 0 : _b.call(_a3, { block: "nearest" });
    });
    return d.dispose;
  }, [
    internalOptionRef,
    active,
    data.listboxState,
    data.activationTrigger,
    /* We also want to trigger this when the position of the active item changes so that we can re-trigger the scrollIntoView */
    data.activeOptionIndex
  ]);
  useIsoMorphicEffect(() => actions.registerOption(id, bag), [bag, id]);
  let handleClick = useEvent((event) => {
    if (disabled)
      return event.preventDefault();
    actions.onChange(value);
    if (data.mode === 0 /* Single */) {
      actions.closeListbox();
      disposables().nextFrame(() => {
        var _a3;
        return (_a3 = data.buttonRef.current) == null ? void 0 : _a3.focus({ preventScroll: true });
      });
    }
  });
  let handleFocus = useEvent(() => {
    if (disabled)
      return actions.goToOption(5 /* Nothing */);
    actions.goToOption(4 /* Specific */, id);
  });
  let pointer = useTrackedPointer();
  let handleEnter = useEvent((evt) => pointer.update(evt));
  let handleMove = useEvent((evt) => {
    if (!pointer.wasMoved(evt))
      return;
    if (disabled)
      return;
    if (active)
      return;
    actions.goToOption(4 /* Specific */, id, 0 /* Pointer */);
  });
  let handleLeave = useEvent((evt) => {
    if (!pointer.wasMoved(evt))
      return;
    if (disabled)
      return;
    if (!active)
      return;
    actions.goToOption(5 /* Nothing */);
  });
  let slot = (0, import_react35.useMemo)(
    () => ({ active, selected, disabled }),
    [active, selected, disabled]
  );
  let ourProps = {
    id,
    ref: optionRef,
    role: "option",
    tabIndex: disabled === true ? void 0 : -1,
    "aria-disabled": disabled === true ? true : void 0,
    // According to the WAI-ARIA best practices, we should use aria-checked for
    // multi-select,but Voice-Over disagrees. So we use aria-checked instead for
    // both single and multi-select.
    "aria-selected": selected,
    disabled: void 0,
    // Never forward the `disabled` prop
    onClick: handleClick,
    onFocus: handleFocus,
    onPointerEnter: handleEnter,
    onMouseEnter: handleEnter,
    onPointerMove: handleMove,
    onMouseMove: handleMove,
    onPointerLeave: handleLeave,
    onMouseLeave: handleLeave
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_OPTION_TAG2,
    name: "Listbox.Option"
  });
}
var ListboxRoot = forwardRefWithAs(ListboxFn);
var Button3 = forwardRefWithAs(ButtonFn3);
var Label2 = forwardRefWithAs(LabelFn2);
var Options2 = forwardRefWithAs(OptionsFn2);
var Option2 = forwardRefWithAs(OptionFn2);
var Listbox = Object.assign(ListboxRoot, { Button: Button3, Label: Label2, Options: Options2, Option: Option2 });

// src/components/menu/menu.tsx
var import_react36 = __toESM(__webpack_require__(/*! react */ "react"), 1);
function adjustOrderedState3(state, adjustment = (i) => i) {
  let currentActiveItem = state.activeItemIndex !== null ? state.items[state.activeItemIndex] : null;
  let sortedItems = sortByDomNode(
    adjustment(state.items.slice()),
    (item) => item.dataRef.current.domRef.current
  );
  let adjustedActiveItemIndex = currentActiveItem ? sortedItems.indexOf(currentActiveItem) : null;
  if (adjustedActiveItemIndex === -1) {
    adjustedActiveItemIndex = null;
  }
  return {
    items: sortedItems,
    activeItemIndex: adjustedActiveItemIndex
  };
}
var reducers5 = {
  [1 /* CloseMenu */](state) {
    if (state.menuState === 1 /* Closed */)
      return state;
    return { ...state, activeItemIndex: null, menuState: 1 /* Closed */ };
  },
  [0 /* OpenMenu */](state) {
    if (state.menuState === 0 /* Open */)
      return state;
    return {
      ...state,
      /* We can turn off demo mode once we re-open the `Menu` */
      __demoMode: false,
      menuState: 0 /* Open */
    };
  },
  [2 /* GoToItem */]: (state, action) => {
    var _a3;
    let adjustedState = adjustOrderedState3(state);
    let activeItemIndex = calculateActiveIndex(action, {
      resolveItems: () => adjustedState.items,
      resolveActiveIndex: () => adjustedState.activeItemIndex,
      resolveId: (item) => item.id,
      resolveDisabled: (item) => item.dataRef.current.disabled
    });
    return {
      ...state,
      ...adjustedState,
      searchQuery: "",
      activeItemIndex,
      activationTrigger: (_a3 = action.trigger) != null ? _a3 : 1 /* Other */
    };
  },
  [3 /* Search */]: (state, action) => {
    let wasAlreadySearching = state.searchQuery !== "";
    let offset = wasAlreadySearching ? 0 : 1;
    let searchQuery = state.searchQuery + action.value.toLowerCase();
    let reOrderedItems = state.activeItemIndex !== null ? state.items.slice(state.activeItemIndex + offset).concat(state.items.slice(0, state.activeItemIndex + offset)) : state.items;
    let matchingItem = reOrderedItems.find(
      (item) => {
        var _a3;
        return ((_a3 = item.dataRef.current.textValue) == null ? void 0 : _a3.startsWith(searchQuery)) && !item.dataRef.current.disabled;
      }
    );
    let matchIdx = matchingItem ? state.items.indexOf(matchingItem) : -1;
    if (matchIdx === -1 || matchIdx === state.activeItemIndex)
      return { ...state, searchQuery };
    return {
      ...state,
      searchQuery,
      activeItemIndex: matchIdx,
      activationTrigger: 1 /* Other */
    };
  },
  [4 /* ClearSearch */](state) {
    if (state.searchQuery === "")
      return state;
    return { ...state, searchQuery: "", searchActiveItemIndex: null };
  },
  [5 /* RegisterItem */]: (state, action) => {
    let adjustedState = adjustOrderedState3(state, (items) => [
      ...items,
      { id: action.id, dataRef: action.dataRef }
    ]);
    return { ...state, ...adjustedState };
  },
  [6 /* UnregisterItem */]: (state, action) => {
    let adjustedState = adjustOrderedState3(state, (items) => {
      let idx = items.findIndex((a) => a.id === action.id);
      if (idx !== -1)
        items.splice(idx, 1);
      return items;
    });
    return {
      ...state,
      ...adjustedState,
      activationTrigger: 1 /* Other */
    };
  }
};
var MenuContext = (0, import_react36.createContext)(null);
MenuContext.displayName = "MenuContext";
function useMenuContext(component) {
  let context = (0, import_react36.useContext)(MenuContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <Menu /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useMenuContext);
    throw err;
  }
  return context;
}
function stateReducer5(state, action) {
  return match(action.type, reducers5, state, action);
}
var DEFAULT_MENU_TAG = import_react36.Fragment;
function MenuFn(props, ref) {
  let { __demoMode = false, ...theirProps } = props;
  let reducerBag = (0, import_react36.useReducer)(stateReducer5, {
    __demoMode,
    menuState: __demoMode ? 0 /* Open */ : 1 /* Closed */,
    buttonRef: (0, import_react36.createRef)(),
    itemsRef: (0, import_react36.createRef)(),
    items: [],
    searchQuery: "",
    activeItemIndex: null,
    activationTrigger: 1 /* Other */
  });
  let [{ menuState, itemsRef, buttonRef }, dispatch] = reducerBag;
  let menuRef = useSyncRefs(ref);
  useOutsideClick(
    [buttonRef, itemsRef],
    (event, target) => {
      var _a3;
      dispatch({ type: 1 /* CloseMenu */ });
      if (!isFocusableElement(target, 1 /* Loose */)) {
        event.preventDefault();
        (_a3 = buttonRef.current) == null ? void 0 : _a3.focus();
      }
    },
    menuState === 0 /* Open */
  );
  let close = useEvent(() => {
    dispatch({ type: 1 /* CloseMenu */ });
  });
  let slot = (0, import_react36.useMemo)(
    () => ({ open: menuState === 0 /* Open */, close }),
    [menuState, close]
  );
  let ourProps = { ref: menuRef };
  return /* @__PURE__ */ import_react36.default.createElement(MenuContext.Provider, { value: reducerBag }, /* @__PURE__ */ import_react36.default.createElement(
    OpenClosedProvider,
    {
      value: match(menuState, {
        [0 /* Open */]: 1 /* Open */,
        [1 /* Closed */]: 2 /* Closed */
      })
    },
    render({
      ourProps,
      theirProps,
      slot,
      defaultTag: DEFAULT_MENU_TAG,
      name: "Menu"
    })
  ));
}
var DEFAULT_BUTTON_TAG4 = "button";
function ButtonFn4(props, ref) {
  var _a3;
  let internalId = useId();
  let { id = `headlessui-menu-button-${internalId}`, ...theirProps } = props;
  let [state, dispatch] = useMenuContext("Menu.Button");
  let buttonRef = useSyncRefs(state.buttonRef, ref);
  let d = useDisposables();
  let handleKeyDown = useEvent((event) => {
    switch (event.key) {
      case " " /* Space */:
      case "Enter" /* Enter */:
      case "ArrowDown" /* ArrowDown */:
        event.preventDefault();
        event.stopPropagation();
        dispatch({ type: 0 /* OpenMenu */ });
        d.nextFrame(() => dispatch({ type: 2 /* GoToItem */, focus: 0 /* First */ }));
        break;
      case "ArrowUp" /* ArrowUp */:
        event.preventDefault();
        event.stopPropagation();
        dispatch({ type: 0 /* OpenMenu */ });
        d.nextFrame(() => dispatch({ type: 2 /* GoToItem */, focus: 3 /* Last */ }));
        break;
    }
  });
  let handleKeyUp = useEvent((event) => {
    switch (event.key) {
      case " " /* Space */:
        event.preventDefault();
        break;
    }
  });
  let handleClick = useEvent((event) => {
    if (isDisabledReactIssue7711(event.currentTarget))
      return event.preventDefault();
    if (props.disabled)
      return;
    if (state.menuState === 0 /* Open */) {
      dispatch({ type: 1 /* CloseMenu */ });
      d.nextFrame(() => {
        var _a4;
        return (_a4 = state.buttonRef.current) == null ? void 0 : _a4.focus({ preventScroll: true });
      });
    } else {
      event.preventDefault();
      dispatch({ type: 0 /* OpenMenu */ });
    }
  });
  let slot = (0, import_react36.useMemo)(
    () => ({ open: state.menuState === 0 /* Open */ }),
    [state]
  );
  let ourProps = {
    ref: buttonRef,
    id,
    type: useResolveButtonType(props, state.buttonRef),
    "aria-haspopup": "menu",
    "aria-controls": (_a3 = state.itemsRef.current) == null ? void 0 : _a3.id,
    "aria-expanded": props.disabled ? void 0 : state.menuState === 0 /* Open */,
    onKeyDown: handleKeyDown,
    onKeyUp: handleKeyUp,
    onClick: handleClick
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_BUTTON_TAG4,
    name: "Menu.Button"
  });
}
var DEFAULT_ITEMS_TAG = "div";
var ItemsRenderFeatures = 1 /* RenderStrategy */ | 2 /* Static */;
function ItemsFn(props, ref) {
  var _a3, _b;
  let internalId = useId();
  let { id = `headlessui-menu-items-${internalId}`, ...theirProps } = props;
  let [state, dispatch] = useMenuContext("Menu.Items");
  let itemsRef = useSyncRefs(state.itemsRef, ref);
  let ownerDocument = useOwnerDocument(state.itemsRef);
  let searchDisposables = useDisposables();
  let usesOpenClosedState = useOpenClosed();
  let visible = (() => {
    if (usesOpenClosedState !== null) {
      return (usesOpenClosedState & 1 /* Open */) === 1 /* Open */;
    }
    return state.menuState === 0 /* Open */;
  })();
  (0, import_react36.useEffect)(() => {
    let container = state.itemsRef.current;
    if (!container)
      return;
    if (state.menuState !== 0 /* Open */)
      return;
    if (container === (ownerDocument == null ? void 0 : ownerDocument.activeElement))
      return;
    container.focus({ preventScroll: true });
  }, [state.menuState, state.itemsRef, ownerDocument]);
  useTreeWalker({
    container: state.itemsRef.current,
    enabled: state.menuState === 0 /* Open */,
    accept(node) {
      if (node.getAttribute("role") === "menuitem")
        return NodeFilter.FILTER_REJECT;
      if (node.hasAttribute("role"))
        return NodeFilter.FILTER_SKIP;
      return NodeFilter.FILTER_ACCEPT;
    },
    walk(node) {
      node.setAttribute("role", "none");
    }
  });
  let handleKeyDown = useEvent((event) => {
    var _a4, _b2;
    searchDisposables.dispose();
    switch (event.key) {
      case " " /* Space */:
        if (state.searchQuery !== "") {
          event.preventDefault();
          event.stopPropagation();
          return dispatch({ type: 3 /* Search */, value: event.key });
        }
      case "Enter" /* Enter */:
        event.preventDefault();
        event.stopPropagation();
        dispatch({ type: 1 /* CloseMenu */ });
        if (state.activeItemIndex !== null) {
          let { dataRef } = state.items[state.activeItemIndex];
          (_b2 = (_a4 = dataRef.current) == null ? void 0 : _a4.domRef.current) == null ? void 0 : _b2.click();
        }
        restoreFocusIfNecessary(state.buttonRef.current);
        break;
      case "ArrowDown" /* ArrowDown */:
        event.preventDefault();
        event.stopPropagation();
        return dispatch({ type: 2 /* GoToItem */, focus: 2 /* Next */ });
      case "ArrowUp" /* ArrowUp */:
        event.preventDefault();
        event.stopPropagation();
        return dispatch({ type: 2 /* GoToItem */, focus: 1 /* Previous */ });
      case "Home" /* Home */:
      case "PageUp" /* PageUp */:
        event.preventDefault();
        event.stopPropagation();
        return dispatch({ type: 2 /* GoToItem */, focus: 0 /* First */ });
      case "End" /* End */:
      case "PageDown" /* PageDown */:
        event.preventDefault();
        event.stopPropagation();
        return dispatch({ type: 2 /* GoToItem */, focus: 3 /* Last */ });
      case "Escape" /* Escape */:
        event.preventDefault();
        event.stopPropagation();
        dispatch({ type: 1 /* CloseMenu */ });
        disposables().nextFrame(() => {
          var _a5;
          return (_a5 = state.buttonRef.current) == null ? void 0 : _a5.focus({ preventScroll: true });
        });
        break;
      case "Tab" /* Tab */:
        event.preventDefault();
        event.stopPropagation();
        dispatch({ type: 1 /* CloseMenu */ });
        disposables().nextFrame(() => {
          focusFrom(
            state.buttonRef.current,
            event.shiftKey ? 2 /* Previous */ : 4 /* Next */
          );
        });
        break;
      default:
        if (event.key.length === 1) {
          dispatch({ type: 3 /* Search */, value: event.key });
          searchDisposables.setTimeout(() => dispatch({ type: 4 /* ClearSearch */ }), 350);
        }
        break;
    }
  });
  let handleKeyUp = useEvent((event) => {
    switch (event.key) {
      case " " /* Space */:
        event.preventDefault();
        break;
    }
  });
  let slot = (0, import_react36.useMemo)(
    () => ({ open: state.menuState === 0 /* Open */ }),
    [state]
  );
  let ourProps = {
    "aria-activedescendant": state.activeItemIndex === null ? void 0 : (_a3 = state.items[state.activeItemIndex]) == null ? void 0 : _a3.id,
    "aria-labelledby": (_b = state.buttonRef.current) == null ? void 0 : _b.id,
    id,
    onKeyDown: handleKeyDown,
    onKeyUp: handleKeyUp,
    role: "menu",
    tabIndex: 0,
    ref: itemsRef
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_ITEMS_TAG,
    features: ItemsRenderFeatures,
    visible,
    name: "Menu.Items"
  });
}
var DEFAULT_ITEM_TAG = import_react36.Fragment;
function ItemFn(props, ref) {
  let internalId = useId();
  let { id = `headlessui-menu-item-${internalId}`, disabled = false, ...theirProps } = props;
  let [state, dispatch] = useMenuContext("Menu.Item");
  let active = state.activeItemIndex !== null ? state.items[state.activeItemIndex].id === id : false;
  let internalItemRef = (0, import_react36.useRef)(null);
  let itemRef = useSyncRefs(ref, internalItemRef);
  useIsoMorphicEffect(() => {
    if (state.__demoMode)
      return;
    if (state.menuState !== 0 /* Open */)
      return;
    if (!active)
      return;
    if (state.activationTrigger === 0 /* Pointer */)
      return;
    let d = disposables();
    d.requestAnimationFrame(() => {
      var _a3, _b;
      (_b = (_a3 = internalItemRef.current) == null ? void 0 : _a3.scrollIntoView) == null ? void 0 : _b.call(_a3, { block: "nearest" });
    });
    return d.dispose;
  }, [
    state.__demoMode,
    internalItemRef,
    active,
    state.menuState,
    state.activationTrigger,
    /* We also want to trigger this when the position of the active item changes so that we can re-trigger the scrollIntoView */
    state.activeItemIndex
  ]);
  let getTextValue2 = useTextValue(internalItemRef);
  let bag = (0, import_react36.useRef)({
    disabled,
    domRef: internalItemRef,
    get textValue() {
      return getTextValue2();
    }
  });
  useIsoMorphicEffect(() => {
    bag.current.disabled = disabled;
  }, [bag, disabled]);
  useIsoMorphicEffect(() => {
    dispatch({ type: 5 /* RegisterItem */, id, dataRef: bag });
    return () => dispatch({ type: 6 /* UnregisterItem */, id });
  }, [bag, id]);
  let close = useEvent(() => {
    dispatch({ type: 1 /* CloseMenu */ });
  });
  let handleClick = useEvent((event) => {
    if (disabled)
      return event.preventDefault();
    dispatch({ type: 1 /* CloseMenu */ });
    restoreFocusIfNecessary(state.buttonRef.current);
  });
  let handleFocus = useEvent(() => {
    if (disabled)
      return dispatch({ type: 2 /* GoToItem */, focus: 5 /* Nothing */ });
    dispatch({ type: 2 /* GoToItem */, focus: 4 /* Specific */, id });
  });
  let pointer = useTrackedPointer();
  let handleEnter = useEvent((evt) => pointer.update(evt));
  let handleMove = useEvent((evt) => {
    if (!pointer.wasMoved(evt))
      return;
    if (disabled)
      return;
    if (active)
      return;
    dispatch({
      type: 2 /* GoToItem */,
      focus: 4 /* Specific */,
      id,
      trigger: 0 /* Pointer */
    });
  });
  let handleLeave = useEvent((evt) => {
    if (!pointer.wasMoved(evt))
      return;
    if (disabled)
      return;
    if (!active)
      return;
    dispatch({ type: 2 /* GoToItem */, focus: 5 /* Nothing */ });
  });
  let slot = (0, import_react36.useMemo)(
    () => ({ active, disabled, close }),
    [active, disabled, close]
  );
  let ourProps = {
    id,
    ref: itemRef,
    role: "menuitem",
    tabIndex: disabled === true ? void 0 : -1,
    "aria-disabled": disabled === true ? true : void 0,
    disabled: void 0,
    // Never forward the `disabled` prop
    onClick: handleClick,
    onFocus: handleFocus,
    onPointerEnter: handleEnter,
    onMouseEnter: handleEnter,
    onPointerMove: handleMove,
    onMouseMove: handleMove,
    onPointerLeave: handleLeave,
    onMouseLeave: handleLeave
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_ITEM_TAG,
    name: "Menu.Item"
  });
}
var MenuRoot = forwardRefWithAs(MenuFn);
var Button4 = forwardRefWithAs(ButtonFn4);
var Items = forwardRefWithAs(ItemsFn);
var Item = forwardRefWithAs(ItemFn);
var Menu = Object.assign(MenuRoot, { Button: Button4, Items, Item });

// src/components/popover/popover.tsx
var import_react37 = __toESM(__webpack_require__(/*! react */ "react"), 1);
var reducers6 = {
  [0 /* TogglePopover */]: (state) => {
    let nextState = {
      ...state,
      popoverState: match(state.popoverState, {
        [0 /* Open */]: 1 /* Closed */,
        [1 /* Closed */]: 0 /* Open */
      })
    };
    if (nextState.popoverState === 0 /* Open */) {
      nextState.__demoMode = false;
    }
    return nextState;
  },
  [1 /* ClosePopover */](state) {
    if (state.popoverState === 1 /* Closed */)
      return state;
    return { ...state, popoverState: 1 /* Closed */ };
  },
  [2 /* SetButton */](state, action) {
    if (state.button === action.button)
      return state;
    return { ...state, button: action.button };
  },
  [3 /* SetButtonId */](state, action) {
    if (state.buttonId === action.buttonId)
      return state;
    return { ...state, buttonId: action.buttonId };
  },
  [4 /* SetPanel */](state, action) {
    if (state.panel === action.panel)
      return state;
    return { ...state, panel: action.panel };
  },
  [5 /* SetPanelId */](state, action) {
    if (state.panelId === action.panelId)
      return state;
    return { ...state, panelId: action.panelId };
  }
};
var PopoverContext = (0, import_react37.createContext)(null);
PopoverContext.displayName = "PopoverContext";
function usePopoverContext(component) {
  let context = (0, import_react37.useContext)(PopoverContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <Popover /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, usePopoverContext);
    throw err;
  }
  return context;
}
var PopoverAPIContext = (0, import_react37.createContext)(null);
PopoverAPIContext.displayName = "PopoverAPIContext";
function usePopoverAPIContext(component) {
  let context = (0, import_react37.useContext)(PopoverAPIContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <Popover /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, usePopoverAPIContext);
    throw err;
  }
  return context;
}
var PopoverGroupContext = (0, import_react37.createContext)(null);
PopoverGroupContext.displayName = "PopoverGroupContext";
function usePopoverGroupContext() {
  return (0, import_react37.useContext)(PopoverGroupContext);
}
var PopoverPanelContext = (0, import_react37.createContext)(null);
PopoverPanelContext.displayName = "PopoverPanelContext";
function usePopoverPanelContext() {
  return (0, import_react37.useContext)(PopoverPanelContext);
}
function stateReducer6(state, action) {
  return match(action.type, reducers6, state, action);
}
var DEFAULT_POPOVER_TAG = "div";
function PopoverFn(props, ref) {
  var _a3;
  let { __demoMode = false, ...theirProps } = props;
  let internalPopoverRef = (0, import_react37.useRef)(null);
  let popoverRef = useSyncRefs(
    ref,
    optionalRef((ref2) => {
      internalPopoverRef.current = ref2;
    })
  );
  let buttons = (0, import_react37.useRef)([]);
  let reducerBag = (0, import_react37.useReducer)(stateReducer6, {
    __demoMode,
    popoverState: __demoMode ? 0 /* Open */ : 1 /* Closed */,
    buttons,
    button: null,
    buttonId: null,
    panel: null,
    panelId: null,
    beforePanelSentinel: (0, import_react37.createRef)(),
    afterPanelSentinel: (0, import_react37.createRef)()
  });
  let [
    { popoverState, button, buttonId, panel, panelId, beforePanelSentinel, afterPanelSentinel },
    dispatch
  ] = reducerBag;
  let ownerDocument = useOwnerDocument((_a3 = internalPopoverRef.current) != null ? _a3 : button);
  let isPortalled = (0, import_react37.useMemo)(() => {
    if (!button)
      return false;
    if (!panel)
      return false;
    for (let root2 of document.querySelectorAll("body > *")) {
      if (Number(root2 == null ? void 0 : root2.contains(button)) ^ Number(root2 == null ? void 0 : root2.contains(panel))) {
        return true;
      }
    }
    let elements = getFocusableElements();
    let buttonIdx = elements.indexOf(button);
    let beforeIdx = (buttonIdx + elements.length - 1) % elements.length;
    let afterIdx = (buttonIdx + 1) % elements.length;
    let beforeElement = elements[beforeIdx];
    let afterElement = elements[afterIdx];
    if (!panel.contains(beforeElement) && !panel.contains(afterElement)) {
      return true;
    }
    return false;
  }, [button, panel]);
  let buttonIdRef = useLatestValue(buttonId);
  let panelIdRef = useLatestValue(panelId);
  let registerBag = (0, import_react37.useMemo)(
    () => ({
      buttonId: buttonIdRef,
      panelId: panelIdRef,
      close: () => dispatch({ type: 1 /* ClosePopover */ })
    }),
    [buttonIdRef, panelIdRef, dispatch]
  );
  let groupContext = usePopoverGroupContext();
  let registerPopover = groupContext == null ? void 0 : groupContext.registerPopover;
  let isFocusWithinPopoverGroup = useEvent(() => {
    var _a4;
    return (_a4 = groupContext == null ? void 0 : groupContext.isFocusWithinPopoverGroup()) != null ? _a4 : (ownerDocument == null ? void 0 : ownerDocument.activeElement) && ((button == null ? void 0 : button.contains(ownerDocument.activeElement)) || (panel == null ? void 0 : panel.contains(ownerDocument.activeElement)));
  });
  (0, import_react37.useEffect)(() => registerPopover == null ? void 0 : registerPopover(registerBag), [registerPopover, registerBag]);
  let [portals, PortalWrapper] = useNestedPortals();
  let root = useRootContainers({
    portals,
    defaultContainers: [button, panel]
  });
  useEventListener(
    ownerDocument == null ? void 0 : ownerDocument.defaultView,
    "focus",
    (event) => {
      var _a4, _b, _c, _d;
      if (event.target === window)
        return;
      if (!(event.target instanceof HTMLElement))
        return;
      if (popoverState !== 0 /* Open */)
        return;
      if (isFocusWithinPopoverGroup())
        return;
      if (!button)
        return;
      if (!panel)
        return;
      if (root.contains(event.target))
        return;
      if ((_b = (_a4 = beforePanelSentinel.current) == null ? void 0 : _a4.contains) == null ? void 0 : _b.call(_a4, event.target))
        return;
      if ((_d = (_c = afterPanelSentinel.current) == null ? void 0 : _c.contains) == null ? void 0 : _d.call(_c, event.target))
        return;
      dispatch({ type: 1 /* ClosePopover */ });
    },
    true
  );
  useOutsideClick(
    root.resolveContainers,
    (event, target) => {
      dispatch({ type: 1 /* ClosePopover */ });
      if (!isFocusableElement(target, 1 /* Loose */)) {
        event.preventDefault();
        button == null ? void 0 : button.focus();
      }
    },
    popoverState === 0 /* Open */
  );
  let close = useEvent(
    (focusableElement) => {
      dispatch({ type: 1 /* ClosePopover */ });
      let restoreElement = (() => {
        if (!focusableElement)
          return button;
        if (focusableElement instanceof HTMLElement)
          return focusableElement;
        if ("current" in focusableElement && focusableElement.current instanceof HTMLElement)
          return focusableElement.current;
        return button;
      })();
      restoreElement == null ? void 0 : restoreElement.focus();
    }
  );
  let api = (0, import_react37.useMemo)(
    () => ({ close, isPortalled }),
    [close, isPortalled]
  );
  let slot = (0, import_react37.useMemo)(
    () => ({ open: popoverState === 0 /* Open */, close }),
    [popoverState, close]
  );
  let ourProps = { ref: popoverRef };
  return /* @__PURE__ */ import_react37.default.createElement(PopoverPanelContext.Provider, { value: null }, /* @__PURE__ */ import_react37.default.createElement(PopoverContext.Provider, { value: reducerBag }, /* @__PURE__ */ import_react37.default.createElement(PopoverAPIContext.Provider, { value: api }, /* @__PURE__ */ import_react37.default.createElement(
    OpenClosedProvider,
    {
      value: match(popoverState, {
        [0 /* Open */]: 1 /* Open */,
        [1 /* Closed */]: 2 /* Closed */
      })
    },
    /* @__PURE__ */ import_react37.default.createElement(PortalWrapper, null, render({
      ourProps,
      theirProps,
      slot,
      defaultTag: DEFAULT_POPOVER_TAG,
      name: "Popover"
    }), /* @__PURE__ */ import_react37.default.createElement(root.MainTreeNode, null))
  ))));
}
var DEFAULT_BUTTON_TAG5 = "button";
function ButtonFn5(props, ref) {
  let internalId = useId();
  let { id = `headlessui-popover-button-${internalId}`, ...theirProps } = props;
  let [state, dispatch] = usePopoverContext("Popover.Button");
  let { isPortalled } = usePopoverAPIContext("Popover.Button");
  let internalButtonRef = (0, import_react37.useRef)(null);
  let sentinelId = `headlessui-focus-sentinel-${useId()}`;
  let groupContext = usePopoverGroupContext();
  let closeOthers = groupContext == null ? void 0 : groupContext.closeOthers;
  let panelContext = usePopoverPanelContext();
  let isWithinPanel = panelContext !== null;
  (0, import_react37.useEffect)(() => {
    if (isWithinPanel)
      return;
    dispatch({ type: 3 /* SetButtonId */, buttonId: id });
    return () => {
      dispatch({ type: 3 /* SetButtonId */, buttonId: null });
    };
  }, [isWithinPanel, id, dispatch]);
  let [uniqueIdentifier] = (0, import_react37.useState)(() => Symbol());
  let buttonRef = useSyncRefs(
    internalButtonRef,
    ref,
    isWithinPanel ? null : (button) => {
      if (button) {
        state.buttons.current.push(uniqueIdentifier);
      } else {
        let idx = state.buttons.current.indexOf(uniqueIdentifier);
        if (idx !== -1)
          state.buttons.current.splice(idx, 1);
      }
      if (state.buttons.current.length > 1) {
        console.warn(
          "You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."
        );
      }
      button && dispatch({ type: 2 /* SetButton */, button });
    }
  );
  let withinPanelButtonRef = useSyncRefs(internalButtonRef, ref);
  let ownerDocument = useOwnerDocument(internalButtonRef);
  let handleKeyDown = useEvent((event) => {
    var _a3, _b, _c;
    if (isWithinPanel) {
      if (state.popoverState === 1 /* Closed */)
        return;
      switch (event.key) {
        case " " /* Space */:
        case "Enter" /* Enter */:
          event.preventDefault();
          (_b = (_a3 = event.target).click) == null ? void 0 : _b.call(_a3);
          dispatch({ type: 1 /* ClosePopover */ });
          (_c = state.button) == null ? void 0 : _c.focus();
          break;
      }
    } else {
      switch (event.key) {
        case " " /* Space */:
        case "Enter" /* Enter */:
          event.preventDefault();
          event.stopPropagation();
          if (state.popoverState === 1 /* Closed */)
            closeOthers == null ? void 0 : closeOthers(state.buttonId);
          dispatch({ type: 0 /* TogglePopover */ });
          break;
        case "Escape" /* Escape */:
          if (state.popoverState !== 0 /* Open */)
            return closeOthers == null ? void 0 : closeOthers(state.buttonId);
          if (!internalButtonRef.current)
            return;
          if ((ownerDocument == null ? void 0 : ownerDocument.activeElement) && !internalButtonRef.current.contains(ownerDocument.activeElement)) {
            return;
          }
          event.preventDefault();
          event.stopPropagation();
          dispatch({ type: 1 /* ClosePopover */ });
          break;
      }
    }
  });
  let handleKeyUp = useEvent((event) => {
    if (isWithinPanel)
      return;
    if (event.key === " " /* Space */) {
      event.preventDefault();
    }
  });
  let handleClick = useEvent((event) => {
    var _a3, _b;
    if (isDisabledReactIssue7711(event.currentTarget))
      return;
    if (props.disabled)
      return;
    if (isWithinPanel) {
      dispatch({ type: 1 /* ClosePopover */ });
      (_a3 = state.button) == null ? void 0 : _a3.focus();
    } else {
      event.preventDefault();
      event.stopPropagation();
      if (state.popoverState === 1 /* Closed */)
        closeOthers == null ? void 0 : closeOthers(state.buttonId);
      dispatch({ type: 0 /* TogglePopover */ });
      (_b = state.button) == null ? void 0 : _b.focus();
    }
  });
  let handleMouseDown = useEvent((event) => {
    event.preventDefault();
    event.stopPropagation();
  });
  let visible = state.popoverState === 0 /* Open */;
  let slot = (0, import_react37.useMemo)(() => ({ open: visible }), [visible]);
  let type = useResolveButtonType(props, internalButtonRef);
  let ourProps = isWithinPanel ? {
    ref: withinPanelButtonRef,
    type,
    onKeyDown: handleKeyDown,
    onClick: handleClick
  } : {
    ref: buttonRef,
    id: state.buttonId,
    type,
    "aria-expanded": props.disabled ? void 0 : state.popoverState === 0 /* Open */,
    "aria-controls": state.panel ? state.panelId : void 0,
    onKeyDown: handleKeyDown,
    onKeyUp: handleKeyUp,
    onClick: handleClick,
    onMouseDown: handleMouseDown
  };
  let direction = useTabDirection();
  let handleFocus = useEvent(() => {
    let el = state.panel;
    if (!el)
      return;
    function run() {
      let result = match(direction.current, {
        [0 /* Forwards */]: () => focusIn(el, 1 /* First */),
        [1 /* Backwards */]: () => focusIn(el, 8 /* Last */)
      });
      if (result === 0 /* Error */) {
        focusIn(
          getFocusableElements().filter((el2) => el2.dataset.headlessuiFocusGuard !== "true"),
          match(direction.current, {
            [0 /* Forwards */]: 4 /* Next */,
            [1 /* Backwards */]: 2 /* Previous */
          }),
          { relativeTo: state.button }
        );
      }
    }
    if (false) {} else {
      run();
    }
  });
  return /* @__PURE__ */ import_react37.default.createElement(import_react37.default.Fragment, null, render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_BUTTON_TAG5,
    name: "Popover.Button"
  }), visible && !isWithinPanel && isPortalled && /* @__PURE__ */ import_react37.default.createElement(
    Hidden,
    {
      id: sentinelId,
      features: 2 /* Focusable */,
      "data-headlessui-focus-guard": true,
      as: "button",
      type: "button",
      onFocus: handleFocus
    }
  ));
}
var DEFAULT_OVERLAY_TAG2 = "div";
var OverlayRenderFeatures = 1 /* RenderStrategy */ | 2 /* Static */;
function OverlayFn2(props, ref) {
  let internalId = useId();
  let { id = `headlessui-popover-overlay-${internalId}`, ...theirProps } = props;
  let [{ popoverState }, dispatch] = usePopoverContext("Popover.Overlay");
  let overlayRef = useSyncRefs(ref);
  let usesOpenClosedState = useOpenClosed();
  let visible = (() => {
    if (usesOpenClosedState !== null) {
      return (usesOpenClosedState & 1 /* Open */) === 1 /* Open */;
    }
    return popoverState === 0 /* Open */;
  })();
  let handleClick = useEvent((event) => {
    if (isDisabledReactIssue7711(event.currentTarget))
      return event.preventDefault();
    dispatch({ type: 1 /* ClosePopover */ });
  });
  let slot = (0, import_react37.useMemo)(
    () => ({ open: popoverState === 0 /* Open */ }),
    [popoverState]
  );
  let ourProps = {
    ref: overlayRef,
    id,
    "aria-hidden": true,
    onClick: handleClick
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_OVERLAY_TAG2,
    features: OverlayRenderFeatures,
    visible,
    name: "Popover.Overlay"
  });
}
var DEFAULT_PANEL_TAG3 = "div";
var PanelRenderFeatures2 = 1 /* RenderStrategy */ | 2 /* Static */;
function PanelFn3(props, ref) {
  let internalId = useId();
  let { id = `headlessui-popover-panel-${internalId}`, focus = false, ...theirProps } = props;
  let [state, dispatch] = usePopoverContext("Popover.Panel");
  let { close, isPortalled } = usePopoverAPIContext("Popover.Panel");
  let beforePanelSentinelId = `headlessui-focus-sentinel-before-${useId()}`;
  let afterPanelSentinelId = `headlessui-focus-sentinel-after-${useId()}`;
  let internalPanelRef = (0, import_react37.useRef)(null);
  let panelRef = useSyncRefs(internalPanelRef, ref, (panel) => {
    dispatch({ type: 4 /* SetPanel */, panel });
  });
  let ownerDocument = useOwnerDocument(internalPanelRef);
  useIsoMorphicEffect(() => {
    dispatch({ type: 5 /* SetPanelId */, panelId: id });
    return () => {
      dispatch({ type: 5 /* SetPanelId */, panelId: null });
    };
  }, [id, dispatch]);
  let usesOpenClosedState = useOpenClosed();
  let visible = (() => {
    if (usesOpenClosedState !== null) {
      return (usesOpenClosedState & 1 /* Open */) === 1 /* Open */;
    }
    return state.popoverState === 0 /* Open */;
  })();
  let handleKeyDown = useEvent((event) => {
    var _a3;
    switch (event.key) {
      case "Escape" /* Escape */:
        if (state.popoverState !== 0 /* Open */)
          return;
        if (!internalPanelRef.current)
          return;
        if ((ownerDocument == null ? void 0 : ownerDocument.activeElement) && !internalPanelRef.current.contains(ownerDocument.activeElement)) {
          return;
        }
        event.preventDefault();
        event.stopPropagation();
        dispatch({ type: 1 /* ClosePopover */ });
        (_a3 = state.button) == null ? void 0 : _a3.focus();
        break;
    }
  });
  (0, import_react37.useEffect)(() => {
    var _a3;
    if (props.static)
      return;
    if (state.popoverState === 1 /* Closed */ && ((_a3 = props.unmount) != null ? _a3 : true)) {
      dispatch({ type: 4 /* SetPanel */, panel: null });
    }
  }, [state.popoverState, props.unmount, props.static, dispatch]);
  (0, import_react37.useEffect)(() => {
    if (state.__demoMode)
      return;
    if (!focus)
      return;
    if (state.popoverState !== 0 /* Open */)
      return;
    if (!internalPanelRef.current)
      return;
    let activeElement = ownerDocument == null ? void 0 : ownerDocument.activeElement;
    if (internalPanelRef.current.contains(activeElement))
      return;
    focusIn(internalPanelRef.current, 1 /* First */);
  }, [state.__demoMode, focus, internalPanelRef, state.popoverState]);
  let slot = (0, import_react37.useMemo)(
    () => ({ open: state.popoverState === 0 /* Open */, close }),
    [state, close]
  );
  let ourProps = {
    ref: panelRef,
    id,
    onKeyDown: handleKeyDown,
    onBlur: focus && state.popoverState === 0 /* Open */ ? (event) => {
      var _a3, _b, _c, _d, _e;
      let el = event.relatedTarget;
      if (!el)
        return;
      if (!internalPanelRef.current)
        return;
      if ((_a3 = internalPanelRef.current) == null ? void 0 : _a3.contains(el))
        return;
      dispatch({ type: 1 /* ClosePopover */ });
      if (((_c = (_b = state.beforePanelSentinel.current) == null ? void 0 : _b.contains) == null ? void 0 : _c.call(_b, el)) || ((_e = (_d = state.afterPanelSentinel.current) == null ? void 0 : _d.contains) == null ? void 0 : _e.call(_d, el))) {
        el.focus({ preventScroll: true });
      }
    } : void 0,
    tabIndex: -1
  };
  let direction = useTabDirection();
  let handleBeforeFocus = useEvent(() => {
    let el = internalPanelRef.current;
    if (!el)
      return;
    function run() {
      match(direction.current, {
        [0 /* Forwards */]: () => {
          var _a3;
          let result = focusIn(el, 1 /* First */);
          if (result === 0 /* Error */) {
            (_a3 = state.afterPanelSentinel.current) == null ? void 0 : _a3.focus();
          }
        },
        [1 /* Backwards */]: () => {
          var _a3;
          (_a3 = state.button) == null ? void 0 : _a3.focus({ preventScroll: true });
        }
      });
    }
    if (false) {} else {
      run();
    }
  });
  let handleAfterFocus = useEvent(() => {
    let el = internalPanelRef.current;
    if (!el)
      return;
    function run() {
      match(direction.current, {
        [0 /* Forwards */]: () => {
          var _a3;
          if (!state.button)
            return;
          let elements = getFocusableElements();
          let idx = elements.indexOf(state.button);
          let before = elements.slice(0, idx + 1);
          let after = elements.slice(idx + 1);
          let combined = [...after, ...before];
          for (let element of combined.slice()) {
            if (element.dataset.headlessuiFocusGuard === "true" || ((_a3 = state.panel) == null ? void 0 : _a3.contains(element))) {
              let idx2 = combined.indexOf(element);
              if (idx2 !== -1)
                combined.splice(idx2, 1);
            }
          }
          focusIn(combined, 1 /* First */, { sorted: false });
        },
        [1 /* Backwards */]: () => {
          var _a3;
          let result = focusIn(el, 2 /* Previous */);
          if (result === 0 /* Error */) {
            (_a3 = state.button) == null ? void 0 : _a3.focus();
          }
        }
      });
    }
    if (false) {} else {
      run();
    }
  });
  return /* @__PURE__ */ import_react37.default.createElement(PopoverPanelContext.Provider, { value: id }, visible && isPortalled && /* @__PURE__ */ import_react37.default.createElement(
    Hidden,
    {
      id: beforePanelSentinelId,
      ref: state.beforePanelSentinel,
      features: 2 /* Focusable */,
      "data-headlessui-focus-guard": true,
      as: "button",
      type: "button",
      onFocus: handleBeforeFocus
    }
  ), render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_PANEL_TAG3,
    features: PanelRenderFeatures2,
    visible,
    name: "Popover.Panel"
  }), visible && isPortalled && /* @__PURE__ */ import_react37.default.createElement(
    Hidden,
    {
      id: afterPanelSentinelId,
      ref: state.afterPanelSentinel,
      features: 2 /* Focusable */,
      "data-headlessui-focus-guard": true,
      as: "button",
      type: "button",
      onFocus: handleAfterFocus
    }
  ));
}
var DEFAULT_GROUP_TAG2 = "div";
function GroupFn2(props, ref) {
  let internalGroupRef = (0, import_react37.useRef)(null);
  let groupRef = useSyncRefs(internalGroupRef, ref);
  let [popovers, setPopovers] = (0, import_react37.useState)([]);
  let unregisterPopover = useEvent((registerbag) => {
    setPopovers((existing) => {
      let idx = existing.indexOf(registerbag);
      if (idx !== -1) {
        let clone = existing.slice();
        clone.splice(idx, 1);
        return clone;
      }
      return existing;
    });
  });
  let registerPopover = useEvent((registerbag) => {
    setPopovers((existing) => [...existing, registerbag]);
    return () => unregisterPopover(registerbag);
  });
  let isFocusWithinPopoverGroup = useEvent(() => {
    var _a3;
    let ownerDocument = getOwnerDocument(internalGroupRef);
    if (!ownerDocument)
      return false;
    let element = ownerDocument.activeElement;
    if ((_a3 = internalGroupRef.current) == null ? void 0 : _a3.contains(element))
      return true;
    return popovers.some((bag) => {
      var _a4, _b;
      return ((_a4 = ownerDocument.getElementById(bag.buttonId.current)) == null ? void 0 : _a4.contains(element)) || ((_b = ownerDocument.getElementById(bag.panelId.current)) == null ? void 0 : _b.contains(element));
    });
  });
  let closeOthers = useEvent((buttonId) => {
    for (let popover of popovers) {
      if (popover.buttonId.current !== buttonId)
        popover.close();
    }
  });
  let contextBag = (0, import_react37.useMemo)(
    () => ({
      registerPopover,
      unregisterPopover,
      isFocusWithinPopoverGroup,
      closeOthers
    }),
    [registerPopover, unregisterPopover, isFocusWithinPopoverGroup, closeOthers]
  );
  let slot = (0, import_react37.useMemo)(() => ({}), []);
  let theirProps = props;
  let ourProps = { ref: groupRef };
  return /* @__PURE__ */ import_react37.default.createElement(PopoverGroupContext.Provider, { value: contextBag }, render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_GROUP_TAG2,
    name: "Popover.Group"
  }));
}
var PopoverRoot = forwardRefWithAs(PopoverFn);
var Button5 = forwardRefWithAs(ButtonFn5);
var Overlay2 = forwardRefWithAs(OverlayFn2);
var Panel3 = forwardRefWithAs(PanelFn3);
var Group2 = forwardRefWithAs(GroupFn2);
var Popover = Object.assign(PopoverRoot, { Button: Button5, Overlay: Overlay2, Panel: Panel3, Group: Group2 });

// src/components/radio-group/radio-group.tsx
var import_react40 = __toESM(__webpack_require__(/*! react */ "react"), 1);

// src/hooks/use-flags.ts
var import_react38 = __webpack_require__(/*! react */ "react");
function useFlags(initialFlags = 0) {
  let [flags, setFlags] = (0, import_react38.useState)(initialFlags);
  let mounted = useIsMounted();
  let addFlag = (0, import_react38.useCallback)(
    (flag) => {
      if (!mounted.current)
        return;
      setFlags((flags2) => flags2 | flag);
    },
    [flags, mounted]
  );
  let hasFlag = (0, import_react38.useCallback)((flag) => Boolean(flags & flag), [flags]);
  let removeFlag = (0, import_react38.useCallback)(
    (flag) => {
      if (!mounted.current)
        return;
      setFlags((flags2) => flags2 & ~flag);
    },
    [setFlags, mounted]
  );
  let toggleFlag = (0, import_react38.useCallback)(
    (flag) => {
      if (!mounted.current)
        return;
      setFlags((flags2) => flags2 ^ flag);
    },
    [setFlags]
  );
  return { flags, addFlag, hasFlag, removeFlag, toggleFlag };
}

// src/components/label/label.tsx
var import_react39 = __toESM(__webpack_require__(/*! react */ "react"), 1);
var LabelContext = (0, import_react39.createContext)(
  null
);
function useLabelContext() {
  let context = (0, import_react39.useContext)(LabelContext);
  if (context === null) {
    let err = new Error("You used a <Label /> component, but it is not inside a relevant parent.");
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useLabelContext);
    throw err;
  }
  return context;
}
function useLabels() {
  let [labelIds, setLabelIds] = (0, import_react39.useState)([]);
  return [
    // The actual id's as string or undefined.
    labelIds.length > 0 ? labelIds.join(" ") : void 0,
    // The provider component
    (0, import_react39.useMemo)(() => {
      return function LabelProvider(props) {
        let register = useEvent((value) => {
          setLabelIds((existing) => [...existing, value]);
          return () => setLabelIds((existing) => {
            let clone = existing.slice();
            let idx = clone.indexOf(value);
            if (idx !== -1)
              clone.splice(idx, 1);
            return clone;
          });
        });
        let contextBag = (0, import_react39.useMemo)(
          () => ({ register, slot: props.slot, name: props.name, props: props.props }),
          [register, props.slot, props.name, props.props]
        );
        return /* @__PURE__ */ import_react39.default.createElement(LabelContext.Provider, { value: contextBag }, props.children);
      };
    }, [setLabelIds])
  ];
}
var DEFAULT_LABEL_TAG3 = "label";
function LabelFn3(props, ref) {
  let internalId = useId();
  let { id = `headlessui-label-${internalId}`, passive = false, ...theirProps } = props;
  let context = useLabelContext();
  let labelRef = useSyncRefs(ref);
  useIsoMorphicEffect(() => context.register(id), [id, context.register]);
  let ourProps = { ref: labelRef, ...context.props, id };
  if (passive) {
    if ("onClick" in ourProps) {
      delete ourProps["htmlFor"];
      delete ourProps["onClick"];
    }
    if ("onClick" in theirProps) {
      delete theirProps["onClick"];
    }
  }
  return render({
    ourProps,
    theirProps,
    slot: context.slot || {},
    defaultTag: DEFAULT_LABEL_TAG3,
    name: context.name || "Label"
  });
}
var LabelRoot = forwardRefWithAs(LabelFn3);
var Label3 = Object.assign(LabelRoot, {
  //
});

// src/components/radio-group/radio-group.tsx
var reducers7 = {
  [0 /* RegisterOption */](state, action) {
    let nextOptions = [
      ...state.options,
      { id: action.id, element: action.element, propsRef: action.propsRef }
    ];
    return {
      ...state,
      options: sortByDomNode(nextOptions, (option) => option.element.current)
    };
  },
  [1 /* UnregisterOption */](state, action) {
    let options = state.options.slice();
    let idx = state.options.findIndex((radio) => radio.id === action.id);
    if (idx === -1)
      return state;
    options.splice(idx, 1);
    return { ...state, options };
  }
};
var RadioGroupDataContext = (0, import_react40.createContext)(null);
RadioGroupDataContext.displayName = "RadioGroupDataContext";
function useData3(component) {
  let context = (0, import_react40.useContext)(RadioGroupDataContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <RadioGroup /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useData3);
    throw err;
  }
  return context;
}
var RadioGroupActionsContext = (0, import_react40.createContext)(null);
RadioGroupActionsContext.displayName = "RadioGroupActionsContext";
function useActions3(component) {
  let context = (0, import_react40.useContext)(RadioGroupActionsContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <RadioGroup /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useActions3);
    throw err;
  }
  return context;
}
function stateReducer7(state, action) {
  return match(action.type, reducers7, state, action);
}
var DEFAULT_RADIO_GROUP_TAG = "div";
function RadioGroupFn(props, ref) {
  let internalId = useId();
  let {
    id = `headlessui-radiogroup-${internalId}`,
    value: controlledValue,
    defaultValue,
    form: formName,
    name,
    onChange: controlledOnChange,
    by = (a, z) => a === z,
    disabled = false,
    ...theirProps
  } = props;
  let compare = useEvent(
    typeof by === "string" ? (a, z) => {
      let property = by;
      return (a == null ? void 0 : a[property]) === (z == null ? void 0 : z[property]);
    } : by
  );
  let [state, dispatch] = (0, import_react40.useReducer)(stateReducer7, { options: [] });
  let options = state.options;
  let [labelledby, LabelProvider] = useLabels();
  let [describedby, DescriptionProvider] = useDescriptions();
  let internalRadioGroupRef = (0, import_react40.useRef)(null);
  let radioGroupRef = useSyncRefs(internalRadioGroupRef, ref);
  let [value, onChange] = useControllable(controlledValue, controlledOnChange, defaultValue);
  let firstOption = (0, import_react40.useMemo)(
    () => options.find((option) => {
      if (option.propsRef.current.disabled)
        return false;
      return true;
    }),
    [options]
  );
  let containsCheckedOption = (0, import_react40.useMemo)(
    () => options.some((option) => compare(option.propsRef.current.value, value)),
    [options, value]
  );
  let triggerChange = useEvent((nextValue) => {
    var _a3;
    if (disabled)
      return false;
    if (compare(nextValue, value))
      return false;
    let nextOption = (_a3 = options.find(
      (option) => compare(option.propsRef.current.value, nextValue)
    )) == null ? void 0 : _a3.propsRef.current;
    if (nextOption == null ? void 0 : nextOption.disabled)
      return false;
    onChange == null ? void 0 : onChange(nextValue);
    return true;
  });
  useTreeWalker({
    container: internalRadioGroupRef.current,
    accept(node) {
      if (node.getAttribute("role") === "radio")
        return NodeFilter.FILTER_REJECT;
      if (node.hasAttribute("role"))
        return NodeFilter.FILTER_SKIP;
      return NodeFilter.FILTER_ACCEPT;
    },
    walk(node) {
      node.setAttribute("role", "none");
    }
  });
  let handleKeyDown = useEvent((event) => {
    let container = internalRadioGroupRef.current;
    if (!container)
      return;
    let ownerDocument = getOwnerDocument(container);
    let all = options.filter((option) => option.propsRef.current.disabled === false).map((radio) => radio.element.current);
    switch (event.key) {
      case "Enter" /* Enter */:
        attemptSubmit(event.currentTarget);
        break;
      case "ArrowLeft" /* ArrowLeft */:
      case "ArrowUp" /* ArrowUp */:
        {
          event.preventDefault();
          event.stopPropagation();
          let result = focusIn(all, 2 /* Previous */ | 16 /* WrapAround */);
          if (result === 2 /* Success */) {
            let activeOption = options.find(
              (option) => option.element.current === (ownerDocument == null ? void 0 : ownerDocument.activeElement)
            );
            if (activeOption)
              triggerChange(activeOption.propsRef.current.value);
          }
        }
        break;
      case "ArrowRight" /* ArrowRight */:
      case "ArrowDown" /* ArrowDown */:
        {
          event.preventDefault();
          event.stopPropagation();
          let result = focusIn(all, 4 /* Next */ | 16 /* WrapAround */);
          if (result === 2 /* Success */) {
            let activeOption = options.find(
              (option) => option.element.current === (ownerDocument == null ? void 0 : ownerDocument.activeElement)
            );
            if (activeOption)
              triggerChange(activeOption.propsRef.current.value);
          }
        }
        break;
      case " " /* Space */:
        {
          event.preventDefault();
          event.stopPropagation();
          let activeOption = options.find(
            (option) => option.element.current === (ownerDocument == null ? void 0 : ownerDocument.activeElement)
          );
          if (activeOption)
            triggerChange(activeOption.propsRef.current.value);
        }
        break;
    }
  });
  let registerOption = useEvent((option) => {
    dispatch({ type: 0 /* RegisterOption */, ...option });
    return () => dispatch({ type: 1 /* UnregisterOption */, id: option.id });
  });
  let radioGroupData = (0, import_react40.useMemo)(
    () => ({ value, firstOption, containsCheckedOption, disabled, compare, ...state }),
    [value, firstOption, containsCheckedOption, disabled, compare, state]
  );
  let radioGroupActions = (0, import_react40.useMemo)(
    () => ({ registerOption, change: triggerChange }),
    [registerOption, triggerChange]
  );
  let ourProps = {
    ref: radioGroupRef,
    id,
    role: "radiogroup",
    "aria-labelledby": labelledby,
    "aria-describedby": describedby,
    onKeyDown: handleKeyDown
  };
  let slot = (0, import_react40.useMemo)(() => ({ value }), [value]);
  let form = (0, import_react40.useRef)(null);
  let d = useDisposables();
  (0, import_react40.useEffect)(() => {
    if (!form.current)
      return;
    if (defaultValue === void 0)
      return;
    d.addEventListener(form.current, "reset", () => {
      triggerChange(defaultValue);
    });
  }, [
    form,
    triggerChange
    /* Explicitly ignoring `defaultValue` */
  ]);
  return /* @__PURE__ */ import_react40.default.createElement(DescriptionProvider, { name: "RadioGroup.Description" }, /* @__PURE__ */ import_react40.default.createElement(LabelProvider, { name: "RadioGroup.Label" }, /* @__PURE__ */ import_react40.default.createElement(RadioGroupActionsContext.Provider, { value: radioGroupActions }, /* @__PURE__ */ import_react40.default.createElement(RadioGroupDataContext.Provider, { value: radioGroupData }, name != null && value != null && objectToFormEntries({ [name]: value }).map(([name2, value2], idx) => /* @__PURE__ */ import_react40.default.createElement(
    Hidden,
    {
      features: 4 /* Hidden */,
      ref: idx === 0 ? (element) => {
        var _a3;
        form.current = (_a3 = element == null ? void 0 : element.closest("form")) != null ? _a3 : null;
      } : void 0,
      ...compact({
        key: name2,
        as: "input",
        type: "radio",
        checked: value2 != null,
        hidden: true,
        readOnly: true,
        form: formName,
        name: name2,
        value: value2
      })
    }
  )), render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_RADIO_GROUP_TAG,
    name: "RadioGroup"
  })))));
}
var DEFAULT_OPTION_TAG3 = "div";
function OptionFn3(props, ref) {
  var _a3;
  let internalId = useId();
  let {
    id = `headlessui-radiogroup-option-${internalId}`,
    value,
    disabled = false,
    ...theirProps
  } = props;
  let internalOptionRef = (0, import_react40.useRef)(null);
  let optionRef = useSyncRefs(internalOptionRef, ref);
  let [labelledby, LabelProvider] = useLabels();
  let [describedby, DescriptionProvider] = useDescriptions();
  let { addFlag, removeFlag, hasFlag } = useFlags(1 /* Empty */);
  let propsRef = useLatestValue({ value, disabled });
  let data = useData3("RadioGroup.Option");
  let actions = useActions3("RadioGroup.Option");
  useIsoMorphicEffect(
    () => actions.registerOption({ id, element: internalOptionRef, propsRef }),
    [id, actions, internalOptionRef, props]
  );
  let handleClick = useEvent((event) => {
    var _a4;
    if (isDisabledReactIssue7711(event.currentTarget))
      return event.preventDefault();
    if (!actions.change(value))
      return;
    addFlag(2 /* Active */);
    (_a4 = internalOptionRef.current) == null ? void 0 : _a4.focus();
  });
  let handleFocus = useEvent((event) => {
    if (isDisabledReactIssue7711(event.currentTarget))
      return event.preventDefault();
    addFlag(2 /* Active */);
  });
  let handleBlur = useEvent(() => removeFlag(2 /* Active */));
  let isFirstOption = ((_a3 = data.firstOption) == null ? void 0 : _a3.id) === id;
  let isDisabled = data.disabled || disabled;
  let checked = data.compare(data.value, value);
  let ourProps = {
    ref: optionRef,
    id,
    role: "radio",
    "aria-checked": checked ? "true" : "false",
    "aria-labelledby": labelledby,
    "aria-describedby": describedby,
    "aria-disabled": isDisabled ? true : void 0,
    tabIndex: (() => {
      if (isDisabled)
        return -1;
      if (checked)
        return 0;
      if (!data.containsCheckedOption && isFirstOption)
        return 0;
      return -1;
    })(),
    onClick: isDisabled ? void 0 : handleClick,
    onFocus: isDisabled ? void 0 : handleFocus,
    onBlur: isDisabled ? void 0 : handleBlur
  };
  let slot = (0, import_react40.useMemo)(
    () => ({ checked, disabled: isDisabled, active: hasFlag(2 /* Active */) }),
    [checked, isDisabled, hasFlag]
  );
  return /* @__PURE__ */ import_react40.default.createElement(DescriptionProvider, { name: "RadioGroup.Description" }, /* @__PURE__ */ import_react40.default.createElement(LabelProvider, { name: "RadioGroup.Label" }, render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_OPTION_TAG3,
    name: "RadioGroup.Option"
  })));
}
var RadioGroupRoot = forwardRefWithAs(RadioGroupFn);
var Option3 = forwardRefWithAs(OptionFn3);
var RadioGroup = Object.assign(RadioGroupRoot, {
  Option: Option3,
  Label: Label3,
  Description
});

// src/components/switch/switch.tsx
var import_react41 = __toESM(__webpack_require__(/*! react */ "react"), 1);
var GroupContext = (0, import_react41.createContext)(null);
GroupContext.displayName = "GroupContext";
var DEFAULT_GROUP_TAG3 = import_react41.Fragment;
function GroupFn3(props) {
  var _a3;
  let [switchElement, setSwitchElement] = (0, import_react41.useState)(null);
  let [labelledby, LabelProvider] = useLabels();
  let [describedby, DescriptionProvider] = useDescriptions();
  let context = (0, import_react41.useMemo)(
    () => ({ switch: switchElement, setSwitch: setSwitchElement, labelledby, describedby }),
    [switchElement, setSwitchElement, labelledby, describedby]
  );
  let ourProps = {};
  let theirProps = props;
  return /* @__PURE__ */ import_react41.default.createElement(DescriptionProvider, { name: "Switch.Description" }, /* @__PURE__ */ import_react41.default.createElement(
    LabelProvider,
    {
      name: "Switch.Label",
      props: {
        htmlFor: (_a3 = context.switch) == null ? void 0 : _a3.id,
        onClick(event) {
          if (!switchElement)
            return;
          if (event.currentTarget.tagName === "LABEL") {
            event.preventDefault();
          }
          switchElement.click();
          switchElement.focus({ preventScroll: true });
        }
      }
    },
    /* @__PURE__ */ import_react41.default.createElement(GroupContext.Provider, { value: context }, render({
      ourProps,
      theirProps,
      defaultTag: DEFAULT_GROUP_TAG3,
      name: "Switch.Group"
    }))
  ));
}
var DEFAULT_SWITCH_TAG = "button";
function SwitchFn(props, ref) {
  let internalId = useId();
  let {
    id = `headlessui-switch-${internalId}`,
    checked: controlledChecked,
    defaultChecked = false,
    onChange: controlledOnChange,
    name,
    value,
    form,
    ...theirProps
  } = props;
  let groupContext = (0, import_react41.useContext)(GroupContext);
  let internalSwitchRef = (0, import_react41.useRef)(null);
  let switchRef = useSyncRefs(
    internalSwitchRef,
    ref,
    groupContext === null ? null : groupContext.setSwitch
  );
  let [checked, onChange] = useControllable(controlledChecked, controlledOnChange, defaultChecked);
  let toggle = useEvent(() => onChange == null ? void 0 : onChange(!checked));
  let handleClick = useEvent((event) => {
    if (isDisabledReactIssue7711(event.currentTarget))
      return event.preventDefault();
    event.preventDefault();
    toggle();
  });
  let handleKeyUp = useEvent((event) => {
    if (event.key === " " /* Space */) {
      event.preventDefault();
      toggle();
    } else if (event.key === "Enter" /* Enter */) {
      attemptSubmit(event.currentTarget);
    }
  });
  let handleKeyPress = useEvent((event) => event.preventDefault());
  let slot = (0, import_react41.useMemo)(() => ({ checked }), [checked]);
  let ourProps = {
    id,
    ref: switchRef,
    role: "switch",
    type: useResolveButtonType(props, internalSwitchRef),
    tabIndex: 0,
    "aria-checked": checked,
    "aria-labelledby": groupContext == null ? void 0 : groupContext.labelledby,
    "aria-describedby": groupContext == null ? void 0 : groupContext.describedby,
    onClick: handleClick,
    onKeyUp: handleKeyUp,
    onKeyPress: handleKeyPress
  };
  let d = useDisposables();
  (0, import_react41.useEffect)(() => {
    var _a3;
    let form2 = (_a3 = internalSwitchRef.current) == null ? void 0 : _a3.closest("form");
    if (!form2)
      return;
    if (defaultChecked === void 0)
      return;
    d.addEventListener(form2, "reset", () => {
      onChange(defaultChecked);
    });
  }, [
    internalSwitchRef,
    onChange
    /* Explicitly ignoring `defaultValue` */
  ]);
  return /* @__PURE__ */ import_react41.default.createElement(import_react41.default.Fragment, null, name != null && checked && /* @__PURE__ */ import_react41.default.createElement(
    Hidden,
    {
      features: 4 /* Hidden */,
      ...compact({
        as: "input",
        type: "checkbox",
        hidden: true,
        readOnly: true,
        form,
        checked,
        name,
        value
      })
    }
  ), render({ ourProps, theirProps, slot, defaultTag: DEFAULT_SWITCH_TAG, name: "Switch" }));
}
var SwitchRoot = forwardRefWithAs(SwitchFn);
var Group3 = GroupFn3;
var Switch = Object.assign(SwitchRoot, {
  Group: Group3,
  Label: Label3,
  Description
});

// src/components/tabs/tabs.tsx
var import_react43 = __toESM(__webpack_require__(/*! react */ "react"), 1);

// src/internal/focus-sentinel.tsx
var import_react42 = __toESM(__webpack_require__(/*! react */ "react"), 1);
function FocusSentinel({ onFocus }) {
  let [enabled, setEnabled] = (0, import_react42.useState)(true);
  if (!enabled)
    return null;
  return /* @__PURE__ */ import_react42.default.createElement(
    Hidden,
    {
      as: "button",
      type: "button",
      features: 2 /* Focusable */,
      onFocus: (event) => {
        event.preventDefault();
        let frame;
        let tries = 50;
        function forwardFocus() {
          if (tries-- <= 0) {
            if (frame)
              cancelAnimationFrame(frame);
            return;
          }
          if (onFocus()) {
            setEnabled(false);
            cancelAnimationFrame(frame);
            return;
          }
          frame = requestAnimationFrame(forwardFocus);
        }
        frame = requestAnimationFrame(forwardFocus);
      }
    }
  );
}

// src/utils/stable-collection.tsx
var React23 = __toESM(__webpack_require__(/*! react */ "react"), 1);
var StableCollectionContext = React23.createContext(null);
function createCollection() {
  return {
    /** @type {Map<string, Map<string, number>>} */
    groups: /* @__PURE__ */ new Map(),
    get(group, key) {
      var _a3;
      let list = this.groups.get(group);
      if (!list) {
        list = /* @__PURE__ */ new Map();
        this.groups.set(group, list);
      }
      let renders = (_a3 = list.get(key)) != null ? _a3 : 0;
      list.set(key, renders + 1);
      let index = Array.from(list.keys()).indexOf(key);
      function release() {
        let renders2 = list.get(key);
        if (renders2 > 1) {
          list.set(key, renders2 - 1);
        } else {
          list.delete(key);
        }
      }
      return [index, release];
    }
  };
}
function StableCollection({ children }) {
  let collection = React23.useRef(createCollection());
  return /* @__PURE__ */ React23.createElement(StableCollectionContext.Provider, { value: collection }, children);
}
function useStableCollectionIndex(group) {
  let collection = React23.useContext(StableCollectionContext);
  if (!collection)
    throw new Error("You must wrap your component in a <StableCollection>");
  let key = useStableCollectionKey();
  let [idx, cleanupIdx] = collection.current.get(group, key);
  React23.useEffect(() => cleanupIdx, []);
  return idx;
}
function useStableCollectionKey() {
  var _a3, _b, _c;
  let owner = (
    // @ts-ignore
    (_c = (_b = (_a3 = React23.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) == null ? void 0 : _a3.ReactCurrentOwner) == null ? void 0 : _b.current) != null ? _c : null
  );
  if (!owner)
    return Symbol();
  let indexes = [];
  let fiber = owner;
  while (fiber) {
    indexes.push(fiber.index);
    fiber = fiber.return;
  }
  return "$." + indexes.join(".");
}

// src/components/tabs/tabs.tsx
var reducers8 = {
  [0 /* SetSelectedIndex */](state, action) {
    var _a3;
    let tabs = sortByDomNode(state.tabs, (tab) => tab.current);
    let panels = sortByDomNode(state.panels, (panel) => panel.current);
    let focusableTabs = tabs.filter((tab) => {
      var _a4;
      return !((_a4 = tab.current) == null ? void 0 : _a4.hasAttribute("disabled"));
    });
    let nextState = { ...state, tabs, panels };
    if (
      // Underflow
      action.index < 0 || // Overflow
      action.index > tabs.length - 1
    ) {
      let direction = match(Math.sign(action.index - state.selectedIndex), {
        [-1 /* Less */]: () => 1 /* Backwards */,
        [0 /* Equal */]: () => {
          return match(Math.sign(action.index), {
            [-1 /* Less */]: () => 0 /* Forwards */,
            [0 /* Equal */]: () => 0 /* Forwards */,
            [1 /* Greater */]: () => 1 /* Backwards */
          });
        },
        [1 /* Greater */]: () => 0 /* Forwards */
      });
      if (focusableTabs.length === 0) {
        return nextState;
      }
      return {
        ...nextState,
        selectedIndex: match(direction, {
          [0 /* Forwards */]: () => tabs.indexOf(focusableTabs[0]),
          [1 /* Backwards */]: () => tabs.indexOf(focusableTabs[focusableTabs.length - 1])
        })
      };
    }
    let before = tabs.slice(0, action.index);
    let after = tabs.slice(action.index);
    let next = [...after, ...before].find((tab) => focusableTabs.includes(tab));
    if (!next)
      return nextState;
    let selectedIndex = (_a3 = tabs.indexOf(next)) != null ? _a3 : state.selectedIndex;
    if (selectedIndex === -1)
      selectedIndex = state.selectedIndex;
    return { ...nextState, selectedIndex };
  },
  [1 /* RegisterTab */](state, action) {
    var _a3;
    if (state.tabs.includes(action.tab))
      return state;
    let activeTab = state.tabs[state.selectedIndex];
    let adjustedTabs = sortByDomNode([...state.tabs, action.tab], (tab) => tab.current);
    let selectedIndex = (_a3 = adjustedTabs.indexOf(activeTab)) != null ? _a3 : state.selectedIndex;
    if (selectedIndex === -1)
      selectedIndex = state.selectedIndex;
    return { ...state, tabs: adjustedTabs, selectedIndex };
  },
  [2 /* UnregisterTab */](state, action) {
    return { ...state, tabs: state.tabs.filter((tab) => tab !== action.tab) };
  },
  [3 /* RegisterPanel */](state, action) {
    if (state.panels.includes(action.panel))
      return state;
    return {
      ...state,
      panels: sortByDomNode([...state.panels, action.panel], (panel) => panel.current)
    };
  },
  [4 /* UnregisterPanel */](state, action) {
    return { ...state, panels: state.panels.filter((panel) => panel !== action.panel) };
  }
};
var TabsDataContext = (0, import_react43.createContext)(null);
TabsDataContext.displayName = "TabsDataContext";
function useData4(component) {
  let context = (0, import_react43.useContext)(TabsDataContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <Tab.Group /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useData4);
    throw err;
  }
  return context;
}
var TabsActionsContext = (0, import_react43.createContext)(null);
TabsActionsContext.displayName = "TabsActionsContext";
function useActions4(component) {
  let context = (0, import_react43.useContext)(TabsActionsContext);
  if (context === null) {
    let err = new Error(`<${component} /> is missing a parent <Tab.Group /> component.`);
    if (Error.captureStackTrace)
      Error.captureStackTrace(err, useActions4);
    throw err;
  }
  return context;
}
function stateReducer8(state, action) {
  return match(action.type, reducers8, state, action);
}
var DEFAULT_TABS_TAG = import_react43.Fragment;
function GroupFn4(props, ref) {
  let {
    defaultIndex = 0,
    vertical = false,
    manual = false,
    onChange,
    selectedIndex = null,
    ...theirProps
  } = props;
  const orientation = vertical ? "vertical" : "horizontal";
  const activation = manual ? "manual" : "auto";
  let isControlled = selectedIndex !== null;
  let tabsRef = useSyncRefs(ref);
  let [state, dispatch] = (0, import_react43.useReducer)(stateReducer8, {
    selectedIndex: selectedIndex != null ? selectedIndex : defaultIndex,
    tabs: [],
    panels: []
  });
  let slot = (0, import_react43.useMemo)(() => ({ selectedIndex: state.selectedIndex }), [state.selectedIndex]);
  let onChangeRef = useLatestValue(onChange || (() => {
  }));
  let stableTabsRef = useLatestValue(state.tabs);
  let tabsData = (0, import_react43.useMemo)(
    () => ({ orientation, activation, ...state }),
    [orientation, activation, state]
  );
  let registerTab = useEvent((tab) => {
    dispatch({ type: 1 /* RegisterTab */, tab });
    return () => dispatch({ type: 2 /* UnregisterTab */, tab });
  });
  let registerPanel = useEvent((panel) => {
    dispatch({ type: 3 /* RegisterPanel */, panel });
    return () => dispatch({ type: 4 /* UnregisterPanel */, panel });
  });
  let change = useEvent((index) => {
    if (realSelectedIndex.current !== index) {
      onChangeRef.current(index);
    }
    if (!isControlled) {
      dispatch({ type: 0 /* SetSelectedIndex */, index });
    }
  });
  let realSelectedIndex = useLatestValue(isControlled ? props.selectedIndex : state.selectedIndex);
  let tabsActions = (0, import_react43.useMemo)(() => ({ registerTab, registerPanel, change }), []);
  useIsoMorphicEffect(() => {
    dispatch({ type: 0 /* SetSelectedIndex */, index: selectedIndex != null ? selectedIndex : defaultIndex });
  }, [
    selectedIndex
    /* Deliberately skipping defaultIndex */
  ]);
  useIsoMorphicEffect(() => {
    if (realSelectedIndex.current === void 0)
      return;
    if (state.tabs.length <= 0)
      return;
    let sorted = sortByDomNode(state.tabs, (tab) => tab.current);
    let didOrderChange = sorted.some((tab, i) => state.tabs[i] !== tab);
    if (didOrderChange) {
      change(sorted.indexOf(state.tabs[realSelectedIndex.current]));
    }
  });
  let ourProps = { ref: tabsRef };
  return /* @__PURE__ */ import_react43.default.createElement(StableCollection, null, /* @__PURE__ */ import_react43.default.createElement(TabsActionsContext.Provider, { value: tabsActions }, /* @__PURE__ */ import_react43.default.createElement(TabsDataContext.Provider, { value: tabsData }, tabsData.tabs.length <= 0 && /* @__PURE__ */ import_react43.default.createElement(
    FocusSentinel,
    {
      onFocus: () => {
        var _a3, _b;
        for (let tab of stableTabsRef.current) {
          if (((_a3 = tab.current) == null ? void 0 : _a3.tabIndex) === 0) {
            (_b = tab.current) == null ? void 0 : _b.focus();
            return true;
          }
        }
        return false;
      }
    }
  ), render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_TABS_TAG,
    name: "Tabs"
  }))));
}
var DEFAULT_LIST_TAG = "div";
function ListFn(props, ref) {
  let { orientation, selectedIndex } = useData4("Tab.List");
  let listRef = useSyncRefs(ref);
  let slot = { selectedIndex };
  let theirProps = props;
  let ourProps = {
    ref: listRef,
    role: "tablist",
    "aria-orientation": orientation
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_LIST_TAG,
    name: "Tabs.List"
  });
}
var DEFAULT_TAB_TAG = "button";
function TabFn(props, ref) {
  var _a3, _b;
  let internalId = useId();
  let { id = `headlessui-tabs-tab-${internalId}`, ...theirProps } = props;
  let { orientation, activation, selectedIndex, tabs, panels } = useData4("Tab");
  let actions = useActions4("Tab");
  let data = useData4("Tab");
  let internalTabRef = (0, import_react43.useRef)(null);
  let tabRef = useSyncRefs(internalTabRef, ref);
  useIsoMorphicEffect(() => actions.registerTab(internalTabRef), [actions, internalTabRef]);
  let mySSRIndex = useStableCollectionIndex("tabs");
  let myIndex = tabs.indexOf(internalTabRef);
  if (myIndex === -1)
    myIndex = mySSRIndex;
  let selected = myIndex === selectedIndex;
  let activateUsing = useEvent((cb) => {
    var _a4;
    let result = cb();
    if (result === 2 /* Success */ && activation === "auto") {
      let newTab = (_a4 = getOwnerDocument(internalTabRef)) == null ? void 0 : _a4.activeElement;
      let idx = data.tabs.findIndex((tab) => tab.current === newTab);
      if (idx !== -1)
        actions.change(idx);
    }
    return result;
  });
  let handleKeyDown = useEvent((event) => {
    let list = tabs.map((tab) => tab.current).filter(Boolean);
    if (event.key === " " /* Space */ || event.key === "Enter" /* Enter */) {
      event.preventDefault();
      event.stopPropagation();
      actions.change(myIndex);
      return;
    }
    switch (event.key) {
      case "Home" /* Home */:
      case "PageUp" /* PageUp */:
        event.preventDefault();
        event.stopPropagation();
        return activateUsing(() => focusIn(list, 1 /* First */));
      case "End" /* End */:
      case "PageDown" /* PageDown */:
        event.preventDefault();
        event.stopPropagation();
        return activateUsing(() => focusIn(list, 8 /* Last */));
    }
    let result = activateUsing(() => {
      return match(orientation, {
        vertical() {
          if (event.key === "ArrowUp" /* ArrowUp */)
            return focusIn(list, 2 /* Previous */ | 16 /* WrapAround */);
          if (event.key === "ArrowDown" /* ArrowDown */)
            return focusIn(list, 4 /* Next */ | 16 /* WrapAround */);
          return 0 /* Error */;
        },
        horizontal() {
          if (event.key === "ArrowLeft" /* ArrowLeft */)
            return focusIn(list, 2 /* Previous */ | 16 /* WrapAround */);
          if (event.key === "ArrowRight" /* ArrowRight */)
            return focusIn(list, 4 /* Next */ | 16 /* WrapAround */);
          return 0 /* Error */;
        }
      });
    });
    if (result === 2 /* Success */) {
      return event.preventDefault();
    }
  });
  let ready = (0, import_react43.useRef)(false);
  let handleSelection = useEvent(() => {
    var _a4;
    if (ready.current)
      return;
    ready.current = true;
    (_a4 = internalTabRef.current) == null ? void 0 : _a4.focus();
    actions.change(myIndex);
    microTask(() => {
      ready.current = false;
    });
  });
  let handleMouseDown = useEvent((event) => {
    event.preventDefault();
  });
  let slot = (0, import_react43.useMemo)(() => ({ selected }), [selected]);
  let ourProps = {
    ref: tabRef,
    onKeyDown: handleKeyDown,
    onMouseDown: handleMouseDown,
    onClick: handleSelection,
    id,
    role: "tab",
    type: useResolveButtonType(props, internalTabRef),
    "aria-controls": (_b = (_a3 = panels[myIndex]) == null ? void 0 : _a3.current) == null ? void 0 : _b.id,
    "aria-selected": selected,
    tabIndex: selected ? 0 : -1
  };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_TAB_TAG,
    name: "Tabs.Tab"
  });
}
var DEFAULT_PANELS_TAG = "div";
function PanelsFn(props, ref) {
  let { selectedIndex } = useData4("Tab.Panels");
  let panelsRef = useSyncRefs(ref);
  let slot = (0, import_react43.useMemo)(() => ({ selectedIndex }), [selectedIndex]);
  let theirProps = props;
  let ourProps = { ref: panelsRef };
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_PANELS_TAG,
    name: "Tabs.Panels"
  });
}
var DEFAULT_PANEL_TAG4 = "div";
var PanelRenderFeatures3 = 1 /* RenderStrategy */ | 2 /* Static */;
function PanelFn4(props, ref) {
  var _a3, _b, _c, _d;
  let internalId = useId();
  let { id = `headlessui-tabs-panel-${internalId}`, tabIndex = 0, ...theirProps } = props;
  let { selectedIndex, tabs, panels } = useData4("Tab.Panel");
  let actions = useActions4("Tab.Panel");
  let internalPanelRef = (0, import_react43.useRef)(null);
  let panelRef = useSyncRefs(internalPanelRef, ref);
  useIsoMorphicEffect(() => actions.registerPanel(internalPanelRef), [actions, internalPanelRef]);
  let mySSRIndex = useStableCollectionIndex("panels");
  let myIndex = panels.indexOf(internalPanelRef);
  if (myIndex === -1)
    myIndex = mySSRIndex;
  let selected = myIndex === selectedIndex;
  let slot = (0, import_react43.useMemo)(() => ({ selected }), [selected]);
  let ourProps = {
    ref: panelRef,
    id,
    role: "tabpanel",
    "aria-labelledby": (_b = (_a3 = tabs[myIndex]) == null ? void 0 : _a3.current) == null ? void 0 : _b.id,
    tabIndex: selected ? tabIndex : -1
  };
  if (!selected && ((_c = theirProps.unmount) != null ? _c : true) && !((_d = theirProps.static) != null ? _d : false)) {
    return /* @__PURE__ */ import_react43.default.createElement(Hidden, { as: "span", ...ourProps });
  }
  return render({
    ourProps,
    theirProps,
    slot,
    defaultTag: DEFAULT_PANEL_TAG4,
    features: PanelRenderFeatures3,
    visible: selected,
    name: "Tabs.Panel"
  });
}
var TabRoot = forwardRefWithAs(TabFn);
var Group4 = forwardRefWithAs(GroupFn4);
var List = forwardRefWithAs(ListFn);
var Panels = forwardRefWithAs(PanelsFn);
var Panel4 = forwardRefWithAs(PanelFn4);
var Tab = Object.assign(TabRoot, { Group: Group4, List, Panels, Panel: Panel4 });

// src/components/transitions/transition.tsx
var import_react44 = __toESM(__webpack_require__(/*! react */ "react"), 1);

// src/utils/once.ts
function once(cb) {
  let state = { called: false };
  return (...args) => {
    if (state.called)
      return;
    state.called = true;
    return cb(...args);
  };
}

// src/components/transitions/utils/transition.ts
function addClasses(node, ...classes) {
  node && classes.length > 0 && node.classList.add(...classes);
}
function removeClasses(node, ...classes) {
  node && classes.length > 0 && node.classList.remove(...classes);
}
function waitForTransition(node, done) {
  let d = disposables();
  if (!node)
    return d.dispose;
  let { transitionDuration, transitionDelay } = getComputedStyle(node);
  let [durationMs, delayMs] = [transitionDuration, transitionDelay].map((value) => {
    let [resolvedValue = 0] = value.split(",").filter(Boolean).map((v) => v.includes("ms") ? parseFloat(v) : parseFloat(v) * 1e3).sort((a, z) => z - a);
    return resolvedValue;
  });
  let totalDuration = durationMs + delayMs;
  if (totalDuration !== 0) {
    if (false) {} else {
      d.group((d2) => {
        d2.setTimeout(() => {
          done();
          d2.dispose();
        }, totalDuration);
        d2.addEventListener(node, "transitionrun", (event) => {
          if (event.target !== event.currentTarget)
            return;
          d2.dispose();
        });
      });
      let dispose = d.addEventListener(node, "transitionend", (event) => {
        if (event.target !== event.currentTarget)
          return;
        done();
        dispose();
      });
    }
  } else {
    done();
  }
  d.add(() => done());
  return d.dispose;
}
function transition(node, classes, show, done) {
  let direction = show ? "enter" : "leave";
  let d = disposables();
  let _done = done !== void 0 ? once(done) : () => {
  };
  if (direction === "enter") {
    node.removeAttribute("hidden");
    node.style.display = "";
  }
  let base = match(direction, {
    enter: () => classes.enter,
    leave: () => classes.leave
  });
  let to = match(direction, {
    enter: () => classes.enterTo,
    leave: () => classes.leaveTo
  });
  let from = match(direction, {
    enter: () => classes.enterFrom,
    leave: () => classes.leaveFrom
  });
  removeClasses(
    node,
    ...classes.enter,
    ...classes.enterTo,
    ...classes.enterFrom,
    ...classes.leave,
    ...classes.leaveFrom,
    ...classes.leaveTo,
    ...classes.entered
  );
  addClasses(node, ...base, ...from);
  d.nextFrame(() => {
    removeClasses(node, ...from);
    addClasses(node, ...to);
    waitForTransition(node, () => {
      removeClasses(node, ...base);
      addClasses(node, ...classes.entered);
      return _done();
    });
  });
  return d.dispose;
}

// src/hooks/use-transition.ts
function useTransition({ container, direction, classes, onStart, onStop }) {
  let mounted = useIsMounted();
  let d = useDisposables();
  let latestDirection = useLatestValue(direction);
  useIsoMorphicEffect(() => {
    let dd = disposables();
    d.add(dd.dispose);
    let node = container.current;
    if (!node)
      return;
    if (latestDirection.current === "idle")
      return;
    if (!mounted.current)
      return;
    dd.dispose();
    onStart.current(latestDirection.current);
    dd.add(
      transition(node, classes.current, latestDirection.current === "enter", () => {
        dd.dispose();
        onStop.current(latestDirection.current);
      })
    );
    return dd.dispose;
  }, [direction]);
}

// src/components/transitions/transition.tsx
function splitClasses(classes = "") {
  return classes.split(" ").filter((className) => className.trim().length > 1);
}
var TransitionContext = (0, import_react44.createContext)(null);
TransitionContext.displayName = "TransitionContext";
function useTransitionContext() {
  let context = (0, import_react44.useContext)(TransitionContext);
  if (context === null) {
    throw new Error(
      "A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />."
    );
  }
  return context;
}
function useParentNesting() {
  let context = (0, import_react44.useContext)(NestingContext);
  if (context === null) {
    throw new Error(
      "A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />."
    );
  }
  return context;
}
var NestingContext = (0, import_react44.createContext)(null);
NestingContext.displayName = "NestingContext";
function hasChildren(bag) {
  if ("children" in bag)
    return hasChildren(bag.children);
  return bag.current.filter(({ el }) => el.current !== null).filter(({ state }) => state === "visible" /* Visible */).length > 0;
}
function useNesting(done, parent) {
  let doneRef = useLatestValue(done);
  let transitionableChildren = (0, import_react44.useRef)([]);
  let mounted = useIsMounted();
  let d = useDisposables();
  let unregister = useEvent((container, strategy = 1 /* Hidden */) => {
    let idx = transitionableChildren.current.findIndex(({ el }) => el === container);
    if (idx === -1)
      return;
    match(strategy, {
      [0 /* Unmount */]() {
        transitionableChildren.current.splice(idx, 1);
      },
      [1 /* Hidden */]() {
        transitionableChildren.current[idx].state = "hidden" /* Hidden */;
      }
    });
    d.microTask(() => {
      var _a3;
      if (!hasChildren(transitionableChildren) && mounted.current) {
        (_a3 = doneRef.current) == null ? void 0 : _a3.call(doneRef);
      }
    });
  });
  let register = useEvent((container) => {
    let child = transitionableChildren.current.find(({ el }) => el === container);
    if (!child) {
      transitionableChildren.current.push({ el: container, state: "visible" /* Visible */ });
    } else if (child.state !== "visible" /* Visible */) {
      child.state = "visible" /* Visible */;
    }
    return () => unregister(container, 0 /* Unmount */);
  });
  let todos = (0, import_react44.useRef)([]);
  let wait = (0, import_react44.useRef)(Promise.resolve());
  let chains = (0, import_react44.useRef)({
    enter: [],
    leave: [],
    idle: []
  });
  let onStart = useEvent(
    (container, direction, cb) => {
      todos.current.splice(0);
      if (parent) {
        parent.chains.current[direction] = parent.chains.current[direction].filter(
          ([containerInParent]) => containerInParent !== container
        );
      }
      parent == null ? void 0 : parent.chains.current[direction].push([
        container,
        new Promise((resolve) => {
          todos.current.push(resolve);
        })
      ]);
      parent == null ? void 0 : parent.chains.current[direction].push([
        container,
        new Promise((resolve) => {
          Promise.all(chains.current[direction].map(([_container, promise]) => promise)).then(
            () => resolve()
          );
        })
      ]);
      if (direction === "enter") {
        wait.current = wait.current.then(() => parent == null ? void 0 : parent.wait.current).then(() => cb(direction));
      } else {
        cb(direction);
      }
    }
  );
  let onStop = useEvent(
    (_container, direction, cb) => {
      Promise.all(chains.current[direction].splice(0).map(([_container2, promise]) => promise)).then(() => {
        var _a3;
        (_a3 = todos.current.shift()) == null ? void 0 : _a3();
      }).then(() => cb(direction));
    }
  );
  return (0, import_react44.useMemo)(
    () => ({
      children: transitionableChildren,
      register,
      unregister,
      onStart,
      onStop,
      wait,
      chains
    }),
    [register, unregister, transitionableChildren, onStart, onStop, chains, wait]
  );
}
function noop() {
}
var eventNames = ["beforeEnter", "afterEnter", "beforeLeave", "afterLeave"];
function ensureEventHooksExist(events) {
  var _a3;
  let result = {};
  for (let name of eventNames) {
    result[name] = (_a3 = events[name]) != null ? _a3 : noop;
  }
  return result;
}
function useEvents(events) {
  let eventsRef = (0, import_react44.useRef)(ensureEventHooksExist(events));
  (0, import_react44.useEffect)(() => {
    eventsRef.current = ensureEventHooksExist(events);
  }, [events]);
  return eventsRef;
}
var DEFAULT_TRANSITION_CHILD_TAG = "div";
var TransitionChildRenderFeatures = 1 /* RenderStrategy */;
function TransitionChildFn(props, ref) {
  let {
    // Event "handlers"
    beforeEnter,
    afterEnter,
    beforeLeave,
    afterLeave,
    // Class names
    enter,
    enterFrom,
    enterTo,
    entered,
    leave,
    leaveFrom,
    leaveTo,
    // @ts-expect-error
    ...rest
  } = props;
  let container = (0, import_react44.useRef)(null);
  let transitionRef = useSyncRefs(container, ref);
  let strategy = rest.unmount ? 0 /* Unmount */ : 1 /* Hidden */;
  let { show, appear, initial } = useTransitionContext();
  let [state, setState] = (0, import_react44.useState)(show ? "visible" /* Visible */ : "hidden" /* Hidden */);
  let parentNesting = useParentNesting();
  let { register, unregister } = parentNesting;
  let prevShow = (0, import_react44.useRef)(null);
  (0, import_react44.useEffect)(() => register(container), [register, container]);
  (0, import_react44.useEffect)(() => {
    if (strategy !== 1 /* Hidden */)
      return;
    if (!container.current)
      return;
    if (show && state !== "visible" /* Visible */) {
      setState("visible" /* Visible */);
      return;
    }
    return match(state, {
      ["hidden" /* Hidden */]: () => unregister(container),
      ["visible" /* Visible */]: () => register(container)
    });
  }, [state, container, register, unregister, show, strategy]);
  let classes = useLatestValue({
    enter: splitClasses(enter),
    enterFrom: splitClasses(enterFrom),
    enterTo: splitClasses(enterTo),
    entered: splitClasses(entered),
    leave: splitClasses(leave),
    leaveFrom: splitClasses(leaveFrom),
    leaveTo: splitClasses(leaveTo)
  });
  let events = useEvents({
    beforeEnter,
    afterEnter,
    beforeLeave,
    afterLeave
  });
  let ready = useServerHandoffComplete();
  (0, import_react44.useEffect)(() => {
    if (ready && state === "visible" /* Visible */ && container.current === null) {
      throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
    }
  }, [container, state, ready]);
  let skip = initial && !appear;
  let transitionDirection = (() => {
    if (!ready)
      return "idle";
    if (skip)
      return "idle";
    if (prevShow.current === show)
      return "idle";
    return show ? "enter" : "leave";
  })();
  let transitionStateFlags = useFlags(0);
  let beforeEvent = useEvent((direction) => {
    return match(direction, {
      enter: () => {
        transitionStateFlags.addFlag(8 /* Opening */);
        events.current.beforeEnter();
      },
      leave: () => {
        transitionStateFlags.addFlag(4 /* Closing */);
        events.current.beforeLeave();
      },
      idle: () => {
      }
    });
  });
  let afterEvent = useEvent((direction) => {
    return match(direction, {
      enter: () => {
        transitionStateFlags.removeFlag(8 /* Opening */);
        events.current.afterEnter();
      },
      leave: () => {
        transitionStateFlags.removeFlag(4 /* Closing */);
        events.current.afterLeave();
      },
      idle: () => {
      }
    });
  });
  let nesting = useNesting(() => {
    setState("hidden" /* Hidden */);
    unregister(container);
  }, parentNesting);
  useTransition({
    container,
    classes,
    direction: transitionDirection,
    onStart: useLatestValue((direction) => {
      nesting.onStart(container, direction, beforeEvent);
    }),
    onStop: useLatestValue((direction) => {
      nesting.onStop(container, direction, afterEvent);
      if (direction === "leave" && !hasChildren(nesting)) {
        setState("hidden" /* Hidden */);
        unregister(container);
      }
    })
  });
  (0, import_react44.useEffect)(() => {
    if (!skip)
      return;
    if (strategy === 1 /* Hidden */) {
      prevShow.current = null;
    } else {
      prevShow.current = show;
    }
  }, [show, skip, state]);
  let theirProps = rest;
  let ourProps = { ref: transitionRef };
  if (appear && show && initial) {
    theirProps = {
      ...theirProps,
      // Already apply the `enter` and `enterFrom` on the server if required
      className: classNames(rest.className, ...classes.current.enter, ...classes.current.enterFrom)
    };
  }
  return /* @__PURE__ */ import_react44.default.createElement(NestingContext.Provider, { value: nesting }, /* @__PURE__ */ import_react44.default.createElement(
    OpenClosedProvider,
    {
      value: match(state, {
        ["visible" /* Visible */]: 1 /* Open */,
        ["hidden" /* Hidden */]: 2 /* Closed */
      }) | transitionStateFlags.flags
    },
    render({
      ourProps,
      theirProps,
      defaultTag: DEFAULT_TRANSITION_CHILD_TAG,
      features: TransitionChildRenderFeatures,
      visible: state === "visible" /* Visible */,
      name: "Transition.Child"
    })
  ));
}
function TransitionRootFn(props, ref) {
  let { show, appear = false, unmount, ...theirProps } = props;
  let internalTransitionRef = (0, import_react44.useRef)(null);
  let transitionRef = useSyncRefs(internalTransitionRef, ref);
  useServerHandoffComplete();
  let usesOpenClosedState = useOpenClosed();
  if (show === void 0 && usesOpenClosedState !== null) {
    show = (usesOpenClosedState & 1 /* Open */) === 1 /* Open */;
  }
  if (![true, false].includes(show)) {
    throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
  }
  let [state, setState] = (0, import_react44.useState)(show ? "visible" /* Visible */ : "hidden" /* Hidden */);
  let nestingBag = useNesting(() => {
    setState("hidden" /* Hidden */);
  });
  let [initial, setInitial] = (0, import_react44.useState)(true);
  let changes = (0, import_react44.useRef)([show]);
  useIsoMorphicEffect(() => {
    if (initial === false) {
      return;
    }
    if (changes.current[changes.current.length - 1] !== show) {
      changes.current.push(show);
      setInitial(false);
    }
  }, [changes, show]);
  let transitionBag = (0, import_react44.useMemo)(
    () => ({ show, appear, initial }),
    [show, appear, initial]
  );
  (0, import_react44.useEffect)(() => {
    if (show) {
      setState("visible" /* Visible */);
    } else if (!hasChildren(nestingBag)) {
      setState("hidden" /* Hidden */);
    } else if (true) {
      let node = internalTransitionRef.current;
      if (!node)
        return;
      let rect = node.getBoundingClientRect();
      if (rect.x === 0 && rect.y === 0 && rect.width === 0 && rect.height === 0) {
        setState("hidden" /* Hidden */);
      }
    }
  }, [show, nestingBag]);
  let sharedProps = { unmount };
  let beforeEnter = useEvent(() => {
    var _a3;
    if (initial)
      setInitial(false);
    (_a3 = props.beforeEnter) == null ? void 0 : _a3.call(props);
  });
  let beforeLeave = useEvent(() => {
    var _a3;
    if (initial)
      setInitial(false);
    (_a3 = props.beforeLeave) == null ? void 0 : _a3.call(props);
  });
  return /* @__PURE__ */ import_react44.default.createElement(NestingContext.Provider, { value: nestingBag }, /* @__PURE__ */ import_react44.default.createElement(TransitionContext.Provider, { value: transitionBag }, render({
    ourProps: {
      ...sharedProps,
      as: import_react44.Fragment,
      children: /* @__PURE__ */ import_react44.default.createElement(
        TransitionChild,
        {
          ref: transitionRef,
          ...sharedProps,
          ...theirProps,
          beforeEnter,
          beforeLeave
        }
      )
    },
    theirProps: {},
    defaultTag: import_react44.Fragment,
    features: TransitionChildRenderFeatures,
    visible: state === "visible" /* Visible */,
    name: "Transition"
  })));
}
function ChildFn(props, ref) {
  let hasTransitionContext = (0, import_react44.useContext)(TransitionContext) !== null;
  let hasOpenClosedContext = useOpenClosed() !== null;
  return /* @__PURE__ */ import_react44.default.createElement(import_react44.default.Fragment, null, !hasTransitionContext && hasOpenClosedContext ? (
    // @ts-expect-error This is an object
    /* @__PURE__ */ import_react44.default.createElement(TransitionRoot, { ref, ...props })
  ) : (
    // @ts-expect-error This is an object
    /* @__PURE__ */ import_react44.default.createElement(TransitionChild, { ref, ...props })
  ));
}
var TransitionRoot = forwardRefWithAs(TransitionRootFn);
var TransitionChild = forwardRefWithAs(TransitionChildFn);
var Child = forwardRefWithAs(ChildFn);
var Transition = Object.assign(TransitionRoot, { Child, Root: TransitionRoot });


/***/ }),

/***/ "../../../node_modules/@headlessui/react/dist/index.cjs":
/*!**************************************************************!*\
  !*** ../../../node_modules/@headlessui/react/dist/index.cjs ***!
  \**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {



if (false) {} else {
  module.exports = __webpack_require__(/*! ./headlessui.dev.cjs */ "../../../node_modules/@headlessui/react/dist/headlessui.dev.cjs")
}


/***/ }),

/***/ "../../../node_modules/@babel/runtime/helpers/extends.js":
/*!***************************************************************!*\
  !*** ../../../node_modules/@babel/runtime/helpers/extends.js ***!
  \***************************************************************/
/***/ (function(module) {



function _extends() {
  module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];
      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }
    return target;
  }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  return _extends.apply(this, arguments);
}
module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/global */
/******/ 	!function() {
/******/ 		__webpack_require__.g = (function() {
/******/ 			if (typeof globalThis === 'object') return globalThis;
/******/ 			try {
/******/ 				return this || new Function('return this')();
/******/ 			} catch (e) {
/******/ 				if (typeof window === 'object') return window;
/******/ 			}
/******/ 		})();
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	!function() {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = function(exports) {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/nonce */
/******/ 	!function() {
/******/ 		__webpack_require__.nc = undefined;
/******/ 	}();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
!function() {
var exports = __webpack_exports__;
/*!****************!*\
  !*** ./cdn.ts ***!
  \****************/


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var GraphiQLReact = _interopRequireWildcard(__webpack_require__(/*! @graphiql/react */ "../../graphiql-react/dist/index.js"));
var _toolkit = __webpack_require__(/*! @graphiql/toolkit */ "../../graphiql-toolkit/esm/index.js");
var GraphQL = _interopRequireWildcard(__webpack_require__(/*! graphql */ "../../../node_modules/graphql/index.mjs"));
var _GraphiQL = __webpack_require__(/*! ./components/GraphiQL */ "./components/GraphiQL.tsx");
__webpack_require__(/*! @graphiql/react/font/roboto.css */ "../../graphiql-react/font/roboto.css");
__webpack_require__(/*! @graphiql/react/font/fira-code.css */ "../../graphiql-react/font/fira-code.css");
__webpack_require__(/*! @graphiql/react/dist/style.css */ "../../graphiql-react/dist/style.css");
__webpack_require__(/*! ./style.css */ "./style.css");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 *  Copyright (c) 2021 GraphQL Contributors.
 *
 *  This source code is licensed under the MIT license found in the
 *  LICENSE file in the root directory of this source tree.
 */

/**
 * For the CDN bundle we add some static properties to the component function
 * so that they can be accessed in the inline-script in the HTML file.
 */

/**
 * This function is needed in order to easily create a fetcher function.
 */
// @ts-expect-error
_GraphiQL.GraphiQL.createFetcher = _toolkit.createGraphiQLFetcher;

/**
 * This function is needed in order to easily generate a custom storage namespace
 */
// @ts-expect-error
_GraphiQL.GraphiQL.createLocalStorage = _toolkit.createLocalStorage;

/**
 * We also add the complete `graphiql-js` exports so that this instance of
 * `graphiql-js` can be reused from plugin CDN bundles.
 */
// @ts-expect-error
_GraphiQL.GraphiQL.GraphQL = GraphQL;

/**
 * We also add the complete `@graphiql/react` exports. These will be included
 * in the bundle anyway since they make up the `GraphiQL` component, so by
 * doing this we can reuse them from plugin CDN bundles.
 */
// @ts-expect-error
_GraphiQL.GraphiQL.React = GraphiQLReact;
var _default = _GraphiQL.GraphiQL;
exports["default"] = _default;
}();
window.GraphiQL = __webpack_exports__["default"];
/******/ })()
;
//# sourceMappingURL=graphiql.min.js.map