var $5HoLl$tty = require("tty");
var $5HoLl$util = require("util");
var $5HoLl$fs = require("fs");
var $5HoLl$net = require("net");
var $5HoLl$url = require("url");
var $5HoLl$http = require("http");
var $5HoLl$https = require("https");
var $5HoLl$stream = require("stream");
var $5HoLl$assert = require("assert");
var $5HoLl$os = require("os");
var $5HoLl$path = require("path");
var $5HoLl$zlib = require("zlib");
var $5HoLl$querystring = require("querystring");
var $5HoLl$buffer = require("buffer");
var $5HoLl$crypto = require("crypto");
var $5HoLl$events = require("events");
var $5HoLl$tls = require("tls");
var $5HoLl$parcelplugin = require("@parcel/plugin");
var $5HoLl$parcelutils = require("@parcel/utils");
var $5HoLl$parcelsourcemap = require("@parcel/source-map");
var $5HoLl$parcelcodeframe = require("@parcel/codeframe");
var $5HoLl$child_process = require("child_process");
var $5HoLl$worker_threads = require("worker_threads");


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;
}

function $parcel$defineInteropFlag(a) {
  Object.defineProperty(a, '__esModule', {value: true, configurable: true});
}

      var $parcel$global = globalThis;
    
var $parcel$modules = {};
var $parcel$inits = {};

var parcelRequire = $parcel$global["parcelRequire0b48"];

if (parcelRequire == null) {
  parcelRequire = function(id) {
    if (id in $parcel$modules) {
      return $parcel$modules[id].exports;
    }
    if (id in $parcel$inits) {
      var init = $parcel$inits[id];
      delete $parcel$inits[id];
      var module = {id: id, exports: {}};
      $parcel$modules[id] = module;
      init.call(module.exports, module, module.exports);
      return module.exports;
    }
    var err = new Error("Cannot find module '" + id + "'");
    err.code = 'MODULE_NOT_FOUND';
    throw err;
  };

  parcelRequire.register = function register(id, init) {
    $parcel$inits[id] = init;
  };

  $parcel$global["parcelRequire0b48"] = parcelRequire;
}

var parcelRegister = parcelRequire.register;
parcelRegister("kE0E7", function(module, exports) {
/**
 * Detect Electron renderer process, which is node, but we should
 * treat as a browser.
 */ 

if (typeof process !== 'undefined' && process.type === 'renderer') module.exports = (parcelRequire("dWp8H"));
else module.exports = (parcelRequire("92yTM"));

});
parcelRegister("dWp8H", function(module, exports) {
/**
 * This is the web browser implementation of `debug()`.
 *
 * Expose `debug()` as the module.
 */ 
exports = module.exports = (parcelRequire("92iyT"));
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = 'undefined' != typeof chrome && 'undefined' != typeof chrome.storage ? chrome.storage.local : localstorage();
/**
 * Colors.
 */ exports.colors = [
    'lightseagreen',
    'forestgreen',
    'goldenrod',
    'dodgerblue',
    'darkorchid',
    'crimson'
];
/**
 * Currently only WebKit-based Web Inspectors, Firefox >= v31,
 * and the Firebug extension (any Firefox version) are known
 * to support "%c" CSS customizations.
 *
 * TODO: add a `localStorage` variable to explicitly enable/disable colors
 */ function useColors() {
    // NB: In an Electron preload script, document will be defined but not fully
    // initialized. Since we know we're in Chrome, we'll just detect this case
    // explicitly
    if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') return true;
    // is webkit? http://stackoverflow.com/a/16459606/376773
    // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
    return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // is firebug? http://stackoverflow.com/a/398120/376773
    typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // is firefox >= v31?
    // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
    typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // double check webkit in userAgent just in case we are in a worker
    typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
}
/**
 * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
 */ exports.formatters.j = function(v) {
    try {
        return JSON.stringify(v);
    } catch (err) {
        return '[UnexpectedJSONParseError]: ' + err.message;
    }
};
/**
 * Colorize log arguments if enabled.
 *
 * @api public
 */ function formatArgs(args) {
    var useColors = this.useColors;
    args[0] = (useColors ? '%c' : '') + this.namespace + (useColors ? ' %c' : ' ') + args[0] + (useColors ? '%c ' : ' ') + '+' + exports.humanize(this.diff);
    if (!useColors) return;
    var c = 'color: ' + this.color;
    args.splice(1, 0, c, 'color: inherit');
    // the final "%c" is somewhat tricky, because there could be other
    // arguments passed either before or after the %c, so we need to
    // figure out the correct index to insert the CSS into
    var index = 0;
    var lastC = 0;
    args[0].replace(/%[a-zA-Z%]/g, function(match) {
        if ('%%' === match) return;
        index++;
        if ('%c' === match) // we only are interested in the *last* %c
        // (the user may have provided their own)
        lastC = index;
    });
    args.splice(lastC, 0, c);
}
/**
 * Invokes `console.log()` when available.
 * No-op when `console.log` is not a "function".
 *
 * @api public
 */ function log() {
    // this hackery is required for IE8/9, where
    // the `console.log` function doesn't have 'apply'
    return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);
}
/**
 * Save `namespaces`.
 *
 * @param {String} namespaces
 * @api private
 */ function save(namespaces) {
    try {
        if (null == namespaces) exports.storage.removeItem('debug');
        else exports.storage.debug = namespaces;
    } catch (e) {}
}
/**
 * Load `namespaces`.
 *
 * @return {String} returns the previously persisted debug modes
 * @api private
 */ function load() {
    var r;
    try {
        r = exports.storage.debug;
    } catch (e) {}
    // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
    if (!r && typeof process !== 'undefined' && 'env' in process) r = process.env.DEBUG;
    return r;
}
/**
 * Enable namespaces listed in `localStorage.debug` initially.
 */ exports.enable(load());
/**
 * Localstorage attempts to return the localstorage.
 *
 * This is necessary because safari throws
 * when a user disables cookies/localstorage
 * and you attempt to access it.
 *
 * @return {LocalStorage}
 * @api private
 */ function localstorage() {
    try {
        return window.localStorage;
    } catch (e) {}
}

});
parcelRegister("92iyT", function(module, exports) {
/**
 * This is the common logic for both the Node.js and web browser
 * implementations of `debug()`.
 *
 * Expose `debug()` as the module.
 */ exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
exports.coerce = coerce;
exports.disable = disable;
exports.enable = enable;
exports.enabled = enabled;

exports.humanize = (parcelRequire("blMw6"));
/**
 * The currently active debug mode names, and names to skip.
 */ exports.names = [];
exports.skips = [];
/**
 * Map of special "%n" handling functions, for the debug "format" argument.
 *
 * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
 */ exports.formatters = {};
/**
 * Previous log timestamp.
 */ var prevTime;
/**
 * Select a color.
 * @param {String} namespace
 * @return {Number}
 * @api private
 */ function selectColor(namespace) {
    var hash = 0, i;
    for(i in namespace){
        hash = (hash << 5) - hash + namespace.charCodeAt(i);
        hash |= 0; // Convert to 32bit integer
    }
    return exports.colors[Math.abs(hash) % exports.colors.length];
}
/**
 * Create a debugger with the given `namespace`.
 *
 * @param {String} namespace
 * @return {Function}
 * @api public
 */ function createDebug(namespace) {
    function debug() {
        // disabled?
        if (!debug.enabled) return;
        var self = debug;
        // set `diff` timestamp
        var curr = +new Date();
        var ms = curr - (prevTime || curr);
        self.diff = ms;
        self.prev = prevTime;
        self.curr = curr;
        prevTime = curr;
        // turn the `arguments` into a proper Array
        var args = new Array(arguments.length);
        for(var i = 0; i < args.length; i++)args[i] = arguments[i];
        args[0] = exports.coerce(args[0]);
        if ('string' !== typeof args[0]) // anything else let's inspect with %O
        args.unshift('%O');
        // apply any `formatters` transformations
        var index = 0;
        args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
            // if we encounter an escaped % then don't increase the array index
            if (match === '%%') return match;
            index++;
            var formatter = exports.formatters[format];
            if ('function' === typeof formatter) {
                var val = args[index];
                match = formatter.call(self, val);
                // now we need to remove `args[index]` since it's inlined in the `format`
                args.splice(index, 1);
                index--;
            }
            return match;
        });
        // apply env-specific formatting (colors, etc.)
        exports.formatArgs.call(self, args);
        var logFn = debug.log || exports.log || console.log.bind(console);
        logFn.apply(self, args);
    }
    debug.namespace = namespace;
    debug.enabled = exports.enabled(namespace);
    debug.useColors = exports.useColors();
    debug.color = selectColor(namespace);
    // env-specific initialization logic for debug instances
    if ('function' === typeof exports.init) exports.init(debug);
    return debug;
}
/**
 * Enables a debug mode by namespaces. This can include modes
 * separated by a colon and wildcards.
 *
 * @param {String} namespaces
 * @api public
 */ function enable(namespaces) {
    exports.save(namespaces);
    exports.names = [];
    exports.skips = [];
    var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
    var len = split.length;
    for(var i = 0; i < len; i++){
        if (!split[i]) continue; // ignore empty strings
        namespaces = split[i].replace(/\*/g, '.*?');
        if (namespaces[0] === '-') exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
        else exports.names.push(new RegExp('^' + namespaces + '$'));
    }
}
/**
 * Disable debug output.
 *
 * @api public
 */ function disable() {
    exports.enable('');
}
/**
 * Returns true if the given mode name is enabled, false otherwise.
 *
 * @param {String} name
 * @return {Boolean}
 * @api public
 */ function enabled(name) {
    var i, len;
    for(i = 0, len = exports.skips.length; i < len; i++){
        if (exports.skips[i].test(name)) return false;
    }
    for(i = 0, len = exports.names.length; i < len; i++){
        if (exports.names[i].test(name)) return true;
    }
    return false;
}
/**
 * Coerce `val`.
 *
 * @param {Mixed} val
 * @return {Mixed}
 * @api private
 */ function coerce(val) {
    if (val instanceof Error) return val.stack || val.message;
    return val;
}

});
parcelRegister("blMw6", function(module, exports) {
/**
 * Helpers.
 */ var $84374a4bd003b27c$var$s = 1000;
var $84374a4bd003b27c$var$m = $84374a4bd003b27c$var$s * 60;
var $84374a4bd003b27c$var$h = $84374a4bd003b27c$var$m * 60;
var $84374a4bd003b27c$var$d = $84374a4bd003b27c$var$h * 24;
var $84374a4bd003b27c$var$y = $84374a4bd003b27c$var$d * 365.25;
/**
 * Parse or format the given `val`.
 *
 * Options:
 *
 *  - `long` verbose formatting [false]
 *
 * @param {String|Number} val
 * @param {Object} [options]
 * @throws {Error} throw an error if val is not a non-empty string or a number
 * @return {String|Number}
 * @api public
 */ module.exports = function(val, options) {
    options = options || {};
    var type = typeof val;
    if (type === 'string' && val.length > 0) return $84374a4bd003b27c$var$parse(val);
    else if (type === 'number' && isNaN(val) === false) return options.long ? $84374a4bd003b27c$var$fmtLong(val) : $84374a4bd003b27c$var$fmtShort(val);
    throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
};
/**
 * Parse the given `str` and return milliseconds.
 *
 * @param {String} str
 * @return {Number}
 * @api private
 */ function $84374a4bd003b27c$var$parse(str) {
    str = String(str);
    if (str.length > 100) return;
    var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
    if (!match) return;
    var n = parseFloat(match[1]);
    var type = (match[2] || 'ms').toLowerCase();
    switch(type){
        case 'years':
        case 'year':
        case 'yrs':
        case 'yr':
        case 'y':
            return n * $84374a4bd003b27c$var$y;
        case 'days':
        case 'day':
        case 'd':
            return n * $84374a4bd003b27c$var$d;
        case 'hours':
        case 'hour':
        case 'hrs':
        case 'hr':
        case 'h':
            return n * $84374a4bd003b27c$var$h;
        case 'minutes':
        case 'minute':
        case 'mins':
        case 'min':
        case 'm':
            return n * $84374a4bd003b27c$var$m;
        case 'seconds':
        case 'second':
        case 'secs':
        case 'sec':
        case 's':
            return n * $84374a4bd003b27c$var$s;
        case 'milliseconds':
        case 'millisecond':
        case 'msecs':
        case 'msec':
        case 'ms':
            return n;
        default:
            return undefined;
    }
}
/**
 * Short format for `ms`.
 *
 * @param {Number} ms
 * @return {String}
 * @api private
 */ function $84374a4bd003b27c$var$fmtShort(ms) {
    if (ms >= $84374a4bd003b27c$var$d) return Math.round(ms / $84374a4bd003b27c$var$d) + 'd';
    if (ms >= $84374a4bd003b27c$var$h) return Math.round(ms / $84374a4bd003b27c$var$h) + 'h';
    if (ms >= $84374a4bd003b27c$var$m) return Math.round(ms / $84374a4bd003b27c$var$m) + 'm';
    if (ms >= $84374a4bd003b27c$var$s) return Math.round(ms / $84374a4bd003b27c$var$s) + 's';
    return ms + 'ms';
}
/**
 * Long format for `ms`.
 *
 * @param {Number} ms
 * @return {String}
 * @api private
 */ function $84374a4bd003b27c$var$fmtLong(ms) {
    return $84374a4bd003b27c$var$plural(ms, $84374a4bd003b27c$var$d, 'day') || $84374a4bd003b27c$var$plural(ms, $84374a4bd003b27c$var$h, 'hour') || $84374a4bd003b27c$var$plural(ms, $84374a4bd003b27c$var$m, 'minute') || $84374a4bd003b27c$var$plural(ms, $84374a4bd003b27c$var$s, 'second') || ms + ' ms';
}
/**
 * Pluralization helper.
 */ function $84374a4bd003b27c$var$plural(ms, n, name) {
    if (ms < n) return;
    if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
    return Math.ceil(ms / n) + ' ' + name + 's';
}

});



parcelRegister("92yTM", function(module, exports) {
/**
 * Module dependencies.
 */ 


/**
 * This is the Node.js implementation of `debug()`.
 *
 * Expose `debug()` as the module.
 */ exports = module.exports = (parcelRequire("92iyT"));
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
/**
 * Colors.
 */ exports.colors = [
    6,
    2,
    3,
    4,
    5,
    1
];
/**
 * Build up the default `inspectOpts` object from the environment variables.
 *
 *   $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
 */ exports.inspectOpts = Object.keys(process.env).filter(function(key) {
    return /^debug_/i.test(key);
}).reduce(function(obj, key) {
    // camel-case
    var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
        return k.toUpperCase();
    });
    // coerce string value into JS value
    var val = process.env[key];
    if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
    else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
    else if (val === 'null') val = null;
    else val = Number(val);
    obj[prop] = val;
    return obj;
}, {});
/**
 * The file descriptor to write the `debug()` calls to.
 * Set the `DEBUG_FD` env variable to override with another value. i.e.:
 *
 *   $ DEBUG_FD=3 node script.js 3>debug.log
 */ var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
if (1 !== fd && 2 !== fd) $5HoLl$util.deprecate(function() {}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')();
var stream = 1 === fd ? process.stdout : 2 === fd ? process.stderr : createWritableStdioStream(fd);
/**
 * Is stdout a TTY? Colored output is enabled when `true`.
 */ function useColors() {
    return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : $5HoLl$tty.isatty(fd);
}
/**
 * Map %o to `util.inspect()`, all on a single line.
 */ exports.formatters.o = function(v) {
    this.inspectOpts.colors = this.useColors;
    return $5HoLl$util.inspect(v, this.inspectOpts).split('\n').map(function(str) {
        return str.trim();
    }).join(' ');
};
/**
 * Map %o to `util.inspect()`, allowing multiple lines if needed.
 */ exports.formatters.O = function(v) {
    this.inspectOpts.colors = this.useColors;
    return $5HoLl$util.inspect(v, this.inspectOpts);
};
/**
 * Adds ANSI color escape codes if enabled.
 *
 * @api public
 */ function formatArgs(args) {
    var name = this.namespace;
    var useColors = this.useColors;
    if (useColors) {
        var c = this.color;
        var prefix = '  \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
        args[0] = prefix + args[0].split('\n').join('\n' + prefix);
        args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
    } else args[0] = new Date().toUTCString() + ' ' + name + ' ' + args[0];
}
/**
 * Invokes `util.format()` with the specified arguments and writes to `stream`.
 */ function log() {
    return stream.write($5HoLl$util.format.apply($5HoLl$util, arguments) + '\n');
}
/**
 * Save `namespaces`.
 *
 * @param {String} namespaces
 * @api private
 */ function save(namespaces) {
    if (null == namespaces) // If you set a process.env field to null or undefined, it gets cast to the
    // string 'null' or 'undefined'. Just delete instead.
    delete process.env.DEBUG;
    else process.env.DEBUG = namespaces;
}
/**
 * Load `namespaces`.
 *
 * @return {String} returns the previously persisted debug modes
 * @api private
 */ function load() {
    return process.env.DEBUG;
}


/**
 * Copied from `node/src/node.js`.
 *
 * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
 * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
 */ function createWritableStdioStream(fd) {
    var stream;
    var tty_wrap = process.binding('tty_wrap');
    // Note stream._type is used for test-module-load-list.js
    switch(tty_wrap.guessHandleType(fd)){
        case 'TTY':
            stream = new $5HoLl$tty.WriteStream(fd);
            stream._type = 'tty';
            // Hack to have stream not keep the event loop alive.
            // See https://github.com/joyent/node/issues/1726
            if (stream._handle && stream._handle.unref) stream._handle.unref();
            break;
        case 'FILE':
            var fs = $5HoLl$fs;
            stream = new fs.SyncWriteStream(fd, {
                autoClose: false
            });
            stream._type = 'fs';
            break;
        case 'PIPE':
        case 'TCP':
            var net = $5HoLl$net;
            stream = new net.Socket({
                fd: fd,
                readable: false,
                writable: true
            });
            // FIXME Should probably have an option in net.Socket to create a
            // stream from an existing fd which is writable only. But for now
            // we'll just add this hack and set the `readable` member to false.
            // Test: ./node test/fixtures/echo.js < /etc/passwd
            stream.readable = false;
            stream.read = null;
            stream._type = 'pipe';
            // FIXME Hack to have stream not keep the event loop alive.
            // See https://github.com/joyent/node/issues/1726
            if (stream._handle && stream._handle.unref) stream._handle.unref();
            break;
        default:
            // Probably an error on in uv_guess_handle()
            throw new Error('Implement me. Unknown stream file type!');
    }
    // For supporting legacy API we put the FD here.
    stream.fd = fd;
    stream._isStdio = true;
    return stream;
}
/**
 * Init logic for `debug` instances.
 *
 * Create a new `inspectOpts` object in case `useColors` is set
 * differently for a particular `debug` instance.
 */ function init(debug) {
    debug.inspectOpts = {};
    var keys = Object.keys(exports.inspectOpts);
    for(var i = 0; i < keys.length; i++)debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
/**
 * Enable namespaces listed in `process.env.DEBUG` initially.
 */ exports.enable(load());

});


parcelRegister("iBluN", function(module, exports) {
/**
 * Detect Electron renderer process, which is node, but we should
 * treat as a browser.
 */ 

if (typeof process !== 'undefined' && process.type === 'renderer') module.exports = (parcelRequire("i8TtE"));
else module.exports = (parcelRequire("cGqbJ"));

});
parcelRegister("i8TtE", function(module, exports) {
/**
 * This is the web browser implementation of `debug()`.
 *
 * Expose `debug()` as the module.
 */ 
exports = module.exports = (parcelRequire("gOxX5"));
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = 'undefined' != typeof chrome && 'undefined' != typeof chrome.storage ? chrome.storage.local : localstorage();
/**
 * Colors.
 */ exports.colors = [
    'lightseagreen',
    'forestgreen',
    'goldenrod',
    'dodgerblue',
    'darkorchid',
    'crimson'
];
/**
 * Currently only WebKit-based Web Inspectors, Firefox >= v31,
 * and the Firebug extension (any Firefox version) are known
 * to support "%c" CSS customizations.
 *
 * TODO: add a `localStorage` variable to explicitly enable/disable colors
 */ function useColors() {
    // NB: In an Electron preload script, document will be defined but not fully
    // initialized. Since we know we're in Chrome, we'll just detect this case
    // explicitly
    if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') return true;
    // is webkit? http://stackoverflow.com/a/16459606/376773
    // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
    return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // is firebug? http://stackoverflow.com/a/398120/376773
    typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // is firefox >= v31?
    // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
    typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // double check webkit in userAgent just in case we are in a worker
    typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
}
/**
 * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
 */ exports.formatters.j = function(v) {
    try {
        return JSON.stringify(v);
    } catch (err) {
        return '[UnexpectedJSONParseError]: ' + err.message;
    }
};
/**
 * Colorize log arguments if enabled.
 *
 * @api public
 */ function formatArgs(args) {
    var useColors = this.useColors;
    args[0] = (useColors ? '%c' : '') + this.namespace + (useColors ? ' %c' : ' ') + args[0] + (useColors ? '%c ' : ' ') + '+' + exports.humanize(this.diff);
    if (!useColors) return;
    var c = 'color: ' + this.color;
    args.splice(1, 0, c, 'color: inherit');
    // the final "%c" is somewhat tricky, because there could be other
    // arguments passed either before or after the %c, so we need to
    // figure out the correct index to insert the CSS into
    var index = 0;
    var lastC = 0;
    args[0].replace(/%[a-zA-Z%]/g, function(match) {
        if ('%%' === match) return;
        index++;
        if ('%c' === match) // we only are interested in the *last* %c
        // (the user may have provided their own)
        lastC = index;
    });
    args.splice(lastC, 0, c);
}
/**
 * Invokes `console.log()` when available.
 * No-op when `console.log` is not a "function".
 *
 * @api public
 */ function log() {
    // this hackery is required for IE8/9, where
    // the `console.log` function doesn't have 'apply'
    return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);
}
/**
 * Save `namespaces`.
 *
 * @param {String} namespaces
 * @api private
 */ function save(namespaces) {
    try {
        if (null == namespaces) exports.storage.removeItem('debug');
        else exports.storage.debug = namespaces;
    } catch (e) {}
}
/**
 * Load `namespaces`.
 *
 * @return {String} returns the previously persisted debug modes
 * @api private
 */ function load() {
    var r;
    try {
        r = exports.storage.debug;
    } catch (e) {}
    // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
    if (!r && typeof process !== 'undefined' && 'env' in process) r = process.env.DEBUG;
    return r;
}
/**
 * Enable namespaces listed in `localStorage.debug` initially.
 */ exports.enable(load());
/**
 * Localstorage attempts to return the localstorage.
 *
 * This is necessary because safari throws
 * when a user disables cookies/localstorage
 * and you attempt to access it.
 *
 * @return {LocalStorage}
 * @api private
 */ function localstorage() {
    try {
        return window.localStorage;
    } catch (e) {}
}

});
parcelRegister("gOxX5", function(module, exports) {
/**
 * This is the common logic for both the Node.js and web browser
 * implementations of `debug()`.
 *
 * Expose `debug()` as the module.
 */ exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
exports.coerce = coerce;
exports.disable = disable;
exports.enable = enable;
exports.enabled = enabled;

exports.humanize = (parcelRequire("bzU5E"));
/**
 * The currently active debug mode names, and names to skip.
 */ exports.names = [];
exports.skips = [];
/**
 * Map of special "%n" handling functions, for the debug "format" argument.
 *
 * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
 */ exports.formatters = {};
/**
 * Previous log timestamp.
 */ var prevTime;
/**
 * Select a color.
 * @param {String} namespace
 * @return {Number}
 * @api private
 */ function selectColor(namespace) {
    var hash = 0, i;
    for(i in namespace){
        hash = (hash << 5) - hash + namespace.charCodeAt(i);
        hash |= 0; // Convert to 32bit integer
    }
    return exports.colors[Math.abs(hash) % exports.colors.length];
}
/**
 * Create a debugger with the given `namespace`.
 *
 * @param {String} namespace
 * @return {Function}
 * @api public
 */ function createDebug(namespace) {
    function debug() {
        // disabled?
        if (!debug.enabled) return;
        var self = debug;
        // set `diff` timestamp
        var curr = +new Date();
        var ms = curr - (prevTime || curr);
        self.diff = ms;
        self.prev = prevTime;
        self.curr = curr;
        prevTime = curr;
        // turn the `arguments` into a proper Array
        var args = new Array(arguments.length);
        for(var i = 0; i < args.length; i++)args[i] = arguments[i];
        args[0] = exports.coerce(args[0]);
        if ('string' !== typeof args[0]) // anything else let's inspect with %O
        args.unshift('%O');
        // apply any `formatters` transformations
        var index = 0;
        args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
            // if we encounter an escaped % then don't increase the array index
            if (match === '%%') return match;
            index++;
            var formatter = exports.formatters[format];
            if ('function' === typeof formatter) {
                var val = args[index];
                match = formatter.call(self, val);
                // now we need to remove `args[index]` since it's inlined in the `format`
                args.splice(index, 1);
                index--;
            }
            return match;
        });
        // apply env-specific formatting (colors, etc.)
        exports.formatArgs.call(self, args);
        var logFn = debug.log || exports.log || console.log.bind(console);
        logFn.apply(self, args);
    }
    debug.namespace = namespace;
    debug.enabled = exports.enabled(namespace);
    debug.useColors = exports.useColors();
    debug.color = selectColor(namespace);
    // env-specific initialization logic for debug instances
    if ('function' === typeof exports.init) exports.init(debug);
    return debug;
}
/**
 * Enables a debug mode by namespaces. This can include modes
 * separated by a colon and wildcards.
 *
 * @param {String} namespaces
 * @api public
 */ function enable(namespaces) {
    exports.save(namespaces);
    exports.names = [];
    exports.skips = [];
    var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
    var len = split.length;
    for(var i = 0; i < len; i++){
        if (!split[i]) continue; // ignore empty strings
        namespaces = split[i].replace(/\*/g, '.*?');
        if (namespaces[0] === '-') exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
        else exports.names.push(new RegExp('^' + namespaces + '$'));
    }
}
/**
 * Disable debug output.
 *
 * @api public
 */ function disable() {
    exports.enable('');
}
/**
 * Returns true if the given mode name is enabled, false otherwise.
 *
 * @param {String} name
 * @return {Boolean}
 * @api public
 */ function enabled(name) {
    var i, len;
    for(i = 0, len = exports.skips.length; i < len; i++){
        if (exports.skips[i].test(name)) return false;
    }
    for(i = 0, len = exports.names.length; i < len; i++){
        if (exports.names[i].test(name)) return true;
    }
    return false;
}
/**
 * Coerce `val`.
 *
 * @param {Mixed} val
 * @return {Mixed}
 * @api private
 */ function coerce(val) {
    if (val instanceof Error) return val.stack || val.message;
    return val;
}

});
parcelRegister("bzU5E", function(module, exports) {
/**
 * Helpers.
 */ var $86de78e8beb29890$var$s = 1000;
var $86de78e8beb29890$var$m = $86de78e8beb29890$var$s * 60;
var $86de78e8beb29890$var$h = $86de78e8beb29890$var$m * 60;
var $86de78e8beb29890$var$d = $86de78e8beb29890$var$h * 24;
var $86de78e8beb29890$var$y = $86de78e8beb29890$var$d * 365.25;
/**
 * Parse or format the given `val`.
 *
 * Options:
 *
 *  - `long` verbose formatting [false]
 *
 * @param {String|Number} val
 * @param {Object} [options]
 * @throws {Error} throw an error if val is not a non-empty string or a number
 * @return {String|Number}
 * @api public
 */ module.exports = function(val, options) {
    options = options || {};
    var type = typeof val;
    if (type === 'string' && val.length > 0) return $86de78e8beb29890$var$parse(val);
    else if (type === 'number' && isNaN(val) === false) return options.long ? $86de78e8beb29890$var$fmtLong(val) : $86de78e8beb29890$var$fmtShort(val);
    throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
};
/**
 * Parse the given `str` and return milliseconds.
 *
 * @param {String} str
 * @return {Number}
 * @api private
 */ function $86de78e8beb29890$var$parse(str) {
    str = String(str);
    if (str.length > 100) return;
    var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
    if (!match) return;
    var n = parseFloat(match[1]);
    var type = (match[2] || 'ms').toLowerCase();
    switch(type){
        case 'years':
        case 'year':
        case 'yrs':
        case 'yr':
        case 'y':
            return n * $86de78e8beb29890$var$y;
        case 'days':
        case 'day':
        case 'd':
            return n * $86de78e8beb29890$var$d;
        case 'hours':
        case 'hour':
        case 'hrs':
        case 'hr':
        case 'h':
            return n * $86de78e8beb29890$var$h;
        case 'minutes':
        case 'minute':
        case 'mins':
        case 'min':
        case 'm':
            return n * $86de78e8beb29890$var$m;
        case 'seconds':
        case 'second':
        case 'secs':
        case 'sec':
        case 's':
            return n * $86de78e8beb29890$var$s;
        case 'milliseconds':
        case 'millisecond':
        case 'msecs':
        case 'msec':
        case 'ms':
            return n;
        default:
            return undefined;
    }
}
/**
 * Short format for `ms`.
 *
 * @param {Number} ms
 * @return {String}
 * @api private
 */ function $86de78e8beb29890$var$fmtShort(ms) {
    if (ms >= $86de78e8beb29890$var$d) return Math.round(ms / $86de78e8beb29890$var$d) + 'd';
    if (ms >= $86de78e8beb29890$var$h) return Math.round(ms / $86de78e8beb29890$var$h) + 'h';
    if (ms >= $86de78e8beb29890$var$m) return Math.round(ms / $86de78e8beb29890$var$m) + 'm';
    if (ms >= $86de78e8beb29890$var$s) return Math.round(ms / $86de78e8beb29890$var$s) + 's';
    return ms + 'ms';
}
/**
 * Long format for `ms`.
 *
 * @param {Number} ms
 * @return {String}
 * @api private
 */ function $86de78e8beb29890$var$fmtLong(ms) {
    return $86de78e8beb29890$var$plural(ms, $86de78e8beb29890$var$d, 'day') || $86de78e8beb29890$var$plural(ms, $86de78e8beb29890$var$h, 'hour') || $86de78e8beb29890$var$plural(ms, $86de78e8beb29890$var$m, 'minute') || $86de78e8beb29890$var$plural(ms, $86de78e8beb29890$var$s, 'second') || ms + ' ms';
}
/**
 * Pluralization helper.
 */ function $86de78e8beb29890$var$plural(ms, n, name) {
    if (ms < n) return;
    if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
    return Math.ceil(ms / n) + ' ' + name + 's';
}

});



parcelRegister("cGqbJ", function(module, exports) {
/**
 * Module dependencies.
 */ 


/**
 * This is the Node.js implementation of `debug()`.
 *
 * Expose `debug()` as the module.
 */ exports = module.exports = (parcelRequire("gOxX5"));
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
/**
 * Colors.
 */ exports.colors = [
    6,
    2,
    3,
    4,
    5,
    1
];
/**
 * Build up the default `inspectOpts` object from the environment variables.
 *
 *   $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
 */ exports.inspectOpts = Object.keys(process.env).filter(function(key) {
    return /^debug_/i.test(key);
}).reduce(function(obj, key) {
    // camel-case
    var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
        return k.toUpperCase();
    });
    // coerce string value into JS value
    var val = process.env[key];
    if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
    else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
    else if (val === 'null') val = null;
    else val = Number(val);
    obj[prop] = val;
    return obj;
}, {});
/**
 * The file descriptor to write the `debug()` calls to.
 * Set the `DEBUG_FD` env variable to override with another value. i.e.:
 *
 *   $ DEBUG_FD=3 node script.js 3>debug.log
 */ var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
if (1 !== fd && 2 !== fd) $5HoLl$util.deprecate(function() {}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')();
var stream = 1 === fd ? process.stdout : 2 === fd ? process.stderr : createWritableStdioStream(fd);
/**
 * Is stdout a TTY? Colored output is enabled when `true`.
 */ function useColors() {
    return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : $5HoLl$tty.isatty(fd);
}
/**
 * Map %o to `util.inspect()`, all on a single line.
 */ exports.formatters.o = function(v) {
    this.inspectOpts.colors = this.useColors;
    return $5HoLl$util.inspect(v, this.inspectOpts).split('\n').map(function(str) {
        return str.trim();
    }).join(' ');
};
/**
 * Map %o to `util.inspect()`, allowing multiple lines if needed.
 */ exports.formatters.O = function(v) {
    this.inspectOpts.colors = this.useColors;
    return $5HoLl$util.inspect(v, this.inspectOpts);
};
/**
 * Adds ANSI color escape codes if enabled.
 *
 * @api public
 */ function formatArgs(args) {
    var name = this.namespace;
    var useColors = this.useColors;
    if (useColors) {
        var c = this.color;
        var prefix = '  \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
        args[0] = prefix + args[0].split('\n').join('\n' + prefix);
        args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
    } else args[0] = new Date().toUTCString() + ' ' + name + ' ' + args[0];
}
/**
 * Invokes `util.format()` with the specified arguments and writes to `stream`.
 */ function log() {
    return stream.write($5HoLl$util.format.apply($5HoLl$util, arguments) + '\n');
}
/**
 * Save `namespaces`.
 *
 * @param {String} namespaces
 * @api private
 */ function save(namespaces) {
    if (null == namespaces) // If you set a process.env field to null or undefined, it gets cast to the
    // string 'null' or 'undefined'. Just delete instead.
    delete process.env.DEBUG;
    else process.env.DEBUG = namespaces;
}
/**
 * Load `namespaces`.
 *
 * @return {String} returns the previously persisted debug modes
 * @api private
 */ function load() {
    return process.env.DEBUG;
}


/**
 * Copied from `node/src/node.js`.
 *
 * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
 * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
 */ function createWritableStdioStream(fd) {
    var stream;
    var tty_wrap = process.binding('tty_wrap');
    // Note stream._type is used for test-module-load-list.js
    switch(tty_wrap.guessHandleType(fd)){
        case 'TTY':
            stream = new $5HoLl$tty.WriteStream(fd);
            stream._type = 'tty';
            // Hack to have stream not keep the event loop alive.
            // See https://github.com/joyent/node/issues/1726
            if (stream._handle && stream._handle.unref) stream._handle.unref();
            break;
        case 'FILE':
            var fs = $5HoLl$fs;
            stream = new fs.SyncWriteStream(fd, {
                autoClose: false
            });
            stream._type = 'fs';
            break;
        case 'PIPE':
        case 'TCP':
            var net = $5HoLl$net;
            stream = new net.Socket({
                fd: fd,
                readable: false,
                writable: true
            });
            // FIXME Should probably have an option in net.Socket to create a
            // stream from an existing fd which is writable only. But for now
            // we'll just add this hack and set the `readable` member to false.
            // Test: ./node test/fixtures/echo.js < /etc/passwd
            stream.readable = false;
            stream.read = null;
            stream._type = 'pipe';
            // FIXME Hack to have stream not keep the event loop alive.
            // See https://github.com/joyent/node/issues/1726
            if (stream._handle && stream._handle.unref) stream._handle.unref();
            break;
        default:
            // Probably an error on in uv_guess_handle()
            throw new Error('Implement me. Unknown stream file type!');
    }
    // For supporting legacy API we put the FD here.
    stream.fd = fd;
    stream._isStdio = true;
    return stream;
}
/**
 * Init logic for `debug` instances.
 *
 * Create a new `inspectOpts` object in case `useColors` is set
 * differently for a particular `debug` instance.
 */ function init(debug) {
    debug.inspectOpts = {};
    var keys = Object.keys(exports.inspectOpts);
    for(var i = 0; i < keys.length; i++)debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
/**
 * Enable namespaces listed in `process.env.DEBUG` initially.
 */ exports.enable(load());

});


parcelRegister("alrT0", function(module, exports) {
/**
 * Merge object b with object a.
 *
 *     var a = { foo: 'bar' }
 *       , b = { bar: 'baz' };
 *
 *     merge(a, b);
 *     // => { foo: 'bar', bar: 'baz' }
 *
 * @param {Object} a
 * @param {Object} b
 * @return {Object}
 * @api public
 */ exports = module.exports = function(a, b) {
    if (a && b) for(var key in b)a[key] = b[key];
    return a;
};

});

parcelRegister("5ZIzO", function(module, exports) {
module.exports = JSON.parse("{\"application/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"application/3gpdash-qoe-report+xml\":{\"source\":\"iana\"},\"application/3gpp-ims+xml\":{\"source\":\"iana\"},\"application/a2l\":{\"source\":\"iana\"},\"application/activemessage\":{\"source\":\"iana\"},\"application/alto-costmap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-costmapfilter+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-directory+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointcost+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointcostparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointprop+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointpropparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-error+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-networkmap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-networkmapfilter+json\":{\"source\":\"iana\",\"compressible\":true},\"application/aml\":{\"source\":\"iana\"},\"application/andrew-inset\":{\"source\":\"iana\",\"extensions\":[\"ez\"]},\"application/applefile\":{\"source\":\"iana\"},\"application/applixware\":{\"source\":\"apache\",\"extensions\":[\"aw\"]},\"application/atf\":{\"source\":\"iana\"},\"application/atfx\":{\"source\":\"iana\"},\"application/atom+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atom\"]},\"application/atomcat+xml\":{\"source\":\"iana\",\"extensions\":[\"atomcat\"]},\"application/atomdeleted+xml\":{\"source\":\"iana\"},\"application/atomicmail\":{\"source\":\"iana\"},\"application/atomsvc+xml\":{\"source\":\"iana\",\"extensions\":[\"atomsvc\"]},\"application/atxml\":{\"source\":\"iana\"},\"application/auth-policy+xml\":{\"source\":\"iana\"},\"application/bacnet-xdd+zip\":{\"source\":\"iana\"},\"application/batch-smtp\":{\"source\":\"iana\"},\"application/bdoc\":{\"compressible\":false,\"extensions\":[\"bdoc\"]},\"application/beep+xml\":{\"source\":\"iana\"},\"application/calendar+json\":{\"source\":\"iana\",\"compressible\":true},\"application/calendar+xml\":{\"source\":\"iana\"},\"application/call-completion\":{\"source\":\"iana\"},\"application/cals-1840\":{\"source\":\"iana\"},\"application/cbor\":{\"source\":\"iana\"},\"application/cccex\":{\"source\":\"iana\"},\"application/ccmp+xml\":{\"source\":\"iana\"},\"application/ccxml+xml\":{\"source\":\"iana\",\"extensions\":[\"ccxml\"]},\"application/cdfx+xml\":{\"source\":\"iana\"},\"application/cdmi-capability\":{\"source\":\"iana\",\"extensions\":[\"cdmia\"]},\"application/cdmi-container\":{\"source\":\"iana\",\"extensions\":[\"cdmic\"]},\"application/cdmi-domain\":{\"source\":\"iana\",\"extensions\":[\"cdmid\"]},\"application/cdmi-object\":{\"source\":\"iana\",\"extensions\":[\"cdmio\"]},\"application/cdmi-queue\":{\"source\":\"iana\",\"extensions\":[\"cdmiq\"]},\"application/cdni\":{\"source\":\"iana\"},\"application/cea\":{\"source\":\"iana\"},\"application/cea-2018+xml\":{\"source\":\"iana\"},\"application/cellml+xml\":{\"source\":\"iana\"},\"application/cfw\":{\"source\":\"iana\"},\"application/clue_info+xml\":{\"source\":\"iana\"},\"application/cms\":{\"source\":\"iana\"},\"application/cnrp+xml\":{\"source\":\"iana\"},\"application/coap-group+json\":{\"source\":\"iana\",\"compressible\":true},\"application/coap-payload\":{\"source\":\"iana\"},\"application/commonground\":{\"source\":\"iana\"},\"application/conference-info+xml\":{\"source\":\"iana\"},\"application/cose\":{\"source\":\"iana\"},\"application/cose-key\":{\"source\":\"iana\"},\"application/cose-key-set\":{\"source\":\"iana\"},\"application/cpl+xml\":{\"source\":\"iana\"},\"application/csrattrs\":{\"source\":\"iana\"},\"application/csta+xml\":{\"source\":\"iana\"},\"application/cstadata+xml\":{\"source\":\"iana\"},\"application/csvm+json\":{\"source\":\"iana\",\"compressible\":true},\"application/cu-seeme\":{\"source\":\"apache\",\"extensions\":[\"cu\"]},\"application/cybercash\":{\"source\":\"iana\"},\"application/dart\":{\"compressible\":true},\"application/dash+xml\":{\"source\":\"iana\",\"extensions\":[\"mpd\"]},\"application/dashdelta\":{\"source\":\"iana\"},\"application/davmount+xml\":{\"source\":\"iana\",\"extensions\":[\"davmount\"]},\"application/dca-rft\":{\"source\":\"iana\"},\"application/dcd\":{\"source\":\"iana\"},\"application/dec-dx\":{\"source\":\"iana\"},\"application/dialog-info+xml\":{\"source\":\"iana\"},\"application/dicom\":{\"source\":\"iana\"},\"application/dicom+json\":{\"source\":\"iana\",\"compressible\":true},\"application/dicom+xml\":{\"source\":\"iana\"},\"application/dii\":{\"source\":\"iana\"},\"application/dit\":{\"source\":\"iana\"},\"application/dns\":{\"source\":\"iana\"},\"application/docbook+xml\":{\"source\":\"apache\",\"extensions\":[\"dbk\"]},\"application/dskpp+xml\":{\"source\":\"iana\"},\"application/dssc+der\":{\"source\":\"iana\",\"extensions\":[\"dssc\"]},\"application/dssc+xml\":{\"source\":\"iana\",\"extensions\":[\"xdssc\"]},\"application/dvcs\":{\"source\":\"iana\"},\"application/ecmascript\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ecma\"]},\"application/edi-consent\":{\"source\":\"iana\"},\"application/edi-x12\":{\"source\":\"iana\",\"compressible\":false},\"application/edifact\":{\"source\":\"iana\",\"compressible\":false},\"application/efi\":{\"source\":\"iana\"},\"application/emergencycalldata.comment+xml\":{\"source\":\"iana\"},\"application/emergencycalldata.control+xml\":{\"source\":\"iana\"},\"application/emergencycalldata.deviceinfo+xml\":{\"source\":\"iana\"},\"application/emergencycalldata.ecall.msd\":{\"source\":\"iana\"},\"application/emergencycalldata.providerinfo+xml\":{\"source\":\"iana\"},\"application/emergencycalldata.serviceinfo+xml\":{\"source\":\"iana\"},\"application/emergencycalldata.subscriberinfo+xml\":{\"source\":\"iana\"},\"application/emergencycalldata.veds+xml\":{\"source\":\"iana\"},\"application/emma+xml\":{\"source\":\"iana\",\"extensions\":[\"emma\"]},\"application/emotionml+xml\":{\"source\":\"iana\"},\"application/encaprtp\":{\"source\":\"iana\"},\"application/epp+xml\":{\"source\":\"iana\"},\"application/epub+zip\":{\"source\":\"iana\",\"extensions\":[\"epub\"]},\"application/eshop\":{\"source\":\"iana\"},\"application/exi\":{\"source\":\"iana\",\"extensions\":[\"exi\"]},\"application/fastinfoset\":{\"source\":\"iana\"},\"application/fastsoap\":{\"source\":\"iana\"},\"application/fdt+xml\":{\"source\":\"iana\"},\"application/fhir+xml\":{\"source\":\"iana\"},\"application/fido.trusted-apps+json\":{\"compressible\":true},\"application/fits\":{\"source\":\"iana\"},\"application/font-sfnt\":{\"source\":\"iana\"},\"application/font-tdpfr\":{\"source\":\"iana\",\"extensions\":[\"pfr\"]},\"application/font-woff\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"woff\"]},\"application/framework-attributes+xml\":{\"source\":\"iana\"},\"application/geo+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"geojson\"]},\"application/geo+json-seq\":{\"source\":\"iana\"},\"application/geoxacml+xml\":{\"source\":\"iana\"},\"application/gml+xml\":{\"source\":\"iana\",\"extensions\":[\"gml\"]},\"application/gpx+xml\":{\"source\":\"apache\",\"extensions\":[\"gpx\"]},\"application/gxf\":{\"source\":\"apache\",\"extensions\":[\"gxf\"]},\"application/gzip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"gz\"]},\"application/h224\":{\"source\":\"iana\"},\"application/held+xml\":{\"source\":\"iana\"},\"application/hjson\":{\"extensions\":[\"hjson\"]},\"application/http\":{\"source\":\"iana\"},\"application/hyperstudio\":{\"source\":\"iana\",\"extensions\":[\"stk\"]},\"application/ibe-key-request+xml\":{\"source\":\"iana\"},\"application/ibe-pkg-reply+xml\":{\"source\":\"iana\"},\"application/ibe-pp-data\":{\"source\":\"iana\"},\"application/iges\":{\"source\":\"iana\"},\"application/im-iscomposing+xml\":{\"source\":\"iana\"},\"application/index\":{\"source\":\"iana\"},\"application/index.cmd\":{\"source\":\"iana\"},\"application/index.obj\":{\"source\":\"iana\"},\"application/index.response\":{\"source\":\"iana\"},\"application/index.vnd\":{\"source\":\"iana\"},\"application/inkml+xml\":{\"source\":\"iana\",\"extensions\":[\"ink\",\"inkml\"]},\"application/iotp\":{\"source\":\"iana\"},\"application/ipfix\":{\"source\":\"iana\",\"extensions\":[\"ipfix\"]},\"application/ipp\":{\"source\":\"iana\"},\"application/isup\":{\"source\":\"iana\"},\"application/its+xml\":{\"source\":\"iana\"},\"application/java-archive\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"jar\",\"war\",\"ear\"]},\"application/java-serialized-object\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"ser\"]},\"application/java-vm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"class\"]},\"application/javascript\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"js\",\"mjs\"]},\"application/jf2feed+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jose\":{\"source\":\"iana\"},\"application/jose+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jrd+json\":{\"source\":\"iana\",\"compressible\":true},\"application/json\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"json\",\"map\"]},\"application/json-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/json-seq\":{\"source\":\"iana\"},\"application/json5\":{\"extensions\":[\"json5\"]},\"application/jsonml+json\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"jsonml\"]},\"application/jwk+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jwk-set+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jwt\":{\"source\":\"iana\"},\"application/kpml-request+xml\":{\"source\":\"iana\"},\"application/kpml-response+xml\":{\"source\":\"iana\"},\"application/ld+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"jsonld\"]},\"application/lgr+xml\":{\"source\":\"iana\"},\"application/link-format\":{\"source\":\"iana\"},\"application/load-control+xml\":{\"source\":\"iana\"},\"application/lost+xml\":{\"source\":\"iana\",\"extensions\":[\"lostxml\"]},\"application/lostsync+xml\":{\"source\":\"iana\"},\"application/lxf\":{\"source\":\"iana\"},\"application/mac-binhex40\":{\"source\":\"iana\",\"extensions\":[\"hqx\"]},\"application/mac-compactpro\":{\"source\":\"apache\",\"extensions\":[\"cpt\"]},\"application/macwriteii\":{\"source\":\"iana\"},\"application/mads+xml\":{\"source\":\"iana\",\"extensions\":[\"mads\"]},\"application/manifest+json\":{\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"webmanifest\"]},\"application/marc\":{\"source\":\"iana\",\"extensions\":[\"mrc\"]},\"application/marcxml+xml\":{\"source\":\"iana\",\"extensions\":[\"mrcx\"]},\"application/mathematica\":{\"source\":\"iana\",\"extensions\":[\"ma\",\"nb\",\"mb\"]},\"application/mathml+xml\":{\"source\":\"iana\",\"extensions\":[\"mathml\"]},\"application/mathml-content+xml\":{\"source\":\"iana\"},\"application/mathml-presentation+xml\":{\"source\":\"iana\"},\"application/mbms-associated-procedure-description+xml\":{\"source\":\"iana\"},\"application/mbms-deregister+xml\":{\"source\":\"iana\"},\"application/mbms-envelope+xml\":{\"source\":\"iana\"},\"application/mbms-msk+xml\":{\"source\":\"iana\"},\"application/mbms-msk-response+xml\":{\"source\":\"iana\"},\"application/mbms-protection-description+xml\":{\"source\":\"iana\"},\"application/mbms-reception-report+xml\":{\"source\":\"iana\"},\"application/mbms-register+xml\":{\"source\":\"iana\"},\"application/mbms-register-response+xml\":{\"source\":\"iana\"},\"application/mbms-schedule+xml\":{\"source\":\"iana\"},\"application/mbms-user-service-description+xml\":{\"source\":\"iana\"},\"application/mbox\":{\"source\":\"iana\",\"extensions\":[\"mbox\"]},\"application/media-policy-dataset+xml\":{\"source\":\"iana\"},\"application/media_control+xml\":{\"source\":\"iana\"},\"application/mediaservercontrol+xml\":{\"source\":\"iana\",\"extensions\":[\"mscml\"]},\"application/merge-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/metalink+xml\":{\"source\":\"apache\",\"extensions\":[\"metalink\"]},\"application/metalink4+xml\":{\"source\":\"iana\",\"extensions\":[\"meta4\"]},\"application/mets+xml\":{\"source\":\"iana\",\"extensions\":[\"mets\"]},\"application/mf4\":{\"source\":\"iana\"},\"application/mikey\":{\"source\":\"iana\"},\"application/mmt-usd+xml\":{\"source\":\"iana\"},\"application/mods+xml\":{\"source\":\"iana\",\"extensions\":[\"mods\"]},\"application/moss-keys\":{\"source\":\"iana\"},\"application/moss-signature\":{\"source\":\"iana\"},\"application/mosskey-data\":{\"source\":\"iana\"},\"application/mosskey-request\":{\"source\":\"iana\"},\"application/mp21\":{\"source\":\"iana\",\"extensions\":[\"m21\",\"mp21\"]},\"application/mp4\":{\"source\":\"iana\",\"extensions\":[\"mp4s\",\"m4p\"]},\"application/mpeg4-generic\":{\"source\":\"iana\"},\"application/mpeg4-iod\":{\"source\":\"iana\"},\"application/mpeg4-iod-xmt\":{\"source\":\"iana\"},\"application/mrb-consumer+xml\":{\"source\":\"iana\"},\"application/mrb-publish+xml\":{\"source\":\"iana\"},\"application/msc-ivr+xml\":{\"source\":\"iana\"},\"application/msc-mixer+xml\":{\"source\":\"iana\"},\"application/msword\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"doc\",\"dot\"]},\"application/mud+json\":{\"source\":\"iana\",\"compressible\":true},\"application/mxf\":{\"source\":\"iana\",\"extensions\":[\"mxf\"]},\"application/n-quads\":{\"source\":\"iana\"},\"application/n-triples\":{\"source\":\"iana\"},\"application/nasdata\":{\"source\":\"iana\"},\"application/news-checkgroups\":{\"source\":\"iana\"},\"application/news-groupinfo\":{\"source\":\"iana\"},\"application/news-transmission\":{\"source\":\"iana\"},\"application/nlsml+xml\":{\"source\":\"iana\"},\"application/node\":{\"source\":\"iana\"},\"application/nss\":{\"source\":\"iana\"},\"application/ocsp-request\":{\"source\":\"iana\"},\"application/ocsp-response\":{\"source\":\"iana\"},\"application/octet-stream\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"bin\",\"dms\",\"lrf\",\"mar\",\"so\",\"dist\",\"distz\",\"pkg\",\"bpk\",\"dump\",\"elc\",\"deploy\",\"exe\",\"dll\",\"deb\",\"dmg\",\"iso\",\"img\",\"msi\",\"msp\",\"msm\",\"buffer\"]},\"application/oda\":{\"source\":\"iana\",\"extensions\":[\"oda\"]},\"application/odx\":{\"source\":\"iana\"},\"application/oebps-package+xml\":{\"source\":\"iana\",\"extensions\":[\"opf\"]},\"application/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ogx\"]},\"application/omdoc+xml\":{\"source\":\"apache\",\"extensions\":[\"omdoc\"]},\"application/onenote\":{\"source\":\"apache\",\"extensions\":[\"onetoc\",\"onetoc2\",\"onetmp\",\"onepkg\"]},\"application/oxps\":{\"source\":\"iana\",\"extensions\":[\"oxps\"]},\"application/p2p-overlay+xml\":{\"source\":\"iana\"},\"application/parityfec\":{\"source\":\"iana\"},\"application/passport\":{\"source\":\"iana\"},\"application/patch-ops-error+xml\":{\"source\":\"iana\",\"extensions\":[\"xer\"]},\"application/pdf\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pdf\"]},\"application/pdx\":{\"source\":\"iana\"},\"application/pgp-encrypted\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pgp\"]},\"application/pgp-keys\":{\"source\":\"iana\"},\"application/pgp-signature\":{\"source\":\"iana\",\"extensions\":[\"asc\",\"sig\"]},\"application/pics-rules\":{\"source\":\"apache\",\"extensions\":[\"prf\"]},\"application/pidf+xml\":{\"source\":\"iana\"},\"application/pidf-diff+xml\":{\"source\":\"iana\"},\"application/pkcs10\":{\"source\":\"iana\",\"extensions\":[\"p10\"]},\"application/pkcs12\":{\"source\":\"iana\"},\"application/pkcs7-mime\":{\"source\":\"iana\",\"extensions\":[\"p7m\",\"p7c\"]},\"application/pkcs7-signature\":{\"source\":\"iana\",\"extensions\":[\"p7s\"]},\"application/pkcs8\":{\"source\":\"iana\",\"extensions\":[\"p8\"]},\"application/pkcs8-encrypted\":{\"source\":\"iana\"},\"application/pkix-attr-cert\":{\"source\":\"iana\",\"extensions\":[\"ac\"]},\"application/pkix-cert\":{\"source\":\"iana\",\"extensions\":[\"cer\"]},\"application/pkix-crl\":{\"source\":\"iana\",\"extensions\":[\"crl\"]},\"application/pkix-pkipath\":{\"source\":\"iana\",\"extensions\":[\"pkipath\"]},\"application/pkixcmp\":{\"source\":\"iana\",\"extensions\":[\"pki\"]},\"application/pls+xml\":{\"source\":\"iana\",\"extensions\":[\"pls\"]},\"application/poc-settings+xml\":{\"source\":\"iana\"},\"application/postscript\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ai\",\"eps\",\"ps\"]},\"application/ppsp-tracker+json\":{\"source\":\"iana\",\"compressible\":true},\"application/problem+json\":{\"source\":\"iana\",\"compressible\":true},\"application/problem+xml\":{\"source\":\"iana\"},\"application/provenance+xml\":{\"source\":\"iana\"},\"application/prs.alvestrand.titrax-sheet\":{\"source\":\"iana\"},\"application/prs.cww\":{\"source\":\"iana\",\"extensions\":[\"cww\"]},\"application/prs.hpub+zip\":{\"source\":\"iana\"},\"application/prs.nprend\":{\"source\":\"iana\"},\"application/prs.plucker\":{\"source\":\"iana\"},\"application/prs.rdf-xml-crypt\":{\"source\":\"iana\"},\"application/prs.xsf+xml\":{\"source\":\"iana\"},\"application/pskc+xml\":{\"source\":\"iana\",\"extensions\":[\"pskcxml\"]},\"application/qsig\":{\"source\":\"iana\"},\"application/raml+yaml\":{\"compressible\":true,\"extensions\":[\"raml\"]},\"application/raptorfec\":{\"source\":\"iana\"},\"application/rdap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/rdf+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rdf\"]},\"application/reginfo+xml\":{\"source\":\"iana\",\"extensions\":[\"rif\"]},\"application/relax-ng-compact-syntax\":{\"source\":\"iana\",\"extensions\":[\"rnc\"]},\"application/remote-printing\":{\"source\":\"iana\"},\"application/reputon+json\":{\"source\":\"iana\",\"compressible\":true},\"application/resource-lists+xml\":{\"source\":\"iana\",\"extensions\":[\"rl\"]},\"application/resource-lists-diff+xml\":{\"source\":\"iana\",\"extensions\":[\"rld\"]},\"application/rfc+xml\":{\"source\":\"iana\"},\"application/riscos\":{\"source\":\"iana\"},\"application/rlmi+xml\":{\"source\":\"iana\"},\"application/rls-services+xml\":{\"source\":\"iana\",\"extensions\":[\"rs\"]},\"application/route-apd+xml\":{\"source\":\"iana\"},\"application/route-s-tsid+xml\":{\"source\":\"iana\"},\"application/route-usd+xml\":{\"source\":\"iana\"},\"application/rpki-ghostbusters\":{\"source\":\"iana\",\"extensions\":[\"gbr\"]},\"application/rpki-manifest\":{\"source\":\"iana\",\"extensions\":[\"mft\"]},\"application/rpki-publication\":{\"source\":\"iana\"},\"application/rpki-roa\":{\"source\":\"iana\",\"extensions\":[\"roa\"]},\"application/rpki-updown\":{\"source\":\"iana\"},\"application/rsd+xml\":{\"source\":\"apache\",\"extensions\":[\"rsd\"]},\"application/rss+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"rss\"]},\"application/rtf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtf\"]},\"application/rtploopback\":{\"source\":\"iana\"},\"application/rtx\":{\"source\":\"iana\"},\"application/samlassertion+xml\":{\"source\":\"iana\"},\"application/samlmetadata+xml\":{\"source\":\"iana\"},\"application/sbml+xml\":{\"source\":\"iana\",\"extensions\":[\"sbml\"]},\"application/scaip+xml\":{\"source\":\"iana\"},\"application/scim+json\":{\"source\":\"iana\",\"compressible\":true},\"application/scvp-cv-request\":{\"source\":\"iana\",\"extensions\":[\"scq\"]},\"application/scvp-cv-response\":{\"source\":\"iana\",\"extensions\":[\"scs\"]},\"application/scvp-vp-request\":{\"source\":\"iana\",\"extensions\":[\"spq\"]},\"application/scvp-vp-response\":{\"source\":\"iana\",\"extensions\":[\"spp\"]},\"application/sdp\":{\"source\":\"iana\",\"extensions\":[\"sdp\"]},\"application/sep+xml\":{\"source\":\"iana\"},\"application/sep-exi\":{\"source\":\"iana\"},\"application/session-info\":{\"source\":\"iana\"},\"application/set-payment\":{\"source\":\"iana\"},\"application/set-payment-initiation\":{\"source\":\"iana\",\"extensions\":[\"setpay\"]},\"application/set-registration\":{\"source\":\"iana\"},\"application/set-registration-initiation\":{\"source\":\"iana\",\"extensions\":[\"setreg\"]},\"application/sgml\":{\"source\":\"iana\"},\"application/sgml-open-catalog\":{\"source\":\"iana\"},\"application/shf+xml\":{\"source\":\"iana\",\"extensions\":[\"shf\"]},\"application/sieve\":{\"source\":\"iana\"},\"application/simple-filter+xml\":{\"source\":\"iana\"},\"application/simple-message-summary\":{\"source\":\"iana\"},\"application/simplesymbolcontainer\":{\"source\":\"iana\"},\"application/slate\":{\"source\":\"iana\"},\"application/smil\":{\"source\":\"iana\"},\"application/smil+xml\":{\"source\":\"iana\",\"extensions\":[\"smi\",\"smil\"]},\"application/smpte336m\":{\"source\":\"iana\"},\"application/soap+fastinfoset\":{\"source\":\"iana\"},\"application/soap+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sparql-query\":{\"source\":\"iana\",\"extensions\":[\"rq\"]},\"application/sparql-results+xml\":{\"source\":\"iana\",\"extensions\":[\"srx\"]},\"application/spirits-event+xml\":{\"source\":\"iana\"},\"application/sql\":{\"source\":\"iana\"},\"application/srgs\":{\"source\":\"iana\",\"extensions\":[\"gram\"]},\"application/srgs+xml\":{\"source\":\"iana\",\"extensions\":[\"grxml\"]},\"application/sru+xml\":{\"source\":\"iana\",\"extensions\":[\"sru\"]},\"application/ssdl+xml\":{\"source\":\"apache\",\"extensions\":[\"ssdl\"]},\"application/ssml+xml\":{\"source\":\"iana\",\"extensions\":[\"ssml\"]},\"application/tamp-apex-update\":{\"source\":\"iana\"},\"application/tamp-apex-update-confirm\":{\"source\":\"iana\"},\"application/tamp-community-update\":{\"source\":\"iana\"},\"application/tamp-community-update-confirm\":{\"source\":\"iana\"},\"application/tamp-error\":{\"source\":\"iana\"},\"application/tamp-sequence-adjust\":{\"source\":\"iana\"},\"application/tamp-sequence-adjust-confirm\":{\"source\":\"iana\"},\"application/tamp-status-query\":{\"source\":\"iana\"},\"application/tamp-status-response\":{\"source\":\"iana\"},\"application/tamp-update\":{\"source\":\"iana\"},\"application/tamp-update-confirm\":{\"source\":\"iana\"},\"application/tar\":{\"compressible\":true},\"application/tei+xml\":{\"source\":\"iana\",\"extensions\":[\"tei\",\"teicorpus\"]},\"application/thraud+xml\":{\"source\":\"iana\",\"extensions\":[\"tfi\"]},\"application/timestamp-query\":{\"source\":\"iana\"},\"application/timestamp-reply\":{\"source\":\"iana\"},\"application/timestamped-data\":{\"source\":\"iana\",\"extensions\":[\"tsd\"]},\"application/tnauthlist\":{\"source\":\"iana\"},\"application/trig\":{\"source\":\"iana\"},\"application/ttml+xml\":{\"source\":\"iana\"},\"application/tve-trigger\":{\"source\":\"iana\"},\"application/ulpfec\":{\"source\":\"iana\"},\"application/urc-grpsheet+xml\":{\"source\":\"iana\"},\"application/urc-ressheet+xml\":{\"source\":\"iana\"},\"application/urc-targetdesc+xml\":{\"source\":\"iana\"},\"application/urc-uisocketdesc+xml\":{\"source\":\"iana\"},\"application/vcard+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vcard+xml\":{\"source\":\"iana\"},\"application/vemmi\":{\"source\":\"iana\"},\"application/vividence.scriptfile\":{\"source\":\"apache\"},\"application/vnd.1000minds.decision-model+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp-prose+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp-prose-pc3ch+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp-v2x-local-service-information\":{\"source\":\"iana\"},\"application/vnd.3gpp.access-transfer-events+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.bsf+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.gmop+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcptt-affiliation-command+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcptt-floor-request+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcptt-info+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcptt-location-info+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcptt-mbms-usage-info+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcptt-signed+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.mid-call+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.pic-bw-large\":{\"source\":\"iana\",\"extensions\":[\"plb\"]},\"application/vnd.3gpp.pic-bw-small\":{\"source\":\"iana\",\"extensions\":[\"psb\"]},\"application/vnd.3gpp.pic-bw-var\":{\"source\":\"iana\",\"extensions\":[\"pvb\"]},\"application/vnd.3gpp.sms\":{\"source\":\"iana\"},\"application/vnd.3gpp.sms+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.srvcc-ext+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.srvcc-info+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.state-and-event-info+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp.ussd+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp2.bcmcsinfo+xml\":{\"source\":\"iana\"},\"application/vnd.3gpp2.sms\":{\"source\":\"iana\"},\"application/vnd.3gpp2.tcap\":{\"source\":\"iana\",\"extensions\":[\"tcap\"]},\"application/vnd.3lightssoftware.imagescal\":{\"source\":\"iana\"},\"application/vnd.3m.post-it-notes\":{\"source\":\"iana\",\"extensions\":[\"pwn\"]},\"application/vnd.accpac.simply.aso\":{\"source\":\"iana\",\"extensions\":[\"aso\"]},\"application/vnd.accpac.simply.imp\":{\"source\":\"iana\",\"extensions\":[\"imp\"]},\"application/vnd.acucobol\":{\"source\":\"iana\",\"extensions\":[\"acu\"]},\"application/vnd.acucorp\":{\"source\":\"iana\",\"extensions\":[\"atc\",\"acutc\"]},\"application/vnd.adobe.air-application-installer-package+zip\":{\"source\":\"apache\",\"extensions\":[\"air\"]},\"application/vnd.adobe.flash.movie\":{\"source\":\"iana\"},\"application/vnd.adobe.formscentral.fcdt\":{\"source\":\"iana\",\"extensions\":[\"fcdt\"]},\"application/vnd.adobe.fxp\":{\"source\":\"iana\",\"extensions\":[\"fxp\",\"fxpl\"]},\"application/vnd.adobe.partial-upload\":{\"source\":\"iana\"},\"application/vnd.adobe.xdp+xml\":{\"source\":\"iana\",\"extensions\":[\"xdp\"]},\"application/vnd.adobe.xfdf\":{\"source\":\"iana\",\"extensions\":[\"xfdf\"]},\"application/vnd.aether.imp\":{\"source\":\"iana\"},\"application/vnd.ah-barcode\":{\"source\":\"iana\"},\"application/vnd.ahead.space\":{\"source\":\"iana\",\"extensions\":[\"ahead\"]},\"application/vnd.airzip.filesecure.azf\":{\"source\":\"iana\",\"extensions\":[\"azf\"]},\"application/vnd.airzip.filesecure.azs\":{\"source\":\"iana\",\"extensions\":[\"azs\"]},\"application/vnd.amadeus+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.amazon.ebook\":{\"source\":\"apache\",\"extensions\":[\"azw\"]},\"application/vnd.amazon.mobi8-ebook\":{\"source\":\"iana\"},\"application/vnd.americandynamics.acc\":{\"source\":\"iana\",\"extensions\":[\"acc\"]},\"application/vnd.amiga.ami\":{\"source\":\"iana\",\"extensions\":[\"ami\"]},\"application/vnd.amundsen.maze+xml\":{\"source\":\"iana\"},\"application/vnd.android.package-archive\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"apk\"]},\"application/vnd.anki\":{\"source\":\"iana\"},\"application/vnd.anser-web-certificate-issue-initiation\":{\"source\":\"iana\",\"extensions\":[\"cii\"]},\"application/vnd.anser-web-funds-transfer-initiation\":{\"source\":\"apache\",\"extensions\":[\"fti\"]},\"application/vnd.antix.game-component\":{\"source\":\"iana\",\"extensions\":[\"atx\"]},\"application/vnd.apache.thrift.binary\":{\"source\":\"iana\"},\"application/vnd.apache.thrift.compact\":{\"source\":\"iana\"},\"application/vnd.apache.thrift.json\":{\"source\":\"iana\"},\"application/vnd.api+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.apothekende.reservation+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.apple.installer+xml\":{\"source\":\"iana\",\"extensions\":[\"mpkg\"]},\"application/vnd.apple.mpegurl\":{\"source\":\"iana\",\"extensions\":[\"m3u8\"]},\"application/vnd.apple.pkpass\":{\"compressible\":false,\"extensions\":[\"pkpass\"]},\"application/vnd.arastra.swi\":{\"source\":\"iana\"},\"application/vnd.aristanetworks.swi\":{\"source\":\"iana\",\"extensions\":[\"swi\"]},\"application/vnd.artsquare\":{\"source\":\"iana\"},\"application/vnd.astraea-software.iota\":{\"source\":\"iana\",\"extensions\":[\"iota\"]},\"application/vnd.audiograph\":{\"source\":\"iana\",\"extensions\":[\"aep\"]},\"application/vnd.autopackage\":{\"source\":\"iana\"},\"application/vnd.avalon+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.avistar+xml\":{\"source\":\"iana\"},\"application/vnd.balsamiq.bmml+xml\":{\"source\":\"iana\"},\"application/vnd.balsamiq.bmpr\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.msg\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.msg+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.bekitzur-stech+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.bint.med-content\":{\"source\":\"iana\"},\"application/vnd.biopax.rdf+xml\":{\"source\":\"iana\"},\"application/vnd.blink-idb-value-wrapper\":{\"source\":\"iana\"},\"application/vnd.blueice.multipass\":{\"source\":\"iana\",\"extensions\":[\"mpm\"]},\"application/vnd.bluetooth.ep.oob\":{\"source\":\"iana\"},\"application/vnd.bluetooth.le.oob\":{\"source\":\"iana\"},\"application/vnd.bmi\":{\"source\":\"iana\",\"extensions\":[\"bmi\"]},\"application/vnd.businessobjects\":{\"source\":\"iana\",\"extensions\":[\"rep\"]},\"application/vnd.cab-jscript\":{\"source\":\"iana\"},\"application/vnd.canon-cpdl\":{\"source\":\"iana\"},\"application/vnd.canon-lips\":{\"source\":\"iana\"},\"application/vnd.capasystems-pg+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cendio.thinlinc.clientconf\":{\"source\":\"iana\"},\"application/vnd.century-systems.tcp_stream\":{\"source\":\"iana\"},\"application/vnd.chemdraw+xml\":{\"source\":\"iana\",\"extensions\":[\"cdxml\"]},\"application/vnd.chess-pgn\":{\"source\":\"iana\"},\"application/vnd.chipnuts.karaoke-mmd\":{\"source\":\"iana\",\"extensions\":[\"mmd\"]},\"application/vnd.cinderella\":{\"source\":\"iana\",\"extensions\":[\"cdy\"]},\"application/vnd.cirpack.isdn-ext\":{\"source\":\"iana\"},\"application/vnd.citationstyles.style+xml\":{\"source\":\"iana\"},\"application/vnd.claymore\":{\"source\":\"iana\",\"extensions\":[\"cla\"]},\"application/vnd.cloanto.rp9\":{\"source\":\"iana\",\"extensions\":[\"rp9\"]},\"application/vnd.clonk.c4group\":{\"source\":\"iana\",\"extensions\":[\"c4g\",\"c4d\",\"c4f\",\"c4p\",\"c4u\"]},\"application/vnd.cluetrust.cartomobile-config\":{\"source\":\"iana\",\"extensions\":[\"c11amc\"]},\"application/vnd.cluetrust.cartomobile-config-pkg\":{\"source\":\"iana\",\"extensions\":[\"c11amz\"]},\"application/vnd.coffeescript\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.document\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.document-template\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.presentation\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.presentation-template\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.spreadsheet\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.spreadsheet-template\":{\"source\":\"iana\"},\"application/vnd.collection+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.collection.doc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.collection.next+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.comicbook+zip\":{\"source\":\"iana\"},\"application/vnd.comicbook-rar\":{\"source\":\"iana\"},\"application/vnd.commerce-battelle\":{\"source\":\"iana\"},\"application/vnd.commonspace\":{\"source\":\"iana\",\"extensions\":[\"csp\"]},\"application/vnd.contact.cmsg\":{\"source\":\"iana\",\"extensions\":[\"cdbcmsg\"]},\"application/vnd.coreos.ignition+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cosmocaller\":{\"source\":\"iana\",\"extensions\":[\"cmc\"]},\"application/vnd.crick.clicker\":{\"source\":\"iana\",\"extensions\":[\"clkx\"]},\"application/vnd.crick.clicker.keyboard\":{\"source\":\"iana\",\"extensions\":[\"clkk\"]},\"application/vnd.crick.clicker.palette\":{\"source\":\"iana\",\"extensions\":[\"clkp\"]},\"application/vnd.crick.clicker.template\":{\"source\":\"iana\",\"extensions\":[\"clkt\"]},\"application/vnd.crick.clicker.wordbank\":{\"source\":\"iana\",\"extensions\":[\"clkw\"]},\"application/vnd.criticaltools.wbs+xml\":{\"source\":\"iana\",\"extensions\":[\"wbs\"]},\"application/vnd.ctc-posml\":{\"source\":\"iana\",\"extensions\":[\"pml\"]},\"application/vnd.ctct.ws+xml\":{\"source\":\"iana\"},\"application/vnd.cups-pdf\":{\"source\":\"iana\"},\"application/vnd.cups-postscript\":{\"source\":\"iana\"},\"application/vnd.cups-ppd\":{\"source\":\"iana\",\"extensions\":[\"ppd\"]},\"application/vnd.cups-raster\":{\"source\":\"iana\"},\"application/vnd.cups-raw\":{\"source\":\"iana\"},\"application/vnd.curl\":{\"source\":\"iana\"},\"application/vnd.curl.car\":{\"source\":\"apache\",\"extensions\":[\"car\"]},\"application/vnd.curl.pcurl\":{\"source\":\"apache\",\"extensions\":[\"pcurl\"]},\"application/vnd.cyan.dean.root+xml\":{\"source\":\"iana\"},\"application/vnd.cybank\":{\"source\":\"iana\"},\"application/vnd.d2l.coursepackage1p0+zip\":{\"source\":\"iana\"},\"application/vnd.dart\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dart\"]},\"application/vnd.data-vision.rdz\":{\"source\":\"iana\",\"extensions\":[\"rdz\"]},\"application/vnd.datapackage+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dataresource+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.debian.binary-package\":{\"source\":\"iana\"},\"application/vnd.dece.data\":{\"source\":\"iana\",\"extensions\":[\"uvf\",\"uvvf\",\"uvd\",\"uvvd\"]},\"application/vnd.dece.ttml+xml\":{\"source\":\"iana\",\"extensions\":[\"uvt\",\"uvvt\"]},\"application/vnd.dece.unspecified\":{\"source\":\"iana\",\"extensions\":[\"uvx\",\"uvvx\"]},\"application/vnd.dece.zip\":{\"source\":\"iana\",\"extensions\":[\"uvz\",\"uvvz\"]},\"application/vnd.denovo.fcselayout-link\":{\"source\":\"iana\",\"extensions\":[\"fe_launch\"]},\"application/vnd.desmume-movie\":{\"source\":\"iana\"},\"application/vnd.desmume.movie\":{\"source\":\"apache\"},\"application/vnd.dir-bi.plate-dl-nosuffix\":{\"source\":\"iana\"},\"application/vnd.dm.delegation+xml\":{\"source\":\"iana\"},\"application/vnd.dna\":{\"source\":\"iana\",\"extensions\":[\"dna\"]},\"application/vnd.document+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dolby.mlp\":{\"source\":\"apache\",\"extensions\":[\"mlp\"]},\"application/vnd.dolby.mobile.1\":{\"source\":\"iana\"},\"application/vnd.dolby.mobile.2\":{\"source\":\"iana\"},\"application/vnd.doremir.scorecloud-binary-document\":{\"source\":\"iana\"},\"application/vnd.dpgraph\":{\"source\":\"iana\",\"extensions\":[\"dpg\"]},\"application/vnd.dreamfactory\":{\"source\":\"iana\",\"extensions\":[\"dfac\"]},\"application/vnd.drive+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ds-keypoint\":{\"source\":\"apache\",\"extensions\":[\"kpxx\"]},\"application/vnd.dtg.local\":{\"source\":\"iana\"},\"application/vnd.dtg.local.flash\":{\"source\":\"iana\"},\"application/vnd.dtg.local.html\":{\"source\":\"iana\"},\"application/vnd.dvb.ait\":{\"source\":\"iana\",\"extensions\":[\"ait\"]},\"application/vnd.dvb.dvbj\":{\"source\":\"iana\"},\"application/vnd.dvb.esgcontainer\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcdftnotifaccess\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgaccess\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgaccess2\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgpdd\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcroaming\":{\"source\":\"iana\"},\"application/vnd.dvb.iptv.alfec-base\":{\"source\":\"iana\"},\"application/vnd.dvb.iptv.alfec-enhancement\":{\"source\":\"iana\"},\"application/vnd.dvb.notif-aggregate-root+xml\":{\"source\":\"iana\"},\"application/vnd.dvb.notif-container+xml\":{\"source\":\"iana\"},\"application/vnd.dvb.notif-generic+xml\":{\"source\":\"iana\"},\"application/vnd.dvb.notif-ia-msglist+xml\":{\"source\":\"iana\"},\"application/vnd.dvb.notif-ia-registration-request+xml\":{\"source\":\"iana\"},\"application/vnd.dvb.notif-ia-registration-response+xml\":{\"source\":\"iana\"},\"application/vnd.dvb.notif-init+xml\":{\"source\":\"iana\"},\"application/vnd.dvb.pfr\":{\"source\":\"iana\"},\"application/vnd.dvb.service\":{\"source\":\"iana\",\"extensions\":[\"svc\"]},\"application/vnd.dxr\":{\"source\":\"iana\"},\"application/vnd.dynageo\":{\"source\":\"iana\",\"extensions\":[\"geo\"]},\"application/vnd.dzr\":{\"source\":\"iana\"},\"application/vnd.easykaraoke.cdgdownload\":{\"source\":\"iana\"},\"application/vnd.ecdis-update\":{\"source\":\"iana\"},\"application/vnd.ecip.rlp\":{\"source\":\"iana\"},\"application/vnd.ecowin.chart\":{\"source\":\"iana\",\"extensions\":[\"mag\"]},\"application/vnd.ecowin.filerequest\":{\"source\":\"iana\"},\"application/vnd.ecowin.fileupdate\":{\"source\":\"iana\"},\"application/vnd.ecowin.series\":{\"source\":\"iana\"},\"application/vnd.ecowin.seriesrequest\":{\"source\":\"iana\"},\"application/vnd.ecowin.seriesupdate\":{\"source\":\"iana\"},\"application/vnd.efi.img\":{\"source\":\"iana\"},\"application/vnd.efi.iso\":{\"source\":\"iana\"},\"application/vnd.emclient.accessrequest+xml\":{\"source\":\"iana\"},\"application/vnd.enliven\":{\"source\":\"iana\",\"extensions\":[\"nml\"]},\"application/vnd.enphase.envoy\":{\"source\":\"iana\"},\"application/vnd.eprints.data+xml\":{\"source\":\"iana\"},\"application/vnd.epson.esf\":{\"source\":\"iana\",\"extensions\":[\"esf\"]},\"application/vnd.epson.msf\":{\"source\":\"iana\",\"extensions\":[\"msf\"]},\"application/vnd.epson.quickanime\":{\"source\":\"iana\",\"extensions\":[\"qam\"]},\"application/vnd.epson.salt\":{\"source\":\"iana\",\"extensions\":[\"slt\"]},\"application/vnd.epson.ssf\":{\"source\":\"iana\",\"extensions\":[\"ssf\"]},\"application/vnd.ericsson.quickcall\":{\"source\":\"iana\"},\"application/vnd.espass-espass+zip\":{\"source\":\"iana\"},\"application/vnd.eszigno3+xml\":{\"source\":\"iana\",\"extensions\":[\"es3\",\"et3\"]},\"application/vnd.etsi.aoc+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.asic-e+zip\":{\"source\":\"iana\"},\"application/vnd.etsi.asic-s+zip\":{\"source\":\"iana\"},\"application/vnd.etsi.cug+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.iptvcommand+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.iptvdiscovery+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.iptvprofile+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.iptvsad-bc+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.iptvsad-cod+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.iptvsad-npvr+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.iptvservice+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.iptvsync+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.iptvueprofile+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.mcid+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.mheg5\":{\"source\":\"iana\"},\"application/vnd.etsi.overload-control-policy-dataset+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.pstn+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.sci+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.simservs+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.timestamp-token\":{\"source\":\"iana\"},\"application/vnd.etsi.tsl+xml\":{\"source\":\"iana\"},\"application/vnd.etsi.tsl.der\":{\"source\":\"iana\"},\"application/vnd.eudora.data\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.profile\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.settings\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.theme\":{\"source\":\"iana\"},\"application/vnd.ezpix-album\":{\"source\":\"iana\",\"extensions\":[\"ez2\"]},\"application/vnd.ezpix-package\":{\"source\":\"iana\",\"extensions\":[\"ez3\"]},\"application/vnd.f-secure.mobile\":{\"source\":\"iana\"},\"application/vnd.fastcopy-disk-image\":{\"source\":\"iana\"},\"application/vnd.fdf\":{\"source\":\"iana\",\"extensions\":[\"fdf\"]},\"application/vnd.fdsn.mseed\":{\"source\":\"iana\",\"extensions\":[\"mseed\"]},\"application/vnd.fdsn.seed\":{\"source\":\"iana\",\"extensions\":[\"seed\",\"dataless\"]},\"application/vnd.ffsns\":{\"source\":\"iana\"},\"application/vnd.filmit.zfc\":{\"source\":\"iana\"},\"application/vnd.fints\":{\"source\":\"iana\"},\"application/vnd.firemonkeys.cloudcell\":{\"source\":\"iana\"},\"application/vnd.flographit\":{\"source\":\"iana\",\"extensions\":[\"gph\"]},\"application/vnd.fluxtime.clip\":{\"source\":\"iana\",\"extensions\":[\"ftc\"]},\"application/vnd.font-fontforge-sfd\":{\"source\":\"iana\"},\"application/vnd.framemaker\":{\"source\":\"iana\",\"extensions\":[\"fm\",\"frame\",\"maker\",\"book\"]},\"application/vnd.frogans.fnc\":{\"source\":\"iana\",\"extensions\":[\"fnc\"]},\"application/vnd.frogans.ltf\":{\"source\":\"iana\",\"extensions\":[\"ltf\"]},\"application/vnd.fsc.weblaunch\":{\"source\":\"iana\",\"extensions\":[\"fsc\"]},\"application/vnd.fujitsu.oasys\":{\"source\":\"iana\",\"extensions\":[\"oas\"]},\"application/vnd.fujitsu.oasys2\":{\"source\":\"iana\",\"extensions\":[\"oa2\"]},\"application/vnd.fujitsu.oasys3\":{\"source\":\"iana\",\"extensions\":[\"oa3\"]},\"application/vnd.fujitsu.oasysgp\":{\"source\":\"iana\",\"extensions\":[\"fg5\"]},\"application/vnd.fujitsu.oasysprs\":{\"source\":\"iana\",\"extensions\":[\"bh2\"]},\"application/vnd.fujixerox.art-ex\":{\"source\":\"iana\"},\"application/vnd.fujixerox.art4\":{\"source\":\"iana\"},\"application/vnd.fujixerox.ddd\":{\"source\":\"iana\",\"extensions\":[\"ddd\"]},\"application/vnd.fujixerox.docuworks\":{\"source\":\"iana\",\"extensions\":[\"xdw\"]},\"application/vnd.fujixerox.docuworks.binder\":{\"source\":\"iana\",\"extensions\":[\"xbd\"]},\"application/vnd.fujixerox.docuworks.container\":{\"source\":\"iana\"},\"application/vnd.fujixerox.hbpl\":{\"source\":\"iana\"},\"application/vnd.fut-misnet\":{\"source\":\"iana\"},\"application/vnd.fuzzysheet\":{\"source\":\"iana\",\"extensions\":[\"fzs\"]},\"application/vnd.genomatix.tuxedo\":{\"source\":\"iana\",\"extensions\":[\"txd\"]},\"application/vnd.geo+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.geocube+xml\":{\"source\":\"iana\"},\"application/vnd.geogebra.file\":{\"source\":\"iana\",\"extensions\":[\"ggb\"]},\"application/vnd.geogebra.tool\":{\"source\":\"iana\",\"extensions\":[\"ggt\"]},\"application/vnd.geometry-explorer\":{\"source\":\"iana\",\"extensions\":[\"gex\",\"gre\"]},\"application/vnd.geonext\":{\"source\":\"iana\",\"extensions\":[\"gxt\"]},\"application/vnd.geoplan\":{\"source\":\"iana\",\"extensions\":[\"g2w\"]},\"application/vnd.geospace\":{\"source\":\"iana\",\"extensions\":[\"g3w\"]},\"application/vnd.gerber\":{\"source\":\"iana\"},\"application/vnd.globalplatform.card-content-mgt\":{\"source\":\"iana\"},\"application/vnd.globalplatform.card-content-mgt-response\":{\"source\":\"iana\"},\"application/vnd.gmx\":{\"source\":\"iana\",\"extensions\":[\"gmx\"]},\"application/vnd.google-apps.document\":{\"compressible\":false,\"extensions\":[\"gdoc\"]},\"application/vnd.google-apps.presentation\":{\"compressible\":false,\"extensions\":[\"gslides\"]},\"application/vnd.google-apps.spreadsheet\":{\"compressible\":false,\"extensions\":[\"gsheet\"]},\"application/vnd.google-earth.kml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"kml\"]},\"application/vnd.google-earth.kmz\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"kmz\"]},\"application/vnd.gov.sk.e-form+xml\":{\"source\":\"iana\"},\"application/vnd.gov.sk.e-form+zip\":{\"source\":\"iana\"},\"application/vnd.gov.sk.xmldatacontainer+xml\":{\"source\":\"iana\"},\"application/vnd.grafeq\":{\"source\":\"iana\",\"extensions\":[\"gqf\",\"gqs\"]},\"application/vnd.gridmp\":{\"source\":\"iana\"},\"application/vnd.groove-account\":{\"source\":\"iana\",\"extensions\":[\"gac\"]},\"application/vnd.groove-help\":{\"source\":\"iana\",\"extensions\":[\"ghf\"]},\"application/vnd.groove-identity-message\":{\"source\":\"iana\",\"extensions\":[\"gim\"]},\"application/vnd.groove-injector\":{\"source\":\"iana\",\"extensions\":[\"grv\"]},\"application/vnd.groove-tool-message\":{\"source\":\"iana\",\"extensions\":[\"gtm\"]},\"application/vnd.groove-tool-template\":{\"source\":\"iana\",\"extensions\":[\"tpl\"]},\"application/vnd.groove-vcard\":{\"source\":\"iana\",\"extensions\":[\"vcg\"]},\"application/vnd.hal+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hal+xml\":{\"source\":\"iana\",\"extensions\":[\"hal\"]},\"application/vnd.handheld-entertainment+xml\":{\"source\":\"iana\",\"extensions\":[\"zmm\"]},\"application/vnd.hbci\":{\"source\":\"iana\",\"extensions\":[\"hbci\"]},\"application/vnd.hc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hcl-bireports\":{\"source\":\"iana\"},\"application/vnd.hdt\":{\"source\":\"iana\"},\"application/vnd.heroku+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hhe.lesson-player\":{\"source\":\"iana\",\"extensions\":[\"les\"]},\"application/vnd.hp-hpgl\":{\"source\":\"iana\",\"extensions\":[\"hpgl\"]},\"application/vnd.hp-hpid\":{\"source\":\"iana\",\"extensions\":[\"hpid\"]},\"application/vnd.hp-hps\":{\"source\":\"iana\",\"extensions\":[\"hps\"]},\"application/vnd.hp-jlyt\":{\"source\":\"iana\",\"extensions\":[\"jlt\"]},\"application/vnd.hp-pcl\":{\"source\":\"iana\",\"extensions\":[\"pcl\"]},\"application/vnd.hp-pclxl\":{\"source\":\"iana\",\"extensions\":[\"pclxl\"]},\"application/vnd.httphone\":{\"source\":\"iana\"},\"application/vnd.hydrostatix.sof-data\":{\"source\":\"iana\",\"extensions\":[\"sfd-hdstx\"]},\"application/vnd.hyper-item+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hyperdrive+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hzn-3d-crossword\":{\"source\":\"iana\"},\"application/vnd.ibm.afplinedata\":{\"source\":\"iana\"},\"application/vnd.ibm.electronic-media\":{\"source\":\"iana\"},\"application/vnd.ibm.minipay\":{\"source\":\"iana\",\"extensions\":[\"mpy\"]},\"application/vnd.ibm.modcap\":{\"source\":\"iana\",\"extensions\":[\"afp\",\"listafp\",\"list3820\"]},\"application/vnd.ibm.rights-management\":{\"source\":\"iana\",\"extensions\":[\"irm\"]},\"application/vnd.ibm.secure-container\":{\"source\":\"iana\",\"extensions\":[\"sc\"]},\"application/vnd.iccprofile\":{\"source\":\"iana\",\"extensions\":[\"icc\",\"icm\"]},\"application/vnd.ieee.1905\":{\"source\":\"iana\"},\"application/vnd.igloader\":{\"source\":\"iana\",\"extensions\":[\"igl\"]},\"application/vnd.imagemeter.folder+zip\":{\"source\":\"iana\"},\"application/vnd.imagemeter.image+zip\":{\"source\":\"iana\"},\"application/vnd.immervision-ivp\":{\"source\":\"iana\",\"extensions\":[\"ivp\"]},\"application/vnd.immervision-ivu\":{\"source\":\"iana\",\"extensions\":[\"ivu\"]},\"application/vnd.ims.imsccv1p1\":{\"source\":\"iana\"},\"application/vnd.ims.imsccv1p2\":{\"source\":\"iana\"},\"application/vnd.ims.imsccv1p3\":{\"source\":\"iana\"},\"application/vnd.ims.lis.v2.result+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolconsumerprofile+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolproxy+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolproxy.id+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolsettings+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolsettings.simple+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.informedcontrol.rms+xml\":{\"source\":\"iana\"},\"application/vnd.informix-visionary\":{\"source\":\"iana\"},\"application/vnd.infotech.project\":{\"source\":\"iana\"},\"application/vnd.infotech.project+xml\":{\"source\":\"iana\"},\"application/vnd.innopath.wamp.notification\":{\"source\":\"iana\"},\"application/vnd.insors.igm\":{\"source\":\"iana\",\"extensions\":[\"igm\"]},\"application/vnd.intercon.formnet\":{\"source\":\"iana\",\"extensions\":[\"xpw\",\"xpx\"]},\"application/vnd.intergeo\":{\"source\":\"iana\",\"extensions\":[\"i2g\"]},\"application/vnd.intertrust.digibox\":{\"source\":\"iana\"},\"application/vnd.intertrust.nncp\":{\"source\":\"iana\"},\"application/vnd.intu.qbo\":{\"source\":\"iana\",\"extensions\":[\"qbo\"]},\"application/vnd.intu.qfx\":{\"source\":\"iana\",\"extensions\":[\"qfx\"]},\"application/vnd.iptc.g2.catalogitem+xml\":{\"source\":\"iana\"},\"application/vnd.iptc.g2.conceptitem+xml\":{\"source\":\"iana\"},\"application/vnd.iptc.g2.knowledgeitem+xml\":{\"source\":\"iana\"},\"application/vnd.iptc.g2.newsitem+xml\":{\"source\":\"iana\"},\"application/vnd.iptc.g2.newsmessage+xml\":{\"source\":\"iana\"},\"application/vnd.iptc.g2.packageitem+xml\":{\"source\":\"iana\"},\"application/vnd.iptc.g2.planningitem+xml\":{\"source\":\"iana\"},\"application/vnd.ipunplugged.rcprofile\":{\"source\":\"iana\",\"extensions\":[\"rcprofile\"]},\"application/vnd.irepository.package+xml\":{\"source\":\"iana\",\"extensions\":[\"irp\"]},\"application/vnd.is-xpr\":{\"source\":\"iana\",\"extensions\":[\"xpr\"]},\"application/vnd.isac.fcs\":{\"source\":\"iana\",\"extensions\":[\"fcs\"]},\"application/vnd.jam\":{\"source\":\"iana\",\"extensions\":[\"jam\"]},\"application/vnd.japannet-directory-service\":{\"source\":\"iana\"},\"application/vnd.japannet-jpnstore-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-payment-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-registration\":{\"source\":\"iana\"},\"application/vnd.japannet-registration-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-setstore-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-verification\":{\"source\":\"iana\"},\"application/vnd.japannet-verification-wakeup\":{\"source\":\"iana\"},\"application/vnd.jcp.javame.midlet-rms\":{\"source\":\"iana\",\"extensions\":[\"rms\"]},\"application/vnd.jisp\":{\"source\":\"iana\",\"extensions\":[\"jisp\"]},\"application/vnd.joost.joda-archive\":{\"source\":\"iana\",\"extensions\":[\"joda\"]},\"application/vnd.jsk.isdn-ngn\":{\"source\":\"iana\"},\"application/vnd.kahootz\":{\"source\":\"iana\",\"extensions\":[\"ktz\",\"ktr\"]},\"application/vnd.kde.karbon\":{\"source\":\"iana\",\"extensions\":[\"karbon\"]},\"application/vnd.kde.kchart\":{\"source\":\"iana\",\"extensions\":[\"chrt\"]},\"application/vnd.kde.kformula\":{\"source\":\"iana\",\"extensions\":[\"kfo\"]},\"application/vnd.kde.kivio\":{\"source\":\"iana\",\"extensions\":[\"flw\"]},\"application/vnd.kde.kontour\":{\"source\":\"iana\",\"extensions\":[\"kon\"]},\"application/vnd.kde.kpresenter\":{\"source\":\"iana\",\"extensions\":[\"kpr\",\"kpt\"]},\"application/vnd.kde.kspread\":{\"source\":\"iana\",\"extensions\":[\"ksp\"]},\"application/vnd.kde.kword\":{\"source\":\"iana\",\"extensions\":[\"kwd\",\"kwt\"]},\"application/vnd.kenameaapp\":{\"source\":\"iana\",\"extensions\":[\"htke\"]},\"application/vnd.kidspiration\":{\"source\":\"iana\",\"extensions\":[\"kia\"]},\"application/vnd.kinar\":{\"source\":\"iana\",\"extensions\":[\"kne\",\"knp\"]},\"application/vnd.koan\":{\"source\":\"iana\",\"extensions\":[\"skp\",\"skd\",\"skt\",\"skm\"]},\"application/vnd.kodak-descriptor\":{\"source\":\"iana\",\"extensions\":[\"sse\"]},\"application/vnd.las.las+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.las.las+xml\":{\"source\":\"iana\",\"extensions\":[\"lasxml\"]},\"application/vnd.liberty-request+xml\":{\"source\":\"iana\"},\"application/vnd.llamagraphics.life-balance.desktop\":{\"source\":\"iana\",\"extensions\":[\"lbd\"]},\"application/vnd.llamagraphics.life-balance.exchange+xml\":{\"source\":\"iana\",\"extensions\":[\"lbe\"]},\"application/vnd.lotus-1-2-3\":{\"source\":\"iana\",\"extensions\":[\"123\"]},\"application/vnd.lotus-approach\":{\"source\":\"iana\",\"extensions\":[\"apr\"]},\"application/vnd.lotus-freelance\":{\"source\":\"iana\",\"extensions\":[\"pre\"]},\"application/vnd.lotus-notes\":{\"source\":\"iana\",\"extensions\":[\"nsf\"]},\"application/vnd.lotus-organizer\":{\"source\":\"iana\",\"extensions\":[\"org\"]},\"application/vnd.lotus-screencam\":{\"source\":\"iana\",\"extensions\":[\"scm\"]},\"application/vnd.lotus-wordpro\":{\"source\":\"iana\",\"extensions\":[\"lwp\"]},\"application/vnd.macports.portpkg\":{\"source\":\"iana\",\"extensions\":[\"portpkg\"]},\"application/vnd.mapbox-vector-tile\":{\"source\":\"iana\"},\"application/vnd.marlin.drm.actiontoken+xml\":{\"source\":\"iana\"},\"application/vnd.marlin.drm.conftoken+xml\":{\"source\":\"iana\"},\"application/vnd.marlin.drm.license+xml\":{\"source\":\"iana\"},\"application/vnd.marlin.drm.mdcf\":{\"source\":\"iana\"},\"application/vnd.mason+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.maxmind.maxmind-db\":{\"source\":\"iana\"},\"application/vnd.mcd\":{\"source\":\"iana\",\"extensions\":[\"mcd\"]},\"application/vnd.medcalcdata\":{\"source\":\"iana\",\"extensions\":[\"mc1\"]},\"application/vnd.mediastation.cdkey\":{\"source\":\"iana\",\"extensions\":[\"cdkey\"]},\"application/vnd.meridian-slingshot\":{\"source\":\"iana\"},\"application/vnd.mfer\":{\"source\":\"iana\",\"extensions\":[\"mwf\"]},\"application/vnd.mfmp\":{\"source\":\"iana\",\"extensions\":[\"mfm\"]},\"application/vnd.micro+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.micrografx.flo\":{\"source\":\"iana\",\"extensions\":[\"flo\"]},\"application/vnd.micrografx.igx\":{\"source\":\"iana\",\"extensions\":[\"igx\"]},\"application/vnd.microsoft.portable-executable\":{\"source\":\"iana\"},\"application/vnd.microsoft.windows.thumbnail-cache\":{\"source\":\"iana\"},\"application/vnd.miele+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.mif\":{\"source\":\"iana\",\"extensions\":[\"mif\"]},\"application/vnd.minisoft-hp3000-save\":{\"source\":\"iana\"},\"application/vnd.mitsubishi.misty-guard.trustweb\":{\"source\":\"iana\"},\"application/vnd.mobius.daf\":{\"source\":\"iana\",\"extensions\":[\"daf\"]},\"application/vnd.mobius.dis\":{\"source\":\"iana\",\"extensions\":[\"dis\"]},\"application/vnd.mobius.mbk\":{\"source\":\"iana\",\"extensions\":[\"mbk\"]},\"application/vnd.mobius.mqy\":{\"source\":\"iana\",\"extensions\":[\"mqy\"]},\"application/vnd.mobius.msl\":{\"source\":\"iana\",\"extensions\":[\"msl\"]},\"application/vnd.mobius.plc\":{\"source\":\"iana\",\"extensions\":[\"plc\"]},\"application/vnd.mobius.txf\":{\"source\":\"iana\",\"extensions\":[\"txf\"]},\"application/vnd.mophun.application\":{\"source\":\"iana\",\"extensions\":[\"mpn\"]},\"application/vnd.mophun.certificate\":{\"source\":\"iana\",\"extensions\":[\"mpc\"]},\"application/vnd.motorola.flexsuite\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.adsi\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.fis\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.gotap\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.kmr\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.ttc\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.wem\":{\"source\":\"iana\"},\"application/vnd.motorola.iprm\":{\"source\":\"iana\"},\"application/vnd.mozilla.xul+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xul\"]},\"application/vnd.ms-3mfdocument\":{\"source\":\"iana\"},\"application/vnd.ms-artgalry\":{\"source\":\"iana\",\"extensions\":[\"cil\"]},\"application/vnd.ms-asf\":{\"source\":\"iana\"},\"application/vnd.ms-cab-compressed\":{\"source\":\"iana\",\"extensions\":[\"cab\"]},\"application/vnd.ms-color.iccprofile\":{\"source\":\"apache\"},\"application/vnd.ms-excel\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xls\",\"xlm\",\"xla\",\"xlc\",\"xlt\",\"xlw\"]},\"application/vnd.ms-excel.addin.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlam\"]},\"application/vnd.ms-excel.sheet.binary.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlsb\"]},\"application/vnd.ms-excel.sheet.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlsm\"]},\"application/vnd.ms-excel.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xltm\"]},\"application/vnd.ms-fontobject\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"eot\"]},\"application/vnd.ms-htmlhelp\":{\"source\":\"iana\",\"extensions\":[\"chm\"]},\"application/vnd.ms-ims\":{\"source\":\"iana\",\"extensions\":[\"ims\"]},\"application/vnd.ms-lrm\":{\"source\":\"iana\",\"extensions\":[\"lrm\"]},\"application/vnd.ms-office.activex+xml\":{\"source\":\"iana\"},\"application/vnd.ms-officetheme\":{\"source\":\"iana\",\"extensions\":[\"thmx\"]},\"application/vnd.ms-opentype\":{\"source\":\"apache\",\"compressible\":true},\"application/vnd.ms-outlook\":{\"compressible\":false,\"extensions\":[\"msg\"]},\"application/vnd.ms-package.obfuscated-opentype\":{\"source\":\"apache\"},\"application/vnd.ms-pki.seccat\":{\"source\":\"apache\",\"extensions\":[\"cat\"]},\"application/vnd.ms-pki.stl\":{\"source\":\"apache\",\"extensions\":[\"stl\"]},\"application/vnd.ms-playready.initiator+xml\":{\"source\":\"iana\"},\"application/vnd.ms-powerpoint\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ppt\",\"pps\",\"pot\"]},\"application/vnd.ms-powerpoint.addin.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"ppam\"]},\"application/vnd.ms-powerpoint.presentation.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"pptm\"]},\"application/vnd.ms-powerpoint.slide.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"sldm\"]},\"application/vnd.ms-powerpoint.slideshow.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"ppsm\"]},\"application/vnd.ms-powerpoint.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"potm\"]},\"application/vnd.ms-printdevicecapabilities+xml\":{\"source\":\"iana\"},\"application/vnd.ms-printing.printticket+xml\":{\"source\":\"apache\"},\"application/vnd.ms-printschematicket+xml\":{\"source\":\"iana\"},\"application/vnd.ms-project\":{\"source\":\"iana\",\"extensions\":[\"mpp\",\"mpt\"]},\"application/vnd.ms-tnef\":{\"source\":\"iana\"},\"application/vnd.ms-windows.devicepairing\":{\"source\":\"iana\"},\"application/vnd.ms-windows.nwprinting.oob\":{\"source\":\"iana\"},\"application/vnd.ms-windows.printerpairing\":{\"source\":\"iana\"},\"application/vnd.ms-windows.wsd.oob\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.lic-chlg-req\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.lic-resp\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.meter-chlg-req\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.meter-resp\":{\"source\":\"iana\"},\"application/vnd.ms-word.document.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"docm\"]},\"application/vnd.ms-word.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"dotm\"]},\"application/vnd.ms-works\":{\"source\":\"iana\",\"extensions\":[\"wps\",\"wks\",\"wcm\",\"wdb\"]},\"application/vnd.ms-wpl\":{\"source\":\"iana\",\"extensions\":[\"wpl\"]},\"application/vnd.ms-xpsdocument\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xps\"]},\"application/vnd.msa-disk-image\":{\"source\":\"iana\"},\"application/vnd.mseq\":{\"source\":\"iana\",\"extensions\":[\"mseq\"]},\"application/vnd.msign\":{\"source\":\"iana\"},\"application/vnd.multiad.creator\":{\"source\":\"iana\"},\"application/vnd.multiad.creator.cif\":{\"source\":\"iana\"},\"application/vnd.music-niff\":{\"source\":\"iana\"},\"application/vnd.musician\":{\"source\":\"iana\",\"extensions\":[\"mus\"]},\"application/vnd.muvee.style\":{\"source\":\"iana\",\"extensions\":[\"msty\"]},\"application/vnd.mynfc\":{\"source\":\"iana\",\"extensions\":[\"taglet\"]},\"application/vnd.ncd.control\":{\"source\":\"iana\"},\"application/vnd.ncd.reference\":{\"source\":\"iana\"},\"application/vnd.nearst.inv+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nervana\":{\"source\":\"iana\"},\"application/vnd.netfpx\":{\"source\":\"iana\"},\"application/vnd.neurolanguage.nlu\":{\"source\":\"iana\",\"extensions\":[\"nlu\"]},\"application/vnd.nintendo.nitro.rom\":{\"source\":\"iana\"},\"application/vnd.nintendo.snes.rom\":{\"source\":\"iana\"},\"application/vnd.nitf\":{\"source\":\"iana\",\"extensions\":[\"ntf\",\"nitf\"]},\"application/vnd.noblenet-directory\":{\"source\":\"iana\",\"extensions\":[\"nnd\"]},\"application/vnd.noblenet-sealer\":{\"source\":\"iana\",\"extensions\":[\"nns\"]},\"application/vnd.noblenet-web\":{\"source\":\"iana\",\"extensions\":[\"nnw\"]},\"application/vnd.nokia.catalogs\":{\"source\":\"iana\"},\"application/vnd.nokia.conml+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.conml+xml\":{\"source\":\"iana\"},\"application/vnd.nokia.iptv.config+xml\":{\"source\":\"iana\"},\"application/vnd.nokia.isds-radio-presets\":{\"source\":\"iana\"},\"application/vnd.nokia.landmark+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.landmark+xml\":{\"source\":\"iana\"},\"application/vnd.nokia.landmarkcollection+xml\":{\"source\":\"iana\"},\"application/vnd.nokia.n-gage.ac+xml\":{\"source\":\"iana\"},\"application/vnd.nokia.n-gage.data\":{\"source\":\"iana\",\"extensions\":[\"ngdat\"]},\"application/vnd.nokia.n-gage.symbian.install\":{\"source\":\"iana\",\"extensions\":[\"n-gage\"]},\"application/vnd.nokia.ncd\":{\"source\":\"iana\"},\"application/vnd.nokia.pcd+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.pcd+xml\":{\"source\":\"iana\"},\"application/vnd.nokia.radio-preset\":{\"source\":\"iana\",\"extensions\":[\"rpst\"]},\"application/vnd.nokia.radio-presets\":{\"source\":\"iana\",\"extensions\":[\"rpss\"]},\"application/vnd.novadigm.edm\":{\"source\":\"iana\",\"extensions\":[\"edm\"]},\"application/vnd.novadigm.edx\":{\"source\":\"iana\",\"extensions\":[\"edx\"]},\"application/vnd.novadigm.ext\":{\"source\":\"iana\",\"extensions\":[\"ext\"]},\"application/vnd.ntt-local.content-share\":{\"source\":\"iana\"},\"application/vnd.ntt-local.file-transfer\":{\"source\":\"iana\"},\"application/vnd.ntt-local.ogw_remote-access\":{\"source\":\"iana\"},\"application/vnd.ntt-local.sip-ta_remote\":{\"source\":\"iana\"},\"application/vnd.ntt-local.sip-ta_tcp_stream\":{\"source\":\"iana\"},\"application/vnd.oasis.opendocument.chart\":{\"source\":\"iana\",\"extensions\":[\"odc\"]},\"application/vnd.oasis.opendocument.chart-template\":{\"source\":\"iana\",\"extensions\":[\"otc\"]},\"application/vnd.oasis.opendocument.database\":{\"source\":\"iana\",\"extensions\":[\"odb\"]},\"application/vnd.oasis.opendocument.formula\":{\"source\":\"iana\",\"extensions\":[\"odf\"]},\"application/vnd.oasis.opendocument.formula-template\":{\"source\":\"iana\",\"extensions\":[\"odft\"]},\"application/vnd.oasis.opendocument.graphics\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odg\"]},\"application/vnd.oasis.opendocument.graphics-template\":{\"source\":\"iana\",\"extensions\":[\"otg\"]},\"application/vnd.oasis.opendocument.image\":{\"source\":\"iana\",\"extensions\":[\"odi\"]},\"application/vnd.oasis.opendocument.image-template\":{\"source\":\"iana\",\"extensions\":[\"oti\"]},\"application/vnd.oasis.opendocument.presentation\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odp\"]},\"application/vnd.oasis.opendocument.presentation-template\":{\"source\":\"iana\",\"extensions\":[\"otp\"]},\"application/vnd.oasis.opendocument.spreadsheet\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ods\"]},\"application/vnd.oasis.opendocument.spreadsheet-template\":{\"source\":\"iana\",\"extensions\":[\"ots\"]},\"application/vnd.oasis.opendocument.text\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odt\"]},\"application/vnd.oasis.opendocument.text-master\":{\"source\":\"iana\",\"extensions\":[\"odm\"]},\"application/vnd.oasis.opendocument.text-template\":{\"source\":\"iana\",\"extensions\":[\"ott\"]},\"application/vnd.oasis.opendocument.text-web\":{\"source\":\"iana\",\"extensions\":[\"oth\"]},\"application/vnd.obn\":{\"source\":\"iana\"},\"application/vnd.ocf+cbor\":{\"source\":\"iana\"},\"application/vnd.oftn.l10n+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.contentaccessdownload+xml\":{\"source\":\"iana\"},\"application/vnd.oipf.contentaccessstreaming+xml\":{\"source\":\"iana\"},\"application/vnd.oipf.cspg-hexbinary\":{\"source\":\"iana\"},\"application/vnd.oipf.dae.svg+xml\":{\"source\":\"iana\"},\"application/vnd.oipf.dae.xhtml+xml\":{\"source\":\"iana\"},\"application/vnd.oipf.mippvcontrolmessage+xml\":{\"source\":\"iana\"},\"application/vnd.oipf.pae.gem\":{\"source\":\"iana\"},\"application/vnd.oipf.spdiscovery+xml\":{\"source\":\"iana\"},\"application/vnd.oipf.spdlist+xml\":{\"source\":\"iana\"},\"application/vnd.oipf.ueprofile+xml\":{\"source\":\"iana\"},\"application/vnd.oipf.userprofile+xml\":{\"source\":\"iana\"},\"application/vnd.olpc-sugar\":{\"source\":\"iana\",\"extensions\":[\"xo\"]},\"application/vnd.oma-scws-config\":{\"source\":\"iana\"},\"application/vnd.oma-scws-http-request\":{\"source\":\"iana\"},\"application/vnd.oma-scws-http-response\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.associated-procedure-parameter+xml\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.drm-trigger+xml\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.imd+xml\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.ltkm\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.notification+xml\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.provisioningtrigger\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.sgboot\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.sgdd+xml\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.sgdu\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.simple-symbol-container\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.smartcard-trigger+xml\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.sprov+xml\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.stkm\":{\"source\":\"iana\"},\"application/vnd.oma.cab-address-book+xml\":{\"source\":\"iana\"},\"application/vnd.oma.cab-feature-handler+xml\":{\"source\":\"iana\"},\"application/vnd.oma.cab-pcc+xml\":{\"source\":\"iana\"},\"application/vnd.oma.cab-subs-invite+xml\":{\"source\":\"iana\"},\"application/vnd.oma.cab-user-prefs+xml\":{\"source\":\"iana\"},\"application/vnd.oma.dcd\":{\"source\":\"iana\"},\"application/vnd.oma.dcdc\":{\"source\":\"iana\"},\"application/vnd.oma.dd2+xml\":{\"source\":\"iana\",\"extensions\":[\"dd2\"]},\"application/vnd.oma.drm.risd+xml\":{\"source\":\"iana\"},\"application/vnd.oma.group-usage-list+xml\":{\"source\":\"iana\"},\"application/vnd.oma.lwm2m+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.lwm2m+tlv\":{\"source\":\"iana\"},\"application/vnd.oma.pal+xml\":{\"source\":\"iana\"},\"application/vnd.oma.poc.detailed-progress-report+xml\":{\"source\":\"iana\"},\"application/vnd.oma.poc.final-report+xml\":{\"source\":\"iana\"},\"application/vnd.oma.poc.groups+xml\":{\"source\":\"iana\"},\"application/vnd.oma.poc.invocation-descriptor+xml\":{\"source\":\"iana\"},\"application/vnd.oma.poc.optimized-progress-report+xml\":{\"source\":\"iana\"},\"application/vnd.oma.push\":{\"source\":\"iana\"},\"application/vnd.oma.scidm.messages+xml\":{\"source\":\"iana\"},\"application/vnd.oma.xcap-directory+xml\":{\"source\":\"iana\"},\"application/vnd.omads-email+xml\":{\"source\":\"iana\"},\"application/vnd.omads-file+xml\":{\"source\":\"iana\"},\"application/vnd.omads-folder+xml\":{\"source\":\"iana\"},\"application/vnd.omaloc-supl-init\":{\"source\":\"iana\"},\"application/vnd.onepager\":{\"source\":\"iana\"},\"application/vnd.onepagertamp\":{\"source\":\"iana\"},\"application/vnd.onepagertamx\":{\"source\":\"iana\"},\"application/vnd.onepagertat\":{\"source\":\"iana\"},\"application/vnd.onepagertatp\":{\"source\":\"iana\"},\"application/vnd.onepagertatx\":{\"source\":\"iana\"},\"application/vnd.openblox.game+xml\":{\"source\":\"iana\"},\"application/vnd.openblox.game-binary\":{\"source\":\"iana\"},\"application/vnd.openeye.oeb\":{\"source\":\"iana\"},\"application/vnd.openofficeorg.extension\":{\"source\":\"apache\",\"extensions\":[\"oxt\"]},\"application/vnd.openstreetmap.data+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.custom-properties+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.customxmlproperties+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.drawing+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.drawingml.chart+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.extended-properties+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.comments+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.presentation\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pptx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.slide\":{\"source\":\"iana\",\"extensions\":[\"sldx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.slide+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.slideshow\":{\"source\":\"iana\",\"extensions\":[\"ppsx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.tags+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.template\":{\"source\":\"iana\",\"extensions\":[\"potx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xlsx\"]},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.template\":{\"source\":\"iana\",\"extensions\":[\"xltx\"]},\"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.theme+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.themeoverride+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.vmldrawing\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"docx\"]},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.template\":{\"source\":\"iana\",\"extensions\":[\"dotx\"]},\"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-package.core-properties+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-package.relationships+xml\":{\"source\":\"iana\"},\"application/vnd.oracle.resource+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.orange.indata\":{\"source\":\"iana\"},\"application/vnd.osa.netdeploy\":{\"source\":\"iana\"},\"application/vnd.osgeo.mapguide.package\":{\"source\":\"iana\",\"extensions\":[\"mgp\"]},\"application/vnd.osgi.bundle\":{\"source\":\"iana\"},\"application/vnd.osgi.dp\":{\"source\":\"iana\",\"extensions\":[\"dp\"]},\"application/vnd.osgi.subsystem\":{\"source\":\"iana\",\"extensions\":[\"esa\"]},\"application/vnd.otps.ct-kip+xml\":{\"source\":\"iana\"},\"application/vnd.oxli.countgraph\":{\"source\":\"iana\"},\"application/vnd.pagerduty+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.palm\":{\"source\":\"iana\",\"extensions\":[\"pdb\",\"pqa\",\"oprc\"]},\"application/vnd.panoply\":{\"source\":\"iana\"},\"application/vnd.paos+xml\":{\"source\":\"iana\"},\"application/vnd.paos.xml\":{\"source\":\"apache\"},\"application/vnd.patentdive\":{\"source\":\"iana\"},\"application/vnd.pawaafile\":{\"source\":\"iana\",\"extensions\":[\"paw\"]},\"application/vnd.pcos\":{\"source\":\"iana\"},\"application/vnd.pg.format\":{\"source\":\"iana\",\"extensions\":[\"str\"]},\"application/vnd.pg.osasli\":{\"source\":\"iana\",\"extensions\":[\"ei6\"]},\"application/vnd.piaccess.application-licence\":{\"source\":\"iana\"},\"application/vnd.picsel\":{\"source\":\"iana\",\"extensions\":[\"efif\"]},\"application/vnd.pmi.widget\":{\"source\":\"iana\",\"extensions\":[\"wg\"]},\"application/vnd.poc.group-advertisement+xml\":{\"source\":\"iana\"},\"application/vnd.pocketlearn\":{\"source\":\"iana\",\"extensions\":[\"plf\"]},\"application/vnd.powerbuilder6\":{\"source\":\"iana\",\"extensions\":[\"pbd\"]},\"application/vnd.powerbuilder6-s\":{\"source\":\"iana\"},\"application/vnd.powerbuilder7\":{\"source\":\"iana\"},\"application/vnd.powerbuilder7-s\":{\"source\":\"iana\"},\"application/vnd.powerbuilder75\":{\"source\":\"iana\"},\"application/vnd.powerbuilder75-s\":{\"source\":\"iana\"},\"application/vnd.preminet\":{\"source\":\"iana\"},\"application/vnd.previewsystems.box\":{\"source\":\"iana\",\"extensions\":[\"box\"]},\"application/vnd.proteus.magazine\":{\"source\":\"iana\",\"extensions\":[\"mgz\"]},\"application/vnd.publishare-delta-tree\":{\"source\":\"iana\",\"extensions\":[\"qps\"]},\"application/vnd.pvi.ptid1\":{\"source\":\"iana\",\"extensions\":[\"ptid\"]},\"application/vnd.pwg-multiplexed\":{\"source\":\"iana\"},\"application/vnd.pwg-xhtml-print+xml\":{\"source\":\"iana\"},\"application/vnd.qualcomm.brew-app-res\":{\"source\":\"iana\"},\"application/vnd.quarantainenet\":{\"source\":\"iana\"},\"application/vnd.quark.quarkxpress\":{\"source\":\"iana\",\"extensions\":[\"qxd\",\"qxt\",\"qwd\",\"qwt\",\"qxl\",\"qxb\"]},\"application/vnd.quobject-quoxdocument\":{\"source\":\"iana\"},\"application/vnd.radisys.moml+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml-audit+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml-audit-conf+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml-audit-conn+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml-audit-dialog+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml-audit-stream+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml-conf+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml-dialog+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml-dialog-base+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml-dialog-fax-detect+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml-dialog-fax-sendrecv+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml-dialog-group+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml-dialog-speech+xml\":{\"source\":\"iana\"},\"application/vnd.radisys.msml-dialog-transform+xml\":{\"source\":\"iana\"},\"application/vnd.rainstor.data\":{\"source\":\"iana\"},\"application/vnd.rapid\":{\"source\":\"iana\"},\"application/vnd.rar\":{\"source\":\"iana\"},\"application/vnd.realvnc.bed\":{\"source\":\"iana\",\"extensions\":[\"bed\"]},\"application/vnd.recordare.musicxml\":{\"source\":\"iana\",\"extensions\":[\"mxl\"]},\"application/vnd.recordare.musicxml+xml\":{\"source\":\"iana\",\"extensions\":[\"musicxml\"]},\"application/vnd.renlearn.rlprint\":{\"source\":\"iana\"},\"application/vnd.restful+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.rig.cryptonote\":{\"source\":\"iana\",\"extensions\":[\"cryptonote\"]},\"application/vnd.rim.cod\":{\"source\":\"apache\",\"extensions\":[\"cod\"]},\"application/vnd.rn-realmedia\":{\"source\":\"apache\",\"extensions\":[\"rm\"]},\"application/vnd.rn-realmedia-vbr\":{\"source\":\"apache\",\"extensions\":[\"rmvb\"]},\"application/vnd.route66.link66+xml\":{\"source\":\"iana\",\"extensions\":[\"link66\"]},\"application/vnd.rs-274x\":{\"source\":\"iana\"},\"application/vnd.ruckus.download\":{\"source\":\"iana\"},\"application/vnd.s3sms\":{\"source\":\"iana\"},\"application/vnd.sailingtracker.track\":{\"source\":\"iana\",\"extensions\":[\"st\"]},\"application/vnd.sbm.cid\":{\"source\":\"iana\"},\"application/vnd.sbm.mid2\":{\"source\":\"iana\"},\"application/vnd.scribus\":{\"source\":\"iana\"},\"application/vnd.sealed.3df\":{\"source\":\"iana\"},\"application/vnd.sealed.csf\":{\"source\":\"iana\"},\"application/vnd.sealed.doc\":{\"source\":\"iana\"},\"application/vnd.sealed.eml\":{\"source\":\"iana\"},\"application/vnd.sealed.mht\":{\"source\":\"iana\"},\"application/vnd.sealed.net\":{\"source\":\"iana\"},\"application/vnd.sealed.ppt\":{\"source\":\"iana\"},\"application/vnd.sealed.tiff\":{\"source\":\"iana\"},\"application/vnd.sealed.xls\":{\"source\":\"iana\"},\"application/vnd.sealedmedia.softseal.html\":{\"source\":\"iana\"},\"application/vnd.sealedmedia.softseal.pdf\":{\"source\":\"iana\"},\"application/vnd.seemail\":{\"source\":\"iana\",\"extensions\":[\"see\"]},\"application/vnd.sema\":{\"source\":\"iana\",\"extensions\":[\"sema\"]},\"application/vnd.semd\":{\"source\":\"iana\",\"extensions\":[\"semd\"]},\"application/vnd.semf\":{\"source\":\"iana\",\"extensions\":[\"semf\"]},\"application/vnd.shana.informed.formdata\":{\"source\":\"iana\",\"extensions\":[\"ifm\"]},\"application/vnd.shana.informed.formtemplate\":{\"source\":\"iana\",\"extensions\":[\"itp\"]},\"application/vnd.shana.informed.interchange\":{\"source\":\"iana\",\"extensions\":[\"iif\"]},\"application/vnd.shana.informed.package\":{\"source\":\"iana\",\"extensions\":[\"ipk\"]},\"application/vnd.sigrok.session\":{\"source\":\"iana\"},\"application/vnd.simtech-mindmapper\":{\"source\":\"iana\",\"extensions\":[\"twd\",\"twds\"]},\"application/vnd.siren+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.smaf\":{\"source\":\"iana\",\"extensions\":[\"mmf\"]},\"application/vnd.smart.notebook\":{\"source\":\"iana\"},\"application/vnd.smart.teacher\":{\"source\":\"iana\",\"extensions\":[\"teacher\"]},\"application/vnd.software602.filler.form+xml\":{\"source\":\"iana\"},\"application/vnd.software602.filler.form-xml-zip\":{\"source\":\"iana\"},\"application/vnd.solent.sdkm+xml\":{\"source\":\"iana\",\"extensions\":[\"sdkm\",\"sdkd\"]},\"application/vnd.spotfire.dxp\":{\"source\":\"iana\",\"extensions\":[\"dxp\"]},\"application/vnd.spotfire.sfs\":{\"source\":\"iana\",\"extensions\":[\"sfs\"]},\"application/vnd.sqlite3\":{\"source\":\"iana\"},\"application/vnd.sss-cod\":{\"source\":\"iana\"},\"application/vnd.sss-dtf\":{\"source\":\"iana\"},\"application/vnd.sss-ntf\":{\"source\":\"iana\"},\"application/vnd.stardivision.calc\":{\"source\":\"apache\",\"extensions\":[\"sdc\"]},\"application/vnd.stardivision.draw\":{\"source\":\"apache\",\"extensions\":[\"sda\"]},\"application/vnd.stardivision.impress\":{\"source\":\"apache\",\"extensions\":[\"sdd\"]},\"application/vnd.stardivision.math\":{\"source\":\"apache\",\"extensions\":[\"smf\"]},\"application/vnd.stardivision.writer\":{\"source\":\"apache\",\"extensions\":[\"sdw\",\"vor\"]},\"application/vnd.stardivision.writer-global\":{\"source\":\"apache\",\"extensions\":[\"sgl\"]},\"application/vnd.stepmania.package\":{\"source\":\"iana\",\"extensions\":[\"smzip\"]},\"application/vnd.stepmania.stepchart\":{\"source\":\"iana\",\"extensions\":[\"sm\"]},\"application/vnd.street-stream\":{\"source\":\"iana\"},\"application/vnd.sun.wadl+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wadl\"]},\"application/vnd.sun.xml.calc\":{\"source\":\"apache\",\"extensions\":[\"sxc\"]},\"application/vnd.sun.xml.calc.template\":{\"source\":\"apache\",\"extensions\":[\"stc\"]},\"application/vnd.sun.xml.draw\":{\"source\":\"apache\",\"extensions\":[\"sxd\"]},\"application/vnd.sun.xml.draw.template\":{\"source\":\"apache\",\"extensions\":[\"std\"]},\"application/vnd.sun.xml.impress\":{\"source\":\"apache\",\"extensions\":[\"sxi\"]},\"application/vnd.sun.xml.impress.template\":{\"source\":\"apache\",\"extensions\":[\"sti\"]},\"application/vnd.sun.xml.math\":{\"source\":\"apache\",\"extensions\":[\"sxm\"]},\"application/vnd.sun.xml.writer\":{\"source\":\"apache\",\"extensions\":[\"sxw\"]},\"application/vnd.sun.xml.writer.global\":{\"source\":\"apache\",\"extensions\":[\"sxg\"]},\"application/vnd.sun.xml.writer.template\":{\"source\":\"apache\",\"extensions\":[\"stw\"]},\"application/vnd.sus-calendar\":{\"source\":\"iana\",\"extensions\":[\"sus\",\"susp\"]},\"application/vnd.svd\":{\"source\":\"iana\",\"extensions\":[\"svd\"]},\"application/vnd.swiftview-ics\":{\"source\":\"iana\"},\"application/vnd.symbian.install\":{\"source\":\"apache\",\"extensions\":[\"sis\",\"sisx\"]},\"application/vnd.syncml+xml\":{\"source\":\"iana\",\"extensions\":[\"xsm\"]},\"application/vnd.syncml.dm+wbxml\":{\"source\":\"iana\",\"extensions\":[\"bdm\"]},\"application/vnd.syncml.dm+xml\":{\"source\":\"iana\",\"extensions\":[\"xdm\"]},\"application/vnd.syncml.dm.notification\":{\"source\":\"iana\"},\"application/vnd.syncml.dmddf+wbxml\":{\"source\":\"iana\"},\"application/vnd.syncml.dmddf+xml\":{\"source\":\"iana\"},\"application/vnd.syncml.dmtnds+wbxml\":{\"source\":\"iana\"},\"application/vnd.syncml.dmtnds+xml\":{\"source\":\"iana\"},\"application/vnd.syncml.ds.notification\":{\"source\":\"iana\"},\"application/vnd.tableschema+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.tao.intent-module-archive\":{\"source\":\"iana\",\"extensions\":[\"tao\"]},\"application/vnd.tcpdump.pcap\":{\"source\":\"iana\",\"extensions\":[\"pcap\",\"cap\",\"dmp\"]},\"application/vnd.tmd.mediaflex.api+xml\":{\"source\":\"iana\"},\"application/vnd.tml\":{\"source\":\"iana\"},\"application/vnd.tmobile-livetv\":{\"source\":\"iana\",\"extensions\":[\"tmo\"]},\"application/vnd.tri.onesource\":{\"source\":\"iana\"},\"application/vnd.trid.tpt\":{\"source\":\"iana\",\"extensions\":[\"tpt\"]},\"application/vnd.triscape.mxs\":{\"source\":\"iana\",\"extensions\":[\"mxs\"]},\"application/vnd.trueapp\":{\"source\":\"iana\",\"extensions\":[\"tra\"]},\"application/vnd.truedoc\":{\"source\":\"iana\"},\"application/vnd.ubisoft.webplayer\":{\"source\":\"iana\"},\"application/vnd.ufdl\":{\"source\":\"iana\",\"extensions\":[\"ufd\",\"ufdl\"]},\"application/vnd.uiq.theme\":{\"source\":\"iana\",\"extensions\":[\"utz\"]},\"application/vnd.umajin\":{\"source\":\"iana\",\"extensions\":[\"umj\"]},\"application/vnd.unity\":{\"source\":\"iana\",\"extensions\":[\"unityweb\"]},\"application/vnd.uoml+xml\":{\"source\":\"iana\",\"extensions\":[\"uoml\"]},\"application/vnd.uplanet.alert\":{\"source\":\"iana\"},\"application/vnd.uplanet.alert-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.bearer-choice\":{\"source\":\"iana\"},\"application/vnd.uplanet.bearer-choice-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.cacheop\":{\"source\":\"iana\"},\"application/vnd.uplanet.cacheop-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.channel\":{\"source\":\"iana\"},\"application/vnd.uplanet.channel-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.list\":{\"source\":\"iana\"},\"application/vnd.uplanet.list-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.listcmd\":{\"source\":\"iana\"},\"application/vnd.uplanet.listcmd-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.signal\":{\"source\":\"iana\"},\"application/vnd.uri-map\":{\"source\":\"iana\"},\"application/vnd.valve.source.material\":{\"source\":\"iana\"},\"application/vnd.vcx\":{\"source\":\"iana\",\"extensions\":[\"vcx\"]},\"application/vnd.vd-study\":{\"source\":\"iana\"},\"application/vnd.vectorworks\":{\"source\":\"iana\"},\"application/vnd.vel+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.verimatrix.vcas\":{\"source\":\"iana\"},\"application/vnd.vidsoft.vidconference\":{\"source\":\"iana\"},\"application/vnd.visio\":{\"source\":\"iana\",\"extensions\":[\"vsd\",\"vst\",\"vss\",\"vsw\"]},\"application/vnd.visionary\":{\"source\":\"iana\",\"extensions\":[\"vis\"]},\"application/vnd.vividence.scriptfile\":{\"source\":\"iana\"},\"application/vnd.vsf\":{\"source\":\"iana\",\"extensions\":[\"vsf\"]},\"application/vnd.wap.sic\":{\"source\":\"iana\"},\"application/vnd.wap.slc\":{\"source\":\"iana\"},\"application/vnd.wap.wbxml\":{\"source\":\"iana\",\"extensions\":[\"wbxml\"]},\"application/vnd.wap.wmlc\":{\"source\":\"iana\",\"extensions\":[\"wmlc\"]},\"application/vnd.wap.wmlscriptc\":{\"source\":\"iana\",\"extensions\":[\"wmlsc\"]},\"application/vnd.webturbo\":{\"source\":\"iana\",\"extensions\":[\"wtb\"]},\"application/vnd.wfa.p2p\":{\"source\":\"iana\"},\"application/vnd.wfa.wsc\":{\"source\":\"iana\"},\"application/vnd.windows.devicepairing\":{\"source\":\"iana\"},\"application/vnd.wmc\":{\"source\":\"iana\"},\"application/vnd.wmf.bootstrap\":{\"source\":\"iana\"},\"application/vnd.wolfram.mathematica\":{\"source\":\"iana\"},\"application/vnd.wolfram.mathematica.package\":{\"source\":\"iana\"},\"application/vnd.wolfram.player\":{\"source\":\"iana\",\"extensions\":[\"nbp\"]},\"application/vnd.wordperfect\":{\"source\":\"iana\",\"extensions\":[\"wpd\"]},\"application/vnd.wqd\":{\"source\":\"iana\",\"extensions\":[\"wqd\"]},\"application/vnd.wrq-hp3000-labelled\":{\"source\":\"iana\"},\"application/vnd.wt.stf\":{\"source\":\"iana\",\"extensions\":[\"stf\"]},\"application/vnd.wv.csp+wbxml\":{\"source\":\"iana\"},\"application/vnd.wv.csp+xml\":{\"source\":\"iana\"},\"application/vnd.wv.ssp+xml\":{\"source\":\"iana\"},\"application/vnd.xacml+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.xara\":{\"source\":\"iana\",\"extensions\":[\"xar\"]},\"application/vnd.xfdl\":{\"source\":\"iana\",\"extensions\":[\"xfdl\"]},\"application/vnd.xfdl.webform\":{\"source\":\"iana\"},\"application/vnd.xmi+xml\":{\"source\":\"iana\"},\"application/vnd.xmpie.cpkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.dpkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.plan\":{\"source\":\"iana\"},\"application/vnd.xmpie.ppkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.xlim\":{\"source\":\"iana\"},\"application/vnd.yamaha.hv-dic\":{\"source\":\"iana\",\"extensions\":[\"hvd\"]},\"application/vnd.yamaha.hv-script\":{\"source\":\"iana\",\"extensions\":[\"hvs\"]},\"application/vnd.yamaha.hv-voice\":{\"source\":\"iana\",\"extensions\":[\"hvp\"]},\"application/vnd.yamaha.openscoreformat\":{\"source\":\"iana\",\"extensions\":[\"osf\"]},\"application/vnd.yamaha.openscoreformat.osfpvg+xml\":{\"source\":\"iana\",\"extensions\":[\"osfpvg\"]},\"application/vnd.yamaha.remote-setup\":{\"source\":\"iana\"},\"application/vnd.yamaha.smaf-audio\":{\"source\":\"iana\",\"extensions\":[\"saf\"]},\"application/vnd.yamaha.smaf-phrase\":{\"source\":\"iana\",\"extensions\":[\"spf\"]},\"application/vnd.yamaha.through-ngn\":{\"source\":\"iana\"},\"application/vnd.yamaha.tunnel-udpencap\":{\"source\":\"iana\"},\"application/vnd.yaoweme\":{\"source\":\"iana\"},\"application/vnd.yellowriver-custom-menu\":{\"source\":\"iana\",\"extensions\":[\"cmp\"]},\"application/vnd.youtube.yt\":{\"source\":\"iana\"},\"application/vnd.zul\":{\"source\":\"iana\",\"extensions\":[\"zir\",\"zirz\"]},\"application/vnd.zzazz.deck+xml\":{\"source\":\"iana\",\"extensions\":[\"zaz\"]},\"application/voicexml+xml\":{\"source\":\"iana\",\"extensions\":[\"vxml\"]},\"application/voucher-cms+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vq-rtcpxr\":{\"source\":\"iana\"},\"application/wasm\":{\"compressible\":true,\"extensions\":[\"wasm\"]},\"application/watcherinfo+xml\":{\"source\":\"iana\"},\"application/webpush-options+json\":{\"source\":\"iana\",\"compressible\":true},\"application/whoispp-query\":{\"source\":\"iana\"},\"application/whoispp-response\":{\"source\":\"iana\"},\"application/widget\":{\"source\":\"iana\",\"extensions\":[\"wgt\"]},\"application/winhlp\":{\"source\":\"apache\",\"extensions\":[\"hlp\"]},\"application/wita\":{\"source\":\"iana\"},\"application/wordperfect5.1\":{\"source\":\"iana\"},\"application/wsdl+xml\":{\"source\":\"iana\",\"extensions\":[\"wsdl\"]},\"application/wspolicy+xml\":{\"source\":\"iana\",\"extensions\":[\"wspolicy\"]},\"application/x-7z-compressed\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"7z\"]},\"application/x-abiword\":{\"source\":\"apache\",\"extensions\":[\"abw\"]},\"application/x-ace-compressed\":{\"source\":\"apache\",\"extensions\":[\"ace\"]},\"application/x-amf\":{\"source\":\"apache\"},\"application/x-apple-diskimage\":{\"source\":\"apache\",\"extensions\":[\"dmg\"]},\"application/x-arj\":{\"compressible\":false,\"extensions\":[\"arj\"]},\"application/x-authorware-bin\":{\"source\":\"apache\",\"extensions\":[\"aab\",\"x32\",\"u32\",\"vox\"]},\"application/x-authorware-map\":{\"source\":\"apache\",\"extensions\":[\"aam\"]},\"application/x-authorware-seg\":{\"source\":\"apache\",\"extensions\":[\"aas\"]},\"application/x-bcpio\":{\"source\":\"apache\",\"extensions\":[\"bcpio\"]},\"application/x-bdoc\":{\"compressible\":false,\"extensions\":[\"bdoc\"]},\"application/x-bittorrent\":{\"source\":\"apache\",\"extensions\":[\"torrent\"]},\"application/x-blorb\":{\"source\":\"apache\",\"extensions\":[\"blb\",\"blorb\"]},\"application/x-bzip\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"bz\"]},\"application/x-bzip2\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"bz2\",\"boz\"]},\"application/x-cbr\":{\"source\":\"apache\",\"extensions\":[\"cbr\",\"cba\",\"cbt\",\"cbz\",\"cb7\"]},\"application/x-cdlink\":{\"source\":\"apache\",\"extensions\":[\"vcd\"]},\"application/x-cfs-compressed\":{\"source\":\"apache\",\"extensions\":[\"cfs\"]},\"application/x-chat\":{\"source\":\"apache\",\"extensions\":[\"chat\"]},\"application/x-chess-pgn\":{\"source\":\"apache\",\"extensions\":[\"pgn\"]},\"application/x-chrome-extension\":{\"extensions\":[\"crx\"]},\"application/x-cocoa\":{\"source\":\"nginx\",\"extensions\":[\"cco\"]},\"application/x-compress\":{\"source\":\"apache\"},\"application/x-conference\":{\"source\":\"apache\",\"extensions\":[\"nsc\"]},\"application/x-cpio\":{\"source\":\"apache\",\"extensions\":[\"cpio\"]},\"application/x-csh\":{\"source\":\"apache\",\"extensions\":[\"csh\"]},\"application/x-deb\":{\"compressible\":false},\"application/x-debian-package\":{\"source\":\"apache\",\"extensions\":[\"deb\",\"udeb\"]},\"application/x-dgc-compressed\":{\"source\":\"apache\",\"extensions\":[\"dgc\"]},\"application/x-director\":{\"source\":\"apache\",\"extensions\":[\"dir\",\"dcr\",\"dxr\",\"cst\",\"cct\",\"cxt\",\"w3d\",\"fgd\",\"swa\"]},\"application/x-doom\":{\"source\":\"apache\",\"extensions\":[\"wad\"]},\"application/x-dtbncx+xml\":{\"source\":\"apache\",\"extensions\":[\"ncx\"]},\"application/x-dtbook+xml\":{\"source\":\"apache\",\"extensions\":[\"dtb\"]},\"application/x-dtbresource+xml\":{\"source\":\"apache\",\"extensions\":[\"res\"]},\"application/x-dvi\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"dvi\"]},\"application/x-envoy\":{\"source\":\"apache\",\"extensions\":[\"evy\"]},\"application/x-eva\":{\"source\":\"apache\",\"extensions\":[\"eva\"]},\"application/x-font-bdf\":{\"source\":\"apache\",\"extensions\":[\"bdf\"]},\"application/x-font-dos\":{\"source\":\"apache\"},\"application/x-font-framemaker\":{\"source\":\"apache\"},\"application/x-font-ghostscript\":{\"source\":\"apache\",\"extensions\":[\"gsf\"]},\"application/x-font-libgrx\":{\"source\":\"apache\"},\"application/x-font-linux-psf\":{\"source\":\"apache\",\"extensions\":[\"psf\"]},\"application/x-font-pcf\":{\"source\":\"apache\",\"extensions\":[\"pcf\"]},\"application/x-font-snf\":{\"source\":\"apache\",\"extensions\":[\"snf\"]},\"application/x-font-speedo\":{\"source\":\"apache\"},\"application/x-font-sunos-news\":{\"source\":\"apache\"},\"application/x-font-type1\":{\"source\":\"apache\",\"extensions\":[\"pfa\",\"pfb\",\"pfm\",\"afm\"]},\"application/x-font-vfont\":{\"source\":\"apache\"},\"application/x-freearc\":{\"source\":\"apache\",\"extensions\":[\"arc\"]},\"application/x-futuresplash\":{\"source\":\"apache\",\"extensions\":[\"spl\"]},\"application/x-gca-compressed\":{\"source\":\"apache\",\"extensions\":[\"gca\"]},\"application/x-glulx\":{\"source\":\"apache\",\"extensions\":[\"ulx\"]},\"application/x-gnumeric\":{\"source\":\"apache\",\"extensions\":[\"gnumeric\"]},\"application/x-gramps-xml\":{\"source\":\"apache\",\"extensions\":[\"gramps\"]},\"application/x-gtar\":{\"source\":\"apache\",\"extensions\":[\"gtar\"]},\"application/x-gzip\":{\"source\":\"apache\"},\"application/x-hdf\":{\"source\":\"apache\",\"extensions\":[\"hdf\"]},\"application/x-httpd-php\":{\"compressible\":true,\"extensions\":[\"php\"]},\"application/x-install-instructions\":{\"source\":\"apache\",\"extensions\":[\"install\"]},\"application/x-iso9660-image\":{\"source\":\"apache\",\"extensions\":[\"iso\"]},\"application/x-java-archive-diff\":{\"source\":\"nginx\",\"extensions\":[\"jardiff\"]},\"application/x-java-jnlp-file\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"jnlp\"]},\"application/x-javascript\":{\"compressible\":true},\"application/x-latex\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"latex\"]},\"application/x-lua-bytecode\":{\"extensions\":[\"luac\"]},\"application/x-lzh-compressed\":{\"source\":\"apache\",\"extensions\":[\"lzh\",\"lha\"]},\"application/x-makeself\":{\"source\":\"nginx\",\"extensions\":[\"run\"]},\"application/x-mie\":{\"source\":\"apache\",\"extensions\":[\"mie\"]},\"application/x-mobipocket-ebook\":{\"source\":\"apache\",\"extensions\":[\"prc\",\"mobi\"]},\"application/x-mpegurl\":{\"compressible\":false},\"application/x-ms-application\":{\"source\":\"apache\",\"extensions\":[\"application\"]},\"application/x-ms-shortcut\":{\"source\":\"apache\",\"extensions\":[\"lnk\"]},\"application/x-ms-wmd\":{\"source\":\"apache\",\"extensions\":[\"wmd\"]},\"application/x-ms-wmz\":{\"source\":\"apache\",\"extensions\":[\"wmz\"]},\"application/x-ms-xbap\":{\"source\":\"apache\",\"extensions\":[\"xbap\"]},\"application/x-msaccess\":{\"source\":\"apache\",\"extensions\":[\"mdb\"]},\"application/x-msbinder\":{\"source\":\"apache\",\"extensions\":[\"obd\"]},\"application/x-mscardfile\":{\"source\":\"apache\",\"extensions\":[\"crd\"]},\"application/x-msclip\":{\"source\":\"apache\",\"extensions\":[\"clp\"]},\"application/x-msdos-program\":{\"extensions\":[\"exe\"]},\"application/x-msdownload\":{\"source\":\"apache\",\"extensions\":[\"exe\",\"dll\",\"com\",\"bat\",\"msi\"]},\"application/x-msmediaview\":{\"source\":\"apache\",\"extensions\":[\"mvb\",\"m13\",\"m14\"]},\"application/x-msmetafile\":{\"source\":\"apache\",\"extensions\":[\"wmf\",\"wmz\",\"emf\",\"emz\"]},\"application/x-msmoney\":{\"source\":\"apache\",\"extensions\":[\"mny\"]},\"application/x-mspublisher\":{\"source\":\"apache\",\"extensions\":[\"pub\"]},\"application/x-msschedule\":{\"source\":\"apache\",\"extensions\":[\"scd\"]},\"application/x-msterminal\":{\"source\":\"apache\",\"extensions\":[\"trm\"]},\"application/x-mswrite\":{\"source\":\"apache\",\"extensions\":[\"wri\"]},\"application/x-netcdf\":{\"source\":\"apache\",\"extensions\":[\"nc\",\"cdf\"]},\"application/x-ns-proxy-autoconfig\":{\"compressible\":true,\"extensions\":[\"pac\"]},\"application/x-nzb\":{\"source\":\"apache\",\"extensions\":[\"nzb\"]},\"application/x-perl\":{\"source\":\"nginx\",\"extensions\":[\"pl\",\"pm\"]},\"application/x-pilot\":{\"source\":\"nginx\",\"extensions\":[\"prc\",\"pdb\"]},\"application/x-pkcs12\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"p12\",\"pfx\"]},\"application/x-pkcs7-certificates\":{\"source\":\"apache\",\"extensions\":[\"p7b\",\"spc\"]},\"application/x-pkcs7-certreqresp\":{\"source\":\"apache\",\"extensions\":[\"p7r\"]},\"application/x-rar-compressed\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"rar\"]},\"application/x-redhat-package-manager\":{\"source\":\"nginx\",\"extensions\":[\"rpm\"]},\"application/x-research-info-systems\":{\"source\":\"apache\",\"extensions\":[\"ris\"]},\"application/x-sea\":{\"source\":\"nginx\",\"extensions\":[\"sea\"]},\"application/x-sh\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"sh\"]},\"application/x-shar\":{\"source\":\"apache\",\"extensions\":[\"shar\"]},\"application/x-shockwave-flash\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"swf\"]},\"application/x-silverlight-app\":{\"source\":\"apache\",\"extensions\":[\"xap\"]},\"application/x-sql\":{\"source\":\"apache\",\"extensions\":[\"sql\"]},\"application/x-stuffit\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"sit\"]},\"application/x-stuffitx\":{\"source\":\"apache\",\"extensions\":[\"sitx\"]},\"application/x-subrip\":{\"source\":\"apache\",\"extensions\":[\"srt\"]},\"application/x-sv4cpio\":{\"source\":\"apache\",\"extensions\":[\"sv4cpio\"]},\"application/x-sv4crc\":{\"source\":\"apache\",\"extensions\":[\"sv4crc\"]},\"application/x-t3vm-image\":{\"source\":\"apache\",\"extensions\":[\"t3\"]},\"application/x-tads\":{\"source\":\"apache\",\"extensions\":[\"gam\"]},\"application/x-tar\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"tar\"]},\"application/x-tcl\":{\"source\":\"apache\",\"extensions\":[\"tcl\",\"tk\"]},\"application/x-tex\":{\"source\":\"apache\",\"extensions\":[\"tex\"]},\"application/x-tex-tfm\":{\"source\":\"apache\",\"extensions\":[\"tfm\"]},\"application/x-texinfo\":{\"source\":\"apache\",\"extensions\":[\"texinfo\",\"texi\"]},\"application/x-tgif\":{\"source\":\"apache\",\"extensions\":[\"obj\"]},\"application/x-ustar\":{\"source\":\"apache\",\"extensions\":[\"ustar\"]},\"application/x-virtualbox-hdd\":{\"compressible\":true,\"extensions\":[\"hdd\"]},\"application/x-virtualbox-ova\":{\"compressible\":true,\"extensions\":[\"ova\"]},\"application/x-virtualbox-ovf\":{\"compressible\":true,\"extensions\":[\"ovf\"]},\"application/x-virtualbox-vbox\":{\"compressible\":true,\"extensions\":[\"vbox\"]},\"application/x-virtualbox-vbox-extpack\":{\"compressible\":false,\"extensions\":[\"vbox-extpack\"]},\"application/x-virtualbox-vdi\":{\"compressible\":true,\"extensions\":[\"vdi\"]},\"application/x-virtualbox-vhd\":{\"compressible\":true,\"extensions\":[\"vhd\"]},\"application/x-virtualbox-vmdk\":{\"compressible\":true,\"extensions\":[\"vmdk\"]},\"application/x-wais-source\":{\"source\":\"apache\",\"extensions\":[\"src\"]},\"application/x-web-app-manifest+json\":{\"compressible\":true,\"extensions\":[\"webapp\"]},\"application/x-www-form-urlencoded\":{\"source\":\"iana\",\"compressible\":true},\"application/x-x509-ca-cert\":{\"source\":\"apache\",\"extensions\":[\"der\",\"crt\",\"pem\"]},\"application/x-xfig\":{\"source\":\"apache\",\"extensions\":[\"fig\"]},\"application/x-xliff+xml\":{\"source\":\"apache\",\"extensions\":[\"xlf\"]},\"application/x-xpinstall\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"xpi\"]},\"application/x-xz\":{\"source\":\"apache\",\"extensions\":[\"xz\"]},\"application/x-zmachine\":{\"source\":\"apache\",\"extensions\":[\"z1\",\"z2\",\"z3\",\"z4\",\"z5\",\"z6\",\"z7\",\"z8\"]},\"application/x400-bp\":{\"source\":\"iana\"},\"application/xacml+xml\":{\"source\":\"iana\"},\"application/xaml+xml\":{\"source\":\"apache\",\"extensions\":[\"xaml\"]},\"application/xcap-att+xml\":{\"source\":\"iana\"},\"application/xcap-caps+xml\":{\"source\":\"iana\"},\"application/xcap-diff+xml\":{\"source\":\"iana\",\"extensions\":[\"xdf\"]},\"application/xcap-el+xml\":{\"source\":\"iana\"},\"application/xcap-error+xml\":{\"source\":\"iana\"},\"application/xcap-ns+xml\":{\"source\":\"iana\"},\"application/xcon-conference-info+xml\":{\"source\":\"iana\"},\"application/xcon-conference-info-diff+xml\":{\"source\":\"iana\"},\"application/xenc+xml\":{\"source\":\"iana\",\"extensions\":[\"xenc\"]},\"application/xhtml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xhtml\",\"xht\"]},\"application/xhtml-voice+xml\":{\"source\":\"apache\"},\"application/xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xml\",\"xsl\",\"xsd\",\"rng\"]},\"application/xml-dtd\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dtd\"]},\"application/xml-external-parsed-entity\":{\"source\":\"iana\"},\"application/xml-patch+xml\":{\"source\":\"iana\"},\"application/xmpp+xml\":{\"source\":\"iana\"},\"application/xop+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xop\"]},\"application/xproc+xml\":{\"source\":\"apache\",\"extensions\":[\"xpl\"]},\"application/xslt+xml\":{\"source\":\"iana\",\"extensions\":[\"xslt\"]},\"application/xspf+xml\":{\"source\":\"apache\",\"extensions\":[\"xspf\"]},\"application/xv+xml\":{\"source\":\"iana\",\"extensions\":[\"mxml\",\"xhvml\",\"xvml\",\"xvm\"]},\"application/yang\":{\"source\":\"iana\",\"extensions\":[\"yang\"]},\"application/yang-data+json\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-data+xml\":{\"source\":\"iana\"},\"application/yang-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-patch+xml\":{\"source\":\"iana\"},\"application/yin+xml\":{\"source\":\"iana\",\"extensions\":[\"yin\"]},\"application/zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"zip\"]},\"application/zlib\":{\"source\":\"iana\"},\"audio/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"audio/32kadpcm\":{\"source\":\"iana\"},\"audio/3gpp\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"3gpp\"]},\"audio/3gpp2\":{\"source\":\"iana\"},\"audio/ac3\":{\"source\":\"iana\"},\"audio/adpcm\":{\"source\":\"apache\",\"extensions\":[\"adp\"]},\"audio/amr\":{\"source\":\"iana\"},\"audio/amr-wb\":{\"source\":\"iana\"},\"audio/amr-wb+\":{\"source\":\"iana\"},\"audio/aptx\":{\"source\":\"iana\"},\"audio/asc\":{\"source\":\"iana\"},\"audio/atrac-advanced-lossless\":{\"source\":\"iana\"},\"audio/atrac-x\":{\"source\":\"iana\"},\"audio/atrac3\":{\"source\":\"iana\"},\"audio/basic\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"au\",\"snd\"]},\"audio/bv16\":{\"source\":\"iana\"},\"audio/bv32\":{\"source\":\"iana\"},\"audio/clearmode\":{\"source\":\"iana\"},\"audio/cn\":{\"source\":\"iana\"},\"audio/dat12\":{\"source\":\"iana\"},\"audio/dls\":{\"source\":\"iana\"},\"audio/dsr-es201108\":{\"source\":\"iana\"},\"audio/dsr-es202050\":{\"source\":\"iana\"},\"audio/dsr-es202211\":{\"source\":\"iana\"},\"audio/dsr-es202212\":{\"source\":\"iana\"},\"audio/dv\":{\"source\":\"iana\"},\"audio/dvi4\":{\"source\":\"iana\"},\"audio/eac3\":{\"source\":\"iana\"},\"audio/encaprtp\":{\"source\":\"iana\"},\"audio/evrc\":{\"source\":\"iana\"},\"audio/evrc-qcp\":{\"source\":\"iana\"},\"audio/evrc0\":{\"source\":\"iana\"},\"audio/evrc1\":{\"source\":\"iana\"},\"audio/evrcb\":{\"source\":\"iana\"},\"audio/evrcb0\":{\"source\":\"iana\"},\"audio/evrcb1\":{\"source\":\"iana\"},\"audio/evrcnw\":{\"source\":\"iana\"},\"audio/evrcnw0\":{\"source\":\"iana\"},\"audio/evrcnw1\":{\"source\":\"iana\"},\"audio/evrcwb\":{\"source\":\"iana\"},\"audio/evrcwb0\":{\"source\":\"iana\"},\"audio/evrcwb1\":{\"source\":\"iana\"},\"audio/evs\":{\"source\":\"iana\"},\"audio/fwdred\":{\"source\":\"iana\"},\"audio/g711-0\":{\"source\":\"iana\"},\"audio/g719\":{\"source\":\"iana\"},\"audio/g722\":{\"source\":\"iana\"},\"audio/g7221\":{\"source\":\"iana\"},\"audio/g723\":{\"source\":\"iana\"},\"audio/g726-16\":{\"source\":\"iana\"},\"audio/g726-24\":{\"source\":\"iana\"},\"audio/g726-32\":{\"source\":\"iana\"},\"audio/g726-40\":{\"source\":\"iana\"},\"audio/g728\":{\"source\":\"iana\"},\"audio/g729\":{\"source\":\"iana\"},\"audio/g7291\":{\"source\":\"iana\"},\"audio/g729d\":{\"source\":\"iana\"},\"audio/g729e\":{\"source\":\"iana\"},\"audio/gsm\":{\"source\":\"iana\"},\"audio/gsm-efr\":{\"source\":\"iana\"},\"audio/gsm-hr-08\":{\"source\":\"iana\"},\"audio/ilbc\":{\"source\":\"iana\"},\"audio/ip-mr_v2.5\":{\"source\":\"iana\"},\"audio/isac\":{\"source\":\"apache\"},\"audio/l16\":{\"source\":\"iana\"},\"audio/l20\":{\"source\":\"iana\"},\"audio/l24\":{\"source\":\"iana\",\"compressible\":false},\"audio/l8\":{\"source\":\"iana\"},\"audio/lpc\":{\"source\":\"iana\"},\"audio/melp\":{\"source\":\"iana\"},\"audio/melp1200\":{\"source\":\"iana\"},\"audio/melp2400\":{\"source\":\"iana\"},\"audio/melp600\":{\"source\":\"iana\"},\"audio/midi\":{\"source\":\"apache\",\"extensions\":[\"mid\",\"midi\",\"kar\",\"rmi\"]},\"audio/mobile-xmf\":{\"source\":\"iana\"},\"audio/mp3\":{\"compressible\":false,\"extensions\":[\"mp3\"]},\"audio/mp4\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"m4a\",\"mp4a\"]},\"audio/mp4a-latm\":{\"source\":\"iana\"},\"audio/mpa\":{\"source\":\"iana\"},\"audio/mpa-robust\":{\"source\":\"iana\"},\"audio/mpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mpga\",\"mp2\",\"mp2a\",\"mp3\",\"m2a\",\"m3a\"]},\"audio/mpeg4-generic\":{\"source\":\"iana\"},\"audio/musepack\":{\"source\":\"apache\"},\"audio/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"oga\",\"ogg\",\"spx\"]},\"audio/opus\":{\"source\":\"iana\"},\"audio/parityfec\":{\"source\":\"iana\"},\"audio/pcma\":{\"source\":\"iana\"},\"audio/pcma-wb\":{\"source\":\"iana\"},\"audio/pcmu\":{\"source\":\"iana\"},\"audio/pcmu-wb\":{\"source\":\"iana\"},\"audio/prs.sid\":{\"source\":\"iana\"},\"audio/qcelp\":{\"source\":\"iana\"},\"audio/raptorfec\":{\"source\":\"iana\"},\"audio/red\":{\"source\":\"iana\"},\"audio/rtp-enc-aescm128\":{\"source\":\"iana\"},\"audio/rtp-midi\":{\"source\":\"iana\"},\"audio/rtploopback\":{\"source\":\"iana\"},\"audio/rtx\":{\"source\":\"iana\"},\"audio/s3m\":{\"source\":\"apache\",\"extensions\":[\"s3m\"]},\"audio/silk\":{\"source\":\"apache\",\"extensions\":[\"sil\"]},\"audio/smv\":{\"source\":\"iana\"},\"audio/smv-qcp\":{\"source\":\"iana\"},\"audio/smv0\":{\"source\":\"iana\"},\"audio/sp-midi\":{\"source\":\"iana\"},\"audio/speex\":{\"source\":\"iana\"},\"audio/t140c\":{\"source\":\"iana\"},\"audio/t38\":{\"source\":\"iana\"},\"audio/telephone-event\":{\"source\":\"iana\"},\"audio/tone\":{\"source\":\"iana\"},\"audio/uemclip\":{\"source\":\"iana\"},\"audio/ulpfec\":{\"source\":\"iana\"},\"audio/vdvi\":{\"source\":\"iana\"},\"audio/vmr-wb\":{\"source\":\"iana\"},\"audio/vnd.3gpp.iufp\":{\"source\":\"iana\"},\"audio/vnd.4sb\":{\"source\":\"iana\"},\"audio/vnd.audiokoz\":{\"source\":\"iana\"},\"audio/vnd.celp\":{\"source\":\"iana\"},\"audio/vnd.cisco.nse\":{\"source\":\"iana\"},\"audio/vnd.cmles.radio-events\":{\"source\":\"iana\"},\"audio/vnd.cns.anp1\":{\"source\":\"iana\"},\"audio/vnd.cns.inf1\":{\"source\":\"iana\"},\"audio/vnd.dece.audio\":{\"source\":\"iana\",\"extensions\":[\"uva\",\"uvva\"]},\"audio/vnd.digital-winds\":{\"source\":\"iana\",\"extensions\":[\"eol\"]},\"audio/vnd.dlna.adts\":{\"source\":\"iana\"},\"audio/vnd.dolby.heaac.1\":{\"source\":\"iana\"},\"audio/vnd.dolby.heaac.2\":{\"source\":\"iana\"},\"audio/vnd.dolby.mlp\":{\"source\":\"iana\"},\"audio/vnd.dolby.mps\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2x\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2z\":{\"source\":\"iana\"},\"audio/vnd.dolby.pulse.1\":{\"source\":\"iana\"},\"audio/vnd.dra\":{\"source\":\"iana\",\"extensions\":[\"dra\"]},\"audio/vnd.dts\":{\"source\":\"iana\",\"extensions\":[\"dts\"]},\"audio/vnd.dts.hd\":{\"source\":\"iana\",\"extensions\":[\"dtshd\"]},\"audio/vnd.dvb.file\":{\"source\":\"iana\"},\"audio/vnd.everad.plj\":{\"source\":\"iana\"},\"audio/vnd.hns.audio\":{\"source\":\"iana\"},\"audio/vnd.lucent.voice\":{\"source\":\"iana\",\"extensions\":[\"lvp\"]},\"audio/vnd.ms-playready.media.pya\":{\"source\":\"iana\",\"extensions\":[\"pya\"]},\"audio/vnd.nokia.mobile-xmf\":{\"source\":\"iana\"},\"audio/vnd.nortel.vbk\":{\"source\":\"iana\"},\"audio/vnd.nuera.ecelp4800\":{\"source\":\"iana\",\"extensions\":[\"ecelp4800\"]},\"audio/vnd.nuera.ecelp7470\":{\"source\":\"iana\",\"extensions\":[\"ecelp7470\"]},\"audio/vnd.nuera.ecelp9600\":{\"source\":\"iana\",\"extensions\":[\"ecelp9600\"]},\"audio/vnd.octel.sbc\":{\"source\":\"iana\"},\"audio/vnd.presonus.multitrack\":{\"source\":\"iana\"},\"audio/vnd.qcelp\":{\"source\":\"iana\"},\"audio/vnd.rhetorex.32kadpcm\":{\"source\":\"iana\"},\"audio/vnd.rip\":{\"source\":\"iana\",\"extensions\":[\"rip\"]},\"audio/vnd.rn-realaudio\":{\"compressible\":false},\"audio/vnd.sealedmedia.softseal.mpeg\":{\"source\":\"iana\"},\"audio/vnd.vmx.cvsd\":{\"source\":\"iana\"},\"audio/vnd.wave\":{\"compressible\":false},\"audio/vorbis\":{\"source\":\"iana\",\"compressible\":false},\"audio/vorbis-config\":{\"source\":\"iana\"},\"audio/wav\":{\"compressible\":false,\"extensions\":[\"wav\"]},\"audio/wave\":{\"compressible\":false,\"extensions\":[\"wav\"]},\"audio/webm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"weba\"]},\"audio/x-aac\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"aac\"]},\"audio/x-aiff\":{\"source\":\"apache\",\"extensions\":[\"aif\",\"aiff\",\"aifc\"]},\"audio/x-caf\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"caf\"]},\"audio/x-flac\":{\"source\":\"apache\",\"extensions\":[\"flac\"]},\"audio/x-m4a\":{\"source\":\"nginx\",\"extensions\":[\"m4a\"]},\"audio/x-matroska\":{\"source\":\"apache\",\"extensions\":[\"mka\"]},\"audio/x-mpegurl\":{\"source\":\"apache\",\"extensions\":[\"m3u\"]},\"audio/x-ms-wax\":{\"source\":\"apache\",\"extensions\":[\"wax\"]},\"audio/x-ms-wma\":{\"source\":\"apache\",\"extensions\":[\"wma\"]},\"audio/x-pn-realaudio\":{\"source\":\"apache\",\"extensions\":[\"ram\",\"ra\"]},\"audio/x-pn-realaudio-plugin\":{\"source\":\"apache\",\"extensions\":[\"rmp\"]},\"audio/x-realaudio\":{\"source\":\"nginx\",\"extensions\":[\"ra\"]},\"audio/x-tta\":{\"source\":\"apache\"},\"audio/x-wav\":{\"source\":\"apache\",\"extensions\":[\"wav\"]},\"audio/xm\":{\"source\":\"apache\",\"extensions\":[\"xm\"]},\"chemical/x-cdx\":{\"source\":\"apache\",\"extensions\":[\"cdx\"]},\"chemical/x-cif\":{\"source\":\"apache\",\"extensions\":[\"cif\"]},\"chemical/x-cmdf\":{\"source\":\"apache\",\"extensions\":[\"cmdf\"]},\"chemical/x-cml\":{\"source\":\"apache\",\"extensions\":[\"cml\"]},\"chemical/x-csml\":{\"source\":\"apache\",\"extensions\":[\"csml\"]},\"chemical/x-pdb\":{\"source\":\"apache\"},\"chemical/x-xyz\":{\"source\":\"apache\",\"extensions\":[\"xyz\"]},\"font/collection\":{\"source\":\"iana\",\"extensions\":[\"ttc\"]},\"font/otf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"otf\"]},\"font/sfnt\":{\"source\":\"iana\"},\"font/ttf\":{\"source\":\"iana\",\"extensions\":[\"ttf\"]},\"font/woff\":{\"source\":\"iana\",\"extensions\":[\"woff\"]},\"font/woff2\":{\"source\":\"iana\",\"extensions\":[\"woff2\"]},\"image/aces\":{\"source\":\"iana\"},\"image/apng\":{\"compressible\":false,\"extensions\":[\"apng\"]},\"image/bmp\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"bmp\"]},\"image/cgm\":{\"source\":\"iana\",\"extensions\":[\"cgm\"]},\"image/dicom-rle\":{\"source\":\"iana\"},\"image/emf\":{\"source\":\"iana\"},\"image/fits\":{\"source\":\"iana\"},\"image/g3fax\":{\"source\":\"iana\",\"extensions\":[\"g3\"]},\"image/gif\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"gif\"]},\"image/ief\":{\"source\":\"iana\",\"extensions\":[\"ief\"]},\"image/jls\":{\"source\":\"iana\"},\"image/jp2\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jp2\",\"jpg2\"]},\"image/jpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpeg\",\"jpg\",\"jpe\"]},\"image/jpm\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpm\"]},\"image/jpx\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpx\",\"jpf\"]},\"image/ktx\":{\"source\":\"iana\",\"extensions\":[\"ktx\"]},\"image/naplps\":{\"source\":\"iana\"},\"image/pjpeg\":{\"compressible\":false},\"image/png\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"png\"]},\"image/prs.btif\":{\"source\":\"iana\",\"extensions\":[\"btif\"]},\"image/prs.pti\":{\"source\":\"iana\"},\"image/pwg-raster\":{\"source\":\"iana\"},\"image/sgi\":{\"source\":\"apache\",\"extensions\":[\"sgi\"]},\"image/svg+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"svg\",\"svgz\"]},\"image/t38\":{\"source\":\"iana\"},\"image/tiff\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"tiff\",\"tif\"]},\"image/tiff-fx\":{\"source\":\"iana\"},\"image/vnd.adobe.photoshop\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"psd\"]},\"image/vnd.airzip.accelerator.azv\":{\"source\":\"iana\"},\"image/vnd.cns.inf2\":{\"source\":\"iana\"},\"image/vnd.dece.graphic\":{\"source\":\"iana\",\"extensions\":[\"uvi\",\"uvvi\",\"uvg\",\"uvvg\"]},\"image/vnd.djvu\":{\"source\":\"iana\",\"extensions\":[\"djvu\",\"djv\"]},\"image/vnd.dvb.subtitle\":{\"source\":\"iana\",\"extensions\":[\"sub\"]},\"image/vnd.dwg\":{\"source\":\"iana\",\"extensions\":[\"dwg\"]},\"image/vnd.dxf\":{\"source\":\"iana\",\"extensions\":[\"dxf\"]},\"image/vnd.fastbidsheet\":{\"source\":\"iana\",\"extensions\":[\"fbs\"]},\"image/vnd.fpx\":{\"source\":\"iana\",\"extensions\":[\"fpx\"]},\"image/vnd.fst\":{\"source\":\"iana\",\"extensions\":[\"fst\"]},\"image/vnd.fujixerox.edmics-mmr\":{\"source\":\"iana\",\"extensions\":[\"mmr\"]},\"image/vnd.fujixerox.edmics-rlc\":{\"source\":\"iana\",\"extensions\":[\"rlc\"]},\"image/vnd.globalgraphics.pgb\":{\"source\":\"iana\"},\"image/vnd.microsoft.icon\":{\"source\":\"iana\"},\"image/vnd.mix\":{\"source\":\"iana\"},\"image/vnd.mozilla.apng\":{\"source\":\"iana\"},\"image/vnd.ms-modi\":{\"source\":\"iana\",\"extensions\":[\"mdi\"]},\"image/vnd.ms-photo\":{\"source\":\"apache\",\"extensions\":[\"wdp\"]},\"image/vnd.net-fpx\":{\"source\":\"iana\",\"extensions\":[\"npx\"]},\"image/vnd.radiance\":{\"source\":\"iana\"},\"image/vnd.sealed.png\":{\"source\":\"iana\"},\"image/vnd.sealedmedia.softseal.gif\":{\"source\":\"iana\"},\"image/vnd.sealedmedia.softseal.jpg\":{\"source\":\"iana\"},\"image/vnd.svf\":{\"source\":\"iana\"},\"image/vnd.tencent.tap\":{\"source\":\"iana\"},\"image/vnd.valve.source.texture\":{\"source\":\"iana\"},\"image/vnd.wap.wbmp\":{\"source\":\"iana\",\"extensions\":[\"wbmp\"]},\"image/vnd.xiff\":{\"source\":\"iana\",\"extensions\":[\"xif\"]},\"image/vnd.zbrush.pcx\":{\"source\":\"iana\"},\"image/webp\":{\"source\":\"apache\",\"extensions\":[\"webp\"]},\"image/wmf\":{\"source\":\"iana\"},\"image/x-3ds\":{\"source\":\"apache\",\"extensions\":[\"3ds\"]},\"image/x-cmu-raster\":{\"source\":\"apache\",\"extensions\":[\"ras\"]},\"image/x-cmx\":{\"source\":\"apache\",\"extensions\":[\"cmx\"]},\"image/x-freehand\":{\"source\":\"apache\",\"extensions\":[\"fh\",\"fhc\",\"fh4\",\"fh5\",\"fh7\"]},\"image/x-icon\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"ico\"]},\"image/x-jng\":{\"source\":\"nginx\",\"extensions\":[\"jng\"]},\"image/x-mrsid-image\":{\"source\":\"apache\",\"extensions\":[\"sid\"]},\"image/x-ms-bmp\":{\"source\":\"nginx\",\"compressible\":true,\"extensions\":[\"bmp\"]},\"image/x-pcx\":{\"source\":\"apache\",\"extensions\":[\"pcx\"]},\"image/x-pict\":{\"source\":\"apache\",\"extensions\":[\"pic\",\"pct\"]},\"image/x-portable-anymap\":{\"source\":\"apache\",\"extensions\":[\"pnm\"]},\"image/x-portable-bitmap\":{\"source\":\"apache\",\"extensions\":[\"pbm\"]},\"image/x-portable-graymap\":{\"source\":\"apache\",\"extensions\":[\"pgm\"]},\"image/x-portable-pixmap\":{\"source\":\"apache\",\"extensions\":[\"ppm\"]},\"image/x-rgb\":{\"source\":\"apache\",\"extensions\":[\"rgb\"]},\"image/x-tga\":{\"source\":\"apache\",\"extensions\":[\"tga\"]},\"image/x-xbitmap\":{\"source\":\"apache\",\"extensions\":[\"xbm\"]},\"image/x-xcf\":{\"compressible\":false},\"image/x-xpixmap\":{\"source\":\"apache\",\"extensions\":[\"xpm\"]},\"image/x-xwindowdump\":{\"source\":\"apache\",\"extensions\":[\"xwd\"]},\"message/cpim\":{\"source\":\"iana\"},\"message/delivery-status\":{\"source\":\"iana\"},\"message/disposition-notification\":{\"source\":\"iana\",\"extensions\":[\"disposition-notification\"]},\"message/external-body\":{\"source\":\"iana\"},\"message/feedback-report\":{\"source\":\"iana\"},\"message/global\":{\"source\":\"iana\",\"extensions\":[\"u8msg\"]},\"message/global-delivery-status\":{\"source\":\"iana\",\"extensions\":[\"u8dsn\"]},\"message/global-disposition-notification\":{\"source\":\"iana\",\"extensions\":[\"u8mdn\"]},\"message/global-headers\":{\"source\":\"iana\",\"extensions\":[\"u8hdr\"]},\"message/http\":{\"source\":\"iana\",\"compressible\":false},\"message/imdn+xml\":{\"source\":\"iana\",\"compressible\":true},\"message/news\":{\"source\":\"iana\"},\"message/partial\":{\"source\":\"iana\",\"compressible\":false},\"message/rfc822\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"eml\",\"mime\"]},\"message/s-http\":{\"source\":\"iana\"},\"message/sip\":{\"source\":\"iana\"},\"message/sipfrag\":{\"source\":\"iana\"},\"message/tracking-status\":{\"source\":\"iana\"},\"message/vnd.si.simp\":{\"source\":\"iana\"},\"message/vnd.wfa.wsc\":{\"source\":\"iana\",\"extensions\":[\"wsc\"]},\"model/3mf\":{\"source\":\"iana\"},\"model/gltf+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"gltf\"]},\"model/gltf-binary\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"glb\"]},\"model/iges\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"igs\",\"iges\"]},\"model/mesh\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"msh\",\"mesh\",\"silo\"]},\"model/vnd.collada+xml\":{\"source\":\"iana\",\"extensions\":[\"dae\"]},\"model/vnd.dwf\":{\"source\":\"iana\",\"extensions\":[\"dwf\"]},\"model/vnd.flatland.3dml\":{\"source\":\"iana\"},\"model/vnd.gdl\":{\"source\":\"iana\",\"extensions\":[\"gdl\"]},\"model/vnd.gs-gdl\":{\"source\":\"apache\"},\"model/vnd.gs.gdl\":{\"source\":\"iana\"},\"model/vnd.gtw\":{\"source\":\"iana\",\"extensions\":[\"gtw\"]},\"model/vnd.moml+xml\":{\"source\":\"iana\"},\"model/vnd.mts\":{\"source\":\"iana\",\"extensions\":[\"mts\"]},\"model/vnd.opengex\":{\"source\":\"iana\"},\"model/vnd.parasolid.transmit.binary\":{\"source\":\"iana\"},\"model/vnd.parasolid.transmit.text\":{\"source\":\"iana\"},\"model/vnd.rosette.annotated-data-model\":{\"source\":\"iana\"},\"model/vnd.valve.source.compiled-map\":{\"source\":\"iana\"},\"model/vnd.vtu\":{\"source\":\"iana\",\"extensions\":[\"vtu\"]},\"model/vrml\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"wrl\",\"vrml\"]},\"model/x3d+binary\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"x3db\",\"x3dbz\"]},\"model/x3d+fastinfoset\":{\"source\":\"iana\"},\"model/x3d+vrml\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"x3dv\",\"x3dvz\"]},\"model/x3d+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"x3d\",\"x3dz\"]},\"model/x3d-vrml\":{\"source\":\"iana\"},\"multipart/alternative\":{\"source\":\"iana\",\"compressible\":false},\"multipart/appledouble\":{\"source\":\"iana\"},\"multipart/byteranges\":{\"source\":\"iana\"},\"multipart/digest\":{\"source\":\"iana\"},\"multipart/encrypted\":{\"source\":\"iana\",\"compressible\":false},\"multipart/form-data\":{\"source\":\"iana\",\"compressible\":false},\"multipart/header-set\":{\"source\":\"iana\"},\"multipart/mixed\":{\"source\":\"iana\",\"compressible\":false},\"multipart/multilingual\":{\"source\":\"iana\"},\"multipart/parallel\":{\"source\":\"iana\"},\"multipart/related\":{\"source\":\"iana\",\"compressible\":false},\"multipart/report\":{\"source\":\"iana\"},\"multipart/signed\":{\"source\":\"iana\",\"compressible\":false},\"multipart/vnd.bint.med-plus\":{\"source\":\"iana\"},\"multipart/voice-message\":{\"source\":\"iana\"},\"multipart/x-mixed-replace\":{\"source\":\"iana\"},\"text/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"text/cache-manifest\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"appcache\",\"manifest\"]},\"text/calendar\":{\"source\":\"iana\",\"extensions\":[\"ics\",\"ifb\"]},\"text/calender\":{\"compressible\":true},\"text/cmd\":{\"compressible\":true},\"text/coffeescript\":{\"extensions\":[\"coffee\",\"litcoffee\"]},\"text/css\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"css\"]},\"text/csv\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"csv\"]},\"text/csv-schema\":{\"source\":\"iana\"},\"text/directory\":{\"source\":\"iana\"},\"text/dns\":{\"source\":\"iana\"},\"text/ecmascript\":{\"source\":\"iana\"},\"text/encaprtp\":{\"source\":\"iana\"},\"text/enriched\":{\"source\":\"iana\"},\"text/fwdred\":{\"source\":\"iana\"},\"text/grammar-ref-list\":{\"source\":\"iana\"},\"text/html\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"html\",\"htm\",\"shtml\"]},\"text/jade\":{\"extensions\":[\"jade\"]},\"text/javascript\":{\"source\":\"iana\",\"compressible\":true},\"text/jcr-cnd\":{\"source\":\"iana\"},\"text/jsx\":{\"compressible\":true,\"extensions\":[\"jsx\"]},\"text/less\":{\"extensions\":[\"less\"]},\"text/markdown\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"markdown\",\"md\"]},\"text/mathml\":{\"source\":\"nginx\",\"extensions\":[\"mml\"]},\"text/mizar\":{\"source\":\"iana\"},\"text/n3\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"n3\"]},\"text/parameters\":{\"source\":\"iana\"},\"text/parityfec\":{\"source\":\"iana\"},\"text/plain\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"txt\",\"text\",\"conf\",\"def\",\"list\",\"log\",\"in\",\"ini\"]},\"text/provenance-notation\":{\"source\":\"iana\"},\"text/prs.fallenstein.rst\":{\"source\":\"iana\"},\"text/prs.lines.tag\":{\"source\":\"iana\",\"extensions\":[\"dsc\"]},\"text/prs.prop.logic\":{\"source\":\"iana\"},\"text/raptorfec\":{\"source\":\"iana\"},\"text/red\":{\"source\":\"iana\"},\"text/rfc822-headers\":{\"source\":\"iana\"},\"text/richtext\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtx\"]},\"text/rtf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtf\"]},\"text/rtp-enc-aescm128\":{\"source\":\"iana\"},\"text/rtploopback\":{\"source\":\"iana\"},\"text/rtx\":{\"source\":\"iana\"},\"text/sgml\":{\"source\":\"iana\",\"extensions\":[\"sgml\",\"sgm\"]},\"text/shex\":{\"extensions\":[\"shex\"]},\"text/slim\":{\"extensions\":[\"slim\",\"slm\"]},\"text/strings\":{\"source\":\"iana\"},\"text/stylus\":{\"extensions\":[\"stylus\",\"styl\"]},\"text/t140\":{\"source\":\"iana\"},\"text/tab-separated-values\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"tsv\"]},\"text/troff\":{\"source\":\"iana\",\"extensions\":[\"t\",\"tr\",\"roff\",\"man\",\"me\",\"ms\"]},\"text/turtle\":{\"source\":\"iana\",\"extensions\":[\"ttl\"]},\"text/ulpfec\":{\"source\":\"iana\"},\"text/uri-list\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"uri\",\"uris\",\"urls\"]},\"text/vcard\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"vcard\"]},\"text/vnd.a\":{\"source\":\"iana\"},\"text/vnd.abc\":{\"source\":\"iana\"},\"text/vnd.ascii-art\":{\"source\":\"iana\"},\"text/vnd.curl\":{\"source\":\"iana\",\"extensions\":[\"curl\"]},\"text/vnd.curl.dcurl\":{\"source\":\"apache\",\"extensions\":[\"dcurl\"]},\"text/vnd.curl.mcurl\":{\"source\":\"apache\",\"extensions\":[\"mcurl\"]},\"text/vnd.curl.scurl\":{\"source\":\"apache\",\"extensions\":[\"scurl\"]},\"text/vnd.debian.copyright\":{\"source\":\"iana\"},\"text/vnd.dmclientscript\":{\"source\":\"iana\"},\"text/vnd.dvb.subtitle\":{\"source\":\"iana\",\"extensions\":[\"sub\"]},\"text/vnd.esmertec.theme-descriptor\":{\"source\":\"iana\"},\"text/vnd.fly\":{\"source\":\"iana\",\"extensions\":[\"fly\"]},\"text/vnd.fmi.flexstor\":{\"source\":\"iana\",\"extensions\":[\"flx\"]},\"text/vnd.graphviz\":{\"source\":\"iana\",\"extensions\":[\"gv\"]},\"text/vnd.in3d.3dml\":{\"source\":\"iana\",\"extensions\":[\"3dml\"]},\"text/vnd.in3d.spot\":{\"source\":\"iana\",\"extensions\":[\"spot\"]},\"text/vnd.iptc.newsml\":{\"source\":\"iana\"},\"text/vnd.iptc.nitf\":{\"source\":\"iana\"},\"text/vnd.latex-z\":{\"source\":\"iana\"},\"text/vnd.motorola.reflex\":{\"source\":\"iana\"},\"text/vnd.ms-mediapackage\":{\"source\":\"iana\"},\"text/vnd.net2phone.commcenter.command\":{\"source\":\"iana\"},\"text/vnd.radisys.msml-basic-layout\":{\"source\":\"iana\"},\"text/vnd.si.uricatalogue\":{\"source\":\"iana\"},\"text/vnd.sun.j2me.app-descriptor\":{\"source\":\"iana\",\"extensions\":[\"jad\"]},\"text/vnd.trolltech.linguist\":{\"source\":\"iana\"},\"text/vnd.wap.si\":{\"source\":\"iana\"},\"text/vnd.wap.sl\":{\"source\":\"iana\"},\"text/vnd.wap.wml\":{\"source\":\"iana\",\"extensions\":[\"wml\"]},\"text/vnd.wap.wmlscript\":{\"source\":\"iana\",\"extensions\":[\"wmls\"]},\"text/vtt\":{\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"vtt\"]},\"text/x-asm\":{\"source\":\"apache\",\"extensions\":[\"s\",\"asm\"]},\"text/x-c\":{\"source\":\"apache\",\"extensions\":[\"c\",\"cc\",\"cxx\",\"cpp\",\"h\",\"hh\",\"dic\"]},\"text/x-component\":{\"source\":\"nginx\",\"extensions\":[\"htc\"]},\"text/x-fortran\":{\"source\":\"apache\",\"extensions\":[\"f\",\"for\",\"f77\",\"f90\"]},\"text/x-gwt-rpc\":{\"compressible\":true},\"text/x-handlebars-template\":{\"extensions\":[\"hbs\"]},\"text/x-java-source\":{\"source\":\"apache\",\"extensions\":[\"java\"]},\"text/x-jquery-tmpl\":{\"compressible\":true},\"text/x-lua\":{\"extensions\":[\"lua\"]},\"text/x-markdown\":{\"compressible\":true,\"extensions\":[\"mkd\"]},\"text/x-nfo\":{\"source\":\"apache\",\"extensions\":[\"nfo\"]},\"text/x-opml\":{\"source\":\"apache\",\"extensions\":[\"opml\"]},\"text/x-org\":{\"compressible\":true,\"extensions\":[\"org\"]},\"text/x-pascal\":{\"source\":\"apache\",\"extensions\":[\"p\",\"pas\"]},\"text/x-processing\":{\"compressible\":true,\"extensions\":[\"pde\"]},\"text/x-sass\":{\"extensions\":[\"sass\"]},\"text/x-scss\":{\"extensions\":[\"scss\"]},\"text/x-setext\":{\"source\":\"apache\",\"extensions\":[\"etx\"]},\"text/x-sfv\":{\"source\":\"apache\",\"extensions\":[\"sfv\"]},\"text/x-suse-ymp\":{\"compressible\":true,\"extensions\":[\"ymp\"]},\"text/x-uuencode\":{\"source\":\"apache\",\"extensions\":[\"uu\"]},\"text/x-vcalendar\":{\"source\":\"apache\",\"extensions\":[\"vcs\"]},\"text/x-vcard\":{\"source\":\"apache\",\"extensions\":[\"vcf\"]},\"text/xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xml\"]},\"text/xml-external-parsed-entity\":{\"source\":\"iana\"},\"text/yaml\":{\"extensions\":[\"yaml\",\"yml\"]},\"video/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"video/3gpp\":{\"source\":\"iana\",\"extensions\":[\"3gp\",\"3gpp\"]},\"video/3gpp-tt\":{\"source\":\"iana\"},\"video/3gpp2\":{\"source\":\"iana\",\"extensions\":[\"3g2\"]},\"video/bmpeg\":{\"source\":\"iana\"},\"video/bt656\":{\"source\":\"iana\"},\"video/celb\":{\"source\":\"iana\"},\"video/dv\":{\"source\":\"iana\"},\"video/encaprtp\":{\"source\":\"iana\"},\"video/h261\":{\"source\":\"iana\",\"extensions\":[\"h261\"]},\"video/h263\":{\"source\":\"iana\",\"extensions\":[\"h263\"]},\"video/h263-1998\":{\"source\":\"iana\"},\"video/h263-2000\":{\"source\":\"iana\"},\"video/h264\":{\"source\":\"iana\",\"extensions\":[\"h264\"]},\"video/h264-rcdo\":{\"source\":\"iana\"},\"video/h264-svc\":{\"source\":\"iana\"},\"video/h265\":{\"source\":\"iana\"},\"video/iso.segment\":{\"source\":\"iana\"},\"video/jpeg\":{\"source\":\"iana\",\"extensions\":[\"jpgv\"]},\"video/jpeg2000\":{\"source\":\"iana\"},\"video/jpm\":{\"source\":\"apache\",\"extensions\":[\"jpm\",\"jpgm\"]},\"video/mj2\":{\"source\":\"iana\",\"extensions\":[\"mj2\",\"mjp2\"]},\"video/mp1s\":{\"source\":\"iana\"},\"video/mp2p\":{\"source\":\"iana\"},\"video/mp2t\":{\"source\":\"iana\",\"extensions\":[\"ts\"]},\"video/mp4\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mp4\",\"mp4v\",\"mpg4\"]},\"video/mp4v-es\":{\"source\":\"iana\"},\"video/mpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mpeg\",\"mpg\",\"mpe\",\"m1v\",\"m2v\"]},\"video/mpeg4-generic\":{\"source\":\"iana\"},\"video/mpv\":{\"source\":\"iana\"},\"video/nv\":{\"source\":\"iana\"},\"video/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ogv\"]},\"video/parityfec\":{\"source\":\"iana\"},\"video/pointer\":{\"source\":\"iana\"},\"video/quicktime\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"qt\",\"mov\"]},\"video/raptorfec\":{\"source\":\"iana\"},\"video/raw\":{\"source\":\"iana\"},\"video/rtp-enc-aescm128\":{\"source\":\"iana\"},\"video/rtploopback\":{\"source\":\"iana\"},\"video/rtx\":{\"source\":\"iana\"},\"video/smpte291\":{\"source\":\"iana\"},\"video/smpte292m\":{\"source\":\"iana\"},\"video/ulpfec\":{\"source\":\"iana\"},\"video/vc1\":{\"source\":\"iana\"},\"video/vnd.cctv\":{\"source\":\"iana\"},\"video/vnd.dece.hd\":{\"source\":\"iana\",\"extensions\":[\"uvh\",\"uvvh\"]},\"video/vnd.dece.mobile\":{\"source\":\"iana\",\"extensions\":[\"uvm\",\"uvvm\"]},\"video/vnd.dece.mp4\":{\"source\":\"iana\"},\"video/vnd.dece.pd\":{\"source\":\"iana\",\"extensions\":[\"uvp\",\"uvvp\"]},\"video/vnd.dece.sd\":{\"source\":\"iana\",\"extensions\":[\"uvs\",\"uvvs\"]},\"video/vnd.dece.video\":{\"source\":\"iana\",\"extensions\":[\"uvv\",\"uvvv\"]},\"video/vnd.directv.mpeg\":{\"source\":\"iana\"},\"video/vnd.directv.mpeg-tts\":{\"source\":\"iana\"},\"video/vnd.dlna.mpeg-tts\":{\"source\":\"iana\"},\"video/vnd.dvb.file\":{\"source\":\"iana\",\"extensions\":[\"dvb\"]},\"video/vnd.fvt\":{\"source\":\"iana\",\"extensions\":[\"fvt\"]},\"video/vnd.hns.video\":{\"source\":\"iana\"},\"video/vnd.iptvforum.1dparityfec-1010\":{\"source\":\"iana\"},\"video/vnd.iptvforum.1dparityfec-2005\":{\"source\":\"iana\"},\"video/vnd.iptvforum.2dparityfec-1010\":{\"source\":\"iana\"},\"video/vnd.iptvforum.2dparityfec-2005\":{\"source\":\"iana\"},\"video/vnd.iptvforum.ttsavc\":{\"source\":\"iana\"},\"video/vnd.iptvforum.ttsmpeg2\":{\"source\":\"iana\"},\"video/vnd.motorola.video\":{\"source\":\"iana\"},\"video/vnd.motorola.videop\":{\"source\":\"iana\"},\"video/vnd.mpegurl\":{\"source\":\"iana\",\"extensions\":[\"mxu\",\"m4u\"]},\"video/vnd.ms-playready.media.pyv\":{\"source\":\"iana\",\"extensions\":[\"pyv\"]},\"video/vnd.nokia.interleaved-multimedia\":{\"source\":\"iana\"},\"video/vnd.nokia.mp4vr\":{\"source\":\"iana\"},\"video/vnd.nokia.videovoip\":{\"source\":\"iana\"},\"video/vnd.objectvideo\":{\"source\":\"iana\"},\"video/vnd.radgamettools.bink\":{\"source\":\"iana\"},\"video/vnd.radgamettools.smacker\":{\"source\":\"iana\"},\"video/vnd.sealed.mpeg1\":{\"source\":\"iana\"},\"video/vnd.sealed.mpeg4\":{\"source\":\"iana\"},\"video/vnd.sealed.swf\":{\"source\":\"iana\"},\"video/vnd.sealedmedia.softseal.mov\":{\"source\":\"iana\"},\"video/vnd.uvvu.mp4\":{\"source\":\"iana\",\"extensions\":[\"uvu\",\"uvvu\"]},\"video/vnd.vivo\":{\"source\":\"iana\",\"extensions\":[\"viv\"]},\"video/vp8\":{\"source\":\"iana\"},\"video/webm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"webm\"]},\"video/x-f4v\":{\"source\":\"apache\",\"extensions\":[\"f4v\"]},\"video/x-fli\":{\"source\":\"apache\",\"extensions\":[\"fli\"]},\"video/x-flv\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"flv\"]},\"video/x-m4v\":{\"source\":\"apache\",\"extensions\":[\"m4v\"]},\"video/x-matroska\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"mkv\",\"mk3d\",\"mks\"]},\"video/x-mng\":{\"source\":\"apache\",\"extensions\":[\"mng\"]},\"video/x-ms-asf\":{\"source\":\"apache\",\"extensions\":[\"asf\",\"asx\"]},\"video/x-ms-vob\":{\"source\":\"apache\",\"extensions\":[\"vob\"]},\"video/x-ms-wm\":{\"source\":\"apache\",\"extensions\":[\"wm\"]},\"video/x-ms-wmv\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"wmv\"]},\"video/x-ms-wmx\":{\"source\":\"apache\",\"extensions\":[\"wmx\"]},\"video/x-ms-wvx\":{\"source\":\"apache\",\"extensions\":[\"wvx\"]},\"video/x-msvideo\":{\"source\":\"apache\",\"extensions\":[\"avi\"]},\"video/x-sgi-movie\":{\"source\":\"apache\",\"extensions\":[\"movie\"]},\"video/x-smv\":{\"source\":\"apache\",\"extensions\":[\"smv\"]},\"x-conference/x-cooltalk\":{\"source\":\"apache\",\"extensions\":[\"ice\"]},\"x-shader/x-fragment\":{\"compressible\":true},\"x-shader/x-vertex\":{\"compressible\":true}}");

});

parcelRegister("bBrnb", function(module, exports) {
// Use explicit /index.js to help browserify negociation in require '/lib/http-proxy' (!)

var $7DDlu = parcelRequire("7DDlu");
var $8728621b08228466$require$ProxyServer = $7DDlu.Server;
/**
 * Creates the proxy server.
 *
 * Examples:
 *
 *    httpProxy.createProxyServer({ .. }, 8000)
 *    // => '{ web: [Function], ws: [Function] ... }'
 *
 * @param {Object} Options Config object passed to the proxy
 *
 * @return {Object} Proxy Proxy object with handlers for `ws` and `web` requests
 *
 * @api public
 */ function $8728621b08228466$var$createProxyServer(options) {
    /*
   *  `options` is needed and it must have the following layout:
   *
   *  {
   *    target : <url string to be parsed with the url module>
   *    forward: <url string to be parsed with the url module>
   *    agent  : <object to be passed to http(s).request>
   *    ssl    : <object to be passed to https.createServer()>
   *    ws     : <true/false, if you want to proxy websockets>
   *    xfwd   : <true/false, adds x-forward headers>
   *    secure : <true/false, verify SSL certificate>
   *    toProxy: <true/false, explicitly specify if we are proxying to another proxy>
   *    prependPath: <true/false, Default: true - specify whether you want to prepend the target's path to the proxy path>
   *    ignorePath: <true/false, Default: false - specify whether you want to ignore the proxy path of the incoming request>
   *    localAddress : <Local interface string to bind for outgoing connections>
   *    changeOrigin: <true/false, Default: false - changes the origin of the host header to the target URL>
   *    preserveHeaderKeyCase: <true/false, Default: false - specify whether you want to keep letter case of response header key >
   *    auth   : Basic authentication i.e. 'user:password' to compute an Authorization header.
   *    hostRewrite: rewrites the location hostname on (201/301/302/307/308) redirects, Default: null.
   *    autoRewrite: rewrites the location host/port on (201/301/302/307/308) redirects based on requested host/port. Default: false.
   *    protocolRewrite: rewrites the location protocol on (201/301/302/307/308) redirects to 'http' or 'https'. Default: null.
   *  }
   *
   *  NOTE: `options.ws` and `options.ssl` are optional.
   *    `options.target and `options.forward` cannot be
   *    both missing
   *  }
   */ return new $8728621b08228466$require$ProxyServer(options);
}
$8728621b08228466$require$ProxyServer.createProxyServer = $8728621b08228466$var$createProxyServer;
$8728621b08228466$require$ProxyServer.createServer = $8728621b08228466$var$createProxyServer;
$8728621b08228466$require$ProxyServer.createProxy = $8728621b08228466$var$createProxyServer;
/**
 * Export the proxy "Server" as the main export.
 */ module.exports = $8728621b08228466$require$ProxyServer;

});
parcelRegister("7DDlu", function(module, exports) {
var $58fab22417a5ccbf$var$httpProxy = module.exports;

var $58fab22417a5ccbf$require$extend = $5HoLl$util._extend;

var $58fab22417a5ccbf$require$parse_url = $5HoLl$url.parse;

var $299TQ = parcelRequire("299TQ");



var $ii8PL = parcelRequire("ii8PL");

var $aeP9z = parcelRequire("aeP9z");
$58fab22417a5ccbf$var$httpProxy.Server = $58fab22417a5ccbf$var$ProxyServer;
/**
 * Returns a function that creates the loader for
 * either `ws` or `web`'s  passes.
 *
 * Examples:
 *
 *    httpProxy.createRightProxy('ws')
 *    // => [Function]
 *
 * @param {String} Type Either 'ws' or 'web'
 * 
 * @return {Function} Loader Function that when called returns an iterator for the right passes
 *
 * @api private
 */ function $58fab22417a5ccbf$var$createRightProxy(type) {
    return function(options) {
        return function(req, res /*, [head], [opts] */ ) {
            var passes = type === 'ws' ? this.wsPasses : this.webPasses, args = [].slice.call(arguments), cntr = args.length - 1, head, cbl;
            /* optional args parse begin */ if (typeof args[cntr] === 'function') {
                cbl = args[cntr];
                cntr--;
            }
            var requestOptions = options;
            if (!(args[cntr] instanceof Buffer) && args[cntr] !== res) {
                //Copy global options
                requestOptions = $58fab22417a5ccbf$require$extend({}, options);
                //Overwrite with request options
                $58fab22417a5ccbf$require$extend(requestOptions, args[cntr]);
                cntr--;
            }
            if (args[cntr] instanceof Buffer) head = args[cntr];
            /* optional args parse end */ [
                'target',
                'forward'
            ].forEach(function(e) {
                if (typeof requestOptions[e] === 'string') requestOptions[e] = $58fab22417a5ccbf$require$parse_url(requestOptions[e]);
            });
            if (!requestOptions.target && !requestOptions.forward) return this.emit('error', new Error('Must provide a proper URL as target'));
            for(var i = 0; i < passes.length; i++){
                /**
         * Call of passes functions
         * pass(req, res, options, head)
         *
         * In WebSockets case the `res` variable
         * refer to the connection socket
         * pass(req, socket, options, head)
         */ if (passes[i](req, res, requestOptions, head, this, cbl)) break;
            }
        };
    };
}
$58fab22417a5ccbf$var$httpProxy.createRightProxy = $58fab22417a5ccbf$var$createRightProxy;
function $58fab22417a5ccbf$var$ProxyServer(options) {
    $299TQ.call(this);
    options = options || {};
    options.prependPath = options.prependPath === false ? false : true;
    this.web = this.proxyRequest = $58fab22417a5ccbf$var$createRightProxy('web')(options);
    this.ws = this.proxyWebsocketRequest = $58fab22417a5ccbf$var$createRightProxy('ws')(options);
    this.options = options;
    this.webPasses = Object.keys($ii8PL).map(function(pass) {
        return $ii8PL[pass];
    });
    this.wsPasses = Object.keys($aeP9z).map(function(pass) {
        return $aeP9z[pass];
    });
    this.on('error', this.onError, this);
}

$5HoLl$util.inherits($58fab22417a5ccbf$var$ProxyServer, $299TQ);
$58fab22417a5ccbf$var$ProxyServer.prototype.onError = function(err) {
    //
    // Remark: Replicate node core behavior using EE3
    // so we force people to handle their own errors
    //
    if (this.listeners('error').length === 1) throw err;
};
$58fab22417a5ccbf$var$ProxyServer.prototype.listen = function(port, hostname) {
    var self = this, closure = function(req, res) {
        self.web(req, res);
    };
    this._server = this.options.ssl ? $5HoLl$https.createServer(this.options.ssl, closure) : $5HoLl$http.createServer(closure);
    if (this.options.ws) this._server.on('upgrade', function(req, socket, head) {
        self.ws(req, socket, head);
    });
    this._server.listen(port, hostname);
    return this;
};
$58fab22417a5ccbf$var$ProxyServer.prototype.close = function(callback) {
    var self = this;
    if (this._server) this._server.close(done);
    // Wrap callback to nullify server after all open connections are closed.
    function done() {
        self._server = null;
        if (callback) callback.apply(null, arguments);
    }
};
$58fab22417a5ccbf$var$ProxyServer.prototype.before = function(type, passName, callback) {
    if (type !== 'ws' && type !== 'web') throw new Error('type must be `web` or `ws`');
    var passes = type === 'ws' ? this.wsPasses : this.webPasses, i = false;
    passes.forEach(function(v, idx) {
        if (v.name === passName) i = idx;
    });
    if (i === false) throw new Error('No such pass');
    passes.splice(i, 0, callback);
};
$58fab22417a5ccbf$var$ProxyServer.prototype.after = function(type, passName, callback) {
    if (type !== 'ws' && type !== 'web') throw new Error('type must be `web` or `ws`');
    var passes = type === 'ws' ? this.wsPasses : this.webPasses, i = false;
    passes.forEach(function(v, idx) {
        if (v.name === passName) i = idx;
    });
    if (i === false) throw new Error('No such pass');
    passes.splice(i++, 0, callback);
};

});
parcelRegister("299TQ", function(module, exports) {
'use strict';
var $190419edb02da4e3$var$has = Object.prototype.hasOwnProperty, $190419edb02da4e3$var$prefix = '~';
/**
 * Constructor to create a storage for our `EE` objects.
 * An `Events` instance is a plain object whose properties are event names.
 *
 * @constructor
 * @private
 */ function $190419edb02da4e3$var$Events() {}
//
// We try to not inherit from `Object.prototype`. In some engines creating an
// instance in this way is faster than calling `Object.create(null)` directly.
// If `Object.create(null)` is not supported we prefix the event names with a
// character to make sure that the built-in object properties are not
// overridden or used as an attack vector.
//
if (Object.create) {
    $190419edb02da4e3$var$Events.prototype = Object.create(null);
    //
    // This hack is needed because the `__proto__` property is still inherited in
    // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
    //
    if (!new $190419edb02da4e3$var$Events().__proto__) $190419edb02da4e3$var$prefix = false;
}
/**
 * Representation of a single event listener.
 *
 * @param {Function} fn The listener function.
 * @param {*} context The context to invoke the listener with.
 * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
 * @constructor
 * @private
 */ function $190419edb02da4e3$var$EE(fn, context, once) {
    this.fn = fn;
    this.context = context;
    this.once = once || false;
}
/**
 * Add a listener for a given event.
 *
 * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
 * @param {(String|Symbol)} event The event name.
 * @param {Function} fn The listener function.
 * @param {*} context The context to invoke the listener with.
 * @param {Boolean} once Specify if the listener is a one-time listener.
 * @returns {EventEmitter}
 * @private
 */ function $190419edb02da4e3$var$addListener(emitter, event, fn, context, once) {
    if (typeof fn !== 'function') throw new TypeError('The listener must be a function');
    var listener = new $190419edb02da4e3$var$EE(fn, context || emitter, once), evt = $190419edb02da4e3$var$prefix ? $190419edb02da4e3$var$prefix + event : event;
    if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
    else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
    else emitter._events[evt] = [
        emitter._events[evt],
        listener
    ];
    return emitter;
}
/**
 * Clear event by name.
 *
 * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
 * @param {(String|Symbol)} evt The Event name.
 * @private
 */ function $190419edb02da4e3$var$clearEvent(emitter, evt) {
    if (--emitter._eventsCount === 0) emitter._events = new $190419edb02da4e3$var$Events();
    else delete emitter._events[evt];
}
/**
 * Minimal `EventEmitter` interface that is molded against the Node.js
 * `EventEmitter` interface.
 *
 * @constructor
 * @public
 */ function $190419edb02da4e3$var$EventEmitter() {
    this._events = new $190419edb02da4e3$var$Events();
    this._eventsCount = 0;
}
/**
 * Return an array listing the events for which the emitter has registered
 * listeners.
 *
 * @returns {Array}
 * @public
 */ $190419edb02da4e3$var$EventEmitter.prototype.eventNames = function eventNames() {
    var names = [], events, name;
    if (this._eventsCount === 0) return names;
    for(name in events = this._events)if ($190419edb02da4e3$var$has.call(events, name)) names.push($190419edb02da4e3$var$prefix ? name.slice(1) : name);
    if (Object.getOwnPropertySymbols) return names.concat(Object.getOwnPropertySymbols(events));
    return names;
};
/**
 * Return the listeners registered for a given event.
 *
 * @param {(String|Symbol)} event The event name.
 * @returns {Array} The registered listeners.
 * @public
 */ $190419edb02da4e3$var$EventEmitter.prototype.listeners = function listeners(event) {
    var evt = $190419edb02da4e3$var$prefix ? $190419edb02da4e3$var$prefix + event : event, handlers = this._events[evt];
    if (!handlers) return [];
    if (handlers.fn) return [
        handlers.fn
    ];
    for(var i = 0, l = handlers.length, ee = new Array(l); i < l; i++)ee[i] = handlers[i].fn;
    return ee;
};
/**
 * Return the number of listeners listening to a given event.
 *
 * @param {(String|Symbol)} event The event name.
 * @returns {Number} The number of listeners.
 * @public
 */ $190419edb02da4e3$var$EventEmitter.prototype.listenerCount = function listenerCount(event) {
    var evt = $190419edb02da4e3$var$prefix ? $190419edb02da4e3$var$prefix + event : event, listeners = this._events[evt];
    if (!listeners) return 0;
    if (listeners.fn) return 1;
    return listeners.length;
};
/**
 * Calls each of the listeners registered for a given event.
 *
 * @param {(String|Symbol)} event The event name.
 * @returns {Boolean} `true` if the event had listeners, else `false`.
 * @public
 */ $190419edb02da4e3$var$EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
    var evt = $190419edb02da4e3$var$prefix ? $190419edb02da4e3$var$prefix + event : event;
    if (!this._events[evt]) return false;
    var listeners = this._events[evt], len = arguments.length, args, i;
    if (listeners.fn) {
        if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
        switch(len){
            case 1:
                return listeners.fn.call(listeners.context), true;
            case 2:
                return listeners.fn.call(listeners.context, a1), true;
            case 3:
                return listeners.fn.call(listeners.context, a1, a2), true;
            case 4:
                return listeners.fn.call(listeners.context, a1, a2, a3), true;
            case 5:
                return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
            case 6:
                return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
        }
        for(i = 1, args = new Array(len - 1); i < len; i++)args[i - 1] = arguments[i];
        listeners.fn.apply(listeners.context, args);
    } else {
        var length = listeners.length, j;
        for(i = 0; i < length; i++){
            if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
            switch(len){
                case 1:
                    listeners[i].fn.call(listeners[i].context);
                    break;
                case 2:
                    listeners[i].fn.call(listeners[i].context, a1);
                    break;
                case 3:
                    listeners[i].fn.call(listeners[i].context, a1, a2);
                    break;
                case 4:
                    listeners[i].fn.call(listeners[i].context, a1, a2, a3);
                    break;
                default:
                    if (!args) for(j = 1, args = new Array(len - 1); j < len; j++)args[j - 1] = arguments[j];
                    listeners[i].fn.apply(listeners[i].context, args);
            }
        }
    }
    return true;
};
/**
 * Add a listener for a given event.
 *
 * @param {(String|Symbol)} event The event name.
 * @param {Function} fn The listener function.
 * @param {*} [context=this] The context to invoke the listener with.
 * @returns {EventEmitter} `this`.
 * @public
 */ $190419edb02da4e3$var$EventEmitter.prototype.on = function on(event, fn, context) {
    return $190419edb02da4e3$var$addListener(this, event, fn, context, false);
};
/**
 * Add a one-time listener for a given event.
 *
 * @param {(String|Symbol)} event The event name.
 * @param {Function} fn The listener function.
 * @param {*} [context=this] The context to invoke the listener with.
 * @returns {EventEmitter} `this`.
 * @public
 */ $190419edb02da4e3$var$EventEmitter.prototype.once = function once(event, fn, context) {
    return $190419edb02da4e3$var$addListener(this, event, fn, context, true);
};
/**
 * Remove the listeners of a given event.
 *
 * @param {(String|Symbol)} event The event name.
 * @param {Function} fn Only remove the listeners that match this function.
 * @param {*} context Only remove the listeners that have this context.
 * @param {Boolean} once Only remove one-time listeners.
 * @returns {EventEmitter} `this`.
 * @public
 */ $190419edb02da4e3$var$EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
    var evt = $190419edb02da4e3$var$prefix ? $190419edb02da4e3$var$prefix + event : event;
    if (!this._events[evt]) return this;
    if (!fn) {
        $190419edb02da4e3$var$clearEvent(this, evt);
        return this;
    }
    var listeners = this._events[evt];
    if (listeners.fn) {
        if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) $190419edb02da4e3$var$clearEvent(this, evt);
    } else {
        for(var i = 0, events = [], length = listeners.length; i < length; i++)if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) events.push(listeners[i]);
        //
        // Reset the array, or remove it completely if we have no more listeners.
        //
        if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
        else $190419edb02da4e3$var$clearEvent(this, evt);
    }
    return this;
};
/**
 * Remove all listeners, or those of the specified event.
 *
 * @param {(String|Symbol)} [event] The event name.
 * @returns {EventEmitter} `this`.
 * @public
 */ $190419edb02da4e3$var$EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
    var evt;
    if (event) {
        evt = $190419edb02da4e3$var$prefix ? $190419edb02da4e3$var$prefix + event : event;
        if (this._events[evt]) $190419edb02da4e3$var$clearEvent(this, evt);
    } else {
        this._events = new $190419edb02da4e3$var$Events();
        this._eventsCount = 0;
    }
    return this;
};
//
// Alias methods names because people roll like that.
//
$190419edb02da4e3$var$EventEmitter.prototype.off = $190419edb02da4e3$var$EventEmitter.prototype.removeListener;
$190419edb02da4e3$var$EventEmitter.prototype.addListener = $190419edb02da4e3$var$EventEmitter.prototype.on;
//
// Expose the prefix.
//
$190419edb02da4e3$var$EventEmitter.prefixed = $190419edb02da4e3$var$prefix;
//
// Allow `EventEmitter` to be imported as module namespace.
//
$190419edb02da4e3$var$EventEmitter.EventEmitter = $190419edb02da4e3$var$EventEmitter;
module.exports = $190419edb02da4e3$var$EventEmitter;

});

parcelRegister("ii8PL", function(module, exports) {



var $d2hDx = parcelRequire("d2hDx");
var $d510c2aa386a1ad9$require$web_o = $d2hDx;

var $fBhCl = parcelRequire("fBhCl");

var $jbOHr = parcelRequire("jbOHr");
$d510c2aa386a1ad9$require$web_o = Object.keys($d510c2aa386a1ad9$require$web_o).map(function(pass) {
    return $d510c2aa386a1ad9$require$web_o[pass];
});
var $d510c2aa386a1ad9$var$nativeAgents = {
    http: $5HoLl$http,
    https: $5HoLl$https
};
/*!
 * Array of passes.
 *
 * A `pass` is just a function that is executed on `req, res, options`
 * so that you can easily add new checks while still keeping the base
 * flexible.
 */ module.exports = {
    /**
   * Sets `content-length` to '0' if request is of DELETE type.
   *
   * @param {ClientRequest} Req Request object
   * @param {IncomingMessage} Res Response object
   * @param {Object} Options Config object passed to the proxy
   *
   * @api private
   */ deleteLength: function deleteLength(req, res, options) {
        if ((req.method === 'DELETE' || req.method === 'OPTIONS') && !req.headers['content-length']) {
            req.headers['content-length'] = '0';
            delete req.headers['transfer-encoding'];
        }
    },
    /**
   * Sets timeout in request socket if it was specified in options.
   *
   * @param {ClientRequest} Req Request object
   * @param {IncomingMessage} Res Response object
   * @param {Object} Options Config object passed to the proxy
   *
   * @api private
   */ timeout: function timeout(req, res, options) {
        if (options.timeout) req.socket.setTimeout(options.timeout);
    },
    /**
   * Sets `x-forwarded-*` headers if specified in config.
   *
   * @param {ClientRequest} Req Request object
   * @param {IncomingMessage} Res Response object
   * @param {Object} Options Config object passed to the proxy
   *
   * @api private
   */ XHeaders: function XHeaders(req, res, options) {
        if (!options.xfwd) return;
        var encrypted = req.isSpdy || $fBhCl.hasEncryptedConnection(req);
        var values = {
            for: req.connection.remoteAddress || req.socket.remoteAddress,
            port: $fBhCl.getPort(req),
            proto: encrypted ? 'https' : 'http'
        };
        [
            'for',
            'port',
            'proto'
        ].forEach(function(header) {
            req.headers['x-forwarded-' + header] = (req.headers['x-forwarded-' + header] || '') + (req.headers['x-forwarded-' + header] ? ',' : '') + values[header];
        });
        req.headers['x-forwarded-host'] = req.headers['x-forwarded-host'] || req.headers['host'] || '';
    },
    /**
   * Does the actual proxying. If `forward` is enabled fires up
   * a ForwardStream, same happens for ProxyStream. The request
   * just dies otherwise.
   *
   * @param {ClientRequest} Req Request object
   * @param {IncomingMessage} Res Response object
   * @param {Object} Options Config object passed to the proxy
   *
   * @api private
   */ stream: function stream(req, res, options, _, server, clb) {
        // And we begin!
        server.emit('start', req, res, options.target || options.forward);
        var agents = options.followRedirects ? $jbOHr : $d510c2aa386a1ad9$var$nativeAgents;
        var http = agents.http;
        var https = agents.https;
        if (options.forward) {
            // If forward enable, so just pipe the request
            var forwardReq = (options.forward.protocol === 'https:' ? https : http).request($fBhCl.setupOutgoing(options.ssl || {}, options, req, 'forward'));
            // error handler (e.g. ECONNRESET, ECONNREFUSED)
            // Handle errors on incoming request as well as it makes sense to
            var forwardError = createErrorHandler(forwardReq, options.forward);
            req.on('error', forwardError);
            forwardReq.on('error', forwardError);
            (options.buffer || req).pipe(forwardReq);
            if (!options.target) return res.end();
        }
        // Request initalization
        var proxyReq = (options.target.protocol === 'https:' ? https : http).request($fBhCl.setupOutgoing(options.ssl || {}, options, req));
        // Enable developers to modify the proxyReq before headers are sent
        proxyReq.on('socket', function(socket) {
            if (server && !proxyReq.getHeader('expect')) server.emit('proxyReq', proxyReq, req, res, options);
        });
        // allow outgoing socket to timeout so that we could
        // show an error page at the initial request
        if (options.proxyTimeout) proxyReq.setTimeout(options.proxyTimeout, function() {
            proxyReq.abort();
        });
        // Ensure we abort proxy if request is aborted
        req.on('aborted', function() {
            proxyReq.abort();
        });
        // handle errors in proxy and incoming request, just like for forward proxy
        var proxyError = createErrorHandler(proxyReq, options.target);
        req.on('error', proxyError);
        proxyReq.on('error', proxyError);
        function createErrorHandler(proxyReq, url) {
            return function proxyError(err) {
                if (req.socket.destroyed && err.code === 'ECONNRESET') {
                    server.emit('econnreset', err, req, res, url);
                    return proxyReq.abort();
                }
                if (clb) clb(err, req, res, url);
                else server.emit('error', err, req, res, url);
            };
        }
        (options.buffer || req).pipe(proxyReq);
        proxyReq.on('response', function(proxyRes) {
            if (server) server.emit('proxyRes', proxyRes, req, res);
            if (!res.headersSent && !options.selfHandleResponse) for(var i = 0; i < $d510c2aa386a1ad9$require$web_o.length; i++){
                if ($d510c2aa386a1ad9$require$web_o[i](req, res, proxyRes, options)) break;
            }
            if (!res.finished) {
                // Allow us to listen when the proxy has completed
                proxyRes.on('end', function() {
                    if (server) server.emit('end', req, res, proxyRes);
                });
                // We pipe to the response unless its expected to be handled by the user
                if (!options.selfHandleResponse) proxyRes.pipe(res);
            } else if (server) server.emit('end', req, res, proxyRes);
        });
    }
};

});
parcelRegister("d2hDx", function(module, exports) {


var $fBhCl = parcelRequire("fBhCl");
var $97d924887630acef$var$redirectRegex = /^201|30(1|2|7|8)$/;
/*!
 * Array of passes.
 *
 * A `pass` is just a function that is executed on `req, res, options`
 * so that you can easily add new checks while still keeping the base
 * flexible.
 */ module.exports = {
    /**
   * If is a HTTP 1.0 request, remove chunk headers
   *
   * @param {ClientRequest} Req Request object
   * @param {IncomingMessage} Res Response object
   * @param {proxyResponse} Res Response object from the proxy request
   *
   * @api private
   */ removeChunked: function removeChunked(req, res, proxyRes) {
        if (req.httpVersion === '1.0') delete proxyRes.headers['transfer-encoding'];
    },
    /**
   * If is a HTTP 1.0 request, set the correct connection header
   * or if connection header not present, then use `keep-alive`
   *
   * @param {ClientRequest} Req Request object
   * @param {IncomingMessage} Res Response object
   * @param {proxyResponse} Res Response object from the proxy request
   *
   * @api private
   */ setConnection: function setConnection(req, res, proxyRes) {
        if (req.httpVersion === '1.0') proxyRes.headers.connection = req.headers.connection || 'close';
        else if (req.httpVersion !== '2.0' && !proxyRes.headers.connection) proxyRes.headers.connection = req.headers.connection || 'keep-alive';
    },
    setRedirectHostRewrite: function setRedirectHostRewrite(req, res, proxyRes, options) {
        if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite) && proxyRes.headers['location'] && $97d924887630acef$var$redirectRegex.test(proxyRes.statusCode)) {
            var target = $5HoLl$url.parse(options.target);
            var u = $5HoLl$url.parse(proxyRes.headers['location']);
            // make sure the redirected host matches the target host before rewriting
            if (target.host != u.host) return;
            if (options.hostRewrite) u.host = options.hostRewrite;
            else if (options.autoRewrite) u.host = req.headers['host'];
            if (options.protocolRewrite) u.protocol = options.protocolRewrite;
            proxyRes.headers['location'] = u.format();
        }
    },
    /**
   * Copy headers from proxyResponse to response
   * set each header in response object.
   *
   * @param {ClientRequest} Req Request object
   * @param {IncomingMessage} Res Response object
   * @param {proxyResponse} Res Response object from the proxy request
   * @param {Object} Options options.cookieDomainRewrite: Config to rewrite cookie domain
   *
   * @api private
   */ writeHeaders: function writeHeaders(req, res, proxyRes, options) {
        var rewriteCookieDomainConfig = options.cookieDomainRewrite, rewriteCookiePathConfig = options.cookiePathRewrite, preserveHeaderKeyCase = options.preserveHeaderKeyCase, rawHeaderKeyMap, setHeader = function(key, header) {
            if (header == undefined) return;
            if (rewriteCookieDomainConfig && key.toLowerCase() === 'set-cookie') header = $fBhCl.rewriteCookieProperty(header, rewriteCookieDomainConfig, 'domain');
            if (rewriteCookiePathConfig && key.toLowerCase() === 'set-cookie') header = $fBhCl.rewriteCookieProperty(header, rewriteCookiePathConfig, 'path');
            res.setHeader(String(key).trim(), header);
        };
        if (typeof rewriteCookieDomainConfig === 'string') rewriteCookieDomainConfig = {
            '*': rewriteCookieDomainConfig
        };
        if (typeof rewriteCookiePathConfig === 'string') rewriteCookiePathConfig = {
            '*': rewriteCookiePathConfig
        };
        // message.rawHeaders is added in: v0.11.6
        // https://nodejs.org/api/http.html#http_message_rawheaders
        if (preserveHeaderKeyCase && proxyRes.rawHeaders != undefined) {
            rawHeaderKeyMap = {};
            for(var i = 0; i < proxyRes.rawHeaders.length; i += 2){
                var key = proxyRes.rawHeaders[i];
                rawHeaderKeyMap[key.toLowerCase()] = key;
            }
        }
        Object.keys(proxyRes.headers).forEach(function(key) {
            var header = proxyRes.headers[key];
            if (preserveHeaderKeyCase && rawHeaderKeyMap) key = rawHeaderKeyMap[key] || key;
            setHeader(key, header);
        });
    },
    /**
   * Set the statusCode from the proxyResponse
   *
   * @param {ClientRequest} Req Request object
   * @param {IncomingMessage} Res Response object
   * @param {proxyResponse} Res Response object from the proxy request
   *
   * @api private
   */ writeStatusCode: function writeStatusCode(req, res, proxyRes) {
        // From Node.js docs: response.writeHead(statusCode[, statusMessage][, headers])
        if (proxyRes.statusMessage) {
            res.statusCode = proxyRes.statusCode;
            res.statusMessage = proxyRes.statusMessage;
        } else res.statusCode = proxyRes.statusCode;
    }
};

});
parcelRegister("fBhCl", function(module, exports) {
var $b5b7fa2f77feb751$var$common = module.exports;


var $b5b7fa2f77feb751$require$extend = $5HoLl$util._extend;

var $cIG6o = parcelRequire("cIG6o");
var $b5b7fa2f77feb751$var$upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i, $b5b7fa2f77feb751$var$isSSL = /^https|wss/;
/**
 * Simple Regex for testing if protocol is https
 */ $b5b7fa2f77feb751$var$common.isSSL = $b5b7fa2f77feb751$var$isSSL;
/**
 * Copies the right headers from `options` and `req` to
 * `outgoing` which is then used to fire the proxied
 * request.
 *
 * Examples:
 *
 *    common.setupOutgoing(outgoing, options, req)
 *    // => { host: ..., hostname: ...}
 *
 * @param {Object} Outgoing Base object to be filled with required properties
 * @param {Object} Options Config object passed to the proxy
 * @param {ClientRequest} Req Request Object
 * @param {String} Forward String to select forward or target
 * 
 * @return {Object} Outgoing Object with all required properties set
 *
 * @api private
 */ $b5b7fa2f77feb751$var$common.setupOutgoing = function(outgoing, options, req, forward) {
    outgoing.port = options[forward || 'target'].port || ($b5b7fa2f77feb751$var$isSSL.test(options[forward || 'target'].protocol) ? 443 : 80);
    [
        'host',
        'hostname',
        'socketPath',
        'pfx',
        'key',
        'passphrase',
        'cert',
        'ca',
        'ciphers',
        'secureProtocol'
    ].forEach(function(e) {
        outgoing[e] = options[forward || 'target'][e];
    });
    outgoing.method = options.method || req.method;
    outgoing.headers = $b5b7fa2f77feb751$require$extend({}, req.headers);
    if (options.headers) $b5b7fa2f77feb751$require$extend(outgoing.headers, options.headers);
    if (options.auth) outgoing.auth = options.auth;
    if (options.ca) outgoing.ca = options.ca;
    if ($b5b7fa2f77feb751$var$isSSL.test(options[forward || 'target'].protocol)) outgoing.rejectUnauthorized = typeof options.secure === "undefined" ? true : options.secure;
    outgoing.agent = options.agent || false;
    outgoing.localAddress = options.localAddress;
    //
    // Remark: If we are false and not upgrading, set the connection: close. This is the right thing to do
    // as node core doesn't handle this COMPLETELY properly yet.
    //
    if (!outgoing.agent) {
        outgoing.headers = outgoing.headers || {};
        if (typeof outgoing.headers.connection !== 'string' || !$b5b7fa2f77feb751$var$upgradeHeader.test(outgoing.headers.connection)) outgoing.headers.connection = 'close';
    }
    // the final path is target path + relative path requested by user:
    var target = options[forward || 'target'];
    var targetPath = target && options.prependPath !== false ? target.path || '' : '';
    //
    // Remark: Can we somehow not use url.parse as a perf optimization?
    //
    var outgoingPath = !options.toProxy ? $5HoLl$url.parse(req.url).path || '' : req.url;
    //
    // Remark: ignorePath will just straight up ignore whatever the request's
    // path is. This can be labeled as FOOT-GUN material if you do not know what
    // you are doing and are using conflicting options.
    //
    outgoingPath = !options.ignorePath ? outgoingPath : '';
    outgoing.path = $b5b7fa2f77feb751$var$common.urlJoin(targetPath, outgoingPath);
    if (options.changeOrigin) outgoing.headers.host = $cIG6o(outgoing.port, options[forward || 'target'].protocol) && !$b5b7fa2f77feb751$var$hasPort(outgoing.host) ? outgoing.host + ':' + outgoing.port : outgoing.host;
    return outgoing;
};
/**
 * Set the proper configuration for sockets,
 * set no delay and set keep alive, also set
 * the timeout to 0.
 *
 * Examples:
 *
 *    common.setupSocket(socket)
 *    // => Socket
 *
 * @param {Socket} Socket instance to setup
 * 
 * @return {Socket} Return the configured socket.
 *
 * @api private
 */ $b5b7fa2f77feb751$var$common.setupSocket = function(socket) {
    socket.setTimeout(0);
    socket.setNoDelay(true);
    socket.setKeepAlive(true, 0);
    return socket;
};
/**
 * Get the port number from the host. Or guess it based on the connection type.
 *
 * @param {Request} req Incoming HTTP request.
 *
 * @return {String} The port number.
 *
 * @api private
 */ $b5b7fa2f77feb751$var$common.getPort = function(req) {
    var res = req.headers.host ? req.headers.host.match(/:(\d+)/) : '';
    return res ? res[1] : $b5b7fa2f77feb751$var$common.hasEncryptedConnection(req) ? '443' : '80';
};
/**
 * Check if the request has an encrypted connection.
 *
 * @param {Request} req Incoming HTTP request.
 *
 * @return {Boolean} Whether the connection is encrypted or not.
 *
 * @api private
 */ $b5b7fa2f77feb751$var$common.hasEncryptedConnection = function(req) {
    return Boolean(req.connection.encrypted || req.connection.pair);
};
/**
 * OS-agnostic join (doesn't break on URLs like path.join does on Windows)>
 *
 * @return {String} The generated path.
 *
 * @api private
 */ $b5b7fa2f77feb751$var$common.urlJoin = function() {
    //
    // We do not want to mess with the query string. All we want to touch is the path.
    //
    var args = Array.prototype.slice.call(arguments), lastIndex = args.length - 1, last = args[lastIndex], lastSegs = last.split('?'), retSegs;
    args[lastIndex] = lastSegs.shift();
    //
    // Join all strings, but remove empty strings so we don't get extra slashes from
    // joining e.g. ['', 'am']
    //
    retSegs = [
        args.filter(Boolean).join('/').replace(/\/+/g, '/').replace('http:/', 'http://').replace('https:/', 'https://')
    ];
    // Only join the query string if it exists so we don't have trailing a '?'
    // on every request
    // Handle case where there could be multiple ? in the URL.
    retSegs.push.apply(retSegs, lastSegs);
    return retSegs.join('?');
};
/**
 * Rewrites or removes the domain of a cookie header
 *
 * @param {String|Array} Header
 * @param {Object} Config, mapping of domain to rewritten domain.
 *                 '*' key to match any domain, null value to remove the domain.
 *
 * @api private
 */ $b5b7fa2f77feb751$var$common.rewriteCookieProperty = function rewriteCookieProperty(header, config, property) {
    if (Array.isArray(header)) return header.map(function(headerElement) {
        return rewriteCookieProperty(headerElement, config, property);
    });
    return header.replace(new RegExp("(;\\s*" + property + "=)([^;]+)", 'i'), function(match, prefix, previousValue) {
        var newValue;
        if (previousValue in config) newValue = config[previousValue];
        else if ('*' in config) newValue = config['*'];
        else //no match, return previous value
        return match;
        if (newValue) //replace value
        return prefix + newValue;
        else //remove value
        return '';
    });
};
/**
 * Check the host and see if it potentially has a port in it (keep it simple)
 *
 * @returns {Boolean} Whether we have one or not
 *
 * @api private
 */ function $b5b7fa2f77feb751$var$hasPort(host) {
    return !!~host.indexOf(':');
}

});
parcelRegister("cIG6o", function(module, exports) {
'use strict';
/**
 * Check if we're required to add a port number.
 *
 * @see https://url.spec.whatwg.org/#default-port
 * @param {Number|String} port Port number we need to check
 * @param {String} protocol Protocol we need to check against.
 * @returns {Boolean} Is it a default port for the given protocol
 * @api private
 */ module.exports = function required(port, protocol) {
    protocol = protocol.split(':')[0];
    port = +port;
    if (!port) return false;
    switch(protocol){
        case 'http':
        case 'ws':
            return port !== 80;
        case 'https':
        case 'wss':
            return port !== 443;
        case 'ftp':
            return port !== 21;
        case 'gopher':
            return port !== 70;
        case 'file':
            return false;
    }
    return port !== 0;
};

});



parcelRegister("jbOHr", function(module, exports) {

var $df865f4d940b1bcd$var$URL = $5HoLl$url.URL;



var $df865f4d940b1bcd$require$Writable = $5HoLl$stream.Writable;


var $i9YgQ = parcelRequire("i9YgQ");
// Preventive platform detection
// istanbul ignore next
(function detectUnsupportedEnvironment() {
    var looksLikeNode = typeof process !== "undefined";
    var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined";
    var looksLikeV8 = $df865f4d940b1bcd$var$isFunction(Error.captureStackTrace);
    if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) console.warn("The follow-redirects package should be excluded from browser builds.");
})();
// Whether to use the native URL object or the legacy url module
var $df865f4d940b1bcd$var$useNativeURL = false;
try {
    $5HoLl$assert(new $df865f4d940b1bcd$var$URL(""));
} catch (error) {
    $df865f4d940b1bcd$var$useNativeURL = error.code === "ERR_INVALID_URL";
}
// URL fields to preserve in copy operations
var $df865f4d940b1bcd$var$preservedUrlFields = [
    "auth",
    "host",
    "hostname",
    "href",
    "path",
    "pathname",
    "port",
    "protocol",
    "query",
    "search",
    "hash"
];
// Create handlers that pass events from native requests
var $df865f4d940b1bcd$var$events = [
    "abort",
    "aborted",
    "connect",
    "error",
    "socket",
    "timeout"
];
var $df865f4d940b1bcd$var$eventHandlers = Object.create(null);
$df865f4d940b1bcd$var$events.forEach(function(event) {
    $df865f4d940b1bcd$var$eventHandlers[event] = function(arg1, arg2, arg3) {
        this._redirectable.emit(event, arg1, arg2, arg3);
    };
});
// Error types with codes
var $df865f4d940b1bcd$var$InvalidUrlError = $df865f4d940b1bcd$var$createErrorType("ERR_INVALID_URL", "Invalid URL", TypeError);
var $df865f4d940b1bcd$var$RedirectionError = $df865f4d940b1bcd$var$createErrorType("ERR_FR_REDIRECTION_FAILURE", "Redirected request failed");
var $df865f4d940b1bcd$var$TooManyRedirectsError = $df865f4d940b1bcd$var$createErrorType("ERR_FR_TOO_MANY_REDIRECTS", "Maximum number of redirects exceeded", $df865f4d940b1bcd$var$RedirectionError);
var $df865f4d940b1bcd$var$MaxBodyLengthExceededError = $df865f4d940b1bcd$var$createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED", "Request body larger than maxBodyLength limit");
var $df865f4d940b1bcd$var$WriteAfterEndError = $df865f4d940b1bcd$var$createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end");
// istanbul ignore next
var $df865f4d940b1bcd$var$destroy = $df865f4d940b1bcd$require$Writable.prototype.destroy || $df865f4d940b1bcd$var$noop;
// An HTTP(S) request that can be redirected
function $df865f4d940b1bcd$var$RedirectableRequest(options, responseCallback) {
    // Initialize the request
    $df865f4d940b1bcd$require$Writable.call(this);
    this._sanitizeOptions(options);
    this._options = options;
    this._ended = false;
    this._ending = false;
    this._redirectCount = 0;
    this._redirects = [];
    this._requestBodyLength = 0;
    this._requestBodyBuffers = [];
    // Attach a callback if passed
    if (responseCallback) this.on("response", responseCallback);
    // React to responses of native requests
    var self = this;
    this._onNativeResponse = function(response) {
        try {
            self._processResponse(response);
        } catch (cause) {
            self.emit("error", cause instanceof $df865f4d940b1bcd$var$RedirectionError ? cause : new $df865f4d940b1bcd$var$RedirectionError({
                cause: cause
            }));
        }
    };
    // Perform the first request
    this._performRequest();
}
$df865f4d940b1bcd$var$RedirectableRequest.prototype = Object.create($df865f4d940b1bcd$require$Writable.prototype);
$df865f4d940b1bcd$var$RedirectableRequest.prototype.abort = function() {
    $df865f4d940b1bcd$var$destroyRequest(this._currentRequest);
    this._currentRequest.abort();
    this.emit("abort");
};
$df865f4d940b1bcd$var$RedirectableRequest.prototype.destroy = function(error) {
    $df865f4d940b1bcd$var$destroyRequest(this._currentRequest, error);
    $df865f4d940b1bcd$var$destroy.call(this, error);
    return this;
};
// Writes buffered data to the current native request
$df865f4d940b1bcd$var$RedirectableRequest.prototype.write = function(data, encoding, callback) {
    // Writing is not allowed if end has been called
    if (this._ending) throw new $df865f4d940b1bcd$var$WriteAfterEndError();
    // Validate input and shift parameters if necessary
    if (!$df865f4d940b1bcd$var$isString(data) && !$df865f4d940b1bcd$var$isBuffer(data)) throw new TypeError("data should be a string, Buffer or Uint8Array");
    if ($df865f4d940b1bcd$var$isFunction(encoding)) {
        callback = encoding;
        encoding = null;
    }
    // Ignore empty buffers, since writing them doesn't invoke the callback
    // https://github.com/nodejs/node/issues/22066
    if (data.length === 0) {
        if (callback) callback();
        return;
    }
    // Only write when we don't exceed the maximum body length
    if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {
        this._requestBodyLength += data.length;
        this._requestBodyBuffers.push({
            data: data,
            encoding: encoding
        });
        this._currentRequest.write(data, encoding, callback);
    } else {
        this.emit("error", new $df865f4d940b1bcd$var$MaxBodyLengthExceededError());
        this.abort();
    }
};
// Ends the current native request
$df865f4d940b1bcd$var$RedirectableRequest.prototype.end = function(data, encoding, callback) {
    // Shift parameters if necessary
    if ($df865f4d940b1bcd$var$isFunction(data)) {
        callback = data;
        data = encoding = null;
    } else if ($df865f4d940b1bcd$var$isFunction(encoding)) {
        callback = encoding;
        encoding = null;
    }
    // Write data if needed and end
    if (!data) {
        this._ended = this._ending = true;
        this._currentRequest.end(null, null, callback);
    } else {
        var self = this;
        var currentRequest = this._currentRequest;
        this.write(data, encoding, function() {
            self._ended = true;
            currentRequest.end(null, null, callback);
        });
        this._ending = true;
    }
};
// Sets a header value on the current native request
$df865f4d940b1bcd$var$RedirectableRequest.prototype.setHeader = function(name, value) {
    this._options.headers[name] = value;
    this._currentRequest.setHeader(name, value);
};
// Clears a header value on the current native request
$df865f4d940b1bcd$var$RedirectableRequest.prototype.removeHeader = function(name) {
    delete this._options.headers[name];
    this._currentRequest.removeHeader(name);
};
// Global timeout for all underlying requests
$df865f4d940b1bcd$var$RedirectableRequest.prototype.setTimeout = function(msecs, callback) {
    var self = this;
    // Destroys the socket on timeout
    function destroyOnTimeout(socket) {
        socket.setTimeout(msecs);
        socket.removeListener("timeout", socket.destroy);
        socket.addListener("timeout", socket.destroy);
    }
    // Sets up a timer to trigger a timeout event
    function startTimer(socket) {
        if (self._timeout) clearTimeout(self._timeout);
        self._timeout = setTimeout(function() {
            self.emit("timeout");
            clearTimer();
        }, msecs);
        destroyOnTimeout(socket);
    }
    // Stops a timeout from triggering
    function clearTimer() {
        // Clear the timeout
        if (self._timeout) {
            clearTimeout(self._timeout);
            self._timeout = null;
        }
        // Clean up all attached listeners
        self.removeListener("abort", clearTimer);
        self.removeListener("error", clearTimer);
        self.removeListener("response", clearTimer);
        self.removeListener("close", clearTimer);
        if (callback) self.removeListener("timeout", callback);
        if (!self.socket) self._currentRequest.removeListener("socket", startTimer);
    }
    // Attach callback if passed
    if (callback) this.on("timeout", callback);
    // Start the timer if or when the socket is opened
    if (this.socket) startTimer(this.socket);
    else this._currentRequest.once("socket", startTimer);
    // Clean up on events
    this.on("socket", destroyOnTimeout);
    this.on("abort", clearTimer);
    this.on("error", clearTimer);
    this.on("response", clearTimer);
    this.on("close", clearTimer);
    return this;
};
// Proxy all other public ClientRequest methods
[
    "flushHeaders",
    "getHeader",
    "setNoDelay",
    "setSocketKeepAlive"
].forEach(function(method) {
    $df865f4d940b1bcd$var$RedirectableRequest.prototype[method] = function(a, b) {
        return this._currentRequest[method](a, b);
    };
});
// Proxy all public ClientRequest properties
[
    "aborted",
    "connection",
    "socket"
].forEach(function(property) {
    Object.defineProperty($df865f4d940b1bcd$var$RedirectableRequest.prototype, property, {
        get: function() {
            return this._currentRequest[property];
        }
    });
});
$df865f4d940b1bcd$var$RedirectableRequest.prototype._sanitizeOptions = function(options) {
    // Ensure headers are always present
    if (!options.headers) options.headers = {};
    // Since http.request treats host as an alias of hostname,
    // but the url module interprets host as hostname plus port,
    // eliminate the host property to avoid confusion.
    if (options.host) {
        // Use hostname if set, because it has precedence
        if (!options.hostname) options.hostname = options.host;
        delete options.host;
    }
    // Complete the URL object when necessary
    if (!options.pathname && options.path) {
        var searchPos = options.path.indexOf("?");
        if (searchPos < 0) options.pathname = options.path;
        else {
            options.pathname = options.path.substring(0, searchPos);
            options.search = options.path.substring(searchPos);
        }
    }
};
// Executes the next native request (initial or redirect)
$df865f4d940b1bcd$var$RedirectableRequest.prototype._performRequest = function() {
    // Load the native protocol
    var protocol = this._options.protocol;
    var nativeProtocol = this._options.nativeProtocols[protocol];
    if (!nativeProtocol) throw new TypeError("Unsupported protocol " + protocol);
    // If specified, use the agent corresponding to the protocol
    // (HTTP and HTTPS use different types of agents)
    if (this._options.agents) {
        var scheme = protocol.slice(0, -1);
        this._options.agent = this._options.agents[scheme];
    }
    // Create the native request and set up its event handlers
    var request = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse);
    request._redirectable = this;
    for (var event of $df865f4d940b1bcd$var$events)request.on(event, $df865f4d940b1bcd$var$eventHandlers[event]);
    // RFC7230§5.3.1: When making a request directly to an origin server, […]
    // a client MUST send only the absolute path […] as the request-target.
    this._currentUrl = /^\//.test(this._options.path) ? $5HoLl$url.format(this._options) : // When making a request to a proxy, […]
    // a client MUST send the target URI in absolute-form […].
    this._options.path;
    // End a redirected request
    // (The first request must be ended explicitly with RedirectableRequest#end)
    if (this._isRedirect) {
        // Write the request entity and end
        var i = 0;
        var self = this;
        var buffers = this._requestBodyBuffers;
        (function writeNext(error) {
            // Only write if this request has not been redirected yet
            // istanbul ignore else
            if (request === self._currentRequest) {
                // Report any write errors
                // istanbul ignore if
                if (error) self.emit("error", error);
                else if (i < buffers.length) {
                    var buffer = buffers[i++];
                    // istanbul ignore else
                    if (!request.finished) request.write(buffer.data, buffer.encoding, writeNext);
                } else if (self._ended) request.end();
            }
        })();
    }
};
// Processes a response from the current native request
$df865f4d940b1bcd$var$RedirectableRequest.prototype._processResponse = function(response) {
    // Store the redirected response
    var statusCode = response.statusCode;
    if (this._options.trackRedirects) this._redirects.push({
        url: this._currentUrl,
        headers: response.headers,
        statusCode: statusCode
    });
    // RFC7231§6.4: The 3xx (Redirection) class of status code indicates
    // that further action needs to be taken by the user agent in order to
    // fulfill the request. If a Location header field is provided,
    // the user agent MAY automatically redirect its request to the URI
    // referenced by the Location field value,
    // even if the specific status code is not understood.
    // If the response is not a redirect; return it as-is
    var location = response.headers.location;
    if (!location || this._options.followRedirects === false || statusCode < 300 || statusCode >= 400) {
        response.responseUrl = this._currentUrl;
        response.redirects = this._redirects;
        this.emit("response", response);
        // Clean up
        this._requestBodyBuffers = [];
        return;
    }
    // The response is a redirect, so abort the current request
    $df865f4d940b1bcd$var$destroyRequest(this._currentRequest);
    // Discard the remainder of the response to avoid waiting for data
    response.destroy();
    // RFC7231§6.4: A client SHOULD detect and intervene
    // in cyclical redirections (i.e., "infinite" redirection loops).
    if (++this._redirectCount > this._options.maxRedirects) throw new $df865f4d940b1bcd$var$TooManyRedirectsError();
    // Store the request headers if applicable
    var requestHeaders;
    var beforeRedirect = this._options.beforeRedirect;
    if (beforeRedirect) requestHeaders = Object.assign({
        // The Host header was set by nativeProtocol.request
        Host: response.req.getHeader("host")
    }, this._options.headers);
    // RFC7231§6.4: Automatic redirection needs to done with
    // care for methods not known to be safe, […]
    // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change
    // the request method from POST to GET for the subsequent request.
    var method = this._options.method;
    if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || // RFC7231§6.4.4: The 303 (See Other) status code indicates that
    // the server is redirecting the user agent to a different resource […]
    // A user agent can perform a retrieval request targeting that URI
    // (a GET or HEAD request if using HTTP) […]
    statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) {
        this._options.method = "GET";
        // Drop a possible entity and headers related to it
        this._requestBodyBuffers = [];
        $df865f4d940b1bcd$var$removeMatchingHeaders(/^content-/i, this._options.headers);
    }
    // Drop the Host header, as the redirect might lead to a different host
    var currentHostHeader = $df865f4d940b1bcd$var$removeMatchingHeaders(/^host$/i, this._options.headers);
    // If the redirect is relative, carry over the host of the last request
    var currentUrlParts = $df865f4d940b1bcd$var$parseUrl(this._currentUrl);
    var currentHost = currentHostHeader || currentUrlParts.host;
    var currentUrl = /^\w+:/.test(location) ? this._currentUrl : $5HoLl$url.format(Object.assign(currentUrlParts, {
        host: currentHost
    }));
    // Create the redirected request
    var redirectUrl = $df865f4d940b1bcd$var$resolveUrl(location, currentUrl);
    $i9YgQ("redirecting to", redirectUrl.href);
    this._isRedirect = true;
    $df865f4d940b1bcd$var$spreadUrlObject(redirectUrl, this._options);
    // Drop confidential headers when redirecting to a less secure protocol
    // or to a different domain that is not a superdomain
    if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !$df865f4d940b1bcd$var$isSubdomain(redirectUrl.host, currentHost)) $df865f4d940b1bcd$var$removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
    // Evaluate the beforeRedirect callback
    if ($df865f4d940b1bcd$var$isFunction(beforeRedirect)) {
        var responseDetails = {
            headers: response.headers,
            statusCode: statusCode
        };
        var requestDetails = {
            url: currentUrl,
            method: method,
            headers: requestHeaders
        };
        beforeRedirect(this._options, responseDetails, requestDetails);
        this._sanitizeOptions(this._options);
    }
    // Perform the redirected request
    this._performRequest();
};
// Wraps the key/value object of protocols with redirect functionality
function $df865f4d940b1bcd$var$wrap(protocols) {
    // Default settings
    var exports = {
        maxRedirects: 21,
        maxBodyLength: 10485760
    };
    // Wrap each protocol
    var nativeProtocols = {};
    Object.keys(protocols).forEach(function(scheme) {
        var protocol = scheme + ":";
        var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
        var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);
        // Executes a request, following redirects
        function request(input, options, callback) {
            // Parse parameters, ensuring that input is an object
            if ($df865f4d940b1bcd$var$isURL(input)) input = $df865f4d940b1bcd$var$spreadUrlObject(input);
            else if ($df865f4d940b1bcd$var$isString(input)) input = $df865f4d940b1bcd$var$spreadUrlObject($df865f4d940b1bcd$var$parseUrl(input));
            else {
                callback = options;
                options = $df865f4d940b1bcd$var$validateUrl(input);
                input = {
                    protocol: protocol
                };
            }
            if ($df865f4d940b1bcd$var$isFunction(options)) {
                callback = options;
                options = null;
            }
            // Set defaults
            options = Object.assign({
                maxRedirects: exports.maxRedirects,
                maxBodyLength: exports.maxBodyLength
            }, input, options);
            options.nativeProtocols = nativeProtocols;
            if (!$df865f4d940b1bcd$var$isString(options.host) && !$df865f4d940b1bcd$var$isString(options.hostname)) options.hostname = "::1";
            $5HoLl$assert.equal(options.protocol, protocol, "protocol mismatch");
            $i9YgQ("options", options);
            return new $df865f4d940b1bcd$var$RedirectableRequest(options, callback);
        }
        // Executes a GET request, following redirects
        function get(input, options, callback) {
            var wrappedRequest = wrappedProtocol.request(input, options, callback);
            wrappedRequest.end();
            return wrappedRequest;
        }
        // Expose the properties on the wrapped protocol
        Object.defineProperties(wrappedProtocol, {
            request: {
                value: request,
                configurable: true,
                enumerable: true,
                writable: true
            },
            get: {
                value: get,
                configurable: true,
                enumerable: true,
                writable: true
            }
        });
    });
    return exports;
}
function $df865f4d940b1bcd$var$noop() {}
function $df865f4d940b1bcd$var$parseUrl(input) {
    var parsed;
    // istanbul ignore else
    if ($df865f4d940b1bcd$var$useNativeURL) parsed = new $df865f4d940b1bcd$var$URL(input);
    else {
        // Ensure the URL is valid and absolute
        parsed = $df865f4d940b1bcd$var$validateUrl($5HoLl$url.parse(input));
        if (!$df865f4d940b1bcd$var$isString(parsed.protocol)) throw new $df865f4d940b1bcd$var$InvalidUrlError({
            input: input
        });
    }
    return parsed;
}
function $df865f4d940b1bcd$var$resolveUrl(relative, base) {
    // istanbul ignore next
    return $df865f4d940b1bcd$var$useNativeURL ? new $df865f4d940b1bcd$var$URL(relative, base) : $df865f4d940b1bcd$var$parseUrl($5HoLl$url.resolve(base, relative));
}
function $df865f4d940b1bcd$var$validateUrl(input) {
    if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) throw new $df865f4d940b1bcd$var$InvalidUrlError({
        input: input.href || input
    });
    if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) throw new $df865f4d940b1bcd$var$InvalidUrlError({
        input: input.href || input
    });
    return input;
}
function $df865f4d940b1bcd$var$spreadUrlObject(urlObject, target) {
    var spread = target || {};
    for (var key of $df865f4d940b1bcd$var$preservedUrlFields)spread[key] = urlObject[key];
    // Fix IPv6 hostname
    if (spread.hostname.startsWith("[")) spread.hostname = spread.hostname.slice(1, -1);
    // Ensure port is a number
    if (spread.port !== "") spread.port = Number(spread.port);
    // Concatenate path
    spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;
    return spread;
}
function $df865f4d940b1bcd$var$removeMatchingHeaders(regex, headers) {
    var lastValue;
    for(var header in headers)if (regex.test(header)) {
        lastValue = headers[header];
        delete headers[header];
    }
    return lastValue === null || typeof lastValue === "undefined" ? undefined : String(lastValue).trim();
}
function $df865f4d940b1bcd$var$createErrorType(code, message, baseClass) {
    // Create constructor
    function CustomError(properties) {
        // istanbul ignore else
        if ($df865f4d940b1bcd$var$isFunction(Error.captureStackTrace)) Error.captureStackTrace(this, this.constructor);
        Object.assign(this, properties || {});
        this.code = code;
        this.message = this.cause ? message + ": " + this.cause.message : message;
    }
    // Attach constructor and set default properties
    CustomError.prototype = new (baseClass || Error)();
    Object.defineProperties(CustomError.prototype, {
        constructor: {
            value: CustomError,
            enumerable: false
        },
        name: {
            value: "Error [" + code + "]",
            enumerable: false
        }
    });
    return CustomError;
}
function $df865f4d940b1bcd$var$destroyRequest(request, error) {
    for (var event of $df865f4d940b1bcd$var$events)request.removeListener(event, $df865f4d940b1bcd$var$eventHandlers[event]);
    request.on("error", $df865f4d940b1bcd$var$noop);
    request.destroy(error);
}
function $df865f4d940b1bcd$var$isSubdomain(subdomain, domain) {
    $5HoLl$assert($df865f4d940b1bcd$var$isString(subdomain) && $df865f4d940b1bcd$var$isString(domain));
    var dot = subdomain.length - domain.length - 1;
    return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
}
function $df865f4d940b1bcd$var$isString(value) {
    return typeof value === "string" || value instanceof String;
}
function $df865f4d940b1bcd$var$isFunction(value) {
    return typeof value === "function";
}
function $df865f4d940b1bcd$var$isBuffer(value) {
    return typeof value === "object" && "length" in value;
}
function $df865f4d940b1bcd$var$isURL(value) {
    return $df865f4d940b1bcd$var$URL && value instanceof $df865f4d940b1bcd$var$URL;
}
// Exports
module.exports = $df865f4d940b1bcd$var$wrap({
    http: $5HoLl$http,
    https: $5HoLl$https
});
module.exports.wrap = $df865f4d940b1bcd$var$wrap;

});
parcelRegister("i9YgQ", function(module, exports) {
var $d387d1c504905832$var$debug;

module.exports = function() {
    if (!$d387d1c504905832$var$debug) {
        try {
            /* eslint global-require: off */ $d387d1c504905832$var$debug = (parcelRequire("aD9Pt"))("follow-redirects");
        } catch (error) {}
        if (typeof $d387d1c504905832$var$debug !== "function") $d387d1c504905832$var$debug = function() {};
    }
    $d387d1c504905832$var$debug.apply(null, arguments);
};

});
parcelRegister("aD9Pt", function(module, exports) {
/**
 * Detect Electron renderer / nwjs process, which is node, but we should
 * treat as a browser.
 */ 

if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) module.exports = (parcelRequire("hBhSu"));
else module.exports = (parcelRequire("hslRo"));

});
parcelRegister("hBhSu", function(module, exports) {
/* eslint-env browser */ /**
 * This is the web browser implementation of `debug()`.
 */ exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = localstorage();
exports.destroy = (()=>{
    let warned = false;
    return ()=>{
        if (!warned) {
            warned = true;
            console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
        }
    };
})();
/**
 * Colors.
 */ exports.colors = [
    '#0000CC',
    '#0000FF',
    '#0033CC',
    '#0033FF',
    '#0066CC',
    '#0066FF',
    '#0099CC',
    '#0099FF',
    '#00CC00',
    '#00CC33',
    '#00CC66',
    '#00CC99',
    '#00CCCC',
    '#00CCFF',
    '#3300CC',
    '#3300FF',
    '#3333CC',
    '#3333FF',
    '#3366CC',
    '#3366FF',
    '#3399CC',
    '#3399FF',
    '#33CC00',
    '#33CC33',
    '#33CC66',
    '#33CC99',
    '#33CCCC',
    '#33CCFF',
    '#6600CC',
    '#6600FF',
    '#6633CC',
    '#6633FF',
    '#66CC00',
    '#66CC33',
    '#9900CC',
    '#9900FF',
    '#9933CC',
    '#9933FF',
    '#99CC00',
    '#99CC33',
    '#CC0000',
    '#CC0033',
    '#CC0066',
    '#CC0099',
    '#CC00CC',
    '#CC00FF',
    '#CC3300',
    '#CC3333',
    '#CC3366',
    '#CC3399',
    '#CC33CC',
    '#CC33FF',
    '#CC6600',
    '#CC6633',
    '#CC9900',
    '#CC9933',
    '#CCCC00',
    '#CCCC33',
    '#FF0000',
    '#FF0033',
    '#FF0066',
    '#FF0099',
    '#FF00CC',
    '#FF00FF',
    '#FF3300',
    '#FF3333',
    '#FF3366',
    '#FF3399',
    '#FF33CC',
    '#FF33FF',
    '#FF6600',
    '#FF6633',
    '#FF9900',
    '#FF9933',
    '#FFCC00',
    '#FFCC33'
];
/**
 * Currently only WebKit-based Web Inspectors, Firefox >= v31,
 * and the Firebug extension (any Firefox version) are known
 * to support "%c" CSS customizations.
 *
 * TODO: add a `localStorage` variable to explicitly enable/disable colors
 */ // eslint-disable-next-line complexity
function useColors() {
    // NB: In an Electron preload script, document will be defined but not fully
    // initialized. Since we know we're in Chrome, we'll just detect this case
    // explicitly
    if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) return true;
    // Internet Explorer and Edge do not support colors.
    if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return false;
    let m;
    // Is webkit? http://stackoverflow.com/a/16459606/376773
    // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
    return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
    typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
    // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
    typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
    typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
}
/**
 * Colorize log arguments if enabled.
 *
 * @api public
 */ function formatArgs(args) {
    args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
    if (!this.useColors) return;
    const c = 'color: ' + this.color;
    args.splice(1, 0, c, 'color: inherit');
    // The final "%c" is somewhat tricky, because there could be other
    // arguments passed either before or after the %c, so we need to
    // figure out the correct index to insert the CSS into
    let index = 0;
    let lastC = 0;
    args[0].replace(/%[a-zA-Z%]/g, (match)=>{
        if (match === '%%') return;
        index++;
        if (match === '%c') // We only are interested in the *last* %c
        // (the user may have provided their own)
        lastC = index;
    });
    args.splice(lastC, 0, c);
}
/**
 * Invokes `console.debug()` when available.
 * No-op when `console.debug` is not a "function".
 * If `console.debug` is not available, falls back
 * to `console.log`.
 *
 * @api public
 */ exports.log = console.debug || console.log || (()=>{});
/**
 * Save `namespaces`.
 *
 * @param {String} namespaces
 * @api private
 */ function save(namespaces) {
    try {
        if (namespaces) exports.storage.setItem('debug', namespaces);
        else exports.storage.removeItem('debug');
    } catch (error) {
    // Swallow
    // XXX (@Qix-) should we be logging these?
    }
}
/**
 * Load `namespaces`.
 *
 * @return {String} returns the previously persisted debug modes
 * @api private
 */ function load() {
    let r;
    try {
        r = exports.storage.getItem('debug');
    } catch (error) {
    // Swallow
    // XXX (@Qix-) should we be logging these?
    }
    // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
    if (!r && typeof process !== 'undefined' && 'env' in process) r = process.env.DEBUG;
    return r;
}
/**
 * Localstorage attempts to return the localstorage.
 *
 * This is necessary because safari throws
 * when a user disables cookies/localstorage
 * and you attempt to access it.
 *
 * @return {LocalStorage}
 * @api private
 */ function localstorage() {
    try {
        // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
        // The Browser also has localStorage in the global context.
        return localStorage;
    } catch (error) {
    // Swallow
    // XXX (@Qix-) should we be logging these?
    }
}

module.exports = (parcelRequire("i2veM"))(exports);
const { formatters } = module.exports;
/**
 * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
 */ formatters.j = function(v) {
    try {
        return JSON.stringify(v);
    } catch (error) {
        return '[UnexpectedJSONParseError]: ' + error.message;
    }
};

});
parcelRegister("i2veM", function(module, exports) {
/**
 * This is the common logic for both the Node.js and web browser
 * implementations of `debug()`.
 */ 
function $d220a4fd277f1fbd$var$setup(env) {
    createDebug.debug = createDebug;
    createDebug.default = createDebug;
    createDebug.coerce = coerce;
    createDebug.disable = disable;
    createDebug.enable = enable;
    createDebug.enabled = enabled;
    createDebug.humanize = (parcelRequire("dPdsS"));
    createDebug.destroy = destroy;
    Object.keys(env).forEach((key)=>{
        createDebug[key] = env[key];
    });
    /**
	* The currently active debug mode names, and names to skip.
	*/ createDebug.names = [];
    createDebug.skips = [];
    /**
	* Map of special "%n" handling functions, for the debug "format" argument.
	*
	* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
	*/ createDebug.formatters = {};
    /**
	* Selects a color for a debug namespace
	* @param {String} namespace The namespace string for the debug instance to be colored
	* @return {Number|String} An ANSI color code for the given namespace
	* @api private
	*/ function selectColor(namespace) {
        let hash = 0;
        for(let i = 0; i < namespace.length; i++){
            hash = (hash << 5) - hash + namespace.charCodeAt(i);
            hash |= 0; // Convert to 32bit integer
        }
        return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
    }
    createDebug.selectColor = selectColor;
    /**
	* Create a debugger with the given `namespace`.
	*
	* @param {String} namespace
	* @return {Function}
	* @api public
	*/ function createDebug(namespace) {
        let prevTime;
        let enableOverride = null;
        let namespacesCache;
        let enabledCache;
        function debug(...args) {
            // Disabled?
            if (!debug.enabled) return;
            const self = debug;
            // Set `diff` timestamp
            const curr = Number(new Date());
            const ms = curr - (prevTime || curr);
            self.diff = ms;
            self.prev = prevTime;
            self.curr = curr;
            prevTime = curr;
            args[0] = createDebug.coerce(args[0]);
            if (typeof args[0] !== 'string') // Anything else let's inspect with %O
            args.unshift('%O');
            // Apply any `formatters` transformations
            let index = 0;
            args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format)=>{
                // If we encounter an escaped % then don't increase the array index
                if (match === '%%') return '%';
                index++;
                const formatter = createDebug.formatters[format];
                if (typeof formatter === 'function') {
                    const val = args[index];
                    match = formatter.call(self, val);
                    // Now we need to remove `args[index]` since it's inlined in the `format`
                    args.splice(index, 1);
                    index--;
                }
                return match;
            });
            // Apply env-specific formatting (colors, etc.)
            createDebug.formatArgs.call(self, args);
            const logFn = self.log || createDebug.log;
            logFn.apply(self, args);
        }
        debug.namespace = namespace;
        debug.useColors = createDebug.useColors();
        debug.color = createDebug.selectColor(namespace);
        debug.extend = extend;
        debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
        Object.defineProperty(debug, 'enabled', {
            enumerable: true,
            configurable: false,
            get: ()=>{
                if (enableOverride !== null) return enableOverride;
                if (namespacesCache !== createDebug.namespaces) {
                    namespacesCache = createDebug.namespaces;
                    enabledCache = createDebug.enabled(namespace);
                }
                return enabledCache;
            },
            set: (v)=>{
                enableOverride = v;
            }
        });
        // Env-specific initialization logic for debug instances
        if (typeof createDebug.init === 'function') createDebug.init(debug);
        return debug;
    }
    function extend(namespace, delimiter) {
        const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
        newDebug.log = this.log;
        return newDebug;
    }
    /**
	* Enables a debug mode by namespaces. This can include modes
	* separated by a colon and wildcards.
	*
	* @param {String} namespaces
	* @api public
	*/ function enable(namespaces) {
        createDebug.save(namespaces);
        createDebug.namespaces = namespaces;
        createDebug.names = [];
        createDebug.skips = [];
        let i;
        const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
        const len = split.length;
        for(i = 0; i < len; i++){
            if (!split[i]) continue;
            namespaces = split[i].replace(/\*/g, '.*?');
            if (namespaces[0] === '-') createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
            else createDebug.names.push(new RegExp('^' + namespaces + '$'));
        }
    }
    /**
	* Disable debug output.
	*
	* @return {String} namespaces
	* @api public
	*/ function disable() {
        const namespaces = [
            ...createDebug.names.map(toNamespace),
            ...createDebug.skips.map(toNamespace).map((namespace)=>'-' + namespace)
        ].join(',');
        createDebug.enable('');
        return namespaces;
    }
    /**
	* Returns true if the given mode name is enabled, false otherwise.
	*
	* @param {String} name
	* @return {Boolean}
	* @api public
	*/ function enabled(name) {
        if (name[name.length - 1] === '*') return true;
        let i;
        let len;
        for(i = 0, len = createDebug.skips.length; i < len; i++){
            if (createDebug.skips[i].test(name)) return false;
        }
        for(i = 0, len = createDebug.names.length; i < len; i++){
            if (createDebug.names[i].test(name)) return true;
        }
        return false;
    }
    /**
	* Convert regexp to namespace
	*
	* @param {RegExp} regxep
	* @return {String} namespace
	* @api private
	*/ function toNamespace(regexp) {
        return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
    }
    /**
	* Coerce `val`.
	*
	* @param {Mixed} val
	* @return {Mixed}
	* @api private
	*/ function coerce(val) {
        if (val instanceof Error) return val.stack || val.message;
        return val;
    }
    /**
	* XXX DO NOT USE. This is a temporary stub function.
	* XXX It WILL be removed in the next major release.
	*/ function destroy() {
        console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
    }
    createDebug.enable(createDebug.load());
    return createDebug;
}
module.exports = $d220a4fd277f1fbd$var$setup;

});
parcelRegister("dPdsS", function(module, exports) {
/**
 * Helpers.
 */ var $a10a7b95f7788f07$var$s = 1000;
var $a10a7b95f7788f07$var$m = $a10a7b95f7788f07$var$s * 60;
var $a10a7b95f7788f07$var$h = $a10a7b95f7788f07$var$m * 60;
var $a10a7b95f7788f07$var$d = $a10a7b95f7788f07$var$h * 24;
var $a10a7b95f7788f07$var$w = $a10a7b95f7788f07$var$d * 7;
var $a10a7b95f7788f07$var$y = $a10a7b95f7788f07$var$d * 365.25;
/**
 * Parse or format the given `val`.
 *
 * Options:
 *
 *  - `long` verbose formatting [false]
 *
 * @param {String|Number} val
 * @param {Object} [options]
 * @throws {Error} throw an error if val is not a non-empty string or a number
 * @return {String|Number}
 * @api public
 */ module.exports = function(val, options) {
    options = options || {};
    var type = typeof val;
    if (type === 'string' && val.length > 0) return $a10a7b95f7788f07$var$parse(val);
    else if (type === 'number' && isFinite(val)) return options.long ? $a10a7b95f7788f07$var$fmtLong(val) : $a10a7b95f7788f07$var$fmtShort(val);
    throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
};
/**
 * Parse the given `str` and return milliseconds.
 *
 * @param {String} str
 * @return {Number}
 * @api private
 */ function $a10a7b95f7788f07$var$parse(str) {
    str = String(str);
    if (str.length > 100) return;
    var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
    if (!match) return;
    var n = parseFloat(match[1]);
    var type = (match[2] || 'ms').toLowerCase();
    switch(type){
        case 'years':
        case 'year':
        case 'yrs':
        case 'yr':
        case 'y':
            return n * $a10a7b95f7788f07$var$y;
        case 'weeks':
        case 'week':
        case 'w':
            return n * $a10a7b95f7788f07$var$w;
        case 'days':
        case 'day':
        case 'd':
            return n * $a10a7b95f7788f07$var$d;
        case 'hours':
        case 'hour':
        case 'hrs':
        case 'hr':
        case 'h':
            return n * $a10a7b95f7788f07$var$h;
        case 'minutes':
        case 'minute':
        case 'mins':
        case 'min':
        case 'm':
            return n * $a10a7b95f7788f07$var$m;
        case 'seconds':
        case 'second':
        case 'secs':
        case 'sec':
        case 's':
            return n * $a10a7b95f7788f07$var$s;
        case 'milliseconds':
        case 'millisecond':
        case 'msecs':
        case 'msec':
        case 'ms':
            return n;
        default:
            return undefined;
    }
}
/**
 * Short format for `ms`.
 *
 * @param {Number} ms
 * @return {String}
 * @api private
 */ function $a10a7b95f7788f07$var$fmtShort(ms) {
    var msAbs = Math.abs(ms);
    if (msAbs >= $a10a7b95f7788f07$var$d) return Math.round(ms / $a10a7b95f7788f07$var$d) + 'd';
    if (msAbs >= $a10a7b95f7788f07$var$h) return Math.round(ms / $a10a7b95f7788f07$var$h) + 'h';
    if (msAbs >= $a10a7b95f7788f07$var$m) return Math.round(ms / $a10a7b95f7788f07$var$m) + 'm';
    if (msAbs >= $a10a7b95f7788f07$var$s) return Math.round(ms / $a10a7b95f7788f07$var$s) + 's';
    return ms + 'ms';
}
/**
 * Long format for `ms`.
 *
 * @param {Number} ms
 * @return {String}
 * @api private
 */ function $a10a7b95f7788f07$var$fmtLong(ms) {
    var msAbs = Math.abs(ms);
    if (msAbs >= $a10a7b95f7788f07$var$d) return $a10a7b95f7788f07$var$plural(ms, msAbs, $a10a7b95f7788f07$var$d, 'day');
    if (msAbs >= $a10a7b95f7788f07$var$h) return $a10a7b95f7788f07$var$plural(ms, msAbs, $a10a7b95f7788f07$var$h, 'hour');
    if (msAbs >= $a10a7b95f7788f07$var$m) return $a10a7b95f7788f07$var$plural(ms, msAbs, $a10a7b95f7788f07$var$m, 'minute');
    if (msAbs >= $a10a7b95f7788f07$var$s) return $a10a7b95f7788f07$var$plural(ms, msAbs, $a10a7b95f7788f07$var$s, 'second');
    return ms + ' ms';
}
/**
 * Pluralization helper.
 */ function $a10a7b95f7788f07$var$plural(ms, msAbs, n, name) {
    var isPlural = msAbs >= n * 1.5;
    return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
}

});



parcelRegister("hslRo", function(module, exports) {
/**
 * Module dependencies.
 */ 

/**
 * This is the Node.js implementation of `debug()`.
 */ exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.destroy = $5HoLl$util.deprecate(()=>{}, 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
/**
 * Colors.
 */ exports.colors = [
    6,
    2,
    3,
    4,
    5,
    1
];

try {
    // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
    // eslint-disable-next-line import/no-extraneous-dependencies
    const supportsColor = (parcelRequire("8Knrb"));
    if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) exports.colors = [
        20,
        21,
        26,
        27,
        32,
        33,
        38,
        39,
        40,
        41,
        42,
        43,
        44,
        45,
        56,
        57,
        62,
        63,
        68,
        69,
        74,
        75,
        76,
        77,
        78,
        79,
        80,
        81,
        92,
        93,
        98,
        99,
        112,
        113,
        128,
        129,
        134,
        135,
        148,
        149,
        160,
        161,
        162,
        163,
        164,
        165,
        166,
        167,
        168,
        169,
        170,
        171,
        172,
        173,
        178,
        179,
        184,
        185,
        196,
        197,
        198,
        199,
        200,
        201,
        202,
        203,
        204,
        205,
        206,
        207,
        208,
        209,
        214,
        215,
        220,
        221
    ];
} catch (error) {
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
}
/**
 * Build up the default `inspectOpts` object from the environment variables.
 *
 *   $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
 */ exports.inspectOpts = Object.keys(process.env).filter((key)=>{
    return /^debug_/i.test(key);
}).reduce((obj, key)=>{
    // Camel-case
    const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k)=>{
        return k.toUpperCase();
    });
    // Coerce string value into JS value
    let val = process.env[key];
    if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
    else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
    else if (val === 'null') val = null;
    else val = Number(val);
    obj[prop] = val;
    return obj;
}, {});
/**
 * Is stdout a TTY? Colored output is enabled when `true`.
 */ function useColors() {
    return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : $5HoLl$tty.isatty(process.stderr.fd);
}
/**
 * Adds ANSI color escape codes if enabled.
 *
 * @api public
 */ function formatArgs(args) {
    const { namespace: name, useColors } = this;
    if (useColors) {
        const c = this.color;
        const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
        const prefix = `  ${colorCode};1m${name} \u001B[0m`;
        args[0] = prefix + args[0].split('\n').join('\n' + prefix);
        args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
    } else args[0] = getDate() + name + ' ' + args[0];
}
function getDate() {
    if (exports.inspectOpts.hideDate) return '';
    return new Date().toISOString() + ' ';
}
/**
 * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
 */ function log(...args) {
    return process.stderr.write($5HoLl$util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
}
/**
 * Save `namespaces`.
 *
 * @param {String} namespaces
 * @api private
 */ function save(namespaces) {
    if (namespaces) process.env.DEBUG = namespaces;
    else // If you set a process.env field to null or undefined, it gets cast to the
    // string 'null' or 'undefined'. Just delete instead.
    delete process.env.DEBUG;
}
/**
 * Load `namespaces`.
 *
 * @return {String} returns the previously persisted debug modes
 * @api private
 */ function load() {
    return process.env.DEBUG;
}
/**
 * Init logic for `debug` instances.
 *
 * Create a new `inspectOpts` object in case `useColors` is set
 * differently for a particular `debug` instance.
 */ function init(debug) {
    debug.inspectOpts = {};
    const keys = Object.keys(exports.inspectOpts);
    for(let i = 0; i < keys.length; i++)debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}

module.exports = (parcelRequire("i2veM"))(exports);
const { formatters } = module.exports;
/**
 * Map %o to `util.inspect()`, all on a single line.
 */ formatters.o = function(v) {
    this.inspectOpts.colors = this.useColors;
    return $5HoLl$util.inspect(v, this.inspectOpts).split('\n').map((str)=>str.trim()).join(' ');
};
/**
 * Map %O to `util.inspect()`, allowing multiple lines if needed.
 */ formatters.O = function(v) {
    this.inspectOpts.colors = this.useColors;
    return $5HoLl$util.inspect(v, this.inspectOpts);
};

});
parcelRegister("8Knrb", function(module, exports) {
'use strict';



var $g5GB1 = parcelRequire("g5GB1");
const { env: $65e4ccc9ee7040b9$var$env } = process;
let $65e4ccc9ee7040b9$var$forceColor;
if ($g5GB1('no-color') || $g5GB1('no-colors') || $g5GB1('color=false') || $g5GB1('color=never')) $65e4ccc9ee7040b9$var$forceColor = 0;
else if ($g5GB1('color') || $g5GB1('colors') || $g5GB1('color=true') || $g5GB1('color=always')) $65e4ccc9ee7040b9$var$forceColor = 1;
if ('FORCE_COLOR' in $65e4ccc9ee7040b9$var$env) {
    if ($65e4ccc9ee7040b9$var$env.FORCE_COLOR === 'true') $65e4ccc9ee7040b9$var$forceColor = 1;
    else if ($65e4ccc9ee7040b9$var$env.FORCE_COLOR === 'false') $65e4ccc9ee7040b9$var$forceColor = 0;
    else $65e4ccc9ee7040b9$var$forceColor = $65e4ccc9ee7040b9$var$env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt($65e4ccc9ee7040b9$var$env.FORCE_COLOR, 10), 3);
}
function $65e4ccc9ee7040b9$var$translateLevel(level) {
    if (level === 0) return false;
    return {
        level: level,
        hasBasic: true,
        has256: level >= 2,
        has16m: level >= 3
    };
}
function $65e4ccc9ee7040b9$var$supportsColor(haveStream, streamIsTTY) {
    if ($65e4ccc9ee7040b9$var$forceColor === 0) return 0;
    if ($g5GB1('color=16m') || $g5GB1('color=full') || $g5GB1('color=truecolor')) return 3;
    if ($g5GB1('color=256')) return 2;
    if (haveStream && !streamIsTTY && $65e4ccc9ee7040b9$var$forceColor === undefined) return 0;
    const min = $65e4ccc9ee7040b9$var$forceColor || 0;
    if ($65e4ccc9ee7040b9$var$env.TERM === 'dumb') return min;
    if (process.platform === 'win32') {
        // Windows 10 build 10586 is the first Windows release that supports 256 colors.
        // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
        const osRelease = $5HoLl$os.release().split('.');
        if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
        return 1;
    }
    if ('CI' in $65e4ccc9ee7040b9$var$env) {
        if ([
            'TRAVIS',
            'CIRCLECI',
            'APPVEYOR',
            'GITLAB_CI',
            'GITHUB_ACTIONS',
            'BUILDKITE'
        ].some((sign)=>sign in $65e4ccc9ee7040b9$var$env) || $65e4ccc9ee7040b9$var$env.CI_NAME === 'codeship') return 1;
        return min;
    }
    if ('TEAMCITY_VERSION' in $65e4ccc9ee7040b9$var$env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test($65e4ccc9ee7040b9$var$env.TEAMCITY_VERSION) ? 1 : 0;
    if ($65e4ccc9ee7040b9$var$env.COLORTERM === 'truecolor') return 3;
    if ('TERM_PROGRAM' in $65e4ccc9ee7040b9$var$env) {
        const version = parseInt(($65e4ccc9ee7040b9$var$env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
        switch($65e4ccc9ee7040b9$var$env.TERM_PROGRAM){
            case 'iTerm.app':
                return version >= 3 ? 3 : 2;
            case 'Apple_Terminal':
                return 2;
        }
    }
    if (/-256(color)?$/i.test($65e4ccc9ee7040b9$var$env.TERM)) return 2;
    if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test($65e4ccc9ee7040b9$var$env.TERM)) return 1;
    if ('COLORTERM' in $65e4ccc9ee7040b9$var$env) return 1;
    return min;
}
function $65e4ccc9ee7040b9$var$getSupportLevel(stream) {
    const level = $65e4ccc9ee7040b9$var$supportsColor(stream, stream && stream.isTTY);
    return $65e4ccc9ee7040b9$var$translateLevel(level);
}
module.exports = {
    supportsColor: $65e4ccc9ee7040b9$var$getSupportLevel,
    stdout: $65e4ccc9ee7040b9$var$translateLevel($65e4ccc9ee7040b9$var$supportsColor(true, $5HoLl$tty.isatty(1))),
    stderr: $65e4ccc9ee7040b9$var$translateLevel($65e4ccc9ee7040b9$var$supportsColor(true, $5HoLl$tty.isatty(2)))
};

});
parcelRegister("g5GB1", function(module, exports) {
'use strict';
module.exports = (flag, argv = process.argv)=>{
    const prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
    const position = argv.indexOf(prefix + flag);
    const terminatorPosition = argv.indexOf('--');
    return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
};

});







parcelRegister("aeP9z", function(module, exports) {



var $fBhCl = parcelRequire("fBhCl");
/*!
 * Array of passes.
 *
 * A `pass` is just a function that is executed on `req, socket, options`
 * so that you can easily add new checks while still keeping the base
 * flexible.
 */ /*
 * Websockets Passes
 *
 */ module.exports = {
    /**
   * WebSocket requests must have the `GET` method and
   * the `upgrade:websocket` header
   *
   * @param {ClientRequest} Req Request object
   * @param {Socket} Websocket
   *
   * @api private
   */ checkMethodAndHeader: function checkMethodAndHeader(req, socket) {
        if (req.method !== 'GET' || !req.headers.upgrade) {
            socket.destroy();
            return true;
        }
        if (req.headers.upgrade.toLowerCase() !== 'websocket') {
            socket.destroy();
            return true;
        }
    },
    /**
   * Sets `x-forwarded-*` headers if specified in config.
   *
   * @param {ClientRequest} Req Request object
   * @param {Socket} Websocket
   * @param {Object} Options Config object passed to the proxy
   *
   * @api private
   */ XHeaders: function XHeaders(req, socket, options) {
        if (!options.xfwd) return;
        var values = {
            for: req.connection.remoteAddress || req.socket.remoteAddress,
            port: $fBhCl.getPort(req),
            proto: $fBhCl.hasEncryptedConnection(req) ? 'wss' : 'ws'
        };
        [
            'for',
            'port',
            'proto'
        ].forEach(function(header) {
            req.headers['x-forwarded-' + header] = (req.headers['x-forwarded-' + header] || '') + (req.headers['x-forwarded-' + header] ? ',' : '') + values[header];
        });
    },
    /**
   * Does the actual proxying. Make the request and upgrade it
   * send the Switching Protocols request and pipe the sockets.
   *
   * @param {ClientRequest} Req Request object
   * @param {Socket} Websocket
   * @param {Object} Options Config object passed to the proxy
   *
   * @api private
   */ stream: function stream(req, socket, options, head, server, clb) {
        var createHttpHeader = function(line, headers) {
            return Object.keys(headers).reduce(function(head, key) {
                var value = headers[key];
                if (!Array.isArray(value)) {
                    head.push(key + ': ' + value);
                    return head;
                }
                for(var i = 0; i < value.length; i++)head.push(key + ': ' + value[i]);
                return head;
            }, [
                line
            ]).join('\r\n') + '\r\n\r\n';
        };
        $fBhCl.setupSocket(socket);
        if (head && head.length) socket.unshift(head);
        var proxyReq = ($fBhCl.isSSL.test(options.target.protocol) ? $5HoLl$https : $5HoLl$http).request($fBhCl.setupOutgoing(options.ssl || {}, options, req));
        // Enable developers to modify the proxyReq before headers are sent
        if (server) server.emit('proxyReqWs', proxyReq, req, socket, options, head);
        // Error Handler
        proxyReq.on('error', onOutgoingError);
        proxyReq.on('response', function(res) {
            // if upgrade event isn't going to happen, close the socket
            if (!res.upgrade) {
                socket.write(createHttpHeader('HTTP/' + res.httpVersion + ' ' + res.statusCode + ' ' + res.statusMessage, res.headers));
                res.pipe(socket);
            }
        });
        proxyReq.on('upgrade', function(proxyRes, proxySocket, proxyHead) {
            proxySocket.on('error', onOutgoingError);
            // Allow us to listen when the websocket has completed
            proxySocket.on('end', function() {
                server.emit('close', proxyRes, proxySocket, proxyHead);
            });
            // The pipe below will end proxySocket if socket closes cleanly, but not
            // if it errors (eg, vanishes from the net and starts returning
            // EHOSTUNREACH). We need to do that explicitly.
            socket.on('error', function() {
                proxySocket.end();
            });
            $fBhCl.setupSocket(proxySocket);
            if (proxyHead && proxyHead.length) proxySocket.unshift(proxyHead);
            //
            // Remark: Handle writing the headers to the socket when switching protocols
            // Also handles when a header is an array
            //
            socket.write(createHttpHeader('HTTP/1.1 101 Switching Protocols', proxyRes.headers));
            proxySocket.pipe(socket).pipe(proxySocket);
            server.emit('open', proxySocket);
            server.emit('proxySocket', proxySocket); //DEPRECATED.
        });
        return proxyReq.end(); // XXX: CHECK IF THIS IS THIS CORRECT
        function onOutgoingError(err) {
            if (clb) clb(err, req, socket);
            else server.emit('error', err, req, socket);
            socket.end();
        }
    }
};

});



parcelRegister("k4tru", function(module, exports) {
'use strict';


var $40xol = parcelRequire("40xol");

var $4wLfu = parcelRequire("4wLfu");

var $9eMkZ = parcelRequire("9eMkZ");

var $edwai = parcelRequire("edwai");
const $e9cb05005973724f$var$isObject = (val)=>val && typeof val === 'object' && !Array.isArray(val);
/**
 * Creates a matcher function from one or more glob patterns. The
 * returned function takes a string to match as its first argument,
 * and returns true if the string is a match. The returned matcher
 * function also takes a boolean as the second argument that, when true,
 * returns an object with additional information.
 *
 * ```js
 * const picomatch = require('picomatch');
 * // picomatch(glob[, options]);
 *
 * const isMatch = picomatch('*.!(*a)');
 * console.log(isMatch('a.a')); //=> false
 * console.log(isMatch('a.b')); //=> true
 * ```
 * @name picomatch
 * @param {String|Array} `globs` One or more glob patterns.
 * @param {Object=} `options`
 * @return {Function=} Returns a matcher function.
 * @api public
 */ const $e9cb05005973724f$var$picomatch = (glob, options, returnState = false)=>{
    if (Array.isArray(glob)) {
        const fns = glob.map((input)=>$e9cb05005973724f$var$picomatch(input, options, returnState));
        const arrayMatcher = (str)=>{
            for (const isMatch of fns){
                const state = isMatch(str);
                if (state) return state;
            }
            return false;
        };
        return arrayMatcher;
    }
    const isState = $e9cb05005973724f$var$isObject(glob) && glob.tokens && glob.input;
    if (glob === '' || typeof glob !== 'string' && !isState) throw new TypeError('Expected pattern to be a non-empty string');
    const opts = options || {};
    const posix = $9eMkZ.isWindows(options);
    const regex = isState ? $e9cb05005973724f$var$picomatch.compileRe(glob, options) : $e9cb05005973724f$var$picomatch.makeRe(glob, options, false, true);
    const state = regex.state;
    delete regex.state;
    let isIgnored = ()=>false;
    if (opts.ignore) {
        const ignoreOpts = {
            ...options,
            ignore: null,
            onMatch: null,
            onResult: null
        };
        isIgnored = $e9cb05005973724f$var$picomatch(opts.ignore, ignoreOpts, returnState);
    }
    const matcher = (input, returnObject = false)=>{
        const { isMatch: isMatch, match: match, output: output } = $e9cb05005973724f$var$picomatch.test(input, regex, options, {
            glob: glob,
            posix: posix
        });
        const result = {
            glob: glob,
            state: state,
            regex: regex,
            posix: posix,
            input: input,
            output: output,
            match: match,
            isMatch: isMatch
        };
        if (typeof opts.onResult === 'function') opts.onResult(result);
        if (isMatch === false) {
            result.isMatch = false;
            return returnObject ? result : false;
        }
        if (isIgnored(input)) {
            if (typeof opts.onIgnore === 'function') opts.onIgnore(result);
            result.isMatch = false;
            return returnObject ? result : false;
        }
        if (typeof opts.onMatch === 'function') opts.onMatch(result);
        return returnObject ? result : true;
    };
    if (returnState) matcher.state = state;
    return matcher;
};
/**
 * Test `input` with the given `regex`. This is used by the main
 * `picomatch()` function to test the input string.
 *
 * ```js
 * const picomatch = require('picomatch');
 * // picomatch.test(input, regex[, options]);
 *
 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
 * ```
 * @param {String} `input` String to test.
 * @param {RegExp} `regex`
 * @return {Object} Returns an object with matching info.
 * @api public
 */ $e9cb05005973724f$var$picomatch.test = (input, regex, options, { glob: glob, posix: posix } = {})=>{
    if (typeof input !== 'string') throw new TypeError('Expected input to be a string');
    if (input === '') return {
        isMatch: false,
        output: ''
    };
    const opts = options || {};
    const format = opts.format || (posix ? $9eMkZ.toPosixSlashes : null);
    let match = input === glob;
    let output = match && format ? format(input) : input;
    if (match === false) {
        output = format ? format(input) : input;
        match = output === glob;
    }
    if (match === false || opts.capture === true) {
        if (opts.matchBase === true || opts.basename === true) match = $e9cb05005973724f$var$picomatch.matchBase(input, regex, options, posix);
        else match = regex.exec(output);
    }
    return {
        isMatch: Boolean(match),
        match: match,
        output: output
    };
};
/**
 * Match the basename of a filepath.
 *
 * ```js
 * const picomatch = require('picomatch');
 * // picomatch.matchBase(input, glob[, options]);
 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
 * ```
 * @param {String} `input` String to test.
 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
 * @return {Boolean}
 * @api public
 */ $e9cb05005973724f$var$picomatch.matchBase = (input, glob, options, posix = $9eMkZ.isWindows(options))=>{
    const regex = glob instanceof RegExp ? glob : $e9cb05005973724f$var$picomatch.makeRe(glob, options);
    return regex.test($5HoLl$path.basename(input));
};
/**
 * Returns true if **any** of the given glob `patterns` match the specified `string`.
 *
 * ```js
 * const picomatch = require('picomatch');
 * // picomatch.isMatch(string, patterns[, options]);
 *
 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
 * ```
 * @param {String|Array} str The string to test.
 * @param {String|Array} patterns One or more glob patterns to use for matching.
 * @param {Object} [options] See available [options](#options).
 * @return {Boolean} Returns true if any patterns match `str`
 * @api public
 */ $e9cb05005973724f$var$picomatch.isMatch = (str, patterns, options)=>$e9cb05005973724f$var$picomatch(patterns, options)(str);
/**
 * Parse a glob pattern to create the source string for a regular
 * expression.
 *
 * ```js
 * const picomatch = require('picomatch');
 * const result = picomatch.parse(pattern[, options]);
 * ```
 * @param {String} `pattern`
 * @param {Object} `options`
 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
 * @api public
 */ $e9cb05005973724f$var$picomatch.parse = (pattern, options)=>{
    if (Array.isArray(pattern)) return pattern.map((p)=>$e9cb05005973724f$var$picomatch.parse(p, options));
    return $4wLfu(pattern, {
        ...options,
        fastpaths: false
    });
};
/**
 * Scan a glob pattern to separate the pattern into segments.
 *
 * ```js
 * const picomatch = require('picomatch');
 * // picomatch.scan(input[, options]);
 *
 * const result = picomatch.scan('!./foo/*.js');
 * console.log(result);
 * { prefix: '!./',
 *   input: '!./foo/*.js',
 *   start: 3,
 *   base: 'foo',
 *   glob: '*.js',
 *   isBrace: false,
 *   isBracket: false,
 *   isGlob: true,
 *   isExtglob: false,
 *   isGlobstar: false,
 *   negated: true }
 * ```
 * @param {String} `input` Glob pattern to scan.
 * @param {Object} `options`
 * @return {Object} Returns an object with
 * @api public
 */ $e9cb05005973724f$var$picomatch.scan = (input, options)=>$40xol(input, options);
/**
 * Compile a regular expression from the `state` object returned by the
 * [parse()](#parse) method.
 *
 * @param {Object} `state`
 * @param {Object} `options`
 * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
 * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
 * @return {RegExp}
 * @api public
 */ $e9cb05005973724f$var$picomatch.compileRe = (state, options, returnOutput = false, returnState = false)=>{
    if (returnOutput === true) return state.output;
    const opts = options || {};
    const prepend = opts.contains ? '' : '^';
    const append = opts.contains ? '' : '$';
    let source = `${prepend}(?:${state.output})${append}`;
    if (state && state.negated === true) source = `^(?!${source}).*$`;
    const regex = $e9cb05005973724f$var$picomatch.toRegex(source, options);
    if (returnState === true) regex.state = state;
    return regex;
};
/**
 * Create a regular expression from a parsed glob pattern.
 *
 * ```js
 * const picomatch = require('picomatch');
 * const state = picomatch.parse('*.js');
 * // picomatch.compileRe(state[, options]);
 *
 * console.log(picomatch.compileRe(state));
 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
 * ```
 * @param {String} `state` The object returned from the `.parse` method.
 * @param {Object} `options`
 * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
 * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
 * @return {RegExp} Returns a regex created from the given pattern.
 * @api public
 */ $e9cb05005973724f$var$picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false)=>{
    if (!input || typeof input !== 'string') throw new TypeError('Expected a non-empty string');
    let parsed = {
        negated: false,
        fastpaths: true
    };
    if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) parsed.output = $4wLfu.fastpaths(input, options);
    if (!parsed.output) parsed = $4wLfu(input, options);
    return $e9cb05005973724f$var$picomatch.compileRe(parsed, options, returnOutput, returnState);
};
/**
 * Create a regular expression from the given regex source string.
 *
 * ```js
 * const picomatch = require('picomatch');
 * // picomatch.toRegex(source[, options]);
 *
 * const { output } = picomatch.parse('*.js');
 * console.log(picomatch.toRegex(output));
 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
 * ```
 * @param {String} `source` Regular expression source string.
 * @param {Object} `options`
 * @return {RegExp}
 * @api public
 */ $e9cb05005973724f$var$picomatch.toRegex = (source, options)=>{
    try {
        const opts = options || {};
        return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
    } catch (err) {
        if (options && options.debug === true) throw err;
        return /$^/;
    }
};
/**
 * Picomatch constants.
 * @return {Object}
 */ $e9cb05005973724f$var$picomatch.constants = $edwai;
/**
 * Expose "picomatch"
 */ module.exports = $e9cb05005973724f$var$picomatch;

});
parcelRegister("40xol", function(module, exports) {
'use strict';

var $9eMkZ = parcelRequire("9eMkZ");

var $edwai = parcelRequire("edwai");
var $2eb1106ab1701d31$require$CHAR_ASTERISK = $edwai.CHAR_ASTERISK;
var $2eb1106ab1701d31$require$CHAR_AT = $edwai.CHAR_AT;
var $2eb1106ab1701d31$require$CHAR_BACKWARD_SLASH = $edwai.CHAR_BACKWARD_SLASH;
var $2eb1106ab1701d31$require$CHAR_COMMA = $edwai.CHAR_COMMA;
var $2eb1106ab1701d31$require$CHAR_DOT = $edwai.CHAR_DOT;
var $2eb1106ab1701d31$require$CHAR_EXCLAMATION_MARK = $edwai.CHAR_EXCLAMATION_MARK;
var $2eb1106ab1701d31$require$CHAR_FORWARD_SLASH = $edwai.CHAR_FORWARD_SLASH;
var $2eb1106ab1701d31$require$CHAR_LEFT_CURLY_BRACE = $edwai.CHAR_LEFT_CURLY_BRACE;
var $2eb1106ab1701d31$require$CHAR_LEFT_PARENTHESES = $edwai.CHAR_LEFT_PARENTHESES;
var $2eb1106ab1701d31$require$CHAR_LEFT_SQUARE_BRACKET = $edwai.CHAR_LEFT_SQUARE_BRACKET;
var $2eb1106ab1701d31$require$CHAR_PLUS = $edwai.CHAR_PLUS;
var $2eb1106ab1701d31$require$CHAR_QUESTION_MARK = $edwai.CHAR_QUESTION_MARK;
var $2eb1106ab1701d31$require$CHAR_RIGHT_CURLY_BRACE = $edwai.CHAR_RIGHT_CURLY_BRACE;
var $2eb1106ab1701d31$require$CHAR_RIGHT_PARENTHESES = $edwai.CHAR_RIGHT_PARENTHESES;
var $2eb1106ab1701d31$require$CHAR_RIGHT_SQUARE_BRACKET = $edwai.CHAR_RIGHT_SQUARE_BRACKET;
const $2eb1106ab1701d31$var$isPathSeparator = (code)=>{
    return code === $2eb1106ab1701d31$require$CHAR_FORWARD_SLASH || code === $2eb1106ab1701d31$require$CHAR_BACKWARD_SLASH;
};
const $2eb1106ab1701d31$var$depth = (token)=>{
    if (token.isPrefix !== true) token.depth = token.isGlobstar ? Infinity : 1;
};
/**
 * Quickly scans a glob pattern and returns an object with a handful of
 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
 * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
 * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
 *
 * ```js
 * const pm = require('picomatch');
 * console.log(pm.scan('foo/bar/*.js'));
 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
 * ```
 * @param {String} `str`
 * @param {Object} `options`
 * @return {Object} Returns an object with tokens and regex source string.
 * @api public
 */ const $2eb1106ab1701d31$var$scan = (input, options)=>{
    const opts = options || {};
    const length = input.length - 1;
    const scanToEnd = opts.parts === true || opts.scanToEnd === true;
    const slashes = [];
    const tokens = [];
    const parts = [];
    let str = input;
    let index = -1;
    let start = 0;
    let lastIndex = 0;
    let isBrace = false;
    let isBracket = false;
    let isGlob = false;
    let isExtglob = false;
    let isGlobstar = false;
    let braceEscaped = false;
    let backslashes = false;
    let negated = false;
    let negatedExtglob = false;
    let finished = false;
    let braces = 0;
    let prev;
    let code;
    let token = {
        value: '',
        depth: 0,
        isGlob: false
    };
    const eos = ()=>index >= length;
    const peek = ()=>str.charCodeAt(index + 1);
    const advance = ()=>{
        prev = code;
        return str.charCodeAt(++index);
    };
    while(index < length){
        code = advance();
        let next;
        if (code === $2eb1106ab1701d31$require$CHAR_BACKWARD_SLASH) {
            backslashes = token.backslashes = true;
            code = advance();
            if (code === $2eb1106ab1701d31$require$CHAR_LEFT_CURLY_BRACE) braceEscaped = true;
            continue;
        }
        if (braceEscaped === true || code === $2eb1106ab1701d31$require$CHAR_LEFT_CURLY_BRACE) {
            braces++;
            while(eos() !== true && (code = advance())){
                if (code === $2eb1106ab1701d31$require$CHAR_BACKWARD_SLASH) {
                    backslashes = token.backslashes = true;
                    advance();
                    continue;
                }
                if (code === $2eb1106ab1701d31$require$CHAR_LEFT_CURLY_BRACE) {
                    braces++;
                    continue;
                }
                if (braceEscaped !== true && code === $2eb1106ab1701d31$require$CHAR_DOT && (code = advance()) === $2eb1106ab1701d31$require$CHAR_DOT) {
                    isBrace = token.isBrace = true;
                    isGlob = token.isGlob = true;
                    finished = true;
                    if (scanToEnd === true) continue;
                    break;
                }
                if (braceEscaped !== true && code === $2eb1106ab1701d31$require$CHAR_COMMA) {
                    isBrace = token.isBrace = true;
                    isGlob = token.isGlob = true;
                    finished = true;
                    if (scanToEnd === true) continue;
                    break;
                }
                if (code === $2eb1106ab1701d31$require$CHAR_RIGHT_CURLY_BRACE) {
                    braces--;
                    if (braces === 0) {
                        braceEscaped = false;
                        isBrace = token.isBrace = true;
                        finished = true;
                        break;
                    }
                }
            }
            if (scanToEnd === true) continue;
            break;
        }
        if (code === $2eb1106ab1701d31$require$CHAR_FORWARD_SLASH) {
            slashes.push(index);
            tokens.push(token);
            token = {
                value: '',
                depth: 0,
                isGlob: false
            };
            if (finished === true) continue;
            if (prev === $2eb1106ab1701d31$require$CHAR_DOT && index === start + 1) {
                start += 2;
                continue;
            }
            lastIndex = index + 1;
            continue;
        }
        if (opts.noext !== true) {
            const isExtglobChar = code === $2eb1106ab1701d31$require$CHAR_PLUS || code === $2eb1106ab1701d31$require$CHAR_AT || code === $2eb1106ab1701d31$require$CHAR_ASTERISK || code === $2eb1106ab1701d31$require$CHAR_QUESTION_MARK || code === $2eb1106ab1701d31$require$CHAR_EXCLAMATION_MARK;
            if (isExtglobChar === true && peek() === $2eb1106ab1701d31$require$CHAR_LEFT_PARENTHESES) {
                isGlob = token.isGlob = true;
                isExtglob = token.isExtglob = true;
                finished = true;
                if (code === $2eb1106ab1701d31$require$CHAR_EXCLAMATION_MARK && index === start) negatedExtglob = true;
                if (scanToEnd === true) {
                    while(eos() !== true && (code = advance())){
                        if (code === $2eb1106ab1701d31$require$CHAR_BACKWARD_SLASH) {
                            backslashes = token.backslashes = true;
                            code = advance();
                            continue;
                        }
                        if (code === $2eb1106ab1701d31$require$CHAR_RIGHT_PARENTHESES) {
                            isGlob = token.isGlob = true;
                            finished = true;
                            break;
                        }
                    }
                    continue;
                }
                break;
            }
        }
        if (code === $2eb1106ab1701d31$require$CHAR_ASTERISK) {
            if (prev === $2eb1106ab1701d31$require$CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
            isGlob = token.isGlob = true;
            finished = true;
            if (scanToEnd === true) continue;
            break;
        }
        if (code === $2eb1106ab1701d31$require$CHAR_QUESTION_MARK) {
            isGlob = token.isGlob = true;
            finished = true;
            if (scanToEnd === true) continue;
            break;
        }
        if (code === $2eb1106ab1701d31$require$CHAR_LEFT_SQUARE_BRACKET) {
            while(eos() !== true && (next = advance())){
                if (next === $2eb1106ab1701d31$require$CHAR_BACKWARD_SLASH) {
                    backslashes = token.backslashes = true;
                    advance();
                    continue;
                }
                if (next === $2eb1106ab1701d31$require$CHAR_RIGHT_SQUARE_BRACKET) {
                    isBracket = token.isBracket = true;
                    isGlob = token.isGlob = true;
                    finished = true;
                    break;
                }
            }
            if (scanToEnd === true) continue;
            break;
        }
        if (opts.nonegate !== true && code === $2eb1106ab1701d31$require$CHAR_EXCLAMATION_MARK && index === start) {
            negated = token.negated = true;
            start++;
            continue;
        }
        if (opts.noparen !== true && code === $2eb1106ab1701d31$require$CHAR_LEFT_PARENTHESES) {
            isGlob = token.isGlob = true;
            if (scanToEnd === true) {
                while(eos() !== true && (code = advance())){
                    if (code === $2eb1106ab1701d31$require$CHAR_LEFT_PARENTHESES) {
                        backslashes = token.backslashes = true;
                        code = advance();
                        continue;
                    }
                    if (code === $2eb1106ab1701d31$require$CHAR_RIGHT_PARENTHESES) {
                        finished = true;
                        break;
                    }
                }
                continue;
            }
            break;
        }
        if (isGlob === true) {
            finished = true;
            if (scanToEnd === true) continue;
            break;
        }
    }
    if (opts.noext === true) {
        isExtglob = false;
        isGlob = false;
    }
    let base = str;
    let prefix = '';
    let glob = '';
    if (start > 0) {
        prefix = str.slice(0, start);
        str = str.slice(start);
        lastIndex -= start;
    }
    if (base && isGlob === true && lastIndex > 0) {
        base = str.slice(0, lastIndex);
        glob = str.slice(lastIndex);
    } else if (isGlob === true) {
        base = '';
        glob = str;
    } else base = str;
    if (base && base !== '' && base !== '/' && base !== str) {
        if ($2eb1106ab1701d31$var$isPathSeparator(base.charCodeAt(base.length - 1))) base = base.slice(0, -1);
    }
    if (opts.unescape === true) {
        if (glob) glob = $9eMkZ.removeBackslashes(glob);
        if (base && backslashes === true) base = $9eMkZ.removeBackslashes(base);
    }
    const state = {
        prefix: prefix,
        input: input,
        start: start,
        base: base,
        glob: glob,
        isBrace: isBrace,
        isBracket: isBracket,
        isGlob: isGlob,
        isExtglob: isExtglob,
        isGlobstar: isGlobstar,
        negated: negated,
        negatedExtglob: negatedExtglob
    };
    if (opts.tokens === true) {
        state.maxDepth = 0;
        if (!$2eb1106ab1701d31$var$isPathSeparator(code)) tokens.push(token);
        state.tokens = tokens;
    }
    if (opts.parts === true || opts.tokens === true) {
        let prevIndex;
        for(let idx = 0; idx < slashes.length; idx++){
            const n = prevIndex ? prevIndex + 1 : start;
            const i = slashes[idx];
            const value = input.slice(n, i);
            if (opts.tokens) {
                if (idx === 0 && start !== 0) {
                    tokens[idx].isPrefix = true;
                    tokens[idx].value = prefix;
                } else tokens[idx].value = value;
                $2eb1106ab1701d31$var$depth(tokens[idx]);
                state.maxDepth += tokens[idx].depth;
            }
            if (idx !== 0 || value !== '') parts.push(value);
            prevIndex = i;
        }
        if (prevIndex && prevIndex + 1 < input.length) {
            const value = input.slice(prevIndex + 1);
            parts.push(value);
            if (opts.tokens) {
                tokens[tokens.length - 1].value = value;
                $2eb1106ab1701d31$var$depth(tokens[tokens.length - 1]);
                state.maxDepth += tokens[tokens.length - 1].depth;
            }
        }
        state.slashes = slashes;
        state.parts = parts;
    }
    return state;
};
module.exports = $2eb1106ab1701d31$var$scan;

});
parcelRegister("9eMkZ", function(module, exports) {

$parcel$export(module.exports, "isObject", () => $6b9aeaabb0df3549$export$a6cdc56e425d0d0a, (v) => $6b9aeaabb0df3549$export$a6cdc56e425d0d0a = v);
$parcel$export(module.exports, "hasRegexChars", () => $6b9aeaabb0df3549$export$6540a013a39bb50d, (v) => $6b9aeaabb0df3549$export$6540a013a39bb50d = v);
$parcel$export(module.exports, "escapeRegex", () => $6b9aeaabb0df3549$export$104ed90cc1a13451, (v) => $6b9aeaabb0df3549$export$104ed90cc1a13451 = v);
$parcel$export(module.exports, "toPosixSlashes", () => $6b9aeaabb0df3549$export$e610e037975797ee, (v) => $6b9aeaabb0df3549$export$e610e037975797ee = v);
$parcel$export(module.exports, "removeBackslashes", () => $6b9aeaabb0df3549$export$f403de0a7ba7a743, (v) => $6b9aeaabb0df3549$export$f403de0a7ba7a743 = v);
$parcel$export(module.exports, "supportsLookbehinds", () => $6b9aeaabb0df3549$export$bcf709e5e3483cdb, (v) => $6b9aeaabb0df3549$export$bcf709e5e3483cdb = v);
$parcel$export(module.exports, "isWindows", () => $6b9aeaabb0df3549$export$f993c945890e93ba, (v) => $6b9aeaabb0df3549$export$f993c945890e93ba = v);
$parcel$export(module.exports, "escapeLast", () => $6b9aeaabb0df3549$export$13d0f4185f159c8, (v) => $6b9aeaabb0df3549$export$13d0f4185f159c8 = v);
$parcel$export(module.exports, "removePrefix", () => $6b9aeaabb0df3549$export$f2888183a34644d4, (v) => $6b9aeaabb0df3549$export$f2888183a34644d4 = v);
$parcel$export(module.exports, "wrapOutput", () => $6b9aeaabb0df3549$export$25bddda26836484b, (v) => $6b9aeaabb0df3549$export$25bddda26836484b = v);
var $6b9aeaabb0df3549$export$a6cdc56e425d0d0a;
var $6b9aeaabb0df3549$export$6540a013a39bb50d;
var $6b9aeaabb0df3549$export$a92319f7ab133839;
var $6b9aeaabb0df3549$export$104ed90cc1a13451;
var $6b9aeaabb0df3549$export$e610e037975797ee;
var $6b9aeaabb0df3549$export$f403de0a7ba7a743;
var $6b9aeaabb0df3549$export$bcf709e5e3483cdb;
var $6b9aeaabb0df3549$export$f993c945890e93ba;
var $6b9aeaabb0df3549$export$13d0f4185f159c8;
var $6b9aeaabb0df3549$export$f2888183a34644d4;
var $6b9aeaabb0df3549$export$25bddda26836484b;
'use strict';

const $6b9aeaabb0df3549$var$win32 = process.platform === 'win32';

var $edwai = parcelRequire("edwai");
var $6b9aeaabb0df3549$require$REGEX_BACKSLASH = $edwai.REGEX_BACKSLASH;
var $6b9aeaabb0df3549$require$REGEX_REMOVE_BACKSLASH = $edwai.REGEX_REMOVE_BACKSLASH;
var $6b9aeaabb0df3549$require$REGEX_SPECIAL_CHARS = $edwai.REGEX_SPECIAL_CHARS;
var $6b9aeaabb0df3549$require$REGEX_SPECIAL_CHARS_GLOBAL = $edwai.REGEX_SPECIAL_CHARS_GLOBAL;
$6b9aeaabb0df3549$export$a6cdc56e425d0d0a = (val)=>val !== null && typeof val === 'object' && !Array.isArray(val);
$6b9aeaabb0df3549$export$6540a013a39bb50d = (str)=>$6b9aeaabb0df3549$require$REGEX_SPECIAL_CHARS.test(str);
$6b9aeaabb0df3549$export$a92319f7ab133839 = (str)=>str.length === 1 && $6b9aeaabb0df3549$export$6540a013a39bb50d(str);
$6b9aeaabb0df3549$export$104ed90cc1a13451 = (str)=>str.replace($6b9aeaabb0df3549$require$REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
$6b9aeaabb0df3549$export$e610e037975797ee = (str)=>str.replace($6b9aeaabb0df3549$require$REGEX_BACKSLASH, '/');
$6b9aeaabb0df3549$export$f403de0a7ba7a743 = (str)=>{
    return str.replace($6b9aeaabb0df3549$require$REGEX_REMOVE_BACKSLASH, (match)=>{
        return match === '\\' ? '' : match;
    });
};
$6b9aeaabb0df3549$export$bcf709e5e3483cdb = ()=>{
    const segs = process.version.slice(1).split('.').map(Number);
    if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) return true;
    return false;
};
$6b9aeaabb0df3549$export$f993c945890e93ba = (options)=>{
    if (options && typeof options.windows === 'boolean') return options.windows;
    return $6b9aeaabb0df3549$var$win32 === true || $5HoLl$path.sep === '\\';
};
$6b9aeaabb0df3549$export$13d0f4185f159c8 = (input, char, lastIdx)=>{
    const idx = input.lastIndexOf(char, lastIdx);
    if (idx === -1) return input;
    if (input[idx - 1] === '\\') return $6b9aeaabb0df3549$export$13d0f4185f159c8(input, char, idx - 1);
    return `${input.slice(0, idx)}\\${input.slice(idx)}`;
};
$6b9aeaabb0df3549$export$f2888183a34644d4 = (input, state = {})=>{
    let output = input;
    if (output.startsWith('./')) {
        output = output.slice(2);
        state.prefix = './';
    }
    return output;
};
$6b9aeaabb0df3549$export$25bddda26836484b = (input, state = {}, options = {})=>{
    const prepend = options.contains ? '' : '^';
    const append = options.contains ? '' : '$';
    let output = `${prepend}(?:${input})${append}`;
    if (state.negated === true) output = `(?:^(?!${output}).*$)`;
    return output;
};

});
parcelRegister("edwai", function(module, exports) {
'use strict';

const $a59b3ae5146eeec4$var$WIN_SLASH = '\\\\/';
const $a59b3ae5146eeec4$var$WIN_NO_SLASH = `[^${$a59b3ae5146eeec4$var$WIN_SLASH}]`;
/**
 * Posix glob regex
 */ const $a59b3ae5146eeec4$var$DOT_LITERAL = '\\.';
const $a59b3ae5146eeec4$var$PLUS_LITERAL = '\\+';
const $a59b3ae5146eeec4$var$QMARK_LITERAL = '\\?';
const $a59b3ae5146eeec4$var$SLASH_LITERAL = '\\/';
const $a59b3ae5146eeec4$var$ONE_CHAR = '(?=.)';
const $a59b3ae5146eeec4$var$QMARK = '[^/]';
const $a59b3ae5146eeec4$var$END_ANCHOR = `(?:${$a59b3ae5146eeec4$var$SLASH_LITERAL}|$)`;
const $a59b3ae5146eeec4$var$START_ANCHOR = `(?:^|${$a59b3ae5146eeec4$var$SLASH_LITERAL})`;
const $a59b3ae5146eeec4$var$DOTS_SLASH = `${$a59b3ae5146eeec4$var$DOT_LITERAL}{1,2}${$a59b3ae5146eeec4$var$END_ANCHOR}`;
const $a59b3ae5146eeec4$var$NO_DOT = `(?!${$a59b3ae5146eeec4$var$DOT_LITERAL})`;
const $a59b3ae5146eeec4$var$NO_DOTS = `(?!${$a59b3ae5146eeec4$var$START_ANCHOR}${$a59b3ae5146eeec4$var$DOTS_SLASH})`;
const $a59b3ae5146eeec4$var$NO_DOT_SLASH = `(?!${$a59b3ae5146eeec4$var$DOT_LITERAL}{0,1}${$a59b3ae5146eeec4$var$END_ANCHOR})`;
const $a59b3ae5146eeec4$var$NO_DOTS_SLASH = `(?!${$a59b3ae5146eeec4$var$DOTS_SLASH})`;
const $a59b3ae5146eeec4$var$QMARK_NO_DOT = `[^.${$a59b3ae5146eeec4$var$SLASH_LITERAL}]`;
const $a59b3ae5146eeec4$var$STAR = `${$a59b3ae5146eeec4$var$QMARK}*?`;
const $a59b3ae5146eeec4$var$POSIX_CHARS = {
    DOT_LITERAL: $a59b3ae5146eeec4$var$DOT_LITERAL,
    PLUS_LITERAL: $a59b3ae5146eeec4$var$PLUS_LITERAL,
    QMARK_LITERAL: $a59b3ae5146eeec4$var$QMARK_LITERAL,
    SLASH_LITERAL: $a59b3ae5146eeec4$var$SLASH_LITERAL,
    ONE_CHAR: $a59b3ae5146eeec4$var$ONE_CHAR,
    QMARK: $a59b3ae5146eeec4$var$QMARK,
    END_ANCHOR: $a59b3ae5146eeec4$var$END_ANCHOR,
    DOTS_SLASH: $a59b3ae5146eeec4$var$DOTS_SLASH,
    NO_DOT: $a59b3ae5146eeec4$var$NO_DOT,
    NO_DOTS: $a59b3ae5146eeec4$var$NO_DOTS,
    NO_DOT_SLASH: $a59b3ae5146eeec4$var$NO_DOT_SLASH,
    NO_DOTS_SLASH: $a59b3ae5146eeec4$var$NO_DOTS_SLASH,
    QMARK_NO_DOT: $a59b3ae5146eeec4$var$QMARK_NO_DOT,
    STAR: $a59b3ae5146eeec4$var$STAR,
    START_ANCHOR: $a59b3ae5146eeec4$var$START_ANCHOR
};
/**
 * Windows glob regex
 */ const $a59b3ae5146eeec4$var$WINDOWS_CHARS = {
    ...$a59b3ae5146eeec4$var$POSIX_CHARS,
    SLASH_LITERAL: `[${$a59b3ae5146eeec4$var$WIN_SLASH}]`,
    QMARK: $a59b3ae5146eeec4$var$WIN_NO_SLASH,
    STAR: `${$a59b3ae5146eeec4$var$WIN_NO_SLASH}*?`,
    DOTS_SLASH: `${$a59b3ae5146eeec4$var$DOT_LITERAL}{1,2}(?:[${$a59b3ae5146eeec4$var$WIN_SLASH}]|$)`,
    NO_DOT: `(?!${$a59b3ae5146eeec4$var$DOT_LITERAL})`,
    NO_DOTS: `(?!(?:^|[${$a59b3ae5146eeec4$var$WIN_SLASH}])${$a59b3ae5146eeec4$var$DOT_LITERAL}{1,2}(?:[${$a59b3ae5146eeec4$var$WIN_SLASH}]|$))`,
    NO_DOT_SLASH: `(?!${$a59b3ae5146eeec4$var$DOT_LITERAL}{0,1}(?:[${$a59b3ae5146eeec4$var$WIN_SLASH}]|$))`,
    NO_DOTS_SLASH: `(?!${$a59b3ae5146eeec4$var$DOT_LITERAL}{1,2}(?:[${$a59b3ae5146eeec4$var$WIN_SLASH}]|$))`,
    QMARK_NO_DOT: `[^.${$a59b3ae5146eeec4$var$WIN_SLASH}]`,
    START_ANCHOR: `(?:^|[${$a59b3ae5146eeec4$var$WIN_SLASH}])`,
    END_ANCHOR: `(?:[${$a59b3ae5146eeec4$var$WIN_SLASH}]|$)`
};
/**
 * POSIX Bracket Regex
 */ const $a59b3ae5146eeec4$var$POSIX_REGEX_SOURCE = {
    alnum: 'a-zA-Z0-9',
    alpha: 'a-zA-Z',
    ascii: '\\x00-\\x7F',
    blank: ' \\t',
    cntrl: '\\x00-\\x1F\\x7F',
    digit: '0-9',
    graph: '\\x21-\\x7E',
    lower: 'a-z',
    print: '\\x20-\\x7E ',
    punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
    space: ' \\t\\r\\n\\v\\f',
    upper: 'A-Z',
    word: 'A-Za-z0-9_',
    xdigit: 'A-Fa-f0-9'
};
module.exports = {
    MAX_LENGTH: 65536,
    POSIX_REGEX_SOURCE: $a59b3ae5146eeec4$var$POSIX_REGEX_SOURCE,
    // regular expressions
    REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
    REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
    REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
    REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
    REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
    REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
    // Replace globs with equivalent patterns to reduce parsing time.
    REPLACEMENTS: {
        '***': '*',
        '**/**': '**',
        '**/**/**': '**'
    },
    // Digits
    CHAR_0: 48,
    /* 0 */ CHAR_9: 57,
    /* 9 */ // Alphabet chars.
    CHAR_UPPERCASE_A: 65,
    /* A */ CHAR_LOWERCASE_A: 97,
    /* a */ CHAR_UPPERCASE_Z: 90,
    /* Z */ CHAR_LOWERCASE_Z: 122,
    /* z */ CHAR_LEFT_PARENTHESES: 40,
    /* ( */ CHAR_RIGHT_PARENTHESES: 41,
    /* ) */ CHAR_ASTERISK: 42,
    /* * */ // Non-alphabetic chars.
    CHAR_AMPERSAND: 38,
    /* & */ CHAR_AT: 64,
    /* @ */ CHAR_BACKWARD_SLASH: 92,
    /* \ */ CHAR_CARRIAGE_RETURN: 13,
    /* \r */ CHAR_CIRCUMFLEX_ACCENT: 94,
    /* ^ */ CHAR_COLON: 58,
    /* : */ CHAR_COMMA: 44,
    /* , */ CHAR_DOT: 46,
    /* . */ CHAR_DOUBLE_QUOTE: 34,
    /* " */ CHAR_EQUAL: 61,
    /* = */ CHAR_EXCLAMATION_MARK: 33,
    /* ! */ CHAR_FORM_FEED: 12,
    /* \f */ CHAR_FORWARD_SLASH: 47,
    /* / */ CHAR_GRAVE_ACCENT: 96,
    /* ` */ CHAR_HASH: 35,
    /* # */ CHAR_HYPHEN_MINUS: 45,
    /* - */ CHAR_LEFT_ANGLE_BRACKET: 60,
    /* < */ CHAR_LEFT_CURLY_BRACE: 123,
    /* { */ CHAR_LEFT_SQUARE_BRACKET: 91,
    /* [ */ CHAR_LINE_FEED: 10,
    /* \n */ CHAR_NO_BREAK_SPACE: 160,
    /* \u00A0 */ CHAR_PERCENT: 37,
    /* % */ CHAR_PLUS: 43,
    /* + */ CHAR_QUESTION_MARK: 63,
    /* ? */ CHAR_RIGHT_ANGLE_BRACKET: 62,
    /* > */ CHAR_RIGHT_CURLY_BRACE: 125,
    /* } */ CHAR_RIGHT_SQUARE_BRACKET: 93,
    /* ] */ CHAR_SEMICOLON: 59,
    /* ; */ CHAR_SINGLE_QUOTE: 39,
    /* ' */ CHAR_SPACE: 32,
    /*   */ CHAR_TAB: 9,
    /* \t */ CHAR_UNDERSCORE: 95,
    /* _ */ CHAR_VERTICAL_LINE: 124,
    /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
    /* \uFEFF */ SEP: $5HoLl$path.sep,
    /**
   * Create EXTGLOB_CHARS
   */ extglobChars (chars) {
        return {
            '!': {
                type: 'negate',
                open: '(?:(?!(?:',
                close: `))${chars.STAR})`
            },
            '?': {
                type: 'qmark',
                open: '(?:',
                close: ')?'
            },
            '+': {
                type: 'plus',
                open: '(?:',
                close: ')+'
            },
            '*': {
                type: 'star',
                open: '(?:',
                close: ')*'
            },
            '@': {
                type: 'at',
                open: '(?:',
                close: ')'
            }
        };
    },
    /**
   * Create GLOB_CHARS
   */ globChars (win32) {
        return win32 === true ? $a59b3ae5146eeec4$var$WINDOWS_CHARS : $a59b3ae5146eeec4$var$POSIX_CHARS;
    }
};

});



parcelRegister("4wLfu", function(module, exports) {
'use strict';

var $edwai = parcelRequire("edwai");

var $9eMkZ = parcelRequire("9eMkZ");
/**
 * Constants
 */ const { MAX_LENGTH: $34becd39a6e7e7ee$var$MAX_LENGTH, POSIX_REGEX_SOURCE: $34becd39a6e7e7ee$var$POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS: $34becd39a6e7e7ee$var$REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF: $34becd39a6e7e7ee$var$REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS: $34becd39a6e7e7ee$var$REPLACEMENTS } = $edwai;
/**
 * Helpers
 */ const $34becd39a6e7e7ee$var$expandRange = (args, options)=>{
    if (typeof options.expandRange === 'function') return options.expandRange(...args, options);
    args.sort();
    const value = `[${args.join('-')}]`;
    try {
        /* eslint-disable-next-line no-new */ new RegExp(value);
    } catch (ex) {
        return args.map((v)=>$9eMkZ.escapeRegex(v)).join('..');
    }
    return value;
};
/**
 * Create the message for a syntax error
 */ const $34becd39a6e7e7ee$var$syntaxError = (type, char)=>{
    return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
};
/**
 * Parse the given input string.
 * @param {String} input
 * @param {Object} options
 * @return {Object}
 */ const $34becd39a6e7e7ee$var$parse = (input, options)=>{
    if (typeof input !== 'string') throw new TypeError('Expected a string');
    input = $34becd39a6e7e7ee$var$REPLACEMENTS[input] || input;
    const opts = {
        ...options
    };
    const max = typeof opts.maxLength === 'number' ? Math.min($34becd39a6e7e7ee$var$MAX_LENGTH, opts.maxLength) : $34becd39a6e7e7ee$var$MAX_LENGTH;
    let len = input.length;
    if (len > max) throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
    const bos = {
        type: 'bos',
        value: '',
        output: opts.prepend || ''
    };
    const tokens = [
        bos
    ];
    const capture = opts.capture ? '' : '?:';
    const win32 = $9eMkZ.isWindows(options);
    // create constants based on platform, for windows or posix
    const PLATFORM_CHARS = $edwai.globChars(win32);
    const EXTGLOB_CHARS = $edwai.extglobChars(PLATFORM_CHARS);
    const { DOT_LITERAL: DOT_LITERAL, PLUS_LITERAL: PLUS_LITERAL, SLASH_LITERAL: SLASH_LITERAL, ONE_CHAR: ONE_CHAR, DOTS_SLASH: DOTS_SLASH, NO_DOT: NO_DOT, NO_DOT_SLASH: NO_DOT_SLASH, NO_DOTS_SLASH: NO_DOTS_SLASH, QMARK: QMARK, QMARK_NO_DOT: QMARK_NO_DOT, STAR: STAR, START_ANCHOR: START_ANCHOR } = PLATFORM_CHARS;
    const globstar = (opts)=>{
        return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
    };
    const nodot = opts.dot ? '' : NO_DOT;
    const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
    let star = opts.bash === true ? globstar(opts) : STAR;
    if (opts.capture) star = `(${star})`;
    // minimatch options support
    if (typeof opts.noext === 'boolean') opts.noextglob = opts.noext;
    const state = {
        input: input,
        index: -1,
        start: 0,
        dot: opts.dot === true,
        consumed: '',
        output: '',
        prefix: '',
        backtrack: false,
        negated: false,
        brackets: 0,
        braces: 0,
        parens: 0,
        quotes: 0,
        globstar: false,
        tokens: tokens
    };
    input = $9eMkZ.removePrefix(input, state);
    len = input.length;
    const extglobs = [];
    const braces = [];
    const stack = [];
    let prev = bos;
    let value;
    /**
   * Tokenizing helpers
   */ const eos = ()=>state.index === len - 1;
    const peek = state.peek = (n = 1)=>input[state.index + n];
    const advance = state.advance = ()=>input[++state.index] || '';
    const remaining = ()=>input.slice(state.index + 1);
    const consume = (value = '', num = 0)=>{
        state.consumed += value;
        state.index += num;
    };
    const append = (token)=>{
        state.output += token.output != null ? token.output : token.value;
        consume(token.value);
    };
    const negate = ()=>{
        let count = 1;
        while(peek() === '!' && (peek(2) !== '(' || peek(3) === '?')){
            advance();
            state.start++;
            count++;
        }
        if (count % 2 === 0) return false;
        state.negated = true;
        state.start++;
        return true;
    };
    const increment = (type)=>{
        state[type]++;
        stack.push(type);
    };
    const decrement = (type)=>{
        state[type]--;
        stack.pop();
    };
    /**
   * Push tokens onto the tokens array. This helper speeds up
   * tokenizing by 1) helping us avoid backtracking as much as possible,
   * and 2) helping us avoid creating extra tokens when consecutive
   * characters are plain text. This improves performance and simplifies
   * lookbehinds.
   */ const push = (tok)=>{
        if (prev.type === 'globstar') {
            const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
            const isExtglob = tok.extglob === true || extglobs.length && (tok.type === 'pipe' || tok.type === 'paren');
            if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
                state.output = state.output.slice(0, -prev.output.length);
                prev.type = 'star';
                prev.value = '*';
                prev.output = star;
                state.output += prev.output;
            }
        }
        if (extglobs.length && tok.type !== 'paren') extglobs[extglobs.length - 1].inner += tok.value;
        if (tok.value || tok.output) append(tok);
        if (prev && prev.type === 'text' && tok.type === 'text') {
            prev.value += tok.value;
            prev.output = (prev.output || '') + tok.value;
            return;
        }
        tok.prev = prev;
        tokens.push(tok);
        prev = tok;
    };
    const extglobOpen = (type, value)=>{
        const token = {
            ...EXTGLOB_CHARS[value],
            conditions: 1,
            inner: ''
        };
        token.prev = prev;
        token.parens = state.parens;
        token.output = state.output;
        const output = (opts.capture ? '(' : '') + token.open;
        increment('parens');
        push({
            type: type,
            value: value,
            output: state.output ? '' : ONE_CHAR
        });
        push({
            type: 'paren',
            extglob: true,
            value: advance(),
            output: output
        });
        extglobs.push(token);
    };
    const extglobClose = (token)=>{
        let output = token.close + (opts.capture ? ')' : '');
        let rest;
        if (token.type === 'negate') {
            let extglobStar = star;
            if (token.inner && token.inner.length > 1 && token.inner.includes('/')) extglobStar = globstar(opts);
            if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) output = token.close = `)$))${extglobStar}`;
            if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
                // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.
                // In this case, we need to parse the string and use it in the output of the original pattern.
                // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
                //
                // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
                const expression = $34becd39a6e7e7ee$var$parse(rest, {
                    ...options,
                    fastpaths: false
                }).output;
                output = token.close = `)${expression})${extglobStar})`;
            }
            if (token.prev.type === 'bos') state.negatedExtglob = true;
        }
        push({
            type: 'paren',
            extglob: true,
            value: value,
            output: output
        });
        decrement('parens');
    };
    /**
   * Fast paths
   */ if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
        let backslashes = false;
        let output = input.replace($34becd39a6e7e7ee$var$REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index)=>{
            if (first === '\\') {
                backslashes = true;
                return m;
            }
            if (first === '?') {
                if (esc) return esc + first + (rest ? QMARK.repeat(rest.length) : '');
                if (index === 0) return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
                return QMARK.repeat(chars.length);
            }
            if (first === '.') return DOT_LITERAL.repeat(chars.length);
            if (first === '*') {
                if (esc) return esc + first + (rest ? star : '');
                return star;
            }
            return esc ? m : `\\${m}`;
        });
        if (backslashes === true) {
            if (opts.unescape === true) output = output.replace(/\\/g, '');
            else output = output.replace(/\\+/g, (m)=>{
                return m.length % 2 === 0 ? '\\\\' : m ? '\\' : '';
            });
        }
        if (output === input && opts.contains === true) {
            state.output = input;
            return state;
        }
        state.output = $9eMkZ.wrapOutput(output, state, options);
        return state;
    }
    /**
   * Tokenize input until we reach end-of-string
   */ while(!eos()){
        value = advance();
        if (value === '\u0000') continue;
        /**
     * Escaped characters
     */ if (value === '\\') {
            const next = peek();
            if (next === '/' && opts.bash !== true) continue;
            if (next === '.' || next === ';') continue;
            if (!next) {
                value += '\\';
                push({
                    type: 'text',
                    value: value
                });
                continue;
            }
            // collapse slashes to reduce potential for exploits
            const match = /^\\+/.exec(remaining());
            let slashes = 0;
            if (match && match[0].length > 2) {
                slashes = match[0].length;
                state.index += slashes;
                if (slashes % 2 !== 0) value += '\\';
            }
            if (opts.unescape === true) value = advance();
            else value += advance();
            if (state.brackets === 0) {
                push({
                    type: 'text',
                    value: value
                });
                continue;
            }
        }
        /**
     * If we're inside a regex character class, continue
     * until we reach the closing bracket.
     */ if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
            if (opts.posix !== false && value === ':') {
                const inner = prev.value.slice(1);
                if (inner.includes('[')) {
                    prev.posix = true;
                    if (inner.includes(':')) {
                        const idx = prev.value.lastIndexOf('[');
                        const pre = prev.value.slice(0, idx);
                        const rest = prev.value.slice(idx + 2);
                        const posix = $34becd39a6e7e7ee$var$POSIX_REGEX_SOURCE[rest];
                        if (posix) {
                            prev.value = pre + posix;
                            state.backtrack = true;
                            advance();
                            if (!bos.output && tokens.indexOf(prev) === 1) bos.output = ONE_CHAR;
                            continue;
                        }
                    }
                }
            }
            if (value === '[' && peek() !== ':' || value === '-' && peek() === ']') value = `\\${value}`;
            if (value === ']' && (prev.value === '[' || prev.value === '[^')) value = `\\${value}`;
            if (opts.posix === true && value === '!' && prev.value === '[') value = '^';
            prev.value += value;
            append({
                value: value
            });
            continue;
        }
        /**
     * If we're inside a quoted string, continue
     * until we reach the closing double quote.
     */ if (state.quotes === 1 && value !== '"') {
            value = $9eMkZ.escapeRegex(value);
            prev.value += value;
            append({
                value: value
            });
            continue;
        }
        /**
     * Double quotes
     */ if (value === '"') {
            state.quotes = state.quotes === 1 ? 0 : 1;
            if (opts.keepQuotes === true) push({
                type: 'text',
                value: value
            });
            continue;
        }
        /**
     * Parentheses
     */ if (value === '(') {
            increment('parens');
            push({
                type: 'paren',
                value: value
            });
            continue;
        }
        if (value === ')') {
            if (state.parens === 0 && opts.strictBrackets === true) throw new SyntaxError($34becd39a6e7e7ee$var$syntaxError('opening', '('));
            const extglob = extglobs[extglobs.length - 1];
            if (extglob && state.parens === extglob.parens + 1) {
                extglobClose(extglobs.pop());
                continue;
            }
            push({
                type: 'paren',
                value: value,
                output: state.parens ? ')' : '\\)'
            });
            decrement('parens');
            continue;
        }
        /**
     * Square brackets
     */ if (value === '[') {
            if (opts.nobracket === true || !remaining().includes(']')) {
                if (opts.nobracket !== true && opts.strictBrackets === true) throw new SyntaxError($34becd39a6e7e7ee$var$syntaxError('closing', ']'));
                value = `\\${value}`;
            } else increment('brackets');
            push({
                type: 'bracket',
                value: value
            });
            continue;
        }
        if (value === ']') {
            if (opts.nobracket === true || prev && prev.type === 'bracket' && prev.value.length === 1) {
                push({
                    type: 'text',
                    value: value,
                    output: `\\${value}`
                });
                continue;
            }
            if (state.brackets === 0) {
                if (opts.strictBrackets === true) throw new SyntaxError($34becd39a6e7e7ee$var$syntaxError('opening', '['));
                push({
                    type: 'text',
                    value: value,
                    output: `\\${value}`
                });
                continue;
            }
            decrement('brackets');
            const prevValue = prev.value.slice(1);
            if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) value = `/${value}`;
            prev.value += value;
            append({
                value: value
            });
            // when literal brackets are explicitly disabled
            // assume we should match with a regex character class
            if (opts.literalBrackets === false || $9eMkZ.hasRegexChars(prevValue)) continue;
            const escaped = $9eMkZ.escapeRegex(prev.value);
            state.output = state.output.slice(0, -prev.value.length);
            // when literal brackets are explicitly enabled
            // assume we should escape the brackets to match literal characters
            if (opts.literalBrackets === true) {
                state.output += escaped;
                prev.value = escaped;
                continue;
            }
            // when the user specifies nothing, try to match both
            prev.value = `(${capture}${escaped}|${prev.value})`;
            state.output += prev.value;
            continue;
        }
        /**
     * Braces
     */ if (value === '{' && opts.nobrace !== true) {
            increment('braces');
            const open = {
                type: 'brace',
                value: value,
                output: '(',
                outputIndex: state.output.length,
                tokensIndex: state.tokens.length
            };
            braces.push(open);
            push(open);
            continue;
        }
        if (value === '}') {
            const brace = braces[braces.length - 1];
            if (opts.nobrace === true || !brace) {
                push({
                    type: 'text',
                    value: value,
                    output: value
                });
                continue;
            }
            let output = ')';
            if (brace.dots === true) {
                const arr = tokens.slice();
                const range = [];
                for(let i = arr.length - 1; i >= 0; i--){
                    tokens.pop();
                    if (arr[i].type === 'brace') break;
                    if (arr[i].type !== 'dots') range.unshift(arr[i].value);
                }
                output = $34becd39a6e7e7ee$var$expandRange(range, opts);
                state.backtrack = true;
            }
            if (brace.comma !== true && brace.dots !== true) {
                const out = state.output.slice(0, brace.outputIndex);
                const toks = state.tokens.slice(brace.tokensIndex);
                brace.value = brace.output = '\\{';
                value = output = '\\}';
                state.output = out;
                for (const t of toks)state.output += t.output || t.value;
            }
            push({
                type: 'brace',
                value: value,
                output: output
            });
            decrement('braces');
            braces.pop();
            continue;
        }
        /**
     * Pipes
     */ if (value === '|') {
            if (extglobs.length > 0) extglobs[extglobs.length - 1].conditions++;
            push({
                type: 'text',
                value: value
            });
            continue;
        }
        /**
     * Commas
     */ if (value === ',') {
            let output = value;
            const brace = braces[braces.length - 1];
            if (brace && stack[stack.length - 1] === 'braces') {
                brace.comma = true;
                output = '|';
            }
            push({
                type: 'comma',
                value: value,
                output: output
            });
            continue;
        }
        /**
     * Slashes
     */ if (value === '/') {
            // if the beginning of the glob is "./", advance the start
            // to the current index, and don't add the "./" characters
            // to the state. This greatly simplifies lookbehinds when
            // checking for BOS characters like "!" and "." (not "./")
            if (prev.type === 'dot' && state.index === state.start + 1) {
                state.start = state.index + 1;
                state.consumed = '';
                state.output = '';
                tokens.pop();
                prev = bos; // reset "prev" to the first token
                continue;
            }
            push({
                type: 'slash',
                value: value,
                output: SLASH_LITERAL
            });
            continue;
        }
        /**
     * Dots
     */ if (value === '.') {
            if (state.braces > 0 && prev.type === 'dot') {
                if (prev.value === '.') prev.output = DOT_LITERAL;
                const brace = braces[braces.length - 1];
                prev.type = 'dots';
                prev.output += value;
                prev.value += value;
                brace.dots = true;
                continue;
            }
            if (state.braces + state.parens === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
                push({
                    type: 'text',
                    value: value,
                    output: DOT_LITERAL
                });
                continue;
            }
            push({
                type: 'dot',
                value: value,
                output: DOT_LITERAL
            });
            continue;
        }
        /**
     * Question marks
     */ if (value === '?') {
            const isGroup = prev && prev.value === '(';
            if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
                extglobOpen('qmark', value);
                continue;
            }
            if (prev && prev.type === 'paren') {
                const next = peek();
                let output = value;
                if (next === '<' && !$9eMkZ.supportsLookbehinds()) throw new Error('Node.js v10 or higher is required for regex lookbehinds');
                if (prev.value === '(' && !/[!=<:]/.test(next) || next === '<' && !/<([!=]|\w+>)/.test(remaining())) output = `\\${value}`;
                push({
                    type: 'text',
                    value: value,
                    output: output
                });
                continue;
            }
            if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
                push({
                    type: 'qmark',
                    value: value,
                    output: QMARK_NO_DOT
                });
                continue;
            }
            push({
                type: 'qmark',
                value: value,
                output: QMARK
            });
            continue;
        }
        /**
     * Exclamation
     */ if (value === '!') {
            if (opts.noextglob !== true && peek() === '(') {
                if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
                    extglobOpen('negate', value);
                    continue;
                }
            }
            if (opts.nonegate !== true && state.index === 0) {
                negate();
                continue;
            }
        }
        /**
     * Plus
     */ if (value === '+') {
            if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
                extglobOpen('plus', value);
                continue;
            }
            if (prev && prev.value === '(' || opts.regex === false) {
                push({
                    type: 'plus',
                    value: value,
                    output: PLUS_LITERAL
                });
                continue;
            }
            if (prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace') || state.parens > 0) {
                push({
                    type: 'plus',
                    value: value
                });
                continue;
            }
            push({
                type: 'plus',
                value: PLUS_LITERAL
            });
            continue;
        }
        /**
     * Plain text
     */ if (value === '@') {
            if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
                push({
                    type: 'at',
                    extglob: true,
                    value: value,
                    output: ''
                });
                continue;
            }
            push({
                type: 'text',
                value: value
            });
            continue;
        }
        /**
     * Plain text
     */ if (value !== '*') {
            if (value === '$' || value === '^') value = `\\${value}`;
            const match = $34becd39a6e7e7ee$var$REGEX_NON_SPECIAL_CHARS.exec(remaining());
            if (match) {
                value += match[0];
                state.index += match[0].length;
            }
            push({
                type: 'text',
                value: value
            });
            continue;
        }
        /**
     * Stars
     */ if (prev && (prev.type === 'globstar' || prev.star === true)) {
            prev.type = 'star';
            prev.star = true;
            prev.value += value;
            prev.output = star;
            state.backtrack = true;
            state.globstar = true;
            consume(value);
            continue;
        }
        let rest = remaining();
        if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
            extglobOpen('star', value);
            continue;
        }
        if (prev.type === 'star') {
            if (opts.noglobstar === true) {
                consume(value);
                continue;
            }
            const prior = prev.prev;
            const before = prior.prev;
            const isStart = prior.type === 'slash' || prior.type === 'bos';
            const afterStar = before && (before.type === 'star' || before.type === 'globstar');
            if (opts.bash === true && (!isStart || rest[0] && rest[0] !== '/')) {
                push({
                    type: 'star',
                    value: value,
                    output: ''
                });
                continue;
            }
            const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
            const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
            if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
                push({
                    type: 'star',
                    value: value,
                    output: ''
                });
                continue;
            }
            // strip consecutive `/**/`
            while(rest.slice(0, 3) === '/**'){
                const after = input[state.index + 4];
                if (after && after !== '/') break;
                rest = rest.slice(3);
                consume('/**', 3);
            }
            if (prior.type === 'bos' && eos()) {
                prev.type = 'globstar';
                prev.value += value;
                prev.output = globstar(opts);
                state.output = prev.output;
                state.globstar = true;
                consume(value);
                continue;
            }
            if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
                state.output = state.output.slice(0, -(prior.output + prev.output).length);
                prior.output = `(?:${prior.output}`;
                prev.type = 'globstar';
                prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
                prev.value += value;
                state.globstar = true;
                state.output += prior.output + prev.output;
                consume(value);
                continue;
            }
            if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
                const end = rest[1] !== void 0 ? '|$' : '';
                state.output = state.output.slice(0, -(prior.output + prev.output).length);
                prior.output = `(?:${prior.output}`;
                prev.type = 'globstar';
                prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
                prev.value += value;
                state.output += prior.output + prev.output;
                state.globstar = true;
                consume(value + advance());
                push({
                    type: 'slash',
                    value: '/',
                    output: ''
                });
                continue;
            }
            if (prior.type === 'bos' && rest[0] === '/') {
                prev.type = 'globstar';
                prev.value += value;
                prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
                state.output = prev.output;
                state.globstar = true;
                consume(value + advance());
                push({
                    type: 'slash',
                    value: '/',
                    output: ''
                });
                continue;
            }
            // remove single star from output
            state.output = state.output.slice(0, -prev.output.length);
            // reset previous token to globstar
            prev.type = 'globstar';
            prev.output = globstar(opts);
            prev.value += value;
            // reset output with globstar
            state.output += prev.output;
            state.globstar = true;
            consume(value);
            continue;
        }
        const token = {
            type: 'star',
            value: value,
            output: star
        };
        if (opts.bash === true) {
            token.output = '.*?';
            if (prev.type === 'bos' || prev.type === 'slash') token.output = nodot + token.output;
            push(token);
            continue;
        }
        if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
            token.output = value;
            push(token);
            continue;
        }
        if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
            if (prev.type === 'dot') {
                state.output += NO_DOT_SLASH;
                prev.output += NO_DOT_SLASH;
            } else if (opts.dot === true) {
                state.output += NO_DOTS_SLASH;
                prev.output += NO_DOTS_SLASH;
            } else {
                state.output += nodot;
                prev.output += nodot;
            }
            if (peek() !== '*') {
                state.output += ONE_CHAR;
                prev.output += ONE_CHAR;
            }
        }
        push(token);
    }
    while(state.brackets > 0){
        if (opts.strictBrackets === true) throw new SyntaxError($34becd39a6e7e7ee$var$syntaxError('closing', ']'));
        state.output = $9eMkZ.escapeLast(state.output, '[');
        decrement('brackets');
    }
    while(state.parens > 0){
        if (opts.strictBrackets === true) throw new SyntaxError($34becd39a6e7e7ee$var$syntaxError('closing', ')'));
        state.output = $9eMkZ.escapeLast(state.output, '(');
        decrement('parens');
    }
    while(state.braces > 0){
        if (opts.strictBrackets === true) throw new SyntaxError($34becd39a6e7e7ee$var$syntaxError('closing', '}'));
        state.output = $9eMkZ.escapeLast(state.output, '{');
        decrement('braces');
    }
    if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) push({
        type: 'maybe_slash',
        value: '',
        output: `${SLASH_LITERAL}?`
    });
    // rebuild the output if we had to backtrack at any point
    if (state.backtrack === true) {
        state.output = '';
        for (const token of state.tokens){
            state.output += token.output != null ? token.output : token.value;
            if (token.suffix) state.output += token.suffix;
        }
    }
    return state;
};
/**
 * Fast paths for creating regular expressions for common glob patterns.
 * This can significantly speed up processing and has very little downside
 * impact when none of the fast paths match.
 */ $34becd39a6e7e7ee$var$parse.fastpaths = (input, options)=>{
    const opts = {
        ...options
    };
    const max = typeof opts.maxLength === 'number' ? Math.min($34becd39a6e7e7ee$var$MAX_LENGTH, opts.maxLength) : $34becd39a6e7e7ee$var$MAX_LENGTH;
    const len = input.length;
    if (len > max) throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
    input = $34becd39a6e7e7ee$var$REPLACEMENTS[input] || input;
    const win32 = $9eMkZ.isWindows(options);
    // create constants based on platform, for windows or posix
    const { DOT_LITERAL: DOT_LITERAL, SLASH_LITERAL: SLASH_LITERAL, ONE_CHAR: ONE_CHAR, DOTS_SLASH: DOTS_SLASH, NO_DOT: NO_DOT, NO_DOTS: NO_DOTS, NO_DOTS_SLASH: NO_DOTS_SLASH, STAR: STAR, START_ANCHOR: START_ANCHOR } = $edwai.globChars(win32);
    const nodot = opts.dot ? NO_DOTS : NO_DOT;
    const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
    const capture = opts.capture ? '' : '?:';
    const state = {
        negated: false,
        prefix: ''
    };
    let star = opts.bash === true ? '.*?' : STAR;
    if (opts.capture) star = `(${star})`;
    const globstar = (opts)=>{
        if (opts.noglobstar === true) return star;
        return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
    };
    const create = (str)=>{
        switch(str){
            case '*':
                return `${nodot}${ONE_CHAR}${star}`;
            case '.*':
                return `${DOT_LITERAL}${ONE_CHAR}${star}`;
            case '*.*':
                return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
            case '*/*':
                return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
            case '**':
                return nodot + globstar(opts);
            case '**/*':
                return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
            case '**/*.*':
                return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
            case '**/.*':
                return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
            default:
                {
                    const match = /^(.*?)\.(\w+)$/.exec(str);
                    if (!match) return;
                    const source = create(match[1]);
                    if (!source) return;
                    return source + DOT_LITERAL + match[2];
                }
        }
    };
    const output = $9eMkZ.removePrefix(input, state);
    let source = create(output);
    if (source && opts.strictSlashes !== true) source += `${SLASH_LITERAL}?`;
    return source;
};
module.exports = $34becd39a6e7e7ee$var$parse;

});


parcelRegister("kfmha", function(module, exports) {
"use strict";
var $ebd67ce3fae43094$var$__createBinding = module.exports && module.exports.__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 $ebd67ce3fae43094$var$__exportStar = module.exports && module.exports.__exportStar || function(m, exports1) {
    for(var p in m)if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports1, p)) $ebd67ce3fae43094$var$__createBinding(exports1, m, p);
};
Object.defineProperty(module.exports, "__esModule", {
    value: true
});

$ebd67ce3fae43094$var$__exportStar((parcelRequire("l7D6c")), module.exports);

});
parcelRegister("l7D6c", function(module, exports) {
"use strict";
Object.defineProperty(module.exports, "__esModule", {
    value: true
});
module.exports.fixRequestBody = module.exports.responseInterceptor = void 0;

var $dWV1b = parcelRequire("dWV1b");
Object.defineProperty(module.exports, "responseInterceptor", {
    enumerable: true,
    get: function() {
        return $dWV1b.responseInterceptor;
    }
});

var $2ZpuR = parcelRequire("2ZpuR");
Object.defineProperty(module.exports, "fixRequestBody", {
    enumerable: true,
    get: function() {
        return $2ZpuR.fixRequestBody;
    }
});

});
parcelRegister("dWV1b", function(module, exports) {
"use strict";
Object.defineProperty(module.exports, "__esModule", {
    value: true
});
module.exports.responseInterceptor = void 0;

/**
 * Intercept responses from upstream.
 * Automatically decompress (deflate, gzip, brotli).
 * Give developer the opportunity to modify intercepted Buffer and http.ServerResponse
 *
 * NOTE: must set options.selfHandleResponse=true (prevent automatic call of res.end())
 */ function $a27cebb8ec6a3397$var$responseInterceptor(interceptor) {
    return async function proxyRes(proxyRes, req, res) {
        const originalProxyRes = proxyRes;
        let buffer = Buffer.from('', 'utf8');
        // decompress proxy response
        const _proxyRes = $a27cebb8ec6a3397$var$decompress(proxyRes, proxyRes.headers['content-encoding']);
        // concat data stream
        _proxyRes.on('data', (chunk)=>buffer = Buffer.concat([
                buffer,
                chunk
            ]));
        _proxyRes.on('end', async ()=>{
            // copy original headers
            $a27cebb8ec6a3397$var$copyHeaders(proxyRes, res);
            // call interceptor with intercepted response (buffer)
            const interceptedBuffer = Buffer.from(await interceptor(buffer, originalProxyRes, req, res));
            // set correct content-length (with double byte character support)
            res.setHeader('content-length', Buffer.byteLength(interceptedBuffer, 'utf8'));
            res.write(interceptedBuffer);
            res.end();
        });
        _proxyRes.on('error', (error)=>{
            res.end(`Error fetching proxied request: ${error.message}`);
        });
    };
}
module.exports.responseInterceptor = $a27cebb8ec6a3397$var$responseInterceptor;
/**
 * Streaming decompression of proxy response
 * source: https://github.com/apache/superset/blob/9773aba522e957ed9423045ca153219638a85d2f/superset-frontend/webpack.proxy-config.js#L116
 */ function $a27cebb8ec6a3397$var$decompress(proxyRes, contentEncoding) {
    let _proxyRes = proxyRes;
    let decompress;
    switch(contentEncoding){
        case 'gzip':
            decompress = $5HoLl$zlib.createGunzip();
            break;
        case 'br':
            decompress = $5HoLl$zlib.createBrotliDecompress();
            break;
        case 'deflate':
            decompress = $5HoLl$zlib.createInflate();
            break;
        default:
            break;
    }
    if (decompress) {
        _proxyRes.pipe(decompress);
        _proxyRes = decompress;
    }
    return _proxyRes;
}
/**
 * Copy original headers
 * https://github.com/apache/superset/blob/9773aba522e957ed9423045ca153219638a85d2f/superset-frontend/webpack.proxy-config.js#L78
 */ function $a27cebb8ec6a3397$var$copyHeaders(originalResponse, response) {
    response.statusCode = originalResponse.statusCode;
    response.statusMessage = originalResponse.statusMessage;
    if (response.setHeader) {
        let keys = Object.keys(originalResponse.headers);
        // ignore chunked, brotli, gzip, deflate headers
        keys = keys.filter((key)=>![
                'content-encoding',
                'transfer-encoding'
            ].includes(key));
        keys.forEach((key)=>{
            let value = originalResponse.headers[key];
            if (key === 'set-cookie') {
                // remove cookie domain
                value = Array.isArray(value) ? value : [
                    value
                ];
                value = value.map((x)=>x.replace(/Domain=[^;]+?/i, ''));
            }
            response.setHeader(key, value);
        });
    } else response.headers = originalResponse.headers;
}

});

parcelRegister("2ZpuR", function(module, exports) {
"use strict";
Object.defineProperty(module.exports, "__esModule", {
    value: true
});
module.exports.fixRequestBody = void 0;

/**
 * Fix proxied body if bodyParser is involved.
 */ function $22d50e60f1e82174$var$fixRequestBody(proxyReq, req) {
    // skip fixRequestBody() when req.readableLength not 0 (bodyParser failure)
    if (req.readableLength !== 0) return;
    const requestBody = req.body;
    if (!requestBody) return;
    const contentType = proxyReq.getHeader('Content-Type');
    if (!contentType) return;
    const writeBody = (bodyData)=>{
        // deepcode ignore ContentLengthInCode: bodyParser fix
        proxyReq.setHeader('Content-Length', Buffer.byteLength(bodyData));
        proxyReq.write(bodyData);
    };
    if (contentType.includes('application/json')) writeBody(JSON.stringify(requestBody));
    else if (contentType.includes('application/x-www-form-urlencoded')) writeBody($5HoLl$querystring.stringify(requestBody));
}
module.exports.fixRequestBody = $22d50e60f1e82174$var$fixRequestBody;

});



parcelRegister("lGaGn", function(module, exports) {
'use strict';

var $fc85ce8960e64980$require$Writable = $5HoLl$stream.Writable;

var $iVvbT = parcelRequire("iVvbT");

var $g2eNi = parcelRequire("g2eNi");
var $fc85ce8960e64980$require$BINARY_TYPES = $g2eNi.BINARY_TYPES;
var $fc85ce8960e64980$require$EMPTY_BUFFER = $g2eNi.EMPTY_BUFFER;
var $fc85ce8960e64980$require$kStatusCode = $g2eNi.kStatusCode;
var $fc85ce8960e64980$require$kWebSocket = $g2eNi.kWebSocket;

var $jH0do = parcelRequire("jH0do");
var $fc85ce8960e64980$require$concat = $jH0do.concat;
var $fc85ce8960e64980$require$toArrayBuffer = $jH0do.toArrayBuffer;
var $fc85ce8960e64980$require$unmask = $jH0do.unmask;

var $9CIgd = parcelRequire("9CIgd");
var $fc85ce8960e64980$require$isValidStatusCode = $9CIgd.isValidStatusCode;
var $fc85ce8960e64980$require$isValidUTF8 = $9CIgd.isValidUTF8;
const $fc85ce8960e64980$var$FastBuffer = Buffer[Symbol.species];
const $fc85ce8960e64980$var$GET_INFO = 0;
const $fc85ce8960e64980$var$GET_PAYLOAD_LENGTH_16 = 1;
const $fc85ce8960e64980$var$GET_PAYLOAD_LENGTH_64 = 2;
const $fc85ce8960e64980$var$GET_MASK = 3;
const $fc85ce8960e64980$var$GET_DATA = 4;
const $fc85ce8960e64980$var$INFLATING = 5;
const $fc85ce8960e64980$var$DEFER_EVENT = 6;
/**
 * HyBi Receiver implementation.
 *
 * @extends Writable
 */ class $fc85ce8960e64980$var$Receiver extends $fc85ce8960e64980$require$Writable {
    /**
   * Creates a Receiver instance.
   *
   * @param {Object} [options] Options object
   * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
   *     any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
   *     multiple times in the same tick
   * @param {String} [options.binaryType=nodebuffer] The type for binary data
   * @param {Object} [options.extensions] An object containing the negotiated
   *     extensions
   * @param {Boolean} [options.isServer=false] Specifies whether to operate in
   *     client or server mode
   * @param {Number} [options.maxPayload=0] The maximum allowed message length
   * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
   *     not to skip UTF-8 validation for text and close messages
   */ constructor(options = {}){
        super();
        this._allowSynchronousEvents = options.allowSynchronousEvents !== undefined ? options.allowSynchronousEvents : true;
        this._binaryType = options.binaryType || $fc85ce8960e64980$require$BINARY_TYPES[0];
        this._extensions = options.extensions || {};
        this._isServer = !!options.isServer;
        this._maxPayload = options.maxPayload | 0;
        this._skipUTF8Validation = !!options.skipUTF8Validation;
        this[$fc85ce8960e64980$require$kWebSocket] = undefined;
        this._bufferedBytes = 0;
        this._buffers = [];
        this._compressed = false;
        this._payloadLength = 0;
        this._mask = undefined;
        this._fragmented = 0;
        this._masked = false;
        this._fin = false;
        this._opcode = 0;
        this._totalPayloadLength = 0;
        this._messageLength = 0;
        this._fragments = [];
        this._errored = false;
        this._loop = false;
        this._state = $fc85ce8960e64980$var$GET_INFO;
    }
    /**
   * Implements `Writable.prototype._write()`.
   *
   * @param {Buffer} chunk The chunk of data to write
   * @param {String} encoding The character encoding of `chunk`
   * @param {Function} cb Callback
   * @private
   */ _write(chunk, encoding, cb) {
        if (this._opcode === 0x08 && this._state == $fc85ce8960e64980$var$GET_INFO) return cb();
        this._bufferedBytes += chunk.length;
        this._buffers.push(chunk);
        this.startLoop(cb);
    }
    /**
   * Consumes `n` bytes from the buffered data.
   *
   * @param {Number} n The number of bytes to consume
   * @return {Buffer} The consumed bytes
   * @private
   */ consume(n) {
        this._bufferedBytes -= n;
        if (n === this._buffers[0].length) return this._buffers.shift();
        if (n < this._buffers[0].length) {
            const buf = this._buffers[0];
            this._buffers[0] = new $fc85ce8960e64980$var$FastBuffer(buf.buffer, buf.byteOffset + n, buf.length - n);
            return new $fc85ce8960e64980$var$FastBuffer(buf.buffer, buf.byteOffset, n);
        }
        const dst = Buffer.allocUnsafe(n);
        do {
            const buf = this._buffers[0];
            const offset = dst.length - n;
            if (n >= buf.length) dst.set(this._buffers.shift(), offset);
            else {
                dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);
                this._buffers[0] = new $fc85ce8960e64980$var$FastBuffer(buf.buffer, buf.byteOffset + n, buf.length - n);
            }
            n -= buf.length;
        }while (n > 0);
        return dst;
    }
    /**
   * Starts the parsing loop.
   *
   * @param {Function} cb Callback
   * @private
   */ startLoop(cb) {
        this._loop = true;
        do switch(this._state){
            case $fc85ce8960e64980$var$GET_INFO:
                this.getInfo(cb);
                break;
            case $fc85ce8960e64980$var$GET_PAYLOAD_LENGTH_16:
                this.getPayloadLength16(cb);
                break;
            case $fc85ce8960e64980$var$GET_PAYLOAD_LENGTH_64:
                this.getPayloadLength64(cb);
                break;
            case $fc85ce8960e64980$var$GET_MASK:
                this.getMask();
                break;
            case $fc85ce8960e64980$var$GET_DATA:
                this.getData(cb);
                break;
            case $fc85ce8960e64980$var$INFLATING:
            case $fc85ce8960e64980$var$DEFER_EVENT:
                this._loop = false;
                return;
        }
        while (this._loop);
        if (!this._errored) cb();
    }
    /**
   * Reads the first two bytes of a frame.
   *
   * @param {Function} cb Callback
   * @private
   */ getInfo(cb) {
        if (this._bufferedBytes < 2) {
            this._loop = false;
            return;
        }
        const buf = this.consume(2);
        if ((buf[0] & 0x30) !== 0x00) {
            const error = this.createError(RangeError, 'RSV2 and RSV3 must be clear', true, 1002, 'WS_ERR_UNEXPECTED_RSV_2_3');
            cb(error);
            return;
        }
        const compressed = (buf[0] & 0x40) === 0x40;
        if (compressed && !this._extensions[$iVvbT.extensionName]) {
            const error = this.createError(RangeError, 'RSV1 must be clear', true, 1002, 'WS_ERR_UNEXPECTED_RSV_1');
            cb(error);
            return;
        }
        this._fin = (buf[0] & 0x80) === 0x80;
        this._opcode = buf[0] & 0x0f;
        this._payloadLength = buf[1] & 0x7f;
        if (this._opcode === 0x00) {
            if (compressed) {
                const error = this.createError(RangeError, 'RSV1 must be clear', true, 1002, 'WS_ERR_UNEXPECTED_RSV_1');
                cb(error);
                return;
            }
            if (!this._fragmented) {
                const error = this.createError(RangeError, 'invalid opcode 0', true, 1002, 'WS_ERR_INVALID_OPCODE');
                cb(error);
                return;
            }
            this._opcode = this._fragmented;
        } else if (this._opcode === 0x01 || this._opcode === 0x02) {
            if (this._fragmented) {
                const error = this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, 'WS_ERR_INVALID_OPCODE');
                cb(error);
                return;
            }
            this._compressed = compressed;
        } else if (this._opcode > 0x07 && this._opcode < 0x0b) {
            if (!this._fin) {
                const error = this.createError(RangeError, 'FIN must be set', true, 1002, 'WS_ERR_EXPECTED_FIN');
                cb(error);
                return;
            }
            if (compressed) {
                const error = this.createError(RangeError, 'RSV1 must be clear', true, 1002, 'WS_ERR_UNEXPECTED_RSV_1');
                cb(error);
                return;
            }
            if (this._payloadLength > 0x7d || this._opcode === 0x08 && this._payloadLength === 1) {
                const error = this.createError(RangeError, `invalid payload length ${this._payloadLength}`, true, 1002, 'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH');
                cb(error);
                return;
            }
        } else {
            const error = this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, 'WS_ERR_INVALID_OPCODE');
            cb(error);
            return;
        }
        if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
        this._masked = (buf[1] & 0x80) === 0x80;
        if (this._isServer) {
            if (!this._masked) {
                const error = this.createError(RangeError, 'MASK must be set', true, 1002, 'WS_ERR_EXPECTED_MASK');
                cb(error);
                return;
            }
        } else if (this._masked) {
            const error = this.createError(RangeError, 'MASK must be clear', true, 1002, 'WS_ERR_UNEXPECTED_MASK');
            cb(error);
            return;
        }
        if (this._payloadLength === 126) this._state = $fc85ce8960e64980$var$GET_PAYLOAD_LENGTH_16;
        else if (this._payloadLength === 127) this._state = $fc85ce8960e64980$var$GET_PAYLOAD_LENGTH_64;
        else this.haveLength(cb);
    }
    /**
   * Gets extended payload length (7+16).
   *
   * @param {Function} cb Callback
   * @private
   */ getPayloadLength16(cb) {
        if (this._bufferedBytes < 2) {
            this._loop = false;
            return;
        }
        this._payloadLength = this.consume(2).readUInt16BE(0);
        this.haveLength(cb);
    }
    /**
   * Gets extended payload length (7+64).
   *
   * @param {Function} cb Callback
   * @private
   */ getPayloadLength64(cb) {
        if (this._bufferedBytes < 8) {
            this._loop = false;
            return;
        }
        const buf = this.consume(8);
        const num = buf.readUInt32BE(0);
        //
        // The maximum safe integer in JavaScript is 2^53 - 1. An error is returned
        // if payload length is greater than this number.
        //
        if (num > Math.pow(2, 21) - 1) {
            const error = this.createError(RangeError, 'Unsupported WebSocket frame: payload length > 2^53 - 1', false, 1009, 'WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH');
            cb(error);
            return;
        }
        this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);
        this.haveLength(cb);
    }
    /**
   * Payload length has been read.
   *
   * @param {Function} cb Callback
   * @private
   */ haveLength(cb) {
        if (this._payloadLength && this._opcode < 0x08) {
            this._totalPayloadLength += this._payloadLength;
            if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
                const error = this.createError(RangeError, 'Max payload size exceeded', false, 1009, 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH');
                cb(error);
                return;
            }
        }
        if (this._masked) this._state = $fc85ce8960e64980$var$GET_MASK;
        else this._state = $fc85ce8960e64980$var$GET_DATA;
    }
    /**
   * Reads mask bytes.
   *
   * @private
   */ getMask() {
        if (this._bufferedBytes < 4) {
            this._loop = false;
            return;
        }
        this._mask = this.consume(4);
        this._state = $fc85ce8960e64980$var$GET_DATA;
    }
    /**
   * Reads data bytes.
   *
   * @param {Function} cb Callback
   * @private
   */ getData(cb) {
        let data = $fc85ce8960e64980$require$EMPTY_BUFFER;
        if (this._payloadLength) {
            if (this._bufferedBytes < this._payloadLength) {
                this._loop = false;
                return;
            }
            data = this.consume(this._payloadLength);
            if (this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0) $fc85ce8960e64980$require$unmask(data, this._mask);
        }
        if (this._opcode > 0x07) {
            this.controlMessage(data, cb);
            return;
        }
        if (this._compressed) {
            this._state = $fc85ce8960e64980$var$INFLATING;
            this.decompress(data, cb);
            return;
        }
        if (data.length) {
            //
            // This message is not compressed so its length is the sum of the payload
            // length of all fragments.
            //
            this._messageLength = this._totalPayloadLength;
            this._fragments.push(data);
        }
        this.dataMessage(cb);
    }
    /**
   * Decompresses data.
   *
   * @param {Buffer} data Compressed data
   * @param {Function} cb Callback
   * @private
   */ decompress(data, cb) {
        const perMessageDeflate = this._extensions[$iVvbT.extensionName];
        perMessageDeflate.decompress(data, this._fin, (err, buf)=>{
            if (err) return cb(err);
            if (buf.length) {
                this._messageLength += buf.length;
                if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
                    const error = this.createError(RangeError, 'Max payload size exceeded', false, 1009, 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH');
                    cb(error);
                    return;
                }
                this._fragments.push(buf);
            }
            this.dataMessage(cb);
            if (this._state === $fc85ce8960e64980$var$GET_INFO) this.startLoop(cb);
        });
    }
    /**
   * Handles a data message.
   *
   * @param {Function} cb Callback
   * @private
   */ dataMessage(cb) {
        if (!this._fin) {
            this._state = $fc85ce8960e64980$var$GET_INFO;
            return;
        }
        const messageLength = this._messageLength;
        const fragments = this._fragments;
        this._totalPayloadLength = 0;
        this._messageLength = 0;
        this._fragmented = 0;
        this._fragments = [];
        if (this._opcode === 2) {
            let data;
            if (this._binaryType === 'nodebuffer') data = $fc85ce8960e64980$require$concat(fragments, messageLength);
            else if (this._binaryType === 'arraybuffer') data = $fc85ce8960e64980$require$toArrayBuffer($fc85ce8960e64980$require$concat(fragments, messageLength));
            else if (this._binaryType === 'blob') data = new Blob(fragments);
            else data = fragments;
            if (this._allowSynchronousEvents) {
                this.emit('message', data, true);
                this._state = $fc85ce8960e64980$var$GET_INFO;
            } else {
                this._state = $fc85ce8960e64980$var$DEFER_EVENT;
                setImmediate(()=>{
                    this.emit('message', data, true);
                    this._state = $fc85ce8960e64980$var$GET_INFO;
                    this.startLoop(cb);
                });
            }
        } else {
            const buf = $fc85ce8960e64980$require$concat(fragments, messageLength);
            if (!this._skipUTF8Validation && !$fc85ce8960e64980$require$isValidUTF8(buf)) {
                const error = this.createError(Error, 'invalid UTF-8 sequence', true, 1007, 'WS_ERR_INVALID_UTF8');
                cb(error);
                return;
            }
            if (this._state === $fc85ce8960e64980$var$INFLATING || this._allowSynchronousEvents) {
                this.emit('message', buf, false);
                this._state = $fc85ce8960e64980$var$GET_INFO;
            } else {
                this._state = $fc85ce8960e64980$var$DEFER_EVENT;
                setImmediate(()=>{
                    this.emit('message', buf, false);
                    this._state = $fc85ce8960e64980$var$GET_INFO;
                    this.startLoop(cb);
                });
            }
        }
    }
    /**
   * Handles a control message.
   *
   * @param {Buffer} data Data to handle
   * @return {(Error|RangeError|undefined)} A possible error
   * @private
   */ controlMessage(data, cb) {
        if (this._opcode === 0x08) {
            if (data.length === 0) {
                this._loop = false;
                this.emit('conclude', 1005, $fc85ce8960e64980$require$EMPTY_BUFFER);
                this.end();
            } else {
                const code = data.readUInt16BE(0);
                if (!$fc85ce8960e64980$require$isValidStatusCode(code)) {
                    const error = this.createError(RangeError, `invalid status code ${code}`, true, 1002, 'WS_ERR_INVALID_CLOSE_CODE');
                    cb(error);
                    return;
                }
                const buf = new $fc85ce8960e64980$var$FastBuffer(data.buffer, data.byteOffset + 2, data.length - 2);
                if (!this._skipUTF8Validation && !$fc85ce8960e64980$require$isValidUTF8(buf)) {
                    const error = this.createError(Error, 'invalid UTF-8 sequence', true, 1007, 'WS_ERR_INVALID_UTF8');
                    cb(error);
                    return;
                }
                this._loop = false;
                this.emit('conclude', code, buf);
                this.end();
            }
            this._state = $fc85ce8960e64980$var$GET_INFO;
            return;
        }
        if (this._allowSynchronousEvents) {
            this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);
            this._state = $fc85ce8960e64980$var$GET_INFO;
        } else {
            this._state = $fc85ce8960e64980$var$DEFER_EVENT;
            setImmediate(()=>{
                this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);
                this._state = $fc85ce8960e64980$var$GET_INFO;
                this.startLoop(cb);
            });
        }
    }
    /**
   * Builds an error object.
   *
   * @param {function(new:Error|RangeError)} ErrorCtor The error constructor
   * @param {String} message The error message
   * @param {Boolean} prefix Specifies whether or not to add a default prefix to
   *     `message`
   * @param {Number} statusCode The status code
   * @param {String} errorCode The exposed error code
   * @return {(Error|RangeError)} The error
   * @private
   */ createError(ErrorCtor, message, prefix, statusCode, errorCode) {
        this._loop = false;
        this._errored = true;
        const err = new ErrorCtor(prefix ? `Invalid WebSocket frame: ${message}` : message);
        Error.captureStackTrace(err, this.createError);
        err.code = errorCode;
        err[$fc85ce8960e64980$require$kStatusCode] = statusCode;
        return err;
    }
}
module.exports = $fc85ce8960e64980$var$Receiver;

});
parcelRegister("iVvbT", function(module, exports) {
'use strict';


var $jH0do = parcelRequire("jH0do");

var $1euHY = parcelRequire("1euHY");

var $g2eNi = parcelRequire("g2eNi");
var $dc75beb351c2a73c$require$kStatusCode = $g2eNi.kStatusCode;
const $dc75beb351c2a73c$var$FastBuffer = Buffer[Symbol.species];
const $dc75beb351c2a73c$var$TRAILER = Buffer.from([
    0x00,
    0x00,
    0xff,
    0xff
]);
const $dc75beb351c2a73c$var$kPerMessageDeflate = Symbol('permessage-deflate');
const $dc75beb351c2a73c$var$kTotalLength = Symbol('total-length');
const $dc75beb351c2a73c$var$kCallback = Symbol('callback');
const $dc75beb351c2a73c$var$kBuffers = Symbol('buffers');
const $dc75beb351c2a73c$var$kError = Symbol('error');
//
// We limit zlib concurrency, which prevents severe memory fragmentation
// as documented in https://github.com/nodejs/node/issues/8871#issuecomment-250915913
// and https://github.com/websockets/ws/issues/1202
//
// Intentionally global; it's the global thread pool that's an issue.
//
let $dc75beb351c2a73c$var$zlibLimiter;
/**
 * permessage-deflate implementation.
 */ class $dc75beb351c2a73c$var$PerMessageDeflate {
    /**
   * Creates a PerMessageDeflate instance.
   *
   * @param {Object} [options] Configuration options
   * @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support
   *     for, or request, a custom client window size
   * @param {Boolean} [options.clientNoContextTakeover=false] Advertise/
   *     acknowledge disabling of client context takeover
   * @param {Number} [options.concurrencyLimit=10] The number of concurrent
   *     calls to zlib
   * @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
   *     use of a custom server window size
   * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
   *     disabling of server context takeover
   * @param {Number} [options.threshold=1024] Size (in bytes) below which
   *     messages should not be compressed if context takeover is disabled
   * @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on
   *     deflate
   * @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
   *     inflate
   * @param {Boolean} [isServer=false] Create the instance in either server or
   *     client mode
   * @param {Number} [maxPayload=0] The maximum allowed message length
   */ constructor(options, isServer, maxPayload){
        this._maxPayload = maxPayload | 0;
        this._options = options || {};
        this._threshold = this._options.threshold !== undefined ? this._options.threshold : 1024;
        this._isServer = !!isServer;
        this._deflate = null;
        this._inflate = null;
        this.params = null;
        if (!$dc75beb351c2a73c$var$zlibLimiter) {
            const concurrency = this._options.concurrencyLimit !== undefined ? this._options.concurrencyLimit : 10;
            $dc75beb351c2a73c$var$zlibLimiter = new $1euHY(concurrency);
        }
    }
    /**
   * @type {String}
   */ static get extensionName() {
        return 'permessage-deflate';
    }
    /**
   * Create an extension negotiation offer.
   *
   * @return {Object} Extension parameters
   * @public
   */ offer() {
        const params = {};
        if (this._options.serverNoContextTakeover) params.server_no_context_takeover = true;
        if (this._options.clientNoContextTakeover) params.client_no_context_takeover = true;
        if (this._options.serverMaxWindowBits) params.server_max_window_bits = this._options.serverMaxWindowBits;
        if (this._options.clientMaxWindowBits) params.client_max_window_bits = this._options.clientMaxWindowBits;
        else if (this._options.clientMaxWindowBits == null) params.client_max_window_bits = true;
        return params;
    }
    /**
   * Accept an extension negotiation offer/response.
   *
   * @param {Array} configurations The extension negotiation offers/reponse
   * @return {Object} Accepted configuration
   * @public
   */ accept(configurations) {
        configurations = this.normalizeParams(configurations);
        this.params = this._isServer ? this.acceptAsServer(configurations) : this.acceptAsClient(configurations);
        return this.params;
    }
    /**
   * Releases all resources used by the extension.
   *
   * @public
   */ cleanup() {
        if (this._inflate) {
            this._inflate.close();
            this._inflate = null;
        }
        if (this._deflate) {
            const callback = this._deflate[$dc75beb351c2a73c$var$kCallback];
            this._deflate.close();
            this._deflate = null;
            if (callback) callback(new Error('The deflate stream was closed while data was being processed'));
        }
    }
    /**
   *  Accept an extension negotiation offer.
   *
   * @param {Array} offers The extension negotiation offers
   * @return {Object} Accepted configuration
   * @private
   */ acceptAsServer(offers) {
        const opts = this._options;
        const accepted = offers.find((params)=>{
            if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === 'number' && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === 'number' && !params.client_max_window_bits) return false;
            return true;
        });
        if (!accepted) throw new Error('None of the extension offers can be accepted');
        if (opts.serverNoContextTakeover) accepted.server_no_context_takeover = true;
        if (opts.clientNoContextTakeover) accepted.client_no_context_takeover = true;
        if (typeof opts.serverMaxWindowBits === 'number') accepted.server_max_window_bits = opts.serverMaxWindowBits;
        if (typeof opts.clientMaxWindowBits === 'number') accepted.client_max_window_bits = opts.clientMaxWindowBits;
        else if (accepted.client_max_window_bits === true || opts.clientMaxWindowBits === false) delete accepted.client_max_window_bits;
        return accepted;
    }
    /**
   * Accept the extension negotiation response.
   *
   * @param {Array} response The extension negotiation response
   * @return {Object} Accepted configuration
   * @private
   */ acceptAsClient(response) {
        const params = response[0];
        if (this._options.clientNoContextTakeover === false && params.client_no_context_takeover) throw new Error('Unexpected parameter "client_no_context_takeover"');
        if (!params.client_max_window_bits) {
            if (typeof this._options.clientMaxWindowBits === 'number') params.client_max_window_bits = this._options.clientMaxWindowBits;
        } else if (this._options.clientMaxWindowBits === false || typeof this._options.clientMaxWindowBits === 'number' && params.client_max_window_bits > this._options.clientMaxWindowBits) throw new Error('Unexpected or invalid parameter "client_max_window_bits"');
        return params;
    }
    /**
   * Normalize parameters.
   *
   * @param {Array} configurations The extension negotiation offers/reponse
   * @return {Array} The offers/response with normalized parameters
   * @private
   */ normalizeParams(configurations) {
        configurations.forEach((params)=>{
            Object.keys(params).forEach((key)=>{
                let value = params[key];
                if (value.length > 1) throw new Error(`Parameter "${key}" must have only a single value`);
                value = value[0];
                if (key === 'client_max_window_bits') {
                    if (value !== true) {
                        const num = +value;
                        if (!Number.isInteger(num) || num < 8 || num > 15) throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
                        value = num;
                    } else if (!this._isServer) throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
                } else if (key === 'server_max_window_bits') {
                    const num = +value;
                    if (!Number.isInteger(num) || num < 8 || num > 15) throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
                    value = num;
                } else if (key === 'client_no_context_takeover' || key === 'server_no_context_takeover') {
                    if (value !== true) throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
                } else throw new Error(`Unknown parameter "${key}"`);
                params[key] = value;
            });
        });
        return configurations;
    }
    /**
   * Decompress data. Concurrency limited.
   *
   * @param {Buffer} data Compressed data
   * @param {Boolean} fin Specifies whether or not this is the last fragment
   * @param {Function} callback Callback
   * @public
   */ decompress(data, fin, callback) {
        $dc75beb351c2a73c$var$zlibLimiter.add((done)=>{
            this._decompress(data, fin, (err, result)=>{
                done();
                callback(err, result);
            });
        });
    }
    /**
   * Compress data. Concurrency limited.
   *
   * @param {(Buffer|String)} data Data to compress
   * @param {Boolean} fin Specifies whether or not this is the last fragment
   * @param {Function} callback Callback
   * @public
   */ compress(data, fin, callback) {
        $dc75beb351c2a73c$var$zlibLimiter.add((done)=>{
            this._compress(data, fin, (err, result)=>{
                done();
                callback(err, result);
            });
        });
    }
    /**
   * Decompress data.
   *
   * @param {Buffer} data Compressed data
   * @param {Boolean} fin Specifies whether or not this is the last fragment
   * @param {Function} callback Callback
   * @private
   */ _decompress(data, fin, callback) {
        const endpoint = this._isServer ? 'client' : 'server';
        if (!this._inflate) {
            const key = `${endpoint}_max_window_bits`;
            const windowBits = typeof this.params[key] !== 'number' ? $5HoLl$zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
            this._inflate = $5HoLl$zlib.createInflateRaw({
                ...this._options.zlibInflateOptions,
                windowBits: windowBits
            });
            this._inflate[$dc75beb351c2a73c$var$kPerMessageDeflate] = this;
            this._inflate[$dc75beb351c2a73c$var$kTotalLength] = 0;
            this._inflate[$dc75beb351c2a73c$var$kBuffers] = [];
            this._inflate.on('error', $dc75beb351c2a73c$var$inflateOnError);
            this._inflate.on('data', $dc75beb351c2a73c$var$inflateOnData);
        }
        this._inflate[$dc75beb351c2a73c$var$kCallback] = callback;
        this._inflate.write(data);
        if (fin) this._inflate.write($dc75beb351c2a73c$var$TRAILER);
        this._inflate.flush(()=>{
            const err = this._inflate[$dc75beb351c2a73c$var$kError];
            if (err) {
                this._inflate.close();
                this._inflate = null;
                callback(err);
                return;
            }
            const data = $jH0do.concat(this._inflate[$dc75beb351c2a73c$var$kBuffers], this._inflate[$dc75beb351c2a73c$var$kTotalLength]);
            if (this._inflate._readableState.endEmitted) {
                this._inflate.close();
                this._inflate = null;
            } else {
                this._inflate[$dc75beb351c2a73c$var$kTotalLength] = 0;
                this._inflate[$dc75beb351c2a73c$var$kBuffers] = [];
                if (fin && this.params[`${endpoint}_no_context_takeover`]) this._inflate.reset();
            }
            callback(null, data);
        });
    }
    /**
   * Compress data.
   *
   * @param {(Buffer|String)} data Data to compress
   * @param {Boolean} fin Specifies whether or not this is the last fragment
   * @param {Function} callback Callback
   * @private
   */ _compress(data, fin, callback) {
        const endpoint = this._isServer ? 'server' : 'client';
        if (!this._deflate) {
            const key = `${endpoint}_max_window_bits`;
            const windowBits = typeof this.params[key] !== 'number' ? $5HoLl$zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
            this._deflate = $5HoLl$zlib.createDeflateRaw({
                ...this._options.zlibDeflateOptions,
                windowBits: windowBits
            });
            this._deflate[$dc75beb351c2a73c$var$kTotalLength] = 0;
            this._deflate[$dc75beb351c2a73c$var$kBuffers] = [];
            this._deflate.on('data', $dc75beb351c2a73c$var$deflateOnData);
        }
        this._deflate[$dc75beb351c2a73c$var$kCallback] = callback;
        this._deflate.write(data);
        this._deflate.flush($5HoLl$zlib.Z_SYNC_FLUSH, ()=>{
            if (!this._deflate) //
            // The deflate stream was closed while data was being processed.
            //
            return;
            let data = $jH0do.concat(this._deflate[$dc75beb351c2a73c$var$kBuffers], this._deflate[$dc75beb351c2a73c$var$kTotalLength]);
            if (fin) data = new $dc75beb351c2a73c$var$FastBuffer(data.buffer, data.byteOffset, data.length - 4);
            //
            // Ensure that the callback will not be called again in
            // `PerMessageDeflate#cleanup()`.
            //
            this._deflate[$dc75beb351c2a73c$var$kCallback] = null;
            this._deflate[$dc75beb351c2a73c$var$kTotalLength] = 0;
            this._deflate[$dc75beb351c2a73c$var$kBuffers] = [];
            if (fin && this.params[`${endpoint}_no_context_takeover`]) this._deflate.reset();
            callback(null, data);
        });
    }
}
module.exports = $dc75beb351c2a73c$var$PerMessageDeflate;
/**
 * The listener of the `zlib.DeflateRaw` stream `'data'` event.
 *
 * @param {Buffer} chunk A chunk of data
 * @private
 */ function $dc75beb351c2a73c$var$deflateOnData(chunk) {
    this[$dc75beb351c2a73c$var$kBuffers].push(chunk);
    this[$dc75beb351c2a73c$var$kTotalLength] += chunk.length;
}
/**
 * The listener of the `zlib.InflateRaw` stream `'data'` event.
 *
 * @param {Buffer} chunk A chunk of data
 * @private
 */ function $dc75beb351c2a73c$var$inflateOnData(chunk) {
    this[$dc75beb351c2a73c$var$kTotalLength] += chunk.length;
    if (this[$dc75beb351c2a73c$var$kPerMessageDeflate]._maxPayload < 1 || this[$dc75beb351c2a73c$var$kTotalLength] <= this[$dc75beb351c2a73c$var$kPerMessageDeflate]._maxPayload) {
        this[$dc75beb351c2a73c$var$kBuffers].push(chunk);
        return;
    }
    this[$dc75beb351c2a73c$var$kError] = new RangeError('Max payload size exceeded');
    this[$dc75beb351c2a73c$var$kError].code = 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH';
    this[$dc75beb351c2a73c$var$kError][$dc75beb351c2a73c$require$kStatusCode] = 1009;
    this.removeListener('data', $dc75beb351c2a73c$var$inflateOnData);
    //
    // The choice to employ `zlib.reset()` over `zlib.close()` is dictated by the
    // fact that in Node.js versions prior to 13.10.0, the callback for
    // `zlib.flush()` is not called if `zlib.close()` is used. Utilizing
    // `zlib.reset()` ensures that either the callback is invoked or an error is
    // emitted.
    //
    this.reset();
}
/**
 * The listener of the `zlib.InflateRaw` stream `'error'` event.
 *
 * @param {Error} err The emitted error
 * @private
 */ function $dc75beb351c2a73c$var$inflateOnError(err) {
    //
    // There is no need to call `Zlib#close()` as the handle is automatically
    // closed when an error is emitted.
    //
    this[$dc75beb351c2a73c$var$kPerMessageDeflate]._inflate = null;
    if (this[$dc75beb351c2a73c$var$kError]) {
        this[$dc75beb351c2a73c$var$kCallback](this[$dc75beb351c2a73c$var$kError]);
        return;
    }
    err[$dc75beb351c2a73c$require$kStatusCode] = 1007;
    this[$dc75beb351c2a73c$var$kCallback](err);
}

});
parcelRegister("jH0do", function(module, exports) {
'use strict';

var $g2eNi = parcelRequire("g2eNi");
var $e562332c4ab36961$require$EMPTY_BUFFER = $g2eNi.EMPTY_BUFFER;
const $e562332c4ab36961$var$FastBuffer = Buffer[Symbol.species];
/**
 * Merges an array of buffers into a new buffer.
 *
 * @param {Buffer[]} list The array of buffers to concat
 * @param {Number} totalLength The total length of buffers in the list
 * @return {Buffer} The resulting buffer
 * @public
 */ function $e562332c4ab36961$var$concat(list, totalLength) {
    if (list.length === 0) return $e562332c4ab36961$require$EMPTY_BUFFER;
    if (list.length === 1) return list[0];
    const target = Buffer.allocUnsafe(totalLength);
    let offset = 0;
    for(let i = 0; i < list.length; i++){
        const buf = list[i];
        target.set(buf, offset);
        offset += buf.length;
    }
    if (offset < totalLength) return new $e562332c4ab36961$var$FastBuffer(target.buffer, target.byteOffset, offset);
    return target;
}
/**
 * Masks a buffer using the given mask.
 *
 * @param {Buffer} source The buffer to mask
 * @param {Buffer} mask The mask to use
 * @param {Buffer} output The buffer where to store the result
 * @param {Number} offset The offset at which to start writing
 * @param {Number} length The number of bytes to mask.
 * @public
 */ function $e562332c4ab36961$var$_mask(source, mask, output, offset, length) {
    for(let i = 0; i < length; i++)output[offset + i] = source[i] ^ mask[i & 3];
}
/**
 * Unmasks a buffer using the given mask.
 *
 * @param {Buffer} buffer The buffer to unmask
 * @param {Buffer} mask The mask to use
 * @public
 */ function $e562332c4ab36961$var$_unmask(buffer, mask) {
    for(let i = 0; i < buffer.length; i++)buffer[i] ^= mask[i & 3];
}
/**
 * Converts a buffer to an `ArrayBuffer`.
 *
 * @param {Buffer} buf The buffer to convert
 * @return {ArrayBuffer} Converted buffer
 * @public
 */ function $e562332c4ab36961$var$toArrayBuffer(buf) {
    if (buf.length === buf.buffer.byteLength) return buf.buffer;
    return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);
}
/**
 * Converts `data` to a `Buffer`.
 *
 * @param {*} data The data to convert
 * @return {Buffer} The buffer
 * @throws {TypeError}
 * @public
 */ function $e562332c4ab36961$var$toBuffer(data) {
    $e562332c4ab36961$var$toBuffer.readOnly = true;
    if (Buffer.isBuffer(data)) return data;
    let buf;
    if (data instanceof ArrayBuffer) buf = new $e562332c4ab36961$var$FastBuffer(data);
    else if (ArrayBuffer.isView(data)) buf = new $e562332c4ab36961$var$FastBuffer(data.buffer, data.byteOffset, data.byteLength);
    else {
        buf = Buffer.from(data);
        $e562332c4ab36961$var$toBuffer.readOnly = false;
    }
    return buf;
}
module.exports = {
    concat: $e562332c4ab36961$var$concat,
    mask: $e562332c4ab36961$var$_mask,
    toArrayBuffer: $e562332c4ab36961$var$toArrayBuffer,
    toBuffer: $e562332c4ab36961$var$toBuffer,
    unmask: $e562332c4ab36961$var$_unmask
};

/* istanbul ignore else  */ if (!process.env.WS_NO_BUFFER_UTIL) try {
    const bufferUtil = $e562332c4ab36961$import$8b5037d33e2670b;
    module.exports.mask = function(source, mask, output, offset, length) {
        if (length < 48) $e562332c4ab36961$var$_mask(source, mask, output, offset, length);
        else bufferUtil.mask(source, mask, output, offset, length);
    };
    module.exports.unmask = function(buffer, mask) {
        if (buffer.length < 32) $e562332c4ab36961$var$_unmask(buffer, mask);
        else bufferUtil.unmask(buffer, mask);
    };
} catch (e) {
// Continue regardless of the error.
}

});
parcelRegister("g2eNi", function(module, exports) {
'use strict';
const $bac84f0b4189f3d7$var$BINARY_TYPES = [
    'nodebuffer',
    'arraybuffer',
    'fragments'
];
const $bac84f0b4189f3d7$var$hasBlob = typeof Blob !== 'undefined';
if ($bac84f0b4189f3d7$var$hasBlob) $bac84f0b4189f3d7$var$BINARY_TYPES.push('blob');
module.exports = {
    BINARY_TYPES: $bac84f0b4189f3d7$var$BINARY_TYPES,
    EMPTY_BUFFER: Buffer.alloc(0),
    GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11',
    hasBlob: $bac84f0b4189f3d7$var$hasBlob,
    kForOnEventAttribute: Symbol('kIsForOnEventAttribute'),
    kListener: Symbol('kListener'),
    kStatusCode: Symbol('status-code'),
    kWebSocket: Symbol('websocket'),
    NOOP: ()=>{}
};

});


parcelRegister("1euHY", function(module, exports) {
'use strict';
const $0e5eeb4a6d884630$var$kDone = Symbol('kDone');
const $0e5eeb4a6d884630$var$kRun = Symbol('kRun');
/**
 * A very simple job queue with adjustable concurrency. Adapted from
 * https://github.com/STRML/async-limiter
 */ class $0e5eeb4a6d884630$var$Limiter {
    /**
   * Creates a new `Limiter`.
   *
   * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed
   *     to run concurrently
   */ constructor(concurrency){
        this[$0e5eeb4a6d884630$var$kDone] = ()=>{
            this.pending--;
            this[$0e5eeb4a6d884630$var$kRun]();
        };
        this.concurrency = concurrency || Infinity;
        this.jobs = [];
        this.pending = 0;
    }
    /**
   * Adds a job to the queue.
   *
   * @param {Function} job The job to run
   * @public
   */ add(job) {
        this.jobs.push(job);
        this[$0e5eeb4a6d884630$var$kRun]();
    }
    /**
   * Removes a job from the queue and runs it if possible.
   *
   * @private
   */ [$0e5eeb4a6d884630$var$kRun]() {
        if (this.pending === this.concurrency) return;
        if (this.jobs.length) {
            const job = this.jobs.shift();
            this.pending++;
            job(this[$0e5eeb4a6d884630$var$kDone]);
        }
    }
}
module.exports = $0e5eeb4a6d884630$var$Limiter;

});


parcelRegister("9CIgd", function(module, exports) {
'use strict';

var $7019fee278e1c3eb$require$isUtf8 = $5HoLl$buffer.isUtf8;

var $g2eNi = parcelRequire("g2eNi");
var $7019fee278e1c3eb$require$hasBlob = $g2eNi.hasBlob;
//
// Allowed token characters:
//
// '!', '#', '$', '%', '&', ''', '*', '+', '-',
// '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~'
//
// tokenChars[32] === 0 // ' '
// tokenChars[33] === 1 // '!'
// tokenChars[34] === 0 // '"'
// ...
//
// prettier-ignore
const $7019fee278e1c3eb$var$tokenChars = [
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    0,
    1,
    1,
    1,
    1,
    1,
    0,
    0,
    1,
    1,
    0,
    1,
    1,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    0,
    1,
    0,
    1,
    0 // 112 - 127
];
/**
 * Checks if a status code is allowed in a close frame.
 *
 * @param {Number} code The status code
 * @return {Boolean} `true` if the status code is valid, else `false`
 * @public
 */ function $7019fee278e1c3eb$var$isValidStatusCode(code) {
    return code >= 1000 && code <= 1014 && code !== 1004 && code !== 1005 && code !== 1006 || code >= 3000 && code <= 4999;
}
/**
 * Checks if a given buffer contains only correct UTF-8.
 * Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by
 * Markus Kuhn.
 *
 * @param {Buffer} buf The buffer to check
 * @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false`
 * @public
 */ function $7019fee278e1c3eb$var$_isValidUTF8(buf) {
    const len = buf.length;
    let i = 0;
    while(i < len){
        if ((buf[i] & 0x80) === 0) // 0xxxxxxx
        i++;
        else if ((buf[i] & 0xe0) === 0xc0) {
            // 110xxxxx 10xxxxxx
            if (i + 1 === len || (buf[i + 1] & 0xc0) !== 0x80 || (buf[i] & 0xfe) === 0xc0 // Overlong
            ) return false;
            i += 2;
        } else if ((buf[i] & 0xf0) === 0xe0) {
            // 1110xxxx 10xxxxxx 10xxxxxx
            if (i + 2 >= len || (buf[i + 1] & 0xc0) !== 0x80 || (buf[i + 2] & 0xc0) !== 0x80 || buf[i] === 0xe0 && (buf[i + 1] & 0xe0) === 0x80 || // Overlong
            buf[i] === 0xed && (buf[i + 1] & 0xe0) === 0xa0 // Surrogate (U+D800 - U+DFFF)
            ) return false;
            i += 3;
        } else if ((buf[i] & 0xf8) === 0xf0) {
            // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
            if (i + 3 >= len || (buf[i + 1] & 0xc0) !== 0x80 || (buf[i + 2] & 0xc0) !== 0x80 || (buf[i + 3] & 0xc0) !== 0x80 || buf[i] === 0xf0 && (buf[i + 1] & 0xf0) === 0x80 || // Overlong
            buf[i] === 0xf4 && buf[i + 1] > 0x8f || buf[i] > 0xf4 // > U+10FFFF
            ) return false;
            i += 4;
        } else return false;
    }
    return true;
}
/**
 * Determines whether a value is a `Blob`.
 *
 * @param {*} value The value to be tested
 * @return {Boolean} `true` if `value` is a `Blob`, else `false`
 * @private
 */ function $7019fee278e1c3eb$var$isBlob(value) {
    return $7019fee278e1c3eb$require$hasBlob && typeof value === 'object' && typeof value.arrayBuffer === 'function' && typeof value.type === 'string' && typeof value.stream === 'function' && (value[Symbol.toStringTag] === 'Blob' || value[Symbol.toStringTag] === 'File');
}
module.exports = {
    isBlob: $7019fee278e1c3eb$var$isBlob,
    isValidStatusCode: $7019fee278e1c3eb$var$isValidStatusCode,
    isValidUTF8: $7019fee278e1c3eb$var$_isValidUTF8,
    tokenChars: $7019fee278e1c3eb$var$tokenChars
};

if ($7019fee278e1c3eb$require$isUtf8) module.exports.isValidUTF8 = function(buf) {
    return buf.length < 24 ? $7019fee278e1c3eb$var$_isValidUTF8(buf) : $7019fee278e1c3eb$require$isUtf8(buf);
};
else if (!process.env.WS_NO_UTF_8_VALIDATE) try {
    const isValidUTF8 = $7019fee278e1c3eb$import$d1e5aed6682b23d4;
    module.exports.isValidUTF8 = function(buf) {
        return buf.length < 32 ? $7019fee278e1c3eb$var$_isValidUTF8(buf) : isValidUTF8(buf);
    };
} catch (e) {
// Continue regardless of the error.
}

});


parcelRegister("4qdR9", function(module, exports) {
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex" }] */ 'use strict';

var $338456ae0369427b$require$Duplex = $5HoLl$stream.Duplex;

var $338456ae0369427b$require$randomFillSync = $5HoLl$crypto.randomFillSync;

var $iVvbT = parcelRequire("iVvbT");

var $g2eNi = parcelRequire("g2eNi");
var $338456ae0369427b$require$EMPTY_BUFFER = $g2eNi.EMPTY_BUFFER;
var $338456ae0369427b$require$kWebSocket = $g2eNi.kWebSocket;
var $338456ae0369427b$require$NOOP = $g2eNi.NOOP;

var $9CIgd = parcelRequire("9CIgd");
var $338456ae0369427b$require$isBlob = $9CIgd.isBlob;
var $338456ae0369427b$require$isValidStatusCode = $9CIgd.isValidStatusCode;

var $jH0do = parcelRequire("jH0do");
var $338456ae0369427b$require$applyMask = $jH0do.mask;
var $338456ae0369427b$require$toBuffer = $jH0do.toBuffer;
const $338456ae0369427b$var$kByteLength = Symbol('kByteLength');
const $338456ae0369427b$var$maskBuffer = Buffer.alloc(4);
const $338456ae0369427b$var$RANDOM_POOL_SIZE = 8192;
let $338456ae0369427b$var$randomPool;
let $338456ae0369427b$var$randomPoolPointer = $338456ae0369427b$var$RANDOM_POOL_SIZE;
const $338456ae0369427b$var$DEFAULT = 0;
const $338456ae0369427b$var$DEFLATING = 1;
const $338456ae0369427b$var$GET_BLOB_DATA = 2;
/**
 * HyBi Sender implementation.
 */ class $338456ae0369427b$var$Sender {
    /**
   * Creates a Sender instance.
   *
   * @param {Duplex} socket The connection socket
   * @param {Object} [extensions] An object containing the negotiated extensions
   * @param {Function} [generateMask] The function used to generate the masking
   *     key
   */ constructor(socket, extensions, generateMask){
        this._extensions = extensions || {};
        if (generateMask) {
            this._generateMask = generateMask;
            this._maskBuffer = Buffer.alloc(4);
        }
        this._socket = socket;
        this._firstFragment = true;
        this._compress = false;
        this._bufferedBytes = 0;
        this._queue = [];
        this._state = $338456ae0369427b$var$DEFAULT;
        this.onerror = $338456ae0369427b$require$NOOP;
        this[$338456ae0369427b$require$kWebSocket] = undefined;
    }
    /**
   * Frames a piece of data according to the HyBi WebSocket protocol.
   *
   * @param {(Buffer|String)} data The data to frame
   * @param {Object} options Options object
   * @param {Boolean} [options.fin=false] Specifies whether or not to set the
   *     FIN bit
   * @param {Function} [options.generateMask] The function used to generate the
   *     masking key
   * @param {Boolean} [options.mask=false] Specifies whether or not to mask
   *     `data`
   * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
   *     key
   * @param {Number} options.opcode The opcode
   * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
   *     modified
   * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
   *     RSV1 bit
   * @return {(Buffer|String)[]} The framed data
   * @public
   */ static frame(data, options) {
        let mask;
        let merge = false;
        let offset = 2;
        let skipMasking = false;
        if (options.mask) {
            mask = options.maskBuffer || $338456ae0369427b$var$maskBuffer;
            if (options.generateMask) options.generateMask(mask);
            else {
                if ($338456ae0369427b$var$randomPoolPointer === $338456ae0369427b$var$RANDOM_POOL_SIZE) {
                    /* istanbul ignore else  */ if ($338456ae0369427b$var$randomPool === undefined) //
                    // This is lazily initialized because server-sent frames must not
                    // be masked so it may never be used.
                    //
                    $338456ae0369427b$var$randomPool = Buffer.alloc($338456ae0369427b$var$RANDOM_POOL_SIZE);
                    $338456ae0369427b$require$randomFillSync($338456ae0369427b$var$randomPool, 0, $338456ae0369427b$var$RANDOM_POOL_SIZE);
                    $338456ae0369427b$var$randomPoolPointer = 0;
                }
                mask[0] = $338456ae0369427b$var$randomPool[$338456ae0369427b$var$randomPoolPointer++];
                mask[1] = $338456ae0369427b$var$randomPool[$338456ae0369427b$var$randomPoolPointer++];
                mask[2] = $338456ae0369427b$var$randomPool[$338456ae0369427b$var$randomPoolPointer++];
                mask[3] = $338456ae0369427b$var$randomPool[$338456ae0369427b$var$randomPoolPointer++];
            }
            skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0;
            offset = 6;
        }
        let dataLength;
        if (typeof data === 'string') {
            if ((!options.mask || skipMasking) && options[$338456ae0369427b$var$kByteLength] !== undefined) dataLength = options[$338456ae0369427b$var$kByteLength];
            else {
                data = Buffer.from(data);
                dataLength = data.length;
            }
        } else {
            dataLength = data.length;
            merge = options.mask && options.readOnly && !skipMasking;
        }
        let payloadLength = dataLength;
        if (dataLength >= 65536) {
            offset += 8;
            payloadLength = 127;
        } else if (dataLength > 125) {
            offset += 2;
            payloadLength = 126;
        }
        const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset);
        target[0] = options.fin ? options.opcode | 0x80 : options.opcode;
        if (options.rsv1) target[0] |= 0x40;
        target[1] = payloadLength;
        if (payloadLength === 126) target.writeUInt16BE(dataLength, 2);
        else if (payloadLength === 127) {
            target[2] = target[3] = 0;
            target.writeUIntBE(dataLength, 4, 6);
        }
        if (!options.mask) return [
            target,
            data
        ];
        target[1] |= 0x80;
        target[offset - 4] = mask[0];
        target[offset - 3] = mask[1];
        target[offset - 2] = mask[2];
        target[offset - 1] = mask[3];
        if (skipMasking) return [
            target,
            data
        ];
        if (merge) {
            $338456ae0369427b$require$applyMask(data, mask, target, offset, dataLength);
            return [
                target
            ];
        }
        $338456ae0369427b$require$applyMask(data, mask, data, 0, dataLength);
        return [
            target,
            data
        ];
    }
    /**
   * Sends a close message to the other peer.
   *
   * @param {Number} [code] The status code component of the body
   * @param {(String|Buffer)} [data] The message component of the body
   * @param {Boolean} [mask=false] Specifies whether or not to mask the message
   * @param {Function} [cb] Callback
   * @public
   */ close(code, data, mask, cb) {
        let buf;
        if (code === undefined) buf = $338456ae0369427b$require$EMPTY_BUFFER;
        else if (typeof code !== 'number' || !$338456ae0369427b$require$isValidStatusCode(code)) throw new TypeError('First argument must be a valid error code number');
        else if (data === undefined || !data.length) {
            buf = Buffer.allocUnsafe(2);
            buf.writeUInt16BE(code, 0);
        } else {
            const length = Buffer.byteLength(data);
            if (length > 123) throw new RangeError('The message must not be greater than 123 bytes');
            buf = Buffer.allocUnsafe(2 + length);
            buf.writeUInt16BE(code, 0);
            if (typeof data === 'string') buf.write(data, 2);
            else buf.set(data, 2);
        }
        const options = {
            [$338456ae0369427b$var$kByteLength]: buf.length,
            fin: true,
            generateMask: this._generateMask,
            mask: mask,
            maskBuffer: this._maskBuffer,
            opcode: 0x08,
            readOnly: false,
            rsv1: false
        };
        if (this._state !== $338456ae0369427b$var$DEFAULT) this.enqueue([
            this.dispatch,
            buf,
            false,
            options,
            cb
        ]);
        else this.sendFrame($338456ae0369427b$var$Sender.frame(buf, options), cb);
    }
    /**
   * Sends a ping message to the other peer.
   *
   * @param {*} data The message to send
   * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
   * @param {Function} [cb] Callback
   * @public
   */ ping(data, mask, cb) {
        let byteLength;
        let readOnly;
        if (typeof data === 'string') {
            byteLength = Buffer.byteLength(data);
            readOnly = false;
        } else if ($338456ae0369427b$require$isBlob(data)) {
            byteLength = data.size;
            readOnly = false;
        } else {
            data = $338456ae0369427b$require$toBuffer(data);
            byteLength = data.length;
            readOnly = $338456ae0369427b$require$toBuffer.readOnly;
        }
        if (byteLength > 125) throw new RangeError('The data size must not be greater than 125 bytes');
        const options = {
            [$338456ae0369427b$var$kByteLength]: byteLength,
            fin: true,
            generateMask: this._generateMask,
            mask: mask,
            maskBuffer: this._maskBuffer,
            opcode: 0x09,
            readOnly: readOnly,
            rsv1: false
        };
        if ($338456ae0369427b$require$isBlob(data)) {
            if (this._state !== $338456ae0369427b$var$DEFAULT) this.enqueue([
                this.getBlobData,
                data,
                false,
                options,
                cb
            ]);
            else this.getBlobData(data, false, options, cb);
        } else if (this._state !== $338456ae0369427b$var$DEFAULT) this.enqueue([
            this.dispatch,
            data,
            false,
            options,
            cb
        ]);
        else this.sendFrame($338456ae0369427b$var$Sender.frame(data, options), cb);
    }
    /**
   * Sends a pong message to the other peer.
   *
   * @param {*} data The message to send
   * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
   * @param {Function} [cb] Callback
   * @public
   */ pong(data, mask, cb) {
        let byteLength;
        let readOnly;
        if (typeof data === 'string') {
            byteLength = Buffer.byteLength(data);
            readOnly = false;
        } else if ($338456ae0369427b$require$isBlob(data)) {
            byteLength = data.size;
            readOnly = false;
        } else {
            data = $338456ae0369427b$require$toBuffer(data);
            byteLength = data.length;
            readOnly = $338456ae0369427b$require$toBuffer.readOnly;
        }
        if (byteLength > 125) throw new RangeError('The data size must not be greater than 125 bytes');
        const options = {
            [$338456ae0369427b$var$kByteLength]: byteLength,
            fin: true,
            generateMask: this._generateMask,
            mask: mask,
            maskBuffer: this._maskBuffer,
            opcode: 0x0a,
            readOnly: readOnly,
            rsv1: false
        };
        if ($338456ae0369427b$require$isBlob(data)) {
            if (this._state !== $338456ae0369427b$var$DEFAULT) this.enqueue([
                this.getBlobData,
                data,
                false,
                options,
                cb
            ]);
            else this.getBlobData(data, false, options, cb);
        } else if (this._state !== $338456ae0369427b$var$DEFAULT) this.enqueue([
            this.dispatch,
            data,
            false,
            options,
            cb
        ]);
        else this.sendFrame($338456ae0369427b$var$Sender.frame(data, options), cb);
    }
    /**
   * Sends a data message to the other peer.
   *
   * @param {*} data The message to send
   * @param {Object} options Options object
   * @param {Boolean} [options.binary=false] Specifies whether `data` is binary
   *     or text
   * @param {Boolean} [options.compress=false] Specifies whether or not to
   *     compress `data`
   * @param {Boolean} [options.fin=false] Specifies whether the fragment is the
   *     last one
   * @param {Boolean} [options.mask=false] Specifies whether or not to mask
   *     `data`
   * @param {Function} [cb] Callback
   * @public
   */ send(data, options, cb) {
        const perMessageDeflate = this._extensions[$iVvbT.extensionName];
        let opcode = options.binary ? 2 : 1;
        let rsv1 = options.compress;
        let byteLength;
        let readOnly;
        if (typeof data === 'string') {
            byteLength = Buffer.byteLength(data);
            readOnly = false;
        } else if ($338456ae0369427b$require$isBlob(data)) {
            byteLength = data.size;
            readOnly = false;
        } else {
            data = $338456ae0369427b$require$toBuffer(data);
            byteLength = data.length;
            readOnly = $338456ae0369427b$require$toBuffer.readOnly;
        }
        if (this._firstFragment) {
            this._firstFragment = false;
            if (rsv1 && perMessageDeflate && perMessageDeflate.params[perMessageDeflate._isServer ? 'server_no_context_takeover' : 'client_no_context_takeover']) rsv1 = byteLength >= perMessageDeflate._threshold;
            this._compress = rsv1;
        } else {
            rsv1 = false;
            opcode = 0;
        }
        if (options.fin) this._firstFragment = true;
        const opts = {
            [$338456ae0369427b$var$kByteLength]: byteLength,
            fin: options.fin,
            generateMask: this._generateMask,
            mask: options.mask,
            maskBuffer: this._maskBuffer,
            opcode: opcode,
            readOnly: readOnly,
            rsv1: rsv1
        };
        if ($338456ae0369427b$require$isBlob(data)) {
            if (this._state !== $338456ae0369427b$var$DEFAULT) this.enqueue([
                this.getBlobData,
                data,
                this._compress,
                opts,
                cb
            ]);
            else this.getBlobData(data, this._compress, opts, cb);
        } else if (this._state !== $338456ae0369427b$var$DEFAULT) this.enqueue([
            this.dispatch,
            data,
            this._compress,
            opts,
            cb
        ]);
        else this.dispatch(data, this._compress, opts, cb);
    }
    /**
   * Gets the contents of a blob as binary data.
   *
   * @param {Blob} blob The blob
   * @param {Boolean} [compress=false] Specifies whether or not to compress
   *     the data
   * @param {Object} options Options object
   * @param {Boolean} [options.fin=false] Specifies whether or not to set the
   *     FIN bit
   * @param {Function} [options.generateMask] The function used to generate the
   *     masking key
   * @param {Boolean} [options.mask=false] Specifies whether or not to mask
   *     `data`
   * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
   *     key
   * @param {Number} options.opcode The opcode
   * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
   *     modified
   * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
   *     RSV1 bit
   * @param {Function} [cb] Callback
   * @private
   */ getBlobData(blob, compress, options, cb) {
        this._bufferedBytes += options[$338456ae0369427b$var$kByteLength];
        this._state = $338456ae0369427b$var$GET_BLOB_DATA;
        blob.arrayBuffer().then((arrayBuffer)=>{
            if (this._socket.destroyed) {
                const err = new Error('The socket was closed while the blob was being read');
                //
                // `callCallbacks` is called in the next tick to ensure that errors
                // that might be thrown in the callbacks behave like errors thrown
                // outside the promise chain.
                //
                process.nextTick($338456ae0369427b$var$callCallbacks, this, err, cb);
                return;
            }
            this._bufferedBytes -= options[$338456ae0369427b$var$kByteLength];
            const data = $338456ae0369427b$require$toBuffer(arrayBuffer);
            if (!compress) {
                this._state = $338456ae0369427b$var$DEFAULT;
                this.sendFrame($338456ae0369427b$var$Sender.frame(data, options), cb);
                this.dequeue();
            } else this.dispatch(data, compress, options, cb);
        }).catch((err)=>{
            //
            // `onError` is called in the next tick for the same reason that
            // `callCallbacks` above is.
            //
            process.nextTick($338456ae0369427b$var$onError, this, err, cb);
        });
    }
    /**
   * Dispatches a message.
   *
   * @param {(Buffer|String)} data The message to send
   * @param {Boolean} [compress=false] Specifies whether or not to compress
   *     `data`
   * @param {Object} options Options object
   * @param {Boolean} [options.fin=false] Specifies whether or not to set the
   *     FIN bit
   * @param {Function} [options.generateMask] The function used to generate the
   *     masking key
   * @param {Boolean} [options.mask=false] Specifies whether or not to mask
   *     `data`
   * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
   *     key
   * @param {Number} options.opcode The opcode
   * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
   *     modified
   * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
   *     RSV1 bit
   * @param {Function} [cb] Callback
   * @private
   */ dispatch(data, compress, options, cb) {
        if (!compress) {
            this.sendFrame($338456ae0369427b$var$Sender.frame(data, options), cb);
            return;
        }
        const perMessageDeflate = this._extensions[$iVvbT.extensionName];
        this._bufferedBytes += options[$338456ae0369427b$var$kByteLength];
        this._state = $338456ae0369427b$var$DEFLATING;
        perMessageDeflate.compress(data, options.fin, (_, buf)=>{
            if (this._socket.destroyed) {
                const err = new Error('The socket was closed while data was being compressed');
                $338456ae0369427b$var$callCallbacks(this, err, cb);
                return;
            }
            this._bufferedBytes -= options[$338456ae0369427b$var$kByteLength];
            this._state = $338456ae0369427b$var$DEFAULT;
            options.readOnly = false;
            this.sendFrame($338456ae0369427b$var$Sender.frame(buf, options), cb);
            this.dequeue();
        });
    }
    /**
   * Executes queued send operations.
   *
   * @private
   */ dequeue() {
        while(this._state === $338456ae0369427b$var$DEFAULT && this._queue.length){
            const params = this._queue.shift();
            this._bufferedBytes -= params[3][$338456ae0369427b$var$kByteLength];
            Reflect.apply(params[0], this, params.slice(1));
        }
    }
    /**
   * Enqueues a send operation.
   *
   * @param {Array} params Send operation parameters.
   * @private
   */ enqueue(params) {
        this._bufferedBytes += params[3][$338456ae0369427b$var$kByteLength];
        this._queue.push(params);
    }
    /**
   * Sends a frame.
   *
   * @param {(Buffer | String)[]} list The frame to send
   * @param {Function} [cb] Callback
   * @private
   */ sendFrame(list, cb) {
        if (list.length === 2) {
            this._socket.cork();
            this._socket.write(list[0]);
            this._socket.write(list[1], cb);
            this._socket.uncork();
        } else this._socket.write(list[0], cb);
    }
}
module.exports = $338456ae0369427b$var$Sender;
/**
 * Calls queued callbacks with an error.
 *
 * @param {Sender} sender The `Sender` instance
 * @param {Error} err The error to call the callbacks with
 * @param {Function} [cb] The first callback
 * @private
 */ function $338456ae0369427b$var$callCallbacks(sender, err, cb) {
    if (typeof cb === 'function') cb(err);
    for(let i = 0; i < sender._queue.length; i++){
        const params = sender._queue[i];
        const callback = params[params.length - 1];
        if (typeof callback === 'function') callback(err);
    }
}
/**
 * Handles a `Sender` error.
 *
 * @param {Sender} sender The `Sender` instance
 * @param {Error} err The error
 * @param {Function} [cb] The first pending callback
 * @private
 */ function $338456ae0369427b$var$onError(sender, err, cb) {
    $338456ae0369427b$var$callCallbacks(sender, err, cb);
    sender.onerror(err);
}

});

parcelRegister("fDeTZ", function(module, exports) {
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^WebSocket$" }] */ 'use strict';
parcelRequire("j8Pq9");

var $b6160ec3ae9f702c$require$Duplex = $5HoLl$stream.Duplex;
/**
 * Emits the `'close'` event on a stream.
 *
 * @param {Duplex} stream The stream.
 * @private
 */ function $b6160ec3ae9f702c$var$emitClose(stream) {
    stream.emit('close');
}
/**
 * The listener of the `'end'` event.
 *
 * @private
 */ function $b6160ec3ae9f702c$var$duplexOnEnd() {
    if (!this.destroyed && this._writableState.finished) this.destroy();
}
/**
 * The listener of the `'error'` event.
 *
 * @param {Error} err The error
 * @private
 */ function $b6160ec3ae9f702c$var$duplexOnError(err) {
    this.removeListener('error', $b6160ec3ae9f702c$var$duplexOnError);
    this.destroy();
    if (this.listenerCount('error') === 0) // Do not suppress the throwing behavior.
    this.emit('error', err);
}
/**
 * Wraps a `WebSocket` in a duplex stream.
 *
 * @param {WebSocket} ws The `WebSocket` to wrap
 * @param {Object} [options] The options for the `Duplex` constructor
 * @return {Duplex} The duplex stream
 * @public
 */ function $b6160ec3ae9f702c$var$createWebSocketStream(ws, options) {
    let terminateOnDestroy = true;
    const duplex = new $b6160ec3ae9f702c$require$Duplex({
        ...options,
        autoDestroy: false,
        emitClose: false,
        objectMode: false,
        writableObjectMode: false
    });
    ws.on('message', function message(msg, isBinary) {
        const data = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
        if (!duplex.push(data)) ws.pause();
    });
    ws.once('error', function error(err) {
        if (duplex.destroyed) return;
        // Prevent `ws.terminate()` from being called by `duplex._destroy()`.
        //
        // - If the `'error'` event is emitted before the `'open'` event, then
        //   `ws.terminate()` is a noop as no socket is assigned.
        // - Otherwise, the error is re-emitted by the listener of the `'error'`
        //   event of the `Receiver` object. The listener already closes the
        //   connection by calling `ws.close()`. This allows a close frame to be
        //   sent to the other peer. If `ws.terminate()` is called right after this,
        //   then the close frame might not be sent.
        terminateOnDestroy = false;
        duplex.destroy(err);
    });
    ws.once('close', function close() {
        if (duplex.destroyed) return;
        duplex.push(null);
    });
    duplex._destroy = function(err, callback) {
        if (ws.readyState === ws.CLOSED) {
            callback(err);
            process.nextTick($b6160ec3ae9f702c$var$emitClose, duplex);
            return;
        }
        let called = false;
        ws.once('error', function error(err) {
            called = true;
            callback(err);
        });
        ws.once('close', function close() {
            if (!called) callback(err);
            process.nextTick($b6160ec3ae9f702c$var$emitClose, duplex);
        });
        if (terminateOnDestroy) ws.terminate();
    };
    duplex._final = function(callback) {
        if (ws.readyState === ws.CONNECTING) {
            ws.once('open', function open() {
                duplex._final(callback);
            });
            return;
        }
        // If the value of the `_socket` property is `null` it means that `ws` is a
        // client websocket and the handshake failed. In fact, when this happens, a
        // socket is never assigned to the websocket. Wait for the `'error'` event
        // that will be emitted by the websocket.
        if (ws._socket === null) return;
        if (ws._socket._writableState.finished) {
            callback();
            if (duplex._readableState.endEmitted) duplex.destroy();
        } else {
            ws._socket.once('finish', function finish() {
                // `duplex` is not destroyed here because the `'end'` event will be
                // emitted on `duplex` after this `'finish'` event. The EOF signaling
                // `null` chunk is, in fact, pushed when the websocket emits `'close'`.
                callback();
            });
            ws.close();
        }
    };
    duplex._read = function() {
        if (ws.isPaused) ws.resume();
    };
    duplex._write = function(chunk, encoding, callback) {
        if (ws.readyState === ws.CONNECTING) {
            ws.once('open', function open() {
                duplex._write(chunk, encoding, callback);
            });
            return;
        }
        ws.send(chunk, callback);
    };
    duplex.on('end', $b6160ec3ae9f702c$var$duplexOnEnd);
    duplex.on('error', $b6160ec3ae9f702c$var$duplexOnError);
    return duplex;
}
module.exports = $b6160ec3ae9f702c$var$createWebSocketStream;

});
parcelRegister("j8Pq9", function(module, exports) {
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$", "caughtErrors": "none" }] */ 'use strict';






var $def6a6c580c3db8e$require$randomBytes = $5HoLl$crypto.randomBytes;
var $def6a6c580c3db8e$require$createHash = $5HoLl$crypto.createHash;

var $def6a6c580c3db8e$require$Duplex = $5HoLl$stream.Duplex;
var $def6a6c580c3db8e$require$Readable = $5HoLl$stream.Readable;

var $def6a6c580c3db8e$require$URL = $5HoLl$url.URL;

var $iVvbT = parcelRequire("iVvbT");

var $lGaGn = parcelRequire("lGaGn");

var $4qdR9 = parcelRequire("4qdR9");

var $9CIgd = parcelRequire("9CIgd");
var $def6a6c580c3db8e$require$isBlob = $9CIgd.isBlob;

var $g2eNi = parcelRequire("g2eNi");
var $def6a6c580c3db8e$require$BINARY_TYPES = $g2eNi.BINARY_TYPES;
var $def6a6c580c3db8e$require$EMPTY_BUFFER = $g2eNi.EMPTY_BUFFER;
var $def6a6c580c3db8e$require$GUID = $g2eNi.GUID;
var $def6a6c580c3db8e$require$kForOnEventAttribute = $g2eNi.kForOnEventAttribute;
var $def6a6c580c3db8e$require$kListener = $g2eNi.kListener;
var $def6a6c580c3db8e$require$kStatusCode = $g2eNi.kStatusCode;
var $def6a6c580c3db8e$require$kWebSocket = $g2eNi.kWebSocket;
var $def6a6c580c3db8e$require$NOOP = $g2eNi.NOOP;

var $5MCYr = parcelRequire("5MCYr");
const { EventTarget: { addEventListener: $def6a6c580c3db8e$var$addEventListener, removeEventListener: $def6a6c580c3db8e$var$removeEventListener } } = $5MCYr;

var $f5kD4 = parcelRequire("f5kD4");
var $def6a6c580c3db8e$require$format = $f5kD4.format;
var $def6a6c580c3db8e$require$parse = $f5kD4.parse;

var $jH0do = parcelRequire("jH0do");
var $def6a6c580c3db8e$require$toBuffer = $jH0do.toBuffer;
const $def6a6c580c3db8e$var$closeTimeout = 30000;
const $def6a6c580c3db8e$var$kAborted = Symbol('kAborted');
const $def6a6c580c3db8e$var$protocolVersions = [
    8,
    13
];
const $def6a6c580c3db8e$var$readyStates = [
    'CONNECTING',
    'OPEN',
    'CLOSING',
    'CLOSED'
];
const $def6a6c580c3db8e$var$subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;
/**
 * Class representing a WebSocket.
 *
 * @extends EventEmitter
 */ class $def6a6c580c3db8e$var$WebSocket extends $5HoLl$events {
    /**
   * Create a new `WebSocket`.
   *
   * @param {(String|URL)} address The URL to which to connect
   * @param {(String|String[])} [protocols] The subprotocols
   * @param {Object} [options] Connection options
   */ constructor(address, protocols, options){
        super();
        this._binaryType = $def6a6c580c3db8e$require$BINARY_TYPES[0];
        this._closeCode = 1006;
        this._closeFrameReceived = false;
        this._closeFrameSent = false;
        this._closeMessage = $def6a6c580c3db8e$require$EMPTY_BUFFER;
        this._closeTimer = null;
        this._errorEmitted = false;
        this._extensions = {};
        this._paused = false;
        this._protocol = '';
        this._readyState = $def6a6c580c3db8e$var$WebSocket.CONNECTING;
        this._receiver = null;
        this._sender = null;
        this._socket = null;
        if (address !== null) {
            this._bufferedAmount = 0;
            this._isServer = false;
            this._redirects = 0;
            if (protocols === undefined) protocols = [];
            else if (!Array.isArray(protocols)) {
                if (typeof protocols === 'object' && protocols !== null) {
                    options = protocols;
                    protocols = [];
                } else protocols = [
                    protocols
                ];
            }
            $def6a6c580c3db8e$var$initAsClient(this, address, protocols, options);
        } else {
            this._autoPong = options.autoPong;
            this._isServer = true;
        }
    }
    /**
   * For historical reasons, the custom "nodebuffer" type is used by the default
   * instead of "blob".
   *
   * @type {String}
   */ get binaryType() {
        return this._binaryType;
    }
    set binaryType(type) {
        if (!$def6a6c580c3db8e$require$BINARY_TYPES.includes(type)) return;
        this._binaryType = type;
        //
        // Allow to change `binaryType` on the fly.
        //
        if (this._receiver) this._receiver._binaryType = type;
    }
    /**
   * @type {Number}
   */ get bufferedAmount() {
        if (!this._socket) return this._bufferedAmount;
        return this._socket._writableState.length + this._sender._bufferedBytes;
    }
    /**
   * @type {String}
   */ get extensions() {
        return Object.keys(this._extensions).join();
    }
    /**
   * @type {Boolean}
   */ get isPaused() {
        return this._paused;
    }
    /**
   * @type {Function}
   */ /* istanbul ignore next */ get onclose() {
        return null;
    }
    /**
   * @type {Function}
   */ /* istanbul ignore next */ get onerror() {
        return null;
    }
    /**
   * @type {Function}
   */ /* istanbul ignore next */ get onopen() {
        return null;
    }
    /**
   * @type {Function}
   */ /* istanbul ignore next */ get onmessage() {
        return null;
    }
    /**
   * @type {String}
   */ get protocol() {
        return this._protocol;
    }
    /**
   * @type {Number}
   */ get readyState() {
        return this._readyState;
    }
    /**
   * @type {String}
   */ get url() {
        return this._url;
    }
    /**
   * Set up the socket and the internal resources.
   *
   * @param {Duplex} socket The network socket between the server and client
   * @param {Buffer} head The first packet of the upgraded stream
   * @param {Object} options Options object
   * @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether
   *     any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
   *     multiple times in the same tick
   * @param {Function} [options.generateMask] The function used to generate the
   *     masking key
   * @param {Number} [options.maxPayload=0] The maximum allowed message size
   * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
   *     not to skip UTF-8 validation for text and close messages
   * @private
   */ setSocket(socket, head, options) {
        const receiver = new $lGaGn({
            allowSynchronousEvents: options.allowSynchronousEvents,
            binaryType: this.binaryType,
            extensions: this._extensions,
            isServer: this._isServer,
            maxPayload: options.maxPayload,
            skipUTF8Validation: options.skipUTF8Validation
        });
        const sender = new $4qdR9(socket, this._extensions, options.generateMask);
        this._receiver = receiver;
        this._sender = sender;
        this._socket = socket;
        receiver[$def6a6c580c3db8e$require$kWebSocket] = this;
        sender[$def6a6c580c3db8e$require$kWebSocket] = this;
        socket[$def6a6c580c3db8e$require$kWebSocket] = this;
        receiver.on('conclude', $def6a6c580c3db8e$var$receiverOnConclude);
        receiver.on('drain', $def6a6c580c3db8e$var$receiverOnDrain);
        receiver.on('error', $def6a6c580c3db8e$var$receiverOnError);
        receiver.on('message', $def6a6c580c3db8e$var$receiverOnMessage);
        receiver.on('ping', $def6a6c580c3db8e$var$receiverOnPing);
        receiver.on('pong', $def6a6c580c3db8e$var$receiverOnPong);
        sender.onerror = $def6a6c580c3db8e$var$senderOnError;
        //
        // These methods may not be available if `socket` is just a `Duplex`.
        //
        if (socket.setTimeout) socket.setTimeout(0);
        if (socket.setNoDelay) socket.setNoDelay();
        if (head.length > 0) socket.unshift(head);
        socket.on('close', $def6a6c580c3db8e$var$socketOnClose);
        socket.on('data', $def6a6c580c3db8e$var$socketOnData);
        socket.on('end', $def6a6c580c3db8e$var$socketOnEnd);
        socket.on('error', $def6a6c580c3db8e$var$socketOnError);
        this._readyState = $def6a6c580c3db8e$var$WebSocket.OPEN;
        this.emit('open');
    }
    /**
   * Emit the `'close'` event.
   *
   * @private
   */ emitClose() {
        if (!this._socket) {
            this._readyState = $def6a6c580c3db8e$var$WebSocket.CLOSED;
            this.emit('close', this._closeCode, this._closeMessage);
            return;
        }
        if (this._extensions[$iVvbT.extensionName]) this._extensions[$iVvbT.extensionName].cleanup();
        this._receiver.removeAllListeners();
        this._readyState = $def6a6c580c3db8e$var$WebSocket.CLOSED;
        this.emit('close', this._closeCode, this._closeMessage);
    }
    /**
   * Start a closing handshake.
   *
   *          +----------+   +-----------+   +----------+
   *     - - -|ws.close()|-->|close frame|-->|ws.close()|- - -
   *    |     +----------+   +-----------+   +----------+     |
   *          +----------+   +-----------+         |
   * CLOSING  |ws.close()|<--|close frame|<--+-----+       CLOSING
   *          +----------+   +-----------+   |
   *    |           |                        |   +---+        |
   *                +------------------------+-->|fin| - - - -
   *    |         +---+                      |   +---+
   *     - - - - -|fin|<---------------------+
   *              +---+
   *
   * @param {Number} [code] Status code explaining why the connection is closing
   * @param {(String|Buffer)} [data] The reason why the connection is
   *     closing
   * @public
   */ close(code, data) {
        if (this.readyState === $def6a6c580c3db8e$var$WebSocket.CLOSED) return;
        if (this.readyState === $def6a6c580c3db8e$var$WebSocket.CONNECTING) {
            const msg = 'WebSocket was closed before the connection was established';
            $def6a6c580c3db8e$var$abortHandshake(this, this._req, msg);
            return;
        }
        if (this.readyState === $def6a6c580c3db8e$var$WebSocket.CLOSING) {
            if (this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted)) this._socket.end();
            return;
        }
        this._readyState = $def6a6c580c3db8e$var$WebSocket.CLOSING;
        this._sender.close(code, data, !this._isServer, (err)=>{
            //
            // This error is handled by the `'error'` listener on the socket. We only
            // want to know if the close frame has been sent here.
            //
            if (err) return;
            this._closeFrameSent = true;
            if (this._closeFrameReceived || this._receiver._writableState.errorEmitted) this._socket.end();
        });
        $def6a6c580c3db8e$var$setCloseTimer(this);
    }
    /**
   * Pause the socket.
   *
   * @public
   */ pause() {
        if (this.readyState === $def6a6c580c3db8e$var$WebSocket.CONNECTING || this.readyState === $def6a6c580c3db8e$var$WebSocket.CLOSED) return;
        this._paused = true;
        this._socket.pause();
    }
    /**
   * Send a ping.
   *
   * @param {*} [data] The data to send
   * @param {Boolean} [mask] Indicates whether or not to mask `data`
   * @param {Function} [cb] Callback which is executed when the ping is sent
   * @public
   */ ping(data, mask, cb) {
        if (this.readyState === $def6a6c580c3db8e$var$WebSocket.CONNECTING) throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');
        if (typeof data === 'function') {
            cb = data;
            data = mask = undefined;
        } else if (typeof mask === 'function') {
            cb = mask;
            mask = undefined;
        }
        if (typeof data === 'number') data = data.toString();
        if (this.readyState !== $def6a6c580c3db8e$var$WebSocket.OPEN) {
            $def6a6c580c3db8e$var$sendAfterClose(this, data, cb);
            return;
        }
        if (mask === undefined) mask = !this._isServer;
        this._sender.ping(data || $def6a6c580c3db8e$require$EMPTY_BUFFER, mask, cb);
    }
    /**
   * Send a pong.
   *
   * @param {*} [data] The data to send
   * @param {Boolean} [mask] Indicates whether or not to mask `data`
   * @param {Function} [cb] Callback which is executed when the pong is sent
   * @public
   */ pong(data, mask, cb) {
        if (this.readyState === $def6a6c580c3db8e$var$WebSocket.CONNECTING) throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');
        if (typeof data === 'function') {
            cb = data;
            data = mask = undefined;
        } else if (typeof mask === 'function') {
            cb = mask;
            mask = undefined;
        }
        if (typeof data === 'number') data = data.toString();
        if (this.readyState !== $def6a6c580c3db8e$var$WebSocket.OPEN) {
            $def6a6c580c3db8e$var$sendAfterClose(this, data, cb);
            return;
        }
        if (mask === undefined) mask = !this._isServer;
        this._sender.pong(data || $def6a6c580c3db8e$require$EMPTY_BUFFER, mask, cb);
    }
    /**
   * Resume the socket.
   *
   * @public
   */ resume() {
        if (this.readyState === $def6a6c580c3db8e$var$WebSocket.CONNECTING || this.readyState === $def6a6c580c3db8e$var$WebSocket.CLOSED) return;
        this._paused = false;
        if (!this._receiver._writableState.needDrain) this._socket.resume();
    }
    /**
   * Send a data message.
   *
   * @param {*} data The message to send
   * @param {Object} [options] Options object
   * @param {Boolean} [options.binary] Specifies whether `data` is binary or
   *     text
   * @param {Boolean} [options.compress] Specifies whether or not to compress
   *     `data`
   * @param {Boolean} [options.fin=true] Specifies whether the fragment is the
   *     last one
   * @param {Boolean} [options.mask] Specifies whether or not to mask `data`
   * @param {Function} [cb] Callback which is executed when data is written out
   * @public
   */ send(data, options, cb) {
        if (this.readyState === $def6a6c580c3db8e$var$WebSocket.CONNECTING) throw new Error('WebSocket is not open: readyState 0 (CONNECTING)');
        if (typeof options === 'function') {
            cb = options;
            options = {};
        }
        if (typeof data === 'number') data = data.toString();
        if (this.readyState !== $def6a6c580c3db8e$var$WebSocket.OPEN) {
            $def6a6c580c3db8e$var$sendAfterClose(this, data, cb);
            return;
        }
        const opts = {
            binary: typeof data !== 'string',
            mask: !this._isServer,
            compress: true,
            fin: true,
            ...options
        };
        if (!this._extensions[$iVvbT.extensionName]) opts.compress = false;
        this._sender.send(data || $def6a6c580c3db8e$require$EMPTY_BUFFER, opts, cb);
    }
    /**
   * Forcibly close the connection.
   *
   * @public
   */ terminate() {
        if (this.readyState === $def6a6c580c3db8e$var$WebSocket.CLOSED) return;
        if (this.readyState === $def6a6c580c3db8e$var$WebSocket.CONNECTING) {
            const msg = 'WebSocket was closed before the connection was established';
            $def6a6c580c3db8e$var$abortHandshake(this, this._req, msg);
            return;
        }
        if (this._socket) {
            this._readyState = $def6a6c580c3db8e$var$WebSocket.CLOSING;
            this._socket.destroy();
        }
    }
}
/**
 * @constant {Number} CONNECTING
 * @memberof WebSocket
 */ Object.defineProperty($def6a6c580c3db8e$var$WebSocket, 'CONNECTING', {
    enumerable: true,
    value: $def6a6c580c3db8e$var$readyStates.indexOf('CONNECTING')
});
/**
 * @constant {Number} CONNECTING
 * @memberof WebSocket.prototype
 */ Object.defineProperty($def6a6c580c3db8e$var$WebSocket.prototype, 'CONNECTING', {
    enumerable: true,
    value: $def6a6c580c3db8e$var$readyStates.indexOf('CONNECTING')
});
/**
 * @constant {Number} OPEN
 * @memberof WebSocket
 */ Object.defineProperty($def6a6c580c3db8e$var$WebSocket, 'OPEN', {
    enumerable: true,
    value: $def6a6c580c3db8e$var$readyStates.indexOf('OPEN')
});
/**
 * @constant {Number} OPEN
 * @memberof WebSocket.prototype
 */ Object.defineProperty($def6a6c580c3db8e$var$WebSocket.prototype, 'OPEN', {
    enumerable: true,
    value: $def6a6c580c3db8e$var$readyStates.indexOf('OPEN')
});
/**
 * @constant {Number} CLOSING
 * @memberof WebSocket
 */ Object.defineProperty($def6a6c580c3db8e$var$WebSocket, 'CLOSING', {
    enumerable: true,
    value: $def6a6c580c3db8e$var$readyStates.indexOf('CLOSING')
});
/**
 * @constant {Number} CLOSING
 * @memberof WebSocket.prototype
 */ Object.defineProperty($def6a6c580c3db8e$var$WebSocket.prototype, 'CLOSING', {
    enumerable: true,
    value: $def6a6c580c3db8e$var$readyStates.indexOf('CLOSING')
});
/**
 * @constant {Number} CLOSED
 * @memberof WebSocket
 */ Object.defineProperty($def6a6c580c3db8e$var$WebSocket, 'CLOSED', {
    enumerable: true,
    value: $def6a6c580c3db8e$var$readyStates.indexOf('CLOSED')
});
/**
 * @constant {Number} CLOSED
 * @memberof WebSocket.prototype
 */ Object.defineProperty($def6a6c580c3db8e$var$WebSocket.prototype, 'CLOSED', {
    enumerable: true,
    value: $def6a6c580c3db8e$var$readyStates.indexOf('CLOSED')
});
[
    'binaryType',
    'bufferedAmount',
    'extensions',
    'isPaused',
    'protocol',
    'readyState',
    'url'
].forEach((property)=>{
    Object.defineProperty($def6a6c580c3db8e$var$WebSocket.prototype, property, {
        enumerable: true
    });
});
//
// Add the `onopen`, `onerror`, `onclose`, and `onmessage` attributes.
// See https://html.spec.whatwg.org/multipage/comms.html#the-websocket-interface
//
[
    'open',
    'error',
    'close',
    'message'
].forEach((method)=>{
    Object.defineProperty($def6a6c580c3db8e$var$WebSocket.prototype, `on${method}`, {
        enumerable: true,
        get () {
            for (const listener of this.listeners(method)){
                if (listener[$def6a6c580c3db8e$require$kForOnEventAttribute]) return listener[$def6a6c580c3db8e$require$kListener];
            }
            return null;
        },
        set (handler) {
            for (const listener of this.listeners(method))if (listener[$def6a6c580c3db8e$require$kForOnEventAttribute]) {
                this.removeListener(method, listener);
                break;
            }
            if (typeof handler !== 'function') return;
            this.addEventListener(method, handler, {
                [$def6a6c580c3db8e$require$kForOnEventAttribute]: true
            });
        }
    });
});
$def6a6c580c3db8e$var$WebSocket.prototype.addEventListener = $def6a6c580c3db8e$var$addEventListener;
$def6a6c580c3db8e$var$WebSocket.prototype.removeEventListener = $def6a6c580c3db8e$var$removeEventListener;
module.exports = $def6a6c580c3db8e$var$WebSocket;
/**
 * Initialize a WebSocket client.
 *
 * @param {WebSocket} websocket The client to initialize
 * @param {(String|URL)} address The URL to which to connect
 * @param {Array} protocols The subprotocols
 * @param {Object} [options] Connection options
 * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether any
 *     of the `'message'`, `'ping'`, and `'pong'` events can be emitted multiple
 *     times in the same tick
 * @param {Boolean} [options.autoPong=true] Specifies whether or not to
 *     automatically send a pong in response to a ping
 * @param {Function} [options.finishRequest] A function which can be used to
 *     customize the headers of each http request before it is sent
 * @param {Boolean} [options.followRedirects=false] Whether or not to follow
 *     redirects
 * @param {Function} [options.generateMask] The function used to generate the
 *     masking key
 * @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the
 *     handshake request
 * @param {Number} [options.maxPayload=104857600] The maximum allowed message
 *     size
 * @param {Number} [options.maxRedirects=10] The maximum number of redirects
 *     allowed
 * @param {String} [options.origin] Value of the `Origin` or
 *     `Sec-WebSocket-Origin` header
 * @param {(Boolean|Object)} [options.perMessageDeflate=true] Enable/disable
 *     permessage-deflate
 * @param {Number} [options.protocolVersion=13] Value of the
 *     `Sec-WebSocket-Version` header
 * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
 *     not to skip UTF-8 validation for text and close messages
 * @private
 */ function $def6a6c580c3db8e$var$initAsClient(websocket, address, protocols, options) {
    const opts = {
        allowSynchronousEvents: true,
        autoPong: true,
        protocolVersion: $def6a6c580c3db8e$var$protocolVersions[1],
        maxPayload: 104857600,
        skipUTF8Validation: false,
        perMessageDeflate: true,
        followRedirects: false,
        maxRedirects: 10,
        ...options,
        socketPath: undefined,
        hostname: undefined,
        protocol: undefined,
        timeout: undefined,
        method: 'GET',
        host: undefined,
        path: undefined,
        port: undefined
    };
    websocket._autoPong = opts.autoPong;
    if (!$def6a6c580c3db8e$var$protocolVersions.includes(opts.protocolVersion)) throw new RangeError(`Unsupported protocol version: ${opts.protocolVersion} ` + `(supported versions: ${$def6a6c580c3db8e$var$protocolVersions.join(', ')})`);
    let parsedUrl;
    if (address instanceof $def6a6c580c3db8e$require$URL) parsedUrl = address;
    else try {
        parsedUrl = new $def6a6c580c3db8e$require$URL(address);
    } catch (e) {
        throw new SyntaxError(`Invalid URL: ${address}`);
    }
    if (parsedUrl.protocol === 'http:') parsedUrl.protocol = 'ws:';
    else if (parsedUrl.protocol === 'https:') parsedUrl.protocol = 'wss:';
    websocket._url = parsedUrl.href;
    const isSecure = parsedUrl.protocol === 'wss:';
    const isIpcUrl = parsedUrl.protocol === 'ws+unix:';
    let invalidUrlMessage;
    if (parsedUrl.protocol !== 'ws:' && !isSecure && !isIpcUrl) invalidUrlMessage = 'The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"';
    else if (isIpcUrl && !parsedUrl.pathname) invalidUrlMessage = "The URL's pathname is empty";
    else if (parsedUrl.hash) invalidUrlMessage = 'The URL contains a fragment identifier';
    if (invalidUrlMessage) {
        const err = new SyntaxError(invalidUrlMessage);
        if (websocket._redirects === 0) throw err;
        else {
            $def6a6c580c3db8e$var$emitErrorAndClose(websocket, err);
            return;
        }
    }
    const defaultPort = isSecure ? 443 : 80;
    const key = $def6a6c580c3db8e$require$randomBytes(16).toString('base64');
    const request = isSecure ? $5HoLl$https.request : $5HoLl$http.request;
    const protocolSet = new Set();
    let perMessageDeflate;
    opts.createConnection = opts.createConnection || (isSecure ? $def6a6c580c3db8e$var$tlsConnect : $def6a6c580c3db8e$var$netConnect);
    opts.defaultPort = opts.defaultPort || defaultPort;
    opts.port = parsedUrl.port || defaultPort;
    opts.host = parsedUrl.hostname.startsWith('[') ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname;
    opts.headers = {
        ...opts.headers,
        'Sec-WebSocket-Version': opts.protocolVersion,
        'Sec-WebSocket-Key': key,
        Connection: 'Upgrade',
        Upgrade: 'websocket'
    };
    opts.path = parsedUrl.pathname + parsedUrl.search;
    opts.timeout = opts.handshakeTimeout;
    if (opts.perMessageDeflate) {
        perMessageDeflate = new $iVvbT(opts.perMessageDeflate !== true ? opts.perMessageDeflate : {}, false, opts.maxPayload);
        opts.headers['Sec-WebSocket-Extensions'] = $def6a6c580c3db8e$require$format({
            [$iVvbT.extensionName]: perMessageDeflate.offer()
        });
    }
    if (protocols.length) {
        for (const protocol of protocols){
            if (typeof protocol !== 'string' || !$def6a6c580c3db8e$var$subprotocolRegex.test(protocol) || protocolSet.has(protocol)) throw new SyntaxError('An invalid or duplicated subprotocol was specified');
            protocolSet.add(protocol);
        }
        opts.headers['Sec-WebSocket-Protocol'] = protocols.join(',');
    }
    if (opts.origin) {
        if (opts.protocolVersion < 13) opts.headers['Sec-WebSocket-Origin'] = opts.origin;
        else opts.headers.Origin = opts.origin;
    }
    if (parsedUrl.username || parsedUrl.password) opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
    if (isIpcUrl) {
        const parts = opts.path.split(':');
        opts.socketPath = parts[0];
        opts.path = parts[1];
    }
    let req;
    if (opts.followRedirects) {
        if (websocket._redirects === 0) {
            websocket._originalIpc = isIpcUrl;
            websocket._originalSecure = isSecure;
            websocket._originalHostOrSocketPath = isIpcUrl ? opts.socketPath : parsedUrl.host;
            const headers = options && options.headers;
            //
            // Shallow copy the user provided options so that headers can be changed
            // without mutating the original object.
            //
            options = {
                ...options,
                headers: {}
            };
            if (headers) for (const [key, value] of Object.entries(headers))options.headers[key.toLowerCase()] = value;
        } else if (websocket.listenerCount('redirect') === 0) {
            const isSameHost = isIpcUrl ? websocket._originalIpc ? opts.socketPath === websocket._originalHostOrSocketPath : false : websocket._originalIpc ? false : parsedUrl.host === websocket._originalHostOrSocketPath;
            if (!isSameHost || websocket._originalSecure && !isSecure) {
                //
                // Match curl 7.77.0 behavior and drop the following headers. These
                // headers are also dropped when following a redirect to a subdomain.
                //
                delete opts.headers.authorization;
                delete opts.headers.cookie;
                if (!isSameHost) delete opts.headers.host;
                opts.auth = undefined;
            }
        }
        //
        // Match curl 7.77.0 behavior and make the first `Authorization` header win.
        // If the `Authorization` header is set, then there is nothing to do as it
        // will take precedence.
        //
        if (opts.auth && !options.headers.authorization) options.headers.authorization = 'Basic ' + Buffer.from(opts.auth).toString('base64');
        req = websocket._req = request(opts);
        if (websocket._redirects) //
        // Unlike what is done for the `'upgrade'` event, no early exit is
        // triggered here if the user calls `websocket.close()` or
        // `websocket.terminate()` from a listener of the `'redirect'` event. This
        // is because the user can also call `request.destroy()` with an error
        // before calling `websocket.close()` or `websocket.terminate()` and this
        // would result in an error being emitted on the `request` object with no
        // `'error'` event listeners attached.
        //
        websocket.emit('redirect', websocket.url, req);
    } else req = websocket._req = request(opts);
    if (opts.timeout) req.on('timeout', ()=>{
        $def6a6c580c3db8e$var$abortHandshake(websocket, req, 'Opening handshake has timed out');
    });
    req.on('error', (err)=>{
        if (req === null || req[$def6a6c580c3db8e$var$kAborted]) return;
        req = websocket._req = null;
        $def6a6c580c3db8e$var$emitErrorAndClose(websocket, err);
    });
    req.on('response', (res)=>{
        const location = res.headers.location;
        const statusCode = res.statusCode;
        if (location && opts.followRedirects && statusCode >= 300 && statusCode < 400) {
            if (++websocket._redirects > opts.maxRedirects) {
                $def6a6c580c3db8e$var$abortHandshake(websocket, req, 'Maximum redirects exceeded');
                return;
            }
            req.abort();
            let addr;
            try {
                addr = new $def6a6c580c3db8e$require$URL(location, address);
            } catch (e) {
                const err = new SyntaxError(`Invalid URL: ${location}`);
                $def6a6c580c3db8e$var$emitErrorAndClose(websocket, err);
                return;
            }
            $def6a6c580c3db8e$var$initAsClient(websocket, addr, protocols, options);
        } else if (!websocket.emit('unexpected-response', req, res)) $def6a6c580c3db8e$var$abortHandshake(websocket, req, `Unexpected server response: ${res.statusCode}`);
    });
    req.on('upgrade', (res, socket, head)=>{
        websocket.emit('upgrade', res);
        //
        // The user may have closed the connection from a listener of the
        // `'upgrade'` event.
        //
        if (websocket.readyState !== $def6a6c580c3db8e$var$WebSocket.CONNECTING) return;
        req = websocket._req = null;
        const upgrade = res.headers.upgrade;
        if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') {
            $def6a6c580c3db8e$var$abortHandshake(websocket, socket, 'Invalid Upgrade header');
            return;
        }
        const digest = $def6a6c580c3db8e$require$createHash('sha1').update(key + $def6a6c580c3db8e$require$GUID).digest('base64');
        if (res.headers['sec-websocket-accept'] !== digest) {
            $def6a6c580c3db8e$var$abortHandshake(websocket, socket, 'Invalid Sec-WebSocket-Accept header');
            return;
        }
        const serverProt = res.headers['sec-websocket-protocol'];
        let protError;
        if (serverProt !== undefined) {
            if (!protocolSet.size) protError = 'Server sent a subprotocol but none was requested';
            else if (!protocolSet.has(serverProt)) protError = 'Server sent an invalid subprotocol';
        } else if (protocolSet.size) protError = 'Server sent no subprotocol';
        if (protError) {
            $def6a6c580c3db8e$var$abortHandshake(websocket, socket, protError);
            return;
        }
        if (serverProt) websocket._protocol = serverProt;
        const secWebSocketExtensions = res.headers['sec-websocket-extensions'];
        if (secWebSocketExtensions !== undefined) {
            if (!perMessageDeflate) {
                const message = "Server sent a Sec-WebSocket-Extensions header but no extension was requested";
                $def6a6c580c3db8e$var$abortHandshake(websocket, socket, message);
                return;
            }
            let extensions;
            try {
                extensions = $def6a6c580c3db8e$require$parse(secWebSocketExtensions);
            } catch (err) {
                const message = 'Invalid Sec-WebSocket-Extensions header';
                $def6a6c580c3db8e$var$abortHandshake(websocket, socket, message);
                return;
            }
            const extensionNames = Object.keys(extensions);
            if (extensionNames.length !== 1 || extensionNames[0] !== $iVvbT.extensionName) {
                const message = 'Server indicated an extension that was not requested';
                $def6a6c580c3db8e$var$abortHandshake(websocket, socket, message);
                return;
            }
            try {
                perMessageDeflate.accept(extensions[$iVvbT.extensionName]);
            } catch (err) {
                const message = 'Invalid Sec-WebSocket-Extensions header';
                $def6a6c580c3db8e$var$abortHandshake(websocket, socket, message);
                return;
            }
            websocket._extensions[$iVvbT.extensionName] = perMessageDeflate;
        }
        websocket.setSocket(socket, head, {
            allowSynchronousEvents: opts.allowSynchronousEvents,
            generateMask: opts.generateMask,
            maxPayload: opts.maxPayload,
            skipUTF8Validation: opts.skipUTF8Validation
        });
    });
    if (opts.finishRequest) opts.finishRequest(req, websocket);
    else req.end();
}
/**
 * Emit the `'error'` and `'close'` events.
 *
 * @param {WebSocket} websocket The WebSocket instance
 * @param {Error} The error to emit
 * @private
 */ function $def6a6c580c3db8e$var$emitErrorAndClose(websocket, err) {
    websocket._readyState = $def6a6c580c3db8e$var$WebSocket.CLOSING;
    //
    // The following assignment is practically useless and is done only for
    // consistency.
    //
    websocket._errorEmitted = true;
    websocket.emit('error', err);
    websocket.emitClose();
}
/**
 * Create a `net.Socket` and initiate a connection.
 *
 * @param {Object} options Connection options
 * @return {net.Socket} The newly created socket used to start the connection
 * @private
 */ function $def6a6c580c3db8e$var$netConnect(options) {
    options.path = options.socketPath;
    return $5HoLl$net.connect(options);
}
/**
 * Create a `tls.TLSSocket` and initiate a connection.
 *
 * @param {Object} options Connection options
 * @return {tls.TLSSocket} The newly created socket used to start the connection
 * @private
 */ function $def6a6c580c3db8e$var$tlsConnect(options) {
    options.path = undefined;
    if (!options.servername && options.servername !== '') options.servername = $5HoLl$net.isIP(options.host) ? '' : options.host;
    return $5HoLl$tls.connect(options);
}
/**
 * Abort the handshake and emit an error.
 *
 * @param {WebSocket} websocket The WebSocket instance
 * @param {(http.ClientRequest|net.Socket|tls.Socket)} stream The request to
 *     abort or the socket to destroy
 * @param {String} message The error message
 * @private
 */ function $def6a6c580c3db8e$var$abortHandshake(websocket, stream, message) {
    websocket._readyState = $def6a6c580c3db8e$var$WebSocket.CLOSING;
    const err = new Error(message);
    Error.captureStackTrace(err, $def6a6c580c3db8e$var$abortHandshake);
    if (stream.setHeader) {
        stream[$def6a6c580c3db8e$var$kAborted] = true;
        stream.abort();
        if (stream.socket && !stream.socket.destroyed) //
        // On Node.js >= 14.3.0 `request.abort()` does not destroy the socket if
        // called after the request completed. See
        // https://github.com/websockets/ws/issues/1869.
        //
        stream.socket.destroy();
        process.nextTick($def6a6c580c3db8e$var$emitErrorAndClose, websocket, err);
    } else {
        stream.destroy(err);
        stream.once('error', websocket.emit.bind(websocket, 'error'));
        stream.once('close', websocket.emitClose.bind(websocket));
    }
}
/**
 * Handle cases where the `ping()`, `pong()`, or `send()` methods are called
 * when the `readyState` attribute is `CLOSING` or `CLOSED`.
 *
 * @param {WebSocket} websocket The WebSocket instance
 * @param {*} [data] The data to send
 * @param {Function} [cb] Callback
 * @private
 */ function $def6a6c580c3db8e$var$sendAfterClose(websocket, data, cb) {
    if (data) {
        const length = $def6a6c580c3db8e$require$isBlob(data) ? data.size : $def6a6c580c3db8e$require$toBuffer(data).length;
        //
        // The `_bufferedAmount` property is used only when the peer is a client and
        // the opening handshake fails. Under these circumstances, in fact, the
        // `setSocket()` method is not called, so the `_socket` and `_sender`
        // properties are set to `null`.
        //
        if (websocket._socket) websocket._sender._bufferedBytes += length;
        else websocket._bufferedAmount += length;
    }
    if (cb) {
        const err = new Error(`WebSocket is not open: readyState ${websocket.readyState} ` + `(${$def6a6c580c3db8e$var$readyStates[websocket.readyState]})`);
        process.nextTick(cb, err);
    }
}
/**
 * The listener of the `Receiver` `'conclude'` event.
 *
 * @param {Number} code The status code
 * @param {Buffer} reason The reason for closing
 * @private
 */ function $def6a6c580c3db8e$var$receiverOnConclude(code, reason) {
    const websocket = this[$def6a6c580c3db8e$require$kWebSocket];
    websocket._closeFrameReceived = true;
    websocket._closeMessage = reason;
    websocket._closeCode = code;
    if (websocket._socket[$def6a6c580c3db8e$require$kWebSocket] === undefined) return;
    websocket._socket.removeListener('data', $def6a6c580c3db8e$var$socketOnData);
    process.nextTick($def6a6c580c3db8e$var$resume, websocket._socket);
    if (code === 1005) websocket.close();
    else websocket.close(code, reason);
}
/**
 * The listener of the `Receiver` `'drain'` event.
 *
 * @private
 */ function $def6a6c580c3db8e$var$receiverOnDrain() {
    const websocket = this[$def6a6c580c3db8e$require$kWebSocket];
    if (!websocket.isPaused) websocket._socket.resume();
}
/**
 * The listener of the `Receiver` `'error'` event.
 *
 * @param {(RangeError|Error)} err The emitted error
 * @private
 */ function $def6a6c580c3db8e$var$receiverOnError(err) {
    const websocket = this[$def6a6c580c3db8e$require$kWebSocket];
    if (websocket._socket[$def6a6c580c3db8e$require$kWebSocket] !== undefined) {
        websocket._socket.removeListener('data', $def6a6c580c3db8e$var$socketOnData);
        //
        // On Node.js < 14.0.0 the `'error'` event is emitted synchronously. See
        // https://github.com/websockets/ws/issues/1940.
        //
        process.nextTick($def6a6c580c3db8e$var$resume, websocket._socket);
        websocket.close(err[$def6a6c580c3db8e$require$kStatusCode]);
    }
    if (!websocket._errorEmitted) {
        websocket._errorEmitted = true;
        websocket.emit('error', err);
    }
}
/**
 * The listener of the `Receiver` `'finish'` event.
 *
 * @private
 */ function $def6a6c580c3db8e$var$receiverOnFinish() {
    this[$def6a6c580c3db8e$require$kWebSocket].emitClose();
}
/**
 * The listener of the `Receiver` `'message'` event.
 *
 * @param {Buffer|ArrayBuffer|Buffer[])} data The message
 * @param {Boolean} isBinary Specifies whether the message is binary or not
 * @private
 */ function $def6a6c580c3db8e$var$receiverOnMessage(data, isBinary) {
    this[$def6a6c580c3db8e$require$kWebSocket].emit('message', data, isBinary);
}
/**
 * The listener of the `Receiver` `'ping'` event.
 *
 * @param {Buffer} data The data included in the ping frame
 * @private
 */ function $def6a6c580c3db8e$var$receiverOnPing(data) {
    const websocket = this[$def6a6c580c3db8e$require$kWebSocket];
    if (websocket._autoPong) websocket.pong(data, !this._isServer, $def6a6c580c3db8e$require$NOOP);
    websocket.emit('ping', data);
}
/**
 * The listener of the `Receiver` `'pong'` event.
 *
 * @param {Buffer} data The data included in the pong frame
 * @private
 */ function $def6a6c580c3db8e$var$receiverOnPong(data) {
    this[$def6a6c580c3db8e$require$kWebSocket].emit('pong', data);
}
/**
 * Resume a readable stream
 *
 * @param {Readable} stream The readable stream
 * @private
 */ function $def6a6c580c3db8e$var$resume(stream) {
    stream.resume();
}
/**
 * The `Sender` error event handler.
 *
 * @param {Error} The error
 * @private
 */ function $def6a6c580c3db8e$var$senderOnError(err) {
    const websocket = this[$def6a6c580c3db8e$require$kWebSocket];
    if (websocket.readyState === $def6a6c580c3db8e$var$WebSocket.CLOSED) return;
    if (websocket.readyState === $def6a6c580c3db8e$var$WebSocket.OPEN) {
        websocket._readyState = $def6a6c580c3db8e$var$WebSocket.CLOSING;
        $def6a6c580c3db8e$var$setCloseTimer(websocket);
    }
    //
    // `socket.end()` is used instead of `socket.destroy()` to allow the other
    // peer to finish sending queued data. There is no need to set a timer here
    // because `CLOSING` means that it is already set or not needed.
    //
    this._socket.end();
    if (!websocket._errorEmitted) {
        websocket._errorEmitted = true;
        websocket.emit('error', err);
    }
}
/**
 * Set a timer to destroy the underlying raw socket of a WebSocket.
 *
 * @param {WebSocket} websocket The WebSocket instance
 * @private
 */ function $def6a6c580c3db8e$var$setCloseTimer(websocket) {
    websocket._closeTimer = setTimeout(websocket._socket.destroy.bind(websocket._socket), $def6a6c580c3db8e$var$closeTimeout);
}
/**
 * The listener of the socket `'close'` event.
 *
 * @private
 */ function $def6a6c580c3db8e$var$socketOnClose() {
    const websocket = this[$def6a6c580c3db8e$require$kWebSocket];
    this.removeListener('close', $def6a6c580c3db8e$var$socketOnClose);
    this.removeListener('data', $def6a6c580c3db8e$var$socketOnData);
    this.removeListener('end', $def6a6c580c3db8e$var$socketOnEnd);
    websocket._readyState = $def6a6c580c3db8e$var$WebSocket.CLOSING;
    let chunk;
    //
    // The close frame might not have been received or the `'end'` event emitted,
    // for example, if the socket was destroyed due to an error. Ensure that the
    // `receiver` stream is closed after writing any remaining buffered data to
    // it. If the readable side of the socket is in flowing mode then there is no
    // buffered data as everything has been already written and `readable.read()`
    // will return `null`. If instead, the socket is paused, any possible buffered
    // data will be read as a single chunk.
    //
    if (!this._readableState.endEmitted && !websocket._closeFrameReceived && !websocket._receiver._writableState.errorEmitted && (chunk = websocket._socket.read()) !== null) websocket._receiver.write(chunk);
    websocket._receiver.end();
    this[$def6a6c580c3db8e$require$kWebSocket] = undefined;
    clearTimeout(websocket._closeTimer);
    if (websocket._receiver._writableState.finished || websocket._receiver._writableState.errorEmitted) websocket.emitClose();
    else {
        websocket._receiver.on('error', $def6a6c580c3db8e$var$receiverOnFinish);
        websocket._receiver.on('finish', $def6a6c580c3db8e$var$receiverOnFinish);
    }
}
/**
 * The listener of the socket `'data'` event.
 *
 * @param {Buffer} chunk A chunk of data
 * @private
 */ function $def6a6c580c3db8e$var$socketOnData(chunk) {
    if (!this[$def6a6c580c3db8e$require$kWebSocket]._receiver.write(chunk)) this.pause();
}
/**
 * The listener of the socket `'end'` event.
 *
 * @private
 */ function $def6a6c580c3db8e$var$socketOnEnd() {
    const websocket = this[$def6a6c580c3db8e$require$kWebSocket];
    websocket._readyState = $def6a6c580c3db8e$var$WebSocket.CLOSING;
    websocket._receiver.end();
    this.end();
}
/**
 * The listener of the socket `'error'` event.
 *
 * @private
 */ function $def6a6c580c3db8e$var$socketOnError() {
    const websocket = this[$def6a6c580c3db8e$require$kWebSocket];
    this.removeListener('error', $def6a6c580c3db8e$var$socketOnError);
    this.on('error', $def6a6c580c3db8e$require$NOOP);
    if (websocket) {
        websocket._readyState = $def6a6c580c3db8e$var$WebSocket.CLOSING;
        this.destroy();
    }
}

});
parcelRegister("5MCYr", function(module, exports) {
'use strict';

var $g2eNi = parcelRequire("g2eNi");
var $435faad1c01a3335$require$kForOnEventAttribute = $g2eNi.kForOnEventAttribute;
var $435faad1c01a3335$require$kListener = $g2eNi.kListener;
const $435faad1c01a3335$var$kCode = Symbol('kCode');
const $435faad1c01a3335$var$kData = Symbol('kData');
const $435faad1c01a3335$var$kError = Symbol('kError');
const $435faad1c01a3335$var$kMessage = Symbol('kMessage');
const $435faad1c01a3335$var$kReason = Symbol('kReason');
const $435faad1c01a3335$var$kTarget = Symbol('kTarget');
const $435faad1c01a3335$var$kType = Symbol('kType');
const $435faad1c01a3335$var$kWasClean = Symbol('kWasClean');
/**
 * Class representing an event.
 */ class $435faad1c01a3335$var$Event {
    /**
   * Create a new `Event`.
   *
   * @param {String} type The name of the event
   * @throws {TypeError} If the `type` argument is not specified
   */ constructor(type){
        this[$435faad1c01a3335$var$kTarget] = null;
        this[$435faad1c01a3335$var$kType] = type;
    }
    /**
   * @type {*}
   */ get target() {
        return this[$435faad1c01a3335$var$kTarget];
    }
    /**
   * @type {String}
   */ get type() {
        return this[$435faad1c01a3335$var$kType];
    }
}
Object.defineProperty($435faad1c01a3335$var$Event.prototype, 'target', {
    enumerable: true
});
Object.defineProperty($435faad1c01a3335$var$Event.prototype, 'type', {
    enumerable: true
});
/**
 * Class representing a close event.
 *
 * @extends Event
 */ class $435faad1c01a3335$var$CloseEvent extends $435faad1c01a3335$var$Event {
    /**
   * Create a new `CloseEvent`.
   *
   * @param {String} type The name of the event
   * @param {Object} [options] A dictionary object that allows for setting
   *     attributes via object members of the same name
   * @param {Number} [options.code=0] The status code explaining why the
   *     connection was closed
   * @param {String} [options.reason=''] A human-readable string explaining why
   *     the connection was closed
   * @param {Boolean} [options.wasClean=false] Indicates whether or not the
   *     connection was cleanly closed
   */ constructor(type, options = {}){
        super(type);
        this[$435faad1c01a3335$var$kCode] = options.code === undefined ? 0 : options.code;
        this[$435faad1c01a3335$var$kReason] = options.reason === undefined ? '' : options.reason;
        this[$435faad1c01a3335$var$kWasClean] = options.wasClean === undefined ? false : options.wasClean;
    }
    /**
   * @type {Number}
   */ get code() {
        return this[$435faad1c01a3335$var$kCode];
    }
    /**
   * @type {String}
   */ get reason() {
        return this[$435faad1c01a3335$var$kReason];
    }
    /**
   * @type {Boolean}
   */ get wasClean() {
        return this[$435faad1c01a3335$var$kWasClean];
    }
}
Object.defineProperty($435faad1c01a3335$var$CloseEvent.prototype, 'code', {
    enumerable: true
});
Object.defineProperty($435faad1c01a3335$var$CloseEvent.prototype, 'reason', {
    enumerable: true
});
Object.defineProperty($435faad1c01a3335$var$CloseEvent.prototype, 'wasClean', {
    enumerable: true
});
/**
 * Class representing an error event.
 *
 * @extends Event
 */ class $435faad1c01a3335$var$ErrorEvent extends $435faad1c01a3335$var$Event {
    /**
   * Create a new `ErrorEvent`.
   *
   * @param {String} type The name of the event
   * @param {Object} [options] A dictionary object that allows for setting
   *     attributes via object members of the same name
   * @param {*} [options.error=null] The error that generated this event
   * @param {String} [options.message=''] The error message
   */ constructor(type, options = {}){
        super(type);
        this[$435faad1c01a3335$var$kError] = options.error === undefined ? null : options.error;
        this[$435faad1c01a3335$var$kMessage] = options.message === undefined ? '' : options.message;
    }
    /**
   * @type {*}
   */ get error() {
        return this[$435faad1c01a3335$var$kError];
    }
    /**
   * @type {String}
   */ get message() {
        return this[$435faad1c01a3335$var$kMessage];
    }
}
Object.defineProperty($435faad1c01a3335$var$ErrorEvent.prototype, 'error', {
    enumerable: true
});
Object.defineProperty($435faad1c01a3335$var$ErrorEvent.prototype, 'message', {
    enumerable: true
});
/**
 * Class representing a message event.
 *
 * @extends Event
 */ class $435faad1c01a3335$var$MessageEvent extends $435faad1c01a3335$var$Event {
    /**
   * Create a new `MessageEvent`.
   *
   * @param {String} type The name of the event
   * @param {Object} [options] A dictionary object that allows for setting
   *     attributes via object members of the same name
   * @param {*} [options.data=null] The message content
   */ constructor(type, options = {}){
        super(type);
        this[$435faad1c01a3335$var$kData] = options.data === undefined ? null : options.data;
    }
    /**
   * @type {*}
   */ get data() {
        return this[$435faad1c01a3335$var$kData];
    }
}
Object.defineProperty($435faad1c01a3335$var$MessageEvent.prototype, 'data', {
    enumerable: true
});
/**
 * This provides methods for emulating the `EventTarget` interface. It's not
 * meant to be used directly.
 *
 * @mixin
 */ const $435faad1c01a3335$var$EventTarget = {
    /**
   * Register an event listener.
   *
   * @param {String} type A string representing the event type to listen for
   * @param {(Function|Object)} handler The listener to add
   * @param {Object} [options] An options object specifies characteristics about
   *     the event listener
   * @param {Boolean} [options.once=false] A `Boolean` indicating that the
   *     listener should be invoked at most once after being added. If `true`,
   *     the listener would be automatically removed when invoked.
   * @public
   */ addEventListener (type, handler, options = {}) {
        for (const listener of this.listeners(type)){
            if (!options[$435faad1c01a3335$require$kForOnEventAttribute] && listener[$435faad1c01a3335$require$kListener] === handler && !listener[$435faad1c01a3335$require$kForOnEventAttribute]) return;
        }
        let wrapper;
        if (type === 'message') wrapper = function onMessage(data, isBinary) {
            const event = new $435faad1c01a3335$var$MessageEvent('message', {
                data: isBinary ? data : data.toString()
            });
            event[$435faad1c01a3335$var$kTarget] = this;
            $435faad1c01a3335$var$callListener(handler, this, event);
        };
        else if (type === 'close') wrapper = function onClose(code, message) {
            const event = new $435faad1c01a3335$var$CloseEvent('close', {
                code: code,
                reason: message.toString(),
                wasClean: this._closeFrameReceived && this._closeFrameSent
            });
            event[$435faad1c01a3335$var$kTarget] = this;
            $435faad1c01a3335$var$callListener(handler, this, event);
        };
        else if (type === 'error') wrapper = function onError(error) {
            const event = new $435faad1c01a3335$var$ErrorEvent('error', {
                error: error,
                message: error.message
            });
            event[$435faad1c01a3335$var$kTarget] = this;
            $435faad1c01a3335$var$callListener(handler, this, event);
        };
        else if (type === 'open') wrapper = function onOpen() {
            const event = new $435faad1c01a3335$var$Event('open');
            event[$435faad1c01a3335$var$kTarget] = this;
            $435faad1c01a3335$var$callListener(handler, this, event);
        };
        else return;
        wrapper[$435faad1c01a3335$require$kForOnEventAttribute] = !!options[$435faad1c01a3335$require$kForOnEventAttribute];
        wrapper[$435faad1c01a3335$require$kListener] = handler;
        if (options.once) this.once(type, wrapper);
        else this.on(type, wrapper);
    },
    /**
   * Remove an event listener.
   *
   * @param {String} type A string representing the event type to remove
   * @param {(Function|Object)} handler The listener to remove
   * @public
   */ removeEventListener (type, handler) {
        for (const listener of this.listeners(type))if (listener[$435faad1c01a3335$require$kListener] === handler && !listener[$435faad1c01a3335$require$kForOnEventAttribute]) {
            this.removeListener(type, listener);
            break;
        }
    }
};
module.exports = {
    CloseEvent: $435faad1c01a3335$var$CloseEvent,
    ErrorEvent: $435faad1c01a3335$var$ErrorEvent,
    Event: $435faad1c01a3335$var$Event,
    EventTarget: $435faad1c01a3335$var$EventTarget,
    MessageEvent: $435faad1c01a3335$var$MessageEvent
};
/**
 * Call an event listener
 *
 * @param {(Function|Object)} listener The listener to call
 * @param {*} thisArg The value to use as `this`` when calling the listener
 * @param {Event} event The event to pass to the listener
 * @private
 */ function $435faad1c01a3335$var$callListener(listener, thisArg, event) {
    if (typeof listener === 'object' && listener.handleEvent) listener.handleEvent.call(listener, event);
    else listener.call(thisArg, event);
}

});

parcelRegister("f5kD4", function(module, exports) {
'use strict';

var $9CIgd = parcelRequire("9CIgd");
var $afb7532c6c760afc$require$tokenChars = $9CIgd.tokenChars;
/**
 * Adds an offer to the map of extension offers or a parameter to the map of
 * parameters.
 *
 * @param {Object} dest The map of extension offers or parameters
 * @param {String} name The extension or parameter name
 * @param {(Object|Boolean|String)} elem The extension parameters or the
 *     parameter value
 * @private
 */ function $afb7532c6c760afc$var$push(dest, name, elem) {
    if (dest[name] === undefined) dest[name] = [
        elem
    ];
    else dest[name].push(elem);
}
/**
 * Parses the `Sec-WebSocket-Extensions` header into an object.
 *
 * @param {String} header The field value of the header
 * @return {Object} The parsed object
 * @public
 */ function $afb7532c6c760afc$var$parse(header) {
    const offers = Object.create(null);
    let params = Object.create(null);
    let mustUnescape = false;
    let isEscaping = false;
    let inQuotes = false;
    let extensionName;
    let paramName;
    let start = -1;
    let code = -1;
    let end = -1;
    let i = 0;
    for(; i < header.length; i++){
        code = header.charCodeAt(i);
        if (extensionName === undefined) {
            if (end === -1 && $afb7532c6c760afc$require$tokenChars[code] === 1) {
                if (start === -1) start = i;
            } else if (i !== 0 && (code === 0x20 /* ' ' */  || code === 0x09)) {
                if (end === -1 && start !== -1) end = i;
            } else if (code === 0x3b /* ';' */  || code === 0x2c /* ',' */ ) {
                if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
                if (end === -1) end = i;
                const name = header.slice(start, end);
                if (code === 0x2c) {
                    $afb7532c6c760afc$var$push(offers, name, params);
                    params = Object.create(null);
                } else extensionName = name;
                start = end = -1;
            } else throw new SyntaxError(`Unexpected character at index ${i}`);
        } else if (paramName === undefined) {
            if (end === -1 && $afb7532c6c760afc$require$tokenChars[code] === 1) {
                if (start === -1) start = i;
            } else if (code === 0x20 || code === 0x09) {
                if (end === -1 && start !== -1) end = i;
            } else if (code === 0x3b || code === 0x2c) {
                if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
                if (end === -1) end = i;
                $afb7532c6c760afc$var$push(params, header.slice(start, end), true);
                if (code === 0x2c) {
                    $afb7532c6c760afc$var$push(offers, extensionName, params);
                    params = Object.create(null);
                    extensionName = undefined;
                }
                start = end = -1;
            } else if (code === 0x3d /* '=' */  && start !== -1 && end === -1) {
                paramName = header.slice(start, i);
                start = end = -1;
            } else throw new SyntaxError(`Unexpected character at index ${i}`);
        } else {
            //
            // The value of a quoted-string after unescaping must conform to the
            // token ABNF, so only token characters are valid.
            // Ref: https://tools.ietf.org/html/rfc6455#section-9.1
            //
            if (isEscaping) {
                if ($afb7532c6c760afc$require$tokenChars[code] !== 1) throw new SyntaxError(`Unexpected character at index ${i}`);
                if (start === -1) start = i;
                else if (!mustUnescape) mustUnescape = true;
                isEscaping = false;
            } else if (inQuotes) {
                if ($afb7532c6c760afc$require$tokenChars[code] === 1) {
                    if (start === -1) start = i;
                } else if (code === 0x22 /* '"' */  && start !== -1) {
                    inQuotes = false;
                    end = i;
                } else if (code === 0x5c /* '\' */ ) isEscaping = true;
                else throw new SyntaxError(`Unexpected character at index ${i}`);
            } else if (code === 0x22 && header.charCodeAt(i - 1) === 0x3d) inQuotes = true;
            else if (end === -1 && $afb7532c6c760afc$require$tokenChars[code] === 1) {
                if (start === -1) start = i;
            } else if (start !== -1 && (code === 0x20 || code === 0x09)) {
                if (end === -1) end = i;
            } else if (code === 0x3b || code === 0x2c) {
                if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
                if (end === -1) end = i;
                let value = header.slice(start, end);
                if (mustUnescape) {
                    value = value.replace(/\\/g, '');
                    mustUnescape = false;
                }
                $afb7532c6c760afc$var$push(params, paramName, value);
                if (code === 0x2c) {
                    $afb7532c6c760afc$var$push(offers, extensionName, params);
                    params = Object.create(null);
                    extensionName = undefined;
                }
                paramName = undefined;
                start = end = -1;
            } else throw new SyntaxError(`Unexpected character at index ${i}`);
        }
    }
    if (start === -1 || inQuotes || code === 0x20 || code === 0x09) throw new SyntaxError('Unexpected end of input');
    if (end === -1) end = i;
    const token = header.slice(start, end);
    if (extensionName === undefined) $afb7532c6c760afc$var$push(offers, token, params);
    else {
        if (paramName === undefined) $afb7532c6c760afc$var$push(params, token, true);
        else if (mustUnescape) $afb7532c6c760afc$var$push(params, paramName, token.replace(/\\/g, ''));
        else $afb7532c6c760afc$var$push(params, paramName, token);
        $afb7532c6c760afc$var$push(offers, extensionName, params);
    }
    return offers;
}
/**
 * Builds the `Sec-WebSocket-Extensions` header field value.
 *
 * @param {Object} extensions The map of extensions and parameters to format
 * @return {String} A string representing the given object
 * @public
 */ function $afb7532c6c760afc$var$format(extensions) {
    return Object.keys(extensions).map((extension)=>{
        let configurations = extensions[extension];
        if (!Array.isArray(configurations)) configurations = [
            configurations
        ];
        return configurations.map((params)=>{
            return [
                extension
            ].concat(Object.keys(params).map((k)=>{
                let values = params[k];
                if (!Array.isArray(values)) values = [
                    values
                ];
                return values.map((v)=>v === true ? k : `${k}=${v}`).join('; ');
            })).join('; ');
        }).join(', ');
    }).join(', ');
}
module.exports = {
    format: $afb7532c6c760afc$var$format,
    parse: $afb7532c6c760afc$var$parse
};

});



parcelRegister("8Dcwe", function(module, exports) {
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$", "caughtErrors": "none" }] */ 'use strict';



var $648bad413de2e295$require$Duplex = $5HoLl$stream.Duplex;

var $648bad413de2e295$require$createHash = $5HoLl$crypto.createHash;

var $f5kD4 = parcelRequire("f5kD4");

var $iVvbT = parcelRequire("iVvbT");

var $6O3aK = parcelRequire("6O3aK");

var $j8Pq9 = parcelRequire("j8Pq9");

var $g2eNi = parcelRequire("g2eNi");
var $648bad413de2e295$require$GUID = $g2eNi.GUID;
var $648bad413de2e295$require$kWebSocket = $g2eNi.kWebSocket;
const $648bad413de2e295$var$keyRegex = /^[+/0-9A-Za-z]{22}==$/;
const $648bad413de2e295$var$RUNNING = 0;
const $648bad413de2e295$var$CLOSING = 1;
const $648bad413de2e295$var$CLOSED = 2;
/**
 * Class representing a WebSocket server.
 *
 * @extends EventEmitter
 */ class $648bad413de2e295$var$WebSocketServer extends $5HoLl$events {
    /**
   * Create a `WebSocketServer` instance.
   *
   * @param {Object} options Configuration options
   * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
   *     any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
   *     multiple times in the same tick
   * @param {Boolean} [options.autoPong=true] Specifies whether or not to
   *     automatically send a pong in response to a ping
   * @param {Number} [options.backlog=511] The maximum length of the queue of
   *     pending connections
   * @param {Boolean} [options.clientTracking=true] Specifies whether or not to
   *     track clients
   * @param {Function} [options.handleProtocols] A hook to handle protocols
   * @param {String} [options.host] The hostname where to bind the server
   * @param {Number} [options.maxPayload=104857600] The maximum allowed message
   *     size
   * @param {Boolean} [options.noServer=false] Enable no server mode
   * @param {String} [options.path] Accept only connections matching this path
   * @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable
   *     permessage-deflate
   * @param {Number} [options.port] The port where to bind the server
   * @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S
   *     server to use
   * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
   *     not to skip UTF-8 validation for text and close messages
   * @param {Function} [options.verifyClient] A hook to reject connections
   * @param {Function} [options.WebSocket=WebSocket] Specifies the `WebSocket`
   *     class to use. It must be the `WebSocket` class or class that extends it
   * @param {Function} [callback] A listener for the `listening` event
   */ constructor(options, callback){
        super();
        options = {
            allowSynchronousEvents: true,
            autoPong: true,
            maxPayload: 104857600,
            skipUTF8Validation: false,
            perMessageDeflate: false,
            handleProtocols: null,
            clientTracking: true,
            verifyClient: null,
            noServer: false,
            backlog: null,
            server: null,
            host: null,
            path: null,
            port: null,
            WebSocket: $j8Pq9,
            ...options
        };
        if (options.port == null && !options.server && !options.noServer || options.port != null && (options.server || options.noServer) || options.server && options.noServer) throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');
        if (options.port != null) {
            this._server = $5HoLl$http.createServer((req, res)=>{
                const body = $5HoLl$http.STATUS_CODES[426];
                res.writeHead(426, {
                    'Content-Length': body.length,
                    'Content-Type': 'text/plain'
                });
                res.end(body);
            });
            this._server.listen(options.port, options.host, options.backlog, callback);
        } else if (options.server) this._server = options.server;
        if (this._server) {
            const emitConnection = this.emit.bind(this, 'connection');
            this._removeListeners = $648bad413de2e295$var$addListeners(this._server, {
                listening: this.emit.bind(this, 'listening'),
                error: this.emit.bind(this, 'error'),
                upgrade: (req, socket, head)=>{
                    this.handleUpgrade(req, socket, head, emitConnection);
                }
            });
        }
        if (options.perMessageDeflate === true) options.perMessageDeflate = {};
        if (options.clientTracking) {
            this.clients = new Set();
            this._shouldEmitClose = false;
        }
        this.options = options;
        this._state = $648bad413de2e295$var$RUNNING;
    }
    /**
   * Returns the bound address, the address family name, and port of the server
   * as reported by the operating system if listening on an IP socket.
   * If the server is listening on a pipe or UNIX domain socket, the name is
   * returned as a string.
   *
   * @return {(Object|String|null)} The address of the server
   * @public
   */ address() {
        if (this.options.noServer) throw new Error('The server is operating in "noServer" mode');
        if (!this._server) return null;
        return this._server.address();
    }
    /**
   * Stop the server from accepting new connections and emit the `'close'` event
   * when all existing connections are closed.
   *
   * @param {Function} [cb] A one-time listener for the `'close'` event
   * @public
   */ close(cb) {
        if (this._state === $648bad413de2e295$var$CLOSED) {
            if (cb) this.once('close', ()=>{
                cb(new Error('The server is not running'));
            });
            process.nextTick($648bad413de2e295$var$emitClose, this);
            return;
        }
        if (cb) this.once('close', cb);
        if (this._state === $648bad413de2e295$var$CLOSING) return;
        this._state = $648bad413de2e295$var$CLOSING;
        if (this.options.noServer || this.options.server) {
            if (this._server) {
                this._removeListeners();
                this._removeListeners = this._server = null;
            }
            if (this.clients) {
                if (!this.clients.size) process.nextTick($648bad413de2e295$var$emitClose, this);
                else this._shouldEmitClose = true;
            } else process.nextTick($648bad413de2e295$var$emitClose, this);
        } else {
            const server = this._server;
            this._removeListeners();
            this._removeListeners = this._server = null;
            //
            // The HTTP/S server was created internally. Close it, and rely on its
            // `'close'` event.
            //
            server.close(()=>{
                $648bad413de2e295$var$emitClose(this);
            });
        }
    }
    /**
   * See if a given request should be handled by this server instance.
   *
   * @param {http.IncomingMessage} req Request object to inspect
   * @return {Boolean} `true` if the request is valid, else `false`
   * @public
   */ shouldHandle(req) {
        if (this.options.path) {
            const index = req.url.indexOf('?');
            const pathname = index !== -1 ? req.url.slice(0, index) : req.url;
            if (pathname !== this.options.path) return false;
        }
        return true;
    }
    /**
   * Handle a HTTP Upgrade request.
   *
   * @param {http.IncomingMessage} req The request object
   * @param {Duplex} socket The network socket between the server and client
   * @param {Buffer} head The first packet of the upgraded stream
   * @param {Function} cb Callback
   * @public
   */ handleUpgrade(req, socket, head, cb) {
        socket.on('error', $648bad413de2e295$var$socketOnError);
        const key = req.headers['sec-websocket-key'];
        const upgrade = req.headers.upgrade;
        const version = +req.headers['sec-websocket-version'];
        if (req.method !== 'GET') {
            const message = 'Invalid HTTP method';
            $648bad413de2e295$var$abortHandshakeOrEmitwsClientError(this, req, socket, 405, message);
            return;
        }
        if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') {
            const message = 'Invalid Upgrade header';
            $648bad413de2e295$var$abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
            return;
        }
        if (key === undefined || !$648bad413de2e295$var$keyRegex.test(key)) {
            const message = 'Missing or invalid Sec-WebSocket-Key header';
            $648bad413de2e295$var$abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
            return;
        }
        if (version !== 8 && version !== 13) {
            const message = 'Missing or invalid Sec-WebSocket-Version header';
            $648bad413de2e295$var$abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
            return;
        }
        if (!this.shouldHandle(req)) {
            $648bad413de2e295$var$abortHandshake(socket, 400);
            return;
        }
        const secWebSocketProtocol = req.headers['sec-websocket-protocol'];
        let protocols = new Set();
        if (secWebSocketProtocol !== undefined) try {
            protocols = $6O3aK.parse(secWebSocketProtocol);
        } catch (err) {
            const message = 'Invalid Sec-WebSocket-Protocol header';
            $648bad413de2e295$var$abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
            return;
        }
        const secWebSocketExtensions = req.headers['sec-websocket-extensions'];
        const extensions = {};
        if (this.options.perMessageDeflate && secWebSocketExtensions !== undefined) {
            const perMessageDeflate = new $iVvbT(this.options.perMessageDeflate, true, this.options.maxPayload);
            try {
                const offers = $f5kD4.parse(secWebSocketExtensions);
                if (offers[$iVvbT.extensionName]) {
                    perMessageDeflate.accept(offers[$iVvbT.extensionName]);
                    extensions[$iVvbT.extensionName] = perMessageDeflate;
                }
            } catch (err) {
                const message = 'Invalid or unacceptable Sec-WebSocket-Extensions header';
                $648bad413de2e295$var$abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
                return;
            }
        }
        //
        // Optionally call external client verification handler.
        //
        if (this.options.verifyClient) {
            const info = {
                origin: req.headers[`${version === 8 ? 'sec-websocket-origin' : 'origin'}`],
                secure: !!(req.socket.authorized || req.socket.encrypted),
                req: req
            };
            if (this.options.verifyClient.length === 2) {
                this.options.verifyClient(info, (verified, code, message, headers)=>{
                    if (!verified) return $648bad413de2e295$var$abortHandshake(socket, code || 401, message, headers);
                    this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
                });
                return;
            }
            if (!this.options.verifyClient(info)) return $648bad413de2e295$var$abortHandshake(socket, 401);
        }
        this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
    }
    /**
   * Upgrade the connection to WebSocket.
   *
   * @param {Object} extensions The accepted extensions
   * @param {String} key The value of the `Sec-WebSocket-Key` header
   * @param {Set} protocols The subprotocols
   * @param {http.IncomingMessage} req The request object
   * @param {Duplex} socket The network socket between the server and client
   * @param {Buffer} head The first packet of the upgraded stream
   * @param {Function} cb Callback
   * @throws {Error} If called more than once with the same socket
   * @private
   */ completeUpgrade(extensions, key, protocols, req, socket, head, cb) {
        //
        // Destroy the socket if the client has already sent a FIN packet.
        //
        if (!socket.readable || !socket.writable) return socket.destroy();
        if (socket[$648bad413de2e295$require$kWebSocket]) throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");
        if (this._state > $648bad413de2e295$var$RUNNING) return $648bad413de2e295$var$abortHandshake(socket, 503);
        const digest = $648bad413de2e295$require$createHash('sha1').update(key + $648bad413de2e295$require$GUID).digest('base64');
        const headers = [
            'HTTP/1.1 101 Switching Protocols',
            'Upgrade: websocket',
            'Connection: Upgrade',
            `Sec-WebSocket-Accept: ${digest}`
        ];
        const ws = new this.options.WebSocket(null, undefined, this.options);
        if (protocols.size) {
            //
            // Optionally call external protocol selection handler.
            //
            const protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value;
            if (protocol) {
                headers.push(`Sec-WebSocket-Protocol: ${protocol}`);
                ws._protocol = protocol;
            }
        }
        if (extensions[$iVvbT.extensionName]) {
            const params = extensions[$iVvbT.extensionName].params;
            const value = $f5kD4.format({
                [$iVvbT.extensionName]: [
                    params
                ]
            });
            headers.push(`Sec-WebSocket-Extensions: ${value}`);
            ws._extensions = extensions;
        }
        //
        // Allow external modification/inspection of handshake headers.
        //
        this.emit('headers', headers, req);
        socket.write(headers.concat('\r\n').join('\r\n'));
        socket.removeListener('error', $648bad413de2e295$var$socketOnError);
        ws.setSocket(socket, head, {
            allowSynchronousEvents: this.options.allowSynchronousEvents,
            maxPayload: this.options.maxPayload,
            skipUTF8Validation: this.options.skipUTF8Validation
        });
        if (this.clients) {
            this.clients.add(ws);
            ws.on('close', ()=>{
                this.clients.delete(ws);
                if (this._shouldEmitClose && !this.clients.size) process.nextTick($648bad413de2e295$var$emitClose, this);
            });
        }
        cb(ws, req);
    }
}
module.exports = $648bad413de2e295$var$WebSocketServer;
/**
 * Add event listeners on an `EventEmitter` using a map of <event, listener>
 * pairs.
 *
 * @param {EventEmitter} server The event emitter
 * @param {Object.<String, Function>} map The listeners to add
 * @return {Function} A function that will remove the added listeners when
 *     called
 * @private
 */ function $648bad413de2e295$var$addListeners(server, map) {
    for (const event of Object.keys(map))server.on(event, map[event]);
    return function removeListeners() {
        for (const event of Object.keys(map))server.removeListener(event, map[event]);
    };
}
/**
 * Emit a `'close'` event on an `EventEmitter`.
 *
 * @param {EventEmitter} server The event emitter
 * @private
 */ function $648bad413de2e295$var$emitClose(server) {
    server._state = $648bad413de2e295$var$CLOSED;
    server.emit('close');
}
/**
 * Handle socket errors.
 *
 * @private
 */ function $648bad413de2e295$var$socketOnError() {
    this.destroy();
}
/**
 * Close the connection when preconditions are not fulfilled.
 *
 * @param {Duplex} socket The socket of the upgrade request
 * @param {Number} code The HTTP response status code
 * @param {String} [message] The HTTP response body
 * @param {Object} [headers] Additional HTTP response headers
 * @private
 */ function $648bad413de2e295$var$abortHandshake(socket, code, message, headers) {
    //
    // The socket is writable unless the user destroyed or ended it before calling
    // `server.handleUpgrade()` or in the `verifyClient` function, which is a user
    // error. Handling this does not make much sense as the worst that can happen
    // is that some of the data written by the user might be discarded due to the
    // call to `socket.end()` below, which triggers an `'error'` event that in
    // turn causes the socket to be destroyed.
    //
    message = message || $5HoLl$http.STATUS_CODES[code];
    headers = {
        Connection: 'close',
        'Content-Type': 'text/html',
        'Content-Length': Buffer.byteLength(message),
        ...headers
    };
    socket.once('finish', socket.destroy);
    socket.end(`HTTP/1.1 ${code} ${$5HoLl$http.STATUS_CODES[code]}\r\n` + Object.keys(headers).map((h)=>`${h}: ${headers[h]}`).join('\r\n') + '\r\n\r\n' + message);
}
/**
 * Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least
 * one listener for it, otherwise call `abortHandshake()`.
 *
 * @param {WebSocketServer} server The WebSocket server
 * @param {http.IncomingMessage} req The request object
 * @param {Duplex} socket The socket of the upgrade request
 * @param {Number} code The HTTP response status code
 * @param {String} message The HTTP response body
 * @private
 */ function $648bad413de2e295$var$abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {
    if (server.listenerCount('wsClientError')) {
        const err = new Error(message);
        Error.captureStackTrace(err, $648bad413de2e295$var$abortHandshakeOrEmitwsClientError);
        server.emit('wsClientError', err, socket, req);
    } else $648bad413de2e295$var$abortHandshake(socket, code, message);
}

});
parcelRegister("6O3aK", function(module, exports) {
'use strict';

var $9CIgd = parcelRequire("9CIgd");
var $4f49df8a0ab9abcd$require$tokenChars = $9CIgd.tokenChars;
/**
 * Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.
 *
 * @param {String} header The field value of the header
 * @return {Set} The subprotocol names
 * @public
 */ function $4f49df8a0ab9abcd$var$parse(header) {
    const protocols = new Set();
    let start = -1;
    let end = -1;
    let i = 0;
    for(i; i < header.length; i++){
        const code = header.charCodeAt(i);
        if (end === -1 && $4f49df8a0ab9abcd$require$tokenChars[code] === 1) {
            if (start === -1) start = i;
        } else if (i !== 0 && (code === 0x20 /* ' ' */  || code === 0x09)) {
            if (end === -1 && start !== -1) end = i;
        } else if (code === 0x2c /* ',' */ ) {
            if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
            if (end === -1) end = i;
            const protocol = header.slice(start, end);
            if (protocols.has(protocol)) throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
            protocols.add(protocol);
            start = end = -1;
        } else throw new SyntaxError(`Unexpected character at index ${i}`);
    }
    if (start === -1 || end !== -1) throw new SyntaxError('Unexpected end of input');
    const protocol = header.slice(start, i);
    if (protocols.has(protocol)) throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
    protocols.add(protocol);
    return protocols;
}
module.exports = {
    parse: $4f49df8a0ab9abcd$var$parse
};

});


parcelRegister("iz8ZN", function(module, exports) {
'use strict';
module.exports = function quote(xs) {
    return xs.map(function(s) {
        if (s && typeof s === 'object') return s.op.replace(/(.)/g, '\\$1');
        if (/["\s]/.test(s) && !/'/.test(s)) return "'" + s.replace(/(['\\])/g, '\\$1') + "'";
        if (/["'\s]/.test(s)) return '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"';
        return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, '$1\\$2');
    }).join(' ');
};

});

parcelRegister("bGq8L", function(module, exports) {
'use strict';
// '<(' is process substitution operator and
// can be parsed the same as control operator
var $8817e4e62bf20a8f$var$CONTROL = '(?:' + [
    '\\|\\|',
    '\\&\\&',
    ';;',
    '\\|\\&',
    '\\<\\(',
    '\\<\\<\\<',
    '>>',
    '>\\&',
    '<\\&',
    '[&;()|<>]'
].join('|') + ')';
var $8817e4e62bf20a8f$var$controlRE = new RegExp('^' + $8817e4e62bf20a8f$var$CONTROL + '$');
var $8817e4e62bf20a8f$var$META = '|&;()<> \\t';
var $8817e4e62bf20a8f$var$SINGLE_QUOTE = '"((\\\\"|[^"])*?)"';
var $8817e4e62bf20a8f$var$DOUBLE_QUOTE = '\'((\\\\\'|[^\'])*?)\'';
var $8817e4e62bf20a8f$var$hash = /^#$/;
var $8817e4e62bf20a8f$var$SQ = "'";
var $8817e4e62bf20a8f$var$DQ = '"';
var $8817e4e62bf20a8f$var$DS = '$';
var $8817e4e62bf20a8f$var$TOKEN = '';
var $8817e4e62bf20a8f$var$mult = 0x100000000; // Math.pow(16, 8);
for(var $8817e4e62bf20a8f$var$i = 0; $8817e4e62bf20a8f$var$i < 4; $8817e4e62bf20a8f$var$i++)$8817e4e62bf20a8f$var$TOKEN += ($8817e4e62bf20a8f$var$mult * Math.random()).toString(16);
var $8817e4e62bf20a8f$var$startsWithToken = new RegExp('^' + $8817e4e62bf20a8f$var$TOKEN);
function $8817e4e62bf20a8f$var$matchAll(s, r) {
    var origIndex = r.lastIndex;
    var matches = [];
    var matchObj;
    while(matchObj = r.exec(s)){
        matches.push(matchObj);
        if (r.lastIndex === matchObj.index) r.lastIndex += 1;
    }
    r.lastIndex = origIndex;
    return matches;
}
function $8817e4e62bf20a8f$var$getVar(env, pre, key) {
    var r = typeof env === 'function' ? env(key) : env[key];
    if (typeof r === 'undefined' && key != '') r = '';
    else if (typeof r === 'undefined') r = '$';
    if (typeof r === 'object') return pre + $8817e4e62bf20a8f$var$TOKEN + JSON.stringify(r) + $8817e4e62bf20a8f$var$TOKEN;
    return pre + r;
}
function $8817e4e62bf20a8f$var$parseInternal(string, env, opts) {
    if (!opts) opts = {};
    var BS = opts.escape || '\\';
    var BAREWORD = '(\\' + BS + '[\'"' + $8817e4e62bf20a8f$var$META + ']|[^\\s\'"' + $8817e4e62bf20a8f$var$META + '])+';
    var chunker = new RegExp([
        '(' + $8817e4e62bf20a8f$var$CONTROL + ')',
        '(' + BAREWORD + '|' + $8817e4e62bf20a8f$var$SINGLE_QUOTE + '|' + $8817e4e62bf20a8f$var$DOUBLE_QUOTE + ')+'
    ].join('|'), 'g');
    var matches = $8817e4e62bf20a8f$var$matchAll(string, chunker);
    if (matches.length === 0) return [];
    if (!env) env = {};
    var commented = false;
    return matches.map(function(match) {
        var s = match[0];
        if (!s || commented) return void 0;
        if ($8817e4e62bf20a8f$var$controlRE.test(s)) return {
            op: s
        };
        // Hand-written scanner/parser for Bash quoting rules:
        //
        // 1. inside single quotes, all characters are printed literally.
        // 2. inside double quotes, all characters are printed literally
        //    except variables prefixed by '$' and backslashes followed by
        //    either a double quote or another backslash.
        // 3. outside of any quotes, backslashes are treated as escape
        //    characters and not printed (unless they are themselves escaped)
        // 4. quote context can switch mid-token if there is no whitespace
        //     between the two quote contexts (e.g. all'one'"token" parses as
        //     "allonetoken")
        var quote = false;
        var esc = false;
        var out = '';
        var isGlob = false;
        var i;
        function parseEnvVar() {
            i += 1;
            var varend;
            var varname;
            var char = s.charAt(i);
            if (char === '{') {
                i += 1;
                if (s.charAt(i) === '}') throw new Error('Bad substitution: ' + s.slice(i - 2, i + 1));
                varend = s.indexOf('}', i);
                if (varend < 0) throw new Error('Bad substitution: ' + s.slice(i));
                varname = s.slice(i, varend);
                i = varend;
            } else if (/[*@#?$!_-]/.test(char)) {
                varname = char;
                i += 1;
            } else {
                var slicedFromI = s.slice(i);
                varend = slicedFromI.match(/[^\w\d_]/);
                if (!varend) {
                    varname = slicedFromI;
                    i = s.length;
                } else {
                    varname = slicedFromI.slice(0, varend.index);
                    i += varend.index - 1;
                }
            }
            return $8817e4e62bf20a8f$var$getVar(env, '', varname);
        }
        for(i = 0; i < s.length; i++){
            var c = s.charAt(i);
            isGlob = isGlob || !quote && (c === '*' || c === '?');
            if (esc) {
                out += c;
                esc = false;
            } else if (quote) {
                if (c === quote) quote = false;
                else if (quote == $8817e4e62bf20a8f$var$SQ) out += c;
                else {
                    if (c === BS) {
                        i += 1;
                        c = s.charAt(i);
                        if (c === $8817e4e62bf20a8f$var$DQ || c === BS || c === $8817e4e62bf20a8f$var$DS) out += c;
                        else out += BS + c;
                    } else if (c === $8817e4e62bf20a8f$var$DS) out += parseEnvVar();
                    else out += c;
                }
            } else if (c === $8817e4e62bf20a8f$var$DQ || c === $8817e4e62bf20a8f$var$SQ) quote = c;
            else if ($8817e4e62bf20a8f$var$controlRE.test(c)) return {
                op: s
            };
            else if ($8817e4e62bf20a8f$var$hash.test(c)) {
                commented = true;
                var commentObj = {
                    comment: string.slice(match.index + i + 1)
                };
                if (out.length) return [
                    out,
                    commentObj
                ];
                return [
                    commentObj
                ];
            } else if (c === BS) esc = true;
            else if (c === $8817e4e62bf20a8f$var$DS) out += parseEnvVar();
            else out += c;
        }
        if (isGlob) return {
            op: 'glob',
            pattern: out
        };
        return out;
    }).reduce(function(prev, arg) {
        // TODO: replace this whole reduce with a concat
        return typeof arg === 'undefined' ? prev : prev.concat(arg);
    }, []);
}
module.exports = function parse(s, env, opts) {
    var mapped = $8817e4e62bf20a8f$var$parseInternal(s, env, opts);
    if (typeof env !== 'function') return mapped;
    return mapped.reduce(function(acc, s) {
        if (typeof s === 'object') return acc.concat(s);
        var xs = s.split(RegExp('(' + $8817e4e62bf20a8f$var$TOKEN + '.*?' + $8817e4e62bf20a8f$var$TOKEN + ')', 'g'));
        if (xs.length === 1) return acc.concat(xs[0]);
        return acc.concat(xs.filter(Boolean).map(function(x) {
            if ($8817e4e62bf20a8f$var$startsWithToken.test(x)) return JSON.parse(x.split($8817e4e62bf20a8f$var$TOKEN)[1]);
            return x;
        }));
    }, []);
};

});


$parcel$defineInteropFlag(module.exports);

$parcel$export(module.exports, "default", () => $0d6f2be90dae4092$export$2e2bcd8739ae039);






const $30c5ada1f46847d4$var$serverErrorList = {
    EACCES: "You don't have access to bind the server to port {port}.",
    EADDRINUSE: 'There is already a process listening on port {port}.'
};
function $30c5ada1f46847d4$export$2e2bcd8739ae039(err, port) {
    let desc = `Error: ${err.code} occurred while setting up server on port ${port.toString()}.`;
    if ($30c5ada1f46847d4$var$serverErrorList[err.code]) desc = $30c5ada1f46847d4$var$serverErrorList[err.code].replace(/{port}/g, port);
    return desc;
}



var $7e963105242e0bd8$exports = {};
/*
 * EJS Embedded JavaScript templates
 * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
*/ 'use strict';


/*
 * EJS Embedded JavaScript templates
 * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
*/ /**
 * Private utility functions
 * @module utils
 * @private
 */ /**
 * Escape characters reserved in regular expressions.
 *
 * If `string` is `undefined` or `null`, the empty string is returned.
 *
 * @param {String} string Input string
 * @return {String} Escaped string
 * @static
 * @private
 */ var $f106fa30f445594f$export$c998f240a39da81a;
/**
 * Escape characters reserved in XML.
 *
 * If `markup` is `undefined` or `null`, the empty string is returned.
 *
 * @implements {EscapeCallback}
 * @param {String} markup Input string
 * @return {String} Escaped string
 * @static
 * @private
 */ var $f106fa30f445594f$export$b2bcda23b30e00ac;
/**
 * Naive copy of properties from one object to another.
 * Does not recurse into non-scalar properties
 * Does not check to see if the property has a value before copying
 *
 * @param  {Object} to   Destination object
 * @param  {Object} from Source object
 * @return {Object}      Destination object
 * @static
 * @private
 */ var $f106fa30f445594f$export$9c13236873b118a5;
/**
 * Naive copy of a list of key names, from one object to another.
 * Only copies property if it is actually defined
 * Does not recurse into non-scalar properties
 *
 * @param  {Object} to   Destination object
 * @param  {Object} from Source object
 * @param  {Array} list List of properties to copy
 * @return {Object}      Destination object
 * @static
 * @private
 */ var $f106fa30f445594f$export$f83db5734555b793;
/**
 * Simple in-process cache implementation. Does not implement limits of any
 * sort.
 *
 * @implements {Cache}
 * @static
 * @private
 */ var $f106fa30f445594f$export$69a3209f1a06c04d;
/**
 * Transforms hyphen case variable into camel case.
 *
 * @param {String} string Hyphen case string
 * @return {String} Camel case string
 * @static
 * @private
 */ var $f106fa30f445594f$export$519b2305b0acfa6b;
/**
 * Returns a null-prototype object in runtimes that support it
 *
 * @return {Object} Object, prototype will be set to null where possible
 * @static
 * @private
 */ var $f106fa30f445594f$export$a59469c2841c043c;
var $f106fa30f445594f$export$657fe57b4fad0029;
'use strict';
var $f106fa30f445594f$var$regExpChars = /[|\\{}()[\]^$+*?.]/g;
var $f106fa30f445594f$var$hasOwnProperty = Object.prototype.hasOwnProperty;
var $f106fa30f445594f$var$hasOwn = function(obj, key) {
    return $f106fa30f445594f$var$hasOwnProperty.apply(obj, [
        key
    ]);
};
$f106fa30f445594f$export$c998f240a39da81a = function(string) {
    // istanbul ignore if
    if (!string) return '';
    return String(string).replace($f106fa30f445594f$var$regExpChars, '\\$&');
};
var $f106fa30f445594f$var$_ENCODE_HTML_RULES = {
    '&': '&amp;',
    '<': '&lt;',
    '>': '&gt;',
    '"': '&#34;',
    "'": '&#39;'
};
var $f106fa30f445594f$var$_MATCH_HTML = /[&<>'"]/g;
function $f106fa30f445594f$var$encode_char(c) {
    return $f106fa30f445594f$var$_ENCODE_HTML_RULES[c] || c;
}
/**
 * Stringified version of constants used by {@link module:utils.escapeXML}.
 *
 * It is used in the process of generating {@link ClientFunction}s.
 *
 * @readonly
 * @type {String}
 */ var $f106fa30f445594f$var$escapeFuncStr = 'var _ENCODE_HTML_RULES = {\n      "&": "&amp;"\n    , "<": "&lt;"\n    , ">": "&gt;"\n    , \'"\': "&#34;"\n    , "\'": "&#39;"\n    }\n  , _MATCH_HTML = /[&<>\'"]/g;\nfunction encode_char(c) {\n  return _ENCODE_HTML_RULES[c] || c;\n};\n';
$f106fa30f445594f$export$b2bcda23b30e00ac = function(markup) {
    return markup == undefined ? '' : String(markup).replace($f106fa30f445594f$var$_MATCH_HTML, $f106fa30f445594f$var$encode_char);
};
function $f106fa30f445594f$var$escapeXMLToString() {
    return Function.prototype.toString.call(this) + ';\n' + $f106fa30f445594f$var$escapeFuncStr;
}
try {
    if (typeof Object.defineProperty === 'function') // If the Function prototype is frozen, the "toString" property is non-writable. This means that any objects which inherit this property
    // cannot have the property changed using an assignment. If using strict mode, attempting that will cause an error. If not using strict
    // mode, attempting that will be silently ignored.
    // However, we can still explicitly shadow the prototype's "toString" property by defining a new "toString" property on this object.
    Object.defineProperty($f106fa30f445594f$export$b2bcda23b30e00ac, 'toString', {
        value: $f106fa30f445594f$var$escapeXMLToString
    });
    else // If Object.defineProperty() doesn't exist, attempt to shadow this property using the assignment operator.
    $f106fa30f445594f$export$b2bcda23b30e00ac.toString = $f106fa30f445594f$var$escapeXMLToString;
} catch (err) {
    console.warn('Unable to set escapeXML.toString (is the Function prototype frozen?)');
}
$f106fa30f445594f$export$9c13236873b118a5 = function(to, from) {
    from = from || {};
    if (to !== null && to !== undefined) for(var p in from){
        if (!$f106fa30f445594f$var$hasOwn(from, p)) continue;
        if (p === '__proto__' || p === 'constructor') continue;
        to[p] = from[p];
    }
    return to;
};
$f106fa30f445594f$export$f83db5734555b793 = function(to, from, list) {
    list = list || [];
    from = from || {};
    if (to !== null && to !== undefined) for(var i = 0; i < list.length; i++){
        var p = list[i];
        if (typeof from[p] != 'undefined') {
            if (!$f106fa30f445594f$var$hasOwn(from, p)) continue;
            if (p === '__proto__' || p === 'constructor') continue;
            to[p] = from[p];
        }
    }
    return to;
};
$f106fa30f445594f$export$69a3209f1a06c04d = {
    _data: {},
    set: function(key, val) {
        this._data[key] = val;
    },
    get: function(key) {
        return this._data[key];
    },
    remove: function(key) {
        delete this._data[key];
    },
    reset: function() {
        this._data = {};
    }
};
$f106fa30f445594f$export$519b2305b0acfa6b = function(str) {
    return str.replace(/-[a-z]/g, function(match) {
        return match[1].toUpperCase();
    });
};
$f106fa30f445594f$export$a59469c2841c043c = function() {
    if (typeof Object.create == 'function') return function() {
        return Object.create(null);
    };
    // Not possible, just pass through
    return function() {
        return {};
    };
}();
$f106fa30f445594f$export$657fe57b4fad0029 = function(obj) {
    var o = $f106fa30f445594f$export$a59469c2841c043c();
    for(var p in obj)if ($f106fa30f445594f$var$hasOwn(obj, p)) o[p] = obj[p];
    return o;
};


var $7e963105242e0bd8$var$scopeOptionWarned = false;
var $70fe7746198d20a9$exports = {};
$70fe7746198d20a9$exports = JSON.parse("{\"name\":\"ejs\",\"description\":\"Embedded JavaScript templates\",\"keywords\":[\"template\",\"engine\",\"ejs\"],\"version\":\"3.1.10\",\"author\":\"Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)\",\"license\":\"Apache-2.0\",\"bin\":{\"ejs\":\"./bin/cli.js\"},\"main\":\"./lib/ejs.js\",\"jsdelivr\":\"ejs.min.js\",\"unpkg\":\"ejs.min.js\",\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/mde/ejs.git\"},\"bugs\":\"https://github.com/mde/ejs/issues\",\"homepage\":\"https://github.com/mde/ejs\",\"dependencies\":{\"jake\":\"^10.8.5\"},\"devDependencies\":{\"browserify\":\"^16.5.1\",\"eslint\":\"^6.8.0\",\"git-directory-deploy\":\"^1.5.1\",\"jsdoc\":\"^4.0.2\",\"lru-cache\":\"^4.0.1\",\"mocha\":\"^10.2.0\",\"uglify-js\":\"^3.3.16\"},\"engines\":{\"node\":\">=0.10.0\"},\"scripts\":{\"test\":\"npx jake test\"}}");


var $7e963105242e0bd8$require$_VERSION_STRING = $70fe7746198d20a9$exports.version;
var $7e963105242e0bd8$var$_DEFAULT_OPEN_DELIMITER = '<';
var $7e963105242e0bd8$var$_DEFAULT_CLOSE_DELIMITER = '>';
var $7e963105242e0bd8$var$_DEFAULT_DELIMITER = '%';
var $7e963105242e0bd8$var$_DEFAULT_LOCALS_NAME = 'locals';
var $7e963105242e0bd8$var$_NAME = 'ejs';
var $7e963105242e0bd8$var$_REGEX_STRING = '(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)';
var $7e963105242e0bd8$var$_OPTS_PASSABLE_WITH_DATA = [
    'delimiter',
    'scope',
    'context',
    'debug',
    'compileDebug',
    'client',
    '_with',
    'rmWhitespace',
    'strict',
    'filename',
    'async'
];
// We don't allow 'cache' option to be passed in the data obj for
// the normal `render` call, but this is where Express 2 & 3 put it
// so we make an exception for `renderFile`
var $7e963105242e0bd8$var$_OPTS_PASSABLE_WITH_DATA_EXPRESS = $7e963105242e0bd8$var$_OPTS_PASSABLE_WITH_DATA.concat('cache');
var $7e963105242e0bd8$var$_BOM = /^\uFEFF/;
var $7e963105242e0bd8$var$_JS_IDENTIFIER = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
/**
 * EJS template function cache. This can be a LRU object from lru-cache NPM
 * module. By default, it is {@link module:utils.cache}, a simple in-process
 * cache that grows continuously.
 *
 * @type {Cache}
 */ $7e963105242e0bd8$exports.cache = $f106fa30f445594f$export$69a3209f1a06c04d;
/**
 * Custom file loader. Useful for template preprocessing or restricting access
 * to a certain part of the filesystem.
 *
 * @type {fileLoader}
 */ $7e963105242e0bd8$exports.fileLoader = $5HoLl$fs.readFileSync;
/**
 * Name of the object containing the locals.
 *
 * This variable is overridden by {@link Options}`.localsName` if it is not
 * `undefined`.
 *
 * @type {String}
 * @public
 */ $7e963105242e0bd8$exports.localsName = $7e963105242e0bd8$var$_DEFAULT_LOCALS_NAME;
/**
 * Promise implementation -- defaults to the native implementation if available
 * This is mostly just for testability
 *
 * @type {PromiseConstructorLike}
 * @public
 */ $7e963105242e0bd8$exports.promiseImpl = new Function('return this;')().Promise;
/**
 * Get the path to the included file from the parent file path and the
 * specified path.
 *
 * @param {String}  name     specified path
 * @param {String}  filename parent file path
 * @param {Boolean} [isDir=false] whether the parent file path is a directory
 * @return {String}
 */ $7e963105242e0bd8$exports.resolveInclude = function(name, filename, isDir) {
    var dirname = $5HoLl$path.dirname;
    var extname = $5HoLl$path.extname;
    var resolve = $5HoLl$path.resolve;
    var includePath = resolve(isDir ? filename : dirname(filename), name);
    var ext = extname(name);
    if (!ext) includePath += '.ejs';
    return includePath;
};
/**
 * Try to resolve file path on multiple directories
 *
 * @param  {String}        name  specified path
 * @param  {Array<String>} paths list of possible parent directory paths
 * @return {String}
 */ function $7e963105242e0bd8$var$resolvePaths(name, paths) {
    var filePath;
    if (paths.some(function(v) {
        filePath = $7e963105242e0bd8$exports.resolveInclude(name, v, true);
        return $5HoLl$fs.existsSync(filePath);
    })) return filePath;
}
/**
 * Get the path to the included file by Options
 *
 * @param  {String}  path    specified path
 * @param  {Options} options compilation options
 * @return {String}
 */ function $7e963105242e0bd8$var$getIncludePath(path, options) {
    var includePath;
    var filePath;
    var views = options.views;
    var match = /^[A-Za-z]+:\\|^\//.exec(path);
    // Abs path
    if (match && match.length) {
        path = path.replace(/^\/*/, '');
        if (Array.isArray(options.root)) includePath = $7e963105242e0bd8$var$resolvePaths(path, options.root);
        else includePath = $7e963105242e0bd8$exports.resolveInclude(path, options.root || '/', true);
    } else {
        // Look relative to a passed filename first
        if (options.filename) {
            filePath = $7e963105242e0bd8$exports.resolveInclude(path, options.filename);
            if ($5HoLl$fs.existsSync(filePath)) includePath = filePath;
        }
        // Then look in any views directories
        if (!includePath && Array.isArray(views)) includePath = $7e963105242e0bd8$var$resolvePaths(path, views);
        if (!includePath && typeof options.includer !== 'function') throw new Error('Could not find the include file "' + options.escapeFunction(path) + '"');
    }
    return includePath;
}
/**
 * Get the template from a string or a file, either compiled on-the-fly or
 * read from cache (if enabled), and cache the template if needed.
 *
 * If `template` is not set, the file specified in `options.filename` will be
 * read.
 *
 * If `options.cache` is true, this function reads the file from
 * `options.filename` so it must be set prior to calling this function.
 *
 * @memberof module:ejs-internal
 * @param {Options} options   compilation options
 * @param {String} [template] template source
 * @return {(TemplateFunction|ClientFunction)}
 * Depending on the value of `options.client`, either type might be returned.
 * @static
 */ function $7e963105242e0bd8$var$handleCache(options, template) {
    var func;
    var filename = options.filename;
    var hasTemplate = arguments.length > 1;
    if (options.cache) {
        if (!filename) throw new Error('cache option requires a filename');
        func = $7e963105242e0bd8$exports.cache.get(filename);
        if (func) return func;
        if (!hasTemplate) template = $7e963105242e0bd8$var$fileLoader(filename).toString().replace($7e963105242e0bd8$var$_BOM, '');
    } else if (!hasTemplate) {
        // istanbul ignore if: should not happen at all
        if (!filename) throw new Error("Internal EJS error: no file name or template provided");
        template = $7e963105242e0bd8$var$fileLoader(filename).toString().replace($7e963105242e0bd8$var$_BOM, '');
    }
    func = $7e963105242e0bd8$exports.compile(template, options);
    if (options.cache) $7e963105242e0bd8$exports.cache.set(filename, func);
    return func;
}
/**
 * Try calling handleCache with the given options and data and call the
 * callback with the result. If an error occurs, call the callback with
 * the error. Used by renderFile().
 *
 * @memberof module:ejs-internal
 * @param {Options} options    compilation options
 * @param {Object} data        template data
 * @param {RenderFileCallback} cb callback
 * @static
 */ function $7e963105242e0bd8$var$tryHandleCache(options, data, cb) {
    var result;
    if (!cb) {
        if (typeof $7e963105242e0bd8$exports.promiseImpl == 'function') return new $7e963105242e0bd8$exports.promiseImpl(function(resolve, reject) {
            try {
                result = $7e963105242e0bd8$var$handleCache(options)(data);
                resolve(result);
            } catch (err) {
                reject(err);
            }
        });
        else throw new Error('Please provide a callback function');
    } else {
        try {
            result = $7e963105242e0bd8$var$handleCache(options)(data);
        } catch (err) {
            return cb(err);
        }
        cb(null, result);
    }
}
/**
 * fileLoader is independent
 *
 * @param {String} filePath ejs file path.
 * @return {String} The contents of the specified file.
 * @static
 */ function $7e963105242e0bd8$var$fileLoader(filePath) {
    return $7e963105242e0bd8$exports.fileLoader(filePath);
}
/**
 * Get the template function.
 *
 * If `options.cache` is `true`, then the template is cached.
 *
 * @memberof module:ejs-internal
 * @param {String}  path    path for the specified file
 * @param {Options} options compilation options
 * @return {(TemplateFunction|ClientFunction)}
 * Depending on the value of `options.client`, either type might be returned
 * @static
 */ function $7e963105242e0bd8$var$includeFile(path, options) {
    var opts = $f106fa30f445594f$export$9c13236873b118a5($f106fa30f445594f$export$a59469c2841c043c(), options);
    opts.filename = $7e963105242e0bd8$var$getIncludePath(path, opts);
    if (typeof options.includer === 'function') {
        var includerResult = options.includer(path, opts.filename);
        if (includerResult) {
            if (includerResult.filename) opts.filename = includerResult.filename;
            if (includerResult.template) return $7e963105242e0bd8$var$handleCache(opts, includerResult.template);
        }
    }
    return $7e963105242e0bd8$var$handleCache(opts);
}
/**
 * Re-throw the given `err` in context to the `str` of ejs, `filename`, and
 * `lineno`.
 *
 * @implements {RethrowCallback}
 * @memberof module:ejs-internal
 * @param {Error}  err      Error object
 * @param {String} str      EJS source
 * @param {String} flnm     file name of the EJS file
 * @param {Number} lineno   line number of the error
 * @param {EscapeCallback} esc
 * @static
 */ function $7e963105242e0bd8$var$rethrow(err, str, flnm, lineno, esc) {
    var lines = str.split('\n');
    var start = Math.max(lineno - 3, 0);
    var end = Math.min(lines.length, lineno + 3);
    var filename = esc(flnm);
    // Error context
    var context = lines.slice(start, end).map(function(line, i) {
        var curr = i + start + 1;
        return (curr == lineno ? ' >> ' : '    ') + curr + '| ' + line;
    }).join('\n');
    // Alter exception message
    err.path = filename;
    err.message = (filename || 'ejs') + ':' + lineno + '\n' + context + '\n\n' + err.message;
    throw err;
}
function $7e963105242e0bd8$var$stripSemi(str) {
    return str.replace(/;(\s*$)/, '$1');
}
/**
 * Compile the given `str` of ejs into a template function.
 *
 * @param {String}  template EJS template
 *
 * @param {Options} [opts] compilation options
 *
 * @return {(TemplateFunction|ClientFunction)}
 * Depending on the value of `opts.client`, either type might be returned.
 * Note that the return type of the function also depends on the value of `opts.async`.
 * @public
 */ $7e963105242e0bd8$exports.compile = function compile(template, opts) {
    var templ;
    // v1 compat
    // 'scope' is 'context'
    // FIXME: Remove this in a future version
    if (opts && opts.scope) {
        if (!$7e963105242e0bd8$var$scopeOptionWarned) {
            console.warn('`scope` option is deprecated and will be removed in EJS 3');
            $7e963105242e0bd8$var$scopeOptionWarned = true;
        }
        if (!opts.context) opts.context = opts.scope;
        delete opts.scope;
    }
    templ = new $7e963105242e0bd8$var$Template(template, opts);
    return templ.compile();
};
/**
 * Render the given `template` of ejs.
 *
 * If you would like to include options but not data, you need to explicitly
 * call this function with `data` being an empty object or `null`.
 *
 * @param {String}   template EJS template
 * @param {Object}  [data={}] template data
 * @param {Options} [opts={}] compilation and rendering options
 * @return {(String|Promise<String>)}
 * Return value type depends on `opts.async`.
 * @public
 */ $7e963105242e0bd8$exports.render = function(template, d, o) {
    var data = d || $f106fa30f445594f$export$a59469c2841c043c();
    var opts = o || $f106fa30f445594f$export$a59469c2841c043c();
    // No options object -- if there are optiony names
    // in the data, copy them to options
    if (arguments.length == 2) $f106fa30f445594f$export$f83db5734555b793(opts, data, $7e963105242e0bd8$var$_OPTS_PASSABLE_WITH_DATA);
    return $7e963105242e0bd8$var$handleCache(opts, template)(data);
};
/**
 * Render an EJS file at the given `path` and callback `cb(err, str)`.
 *
 * If you would like to include options but not data, you need to explicitly
 * call this function with `data` being an empty object or `null`.
 *
 * @param {String}             path     path to the EJS file
 * @param {Object}            [data={}] template data
 * @param {Options}           [opts={}] compilation and rendering options
 * @param {RenderFileCallback} cb callback
 * @public
 */ $7e963105242e0bd8$exports.renderFile = function() {
    var args = Array.prototype.slice.call(arguments);
    var filename = args.shift();
    var cb;
    var opts = {
        filename: filename
    };
    var data;
    var viewOpts;
    // Do we have a callback?
    if (typeof arguments[arguments.length - 1] == 'function') cb = args.pop();
    // Do we have data/opts?
    if (args.length) {
        // Should always have data obj
        data = args.shift();
        // Normal passed opts (data obj + opts obj)
        if (args.length) // Use shallowCopy so we don't pollute passed in opts obj with new vals
        $f106fa30f445594f$export$9c13236873b118a5(opts, args.pop());
        else {
            // Express 3 and 4
            if (data.settings) {
                // Pull a few things from known locations
                if (data.settings.views) opts.views = data.settings.views;
                if (data.settings['view cache']) opts.cache = true;
                // Undocumented after Express 2, but still usable, esp. for
                // items that are unsafe to be passed along with data, like `root`
                viewOpts = data.settings['view options'];
                if (viewOpts) $f106fa30f445594f$export$9c13236873b118a5(opts, viewOpts);
            }
            // Express 2 and lower, values set in app.locals, or people who just
            // want to pass options in their data. NOTE: These values will override
            // anything previously set in settings  or settings['view options']
            $f106fa30f445594f$export$f83db5734555b793(opts, data, $7e963105242e0bd8$var$_OPTS_PASSABLE_WITH_DATA_EXPRESS);
        }
        opts.filename = filename;
    } else data = $f106fa30f445594f$export$a59469c2841c043c();
    return $7e963105242e0bd8$var$tryHandleCache(opts, data, cb);
};
/**
 * Clear intermediate JavaScript cache. Calls {@link Cache#reset}.
 * @public
 */ /**
 * EJS template class
 * @public
 */ $7e963105242e0bd8$exports.Template = $7e963105242e0bd8$var$Template;
$7e963105242e0bd8$exports.clearCache = function() {
    $7e963105242e0bd8$exports.cache.reset();
};
function $7e963105242e0bd8$var$Template(text, optsParam) {
    var opts = $f106fa30f445594f$export$657fe57b4fad0029(optsParam);
    var options = $f106fa30f445594f$export$a59469c2841c043c();
    this.templateText = text;
    /** @type {string | null} */ this.mode = null;
    this.truncate = false;
    this.currentLine = 1;
    this.source = '';
    options.client = opts.client || false;
    options.escapeFunction = opts.escape || opts.escapeFunction || $f106fa30f445594f$export$b2bcda23b30e00ac;
    options.compileDebug = opts.compileDebug !== false;
    options.debug = !!opts.debug;
    options.filename = opts.filename;
    options.openDelimiter = opts.openDelimiter || $7e963105242e0bd8$exports.openDelimiter || $7e963105242e0bd8$var$_DEFAULT_OPEN_DELIMITER;
    options.closeDelimiter = opts.closeDelimiter || $7e963105242e0bd8$exports.closeDelimiter || $7e963105242e0bd8$var$_DEFAULT_CLOSE_DELIMITER;
    options.delimiter = opts.delimiter || $7e963105242e0bd8$exports.delimiter || $7e963105242e0bd8$var$_DEFAULT_DELIMITER;
    options.strict = opts.strict || false;
    options.context = opts.context;
    options.cache = opts.cache || false;
    options.rmWhitespace = opts.rmWhitespace;
    options.root = opts.root;
    options.includer = opts.includer;
    options.outputFunctionName = opts.outputFunctionName;
    options.localsName = opts.localsName || $7e963105242e0bd8$exports.localsName || $7e963105242e0bd8$var$_DEFAULT_LOCALS_NAME;
    options.views = opts.views;
    options.async = opts.async;
    options.destructuredLocals = opts.destructuredLocals;
    options.legacyInclude = typeof opts.legacyInclude != 'undefined' ? !!opts.legacyInclude : true;
    if (options.strict) options._with = false;
    else options._with = typeof opts._with != 'undefined' ? opts._with : true;
    this.opts = options;
    this.regex = this.createRegex();
}
$7e963105242e0bd8$var$Template.modes = {
    EVAL: 'eval',
    ESCAPED: 'escaped',
    RAW: 'raw',
    COMMENT: 'comment',
    LITERAL: 'literal'
};
$7e963105242e0bd8$var$Template.prototype = {
    createRegex: function() {
        var str = $7e963105242e0bd8$var$_REGEX_STRING;
        var delim = $f106fa30f445594f$export$c998f240a39da81a(this.opts.delimiter);
        var open = $f106fa30f445594f$export$c998f240a39da81a(this.opts.openDelimiter);
        var close = $f106fa30f445594f$export$c998f240a39da81a(this.opts.closeDelimiter);
        str = str.replace(/%/g, delim).replace(/</g, open).replace(/>/g, close);
        return new RegExp(str);
    },
    compile: function() {
        /** @type {string} */ var src;
        /** @type {ClientFunction} */ var fn;
        var opts = this.opts;
        var prepended = '';
        var appended = '';
        /** @type {EscapeCallback} */ var escapeFn = opts.escapeFunction;
        /** @type {FunctionConstructor} */ var ctor;
        /** @type {string} */ var sanitizedFilename = opts.filename ? JSON.stringify(opts.filename) : 'undefined';
        if (!this.source) {
            this.generateSource();
            prepended += '  var __output = "";\n  function __append(s) { if (s !== undefined && s !== null) __output += s }\n';
            if (opts.outputFunctionName) {
                if (!$7e963105242e0bd8$var$_JS_IDENTIFIER.test(opts.outputFunctionName)) throw new Error('outputFunctionName is not a valid JS identifier.');
                prepended += '  var ' + opts.outputFunctionName + ' = __append;' + '\n';
            }
            if (opts.localsName && !$7e963105242e0bd8$var$_JS_IDENTIFIER.test(opts.localsName)) throw new Error('localsName is not a valid JS identifier.');
            if (opts.destructuredLocals && opts.destructuredLocals.length) {
                var destructuring = '  var __locals = (' + opts.localsName + ' || {}),\n';
                for(var i = 0; i < opts.destructuredLocals.length; i++){
                    var name = opts.destructuredLocals[i];
                    if (!$7e963105242e0bd8$var$_JS_IDENTIFIER.test(name)) throw new Error('destructuredLocals[' + i + '] is not a valid JS identifier.');
                    if (i > 0) destructuring += ',\n  ';
                    destructuring += name + ' = __locals.' + name;
                }
                prepended += destructuring + ';\n';
            }
            if (opts._with !== false) {
                prepended += '  with (' + opts.localsName + ' || {}) {' + '\n';
                appended += "  }\n";
            }
            appended += "  return __output;\n";
            this.source = prepended + this.source + appended;
        }
        if (opts.compileDebug) src = "var __line = 1\n  , __lines = " + JSON.stringify(this.templateText) + '\n' + '  , __filename = ' + sanitizedFilename + ';' + '\n' + 'try {' + '\n' + this.source + '} catch (e) {' + '\n' + '  rethrow(e, __lines, __filename, __line, escapeFn);' + '\n' + '}' + '\n';
        else src = this.source;
        if (opts.client) {
            src = 'escapeFn = escapeFn || ' + escapeFn.toString() + ';' + '\n' + src;
            if (opts.compileDebug) src = 'rethrow = rethrow || ' + $7e963105242e0bd8$var$rethrow.toString() + ';' + '\n' + src;
        }
        if (opts.strict) src = '"use strict";\n' + src;
        if (opts.debug) console.log(src);
        if (opts.compileDebug && opts.filename) src = src + '\n' + '//# sourceURL=' + sanitizedFilename + '\n';
        try {
            if (opts.async) // Have to use generated function for this, since in envs without support,
            // it breaks in parsing
            try {
                ctor = new Function('return (async function(){}).constructor;')();
            } catch (e) {
                if (e instanceof SyntaxError) throw new Error('This environment does not support async/await');
                else throw e;
            }
            else ctor = Function;
            fn = new ctor(opts.localsName + ', escapeFn, include, rethrow', src);
        } catch (e) {
            // istanbul ignore else
            if (e instanceof SyntaxError) {
                if (opts.filename) e.message += ' in ' + opts.filename;
                e.message += ' while compiling ejs\n\n';
                e.message += 'If the above error is not helpful, you may want to try EJS-Lint:\n';
                e.message += 'https://github.com/RyanZim/EJS-Lint';
                if (!opts.async) {
                    e.message += '\n';
                    e.message += 'Or, if you meant to create an async function, pass `async: true` as an option.';
                }
            }
            throw e;
        }
        // Return a callable function which will execute the function
        // created by the source-code, with the passed data as locals
        // Adds a local `include` function which allows full recursive include
        var returnedFn = opts.client ? fn : function anonymous(data) {
            var include = function(path, includeData) {
                var d = $f106fa30f445594f$export$9c13236873b118a5($f106fa30f445594f$export$a59469c2841c043c(), data);
                if (includeData) d = $f106fa30f445594f$export$9c13236873b118a5(d, includeData);
                return $7e963105242e0bd8$var$includeFile(path, opts)(d);
            };
            return fn.apply(opts.context, [
                data || $f106fa30f445594f$export$a59469c2841c043c(),
                escapeFn,
                include,
                $7e963105242e0bd8$var$rethrow
            ]);
        };
        if (opts.filename && typeof Object.defineProperty === 'function') {
            var filename = opts.filename;
            var basename = $5HoLl$path.basename(filename, $5HoLl$path.extname(filename));
            try {
                Object.defineProperty(returnedFn, 'name', {
                    value: basename,
                    writable: false,
                    enumerable: false,
                    configurable: true
                });
            } catch (e) {}
        }
        return returnedFn;
    },
    generateSource: function() {
        var opts = this.opts;
        if (opts.rmWhitespace) // Have to use two separate replace here as `^` and `$` operators don't
        // work well with `\r` and empty lines don't work well with the `m` flag.
        this.templateText = this.templateText.replace(/[\r\n]+/g, '\n').replace(/^\s+|\s+$/gm, '');
        // Slurp spaces and tabs before <%_ and after _%>
        this.templateText = this.templateText.replace(/[ \t]*<%_/gm, '<%_').replace(/_%>[ \t]*/gm, '_%>');
        var self = this;
        var matches = this.parseTemplateText();
        var d = this.opts.delimiter;
        var o = this.opts.openDelimiter;
        var c = this.opts.closeDelimiter;
        if (matches && matches.length) matches.forEach(function(line, index) {
            var closing;
            // If this is an opening tag, check for closing tags
            // FIXME: May end up with some false positives here
            // Better to store modes as k/v with openDelimiter + delimiter as key
            // Then this can simply check against the map
            if (line.indexOf(o + d) === 0 // If it is a tag
             && line.indexOf(o + d + d) !== 0) {
                closing = matches[index + 2];
                if (!(closing == d + c || closing == '-' + d + c || closing == '_' + d + c)) throw new Error('Could not find matching close tag for "' + line + '".');
            }
            self.scanLine(line);
        });
    },
    parseTemplateText: function() {
        var str = this.templateText;
        var pat = this.regex;
        var result = pat.exec(str);
        var arr = [];
        var firstPos;
        while(result){
            firstPos = result.index;
            if (firstPos !== 0) {
                arr.push(str.substring(0, firstPos));
                str = str.slice(firstPos);
            }
            arr.push(result[0]);
            str = str.slice(result[0].length);
            result = pat.exec(str);
        }
        if (str) arr.push(str);
        return arr;
    },
    _addOutput: function(line) {
        if (this.truncate) {
            // Only replace single leading linebreak in the line after
            // -%> tag -- this is the single, trailing linebreak
            // after the tag that the truncation mode replaces
            // Handle Win / Unix / old Mac linebreaks -- do the \r\n
            // combo first in the regex-or
            line = line.replace(/^(?:\r\n|\r|\n)/, '');
            this.truncate = false;
        }
        if (!line) return line;
        // Preserve literal slashes
        line = line.replace(/\\/g, '\\\\');
        // Convert linebreaks
        line = line.replace(/\n/g, '\\n');
        line = line.replace(/\r/g, '\\r');
        // Escape double-quotes
        // - this will be the delimiter during execution
        line = line.replace(/"/g, '\\"');
        this.source += '    ; __append("' + line + '")' + '\n';
    },
    scanLine: function(line) {
        var self = this;
        var d = this.opts.delimiter;
        var o = this.opts.openDelimiter;
        var c = this.opts.closeDelimiter;
        var newLineCount = 0;
        newLineCount = line.split('\n').length - 1;
        switch(line){
            case o + d:
            case o + d + '_':
                this.mode = $7e963105242e0bd8$var$Template.modes.EVAL;
                break;
            case o + d + '=':
                this.mode = $7e963105242e0bd8$var$Template.modes.ESCAPED;
                break;
            case o + d + '-':
                this.mode = $7e963105242e0bd8$var$Template.modes.RAW;
                break;
            case o + d + '#':
                this.mode = $7e963105242e0bd8$var$Template.modes.COMMENT;
                break;
            case o + d + d:
                this.mode = $7e963105242e0bd8$var$Template.modes.LITERAL;
                this.source += '    ; __append("' + line.replace(o + d + d, o + d) + '")' + '\n';
                break;
            case d + d + c:
                this.mode = $7e963105242e0bd8$var$Template.modes.LITERAL;
                this.source += '    ; __append("' + line.replace(d + d + c, d + c) + '")' + '\n';
                break;
            case d + c:
            case '-' + d + c:
            case '_' + d + c:
                if (this.mode == $7e963105242e0bd8$var$Template.modes.LITERAL) this._addOutput(line);
                this.mode = null;
                this.truncate = line.indexOf('-') === 0 || line.indexOf('_') === 0;
                break;
            default:
                // In script mode, depends on type of tag
                if (this.mode) {
                    // If '//' is found without a line break, add a line break.
                    switch(this.mode){
                        case $7e963105242e0bd8$var$Template.modes.EVAL:
                        case $7e963105242e0bd8$var$Template.modes.ESCAPED:
                        case $7e963105242e0bd8$var$Template.modes.RAW:
                            if (line.lastIndexOf('//') > line.lastIndexOf('\n')) line += '\n';
                    }
                    switch(this.mode){
                        // Just executing code
                        case $7e963105242e0bd8$var$Template.modes.EVAL:
                            this.source += '    ; ' + line + '\n';
                            break;
                        // Exec, esc, and output
                        case $7e963105242e0bd8$var$Template.modes.ESCAPED:
                            this.source += '    ; __append(escapeFn(' + $7e963105242e0bd8$var$stripSemi(line) + '))' + '\n';
                            break;
                        // Exec and output
                        case $7e963105242e0bd8$var$Template.modes.RAW:
                            this.source += '    ; __append(' + $7e963105242e0bd8$var$stripSemi(line) + ')' + '\n';
                            break;
                        case $7e963105242e0bd8$var$Template.modes.COMMENT:
                            break;
                        // Literal <%% mode, append as raw output
                        case $7e963105242e0bd8$var$Template.modes.LITERAL:
                            this._addOutput(line);
                            break;
                    }
                } else this._addOutput(line);
        }
        if (self.opts.compileDebug && newLineCount) {
            this.currentLine += newLineCount;
            this.source += '    ; __line = ' + this.currentLine + '\n';
        }
    }
};
/**
 * Escape characters reserved in XML.
 *
 * This is simply an export of {@link module:utils.escapeXML}.
 *
 * If `markup` is `undefined` or `null`, the empty string is returned.
 *
 * @param {String} markup Input string
 * @return {String} Escaped string
 * @public
 * @func
 * */ $7e963105242e0bd8$exports.escapeXML = $f106fa30f445594f$export$b2bcda23b30e00ac;
/**
 * Express.js support.
 *
 * This is an alias for {@link module:ejs.renderFile}, in order to support
 * Express.js out-of-the-box.
 *
 * @func
 */ $7e963105242e0bd8$exports.__express = $7e963105242e0bd8$exports.renderFile;
/**
 * Version of EJS.
 *
 * @readonly
 * @type {String}
 * @public
 */ $7e963105242e0bd8$exports.VERSION = $7e963105242e0bd8$require$_VERSION_STRING;
/**
 * Name for detection of EJS.
 *
 * @readonly
 * @type {String}
 * @public
 */ $7e963105242e0bd8$exports.name = $7e963105242e0bd8$var$_NAME;
/* istanbul ignore if */ if (typeof window != 'undefined') window.ejs = $7e963105242e0bd8$exports;


var $d098bac26da80a0a$exports = {};
/*!
 * connect
 * Copyright(c) 2010 Sencha Inc.
 * Copyright(c) 2011 TJ Holowaychuk
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */ 'use strict';

/**
 * Module dependencies.
 * @private
 */ var $d098bac26da80a0a$var$debug = (parcelRequire("kE0E7"))('connect:dispatcher');

var $d098bac26da80a0a$require$EventEmitter = $5HoLl$events.EventEmitter;
var $be9e340dab0149b8$exports = {};
/*!
 * finalhandler
 * Copyright(c) 2014-2017 Douglas Christopher Wilson
 * MIT Licensed
 */ 'use strict';

/**
 * Module dependencies.
 * @private
 */ var $be9e340dab0149b8$var$debug = (parcelRequire("iBluN"))('finalhandler');
var $92a95b54abce10e6$exports = {};
/*!
 * encodeurl
 * Copyright(c) 2016 Douglas Christopher Wilson
 * MIT Licensed
 */ 'use strict';
/**
 * Module exports.
 * @public
 */ $92a95b54abce10e6$exports = $92a95b54abce10e6$var$encodeUrl;
/**
 * RegExp to match non-URL code points, *after* encoding (i.e. not including "%")
 * and including invalid escape sequences.
 * @private
 */ var $92a95b54abce10e6$var$ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g;
/**
 * RegExp to match unmatched surrogate pair.
 * @private
 */ var $92a95b54abce10e6$var$UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g;
/**
 * String to replace unmatched surrogate pair with.
 * @private
 */ var $92a95b54abce10e6$var$UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2';
/**
 * Encode a URL to a percent-encoded form, excluding already-encoded sequences.
 *
 * This function will take an already-encoded URL and encode all the non-URL
 * code points. This function will not encode the "%" character unless it is
 * not part of a valid sequence (`%20` will be left as-is, but `%foo` will
 * be encoded as `%25foo`).
 *
 * This encode is meant to be "safe" and does not throw errors. It will try as
 * hard as it can to properly encode the given URL, including replacing any raw,
 * unpaired surrogate pairs with the Unicode replacement character prior to
 * encoding.
 *
 * @param {string} url
 * @return {string}
 * @public
 */ function $92a95b54abce10e6$var$encodeUrl(url) {
    return String(url).replace($92a95b54abce10e6$var$UNMATCHED_SURROGATE_PAIR_REGEXP, $92a95b54abce10e6$var$UNMATCHED_SURROGATE_PAIR_REPLACE).replace($92a95b54abce10e6$var$ENCODE_CHARS_REGEXP, encodeURI);
}


var $a9cb014b7b875951$exports = {};
/*!
 * escape-html
 * Copyright(c) 2012-2013 TJ Holowaychuk
 * Copyright(c) 2015 Andreas Lubbe
 * Copyright(c) 2015 Tiancheng "Timothy" Gu
 * MIT Licensed
 */ 'use strict';
/**
 * Module variables.
 * @private
 */ var $a9cb014b7b875951$var$matchHtmlRegExp = /["'&<>]/;
/**
 * Module exports.
 * @public
 */ $a9cb014b7b875951$exports = $a9cb014b7b875951$var$escapeHtml;
/**
 * Escape special characters in the given string of html.
 *
 * @param  {string} string The string to escape for inserting into HTML
 * @return {string}
 * @public
 */ function $a9cb014b7b875951$var$escapeHtml(string) {
    var str = '' + string;
    var match = $a9cb014b7b875951$var$matchHtmlRegExp.exec(str);
    if (!match) return str;
    var escape;
    var html = '';
    var index = 0;
    var lastIndex = 0;
    for(index = match.index; index < str.length; index++){
        switch(str.charCodeAt(index)){
            case 34:
                escape = '&quot;';
                break;
            case 38:
                escape = '&amp;';
                break;
            case 39:
                escape = '&#39;';
                break;
            case 60:
                escape = '&lt;';
                break;
            case 62:
                escape = '&gt;';
                break;
            default:
                continue;
        }
        if (lastIndex !== index) html += str.substring(lastIndex, index);
        lastIndex = index + 1;
        html += escape;
    }
    return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
}


var $3582aed71c7154cb$exports = {};
/*!
 * on-finished
 * Copyright(c) 2013 Jonathan Ong
 * Copyright(c) 2014 Douglas Christopher Wilson
 * MIT Licensed
 */ 'use strict';
/**
 * Module exports.
 * @public
 */ $3582aed71c7154cb$exports = $3582aed71c7154cb$var$onFinished;
$3582aed71c7154cb$exports.isFinished = $3582aed71c7154cb$var$isFinished;
var $26a88416b25287ff$exports = {};
/*!
 * ee-first
 * Copyright(c) 2014 Jonathan Ong
 * MIT Licensed
 */ 'use strict';
/**
 * Module exports.
 * @public
 */ $26a88416b25287ff$exports = $26a88416b25287ff$var$first;
/**
 * Get the first event in a set of event emitters and event pairs.
 *
 * @param {array} stuff
 * @param {function} done
 * @public
 */ function $26a88416b25287ff$var$first(stuff, done) {
    if (!Array.isArray(stuff)) throw new TypeError('arg must be an array of [ee, events...] arrays');
    var cleanups = [];
    for(var i = 0; i < stuff.length; i++){
        var arr = stuff[i];
        if (!Array.isArray(arr) || arr.length < 2) throw new TypeError('each array member must be [ee, events...]');
        var ee = arr[0];
        for(var j = 1; j < arr.length; j++){
            var event = arr[j];
            var fn = $26a88416b25287ff$var$listener(event, callback);
            // listen to the event
            ee.on(event, fn);
            // push this listener to the list of cleanups
            cleanups.push({
                ee: ee,
                event: event,
                fn: fn
            });
        }
    }
    function callback() {
        cleanup();
        done.apply(null, arguments);
    }
    function cleanup() {
        var x;
        for(var i = 0; i < cleanups.length; i++){
            x = cleanups[i];
            x.ee.removeListener(x.event, x.fn);
        }
    }
    function thunk(fn) {
        done = fn;
    }
    thunk.cancel = cleanup;
    return thunk;
}
/**
 * Create the event listener.
 * @private
 */ function $26a88416b25287ff$var$listener(event, done) {
    return function onevent(arg1) {
        var args = new Array(arguments.length);
        var ee = this;
        var err = event === 'error' ? arg1 : null;
        // copy args to prevent arguments escaping scope
        for(var i = 0; i < args.length; i++)args[i] = arguments[i];
        done(err, ee, event, args);
    };
}


/**
 * Variables.
 * @private
 */ /* istanbul ignore next */ var $3582aed71c7154cb$var$defer = typeof setImmediate === 'function' ? setImmediate : function(fn) {
    process.nextTick(fn.bind.apply(fn, arguments));
};
/**
 * Invoke callback when the response has finished, useful for
 * cleaning up resources afterwards.
 *
 * @param {object} msg
 * @param {function} listener
 * @return {object}
 * @public
 */ function $3582aed71c7154cb$var$onFinished(msg, listener) {
    if ($3582aed71c7154cb$var$isFinished(msg) !== false) {
        $3582aed71c7154cb$var$defer(listener, null, msg);
        return msg;
    }
    // attach the listener to the message
    $3582aed71c7154cb$var$attachListener(msg, listener);
    return msg;
}
/**
 * Determine if message is already finished.
 *
 * @param {object} msg
 * @return {boolean}
 * @public
 */ function $3582aed71c7154cb$var$isFinished(msg) {
    var socket = msg.socket;
    if (typeof msg.finished === 'boolean') // OutgoingMessage
    return Boolean(msg.finished || socket && !socket.writable);
    if (typeof msg.complete === 'boolean') // IncomingMessage
    return Boolean(msg.upgrade || !socket || !socket.readable || msg.complete && !msg.readable);
    // don't know
    return undefined;
}
/**
 * Attach a finished listener to the message.
 *
 * @param {object} msg
 * @param {function} callback
 * @private
 */ function $3582aed71c7154cb$var$attachFinishedListener(msg, callback) {
    var eeMsg;
    var eeSocket;
    var finished = false;
    function onFinish(error) {
        eeMsg.cancel();
        eeSocket.cancel();
        finished = true;
        callback(error);
    }
    // finished on first message event
    eeMsg = eeSocket = $26a88416b25287ff$exports([
        [
            msg,
            'end',
            'finish'
        ]
    ], onFinish);
    function onSocket(socket) {
        // remove listener
        msg.removeListener('socket', onSocket);
        if (finished) return;
        if (eeMsg !== eeSocket) return;
        // finished on first socket event
        eeSocket = $26a88416b25287ff$exports([
            [
                socket,
                'error',
                'close'
            ]
        ], onFinish);
    }
    if (msg.socket) {
        // socket already assigned
        onSocket(msg.socket);
        return;
    }
    // wait for socket to be assigned
    msg.on('socket', onSocket);
    if (msg.socket === undefined) // node.js 0.8 patch
    $3582aed71c7154cb$var$patchAssignSocket(msg, onSocket);
}
/**
 * Attach the listener to the message.
 *
 * @param {object} msg
 * @return {function}
 * @private
 */ function $3582aed71c7154cb$var$attachListener(msg, listener) {
    var attached = msg.__onFinished;
    // create a private single listener with queue
    if (!attached || !attached.queue) {
        attached = msg.__onFinished = $3582aed71c7154cb$var$createListener(msg);
        $3582aed71c7154cb$var$attachFinishedListener(msg, attached);
    }
    attached.queue.push(listener);
}
/**
 * Create listener on message.
 *
 * @param {object} msg
 * @return {function}
 * @private
 */ function $3582aed71c7154cb$var$createListener(msg) {
    function listener(err) {
        if (msg.__onFinished === listener) msg.__onFinished = null;
        if (!listener.queue) return;
        var queue = listener.queue;
        listener.queue = null;
        for(var i = 0; i < queue.length; i++)queue[i](err, msg);
    }
    listener.queue = [];
    return listener;
}
/**
 * Patch ServerResponse.prototype.assignSocket for node.js 0.8.
 *
 * @param {ServerResponse} res
 * @param {function} callback
 * @private
 */ function $3582aed71c7154cb$var$patchAssignSocket(res, callback) {
    var assignSocket = res.assignSocket;
    if (typeof assignSocket !== 'function') return;
    // res.on('socket', callback) is broken in 0.8
    res.assignSocket = function _assignSocket(socket) {
        assignSocket.call(this, socket);
        callback(socket);
    };
}


var $7a28595270008293$exports = {};
/*!
 * parseurl
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2014-2017 Douglas Christopher Wilson
 * MIT Licensed
 */ 'use strict';

var $7a28595270008293$var$parse = $5HoLl$url.parse;
var $7a28595270008293$var$Url = $5HoLl$url.Url;
/**
 * Module exports.
 * @public
 */ $7a28595270008293$exports = $7a28595270008293$var$parseurl;
$7a28595270008293$exports.original = $7a28595270008293$var$originalurl;
/**
 * Parse the `req` url with memoization.
 *
 * @param {ServerRequest} req
 * @return {Object}
 * @public
 */ function $7a28595270008293$var$parseurl(req) {
    var url = req.url;
    if (url === undefined) // URL is undefined
    return undefined;
    var parsed = req._parsedUrl;
    if ($7a28595270008293$var$fresh(url, parsed)) // Return cached URL parse
    return parsed;
    // Parse the URL
    parsed = $7a28595270008293$var$fastparse(url);
    parsed._raw = url;
    return req._parsedUrl = parsed;
}
/**
 * Parse the `req` original url with fallback and memoization.
 *
 * @param {ServerRequest} req
 * @return {Object}
 * @public
 */ function $7a28595270008293$var$originalurl(req) {
    var url = req.originalUrl;
    if (typeof url !== 'string') // Fallback
    return $7a28595270008293$var$parseurl(req);
    var parsed = req._parsedOriginalUrl;
    if ($7a28595270008293$var$fresh(url, parsed)) // Return cached URL parse
    return parsed;
    // Parse the URL
    parsed = $7a28595270008293$var$fastparse(url);
    parsed._raw = url;
    return req._parsedOriginalUrl = parsed;
}
/**
 * Parse the `str` url with fast-path short-cut.
 *
 * @param {string} str
 * @return {Object}
 * @private
 */ function $7a28595270008293$var$fastparse(str) {
    if (typeof str !== 'string' || str.charCodeAt(0) !== 0x2f /* / */ ) return $7a28595270008293$var$parse(str);
    var pathname = str;
    var query = null;
    var search = null;
    // This takes the regexp from https://github.com/joyent/node/pull/7878
    // Which is /^(\/[^?#\s]*)(\?[^#\s]*)?$/
    // And unrolls it into a for loop
    for(var i = 1; i < str.length; i++)switch(str.charCodeAt(i)){
        case 0x3f:
            /* ?  */ if (search === null) {
                pathname = str.substring(0, i);
                query = str.substring(i + 1);
                search = str.substring(i);
            }
            break;
        case 0x09:
        /* \t */ case 0x0a:
        /* \n */ case 0x0c:
        /* \f */ case 0x0d:
        /* \r */ case 0x20:
        /*    */ case 0x23:
        /* #  */ case 0xa0:
        case 0xfeff:
            return $7a28595270008293$var$parse(str);
    }
    var url = $7a28595270008293$var$Url !== undefined ? new $7a28595270008293$var$Url() : {};
    url.path = str;
    url.href = str;
    url.pathname = pathname;
    if (search !== null) {
        url.query = query;
        url.search = search;
    }
    return url;
}
/**
 * Determine if parsed is still fresh for url.
 *
 * @param {string} url
 * @param {object} parsedUrl
 * @return {boolean}
 * @private
 */ function $7a28595270008293$var$fresh(url, parsedUrl) {
    return typeof parsedUrl === 'object' && parsedUrl !== null && ($7a28595270008293$var$Url === undefined || parsedUrl instanceof $7a28595270008293$var$Url) && parsedUrl._raw === url;
}


var $d5ce743f7bed651d$exports = {};
/*!
 * statuses
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2016 Douglas Christopher Wilson
 * MIT Licensed
 */ 'use strict';
var $c7d85195d5ea51af$exports = {};
$c7d85195d5ea51af$exports = JSON.parse("{\"100\":\"Continue\",\"101\":\"Switching Protocols\",\"102\":\"Processing\",\"103\":\"Early Hints\",\"200\":\"OK\",\"201\":\"Created\",\"202\":\"Accepted\",\"203\":\"Non-Authoritative Information\",\"204\":\"No Content\",\"205\":\"Reset Content\",\"206\":\"Partial Content\",\"207\":\"Multi-Status\",\"208\":\"Already Reported\",\"226\":\"IM Used\",\"300\":\"Multiple Choices\",\"301\":\"Moved Permanently\",\"302\":\"Found\",\"303\":\"See Other\",\"304\":\"Not Modified\",\"305\":\"Use Proxy\",\"306\":\"(Unused)\",\"307\":\"Temporary Redirect\",\"308\":\"Permanent Redirect\",\"400\":\"Bad Request\",\"401\":\"Unauthorized\",\"402\":\"Payment Required\",\"403\":\"Forbidden\",\"404\":\"Not Found\",\"405\":\"Method Not Allowed\",\"406\":\"Not Acceptable\",\"407\":\"Proxy Authentication Required\",\"408\":\"Request Timeout\",\"409\":\"Conflict\",\"410\":\"Gone\",\"411\":\"Length Required\",\"412\":\"Precondition Failed\",\"413\":\"Payload Too Large\",\"414\":\"URI Too Long\",\"415\":\"Unsupported Media Type\",\"416\":\"Range Not Satisfiable\",\"417\":\"Expectation Failed\",\"418\":\"I'm a teapot\",\"421\":\"Misdirected Request\",\"422\":\"Unprocessable Entity\",\"423\":\"Locked\",\"424\":\"Failed Dependency\",\"425\":\"Unordered Collection\",\"426\":\"Upgrade Required\",\"428\":\"Precondition Required\",\"429\":\"Too Many Requests\",\"431\":\"Request Header Fields Too Large\",\"451\":\"Unavailable For Legal Reasons\",\"500\":\"Internal Server Error\",\"501\":\"Not Implemented\",\"502\":\"Bad Gateway\",\"503\":\"Service Unavailable\",\"504\":\"Gateway Timeout\",\"505\":\"HTTP Version Not Supported\",\"506\":\"Variant Also Negotiates\",\"507\":\"Insufficient Storage\",\"508\":\"Loop Detected\",\"509\":\"Bandwidth Limit Exceeded\",\"510\":\"Not Extended\",\"511\":\"Network Authentication Required\"}");


/**
 * Module exports.
 * @public
 */ $d5ce743f7bed651d$exports = $d5ce743f7bed651d$var$status;
// status code to message map
$d5ce743f7bed651d$var$status.STATUS_CODES = $c7d85195d5ea51af$exports;
// array of status codes
$d5ce743f7bed651d$var$status.codes = $d5ce743f7bed651d$var$populateStatusesMap($d5ce743f7bed651d$var$status, $c7d85195d5ea51af$exports);
// status codes for redirects
$d5ce743f7bed651d$var$status.redirect = {
    300: true,
    301: true,
    302: true,
    303: true,
    305: true,
    307: true,
    308: true
};
// status codes for empty bodies
$d5ce743f7bed651d$var$status.empty = {
    204: true,
    205: true,
    304: true
};
// status codes for when you should retry the request
$d5ce743f7bed651d$var$status.retry = {
    502: true,
    503: true,
    504: true
};
/**
 * Populate the statuses map for given codes.
 * @private
 */ function $d5ce743f7bed651d$var$populateStatusesMap(statuses, codes) {
    var arr = [];
    Object.keys(codes).forEach(function forEachCode(code) {
        var message = codes[code];
        var status = Number(code);
        // Populate properties
        statuses[status] = message;
        statuses[message] = status;
        statuses[message.toLowerCase()] = status;
        // Add to array
        arr.push(status);
    });
    return arr;
}
/**
 * Get the status code.
 *
 * Given a number, this will throw if it is not a known status
 * code, otherwise the code will be returned. Given a string,
 * the string will be parsed for a number and return the code
 * if valid, otherwise will lookup the code assuming this is
 * the status message.
 *
 * @param {string|number} code
 * @returns {number}
 * @public
 */ function $d5ce743f7bed651d$var$status(code) {
    if (typeof code === 'number') {
        if (!$d5ce743f7bed651d$var$status[code]) throw new Error('invalid status code: ' + code);
        return code;
    }
    if (typeof code !== 'string') throw new TypeError('code must be a number or string');
    // '403'
    var n = parseInt(code, 10);
    if (!isNaN(n)) {
        if (!$d5ce743f7bed651d$var$status[n]) throw new Error('invalid status code: ' + n);
        return n;
    }
    n = $d5ce743f7bed651d$var$status[code.toLowerCase()];
    if (!n) throw new Error('invalid status message: "' + code + '"');
    return n;
}


var $b4864770f3854d77$exports = {};
/*!
 * unpipe
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */ 'use strict';
/**
 * Module exports.
 * @public
 */ $b4864770f3854d77$exports = $b4864770f3854d77$var$unpipe;
/**
 * Determine if there are Node.js pipe-like data listeners.
 * @private
 */ function $b4864770f3854d77$var$hasPipeDataListeners(stream) {
    var listeners = stream.listeners('data');
    for(var i = 0; i < listeners.length; i++){
        if (listeners[i].name === 'ondata') return true;
    }
    return false;
}
/**
 * Unpipe a stream from all destinations.
 *
 * @param {object} stream
 * @public
 */ function $b4864770f3854d77$var$unpipe(stream) {
    if (!stream) throw new TypeError('argument stream is required');
    if (typeof stream.unpipe === 'function') {
        // new-style
        stream.unpipe();
        return;
    }
    // Node.js 0.8 hack
    if (!$b4864770f3854d77$var$hasPipeDataListeners(stream)) return;
    var listener;
    var listeners = stream.listeners('close');
    for(var i = 0; i < listeners.length; i++){
        listener = listeners[i];
        if (listener.name !== 'cleanup' && listener.name !== 'onclose') continue;
        // invoke the listener
        listener.call(stream);
    }
}


/**
 * Module variables.
 * @private
 */ var $be9e340dab0149b8$var$DOUBLE_SPACE_REGEXP = /\x20{2}/g;
var $be9e340dab0149b8$var$NEWLINE_REGEXP = /\n/g;
/* istanbul ignore next */ var $be9e340dab0149b8$var$defer = typeof setImmediate === 'function' ? setImmediate : function(fn) {
    process.nextTick(fn.bind.apply(fn, arguments));
};
var $be9e340dab0149b8$var$isFinished = $3582aed71c7154cb$exports.isFinished;
/**
 * Create a minimal HTML document.
 *
 * @param {string} message
 * @private
 */ function $be9e340dab0149b8$var$createHtmlDocument(message) {
    var body = $a9cb014b7b875951$exports(message).replace($be9e340dab0149b8$var$NEWLINE_REGEXP, '<br>').replace($be9e340dab0149b8$var$DOUBLE_SPACE_REGEXP, ' &nbsp;');
    return '<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta charset="utf-8">\n<title>Error</title>\n</head>\n<body>\n<pre>' + body + '</pre>\n' + '</body>\n' + '</html>\n';
}
/**
 * Module exports.
 * @public
 */ $be9e340dab0149b8$exports = $be9e340dab0149b8$var$finalhandler;
/**
 * Create a function to handle the final response.
 *
 * @param {Request} req
 * @param {Response} res
 * @param {Object} [options]
 * @return {Function}
 * @public
 */ function $be9e340dab0149b8$var$finalhandler(req, res, options) {
    var opts = options || {};
    // get environment
    var env = opts.env || process.env.NODE_ENV || 'development';
    // get error callback
    var onerror = opts.onerror;
    return function(err) {
        var headers;
        var msg;
        var status;
        // ignore 404 on in-flight response
        if (!err && $be9e340dab0149b8$var$headersSent(res)) {
            $be9e340dab0149b8$var$debug('cannot 404 after headers sent');
            return;
        }
        // unhandled error
        if (err) {
            // respect status code from error
            status = $be9e340dab0149b8$var$getErrorStatusCode(err);
            if (status === undefined) // fallback to status code on response
            status = $be9e340dab0149b8$var$getResponseStatusCode(res);
            else // respect headers from error
            headers = $be9e340dab0149b8$var$getErrorHeaders(err);
            // get error message
            msg = $be9e340dab0149b8$var$getErrorMessage(err, status, env);
        } else {
            // not found
            status = 404;
            msg = 'Cannot ' + req.method + ' ' + $92a95b54abce10e6$exports($be9e340dab0149b8$var$getResourceName(req));
        }
        $be9e340dab0149b8$var$debug('default %s', status);
        // schedule onerror callback
        if (err && onerror) $be9e340dab0149b8$var$defer(onerror, err, req, res);
        // cannot actually respond
        if ($be9e340dab0149b8$var$headersSent(res)) {
            $be9e340dab0149b8$var$debug('cannot %d after headers sent', status);
            req.socket.destroy();
            return;
        }
        // send response
        $be9e340dab0149b8$var$send(req, res, status, headers, msg);
    };
}
/**
 * Get headers from Error object.
 *
 * @param {Error} err
 * @return {object}
 * @private
 */ function $be9e340dab0149b8$var$getErrorHeaders(err) {
    if (!err.headers || typeof err.headers !== 'object') return undefined;
    var headers = Object.create(null);
    var keys = Object.keys(err.headers);
    for(var i = 0; i < keys.length; i++){
        var key = keys[i];
        headers[key] = err.headers[key];
    }
    return headers;
}
/**
 * Get message from Error object, fallback to status message.
 *
 * @param {Error} err
 * @param {number} status
 * @param {string} env
 * @return {string}
 * @private
 */ function $be9e340dab0149b8$var$getErrorMessage(err, status, env) {
    var msg;
    if (env !== 'production') {
        // use err.stack, which typically includes err.message
        msg = err.stack;
        // fallback to err.toString() when possible
        if (!msg && typeof err.toString === 'function') msg = err.toString();
    }
    return msg || $d5ce743f7bed651d$exports[status];
}
/**
 * Get status code from Error object.
 *
 * @param {Error} err
 * @return {number}
 * @private
 */ function $be9e340dab0149b8$var$getErrorStatusCode(err) {
    // check err.status
    if (typeof err.status === 'number' && err.status >= 400 && err.status < 600) return err.status;
    // check err.statusCode
    if (typeof err.statusCode === 'number' && err.statusCode >= 400 && err.statusCode < 600) return err.statusCode;
    return undefined;
}
/**
 * Get resource name for the request.
 *
 * This is typically just the original pathname of the request
 * but will fallback to "resource" is that cannot be determined.
 *
 * @param {IncomingMessage} req
 * @return {string}
 * @private
 */ function $be9e340dab0149b8$var$getResourceName(req) {
    try {
        return $7a28595270008293$exports.original(req).pathname;
    } catch (e) {
        return 'resource';
    }
}
/**
 * Get status code from response.
 *
 * @param {OutgoingMessage} res
 * @return {number}
 * @private
 */ function $be9e340dab0149b8$var$getResponseStatusCode(res) {
    var status = res.statusCode;
    // default status code to 500 if outside valid range
    if (typeof status !== 'number' || status < 400 || status > 599) status = 500;
    return status;
}
/**
 * Determine if the response headers have been sent.
 *
 * @param {object} res
 * @returns {boolean}
 * @private
 */ function $be9e340dab0149b8$var$headersSent(res) {
    return typeof res.headersSent !== 'boolean' ? Boolean(res._header) : res.headersSent;
}
/**
 * Send response.
 *
 * @param {IncomingMessage} req
 * @param {OutgoingMessage} res
 * @param {number} status
 * @param {object} headers
 * @param {string} message
 * @private
 */ function $be9e340dab0149b8$var$send(req, res, status, headers, message) {
    function write() {
        // response body
        var body = $be9e340dab0149b8$var$createHtmlDocument(message);
        // response status
        res.statusCode = status;
        res.statusMessage = $d5ce743f7bed651d$exports[status];
        // response headers
        $be9e340dab0149b8$var$setHeaders(res, headers);
        // security headers
        res.setHeader('Content-Security-Policy', "default-src 'none'");
        res.setHeader('X-Content-Type-Options', 'nosniff');
        // standard headers
        res.setHeader('Content-Type', 'text/html; charset=utf-8');
        res.setHeader('Content-Length', Buffer.byteLength(body, 'utf8'));
        if (req.method === 'HEAD') {
            res.end();
            return;
        }
        res.end(body, 'utf8');
    }
    if ($be9e340dab0149b8$var$isFinished(req)) {
        write();
        return;
    }
    // unpipe everything from the request
    $b4864770f3854d77$exports(req);
    // flush the request
    $3582aed71c7154cb$exports(req, write);
    req.resume();
}
/**
 * Set response headers from an object.
 *
 * @param {OutgoingMessage} res
 * @param {object} headers
 * @private
 */ function $be9e340dab0149b8$var$setHeaders(res, headers) {
    if (!headers) return;
    var keys = Object.keys(headers);
    for(var i = 0; i < keys.length; i++){
        var key = keys[i];
        res.setHeader(key, headers[key]);
    }
}




var $alrT0 = parcelRequire("alrT0");

/**
 * Module exports.
 * @public
 */ $d098bac26da80a0a$exports = $d098bac26da80a0a$var$createServer;
/**
 * Module variables.
 * @private
 */ var $d098bac26da80a0a$var$env = process.env.NODE_ENV || 'development';
var $d098bac26da80a0a$var$proto = {};
/* istanbul ignore next */ var $d098bac26da80a0a$var$defer = typeof setImmediate === 'function' ? setImmediate : function(fn) {
    process.nextTick(fn.bind.apply(fn, arguments));
};
/**
 * Create a new connect server.
 *
 * @return {function}
 * @public
 */ function $d098bac26da80a0a$var$createServer() {
    function app(req, res, next) {
        app.handle(req, res, next);
    }
    $alrT0(app, $d098bac26da80a0a$var$proto);
    $alrT0(app, $d098bac26da80a0a$require$EventEmitter.prototype);
    app.route = '/';
    app.stack = [];
    return app;
}
/**
 * Utilize the given middleware `handle` to the given `route`,
 * defaulting to _/_. This "route" is the mount-point for the
 * middleware, when given a value other than _/_ the middleware
 * is only effective when that segment is present in the request's
 * pathname.
 *
 * For example if we were to mount a function at _/admin_, it would
 * be invoked on _/admin_, and _/admin/settings_, however it would
 * not be invoked for _/_, or _/posts_.
 *
 * @param {String|Function|Server} route, callback or server
 * @param {Function|Server} callback or server
 * @return {Server} for chaining
 * @public
 */ $d098bac26da80a0a$var$proto.use = function use(route, fn) {
    var handle = fn;
    var path = route;
    // default route to '/'
    if (typeof route !== 'string') {
        handle = route;
        path = '/';
    }
    // wrap sub-apps
    if (typeof handle.handle === 'function') {
        var server = handle;
        server.route = path;
        handle = function(req, res, next) {
            server.handle(req, res, next);
        };
    }
    // wrap vanilla http.Servers
    if (handle instanceof $5HoLl$http.Server) handle = handle.listeners('request')[0];
    // strip trailing slash
    if (path[path.length - 1] === '/') path = path.slice(0, -1);
    // add the middleware
    $d098bac26da80a0a$var$debug('use %s %s', path || '/', handle.name || 'anonymous');
    this.stack.push({
        route: path,
        handle: handle
    });
    return this;
};
/**
 * Handle server requests, punting them down
 * the middleware stack.
 *
 * @private
 */ $d098bac26da80a0a$var$proto.handle = function handle(req, res, out) {
    var index = 0;
    var protohost = $d098bac26da80a0a$var$getProtohost(req.url) || '';
    var removed = '';
    var slashAdded = false;
    var stack = this.stack;
    // final function handler
    var done = out || $be9e340dab0149b8$exports(req, res, {
        env: $d098bac26da80a0a$var$env,
        onerror: $d098bac26da80a0a$var$logerror
    });
    // store the original URL
    req.originalUrl = req.originalUrl || req.url;
    function next(err) {
        if (slashAdded) {
            req.url = req.url.substr(1);
            slashAdded = false;
        }
        if (removed.length !== 0) {
            req.url = protohost + removed + req.url.substr(protohost.length);
            removed = '';
        }
        // next callback
        var layer = stack[index++];
        // all done
        if (!layer) {
            $d098bac26da80a0a$var$defer(done, err);
            return;
        }
        // route data
        var path = $7a28595270008293$exports(req).pathname || '/';
        var route = layer.route;
        // skip this layer if the route doesn't match
        if (path.toLowerCase().substr(0, route.length) !== route.toLowerCase()) return next(err);
        // skip if route match does not border "/", ".", or end
        var c = path.length > route.length && path[route.length];
        if (c && c !== '/' && c !== '.') return next(err);
        // trim off the part of the url that matches the route
        if (route.length !== 0 && route !== '/') {
            removed = route;
            req.url = protohost + req.url.substr(protohost.length + removed.length);
            // ensure leading slash
            if (!protohost && req.url[0] !== '/') {
                req.url = '/' + req.url;
                slashAdded = true;
            }
        }
        // call the layer handle
        $d098bac26da80a0a$var$call(layer.handle, route, err, req, res, next);
    }
    next();
};
/**
 * Listen for connections.
 *
 * This method takes the same arguments
 * as node's `http.Server#listen()`.
 *
 * HTTP and HTTPS:
 *
 * If you run your application both as HTTP
 * and HTTPS you may wrap them individually,
 * since your Connect "server" is really just
 * a JavaScript `Function`.
 *
 *      var connect = require('connect')
 *        , http = require('http')
 *        , https = require('https');
 *
 *      var app = connect();
 *
 *      http.createServer(app).listen(80);
 *      https.createServer(options, app).listen(443);
 *
 * @return {http.Server}
 * @api public
 */ $d098bac26da80a0a$var$proto.listen = function listen() {
    var server = $5HoLl$http.createServer(this);
    return server.listen.apply(server, arguments);
};
/**
 * Invoke a route handle.
 * @private
 */ function $d098bac26da80a0a$var$call(handle, route, err, req, res, next) {
    var arity = handle.length;
    var error = err;
    var hasError = Boolean(err);
    $d098bac26da80a0a$var$debug('%s %s : %s', handle.name || '<anonymous>', route, req.originalUrl);
    try {
        if (hasError && arity === 4) {
            // error-handling middleware
            handle(err, req, res, next);
            return;
        } else if (!hasError && arity < 4) {
            // request-handling middleware
            handle(req, res, next);
            return;
        }
    } catch (e) {
        // replace the error
        error = e;
    }
    // continue
    next(error);
}
/**
 * Log error using console.error.
 *
 * @param {Error} err
 * @private
 */ function $d098bac26da80a0a$var$logerror(err) {
    if ($d098bac26da80a0a$var$env !== 'test') console.error(err.stack || err.toString());
}
/**
 * Get get protocol + host for a URL.
 *
 * @param {string} url
 * @private
 */ function $d098bac26da80a0a$var$getProtohost(url) {
    if (url.length === 0 || url[0] === '/') return undefined;
    var fqdnIndex = url.indexOf('://');
    return fqdnIndex !== -1 && url.lastIndexOf('?', fqdnIndex) === -1 ? url.substr(0, url.indexOf('/', 3 + fqdnIndex)) : undefined;
}


var $241580f2bf06323c$exports = {};
// Native

var $241580f2bf06323c$require$promisify = $5HoLl$util.promisify;


var $241580f2bf06323c$require$createHash = $5HoLl$crypto.createHash;

var $241580f2bf06323c$require$realpath = $5HoLl$fs.realpath;
var $241580f2bf06323c$require$lstat = $5HoLl$fs.lstat;
var $241580f2bf06323c$require$createReadStream = $5HoLl$fs.createReadStream;
var $241580f2bf06323c$require$readdir = $5HoLl$fs.readdir;

var $b9d5e409bcff052b$exports = {};
/* ! The MIT License (MIT) Copyright (c) 2014 Scott Corgan */ // This is adopted from https://github.com/scottcorgan/glob-slash/

const $b9d5e409bcff052b$var$normalize = (value)=>$5HoLl$path.posix.normalize($5HoLl$path.posix.join('/', value));
$b9d5e409bcff052b$exports = (value)=>value.charAt(0) === '!' ? `!${$b9d5e409bcff052b$var$normalize(value.substr(1))}` : $b9d5e409bcff052b$var$normalize(value);
$b9d5e409bcff052b$exports.normalize = $b9d5e409bcff052b$var$normalize;


var $f604f6614d00fa7b$exports = {};
$f604f6614d00fa7b$exports = $f604f6614d00fa7b$var$minimatch;
$f604f6614d00fa7b$var$minimatch.Minimatch = $f604f6614d00fa7b$var$Minimatch;

var $f604f6614d00fa7b$var$path = function() {
    try {
        return $f604f6614d00fa7b$import$cc8c2e196ccf5c7a;
    } catch (e) {}
}() || {
    sep: '/'
};
$f604f6614d00fa7b$var$minimatch.sep = $f604f6614d00fa7b$var$path.sep;
var $f604f6614d00fa7b$var$GLOBSTAR = $f604f6614d00fa7b$var$minimatch.GLOBSTAR = $f604f6614d00fa7b$var$Minimatch.GLOBSTAR = {};
var $66c56ce1f6771d34$exports = {};
var $ee447b759acac10d$exports = {};
$ee447b759acac10d$exports = function(xs, fn) {
    var res = [];
    for(var i = 0; i < xs.length; i++){
        var x = fn(xs[i], i);
        if ($ee447b759acac10d$var$isArray(x)) res.push.apply(res, x);
        else res.push(x);
    }
    return res;
};
var $ee447b759acac10d$var$isArray = Array.isArray || function(xs) {
    return Object.prototype.toString.call(xs) === '[object Array]';
};


var $06ad1575dcce211f$exports = {};
'use strict';
$06ad1575dcce211f$exports = $06ad1575dcce211f$var$balanced;
function $06ad1575dcce211f$var$balanced(a, b, str) {
    if (a instanceof RegExp) a = $06ad1575dcce211f$var$maybeMatch(a, str);
    if (b instanceof RegExp) b = $06ad1575dcce211f$var$maybeMatch(b, str);
    var r = $06ad1575dcce211f$var$range(a, b, str);
    return r && {
        start: r[0],
        end: r[1],
        pre: str.slice(0, r[0]),
        body: str.slice(r[0] + a.length, r[1]),
        post: str.slice(r[1] + b.length)
    };
}
function $06ad1575dcce211f$var$maybeMatch(reg, str) {
    var m = str.match(reg);
    return m ? m[0] : null;
}
$06ad1575dcce211f$var$balanced.range = $06ad1575dcce211f$var$range;
function $06ad1575dcce211f$var$range(a, b, str) {
    var begs, beg, left, right, result;
    var ai = str.indexOf(a);
    var bi = str.indexOf(b, ai + 1);
    var i = ai;
    if (ai >= 0 && bi > 0) {
        if (a === b) return [
            ai,
            bi
        ];
        begs = [];
        left = str.length;
        while(i >= 0 && !result){
            if (i == ai) {
                begs.push(i);
                ai = str.indexOf(a, i + 1);
            } else if (begs.length == 1) result = [
                begs.pop(),
                bi
            ];
            else {
                beg = begs.pop();
                if (beg < left) {
                    left = beg;
                    right = bi;
                }
                bi = str.indexOf(b, i + 1);
            }
            i = ai < bi && ai >= 0 ? ai : bi;
        }
        if (begs.length) result = [
            left,
            right
        ];
    }
    return result;
}


$66c56ce1f6771d34$exports = $66c56ce1f6771d34$var$expandTop;
var $66c56ce1f6771d34$var$escSlash = '\0SLASH' + Math.random() + '\0';
var $66c56ce1f6771d34$var$escOpen = '\0OPEN' + Math.random() + '\0';
var $66c56ce1f6771d34$var$escClose = '\0CLOSE' + Math.random() + '\0';
var $66c56ce1f6771d34$var$escComma = '\0COMMA' + Math.random() + '\0';
var $66c56ce1f6771d34$var$escPeriod = '\0PERIOD' + Math.random() + '\0';
function $66c56ce1f6771d34$var$numeric(str) {
    return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
}
function $66c56ce1f6771d34$var$escapeBraces(str) {
    return str.split('\\\\').join($66c56ce1f6771d34$var$escSlash).split('\\{').join($66c56ce1f6771d34$var$escOpen).split('\\}').join($66c56ce1f6771d34$var$escClose).split('\\,').join($66c56ce1f6771d34$var$escComma).split('\\.').join($66c56ce1f6771d34$var$escPeriod);
}
function $66c56ce1f6771d34$var$unescapeBraces(str) {
    return str.split($66c56ce1f6771d34$var$escSlash).join('\\').split($66c56ce1f6771d34$var$escOpen).join('{').split($66c56ce1f6771d34$var$escClose).join('}').split($66c56ce1f6771d34$var$escComma).join(',').split($66c56ce1f6771d34$var$escPeriod).join('.');
}
// Basically just str.split(","), but handling cases
// where we have nested braced sections, which should be
// treated as individual members, like {a,{b,c},d}
function $66c56ce1f6771d34$var$parseCommaParts(str) {
    if (!str) return [
        ''
    ];
    var parts = [];
    var m = $06ad1575dcce211f$exports('{', '}', str);
    if (!m) return str.split(',');
    var pre = m.pre;
    var body = m.body;
    var post = m.post;
    var p = pre.split(',');
    p[p.length - 1] += '{' + body + '}';
    var postParts = $66c56ce1f6771d34$var$parseCommaParts(post);
    if (post.length) {
        p[p.length - 1] += postParts.shift();
        p.push.apply(p, postParts);
    }
    parts.push.apply(parts, p);
    return parts;
}
function $66c56ce1f6771d34$var$expandTop(str) {
    if (!str) return [];
    // I don't know why Bash 4.3 does this, but it does.
    // Anything starting with {} will have the first two bytes preserved
    // but *only* at the top level, so {},a}b will not expand to anything,
    // but a{},b}c will be expanded to [a}c,abc].
    // One could argue that this is a bug in Bash, but since the goal of
    // this module is to match Bash's rules, we escape a leading {}
    if (str.substr(0, 2) === '{}') str = '\\{\\}' + str.substr(2);
    return $66c56ce1f6771d34$var$expand($66c56ce1f6771d34$var$escapeBraces(str), true).map($66c56ce1f6771d34$var$unescapeBraces);
}
function $66c56ce1f6771d34$var$identity(e) {
    return e;
}
function $66c56ce1f6771d34$var$embrace(str) {
    return '{' + str + '}';
}
function $66c56ce1f6771d34$var$isPadded(el) {
    return /^-?0\d/.test(el);
}
function $66c56ce1f6771d34$var$lte(i, y) {
    return i <= y;
}
function $66c56ce1f6771d34$var$gte(i, y) {
    return i >= y;
}
function $66c56ce1f6771d34$var$expand(str, isTop) {
    var expansions = [];
    var m = $06ad1575dcce211f$exports('{', '}', str);
    if (!m || /\$$/.test(m.pre)) return [
        str
    ];
    var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
    var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
    var isSequence = isNumericSequence || isAlphaSequence;
    var isOptions = m.body.indexOf(',') >= 0;
    if (!isSequence && !isOptions) {
        // {a},b}
        if (m.post.match(/,.*\}/)) {
            str = m.pre + '{' + m.body + $66c56ce1f6771d34$var$escClose + m.post;
            return $66c56ce1f6771d34$var$expand(str);
        }
        return [
            str
        ];
    }
    var n;
    if (isSequence) n = m.body.split(/\.\./);
    else {
        n = $66c56ce1f6771d34$var$parseCommaParts(m.body);
        if (n.length === 1) {
            // x{{a,b}}y ==> x{a}y x{b}y
            n = $66c56ce1f6771d34$var$expand(n[0], false).map($66c56ce1f6771d34$var$embrace);
            if (n.length === 1) {
                var post = m.post.length ? $66c56ce1f6771d34$var$expand(m.post, false) : [
                    ''
                ];
                return post.map(function(p) {
                    return m.pre + n[0] + p;
                });
            }
        }
    }
    // at this point, n is the parts, and we know it's not a comma set
    // with a single entry.
    // no need to expand pre, since it is guaranteed to be free of brace-sets
    var pre = m.pre;
    var post = m.post.length ? $66c56ce1f6771d34$var$expand(m.post, false) : [
        ''
    ];
    var N;
    if (isSequence) {
        var x = $66c56ce1f6771d34$var$numeric(n[0]);
        var y = $66c56ce1f6771d34$var$numeric(n[1]);
        var width = Math.max(n[0].length, n[1].length);
        var incr = n.length == 3 ? Math.abs($66c56ce1f6771d34$var$numeric(n[2])) : 1;
        var test = $66c56ce1f6771d34$var$lte;
        var reverse = y < x;
        if (reverse) {
            incr *= -1;
            test = $66c56ce1f6771d34$var$gte;
        }
        var pad = n.some($66c56ce1f6771d34$var$isPadded);
        N = [];
        for(var i = x; test(i, y); i += incr){
            var c;
            if (isAlphaSequence) {
                c = String.fromCharCode(i);
                if (c === '\\') c = '';
            } else {
                c = String(i);
                if (pad) {
                    var need = width - c.length;
                    if (need > 0) {
                        var z = new Array(need + 1).join('0');
                        if (i < 0) c = '-' + z + c.slice(1);
                        else c = z + c;
                    }
                }
            }
            N.push(c);
        }
    } else N = $ee447b759acac10d$exports(n, function(el) {
        return $66c56ce1f6771d34$var$expand(el, false);
    });
    for(var j = 0; j < N.length; j++)for(var k = 0; k < post.length; k++){
        var expansion = pre + N[j] + post[k];
        if (!isTop || isSequence || expansion) expansions.push(expansion);
    }
    return expansions;
}


var $f604f6614d00fa7b$var$plTypes = {
    '!': {
        open: '(?:(?!(?:',
        close: '))[^/]*?)'
    },
    '?': {
        open: '(?:',
        close: ')?'
    },
    '+': {
        open: '(?:',
        close: ')+'
    },
    '*': {
        open: '(?:',
        close: ')*'
    },
    '@': {
        open: '(?:',
        close: ')'
    }
};
// any single thing other than /
// don't need to escape / when using new RegExp()
var $f604f6614d00fa7b$var$qmark = '[^/]';
// * => any number of characters
var $f604f6614d00fa7b$var$star = $f604f6614d00fa7b$var$qmark + '*?';
// ** when dots are allowed.  Anything goes, except .. and .
// not (^ or / followed by one or two dots followed by $ or /),
// followed by anything, any number of times.
var $f604f6614d00fa7b$var$twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?';
// not a ^ or / followed by a dot,
// followed by anything, any number of times.
var $f604f6614d00fa7b$var$twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?';
// characters that need to be escaped in RegExp.
var $f604f6614d00fa7b$var$reSpecials = $f604f6614d00fa7b$var$charSet('().*{}+?[]^$\\!');
// "abc" -> { a:true, b:true, c:true }
function $f604f6614d00fa7b$var$charSet(s) {
    return s.split('').reduce(function(set, c) {
        set[c] = true;
        return set;
    }, {});
}
// normalizes slashes.
var $f604f6614d00fa7b$var$slashSplit = /\/+/;
$f604f6614d00fa7b$var$minimatch.filter = $f604f6614d00fa7b$var$filter;
function $f604f6614d00fa7b$var$filter(pattern, options) {
    options = options || {};
    return function(p, i, list) {
        return $f604f6614d00fa7b$var$minimatch(p, pattern, options);
    };
}
function $f604f6614d00fa7b$var$ext(a, b) {
    b = b || {};
    var t = {};
    Object.keys(a).forEach(function(k) {
        t[k] = a[k];
    });
    Object.keys(b).forEach(function(k) {
        t[k] = b[k];
    });
    return t;
}
$f604f6614d00fa7b$var$minimatch.defaults = function(def) {
    if (!def || typeof def !== 'object' || !Object.keys(def).length) return $f604f6614d00fa7b$var$minimatch;
    var orig = $f604f6614d00fa7b$var$minimatch;
    var m = function minimatch(p, pattern, options) {
        return orig(p, pattern, $f604f6614d00fa7b$var$ext(def, options));
    };
    m.Minimatch = function Minimatch(pattern, options) {
        return new orig.Minimatch(pattern, $f604f6614d00fa7b$var$ext(def, options));
    };
    m.Minimatch.defaults = function defaults(options) {
        return orig.defaults($f604f6614d00fa7b$var$ext(def, options)).Minimatch;
    };
    m.filter = function filter(pattern, options) {
        return orig.filter(pattern, $f604f6614d00fa7b$var$ext(def, options));
    };
    m.defaults = function defaults(options) {
        return orig.defaults($f604f6614d00fa7b$var$ext(def, options));
    };
    m.makeRe = function makeRe(pattern, options) {
        return orig.makeRe(pattern, $f604f6614d00fa7b$var$ext(def, options));
    };
    m.braceExpand = function braceExpand(pattern, options) {
        return orig.braceExpand(pattern, $f604f6614d00fa7b$var$ext(def, options));
    };
    m.match = function(list, pattern, options) {
        return orig.match(list, pattern, $f604f6614d00fa7b$var$ext(def, options));
    };
    return m;
};
$f604f6614d00fa7b$var$Minimatch.defaults = function(def) {
    return $f604f6614d00fa7b$var$minimatch.defaults(def).Minimatch;
};
function $f604f6614d00fa7b$var$minimatch(p, pattern, options) {
    $f604f6614d00fa7b$var$assertValidPattern(pattern);
    if (!options) options = {};
    // shortcut: comments match nothing.
    if (!options.nocomment && pattern.charAt(0) === '#') return false;
    return new $f604f6614d00fa7b$var$Minimatch(pattern, options).match(p);
}
function $f604f6614d00fa7b$var$Minimatch(pattern, options) {
    if (!(this instanceof $f604f6614d00fa7b$var$Minimatch)) return new $f604f6614d00fa7b$var$Minimatch(pattern, options);
    $f604f6614d00fa7b$var$assertValidPattern(pattern);
    if (!options) options = {};
    pattern = pattern.trim();
    // windows support: need to use /, not \
    if (!options.allowWindowsEscape && $f604f6614d00fa7b$var$path.sep !== '/') pattern = pattern.split($f604f6614d00fa7b$var$path.sep).join('/');
    this.options = options;
    this.set = [];
    this.pattern = pattern;
    this.regexp = null;
    this.negate = false;
    this.comment = false;
    this.empty = false;
    this.partial = !!options.partial;
    // make the set of regexps etc.
    this.make();
}
$f604f6614d00fa7b$var$Minimatch.prototype.debug = function() {};
$f604f6614d00fa7b$var$Minimatch.prototype.make = $f604f6614d00fa7b$var$make;
function $f604f6614d00fa7b$var$make() {
    var pattern = this.pattern;
    var options = this.options;
    // empty patterns and comments match nothing.
    if (!options.nocomment && pattern.charAt(0) === '#') {
        this.comment = true;
        return;
    }
    if (!pattern) {
        this.empty = true;
        return;
    }
    // step 1: figure out negation, etc.
    this.parseNegate();
    // step 2: expand braces
    var set = this.globSet = this.braceExpand();
    if (options.debug) this.debug = function debug() {
        console.error.apply(console, arguments);
    };
    this.debug(this.pattern, set);
    // step 3: now we have a set, so turn each one into a series of path-portion
    // matching patterns.
    // These will be regexps, except in the case of "**", which is
    // set to the GLOBSTAR object for globstar behavior,
    // and will not contain any / characters
    set = this.globParts = set.map(function(s) {
        return s.split($f604f6614d00fa7b$var$slashSplit);
    });
    this.debug(this.pattern, set);
    // glob --> regexps
    set = set.map(function(s, si, set) {
        return s.map(this.parse, this);
    }, this);
    this.debug(this.pattern, set);
    // filter out everything that didn't compile properly.
    set = set.filter(function(s) {
        return s.indexOf(false) === -1;
    });
    this.debug(this.pattern, set);
    this.set = set;
}
$f604f6614d00fa7b$var$Minimatch.prototype.parseNegate = $f604f6614d00fa7b$var$parseNegate;
function $f604f6614d00fa7b$var$parseNegate() {
    var pattern = this.pattern;
    var negate = false;
    var options = this.options;
    var negateOffset = 0;
    if (options.nonegate) return;
    for(var i = 0, l = pattern.length; i < l && pattern.charAt(i) === '!'; i++){
        negate = !negate;
        negateOffset++;
    }
    if (negateOffset) this.pattern = pattern.substr(negateOffset);
    this.negate = negate;
}
// Brace expansion:
// a{b,c}d -> abd acd
// a{b,}c -> abc ac
// a{0..3}d -> a0d a1d a2d a3d
// a{b,c{d,e}f}g -> abg acdfg acefg
// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
//
// Invalid sets are not expanded.
// a{2..}b -> a{2..}b
// a{b}c -> a{b}c
$f604f6614d00fa7b$var$minimatch.braceExpand = function(pattern, options) {
    return $f604f6614d00fa7b$var$braceExpand(pattern, options);
};
$f604f6614d00fa7b$var$Minimatch.prototype.braceExpand = $f604f6614d00fa7b$var$braceExpand;
function $f604f6614d00fa7b$var$braceExpand(pattern, options) {
    if (!options) {
        if (this instanceof $f604f6614d00fa7b$var$Minimatch) options = this.options;
        else options = {};
    }
    pattern = typeof pattern === 'undefined' ? this.pattern : pattern;
    $f604f6614d00fa7b$var$assertValidPattern(pattern);
    // Thanks to Yeting Li <https://github.com/yetingli> for
    // improving this regexp to avoid a ReDOS vulnerability.
    if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) // shortcut. no need to expand.
    return [
        pattern
    ];
    return $66c56ce1f6771d34$exports(pattern);
}
var $f604f6614d00fa7b$var$MAX_PATTERN_LENGTH = 65536;
var $f604f6614d00fa7b$var$assertValidPattern = function(pattern) {
    if (typeof pattern !== 'string') throw new TypeError('invalid pattern');
    if (pattern.length > $f604f6614d00fa7b$var$MAX_PATTERN_LENGTH) throw new TypeError('pattern is too long');
};
// parse a component of the expanded set.
// At this point, no pattern may contain "/" in it
// so we're going to return a 2d array, where each entry is the full
// pattern, split on '/', and then turned into a regular expression.
// A regexp is made at the end which joins each array with an
// escaped /, and another full one which joins each regexp with |.
//
// Following the lead of Bash 4.1, note that "**" only has special meaning
// when it is the *only* thing in a path portion.  Otherwise, any series
// of * is equivalent to a single *.  Globstar behavior is enabled by
// default, and can be disabled by setting options.noglobstar.
$f604f6614d00fa7b$var$Minimatch.prototype.parse = $f604f6614d00fa7b$var$parse;
var $f604f6614d00fa7b$var$SUBPARSE = {};
function $f604f6614d00fa7b$var$parse(pattern, isSub) {
    $f604f6614d00fa7b$var$assertValidPattern(pattern);
    var options = this.options;
    // shortcuts
    if (pattern === '**') {
        if (!options.noglobstar) return $f604f6614d00fa7b$var$GLOBSTAR;
        else pattern = '*';
    }
    if (pattern === '') return '';
    var re = '';
    var hasMagic = !!options.nocase;
    var escaping = false;
    // ? => one single character
    var patternListStack = [];
    var negativeLists = [];
    var stateChar;
    var inClass = false;
    var reClassStart = -1;
    var classStart = -1;
    // . and .. never match anything that doesn't start with .,
    // even when options.dot is set.
    var patternStart = pattern.charAt(0) === '.' ? '' // anything
     : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' : '(?!\\.)';
    var self = this;
    function clearStateChar() {
        if (stateChar) {
            // we had some state-tracking character
            // that wasn't consumed by this pass.
            switch(stateChar){
                case '*':
                    re += $f604f6614d00fa7b$var$star;
                    hasMagic = true;
                    break;
                case '?':
                    re += $f604f6614d00fa7b$var$qmark;
                    hasMagic = true;
                    break;
                default:
                    re += '\\' + stateChar;
                    break;
            }
            self.debug('clearStateChar %j %j', stateChar, re);
            stateChar = false;
        }
    }
    for(var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++){
        this.debug('%s\t%s %s %j', pattern, i, re, c);
        // skip over any that are escaped.
        if (escaping && $f604f6614d00fa7b$var$reSpecials[c]) {
            re += '\\' + c;
            escaping = false;
            continue;
        }
        switch(c){
            /* istanbul ignore next */ case '/':
                // completely not allowed, even escaped.
                // Should already be path-split by now.
                return false;
            case '\\':
                clearStateChar();
                escaping = true;
                continue;
            // the various stateChar values
            // for the "extglob" stuff.
            case '?':
            case '*':
            case '+':
            case '@':
            case '!':
                this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c);
                // all of those are literals inside a class, except that
                // the glob [!a] means [^a] in regexp
                if (inClass) {
                    this.debug('  in class');
                    if (c === '!' && i === classStart + 1) c = '^';
                    re += c;
                    continue;
                }
                // if we already have a stateChar, then it means
                // that there was something like ** or +? in there.
                // Handle the stateChar, then proceed with this one.
                self.debug('call clearStateChar %j', stateChar);
                clearStateChar();
                stateChar = c;
                // if extglob is disabled, then +(asdf|foo) isn't a thing.
                // just clear the statechar *now*, rather than even diving into
                // the patternList stuff.
                if (options.noext) clearStateChar();
                continue;
            case '(':
                if (inClass) {
                    re += '(';
                    continue;
                }
                if (!stateChar) {
                    re += '\\(';
                    continue;
                }
                patternListStack.push({
                    type: stateChar,
                    start: i - 1,
                    reStart: re.length,
                    open: $f604f6614d00fa7b$var$plTypes[stateChar].open,
                    close: $f604f6614d00fa7b$var$plTypes[stateChar].close
                });
                // negation is (?:(?!js)[^/]*)
                re += stateChar === '!' ? '(?:(?!(?:' : '(?:';
                this.debug('plType %j %j', stateChar, re);
                stateChar = false;
                continue;
            case ')':
                if (inClass || !patternListStack.length) {
                    re += '\\)';
                    continue;
                }
                clearStateChar();
                hasMagic = true;
                var pl = patternListStack.pop();
                // negation is (?:(?!js)[^/]*)
                // The others are (?:<pattern>)<type>
                re += pl.close;
                if (pl.type === '!') negativeLists.push(pl);
                pl.reEnd = re.length;
                continue;
            case '|':
                if (inClass || !patternListStack.length || escaping) {
                    re += '\\|';
                    escaping = false;
                    continue;
                }
                clearStateChar();
                re += '|';
                continue;
            // these are mostly the same in regexp and glob
            case '[':
                // swallow any state-tracking char before the [
                clearStateChar();
                if (inClass) {
                    re += '\\' + c;
                    continue;
                }
                inClass = true;
                classStart = i;
                reClassStart = re.length;
                re += c;
                continue;
            case ']':
                //  a right bracket shall lose its special
                //  meaning and represent itself in
                //  a bracket expression if it occurs
                //  first in the list.  -- POSIX.2 2.8.3.2
                if (i === classStart + 1 || !inClass) {
                    re += '\\' + c;
                    escaping = false;
                    continue;
                }
                // handle the case where we left a class open.
                // "[z-a]" is valid, equivalent to "\[z-a\]"
                // split where the last [ was, make sure we don't have
                // an invalid re. if so, re-walk the contents of the
                // would-be class to re-translate any characters that
                // were passed through as-is
                // TODO: It would probably be faster to determine this
                // without a try/catch and a new RegExp, but it's tricky
                // to do safely.  For now, this is safe and works.
                var cs = pattern.substring(classStart + 1, i);
                try {
                    RegExp('[' + cs + ']');
                } catch (er) {
                    // not a valid class!
                    var sp = this.parse(cs, $f604f6614d00fa7b$var$SUBPARSE);
                    re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]';
                    hasMagic = hasMagic || sp[1];
                    inClass = false;
                    continue;
                }
                // finish up the class.
                hasMagic = true;
                inClass = false;
                re += c;
                continue;
            default:
                // swallow any state char that wasn't consumed
                clearStateChar();
                if (escaping) // no need
                escaping = false;
                else if ($f604f6614d00fa7b$var$reSpecials[c] && !(c === '^' && inClass)) re += '\\';
                re += c;
        } // switch
    } // for
    // handle the case where we left a class open.
    // "[abc" is valid, equivalent to "\[abc"
    if (inClass) {
        // split where the last [ was, and escape it
        // this is a huge pita.  We now have to re-walk
        // the contents of the would-be class to re-translate
        // any characters that were passed through as-is
        cs = pattern.substr(classStart + 1);
        sp = this.parse(cs, $f604f6614d00fa7b$var$SUBPARSE);
        re = re.substr(0, reClassStart) + '\\[' + sp[0];
        hasMagic = hasMagic || sp[1];
    }
    // handle the case where we had a +( thing at the *end*
    // of the pattern.
    // each pattern list stack adds 3 chars, and we need to go through
    // and escape any | chars that were passed through as-is for the regexp.
    // Go through and escape them, taking care not to double-escape any
    // | chars that were already escaped.
    for(pl = patternListStack.pop(); pl; pl = patternListStack.pop()){
        var tail = re.slice(pl.reStart + pl.open.length);
        this.debug('setting tail', re, pl);
        // maybe some even number of \, then maybe 1 \, followed by a |
        tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) {
            if (!$2) // the | isn't already escaped, so escape it.
            $2 = '\\';
            // need to escape all those slashes *again*, without escaping the
            // one that we need for escaping the | character.  As it works out,
            // escaping an even number of slashes can be done by simply repeating
            // it exactly after itself.  That's why this trick works.
            //
            // I am sorry that you have to see this.
            return $1 + $1 + $2 + '|';
        });
        this.debug('tail=%j\n   %s', tail, tail, pl, re);
        var t = pl.type === '*' ? $f604f6614d00fa7b$var$star : pl.type === '?' ? $f604f6614d00fa7b$var$qmark : '\\' + pl.type;
        hasMagic = true;
        re = re.slice(0, pl.reStart) + t + '\\(' + tail;
    }
    // handle trailing things that only matter at the very end.
    clearStateChar();
    if (escaping) // trailing \\
    re += '\\\\';
    // only need to apply the nodot start if the re starts with
    // something that could conceivably capture a dot
    var addPatternStart = false;
    switch(re.charAt(0)){
        case '[':
        case '.':
        case '(':
            addPatternStart = true;
    }
    // Hack to work around lack of negative lookbehind in JS
    // A pattern like: *.!(x).!(y|z) needs to ensure that a name
    // like 'a.xyz.yz' doesn't match.  So, the first negative
    // lookahead, has to look ALL the way ahead, to the end of
    // the pattern.
    for(var n = negativeLists.length - 1; n > -1; n--){
        var nl = negativeLists[n];
        var nlBefore = re.slice(0, nl.reStart);
        var nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
        var nlLast = re.slice(nl.reEnd - 8, nl.reEnd);
        var nlAfter = re.slice(nl.reEnd);
        nlLast += nlAfter;
        // Handle nested stuff like *(*.js|!(*.json)), where open parens
        // mean that we should *not* include the ) in the bit that is considered
        // "after" the negated section.
        var openParensBefore = nlBefore.split('(').length - 1;
        var cleanAfter = nlAfter;
        for(i = 0; i < openParensBefore; i++)cleanAfter = cleanAfter.replace(/\)[+*?]?/, '');
        nlAfter = cleanAfter;
        var dollar = '';
        if (nlAfter === '' && isSub !== $f604f6614d00fa7b$var$SUBPARSE) dollar = '$';
        var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast;
        re = newRe;
    }
    // if the re is not "" at this point, then we need to make sure
    // it doesn't match against an empty path part.
    // Otherwise a/* will match a/, which it should not.
    if (re !== '' && hasMagic) re = '(?=.)' + re;
    if (addPatternStart) re = patternStart + re;
    // parsing just a piece of a larger pattern.
    if (isSub === $f604f6614d00fa7b$var$SUBPARSE) return [
        re,
        hasMagic
    ];
    // skip the regexp for non-magical patterns
    // unescape anything in it, though, so that it'll be
    // an exact match against a file etc.
    if (!hasMagic) return $f604f6614d00fa7b$var$globUnescape(pattern);
    var flags = options.nocase ? 'i' : '';
    try {
        var regExp = new RegExp('^' + re + '$', flags);
    } catch (er) /* istanbul ignore next - should be impossible */ {
        // If it was an invalid regular expression, then it can't match
        // anything.  This trick looks for a character after the end of
        // the string, which is of course impossible, except in multi-line
        // mode, but it's not a /m regex.
        return new RegExp('$.');
    }
    regExp._glob = pattern;
    regExp._src = re;
    return regExp;
}
$f604f6614d00fa7b$var$minimatch.makeRe = function(pattern, options) {
    return new $f604f6614d00fa7b$var$Minimatch(pattern, options || {}).makeRe();
};
$f604f6614d00fa7b$var$Minimatch.prototype.makeRe = $f604f6614d00fa7b$var$makeRe;
function $f604f6614d00fa7b$var$makeRe() {
    if (this.regexp || this.regexp === false) return this.regexp;
    // at this point, this.set is a 2d array of partial
    // pattern strings, or "**".
    //
    // It's better to use .match().  This function shouldn't
    // be used, really, but it's pretty convenient sometimes,
    // when you just want to work with a regex.
    var set = this.set;
    if (!set.length) {
        this.regexp = false;
        return this.regexp;
    }
    var options = this.options;
    var twoStar = options.noglobstar ? $f604f6614d00fa7b$var$star : options.dot ? $f604f6614d00fa7b$var$twoStarDot : $f604f6614d00fa7b$var$twoStarNoDot;
    var flags = options.nocase ? 'i' : '';
    var re = set.map(function(pattern) {
        return pattern.map(function(p) {
            return p === $f604f6614d00fa7b$var$GLOBSTAR ? twoStar : typeof p === 'string' ? $f604f6614d00fa7b$var$regExpEscape(p) : p._src;
        }).join('\\\/');
    }).join('|');
    // must match entire pattern
    // ending in a * or ** will make it less strict.
    re = '^(?:' + re + ')$';
    // can match anything, as long as it's not this.
    if (this.negate) re = '^(?!' + re + ').*$';
    try {
        this.regexp = new RegExp(re, flags);
    } catch (ex) /* istanbul ignore next - should be impossible */ {
        this.regexp = false;
    }
    return this.regexp;
}
$f604f6614d00fa7b$var$minimatch.match = function(list, pattern, options) {
    options = options || {};
    var mm = new $f604f6614d00fa7b$var$Minimatch(pattern, options);
    list = list.filter(function(f) {
        return mm.match(f);
    });
    if (mm.options.nonull && !list.length) list.push(pattern);
    return list;
};
$f604f6614d00fa7b$var$Minimatch.prototype.match = function match(f, partial) {
    if (typeof partial === 'undefined') partial = this.partial;
    this.debug('match', f, this.pattern);
    // short-circuit in the case of busted things.
    // comments, etc.
    if (this.comment) return false;
    if (this.empty) return f === '';
    if (f === '/' && partial) return true;
    var options = this.options;
    // windows: need to use /, not \
    if ($f604f6614d00fa7b$var$path.sep !== '/') f = f.split($f604f6614d00fa7b$var$path.sep).join('/');
    // treat the test path as a set of pathparts.
    f = f.split($f604f6614d00fa7b$var$slashSplit);
    this.debug(this.pattern, 'split', f);
    // just ONE of the pattern sets in this.set needs to match
    // in order for it to be valid.  If negating, then just one
    // match means that we have failed.
    // Either way, return on the first hit.
    var set = this.set;
    this.debug(this.pattern, 'set', set);
    // Find the basename of the path by looking for the last non-empty segment
    var filename;
    var i;
    for(i = f.length - 1; i >= 0; i--){
        filename = f[i];
        if (filename) break;
    }
    for(i = 0; i < set.length; i++){
        var pattern = set[i];
        var file = f;
        if (options.matchBase && pattern.length === 1) file = [
            filename
        ];
        var hit = this.matchOne(file, pattern, partial);
        if (hit) {
            if (options.flipNegate) return true;
            return !this.negate;
        }
    }
    // didn't get any hits.  this is success if it's a negative
    // pattern, failure otherwise.
    if (options.flipNegate) return false;
    return this.negate;
};
// set partial to true to test if, for example,
// "/a/b" matches the start of "/*/b/*/d"
// Partial means, if you run out of file before you run
// out of pattern, then that's fine, as long as all
// the parts match.
$f604f6614d00fa7b$var$Minimatch.prototype.matchOne = function(file, pattern, partial) {
    var options = this.options;
    this.debug('matchOne', {
        'this': this,
        file: file,
        pattern: pattern
    });
    this.debug('matchOne', file.length, pattern.length);
    for(var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++){
        this.debug('matchOne loop');
        var p = pattern[pi];
        var f = file[fi];
        this.debug(pattern, p, f);
        // should be impossible.
        // some invalid regexp stuff in the set.
        /* istanbul ignore if */ if (p === false) return false;
        if (p === $f604f6614d00fa7b$var$GLOBSTAR) {
            this.debug('GLOBSTAR', [
                pattern,
                p,
                f
            ]);
            // "**"
            // a/**/b/**/c would match the following:
            // a/b/x/y/z/c
            // a/x/y/z/b/c
            // a/b/x/b/x/c
            // a/b/c
            // To do this, take the rest of the pattern after
            // the **, and see if it would match the file remainder.
            // If so, return success.
            // If not, the ** "swallows" a segment, and try again.
            // This is recursively awful.
            //
            // a/**/b/**/c matching a/b/x/y/z/c
            // - a matches a
            // - doublestar
            //   - matchOne(b/x/y/z/c, b/**/c)
            //     - b matches b
            //     - doublestar
            //       - matchOne(x/y/z/c, c) -> no
            //       - matchOne(y/z/c, c) -> no
            //       - matchOne(z/c, c) -> no
            //       - matchOne(c, c) yes, hit
            var fr = fi;
            var pr = pi + 1;
            if (pr === pl) {
                this.debug('** at the end');
                // a ** at the end will just swallow the rest.
                // We have found a match.
                // however, it will not swallow /.x, unless
                // options.dot is set.
                // . and .. are *never* matched by **, for explosively
                // exponential reasons.
                for(; fi < fl; fi++){
                    if (file[fi] === '.' || file[fi] === '..' || !options.dot && file[fi].charAt(0) === '.') return false;
                }
                return true;
            }
            // ok, let's see if we can swallow whatever we can.
            while(fr < fl){
                var swallowee = file[fr];
                this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
                // XXX remove this slice.  Just pass the start index.
                if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
                    this.debug('globstar found match!', fr, fl, swallowee);
                    // found a match.
                    return true;
                } else {
                    // can't swallow "." or ".." ever.
                    // can only swallow ".foo" when explicitly asked.
                    if (swallowee === '.' || swallowee === '..' || !options.dot && swallowee.charAt(0) === '.') {
                        this.debug('dot detected!', file, fr, pattern, pr);
                        break;
                    }
                    // ** swallows a segment, and continue.
                    this.debug('globstar swallow a segment, and continue');
                    fr++;
                }
            }
            // no match was found.
            // However, in partial mode, we can't say this is necessarily over.
            // If there's more *pattern* left, then
            /* istanbul ignore if */ if (partial) {
                // ran out of file
                this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
                if (fr === fl) return true;
            }
            return false;
        }
        // something other than **
        // non-magic patterns just have to match exactly
        // patterns with magic have been turned into regexps.
        var hit;
        if (typeof p === 'string') {
            hit = f === p;
            this.debug('string match', p, f, hit);
        } else {
            hit = f.match(p);
            this.debug('pattern match', p, f, hit);
        }
        if (!hit) return false;
    }
    // Note: ending in / means that we'll get a final ""
    // at the end of the pattern.  This can only match a
    // corresponding "" at the end of the file.
    // If the file ends in /, then it can only match a
    // a pattern that ends in /, unless the pattern just
    // doesn't have any more for it. But, a/b/ should *not*
    // match "a/b/*", even though "" matches against the
    // [^/]*? pattern, except in partial mode, where it might
    // simply not be reached yet.
    // However, a/b/ should still satisfy a/*
    // now either we fell off the end of the pattern, or we're done.
    if (fi === fl && pi === pl) // ran out of pattern and filename at the same time.
    // an exact hit!
    return true;
    else if (fi === fl) // ran out of file, but still had pattern left.
    // this is ok if we're doing the match as part of
    // a glob fs traversal.
    return partial;
    else /* istanbul ignore else */ if (pi === pl) // ran out of pattern, still have file left.
    // this is only acceptable if we're on the very last
    // empty segment of a file with a trailing slash.
    // a/* should match a/b/
    return fi === fl - 1 && file[fi] === '';
    // should be unreachable.
    /* istanbul ignore next */ throw new Error('wtf?');
};
// replace stuff like \* with *
function $f604f6614d00fa7b$var$globUnescape(s) {
    return s.replace(/\\(.)/g, '$1');
}
function $f604f6614d00fa7b$var$regExpEscape(s) {
    return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
}


var $54a0799a67b580fa$exports = {};
/**
 * Expose `pathToRegexp`.
 */ $54a0799a67b580fa$exports = $54a0799a67b580fa$var$pathToRegexp;
$54a0799a67b580fa$exports.match = $54a0799a67b580fa$var$match;
$54a0799a67b580fa$exports.regexpToFunction = $54a0799a67b580fa$var$regexpToFunction;
$54a0799a67b580fa$exports.parse = $54a0799a67b580fa$var$parse;
$54a0799a67b580fa$exports.compile = $54a0799a67b580fa$var$compile;
$54a0799a67b580fa$exports.tokensToFunction = $54a0799a67b580fa$var$tokensToFunction;
$54a0799a67b580fa$exports.tokensToRegExp = $54a0799a67b580fa$var$tokensToRegExp;
/**
 * Default configs.
 */ var $54a0799a67b580fa$var$DEFAULT_DELIMITER = '/';
/**
 * The main path matching regexp utility.
 *
 * @type {RegExp}
 */ var $54a0799a67b580fa$var$PATH_REGEXP = new RegExp([
    // Match escaped characters that would otherwise appear in future matches.
    // This allows the user to escape special characters that won't transform.
    '(\\\\.)',
    // Match Express-style parameters and un-named parameters with a prefix
    // and optional suffixes. Matches appear as:
    //
    // ":test(\\d+)?" => ["test", "\d+", undefined, "?"]
    // "(\\d+)"  => [undefined, undefined, "\d+", undefined]
    '(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?'
].join('|'), 'g');
/**
 * Parse a string for the raw tokens.
 *
 * @param  {string}  str
 * @param  {Object=} options
 * @return {!Array}
 */ function $54a0799a67b580fa$var$parse(str, options) {
    var tokens = [];
    var key = 0;
    var index = 0;
    var path = '';
    var defaultDelimiter = options && options.delimiter || $54a0799a67b580fa$var$DEFAULT_DELIMITER;
    var whitelist = options && options.whitelist || undefined;
    var pathEscaped = false;
    var res;
    while((res = $54a0799a67b580fa$var$PATH_REGEXP.exec(str)) !== null){
        var m = res[0];
        var escaped = res[1];
        var offset = res.index;
        path += str.slice(index, offset);
        index = offset + m.length;
        // Ignore already escaped sequences.
        if (escaped) {
            path += escaped[1];
            pathEscaped = true;
            continue;
        }
        var prev = '';
        var name = res[2];
        var capture = res[3];
        var group = res[4];
        var modifier = res[5];
        if (!pathEscaped && path.length) {
            var k = path.length - 1;
            var c = path[k];
            var matches = whitelist ? whitelist.indexOf(c) > -1 : true;
            if (matches) {
                prev = c;
                path = path.slice(0, k);
            }
        }
        // Push the current path onto the tokens.
        if (path) {
            tokens.push(path);
            path = '';
            pathEscaped = false;
        }
        var repeat = modifier === '+' || modifier === '*';
        var optional = modifier === '?' || modifier === '*';
        var pattern = capture || group;
        var delimiter = prev || defaultDelimiter;
        var prevText = prev || (typeof tokens[tokens.length - 1] === 'string' ? tokens[tokens.length - 1] : '');
        tokens.push({
            name: name || key++,
            prefix: prev,
            delimiter: delimiter,
            optional: optional,
            repeat: repeat,
            pattern: pattern ? $54a0799a67b580fa$var$escapeGroup(pattern) : $54a0799a67b580fa$var$restrictBacktrack(delimiter, defaultDelimiter, prevText)
        });
    }
    // Push any remaining characters.
    if (path || index < str.length) tokens.push(path + str.substr(index));
    return tokens;
}
function $54a0799a67b580fa$var$restrictBacktrack(delimiter, defaultDelimiter, prevText) {
    var charGroup = '[^' + $54a0799a67b580fa$var$escapeString(delimiter === defaultDelimiter ? delimiter : delimiter + defaultDelimiter) + ']';
    if (!prevText || prevText.indexOf(delimiter) > -1 || prevText.indexOf(defaultDelimiter) > -1) return charGroup + '+?';
    return $54a0799a67b580fa$var$escapeString(prevText) + '|(?:(?!' + $54a0799a67b580fa$var$escapeString(prevText) + ')' + charGroup + ')+?';
}
/**
 * Compile a string to a template function for the path.
 *
 * @param  {string}             str
 * @param  {Object=}            options
 * @return {!function(Object=, Object=)}
 */ function $54a0799a67b580fa$var$compile(str, options) {
    return $54a0799a67b580fa$var$tokensToFunction($54a0799a67b580fa$var$parse(str, options), options);
}
/**
 * Create path match function from `path-to-regexp` spec.
 */ function $54a0799a67b580fa$var$match(str, options) {
    var keys = [];
    var re = $54a0799a67b580fa$var$pathToRegexp(str, keys, options);
    return $54a0799a67b580fa$var$regexpToFunction(re, keys);
}
/**
 * Create a path match function from `path-to-regexp` output.
 */ function $54a0799a67b580fa$var$regexpToFunction(re, keys) {
    return function(pathname, options) {
        var m = re.exec(pathname);
        if (!m) return false;
        var path = m[0];
        var index = m.index;
        var params = {};
        var decode = options && options.decode || decodeURIComponent;
        for(var i = 1; i < m.length; i++){
            if (m[i] === undefined) continue;
            var key = keys[i - 1];
            if (key.repeat) params[key.name] = m[i].split(key.delimiter).map(function(value) {
                return decode(value, key);
            });
            else params[key.name] = decode(m[i], key);
        }
        return {
            path: path,
            index: index,
            params: params
        };
    };
}
/**
 * Expose a method for transforming tokens into the path function.
 */ function $54a0799a67b580fa$var$tokensToFunction(tokens, options) {
    // Compile all the tokens into regexps.
    var matches = new Array(tokens.length);
    // Compile all the patterns before compilation.
    for(var i = 0; i < tokens.length; i++)if (typeof tokens[i] === 'object') matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', $54a0799a67b580fa$var$flags(options));
    return function(data, options) {
        var path = '';
        var encode = options && options.encode || encodeURIComponent;
        var validate = options ? options.validate !== false : true;
        for(var i = 0; i < tokens.length; i++){
            var token = tokens[i];
            if (typeof token === 'string') {
                path += token;
                continue;
            }
            var value = data ? data[token.name] : undefined;
            var segment;
            if (Array.isArray(value)) {
                if (!token.repeat) throw new TypeError('Expected "' + token.name + '" to not repeat, but got array');
                if (value.length === 0) {
                    if (token.optional) continue;
                    throw new TypeError('Expected "' + token.name + '" to not be empty');
                }
                for(var j = 0; j < value.length; j++){
                    segment = encode(value[j], token);
                    if (validate && !matches[i].test(segment)) throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '"');
                    path += (j === 0 ? token.prefix : token.delimiter) + segment;
                }
                continue;
            }
            if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
                segment = encode(String(value), token);
                if (validate && !matches[i].test(segment)) throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but got "' + segment + '"');
                path += token.prefix + segment;
                continue;
            }
            if (token.optional) continue;
            throw new TypeError('Expected "' + token.name + '" to be ' + (token.repeat ? 'an array' : 'a string'));
        }
        return path;
    };
}
/**
 * Escape a regular expression string.
 *
 * @param  {string} str
 * @return {string}
 */ function $54a0799a67b580fa$var$escapeString(str) {
    return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, '\\$1');
}
/**
 * Escape the capturing group by escaping special characters and meaning.
 *
 * @param  {string} group
 * @return {string}
 */ function $54a0799a67b580fa$var$escapeGroup(group) {
    return group.replace(/([=!:$/()])/g, '\\$1');
}
/**
 * Get the flags for a regexp from the options.
 *
 * @param  {Object} options
 * @return {string}
 */ function $54a0799a67b580fa$var$flags(options) {
    return options && options.sensitive ? '' : 'i';
}
/**
 * Pull out keys from a regexp.
 *
 * @param  {!RegExp} path
 * @param  {Array=}  keys
 * @return {!RegExp}
 */ function $54a0799a67b580fa$var$regexpToRegexp(path, keys) {
    if (!keys) return path;
    // Use a negative lookahead to match only capturing groups.
    var groups = path.source.match(/\((?!\?)/g);
    if (groups) for(var i = 0; i < groups.length; i++)keys.push({
        name: i,
        prefix: null,
        delimiter: null,
        optional: false,
        repeat: false,
        pattern: null
    });
    return path;
}
/**
 * Transform an array into a regexp.
 *
 * @param  {!Array}  path
 * @param  {Array=}  keys
 * @param  {Object=} options
 * @return {!RegExp}
 */ function $54a0799a67b580fa$var$arrayToRegexp(path, keys, options) {
    var parts = [];
    for(var i = 0; i < path.length; i++)parts.push($54a0799a67b580fa$var$pathToRegexp(path[i], keys, options).source);
    return new RegExp('(?:' + parts.join('|') + ')', $54a0799a67b580fa$var$flags(options));
}
/**
 * Create a path regexp from string input.
 *
 * @param  {string}  path
 * @param  {Array=}  keys
 * @param  {Object=} options
 * @return {!RegExp}
 */ function $54a0799a67b580fa$var$stringToRegexp(path, keys, options) {
    return $54a0799a67b580fa$var$tokensToRegExp($54a0799a67b580fa$var$parse(path, options), keys, options);
}
/**
 * Expose a function for taking tokens and returning a RegExp.
 *
 * @param  {!Array}  tokens
 * @param  {Array=}  keys
 * @param  {Object=} options
 * @return {!RegExp}
 */ function $54a0799a67b580fa$var$tokensToRegExp(tokens, keys, options) {
    options = options || {};
    var strict = options.strict;
    var start = options.start !== false;
    var end = options.end !== false;
    var delimiter = options.delimiter || $54a0799a67b580fa$var$DEFAULT_DELIMITER;
    var endsWith = [].concat(options.endsWith || []).map($54a0799a67b580fa$var$escapeString).concat('$').join('|');
    var route = start ? '^' : '';
    // Iterate over the tokens and create our regexp string.
    for(var i = 0; i < tokens.length; i++){
        var token = tokens[i];
        if (typeof token === 'string') route += $54a0799a67b580fa$var$escapeString(token);
        else {
            var capture = token.repeat ? '(?:' + token.pattern + ')(?:' + $54a0799a67b580fa$var$escapeString(token.delimiter) + '(?:' + token.pattern + '))*' : token.pattern;
            if (keys) keys.push(token);
            if (token.optional) {
                if (!token.prefix) route += '(' + capture + ')?';
                else route += '(?:' + $54a0799a67b580fa$var$escapeString(token.prefix) + '(' + capture + '))?';
            } else route += $54a0799a67b580fa$var$escapeString(token.prefix) + '(' + capture + ')';
        }
    }
    if (end) {
        if (!strict) route += '(?:' + $54a0799a67b580fa$var$escapeString(delimiter) + ')?';
        route += endsWith === '$' ? '$' : '(?=' + endsWith + ')';
    } else {
        var endToken = tokens[tokens.length - 1];
        var isEndDelimited = typeof endToken === 'string' ? endToken[endToken.length - 1] === delimiter : endToken === undefined;
        if (!strict) route += '(?:' + $54a0799a67b580fa$var$escapeString(delimiter) + '(?=' + endsWith + '))?';
        if (!isEndDelimited) route += '(?=' + $54a0799a67b580fa$var$escapeString(delimiter) + '|' + endsWith + ')';
    }
    return new RegExp(route, $54a0799a67b580fa$var$flags(options));
}
/**
 * Normalize the given path string, returning a regular expression.
 *
 * An empty array can be passed in for the keys, which will hold the
 * placeholder key descriptions. For example, using `/user/:id`, `keys` will
 * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
 *
 * @param  {(string|RegExp|Array)} path
 * @param  {Array=}                keys
 * @param  {Object=}               options
 * @return {!RegExp}
 */ function $54a0799a67b580fa$var$pathToRegexp(path, keys, options) {
    if (path instanceof RegExp) return $54a0799a67b580fa$var$regexpToRegexp(path, keys);
    if (Array.isArray(path)) return $54a0799a67b580fa$var$arrayToRegexp(/** @type {!Array} */ path, keys, options);
    return $54a0799a67b580fa$var$stringToRegexp(/** @type {string} */ path, keys, options);
}


var $ae9112e8c23157b4$exports = {};

$parcel$export($ae9112e8c23157b4$exports, "charset", () => $ae9112e8c23157b4$export$e4c823724462c3fd, (v) => $ae9112e8c23157b4$export$e4c823724462c3fd = v);
$parcel$export($ae9112e8c23157b4$exports, "charsets", () => $ae9112e8c23157b4$export$48d2c0a44ea41a2f, (v) => $ae9112e8c23157b4$export$48d2c0a44ea41a2f = v);
$parcel$export($ae9112e8c23157b4$exports, "contentType", () => $ae9112e8c23157b4$export$8019223850b8bf78, (v) => $ae9112e8c23157b4$export$8019223850b8bf78 = v);
$parcel$export($ae9112e8c23157b4$exports, "extension", () => $ae9112e8c23157b4$export$1b45514b112dd749, (v) => $ae9112e8c23157b4$export$1b45514b112dd749 = v);
$parcel$export($ae9112e8c23157b4$exports, "extensions", () => $ae9112e8c23157b4$export$cc3e2d3244e01b7f, (v) => $ae9112e8c23157b4$export$cc3e2d3244e01b7f = v);
$parcel$export($ae9112e8c23157b4$exports, "lookup", () => $ae9112e8c23157b4$export$dfc7155ac0343b8, (v) => $ae9112e8c23157b4$export$dfc7155ac0343b8 = v);
$parcel$export($ae9112e8c23157b4$exports, "types", () => $ae9112e8c23157b4$export$b14ad400b1d09e0f, (v) => $ae9112e8c23157b4$export$b14ad400b1d09e0f = v);
/*!
 * mime-types
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */ /**
 * Module exports.
 * @public
 */ var $ae9112e8c23157b4$export$e4c823724462c3fd;
var $ae9112e8c23157b4$export$48d2c0a44ea41a2f;
var $ae9112e8c23157b4$export$8019223850b8bf78;
var $ae9112e8c23157b4$export$1b45514b112dd749;
var $ae9112e8c23157b4$export$cc3e2d3244e01b7f;
var $ae9112e8c23157b4$export$dfc7155ac0343b8;
var $ae9112e8c23157b4$export$b14ad400b1d09e0f;
'use strict';
var $75f790b6384e789f$exports = {};
/*!
 * mime-db
 * Copyright(c) 2014 Jonathan Ong
 * MIT Licensed
 */ /**
 * Module exports.
 */ 
$75f790b6384e789f$exports = (parcelRequire("5ZIzO"));



var $ae9112e8c23157b4$require$extname = $5HoLl$path.extname;
/**
 * Module variables.
 * @private
 */ var $ae9112e8c23157b4$var$EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
var $ae9112e8c23157b4$var$TEXT_TYPE_REGEXP = /^text\//i;
$ae9112e8c23157b4$export$e4c823724462c3fd = $ae9112e8c23157b4$var$charset;
$ae9112e8c23157b4$export$48d2c0a44ea41a2f = {
    lookup: $ae9112e8c23157b4$var$charset
};
$ae9112e8c23157b4$export$8019223850b8bf78 = $ae9112e8c23157b4$var$contentType;
$ae9112e8c23157b4$export$1b45514b112dd749 = $ae9112e8c23157b4$var$extension;
$ae9112e8c23157b4$export$cc3e2d3244e01b7f = Object.create(null);
$ae9112e8c23157b4$export$dfc7155ac0343b8 = $ae9112e8c23157b4$var$lookup;
$ae9112e8c23157b4$export$b14ad400b1d09e0f = Object.create(null);
// Populate the extensions/types maps
$ae9112e8c23157b4$var$populateMaps($ae9112e8c23157b4$export$cc3e2d3244e01b7f, $ae9112e8c23157b4$export$b14ad400b1d09e0f);
/**
 * Get the default charset for a MIME type.
 *
 * @param {string} type
 * @return {boolean|string}
 */ function $ae9112e8c23157b4$var$charset(type) {
    if (!type || typeof type !== 'string') return false;
    // TODO: use media-typer
    var match = $ae9112e8c23157b4$var$EXTRACT_TYPE_REGEXP.exec(type);
    var mime = match && $75f790b6384e789f$exports[match[1].toLowerCase()];
    if (mime && mime.charset) return mime.charset;
    // default text/* to utf-8
    if (match && $ae9112e8c23157b4$var$TEXT_TYPE_REGEXP.test(match[1])) return 'UTF-8';
    return false;
}
/**
 * Create a full Content-Type header given a MIME type or extension.
 *
 * @param {string} str
 * @return {boolean|string}
 */ function $ae9112e8c23157b4$var$contentType(str) {
    // TODO: should this even be in this module?
    if (!str || typeof str !== 'string') return false;
    var mime = str.indexOf('/') === -1 ? $ae9112e8c23157b4$export$dfc7155ac0343b8(str) : str;
    if (!mime) return false;
    // TODO: use content-type or other module
    if (mime.indexOf('charset') === -1) {
        var charset = $ae9112e8c23157b4$export$e4c823724462c3fd(mime);
        if (charset) mime += '; charset=' + charset.toLowerCase();
    }
    return mime;
}
/**
 * Get the default extension for a MIME type.
 *
 * @param {string} type
 * @return {boolean|string}
 */ function $ae9112e8c23157b4$var$extension(type) {
    if (!type || typeof type !== 'string') return false;
    // TODO: use media-typer
    var match = $ae9112e8c23157b4$var$EXTRACT_TYPE_REGEXP.exec(type);
    // get extensions
    var exts = match && $ae9112e8c23157b4$export$cc3e2d3244e01b7f[match[1].toLowerCase()];
    if (!exts || !exts.length) return false;
    return exts[0];
}
/**
 * Lookup the MIME type for a file path/extension.
 *
 * @param {string} path
 * @return {boolean|string}
 */ function $ae9112e8c23157b4$var$lookup(path) {
    if (!path || typeof path !== 'string') return false;
    // get the extension ("ext" or ".ext" or full path)
    var extension = $ae9112e8c23157b4$require$extname('x.' + path).toLowerCase().substr(1);
    if (!extension) return false;
    return $ae9112e8c23157b4$export$b14ad400b1d09e0f[extension] || false;
}
/**
 * Populate the extensions and types maps.
 * @private
 */ function $ae9112e8c23157b4$var$populateMaps(extensions, types) {
    // source preference (least -> most)
    var preference = [
        'nginx',
        'apache',
        undefined,
        'iana'
    ];
    Object.keys($75f790b6384e789f$exports).forEach(function forEachMimeType(type) {
        var mime = $75f790b6384e789f$exports[type];
        var exts = mime.extensions;
        if (!exts || !exts.length) return;
        // mime -> extensions
        extensions[type] = exts;
        // extension -> mime
        for(var i = 0; i < exts.length; i++){
            var extension = exts[i];
            if (types[extension]) {
                var from = preference.indexOf($75f790b6384e789f$exports[types[extension]].source);
                var to = preference.indexOf(mime.source);
                if (types[extension] !== 'application/octet-stream' && (from > to || from === to && types[extension].substr(0, 12) === 'application/')) continue;
            }
            // set the extension -> mime
            types[extension] = type;
        }
    });
}


var $937890531de33a86$exports = {};
/*!
 * bytes
 * Copyright(c) 2012-2014 TJ Holowaychuk
 * Copyright(c) 2015 Jed Watson
 * MIT Licensed
 */ 'use strict';
/**
 * Module exports.
 * @public
 */ $937890531de33a86$exports = $937890531de33a86$var$bytes;
$937890531de33a86$exports.format = $937890531de33a86$var$format;
$937890531de33a86$exports.parse = $937890531de33a86$var$parse;
/**
 * Module variables.
 * @private
 */ var $937890531de33a86$var$formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
var $937890531de33a86$var$formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
var $937890531de33a86$var$map = {
    b: 1,
    kb: 1024,
    mb: 1048576,
    gb: 1073741824,
    tb: 1073741824 * 1024
};
var $937890531de33a86$var$parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb)$/i;
/**
 * Convert the given value in bytes into a string or parse to string to an integer in bytes.
 *
 * @param {string|number} value
 * @param {{
 *  case: [string],
 *  decimalPlaces: [number]
 *  fixedDecimals: [boolean]
 *  thousandsSeparator: [string]
 *  unitSeparator: [string]
 *  }} [options] bytes options.
 *
 * @returns {string|number|null}
 */ function $937890531de33a86$var$bytes(value, options) {
    if (typeof value === 'string') return $937890531de33a86$var$parse(value);
    if (typeof value === 'number') return $937890531de33a86$var$format(value, options);
    return null;
}
/**
 * Format the given value in bytes into a string.
 *
 * If the value is negative, it is kept as such. If it is a float,
 * it is rounded.
 *
 * @param {number} value
 * @param {object} [options]
 * @param {number} [options.decimalPlaces=2]
 * @param {number} [options.fixedDecimals=false]
 * @param {string} [options.thousandsSeparator=]
 * @param {string} [options.unit=]
 * @param {string} [options.unitSeparator=]
 *
 * @returns {string|null}
 * @public
 */ function $937890531de33a86$var$format(value, options) {
    if (!Number.isFinite(value)) return null;
    var mag = Math.abs(value);
    var thousandsSeparator = options && options.thousandsSeparator || '';
    var unitSeparator = options && options.unitSeparator || '';
    var decimalPlaces = options && options.decimalPlaces !== undefined ? options.decimalPlaces : 2;
    var fixedDecimals = Boolean(options && options.fixedDecimals);
    var unit = options && options.unit || '';
    if (!unit || !$937890531de33a86$var$map[unit.toLowerCase()]) {
        if (mag >= $937890531de33a86$var$map.tb) unit = 'TB';
        else if (mag >= $937890531de33a86$var$map.gb) unit = 'GB';
        else if (mag >= $937890531de33a86$var$map.mb) unit = 'MB';
        else if (mag >= $937890531de33a86$var$map.kb) unit = 'KB';
        else unit = 'B';
    }
    var val = value / $937890531de33a86$var$map[unit.toLowerCase()];
    var str = val.toFixed(decimalPlaces);
    if (!fixedDecimals) str = str.replace($937890531de33a86$var$formatDecimalsRegExp, '$1');
    if (thousandsSeparator) str = str.replace($937890531de33a86$var$formatThousandsRegExp, thousandsSeparator);
    return str + unitSeparator + unit;
}
/**
 * Parse the string value into an integer in bytes.
 *
 * If no unit is given, it is assumed the value is in bytes.
 *
 * @param {number|string} val
 *
 * @returns {number|null}
 * @public
 */ function $937890531de33a86$var$parse(val) {
    if (typeof val === 'number' && !isNaN(val)) return val;
    if (typeof val !== 'string') return null;
    // Test if the string passed is valid
    var results = $937890531de33a86$var$parseRegExp.exec(val);
    var floatValue;
    var unit = 'b';
    if (!results) {
        // Nothing could be extracted from the given string
        floatValue = parseInt(val, 10);
        unit = 'b';
    } else {
        // Retrieve the value and the unit
        floatValue = parseFloat(results[1]);
        unit = results[4].toLowerCase();
    }
    return Math.floor($937890531de33a86$var$map[unit] * floatValue);
}


var $83574916d2b3b6f7$exports = {};
/*!
 * content-disposition
 * Copyright(c) 2014 Douglas Christopher Wilson
 * MIT Licensed
 */ 'use strict';
/**
 * Module exports.
 */ $83574916d2b3b6f7$exports = $83574916d2b3b6f7$var$contentDisposition;
$83574916d2b3b6f7$exports.parse = $83574916d2b3b6f7$var$parse;

var $83574916d2b3b6f7$require$basename = $5HoLl$path.basename;
/**
 * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%")
 */ var $83574916d2b3b6f7$var$ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g // eslint-disable-line no-control-regex
;
/**
 * RegExp to match percent encoding escape.
 */ var $83574916d2b3b6f7$var$HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/;
var $83574916d2b3b6f7$var$HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g;
/**
 * RegExp to match non-latin1 characters.
 */ var $83574916d2b3b6f7$var$NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g;
/**
 * RegExp to match quoted-pair in RFC 2616
 *
 * quoted-pair = "\" CHAR
 * CHAR        = <any US-ASCII character (octets 0 - 127)>
 */ var $83574916d2b3b6f7$var$QESC_REGEXP = /\\([\u0000-\u007f])/g;
/**
 * RegExp to match chars that must be quoted-pair in RFC 2616
 */ var $83574916d2b3b6f7$var$QUOTE_REGEXP = /([\\"])/g;
/**
 * RegExp for various RFC 2616 grammar
 *
 * parameter     = token "=" ( token | quoted-string )
 * token         = 1*<any CHAR except CTLs or separators>
 * separators    = "(" | ")" | "<" | ">" | "@"
 *               | "," | ";" | ":" | "\" | <">
 *               | "/" | "[" | "]" | "?" | "="
 *               | "{" | "}" | SP | HT
 * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
 * qdtext        = <any TEXT except <">>
 * quoted-pair   = "\" CHAR
 * CHAR          = <any US-ASCII character (octets 0 - 127)>
 * TEXT          = <any OCTET except CTLs, but including LWS>
 * LWS           = [CRLF] 1*( SP | HT )
 * CRLF          = CR LF
 * CR            = <US-ASCII CR, carriage return (13)>
 * LF            = <US-ASCII LF, linefeed (10)>
 * SP            = <US-ASCII SP, space (32)>
 * HT            = <US-ASCII HT, horizontal-tab (9)>
 * CTL           = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
 * OCTET         = <any 8-bit sequence of data>
 */ var $83574916d2b3b6f7$var$PARAM_REGEXP = /;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g // eslint-disable-line no-control-regex
;
var $83574916d2b3b6f7$var$TEXT_REGEXP = /^[\x20-\x7e\x80-\xff]+$/;
var $83574916d2b3b6f7$var$TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/;
/**
 * RegExp for various RFC 5987 grammar
 *
 * ext-value     = charset  "'" [ language ] "'" value-chars
 * charset       = "UTF-8" / "ISO-8859-1" / mime-charset
 * mime-charset  = 1*mime-charsetc
 * mime-charsetc = ALPHA / DIGIT
 *               / "!" / "#" / "$" / "%" / "&"
 *               / "+" / "-" / "^" / "_" / "`"
 *               / "{" / "}" / "~"
 * language      = ( 2*3ALPHA [ extlang ] )
 *               / 4ALPHA
 *               / 5*8ALPHA
 * extlang       = *3( "-" 3ALPHA )
 * value-chars   = *( pct-encoded / attr-char )
 * pct-encoded   = "%" HEXDIG HEXDIG
 * attr-char     = ALPHA / DIGIT
 *               / "!" / "#" / "$" / "&" / "+" / "-" / "."
 *               / "^" / "_" / "`" / "|" / "~"
 */ var $83574916d2b3b6f7$var$EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/;
/**
 * RegExp for various RFC 6266 grammar
 *
 * disposition-type = "inline" | "attachment" | disp-ext-type
 * disp-ext-type    = token
 * disposition-parm = filename-parm | disp-ext-parm
 * filename-parm    = "filename" "=" value
 *                  | "filename*" "=" ext-value
 * disp-ext-parm    = token "=" value
 *                  | ext-token "=" ext-value
 * ext-token        = <the characters in token, followed by "*">
 */ var $83574916d2b3b6f7$var$DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/ // eslint-disable-line no-control-regex
;
/**
 * Create an attachment Content-Disposition header.
 *
 * @param {string} [filename]
 * @param {object} [options]
 * @param {string} [options.type=attachment]
 * @param {string|boolean} [options.fallback=true]
 * @return {string}
 * @api public
 */ function $83574916d2b3b6f7$var$contentDisposition(filename, options) {
    var opts = options || {};
    // get type
    var type = opts.type || 'attachment';
    // get parameters
    var params = $83574916d2b3b6f7$var$createparams(filename, opts.fallback);
    // format into string
    return $83574916d2b3b6f7$var$format(new $83574916d2b3b6f7$var$ContentDisposition(type, params));
}
/**
 * Create parameters object from filename and fallback.
 *
 * @param {string} [filename]
 * @param {string|boolean} [fallback=true]
 * @return {object}
 * @api private
 */ function $83574916d2b3b6f7$var$createparams(filename, fallback) {
    if (filename === undefined) return;
    var params = {};
    if (typeof filename !== 'string') throw new TypeError('filename must be a string');
    // fallback defaults to true
    if (fallback === undefined) fallback = true;
    if (typeof fallback !== 'string' && typeof fallback !== 'boolean') throw new TypeError('fallback must be a string or boolean');
    if (typeof fallback === 'string' && $83574916d2b3b6f7$var$NON_LATIN1_REGEXP.test(fallback)) throw new TypeError('fallback must be ISO-8859-1 string');
    // restrict to file base name
    var name = $83574916d2b3b6f7$require$basename(filename);
    // determine if name is suitable for quoted string
    var isQuotedString = $83574916d2b3b6f7$var$TEXT_REGEXP.test(name);
    // generate fallback name
    var fallbackName = typeof fallback !== 'string' ? fallback && $83574916d2b3b6f7$var$getlatin1(name) : $83574916d2b3b6f7$require$basename(fallback);
    var hasFallback = typeof fallbackName === 'string' && fallbackName !== name;
    // set extended filename parameter
    if (hasFallback || !isQuotedString || $83574916d2b3b6f7$var$HEX_ESCAPE_REGEXP.test(name)) params['filename*'] = name;
    // set filename parameter
    if (isQuotedString || hasFallback) params.filename = hasFallback ? fallbackName : name;
    return params;
}
/**
 * Format object to Content-Disposition header.
 *
 * @param {object} obj
 * @param {string} obj.type
 * @param {object} [obj.parameters]
 * @return {string}
 * @api private
 */ function $83574916d2b3b6f7$var$format(obj) {
    var parameters = obj.parameters;
    var type = obj.type;
    if (!type || typeof type !== 'string' || !$83574916d2b3b6f7$var$TOKEN_REGEXP.test(type)) throw new TypeError('invalid type');
    // start with normalized type
    var string = String(type).toLowerCase();
    // append parameters
    if (parameters && typeof parameters === 'object') {
        var param;
        var params = Object.keys(parameters).sort();
        for(var i = 0; i < params.length; i++){
            param = params[i];
            var val = param.substr(-1) === '*' ? $83574916d2b3b6f7$var$ustring(parameters[param]) : $83574916d2b3b6f7$var$qstring(parameters[param]);
            string += '; ' + param + '=' + val;
        }
    }
    return string;
}
/**
 * Decode a RFC 6987 field value (gracefully).
 *
 * @param {string} str
 * @return {string}
 * @api private
 */ function $83574916d2b3b6f7$var$decodefield(str) {
    var match = $83574916d2b3b6f7$var$EXT_VALUE_REGEXP.exec(str);
    if (!match) throw new TypeError('invalid extended field value');
    var charset = match[1].toLowerCase();
    var encoded = match[2];
    var value;
    // to binary string
    var binary = encoded.replace($83574916d2b3b6f7$var$HEX_ESCAPE_REPLACE_REGEXP, $83574916d2b3b6f7$var$pdecode);
    switch(charset){
        case 'iso-8859-1':
            value = $83574916d2b3b6f7$var$getlatin1(binary);
            break;
        case 'utf-8':
            value = new Buffer(binary, 'binary').toString('utf8');
            break;
        default:
            throw new TypeError('unsupported charset in extended field');
    }
    return value;
}
/**
 * Get ISO-8859-1 version of string.
 *
 * @param {string} val
 * @return {string}
 * @api private
 */ function $83574916d2b3b6f7$var$getlatin1(val) {
    // simple Unicode -> ISO-8859-1 transformation
    return String(val).replace($83574916d2b3b6f7$var$NON_LATIN1_REGEXP, '?');
}
/**
 * Parse Content-Disposition header string.
 *
 * @param {string} string
 * @return {object}
 * @api private
 */ function $83574916d2b3b6f7$var$parse(string) {
    if (!string || typeof string !== 'string') throw new TypeError('argument string is required');
    var match = $83574916d2b3b6f7$var$DISPOSITION_TYPE_REGEXP.exec(string);
    if (!match) throw new TypeError('invalid type format');
    // normalize type
    var index = match[0].length;
    var type = match[1].toLowerCase();
    var key;
    var names = [];
    var params = {};
    var value;
    // calculate index to start at
    index = $83574916d2b3b6f7$var$PARAM_REGEXP.lastIndex = match[0].substr(-1) === ';' ? index - 1 : index;
    // match parameters
    while(match = $83574916d2b3b6f7$var$PARAM_REGEXP.exec(string)){
        if (match.index !== index) throw new TypeError('invalid parameter format');
        index += match[0].length;
        key = match[1].toLowerCase();
        value = match[2];
        if (names.indexOf(key) !== -1) throw new TypeError('invalid duplicate parameter');
        names.push(key);
        if (key.indexOf('*') + 1 === key.length) {
            // decode extended value
            key = key.slice(0, -1);
            value = $83574916d2b3b6f7$var$decodefield(value);
            // overwrite existing value
            params[key] = value;
            continue;
        }
        if (typeof params[key] === 'string') continue;
        if (value[0] === '"') // remove quotes and escapes
        value = value.substr(1, value.length - 2).replace($83574916d2b3b6f7$var$QESC_REGEXP, '$1');
        params[key] = value;
    }
    if (index !== -1 && index !== string.length) throw new TypeError('invalid parameter format');
    return new $83574916d2b3b6f7$var$ContentDisposition(type, params);
}
/**
 * Percent decode a single character.
 *
 * @param {string} str
 * @param {string} hex
 * @return {string}
 * @api private
 */ function $83574916d2b3b6f7$var$pdecode(str, hex) {
    return String.fromCharCode(parseInt(hex, 16));
}
/**
 * Percent encode a single character.
 *
 * @param {string} char
 * @return {string}
 * @api private
 */ function $83574916d2b3b6f7$var$pencode(char) {
    var hex = String(char).charCodeAt(0).toString(16).toUpperCase();
    return hex.length === 1 ? '%0' + hex : '%' + hex;
}
/**
 * Quote a string for HTTP.
 *
 * @param {string} val
 * @return {string}
 * @api private
 */ function $83574916d2b3b6f7$var$qstring(val) {
    var str = String(val);
    return '"' + str.replace($83574916d2b3b6f7$var$QUOTE_REGEXP, '\\$1') + '"';
}
/**
 * Encode a Unicode string for HTTP (RFC 5987).
 *
 * @param {string} val
 * @return {string}
 * @api private
 */ function $83574916d2b3b6f7$var$ustring(val) {
    var str = String(val);
    // percent encode as UTF-8
    var encoded = encodeURIComponent(str).replace($83574916d2b3b6f7$var$ENCODE_URL_ATTR_CHAR_REGEXP, $83574916d2b3b6f7$var$pencode);
    return 'UTF-8\'\'' + encoded;
}
/**
 * Class for parsed Content-Disposition header for v8 optimization
 */ function $83574916d2b3b6f7$var$ContentDisposition(type, parameters) {
    this.type = type;
    this.parameters = parameters;
}


var $b1c2bf238d5b4007$exports = {};
"use strict";

$b1c2bf238d5b4007$exports = function(thePath, potentialParent) {
    // For inside-directory checking, we want to allow trailing slashes, so normalize.
    thePath = $b1c2bf238d5b4007$var$stripTrailingSep(thePath);
    potentialParent = $b1c2bf238d5b4007$var$stripTrailingSep(potentialParent);
    // Node treats only Windows as case-insensitive in its path module; we follow those conventions.
    if (process.platform === "win32") {
        thePath = thePath.toLowerCase();
        potentialParent = potentialParent.toLowerCase();
    }
    return thePath.lastIndexOf(potentialParent, 0) === 0 && (thePath[potentialParent.length] === $5HoLl$path.sep || thePath[potentialParent.length] === undefined);
};
function $b1c2bf238d5b4007$var$stripTrailingSep(thePath) {
    if (thePath[thePath.length - 1] === $5HoLl$path.sep) return thePath.slice(0, -1);
    return thePath;
}


var $17e698b7a50b563b$exports = {};
/*!
 * range-parser
 * Copyright(c) 2012-2014 TJ Holowaychuk
 * Copyright(c) 2015-2016 Douglas Christopher Wilson
 * MIT Licensed
 */ 'use strict';
/**
 * Module exports.
 * @public
 */ $17e698b7a50b563b$exports = $17e698b7a50b563b$var$rangeParser;
/**
 * Parse "Range" header `str` relative to the given file `size`.
 *
 * @param {Number} size
 * @param {String} str
 * @param {Object} [options]
 * @return {Array}
 * @public
 */ function $17e698b7a50b563b$var$rangeParser(size, str, options) {
    var index = str.indexOf('=');
    if (index === -1) return -2;
    // split the range string
    var arr = str.slice(index + 1).split(',');
    var ranges = [];
    // add ranges type
    ranges.type = str.slice(0, index);
    // parse all ranges
    for(var i = 0; i < arr.length; i++){
        var range = arr[i].split('-');
        var start = parseInt(range[0], 10);
        var end = parseInt(range[1], 10);
        // -nnn
        if (isNaN(start)) {
            start = size - end;
            end = size - 1;
        // nnn-
        } else if (isNaN(end)) end = size - 1;
        // limit last-byte-pos to current length
        if (end > size - 1) end = size - 1;
        // invalid or unsatisifiable
        if (isNaN(start) || isNaN(end) || start > end || start < 0) continue;
        // add range
        ranges.push({
            start: start,
            end: end
        });
    }
    if (ranges.length < 1) // unsatisifiable
    return -1;
    return options && options.combine ? $17e698b7a50b563b$var$combineRanges(ranges) : ranges;
}
/**
 * Combine overlapping & adjacent ranges.
 * @private
 */ function $17e698b7a50b563b$var$combineRanges(ranges) {
    var ordered = ranges.map($17e698b7a50b563b$var$mapWithIndex).sort($17e698b7a50b563b$var$sortByRangeStart);
    for(var j = 0, i = 1; i < ordered.length; i++){
        var range = ordered[i];
        var current = ordered[j];
        if (range.start > current.end + 1) // next range
        ordered[++j] = range;
        else if (range.end > current.end) {
            // extend range
            current.end = range.end;
            current.index = Math.min(current.index, range.index);
        }
    }
    // trim ordered array
    ordered.length = j + 1;
    // generate combined range
    var combined = ordered.sort($17e698b7a50b563b$var$sortByRangeIndex).map($17e698b7a50b563b$var$mapWithoutIndex);
    // copy ranges type
    combined.type = ranges.type;
    return combined;
}
/**
 * Map function to add index value to ranges.
 * @private
 */ function $17e698b7a50b563b$var$mapWithIndex(range, index) {
    return {
        start: range.start,
        end: range.end,
        index: index
    };
}
/**
 * Map function to remove index value from ranges.
 * @private
 */ function $17e698b7a50b563b$var$mapWithoutIndex(range) {
    return {
        start: range.start,
        end: range.end
    };
}
/**
 * Sort function to sort ranges by index.
 * @private
 */ function $17e698b7a50b563b$var$sortByRangeIndex(a, b) {
    return a.index - b.index;
}
/**
 * Sort function to sort ranges by start position.
 * @private
 */ function $17e698b7a50b563b$var$sortByRangeStart(a, b) {
    return a.start - b.start;
}


var $b3c5ffc4260c3ac4$exports = {};
(function() {
    function directory(it) {
        var encodeHTML = typeof _encodeHTML !== 'undefined' ? _encodeHTML : function(doNotSkipEncoded) {
            var encodeHTMLRules = {
                "&": "&#38;",
                "<": "&#60;",
                ">": "&#62;",
                '"': "&#34;",
                "'": "&#39;",
                "/": "&#47;"
            }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
            return function(code) {
                return code ? code.toString().replace(matchHTML, function(m) {
                    return encodeHTMLRules[m] || m;
                }) : "";
            };
        }();
        var out = '<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Files within ' + encodeHTML(it.directory) + '</title> <style>body { margin: 0; padding: 30px; background: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased;}main { max-width: 920px;}header { display: flex; justify-content: space-between; flex-wrap: wrap;}h1 { font-size: 18px; font-weight: 500; margin-top: 0; color: #000;}header h1 a { font-size: 18px; font-weight: 500; margin-top: 0; color: #000;}h1 i { font-style: normal;}ul { margin: 0 0 0 -2px; padding: 20px 0 0 0;}ul li { list-style: none; font-size: 14px; display: flex; justify-content: space-between;}a { text-decoration: none;}ul a { color: #000; padding: 10px 5px; margin: 0 -5px; white-space: nowrap; overflow: hidden; display: block; width: 100%; text-overflow: ellipsis;}header a { color: #0076FF; font-size: 11px; font-weight: 400; display: inline-block; line-height: 20px;}svg { height: 13px; vertical-align: text-bottom;}ul a::before { display: inline-block; vertical-align: middle; margin-right: 10px; width: 24px; text-align: center; line-height: 12px;}ul a.file::before { content: url("data:image/svg+xml;utf8,<svg width=\'15\' height=\'19\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M10 8C8.34 8 7 6.66 7 5V1H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V8h-4zM8 5c0 1.1.9 2 2 2h3.59L8 1.41V5zM3 0h5l7 7v9c0 1.66-1.34 3-3 3H3c-1.66 0-3-1.34-3-3V3c0-1.66 1.34-3 3-3z\' fill=\'black\'/></svg>");}ul a:hover { text-decoration: underline;}ul a.folder::before { content: url("data:image/svg+xml;utf8,<svg width=\'20\' height=\'16\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M18.784 3.87a1.565 1.565 0 0 0-.565-.356V2.426c0-.648-.523-1.171-1.15-1.171H8.996L7.908.25A.89.89 0 0 0 7.302 0H2.094C1.445 0 .944.523.944 1.171v2.3c-.21.085-.398.21-.565.356a1.348 1.348 0 0 0-.377 1.004l.398 9.83C.42 15.393 1.048 16 1.8 16h15.583c.753 0 1.36-.586 1.4-1.339l.398-9.83c.021-.313-.125-.69-.397-.962zM1.843 3.41V1.191c0-.146.104-.272.25-.272H7.26l1.234 1.088c.083.042.167.104.293.104h8.282c.125 0 .25.126.25.272V3.41H1.844zm15.54 11.712H1.78a.47.47 0 0 1-.481-.46l-.397-9.83c0-.147.041-.252.125-.356a.504.504 0 0 1 .377-.147H17.78c.125 0 .272.063.377.147.083.083.125.209.125.334l-.418 9.83c-.021.272-.23.482-.481.482z\' fill=\'black\'/></svg>");}ul a.lambda::before { content: url("data:image/svg+xml; utf8,<svg width=\'15\' height=\'19\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M3.5 14.4354H5.31622L7.30541 9.81311H7.43514L8.65315 13.0797C9.05676 14.1643 9.55405 14.5 10.7 14.5C11.0171 14.5 11.291 14.4677 11.5 14.4032V13.1572C11.3847 13.1766 11.2622 13.2024 11.1541 13.2024C10.6351 13.2024 10.3829 13.0281 10.1595 12.4664L8.02613 7.07586C7.21171 5.01646 6.54865 4.5 5.11441 4.5C4.83333 4.5 4.62432 4.53228 4.37207 4.59038V5.83635C4.56667 5.81052 4.66036 5.79761 4.77568 5.79761C5.64775 5.79761 5.9 6.0042 6.4045 7.19852L6.64234 7.77954L3.5 14.4354Z\' fill=\'black\'/><rect x=\'0.5\' y=\'0.5\' width=\'14\' height=\'18\' rx=\'2.5\' stroke=\'black\'/></svg>");}ul a.file.gif::before,ul a.file.jpg::before,ul a.file.png::before,ul a.file.svg::before { content: url("data:image/svg+xml;utf8,<svg width=\'16\' height=\'16\' viewBox=\'0 0 80 80\' xmlns=\'http://www.w3.org/2000/svg\' fill=\'none\' stroke=\'black\' stroke-width=\'5\' stroke-linecap=\'round\' stroke-linejoin=\'round\'><rect x=\'6\' y=\'6\' width=\'68\' height=\'68\' rx=\'5\' ry=\'5\'/><circle cx=\'24\' cy=\'24\' r=\'8\'/><path d=\'M73 49L59 34 37 52m16 20L27 42 7 58\'/></svg>");}::selection { background-color: #79FFE1; color: #000;}::-moz-selection { background-color: #79FFE1; color: #000;}@media (min-width: 768px) { ul {display: flex;flex-wrap: wrap; } ul li {width: 230px;padding-right: 20px; }}@media (min-width: 992px) { body {padding: 45px; } h1, header h1 a {font-size: 15px; } ul li {font-size: 13px;box-sizing: border-box;justify-content: flex-start; }}</style> </head> <body> <main> <header> <h1> <i>Index of&nbsp;</i> ';
        var arr1 = it.paths;
        if (arr1) {
            var value, index = -1, l1 = arr1.length - 1;
            while(index < l1){
                value = arr1[index += 1];
                out += ' <a href="/' + encodeHTML(value.url) + '">' + encodeHTML(value.name) + '</a> ';
            }
        }
        out += ' </h1> </header> <ul id="files"> ';
        var arr2 = it.files;
        if (arr2) {
            var value, index = -1, l2 = arr2.length - 1;
            while(index < l2){
                value = arr2[index += 1];
                out += ' <li> <a href="' + encodeHTML(value.relative) + '" title="' + encodeHTML(value.title) + '" class="' + encodeHTML(value.type) + ' ' + encodeHTML(value.ext) + '">' + encodeHTML(value.base) + '</a> </li> ';
            }
        }
        out += ' </ul></main> </body></html>';
        return out;
    }
    var itself = directory, _encodeHTML = function(doNotSkipEncoded) {
        var encodeHTMLRules = {
            "&": "&#38;",
            "<": "&#60;",
            ">": "&#62;",
            '"': "&#34;",
            "'": "&#39;",
            "/": "&#47;"
        }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
        return function(code) {
            return code ? code.toString().replace(matchHTML, function(m) {
                return encodeHTMLRules[m] || m;
            }) : "";
        };
    }();
    if ($b3c5ffc4260c3ac4$exports) $b3c5ffc4260c3ac4$exports = itself;
    else if (typeof define === 'function') define(function() {
        return itself;
    });
    else {
        window.render = window.render || {};
        window.render['directory'] = itself;
    }
})();


var $507a981cc7bc0220$exports = {};
(function() {
    function error(it) {
        var out = '<!DOCTYPE html><head> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/> <style> body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; } main, aside, section { display: flex; justify-content: center; align-items: center; flex-direction: column; } main { height: 100%; } aside { background: #000; flex-shrink: 1; padding: 30px 20px; } aside p { margin: 0; color: #999999; font-size: 14px; line-height: 24px; } aside a { color: #fff; text-decoration: none; } section span { font-size: 24px; font-weight: 500; display: block; border-bottom: 1px solid #EAEAEA; text-align: center; padding-bottom: 20px; width: 100px; } section p { font-size: 14px; font-weight: 400; } section span + p { margin: 20px 0 0 0; } @media (min-width: 768px) { section { height: 40px; flex-direction: row; } section span, section p { height: 100%; line-height: 40px; } section span { border-bottom: 0; border-right: 1px solid #EAEAEA; padding: 0 20px 0 0; width: auto; } section span + p { margin: 0; padding-left: 20px; } aside { padding: 50px 0; } aside p { max-width: 520px; text-align: center; } } </style></head><body> <main> <section> <span>' + it.statusCode + '</span> <p>' + it.message + '</p> </section> </main></body>';
        return out;
    }
    var itself = error, _encodeHTML = function(doNotSkipEncoded) {
        var encodeHTMLRules = {
            "&": "&#38;",
            "<": "&#60;",
            ">": "&#62;",
            '"': "&#34;",
            "'": "&#39;",
            "/": "&#47;"
        }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
        return function(code) {
            return code ? code.toString().replace(matchHTML, function(m) {
                return encodeHTMLRules[m] || m;
            }) : "";
        };
    }();
    if ($507a981cc7bc0220$exports) $507a981cc7bc0220$exports = itself;
    else if (typeof define === 'function') define(function() {
        return itself;
    });
    else {
        window.render = window.render || {};
        window.render['error'] = itself;
    }
})();


const $241580f2bf06323c$var$etags = new Map();
const $241580f2bf06323c$var$calculateSha = (handlers, absolutePath)=>new Promise((resolve, reject)=>{
        const hash = $241580f2bf06323c$require$createHash('sha1');
        hash.update($5HoLl$path.extname(absolutePath));
        hash.update('-');
        const rs = handlers.createReadStream(absolutePath);
        rs.on('error', reject);
        rs.on('data', (buf)=>hash.update(buf));
        rs.on('end', ()=>{
            const sha = hash.digest('hex');
            resolve(sha);
        });
    });
const $241580f2bf06323c$var$sourceMatches = (source, requestPath, allowSegments)=>{
    const keys = [];
    const slashed = $b9d5e409bcff052b$exports(source);
    const resolvedPath = $5HoLl$path.posix.resolve(requestPath);
    let results = null;
    if (allowSegments) {
        const normalized = slashed.replace('*', '(.*)');
        const expression = $54a0799a67b580fa$exports(normalized, keys);
        results = expression.exec(resolvedPath);
        if (!results) // clear keys so that they are not used
        // later with empty results. this may
        // happen if minimatch returns true
        keys.length = 0;
    }
    if (results || $f604f6614d00fa7b$exports(resolvedPath, slashed)) return {
        keys: keys,
        results: results
    };
    return null;
};
const $241580f2bf06323c$var$toTarget = (source, destination, previousPath)=>{
    const matches = $241580f2bf06323c$var$sourceMatches(source, previousPath, true);
    if (!matches) return null;
    const { keys: keys, results: results } = matches;
    const props = {};
    const { protocol: protocol } = $5HoLl$url.parse(destination);
    const normalizedDest = protocol ? destination : $b9d5e409bcff052b$exports(destination);
    const toPath = $54a0799a67b580fa$exports.compile(normalizedDest);
    for(let index = 0; index < keys.length; index++){
        const { name: name } = keys[index];
        props[name] = results[index + 1];
    }
    return toPath(props);
};
const $241580f2bf06323c$var$applyRewrites = (requestPath, rewrites = [], repetitive)=>{
    // We need to copy the array, since we're going to modify it.
    const rewritesCopy = rewrites.slice();
    // If the method was called again, the path was already rewritten
    // so we need to make sure to return it.
    const fallback = repetitive ? requestPath : null;
    if (rewritesCopy.length === 0) return fallback;
    for(let index = 0; index < rewritesCopy.length; index++){
        const { source: source, destination: destination } = rewrites[index];
        const target = $241580f2bf06323c$var$toTarget(source, destination, requestPath);
        if (target) {
            // Remove rules that were already applied
            rewritesCopy.splice(index, 1);
            // Check if there are remaining ones to be applied
            return $241580f2bf06323c$var$applyRewrites($b9d5e409bcff052b$exports(target), rewritesCopy, true);
        }
    }
    return fallback;
};
const $241580f2bf06323c$var$ensureSlashStart = (target)=>target.startsWith('/') ? target : `/${target}`;
const $241580f2bf06323c$var$shouldRedirect = (decodedPath, { redirects: redirects = [], trailingSlash: trailingSlash }, cleanUrl)=>{
    const slashing = typeof trailingSlash === 'boolean';
    const defaultType = 301;
    const matchHTML = /(\.html|\/index)$/g;
    if (redirects.length === 0 && !slashing && !cleanUrl) return null;
    // By stripping the HTML parts from the decoded
    // path *before* handling the trailing slash, we make
    // sure that only *one* redirect occurs if both
    // config options are used.
    if (cleanUrl && matchHTML.test(decodedPath)) {
        decodedPath = decodedPath.replace(matchHTML, '');
        if (decodedPath.indexOf('//') > -1) decodedPath = decodedPath.replace(/\/+/g, '/');
        return {
            target: $241580f2bf06323c$var$ensureSlashStart(decodedPath),
            statusCode: defaultType
        };
    }
    if (slashing) {
        const { ext: ext, name: name } = $5HoLl$path.parse(decodedPath);
        const isTrailed = decodedPath.endsWith('/');
        const isDotfile = name.startsWith('.');
        let target = null;
        if (!trailingSlash && isTrailed) target = decodedPath.slice(0, -1);
        else if (trailingSlash && !isTrailed && !ext && !isDotfile) target = `${decodedPath}/`;
        if (decodedPath.indexOf('//') > -1) target = decodedPath.replace(/\/+/g, '/');
        if (target) return {
            target: $241580f2bf06323c$var$ensureSlashStart(target),
            statusCode: defaultType
        };
    }
    // This is currently the fastest way to
    // iterate over an array
    for(let index = 0; index < redirects.length; index++){
        const { source: source, destination: destination, type: type } = redirects[index];
        const target = $241580f2bf06323c$var$toTarget(source, destination, decodedPath);
        if (target) return {
            target: target,
            statusCode: type || defaultType
        };
    }
    return null;
};
const $241580f2bf06323c$var$appendHeaders = (target, source)=>{
    for(let index = 0; index < source.length; index++){
        const { key: key, value: value } = source[index];
        target[key] = value;
    }
};
const $241580f2bf06323c$var$getHeaders = async (handlers, config, current, absolutePath, stats)=>{
    const { headers: customHeaders = [], etag: etag = false } = config;
    const related = {};
    const { base: base } = $5HoLl$path.parse(absolutePath);
    const relativePath = $5HoLl$path.relative(current, absolutePath);
    if (customHeaders.length > 0) // By iterating over all headers and never stopping, developers
    // can specify multiple header sources in the config that
    // might match a single path.
    for(let index = 0; index < customHeaders.length; index++){
        const { source: source, headers: headers } = customHeaders[index];
        if ($241580f2bf06323c$var$sourceMatches(source, $b9d5e409bcff052b$exports(relativePath))) $241580f2bf06323c$var$appendHeaders(related, headers);
    }
    let defaultHeaders = {};
    if (stats) {
        defaultHeaders = {
            'Content-Length': stats.size,
            // Default to "inline", which always tries to render in the browser,
            // if that's not working, it will save the file. But to be clear: This
            // only happens if it cannot find a appropiate value.
            'Content-Disposition': $83574916d2b3b6f7$exports(base, {
                type: 'inline'
            }),
            'Accept-Ranges': 'bytes'
        };
        if (etag) {
            let [mtime, sha] = $241580f2bf06323c$var$etags.get(absolutePath) || [];
            if (Number(mtime) !== Number(stats.mtime)) {
                sha = await $241580f2bf06323c$var$calculateSha(handlers, absolutePath);
                $241580f2bf06323c$var$etags.set(absolutePath, [
                    stats.mtime,
                    sha
                ]);
            }
            defaultHeaders['ETag'] = `"${sha}"`;
        } else defaultHeaders['Last-Modified'] = stats.mtime.toUTCString();
        const contentType = $ae9112e8c23157b4$export$8019223850b8bf78(base);
        if (contentType) defaultHeaders['Content-Type'] = contentType;
    }
    const headers = Object.assign(defaultHeaders, related);
    for(const key in headers)if (headers.hasOwnProperty(key) && headers[key] === null) delete headers[key];
    return headers;
};
const $241580f2bf06323c$var$applicable = (decodedPath, configEntry)=>{
    if (typeof configEntry === 'boolean') return configEntry;
    if (Array.isArray(configEntry)) {
        for(let index = 0; index < configEntry.length; index++){
            const source = configEntry[index];
            if ($241580f2bf06323c$var$sourceMatches(source, decodedPath)) return true;
        }
        return false;
    }
    return true;
};
const $241580f2bf06323c$var$getPossiblePaths = (relativePath, extension)=>[
        $5HoLl$path.join(relativePath, `index${extension}`),
        relativePath.endsWith('/') ? relativePath.replace(/\/$/g, extension) : relativePath + extension
    ].filter((item)=>$5HoLl$path.basename(item) !== extension);
const $241580f2bf06323c$var$findRelated = async (current, relativePath, rewrittenPath, originalStat)=>{
    const possible = rewrittenPath ? [
        rewrittenPath
    ] : $241580f2bf06323c$var$getPossiblePaths(relativePath, '.html');
    let stats = null;
    for(let index = 0; index < possible.length; index++){
        const related = possible[index];
        const absolutePath = $5HoLl$path.join(current, related);
        try {
            stats = await originalStat(absolutePath);
        } catch (err) {
            if (err.code !== 'ENOENT' && err.code !== 'ENOTDIR') throw err;
        }
        if (stats) return {
            stats: stats,
            absolutePath: absolutePath
        };
    }
    return null;
};
const $241580f2bf06323c$var$canBeListed = (excluded, file)=>{
    const slashed = $b9d5e409bcff052b$exports(file);
    let whether = true;
    for(let mark = 0; mark < excluded.length; mark++){
        const source = excluded[mark];
        if ($241580f2bf06323c$var$sourceMatches(source, slashed)) {
            whether = false;
            break;
        }
    }
    return whether;
};
const $241580f2bf06323c$var$renderDirectory = async (current, acceptsJSON, handlers, methods, config, paths)=>{
    const { directoryListing: directoryListing, trailingSlash: trailingSlash, unlisted: unlisted = [], renderSingle: renderSingle } = config;
    const slashSuffix = typeof trailingSlash === 'boolean' ? trailingSlash ? '/' : '' : '/';
    const { relativePath: relativePath, absolutePath: absolutePath } = paths;
    const excluded = [
        '.DS_Store',
        '.git',
        ...unlisted
    ];
    if (!$241580f2bf06323c$var$applicable(relativePath, directoryListing) && !renderSingle) return {};
    let files = await handlers.readdir(absolutePath);
    const canRenderSingle = renderSingle && files.length === 1;
    for(let index = 0; index < files.length; index++){
        const file = files[index];
        const filePath = $5HoLl$path.resolve(absolutePath, file);
        const details = $5HoLl$path.parse(filePath);
        // It's important to indicate that the `stat` call was
        // spawned by the directory listing, as Now is
        // simulating those calls and needs to special-case this.
        let stats = null;
        if (methods.lstat) stats = await handlers.lstat(filePath, true);
        else stats = await handlers.lstat(filePath);
        details.relative = $5HoLl$path.join(relativePath, details.base);
        if (stats.isDirectory()) {
            details.base += slashSuffix;
            details.relative += slashSuffix;
            details.type = 'folder';
        } else {
            if (canRenderSingle) return {
                singleFile: true,
                absolutePath: filePath,
                stats: stats
            };
            details.ext = details.ext.split('.')[1] || 'txt';
            details.type = 'file';
            details.size = $937890531de33a86$exports(stats.size, {
                unitSeparator: ' ',
                decimalPlaces: 0
            });
        }
        details.title = details.base;
        if ($241580f2bf06323c$var$canBeListed(excluded, file)) files[index] = details;
        else delete files[index];
    }
    const toRoot = $5HoLl$path.relative(current, absolutePath);
    const directory = $5HoLl$path.join($5HoLl$path.basename(current), toRoot, slashSuffix);
    const pathParts = directory.split($5HoLl$path.sep).filter(Boolean);
    // Sort to list directories first, then sort alphabetically
    files = files.sort((a, b)=>{
        const aIsDir = a.type === 'directory';
        const bIsDir = b.type === 'directory';
        /* istanbul ignore next */ if (aIsDir && !bIsDir) return -1;
        if (bIsDir && !aIsDir || a.base > b.base) return 1;
        /* istanbul ignore next */ if (a.base < b.base) return -1;
        /* istanbul ignore next */ return 0;
    }).filter(Boolean);
    // Add parent directory to the head of the sorted files array
    if (toRoot.length > 0) {
        const directoryPath = [
            ...pathParts
        ].slice(1);
        const relative = $5HoLl$path.join('/', ...directoryPath, '..', slashSuffix);
        files.unshift({
            type: 'directory',
            base: '..',
            relative: relative,
            title: relative,
            ext: ''
        });
    }
    const subPaths = [];
    for(let index = 0; index < pathParts.length; index++){
        const parents = [];
        const isLast = index === pathParts.length - 1;
        let before = 0;
        while(before <= index){
            parents.push(pathParts[before]);
            before++;
        }
        parents.shift();
        subPaths.push({
            name: pathParts[index] + (isLast ? slashSuffix : '/'),
            url: index === 0 ? '' : parents.join('/') + slashSuffix
        });
    }
    const spec = {
        files: files,
        directory: directory,
        paths: subPaths
    };
    const output = acceptsJSON ? JSON.stringify(spec) : $b3c5ffc4260c3ac4$exports(spec);
    return {
        directory: output
    };
};
const $241580f2bf06323c$var$sendError = async (absolutePath, response, acceptsJSON, current, handlers, config, spec)=>{
    const { err: original, message: message, code: code, statusCode: statusCode } = spec;
    /* istanbul ignore next */ if (original && process.env.NODE_ENV !== 'test') console.error(original);
    response.statusCode = statusCode;
    if (acceptsJSON) {
        response.setHeader('Content-Type', 'application/json; charset=utf-8');
        response.end(JSON.stringify({
            error: {
                code: code,
                message: message
            }
        }));
        return;
    }
    let stats = null;
    const errorPage = $5HoLl$path.join(current, `${statusCode}.html`);
    try {
        stats = await handlers.lstat(errorPage);
    } catch (err) {
        if (err.code !== 'ENOENT') console.error(err);
    }
    if (stats) {
        let stream = null;
        try {
            stream = await handlers.createReadStream(errorPage);
            const headers = await $241580f2bf06323c$var$getHeaders(handlers, config, current, errorPage, stats);
            response.writeHead(statusCode, headers);
            stream.pipe(response);
            return;
        } catch (err) {
            console.error(err);
        }
    }
    const headers = await $241580f2bf06323c$var$getHeaders(handlers, config, current, absolutePath, null);
    headers['Content-Type'] = 'text/html; charset=utf-8';
    response.writeHead(statusCode, headers);
    response.end($507a981cc7bc0220$exports({
        statusCode: statusCode,
        message: message
    }));
};
const $241580f2bf06323c$var$internalError = async (...args)=>{
    const lastIndex = args.length - 1;
    const err = args[lastIndex];
    args[lastIndex] = {
        statusCode: 500,
        code: 'internal_server_error',
        message: 'A server error has occurred',
        err: err
    };
    return $241580f2bf06323c$var$sendError(...args);
};
const $241580f2bf06323c$var$getHandlers = (methods)=>Object.assign({
        lstat: $241580f2bf06323c$require$promisify($241580f2bf06323c$require$lstat),
        realpath: $241580f2bf06323c$require$promisify($241580f2bf06323c$require$realpath),
        createReadStream: $241580f2bf06323c$require$createReadStream,
        readdir: $241580f2bf06323c$require$promisify($241580f2bf06323c$require$readdir),
        sendError: $241580f2bf06323c$var$sendError
    }, methods);
$241580f2bf06323c$exports = async (request, response, config = {}, methods = {})=>{
    const cwd = process.cwd();
    const current = config.public ? $5HoLl$path.resolve(cwd, config.public) : cwd;
    const handlers = $241580f2bf06323c$var$getHandlers(methods);
    let relativePath = null;
    let acceptsJSON = null;
    if (request.headers.accept) acceptsJSON = request.headers.accept.includes('application/json');
    try {
        relativePath = decodeURIComponent($5HoLl$url.parse(request.url).pathname);
    } catch (err) {
        return $241580f2bf06323c$var$sendError('/', response, acceptsJSON, current, handlers, config, {
            statusCode: 400,
            code: 'bad_request',
            message: 'Bad Request'
        });
    }
    let absolutePath = $5HoLl$path.join(current, relativePath);
    // Prevent path traversal vulnerabilities. We could do this
    // by ourselves, but using the package covers all the edge cases.
    if (!$b1c2bf238d5b4007$exports(absolutePath, current)) return $241580f2bf06323c$var$sendError(absolutePath, response, acceptsJSON, current, handlers, config, {
        statusCode: 400,
        code: 'bad_request',
        message: 'Bad Request'
    });
    const cleanUrl = $241580f2bf06323c$var$applicable(relativePath, config.cleanUrls);
    const redirect = $241580f2bf06323c$var$shouldRedirect(relativePath, config, cleanUrl);
    if (redirect) {
        response.writeHead(redirect.statusCode, {
            Location: encodeURI(redirect.target)
        });
        response.end();
        return;
    }
    let stats = null;
    // It's extremely important that we're doing multiple stat calls. This one
    // right here could technically be removed, but then the program
    // would be slower. Because for directories, we always want to see if a related file
    // exists and then (after that), fetch the directory itself if no
    // related file was found. However (for files, of which most have extensions), we should
    // always stat right away.
    //
    // When simulating a file system without directory indexes, calculating whether a
    // directory exists requires loading all the file paths and then checking if
    // one of them includes the path of the directory. As that's a very
    // performance-expensive thing to do, we need to ensure it's not happening if not really necessary.
    if ($5HoLl$path.extname(relativePath) !== '') try {
        stats = await handlers.lstat(absolutePath);
    } catch (err) {
        if (err.code !== 'ENOENT' && err.code !== 'ENOTDIR') return $241580f2bf06323c$var$internalError(absolutePath, response, acceptsJSON, current, handlers, config, err);
    }
    const rewrittenPath = $241580f2bf06323c$var$applyRewrites(relativePath, config.rewrites);
    if (!stats && (cleanUrl || rewrittenPath)) try {
        const related = await $241580f2bf06323c$var$findRelated(current, relativePath, rewrittenPath, handlers.lstat);
        if (related) ({ stats: stats, absolutePath: absolutePath } = related);
    } catch (err) {
        if (err.code !== 'ENOENT' && err.code !== 'ENOTDIR') return $241580f2bf06323c$var$internalError(absolutePath, response, acceptsJSON, current, handlers, config, err);
    }
    if (!stats) try {
        stats = await handlers.lstat(absolutePath);
    } catch (err) {
        if (err.code !== 'ENOENT' && err.code !== 'ENOTDIR') return $241580f2bf06323c$var$internalError(absolutePath, response, acceptsJSON, current, handlers, config, err);
    }
    if (stats && stats.isDirectory()) {
        let directory = null;
        let singleFile = null;
        try {
            const related = await $241580f2bf06323c$var$renderDirectory(current, acceptsJSON, handlers, methods, config, {
                relativePath: relativePath,
                absolutePath: absolutePath
            });
            if (related.singleFile) ({ stats: stats, absolutePath: absolutePath, singleFile: singleFile } = related);
            else ({ directory: directory } = related);
        } catch (err) {
            if (err.code !== 'ENOENT') return $241580f2bf06323c$var$internalError(absolutePath, response, acceptsJSON, current, handlers, config, err);
        }
        if (directory) {
            const contentType = acceptsJSON ? 'application/json; charset=utf-8' : 'text/html; charset=utf-8';
            response.statusCode = 200;
            response.setHeader('Content-Type', contentType);
            response.end(directory);
            return;
        }
        if (!singleFile) // The directory listing is disabled, so we want to
        // render a 404 error.
        stats = null;
    }
    const isSymLink = stats && stats.isSymbolicLink();
    // There are two scenarios in which we want to reply with
    // a 404 error: Either the path does not exist, or it is a
    // symlink while the `symlinks` option is disabled (which it is by default).
    if (!stats || !config.symlinks && isSymLink) // allow for custom 404 handling
    return handlers.sendError(absolutePath, response, acceptsJSON, current, handlers, config, {
        statusCode: 404,
        code: 'not_found',
        message: 'The requested path could not be found'
    });
    // If we figured out that the target is a symlink, we need to
    // resolve the symlink and run a new `stat` call just for the
    // target of that symlink.
    if (isSymLink) {
        try {
            absolutePath = await handlers.realpath(absolutePath);
        } catch (err) {
            if (err.code !== 'ENOENT') throw err;
            // The requested symlink is invalid
            return handlers.sendError(absolutePath, response, acceptsJSON, current, handlers, config, {
                statusCode: 404,
                code: 'not_found',
                message: 'The requested path could not be found'
            });
        }
        stats = await handlers.lstat(absolutePath);
    }
    const streamOpts = {};
    // TODO ? if-range
    if (request.headers.range && stats.size) {
        const range = $17e698b7a50b563b$exports(stats.size, request.headers.range);
        if (typeof range === 'object' && range.type === 'bytes') {
            const { start: start, end: end } = range[0];
            streamOpts.start = start;
            streamOpts.end = end;
            response.statusCode = 206;
        } else {
            response.statusCode = 416;
            response.setHeader('Content-Range', `bytes */${stats.size}`);
        }
    }
    // TODO ? multiple ranges
    let stream = null;
    try {
        stream = await handlers.createReadStream(absolutePath, streamOpts);
    } catch (err) {
        return $241580f2bf06323c$var$internalError(absolutePath, response, acceptsJSON, current, handlers, config, err);
    }
    const headers = await $241580f2bf06323c$var$getHeaders(handlers, config, current, absolutePath, stats);
    // eslint-disable-next-line no-undefined
    if (streamOpts.start !== undefined && streamOpts.end !== undefined) {
        headers['Content-Range'] = `bytes ${streamOpts.start}-${streamOpts.end}/${stats.size}`;
        headers['Content-Length'] = streamOpts.end - streamOpts.start + 1;
    }
    // We need to check for `headers.ETag` being truthy first, otherwise it will
    // match `undefined` being equal to `undefined`, which is true.
    //
    // Checking for `undefined` and `null` is also important, because `Range` can be `0`.
    //
    // eslint-disable-next-line no-eq-null
    if (request.headers.range == null && headers.ETag && headers.ETag === request.headers['if-none-match']) {
        response.statusCode = 304;
        response.end();
        return;
    }
    response.writeHead(response.statusCode || 200, headers);
    stream.pipe(response);
};


var $90287d9321ae1295$exports = {};
"use strict";
var $90287d9321ae1295$var$__createBinding = $90287d9321ae1295$exports && $90287d9321ae1295$exports.__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 $90287d9321ae1295$var$__exportStar = $90287d9321ae1295$exports && $90287d9321ae1295$exports.__exportStar || function(m, exports1) {
    for(var p in m)if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports1, p)) $90287d9321ae1295$var$__createBinding(exports1, m, p);
};
Object.defineProperty($90287d9321ae1295$exports, "__esModule", {
    value: true
});
$90287d9321ae1295$exports.createProxyMiddleware = void 0;
var $fcd32f42a0865940$exports = {};
"use strict";
Object.defineProperty($fcd32f42a0865940$exports, "__esModule", {
    value: true
});
$fcd32f42a0865940$exports.HttpProxyMiddleware = void 0;
var $85787215e2990b4a$exports = {};
/*!
 * Caron dimonio, con occhi di bragia
 * loro accennando, tutte le raccoglie;
 * batte col remo qualunque s’adagia 
 *
 * Charon the demon, with the eyes of glede,
 * Beckoning to them, collects them all together,
 * Beats with his oar whoever lags behind
 *          
 *          Dante - The Divine Comedy (Canto III)
 */ 
$85787215e2990b4a$exports = (parcelRequire("bBrnb"));


var $c58f975e1f9925ea$exports = {};
"use strict";
Object.defineProperty($c58f975e1f9925ea$exports, "__esModule", {
    value: true
});
$c58f975e1f9925ea$exports.createConfig = void 0;
var $0d476e83cc8b7613$exports = {};
'use strict';
$0d476e83cc8b7613$exports = (value)=>{
    if (Object.prototype.toString.call(value) !== '[object Object]') return false;
    const prototype = Object.getPrototypeOf(value);
    return prototype === null || prototype === Object.prototype;
};



var $9612062e44afe3ec$exports = {};
"use strict";
Object.defineProperty($9612062e44afe3ec$exports, "__esModule", {
    value: true
});
$9612062e44afe3ec$exports.ERRORS = void 0;
var $9612062e44afe3ec$var$ERRORS;
(function(ERRORS) {
    ERRORS["ERR_CONFIG_FACTORY_TARGET_MISSING"] = "[HPM] Missing \"target\" option. Example: {target: \"http://www.example.org\"}";
    ERRORS["ERR_CONTEXT_MATCHER_GENERIC"] = "[HPM] Invalid context. Expecting something like: \"/api\" or [\"/api\", \"/ajax\"]";
    ERRORS["ERR_CONTEXT_MATCHER_INVALID_ARRAY"] = "[HPM] Invalid context. Expecting something like: [\"/api\", \"/ajax\"] or [\"/api/**\", \"!**.html\"]";
    ERRORS["ERR_PATH_REWRITER_CONFIG"] = "[HPM] Invalid pathRewrite config. Expecting object with pathRewrite config or a rewrite function";
})($9612062e44afe3ec$var$ERRORS = $9612062e44afe3ec$exports.ERRORS || ($9612062e44afe3ec$exports.ERRORS = {}));


var $577f917740ff4e1f$exports = {};
"use strict";
/* eslint-disable prefer-rest-params */ Object.defineProperty($577f917740ff4e1f$exports, "__esModule", {
    value: true
});
$577f917740ff4e1f$exports.getArrow = $577f917740ff4e1f$exports.getInstance = void 0;

let $577f917740ff4e1f$var$loggerInstance;
const $577f917740ff4e1f$var$defaultProvider = {
    // tslint:disable: no-console
    log: console.log,
    debug: console.log,
    info: console.info,
    warn: console.warn,
    error: console.error
};
// log level 'weight'
var $577f917740ff4e1f$var$LEVELS;
(function(LEVELS) {
    LEVELS[LEVELS["debug"] = 10] = "debug";
    LEVELS[LEVELS["info"] = 20] = "info";
    LEVELS[LEVELS["warn"] = 30] = "warn";
    LEVELS[LEVELS["error"] = 50] = "error";
    LEVELS[LEVELS["silent"] = 80] = "silent";
})($577f917740ff4e1f$var$LEVELS || ($577f917740ff4e1f$var$LEVELS = {}));
function $577f917740ff4e1f$var$getInstance() {
    if (!$577f917740ff4e1f$var$loggerInstance) $577f917740ff4e1f$var$loggerInstance = new $577f917740ff4e1f$var$Logger();
    return $577f917740ff4e1f$var$loggerInstance;
}
$577f917740ff4e1f$exports.getInstance = $577f917740ff4e1f$var$getInstance;
class $577f917740ff4e1f$var$Logger {
    constructor(){
        this.setLevel('info');
        this.setProvider(()=>$577f917740ff4e1f$var$defaultProvider);
    }
    // log will log messages, regardless of logLevels
    log() {
        this.provider.log(this._interpolate.apply(null, arguments));
    }
    debug() {
        if (this._showLevel('debug')) this.provider.debug(this._interpolate.apply(null, arguments));
    }
    info() {
        if (this._showLevel('info')) this.provider.info(this._interpolate.apply(null, arguments));
    }
    warn() {
        if (this._showLevel('warn')) this.provider.warn(this._interpolate.apply(null, arguments));
    }
    error() {
        if (this._showLevel('error')) this.provider.error(this._interpolate.apply(null, arguments));
    }
    setLevel(v) {
        if (this.isValidLevel(v)) this.logLevel = v;
    }
    setProvider(fn) {
        if (fn && this.isValidProvider(fn)) this.provider = fn($577f917740ff4e1f$var$defaultProvider);
    }
    isValidProvider(fnProvider) {
        const result = true;
        if (fnProvider && typeof fnProvider !== 'function') throw new Error('[HPM] Log provider config error. Expecting a function.');
        return result;
    }
    isValidLevel(levelName) {
        const validLevels = Object.keys($577f917740ff4e1f$var$LEVELS);
        const isValid = validLevels.includes(levelName);
        if (!isValid) throw new Error('[HPM] Log level error. Invalid logLevel.');
        return isValid;
    }
    /**
     * Decide to log or not to log, based on the log levels 'weight'
     * @param  {String}  showLevel [debug, info, warn, error, silent]
     * @return {Boolean}
     */ _showLevel(showLevel) {
        let result = false;
        const currentLogLevel = $577f917740ff4e1f$var$LEVELS[this.logLevel];
        if (currentLogLevel && currentLogLevel <= $577f917740ff4e1f$var$LEVELS[showLevel]) result = true;
        return result;
    }
    // make sure logged messages and its data are return interpolated
    // make it possible for additional log data, such date/time or custom prefix.
    _interpolate(format, ...args) {
        const result = $5HoLl$util.format(format, ...args);
        return result;
    }
}
/**
 * -> normal proxy
 * => router
 * ~> pathRewrite
 * ≈> router + pathRewrite
 *
 * @param  {String} originalPath
 * @param  {String} newPath
 * @param  {String} originalTarget
 * @param  {String} newTarget
 * @return {String}
 */ function $577f917740ff4e1f$var$getArrow(originalPath, newPath, originalTarget, newTarget) {
    const arrow = [
        '>'
    ];
    const isNewTarget = originalTarget !== newTarget; // router
    const isNewPath = originalPath !== newPath; // pathRewrite
    if (isNewPath && !isNewTarget) arrow.unshift('~');
    else if (!isNewPath && isNewTarget) arrow.unshift('=');
    else if (isNewPath && isNewTarget) arrow.unshift("\u2248");
    else arrow.unshift('-');
    return arrow.join('');
}
$577f917740ff4e1f$exports.getArrow = $577f917740ff4e1f$var$getArrow;


const $c58f975e1f9925ea$var$logger = (0, $577f917740ff4e1f$exports.getInstance)();
function $c58f975e1f9925ea$var$createConfig(context, opts) {
    // structure of config object to be returned
    const config = {
        context: undefined,
        options: {}
    };
    // app.use('/api', proxy({target:'http://localhost:9000'}));
    if ($c58f975e1f9925ea$var$isContextless(context, opts)) {
        config.context = '/';
        config.options = Object.assign(config.options, context);
    // app.use('/api', proxy('http://localhost:9000'));
    // app.use(proxy('http://localhost:9000/api'));
    } else if ($c58f975e1f9925ea$var$isStringShortHand(context)) {
        const oUrl = $5HoLl$url.parse(context);
        const target = [
            oUrl.protocol,
            '//',
            oUrl.host
        ].join('');
        config.context = oUrl.pathname || '/';
        config.options = Object.assign(config.options, {
            target: target
        }, opts);
        if (oUrl.protocol === 'ws:' || oUrl.protocol === 'wss:') config.options.ws = true;
    // app.use('/api', proxy({target:'http://localhost:9000'}));
    } else {
        config.context = context;
        config.options = Object.assign(config.options, opts);
    }
    $c58f975e1f9925ea$var$configureLogger(config.options);
    if (!config.options.target && !config.options.router) throw new Error($9612062e44afe3ec$exports.ERRORS.ERR_CONFIG_FACTORY_TARGET_MISSING);
    return config;
}
$c58f975e1f9925ea$exports.createConfig = $c58f975e1f9925ea$var$createConfig;
/**
 * Checks if a String only target/config is provided.
 * This can be just the host or with the optional path.
 *
 * @example
 *      app.use('/api', proxy('http://localhost:9000'));
 *      app.use(proxy('http://localhost:9000/api'));
 *
 * @param  {String}  context [description]
 * @return {Boolean}         [description]
 */ function $c58f975e1f9925ea$var$isStringShortHand(context) {
    if (typeof context === 'string') return !!$5HoLl$url.parse(context).host;
}
/**
 * Checks if a Object only config is provided, without a context.
 * In this case the all paths will be proxied.
 *
 * @example
 *     app.use('/api', proxy({target:'http://localhost:9000'}));
 *
 * @param  {Object}  context [description]
 * @param  {*}       opts    [description]
 * @return {Boolean}         [description]
 */ function $c58f975e1f9925ea$var$isContextless(context, opts) {
    return $0d476e83cc8b7613$exports(context) && (opts == null || Object.keys(opts).length === 0);
}
function $c58f975e1f9925ea$var$configureLogger(options) {
    if (options.logLevel) $c58f975e1f9925ea$var$logger.setLevel(options.logLevel);
    if (options.logProvider) $c58f975e1f9925ea$var$logger.setProvider(options.logProvider);
}


var $702a0121da4599f3$exports = {};
"use strict";
Object.defineProperty($702a0121da4599f3$exports, "__esModule", {
    value: true
});
$702a0121da4599f3$exports.match = void 0;
var $bae4864c67bc723e$exports = {};
/*!
 * is-glob <https://github.com/jonschlinkert/is-glob>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */ var $f0b75c621a7a4c72$exports = {};
/*!
 * is-extglob <https://github.com/jonschlinkert/is-extglob>
 *
 * Copyright (c) 2014-2016, Jon Schlinkert.
 * Licensed under the MIT License.
 */ $f0b75c621a7a4c72$exports = function isExtglob(str) {
    if (typeof str !== 'string' || str === '') return false;
    var match;
    while(match = /(\\).|([@?!+*]\(.*\))/g.exec(str)){
        if (match[2]) return true;
        str = str.slice(match.index + match[0].length);
    }
    return false;
};


var $bae4864c67bc723e$var$chars = {
    '{': '}',
    '(': ')',
    '[': ']'
};
var $bae4864c67bc723e$var$strictCheck = function(str) {
    if (str[0] === '!') return true;
    var index = 0;
    var pipeIndex = -2;
    var closeSquareIndex = -2;
    var closeCurlyIndex = -2;
    var closeParenIndex = -2;
    var backSlashIndex = -2;
    while(index < str.length){
        if (str[index] === '*') return true;
        if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) return true;
        if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') {
            if (closeSquareIndex < index) closeSquareIndex = str.indexOf(']', index);
            if (closeSquareIndex > index) {
                if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) return true;
                backSlashIndex = str.indexOf('\\', index);
                if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) return true;
            }
        }
        if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') {
            closeCurlyIndex = str.indexOf('}', index);
            if (closeCurlyIndex > index) {
                backSlashIndex = str.indexOf('\\', index);
                if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) return true;
            }
        }
        if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') {
            closeParenIndex = str.indexOf(')', index);
            if (closeParenIndex > index) {
                backSlashIndex = str.indexOf('\\', index);
                if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) return true;
            }
        }
        if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') {
            if (pipeIndex < index) pipeIndex = str.indexOf('|', index);
            if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') {
                closeParenIndex = str.indexOf(')', pipeIndex);
                if (closeParenIndex > pipeIndex) {
                    backSlashIndex = str.indexOf('\\', pipeIndex);
                    if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) return true;
                }
            }
        }
        if (str[index] === '\\') {
            var open = str[index + 1];
            index += 2;
            var close = $bae4864c67bc723e$var$chars[open];
            if (close) {
                var n = str.indexOf(close, index);
                if (n !== -1) index = n + 1;
            }
            if (str[index] === '!') return true;
        } else index++;
    }
    return false;
};
var $bae4864c67bc723e$var$relaxedCheck = function(str) {
    if (str[0] === '!') return true;
    var index = 0;
    while(index < str.length){
        if (/[*?{}()[\]]/.test(str[index])) return true;
        if (str[index] === '\\') {
            var open = str[index + 1];
            index += 2;
            var close = $bae4864c67bc723e$var$chars[open];
            if (close) {
                var n = str.indexOf(close, index);
                if (n !== -1) index = n + 1;
            }
            if (str[index] === '!') return true;
        } else index++;
    }
    return false;
};
$bae4864c67bc723e$exports = function isGlob(str, options) {
    if (typeof str !== 'string' || str === '') return false;
    if ($f0b75c621a7a4c72$exports(str)) return true;
    var check = $bae4864c67bc723e$var$strictCheck;
    // optionally relax check
    if (options && options.strict === false) check = $bae4864c67bc723e$var$relaxedCheck;
    return check(str);
};


var $605cfa7e6c743ea1$exports = {};
'use strict';

var $4f69f0179c3ef725$exports = {};
'use strict';
var $0f9bad08b5a83e9e$exports = {};
'use strict';
var $1e96f42e23c7aa39$export$a287f47fed4544b8;
/**
 * Find a node of the given type
 */ var $1e96f42e23c7aa39$export$71aa6c912b956294;
/**
 * Find a node of the given type
 */ var $1e96f42e23c7aa39$export$fbadac39f36b1e16;
/**
 * Escape the given node with '\\' before node.value
 */ var $1e96f42e23c7aa39$export$92e39b1e2c1e6e56;
/**
 * Returns true if the given brace node should be enclosed in literal braces
 */ var $1e96f42e23c7aa39$export$ea0f721b77fd5acc;
/**
 * Returns true if a brace node is invalid.
 */ var $1e96f42e23c7aa39$export$25a78c310c11373f;
/**
 * Returns true if a node is an open or close node
 */ var $1e96f42e23c7aa39$export$582fc44003e67ec6;
/**
 * Reduce an array of text nodes.
 */ var $1e96f42e23c7aa39$export$533b26079ad0b4b;
/**
 * Flatten an array
 */ var $1e96f42e23c7aa39$export$bffa455ba8c619a6;
'use strict';
$1e96f42e23c7aa39$export$a287f47fed4544b8 = (num)=>{
    if (typeof num === 'number') return Number.isInteger(num);
    if (typeof num === 'string' && num.trim() !== '') return Number.isInteger(Number(num));
    return false;
};
$1e96f42e23c7aa39$export$71aa6c912b956294 = (node, type)=>node.nodes.find((node)=>node.type === type);
$1e96f42e23c7aa39$export$fbadac39f36b1e16 = (min, max, step = 1, limit)=>{
    if (limit === false) return false;
    if (!$1e96f42e23c7aa39$export$a287f47fed4544b8(min) || !$1e96f42e23c7aa39$export$a287f47fed4544b8(max)) return false;
    return (Number(max) - Number(min)) / Number(step) >= limit;
};
$1e96f42e23c7aa39$export$92e39b1e2c1e6e56 = (block, n = 0, type)=>{
    const node = block.nodes[n];
    if (!node) return;
    if (type && node.type === type || node.type === 'open' || node.type === 'close') {
        if (node.escaped !== true) {
            node.value = '\\' + node.value;
            node.escaped = true;
        }
    }
};
$1e96f42e23c7aa39$export$ea0f721b77fd5acc = (node)=>{
    if (node.type !== 'brace') return false;
    if (node.commas >> 0 + node.ranges >> 0 === 0) {
        node.invalid = true;
        return true;
    }
    return false;
};
$1e96f42e23c7aa39$export$25a78c310c11373f = (block)=>{
    if (block.type !== 'brace') return false;
    if (block.invalid === true || block.dollar) return true;
    if (block.commas >> 0 + block.ranges >> 0 === 0) {
        block.invalid = true;
        return true;
    }
    if (block.open !== true || block.close !== true) {
        block.invalid = true;
        return true;
    }
    return false;
};
$1e96f42e23c7aa39$export$582fc44003e67ec6 = (node)=>{
    if (node.type === 'open' || node.type === 'close') return true;
    return node.open === true || node.close === true;
};
$1e96f42e23c7aa39$export$533b26079ad0b4b = (nodes)=>nodes.reduce((acc, node)=>{
        if (node.type === 'text') acc.push(node.value);
        if (node.type === 'range') node.type = 'text';
        return acc;
    }, []);
$1e96f42e23c7aa39$export$bffa455ba8c619a6 = (...args)=>{
    const result = [];
    const flat = (arr)=>{
        for(let i = 0; i < arr.length; i++){
            const ele = arr[i];
            if (Array.isArray(ele)) {
                flat(ele);
                continue;
            }
            if (ele !== undefined) result.push(ele);
        }
        return result;
    };
    flat(args);
    return result;
};


$0f9bad08b5a83e9e$exports = (ast, options = {})=>{
    const stringify = (node, parent = {})=>{
        const invalidBlock = options.escapeInvalid && $1e96f42e23c7aa39$export$25a78c310c11373f(parent);
        const invalidNode = node.invalid === true && options.escapeInvalid === true;
        let output = '';
        if (node.value) {
            if ((invalidBlock || invalidNode) && $1e96f42e23c7aa39$export$582fc44003e67ec6(node)) return '\\' + node.value;
            return node.value;
        }
        if (node.value) return node.value;
        if (node.nodes) for (const child of node.nodes)output += stringify(child);
        return output;
    };
    return stringify(ast);
};


var $4b296fe8f5b9c575$exports = {};
'use strict';
var $5df772a4f9d5192e$exports = {};
/*!
 * fill-range <https://github.com/jonschlinkert/fill-range>
 *
 * Copyright (c) 2014-present, Jon Schlinkert.
 * Licensed under the MIT License.
 */ 'use strict';

var $c46153f0d15b5a0f$exports = {};
/*!
 * to-regex-range <https://github.com/micromatch/to-regex-range>
 *
 * Copyright (c) 2015-present, Jon Schlinkert.
 * Released under the MIT License.
 */ 'use strict';
var $1da062e9b3f29103$exports = {};
/*!
 * is-number <https://github.com/jonschlinkert/is-number>
 *
 * Copyright (c) 2014-present, Jon Schlinkert.
 * Released under the MIT License.
 */ 'use strict';
$1da062e9b3f29103$exports = function(num) {
    if (typeof num === 'number') return num - num === 0;
    if (typeof num === 'string' && num.trim() !== '') return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
    return false;
};


const $c46153f0d15b5a0f$var$toRegexRange = (min, max, options)=>{
    if ($1da062e9b3f29103$exports(min) === false) throw new TypeError('toRegexRange: expected the first argument to be a number');
    if (max === void 0 || min === max) return String(min);
    if ($1da062e9b3f29103$exports(max) === false) throw new TypeError('toRegexRange: expected the second argument to be a number.');
    let opts = {
        relaxZeros: true,
        ...options
    };
    if (typeof opts.strictZeros === 'boolean') opts.relaxZeros = opts.strictZeros === false;
    let relax = String(opts.relaxZeros);
    let shorthand = String(opts.shorthand);
    let capture = String(opts.capture);
    let wrap = String(opts.wrap);
    let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
    if ($c46153f0d15b5a0f$var$toRegexRange.cache.hasOwnProperty(cacheKey)) return $c46153f0d15b5a0f$var$toRegexRange.cache[cacheKey].result;
    let a = Math.min(min, max);
    let b = Math.max(min, max);
    if (Math.abs(a - b) === 1) {
        let result = min + '|' + max;
        if (opts.capture) return `(${result})`;
        if (opts.wrap === false) return result;
        return `(?:${result})`;
    }
    let isPadded = $c46153f0d15b5a0f$var$hasPadding(min) || $c46153f0d15b5a0f$var$hasPadding(max);
    let state = {
        min: min,
        max: max,
        a: a,
        b: b
    };
    let positives = [];
    let negatives = [];
    if (isPadded) {
        state.isPadded = isPadded;
        state.maxLen = String(state.max).length;
    }
    if (a < 0) {
        let newMin = b < 0 ? Math.abs(b) : 1;
        negatives = $c46153f0d15b5a0f$var$splitToPatterns(newMin, Math.abs(a), state, opts);
        a = state.a = 0;
    }
    if (b >= 0) positives = $c46153f0d15b5a0f$var$splitToPatterns(a, b, state, opts);
    state.negatives = negatives;
    state.positives = positives;
    state.result = $c46153f0d15b5a0f$var$collatePatterns(negatives, positives, opts);
    if (opts.capture === true) state.result = `(${state.result})`;
    else if (opts.wrap !== false && positives.length + negatives.length > 1) state.result = `(?:${state.result})`;
    $c46153f0d15b5a0f$var$toRegexRange.cache[cacheKey] = state;
    return state.result;
};
function $c46153f0d15b5a0f$var$collatePatterns(neg, pos, options) {
    let onlyNegative = $c46153f0d15b5a0f$var$filterPatterns(neg, pos, '-', false, options) || [];
    let onlyPositive = $c46153f0d15b5a0f$var$filterPatterns(pos, neg, '', false, options) || [];
    let intersected = $c46153f0d15b5a0f$var$filterPatterns(neg, pos, '-?', true, options) || [];
    let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
    return subpatterns.join('|');
}
function $c46153f0d15b5a0f$var$splitToRanges(min, max) {
    let nines = 1;
    let zeros = 1;
    let stop = $c46153f0d15b5a0f$var$countNines(min, nines);
    let stops = new Set([
        max
    ]);
    while(min <= stop && stop <= max){
        stops.add(stop);
        nines += 1;
        stop = $c46153f0d15b5a0f$var$countNines(min, nines);
    }
    stop = $c46153f0d15b5a0f$var$countZeros(max + 1, zeros) - 1;
    while(min < stop && stop <= max){
        stops.add(stop);
        zeros += 1;
        stop = $c46153f0d15b5a0f$var$countZeros(max + 1, zeros) - 1;
    }
    stops = [
        ...stops
    ];
    stops.sort($c46153f0d15b5a0f$var$compare);
    return stops;
}
/**
 * Convert a range to a regex pattern
 * @param {Number} `start`
 * @param {Number} `stop`
 * @return {String}
 */ function $c46153f0d15b5a0f$var$rangeToPattern(start, stop, options) {
    if (start === stop) return {
        pattern: start,
        count: [],
        digits: 0
    };
    let zipped = $c46153f0d15b5a0f$var$zip(start, stop);
    let digits = zipped.length;
    let pattern = '';
    let count = 0;
    for(let i = 0; i < digits; i++){
        let [startDigit, stopDigit] = zipped[i];
        if (startDigit === stopDigit) pattern += startDigit;
        else if (startDigit !== '0' || stopDigit !== '9') pattern += $c46153f0d15b5a0f$var$toCharacterClass(startDigit, stopDigit, options);
        else count++;
    }
    if (count) pattern += options.shorthand === true ? '\\d' : '[0-9]';
    return {
        pattern: pattern,
        count: [
            count
        ],
        digits: digits
    };
}
function $c46153f0d15b5a0f$var$splitToPatterns(min, max, tok, options) {
    let ranges = $c46153f0d15b5a0f$var$splitToRanges(min, max);
    let tokens = [];
    let start = min;
    let prev;
    for(let i = 0; i < ranges.length; i++){
        let max = ranges[i];
        let obj = $c46153f0d15b5a0f$var$rangeToPattern(String(start), String(max), options);
        let zeros = '';
        if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
            if (prev.count.length > 1) prev.count.pop();
            prev.count.push(obj.count[0]);
            prev.string = prev.pattern + $c46153f0d15b5a0f$var$toQuantifier(prev.count);
            start = max + 1;
            continue;
        }
        if (tok.isPadded) zeros = $c46153f0d15b5a0f$var$padZeros(max, tok, options);
        obj.string = zeros + obj.pattern + $c46153f0d15b5a0f$var$toQuantifier(obj.count);
        tokens.push(obj);
        start = max + 1;
        prev = obj;
    }
    return tokens;
}
function $c46153f0d15b5a0f$var$filterPatterns(arr, comparison, prefix, intersection, options) {
    let result = [];
    for (let ele of arr){
        let { string: string } = ele;
        // only push if _both_ are negative...
        if (!intersection && !$c46153f0d15b5a0f$var$contains(comparison, 'string', string)) result.push(prefix + string);
        // or _both_ are positive
        if (intersection && $c46153f0d15b5a0f$var$contains(comparison, 'string', string)) result.push(prefix + string);
    }
    return result;
}
/**
 * Zip strings
 */ function $c46153f0d15b5a0f$var$zip(a, b) {
    let arr = [];
    for(let i = 0; i < a.length; i++)arr.push([
        a[i],
        b[i]
    ]);
    return arr;
}
function $c46153f0d15b5a0f$var$compare(a, b) {
    return a > b ? 1 : b > a ? -1 : 0;
}
function $c46153f0d15b5a0f$var$contains(arr, key, val) {
    return arr.some((ele)=>ele[key] === val);
}
function $c46153f0d15b5a0f$var$countNines(min, len) {
    return Number(String(min).slice(0, -len) + '9'.repeat(len));
}
function $c46153f0d15b5a0f$var$countZeros(integer, zeros) {
    return integer - integer % Math.pow(10, zeros);
}
function $c46153f0d15b5a0f$var$toQuantifier(digits) {
    let [start = 0, stop = ''] = digits;
    if (stop || start > 1) return `{${start + (stop ? ',' + stop : '')}}`;
    return '';
}
function $c46153f0d15b5a0f$var$toCharacterClass(a, b, options) {
    return `[${a}${b - a === 1 ? '' : '-'}${b}]`;
}
function $c46153f0d15b5a0f$var$hasPadding(str) {
    return /^-?(0+)\d/.test(str);
}
function $c46153f0d15b5a0f$var$padZeros(value, tok, options) {
    if (!tok.isPadded) return value;
    let diff = Math.abs(tok.maxLen - String(value).length);
    let relax = options.relaxZeros !== false;
    switch(diff){
        case 0:
            return '';
        case 1:
            return relax ? '0?' : '0';
        case 2:
            return relax ? '0{0,2}' : '00';
        default:
            return relax ? `0{0,${diff}}` : `0{${diff}}`;
    }
}
/**
 * Cache
 */ $c46153f0d15b5a0f$var$toRegexRange.cache = {};
$c46153f0d15b5a0f$var$toRegexRange.clearCache = ()=>$c46153f0d15b5a0f$var$toRegexRange.cache = {};
/**
 * Expose `toRegexRange`
 */ $c46153f0d15b5a0f$exports = $c46153f0d15b5a0f$var$toRegexRange;


const $5df772a4f9d5192e$var$isObject = (val)=>val !== null && typeof val === 'object' && !Array.isArray(val);
const $5df772a4f9d5192e$var$transform = (toNumber)=>{
    return (value)=>toNumber === true ? Number(value) : String(value);
};
const $5df772a4f9d5192e$var$isValidValue = (value)=>{
    return typeof value === 'number' || typeof value === 'string' && value !== '';
};
const $5df772a4f9d5192e$var$isNumber = (num)=>Number.isInteger(+num);
const $5df772a4f9d5192e$var$zeros = (input)=>{
    let value = `${input}`;
    let index = -1;
    if (value[0] === '-') value = value.slice(1);
    if (value === '0') return false;
    while(value[++index] === '0');
    return index > 0;
};
const $5df772a4f9d5192e$var$stringify = (start, end, options)=>{
    if (typeof start === 'string' || typeof end === 'string') return true;
    return options.stringify === true;
};
const $5df772a4f9d5192e$var$pad = (input, maxLength, toNumber)=>{
    if (maxLength > 0) {
        let dash = input[0] === '-' ? '-' : '';
        if (dash) input = input.slice(1);
        input = dash + input.padStart(dash ? maxLength - 1 : maxLength, '0');
    }
    if (toNumber === false) return String(input);
    return input;
};
const $5df772a4f9d5192e$var$toMaxLen = (input, maxLength)=>{
    let negative = input[0] === '-' ? '-' : '';
    if (negative) {
        input = input.slice(1);
        maxLength--;
    }
    while(input.length < maxLength)input = '0' + input;
    return negative ? '-' + input : input;
};
const $5df772a4f9d5192e$var$toSequence = (parts, options, maxLen)=>{
    parts.negatives.sort((a, b)=>a < b ? -1 : a > b ? 1 : 0);
    parts.positives.sort((a, b)=>a < b ? -1 : a > b ? 1 : 0);
    let prefix = options.capture ? '' : '?:';
    let positives = '';
    let negatives = '';
    let result;
    if (parts.positives.length) positives = parts.positives.map((v)=>$5df772a4f9d5192e$var$toMaxLen(String(v), maxLen)).join('|');
    if (parts.negatives.length) negatives = `-(${prefix}${parts.negatives.map((v)=>$5df772a4f9d5192e$var$toMaxLen(String(v), maxLen)).join('|')})`;
    if (positives && negatives) result = `${positives}|${negatives}`;
    else result = positives || negatives;
    if (options.wrap) return `(${prefix}${result})`;
    return result;
};
const $5df772a4f9d5192e$var$toRange = (a, b, isNumbers, options)=>{
    if (isNumbers) return $c46153f0d15b5a0f$exports(a, b, {
        wrap: false,
        ...options
    });
    let start = String.fromCharCode(a);
    if (a === b) return start;
    let stop = String.fromCharCode(b);
    return `[${start}-${stop}]`;
};
const $5df772a4f9d5192e$var$toRegex = (start, end, options)=>{
    if (Array.isArray(start)) {
        let wrap = options.wrap === true;
        let prefix = options.capture ? '' : '?:';
        return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
    }
    return $c46153f0d15b5a0f$exports(start, end, options);
};
const $5df772a4f9d5192e$var$rangeError = (...args)=>{
    return new RangeError('Invalid range arguments: ' + $5HoLl$util.inspect(...args));
};
const $5df772a4f9d5192e$var$invalidRange = (start, end, options)=>{
    if (options.strictRanges === true) throw $5df772a4f9d5192e$var$rangeError([
        start,
        end
    ]);
    return [];
};
const $5df772a4f9d5192e$var$invalidStep = (step, options)=>{
    if (options.strictRanges === true) throw new TypeError(`Expected step "${step}" to be a number`);
    return [];
};
const $5df772a4f9d5192e$var$fillNumbers = (start, end, step = 1, options = {})=>{
    let a = Number(start);
    let b = Number(end);
    if (!Number.isInteger(a) || !Number.isInteger(b)) {
        if (options.strictRanges === true) throw $5df772a4f9d5192e$var$rangeError([
            start,
            end
        ]);
        return [];
    }
    // fix negative zero
    if (a === 0) a = 0;
    if (b === 0) b = 0;
    let descending = a > b;
    let startString = String(start);
    let endString = String(end);
    let stepString = String(step);
    step = Math.max(Math.abs(step), 1);
    let padded = $5df772a4f9d5192e$var$zeros(startString) || $5df772a4f9d5192e$var$zeros(endString) || $5df772a4f9d5192e$var$zeros(stepString);
    let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
    let toNumber = padded === false && $5df772a4f9d5192e$var$stringify(start, end, options) === false;
    let format = options.transform || $5df772a4f9d5192e$var$transform(toNumber);
    if (options.toRegex && step === 1) return $5df772a4f9d5192e$var$toRange($5df772a4f9d5192e$var$toMaxLen(start, maxLen), $5df772a4f9d5192e$var$toMaxLen(end, maxLen), true, options);
    let parts = {
        negatives: [],
        positives: []
    };
    let push = (num)=>parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));
    let range = [];
    let index = 0;
    while(descending ? a >= b : a <= b){
        if (options.toRegex === true && step > 1) push(a);
        else range.push($5df772a4f9d5192e$var$pad(format(a, index), maxLen, toNumber));
        a = descending ? a - step : a + step;
        index++;
    }
    if (options.toRegex === true) return step > 1 ? $5df772a4f9d5192e$var$toSequence(parts, options, maxLen) : $5df772a4f9d5192e$var$toRegex(range, null, {
        wrap: false,
        ...options
    });
    return range;
};
const $5df772a4f9d5192e$var$fillLetters = (start, end, step = 1, options = {})=>{
    if (!$5df772a4f9d5192e$var$isNumber(start) && start.length > 1 || !$5df772a4f9d5192e$var$isNumber(end) && end.length > 1) return $5df772a4f9d5192e$var$invalidRange(start, end, options);
    let format = options.transform || ((val)=>String.fromCharCode(val));
    let a = `${start}`.charCodeAt(0);
    let b = `${end}`.charCodeAt(0);
    let descending = a > b;
    let min = Math.min(a, b);
    let max = Math.max(a, b);
    if (options.toRegex && step === 1) return $5df772a4f9d5192e$var$toRange(min, max, false, options);
    let range = [];
    let index = 0;
    while(descending ? a >= b : a <= b){
        range.push(format(a, index));
        a = descending ? a - step : a + step;
        index++;
    }
    if (options.toRegex === true) return $5df772a4f9d5192e$var$toRegex(range, null, {
        wrap: false,
        options: options
    });
    return range;
};
const $5df772a4f9d5192e$var$fill = (start, end, step, options = {})=>{
    if (end == null && $5df772a4f9d5192e$var$isValidValue(start)) return [
        start
    ];
    if (!$5df772a4f9d5192e$var$isValidValue(start) || !$5df772a4f9d5192e$var$isValidValue(end)) return $5df772a4f9d5192e$var$invalidRange(start, end, options);
    if (typeof step === 'function') return $5df772a4f9d5192e$var$fill(start, end, 1, {
        transform: step
    });
    if ($5df772a4f9d5192e$var$isObject(step)) return $5df772a4f9d5192e$var$fill(start, end, 0, step);
    let opts = {
        ...options
    };
    if (opts.capture === true) opts.wrap = true;
    step = step || opts.step || 1;
    if (!$5df772a4f9d5192e$var$isNumber(step)) {
        if (step != null && !$5df772a4f9d5192e$var$isObject(step)) return $5df772a4f9d5192e$var$invalidStep(step, opts);
        return $5df772a4f9d5192e$var$fill(start, end, 1, step);
    }
    if ($5df772a4f9d5192e$var$isNumber(start) && $5df772a4f9d5192e$var$isNumber(end)) return $5df772a4f9d5192e$var$fillNumbers(start, end, step, opts);
    return $5df772a4f9d5192e$var$fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
};
$5df772a4f9d5192e$exports = $5df772a4f9d5192e$var$fill;



const $4b296fe8f5b9c575$var$compile = (ast, options = {})=>{
    const walk = (node, parent = {})=>{
        const invalidBlock = $1e96f42e23c7aa39$export$25a78c310c11373f(parent);
        const invalidNode = node.invalid === true && options.escapeInvalid === true;
        const invalid = invalidBlock === true || invalidNode === true;
        const prefix = options.escapeInvalid === true ? '\\' : '';
        let output = '';
        if (node.isOpen === true) return prefix + node.value;
        if (node.isClose === true) {
            console.log('node.isClose', prefix, node.value);
            return prefix + node.value;
        }
        if (node.type === 'open') return invalid ? prefix + node.value : '(';
        if (node.type === 'close') return invalid ? prefix + node.value : ')';
        if (node.type === 'comma') return node.prev.type === 'comma' ? '' : invalid ? node.value : '|';
        if (node.value) return node.value;
        if (node.nodes && node.ranges > 0) {
            const args = $1e96f42e23c7aa39$export$533b26079ad0b4b(node.nodes);
            const range = $5df772a4f9d5192e$exports(...args, {
                ...options,
                wrap: false,
                toRegex: true,
                strictZeros: true
            });
            if (range.length !== 0) return args.length > 1 && range.length > 1 ? `(${range})` : range;
        }
        if (node.nodes) for (const child of node.nodes)output += walk(child, node);
        return output;
    };
    return walk(ast);
};
$4b296fe8f5b9c575$exports = $4b296fe8f5b9c575$var$compile;


var $5e9d4744ca8b0fa8$exports = {};
'use strict';



const $5e9d4744ca8b0fa8$var$append = (queue = '', stash = '', enclose = false)=>{
    const result = [];
    queue = [].concat(queue);
    stash = [].concat(stash);
    if (!stash.length) return queue;
    if (!queue.length) return enclose ? $1e96f42e23c7aa39$export$bffa455ba8c619a6(stash).map((ele)=>`{${ele}}`) : stash;
    for (const item of queue){
        if (Array.isArray(item)) for (const value of item)result.push($5e9d4744ca8b0fa8$var$append(value, stash, enclose));
        else for (let ele of stash){
            if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
            result.push(Array.isArray(ele) ? $5e9d4744ca8b0fa8$var$append(item, ele, enclose) : item + ele);
        }
    }
    return $1e96f42e23c7aa39$export$bffa455ba8c619a6(result);
};
const $5e9d4744ca8b0fa8$var$expand = (ast, options = {})=>{
    const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit;
    const walk = (node, parent = {})=>{
        node.queue = [];
        let p = parent;
        let q = parent.queue;
        while(p.type !== 'brace' && p.type !== 'root' && p.parent){
            p = p.parent;
            q = p.queue;
        }
        if (node.invalid || node.dollar) {
            q.push($5e9d4744ca8b0fa8$var$append(q.pop(), $0f9bad08b5a83e9e$exports(node, options)));
            return;
        }
        if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {
            q.push($5e9d4744ca8b0fa8$var$append(q.pop(), [
                '{}'
            ]));
            return;
        }
        if (node.nodes && node.ranges > 0) {
            const args = $1e96f42e23c7aa39$export$533b26079ad0b4b(node.nodes);
            if ($1e96f42e23c7aa39$export$fbadac39f36b1e16(...args, options.step, rangeLimit)) throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
            let range = $5df772a4f9d5192e$exports(...args, options);
            if (range.length === 0) range = $0f9bad08b5a83e9e$exports(node, options);
            q.push($5e9d4744ca8b0fa8$var$append(q.pop(), range));
            node.nodes = [];
            return;
        }
        const enclose = $1e96f42e23c7aa39$export$ea0f721b77fd5acc(node);
        let queue = node.queue;
        let block = node;
        while(block.type !== 'brace' && block.type !== 'root' && block.parent){
            block = block.parent;
            queue = block.queue;
        }
        for(let i = 0; i < node.nodes.length; i++){
            const child = node.nodes[i];
            if (child.type === 'comma' && node.type === 'brace') {
                if (i === 1) queue.push('');
                queue.push('');
                continue;
            }
            if (child.type === 'close') {
                q.push($5e9d4744ca8b0fa8$var$append(q.pop(), queue, enclose));
                continue;
            }
            if (child.value && child.type !== 'open') {
                queue.push($5e9d4744ca8b0fa8$var$append(queue.pop(), child.value));
                continue;
            }
            if (child.nodes) walk(child, node);
        }
        return queue;
    };
    return $1e96f42e23c7aa39$export$bffa455ba8c619a6(walk(ast));
};
$5e9d4744ca8b0fa8$exports = $5e9d4744ca8b0fa8$var$expand;


var $6ff6b0e96222d15c$exports = {};
'use strict';

var $c5eec4e680fdbf94$exports = {};
'use strict';
$c5eec4e680fdbf94$exports = {
    MAX_LENGTH: 10000,
    // Digits
    CHAR_0: '0',
    /* 0 */ CHAR_9: '9',
    /* 9 */ // Alphabet chars.
    CHAR_UPPERCASE_A: 'A',
    /* A */ CHAR_LOWERCASE_A: 'a',
    /* a */ CHAR_UPPERCASE_Z: 'Z',
    /* Z */ CHAR_LOWERCASE_Z: 'z',
    /* z */ CHAR_LEFT_PARENTHESES: '(',
    /* ( */ CHAR_RIGHT_PARENTHESES: ')',
    /* ) */ CHAR_ASTERISK: '*',
    /* * */ // Non-alphabetic chars.
    CHAR_AMPERSAND: '&',
    /* & */ CHAR_AT: '@',
    /* @ */ CHAR_BACKSLASH: '\\',
    /* \ */ CHAR_BACKTICK: '`',
    /* ` */ CHAR_CARRIAGE_RETURN: '\r',
    /* \r */ CHAR_CIRCUMFLEX_ACCENT: '^',
    /* ^ */ CHAR_COLON: ':',
    /* : */ CHAR_COMMA: ',',
    /* , */ CHAR_DOLLAR: '$',
    /* . */ CHAR_DOT: '.',
    /* . */ CHAR_DOUBLE_QUOTE: '"',
    /* " */ CHAR_EQUAL: '=',
    /* = */ CHAR_EXCLAMATION_MARK: '!',
    /* ! */ CHAR_FORM_FEED: '\f',
    /* \f */ CHAR_FORWARD_SLASH: '/',
    /* / */ CHAR_HASH: '#',
    /* # */ CHAR_HYPHEN_MINUS: '-',
    /* - */ CHAR_LEFT_ANGLE_BRACKET: '<',
    /* < */ CHAR_LEFT_CURLY_BRACE: '{',
    /* { */ CHAR_LEFT_SQUARE_BRACKET: '[',
    /* [ */ CHAR_LINE_FEED: '\n',
    /* \n */ CHAR_NO_BREAK_SPACE: '\u00A0',
    /* \u00A0 */ CHAR_PERCENT: '%',
    /* % */ CHAR_PLUS: '+',
    /* + */ CHAR_QUESTION_MARK: '?',
    /* ? */ CHAR_RIGHT_ANGLE_BRACKET: '>',
    /* > */ CHAR_RIGHT_CURLY_BRACE: '}',
    /* } */ CHAR_RIGHT_SQUARE_BRACKET: ']',
    /* ] */ CHAR_SEMICOLON: ';',
    /* ; */ CHAR_SINGLE_QUOTE: '\'',
    /* ' */ CHAR_SPACE: ' ',
    /*   */ CHAR_TAB: '\t',
    /* \t */ CHAR_UNDERSCORE: '_',
    /* _ */ CHAR_VERTICAL_LINE: '|',
    /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ 
};


var $6ff6b0e96222d15c$require$MAX_LENGTH = $c5eec4e680fdbf94$exports.MAX_LENGTH;
var $6ff6b0e96222d15c$require$CHAR_BACKSLASH = $c5eec4e680fdbf94$exports.CHAR_BACKSLASH;
var $6ff6b0e96222d15c$require$CHAR_BACKTICK = $c5eec4e680fdbf94$exports.CHAR_BACKTICK;
var $6ff6b0e96222d15c$require$CHAR_COMMA = $c5eec4e680fdbf94$exports.CHAR_COMMA;
var $6ff6b0e96222d15c$require$CHAR_DOT = $c5eec4e680fdbf94$exports.CHAR_DOT;
var $6ff6b0e96222d15c$require$CHAR_LEFT_PARENTHESES = $c5eec4e680fdbf94$exports.CHAR_LEFT_PARENTHESES;
var $6ff6b0e96222d15c$require$CHAR_RIGHT_PARENTHESES = $c5eec4e680fdbf94$exports.CHAR_RIGHT_PARENTHESES;
var $6ff6b0e96222d15c$require$CHAR_LEFT_CURLY_BRACE = $c5eec4e680fdbf94$exports.CHAR_LEFT_CURLY_BRACE;
var $6ff6b0e96222d15c$require$CHAR_RIGHT_CURLY_BRACE = $c5eec4e680fdbf94$exports.CHAR_RIGHT_CURLY_BRACE;
var $6ff6b0e96222d15c$require$CHAR_LEFT_SQUARE_BRACKET = $c5eec4e680fdbf94$exports.CHAR_LEFT_SQUARE_BRACKET;
var $6ff6b0e96222d15c$require$CHAR_RIGHT_SQUARE_BRACKET = $c5eec4e680fdbf94$exports.CHAR_RIGHT_SQUARE_BRACKET;
var $6ff6b0e96222d15c$require$CHAR_DOUBLE_QUOTE = $c5eec4e680fdbf94$exports.CHAR_DOUBLE_QUOTE;
var $6ff6b0e96222d15c$require$CHAR_SINGLE_QUOTE = $c5eec4e680fdbf94$exports.CHAR_SINGLE_QUOTE;
var $6ff6b0e96222d15c$require$CHAR_NO_BREAK_SPACE = $c5eec4e680fdbf94$exports.CHAR_NO_BREAK_SPACE;
var $6ff6b0e96222d15c$require$CHAR_ZERO_WIDTH_NOBREAK_SPACE = $c5eec4e680fdbf94$exports.CHAR_ZERO_WIDTH_NOBREAK_SPACE;
/**
 * parse
 */ const $6ff6b0e96222d15c$var$parse = (input, options = {})=>{
    if (typeof input !== 'string') throw new TypeError('Expected a string');
    const opts = options || {};
    const max = typeof opts.maxLength === 'number' ? Math.min($6ff6b0e96222d15c$require$MAX_LENGTH, opts.maxLength) : $6ff6b0e96222d15c$require$MAX_LENGTH;
    if (input.length > max) throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
    const ast = {
        type: 'root',
        input: input,
        nodes: []
    };
    const stack = [
        ast
    ];
    let block = ast;
    let prev = ast;
    let brackets = 0;
    const length = input.length;
    let index = 0;
    let depth = 0;
    let value;
    /**
   * Helpers
   */ const advance = ()=>input[index++];
    const push = (node)=>{
        if (node.type === 'text' && prev.type === 'dot') prev.type = 'text';
        if (prev && prev.type === 'text' && node.type === 'text') {
            prev.value += node.value;
            return;
        }
        block.nodes.push(node);
        node.parent = block;
        node.prev = prev;
        prev = node;
        return node;
    };
    push({
        type: 'bos'
    });
    while(index < length){
        block = stack[stack.length - 1];
        value = advance();
        /**
     * Invalid chars
     */ if (value === $6ff6b0e96222d15c$require$CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === $6ff6b0e96222d15c$require$CHAR_NO_BREAK_SPACE) continue;
        /**
     * Escaped chars
     */ if (value === $6ff6b0e96222d15c$require$CHAR_BACKSLASH) {
            push({
                type: 'text',
                value: (options.keepEscaping ? value : '') + advance()
            });
            continue;
        }
        /**
     * Right square bracket (literal): ']'
     */ if (value === $6ff6b0e96222d15c$require$CHAR_RIGHT_SQUARE_BRACKET) {
            push({
                type: 'text',
                value: '\\' + value
            });
            continue;
        }
        /**
     * Left square bracket: '['
     */ if (value === $6ff6b0e96222d15c$require$CHAR_LEFT_SQUARE_BRACKET) {
            brackets++;
            let next;
            while(index < length && (next = advance())){
                value += next;
                if (next === $6ff6b0e96222d15c$require$CHAR_LEFT_SQUARE_BRACKET) {
                    brackets++;
                    continue;
                }
                if (next === $6ff6b0e96222d15c$require$CHAR_BACKSLASH) {
                    value += advance();
                    continue;
                }
                if (next === $6ff6b0e96222d15c$require$CHAR_RIGHT_SQUARE_BRACKET) {
                    brackets--;
                    if (brackets === 0) break;
                }
            }
            push({
                type: 'text',
                value: value
            });
            continue;
        }
        /**
     * Parentheses
     */ if (value === $6ff6b0e96222d15c$require$CHAR_LEFT_PARENTHESES) {
            block = push({
                type: 'paren',
                nodes: []
            });
            stack.push(block);
            push({
                type: 'text',
                value: value
            });
            continue;
        }
        if (value === $6ff6b0e96222d15c$require$CHAR_RIGHT_PARENTHESES) {
            if (block.type !== 'paren') {
                push({
                    type: 'text',
                    value: value
                });
                continue;
            }
            block = stack.pop();
            push({
                type: 'text',
                value: value
            });
            block = stack[stack.length - 1];
            continue;
        }
        /**
     * Quotes: '|"|`
     */ if (value === $6ff6b0e96222d15c$require$CHAR_DOUBLE_QUOTE || value === $6ff6b0e96222d15c$require$CHAR_SINGLE_QUOTE || value === $6ff6b0e96222d15c$require$CHAR_BACKTICK) {
            const open = value;
            let next;
            if (options.keepQuotes !== true) value = '';
            while(index < length && (next = advance())){
                if (next === $6ff6b0e96222d15c$require$CHAR_BACKSLASH) {
                    value += next + advance();
                    continue;
                }
                if (next === open) {
                    if (options.keepQuotes === true) value += next;
                    break;
                }
                value += next;
            }
            push({
                type: 'text',
                value: value
            });
            continue;
        }
        /**
     * Left curly brace: '{'
     */ if (value === $6ff6b0e96222d15c$require$CHAR_LEFT_CURLY_BRACE) {
            depth++;
            const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
            const brace = {
                type: 'brace',
                open: true,
                close: false,
                dollar: dollar,
                depth: depth,
                commas: 0,
                ranges: 0,
                nodes: []
            };
            block = push(brace);
            stack.push(block);
            push({
                type: 'open',
                value: value
            });
            continue;
        }
        /**
     * Right curly brace: '}'
     */ if (value === $6ff6b0e96222d15c$require$CHAR_RIGHT_CURLY_BRACE) {
            if (block.type !== 'brace') {
                push({
                    type: 'text',
                    value: value
                });
                continue;
            }
            const type = 'close';
            block = stack.pop();
            block.close = true;
            push({
                type: type,
                value: value
            });
            depth--;
            block = stack[stack.length - 1];
            continue;
        }
        /**
     * Comma: ','
     */ if (value === $6ff6b0e96222d15c$require$CHAR_COMMA && depth > 0) {
            if (block.ranges > 0) {
                block.ranges = 0;
                const open = block.nodes.shift();
                block.nodes = [
                    open,
                    {
                        type: 'text',
                        value: $0f9bad08b5a83e9e$exports(block)
                    }
                ];
            }
            push({
                type: 'comma',
                value: value
            });
            block.commas++;
            continue;
        }
        /**
     * Dot: '.'
     */ if (value === $6ff6b0e96222d15c$require$CHAR_DOT && depth > 0 && block.commas === 0) {
            const siblings = block.nodes;
            if (depth === 0 || siblings.length === 0) {
                push({
                    type: 'text',
                    value: value
                });
                continue;
            }
            if (prev.type === 'dot') {
                block.range = [];
                prev.value += value;
                prev.type = 'range';
                if (block.nodes.length !== 3 && block.nodes.length !== 5) {
                    block.invalid = true;
                    block.ranges = 0;
                    prev.type = 'text';
                    continue;
                }
                block.ranges++;
                block.args = [];
                continue;
            }
            if (prev.type === 'range') {
                siblings.pop();
                const before = siblings[siblings.length - 1];
                before.value += prev.value + value;
                prev = before;
                block.ranges--;
                continue;
            }
            push({
                type: 'dot',
                value: value
            });
            continue;
        }
        /**
     * Text
     */ push({
            type: 'text',
            value: value
        });
    }
    // Mark imbalanced braces and brackets as invalid
    do {
        block = stack.pop();
        if (block.type !== 'root') {
            block.nodes.forEach((node)=>{
                if (!node.nodes) {
                    if (node.type === 'open') node.isOpen = true;
                    if (node.type === 'close') node.isClose = true;
                    if (!node.nodes) node.type = 'text';
                    node.invalid = true;
                }
            });
            // get the location of the block on parent.nodes (block's siblings)
            const parent = stack[stack.length - 1];
            const index = parent.nodes.indexOf(block);
            // replace the (invalid) block with it's nodes
            parent.nodes.splice(index, 1, ...block.nodes);
        }
    }while (stack.length > 0);
    push({
        type: 'eos'
    });
    return ast;
};
$6ff6b0e96222d15c$exports = $6ff6b0e96222d15c$var$parse;


/**
 * Expand the given pattern or create a regex-compatible string.
 *
 * ```js
 * const braces = require('braces');
 * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
 * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
 * ```
 * @param {String} `str`
 * @param {Object} `options`
 * @return {String}
 * @api public
 */ const $4f69f0179c3ef725$var$braces = (input, options = {})=>{
    let output = [];
    if (Array.isArray(input)) for (const pattern of input){
        const result = $4f69f0179c3ef725$var$braces.create(pattern, options);
        if (Array.isArray(result)) output.push(...result);
        else output.push(result);
    }
    else output = [].concat($4f69f0179c3ef725$var$braces.create(input, options));
    if (options && options.expand === true && options.nodupes === true) output = [
        ...new Set(output)
    ];
    return output;
};
/**
 * Parse the given `str` with the given `options`.
 *
 * ```js
 * // braces.parse(pattern, [, options]);
 * const ast = braces.parse('a/{b,c}/d');
 * console.log(ast);
 * ```
 * @param {String} pattern Brace pattern to parse
 * @param {Object} options
 * @return {Object} Returns an AST
 * @api public
 */ $4f69f0179c3ef725$var$braces.parse = (input, options = {})=>$6ff6b0e96222d15c$exports(input, options);
/**
 * Creates a braces string from an AST, or an AST node.
 *
 * ```js
 * const braces = require('braces');
 * let ast = braces.parse('foo/{a,b}/bar');
 * console.log(stringify(ast.nodes[2])); //=> '{a,b}'
 * ```
 * @param {String} `input` Brace pattern or AST.
 * @param {Object} `options`
 * @return {Array} Returns an array of expanded values.
 * @api public
 */ $4f69f0179c3ef725$var$braces.stringify = (input, options = {})=>{
    if (typeof input === 'string') return $0f9bad08b5a83e9e$exports($4f69f0179c3ef725$var$braces.parse(input, options), options);
    return $0f9bad08b5a83e9e$exports(input, options);
};
/**
 * Compiles a brace pattern into a regex-compatible, optimized string.
 * This method is called by the main [braces](#braces) function by default.
 *
 * ```js
 * const braces = require('braces');
 * console.log(braces.compile('a/{b,c}/d'));
 * //=> ['a/(b|c)/d']
 * ```
 * @param {String} `input` Brace pattern or AST.
 * @param {Object} `options`
 * @return {Array} Returns an array of expanded values.
 * @api public
 */ $4f69f0179c3ef725$var$braces.compile = (input, options = {})=>{
    if (typeof input === 'string') input = $4f69f0179c3ef725$var$braces.parse(input, options);
    return $4b296fe8f5b9c575$exports(input, options);
};
/**
 * Expands a brace pattern into an array. This method is called by the
 * main [braces](#braces) function when `options.expand` is true. Before
 * using this method it's recommended that you read the [performance notes](#performance))
 * and advantages of using [.compile](#compile) instead.
 *
 * ```js
 * const braces = require('braces');
 * console.log(braces.expand('a/{b,c}/d'));
 * //=> ['a/b/d', 'a/c/d'];
 * ```
 * @param {String} `pattern` Brace pattern
 * @param {Object} `options`
 * @return {Array} Returns an array of expanded values.
 * @api public
 */ $4f69f0179c3ef725$var$braces.expand = (input, options = {})=>{
    if (typeof input === 'string') input = $4f69f0179c3ef725$var$braces.parse(input, options);
    let result = $5e9d4744ca8b0fa8$exports(input, options);
    // filter out empty strings if specified
    if (options.noempty === true) result = result.filter(Boolean);
    // filter out duplicates if specified
    if (options.nodupes === true) result = [
        ...new Set(result)
    ];
    return result;
};
/**
 * Processes a brace pattern and returns either an expanded array
 * (if `options.expand` is true), a highly optimized regex-compatible string.
 * This method is called by the main [braces](#braces) function.
 *
 * ```js
 * const braces = require('braces');
 * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
 * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
 * ```
 * @param {String} `pattern` Brace pattern
 * @param {Object} `options`
 * @return {Array} Returns an array of expanded values.
 * @api public
 */ $4f69f0179c3ef725$var$braces.create = (input, options = {})=>{
    if (input === '' || input.length < 3) return [
        input
    ];
    return options.expand !== true ? $4f69f0179c3ef725$var$braces.compile(input, options) : $4f69f0179c3ef725$var$braces.expand(input, options);
};
/**
 * Expose "braces"
 */ $4f69f0179c3ef725$exports = $4f69f0179c3ef725$var$braces;


var $f68239ef451d9757$exports = {};
'use strict';

$f68239ef451d9757$exports = (parcelRequire("k4tru"));



var $9eMkZ = parcelRequire("9eMkZ");
const $605cfa7e6c743ea1$var$isEmptyString = (v)=>v === '' || v === './';
const $605cfa7e6c743ea1$var$hasBraces = (v)=>{
    const index = v.indexOf('{');
    return index > -1 && v.indexOf('}', index) > -1;
};
/**
 * Returns an array of strings that match one or more glob patterns.
 *
 * ```js
 * const mm = require('micromatch');
 * // mm(list, patterns[, options]);
 *
 * console.log(mm(['a.js', 'a.txt'], ['*.js']));
 * //=> [ 'a.js' ]
 * ```
 * @param {String|Array<string>} `list` List of strings to match.
 * @param {String|Array<string>} `patterns` One or more glob patterns to use for matching.
 * @param {Object} `options` See available [options](#options)
 * @return {Array} Returns an array of matches
 * @summary false
 * @api public
 */ const $605cfa7e6c743ea1$var$micromatch = (list, patterns, options)=>{
    patterns = [].concat(patterns);
    list = [].concat(list);
    let omit = new Set();
    let keep = new Set();
    let items = new Set();
    let negatives = 0;
    let onResult = (state)=>{
        items.add(state.output);
        if (options && options.onResult) options.onResult(state);
    };
    for(let i = 0; i < patterns.length; i++){
        let isMatch = $f68239ef451d9757$exports(String(patterns[i]), {
            ...options,
            onResult: onResult
        }, true);
        let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
        if (negated) negatives++;
        for (let item of list){
            let matched = isMatch(item, true);
            let match = negated ? !matched.isMatch : matched.isMatch;
            if (!match) continue;
            if (negated) omit.add(matched.output);
            else {
                omit.delete(matched.output);
                keep.add(matched.output);
            }
        }
    }
    let result = negatives === patterns.length ? [
        ...items
    ] : [
        ...keep
    ];
    let matches = result.filter((item)=>!omit.has(item));
    if (options && matches.length === 0) {
        if (options.failglob === true) throw new Error(`No matches found for "${patterns.join(', ')}"`);
        if (options.nonull === true || options.nullglob === true) return options.unescape ? patterns.map((p)=>p.replace(/\\/g, '')) : patterns;
    }
    return matches;
};
/**
 * Backwards compatibility
 */ $605cfa7e6c743ea1$var$micromatch.match = $605cfa7e6c743ea1$var$micromatch;
/**
 * Returns a matcher function from the given glob `pattern` and `options`.
 * The returned function takes a string to match as its only argument and returns
 * true if the string is a match.
 *
 * ```js
 * const mm = require('micromatch');
 * // mm.matcher(pattern[, options]);
 *
 * const isMatch = mm.matcher('*.!(*a)');
 * console.log(isMatch('a.a')); //=> false
 * console.log(isMatch('a.b')); //=> true
 * ```
 * @param {String} `pattern` Glob pattern
 * @param {Object} `options`
 * @return {Function} Returns a matcher function.
 * @api public
 */ $605cfa7e6c743ea1$var$micromatch.matcher = (pattern, options)=>$f68239ef451d9757$exports(pattern, options);
/**
 * Returns true if **any** of the given glob `patterns` match the specified `string`.
 *
 * ```js
 * const mm = require('micromatch');
 * // mm.isMatch(string, patterns[, options]);
 *
 * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true
 * console.log(mm.isMatch('a.a', 'b.*')); //=> false
 * ```
 * @param {String} `str` The string to test.
 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
 * @param {Object} `[options]` See available [options](#options).
 * @return {Boolean} Returns true if any patterns match `str`
 * @api public
 */ $605cfa7e6c743ea1$var$micromatch.isMatch = (str, patterns, options)=>$f68239ef451d9757$exports(patterns, options)(str);
/**
 * Backwards compatibility
 */ $605cfa7e6c743ea1$var$micromatch.any = $605cfa7e6c743ea1$var$micromatch.isMatch;
/**
 * Returns a list of strings that _**do not match any**_ of the given `patterns`.
 *
 * ```js
 * const mm = require('micromatch');
 * // mm.not(list, patterns[, options]);
 *
 * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));
 * //=> ['b.b', 'c.c']
 * ```
 * @param {Array} `list` Array of strings to match.
 * @param {String|Array} `patterns` One or more glob pattern to use for matching.
 * @param {Object} `options` See available [options](#options) for changing how matches are performed
 * @return {Array} Returns an array of strings that **do not match** the given patterns.
 * @api public
 */ $605cfa7e6c743ea1$var$micromatch.not = (list, patterns, options = {})=>{
    patterns = [].concat(patterns).map(String);
    let result = new Set();
    let items = [];
    let onResult = (state)=>{
        if (options.onResult) options.onResult(state);
        items.push(state.output);
    };
    let matches = new Set($605cfa7e6c743ea1$var$micromatch(list, patterns, {
        ...options,
        onResult: onResult
    }));
    for (let item of items)if (!matches.has(item)) result.add(item);
    return [
        ...result
    ];
};
/**
 * Returns true if the given `string` contains the given pattern. Similar
 * to [.isMatch](#isMatch) but the pattern can match any part of the string.
 *
 * ```js
 * var mm = require('micromatch');
 * // mm.contains(string, pattern[, options]);
 *
 * console.log(mm.contains('aa/bb/cc', '*b'));
 * //=> true
 * console.log(mm.contains('aa/bb/cc', '*d'));
 * //=> false
 * ```
 * @param {String} `str` The string to match.
 * @param {String|Array} `patterns` Glob pattern to use for matching.
 * @param {Object} `options` See available [options](#options) for changing how matches are performed
 * @return {Boolean} Returns true if any of the patterns matches any part of `str`.
 * @api public
 */ $605cfa7e6c743ea1$var$micromatch.contains = (str, pattern, options)=>{
    if (typeof str !== 'string') throw new TypeError(`Expected a string: "${$5HoLl$util.inspect(str)}"`);
    if (Array.isArray(pattern)) return pattern.some((p)=>$605cfa7e6c743ea1$var$micromatch.contains(str, p, options));
    if (typeof pattern === 'string') {
        if ($605cfa7e6c743ea1$var$isEmptyString(str) || $605cfa7e6c743ea1$var$isEmptyString(pattern)) return false;
        if (str.includes(pattern) || str.startsWith('./') && str.slice(2).includes(pattern)) return true;
    }
    return $605cfa7e6c743ea1$var$micromatch.isMatch(str, pattern, {
        ...options,
        contains: true
    });
};
/**
 * Filter the keys of the given object with the given `glob` pattern
 * and `options`. Does not attempt to match nested keys. If you need this feature,
 * use [glob-object][] instead.
 *
 * ```js
 * const mm = require('micromatch');
 * // mm.matchKeys(object, patterns[, options]);
 *
 * const obj = { aa: 'a', ab: 'b', ac: 'c' };
 * console.log(mm.matchKeys(obj, '*b'));
 * //=> { ab: 'b' }
 * ```
 * @param {Object} `object` The object with keys to filter.
 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
 * @param {Object} `options` See available [options](#options) for changing how matches are performed
 * @return {Object} Returns an object with only keys that match the given patterns.
 * @api public
 */ $605cfa7e6c743ea1$var$micromatch.matchKeys = (obj, patterns, options)=>{
    if (!$9eMkZ.isObject(obj)) throw new TypeError('Expected the first argument to be an object');
    let keys = $605cfa7e6c743ea1$var$micromatch(Object.keys(obj), patterns, options);
    let res = {};
    for (let key of keys)res[key] = obj[key];
    return res;
};
/**
 * Returns true if some of the strings in the given `list` match any of the given glob `patterns`.
 *
 * ```js
 * const mm = require('micromatch');
 * // mm.some(list, patterns[, options]);
 *
 * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
 * // true
 * console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));
 * // false
 * ```
 * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.
 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
 * @param {Object} `options` See available [options](#options) for changing how matches are performed
 * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list`
 * @api public
 */ $605cfa7e6c743ea1$var$micromatch.some = (list, patterns, options)=>{
    let items = [].concat(list);
    for (let pattern of [].concat(patterns)){
        let isMatch = $f68239ef451d9757$exports(String(pattern), options);
        if (items.some((item)=>isMatch(item))) return true;
    }
    return false;
};
/**
 * Returns true if every string in the given `list` matches
 * any of the given glob `patterns`.
 *
 * ```js
 * const mm = require('micromatch');
 * // mm.every(list, patterns[, options]);
 *
 * console.log(mm.every('foo.js', ['foo.js']));
 * // true
 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));
 * // true
 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
 * // false
 * console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));
 * // false
 * ```
 * @param {String|Array} `list` The string or array of strings to test.
 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
 * @param {Object} `options` See available [options](#options) for changing how matches are performed
 * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list`
 * @api public
 */ $605cfa7e6c743ea1$var$micromatch.every = (list, patterns, options)=>{
    let items = [].concat(list);
    for (let pattern of [].concat(patterns)){
        let isMatch = $f68239ef451d9757$exports(String(pattern), options);
        if (!items.every((item)=>isMatch(item))) return false;
    }
    return true;
};
/**
 * Returns true if **all** of the given `patterns` match
 * the specified string.
 *
 * ```js
 * const mm = require('micromatch');
 * // mm.all(string, patterns[, options]);
 *
 * console.log(mm.all('foo.js', ['foo.js']));
 * // true
 *
 * console.log(mm.all('foo.js', ['*.js', '!foo.js']));
 * // false
 *
 * console.log(mm.all('foo.js', ['*.js', 'foo.js']));
 * // true
 *
 * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));
 * // true
 * ```
 * @param {String|Array} `str` The string to test.
 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
 * @param {Object} `options` See available [options](#options) for changing how matches are performed
 * @return {Boolean} Returns true if any patterns match `str`
 * @api public
 */ $605cfa7e6c743ea1$var$micromatch.all = (str, patterns, options)=>{
    if (typeof str !== 'string') throw new TypeError(`Expected a string: "${$5HoLl$util.inspect(str)}"`);
    return [].concat(patterns).every((p)=>$f68239ef451d9757$exports(p, options)(str));
};
/**
 * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.
 *
 * ```js
 * const mm = require('micromatch');
 * // mm.capture(pattern, string[, options]);
 *
 * console.log(mm.capture('test/*.js', 'test/foo.js'));
 * //=> ['foo']
 * console.log(mm.capture('test/*.js', 'foo/bar.css'));
 * //=> null
 * ```
 * @param {String} `glob` Glob pattern to use for matching.
 * @param {String} `input` String to match
 * @param {Object} `options` See available [options](#options) for changing how matches are performed
 * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`.
 * @api public
 */ $605cfa7e6c743ea1$var$micromatch.capture = (glob, input, options)=>{
    let posix = $9eMkZ.isWindows(options);
    let regex = $f68239ef451d9757$exports.makeRe(String(glob), {
        ...options,
        capture: true
    });
    let match = regex.exec(posix ? $9eMkZ.toPosixSlashes(input) : input);
    if (match) return match.slice(1).map((v)=>v === void 0 ? '' : v);
};
/**
 * Create a regular expression from the given glob `pattern`.
 *
 * ```js
 * const mm = require('micromatch');
 * // mm.makeRe(pattern[, options]);
 *
 * console.log(mm.makeRe('*.js'));
 * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/
 * ```
 * @param {String} `pattern` A glob pattern to convert to regex.
 * @param {Object} `options`
 * @return {RegExp} Returns a regex created from the given pattern.
 * @api public
 */ $605cfa7e6c743ea1$var$micromatch.makeRe = (...args)=>$f68239ef451d9757$exports.makeRe(...args);
/**
 * Scan a glob pattern to separate the pattern into segments. Used
 * by the [split](#split) method.
 *
 * ```js
 * const mm = require('micromatch');
 * const state = mm.scan(pattern[, options]);
 * ```
 * @param {String} `pattern`
 * @param {Object} `options`
 * @return {Object} Returns an object with
 * @api public
 */ $605cfa7e6c743ea1$var$micromatch.scan = (...args)=>$f68239ef451d9757$exports.scan(...args);
/**
 * Parse a glob pattern to create the source string for a regular
 * expression.
 *
 * ```js
 * const mm = require('micromatch');
 * const state = mm.parse(pattern[, options]);
 * ```
 * @param {String} `glob`
 * @param {Object} `options`
 * @return {Object} Returns an object with useful properties and output to be used as regex source string.
 * @api public
 */ $605cfa7e6c743ea1$var$micromatch.parse = (patterns, options)=>{
    let res = [];
    for (let pattern of [].concat(patterns || []))for (let str of $4f69f0179c3ef725$exports(String(pattern), options))res.push($f68239ef451d9757$exports.parse(str, options));
    return res;
};
/**
 * Process the given brace `pattern`.
 *
 * ```js
 * const { braces } = require('micromatch');
 * console.log(braces('foo/{a,b,c}/bar'));
 * //=> [ 'foo/(a|b|c)/bar' ]
 *
 * console.log(braces('foo/{a,b,c}/bar', { expand: true }));
 * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]
 * ```
 * @param {String} `pattern` String with brace pattern to process.
 * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.
 * @return {Array}
 * @api public
 */ $605cfa7e6c743ea1$var$micromatch.braces = (pattern, options)=>{
    if (typeof pattern !== 'string') throw new TypeError('Expected a string');
    if (options && options.nobrace === true || !$605cfa7e6c743ea1$var$hasBraces(pattern)) return [
        pattern
    ];
    return $4f69f0179c3ef725$exports(pattern, options);
};
/**
 * Expand braces
 */ $605cfa7e6c743ea1$var$micromatch.braceExpand = (pattern, options)=>{
    if (typeof pattern !== 'string') throw new TypeError('Expected a string');
    return $605cfa7e6c743ea1$var$micromatch.braces(pattern, {
        ...options,
        expand: true
    });
};
/**
 * Expose micromatch
 */ // exposed for tests
$605cfa7e6c743ea1$var$micromatch.hasBraces = $605cfa7e6c743ea1$var$hasBraces;
$605cfa7e6c743ea1$exports = $605cfa7e6c743ea1$var$micromatch;




function $702a0121da4599f3$var$match(context, uri, req) {
    // single path
    if ($702a0121da4599f3$var$isStringPath(context)) return $702a0121da4599f3$var$matchSingleStringPath(context, uri);
    // single glob path
    if ($702a0121da4599f3$var$isGlobPath(context)) return $702a0121da4599f3$var$matchSingleGlobPath(context, uri);
    // multi path
    if (Array.isArray(context)) {
        if (context.every($702a0121da4599f3$var$isStringPath)) return $702a0121da4599f3$var$matchMultiPath(context, uri);
        if (context.every($702a0121da4599f3$var$isGlobPath)) return $702a0121da4599f3$var$matchMultiGlobPath(context, uri);
        throw new Error($9612062e44afe3ec$exports.ERRORS.ERR_CONTEXT_MATCHER_INVALID_ARRAY);
    }
    // custom matching
    if (typeof context === 'function') {
        const pathname = $702a0121da4599f3$var$getUrlPathName(uri);
        return context(pathname, req);
    }
    throw new Error($9612062e44afe3ec$exports.ERRORS.ERR_CONTEXT_MATCHER_GENERIC);
}
$702a0121da4599f3$exports.match = $702a0121da4599f3$var$match;
/**
 * @param  {String} context '/api'
 * @param  {String} uri     'http://example.org/api/b/c/d.html'
 * @return {Boolean}
 */ function $702a0121da4599f3$var$matchSingleStringPath(context, uri) {
    const pathname = $702a0121da4599f3$var$getUrlPathName(uri);
    return pathname.indexOf(context) === 0;
}
function $702a0121da4599f3$var$matchSingleGlobPath(pattern, uri) {
    const pathname = $702a0121da4599f3$var$getUrlPathName(uri);
    const matches = $605cfa7e6c743ea1$exports([
        pathname
    ], pattern);
    return matches && matches.length > 0;
}
function $702a0121da4599f3$var$matchMultiGlobPath(patternList, uri) {
    return $702a0121da4599f3$var$matchSingleGlobPath(patternList, uri);
}
/**
 * @param  {String} contextList ['/api', '/ajax']
 * @param  {String} uri     'http://example.org/api/b/c/d.html'
 * @return {Boolean}
 */ function $702a0121da4599f3$var$matchMultiPath(contextList, uri) {
    let isMultiPath = false;
    for (const context of contextList)if ($702a0121da4599f3$var$matchSingleStringPath(context, uri)) {
        isMultiPath = true;
        break;
    }
    return isMultiPath;
}
/**
 * Parses URI and returns RFC 3986 path
 *
 * @param  {String} uri from req.url
 * @return {String}     RFC 3986 path
 */ function $702a0121da4599f3$var$getUrlPathName(uri) {
    return uri && $5HoLl$url.parse(uri).pathname;
}
function $702a0121da4599f3$var$isStringPath(context) {
    return typeof context === 'string' && !$bae4864c67bc723e$exports(context);
}
function $702a0121da4599f3$var$isGlobPath(context) {
    return $bae4864c67bc723e$exports(context);
}


var $2ff7604e51c5aead$exports = {};
"use strict";
Object.defineProperty($2ff7604e51c5aead$exports, "__esModule", {
    value: true
});
$2ff7604e51c5aead$exports.getHandlers = $2ff7604e51c5aead$exports.init = void 0;

const $2ff7604e51c5aead$var$logger = (0, $577f917740ff4e1f$exports.getInstance)();
function $2ff7604e51c5aead$var$init(proxy, option) {
    const handlers = $2ff7604e51c5aead$var$getHandlers(option);
    for (const eventName of Object.keys(handlers))proxy.on(eventName, handlers[eventName]);
    // https://github.com/webpack/webpack-dev-server/issues/1642
    proxy.on('econnreset', (error, req, res, target)=>{
        $2ff7604e51c5aead$var$logger.error(`[HPM] ECONNRESET: %O`, error);
    });
    // https://github.com/webpack/webpack-dev-server/issues/1642#issuecomment-1104325120
    proxy.on('proxyReqWs', (proxyReq, req, socket, options, head)=>{
        socket.on('error', (error)=>{
            $2ff7604e51c5aead$var$logger.error(`[HPM] WebSocket error: %O`, error);
        });
    });
    $2ff7604e51c5aead$var$logger.debug('[HPM] Subscribed to http-proxy events:', Object.keys(handlers));
}
$2ff7604e51c5aead$exports.init = $2ff7604e51c5aead$var$init;
function $2ff7604e51c5aead$var$getHandlers(options) {
    // https://github.com/nodejitsu/node-http-proxy#listening-for-proxy-events
    const proxyEventsMap = {
        error: 'onError',
        proxyReq: 'onProxyReq',
        proxyReqWs: 'onProxyReqWs',
        proxyRes: 'onProxyRes',
        open: 'onOpen',
        close: 'onClose'
    };
    const handlers = {};
    for (const [eventName, onEventName] of Object.entries(proxyEventsMap)){
        // all handlers for the http-proxy events are prefixed with 'on'.
        // loop through options and try to find these handlers
        // and add them to the handlers object for subscription in init().
        const fnHandler = options ? options[onEventName] : null;
        if (typeof fnHandler === 'function') handlers[eventName] = fnHandler;
    }
    // add default error handler in absence of error handler
    if (typeof handlers.error !== 'function') handlers.error = $2ff7604e51c5aead$var$defaultErrorHandler;
    // add default close handler in absence of close handler
    if (typeof handlers.close !== 'function') handlers.close = $2ff7604e51c5aead$var$logClose;
    return handlers;
}
$2ff7604e51c5aead$exports.getHandlers = $2ff7604e51c5aead$var$getHandlers;
function $2ff7604e51c5aead$var$defaultErrorHandler(err, req, res) {
    // Re-throw error. Not recoverable since req & res are empty.
    if (!req && !res) throw err; // "Error: Must provide a proper URL as target"
    const host = req.headers && req.headers.host;
    const code = err.code;
    if (res.writeHead && !res.headersSent) {
        if (/HPE_INVALID/.test(code)) res.writeHead(502);
        else switch(code){
            case 'ECONNRESET':
            case 'ENOTFOUND':
            case 'ECONNREFUSED':
            case 'ETIMEDOUT':
                res.writeHead(504);
                break;
            default:
                res.writeHead(500);
        }
    }
    res.end(`Error occurred while trying to proxy: ${host}${req.url}`);
}
function $2ff7604e51c5aead$var$logClose(req, socket, head) {
    // view disconnected websocket connections
    $2ff7604e51c5aead$var$logger.info('[HPM] Client disconnected');
}



var $254e55b0f5482f2b$exports = {};
"use strict";
Object.defineProperty($254e55b0f5482f2b$exports, "__esModule", {
    value: true
});
$254e55b0f5482f2b$exports.createPathRewriter = void 0;



const $254e55b0f5482f2b$var$logger = (0, $577f917740ff4e1f$exports.getInstance)();
/**
 * Create rewrite function, to cache parsed rewrite rules.
 *
 * @param {Object} rewriteConfig
 * @return {Function} Function to rewrite paths; This function should accept `path` (request.url) as parameter
 */ function $254e55b0f5482f2b$var$createPathRewriter(rewriteConfig) {
    let rulesCache;
    if (!$254e55b0f5482f2b$var$isValidRewriteConfig(rewriteConfig)) return;
    if (typeof rewriteConfig === 'function') {
        const customRewriteFn = rewriteConfig;
        return customRewriteFn;
    } else {
        rulesCache = $254e55b0f5482f2b$var$parsePathRewriteRules(rewriteConfig);
        return rewritePath;
    }
    function rewritePath(path) {
        let result = path;
        for (const rule of rulesCache)if (rule.regex.test(path)) {
            result = result.replace(rule.regex, rule.value);
            $254e55b0f5482f2b$var$logger.debug('[HPM] Rewriting path from "%s" to "%s"', path, result);
            break;
        }
        return result;
    }
}
$254e55b0f5482f2b$exports.createPathRewriter = $254e55b0f5482f2b$var$createPathRewriter;
function $254e55b0f5482f2b$var$isValidRewriteConfig(rewriteConfig) {
    if (typeof rewriteConfig === 'function') return true;
    else if ($0d476e83cc8b7613$exports(rewriteConfig)) return Object.keys(rewriteConfig).length !== 0;
    else if (rewriteConfig === undefined || rewriteConfig === null) return false;
    else throw new Error($9612062e44afe3ec$exports.ERRORS.ERR_PATH_REWRITER_CONFIG);
}
function $254e55b0f5482f2b$var$parsePathRewriteRules(rewriteConfig) {
    const rules = [];
    if ($0d476e83cc8b7613$exports(rewriteConfig)) for (const [key] of Object.entries(rewriteConfig)){
        rules.push({
            regex: new RegExp(key),
            value: rewriteConfig[key]
        });
        $254e55b0f5482f2b$var$logger.info('[HPM] Proxy rewrite rule created: "%s" ~> "%s"', key, rewriteConfig[key]);
    }
    return rules;
}


var $7c5f4179798367a4$exports = {};
"use strict";
Object.defineProperty($7c5f4179798367a4$exports, "__esModule", {
    value: true
});
$7c5f4179798367a4$exports.getTarget = void 0;


const $7c5f4179798367a4$var$logger = (0, $577f917740ff4e1f$exports.getInstance)();
async function $7c5f4179798367a4$var$getTarget(req, config) {
    let newTarget;
    const router = config.router;
    if ($0d476e83cc8b7613$exports(router)) newTarget = $7c5f4179798367a4$var$getTargetFromProxyTable(req, router);
    else if (typeof router === 'function') newTarget = await router(req);
    return newTarget;
}
$7c5f4179798367a4$exports.getTarget = $7c5f4179798367a4$var$getTarget;
function $7c5f4179798367a4$var$getTargetFromProxyTable(req, table) {
    let result;
    const host = req.headers.host;
    const path = req.url;
    const hostAndPath = host + path;
    for (const [key] of Object.entries(table)){
        if ($7c5f4179798367a4$var$containsPath(key)) {
            if (hostAndPath.indexOf(key) > -1) {
                // match 'localhost:3000/api'
                result = table[key];
                $7c5f4179798367a4$var$logger.debug('[HPM] Router table match: "%s"', key);
                break;
            }
        } else if (key === host) {
            // match 'localhost:3000'
            result = table[key];
            $7c5f4179798367a4$var$logger.debug('[HPM] Router table match: "%s"', host);
            break;
        }
    }
    return result;
}
function $7c5f4179798367a4$var$containsPath(v) {
    return v.indexOf('/') > -1;
}


class $fcd32f42a0865940$var$HttpProxyMiddleware {
    constructor(context, opts){
        this.logger = (0, $577f917740ff4e1f$exports.getInstance)();
        this.wsInternalSubscribed = false;
        this.serverOnCloseSubscribed = false;
        // https://github.com/Microsoft/TypeScript/wiki/'this'-in-TypeScript#red-flags-for-this
        this.middleware = async (req, res, next)=>{
            var _a, _b;
            if (this.shouldProxy(this.config.context, req)) try {
                const activeProxyOptions = await this.prepareProxyRequest(req);
                this.proxy.web(req, res, activeProxyOptions);
            } catch (err) {
                next(err);
            }
            else next();
            /**
             * Get the server object to subscribe to server events;
             * 'upgrade' for websocket and 'close' for graceful shutdown
             *
             * NOTE:
             * req.socket: node >= 13
             * req.connection: node < 13 (Remove this when node 12/13 support is dropped)
             */ const server = (_b = (_a = req.socket) !== null && _a !== void 0 ? _a : req.connection) === null || _b === void 0 ? void 0 : _b.server;
            if (server && !this.serverOnCloseSubscribed) {
                server.on('close', ()=>{
                    this.logger.info('[HPM] server close signal received: closing proxy server');
                    this.proxy.close();
                });
                this.serverOnCloseSubscribed = true;
            }
            if (this.proxyOptions.ws === true) // use initial request to access the server object to subscribe to http upgrade event
            this.catchUpgradeRequest(server);
        };
        this.catchUpgradeRequest = (server)=>{
            if (!this.wsInternalSubscribed) {
                server.on('upgrade', this.handleUpgrade);
                // prevent duplicate upgrade handling;
                // in case external upgrade is also configured
                this.wsInternalSubscribed = true;
            }
        };
        this.handleUpgrade = async (req, socket, head)=>{
            if (this.shouldProxy(this.config.context, req)) {
                const activeProxyOptions = await this.prepareProxyRequest(req);
                this.proxy.ws(req, socket, head, activeProxyOptions);
                this.logger.info('[HPM] Upgrading to WebSocket');
            }
        };
        /**
         * Determine whether request should be proxied.
         *
         * @private
         * @param  {String} context [description]
         * @param  {Object} req     [description]
         * @return {Boolean}
         */ this.shouldProxy = (context, req)=>{
            try {
                const path = req.originalUrl || req.url;
                return $702a0121da4599f3$exports.match(context, path, req);
            } catch (error) {
                this.logger.error(error);
                return false;
            }
        };
        /**
         * Apply option.router and option.pathRewrite
         * Order matters:
         *    Router uses original path for routing;
         *    NOT the modified path, after it has been rewritten by pathRewrite
         * @param {Object} req
         * @return {Object} proxy options
         */ this.prepareProxyRequest = async (req)=>{
            // https://github.com/chimurai/http-proxy-middleware/issues/17
            // https://github.com/chimurai/http-proxy-middleware/issues/94
            req.url = req.originalUrl || req.url;
            // store uri before it gets rewritten for logging
            const originalPath = req.url;
            const newProxyOptions = Object.assign({}, this.proxyOptions);
            // Apply in order:
            // 1. option.router
            // 2. option.pathRewrite
            await this.applyRouter(req, newProxyOptions);
            await this.applyPathRewrite(req, this.pathRewriter);
            // debug logging for both http(s) and websockets
            if (this.proxyOptions.logLevel === 'debug') {
                const arrow = (0, $577f917740ff4e1f$exports.getArrow)(originalPath, req.url, this.proxyOptions.target, newProxyOptions.target);
                this.logger.debug('[HPM] %s %s %s %s', req.method, originalPath, arrow, newProxyOptions.target);
            }
            return newProxyOptions;
        };
        // Modify option.target when router present.
        this.applyRouter = async (req, options)=>{
            let newTarget;
            if (options.router) {
                newTarget = await $7c5f4179798367a4$exports.getTarget(req, options);
                if (newTarget) {
                    this.logger.debug('[HPM] Router new target: %s -> "%s"', options.target, newTarget);
                    options.target = newTarget;
                }
            }
        };
        // rewrite path
        this.applyPathRewrite = async (req, pathRewriter)=>{
            if (pathRewriter) {
                const path = await pathRewriter(req.url, req);
                if (typeof path === 'string') req.url = path;
                else this.logger.info('[HPM] pathRewrite: No rewritten path found. (%s)', req.url);
            }
        };
        this.logError = (err, req, res, target)=>{
            var _a;
            const hostname = ((_a = req.headers) === null || _a === void 0 ? void 0 : _a.host) || req.hostname || req.host; // (websocket) || (node0.10 || node 4/5)
            const requestHref = `${hostname}${req.url}`;
            const targetHref = `${target === null || target === void 0 ? void 0 : target.href}`; // target is undefined when websocket errors
            const errorMessage = '[HPM] Error occurred while proxying request %s to %s [%s] (%s)';
            const errReference = 'https://nodejs.org/api/errors.html#errors_common_system_errors'; // link to Node Common Systems Errors page
            this.logger.error(errorMessage, requestHref, targetHref, err.code || err, errReference);
        };
        this.config = (0, $c58f975e1f9925ea$exports.createConfig)(context, opts);
        this.proxyOptions = this.config.options;
        // create proxy
        this.proxy = $85787215e2990b4a$exports.createProxyServer({});
        this.logger.info(`[HPM] Proxy created: ${this.config.context}  -> ${this.proxyOptions.target}`);
        this.pathRewriter = $254e55b0f5482f2b$exports.createPathRewriter(this.proxyOptions.pathRewrite); // returns undefined when "pathRewrite" is not provided
        // attach handler to http-proxy events
        $2ff7604e51c5aead$exports.init(this.proxy, this.proxyOptions);
        // log errors for debug purpose
        this.proxy.on('error', this.logError);
        // https://github.com/chimurai/http-proxy-middleware/issues/19
        // expose function to upgrade externally
        this.middleware.upgrade = (req, socket, head)=>{
            if (!this.wsInternalSubscribed) this.handleUpgrade(req, socket, head);
        };
    }
}
$fcd32f42a0865940$exports.HttpProxyMiddleware = $fcd32f42a0865940$var$HttpProxyMiddleware;


function $90287d9321ae1295$var$createProxyMiddleware(context, options) {
    const { middleware: middleware } = new $fcd32f42a0865940$exports.HttpProxyMiddleware(context, options);
    return middleware;
}
$90287d9321ae1295$exports.createProxyMiddleware = $90287d9321ae1295$var$createProxyMiddleware;

$90287d9321ae1295$var$__exportStar((parcelRequire("kfmha")), $90287d9321ae1295$exports);


var $81271fb662e4075a$exports = {};
/*!
 * fresh
 * Copyright(c) 2012 TJ Holowaychuk
 * Copyright(c) 2016-2017 Douglas Christopher Wilson
 * MIT Licensed
 */ 'use strict';
/**
 * RegExp to check for no-cache token in Cache-Control.
 * @private
 */ var $81271fb662e4075a$var$CACHE_CONTROL_NO_CACHE_REGEXP = /(?:^|,)\s*?no-cache\s*?(?:,|$)/;
/**
 * Module exports.
 * @public
 */ $81271fb662e4075a$exports = $81271fb662e4075a$var$fresh;
/**
 * Check freshness of the response using request and response headers.
 *
 * @param {Object} reqHeaders
 * @param {Object} resHeaders
 * @return {Boolean}
 * @public
 */ function $81271fb662e4075a$var$fresh(reqHeaders, resHeaders) {
    // fields
    var modifiedSince = reqHeaders['if-modified-since'];
    var noneMatch = reqHeaders['if-none-match'];
    // unconditional request
    if (!modifiedSince && !noneMatch) return false;
    // Always return stale when Cache-Control: no-cache
    // to support end-to-end reload requests
    // https://tools.ietf.org/html/rfc2616#section-14.9.4
    var cacheControl = reqHeaders['cache-control'];
    if (cacheControl && $81271fb662e4075a$var$CACHE_CONTROL_NO_CACHE_REGEXP.test(cacheControl)) return false;
    // if-none-match
    if (noneMatch && noneMatch !== '*') {
        var etag = resHeaders['etag'];
        if (!etag) return false;
        var etagStale = true;
        var matches = $81271fb662e4075a$var$parseTokenList(noneMatch);
        for(var i = 0; i < matches.length; i++){
            var match = matches[i];
            if (match === etag || match === 'W/' + etag || 'W/' + match === etag) {
                etagStale = false;
                break;
            }
        }
        if (etagStale) return false;
    }
    // if-modified-since
    if (modifiedSince) {
        var lastModified = resHeaders['last-modified'];
        var modifiedStale = !lastModified || !($81271fb662e4075a$var$parseHttpDate(lastModified) <= $81271fb662e4075a$var$parseHttpDate(modifiedSince));
        if (modifiedStale) return false;
    }
    return true;
}
/**
 * Parse an HTTP Date into a number.
 *
 * @param {string} date
 * @private
 */ function $81271fb662e4075a$var$parseHttpDate(date) {
    var timestamp = date && Date.parse(date);
    // istanbul ignore next: guard against date.js Date.parse patching
    return typeof timestamp === 'number' ? timestamp : NaN;
}
/**
 * Parse a HTTP token list.
 *
 * @param {string} str
 * @private
 */ function $81271fb662e4075a$var$parseTokenList(str) {
    var end = 0;
    var list = [];
    var start = 0;
    // gather tokens
    for(var i = 0, len = str.length; i < len; i++)switch(str.charCodeAt(i)){
        case 0x20:
            /*   */ if (start === end) start = end = i + 1;
            break;
        case 0x2c:
            /* , */ list.push(str.substring(start, end));
            start = end = i + 1;
            break;
        default:
            end = i + 1;
            break;
    }
    // final token
    list.push(str.substring(start, end));
    return list;
}



var $fd5a43f1e3e7c0f2$var$$parcel$__dirname = $5HoLl$path.resolve(__dirname, "../src");
function $fd5a43f1e3e7c0f2$export$1c94a12dbc96ed70(res) {
    res.setHeader('Access-Control-Allow-Origin', '*');
    res.setHeader('Access-Control-Allow-Methods', 'GET, HEAD, PUT, PATCH, POST, DELETE');
    res.setHeader('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept, Content-Type');
    res.setHeader('Cache-Control', 'max-age=0, must-revalidate');
}
const $fd5a43f1e3e7c0f2$var$SLASH_REGEX = /\//g;
const $fd5a43f1e3e7c0f2$export$48c584f74c55688f = '/__parcel_source_root';
const $fd5a43f1e3e7c0f2$var$TEMPLATE_404 = (0, ($parcel$interopDefault($5HoLl$fs))).readFileSync((0, ($parcel$interopDefault($5HoLl$path))).join($fd5a43f1e3e7c0f2$var$$parcel$__dirname, 'templates/404.html'), 'utf8');
const $fd5a43f1e3e7c0f2$var$TEMPLATE_500 = (0, ($parcel$interopDefault($5HoLl$fs))).readFileSync((0, ($parcel$interopDefault($5HoLl$path))).join($fd5a43f1e3e7c0f2$var$$parcel$__dirname, 'templates/500.html'), 'utf8');
class $fd5a43f1e3e7c0f2$export$2e2bcd8739ae039 {
    constructor(options){
        this.options = options;
        try {
            this.rootPath = new (0, $5HoLl$url.URL)(options.publicUrl).pathname;
        } catch (e) {
            this.rootPath = options.publicUrl;
        }
        this.pending = true;
        this.pendingRequests = [];
        this.middleware = [];
        this.bundleGraph = null;
        this.requestBundle = null;
        this.errors = null;
    }
    buildStart() {
        this.pending = true;
    }
    buildSuccess(bundleGraph, requestBundle) {
        this.bundleGraph = bundleGraph;
        this.requestBundle = requestBundle;
        this.errors = null;
        this.pending = false;
        if (this.pendingRequests.length > 0) {
            let pendingRequests = this.pendingRequests;
            this.pendingRequests = [];
            for (let [req, res] of pendingRequests)this.respond(req, res);
        }
    }
    async buildError(options, diagnostics) {
        this.pending = false;
        this.errors = await Promise.all(diagnostics.map(async (d)=>{
            let ansiDiagnostic = await (0, $5HoLl$parcelutils.prettyDiagnostic)(d, options);
            return {
                message: (0, $5HoLl$parcelutils.ansiHtml)(ansiDiagnostic.message),
                stack: ansiDiagnostic.stack ? (0, $5HoLl$parcelutils.ansiHtml)(ansiDiagnostic.stack) : null,
                frames: ansiDiagnostic.frames.map((f)=>({
                        location: f.location,
                        code: (0, $5HoLl$parcelutils.ansiHtml)(f.code)
                    })),
                hints: ansiDiagnostic.hints.map((hint)=>(0, $5HoLl$parcelutils.ansiHtml)(hint)),
                documentation: d.documentationURL ?? ''
            };
        }));
    }
    respond(req, res) {
        if (this.middleware.some((handler)=>handler(req, res))) return;
        let { pathname: pathname } = (0, ($parcel$interopDefault($5HoLl$url))).parse(req.originalUrl || req.url);
        if (pathname == null) pathname = '/';
        if (this.errors) return this.send500(req, res);
        else if ((0, ($parcel$interopDefault($5HoLl$path))).extname(pathname) === '') // If the URL doesn't start with the public path, or the URL doesn't
        // have a file extension, send the main HTML bundle.
        return this.sendIndex(req, res);
        else if (pathname.startsWith($fd5a43f1e3e7c0f2$export$48c584f74c55688f)) {
            req.url = pathname.slice($fd5a43f1e3e7c0f2$export$48c584f74c55688f.length);
            return this.serve(this.options.inputFS, this.options.projectRoot, req, res, ()=>this.send404(req, res));
        } else if (pathname.startsWith(this.rootPath)) {
            // Otherwise, serve the file from the dist folder
            req.url = this.rootPath === '/' ? pathname : pathname.slice(this.rootPath.length);
            if (req.url[0] !== '/') req.url = '/' + req.url;
            return this.serveBundle(req, res, ()=>this.sendIndex(req, res));
        } else return this.send404(req, res);
    }
    sendIndex(req, res) {
        if (this.bundleGraph) {
            // If the main asset is an HTML file, serve it
            let htmlBundleFilePaths = this.bundleGraph.getBundles().filter((bundle)=>(0, ($parcel$interopDefault($5HoLl$path))).posix.extname(bundle.name) === '.html').map((bundle)=>{
                return `/${(0, $5HoLl$parcelutils.relativePath)(this.options.distDir, bundle.filePath, false)}`;
            });
            let indexFilePath = null;
            let { pathname: reqURL } = (0, ($parcel$interopDefault($5HoLl$url))).parse(req.originalUrl || req.url);
            if (!reqURL) reqURL = '/';
            if (htmlBundleFilePaths.length === 1) indexFilePath = htmlBundleFilePaths[0];
            else {
                let bestMatch = null;
                for (let bundle of htmlBundleFilePaths){
                    let bundleDir = (0, ($parcel$interopDefault($5HoLl$path))).posix.dirname(bundle);
                    let bundleDirSubdir = bundleDir === '/' ? bundleDir : bundleDir + '/';
                    let withoutExtension = (0, ($parcel$interopDefault($5HoLl$path))).posix.basename(bundle, (0, ($parcel$interopDefault($5HoLl$path))).posix.extname(bundle));
                    let matchesIsIndex = null;
                    if (withoutExtension === 'index' && (reqURL.startsWith(bundleDirSubdir) || reqURL === bundleDir)) // bundle is /bar/index.html and (/bar or something inside of /bar/** was requested was requested)
                    matchesIsIndex = true;
                    else if (reqURL == (0, ($parcel$interopDefault($5HoLl$path))).posix.join(bundleDir, withoutExtension)) // bundle is /bar/foo.html and /bar/foo was requested
                    matchesIsIndex = false;
                    if (matchesIsIndex != null) {
                        let depth = bundle.match($fd5a43f1e3e7c0f2$var$SLASH_REGEX)?.length ?? 0;
                        if (bestMatch == null || // This one is more specific (deeper)
                        bestMatch.depth < depth || // This one is just as deep, but the bundle name matches and not just index.html
                        bestMatch.depth === depth && bestMatch.isIndex) bestMatch = {
                            bundle: bundle,
                            depth: depth,
                            isIndex: matchesIsIndex
                        };
                    }
                }
                indexFilePath = bestMatch?.['bundle'] ?? htmlBundleFilePaths[0];
            }
            if (indexFilePath) {
                req.url = indexFilePath;
                this.serveBundle(req, res, ()=>this.send404(req, res));
            } else this.send404(req, res);
        } else this.send404(req, res);
    }
    async serveBundle(req, res, next) {
        let bundleGraph = this.bundleGraph;
        if (bundleGraph) {
            let { pathname: pathname } = (0, ($parcel$interopDefault($5HoLl$url))).parse(req.url);
            if (!pathname) {
                this.send500(req, res);
                return;
            }
            let requestedPath = (0, ($parcel$interopDefault($5HoLl$path))).normalize(pathname.slice(1));
            let bundle = bundleGraph.getBundles().find((b)=>(0, ($parcel$interopDefault($5HoLl$path))).relative(this.options.distDir, b.filePath) === requestedPath);
            if (!bundle) {
                this.serveDist(req, res, next);
                return;
            }
            (0, ($parcel$interopDefault($5HoLl$assert)))(this.requestBundle != null);
            try {
                await this.requestBundle(bundle);
            } catch (err) {
                this.send500(req, res);
                return;
            }
            this.serveDist(req, res, next);
        } else this.send404(req, res);
    }
    serveDist(req, res, next) {
        return this.serve(this.options.outputFS, this.options.distDir, req, res, next);
    }
    async serve(fs, root, req, res, next) {
        if (req.method !== 'GET' && req.method !== 'HEAD') {
            // method not allowed
            res.statusCode = 405;
            res.setHeader('Allow', 'GET, HEAD');
            res.setHeader('Content-Length', '0');
            res.end();
            return;
        }
        try {
            var filePath = (0, ($parcel$interopDefault($5HoLl$url))).parse(req.url).pathname || '';
            filePath = decodeURIComponent(filePath);
        } catch (err) {
            return this.sendError(res, 400);
        }
        filePath = (0, ($parcel$interopDefault($5HoLl$path))).normalize('.' + (0, ($parcel$interopDefault($5HoLl$path))).sep + filePath);
        // malicious path
        if (filePath.includes((0, ($parcel$interopDefault($5HoLl$path))).sep + '..' + (0, ($parcel$interopDefault($5HoLl$path))).sep)) return this.sendError(res, 403);
        // join / normalize from the root dir
        if (!(0, ($parcel$interopDefault($5HoLl$path))).isAbsolute(filePath)) filePath = (0, ($parcel$interopDefault($5HoLl$path))).normalize((0, ($parcel$interopDefault($5HoLl$path))).join(root, filePath));
        try {
            var stat = await fs.stat(filePath);
        } catch (err) {
            if (err.code === 'ENOENT') return next(req, res);
            return this.sendError(res, 500);
        }
        // Fall back to next handler if not a file
        if (!stat || !stat.isFile()) return next(req, res);
        if ((0, (/*@__PURE__*/$parcel$interopDefault($81271fb662e4075a$exports)))(req.headers, {
            'last-modified': stat.mtime.toUTCString()
        })) {
            res.statusCode = 304;
            res.end();
            return;
        }
        return (0, (/*@__PURE__*/$parcel$interopDefault($241580f2bf06323c$exports)))(req, res, {
            public: root,
            cleanUrls: false
        }, {
            lstat: (path)=>fs.stat(path),
            realpath: (path)=>fs.realpath(path),
            createReadStream: (path, options)=>fs.createReadStream(path, options),
            readdir: (path)=>fs.readdir(path)
        });
    }
    sendError(res, statusCode) {
        res.statusCode = statusCode;
        res.end();
    }
    send404(req, res) {
        res.statusCode = 404;
        res.end($fd5a43f1e3e7c0f2$var$TEMPLATE_404);
    }
    send500(req, res) {
        res.setHeader('Content-Type', 'text/html; charset=utf-8');
        res.writeHead(500);
        if (this.errors) return res.end((0, (/*@__PURE__*/$parcel$interopDefault($7e963105242e0bd8$exports))).render($fd5a43f1e3e7c0f2$var$TEMPLATE_500, {
            errors: this.errors,
            hmrOptions: this.options.hmrOptions
        }));
    }
    logAccessIfVerbose(req) {
        this.options.logger.verbose({
            message: `Request: ${req.headers.host}${req.originalUrl || req.url}`
        });
    }
    /**
   * Load proxy table from package.json and apply them.
   */ async applyProxyTable(app) {
        // avoid skipping project root
        const fileInRoot = (0, ($parcel$interopDefault($5HoLl$path))).join(this.options.projectRoot, 'index');
        const configFilePath = await (0, $5HoLl$parcelutils.resolveConfig)(this.options.inputFS, fileInRoot, [
            '.proxyrc.cts',
            '.proxyrc.mts',
            '.proxyrc.ts',
            '.proxyrc.cjs',
            '.proxyrc.mjs',
            '.proxyrc.js',
            '.proxyrc',
            '.proxyrc.json'
        ], this.options.projectRoot);
        if (!configFilePath) return this;
        const filename = (0, ($parcel$interopDefault($5HoLl$path))).basename(configFilePath);
        if (filename === '.proxyrc' || filename === '.proxyrc.json') {
            let conf = await (0, $5HoLl$parcelutils.readConfig)(this.options.inputFS, configFilePath);
            if (!conf) return this;
            let cfg = conf.config;
            if (typeof cfg !== 'object') {
                this.options.logger.warn({
                    message: "Proxy table in '.proxyrc' should be of object type. Skipping..."
                });
                return this;
            }
            for (const [context, options] of Object.entries(cfg))// each key is interpreted as context, and value as middleware options
            app.use((0, $90287d9321ae1295$exports.createProxyMiddleware)(context, options));
        } else {
            let cfg = await this.options.packageManager.require(configFilePath, fileInRoot);
            if (// $FlowFixMe
            Object.prototype.toString.call(cfg) === '[object Module]') cfg = cfg.default;
            if (typeof cfg !== 'function') {
                this.options.logger.warn({
                    message: `Proxy configuration file '${filename}' should export a function. Skipping...`
                });
                return this;
            }
            cfg(app);
        }
        return this;
    }
    async start() {
        const finalHandler = (req, res)=>{
            this.logAccessIfVerbose(req);
            // Wait for the parcelInstance to finish bundling if needed
            if (this.pending) this.pendingRequests.push([
                req,
                res
            ]);
            else this.respond(req, res);
        };
        const app = (0, (/*@__PURE__*/$parcel$interopDefault($d098bac26da80a0a$exports)))();
        app.use((req, res, next)=>{
            $fd5a43f1e3e7c0f2$export$1c94a12dbc96ed70(res);
            if (req.method === 'OPTIONS') {
                res.statusCode = 200;
                res.end();
                return;
            }
            next();
        });
        app.use((req, res, next)=>{
            if (req.url === '/__parcel_healthcheck') {
                res.statusCode = 200;
                res.write(`${Date.now()}`);
                res.end();
            } else next();
        });
        await this.applyProxyTable(app);
        app.use(finalHandler);
        let { server: server, stop: stop } = await (0, $5HoLl$parcelutils.createHTTPServer)({
            cacheDir: this.options.cacheDir,
            https: this.options.https,
            inputFS: this.options.inputFS,
            listener: app,
            outputFS: this.options.outputFS,
            host: this.options.host
        });
        this.stopServer = stop;
        server.listen(this.options.port, this.options.host);
        return new Promise((resolve, reject)=>{
            server.once('error', (err)=>{
                this.options.logger.error({
                    message: (0, $30c5ada1f46847d4$export$2e2bcd8739ae039)(err, this.options.port)
                });
                reject(err);
            });
            server.once('listening', ()=>{
                resolve(server);
            });
        });
    }
    async stop() {
        (0, ($parcel$interopDefault($5HoLl$assert)))(this.stopServer != null);
        await this.stopServer();
        this.stopServer = null;
    }
}


var $451c2a817f483539$exports = {};
'use strict';
function $451c2a817f483539$var$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;
}
$451c2a817f483539$exports = $451c2a817f483539$var$nullthrows;
$451c2a817f483539$exports.default = $451c2a817f483539$var$nullthrows;
Object.defineProperty($451c2a817f483539$exports, '__esModule', {
    value: true
});





var $50845ef30cb1b444$exports = {};
'use strict';

var $j8Pq9 = parcelRequire("j8Pq9");

$j8Pq9.createWebSocketStream = (parcelRequire("fDeTZ"));

$j8Pq9.Server = (parcelRequire("8Dcwe"));

$j8Pq9.Receiver = (parcelRequire("lGaGn"));

$j8Pq9.Sender = (parcelRequire("4qdR9"));
$j8Pq9.WebSocket = $j8Pq9;
$j8Pq9.WebSocketServer = $j8Pq9.Server;
$50845ef30cb1b444$exports = $j8Pq9;







var $e421a384b022955d$exports = {};
/**
 * Copyright (c) 2015-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file at
 * https://github.com/facebookincubator/create-react-app/blob/master/LICENSE
 *
 * Modified by Yuxi Evan You
 */ 


var $452efe9e2afbc53a$exports = {};
let $452efe9e2afbc53a$var$p = process || {}, $452efe9e2afbc53a$var$argv = $452efe9e2afbc53a$var$p.argv || [], $452efe9e2afbc53a$var$env = $452efe9e2afbc53a$var$p.env || {};
let $452efe9e2afbc53a$var$isColorSupported = !(!!$452efe9e2afbc53a$var$env.NO_COLOR || $452efe9e2afbc53a$var$argv.includes("--no-color")) && (!!$452efe9e2afbc53a$var$env.FORCE_COLOR || $452efe9e2afbc53a$var$argv.includes("--color") || $452efe9e2afbc53a$var$p.platform === "win32" || ($452efe9e2afbc53a$var$p.stdout || {}).isTTY && $452efe9e2afbc53a$var$env.TERM !== "dumb" || !!$452efe9e2afbc53a$var$env.CI);
let $452efe9e2afbc53a$var$formatter = (open, close, replace = open)=>(input)=>{
        let string = "" + input, index = string.indexOf(close, open.length);
        return ~index ? open + $452efe9e2afbc53a$var$replaceClose(string, close, replace, index) + close : open + string + close;
    };
let $452efe9e2afbc53a$var$replaceClose = (string, close, replace, index)=>{
    let result = "", cursor = 0;
    do {
        result += string.substring(cursor, index) + replace;
        cursor = index + close.length;
        index = string.indexOf(close, cursor);
    }while (~index);
    return result + string.substring(cursor);
};
let $452efe9e2afbc53a$var$createColors = (enabled = $452efe9e2afbc53a$var$isColorSupported)=>{
    let f = enabled ? $452efe9e2afbc53a$var$formatter : ()=>String;
    return {
        isColorSupported: enabled,
        reset: f("\x1b[0m", "\x1b[0m"),
        bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"),
        dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"),
        italic: f("\x1b[3m", "\x1b[23m"),
        underline: f("\x1b[4m", "\x1b[24m"),
        inverse: f("\x1b[7m", "\x1b[27m"),
        hidden: f("\x1b[8m", "\x1b[28m"),
        strikethrough: f("\x1b[9m", "\x1b[29m"),
        black: f("\x1b[30m", "\x1b[39m"),
        red: f("\x1b[31m", "\x1b[39m"),
        green: f("\x1b[32m", "\x1b[39m"),
        yellow: f("\x1b[33m", "\x1b[39m"),
        blue: f("\x1b[34m", "\x1b[39m"),
        magenta: f("\x1b[35m", "\x1b[39m"),
        cyan: f("\x1b[36m", "\x1b[39m"),
        white: f("\x1b[37m", "\x1b[39m"),
        gray: f("\x1b[90m", "\x1b[39m"),
        bgBlack: f("\x1b[40m", "\x1b[49m"),
        bgRed: f("\x1b[41m", "\x1b[49m"),
        bgGreen: f("\x1b[42m", "\x1b[49m"),
        bgYellow: f("\x1b[43m", "\x1b[49m"),
        bgBlue: f("\x1b[44m", "\x1b[49m"),
        bgMagenta: f("\x1b[45m", "\x1b[49m"),
        bgCyan: f("\x1b[46m", "\x1b[49m"),
        bgWhite: f("\x1b[47m", "\x1b[49m"),
        blackBright: f("\x1b[90m", "\x1b[39m"),
        redBright: f("\x1b[91m", "\x1b[39m"),
        greenBright: f("\x1b[92m", "\x1b[39m"),
        yellowBright: f("\x1b[93m", "\x1b[39m"),
        blueBright: f("\x1b[94m", "\x1b[39m"),
        magentaBright: f("\x1b[95m", "\x1b[39m"),
        cyanBright: f("\x1b[96m", "\x1b[39m"),
        whiteBright: f("\x1b[97m", "\x1b[39m"),
        bgBlackBright: f("\x1b[100m", "\x1b[49m"),
        bgRedBright: f("\x1b[101m", "\x1b[49m"),
        bgGreenBright: f("\x1b[102m", "\x1b[49m"),
        bgYellowBright: f("\x1b[103m", "\x1b[49m"),
        bgBlueBright: f("\x1b[104m", "\x1b[49m"),
        bgMagentaBright: f("\x1b[105m", "\x1b[49m"),
        bgCyanBright: f("\x1b[106m", "\x1b[49m"),
        bgWhiteBright: f("\x1b[107m", "\x1b[49m")
    };
};
$452efe9e2afbc53a$exports = $452efe9e2afbc53a$var$createColors();
$452efe9e2afbc53a$exports.createColors = $452efe9e2afbc53a$var$createColors;



var $d031e3359d7d5783$exports = {};

var $b174e7706653f674$export$ee7a15c61bfdeb11;
var $b174e7706653f674$export$98e6a39c04603d36;
'use strict';

$b174e7706653f674$export$ee7a15c61bfdeb11 = (parcelRequire("iz8ZN"));

$b174e7706653f674$export$98e6a39c04603d36 = (parcelRequire("bGq8L"));



var $c8fb2d1f27af2891$exports = {};
$c8fb2d1f27af2891$exports = {
    '/Applications/Atom.app/Contents/MacOS/Atom': 'atom',
    '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta': '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta',
    '/Applications/Brackets.app/Contents/MacOS/Brackets': 'brackets',
    '/Applications/Sublime Text.app/Contents/MacOS/Sublime Text': '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',
    '/Applications/Sublime Text.app/Contents/MacOS/sublime_text': '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',
    '/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2': '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl',
    '/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text': '/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl',
    '/Applications/Visual Studio Code.app/Contents/MacOS/Electron': 'code',
    '/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron': 'code-insiders',
    '/Applications/VSCodium.app/Contents/MacOS/Electron': 'codium',
    '/Applications/Cursor.app/Contents/MacOS/Cursor': 'cursor',
    '/Applications/AppCode.app/Contents/MacOS/appcode': '/Applications/AppCode.app/Contents/MacOS/appcode',
    '/Applications/CLion.app/Contents/MacOS/clion': '/Applications/CLion.app/Contents/MacOS/clion',
    '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea': '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea',
    '/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea': '/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea',
    '/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea': '/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea',
    '/Applications/PhpStorm.app/Contents/MacOS/phpstorm': '/Applications/PhpStorm.app/Contents/MacOS/phpstorm',
    '/Applications/PyCharm.app/Contents/MacOS/pycharm': '/Applications/PyCharm.app/Contents/MacOS/pycharm',
    '/Applications/PyCharm CE.app/Contents/MacOS/pycharm': '/Applications/PyCharm CE.app/Contents/MacOS/pycharm',
    '/Applications/RubyMine.app/Contents/MacOS/rubymine': '/Applications/RubyMine.app/Contents/MacOS/rubymine',
    '/Applications/WebStorm.app/Contents/MacOS/webstorm': '/Applications/WebStorm.app/Contents/MacOS/webstorm',
    '/Applications/MacVim.app/Contents/MacOS/MacVim': 'mvim',
    '/Applications/GoLand.app/Contents/MacOS/goland': '/Applications/GoLand.app/Contents/MacOS/goland',
    '/Applications/Rider.app/Contents/MacOS/rider': '/Applications/Rider.app/Contents/MacOS/rider',
    '/Applications/Zed.app/Contents/MacOS/zed': 'zed'
};


var $f11ba0312e089174$exports = {};
$f11ba0312e089174$exports = {
    atom: 'atom',
    Brackets: 'brackets',
    'code-insiders': 'code-insiders',
    code: 'code',
    vscodium: 'vscodium',
    codium: 'codium',
    emacs: 'emacs',
    gvim: 'gvim',
    idea: 'idea',
    'idea.sh': 'idea',
    phpstorm: 'phpstorm',
    'phpstorm.sh': 'phpstorm',
    pycharm: 'pycharm',
    'pycharm.sh': 'pycharm',
    rubymine: 'rubymine',
    'rubymine.sh': 'rubymine',
    sublime_text: 'subl',
    vim: 'vim',
    webstorm: 'webstorm',
    'webstorm.sh': 'webstorm',
    goland: 'goland',
    'goland.sh': 'goland',
    rider: 'rider',
    'rider.sh': 'rider'
};


var $a0a9b3a2150ee983$exports = {};
$a0a9b3a2150ee983$exports = [
    'Brackets.exe',
    'Code.exe',
    'Code - Insiders.exe',
    'VSCodium.exe',
    'Cursor.exe',
    'atom.exe',
    'sublime_text.exe',
    'notepad++.exe',
    'clion.exe',
    'clion64.exe',
    'idea.exe',
    'idea64.exe',
    'phpstorm.exe',
    'phpstorm64.exe',
    'pycharm.exe',
    'pycharm64.exe',
    'rubymine.exe',
    'rubymine64.exe',
    'webstorm.exe',
    'webstorm64.exe',
    'goland.exe',
    'goland64.exe',
    'rider.exe',
    'rider64.exe'
];


$d031e3359d7d5783$exports = function guessEditor(specifiedEditor) {
    if (specifiedEditor) return $b174e7706653f674$export$98e6a39c04603d36(specifiedEditor);
    if (process.env.LAUNCH_EDITOR) return [
        process.env.LAUNCH_EDITOR
    ];
    if (process.versions.webcontainer) return [
        process.env.EDITOR || 'code'
    ];
    // We can find out which editor is currently running by:
    // `ps x` on macOS and Linux
    // `Get-Process` on Windows
    try {
        if (process.platform === 'darwin') {
            const output = $5HoLl$child_process.execSync('ps x -o comm=', {
                stdio: [
                    'pipe',
                    'pipe',
                    'ignore'
                ]
            }).toString();
            const processNames = Object.keys($c8fb2d1f27af2891$exports);
            const processList = output.split('\n');
            for(let i = 0; i < processNames.length; i++){
                const processName = processNames[i];
                // Find editor by exact match.
                if (processList.includes(processName)) return [
                    $c8fb2d1f27af2891$exports[processName]
                ];
                const processNameWithoutApplications = processName.replace('/Applications', '');
                // Find editor installation not in /Applications.
                if (output.indexOf(processNameWithoutApplications) !== -1) {
                    // Use the CLI command if one is specified
                    if (processName !== $c8fb2d1f27af2891$exports[processName]) return [
                        $c8fb2d1f27af2891$exports[processName]
                    ];
                    // Use a partial match to find the running process path.  If one is found, use the
                    // existing path since it can be running from anywhere.
                    const runningProcess = processList.find((procName)=>procName.endsWith(processNameWithoutApplications));
                    if (runningProcess !== undefined) return [
                        runningProcess
                    ];
                }
            }
        } else if (process.platform === 'win32') {
            const output = $5HoLl$child_process.execSync('powershell -NoProfile -Command "[Console]::OutputEncoding=[Text.Encoding]::UTF8;Get-CimInstance -Query \\"select executablepath from win32_process where executablepath is not null\\" | % { $_.ExecutablePath }"', {
                stdio: [
                    'pipe',
                    'pipe',
                    'ignore'
                ]
            }).toString();
            const runningProcesses = output.split('\r\n');
            for(let i = 0; i < runningProcesses.length; i++){
                const fullProcessPath = runningProcesses[i].trim();
                const shortProcessName = $5HoLl$path.basename(fullProcessPath);
                if ($a0a9b3a2150ee983$exports.indexOf(shortProcessName) !== -1) return [
                    fullProcessPath
                ];
            }
        } else if (process.platform === 'linux') {
            // --no-heading No header line
            // x List all processes owned by you
            // -o comm Need only names column
            const output = $5HoLl$child_process.execSync('ps x --no-heading -o comm --sort=comm', {
                stdio: [
                    'pipe',
                    'pipe',
                    'ignore'
                ]
            }).toString();
            const processNames = Object.keys($f11ba0312e089174$exports);
            for(let i = 0; i < processNames.length; i++){
                const processName = processNames[i];
                if (output.indexOf(processName) !== -1) return [
                    $f11ba0312e089174$exports[processName]
                ];
            }
        }
    } catch (ignoreError) {
    // Ignore...
    }
    // Last resort, use old skool env vars
    if (process.env.VISUAL) return [
        process.env.VISUAL
    ];
    else if (process.env.EDITOR) return [
        process.env.EDITOR
    ];
    return [
        null
    ];
};


var $ba268e6198a1e948$exports = {};

// normalize file/line numbers into command line args for specific editors
$ba268e6198a1e948$exports = function getArgumentsForPosition(editor, fileName, lineNumber, columnNumber = 1) {
    const editorBasename = $5HoLl$path.basename(editor).replace(/\.(exe|cmd|bat)$/i, '');
    switch(editorBasename){
        case 'atom':
        case 'Atom':
        case 'Atom Beta':
        case 'subl':
        case 'sublime':
        case 'sublime_text':
        case 'wstorm':
        case 'charm':
        case 'zed':
            return [
                `${fileName}:${lineNumber}:${columnNumber}`
            ];
        case 'notepad++':
            return [
                '-n' + lineNumber,
                '-c' + columnNumber,
                fileName
            ];
        case 'vim':
        case 'mvim':
            return [
                `+call cursor(${lineNumber}, ${columnNumber})`,
                fileName
            ];
        case 'joe':
        case 'gvim':
            return [
                '+' + `${lineNumber}`,
                fileName
            ];
        case 'emacs':
        case 'emacsclient':
            return [
                `+${lineNumber}:${columnNumber}`,
                fileName
            ];
        case 'rmate':
        case 'mate':
        case 'mine':
            return [
                '--line',
                lineNumber,
                fileName
            ];
        case 'code':
        case 'Code':
        case 'code-insiders':
        case 'Code - Insiders':
        case 'codium':
        case 'cursor':
        case 'vscodium':
        case 'VSCodium':
            return [
                '-r',
                '-g',
                `${fileName}:${lineNumber}:${columnNumber}`
            ];
        case 'appcode':
        case 'clion':
        case 'clion64':
        case 'idea':
        case 'idea64':
        case 'phpstorm':
        case 'phpstorm64':
        case 'pycharm':
        case 'pycharm64':
        case 'rubymine':
        case 'rubymine64':
        case 'webstorm':
        case 'webstorm64':
        case 'goland':
        case 'goland64':
        case 'rider':
        case 'rider64':
            return [
                '--line',
                lineNumber,
                '--column',
                columnNumber,
                fileName
            ];
    }
    if (process.env.LAUNCH_EDITOR) return [
        fileName,
        lineNumber,
        columnNumber
    ];
    // For all others, drop the lineNumber until we have
    // a mapping above, since providing the lineNumber incorrectly
    // can result in errors or confusing behavior.
    return [
        fileName
    ];
};


function $e421a384b022955d$var$wrapErrorCallback(cb) {
    return (fileName, errorMessage)=>{
        console.log();
        console.log($452efe9e2afbc53a$exports.red('Could not open ' + $5HoLl$path.basename(fileName) + ' in the editor.'));
        if (errorMessage) {
            if (errorMessage[errorMessage.length - 1] !== '.') errorMessage += '.';
            console.log($452efe9e2afbc53a$exports.red('The editor process exited with an error: ' + errorMessage));
        }
        console.log();
        if (cb) cb(fileName, errorMessage);
    };
}
function $e421a384b022955d$var$isTerminalEditor(editor) {
    switch(editor){
        case 'vim':
        case 'emacs':
        case 'nano':
            return true;
    }
    return false;
}
const $e421a384b022955d$var$positionRE = /:(\d+)(:(\d+))?$/;

function $e421a384b022955d$var$parseFile(file) {
    // support `file://` protocol
    if (file.startsWith('file://')) file = $5HoLl$url.fileURLToPath(file);
    const fileName = file.replace($e421a384b022955d$var$positionRE, '');
    const match = file.match($e421a384b022955d$var$positionRE);
    const lineNumber = match && match[1];
    const columnNumber = match && match[3];
    return {
        fileName: fileName,
        lineNumber: lineNumber,
        columnNumber: columnNumber
    };
}
let $e421a384b022955d$var$_childProcess = null;
function $e421a384b022955d$var$launchEditor(file, specifiedEditor, onErrorCallback) {
    const parsed = $e421a384b022955d$var$parseFile(file);
    let { fileName: fileName } = parsed;
    const { lineNumber: lineNumber, columnNumber: columnNumber } = parsed;
    if (!$5HoLl$fs.existsSync(fileName)) return;
    if (typeof specifiedEditor === 'function') {
        onErrorCallback = specifiedEditor;
        specifiedEditor = undefined;
    }
    onErrorCallback = $e421a384b022955d$var$wrapErrorCallback(onErrorCallback);
    const [editor, ...args] = $d031e3359d7d5783$exports(specifiedEditor);
    if (!editor) {
        onErrorCallback(fileName, null);
        return;
    }
    if (process.platform === 'linux' && fileName.startsWith('/mnt/') && /Microsoft/i.test($5HoLl$os.release())) // Assume WSL / "Bash on Ubuntu on Windows" is being used, and
    // that the file exists on the Windows file system.
    // `os.release()` is "4.4.0-43-Microsoft" in the current release
    // build of WSL, see: https://github.com/Microsoft/BashOnWindows/issues/423#issuecomment-221627364
    // When a Windows editor is specified, interop functionality can
    // handle the path translation, but only if a relative path is used.
    fileName = $5HoLl$path.relative('', fileName);
    if (lineNumber) {
        const extraArgs = $ba268e6198a1e948$exports(editor, fileName, lineNumber, columnNumber);
        args.push.apply(args, extraArgs);
    } else args.push(fileName);
    if ($e421a384b022955d$var$_childProcess && $e421a384b022955d$var$isTerminalEditor(editor)) // There's an existing editor process already and it's attached
    // to the terminal, so go kill it. Otherwise two separate editor
    // instances attach to the stdin/stdout which gets confusing.
    $e421a384b022955d$var$_childProcess.kill('SIGKILL');
    if (process.platform === 'win32') {
        // On Windows, we need to use `exec` with the `shell: true` option,
        // and some more sanitization is required.
        // However, CMD.exe on Windows is vulnerable to RCE attacks given a file name of the
        // form "C:\Users\myusername\Downloads\& curl 172.21.93.52".
        // `create-react-app` used a safe file name pattern to validate user-provided file names:
        // - https://github.com/facebook/create-react-app/pull/4866
        // - https://github.com/facebook/create-react-app/pull/5431
        // But that's not a viable solution for this package because
        // it's depended on by so many meta frameworks that heavily rely on
        // special characters in file names for filesystem-based routing.
        // We need to at least:
        // - Support `+` because it's used in SvelteKit and Vike
        // - Support `$` because it's used in Remix
        // - Support `(` and `)` because they are used in Analog, SolidStart, and Vike
        // - Support `@` because it's used in Vike
        // - Support `[` and `]` because they are widely used for [slug]
        // So here we choose to use `^` to escape special characters instead.
        // According to https://ss64.com/nt/syntax-esc.html,
        // we can use `^` to escape `&`, `<`, `>`, `|`, `%`, and `^`
        // I'm not sure if we have to escape all of these, but let's do it anyway
        function escapeCmdArgs(cmdArgs) {
            return cmdArgs.replace(/([&|<>,;=^])/g, '^$1');
        }
        // Need to double quote the editor path in case it contains spaces;
        // If the fileName contains spaces, we also need to double quote it in the arguments
        // However, there's a case that it's concatenated with line number and column number
        // which is separated by `:`. We need to double quote the whole string in this case.
        // Also, if the string contains the escape character `^`, it needs to be quoted, too.
        function doubleQuoteIfNeeded(str) {
            if (str.includes('^')) // If a string includes an escaped character, not only does it need to be quoted,
            // but the quotes need to be escaped too.
            return `^"${str}^"`;
            else if (str.includes(' ')) return `"${str}"`;
            return str;
        }
        const launchCommand = [
            editor,
            ...args.map(escapeCmdArgs)
        ].map(doubleQuoteIfNeeded).join(' ');
        $e421a384b022955d$var$_childProcess = $5HoLl$child_process.exec(launchCommand, {
            stdio: 'inherit',
            shell: true
        });
    } else $e421a384b022955d$var$_childProcess = $5HoLl$child_process.spawn(editor, args, {
        stdio: 'inherit'
    });
    $e421a384b022955d$var$_childProcess.on('exit', function(errorCode) {
        $e421a384b022955d$var$_childProcess = null;
        if (errorCode) onErrorCallback(fileName, '(code ' + errorCode + ')');
    });
    $e421a384b022955d$var$_childProcess.on('error', function(error) {
        let { code: code, message: message } = error;
        if ('ENOENT' === code) message = `${message} ('${editor}' command does not exist in 'PATH')`;
        onErrorCallback(fileName, message);
    });
}
$e421a384b022955d$exports = $e421a384b022955d$var$launchEditor;


const $9f01a40e8e16f757$var$FS_CONCURRENCY = 64;
const $9f01a40e8e16f757$var$HMR_ENDPOINT = '/__parcel_hmr';
const $9f01a40e8e16f757$var$CODEFRAME_ENDPOINT = '/__parcel_code_frame';
const $9f01a40e8e16f757$var$SOURCEMAP_ENDPOINT = '/__parcel_source_map';
const $9f01a40e8e16f757$var$EDITOR_ENDPOINT = '/__parcel_launch_editor';
const $9f01a40e8e16f757$var$BROADCAST_MAX_ASSETS = 10000;
class $9f01a40e8e16f757$export$2e2bcd8739ae039 {
    unresolvedError = null;
    event = null;
    pending = true;
    pendingRequests = [];
    constructor(options){
        this.options = options;
    }
    buildStart() {
        this.pending = true;
    }
    buildSuccess(event) {
        this.pending = false;
        this.event = event;
        if (this.pendingRequests.length > 0) {
            let pendingRequests = this.pendingRequests;
            this.pendingRequests = [];
            for (let [req, res] of pendingRequests)if (!this.handle(req, res)) {
                res.statusCode = 404;
                res.end();
            }
        }
    }
    async start() {
        let server = this.options.devServer;
        if (!server) {
            let result = await (0, $5HoLl$parcelutils.createHTTPServer)({
                https: this.options.https,
                inputFS: this.options.inputFS,
                outputFS: this.options.outputFS,
                cacheDir: this.options.cacheDir,
                listener: (req, res)=>{
                    (0, $fd5a43f1e3e7c0f2$export$1c94a12dbc96ed70)(res);
                    if (req.method === 'OPTIONS') {
                        res.statusCode = 200;
                        res.end();
                        return;
                    }
                    if (!this.handle(req, res)) {
                        res.statusCode = 404;
                        res.end();
                    }
                }
            });
            server = result.server;
            server.listen(this.options.port, this.options.host);
            this.stopServer = result.stop;
        } else this.options.addMiddleware?.((req, res)=>this.handle(req, res));
        this.wss = new (0, (/*@__PURE__*/$parcel$interopDefault($50845ef30cb1b444$exports))).Server({
            server: server
        });
        this.wss.on('connection', (ws)=>{
            if (this.unresolvedError) ws.send(JSON.stringify(this.unresolvedError));
        });
        // $FlowFixMe[incompatible-exact]
        this.wss.on('error', (err)=>this.handleSocketError(err));
    }
    handle(req, res) {
        let { pathname: pathname, query: query } = (0, ($parcel$interopDefault($5HoLl$url))).parse(req.originalUrl || req.url);
        if (pathname != null && pathname.startsWith($9f01a40e8e16f757$var$HMR_ENDPOINT)) {
            let id = pathname.slice($9f01a40e8e16f757$var$HMR_ENDPOINT.length + 1);
            let bundleGraph = (0, (/*@__PURE__*/$parcel$interopDefault($451c2a817f483539$exports)))(this.event).bundleGraph;
            let asset = bundleGraph.getAssetById(id);
            this.getHotAssetContents(asset).then((output)=>{
                res.setHeader('Content-Type', (0, (/*@__PURE__*/$parcel$interopDefault($ae9112e8c23157b4$exports))).contentType(asset.type));
                res.end(output);
            });
            return true;
        } else if (pathname?.startsWith($9f01a40e8e16f757$var$CODEFRAME_ENDPOINT) && req.method === 'POST') {
            if (this.pending) this.pendingRequests.push([
                req,
                res
            ]);
            else this.serveCodeFrame(req, res);
            return true;
        } else if (pathname?.startsWith($9f01a40e8e16f757$var$SOURCEMAP_ENDPOINT)) {
            if (this.pending) this.pendingRequests.push([
                req,
                res
            ]);
            else {
                let qs = new URLSearchParams(query || '');
                let filename = qs.get('filename');
                if (!filename) return false;
                this.getSourceMapContents(filename).then((map)=>{
                    res.setHeader('Content-Type', 'application/json');
                    res.end(map);
                }, ()=>{
                    res.statusCode = 500;
                    res.end();
                });
            }
            return true;
        } else if (pathname?.startsWith($9f01a40e8e16f757$var$EDITOR_ENDPOINT) && query) {
            let qs = new URLSearchParams(query);
            let file = qs.get('file');
            if (file) {
                // File location might start with /__parcel_source_root if it came from a source map.
                if (file.startsWith((0, $fd5a43f1e3e7c0f2$export$48c584f74c55688f))) file = file.slice((0, $fd5a43f1e3e7c0f2$export$48c584f74c55688f).length + 1);
                else if (!(0, ($parcel$interopDefault($5HoLl$path))).isAbsolute(file)) file = (0, ($parcel$interopDefault($5HoLl$path))).join(this.options.projectRoot, file);
                (0, (/*@__PURE__*/$parcel$interopDefault($e421a384b022955d$exports)))(file);
            }
            res.end();
            return true;
        }
        return false;
    }
    async stop() {
        if (this.stopServer != null) {
            await this.stopServer();
            this.stopServer = null;
        }
        this.wss.close();
        for (const ws of this.wss.clients)ws.terminate();
    }
    async emitError(options, diagnostics) {
        let renderedDiagnostics = await Promise.all(diagnostics.map((d)=>(0, $5HoLl$parcelutils.prettyDiagnostic)(d, options)));
        // store the most recent error so we can notify new connections
        // and so we can broadcast when the error is resolved
        this.unresolvedError = {
            type: 'error',
            diagnostics: {
                ansi: renderedDiagnostics,
                html: renderedDiagnostics.map((d, i)=>{
                    return {
                        message: (0, $5HoLl$parcelutils.ansiHtml)(d.message),
                        stack: (0, $5HoLl$parcelutils.ansiHtml)(d.stack),
                        frames: d.frames.map((f)=>({
                                location: f.location,
                                code: (0, $5HoLl$parcelutils.ansiHtml)(f.code)
                            })),
                        hints: d.hints.map((hint)=>(0, $5HoLl$parcelutils.ansiHtml)(hint)),
                        documentation: diagnostics[i].documentationURL ?? ''
                    };
                })
            }
        };
        this.broadcast(this.unresolvedError);
    }
    async getUpdate(event) {
        this.unresolvedError = null;
        this.event = event;
        let changedAssets = new Set(event.changedAssets.values());
        if (changedAssets.size === 0) return Promise.resolve(null);
        let queue = new (0, $5HoLl$parcelutils.PromiseQueue)({
            maxConcurrent: $9f01a40e8e16f757$var$FS_CONCURRENCY
        });
        for (let asset of changedAssets){
            if (asset.type !== 'js' && asset.type !== 'css') {
                // If all of the incoming dependencies of the asset actually resolve to a JS asset
                // rather than the original, we can mark the runtimes as changed instead. URL runtimes
                // have a cache busting query param added with HMR enabled which will trigger a reload.
                let runtimes = new Set();
                let incomingDeps = event.bundleGraph.getIncomingDependencies(asset);
                let isOnlyReferencedByRuntimes = incomingDeps.every((dep)=>{
                    let resolved = event.bundleGraph.getResolvedAsset(dep);
                    let isRuntime = resolved?.type === 'js' && resolved !== asset;
                    if (resolved && isRuntime) runtimes.add(resolved);
                    return isRuntime;
                });
                if (isOnlyReferencedByRuntimes) {
                    for (let runtime of runtimes)changedAssets.add(runtime);
                    continue;
                }
            }
            queue.add(async ()=>{
                let dependencies = event.bundleGraph.getDependencies(asset);
                let depsByBundle = {};
                for (let bundle of event.bundleGraph.getBundlesWithAsset(asset)){
                    let deps = {};
                    for (let dep of dependencies){
                        let resolved = event.bundleGraph.getResolvedAsset(dep, bundle);
                        if (resolved) deps[$9f01a40e8e16f757$var$getSpecifier(dep)] = event.bundleGraph.getAssetPublicId(resolved);
                    }
                    depsByBundle[bundle.id] = deps;
                }
                return {
                    id: event.bundleGraph.getAssetPublicId(asset),
                    url: this.getSourceURL(asset),
                    type: asset.type,
                    // No need to send the contents of non-JS assets to the client.
                    output: asset.type === 'js' ? await this.getHotAssetContents(asset) : '',
                    envHash: asset.env.id,
                    outputFormat: asset.env.outputFormat,
                    depsByBundle: depsByBundle
                };
            });
        }
        let assets = await queue.run();
        if (assets.length >= $9f01a40e8e16f757$var$BROADCAST_MAX_ASSETS) // Too many assets to send via an update without errors, just reload instead
        return {
            type: 'reload'
        };
        else if (assets.length > 0) return {
            type: 'update',
            assets: assets
        };
    }
    async getHotAssetContents(asset) {
        let output = await asset.getCode();
        let bundleGraph = (0, (/*@__PURE__*/$parcel$interopDefault($451c2a817f483539$exports)))(this.event).bundleGraph;
        if (asset.type === 'js') {
            let publicId = bundleGraph.getAssetPublicId(asset);
            output = `parcelHotUpdate['${publicId}'] = function (require, module, exports) {${output}}`;
        }
        let sourcemap = await asset.getMap();
        if (sourcemap) {
            let sourcemapStringified = await sourcemap.stringify({
                format: 'inline',
                sourceRoot: (asset.env.isNode() ? this.options.projectRoot : (0, $fd5a43f1e3e7c0f2$export$48c584f74c55688f)) + '/',
                // $FlowFixMe
                fs: asset.fs
            });
            (0, ($parcel$interopDefault($5HoLl$assert)))(typeof sourcemapStringified === 'string');
            output += `\n//# sourceMappingURL=${sourcemapStringified}`;
            output += `\n//# sourceURL=${encodeURI(this.getSourceURL(asset))}\n`;
        }
        return output;
    }
    getSourceURLEndpoint() {
        let origin = '';
        if (!this.options.devServer || // $FlowFixMe
        this.bundleGraph?.getEntryBundles().some((b)=>b.env.isServer())) origin = `http://${this.options.host || 'localhost'}:${this.options.port}`;
        return origin + $9f01a40e8e16f757$var$HMR_ENDPOINT + '/';
    }
    getSourceURL(asset) {
        return this.getSourceURLEndpoint() + asset.id;
    }
    handleSocketError(err) {
        if (err.code === 'ECONNRESET') // This gets triggered on page refresh, ignore this
        return;
        this.options.logger.warn({
            origin: '@parcel/reporter-dev-server',
            message: `[${err.code}]: ${err.message}`,
            stack: err.stack
        });
    }
    broadcast(msg) {
        const json = JSON.stringify(msg);
        for (let ws of this.wss.clients)ws.send(json);
    }
    async serveCodeFrame(req, res) {
        let distDir = this.options.distDir;
        if (!distDir) {
            res.statusCode = 500;
            res.end();
            return;
        }
        // $FlowFixMe
        let webRequest = new Request('http://localhost' + req.url, {
            method: 'POST',
            headers: req.headers,
            // $FlowFixMe
            body: (0, $5HoLl$stream.Readable).toWeb(req),
            duplex: 'half'
        });
        let json = await webRequest.json();
        let sourceMaps = new Map();
        for (let frame of json.frames)try {
            if (frame.fileName) {
                let map;
                let location = this.findSourceMap(frame.fileName);
                if (location.type === 'bundle') {
                    // Read the corresponding source map for the bundle.
                    if (!sourceMaps.has(location)) {
                        let contents = await this.options.outputFS.readFile(location.filePath + '.map', 'utf8');
                        let sm = new (0, ($parcel$interopDefault($5HoLl$parcelsourcemap)))(this.options.projectRoot);
                        sm.addVLQMap(JSON.parse(contents));
                        sourceMaps.set(location, sm);
                    }
                    map = sourceMaps.get(location);
                    let contents = await this.options.outputFS.readFile(location.filePath, 'utf8');
                    frame.compiledLines = $9f01a40e8e16f757$var$getCodeFrame(frame.lineNumber, frame.columnNumber, contents, json.contextLines, (0, ($parcel$interopDefault($5HoLl$path))).extname(location.filePath).slice(1));
                    frame.fileName = (0, $5HoLl$parcelutils.normalizeSeparators)((0, ($parcel$interopDefault($5HoLl$path))).relative(this.options.projectRoot, location.filePath));
                } else if (location.type === 'asset') {
                    // Get source map from the asset.
                    let contents = await location.asset.getCode();
                    frame.compiledLines = $9f01a40e8e16f757$var$getCodeFrame(frame.lineNumber, frame.columnNumber, contents, json.contextLines, location.asset.type);
                    frame.fileName = (0, $5HoLl$parcelutils.normalizeSeparators)((0, ($parcel$interopDefault($5HoLl$path))).relative(this.options.projectRoot, location.asset.filePath));
                    map = await location.asset.getMap();
                    if (!map) throw new Error('Asset does not have a source map');
                }
                if (map && frame.lineNumber != null) {
                    // Find the original location in the source map.
                    let mapping = map.findClosestMapping(frame.lineNumber, frame.columnNumber);
                    if (mapping) {
                        let sourceFileName = mapping.source;
                        let source = sourceFileName ? map.getSourceContent(sourceFileName) || '' : '';
                        if (mapping.original && sourceFileName) {
                            frame.sourceLineNumber = mapping.original.line;
                            frame.sourceColumnNumber = mapping.original.column;
                            frame.sourceLines = $9f01a40e8e16f757$var$getCodeFrame(mapping.original.line, mapping.original.column + 1, source, json.contextLines, (0, ($parcel$interopDefault($5HoLl$path))).extname(source).slice(1));
                            frame.sourceFileName = (0, $5HoLl$parcelutils.normalizeSeparators)(sourceFileName);
                        }
                    }
                } else if (location.type === 'source') {
                    // This is already a source location. Generate a code frame.
                    frame.fileName = (0, $5HoLl$parcelutils.normalizeSeparators)((0, ($parcel$interopDefault($5HoLl$path))).relative(this.options.projectRoot, location.filePath));
                    frame.sourceFileName = frame.fileName;
                    frame.sourceLineNumber = frame.lineNumber;
                    frame.sourceColumnNumber = frame.columnNumber;
                    let contents = await this.options.outputFS.readFile(location.filePath, 'utf8');
                    frame.sourceLines = $9f01a40e8e16f757$var$getCodeFrame(frame.lineNumber, frame.columnNumber, contents, json.contextLines, (0, ($parcel$interopDefault($5HoLl$path))).extname(location.filePath).slice(1));
                }
            }
        } catch (err) {
            continue;
        }
        res.setHeader('Content-Type', 'application/json');
        res.end(JSON.stringify(json.frames));
    }
    async getSourceMapContents(filePath) {
        let location = await this.findSourceMap(filePath);
        if (location.type === 'bundle') return this.options.outputFS.readFile(location.filePath + '.map', 'utf8');
        let map;
        if (location.type === 'source') {
            // Return an empty source map
            map = new (0, ($parcel$interopDefault($5HoLl$parcelsourcemap)))(this.options.projectRoot);
            let contents = await this.options.inputFS.readFile(location.filePath, 'utf8');
            map.addEmptyMap(location.filePath, contents);
        } else {
            map = await location.asset.getMap();
            if (!map) throw new Error('Asset does not have a source map');
        }
        let sourcemapStringified = await map.stringify({
            format: 'string',
            sourceRoot: (0, $fd5a43f1e3e7c0f2$export$48c584f74c55688f) + '/',
            // $FlowFixMe
            fs: this.options.inputFS
        });
        (0, ($parcel$interopDefault($5HoLl$assert)))(typeof sourcemapStringified === 'string');
        return sourcemapStringified;
    }
    findSourceMap(filePath) {
        let distDir = this.options.distDir;
        if (!distDir) throw new Error('Must have a distDir');
        let event = this.event;
        (0, ($parcel$interopDefault($5HoLl$assert)))(event?.type === 'buildSuccess');
        // React generates URLs like rsc://React/Server/file:///foo/bar
        if (filePath.startsWith('rsc://')) {
            let url = new URL(filePath);
            let index = url.pathname.indexOf('/', 1);
            if (index >= 0) filePath = url.pathname.slice(index + 1);
            else throw new Error('Unexpected RSC URL');
        }
        // Remove public url prefix first, in case it has a protocol/origin.
        let publicUrl = this.options.publicUrl;
        if (publicUrl.endsWith('/')) publicUrl = publicUrl.slice(0, -1);
        if (publicUrl.length > 0 && filePath.startsWith(publicUrl + '/')) filePath = filePath.slice(publicUrl.length + 1);
        // Get path from URL.
        if (filePath.startsWith('file://')) filePath = (0, $5HoLl$url.fileURLToPath)(filePath);
        else {
            if (/^https?:\/\//.test(filePath)) {
                let url = new URL(filePath);
                filePath = url.pathname.slice(1);
            }
            // If public url is just a subpath, strip it.
            if (publicUrl.length > 0 && filePath.startsWith(publicUrl)) filePath = filePath.slice(publicUrl.length);
        }
        // If url starts with /__parcel_hmr, get source map by asset id.
        let hmrEndpoint = this.getSourceURLEndpoint();
        if (filePath.startsWith(hmrEndpoint)) {
            let id = filePath.slice(hmrEndpoint.length);
            return {
                type: 'asset',
                asset: event.bundleGraph.getAssetById(id)
            };
        }
        if (filePath.startsWith('/') || (0, ($parcel$interopDefault($5HoLl$path))).isAbsolute(filePath)) filePath = (0, ($parcel$interopDefault($5HoLl$path))).normalize(filePath);
        else filePath = (0, ($parcel$interopDefault($5HoLl$path))).join(distDir, filePath);
        // If the file is inside the distDir, it's a bundle path.
        if ((0, $5HoLl$parcelutils.isDirectoryInside)(filePath, distDir)) return {
            type: 'bundle',
            filePath: filePath
        };
        // Otherwise, assume this refers to a source file.
        // This can happen if the server uses --enable-source-maps,
        // in which case Node will have already mapped the location.
        if ((0, $5HoLl$parcelutils.isDirectoryInside)(filePath, this.options.projectRoot)) return {
            type: 'source',
            filePath: filePath
        };
        throw new Error('Source map not found');
    }
}
function $9f01a40e8e16f757$var$getSpecifier(dep) {
    if (typeof dep.meta.placeholder === 'string') return dep.meta.placeholder;
    return dep.specifier;
}
function $9f01a40e8e16f757$var$getCodeFrame(line, column, source, contextLines, language) {
    return (0, ($parcel$interopDefault($5HoLl$parcelcodeframe)))(source, [
        {
            start: {
                line: line,
                column: column
            },
            end: {
                line: line,
                column: column
            }
        }
    ], {
        useColor: true,
        syntaxHighlighting: true,
        padding: {
            before: contextLines,
            after: contextLines
        },
        language: language
    });
}





var $b8d743f08e21ab6a$exports = {};
/**
The default maximum length of a `TreeBuffer` node.
*/ const $8cd8e2c17e3ae471$export$de305a849879ffa = 1024;
let $8cd8e2c17e3ae471$var$nextPropID = 0;
class $8cd8e2c17e3ae471$var$Range {
    constructor(from, to){
        this.from = from;
        this.to = to;
    }
}
/**
Each [node type](#common.NodeType) or [individual tree](#common.Tree)
can have metadata associated with it in props. Instances of this
class represent prop names.
*/ class $8cd8e2c17e3ae471$export$b8034b9bc18acd90 {
    /**
    Create a new node prop type.
    */ constructor(config = {}){
        this.id = $8cd8e2c17e3ae471$var$nextPropID++;
        this.perNode = !!config.perNode;
        this.deserialize = config.deserialize || (()=>{
            throw new Error("This node type doesn't define a deserialize function");
        });
    }
    /**
    This is meant to be used with
    [`NodeSet.extend`](#common.NodeSet.extend) or
    [`LRParser.configure`](#lr.ParserConfig.props) to compute
    prop values for each node type in the set. Takes a [match
    object](#common.NodeType^match) or function that returns undefined
    if the node type doesn't get this prop, and the prop's value if
    it does.
    */ add(match) {
        if (this.perNode) throw new RangeError("Can't add per-node props to node types");
        if (typeof match != "function") match = $8cd8e2c17e3ae471$export$f06e977173f1857c.match(match);
        return (type)=>{
            let result = match(type);
            return result === undefined ? null : [
                this,
                result
            ];
        };
    }
}
/**
Prop that is used to describe matching delimiters. For opening
delimiters, this holds an array of node names (written as a
space-separated string when declaring this prop in a grammar)
for the node types of closing delimiters that match it.
*/ $8cd8e2c17e3ae471$export$b8034b9bc18acd90.closedBy = new $8cd8e2c17e3ae471$export$b8034b9bc18acd90({
    deserialize: (str)=>str.split(" ")
});
/**
The inverse of [`closedBy`](#common.NodeProp^closedBy). This is
attached to closing delimiters, holding an array of node names
of types of matching opening delimiters.
*/ $8cd8e2c17e3ae471$export$b8034b9bc18acd90.openedBy = new $8cd8e2c17e3ae471$export$b8034b9bc18acd90({
    deserialize: (str)=>str.split(" ")
});
/**
Used to assign node types to groups (for example, all node
types that represent an expression could be tagged with an
`"Expression"` group).
*/ $8cd8e2c17e3ae471$export$b8034b9bc18acd90.group = new $8cd8e2c17e3ae471$export$b8034b9bc18acd90({
    deserialize: (str)=>str.split(" ")
});
/**
Attached to nodes to indicate these should be
[displayed](https://codemirror.net/docs/ref/#language.syntaxTree)
in a bidirectional text isolate, so that direction-neutral
characters on their sides don't incorrectly get associated with
surrounding text. You'll generally want to set this for nodes
that contain arbitrary text, like strings and comments, and for
nodes that appear _inside_ arbitrary text, like HTML tags. When
not given a value, in a grammar declaration, defaults to
`"auto"`.
*/ $8cd8e2c17e3ae471$export$b8034b9bc18acd90.isolate = new $8cd8e2c17e3ae471$export$b8034b9bc18acd90({
    deserialize: (value)=>{
        if (value && value != "rtl" && value != "ltr" && value != "auto") throw new RangeError("Invalid value for isolate: " + value);
        return value || "auto";
    }
});
/**
The hash of the [context](#lr.ContextTracker.constructor)
that the node was parsed in, if any. Used to limit reuse of
contextual nodes.
*/ $8cd8e2c17e3ae471$export$b8034b9bc18acd90.contextHash = new $8cd8e2c17e3ae471$export$b8034b9bc18acd90({
    perNode: true
});
/**
The distance beyond the end of the node that the tokenizer
looked ahead for any of the tokens inside the node. (The LR
parser only stores this when it is larger than 25, for
efficiency reasons.)
*/ $8cd8e2c17e3ae471$export$b8034b9bc18acd90.lookAhead = new $8cd8e2c17e3ae471$export$b8034b9bc18acd90({
    perNode: true
});
/**
This per-node prop is used to replace a given node, or part of a
node, with another tree. This is useful to include trees from
different languages in mixed-language parsers.
*/ $8cd8e2c17e3ae471$export$b8034b9bc18acd90.mounted = new $8cd8e2c17e3ae471$export$b8034b9bc18acd90({
    perNode: true
});
/**
A mounted tree, which can be [stored](#common.NodeProp^mounted) on
a tree node to indicate that parts of its content are
represented by another tree.
*/ class $8cd8e2c17e3ae471$export$358cdd8bd77577cc {
    constructor(/**
    The inner tree.
    */ tree, /**
    If this is null, this tree replaces the entire node (it will
    be included in the regular iteration instead of its host
    node). If not, only the given ranges are considered to be
    covered by this tree. This is used for trees that are mixed in
    a way that isn't strictly hierarchical. Such mounted trees are
    only entered by [`resolveInner`](#common.Tree.resolveInner)
    and [`enter`](#common.SyntaxNode.enter).
    */ overlay, /**
    The parser used to create this subtree.
    */ parser){
        this.tree = tree;
        this.overlay = overlay;
        this.parser = parser;
    }
    /**
    @internal
    */ static get(tree) {
        return tree && tree.props && tree.props[$8cd8e2c17e3ae471$export$b8034b9bc18acd90.mounted.id];
    }
}
const $8cd8e2c17e3ae471$var$noProps = Object.create(null);
/**
Each node in a syntax tree has a node type associated with it.
*/ class $8cd8e2c17e3ae471$export$f06e977173f1857c {
    /**
    @internal
    */ constructor(/**
    The name of the node type. Not necessarily unique, but if the
    grammar was written properly, different node types with the
    same name within a node set should play the same semantic
    role.
    */ name, /**
    @internal
    */ props, /**
    The id of this node in its set. Corresponds to the term ids
    used in the parser.
    */ id, /**
    @internal
    */ flags = 0){
        this.name = name;
        this.props = props;
        this.id = id;
        this.flags = flags;
    }
    /**
    Define a node type.
    */ static define(spec) {
        let props = spec.props && spec.props.length ? Object.create(null) : $8cd8e2c17e3ae471$var$noProps;
        let flags = (spec.top ? 1 /* NodeFlag.Top */  : 0) | (spec.skipped ? 2 /* NodeFlag.Skipped */  : 0) | (spec.error ? 4 /* NodeFlag.Error */  : 0) | (spec.name == null ? 8 /* NodeFlag.Anonymous */  : 0);
        let type = new $8cd8e2c17e3ae471$export$f06e977173f1857c(spec.name || "", props, spec.id, flags);
        if (spec.props) for (let src of spec.props){
            if (!Array.isArray(src)) src = src(type);
            if (src) {
                if (src[0].perNode) throw new RangeError("Can't store a per-node prop on a node type");
                props[src[0].id] = src[1];
            }
        }
        return type;
    }
    /**
    Retrieves a node prop for this type. Will return `undefined` if
    the prop isn't present on this node.
    */ prop(prop) {
        return this.props[prop.id];
    }
    /**
    True when this is the top node of a grammar.
    */ get isTop() {
        return (this.flags & 1 /* NodeFlag.Top */ ) > 0;
    }
    /**
    True when this node is produced by a skip rule.
    */ get isSkipped() {
        return (this.flags & 2 /* NodeFlag.Skipped */ ) > 0;
    }
    /**
    Indicates whether this is an error node.
    */ get isError() {
        return (this.flags & 4 /* NodeFlag.Error */ ) > 0;
    }
    /**
    When true, this node type doesn't correspond to a user-declared
    named node, for example because it is used to cache repetition.
    */ get isAnonymous() {
        return (this.flags & 8 /* NodeFlag.Anonymous */ ) > 0;
    }
    /**
    Returns true when this node's name or one of its
    [groups](#common.NodeProp^group) matches the given string.
    */ is(name) {
        if (typeof name == 'string') {
            if (this.name == name) return true;
            let group = this.prop($8cd8e2c17e3ae471$export$b8034b9bc18acd90.group);
            return group ? group.indexOf(name) > -1 : false;
        }
        return this.id == name;
    }
    /**
    Create a function from node types to arbitrary values by
    specifying an object whose property names are node or
    [group](#common.NodeProp^group) names. Often useful with
    [`NodeProp.add`](#common.NodeProp.add). You can put multiple
    names, separated by spaces, in a single property name to map
    multiple node names to a single value.
    */ static match(map) {
        let direct = Object.create(null);
        for(let prop in map)for (let name of prop.split(" "))direct[name] = map[prop];
        return (node)=>{
            for(let groups = node.prop($8cd8e2c17e3ae471$export$b8034b9bc18acd90.group), i = -1; i < (groups ? groups.length : 0); i++){
                let found = direct[i < 0 ? node.name : groups[i]];
                if (found) return found;
            }
        };
    }
}
/**
An empty dummy node type to use when no actual type is available.
*/ $8cd8e2c17e3ae471$export$f06e977173f1857c.none = new $8cd8e2c17e3ae471$export$f06e977173f1857c("", Object.create(null), 0, 8 /* NodeFlag.Anonymous */ );
/**
A node set holds a collection of node types. It is used to
compactly represent trees by storing their type ids, rather than a
full pointer to the type object, in a numeric array. Each parser
[has](#lr.LRParser.nodeSet) a node set, and [tree
buffers](#common.TreeBuffer) can only store collections of nodes
from the same set. A set can have a maximum of 2**16 (65536) node
types in it, so that the ids fit into 16-bit typed array slots.
*/ class $8cd8e2c17e3ae471$export$7fad5fb00d8de02c {
    /**
    Create a set with the given types. The `id` property of each
    type should correspond to its position within the array.
    */ constructor(/**
    The node types in this set, by id.
    */ types){
        this.types = types;
        for(let i = 0; i < types.length; i++)if (types[i].id != i) throw new RangeError("Node type ids should correspond to array positions when creating a node set");
    }
    /**
    Create a copy of this set with some node properties added. The
    arguments to this method can be created with
    [`NodeProp.add`](#common.NodeProp.add).
    */ extend(...props) {
        let newTypes = [];
        for (let type of this.types){
            let newProps = null;
            for (let source of props){
                let add = source(type);
                if (add) {
                    if (!newProps) newProps = Object.assign({}, type.props);
                    newProps[add[0].id] = add[1];
                }
            }
            newTypes.push(newProps ? new $8cd8e2c17e3ae471$export$f06e977173f1857c(type.name, newProps, type.id, type.flags) : type);
        }
        return new $8cd8e2c17e3ae471$export$7fad5fb00d8de02c(newTypes);
    }
}
const $8cd8e2c17e3ae471$var$CachedNode = new WeakMap(), $8cd8e2c17e3ae471$var$CachedInnerNode = new WeakMap();
/**
Options that control iteration. Can be combined with the `|`
operator to enable multiple ones.
*/ var $8cd8e2c17e3ae471$export$b0e28367f55837aa;
(function(IterMode) {
    /**
    When enabled, iteration will only visit [`Tree`](#common.Tree)
    objects, not nodes packed into
    [`TreeBuffer`](#common.TreeBuffer)s.
    */ IterMode[IterMode["ExcludeBuffers"] = 1] = "ExcludeBuffers";
    /**
    Enable this to make iteration include anonymous nodes (such as
    the nodes that wrap repeated grammar constructs into a balanced
    tree).
    */ IterMode[IterMode["IncludeAnonymous"] = 2] = "IncludeAnonymous";
    /**
    By default, regular [mounted](#common.NodeProp^mounted) nodes
    replace their base node in iteration. Enable this to ignore them
    instead.
    */ IterMode[IterMode["IgnoreMounts"] = 4] = "IgnoreMounts";
    /**
    This option only applies in
    [`enter`](#common.SyntaxNode.enter)-style methods. It tells the
    library to not enter mounted overlays if one covers the given
    position.
    */ IterMode[IterMode["IgnoreOverlays"] = 8] = "IgnoreOverlays";
})($8cd8e2c17e3ae471$export$b0e28367f55837aa || ($8cd8e2c17e3ae471$export$b0e28367f55837aa = {}));
/**
A piece of syntax tree. There are two ways to approach these
trees: the way they are actually stored in memory, and the
convenient way.

Syntax trees are stored as a tree of `Tree` and `TreeBuffer`
objects. By packing detail information into `TreeBuffer` leaf
nodes, the representation is made a lot more memory-efficient.

However, when you want to actually work with tree nodes, this
representation is very awkward, so most client code will want to
use the [`TreeCursor`](#common.TreeCursor) or
[`SyntaxNode`](#common.SyntaxNode) interface instead, which provides
a view on some part of this data structure, and can be used to
move around to adjacent nodes.
*/ class $8cd8e2c17e3ae471$export$7fbedc92909ed28e {
    /**
    Construct a new tree. See also [`Tree.build`](#common.Tree^build).
    */ constructor(/**
    The type of the top node.
    */ type, /**
    This node's child nodes.
    */ children, /**
    The positions (offsets relative to the start of this tree) of
    the children.
    */ positions, /**
    The total length of this tree
    */ length, /**
    Per-node [node props](#common.NodeProp) to associate with this node.
    */ props){
        this.type = type;
        this.children = children;
        this.positions = positions;
        this.length = length;
        /**
        @internal
        */ this.props = null;
        if (props && props.length) {
            this.props = Object.create(null);
            for (let [prop, value] of props)this.props[typeof prop == "number" ? prop : prop.id] = value;
        }
    }
    /**
    @internal
    */ toString() {
        let mounted = $8cd8e2c17e3ae471$export$358cdd8bd77577cc.get(this);
        if (mounted && !mounted.overlay) return mounted.tree.toString();
        let children = "";
        for (let ch of this.children){
            let str = ch.toString();
            if (str) {
                if (children) children += ",";
                children += str;
            }
        }
        return !this.type.name ? children : (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (children.length ? "(" + children + ")" : "");
    }
    /**
    Get a [tree cursor](#common.TreeCursor) positioned at the top of
    the tree. Mode can be used to [control](#common.IterMode) which
    nodes the cursor visits.
    */ cursor(mode = 0) {
        return new $8cd8e2c17e3ae471$export$3ae4554f36e54a34(this.topNode, mode);
    }
    /**
    Get a [tree cursor](#common.TreeCursor) pointing into this tree
    at the given position and side (see
    [`moveTo`](#common.TreeCursor.moveTo).
    */ cursorAt(pos, side = 0, mode = 0) {
        let scope = $8cd8e2c17e3ae471$var$CachedNode.get(this) || this.topNode;
        let cursor = new $8cd8e2c17e3ae471$export$3ae4554f36e54a34(scope);
        cursor.moveTo(pos, side);
        $8cd8e2c17e3ae471$var$CachedNode.set(this, cursor._tree);
        return cursor;
    }
    /**
    Get a [syntax node](#common.SyntaxNode) object for the top of the
    tree.
    */ get topNode() {
        return new $8cd8e2c17e3ae471$var$TreeNode(this, 0, 0, null);
    }
    /**
    Get the [syntax node](#common.SyntaxNode) at the given position.
    If `side` is -1, this will move into nodes that end at the
    position. If 1, it'll move into nodes that start at the
    position. With 0, it'll only enter nodes that cover the position
    from both sides.
    
    Note that this will not enter
    [overlays](#common.MountedTree.overlay), and you often want
    [`resolveInner`](#common.Tree.resolveInner) instead.
    */ resolve(pos, side = 0) {
        let node = $8cd8e2c17e3ae471$var$resolveNode($8cd8e2c17e3ae471$var$CachedNode.get(this) || this.topNode, pos, side, false);
        $8cd8e2c17e3ae471$var$CachedNode.set(this, node);
        return node;
    }
    /**
    Like [`resolve`](#common.Tree.resolve), but will enter
    [overlaid](#common.MountedTree.overlay) nodes, producing a syntax node
    pointing into the innermost overlaid tree at the given position
    (with parent links going through all parent structure, including
    the host trees).
    */ resolveInner(pos, side = 0) {
        let node = $8cd8e2c17e3ae471$var$resolveNode($8cd8e2c17e3ae471$var$CachedInnerNode.get(this) || this.topNode, pos, side, true);
        $8cd8e2c17e3ae471$var$CachedInnerNode.set(this, node);
        return node;
    }
    /**
    In some situations, it can be useful to iterate through all
    nodes around a position, including those in overlays that don't
    directly cover the position. This method gives you an iterator
    that will produce all nodes, from small to big, around the given
    position.
    */ resolveStack(pos, side = 0) {
        return $8cd8e2c17e3ae471$var$stackIterator(this, pos, side);
    }
    /**
    Iterate over the tree and its children, calling `enter` for any
    node that touches the `from`/`to` region (if given) before
    running over such a node's children, and `leave` (if given) when
    leaving the node. When `enter` returns `false`, that node will
    not have its children iterated over (or `leave` called).
    */ iterate(spec) {
        let { enter: enter, leave: leave, from: from = 0, to: to = this.length } = spec;
        let mode = spec.mode || 0, anon = (mode & $8cd8e2c17e3ae471$export$b0e28367f55837aa.IncludeAnonymous) > 0;
        for(let c = this.cursor(mode | $8cd8e2c17e3ae471$export$b0e28367f55837aa.IncludeAnonymous);;){
            let entered = false;
            if (c.from <= to && c.to >= from && (!anon && c.type.isAnonymous || enter(c) !== false)) {
                if (c.firstChild()) continue;
                entered = true;
            }
            for(;;){
                if (entered && leave && (anon || !c.type.isAnonymous)) leave(c);
                if (c.nextSibling()) break;
                if (!c.parent()) return;
                entered = true;
            }
        }
    }
    /**
    Get the value of the given [node prop](#common.NodeProp) for this
    node. Works with both per-node and per-type props.
    */ prop(prop) {
        return !prop.perNode ? this.type.prop(prop) : this.props ? this.props[prop.id] : undefined;
    }
    /**
    Returns the node's [per-node props](#common.NodeProp.perNode) in a
    format that can be passed to the [`Tree`](#common.Tree)
    constructor.
    */ get propValues() {
        let result = [];
        if (this.props) for(let id in this.props)result.push([
            +id,
            this.props[id]
        ]);
        return result;
    }
    /**
    Balance the direct children of this tree, producing a copy of
    which may have children grouped into subtrees with type
    [`NodeType.none`](#common.NodeType^none).
    */ balance(config = {}) {
        return this.children.length <= 8 /* Balance.BranchFactor */  ? this : $8cd8e2c17e3ae471$var$balanceRange($8cd8e2c17e3ae471$export$f06e977173f1857c.none, this.children, this.positions, 0, this.children.length, 0, this.length, (children, positions, length)=>new $8cd8e2c17e3ae471$export$7fbedc92909ed28e(this.type, children, positions, length, this.propValues), config.makeTree || ((children, positions, length)=>new $8cd8e2c17e3ae471$export$7fbedc92909ed28e($8cd8e2c17e3ae471$export$f06e977173f1857c.none, children, positions, length)));
    }
    /**
    Build a tree from a postfix-ordered buffer of node information,
    or a cursor over such a buffer.
    */ static build(data) {
        return $8cd8e2c17e3ae471$var$buildTree(data);
    }
}
/**
The empty tree
*/ $8cd8e2c17e3ae471$export$7fbedc92909ed28e.empty = new $8cd8e2c17e3ae471$export$7fbedc92909ed28e($8cd8e2c17e3ae471$export$f06e977173f1857c.none, [], [], 0);
class $8cd8e2c17e3ae471$var$FlatBufferCursor {
    constructor(buffer, index){
        this.buffer = buffer;
        this.index = index;
    }
    get id() {
        return this.buffer[this.index - 4];
    }
    get start() {
        return this.buffer[this.index - 3];
    }
    get end() {
        return this.buffer[this.index - 2];
    }
    get size() {
        return this.buffer[this.index - 1];
    }
    get pos() {
        return this.index;
    }
    next() {
        this.index -= 4;
    }
    fork() {
        return new $8cd8e2c17e3ae471$var$FlatBufferCursor(this.buffer, this.index);
    }
}
/**
Tree buffers contain (type, start, end, endIndex) quads for each
node. In such a buffer, nodes are stored in prefix order (parents
before children, with the endIndex of the parent indicating which
children belong to it).
*/ class $8cd8e2c17e3ae471$export$33300581b70be371 {
    /**
    Create a tree buffer.
    */ constructor(/**
    The buffer's content.
    */ buffer, /**
    The total length of the group of nodes in the buffer.
    */ length, /**
    The node set used in this buffer.
    */ set){
        this.buffer = buffer;
        this.length = length;
        this.set = set;
    }
    /**
    @internal
    */ get type() {
        return $8cd8e2c17e3ae471$export$f06e977173f1857c.none;
    }
    /**
    @internal
    */ toString() {
        let result = [];
        for(let index = 0; index < this.buffer.length;){
            result.push(this.childString(index));
            index = this.buffer[index + 3];
        }
        return result.join(",");
    }
    /**
    @internal
    */ childString(index) {
        let id = this.buffer[index], endIndex = this.buffer[index + 3];
        let type = this.set.types[id], result = type.name;
        if (/\W/.test(result) && !type.isError) result = JSON.stringify(result);
        index += 4;
        if (endIndex == index) return result;
        let children = [];
        while(index < endIndex){
            children.push(this.childString(index));
            index = this.buffer[index + 3];
        }
        return result + "(" + children.join(",") + ")";
    }
    /**
    @internal
    */ findChild(startIndex, endIndex, dir, pos, side) {
        let { buffer: buffer } = this, pick = -1;
        for(let i = startIndex; i != endIndex; i = buffer[i + 3])if ($8cd8e2c17e3ae471$var$checkSide(side, pos, buffer[i + 1], buffer[i + 2])) {
            pick = i;
            if (dir > 0) break;
        }
        return pick;
    }
    /**
    @internal
    */ slice(startI, endI, from) {
        let b = this.buffer;
        let copy = new Uint16Array(endI - startI), len = 0;
        for(let i = startI, j = 0; i < endI;){
            copy[j++] = b[i++];
            copy[j++] = b[i++] - from;
            let to = copy[j++] = b[i++] - from;
            copy[j++] = b[i++] - startI;
            len = Math.max(len, to);
        }
        return new $8cd8e2c17e3ae471$export$33300581b70be371(copy, len, this.set);
    }
}
function $8cd8e2c17e3ae471$var$checkSide(side, pos, from, to) {
    switch(side){
        case -2 /* Side.Before */ :
            return from < pos;
        case -1 /* Side.AtOrBefore */ :
            return to >= pos && from < pos;
        case 0 /* Side.Around */ :
            return from < pos && to > pos;
        case 1 /* Side.AtOrAfter */ :
            return from <= pos && to > pos;
        case 2 /* Side.After */ :
            return to > pos;
        case 4 /* Side.DontCare */ :
            return true;
    }
}
function $8cd8e2c17e3ae471$var$resolveNode(node, pos, side, overlays) {
    var _a;
    // Move up to a node that actually holds the position, if possible
    while(node.from == node.to || (side < 1 ? node.from >= pos : node.from > pos) || (side > -1 ? node.to <= pos : node.to < pos)){
        let parent = !overlays && node instanceof $8cd8e2c17e3ae471$var$TreeNode && node.index < 0 ? null : node.parent;
        if (!parent) return node;
        node = parent;
    }
    let mode = overlays ? 0 : $8cd8e2c17e3ae471$export$b0e28367f55837aa.IgnoreOverlays;
    // Must go up out of overlays when those do not overlap with pos
    if (overlays) {
        for(let scan = node, parent = scan.parent; parent; scan = parent, parent = scan.parent)if (scan instanceof $8cd8e2c17e3ae471$var$TreeNode && scan.index < 0 && ((_a = parent.enter(pos, side, mode)) === null || _a === void 0 ? void 0 : _a.from) != scan.from) node = parent;
    }
    for(;;){
        let inner = node.enter(pos, side, mode);
        if (!inner) return node;
        node = inner;
    }
}
class $8cd8e2c17e3ae471$var$BaseNode {
    cursor(mode = 0) {
        return new $8cd8e2c17e3ae471$export$3ae4554f36e54a34(this, mode);
    }
    getChild(type, before = null, after = null) {
        let r = $8cd8e2c17e3ae471$var$getChildren(this, type, before, after);
        return r.length ? r[0] : null;
    }
    getChildren(type, before = null, after = null) {
        return $8cd8e2c17e3ae471$var$getChildren(this, type, before, after);
    }
    resolve(pos, side = 0) {
        return $8cd8e2c17e3ae471$var$resolveNode(this, pos, side, false);
    }
    resolveInner(pos, side = 0) {
        return $8cd8e2c17e3ae471$var$resolveNode(this, pos, side, true);
    }
    matchContext(context) {
        return $8cd8e2c17e3ae471$var$matchNodeContext(this.parent, context);
    }
    enterUnfinishedNodesBefore(pos) {
        let scan = this.childBefore(pos), node = this;
        while(scan){
            let last = scan.lastChild;
            if (!last || last.to != scan.to) break;
            if (last.type.isError && last.from == last.to) {
                node = scan;
                scan = last.prevSibling;
            } else scan = last;
        }
        return node;
    }
    get node() {
        return this;
    }
    get next() {
        return this.parent;
    }
}
class $8cd8e2c17e3ae471$var$TreeNode extends $8cd8e2c17e3ae471$var$BaseNode {
    constructor(_tree, from, // Index in parent node, set to -1 if the node is not a direct child of _parent.node (overlay)
    index, _parent){
        super();
        this._tree = _tree;
        this.from = from;
        this.index = index;
        this._parent = _parent;
    }
    get type() {
        return this._tree.type;
    }
    get name() {
        return this._tree.type.name;
    }
    get to() {
        return this.from + this._tree.length;
    }
    nextChild(i, dir, pos, side, mode = 0) {
        for(let parent = this;;){
            for(let { children: children, positions: positions } = parent._tree, e = dir > 0 ? children.length : -1; i != e; i += dir){
                let next = children[i], start = positions[i] + parent.from;
                if (!$8cd8e2c17e3ae471$var$checkSide(side, pos, start, start + next.length)) continue;
                if (next instanceof $8cd8e2c17e3ae471$export$33300581b70be371) {
                    if (mode & $8cd8e2c17e3ae471$export$b0e28367f55837aa.ExcludeBuffers) continue;
                    let index = next.findChild(0, next.buffer.length, dir, pos - start, side);
                    if (index > -1) return new $8cd8e2c17e3ae471$var$BufferNode(new $8cd8e2c17e3ae471$var$BufferContext(parent, next, i, start), null, index);
                } else if (mode & $8cd8e2c17e3ae471$export$b0e28367f55837aa.IncludeAnonymous || !next.type.isAnonymous || $8cd8e2c17e3ae471$var$hasChild(next)) {
                    let mounted;
                    if (!(mode & $8cd8e2c17e3ae471$export$b0e28367f55837aa.IgnoreMounts) && (mounted = $8cd8e2c17e3ae471$export$358cdd8bd77577cc.get(next)) && !mounted.overlay) return new $8cd8e2c17e3ae471$var$TreeNode(mounted.tree, start, i, parent);
                    let inner = new $8cd8e2c17e3ae471$var$TreeNode(next, start, i, parent);
                    return mode & $8cd8e2c17e3ae471$export$b0e28367f55837aa.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side);
                }
            }
            if (mode & $8cd8e2c17e3ae471$export$b0e28367f55837aa.IncludeAnonymous || !parent.type.isAnonymous) return null;
            if (parent.index >= 0) i = parent.index + dir;
            else i = dir < 0 ? -1 : parent._parent._tree.children.length;
            parent = parent._parent;
            if (!parent) return null;
        }
    }
    get firstChild() {
        return this.nextChild(0, 1, 0, 4 /* Side.DontCare */ );
    }
    get lastChild() {
        return this.nextChild(this._tree.children.length - 1, -1, 0, 4 /* Side.DontCare */ );
    }
    childAfter(pos) {
        return this.nextChild(0, 1, pos, 2 /* Side.After */ );
    }
    childBefore(pos) {
        return this.nextChild(this._tree.children.length - 1, -1, pos, -2 /* Side.Before */ );
    }
    enter(pos, side, mode = 0) {
        let mounted;
        if (!(mode & $8cd8e2c17e3ae471$export$b0e28367f55837aa.IgnoreOverlays) && (mounted = $8cd8e2c17e3ae471$export$358cdd8bd77577cc.get(this._tree)) && mounted.overlay) {
            let rPos = pos - this.from;
            for (let { from: from, to: to } of mounted.overlay){
                if ((side > 0 ? from <= rPos : from < rPos) && (side < 0 ? to >= rPos : to > rPos)) return new $8cd8e2c17e3ae471$var$TreeNode(mounted.tree, mounted.overlay[0].from + this.from, -1, this);
            }
        }
        return this.nextChild(0, 1, pos, side, mode);
    }
    nextSignificantParent() {
        let val = this;
        while(val.type.isAnonymous && val._parent)val = val._parent;
        return val;
    }
    get parent() {
        return this._parent ? this._parent.nextSignificantParent() : null;
    }
    get nextSibling() {
        return this._parent && this.index >= 0 ? this._parent.nextChild(this.index + 1, 1, 0, 4 /* Side.DontCare */ ) : null;
    }
    get prevSibling() {
        return this._parent && this.index >= 0 ? this._parent.nextChild(this.index - 1, -1, 0, 4 /* Side.DontCare */ ) : null;
    }
    get tree() {
        return this._tree;
    }
    toTree() {
        return this._tree;
    }
    /**
    @internal
    */ toString() {
        return this._tree.toString();
    }
}
function $8cd8e2c17e3ae471$var$getChildren(node, type, before, after) {
    let cur = node.cursor(), result = [];
    if (!cur.firstChild()) return result;
    if (before != null) for(let found = false; !found;){
        found = cur.type.is(before);
        if (!cur.nextSibling()) return result;
    }
    for(;;){
        if (after != null && cur.type.is(after)) return result;
        if (cur.type.is(type)) result.push(cur.node);
        if (!cur.nextSibling()) return after == null ? result : [];
    }
}
function $8cd8e2c17e3ae471$var$matchNodeContext(node, context, i = context.length - 1) {
    for(let p = node; i >= 0; p = p.parent){
        if (!p) return false;
        if (!p.type.isAnonymous) {
            if (context[i] && context[i] != p.name) return false;
            i--;
        }
    }
    return true;
}
class $8cd8e2c17e3ae471$var$BufferContext {
    constructor(parent, buffer, index, start){
        this.parent = parent;
        this.buffer = buffer;
        this.index = index;
        this.start = start;
    }
}
class $8cd8e2c17e3ae471$var$BufferNode extends $8cd8e2c17e3ae471$var$BaseNode {
    get name() {
        return this.type.name;
    }
    get from() {
        return this.context.start + this.context.buffer.buffer[this.index + 1];
    }
    get to() {
        return this.context.start + this.context.buffer.buffer[this.index + 2];
    }
    constructor(context, _parent, index){
        super();
        this.context = context;
        this._parent = _parent;
        this.index = index;
        this.type = context.buffer.set.types[context.buffer.buffer[index]];
    }
    child(dir, pos, side) {
        let { buffer: buffer } = this.context;
        let index = buffer.findChild(this.index + 4, buffer.buffer[this.index + 3], dir, pos - this.context.start, side);
        return index < 0 ? null : new $8cd8e2c17e3ae471$var$BufferNode(this.context, this, index);
    }
    get firstChild() {
        return this.child(1, 0, 4 /* Side.DontCare */ );
    }
    get lastChild() {
        return this.child(-1, 0, 4 /* Side.DontCare */ );
    }
    childAfter(pos) {
        return this.child(1, pos, 2 /* Side.After */ );
    }
    childBefore(pos) {
        return this.child(-1, pos, -2 /* Side.Before */ );
    }
    enter(pos, side, mode = 0) {
        if (mode & $8cd8e2c17e3ae471$export$b0e28367f55837aa.ExcludeBuffers) return null;
        let { buffer: buffer } = this.context;
        let index = buffer.findChild(this.index + 4, buffer.buffer[this.index + 3], side > 0 ? 1 : -1, pos - this.context.start, side);
        return index < 0 ? null : new $8cd8e2c17e3ae471$var$BufferNode(this.context, this, index);
    }
    get parent() {
        return this._parent || this.context.parent.nextSignificantParent();
    }
    externalSibling(dir) {
        return this._parent ? null : this.context.parent.nextChild(this.context.index + dir, dir, 0, 4 /* Side.DontCare */ );
    }
    get nextSibling() {
        let { buffer: buffer } = this.context;
        let after = buffer.buffer[this.index + 3];
        if (after < (this._parent ? buffer.buffer[this._parent.index + 3] : buffer.buffer.length)) return new $8cd8e2c17e3ae471$var$BufferNode(this.context, this._parent, after);
        return this.externalSibling(1);
    }
    get prevSibling() {
        let { buffer: buffer } = this.context;
        let parentStart = this._parent ? this._parent.index + 4 : 0;
        if (this.index == parentStart) return this.externalSibling(-1);
        return new $8cd8e2c17e3ae471$var$BufferNode(this.context, this._parent, buffer.findChild(parentStart, this.index, -1, 0, 4 /* Side.DontCare */ ));
    }
    get tree() {
        return null;
    }
    toTree() {
        let children = [], positions = [];
        let { buffer: buffer } = this.context;
        let startI = this.index + 4, endI = buffer.buffer[this.index + 3];
        if (endI > startI) {
            let from = buffer.buffer[this.index + 1];
            children.push(buffer.slice(startI, endI, from));
            positions.push(0);
        }
        return new $8cd8e2c17e3ae471$export$7fbedc92909ed28e(this.type, children, positions, this.to - this.from);
    }
    /**
    @internal
    */ toString() {
        return this.context.buffer.childString(this.index);
    }
}
function $8cd8e2c17e3ae471$var$iterStack(heads) {
    if (!heads.length) return null;
    let pick = 0, picked = heads[0];
    for(let i = 1; i < heads.length; i++){
        let node = heads[i];
        if (node.from > picked.from || node.to < picked.to) {
            picked = node;
            pick = i;
        }
    }
    let next = picked instanceof $8cd8e2c17e3ae471$var$TreeNode && picked.index < 0 ? null : picked.parent;
    let newHeads = heads.slice();
    if (next) newHeads[pick] = next;
    else newHeads.splice(pick, 1);
    return new $8cd8e2c17e3ae471$var$StackIterator(newHeads, picked);
}
class $8cd8e2c17e3ae471$var$StackIterator {
    constructor(heads, node){
        this.heads = heads;
        this.node = node;
    }
    get next() {
        return $8cd8e2c17e3ae471$var$iterStack(this.heads);
    }
}
function $8cd8e2c17e3ae471$var$stackIterator(tree, pos, side) {
    let inner = tree.resolveInner(pos, side), layers = null;
    for(let scan = inner instanceof $8cd8e2c17e3ae471$var$TreeNode ? inner : inner.context.parent; scan; scan = scan.parent)if (scan.index < 0) {
        let parent = scan.parent;
        (layers || (layers = [
            inner
        ])).push(parent.resolve(pos, side));
        scan = parent;
    } else {
        let mount = $8cd8e2c17e3ae471$export$358cdd8bd77577cc.get(scan.tree);
        // Relevant overlay branching off
        if (mount && mount.overlay && mount.overlay[0].from <= pos && mount.overlay[mount.overlay.length - 1].to >= pos) {
            let root = new $8cd8e2c17e3ae471$var$TreeNode(mount.tree, mount.overlay[0].from + scan.from, -1, scan);
            (layers || (layers = [
                inner
            ])).push($8cd8e2c17e3ae471$var$resolveNode(root, pos, side, false));
        }
    }
    return layers ? $8cd8e2c17e3ae471$var$iterStack(layers) : inner;
}
/**
A tree cursor object focuses on a given node in a syntax tree, and
allows you to move to adjacent nodes.
*/ class $8cd8e2c17e3ae471$export$3ae4554f36e54a34 {
    /**
    Shorthand for `.type.name`.
    */ get name() {
        return this.type.name;
    }
    /**
    @internal
    */ constructor(node, /**
    @internal
    */ mode = 0){
        this.mode = mode;
        /**
        @internal
        */ this.buffer = null;
        this.stack = [];
        /**
        @internal
        */ this.index = 0;
        this.bufferNode = null;
        if (node instanceof $8cd8e2c17e3ae471$var$TreeNode) this.yieldNode(node);
        else {
            this._tree = node.context.parent;
            this.buffer = node.context;
            for(let n = node._parent; n; n = n._parent)this.stack.unshift(n.index);
            this.bufferNode = node;
            this.yieldBuf(node.index);
        }
    }
    yieldNode(node) {
        if (!node) return false;
        this._tree = node;
        this.type = node.type;
        this.from = node.from;
        this.to = node.to;
        return true;
    }
    yieldBuf(index, type) {
        this.index = index;
        let { start: start, buffer: buffer } = this.buffer;
        this.type = type || buffer.set.types[buffer.buffer[index]];
        this.from = start + buffer.buffer[index + 1];
        this.to = start + buffer.buffer[index + 2];
        return true;
    }
    /**
    @internal
    */ yield(node) {
        if (!node) return false;
        if (node instanceof $8cd8e2c17e3ae471$var$TreeNode) {
            this.buffer = null;
            return this.yieldNode(node);
        }
        this.buffer = node.context;
        return this.yieldBuf(node.index, node.type);
    }
    /**
    @internal
    */ toString() {
        return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString();
    }
    /**
    @internal
    */ enterChild(dir, pos, side) {
        if (!this.buffer) return this.yield(this._tree.nextChild(dir < 0 ? this._tree._tree.children.length - 1 : 0, dir, pos, side, this.mode));
        let { buffer: buffer } = this.buffer;
        let index = buffer.findChild(this.index + 4, buffer.buffer[this.index + 3], dir, pos - this.buffer.start, side);
        if (index < 0) return false;
        this.stack.push(this.index);
        return this.yieldBuf(index);
    }
    /**
    Move the cursor to this node's first child. When this returns
    false, the node has no child, and the cursor has not been moved.
    */ firstChild() {
        return this.enterChild(1, 0, 4 /* Side.DontCare */ );
    }
    /**
    Move the cursor to this node's last child.
    */ lastChild() {
        return this.enterChild(-1, 0, 4 /* Side.DontCare */ );
    }
    /**
    Move the cursor to the first child that ends after `pos`.
    */ childAfter(pos) {
        return this.enterChild(1, pos, 2 /* Side.After */ );
    }
    /**
    Move to the last child that starts before `pos`.
    */ childBefore(pos) {
        return this.enterChild(-1, pos, -2 /* Side.Before */ );
    }
    /**
    Move the cursor to the child around `pos`. If side is -1 the
    child may end at that position, when 1 it may start there. This
    will also enter [overlaid](#common.MountedTree.overlay)
    [mounted](#common.NodeProp^mounted) trees unless `overlays` is
    set to false.
    */ enter(pos, side, mode = this.mode) {
        if (!this.buffer) return this.yield(this._tree.enter(pos, side, mode));
        return mode & $8cd8e2c17e3ae471$export$b0e28367f55837aa.ExcludeBuffers ? false : this.enterChild(1, pos, side);
    }
    /**
    Move to the node's parent node, if this isn't the top node.
    */ parent() {
        if (!this.buffer) return this.yieldNode(this.mode & $8cd8e2c17e3ae471$export$b0e28367f55837aa.IncludeAnonymous ? this._tree._parent : this._tree.parent);
        if (this.stack.length) return this.yieldBuf(this.stack.pop());
        let parent = this.mode & $8cd8e2c17e3ae471$export$b0e28367f55837aa.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent();
        this.buffer = null;
        return this.yieldNode(parent);
    }
    /**
    @internal
    */ sibling(dir) {
        if (!this.buffer) return !this._tree._parent ? false : this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + dir, dir, 0, 4 /* Side.DontCare */ , this.mode));
        let { buffer: buffer } = this.buffer, d = this.stack.length - 1;
        if (dir < 0) {
            let parentStart = d < 0 ? 0 : this.stack[d] + 4;
            if (this.index != parentStart) return this.yieldBuf(buffer.findChild(parentStart, this.index, -1, 0, 4 /* Side.DontCare */ ));
        } else {
            let after = buffer.buffer[this.index + 3];
            if (after < (d < 0 ? buffer.buffer.length : buffer.buffer[this.stack[d] + 3])) return this.yieldBuf(after);
        }
        return d < 0 ? this.yield(this.buffer.parent.nextChild(this.buffer.index + dir, dir, 0, 4 /* Side.DontCare */ , this.mode)) : false;
    }
    /**
    Move to this node's next sibling, if any.
    */ nextSibling() {
        return this.sibling(1);
    }
    /**
    Move to this node's previous sibling, if any.
    */ prevSibling() {
        return this.sibling(-1);
    }
    atLastNode(dir) {
        let index, parent, { buffer: buffer } = this;
        if (buffer) {
            if (dir > 0) {
                if (this.index < buffer.buffer.buffer.length) return false;
            } else {
                for(let i = 0; i < this.index; i++)if (buffer.buffer.buffer[i + 3] < this.index) return false;
            }
            ({ index: index, parent: parent } = buffer);
        } else ({ index: index, _parent: parent } = this._tree);
        for(; parent; { index: index, _parent: parent } = parent){
            if (index > -1) for(let i = index + dir, e = dir < 0 ? -1 : parent._tree.children.length; i != e; i += dir){
                let child = parent._tree.children[i];
                if (this.mode & $8cd8e2c17e3ae471$export$b0e28367f55837aa.IncludeAnonymous || child instanceof $8cd8e2c17e3ae471$export$33300581b70be371 || !child.type.isAnonymous || $8cd8e2c17e3ae471$var$hasChild(child)) return false;
            }
        }
        return true;
    }
    move(dir, enter) {
        if (enter && this.enterChild(dir, 0, 4 /* Side.DontCare */ )) return true;
        for(;;){
            if (this.sibling(dir)) return true;
            if (this.atLastNode(dir) || !this.parent()) return false;
        }
    }
    /**
    Move to the next node in a
    [pre-order](https://en.wikipedia.org/wiki/Tree_traversal#Pre-order,_NLR)
    traversal, going from a node to its first child or, if the
    current node is empty or `enter` is false, its next sibling or
    the next sibling of the first parent node that has one.
    */ next(enter = true) {
        return this.move(1, enter);
    }
    /**
    Move to the next node in a last-to-first pre-order traversal. A
    node is followed by its last child or, if it has none, its
    previous sibling or the previous sibling of the first parent
    node that has one.
    */ prev(enter = true) {
        return this.move(-1, enter);
    }
    /**
    Move the cursor to the innermost node that covers `pos`. If
    `side` is -1, it will enter nodes that end at `pos`. If it is 1,
    it will enter nodes that start at `pos`.
    */ moveTo(pos, side = 0) {
        // Move up to a node that actually holds the position, if possible
        while(this.from == this.to || (side < 1 ? this.from >= pos : this.from > pos) || (side > -1 ? this.to <= pos : this.to < pos))if (!this.parent()) break;
        // Then scan down into child nodes as far as possible
        while(this.enterChild(1, pos, side));
        return this;
    }
    /**
    Get a [syntax node](#common.SyntaxNode) at the cursor's current
    position.
    */ get node() {
        if (!this.buffer) return this._tree;
        let cache = this.bufferNode, result = null, depth = 0;
        if (cache && cache.context == this.buffer) scan: for(let index = this.index, d = this.stack.length; d >= 0;){
            for(let c = cache; c; c = c._parent)if (c.index == index) {
                if (index == this.index) return c;
                result = c;
                depth = d + 1;
                break scan;
            }
            index = this.stack[--d];
        }
        for(let i = depth; i < this.stack.length; i++)result = new $8cd8e2c17e3ae471$var$BufferNode(this.buffer, result, this.stack[i]);
        return this.bufferNode = new $8cd8e2c17e3ae471$var$BufferNode(this.buffer, result, this.index);
    }
    /**
    Get the [tree](#common.Tree) that represents the current node, if
    any. Will return null when the node is in a [tree
    buffer](#common.TreeBuffer).
    */ get tree() {
        return this.buffer ? null : this._tree._tree;
    }
    /**
    Iterate over the current node and all its descendants, calling
    `enter` when entering a node and `leave`, if given, when leaving
    one. When `enter` returns `false`, any children of that node are
    skipped, and `leave` isn't called for it.
    */ iterate(enter, leave) {
        for(let depth = 0;;){
            let mustLeave = false;
            if (this.type.isAnonymous || enter(this) !== false) {
                if (this.firstChild()) {
                    depth++;
                    continue;
                }
                if (!this.type.isAnonymous) mustLeave = true;
            }
            for(;;){
                if (mustLeave && leave) leave(this);
                mustLeave = this.type.isAnonymous;
                if (!depth) return;
                if (this.nextSibling()) break;
                this.parent();
                depth--;
                mustLeave = true;
            }
        }
    }
    /**
    Test whether the current node matches a given context—a sequence
    of direct parent node names. Empty strings in the context array
    are treated as wildcards.
    */ matchContext(context) {
        if (!this.buffer) return $8cd8e2c17e3ae471$var$matchNodeContext(this.node.parent, context);
        let { buffer: buffer } = this.buffer, { types: types } = buffer.set;
        for(let i = context.length - 1, d = this.stack.length - 1; i >= 0; d--){
            if (d < 0) return $8cd8e2c17e3ae471$var$matchNodeContext(this._tree, context, i);
            let type = types[buffer.buffer[this.stack[d]]];
            if (!type.isAnonymous) {
                if (context[i] && context[i] != type.name) return false;
                i--;
            }
        }
        return true;
    }
}
function $8cd8e2c17e3ae471$var$hasChild(tree) {
    return tree.children.some((ch)=>ch instanceof $8cd8e2c17e3ae471$export$33300581b70be371 || !ch.type.isAnonymous || $8cd8e2c17e3ae471$var$hasChild(ch));
}
function $8cd8e2c17e3ae471$var$buildTree(data) {
    var _a;
    let { buffer: buffer, nodeSet: nodeSet, maxBufferLength: maxBufferLength = $8cd8e2c17e3ae471$export$de305a849879ffa, reused: reused = [], minRepeatType: minRepeatType = nodeSet.types.length } = data;
    let cursor = Array.isArray(buffer) ? new $8cd8e2c17e3ae471$var$FlatBufferCursor(buffer, buffer.length) : buffer;
    let types = nodeSet.types;
    let contextHash = 0, lookAhead = 0;
    function takeNode(parentStart, minPos, children, positions, inRepeat, depth) {
        let { id: id, start: start, end: end, size: size } = cursor;
        let lookAheadAtStart = lookAhead, contextAtStart = contextHash;
        while(size < 0){
            cursor.next();
            if (size == -1 /* SpecialRecord.Reuse */ ) {
                let node = reused[id];
                children.push(node);
                positions.push(start - parentStart);
                return;
            } else if (size == -3 /* SpecialRecord.ContextChange */ ) {
                contextHash = id;
                return;
            } else if (size == -4 /* SpecialRecord.LookAhead */ ) {
                lookAhead = id;
                return;
            } else throw new RangeError(`Unrecognized record size: ${size}`);
        }
        let type = types[id], node, buffer;
        let startPos = start - parentStart;
        if (end - start <= maxBufferLength && (buffer = findBufferSize(cursor.pos - minPos, inRepeat))) {
            // Small enough for a buffer, and no reused nodes inside
            let data = new Uint16Array(buffer.size - buffer.skip);
            let endPos = cursor.pos - buffer.size, index = data.length;
            while(cursor.pos > endPos)index = copyToBuffer(buffer.start, data, index);
            node = new $8cd8e2c17e3ae471$export$33300581b70be371(data, end - buffer.start, nodeSet);
            startPos = buffer.start - parentStart;
        } else {
            let endPos = cursor.pos - size;
            cursor.next();
            let localChildren = [], localPositions = [];
            let localInRepeat = id >= minRepeatType ? id : -1;
            let lastGroup = 0, lastEnd = end;
            while(cursor.pos > endPos){
                if (localInRepeat >= 0 && cursor.id == localInRepeat && cursor.size >= 0) {
                    if (cursor.end <= lastEnd - maxBufferLength) {
                        makeRepeatLeaf(localChildren, localPositions, start, lastGroup, cursor.end, lastEnd, localInRepeat, lookAheadAtStart, contextAtStart);
                        lastGroup = localChildren.length;
                        lastEnd = cursor.end;
                    }
                    cursor.next();
                } else if (depth > 2500 /* CutOff.Depth */ ) takeFlatNode(start, endPos, localChildren, localPositions);
                else takeNode(start, endPos, localChildren, localPositions, localInRepeat, depth + 1);
            }
            if (localInRepeat >= 0 && lastGroup > 0 && lastGroup < localChildren.length) makeRepeatLeaf(localChildren, localPositions, start, lastGroup, start, lastEnd, localInRepeat, lookAheadAtStart, contextAtStart);
            localChildren.reverse();
            localPositions.reverse();
            if (localInRepeat > -1 && lastGroup > 0) {
                let make = makeBalanced(type, contextAtStart);
                node = $8cd8e2c17e3ae471$var$balanceRange(type, localChildren, localPositions, 0, localChildren.length, 0, end - start, make, make);
            } else node = makeTree(type, localChildren, localPositions, end - start, lookAheadAtStart - end, contextAtStart);
        }
        children.push(node);
        positions.push(startPos);
    }
    function takeFlatNode(parentStart, minPos, children, positions) {
        let nodes = []; // Temporary, inverted array of leaf nodes found, with absolute positions
        let nodeCount = 0, stopAt = -1;
        while(cursor.pos > minPos){
            let { id: id, start: start, end: end, size: size } = cursor;
            if (size > 4) cursor.next();
            else if (stopAt > -1 && start < stopAt) break;
            else {
                if (stopAt < 0) stopAt = end - maxBufferLength;
                nodes.push(id, start, end);
                nodeCount++;
                cursor.next();
            }
        }
        if (nodeCount) {
            let buffer = new Uint16Array(nodeCount * 4);
            let start = nodes[nodes.length - 2];
            for(let i = nodes.length - 3, j = 0; i >= 0; i -= 3){
                buffer[j++] = nodes[i];
                buffer[j++] = nodes[i + 1] - start;
                buffer[j++] = nodes[i + 2] - start;
                buffer[j++] = j;
            }
            children.push(new $8cd8e2c17e3ae471$export$33300581b70be371(buffer, nodes[2] - start, nodeSet));
            positions.push(start - parentStart);
        }
    }
    function makeBalanced(type, contextHash) {
        return (children, positions, length)=>{
            let lookAhead = 0, lastI = children.length - 1, last, lookAheadProp;
            if (lastI >= 0 && (last = children[lastI]) instanceof $8cd8e2c17e3ae471$export$7fbedc92909ed28e) {
                if (!lastI && last.type == type && last.length == length) return last;
                if (lookAheadProp = last.prop($8cd8e2c17e3ae471$export$b8034b9bc18acd90.lookAhead)) lookAhead = positions[lastI] + last.length + lookAheadProp;
            }
            return makeTree(type, children, positions, length, lookAhead, contextHash);
        };
    }
    function makeRepeatLeaf(children, positions, base, i, from, to, type, lookAhead, contextHash) {
        let localChildren = [], localPositions = [];
        while(children.length > i){
            localChildren.push(children.pop());
            localPositions.push(positions.pop() + base - from);
        }
        children.push(makeTree(nodeSet.types[type], localChildren, localPositions, to - from, lookAhead - to, contextHash));
        positions.push(from - base);
    }
    function makeTree(type, children, positions, length, lookAhead, contextHash, props) {
        if (contextHash) {
            let pair = [
                $8cd8e2c17e3ae471$export$b8034b9bc18acd90.contextHash,
                contextHash
            ];
            props = props ? [
                pair
            ].concat(props) : [
                pair
            ];
        }
        if (lookAhead > 25) {
            let pair = [
                $8cd8e2c17e3ae471$export$b8034b9bc18acd90.lookAhead,
                lookAhead
            ];
            props = props ? [
                pair
            ].concat(props) : [
                pair
            ];
        }
        return new $8cd8e2c17e3ae471$export$7fbedc92909ed28e(type, children, positions, length, props);
    }
    function findBufferSize(maxSize, inRepeat) {
        // Scan through the buffer to find previous siblings that fit
        // together in a TreeBuffer, and don't contain any reused nodes
        // (which can't be stored in a buffer).
        // If `inRepeat` is > -1, ignore node boundaries of that type for
        // nesting, but make sure the end falls either at the start
        // (`maxSize`) or before such a node.
        let fork = cursor.fork();
        let size = 0, start = 0, skip = 0, minStart = fork.end - maxBufferLength;
        let result = {
            size: 0,
            start: 0,
            skip: 0
        };
        scan: for(let minPos = fork.pos - maxSize; fork.pos > minPos;){
            let nodeSize = fork.size;
            // Pretend nested repeat nodes of the same type don't exist
            if (fork.id == inRepeat && nodeSize >= 0) {
                // Except that we store the current state as a valid return
                // value.
                result.size = size;
                result.start = start;
                result.skip = skip;
                skip += 4;
                size += 4;
                fork.next();
                continue;
            }
            let startPos = fork.pos - nodeSize;
            if (nodeSize < 0 || startPos < minPos || fork.start < minStart) break;
            let localSkipped = fork.id >= minRepeatType ? 4 : 0;
            let nodeStart = fork.start;
            fork.next();
            while(fork.pos > startPos){
                if (fork.size < 0) {
                    if (fork.size == -3 /* SpecialRecord.ContextChange */ ) localSkipped += 4;
                    else break scan;
                } else if (fork.id >= minRepeatType) localSkipped += 4;
                fork.next();
            }
            start = nodeStart;
            size += nodeSize;
            skip += localSkipped;
        }
        if (inRepeat < 0 || size == maxSize) {
            result.size = size;
            result.start = start;
            result.skip = skip;
        }
        return result.size > 4 ? result : undefined;
    }
    function copyToBuffer(bufferStart, buffer, index) {
        let { id: id, start: start, end: end, size: size } = cursor;
        cursor.next();
        if (size >= 0 && id < minRepeatType) {
            let startIndex = index;
            if (size > 4) {
                let endPos = cursor.pos - (size - 4);
                while(cursor.pos > endPos)index = copyToBuffer(bufferStart, buffer, index);
            }
            buffer[--index] = startIndex;
            buffer[--index] = end - bufferStart;
            buffer[--index] = start - bufferStart;
            buffer[--index] = id;
        } else if (size == -3 /* SpecialRecord.ContextChange */ ) contextHash = id;
        else if (size == -4 /* SpecialRecord.LookAhead */ ) lookAhead = id;
        return index;
    }
    let children = [], positions = [];
    while(cursor.pos > 0)takeNode(data.start || 0, data.bufferStart || 0, children, positions, -1, 0);
    let length = (_a = data.length) !== null && _a !== void 0 ? _a : children.length ? positions[0] + children[0].length : 0;
    return new $8cd8e2c17e3ae471$export$7fbedc92909ed28e(types[data.topID], children.reverse(), positions.reverse(), length);
}
const $8cd8e2c17e3ae471$var$nodeSizeCache = new WeakMap;
function $8cd8e2c17e3ae471$var$nodeSize(balanceType, node) {
    if (!balanceType.isAnonymous || node instanceof $8cd8e2c17e3ae471$export$33300581b70be371 || node.type != balanceType) return 1;
    let size = $8cd8e2c17e3ae471$var$nodeSizeCache.get(node);
    if (size == null) {
        size = 1;
        for (let child of node.children){
            if (child.type != balanceType || !(child instanceof $8cd8e2c17e3ae471$export$7fbedc92909ed28e)) {
                size = 1;
                break;
            }
            size += $8cd8e2c17e3ae471$var$nodeSize(balanceType, child);
        }
        $8cd8e2c17e3ae471$var$nodeSizeCache.set(node, size);
    }
    return size;
}
function $8cd8e2c17e3ae471$var$balanceRange(// The type the balanced tree's inner nodes.
balanceType, // The direct children and their positions
children, positions, // The index range in children/positions to use
from, to, // The start position of the nodes, relative to their parent.
start, // Length of the outer node
length, // Function to build the top node of the balanced tree
mkTop, // Function to build internal nodes for the balanced tree
mkTree) {
    let total = 0;
    for(let i = from; i < to; i++)total += $8cd8e2c17e3ae471$var$nodeSize(balanceType, children[i]);
    let maxChild = Math.ceil(total * 1.5 / 8 /* Balance.BranchFactor */ );
    let localChildren = [], localPositions = [];
    function divide(children, positions, from, to, offset) {
        for(let i = from; i < to;){
            let groupFrom = i, groupStart = positions[i], groupSize = $8cd8e2c17e3ae471$var$nodeSize(balanceType, children[i]);
            i++;
            for(; i < to; i++){
                let nextSize = $8cd8e2c17e3ae471$var$nodeSize(balanceType, children[i]);
                if (groupSize + nextSize >= maxChild) break;
                groupSize += nextSize;
            }
            if (i == groupFrom + 1) {
                if (groupSize > maxChild) {
                    let only = children[groupFrom]; // Only trees can have a size > 1
                    divide(only.children, only.positions, 0, only.children.length, positions[groupFrom] + offset);
                    continue;
                }
                localChildren.push(children[groupFrom]);
            } else {
                let length = positions[i - 1] + children[i - 1].length - groupStart;
                localChildren.push($8cd8e2c17e3ae471$var$balanceRange(balanceType, children, positions, groupFrom, i, groupStart, length, null, mkTree));
            }
            localPositions.push(groupStart + offset - start);
        }
    }
    divide(children, positions, from, to, 0);
    return (mkTop || mkTree)(localChildren, localPositions, length);
}
/**
Provides a way to associate values with pieces of trees. As long
as that part of the tree is reused, the associated values can be
retrieved from an updated tree.
*/ class $8cd8e2c17e3ae471$export$7f13b5dc44c541ae {
    constructor(){
        this.map = new WeakMap();
    }
    setBuffer(buffer, index, value) {
        let inner = this.map.get(buffer);
        if (!inner) this.map.set(buffer, inner = new Map);
        inner.set(index, value);
    }
    getBuffer(buffer, index) {
        let inner = this.map.get(buffer);
        return inner && inner.get(index);
    }
    /**
    Set the value for this syntax node.
    */ set(node, value) {
        if (node instanceof $8cd8e2c17e3ae471$var$BufferNode) this.setBuffer(node.context.buffer, node.index, value);
        else if (node instanceof $8cd8e2c17e3ae471$var$TreeNode) this.map.set(node.tree, value);
    }
    /**
    Retrieve value for this syntax node, if it exists in the map.
    */ get(node) {
        return node instanceof $8cd8e2c17e3ae471$var$BufferNode ? this.getBuffer(node.context.buffer, node.index) : node instanceof $8cd8e2c17e3ae471$var$TreeNode ? this.map.get(node.tree) : undefined;
    }
    /**
    Set the value for the node that a cursor currently points to.
    */ cursorSet(cursor, value) {
        if (cursor.buffer) this.setBuffer(cursor.buffer.buffer, cursor.index, value);
        else this.map.set(cursor.tree, value);
    }
    /**
    Retrieve the value for the node that a cursor currently points
    to.
    */ cursorGet(cursor) {
        return cursor.buffer ? this.getBuffer(cursor.buffer.buffer, cursor.index) : this.map.get(cursor.tree);
    }
}
/**
Tree fragments are used during [incremental
parsing](#common.Parser.startParse) to track parts of old trees
that can be reused in a new parse. An array of fragments is used
to track regions of an old tree whose nodes might be reused in new
parses. Use the static
[`applyChanges`](#common.TreeFragment^applyChanges) method to
update fragments for document changes.
*/ class $8cd8e2c17e3ae471$export$3ae2ede6dca97077 {
    /**
    Construct a tree fragment. You'll usually want to use
    [`addTree`](#common.TreeFragment^addTree) and
    [`applyChanges`](#common.TreeFragment^applyChanges) instead of
    calling this directly.
    */ constructor(/**
    The start of the unchanged range pointed to by this fragment.
    This refers to an offset in the _updated_ document (as opposed
    to the original tree).
    */ from, /**
    The end of the unchanged range.
    */ to, /**
    The tree that this fragment is based on.
    */ tree, /**
    The offset between the fragment's tree and the document that
    this fragment can be used against. Add this when going from
    document to tree positions, subtract it to go from tree to
    document positions.
    */ offset, openStart = false, openEnd = false){
        this.from = from;
        this.to = to;
        this.tree = tree;
        this.offset = offset;
        this.open = (openStart ? 1 /* Open.Start */  : 0) | (openEnd ? 2 /* Open.End */  : 0);
    }
    /**
    Whether the start of the fragment represents the start of a
    parse, or the end of a change. (In the second case, it may not
    be safe to reuse some nodes at the start, depending on the
    parsing algorithm.)
    */ get openStart() {
        return (this.open & 1 /* Open.Start */ ) > 0;
    }
    /**
    Whether the end of the fragment represents the end of a
    full-document parse, or the start of a change.
    */ get openEnd() {
        return (this.open & 2 /* Open.End */ ) > 0;
    }
    /**
    Create a set of fragments from a freshly parsed tree, or update
    an existing set of fragments by replacing the ones that overlap
    with a tree with content from the new tree. When `partial` is
    true, the parse is treated as incomplete, and the resulting
    fragment has [`openEnd`](#common.TreeFragment.openEnd) set to
    true.
    */ static addTree(tree, fragments = [], partial = false) {
        let result = [
            new $8cd8e2c17e3ae471$export$3ae2ede6dca97077(0, tree.length, tree, 0, false, partial)
        ];
        for (let f of fragments)if (f.to > tree.length) result.push(f);
        return result;
    }
    /**
    Apply a set of edits to an array of fragments, removing or
    splitting fragments as necessary to remove edited ranges, and
    adjusting offsets for fragments that moved.
    */ static applyChanges(fragments, changes, minGap = 128) {
        if (!changes.length) return fragments;
        let result = [];
        let fI = 1, nextF = fragments.length ? fragments[0] : null;
        for(let cI = 0, pos = 0, off = 0;; cI++){
            let nextC = cI < changes.length ? changes[cI] : null;
            let nextPos = nextC ? nextC.fromA : 1e9;
            if (nextPos - pos >= minGap) while(nextF && nextF.from < nextPos){
                let cut = nextF;
                if (pos >= cut.from || nextPos <= cut.to || off) {
                    let fFrom = Math.max(cut.from, pos) - off, fTo = Math.min(cut.to, nextPos) - off;
                    cut = fFrom >= fTo ? null : new $8cd8e2c17e3ae471$export$3ae2ede6dca97077(fFrom, fTo, cut.tree, cut.offset + off, cI > 0, !!nextC);
                }
                if (cut) result.push(cut);
                if (nextF.to > nextPos) break;
                nextF = fI < fragments.length ? fragments[fI++] : null;
            }
            if (!nextC) break;
            pos = nextC.toA;
            off = nextC.toA - nextC.toB;
        }
        return result;
    }
}
/**
A superclass that parsers should extend.
*/ class $8cd8e2c17e3ae471$export$7acfa6ed01010e37 {
    /**
    Start a parse, returning a [partial parse](#common.PartialParse)
    object. [`fragments`](#common.TreeFragment) can be passed in to
    make the parse incremental.
    
    By default, the entire input is parsed. You can pass `ranges`,
    which should be a sorted array of non-empty, non-overlapping
    ranges, to parse only those ranges. The tree returned in that
    case will start at `ranges[0].from`.
    */ startParse(input, fragments, ranges) {
        if (typeof input == "string") input = new $8cd8e2c17e3ae471$var$StringInput(input);
        ranges = !ranges ? [
            new $8cd8e2c17e3ae471$var$Range(0, input.length)
        ] : ranges.length ? ranges.map((r)=>new $8cd8e2c17e3ae471$var$Range(r.from, r.to)) : [
            new $8cd8e2c17e3ae471$var$Range(0, 0)
        ];
        return this.createParse(input, fragments || [], ranges);
    }
    /**
    Run a full parse, returning the resulting tree.
    */ parse(input, fragments, ranges) {
        let parse = this.startParse(input, fragments, ranges);
        for(;;){
            let done = parse.advance();
            if (done) return done;
        }
    }
}
class $8cd8e2c17e3ae471$var$StringInput {
    constructor(string){
        this.string = string;
    }
    get length() {
        return this.string.length;
    }
    chunk(from) {
        return this.string.slice(from);
    }
    get lineChunks() {
        return false;
    }
    read(from, to) {
        return this.string.slice(from, to);
    }
}
/**
Create a parse wrapper that, after the inner parse completes,
scans its tree for mixed language regions with the `nest`
function, runs the resulting [inner parses](#common.NestedParse),
and then [mounts](#common.NodeProp^mounted) their results onto the
tree.
*/ function $8cd8e2c17e3ae471$export$5dcc455959c76221(nest) {
    return (parse, input, fragments, ranges)=>new $8cd8e2c17e3ae471$var$MixedParse(parse, nest, input, fragments, ranges);
}
class $8cd8e2c17e3ae471$var$InnerParse {
    constructor(parser, parse, overlay, target, from){
        this.parser = parser;
        this.parse = parse;
        this.overlay = overlay;
        this.target = target;
        this.from = from;
    }
}
function $8cd8e2c17e3ae471$var$checkRanges(ranges) {
    if (!ranges.length || ranges.some((r)=>r.from >= r.to)) throw new RangeError("Invalid inner parse ranges given: " + JSON.stringify(ranges));
}
class $8cd8e2c17e3ae471$var$ActiveOverlay {
    constructor(parser, predicate, mounts, index, start, target, prev){
        this.parser = parser;
        this.predicate = predicate;
        this.mounts = mounts;
        this.index = index;
        this.start = start;
        this.target = target;
        this.prev = prev;
        this.depth = 0;
        this.ranges = [];
    }
}
const $8cd8e2c17e3ae471$var$stoppedInner = new $8cd8e2c17e3ae471$export$b8034b9bc18acd90({
    perNode: true
});
class $8cd8e2c17e3ae471$var$MixedParse {
    constructor(base, nest, input, fragments, ranges){
        this.nest = nest;
        this.input = input;
        this.fragments = fragments;
        this.ranges = ranges;
        this.inner = [];
        this.innerDone = 0;
        this.baseTree = null;
        this.stoppedAt = null;
        this.baseParse = base;
    }
    advance() {
        if (this.baseParse) {
            let done = this.baseParse.advance();
            if (!done) return null;
            this.baseParse = null;
            this.baseTree = done;
            this.startInner();
            if (this.stoppedAt != null) for (let inner of this.inner)inner.parse.stopAt(this.stoppedAt);
        }
        if (this.innerDone == this.inner.length) {
            let result = this.baseTree;
            if (this.stoppedAt != null) result = new $8cd8e2c17e3ae471$export$7fbedc92909ed28e(result.type, result.children, result.positions, result.length, result.propValues.concat([
                [
                    $8cd8e2c17e3ae471$var$stoppedInner,
                    this.stoppedAt
                ]
            ]));
            return result;
        }
        let inner = this.inner[this.innerDone], done = inner.parse.advance();
        if (done) {
            this.innerDone++;
            // This is a somewhat dodgy but super helpful hack where we
            // patch up nodes created by the inner parse (and thus
            // presumably not aliased anywhere else) to hold the information
            // about the inner parse.
            let props = Object.assign(Object.create(null), inner.target.props);
            props[$8cd8e2c17e3ae471$export$b8034b9bc18acd90.mounted.id] = new $8cd8e2c17e3ae471$export$358cdd8bd77577cc(done, inner.overlay, inner.parser);
            inner.target.props = props;
        }
        return null;
    }
    get parsedPos() {
        if (this.baseParse) return 0;
        let pos = this.input.length;
        for(let i = this.innerDone; i < this.inner.length; i++)if (this.inner[i].from < pos) pos = Math.min(pos, this.inner[i].parse.parsedPos);
        return pos;
    }
    stopAt(pos) {
        this.stoppedAt = pos;
        if (this.baseParse) this.baseParse.stopAt(pos);
        else for(let i = this.innerDone; i < this.inner.length; i++)this.inner[i].parse.stopAt(pos);
    }
    startInner() {
        let fragmentCursor = new $8cd8e2c17e3ae471$var$FragmentCursor(this.fragments);
        let overlay = null;
        let covered = null;
        let cursor = new $8cd8e2c17e3ae471$export$3ae4554f36e54a34(new $8cd8e2c17e3ae471$var$TreeNode(this.baseTree, this.ranges[0].from, 0, null), $8cd8e2c17e3ae471$export$b0e28367f55837aa.IncludeAnonymous | $8cd8e2c17e3ae471$export$b0e28367f55837aa.IgnoreMounts);
        scan: for(let nest, isCovered;;){
            let enter = true, range;
            if (this.stoppedAt != null && cursor.from >= this.stoppedAt) enter = false;
            else if (fragmentCursor.hasNode(cursor)) {
                if (overlay) {
                    let match = overlay.mounts.find((m)=>m.frag.from <= cursor.from && m.frag.to >= cursor.to && m.mount.overlay);
                    if (match) for (let r of match.mount.overlay){
                        let from = r.from + match.pos, to = r.to + match.pos;
                        if (from >= cursor.from && to <= cursor.to && !overlay.ranges.some((r)=>r.from < to && r.to > from)) overlay.ranges.push({
                            from: from,
                            to: to
                        });
                    }
                }
                enter = false;
            } else if (covered && (isCovered = $8cd8e2c17e3ae471$var$checkCover(covered.ranges, cursor.from, cursor.to))) enter = isCovered != 2 /* Cover.Full */ ;
            else if (!cursor.type.isAnonymous && (nest = this.nest(cursor, this.input)) && (cursor.from < cursor.to || !nest.overlay)) {
                if (!cursor.tree) $8cd8e2c17e3ae471$var$materialize(cursor);
                let oldMounts = fragmentCursor.findMounts(cursor.from, nest.parser);
                if (typeof nest.overlay == "function") overlay = new $8cd8e2c17e3ae471$var$ActiveOverlay(nest.parser, nest.overlay, oldMounts, this.inner.length, cursor.from, cursor.tree, overlay);
                else {
                    let ranges = $8cd8e2c17e3ae471$var$punchRanges(this.ranges, nest.overlay || (cursor.from < cursor.to ? [
                        new $8cd8e2c17e3ae471$var$Range(cursor.from, cursor.to)
                    ] : []));
                    if (ranges.length) $8cd8e2c17e3ae471$var$checkRanges(ranges);
                    if (ranges.length || !nest.overlay) this.inner.push(new $8cd8e2c17e3ae471$var$InnerParse(nest.parser, ranges.length ? nest.parser.startParse(this.input, $8cd8e2c17e3ae471$var$enterFragments(oldMounts, ranges), ranges) : nest.parser.startParse(""), nest.overlay ? nest.overlay.map((r)=>new $8cd8e2c17e3ae471$var$Range(r.from - cursor.from, r.to - cursor.from)) : null, cursor.tree, ranges.length ? ranges[0].from : cursor.from));
                    if (!nest.overlay) enter = false;
                    else if (ranges.length) covered = {
                        ranges: ranges,
                        depth: 0,
                        prev: covered
                    };
                }
            } else if (overlay && (range = overlay.predicate(cursor))) {
                if (range === true) range = new $8cd8e2c17e3ae471$var$Range(cursor.from, cursor.to);
                if (range.from < range.to) {
                    let last = overlay.ranges.length - 1;
                    if (last >= 0 && overlay.ranges[last].to == range.from) overlay.ranges[last] = {
                        from: overlay.ranges[last].from,
                        to: range.to
                    };
                    else overlay.ranges.push(range);
                }
            }
            if (enter && cursor.firstChild()) {
                if (overlay) overlay.depth++;
                if (covered) covered.depth++;
            } else for(;;){
                if (cursor.nextSibling()) break;
                if (!cursor.parent()) break scan;
                if (overlay && !--overlay.depth) {
                    let ranges = $8cd8e2c17e3ae471$var$punchRanges(this.ranges, overlay.ranges);
                    if (ranges.length) {
                        $8cd8e2c17e3ae471$var$checkRanges(ranges);
                        this.inner.splice(overlay.index, 0, new $8cd8e2c17e3ae471$var$InnerParse(overlay.parser, overlay.parser.startParse(this.input, $8cd8e2c17e3ae471$var$enterFragments(overlay.mounts, ranges), ranges), overlay.ranges.map((r)=>new $8cd8e2c17e3ae471$var$Range(r.from - overlay.start, r.to - overlay.start)), overlay.target, ranges[0].from));
                    }
                    overlay = overlay.prev;
                }
                if (covered && !--covered.depth) covered = covered.prev;
            }
        }
    }
}
function $8cd8e2c17e3ae471$var$checkCover(covered, from, to) {
    for (let range of covered){
        if (range.from >= to) break;
        if (range.to > from) return range.from <= from && range.to >= to ? 2 /* Cover.Full */  : 1 /* Cover.Partial */ ;
    }
    return 0 /* Cover.None */ ;
}
// Take a piece of buffer and convert it into a stand-alone
// TreeBuffer.
function $8cd8e2c17e3ae471$var$sliceBuf(buf, startI, endI, nodes, positions, off) {
    if (startI < endI) {
        let from = buf.buffer[startI + 1];
        nodes.push(buf.slice(startI, endI, from));
        positions.push(from - off);
    }
}
// This function takes a node that's in a buffer, and converts it, and
// its parent buffer nodes, into a Tree. This is again acting on the
// assumption that the trees and buffers have been constructed by the
// parse that was ran via the mix parser, and thus aren't shared with
// any other code, making violations of the immutability safe.
function $8cd8e2c17e3ae471$var$materialize(cursor) {
    let { node: node } = cursor, stack = [];
    let buffer = node.context.buffer;
    // Scan up to the nearest tree
    do {
        stack.push(cursor.index);
        cursor.parent();
    }while (!cursor.tree);
    // Find the index of the buffer in that tree
    let base = cursor.tree, i = base.children.indexOf(buffer);
    let buf = base.children[i], b = buf.buffer, newStack = [
        i
    ];
    // Split a level in the buffer, putting the nodes before and after
    // the child that contains `node` into new buffers.
    function split(startI, endI, type, innerOffset, length, stackPos) {
        let targetI = stack[stackPos];
        let children = [], positions = [];
        $8cd8e2c17e3ae471$var$sliceBuf(buf, startI, targetI, children, positions, innerOffset);
        let from = b[targetI + 1], to = b[targetI + 2];
        newStack.push(children.length);
        let child = stackPos ? split(targetI + 4, b[targetI + 3], buf.set.types[b[targetI]], from, to - from, stackPos - 1) : node.toTree();
        children.push(child);
        positions.push(from - innerOffset);
        $8cd8e2c17e3ae471$var$sliceBuf(buf, b[targetI + 3], endI, children, positions, innerOffset);
        return new $8cd8e2c17e3ae471$export$7fbedc92909ed28e(type, children, positions, length);
    }
    base.children[i] = split(0, b.length, $8cd8e2c17e3ae471$export$f06e977173f1857c.none, 0, buf.length, stack.length - 1);
    // Move the cursor back to the target node
    for (let index of newStack){
        let tree = cursor.tree.children[index], pos = cursor.tree.positions[index];
        cursor.yield(new $8cd8e2c17e3ae471$var$TreeNode(tree, pos + cursor.from, index, cursor._tree));
    }
}
class $8cd8e2c17e3ae471$var$StructureCursor {
    constructor(root, offset){
        this.offset = offset;
        this.done = false;
        this.cursor = root.cursor($8cd8e2c17e3ae471$export$b0e28367f55837aa.IncludeAnonymous | $8cd8e2c17e3ae471$export$b0e28367f55837aa.IgnoreMounts);
    }
    // Move to the first node (in pre-order) that starts at or after `pos`.
    moveTo(pos) {
        let { cursor: cursor } = this, p = pos - this.offset;
        while(!this.done && cursor.from < p){
            if (cursor.to >= pos && cursor.enter(p, 1, $8cd8e2c17e3ae471$export$b0e28367f55837aa.IgnoreOverlays | $8cd8e2c17e3ae471$export$b0e28367f55837aa.ExcludeBuffers)) ;
            else if (!cursor.next(false)) this.done = true;
        }
    }
    hasNode(cursor) {
        this.moveTo(cursor.from);
        if (!this.done && this.cursor.from + this.offset == cursor.from && this.cursor.tree) for(let tree = this.cursor.tree;;){
            if (tree == cursor.tree) return true;
            if (tree.children.length && tree.positions[0] == 0 && tree.children[0] instanceof $8cd8e2c17e3ae471$export$7fbedc92909ed28e) tree = tree.children[0];
            else break;
        }
        return false;
    }
}
class $8cd8e2c17e3ae471$var$FragmentCursor {
    constructor(fragments){
        var _a;
        this.fragments = fragments;
        this.curTo = 0;
        this.fragI = 0;
        if (fragments.length) {
            let first = this.curFrag = fragments[0];
            this.curTo = (_a = first.tree.prop($8cd8e2c17e3ae471$var$stoppedInner)) !== null && _a !== void 0 ? _a : first.to;
            this.inner = new $8cd8e2c17e3ae471$var$StructureCursor(first.tree, -first.offset);
        } else this.curFrag = this.inner = null;
    }
    hasNode(node) {
        while(this.curFrag && node.from >= this.curTo)this.nextFrag();
        return this.curFrag && this.curFrag.from <= node.from && this.curTo >= node.to && this.inner.hasNode(node);
    }
    nextFrag() {
        var _a;
        this.fragI++;
        if (this.fragI == this.fragments.length) this.curFrag = this.inner = null;
        else {
            let frag = this.curFrag = this.fragments[this.fragI];
            this.curTo = (_a = frag.tree.prop($8cd8e2c17e3ae471$var$stoppedInner)) !== null && _a !== void 0 ? _a : frag.to;
            this.inner = new $8cd8e2c17e3ae471$var$StructureCursor(frag.tree, -frag.offset);
        }
    }
    findMounts(pos, parser) {
        var _a;
        let result = [];
        if (this.inner) {
            this.inner.cursor.moveTo(pos, 1);
            for(let pos = this.inner.cursor.node; pos; pos = pos.parent){
                let mount = (_a = pos.tree) === null || _a === void 0 ? void 0 : _a.prop($8cd8e2c17e3ae471$export$b8034b9bc18acd90.mounted);
                if (mount && mount.parser == parser) for(let i = this.fragI; i < this.fragments.length; i++){
                    let frag = this.fragments[i];
                    if (frag.from >= pos.to) break;
                    if (frag.tree == this.curFrag.tree) result.push({
                        frag: frag,
                        pos: pos.from - frag.offset,
                        mount: mount
                    });
                }
            }
        }
        return result;
    }
}
function $8cd8e2c17e3ae471$var$punchRanges(outer, ranges) {
    let copy = null, current = ranges;
    for(let i = 1, j = 0; i < outer.length; i++){
        let gapFrom = outer[i - 1].to, gapTo = outer[i].from;
        for(; j < current.length; j++){
            let r = current[j];
            if (r.from >= gapTo) break;
            if (r.to <= gapFrom) continue;
            if (!copy) current = copy = ranges.slice();
            if (r.from < gapFrom) {
                copy[j] = new $8cd8e2c17e3ae471$var$Range(r.from, gapFrom);
                if (r.to > gapTo) copy.splice(j + 1, 0, new $8cd8e2c17e3ae471$var$Range(gapTo, r.to));
            } else if (r.to > gapTo) copy[j--] = new $8cd8e2c17e3ae471$var$Range(gapTo, r.to);
            else copy.splice(j--, 1);
        }
    }
    return current;
}
function $8cd8e2c17e3ae471$var$findCoverChanges(a, b, from, to) {
    let iA = 0, iB = 0, inA = false, inB = false, pos = -1000000000;
    let result = [];
    for(;;){
        let nextA = iA == a.length ? 1e9 : inA ? a[iA].to : a[iA].from;
        let nextB = iB == b.length ? 1e9 : inB ? b[iB].to : b[iB].from;
        if (inA != inB) {
            let start = Math.max(pos, from), end = Math.min(nextA, nextB, to);
            if (start < end) result.push(new $8cd8e2c17e3ae471$var$Range(start, end));
        }
        pos = Math.min(nextA, nextB);
        if (pos == 1e9) break;
        if (nextA == pos) {
            if (!inA) inA = true;
            else {
                inA = false;
                iA++;
            }
        }
        if (nextB == pos) {
            if (!inB) inB = true;
            else {
                inB = false;
                iB++;
            }
        }
    }
    return result;
}
// Given a number of fragments for the outer tree, and a set of ranges
// to parse, find fragments for inner trees mounted around those
// ranges, if any.
function $8cd8e2c17e3ae471$var$enterFragments(mounts, ranges) {
    let result = [];
    for (let { pos: pos, mount: mount, frag: frag } of mounts){
        let startPos = pos + (mount.overlay ? mount.overlay[0].from : 0), endPos = startPos + mount.tree.length;
        let from = Math.max(frag.from, startPos), to = Math.min(frag.to, endPos);
        if (mount.overlay) {
            let overlay = mount.overlay.map((r)=>new $8cd8e2c17e3ae471$var$Range(r.from + pos, r.to + pos));
            let changes = $8cd8e2c17e3ae471$var$findCoverChanges(ranges, overlay, from, to);
            for(let i = 0, pos = from;; i++){
                let last = i == changes.length, end = last ? to : changes[i].from;
                if (end > pos) result.push(new $8cd8e2c17e3ae471$export$3ae2ede6dca97077(pos, end, mount.tree, -startPos, frag.from >= pos || frag.openStart, frag.to <= end || frag.openEnd));
                if (last) break;
                pos = changes[i].to;
            }
        } else result.push(new $8cd8e2c17e3ae471$export$3ae2ede6dca97077(from, to, mount.tree, -startPos, frag.from >= startPos || frag.openStart, frag.to <= endPos || frag.openEnd));
    }
    return result;
}


var $59ba57524f3b5ae9$exports = {};

$parcel$defineInteropFlag($59ba57524f3b5ae9$exports);

$parcel$export($59ba57524f3b5ae9$exports, "default", () => $59ba57524f3b5ae9$export$2e2bcd8739ae039);
// This is a generated file. Do not edit.
var $59ba57524f3b5ae9$var$Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
var $59ba57524f3b5ae9$var$ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
var $59ba57524f3b5ae9$var$ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
var $59ba57524f3b5ae9$var$unicode = {
    Space_Separator: $59ba57524f3b5ae9$var$Space_Separator,
    ID_Start: $59ba57524f3b5ae9$var$ID_Start,
    ID_Continue: $59ba57524f3b5ae9$var$ID_Continue
};
var $59ba57524f3b5ae9$var$util = {
    isSpaceSeparator (c) {
        return typeof c === 'string' && $59ba57524f3b5ae9$var$unicode.Space_Separator.test(c);
    },
    isIdStartChar (c) {
        return typeof c === 'string' && (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c === '$' || c === '_' || $59ba57524f3b5ae9$var$unicode.ID_Start.test(c));
    },
    isIdContinueChar (c) {
        return typeof c === 'string' && (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c === '$' || c === '_' || c === '\u200C' || c === '\u200D' || $59ba57524f3b5ae9$var$unicode.ID_Continue.test(c));
    },
    isDigit (c) {
        return typeof c === 'string' && /[0-9]/.test(c);
    },
    isHexDigit (c) {
        return typeof c === 'string' && /[0-9A-Fa-f]/.test(c);
    }
};
let $59ba57524f3b5ae9$var$source;
let $59ba57524f3b5ae9$var$parseState;
let $59ba57524f3b5ae9$var$stack;
let $59ba57524f3b5ae9$var$pos;
let $59ba57524f3b5ae9$var$line;
let $59ba57524f3b5ae9$var$column;
let $59ba57524f3b5ae9$var$token;
let $59ba57524f3b5ae9$var$key;
let $59ba57524f3b5ae9$var$root;
var $59ba57524f3b5ae9$var$parse = function parse(text, reviver) {
    $59ba57524f3b5ae9$var$source = String(text);
    $59ba57524f3b5ae9$var$parseState = 'start';
    $59ba57524f3b5ae9$var$stack = [];
    $59ba57524f3b5ae9$var$pos = 0;
    $59ba57524f3b5ae9$var$line = 1;
    $59ba57524f3b5ae9$var$column = 0;
    $59ba57524f3b5ae9$var$token = undefined;
    $59ba57524f3b5ae9$var$key = undefined;
    $59ba57524f3b5ae9$var$root = undefined;
    do {
        $59ba57524f3b5ae9$var$token = $59ba57524f3b5ae9$var$lex();
        // This code is unreachable.
        // if (!parseStates[parseState]) {
        //     throw invalidParseState()
        // }
        $59ba57524f3b5ae9$var$parseStates[$59ba57524f3b5ae9$var$parseState]();
    }while ($59ba57524f3b5ae9$var$token.type !== 'eof');
    if (typeof reviver === 'function') return $59ba57524f3b5ae9$var$internalize({
        '': $59ba57524f3b5ae9$var$root
    }, '', reviver);
    return $59ba57524f3b5ae9$var$root;
};
function $59ba57524f3b5ae9$var$internalize(holder, name, reviver) {
    const value = holder[name];
    if (value != null && typeof value === 'object') {
        if (Array.isArray(value)) for(let i = 0; i < value.length; i++){
            const key = String(i);
            const replacement = $59ba57524f3b5ae9$var$internalize(value, key, reviver);
            if (replacement === undefined) delete value[key];
            else Object.defineProperty(value, key, {
                value: replacement,
                writable: true,
                enumerable: true,
                configurable: true
            });
        }
        else for(const key in value){
            const replacement = $59ba57524f3b5ae9$var$internalize(value, key, reviver);
            if (replacement === undefined) delete value[key];
            else Object.defineProperty(value, key, {
                value: replacement,
                writable: true,
                enumerable: true,
                configurable: true
            });
        }
    }
    return reviver.call(holder, name, value);
}
let $59ba57524f3b5ae9$var$lexState;
let $59ba57524f3b5ae9$var$buffer;
let $59ba57524f3b5ae9$var$doubleQuote;
let $59ba57524f3b5ae9$var$sign;
let $59ba57524f3b5ae9$var$c;
function $59ba57524f3b5ae9$var$lex() {
    $59ba57524f3b5ae9$var$lexState = 'default';
    $59ba57524f3b5ae9$var$buffer = '';
    $59ba57524f3b5ae9$var$doubleQuote = false;
    $59ba57524f3b5ae9$var$sign = 1;
    for(;;){
        $59ba57524f3b5ae9$var$c = $59ba57524f3b5ae9$var$peek();
        // This code is unreachable.
        // if (!lexStates[lexState]) {
        //     throw invalidLexState(lexState)
        // }
        const token = $59ba57524f3b5ae9$var$lexStates[$59ba57524f3b5ae9$var$lexState]();
        if (token) return token;
    }
}
function $59ba57524f3b5ae9$var$peek() {
    if ($59ba57524f3b5ae9$var$source[$59ba57524f3b5ae9$var$pos]) return String.fromCodePoint($59ba57524f3b5ae9$var$source.codePointAt($59ba57524f3b5ae9$var$pos));
}
function $59ba57524f3b5ae9$var$read() {
    const c = $59ba57524f3b5ae9$var$peek();
    if (c === '\n') {
        $59ba57524f3b5ae9$var$line++;
        $59ba57524f3b5ae9$var$column = 0;
    } else if (c) $59ba57524f3b5ae9$var$column += c.length;
    else $59ba57524f3b5ae9$var$column++;
    if (c) $59ba57524f3b5ae9$var$pos += c.length;
    return c;
}
const $59ba57524f3b5ae9$var$lexStates = {
    default () {
        switch($59ba57524f3b5ae9$var$c){
            case '\t':
            case '\v':
            case '\f':
            case ' ':
            case '\u00A0':
            case '\uFEFF':
            case '\n':
            case '\r':
            case '\u2028':
            case '\u2029':
                $59ba57524f3b5ae9$var$read();
                return;
            case '/':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'comment';
                return;
            case undefined:
                $59ba57524f3b5ae9$var$read();
                return $59ba57524f3b5ae9$var$newToken('eof');
        }
        if ($59ba57524f3b5ae9$var$util.isSpaceSeparator($59ba57524f3b5ae9$var$c)) {
            $59ba57524f3b5ae9$var$read();
            return;
        }
        // This code is unreachable.
        // if (!lexStates[parseState]) {
        //     throw invalidLexState(parseState)
        // }
        return $59ba57524f3b5ae9$var$lexStates[$59ba57524f3b5ae9$var$parseState]();
    },
    comment () {
        switch($59ba57524f3b5ae9$var$c){
            case '*':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'multiLineComment';
                return;
            case '/':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'singleLineComment';
                return;
        }
        throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    },
    multiLineComment () {
        switch($59ba57524f3b5ae9$var$c){
            case '*':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'multiLineCommentAsterisk';
                return;
            case undefined:
                throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
        }
        $59ba57524f3b5ae9$var$read();
    },
    multiLineCommentAsterisk () {
        switch($59ba57524f3b5ae9$var$c){
            case '*':
                $59ba57524f3b5ae9$var$read();
                return;
            case '/':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'default';
                return;
            case undefined:
                throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
        }
        $59ba57524f3b5ae9$var$read();
        $59ba57524f3b5ae9$var$lexState = 'multiLineComment';
    },
    singleLineComment () {
        switch($59ba57524f3b5ae9$var$c){
            case '\n':
            case '\r':
            case '\u2028':
            case '\u2029':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'default';
                return;
            case undefined:
                $59ba57524f3b5ae9$var$read();
                return $59ba57524f3b5ae9$var$newToken('eof');
        }
        $59ba57524f3b5ae9$var$read();
    },
    value () {
        switch($59ba57524f3b5ae9$var$c){
            case '{':
            case '[':
                return $59ba57524f3b5ae9$var$newToken('punctuator', $59ba57524f3b5ae9$var$read());
            case 'n':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$literal('ull');
                return $59ba57524f3b5ae9$var$newToken('null', null);
            case 't':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$literal('rue');
                return $59ba57524f3b5ae9$var$newToken('boolean', true);
            case 'f':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$literal('alse');
                return $59ba57524f3b5ae9$var$newToken('boolean', false);
            case '-':
            case '+':
                if ($59ba57524f3b5ae9$var$read() === '-') $59ba57524f3b5ae9$var$sign = -1;
                $59ba57524f3b5ae9$var$lexState = 'sign';
                return;
            case '.':
                $59ba57524f3b5ae9$var$buffer = $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'decimalPointLeading';
                return;
            case '0':
                $59ba57524f3b5ae9$var$buffer = $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'zero';
                return;
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
                $59ba57524f3b5ae9$var$buffer = $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'decimalInteger';
                return;
            case 'I':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$literal('nfinity');
                return $59ba57524f3b5ae9$var$newToken('numeric', Infinity);
            case 'N':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$literal('aN');
                return $59ba57524f3b5ae9$var$newToken('numeric', NaN);
            case '"':
            case "'":
                $59ba57524f3b5ae9$var$doubleQuote = $59ba57524f3b5ae9$var$read() === '"';
                $59ba57524f3b5ae9$var$buffer = '';
                $59ba57524f3b5ae9$var$lexState = 'string';
                return;
        }
        throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    },
    identifierNameStartEscape () {
        if ($59ba57524f3b5ae9$var$c !== 'u') throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
        $59ba57524f3b5ae9$var$read();
        const u = $59ba57524f3b5ae9$var$unicodeEscape();
        switch(u){
            case '$':
            case '_':
                break;
            default:
                if (!$59ba57524f3b5ae9$var$util.isIdStartChar(u)) throw $59ba57524f3b5ae9$var$invalidIdentifier();
                break;
        }
        $59ba57524f3b5ae9$var$buffer += u;
        $59ba57524f3b5ae9$var$lexState = 'identifierName';
    },
    identifierName () {
        switch($59ba57524f3b5ae9$var$c){
            case '$':
            case '_':
            case '\u200C':
            case '\u200D':
                $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
                return;
            case '\\':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'identifierNameEscape';
                return;
        }
        if ($59ba57524f3b5ae9$var$util.isIdContinueChar($59ba57524f3b5ae9$var$c)) {
            $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
            return;
        }
        return $59ba57524f3b5ae9$var$newToken('identifier', $59ba57524f3b5ae9$var$buffer);
    },
    identifierNameEscape () {
        if ($59ba57524f3b5ae9$var$c !== 'u') throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
        $59ba57524f3b5ae9$var$read();
        const u = $59ba57524f3b5ae9$var$unicodeEscape();
        switch(u){
            case '$':
            case '_':
            case '\u200C':
            case '\u200D':
                break;
            default:
                if (!$59ba57524f3b5ae9$var$util.isIdContinueChar(u)) throw $59ba57524f3b5ae9$var$invalidIdentifier();
                break;
        }
        $59ba57524f3b5ae9$var$buffer += u;
        $59ba57524f3b5ae9$var$lexState = 'identifierName';
    },
    sign () {
        switch($59ba57524f3b5ae9$var$c){
            case '.':
                $59ba57524f3b5ae9$var$buffer = $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'decimalPointLeading';
                return;
            case '0':
                $59ba57524f3b5ae9$var$buffer = $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'zero';
                return;
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
                $59ba57524f3b5ae9$var$buffer = $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'decimalInteger';
                return;
            case 'I':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$literal('nfinity');
                return $59ba57524f3b5ae9$var$newToken('numeric', $59ba57524f3b5ae9$var$sign * Infinity);
            case 'N':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$literal('aN');
                return $59ba57524f3b5ae9$var$newToken('numeric', NaN);
        }
        throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    },
    zero () {
        switch($59ba57524f3b5ae9$var$c){
            case '.':
                $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'decimalPoint';
                return;
            case 'e':
            case 'E':
                $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'decimalExponent';
                return;
            case 'x':
            case 'X':
                $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'hexadecimal';
                return;
        }
        return $59ba57524f3b5ae9$var$newToken('numeric', $59ba57524f3b5ae9$var$sign * 0);
    },
    decimalInteger () {
        switch($59ba57524f3b5ae9$var$c){
            case '.':
                $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'decimalPoint';
                return;
            case 'e':
            case 'E':
                $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'decimalExponent';
                return;
        }
        if ($59ba57524f3b5ae9$var$util.isDigit($59ba57524f3b5ae9$var$c)) {
            $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
            return;
        }
        return $59ba57524f3b5ae9$var$newToken('numeric', $59ba57524f3b5ae9$var$sign * Number($59ba57524f3b5ae9$var$buffer));
    },
    decimalPointLeading () {
        if ($59ba57524f3b5ae9$var$util.isDigit($59ba57524f3b5ae9$var$c)) {
            $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
            $59ba57524f3b5ae9$var$lexState = 'decimalFraction';
            return;
        }
        throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    },
    decimalPoint () {
        switch($59ba57524f3b5ae9$var$c){
            case 'e':
            case 'E':
                $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'decimalExponent';
                return;
        }
        if ($59ba57524f3b5ae9$var$util.isDigit($59ba57524f3b5ae9$var$c)) {
            $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
            $59ba57524f3b5ae9$var$lexState = 'decimalFraction';
            return;
        }
        return $59ba57524f3b5ae9$var$newToken('numeric', $59ba57524f3b5ae9$var$sign * Number($59ba57524f3b5ae9$var$buffer));
    },
    decimalFraction () {
        switch($59ba57524f3b5ae9$var$c){
            case 'e':
            case 'E':
                $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'decimalExponent';
                return;
        }
        if ($59ba57524f3b5ae9$var$util.isDigit($59ba57524f3b5ae9$var$c)) {
            $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
            return;
        }
        return $59ba57524f3b5ae9$var$newToken('numeric', $59ba57524f3b5ae9$var$sign * Number($59ba57524f3b5ae9$var$buffer));
    },
    decimalExponent () {
        switch($59ba57524f3b5ae9$var$c){
            case '+':
            case '-':
                $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'decimalExponentSign';
                return;
        }
        if ($59ba57524f3b5ae9$var$util.isDigit($59ba57524f3b5ae9$var$c)) {
            $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
            $59ba57524f3b5ae9$var$lexState = 'decimalExponentInteger';
            return;
        }
        throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    },
    decimalExponentSign () {
        if ($59ba57524f3b5ae9$var$util.isDigit($59ba57524f3b5ae9$var$c)) {
            $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
            $59ba57524f3b5ae9$var$lexState = 'decimalExponentInteger';
            return;
        }
        throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    },
    decimalExponentInteger () {
        if ($59ba57524f3b5ae9$var$util.isDigit($59ba57524f3b5ae9$var$c)) {
            $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
            return;
        }
        return $59ba57524f3b5ae9$var$newToken('numeric', $59ba57524f3b5ae9$var$sign * Number($59ba57524f3b5ae9$var$buffer));
    },
    hexadecimal () {
        if ($59ba57524f3b5ae9$var$util.isHexDigit($59ba57524f3b5ae9$var$c)) {
            $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
            $59ba57524f3b5ae9$var$lexState = 'hexadecimalInteger';
            return;
        }
        throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    },
    hexadecimalInteger () {
        if ($59ba57524f3b5ae9$var$util.isHexDigit($59ba57524f3b5ae9$var$c)) {
            $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
            return;
        }
        return $59ba57524f3b5ae9$var$newToken('numeric', $59ba57524f3b5ae9$var$sign * Number($59ba57524f3b5ae9$var$buffer));
    },
    string () {
        switch($59ba57524f3b5ae9$var$c){
            case '\\':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$escape();
                return;
            case '"':
                if ($59ba57524f3b5ae9$var$doubleQuote) {
                    $59ba57524f3b5ae9$var$read();
                    return $59ba57524f3b5ae9$var$newToken('string', $59ba57524f3b5ae9$var$buffer);
                }
                $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
                return;
            case "'":
                if (!$59ba57524f3b5ae9$var$doubleQuote) {
                    $59ba57524f3b5ae9$var$read();
                    return $59ba57524f3b5ae9$var$newToken('string', $59ba57524f3b5ae9$var$buffer);
                }
                $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
                return;
            case '\n':
            case '\r':
                throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
            case '\u2028':
            case '\u2029':
                $59ba57524f3b5ae9$var$separatorChar($59ba57524f3b5ae9$var$c);
                break;
            case undefined:
                throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
        }
        $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
    },
    start () {
        switch($59ba57524f3b5ae9$var$c){
            case '{':
            case '[':
                return $59ba57524f3b5ae9$var$newToken('punctuator', $59ba57524f3b5ae9$var$read());
        }
        $59ba57524f3b5ae9$var$lexState = 'value';
    },
    beforePropertyName () {
        switch($59ba57524f3b5ae9$var$c){
            case '$':
            case '_':
                $59ba57524f3b5ae9$var$buffer = $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'identifierName';
                return;
            case '\\':
                $59ba57524f3b5ae9$var$read();
                $59ba57524f3b5ae9$var$lexState = 'identifierNameStartEscape';
                return;
            case '}':
                return $59ba57524f3b5ae9$var$newToken('punctuator', $59ba57524f3b5ae9$var$read());
            case '"':
            case "'":
                $59ba57524f3b5ae9$var$doubleQuote = $59ba57524f3b5ae9$var$read() === '"';
                $59ba57524f3b5ae9$var$lexState = 'string';
                return;
        }
        if ($59ba57524f3b5ae9$var$util.isIdStartChar($59ba57524f3b5ae9$var$c)) {
            $59ba57524f3b5ae9$var$buffer += $59ba57524f3b5ae9$var$read();
            $59ba57524f3b5ae9$var$lexState = 'identifierName';
            return;
        }
        throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    },
    afterPropertyName () {
        if ($59ba57524f3b5ae9$var$c === ':') return $59ba57524f3b5ae9$var$newToken('punctuator', $59ba57524f3b5ae9$var$read());
        throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    },
    beforePropertyValue () {
        $59ba57524f3b5ae9$var$lexState = 'value';
    },
    afterPropertyValue () {
        switch($59ba57524f3b5ae9$var$c){
            case ',':
            case '}':
                return $59ba57524f3b5ae9$var$newToken('punctuator', $59ba57524f3b5ae9$var$read());
        }
        throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    },
    beforeArrayValue () {
        if ($59ba57524f3b5ae9$var$c === ']') return $59ba57524f3b5ae9$var$newToken('punctuator', $59ba57524f3b5ae9$var$read());
        $59ba57524f3b5ae9$var$lexState = 'value';
    },
    afterArrayValue () {
        switch($59ba57524f3b5ae9$var$c){
            case ',':
            case ']':
                return $59ba57524f3b5ae9$var$newToken('punctuator', $59ba57524f3b5ae9$var$read());
        }
        throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    },
    end () {
        // This code is unreachable since it's handled by the default lexState.
        // if (c === undefined) {
        //     read()
        //     return newToken('eof')
        // }
        throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    }
};
function $59ba57524f3b5ae9$var$newToken(type, value) {
    return {
        type: type,
        value: value,
        line: $59ba57524f3b5ae9$var$line,
        column: $59ba57524f3b5ae9$var$column
    };
}
function $59ba57524f3b5ae9$var$literal(s) {
    for (const c of s){
        const p = $59ba57524f3b5ae9$var$peek();
        if (p !== c) throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
        $59ba57524f3b5ae9$var$read();
    }
}
function $59ba57524f3b5ae9$var$escape() {
    const c = $59ba57524f3b5ae9$var$peek();
    switch(c){
        case 'b':
            $59ba57524f3b5ae9$var$read();
            return '\b';
        case 'f':
            $59ba57524f3b5ae9$var$read();
            return '\f';
        case 'n':
            $59ba57524f3b5ae9$var$read();
            return '\n';
        case 'r':
            $59ba57524f3b5ae9$var$read();
            return '\r';
        case 't':
            $59ba57524f3b5ae9$var$read();
            return '\t';
        case 'v':
            $59ba57524f3b5ae9$var$read();
            return '\v';
        case '0':
            $59ba57524f3b5ae9$var$read();
            if ($59ba57524f3b5ae9$var$util.isDigit($59ba57524f3b5ae9$var$peek())) throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
            return '\0';
        case 'x':
            $59ba57524f3b5ae9$var$read();
            return $59ba57524f3b5ae9$var$hexEscape();
        case 'u':
            $59ba57524f3b5ae9$var$read();
            return $59ba57524f3b5ae9$var$unicodeEscape();
        case '\n':
        case '\u2028':
        case '\u2029':
            $59ba57524f3b5ae9$var$read();
            return '';
        case '\r':
            $59ba57524f3b5ae9$var$read();
            if ($59ba57524f3b5ae9$var$peek() === '\n') $59ba57524f3b5ae9$var$read();
            return '';
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
            throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
        case undefined:
            throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    }
    return $59ba57524f3b5ae9$var$read();
}
function $59ba57524f3b5ae9$var$hexEscape() {
    let buffer = '';
    let c = $59ba57524f3b5ae9$var$peek();
    if (!$59ba57524f3b5ae9$var$util.isHexDigit(c)) throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    buffer += $59ba57524f3b5ae9$var$read();
    c = $59ba57524f3b5ae9$var$peek();
    if (!$59ba57524f3b5ae9$var$util.isHexDigit(c)) throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
    buffer += $59ba57524f3b5ae9$var$read();
    return String.fromCodePoint(parseInt(buffer, 16));
}
function $59ba57524f3b5ae9$var$unicodeEscape() {
    let buffer = '';
    let count = 4;
    while(count-- > 0){
        const c = $59ba57524f3b5ae9$var$peek();
        if (!$59ba57524f3b5ae9$var$util.isHexDigit(c)) throw $59ba57524f3b5ae9$var$invalidChar($59ba57524f3b5ae9$var$read());
        buffer += $59ba57524f3b5ae9$var$read();
    }
    return String.fromCodePoint(parseInt(buffer, 16));
}
const $59ba57524f3b5ae9$var$parseStates = {
    start () {
        if ($59ba57524f3b5ae9$var$token.type === 'eof') throw $59ba57524f3b5ae9$var$invalidEOF();
        $59ba57524f3b5ae9$var$push();
    },
    beforePropertyName () {
        switch($59ba57524f3b5ae9$var$token.type){
            case 'identifier':
            case 'string':
                $59ba57524f3b5ae9$var$key = $59ba57524f3b5ae9$var$token.value;
                $59ba57524f3b5ae9$var$parseState = 'afterPropertyName';
                return;
            case 'punctuator':
                // This code is unreachable since it's handled by the lexState.
                // if (token.value !== '}') {
                //     throw invalidToken()
                // }
                $59ba57524f3b5ae9$var$pop();
                return;
            case 'eof':
                throw $59ba57524f3b5ae9$var$invalidEOF();
        }
    // This code is unreachable since it's handled by the lexState.
    // throw invalidToken()
    },
    afterPropertyName () {
        // This code is unreachable since it's handled by the lexState.
        // if (token.type !== 'punctuator' || token.value !== ':') {
        //     throw invalidToken()
        // }
        if ($59ba57524f3b5ae9$var$token.type === 'eof') throw $59ba57524f3b5ae9$var$invalidEOF();
        $59ba57524f3b5ae9$var$parseState = 'beforePropertyValue';
    },
    beforePropertyValue () {
        if ($59ba57524f3b5ae9$var$token.type === 'eof') throw $59ba57524f3b5ae9$var$invalidEOF();
        $59ba57524f3b5ae9$var$push();
    },
    beforeArrayValue () {
        if ($59ba57524f3b5ae9$var$token.type === 'eof') throw $59ba57524f3b5ae9$var$invalidEOF();
        if ($59ba57524f3b5ae9$var$token.type === 'punctuator' && $59ba57524f3b5ae9$var$token.value === ']') {
            $59ba57524f3b5ae9$var$pop();
            return;
        }
        $59ba57524f3b5ae9$var$push();
    },
    afterPropertyValue () {
        // This code is unreachable since it's handled by the lexState.
        // if (token.type !== 'punctuator') {
        //     throw invalidToken()
        // }
        if ($59ba57524f3b5ae9$var$token.type === 'eof') throw $59ba57524f3b5ae9$var$invalidEOF();
        switch($59ba57524f3b5ae9$var$token.value){
            case ',':
                $59ba57524f3b5ae9$var$parseState = 'beforePropertyName';
                return;
            case '}':
                $59ba57524f3b5ae9$var$pop();
        }
    // This code is unreachable since it's handled by the lexState.
    // throw invalidToken()
    },
    afterArrayValue () {
        // This code is unreachable since it's handled by the lexState.
        // if (token.type !== 'punctuator') {
        //     throw invalidToken()
        // }
        if ($59ba57524f3b5ae9$var$token.type === 'eof') throw $59ba57524f3b5ae9$var$invalidEOF();
        switch($59ba57524f3b5ae9$var$token.value){
            case ',':
                $59ba57524f3b5ae9$var$parseState = 'beforeArrayValue';
                return;
            case ']':
                $59ba57524f3b5ae9$var$pop();
        }
    // This code is unreachable since it's handled by the lexState.
    // throw invalidToken()
    },
    end () {
    // This code is unreachable since it's handled by the lexState.
    // if (token.type !== 'eof') {
    //     throw invalidToken()
    // }
    }
};
function $59ba57524f3b5ae9$var$push() {
    let value;
    switch($59ba57524f3b5ae9$var$token.type){
        case 'punctuator':
            switch($59ba57524f3b5ae9$var$token.value){
                case '{':
                    value = {};
                    break;
                case '[':
                    value = [];
                    break;
            }
            break;
        case 'null':
        case 'boolean':
        case 'numeric':
        case 'string':
            value = $59ba57524f3b5ae9$var$token.value;
            break;
    }
    if ($59ba57524f3b5ae9$var$root === undefined) $59ba57524f3b5ae9$var$root = value;
    else {
        const parent = $59ba57524f3b5ae9$var$stack[$59ba57524f3b5ae9$var$stack.length - 1];
        if (Array.isArray(parent)) parent.push(value);
        else Object.defineProperty(parent, $59ba57524f3b5ae9$var$key, {
            value: value,
            writable: true,
            enumerable: true,
            configurable: true
        });
    }
    if (value !== null && typeof value === 'object') {
        $59ba57524f3b5ae9$var$stack.push(value);
        if (Array.isArray(value)) $59ba57524f3b5ae9$var$parseState = 'beforeArrayValue';
        else $59ba57524f3b5ae9$var$parseState = 'beforePropertyName';
    } else {
        const current = $59ba57524f3b5ae9$var$stack[$59ba57524f3b5ae9$var$stack.length - 1];
        if (current == null) $59ba57524f3b5ae9$var$parseState = 'end';
        else if (Array.isArray(current)) $59ba57524f3b5ae9$var$parseState = 'afterArrayValue';
        else $59ba57524f3b5ae9$var$parseState = 'afterPropertyValue';
    }
}
function $59ba57524f3b5ae9$var$pop() {
    $59ba57524f3b5ae9$var$stack.pop();
    const current = $59ba57524f3b5ae9$var$stack[$59ba57524f3b5ae9$var$stack.length - 1];
    if (current == null) $59ba57524f3b5ae9$var$parseState = 'end';
    else if (Array.isArray(current)) $59ba57524f3b5ae9$var$parseState = 'afterArrayValue';
    else $59ba57524f3b5ae9$var$parseState = 'afterPropertyValue';
}
// This code is unreachable.
// function invalidParseState () {
//     return new Error(`JSON5: invalid parse state '${parseState}'`)
// }
// This code is unreachable.
// function invalidLexState (state) {
//     return new Error(`JSON5: invalid lex state '${state}'`)
// }
function $59ba57524f3b5ae9$var$invalidChar(c) {
    if (c === undefined) return $59ba57524f3b5ae9$var$syntaxError(`JSON5: invalid end of input at ${$59ba57524f3b5ae9$var$line}:${$59ba57524f3b5ae9$var$column}`);
    return $59ba57524f3b5ae9$var$syntaxError(`JSON5: invalid character '${$59ba57524f3b5ae9$var$formatChar(c)}' at ${$59ba57524f3b5ae9$var$line}:${$59ba57524f3b5ae9$var$column}`);
}
function $59ba57524f3b5ae9$var$invalidEOF() {
    return $59ba57524f3b5ae9$var$syntaxError(`JSON5: invalid end of input at ${$59ba57524f3b5ae9$var$line}:${$59ba57524f3b5ae9$var$column}`);
}
// This code is unreachable.
// function invalidToken () {
//     if (token.type === 'eof') {
//         return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
//     }
//     const c = String.fromCodePoint(token.value.codePointAt(0))
//     return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)
// }
function $59ba57524f3b5ae9$var$invalidIdentifier() {
    $59ba57524f3b5ae9$var$column -= 5;
    return $59ba57524f3b5ae9$var$syntaxError(`JSON5: invalid identifier character at ${$59ba57524f3b5ae9$var$line}:${$59ba57524f3b5ae9$var$column}`);
}
function $59ba57524f3b5ae9$var$separatorChar(c) {
    console.warn(`JSON5: '${$59ba57524f3b5ae9$var$formatChar(c)}' in strings is not valid ECMAScript; consider escaping`);
}
function $59ba57524f3b5ae9$var$formatChar(c) {
    const replacements = {
        "'": "\\'",
        '"': '\\"',
        '\\': '\\\\',
        '\b': '\\b',
        '\f': '\\f',
        '\n': '\\n',
        '\r': '\\r',
        '\t': '\\t',
        '\v': '\\v',
        '\0': '\\0',
        '\u2028': '\\u2028',
        '\u2029': '\\u2029'
    };
    if (replacements[c]) return replacements[c];
    if (c < ' ') {
        const hexString = c.charCodeAt(0).toString(16);
        return '\\x' + ('00' + hexString).substring(hexString.length);
    }
    return c;
}
function $59ba57524f3b5ae9$var$syntaxError(message) {
    const err = new SyntaxError(message);
    err.lineNumber = $59ba57524f3b5ae9$var$line;
    err.columnNumber = $59ba57524f3b5ae9$var$column;
    return err;
}
var $59ba57524f3b5ae9$var$stringify = function stringify(value, replacer, space) {
    const stack = [];
    let indent = '';
    let propertyList;
    let replacerFunc;
    let gap = '';
    let quote;
    if (replacer != null && typeof replacer === 'object' && !Array.isArray(replacer)) {
        space = replacer.space;
        quote = replacer.quote;
        replacer = replacer.replacer;
    }
    if (typeof replacer === 'function') replacerFunc = replacer;
    else if (Array.isArray(replacer)) {
        propertyList = [];
        for (const v of replacer){
            let item;
            if (typeof v === 'string') item = v;
            else if (typeof v === 'number' || v instanceof String || v instanceof Number) item = String(v);
            if (item !== undefined && propertyList.indexOf(item) < 0) propertyList.push(item);
        }
    }
    if (space instanceof Number) space = Number(space);
    else if (space instanceof String) space = String(space);
    if (typeof space === 'number') {
        if (space > 0) {
            space = Math.min(10, Math.floor(space));
            gap = '          '.substr(0, space);
        }
    } else if (typeof space === 'string') gap = space.substr(0, 10);
    return serializeProperty('', {
        '': value
    });
    function serializeProperty(key, holder) {
        let value = holder[key];
        if (value != null) {
            if (typeof value.toJSON5 === 'function') value = value.toJSON5(key);
            else if (typeof value.toJSON === 'function') value = value.toJSON(key);
        }
        if (replacerFunc) value = replacerFunc.call(holder, key, value);
        if (value instanceof Number) value = Number(value);
        else if (value instanceof String) value = String(value);
        else if (value instanceof Boolean) value = value.valueOf();
        switch(value){
            case null:
                return 'null';
            case true:
                return 'true';
            case false:
                return 'false';
        }
        if (typeof value === 'string') return quoteString(value, false);
        if (typeof value === 'number') return String(value);
        if (typeof value === 'object') return Array.isArray(value) ? serializeArray(value) : serializeObject(value);
        return undefined;
    }
    function quoteString(value) {
        const quotes = {
            "'": 0.1,
            '"': 0.2
        };
        const replacements = {
            "'": "\\'",
            '"': '\\"',
            '\\': '\\\\',
            '\b': '\\b',
            '\f': '\\f',
            '\n': '\\n',
            '\r': '\\r',
            '\t': '\\t',
            '\v': '\\v',
            '\0': '\\0',
            '\u2028': '\\u2028',
            '\u2029': '\\u2029'
        };
        let product = '';
        for(let i = 0; i < value.length; i++){
            const c = value[i];
            switch(c){
                case "'":
                case '"':
                    quotes[c]++;
                    product += c;
                    continue;
                case '\0':
                    if ($59ba57524f3b5ae9$var$util.isDigit(value[i + 1])) {
                        product += '\\x00';
                        continue;
                    }
            }
            if (replacements[c]) {
                product += replacements[c];
                continue;
            }
            if (c < ' ') {
                let hexString = c.charCodeAt(0).toString(16);
                product += '\\x' + ('00' + hexString).substring(hexString.length);
                continue;
            }
            product += c;
        }
        const quoteChar = quote || Object.keys(quotes).reduce((a, b)=>quotes[a] < quotes[b] ? a : b);
        product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]);
        return quoteChar + product + quoteChar;
    }
    function serializeObject(value) {
        if (stack.indexOf(value) >= 0) throw TypeError('Converting circular structure to JSON5');
        stack.push(value);
        let stepback = indent;
        indent = indent + gap;
        let keys = propertyList || Object.keys(value);
        let partial = [];
        for (const key of keys){
            const propertyString = serializeProperty(key, value);
            if (propertyString !== undefined) {
                let member = serializeKey(key) + ':';
                if (gap !== '') member += ' ';
                member += propertyString;
                partial.push(member);
            }
        }
        let final;
        if (partial.length === 0) final = '{}';
        else {
            let properties;
            if (gap === '') {
                properties = partial.join(',');
                final = '{' + properties + '}';
            } else {
                let separator = ',\n' + indent;
                properties = partial.join(separator);
                final = '{\n' + indent + properties + ',\n' + stepback + '}';
            }
        }
        stack.pop();
        indent = stepback;
        return final;
    }
    function serializeKey(key) {
        if (key.length === 0) return quoteString(key, true);
        const firstChar = String.fromCodePoint(key.codePointAt(0));
        if (!$59ba57524f3b5ae9$var$util.isIdStartChar(firstChar)) return quoteString(key, true);
        for(let i = firstChar.length; i < key.length; i++){
            if (!$59ba57524f3b5ae9$var$util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) return quoteString(key, true);
        }
        return key;
    }
    function serializeArray(value) {
        if (stack.indexOf(value) >= 0) throw TypeError('Converting circular structure to JSON5');
        stack.push(value);
        let stepback = indent;
        indent = indent + gap;
        let partial = [];
        for(let i = 0; i < value.length; i++){
            const propertyString = serializeProperty(String(i), value);
            partial.push(propertyString !== undefined ? propertyString : 'null');
        }
        let final;
        if (partial.length === 0) final = '[]';
        else if (gap === '') {
            let properties = partial.join(',');
            final = '[' + properties + ']';
        } else {
            let separator = ',\n' + indent;
            let properties = partial.join(separator);
            final = '[\n' + indent + properties + ',\n' + stepback + ']';
        }
        stack.pop();
        indent = stepback;
        return final;
    }
};
const $59ba57524f3b5ae9$var$JSON5 = {
    parse: $59ba57524f3b5ae9$var$parse,
    stringify: $59ba57524f3b5ae9$var$stringify
};
var $59ba57524f3b5ae9$var$lib = $59ba57524f3b5ae9$var$JSON5;
var $59ba57524f3b5ae9$export$2e2bcd8739ae039 = $59ba57524f3b5ae9$var$lib;



/**
A parse stack. These are used internally by the parser to track
parsing progress. They also provide some properties and methods
that external code such as a tokenizer can use to get information
about the parse state.
*/ class $c5d7b70ac6fb80dd$export$694e0d28c7ffc90c {
    /**
    @internal
    */ constructor(/**
    The parse that this stack is part of @internal
    */ p, /**
    Holds state, input pos, buffer index triplets for all but the
    top state @internal
    */ stack, /**
    The current parse state @internal
    */ state, // The position at which the next reduce should take place. This
    // can be less than `this.pos` when skipped expressions have been
    // added to the stack (which should be moved outside of the next
    // reduction)
    /**
    @internal
    */ reducePos, /**
    The input position up to which this stack has parsed.
    */ pos, /**
    The dynamic score of the stack, including dynamic precedence
    and error-recovery penalties
    @internal
    */ score, // The output buffer. Holds (type, start, end, size) quads
    // representing nodes created by the parser, where `size` is
    // amount of buffer array entries covered by this node.
    /**
    @internal
    */ buffer, // The base offset of the buffer. When stacks are split, the split
    // instance shared the buffer history with its parent up to
    // `bufferBase`, which is the absolute offset (including the
    // offset of previous splits) into the buffer at which this stack
    // starts writing.
    /**
    @internal
    */ bufferBase, /**
    @internal
    */ curContext, /**
    @internal
    */ lookAhead = 0, // A parent stack from which this was split off, if any. This is
    // set up so that it always points to a stack that has some
    // additional buffer content, never to a stack with an equal
    // `bufferBase`.
    /**
    @internal
    */ parent){
        this.p = p;
        this.stack = stack;
        this.state = state;
        this.reducePos = reducePos;
        this.pos = pos;
        this.score = score;
        this.buffer = buffer;
        this.bufferBase = bufferBase;
        this.curContext = curContext;
        this.lookAhead = lookAhead;
        this.parent = parent;
    }
    /**
    @internal
    */ toString() {
        return `[${this.stack.filter((_, i)=>i % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
    }
    // Start an empty stack
    /**
    @internal
    */ static start(p, state, pos = 0) {
        let cx = p.parser.context;
        return new $c5d7b70ac6fb80dd$export$694e0d28c7ffc90c(p, [], state, pos, pos, 0, [], 0, cx ? new $c5d7b70ac6fb80dd$var$StackContext(cx, cx.start) : null, 0, null);
    }
    /**
    The stack's current [context](#lr.ContextTracker) value, if
    any. Its type will depend on the context tracker's type
    parameter, or it will be `null` if there is no context
    tracker.
    */ get context() {
        return this.curContext ? this.curContext.context : null;
    }
    // Push a state onto the stack, tracking its start position as well
    // as the buffer base at that point.
    /**
    @internal
    */ pushState(state, start) {
        this.stack.push(this.state, start, this.bufferBase + this.buffer.length);
        this.state = state;
    }
    // Apply a reduce action
    /**
    @internal
    */ reduce(action) {
        var _a;
        let depth = action >> 19 /* Action.ReduceDepthShift */ , type = action & 65535 /* Action.ValueMask */ ;
        let { parser: parser } = this.p;
        let lookaheadRecord = this.reducePos < this.pos - 25 /* Lookahead.Margin */ ;
        if (lookaheadRecord) this.setLookAhead(this.pos);
        let dPrec = parser.dynamicPrecedence(type);
        if (dPrec) this.score += dPrec;
        if (depth == 0) {
            this.pushState(parser.getGoto(this.state, type, true), this.reducePos);
            // Zero-depth reductions are a special case—they add stuff to
            // the stack without popping anything off.
            if (type < parser.minRepeatTerm) this.storeNode(type, this.reducePos, this.reducePos, lookaheadRecord ? 8 : 4, true);
            this.reduceContext(type, this.reducePos);
            return;
        }
        // Find the base index into `this.stack`, content after which will
        // be dropped. Note that with `StayFlag` reductions we need to
        // consume two extra frames (the dummy parent node for the skipped
        // expression and the state that we'll be staying in, which should
        // be moved to `this.state`).
        let base = this.stack.length - (depth - 1) * 3 - (action & 262144 /* Action.StayFlag */  ? 6 : 0);
        let start = base ? this.stack[base - 2] : this.p.ranges[0].from, size = this.reducePos - start;
        // This is a kludge to try and detect overly deep left-associative
        // trees, which will not increase the parse stack depth and thus
        // won't be caught by the regular stack-depth limit check.
        if (size >= 2000 /* Recover.MinBigReduction */  && !((_a = this.p.parser.nodeSet.types[type]) === null || _a === void 0 ? void 0 : _a.isAnonymous)) {
            if (start == this.p.lastBigReductionStart) {
                this.p.bigReductionCount++;
                this.p.lastBigReductionSize = size;
            } else if (this.p.lastBigReductionSize < size) {
                this.p.bigReductionCount = 1;
                this.p.lastBigReductionStart = start;
                this.p.lastBigReductionSize = size;
            }
        }
        let bufferBase = base ? this.stack[base - 1] : 0, count = this.bufferBase + this.buffer.length - bufferBase;
        // Store normal terms or `R -> R R` repeat reductions
        if (type < parser.minRepeatTerm || action & 131072 /* Action.RepeatFlag */ ) {
            let pos = parser.stateFlag(this.state, 1 /* StateFlag.Skipped */ ) ? this.pos : this.reducePos;
            this.storeNode(type, start, pos, count + 4, true);
        }
        if (action & 262144 /* Action.StayFlag */ ) this.state = this.stack[base];
        else {
            let baseStateID = this.stack[base - 3];
            this.state = parser.getGoto(baseStateID, type, true);
        }
        while(this.stack.length > base)this.stack.pop();
        this.reduceContext(type, start);
    }
    // Shift a value into the buffer
    /**
    @internal
    */ storeNode(term, start, end, size = 4, mustSink = false) {
        if (term == 0 /* Term.Err */  && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
            // Try to omit/merge adjacent error nodes
            let cur = this, top = this.buffer.length;
            if (top == 0 && cur.parent) {
                top = cur.bufferBase - cur.parent.bufferBase;
                cur = cur.parent;
            }
            if (top > 0 && cur.buffer[top - 4] == 0 /* Term.Err */  && cur.buffer[top - 1] > -1) {
                if (start == end) return;
                if (cur.buffer[top - 2] >= start) {
                    cur.buffer[top - 2] = end;
                    return;
                }
            }
        }
        if (!mustSink || this.pos == end) this.buffer.push(term, start, end, size);
        else {
            let index = this.buffer.length;
            if (index > 0 && this.buffer[index - 4] != 0 /* Term.Err */ ) {
                let mustMove = false;
                for(let scan = index; scan > 0 && this.buffer[scan - 2] > end; scan -= 4)if (this.buffer[scan - 1] >= 0) {
                    mustMove = true;
                    break;
                }
                if (mustMove) while(index > 0 && this.buffer[index - 2] > end){
                    // Move this record forward
                    this.buffer[index] = this.buffer[index - 4];
                    this.buffer[index + 1] = this.buffer[index - 3];
                    this.buffer[index + 2] = this.buffer[index - 2];
                    this.buffer[index + 3] = this.buffer[index - 1];
                    index -= 4;
                    if (size > 4) size -= 4;
                }
            }
            this.buffer[index] = term;
            this.buffer[index + 1] = start;
            this.buffer[index + 2] = end;
            this.buffer[index + 3] = size;
        }
    }
    // Apply a shift action
    /**
    @internal
    */ shift(action, type, start, end) {
        if (action & 131072 /* Action.GotoFlag */ ) this.pushState(action & 65535 /* Action.ValueMask */ , this.pos);
        else if ((action & 262144 /* Action.StayFlag */ ) == 0) {
            let nextState = action, { parser: parser } = this.p;
            if (end > this.pos || type <= parser.maxNode) {
                this.pos = end;
                if (!parser.stateFlag(nextState, 1 /* StateFlag.Skipped */ )) this.reducePos = end;
            }
            this.pushState(nextState, start);
            this.shiftContext(type, start);
            if (type <= parser.maxNode) this.buffer.push(type, start, end, 4);
        } else {
            this.pos = end;
            this.shiftContext(type, start);
            if (type <= this.p.parser.maxNode) this.buffer.push(type, start, end, 4);
        }
    }
    // Apply an action
    /**
    @internal
    */ apply(action, next, nextStart, nextEnd) {
        if (action & 65536 /* Action.ReduceFlag */ ) this.reduce(action);
        else this.shift(action, next, nextStart, nextEnd);
    }
    // Add a prebuilt (reused) node into the buffer.
    /**
    @internal
    */ useNode(value, next) {
        let index = this.p.reused.length - 1;
        if (index < 0 || this.p.reused[index] != value) {
            this.p.reused.push(value);
            index++;
        }
        let start = this.pos;
        this.reducePos = this.pos = start + value.length;
        this.pushState(next, start);
        this.buffer.push(index, start, this.reducePos, -1 /* size == -1 means this is a reused value */ );
        if (this.curContext) this.updateContext(this.curContext.tracker.reuse(this.curContext.context, value, this, this.p.stream.reset(this.pos - value.length)));
    }
    // Split the stack. Due to the buffer sharing and the fact
    // that `this.stack` tends to stay quite shallow, this isn't very
    // expensive.
    /**
    @internal
    */ split() {
        let parent = this;
        let off = parent.buffer.length;
        // Because the top of the buffer (after this.pos) may be mutated
        // to reorder reductions and skipped tokens, and shared buffers
        // should be immutable, this copies any outstanding skipped tokens
        // to the new buffer, and puts the base pointer before them.
        while(off > 0 && parent.buffer[off - 2] > parent.reducePos)off -= 4;
        let buffer = parent.buffer.slice(off), base = parent.bufferBase + off;
        // Make sure parent points to an actual parent with content, if there is such a parent.
        while(parent && base == parent.bufferBase)parent = parent.parent;
        return new $c5d7b70ac6fb80dd$export$694e0d28c7ffc90c(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, buffer, base, this.curContext, this.lookAhead, parent);
    }
    // Try to recover from an error by 'deleting' (ignoring) one token.
    /**
    @internal
    */ recoverByDelete(next, nextEnd) {
        let isNode = next <= this.p.parser.maxNode;
        if (isNode) this.storeNode(next, this.pos, nextEnd, 4);
        this.storeNode(0 /* Term.Err */ , this.pos, nextEnd, isNode ? 8 : 4);
        this.pos = this.reducePos = nextEnd;
        this.score -= 190 /* Recover.Delete */ ;
    }
    /**
    Check if the given term would be able to be shifted (optionally
    after some reductions) on this stack. This can be useful for
    external tokenizers that want to make sure they only provide a
    given token when it applies.
    */ canShift(term) {
        for(let sim = new $c5d7b70ac6fb80dd$var$SimulatedStack(this);;){
            let action = this.p.parser.stateSlot(sim.state, 4 /* ParseState.DefaultReduce */ ) || this.p.parser.hasAction(sim.state, term);
            if (action == 0) return false;
            if ((action & 65536 /* Action.ReduceFlag */ ) == 0) return true;
            sim.reduce(action);
        }
    }
    // Apply up to Recover.MaxNext recovery actions that conceptually
    // inserts some missing token or rule.
    /**
    @internal
    */ recoverByInsert(next) {
        if (this.stack.length >= 300 /* Recover.MaxInsertStackDepth */ ) return [];
        let nextStates = this.p.parser.nextStates(this.state);
        if (nextStates.length > 8 || this.stack.length >= 120 /* Recover.DampenInsertStackDepth */ ) {
            let best = [];
            for(let i = 0, s; i < nextStates.length; i += 2)if ((s = nextStates[i + 1]) != this.state && this.p.parser.hasAction(s, next)) best.push(nextStates[i], s);
            if (this.stack.length < 120 /* Recover.DampenInsertStackDepth */ ) for(let i = 0; best.length < 8 && i < nextStates.length; i += 2){
                let s = nextStates[i + 1];
                if (!best.some((v, i)=>i & 1 && v == s)) best.push(nextStates[i], s);
            }
            nextStates = best;
        }
        let result = [];
        for(let i = 0; i < nextStates.length && result.length < 4 /* Recover.MaxNext */ ; i += 2){
            let s = nextStates[i + 1];
            if (s == this.state) continue;
            let stack = this.split();
            stack.pushState(s, this.pos);
            stack.storeNode(0 /* Term.Err */ , stack.pos, stack.pos, 4, true);
            stack.shiftContext(nextStates[i], this.pos);
            stack.reducePos = this.pos;
            stack.score -= 200 /* Recover.Insert */ ;
            result.push(stack);
        }
        return result;
    }
    // Force a reduce, if possible. Return false if that can't
    // be done.
    /**
    @internal
    */ forceReduce() {
        let { parser: parser } = this.p;
        let reduce = parser.stateSlot(this.state, 5 /* ParseState.ForcedReduce */ );
        if ((reduce & 65536 /* Action.ReduceFlag */ ) == 0) return false;
        if (!parser.validAction(this.state, reduce)) {
            let depth = reduce >> 19 /* Action.ReduceDepthShift */ , term = reduce & 65535 /* Action.ValueMask */ ;
            let target = this.stack.length - depth * 3;
            if (target < 0 || parser.getGoto(this.stack[target], term, false) < 0) {
                let backup = this.findForcedReduction();
                if (backup == null) return false;
                reduce = backup;
            }
            this.storeNode(0 /* Term.Err */ , this.pos, this.pos, 4, true);
            this.score -= 100 /* Recover.Reduce */ ;
        }
        this.reducePos = this.pos;
        this.reduce(reduce);
        return true;
    }
    /**
    Try to scan through the automaton to find some kind of reduction
    that can be applied. Used when the regular ForcedReduce field
    isn't a valid action. @internal
    */ findForcedReduction() {
        let { parser: parser } = this.p, seen = [];
        let explore = (state, depth)=>{
            if (seen.includes(state)) return;
            seen.push(state);
            return parser.allActions(state, (action)=>{
                if (action & 393216 /* Action.GotoFlag */ ) ;
                else if (action & 65536 /* Action.ReduceFlag */ ) {
                    let rDepth = (action >> 19 /* Action.ReduceDepthShift */ ) - depth;
                    if (rDepth > 1) {
                        let term = action & 65535 /* Action.ValueMask */ , target = this.stack.length - rDepth * 3;
                        if (target >= 0 && parser.getGoto(this.stack[target], term, false) >= 0) return rDepth << 19 /* Action.ReduceDepthShift */  | 65536 /* Action.ReduceFlag */  | term;
                    }
                } else {
                    let found = explore(action, depth + 1);
                    if (found != null) return found;
                }
            });
        };
        return explore(this.state, 0);
    }
    /**
    @internal
    */ forceAll() {
        while(!this.p.parser.stateFlag(this.state, 2 /* StateFlag.Accepting */ ))if (!this.forceReduce()) {
            this.storeNode(0 /* Term.Err */ , this.pos, this.pos, 4, true);
            break;
        }
        return this;
    }
    /**
    Check whether this state has no further actions (assumed to be a direct descendant of the
    top state, since any other states must be able to continue
    somehow). @internal
    */ get deadEnd() {
        if (this.stack.length != 3) return false;
        let { parser: parser } = this.p;
        return parser.data[parser.stateSlot(this.state, 1 /* ParseState.Actions */ )] == 65535 /* Seq.End */  && !parser.stateSlot(this.state, 4 /* ParseState.DefaultReduce */ );
    }
    /**
    Restart the stack (put it back in its start state). Only safe
    when this.stack.length == 3 (state is directly below the top
    state). @internal
    */ restart() {
        this.storeNode(0 /* Term.Err */ , this.pos, this.pos, 4, true);
        this.state = this.stack[0];
        this.stack.length = 0;
    }
    /**
    @internal
    */ sameState(other) {
        if (this.state != other.state || this.stack.length != other.stack.length) return false;
        for(let i = 0; i < this.stack.length; i += 3)if (this.stack[i] != other.stack[i]) return false;
        return true;
    }
    /**
    Get the parser used by this stack.
    */ get parser() {
        return this.p.parser;
    }
    /**
    Test whether a given dialect (by numeric ID, as exported from
    the terms file) is enabled.
    */ dialectEnabled(dialectID) {
        return this.p.parser.dialect.flags[dialectID];
    }
    shiftContext(term, start) {
        if (this.curContext) this.updateContext(this.curContext.tracker.shift(this.curContext.context, term, this, this.p.stream.reset(start)));
    }
    reduceContext(term, start) {
        if (this.curContext) this.updateContext(this.curContext.tracker.reduce(this.curContext.context, term, this, this.p.stream.reset(start)));
    }
    /**
    @internal
    */ emitContext() {
        let last = this.buffer.length - 1;
        if (last < 0 || this.buffer[last] != -3) this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
    }
    /**
    @internal
    */ emitLookAhead() {
        let last = this.buffer.length - 1;
        if (last < 0 || this.buffer[last] != -4) this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
    }
    updateContext(context) {
        if (context != this.curContext.context) {
            let newCx = new $c5d7b70ac6fb80dd$var$StackContext(this.curContext.tracker, context);
            if (newCx.hash != this.curContext.hash) this.emitContext();
            this.curContext = newCx;
        }
    }
    /**
    @internal
    */ setLookAhead(lookAhead) {
        if (lookAhead > this.lookAhead) {
            this.emitLookAhead();
            this.lookAhead = lookAhead;
        }
    }
    /**
    @internal
    */ close() {
        if (this.curContext && this.curContext.tracker.strict) this.emitContext();
        if (this.lookAhead > 0) this.emitLookAhead();
    }
}
class $c5d7b70ac6fb80dd$var$StackContext {
    constructor(tracker, context){
        this.tracker = tracker;
        this.context = context;
        this.hash = tracker.strict ? tracker.hash(context) : 0;
    }
}
// Used to cheaply run some reductions to scan ahead without mutating
// an entire stack
class $c5d7b70ac6fb80dd$var$SimulatedStack {
    constructor(start){
        this.start = start;
        this.state = start.state;
        this.stack = start.stack;
        this.base = this.stack.length;
    }
    reduce(action) {
        let term = action & 65535 /* Action.ValueMask */ , depth = action >> 19 /* Action.ReduceDepthShift */ ;
        if (depth == 0) {
            if (this.stack == this.start.stack) this.stack = this.stack.slice();
            this.stack.push(this.state, 0, 0);
            this.base += 3;
        } else this.base -= (depth - 1) * 3;
        let goto = this.start.p.parser.getGoto(this.stack[this.base - 3], term, true);
        this.state = goto;
    }
}
// This is given to `Tree.build` to build a buffer, and encapsulates
// the parent-stack-walking necessary to read the nodes.
class $c5d7b70ac6fb80dd$var$StackBufferCursor {
    constructor(stack, pos, index){
        this.stack = stack;
        this.pos = pos;
        this.index = index;
        this.buffer = stack.buffer;
        if (this.index == 0) this.maybeNext();
    }
    static create(stack, pos = stack.bufferBase + stack.buffer.length) {
        return new $c5d7b70ac6fb80dd$var$StackBufferCursor(stack, pos, pos - stack.bufferBase);
    }
    maybeNext() {
        let next = this.stack.parent;
        if (next != null) {
            this.index = this.stack.bufferBase - next.bufferBase;
            this.stack = next;
            this.buffer = next.buffer;
        }
    }
    get id() {
        return this.buffer[this.index - 4];
    }
    get start() {
        return this.buffer[this.index - 3];
    }
    get end() {
        return this.buffer[this.index - 2];
    }
    get size() {
        return this.buffer[this.index - 1];
    }
    next() {
        this.index -= 4;
        this.pos -= 4;
        if (this.index == 0) this.maybeNext();
    }
    fork() {
        return new $c5d7b70ac6fb80dd$var$StackBufferCursor(this.stack, this.pos, this.index);
    }
}
// See lezer-generator/src/encode.ts for comments about the encoding
// used here
function $c5d7b70ac6fb80dd$var$decodeArray(input, Type = Uint16Array) {
    if (typeof input != "string") return input;
    let array = null;
    for(let pos = 0, out = 0; pos < input.length;){
        let value = 0;
        for(;;){
            let next = input.charCodeAt(pos++), stop = false;
            if (next == 126 /* Encode.BigValCode */ ) {
                value = 65535 /* Encode.BigVal */ ;
                break;
            }
            if (next >= 92 /* Encode.Gap2 */ ) next--;
            if (next >= 34 /* Encode.Gap1 */ ) next--;
            let digit = next - 32 /* Encode.Start */ ;
            if (digit >= 46 /* Encode.Base */ ) {
                digit -= 46 /* Encode.Base */ ;
                stop = true;
            }
            value += digit;
            if (stop) break;
            value *= 46 /* Encode.Base */ ;
        }
        if (array) array[out++] = value;
        else array = new Type(value);
    }
    return array;
}
class $c5d7b70ac6fb80dd$var$CachedToken {
    constructor(){
        this.start = -1;
        this.value = -1;
        this.end = -1;
        this.extended = -1;
        this.lookAhead = 0;
        this.mask = 0;
        this.context = 0;
    }
}
const $c5d7b70ac6fb80dd$var$nullToken = new $c5d7b70ac6fb80dd$var$CachedToken;
/**
[Tokenizers](#lr.ExternalTokenizer) interact with the input
through this interface. It presents the input as a stream of
characters, tracking lookahead and hiding the complexity of
[ranges](#common.Parser.parse^ranges) from tokenizer code.
*/ class $c5d7b70ac6fb80dd$export$f22294a9362415e4 {
    /**
    @internal
    */ constructor(/**
    @internal
    */ input, /**
    @internal
    */ ranges){
        this.input = input;
        this.ranges = ranges;
        /**
        @internal
        */ this.chunk = "";
        /**
        @internal
        */ this.chunkOff = 0;
        /**
        Backup chunk
        */ this.chunk2 = "";
        this.chunk2Pos = 0;
        /**
        The character code of the next code unit in the input, or -1
        when the stream is at the end of the input.
        */ this.next = -1;
        /**
        @internal
        */ this.token = $c5d7b70ac6fb80dd$var$nullToken;
        this.rangeIndex = 0;
        this.pos = this.chunkPos = ranges[0].from;
        this.range = ranges[0];
        this.end = ranges[ranges.length - 1].to;
        this.readNext();
    }
    /**
    @internal
    */ resolveOffset(offset, assoc) {
        let range = this.range, index = this.rangeIndex;
        let pos = this.pos + offset;
        while(pos < range.from){
            if (!index) return null;
            let next = this.ranges[--index];
            pos -= range.from - next.to;
            range = next;
        }
        while(assoc < 0 ? pos > range.to : pos >= range.to){
            if (index == this.ranges.length - 1) return null;
            let next = this.ranges[++index];
            pos += next.from - range.to;
            range = next;
        }
        return pos;
    }
    /**
    @internal
    */ clipPos(pos) {
        if (pos >= this.range.from && pos < this.range.to) return pos;
        for (let range of this.ranges)if (range.to > pos) return Math.max(pos, range.from);
        return this.end;
    }
    /**
    Look at a code unit near the stream position. `.peek(0)` equals
    `.next`, `.peek(-1)` gives you the previous character, and so
    on.
    
    Note that looking around during tokenizing creates dependencies
    on potentially far-away content, which may reduce the
    effectiveness incremental parsing—when looking forward—or even
    cause invalid reparses when looking backward more than 25 code
    units, since the library does not track lookbehind.
    */ peek(offset) {
        let idx = this.chunkOff + offset, pos, result;
        if (idx >= 0 && idx < this.chunk.length) {
            pos = this.pos + offset;
            result = this.chunk.charCodeAt(idx);
        } else {
            let resolved = this.resolveOffset(offset, 1);
            if (resolved == null) return -1;
            pos = resolved;
            if (pos >= this.chunk2Pos && pos < this.chunk2Pos + this.chunk2.length) result = this.chunk2.charCodeAt(pos - this.chunk2Pos);
            else {
                let i = this.rangeIndex, range = this.range;
                while(range.to <= pos)range = this.ranges[++i];
                this.chunk2 = this.input.chunk(this.chunk2Pos = pos);
                if (pos + this.chunk2.length > range.to) this.chunk2 = this.chunk2.slice(0, range.to - pos);
                result = this.chunk2.charCodeAt(0);
            }
        }
        if (pos >= this.token.lookAhead) this.token.lookAhead = pos + 1;
        return result;
    }
    /**
    Accept a token. By default, the end of the token is set to the
    current stream position, but you can pass an offset (relative to
    the stream position) to change that.
    */ acceptToken(token, endOffset = 0) {
        let end = endOffset ? this.resolveOffset(endOffset, -1) : this.pos;
        if (end == null || end < this.token.start) throw new RangeError("Token end out of bounds");
        this.token.value = token;
        this.token.end = end;
    }
    /**
    Accept a token ending at a specific given position.
    */ acceptTokenTo(token, endPos) {
        this.token.value = token;
        this.token.end = endPos;
    }
    getChunk() {
        if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
            let { chunk: chunk, chunkPos: chunkPos } = this;
            this.chunk = this.chunk2;
            this.chunkPos = this.chunk2Pos;
            this.chunk2 = chunk;
            this.chunk2Pos = chunkPos;
            this.chunkOff = this.pos - this.chunkPos;
        } else {
            this.chunk2 = this.chunk;
            this.chunk2Pos = this.chunkPos;
            let nextChunk = this.input.chunk(this.pos);
            let end = this.pos + nextChunk.length;
            this.chunk = end > this.range.to ? nextChunk.slice(0, this.range.to - this.pos) : nextChunk;
            this.chunkPos = this.pos;
            this.chunkOff = 0;
        }
    }
    readNext() {
        if (this.chunkOff >= this.chunk.length) {
            this.getChunk();
            if (this.chunkOff == this.chunk.length) return this.next = -1;
        }
        return this.next = this.chunk.charCodeAt(this.chunkOff);
    }
    /**
    Move the stream forward N (defaults to 1) code units. Returns
    the new value of [`next`](#lr.InputStream.next).
    */ advance(n = 1) {
        this.chunkOff += n;
        while(this.pos + n >= this.range.to){
            if (this.rangeIndex == this.ranges.length - 1) return this.setDone();
            n -= this.range.to - this.pos;
            this.range = this.ranges[++this.rangeIndex];
            this.pos = this.range.from;
        }
        this.pos += n;
        if (this.pos >= this.token.lookAhead) this.token.lookAhead = this.pos + 1;
        return this.readNext();
    }
    setDone() {
        this.pos = this.chunkPos = this.end;
        this.range = this.ranges[this.rangeIndex = this.ranges.length - 1];
        this.chunk = "";
        return this.next = -1;
    }
    /**
    @internal
    */ reset(pos, token) {
        if (token) {
            this.token = token;
            token.start = pos;
            token.lookAhead = pos + 1;
            token.value = token.extended = -1;
        } else this.token = $c5d7b70ac6fb80dd$var$nullToken;
        if (this.pos != pos) {
            this.pos = pos;
            if (pos == this.end) {
                this.setDone();
                return this;
            }
            while(pos < this.range.from)this.range = this.ranges[--this.rangeIndex];
            while(pos >= this.range.to)this.range = this.ranges[++this.rangeIndex];
            if (pos >= this.chunkPos && pos < this.chunkPos + this.chunk.length) this.chunkOff = pos - this.chunkPos;
            else {
                this.chunk = "";
                this.chunkOff = 0;
            }
            this.readNext();
        }
        return this;
    }
    /**
    @internal
    */ read(from, to) {
        if (from >= this.chunkPos && to <= this.chunkPos + this.chunk.length) return this.chunk.slice(from - this.chunkPos, to - this.chunkPos);
        if (from >= this.chunk2Pos && to <= this.chunk2Pos + this.chunk2.length) return this.chunk2.slice(from - this.chunk2Pos, to - this.chunk2Pos);
        if (from >= this.range.from && to <= this.range.to) return this.input.read(from, to);
        let result = "";
        for (let r of this.ranges){
            if (r.from >= to) break;
            if (r.to > from) result += this.input.read(Math.max(r.from, from), Math.min(r.to, to));
        }
        return result;
    }
}
/**
@internal
*/ class $c5d7b70ac6fb80dd$var$TokenGroup {
    constructor(data, id){
        this.data = data;
        this.id = id;
    }
    token(input, stack) {
        let { parser: parser } = stack.p;
        $c5d7b70ac6fb80dd$var$readToken(this.data, input, stack, this.id, parser.data, parser.tokenPrecTable);
    }
}
$c5d7b70ac6fb80dd$var$TokenGroup.prototype.contextual = $c5d7b70ac6fb80dd$var$TokenGroup.prototype.fallback = $c5d7b70ac6fb80dd$var$TokenGroup.prototype.extend = false;
/**
@hide
*/ class $c5d7b70ac6fb80dd$export$dbe55ed82366d5e9 {
    constructor(data, precTable, elseToken){
        this.precTable = precTable;
        this.elseToken = elseToken;
        this.data = typeof data == "string" ? $c5d7b70ac6fb80dd$var$decodeArray(data) : data;
    }
    token(input, stack) {
        let start = input.pos, skipped = 0;
        for(;;){
            let atEof = input.next < 0, nextPos = input.resolveOffset(1, 1);
            $c5d7b70ac6fb80dd$var$readToken(this.data, input, stack, 0, this.data, this.precTable);
            if (input.token.value > -1) break;
            if (this.elseToken == null) return;
            if (!atEof) skipped++;
            if (nextPos == null) break;
            input.reset(nextPos, input.token);
        }
        if (skipped) {
            input.reset(start, input.token);
            input.acceptToken(this.elseToken, skipped);
        }
    }
}
$c5d7b70ac6fb80dd$export$dbe55ed82366d5e9.prototype.contextual = $c5d7b70ac6fb80dd$var$TokenGroup.prototype.fallback = $c5d7b70ac6fb80dd$var$TokenGroup.prototype.extend = false;
/**
`@external tokens` declarations in the grammar should resolve to
an instance of this class.
*/ class $c5d7b70ac6fb80dd$export$6e56a42e94c6b2cb {
    /**
    Create a tokenizer. The first argument is the function that,
    given an input stream, scans for the types of tokens it
    recognizes at the stream's position, and calls
    [`acceptToken`](#lr.InputStream.acceptToken) when it finds
    one.
    */ constructor(/**
    @internal
    */ token, options = {}){
        this.token = token;
        this.contextual = !!options.contextual;
        this.fallback = !!options.fallback;
        this.extend = !!options.extend;
    }
}
// Tokenizer data is stored a big uint16 array containing, for each
// state:
//
//  - A group bitmask, indicating what token groups are reachable from
//    this state, so that paths that can only lead to tokens not in
//    any of the current groups can be cut off early.
//
//  - The position of the end of the state's sequence of accepting
//    tokens
//
//  - The number of outgoing edges for the state
//
//  - The accepting tokens, as (token id, group mask) pairs
//
//  - The outgoing edges, as (start character, end character, state
//    index) triples, with end character being exclusive
//
// This function interprets that data, running through a stream as
// long as new states with the a matching group mask can be reached,
// and updating `input.token` when it matches a token.
function $c5d7b70ac6fb80dd$var$readToken(data, input, stack, group, precTable, precOffset) {
    let state = 0, groupMask = 1 << group, { dialect: dialect } = stack.p.parser;
    scan: for(;;){
        if ((groupMask & data[state]) == 0) break;
        let accEnd = data[state + 1];
        // Check whether this state can lead to a token in the current group
        // Accept tokens in this state, possibly overwriting
        // lower-precedence / shorter tokens
        for(let i = state + 3; i < accEnd; i += 2)if ((data[i + 1] & groupMask) > 0) {
            let term = data[i];
            if (dialect.allows(term) && (input.token.value == -1 || input.token.value == term || $c5d7b70ac6fb80dd$var$overrides(term, input.token.value, precTable, precOffset))) {
                input.acceptToken(term);
                break;
            }
        }
        let next = input.next, low = 0, high = data[state + 2];
        // Special case for EOF
        if (input.next < 0 && high > low && data[accEnd + high * 3 - 3] == 65535 /* Seq.End */ ) {
            state = data[accEnd + high * 3 - 1];
            continue scan;
        }
        // Do a binary search on the state's edges
        for(; low < high;){
            let mid = low + high >> 1;
            let index = accEnd + mid + (mid << 1);
            let from = data[index], to = data[index + 1] || 0x10000;
            if (next < from) high = mid;
            else if (next >= to) low = mid + 1;
            else {
                state = data[index + 2];
                input.advance();
                continue scan;
            }
        }
        break;
    }
}
function $c5d7b70ac6fb80dd$var$findOffset(data, start, term) {
    for(let i = start, next; (next = data[i]) != 65535 /* Seq.End */ ; i++)if (next == term) return i - start;
    return -1;
}
function $c5d7b70ac6fb80dd$var$overrides(token, prev, tableData, tableOffset) {
    let iPrev = $c5d7b70ac6fb80dd$var$findOffset(tableData, tableOffset, prev);
    return iPrev < 0 || $c5d7b70ac6fb80dd$var$findOffset(tableData, tableOffset, token) < iPrev;
}
// Environment variable used to control console output
const $c5d7b70ac6fb80dd$var$verbose = typeof process != "undefined" && process.env && /\bparse\b/.test(process.env.LOG);
let $c5d7b70ac6fb80dd$var$stackIDs = null;
function $c5d7b70ac6fb80dd$var$cutAt(tree, pos, side) {
    let cursor = tree.cursor((0, $8cd8e2c17e3ae471$export$b0e28367f55837aa).IncludeAnonymous);
    cursor.moveTo(pos);
    for(;;){
        if (!(side < 0 ? cursor.childBefore(pos) : cursor.childAfter(pos))) for(;;){
            if ((side < 0 ? cursor.to < pos : cursor.from > pos) && !cursor.type.isError) return side < 0 ? Math.max(0, Math.min(cursor.to - 1, pos - 25 /* Lookahead.Margin */ )) : Math.min(tree.length, Math.max(cursor.from + 1, pos + 25 /* Lookahead.Margin */ ));
            if (side < 0 ? cursor.prevSibling() : cursor.nextSibling()) break;
            if (!cursor.parent()) return side < 0 ? 0 : tree.length;
        }
    }
}
class $c5d7b70ac6fb80dd$var$FragmentCursor {
    constructor(fragments, nodeSet){
        this.fragments = fragments;
        this.nodeSet = nodeSet;
        this.i = 0;
        this.fragment = null;
        this.safeFrom = -1;
        this.safeTo = -1;
        this.trees = [];
        this.start = [];
        this.index = [];
        this.nextFragment();
    }
    nextFragment() {
        let fr = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
        if (fr) {
            this.safeFrom = fr.openStart ? $c5d7b70ac6fb80dd$var$cutAt(fr.tree, fr.from + fr.offset, 1) - fr.offset : fr.from;
            this.safeTo = fr.openEnd ? $c5d7b70ac6fb80dd$var$cutAt(fr.tree, fr.to + fr.offset, -1) - fr.offset : fr.to;
            while(this.trees.length){
                this.trees.pop();
                this.start.pop();
                this.index.pop();
            }
            this.trees.push(fr.tree);
            this.start.push(-fr.offset);
            this.index.push(0);
            this.nextStart = this.safeFrom;
        } else this.nextStart = 1e9;
    }
    // `pos` must be >= any previously given `pos` for this cursor
    nodeAt(pos) {
        if (pos < this.nextStart) return null;
        while(this.fragment && this.safeTo <= pos)this.nextFragment();
        if (!this.fragment) return null;
        for(;;){
            let last = this.trees.length - 1;
            if (last < 0) {
                this.nextFragment();
                return null;
            }
            let top = this.trees[last], index = this.index[last];
            if (index == top.children.length) {
                this.trees.pop();
                this.start.pop();
                this.index.pop();
                continue;
            }
            let next = top.children[index];
            let start = this.start[last] + top.positions[index];
            if (start > pos) {
                this.nextStart = start;
                return null;
            }
            if (next instanceof (0, $8cd8e2c17e3ae471$export$7fbedc92909ed28e)) {
                if (start == pos) {
                    if (start < this.safeFrom) return null;
                    let end = start + next.length;
                    if (end <= this.safeTo) {
                        let lookAhead = next.prop((0, $8cd8e2c17e3ae471$export$b8034b9bc18acd90).lookAhead);
                        if (!lookAhead || end + lookAhead < this.fragment.to) return next;
                    }
                }
                this.index[last]++;
                if (start + next.length >= Math.max(this.safeFrom, pos)) {
                    this.trees.push(next);
                    this.start.push(start);
                    this.index.push(0);
                }
            } else {
                this.index[last]++;
                this.nextStart = start + next.length;
            }
        }
    }
}
class $c5d7b70ac6fb80dd$var$TokenCache {
    constructor(parser, stream){
        this.stream = stream;
        this.tokens = [];
        this.mainToken = null;
        this.actions = [];
        this.tokens = parser.tokenizers.map((_)=>new $c5d7b70ac6fb80dd$var$CachedToken);
    }
    getActions(stack) {
        let actionIndex = 0;
        let main = null;
        let { parser: parser } = stack.p, { tokenizers: tokenizers } = parser;
        let mask = parser.stateSlot(stack.state, 3 /* ParseState.TokenizerMask */ );
        let context = stack.curContext ? stack.curContext.hash : 0;
        let lookAhead = 0;
        for(let i = 0; i < tokenizers.length; i++){
            if ((1 << i & mask) == 0) continue;
            let tokenizer = tokenizers[i], token = this.tokens[i];
            if (main && !tokenizer.fallback) continue;
            if (tokenizer.contextual || token.start != stack.pos || token.mask != mask || token.context != context) {
                this.updateCachedToken(token, tokenizer, stack);
                token.mask = mask;
                token.context = context;
            }
            if (token.lookAhead > token.end + 25 /* Lookahead.Margin */ ) lookAhead = Math.max(token.lookAhead, lookAhead);
            if (token.value != 0 /* Term.Err */ ) {
                let startIndex = actionIndex;
                if (token.extended > -1) actionIndex = this.addActions(stack, token.extended, token.end, actionIndex);
                actionIndex = this.addActions(stack, token.value, token.end, actionIndex);
                if (!tokenizer.extend) {
                    main = token;
                    if (actionIndex > startIndex) break;
                }
            }
        }
        while(this.actions.length > actionIndex)this.actions.pop();
        if (lookAhead) stack.setLookAhead(lookAhead);
        if (!main && stack.pos == this.stream.end) {
            main = new $c5d7b70ac6fb80dd$var$CachedToken;
            main.value = stack.p.parser.eofTerm;
            main.start = main.end = stack.pos;
            actionIndex = this.addActions(stack, main.value, main.end, actionIndex);
        }
        this.mainToken = main;
        return this.actions;
    }
    getMainToken(stack) {
        if (this.mainToken) return this.mainToken;
        let main = new $c5d7b70ac6fb80dd$var$CachedToken, { pos: pos, p: p } = stack;
        main.start = pos;
        main.end = Math.min(pos + 1, p.stream.end);
        main.value = pos == p.stream.end ? p.parser.eofTerm : 0 /* Term.Err */ ;
        return main;
    }
    updateCachedToken(token, tokenizer, stack) {
        let start = this.stream.clipPos(stack.pos);
        tokenizer.token(this.stream.reset(start, token), stack);
        if (token.value > -1) {
            let { parser: parser } = stack.p;
            for(let i = 0; i < parser.specialized.length; i++)if (parser.specialized[i] == token.value) {
                let result = parser.specializers[i](this.stream.read(token.start, token.end), stack);
                if (result >= 0 && stack.p.parser.dialect.allows(result >> 1)) {
                    if ((result & 1) == 0 /* Specialize.Specialize */ ) token.value = result >> 1;
                    else token.extended = result >> 1;
                    break;
                }
            }
        } else {
            token.value = 0 /* Term.Err */ ;
            token.end = this.stream.clipPos(start + 1);
        }
    }
    putAction(action, token, end, index) {
        // Don't add duplicate actions
        for(let i = 0; i < index; i += 3)if (this.actions[i] == action) return index;
        this.actions[index++] = action;
        this.actions[index++] = token;
        this.actions[index++] = end;
        return index;
    }
    addActions(stack, token, end, index) {
        let { state: state } = stack, { parser: parser } = stack.p, { data: data } = parser;
        for(let set = 0; set < 2; set++)for(let i = parser.stateSlot(state, set ? 2 /* ParseState.Skip */  : 1 /* ParseState.Actions */ );; i += 3){
            if (data[i] == 65535 /* Seq.End */ ) {
                if (data[i + 1] == 1 /* Seq.Next */ ) i = $c5d7b70ac6fb80dd$var$pair(data, i + 2);
                else {
                    if (index == 0 && data[i + 1] == 2 /* Seq.Other */ ) index = this.putAction($c5d7b70ac6fb80dd$var$pair(data, i + 2), token, end, index);
                    break;
                }
            }
            if (data[i] == token) index = this.putAction($c5d7b70ac6fb80dd$var$pair(data, i + 1), token, end, index);
        }
        return index;
    }
}
class $c5d7b70ac6fb80dd$var$Parse {
    constructor(parser, input, fragments, ranges){
        this.parser = parser;
        this.input = input;
        this.ranges = ranges;
        this.recovering = 0;
        this.nextStackID = 0x2654; // ♔, ♕, ♖, ♗, ♘, ♙, ♠, ♡, ♢, ♣, ♤, ♥, ♦, ♧
        this.minStackPos = 0;
        this.reused = [];
        this.stoppedAt = null;
        this.lastBigReductionStart = -1;
        this.lastBigReductionSize = 0;
        this.bigReductionCount = 0;
        this.stream = new $c5d7b70ac6fb80dd$export$f22294a9362415e4(input, ranges);
        this.tokens = new $c5d7b70ac6fb80dd$var$TokenCache(parser, this.stream);
        this.topTerm = parser.top[1];
        let { from: from } = ranges[0];
        this.stacks = [
            $c5d7b70ac6fb80dd$export$694e0d28c7ffc90c.start(this, parser.top[0], from)
        ];
        this.fragments = fragments.length && this.stream.end - from > parser.bufferLength * 4 ? new $c5d7b70ac6fb80dd$var$FragmentCursor(fragments, parser.nodeSet) : null;
    }
    get parsedPos() {
        return this.minStackPos;
    }
    // Move the parser forward. This will process all parse stacks at
    // `this.pos` and try to advance them to a further position. If no
    // stack for such a position is found, it'll start error-recovery.
    //
    // When the parse is finished, this will return a syntax tree. When
    // not, it returns `null`.
    advance() {
        let stacks = this.stacks, pos = this.minStackPos;
        // This will hold stacks beyond `pos`.
        let newStacks = this.stacks = [];
        let stopped, stoppedTokens;
        // If a large amount of reductions happened with the same start
        // position, force the stack out of that production in order to
        // avoid creating a tree too deep to recurse through.
        // (This is an ugly kludge, because unfortunately there is no
        // straightforward, cheap way to check for this happening, due to
        // the history of reductions only being available in an
        // expensive-to-access format in the stack buffers.)
        if (this.bigReductionCount > 300 /* Rec.MaxLeftAssociativeReductionCount */  && stacks.length == 1) {
            let [s] = stacks;
            while(s.forceReduce() && s.stack.length && s.stack[s.stack.length - 2] >= this.lastBigReductionStart);
            this.bigReductionCount = this.lastBigReductionSize = 0;
        }
        // Keep advancing any stacks at `pos` until they either move
        // forward or can't be advanced. Gather stacks that can't be
        // advanced further in `stopped`.
        for(let i = 0; i < stacks.length; i++){
            let stack = stacks[i];
            for(;;){
                this.tokens.mainToken = null;
                if (stack.pos > pos) newStacks.push(stack);
                else if (this.advanceStack(stack, newStacks, stacks)) continue;
                else {
                    if (!stopped) {
                        stopped = [];
                        stoppedTokens = [];
                    }
                    stopped.push(stack);
                    let tok = this.tokens.getMainToken(stack);
                    stoppedTokens.push(tok.value, tok.end);
                }
                break;
            }
        }
        if (!newStacks.length) {
            let finished = stopped && $c5d7b70ac6fb80dd$var$findFinished(stopped);
            if (finished) {
                if ($c5d7b70ac6fb80dd$var$verbose) console.log("Finish with " + this.stackID(finished));
                return this.stackToTree(finished);
            }
            if (this.parser.strict) {
                if ($c5d7b70ac6fb80dd$var$verbose && stopped) console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none"));
                throw new SyntaxError("No parse at " + pos);
            }
            if (!this.recovering) this.recovering = 5 /* Rec.Distance */ ;
        }
        if (this.recovering && stopped) {
            let finished = this.stoppedAt != null && stopped[0].pos > this.stoppedAt ? stopped[0] : this.runRecovery(stopped, stoppedTokens, newStacks);
            if (finished) {
                if ($c5d7b70ac6fb80dd$var$verbose) console.log("Force-finish " + this.stackID(finished));
                return this.stackToTree(finished.forceAll());
            }
        }
        if (this.recovering) {
            let maxRemaining = this.recovering == 1 ? 1 : this.recovering * 3 /* Rec.MaxRemainingPerStep */ ;
            if (newStacks.length > maxRemaining) {
                newStacks.sort((a, b)=>b.score - a.score);
                while(newStacks.length > maxRemaining)newStacks.pop();
            }
            if (newStacks.some((s)=>s.reducePos > pos)) this.recovering--;
        } else if (newStacks.length > 1) {
            // Prune stacks that are in the same state, or that have been
            // running without splitting for a while, to avoid getting stuck
            // with multiple successful stacks running endlessly on.
            outer: for(let i = 0; i < newStacks.length - 1; i++){
                let stack = newStacks[i];
                for(let j = i + 1; j < newStacks.length; j++){
                    let other = newStacks[j];
                    if (stack.sameState(other) || stack.buffer.length > 500 /* Rec.MinBufferLengthPrune */  && other.buffer.length > 500 /* Rec.MinBufferLengthPrune */ ) {
                        if ((stack.score - other.score || stack.buffer.length - other.buffer.length) > 0) newStacks.splice(j--, 1);
                        else {
                            newStacks.splice(i--, 1);
                            continue outer;
                        }
                    }
                }
            }
            if (newStacks.length > 12 /* Rec.MaxStackCount */ ) newStacks.splice(12 /* Rec.MaxStackCount */ , newStacks.length - 12 /* Rec.MaxStackCount */ );
        }
        this.minStackPos = newStacks[0].pos;
        for(let i = 1; i < newStacks.length; i++)if (newStacks[i].pos < this.minStackPos) this.minStackPos = newStacks[i].pos;
        return null;
    }
    stopAt(pos) {
        if (this.stoppedAt != null && this.stoppedAt < pos) throw new RangeError("Can't move stoppedAt forward");
        this.stoppedAt = pos;
    }
    // Returns an updated version of the given stack, or null if the
    // stack can't advance normally. When `split` and `stacks` are
    // given, stacks split off by ambiguous operations will be pushed to
    // `split`, or added to `stacks` if they move `pos` forward.
    advanceStack(stack, stacks, split) {
        let start = stack.pos, { parser: parser } = this;
        let base = $c5d7b70ac6fb80dd$var$verbose ? this.stackID(stack) + " -> " : "";
        if (this.stoppedAt != null && start > this.stoppedAt) return stack.forceReduce() ? stack : null;
        if (this.fragments) {
            let strictCx = stack.curContext && stack.curContext.tracker.strict, cxHash = strictCx ? stack.curContext.hash : 0;
            for(let cached = this.fragments.nodeAt(start); cached;){
                let match = this.parser.nodeSet.types[cached.type.id] == cached.type ? parser.getGoto(stack.state, cached.type.id) : -1;
                if (match > -1 && cached.length && (!strictCx || (cached.prop((0, $8cd8e2c17e3ae471$export$b8034b9bc18acd90).contextHash) || 0) == cxHash)) {
                    stack.useNode(cached, match);
                    if ($c5d7b70ac6fb80dd$var$verbose) console.log(base + this.stackID(stack) + ` (via reuse of ${parser.getName(cached.type.id)})`);
                    return true;
                }
                if (!(cached instanceof (0, $8cd8e2c17e3ae471$export$7fbedc92909ed28e)) || cached.children.length == 0 || cached.positions[0] > 0) break;
                let inner = cached.children[0];
                if (inner instanceof (0, $8cd8e2c17e3ae471$export$7fbedc92909ed28e) && cached.positions[0] == 0) cached = inner;
                else break;
            }
        }
        let defaultReduce = parser.stateSlot(stack.state, 4 /* ParseState.DefaultReduce */ );
        if (defaultReduce > 0) {
            stack.reduce(defaultReduce);
            if ($c5d7b70ac6fb80dd$var$verbose) console.log(base + this.stackID(stack) + ` (via always-reduce ${parser.getName(defaultReduce & 65535 /* Action.ValueMask */ )})`);
            return true;
        }
        if (stack.stack.length >= 8400 /* Rec.CutDepth */ ) {
            while(stack.stack.length > 6000 /* Rec.CutTo */  && stack.forceReduce());
        }
        let actions = this.tokens.getActions(stack);
        for(let i = 0; i < actions.length;){
            let action = actions[i++], term = actions[i++], end = actions[i++];
            let last = i == actions.length || !split;
            let localStack = last ? stack : stack.split();
            let main = this.tokens.mainToken;
            localStack.apply(action, term, main ? main.start : localStack.pos, end);
            if ($c5d7b70ac6fb80dd$var$verbose) console.log(base + this.stackID(localStack) + ` (via ${(action & 65536 /* Action.ReduceFlag */ ) == 0 ? "shift" : `reduce of ${parser.getName(action & 65535 /* Action.ValueMask */ )}`} for ${parser.getName(term)} @ ${start}${localStack == stack ? "" : ", split"})`);
            if (last) return true;
            else if (localStack.pos > start) stacks.push(localStack);
            else split.push(localStack);
        }
        return false;
    }
    // Advance a given stack forward as far as it will go. Returns the
    // (possibly updated) stack if it got stuck, or null if it moved
    // forward and was given to `pushStackDedup`.
    advanceFully(stack, newStacks) {
        let pos = stack.pos;
        for(;;){
            if (!this.advanceStack(stack, null, null)) return false;
            if (stack.pos > pos) {
                $c5d7b70ac6fb80dd$var$pushStackDedup(stack, newStacks);
                return true;
            }
        }
    }
    runRecovery(stacks, tokens, newStacks) {
        let finished = null, restarted = false;
        for(let i = 0; i < stacks.length; i++){
            let stack = stacks[i], token = tokens[i << 1], tokenEnd = tokens[(i << 1) + 1];
            let base = $c5d7b70ac6fb80dd$var$verbose ? this.stackID(stack) + " -> " : "";
            if (stack.deadEnd) {
                if (restarted) continue;
                restarted = true;
                stack.restart();
                if ($c5d7b70ac6fb80dd$var$verbose) console.log(base + this.stackID(stack) + " (restarted)");
                let done = this.advanceFully(stack, newStacks);
                if (done) continue;
            }
            let force = stack.split(), forceBase = base;
            for(let j = 0; force.forceReduce() && j < 10 /* Rec.ForceReduceLimit */ ; j++){
                if ($c5d7b70ac6fb80dd$var$verbose) console.log(forceBase + this.stackID(force) + " (via force-reduce)");
                let done = this.advanceFully(force, newStacks);
                if (done) break;
                if ($c5d7b70ac6fb80dd$var$verbose) forceBase = this.stackID(force) + " -> ";
            }
            for (let insert of stack.recoverByInsert(token)){
                if ($c5d7b70ac6fb80dd$var$verbose) console.log(base + this.stackID(insert) + " (via recover-insert)");
                this.advanceFully(insert, newStacks);
            }
            if (this.stream.end > stack.pos) {
                if (tokenEnd == stack.pos) {
                    tokenEnd++;
                    token = 0 /* Term.Err */ ;
                }
                stack.recoverByDelete(token, tokenEnd);
                if ($c5d7b70ac6fb80dd$var$verbose) console.log(base + this.stackID(stack) + ` (via recover-delete ${this.parser.getName(token)})`);
                $c5d7b70ac6fb80dd$var$pushStackDedup(stack, newStacks);
            } else if (!finished || finished.score < stack.score) finished = stack;
        }
        return finished;
    }
    // Convert the stack's buffer to a syntax tree.
    stackToTree(stack) {
        stack.close();
        return (0, $8cd8e2c17e3ae471$export$7fbedc92909ed28e).build({
            buffer: $c5d7b70ac6fb80dd$var$StackBufferCursor.create(stack),
            nodeSet: this.parser.nodeSet,
            topID: this.topTerm,
            maxBufferLength: this.parser.bufferLength,
            reused: this.reused,
            start: this.ranges[0].from,
            length: stack.pos - this.ranges[0].from,
            minRepeatType: this.parser.minRepeatTerm
        });
    }
    stackID(stack) {
        let id = ($c5d7b70ac6fb80dd$var$stackIDs || ($c5d7b70ac6fb80dd$var$stackIDs = new WeakMap)).get(stack);
        if (!id) $c5d7b70ac6fb80dd$var$stackIDs.set(stack, id = String.fromCodePoint(this.nextStackID++));
        return id + stack;
    }
}
function $c5d7b70ac6fb80dd$var$pushStackDedup(stack, newStacks) {
    for(let i = 0; i < newStacks.length; i++){
        let other = newStacks[i];
        if (other.pos == stack.pos && other.sameState(stack)) {
            if (newStacks[i].score < stack.score) newStacks[i] = stack;
            return;
        }
    }
    newStacks.push(stack);
}
class $c5d7b70ac6fb80dd$var$Dialect {
    constructor(source, flags, disabled){
        this.source = source;
        this.flags = flags;
        this.disabled = disabled;
    }
    allows(term) {
        return !this.disabled || this.disabled[term] == 0;
    }
}
const $c5d7b70ac6fb80dd$var$id = (x)=>x;
/**
Context trackers are used to track stateful context (such as
indentation in the Python grammar, or parent elements in the XML
grammar) needed by external tokenizers. You declare them in a
grammar file as `@context exportName from "module"`.

Context values should be immutable, and can be updated (replaced)
on shift or reduce actions.

The export used in a `@context` declaration should be of this
type.
*/ class $c5d7b70ac6fb80dd$export$88193367295cc46b {
    /**
    Define a context tracker.
    */ constructor(spec){
        this.start = spec.start;
        this.shift = spec.shift || $c5d7b70ac6fb80dd$var$id;
        this.reduce = spec.reduce || $c5d7b70ac6fb80dd$var$id;
        this.reuse = spec.reuse || $c5d7b70ac6fb80dd$var$id;
        this.hash = spec.hash || (()=>0);
        this.strict = spec.strict !== false;
    }
}
/**
Holds the parse tables for a given grammar, as generated by
`lezer-generator`, and provides [methods](#common.Parser) to parse
content with.
*/ class $c5d7b70ac6fb80dd$export$60c033f4cf02b410 extends (0, $8cd8e2c17e3ae471$export$7acfa6ed01010e37) {
    /**
    @internal
    */ constructor(spec){
        super();
        /**
        @internal
        */ this.wrappers = [];
        if (spec.version != 14 /* File.Version */ ) throw new RangeError(`Parser version (${spec.version}) doesn't match runtime version (${14 /* File.Version */ })`);
        let nodeNames = spec.nodeNames.split(" ");
        this.minRepeatTerm = nodeNames.length;
        for(let i = 0; i < spec.repeatNodeCount; i++)nodeNames.push("");
        let topTerms = Object.keys(spec.topRules).map((r)=>spec.topRules[r][1]);
        let nodeProps = [];
        for(let i = 0; i < nodeNames.length; i++)nodeProps.push([]);
        function setProp(nodeID, prop, value) {
            nodeProps[nodeID].push([
                prop,
                prop.deserialize(String(value))
            ]);
        }
        if (spec.nodeProps) for (let propSpec of spec.nodeProps){
            let prop = propSpec[0];
            if (typeof prop == "string") prop = (0, $8cd8e2c17e3ae471$export$b8034b9bc18acd90)[prop];
            for(let i = 1; i < propSpec.length;){
                let next = propSpec[i++];
                if (next >= 0) setProp(next, prop, propSpec[i++]);
                else {
                    let value = propSpec[i + -next];
                    for(let j = -next; j > 0; j--)setProp(propSpec[i++], prop, value);
                    i++;
                }
            }
        }
        this.nodeSet = new (0, $8cd8e2c17e3ae471$export$7fad5fb00d8de02c)(nodeNames.map((name, i)=>(0, $8cd8e2c17e3ae471$export$f06e977173f1857c).define({
                name: i >= this.minRepeatTerm ? undefined : name,
                id: i,
                props: nodeProps[i],
                top: topTerms.indexOf(i) > -1,
                error: i == 0,
                skipped: spec.skippedNodes && spec.skippedNodes.indexOf(i) > -1
            })));
        if (spec.propSources) this.nodeSet = this.nodeSet.extend(...spec.propSources);
        this.strict = false;
        this.bufferLength = (0, $8cd8e2c17e3ae471$export$de305a849879ffa);
        let tokenArray = $c5d7b70ac6fb80dd$var$decodeArray(spec.tokenData);
        this.context = spec.context;
        this.specializerSpecs = spec.specialized || [];
        this.specialized = new Uint16Array(this.specializerSpecs.length);
        for(let i = 0; i < this.specializerSpecs.length; i++)this.specialized[i] = this.specializerSpecs[i].term;
        this.specializers = this.specializerSpecs.map($c5d7b70ac6fb80dd$var$getSpecializer);
        this.states = $c5d7b70ac6fb80dd$var$decodeArray(spec.states, Uint32Array);
        this.data = $c5d7b70ac6fb80dd$var$decodeArray(spec.stateData);
        this.goto = $c5d7b70ac6fb80dd$var$decodeArray(spec.goto);
        this.maxTerm = spec.maxTerm;
        this.tokenizers = spec.tokenizers.map((value)=>typeof value == "number" ? new $c5d7b70ac6fb80dd$var$TokenGroup(tokenArray, value) : value);
        this.topRules = spec.topRules;
        this.dialects = spec.dialects || {};
        this.dynamicPrecedences = spec.dynamicPrecedences || null;
        this.tokenPrecTable = spec.tokenPrec;
        this.termNames = spec.termNames || null;
        this.maxNode = this.nodeSet.types.length - 1;
        this.dialect = this.parseDialect();
        this.top = this.topRules[Object.keys(this.topRules)[0]];
    }
    createParse(input, fragments, ranges) {
        let parse = new $c5d7b70ac6fb80dd$var$Parse(this, input, fragments, ranges);
        for (let w of this.wrappers)parse = w(parse, input, fragments, ranges);
        return parse;
    }
    /**
    Get a goto table entry @internal
    */ getGoto(state, term, loose = false) {
        let table = this.goto;
        if (term >= table[0]) return -1;
        for(let pos = table[term + 1];;){
            let groupTag = table[pos++], last = groupTag & 1;
            let target = table[pos++];
            if (last && loose) return target;
            for(let end = pos + (groupTag >> 1); pos < end; pos++)if (table[pos] == state) return target;
            if (last) return -1;
        }
    }
    /**
    Check if this state has an action for a given terminal @internal
    */ hasAction(state, terminal) {
        let data = this.data;
        for(let set = 0; set < 2; set++)for(let i = this.stateSlot(state, set ? 2 /* ParseState.Skip */  : 1 /* ParseState.Actions */ ), next;; i += 3){
            if ((next = data[i]) == 65535 /* Seq.End */ ) {
                if (data[i + 1] == 1 /* Seq.Next */ ) next = data[i = $c5d7b70ac6fb80dd$var$pair(data, i + 2)];
                else if (data[i + 1] == 2 /* Seq.Other */ ) return $c5d7b70ac6fb80dd$var$pair(data, i + 2);
                else break;
            }
            if (next == terminal || next == 0 /* Term.Err */ ) return $c5d7b70ac6fb80dd$var$pair(data, i + 1);
        }
        return 0;
    }
    /**
    @internal
    */ stateSlot(state, slot) {
        return this.states[state * 6 /* ParseState.Size */  + slot];
    }
    /**
    @internal
    */ stateFlag(state, flag) {
        return (this.stateSlot(state, 0 /* ParseState.Flags */ ) & flag) > 0;
    }
    /**
    @internal
    */ validAction(state, action) {
        return !!this.allActions(state, (a)=>a == action ? true : null);
    }
    /**
    @internal
    */ allActions(state, action) {
        let deflt = this.stateSlot(state, 4 /* ParseState.DefaultReduce */ );
        let result = deflt ? action(deflt) : undefined;
        for(let i = this.stateSlot(state, 1 /* ParseState.Actions */ ); result == null; i += 3){
            if (this.data[i] == 65535 /* Seq.End */ ) {
                if (this.data[i + 1] == 1 /* Seq.Next */ ) i = $c5d7b70ac6fb80dd$var$pair(this.data, i + 2);
                else break;
            }
            result = action($c5d7b70ac6fb80dd$var$pair(this.data, i + 1));
        }
        return result;
    }
    /**
    Get the states that can follow this one through shift actions or
    goto jumps. @internal
    */ nextStates(state) {
        let result = [];
        for(let i = this.stateSlot(state, 1 /* ParseState.Actions */ );; i += 3){
            if (this.data[i] == 65535 /* Seq.End */ ) {
                if (this.data[i + 1] == 1 /* Seq.Next */ ) i = $c5d7b70ac6fb80dd$var$pair(this.data, i + 2);
                else break;
            }
            if ((this.data[i + 2] & 1) == 0) {
                let value = this.data[i + 1];
                if (!result.some((v, i)=>i & 1 && v == value)) result.push(this.data[i], value);
            }
        }
        return result;
    }
    /**
    Configure the parser. Returns a new parser instance that has the
    given settings modified. Settings not provided in `config` are
    kept from the original parser.
    */ configure(config) {
        // Hideous reflection-based kludge to make it easy to create a
        // slightly modified copy of a parser.
        let copy = Object.assign(Object.create($c5d7b70ac6fb80dd$export$60c033f4cf02b410.prototype), this);
        if (config.props) copy.nodeSet = this.nodeSet.extend(...config.props);
        if (config.top) {
            let info = this.topRules[config.top];
            if (!info) throw new RangeError(`Invalid top rule name ${config.top}`);
            copy.top = info;
        }
        if (config.tokenizers) copy.tokenizers = this.tokenizers.map((t)=>{
            let found = config.tokenizers.find((r)=>r.from == t);
            return found ? found.to : t;
        });
        if (config.specializers) {
            copy.specializers = this.specializers.slice();
            copy.specializerSpecs = this.specializerSpecs.map((s, i)=>{
                let found = config.specializers.find((r)=>r.from == s.external);
                if (!found) return s;
                let spec = Object.assign(Object.assign({}, s), {
                    external: found.to
                });
                copy.specializers[i] = $c5d7b70ac6fb80dd$var$getSpecializer(spec);
                return spec;
            });
        }
        if (config.contextTracker) copy.context = config.contextTracker;
        if (config.dialect) copy.dialect = this.parseDialect(config.dialect);
        if (config.strict != null) copy.strict = config.strict;
        if (config.wrap) copy.wrappers = copy.wrappers.concat(config.wrap);
        if (config.bufferLength != null) copy.bufferLength = config.bufferLength;
        return copy;
    }
    /**
    Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
    are registered for this parser.
    */ hasWrappers() {
        return this.wrappers.length > 0;
    }
    /**
    Returns the name associated with a given term. This will only
    work for all terms when the parser was generated with the
    `--names` option. By default, only the names of tagged terms are
    stored.
    */ getName(term) {
        return this.termNames ? this.termNames[term] : String(term <= this.maxNode && this.nodeSet.types[term].name || term);
    }
    /**
    The eof term id is always allocated directly after the node
    types. @internal
    */ get eofTerm() {
        return this.maxNode + 1;
    }
    /**
    The type of top node produced by the parser.
    */ get topNode() {
        return this.nodeSet.types[this.top[1]];
    }
    /**
    @internal
    */ dynamicPrecedence(term) {
        let prec = this.dynamicPrecedences;
        return prec == null ? 0 : prec[term] || 0;
    }
    /**
    @internal
    */ parseDialect(dialect) {
        let values = Object.keys(this.dialects), flags = values.map(()=>false);
        if (dialect) for (let part of dialect.split(" ")){
            let id = values.indexOf(part);
            if (id >= 0) flags[id] = true;
        }
        let disabled = null;
        for(let i = 0; i < values.length; i++)if (!flags[i]) for(let j = this.dialects[values[i]], id; (id = this.data[j++]) != 65535 /* Seq.End */ ;)(disabled || (disabled = new Uint8Array(this.maxTerm + 1)))[id] = 1;
        return new $c5d7b70ac6fb80dd$var$Dialect(dialect, flags, disabled);
    }
    /**
    Used by the output of the parser generator. Not available to
    user code. @hide
    */ static deserialize(spec) {
        return new $c5d7b70ac6fb80dd$export$60c033f4cf02b410(spec);
    }
}
function $c5d7b70ac6fb80dd$var$pair(data, off) {
    return data[off] | data[off + 1] << 16;
}
function $c5d7b70ac6fb80dd$var$findFinished(stacks) {
    let best = null;
    for (let stack of stacks){
        let stopped = stack.p.stoppedAt;
        if ((stack.pos == stack.p.stream.end || stopped != null && stack.pos > stopped) && stack.p.parser.stateFlag(stack.state, 2 /* StateFlag.Accepting */ ) && (!best || best.score < stack.score)) best = stack;
    }
    return best;
}
function $c5d7b70ac6fb80dd$var$getSpecializer(spec) {
    if (spec.external) {
        let mask = spec.extend ? 1 /* Specialize.Extend */  : 0 /* Specialize.Specialize */ ;
        return (value, stack)=>spec.external(value, stack) << 1 | mask;
    }
    return spec.get;
}


function $b8d743f08e21ab6a$var$$parcel$interopDefault(a) {
    return a && a.__esModule ? a.default : a;
}
function $b8d743f08e21ab6a$var$$parcel$export(e, n, v, s) {
    Object.defineProperty(e, n, {
        get: v,
        set: s,
        enumerable: true,
        configurable: true
    });
}
$b8d743f08e21ab6a$var$$parcel$export($b8d743f08e21ab6a$exports, "parse", ()=>$b8d743f08e21ab6a$var$$83c796b2b9543406$export$98e6a39c04603d36);
// This file was generated by lezer-generator. You probably shouldn't edit it.
const $b8d743f08e21ab6a$var$$1adaef8fb7bb1497$export$8f49e4af10703ce3 = (0, $c5d7b70ac6fb80dd$export$60c033f4cf02b410).deserialize({
    version: 14,
    states: "%QO]QPOOOOQO'#Cd'#CdOtQQO'#CgO!PQPO'#ClOOQO'#Cs'#CsQOQPOOOOQO'#Ci'#CiO!WQPO'#ChO!]QPO'#CuOOQO,59R,59RO!eQPO,59ROOQO'#Cm'#CmO!jQPO'#CyOOQO,59W,59WO!rQPO,59WO]QPO,59SO!wQQO,59aO#SQPO,59aOOQO1G.m1G.mO#[QPO,59eO#cQPO,59eOOQO1G.r1G.rOOQO1G.n1G.nOOQO,59Y,59YO#kQQO1G.{OOQO-E6l-E6lOOQO,59Z,59ZO#vQPO1G/POOQO-E6m-E6mPwQQO'#CnP]QPO'#Co",
    stateData: "$R~OfOSPOSQOS~OSSOTSOUSOVSOYQO_ROhPO~OXXOhUOjUO~O^]O~P]Ok_O~Ol`OXiX~OXbO~OlcO^mX~O^eO~OhUOjUOXia~OlhOXia~O^ma~P]OlkO^ma~OhUOjUOXii~O^mi~P]OPQj~",
    goto: "!}nPPPPPPPPoPPow!PPPo!V!_!ePPP!kP!wPPP!z]SOR_cknQWQVg`hmXVQ`hmQ[RVjcknQaWRiaQd[RldQTOWZRcknRf_RYQR^R",
    nodeNames: "\u26A0 LineComment BlockComment JsonText True False Null Number String } { Object Property PropertyName ] [ Array ArrayValue",
    maxTerm: 29,
    nodeProps: [
        [
            "group",
            -7,
            4,
            5,
            6,
            7,
            8,
            11,
            16,
            "Value"
        ],
        [
            "openedBy",
            9,
            "{",
            14,
            "["
        ],
        [
            "closedBy",
            10,
            "}",
            15,
            "]"
        ]
    ],
    skippedNodes: [
        0,
        1,
        2
    ],
    repeatNodeCount: 2,
    tokenData: "!!`~R!OXY$RYZ$RZ[$R[]$R]^$Rpq$Rrs$Wtu.Xwx0b{|2Y|}6p}!O2Y!O!P2l!P!Q6u!Q!R3l!R![5Q![!]8t!c!k.X!k!l8y!l!p.X!p!q@}!q!}.X!}#OB|#O#P/S#P#QCR#R#S.X#T#Y.X#Y#ZCW#Z#b.X#b#cHU#c#h.X#h#iLU#i#o.X#o#p!!U#q#r!!Z$f$g$R$g$IV.X$IV$IW$R$IW$I|.X$I|$I}$R$I}$JO$R$JU;'S.X;'S;=`0[<%l?HT.X?HT?HU$R?HUO.X~$WOf~~$ZXOp$vpq$Wqr$Wrs%`s#O$W#O#P&s#P;'S$W;'S;=`.R<%lO$W~$yVOr$vrs%`s#O$v#O#P%e#P;'S$v;'S;=`&m<%lO$v~%eOh~~%haYZ$v]^$vrs$vwx$v!Q!R$v#O#P$v#T#U$v#U#V$v#Y#Z$v#b#c$v#f#g$v#h#i$v#i#j$v#j#k$v#l#m$v$I|$I}$v$I}$JO$v~&pP;=`<%l$v~&vbYZ$v]^$vrs$Wwx$v!P!Q(O!Q!R$v#O#P$W#T#U$v#U#V$W#Y#Z$W#b#c$W#f#g$W#h#i$W#i#j*c#j#k$v#l#m$v$I|$I}$v$I}$JO$v~(RWpq(Oqr(Ors%`s#O(O#O#P(k#P;'S(O;'S;=`*]<%lO(O~(nXrs(O!P!Q(O#O#P(O#U#V(O#Y#Z(O#b#c(O#f#g(O#h#i(O#i#j)Z~)^R!Q![)g!c!i)g#T#Z)g~)jR!Q![)s!c!i)s#T#Z)s~)vR!Q![*P!c!i*P#T#Z*P~*SR!Q![(O!c!i(O#T#Z(O~*`P;=`<%l(O~*f]Or$vrs%`s!Q$v!Q![+_![!c$v!c!i+_!i#O$v#O#P%e#P#T$v#T#Z+_#Z;'S$v;'S;=`&m<%lO$v~+b]Or$vrs%`s!Q$v!Q![,Z![!c$v!c!i,Z!i#O$v#O#P%e#P#T$v#T#Z,Z#Z;'S$v;'S;=`&m<%lO$v~,^]Or$vrs%`s!Q$v!Q![-V![!c$v!c!i-V!i#O$v#O#P%e#P#T$v#T#Z-V#Z;'S$v;'S;=`&m<%lO$v~-Y]Or$vrs%`s!Q$v!Q![$W![!c$v!c!i$W!i#O$v#O#P%e#P#T$v#T#Z$W#Z;'S$v;'S;=`&m<%lO$v~.UP;=`<%l$WQ.^[jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XQ/VP#i#j/YQ/]R!Q![/f!c!i/f#T#Z/fQ/iR!Q![/r!c!i/r#T#Z/rQ/uR!Q![0O!c!i0O#T#Z0OQ0RR!Q![.X!c!i.X#T#Z.XQ0_P;=`<%l.X~0eVOw0bwx%`x#O0b#O#P0z#P;'S0b;'S;=`2S<%lO0b~0}aYZ0b]^0brs0bwx0b!Q!R0b#O#P0b#T#U0b#U#V0b#Y#Z0b#b#c0b#f#g0b#h#i0b#i#j0b#j#k0b#l#m0b$I|$I}0b$I}$JO0b~2VP;=`<%l0bP2]T!O!P2l!Q!R3l!R![5Q!k!l5c!p!q6dP2oP!Q![2rP2wRVP!Q![2r!g!h3Q#X#Y3QP3TR{|3^}!O3^!Q![3dP3aP!Q![3dP3iPVP!Q![3dP3qTVP!O!P2r!Q![4Q!g!h3Q#X#Y3Q#l#m4fP4TQ!O!P4Z!Q![4QP4`QVP!g!h3Q#X#Y3QP4iR!Q![4r!c!i4r#T#Z4rP4wRVP!Q![4r!c!i4r#T#Z4rP5VSVP!O!P2r!Q![5Q!g!h3Q#X#Y3QP5fP#b#c5iP5lP#Y#Z5oP5rP#]#^5uP5xP#b#c5{P6OP#]#^6RP6UP#h#i6XP6[P#m#n6_P6dOVPP6gP#T#U6jP6mP!p!q6_~6uOl~~6xQz{7O!P!Q8V~7RTOz7Oz{7b{;'S7O;'S;=`8P<%lO7O~7eVOz7Oz{7b{!P7O!P!Q7z!Q;'S7O;'S;=`8P<%lO7O~8POQ~~8SP;=`<%l7O~8[UP~OY8VZ]8V^$I|8V$JO;'S8V;'S;=`8n<%lO8V~8qP;=`<%l8V~8yOk~R9O^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#b.X#b#c9z#c#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XR:P^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#Y.X#Y#Z:{#Z#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XR;Q^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#].X#]#^;|#^#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XR<R^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#b.X#b#c<}#c#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XR=S^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#].X#]#^>O#^#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XR>T^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#h.X#h#i?P#i#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XR?U^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#m.X#m#n@Q#n#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XR@X[VPjQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XRAS]jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#UA{#U#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XRBQ^jQtu.X!Q![.X!c!p.X!p!q@Q!q!}.X#O#P/S#R#S.X#T#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.X~CRO_~~CWO^~RC]]jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#UDU#U#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XRDZ^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#`.X#`#aEV#a#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XRE[^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#g.X#g#hFW#h#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XRF]^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#X.X#X#YGX#Y#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XRG`[TPjQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XRHZ^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#i.X#i#jIV#j#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XRI[^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#`.X#`#aJW#a#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XRJ]^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#`.X#`#aKX#a#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XRK`[UPjQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XRLZ^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#f.X#f#gMV#g#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XRM[^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#i.X#i#jNW#j#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XRN]^jQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#X.X#X#Y! X#Y#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.XR! `[SPjQtu.X!Q![.X!c!}.X#O#P/S#R#S.X#T#o.X$g$IV.X$IW$I|.X$JU;'S.X;'S;=`0[<%l?HT.X?HUO.X~!!ZOY~~!!`OX~",
    tokenizers: [
        0,
        1
    ],
    topRules: {
        "JsonText": [
            0,
            3
        ]
    },
    dialects: {
        json5: 137
    },
    tokenPrec: 0
});
// This file was generated by lezer-generator. You probably shouldn't edit it.
const $b8d743f08e21ab6a$var$$121152950f502dea$export$e6476262d0d4122e = 1, $b8d743f08e21ab6a$var$$121152950f502dea$export$33c356ab5b93be35 = 2, $b8d743f08e21ab6a$var$$121152950f502dea$export$8bc1c2b4dd1e923b = 3, $b8d743f08e21ab6a$var$$121152950f502dea$export$4bc0976997a4d94e = 4, $b8d743f08e21ab6a$var$$121152950f502dea$export$5d3e9aafef2fffbe = 5, $b8d743f08e21ab6a$var$$121152950f502dea$export$26c9c3a80cd996ae = 6, $b8d743f08e21ab6a$var$$121152950f502dea$export$fffa67e515d04022 = 7, $b8d743f08e21ab6a$var$$121152950f502dea$export$89b8e0fa65f6a914 = 8, $b8d743f08e21ab6a$var$$121152950f502dea$export$164a3ab98abb171d = 11, $b8d743f08e21ab6a$var$$121152950f502dea$export$41b04b3a73e7216d = 12, $b8d743f08e21ab6a$var$$121152950f502dea$export$e546d8cfcc0684e2 = 13, $b8d743f08e21ab6a$var$$121152950f502dea$export$c4be6576ca6fe4aa = 16, $b8d743f08e21ab6a$var$$121152950f502dea$export$f06b0ce79fd44095 = 17, $b8d743f08e21ab6a$var$$121152950f502dea$export$386a487b17ea4d92 = 0;
function $b8d743f08e21ab6a$var$$83c796b2b9543406$export$98e6a39c04603d36(input, reviver, { dialect: dialect = "json", tabWidth: tabWidth = 4 } = {}) {
    // Let these parsers throw any errors about invalid input
    let data = dialect === "JSON5" ? $b8d743f08e21ab6a$var$$parcel$interopDefault($59ba57524f3b5ae9$exports).parse(input, reviver) : JSON.parse(input, reviver);
    let tree = $b8d743f08e21ab6a$var$$1adaef8fb7bb1497$export$8f49e4af10703ce3.configure({
        strict: true,
        dialect: dialect === "JSON5" ? "json5" : "json"
    }).parse(input);
    let pointers = new Map();
    let currentPath = [
        ""
    ];
    tree.iterate({
        enter (node) {
            // if (type.isError) {
            // 	let fromPos = posToLineColumn(input, from, tabWidth);
            // 	let error = new SyntaxError(
            // 		`Failed to parse (${fromPos.line}:${fromPos.column})`
            // 	);
            // 	error.lineNumber = fromPos.line;
            // 	error.columnNumber = fromPos.column;
            // 	throw error;
            // }
            let group = node.type.prop($8cd8e2c17e3ae471$export$b8034b9bc18acd90.group);
            if (group === null || group === void 0 ? void 0 : group.includes("Value")) $b8d743f08e21ab6a$var$$83c796b2b9543406$var$mapMerge(pointers, $b8d743f08e21ab6a$var$$83c796b2b9543406$var$toJsonPointer(currentPath), {
                value: $b8d743f08e21ab6a$var$$83c796b2b9543406$var$posToLineColumn(input, node.from, tabWidth),
                valueEnd: $b8d743f08e21ab6a$var$$83c796b2b9543406$var$posToLineColumn(input, node.to, tabWidth)
            });
            if (node.name === "PropertyName") {
                let name = input.slice(node.from, node.to);
                let quoted = name[0] === `'` || name[0] == `"`;
                currentPath.push(quoted ? name.slice(1, -1) : name);
                $b8d743f08e21ab6a$var$$83c796b2b9543406$var$mapMerge(pointers, $b8d743f08e21ab6a$var$$83c796b2b9543406$var$toJsonPointer(currentPath), {
                    key: $b8d743f08e21ab6a$var$$83c796b2b9543406$var$posToLineColumn(input, node.from, tabWidth),
                    keyEnd: $b8d743f08e21ab6a$var$$83c796b2b9543406$var$posToLineColumn(input, node.to, tabWidth)
                });
            } else if (node.name === "Array") currentPath.push(0);
        },
        leave (node) {
            if (node.name === "Property" || node.name === "Array") currentPath.pop();
            else if (node.name === "ArrayValue") currentPath[currentPath.length - 1]++;
        }
    });
    return {
        data: data,
        pointers: Object.fromEntries(pointers)
    };
}
function $b8d743f08e21ab6a$var$$83c796b2b9543406$var$mapMerge(map, key, data) {
    let value = map.get(key);
    value = {
        ...value,
        ...data
    };
    map.set(key, value);
}
function $b8d743f08e21ab6a$var$$83c796b2b9543406$var$posToLineColumn(input, pos, tabWidth) {
    let line = $b8d743f08e21ab6a$var$$83c796b2b9543406$var$countNewLines(input, pos);
    let lineStart = input.lastIndexOf("\n", pos - 1) + 1;
    let column = $b8d743f08e21ab6a$var$$83c796b2b9543406$var$countColumn(input, lineStart, pos, tabWidth);
    return {
        line: line,
        column: column,
        pos: pos
    };
}
function $b8d743f08e21ab6a$var$$83c796b2b9543406$var$countNewLines(str, end) {
    let count = 0;
    for(let i = 0; i < end; i++)if (str[i] === "\n") count++;
    return count;
}
function $b8d743f08e21ab6a$var$$83c796b2b9543406$var$countColumn(str, start, end, tabWidth) {
    let count = 0;
    for(let i = start; i < end; i++)count += str[i] === "	" ? tabWidth : 1;
    return count;
}
const $b8d743f08e21ab6a$var$$83c796b2b9543406$var$ESCAPE_REGEX = /[~/]/g;
function $b8d743f08e21ab6a$var$$83c796b2b9543406$var$toJsonPointer(path) {
    let str = "";
    for (let e of path)if (typeof e === "string") str += e.replace($b8d743f08e21ab6a$var$$83c796b2b9543406$var$ESCAPE_REGEX, (v)=>v === "~" ? "~0" : "~1") + "/";
    else str += String(e) + "/";
    return str.slice(0, -1);
}


function $63ebecb95c660a93$export$5b2cb3ae64502120(input) {
    if (Array.isArray(input)) return input.flatMap((e)=>$63ebecb95c660a93$export$5b2cb3ae64502120(e));
    else if (input instanceof $63ebecb95c660a93$export$2e2bcd8739ae039) return input.diagnostics;
    else if (input instanceof Error) return $63ebecb95c660a93$export$9e5585c0e071133c(input);
    else if (typeof input === 'string') return [
        {
            message: input
        }
    ];
    else if (typeof input === 'object') return [
        input
    ];
    else return $63ebecb95c660a93$export$9e5585c0e071133c(input);
}
function $63ebecb95c660a93$export$9e5585c0e071133c(error, defaultValues) {
    let codeFrames = undefined;
    if (typeof error === 'string') return [
        {
            origin: defaultValues?.origin ?? 'Error',
            message: $63ebecb95c660a93$export$560888d6fe0cfe97(error)
        }
    ];
    if (error instanceof $63ebecb95c660a93$export$2e2bcd8739ae039) return error.diagnostics.map((d)=>{
        return {
            ...d,
            origin: d.origin ?? defaultValues?.origin ?? 'unknown'
        };
    });
    if (error.loc && error.source != null) codeFrames = [
        {
            filePath: error.filePath ?? error.fileName ?? defaultValues?.filePath ?? undefined,
            code: error.source,
            codeHighlights: [
                {
                    start: {
                        line: error.loc.line,
                        column: error.loc.column
                    },
                    end: {
                        line: error.loc.line,
                        column: error.loc.column
                    }
                }
            ]
        }
    ];
    return [
        {
            origin: defaultValues?.origin ?? 'Error',
            message: $63ebecb95c660a93$export$560888d6fe0cfe97(error.message),
            name: error.name,
            stack: codeFrames == null ? error.highlightedCodeFrame ?? error.codeFrame ?? error.stack : undefined,
            codeFrames: codeFrames
        }
    ];
}
class $63ebecb95c660a93$export$2e2bcd8739ae039 extends Error {
    constructor(opts){
        let diagnostics = Array.isArray(opts.diagnostic) ? opts.diagnostic : [
            opts.diagnostic
        ];
        // Construct error from diagnostics
        super(diagnostics[0].message);
        // @ts-ignore
        this.stack = diagnostics[0].stack ?? super.stack;
        // @ts-ignore
        this.name = diagnostics[0].name ?? super.name;
        this.diagnostics = diagnostics;
    }
}
function $63ebecb95c660a93$export$3dc8b6c2fa6e4796(data, ids) {
    let map = typeof data == 'string' ? (0, $b8d743f08e21ab6a$exports.parse)(data, undefined, {
        dialect: 'JSON5',
        tabWidth: 1
    }) : data;
    return ids.map(({ key: key, type: type, message: message })=>{
        let pos = (0, (/*@__PURE__*/$parcel$interopDefault($451c2a817f483539$exports)))(map.pointers[key]);
        return {
            ...$63ebecb95c660a93$export$e40c13f05b3b4464(pos, type),
            message: message
        };
    });
}
function $63ebecb95c660a93$export$e40c13f05b3b4464(pos, type) {
    let key = 'key' in pos ? pos.key : undefined;
    let keyEnd = 'keyEnd' in pos ? pos.keyEnd : undefined;
    if (!type && key && pos.value) // key and value
    return {
        start: {
            line: key.line + 1,
            column: key.column + 1
        },
        end: {
            line: pos.valueEnd.line + 1,
            column: pos.valueEnd.column
        }
    };
    else if (type == 'key' || !pos.value) {
        (0, ($parcel$interopDefault($5HoLl$assert)))(key && keyEnd);
        return {
            start: {
                line: key.line + 1,
                column: key.column + 1
            },
            end: {
                line: keyEnd.line + 1,
                column: keyEnd.column
            }
        };
    } else return {
        start: {
            line: pos.value.line + 1,
            column: pos.value.column + 1
        },
        end: {
            line: pos.valueEnd.line + 1,
            column: pos.valueEnd.column
        }
    };
}
function $63ebecb95c660a93$export$7c84a2920504156f(pos, type) {
    let v = $63ebecb95c660a93$export$e40c13f05b3b4464(pos, type);
    return {
        start: v.start,
        end: {
            line: v.end.line,
            column: v.end.column + 1
        }
    };
}
function $63ebecb95c660a93$export$48cb1e0b41c2019a({ start: start, end: end }, message) {
    return {
        message: message,
        start: start,
        end: {
            line: end.line,
            column: end.column - 1
        }
    };
}
function $63ebecb95c660a93$export$167bd619ce727814(component) {
    return component.replace(/~/g, '~0').replace(/\//g, '~1');
}
const $63ebecb95c660a93$var$escapeCharacters = [
    '\\',
    '*',
    '_',
    '~'
];
function $63ebecb95c660a93$export$560888d6fe0cfe97(s) {
    let result = s;
    for (const char of $63ebecb95c660a93$var$escapeCharacters)result = result.replace(new RegExp(`\\${char}`, 'g'), `\\${char}`);
    return result;
}
const $63ebecb95c660a93$var$mdVerbatim = Symbol();
function $63ebecb95c660a93$export$f4de1c043ce6927(strings, ...params) {
    let result = [];
    for(let i = 0; i < params.length; i++){
        result.push(strings[i]);
        let param = params[i];
        if (Array.isArray(param)) for(let j = 0; j < param.length; j++){
            result.push(param[j]?.[$63ebecb95c660a93$var$mdVerbatim] ?? $63ebecb95c660a93$export$560888d6fe0cfe97(`${param[j]}`));
            if (j < param.length - 1) result.push(', ');
        }
        else result.push(param?.[$63ebecb95c660a93$var$mdVerbatim] ?? $63ebecb95c660a93$export$560888d6fe0cfe97(`${param}`));
    }
    return result.join('') + strings[strings.length - 1];
}
$63ebecb95c660a93$export$f4de1c043ce6927.bold = function(s) {
    // $FlowFixMe[invalid-computed-prop]
    return {
        [$63ebecb95c660a93$var$mdVerbatim]: '**' + $63ebecb95c660a93$export$560888d6fe0cfe97(`${s}`) + '**'
    };
};
$63ebecb95c660a93$export$f4de1c043ce6927.italic = function(s) {
    // $FlowFixMe[invalid-computed-prop]
    return {
        [$63ebecb95c660a93$var$mdVerbatim]: '_' + $63ebecb95c660a93$export$560888d6fe0cfe97(`${s}`) + '_'
    };
};
$63ebecb95c660a93$export$f4de1c043ce6927.underline = function(s) {
    // $FlowFixMe[invalid-computed-prop]
    return {
        [$63ebecb95c660a93$var$mdVerbatim]: '__' + $63ebecb95c660a93$export$560888d6fe0cfe97(`${s}`) + '__'
    };
};
$63ebecb95c660a93$export$f4de1c043ce6927.strikethrough = function(s) {
    // $FlowFixMe[invalid-computed-prop]
    return {
        [$63ebecb95c660a93$var$mdVerbatim]: '~~' + $63ebecb95c660a93$export$560888d6fe0cfe97(`${s}`) + '~~'
    };
};






class $47f76c3ec333e02e$export$fd549de9c2174bbf {
    worker = null;
    bundleGraph = null;
    pending = null;
    deferred = null;
    constructor(options){
        this.logger = options.logger;
        this.hmr = options.hmr;
    }
    buildStart() {
        let { deferred: deferred, promise: promise } = (0, $5HoLl$parcelutils.makeDeferredWithPromise)();
        this.pending = promise;
        this.deferred = deferred;
    }
    async buildSuccess(bundleGraph) {
        this.bundleGraph = bundleGraph;
        let deferred = this.deferred;
        this.pending = null;
        this.deferred = null;
        if (this.worker == null) await this.startWorker();
        else if (!this.hmr) await this.restartWorker();
        deferred?.resolve();
    }
    startWorker() {
        let entry = (0, (/*@__PURE__*/$parcel$interopDefault($451c2a817f483539$exports)))(this.bundleGraph).getEntryBundles().find((b)=>b.env.isNode() && /^\.(js|mjs|cjs)/.test((0, ($parcel$interopDefault($5HoLl$path))).extname(b.filePath)));
        if (entry) {
            let relativePath = (0, ($parcel$interopDefault($5HoLl$path))).relative(process.cwd(), entry.filePath);
            this.logger.log({
                message: (0, $63ebecb95c660a93$export$f4de1c043ce6927)`Starting __${relativePath}__...`
            });
            let worker = new (0, $5HoLl$worker_threads.Worker)(entry.filePath, {
                execArgv: [
                    '--enable-source-maps'
                ],
                workerData: {
                    // Used by the hmr-runtime to detect when to send restart messages.
                    __parcel: true
                },
                stdout: true,
                stderr: true
            });
            worker.on('error', (err)=>{
                this.logger.error((0, $63ebecb95c660a93$export$9e5585c0e071133c)(err));
            });
            worker.stderr.setEncoding('utf8');
            worker.stderr.on('data', (data)=>{
                for (let line of data.split('\n'))this.logger.error({
                    origin: relativePath,
                    message: line,
                    skipFormatting: true
                });
            });
            worker.stdout.setEncoding('utf8');
            worker.stdout.on('data', (data)=>{
                for (let line of data.split('\n'))this.logger.log({
                    origin: relativePath,
                    message: line,
                    skipFormatting: true
                });
            });
            worker.on('exit', ()=>{
                this.worker = null;
            });
            this.worker = worker;
            return new Promise((resolve)=>{
                if (this.hmr) worker.once('message', ()=>resolve());
                else worker.once('online', ()=>resolve());
            });
        } else return Promise.resolve();
    }
    async stop() {
        await this.worker?.terminate();
        this.worker = null;
    }
    async restartWorker() {
        await this.stop();
        // HMR updates are sent before packaging is complete.
        // If the build is still pending, wait until it completes to restart.
        if (!this.pending) await this.startWorker();
        else await this.pending;
    }
    emitUpdate(update) {
        if (update.type === 'reload') return this.restartWorker();
        return new Promise((resolve, reject)=>{
            let worker = this.worker;
            if (worker) {
                worker.once('message', (msg)=>{
                    if (msg === 'restart') this.restartWorker().then(resolve, reject);
                    else resolve();
                });
                worker.postMessage(update);
            } else resolve();
        });
    }
}


let $0d6f2be90dae4092$var$servers = new Map();
let $0d6f2be90dae4092$var$hmrServers = new Map();
let $0d6f2be90dae4092$var$nodeRunners = new Map();
var $0d6f2be90dae4092$export$2e2bcd8739ae039 = new (0, $5HoLl$parcelplugin.Reporter)({
    async report ({ event: event, options: options, logger: logger }) {
        let { serveOptions: serveOptions, hmrOptions: hmrOptions } = options;
        let server = serveOptions ? $0d6f2be90dae4092$var$servers.get(serveOptions.port) : undefined;
        let hmrPort = hmrOptions && hmrOptions.port || serveOptions && serveOptions.port;
        let hmrServer = hmrPort ? $0d6f2be90dae4092$var$hmrServers.get(hmrPort) : undefined;
        let nodeRunner = $0d6f2be90dae4092$var$nodeRunners.get(options.instanceId);
        switch(event.type){
            case 'watchEnd':
                if (serveOptions) {
                    if (!server) return logger.warn({
                        message: 'Could not shutdown devserver because it does not exist.'
                    });
                    await server.stop();
                    $0d6f2be90dae4092$var$servers.delete(server.options.port);
                }
                if (hmrOptions && hmrServer) {
                    await hmrServer.stop();
                    // $FlowFixMe[prop-missing]
                    $0d6f2be90dae4092$var$hmrServers.delete(hmrServer.wss.options.port);
                }
                break;
            case 'buildStart':
                server?.buildStart();
                hmrServer?.buildStart();
                nodeRunner?.buildStart();
                break;
            case 'buildProgress':
                if (event.phase === 'bundled' && hmrServer && // Only send HMR updates before packaging if the built in dev server is used to ensure that
                // no stale bundles are served. Otherwise emit it for 'buildSuccess'.
                options.serveOptions !== false) {
                    let update = await hmrServer.getUpdate(event);
                    if (update) {
                        // If running in node, wait for the server to update before emitting the update
                        // on the client. This ensures that when the client reloads the server is ready.
                        if (nodeRunner) {
                            // Don't await here because that blocks the build from continuing
                            // and we may need to wait for the buildSuccess event.
                            let hmr = hmrServer;
                            nodeRunner.emitUpdate(update).then(()=>hmr.broadcast(update));
                        } else hmrServer.broadcast(update);
                    }
                }
                break;
            case 'buildSuccess':
                if (!server && !hmrServer && (serveOptions || hmrOptions)) [server, hmrServer] = await $0d6f2be90dae4092$var$startDevServer(options, logger, event.bundleGraph.getEntryBundles().some((b)=>b.env.isBrowser() || (0, ($parcel$interopDefault($5HoLl$path))).extname(b.filePath) === '.html'));
                if (serveOptions && server) server.buildSuccess(event.bundleGraph, event.requestBundle);
                if (hmrServer && options.serveOptions === false) {
                    let update = await hmrServer.getUpdate(event);
                    if (update) hmrServer.broadcast(update);
                }
                if (!nodeRunner && options.serveOptions) {
                    nodeRunner = new (0, $47f76c3ec333e02e$export$fd549de9c2174bbf)({
                        logger: logger,
                        hmr: !!options.hmrOptions
                    });
                    $0d6f2be90dae4092$var$nodeRunners.set(options.instanceId, nodeRunner);
                }
                nodeRunner?.buildSuccess(event.bundleGraph);
                hmrServer?.buildSuccess(event);
                break;
            case 'buildFailure':
                // On buildFailure watchStart sometimes has not been called yet
                // do not throw an additional warning here
                if (server) await server.buildError(options, event.diagnostics);
                if (hmrServer) await hmrServer.emitError(options, event.diagnostics);
                break;
        }
    }
});
async function $0d6f2be90dae4092$var$startDevServer(options, logger, isBrowser) {
    let { serveOptions: serveOptions, hmrOptions: hmrOptions } = options;
    let server = serveOptions ? $0d6f2be90dae4092$var$servers.get(serveOptions.port) : undefined;
    let hmrPort = hmrOptions && hmrOptions.port || serveOptions && serveOptions.port;
    let hmrServer = hmrPort ? $0d6f2be90dae4092$var$hmrServers.get(hmrPort) : undefined;
    if (serveOptions && !server && isBrowser) {
        let serverOptions = {
            ...serveOptions,
            projectRoot: options.projectRoot,
            cacheDir: options.cacheDir,
            // Override the target's publicUrl as that is likely meant for production.
            // This could be configurable in the future.
            publicUrl: serveOptions.publicUrl ?? '/',
            inputFS: options.inputFS,
            outputFS: options.outputFS,
            packageManager: options.packageManager,
            logger: logger,
            hmrOptions: hmrOptions
        };
        server = new (0, $fd5a43f1e3e7c0f2$export$2e2bcd8739ae039)(serverOptions);
        $0d6f2be90dae4092$var$servers.set(serveOptions.port, server);
        const devServer = await server.start();
        if (hmrOptions && hmrOptions.port === serveOptions.port) {
            let hmrServerOptions = {
                port: serveOptions.port,
                host: hmrOptions.host,
                devServer: devServer,
                addMiddleware: (handler)=>{
                    server?.middleware.push(handler);
                },
                logger: logger,
                https: options.serveOptions ? options.serveOptions.https : false,
                cacheDir: options.cacheDir,
                inputFS: options.inputFS,
                outputFS: options.outputFS,
                projectRoot: options.projectRoot,
                distDir: serveOptions.distDir,
                publicUrl: serveOptions.publicUrl ?? '/'
            };
            hmrServer = new (0, $9f01a40e8e16f757$export$2e2bcd8739ae039)(hmrServerOptions);
            $0d6f2be90dae4092$var$hmrServers.set(serveOptions.port, hmrServer);
            await hmrServer.start();
            return [
                server,
                hmrServer
            ];
        }
    }
    let port = hmrOptions?.port;
    if (typeof port === 'number' && !hmrServer) {
        let hmrServerOptions = {
            port: port,
            host: hmrOptions?.host,
            logger: logger,
            https: options.serveOptions ? options.serveOptions.https : false,
            cacheDir: options.cacheDir,
            inputFS: options.inputFS,
            outputFS: options.outputFS,
            projectRoot: options.projectRoot,
            distDir: serveOptions ? serveOptions.distDir : null,
            publicUrl: serveOptions ? serveOptions.publicUrl ?? '/' : '/'
        };
        hmrServer = new (0, $9f01a40e8e16f757$export$2e2bcd8739ae039)(hmrServerOptions);
        $0d6f2be90dae4092$var$hmrServers.set(port, hmrServer);
        await hmrServer.start();
    }
    return [
        server,
        hmrServer
    ];
}


//# sourceMappingURL=ServerReporter.js.map
